Commit 299f49eb authored by renjintao's avatar renjintao

reorder list

parent 089e420c
...@@ -146,6 +146,10 @@ export default { ...@@ -146,6 +146,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
format:{
type:Function,
default:null
},
lazy: { lazy: {
//懒加载设置,设置为真时候,默认不加载数据。 //懒加载设置,设置为真时候,默认不加载数据。
type: Boolean, type: Boolean,
...@@ -286,7 +290,13 @@ export default { ...@@ -286,7 +290,13 @@ export default {
} }
if (this.action) { if (this.action) {
this.$api.post(this.action, this.search).then(r => { this.$api.post(this.action, this.search).then(r => {
if(this.format){
this.list = this.format(r.result.items);
}
else
{
this.list = r.result.items; this.list = r.result.items;
}
this.search.total = r.result.totalCount || r.result.count; this.search.total = r.result.totalCount || r.result.count;
}); });
} }
......
...@@ -1489,5 +1489,30 @@ export default { ...@@ -1489,5 +1489,30 @@ export default {
description:'描述', description:'描述',
levelNum:'编码分类层数', levelNum:'编码分类层数',
codeLength:'编码分类位数', codeLength:'编码分类位数',
} },
//转续列表
order_execute_handon:{
dispatchId:'工单id',
currentUserId:'当前操作人',
handonUserId:'转序人',
status:'状态',
currentDetailId:'工序id',
nextDetailId:'下道工序id',
remark:'备注',
finishTime:'工单完成时间',
productIdStr:'交接判定产品id字符串',
actualHandonUser:'实际交接人',
handonCardNo:'交接人刷卡号',
currentDetailName:'工序名称',
nextDetailName:'下道工序名称',
productName:'产品名称',
drawnNumber:'图号',
batchNumber:'批次号',
handonTime:'接收时间',
handonNo:'交接单号',
handonCount:'交接数量',
qualifiedCount:'合格数量',
currentUserName:'交接人名称',
handonUserName:'接收人名称',
}
} }
...@@ -33,6 +33,12 @@ export default { ...@@ -33,6 +33,12 @@ export default {
confirmproductsandoperator(params) { confirmproductsandoperator(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params); return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params);
}, },
//转续列表
indexHandon: `${PlanUrl}/orderexecutehandon/handonpaged`,
handonpaged(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/handonpaged`, params);
},
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<style lang="less"> <style lang="less">
@import "../execute/execute.less"; @import "../execute/execute.less";
</style> </style>
<!--:action="action"-->
<template> <template>
<div> <div>
<DataGrid <DataGrid
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
:batch="true" :batch="true"
:border="false" :border="false"
:high="false" :high="false"
:format="formatFun"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
<Input <Input
search search
enter-button enter-button
placeholder="请输入关键字订单编号/项目名称" placeholder="请输入关键字产品名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
@on-search="search" @on-search="search"
v-width="300" v-width="300"
...@@ -60,16 +62,16 @@ ...@@ -60,16 +62,16 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../execute/api";
export default { export default {
name: "reOrder", name: "reOrder",
data() { data() {
return { return {
action: Api.index, action: Api.indexHandon,
starmodal: false, starmodal: false,
easySearch: { easySearch: {
keys: { keys: {
op: "mesCode,productName", op: "productName",
value: null, value: null,
default: true default: true
} }
...@@ -85,35 +87,18 @@ export default { ...@@ -85,35 +87,18 @@ export default {
align: "center" align: "center"
}, },
{ {
key: "quantity", key: "handonNo",
title: this.l("quantity"), title: this.l("handonNo"),
align: "right",
high: true,
width: 80
},
{
key: "taskRequire",
title: this.l("taskRequire"),
align: "left", align: "left",
easy: true, high: true
high: true,
hide: true
}, },
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
width: 120,
high: true, high: true,
code: "plan.order.status", code: "mes.order_execute_handon.status"
width: 100
},
{
key: "productCode",
title: this.l("productCode"),
align: "left",
easy: true,
high: true,
hide: true
}, },
{ {
key: "productName", key: "productName",
...@@ -126,30 +111,91 @@ export default { ...@@ -126,30 +111,91 @@ export default {
key: "drawnNumber", key: "drawnNumber",
title: this.l("drawnNumber"), title: this.l("drawnNumber"),
align: "left", align: "left",
easy: true,
high: true high: true
}, },
{ {
key: "batchNumber", key: "batchNumber",
title: this.l("batchNumber"), title: this.l("batchNumber"),
align: "left", align: "left",
high: true
},
{
key: "handonCount",
title: this.l("handonCount"),
align: "right",
high: true
},
{
key: "qualifiedCount",
title: this.l("qualifiedCount"),
align: "right",
high: true,
hide: true
},
{
key: "finishTime",
title: this.l("finishTime"),
align: "center",
width: 150,
high: true
},
{
key: "currentDetailName",
title: this.l("currentDetailName"),
align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "projectNumber", key: "nextDetailName",
title: this.l("projectNumber"), title: this.l("nextDetailName"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "urgencyLevel", key: "handonUserId",
title: this.l("urgencyLevel"), title: this.l("handonUserId"),
align: "center", align: "left",
high: true,
type: "user"
},
{
key: "actualHandonUser",
title: this.l("actualHandonUser"),
align: "left",
high: true,
type: "user",
hide: true
},
{
key: "handonCardNo",
title: this.l("handonCardNo"),
align: "left",
high: true, high: true,
code: "plan.order.urgencyLevel", hide: true
width: 100 },
{
key: "currentUserName",
title: this.l("currentUserName"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "handonUserName",
title: this.l("handonUserName"),
align: "left",
easy: true,
high: true
},
{
key: "handonTime",
title: this.l("handonTime"),
high: true,
align: "center",
width: 150
}, },
{ {
title: "操作", title: "操作",
...@@ -163,7 +209,7 @@ export default { ...@@ -163,7 +209,7 @@ export default {
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.openTrans(params.row.id) }, on: { click: () => this.openTrans(params.row.id) },
style: params.row.status == 1 ? "display:none" : "" style: params.row.status == 1 ? "" : "display:none"
}, },
"确认转续" "确认转续"
) )
...@@ -172,7 +218,7 @@ export default { ...@@ -172,7 +218,7 @@ export default {
} }
], ],
userId: "", userId: "",
userPwd: "" userPwd: "",
}; };
}, },
created() { created() {
...@@ -195,7 +241,7 @@ export default { ...@@ -195,7 +241,7 @@ export default {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
openTrans(val) { openTrans(val) {
if (val&&val>0) { if (val && val > 0) {
this.$refs.grid.selectAll(false); this.$refs.grid.selectAll(false);
this.arrayIds = []; this.arrayIds = [];
this.arrayIds.push(val); this.arrayIds.push(val);
...@@ -203,12 +249,12 @@ export default { ...@@ -203,12 +249,12 @@ export default {
this.transModal = true; this.transModal = true;
}, },
transOk() { transOk() {
let params={ let params = {
ids:this.arrayIds, ids: this.arrayIds,
user:this.userId, user: this.userId,
pwd:this.userPwd pwd: this.userPwd
} };
alert(JSON.stringify(params)); alert(JSON.stringify(params));
}, },
onSelect(a, b) { onSelect(a, b) {
//批量选择 //批量选择
...@@ -217,9 +263,21 @@ export default { ...@@ -217,9 +263,21 @@ export default {
this.arrayIds = selectRows.map(e => e.id); this.arrayIds = selectRows.map(e => e.id);
}, },
l(key) { l(key) {
let vkey = "mes_plan" + "." + key; let vkey = "order_execute_handon" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
},
//格式化原始数据
formatFun(data) {
data.map(e=>{
if (e.status != 1) {
e._disabled = true;
} else {
e._disabled = false;
}
})
return data;
} }
} },
computed: {}
}; };
</script> </script>
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