Commit 68ab455e authored by renjintao's avatar renjintao

grid/mesplan/api

parent 59df1878
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
@on-selection-change="selectionChange" @on-selection-change="selectionChange"
@on-select="onSelect" @on-select="onSelect"
:loading="loading"
></Table> ></Table>
<div class="table-footer"> <div class="table-footer">
<div> <div>
...@@ -138,7 +139,8 @@ export default { ...@@ -138,7 +139,8 @@ export default {
configLoad: false, configLoad: false,
userConfig: null, //用户页面配置信息。, userConfig: null, //用户页面配置信息。,
// userId: 1 // userId: 1
userId: this.$store.state.userInfo.userId userId: this.$store.state.userInfo.userId,
loading: false
}; };
}, },
props: { props: {
...@@ -238,8 +240,8 @@ export default { ...@@ -238,8 +240,8 @@ export default {
default: 24 default: 24
}, },
//table控件children子数据控制功能 //table控件children子数据控制功能
rowKey:{ rowKey: {
type:[String,Number] type: [String, Number]
} }
}, },
created() { created() {
...@@ -251,7 +253,7 @@ export default { ...@@ -251,7 +253,7 @@ export default {
this.columnsCur = this.$u.clone(this.columns); this.columnsCur = this.$u.clone(this.columns);
}, },
mounted() { mounted() {
if (this.data && this.data.length > 0) { if (this.data && this.data.length > 0) {
this.list = this.data; this.list = this.data;
//return; //return;
} }
...@@ -261,7 +263,7 @@ export default { ...@@ -261,7 +263,7 @@ export default {
return; return;
} }
this.loadUserConfig(); this.loadUserConfig();
if (this.height === 0) { if (this.height === 0) {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
...@@ -273,7 +275,7 @@ export default { ...@@ -273,7 +275,7 @@ export default {
} else { } else {
this.tableHeight = this.height; this.tableHeight = this.height;
} }
//注册拖拽事件。 //注册拖拽事件。
this.$dragging.$on("dragend", e => { this.$dragging.$on("dragend", e => {
// console.log("dragend",e); // console.log("dragend",e);
...@@ -287,10 +289,20 @@ export default { ...@@ -287,10 +289,20 @@ export default {
this.tableHeight = window.innerHeight - this.firstY - 60; this.tableHeight = window.innerHeight - this.firstY - 60;
} }
if (this.action) { if (this.action) {
this.$api.post(this.action, this.search).then(r => { this.loading = true;
this.list = r.result.items; this.$api
this.search.total = r.result.totalCount; .post(this.action, this.search)
}); .then(r => {
this.list = r.result.items;
this.search.total = r.result.totalCount;
this.loading = false;
})
.catch(
function(err) {
this.loading = false;
this.$Message.error("加载失败");
}.bind(this)
);
} }
}, },
columnInit() { columnInit() {
...@@ -614,5 +626,4 @@ export default { ...@@ -614,5 +626,4 @@ export default {
color: #249e91; color: #249e91;
} }
} }
</style> </style>
\ No newline at end of file
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index: `${PlanUrl}/mesplan/paged`, index: `${PlanUrl}/mesplan/getpagedmesplans`,
paged(params) { paged(params) {
return Api.post(`${PlanUrl}/mesplan/paged`, params); return Api.post(`${PlanUrl}/mesplan/paged`, params);
}, },
...@@ -19,4 +19,37 @@ export default { ...@@ -19,4 +19,37 @@ export default {
params: params params: params
}); });
}, },
//----new 接口------
//批量删除
batchdelete(params) {
return Api.post(`${PlanUrl}/mesplan/batchdelete`, params);
},
//分页列表
getpagedmesplans(params) {
return Api.post(`${PlanUrl}/mesplan/getpagedmesplans`, params);
},
//创建订单
mesplancreate(params) {
return Api.post(`${PlanUrl}/mesplan/mesplancreate`, params);
},
//修改订单
mesorderupdate(params) {
return Api.post(`${PlanUrl}/mesplan/mesorderupdate`, params);
},
//订单派发+生成产品序号
mesorderdistribute(params) {
return Api.post(`${PlanUrl}/mesplan/mesorderdistribute`, params);
},
//删除父订单+子订单
mesorderdelete(params) {
return Api.post(`${PlanUrl}/mesplan/mesorderdelete`, params);
},
//所有最后一级子订单删除前检查
sondeletecheck(params) {
return Api.post(`${PlanUrl}/mesplan/sondeletecheck`, params);
},
//订单分解--保存子订单,除设置值外其他字段同父订单
mesorderdivide(params) {
return Api.post(`${PlanUrl}/mesplan/mesorderupdate`, params);
},
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment