Commit 0b31c683 authored by renjintao's avatar renjintao

plan

parent 504ff885
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
:height="tableHeight" :height="tableHeight"
:draggable="draggable" :draggable="draggable"
:size="size" :size="size"
:row-key="rowKey"
ref="table" ref="table"
class="tableCommon" class="tableCommon"
@on-expand="expand" @on-expand="expand"
...@@ -235,6 +236,9 @@ export default { ...@@ -235,6 +236,9 @@ export default {
span: { span: {
type: Number, type: Number,
default: 24 default: 24
},
rowKey:{
type:[String,Number]
} }
}, },
created() { created() {
......
...@@ -15,13 +15,22 @@ ...@@ -15,13 +15,22 @@
</div> </div>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid
:columns="columns"
ref="grid"
:data="listTemp"
@on-selection-change="onSelect"
:batch="true"
:border="false"
:rowKey="id"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input
placeholder="请输入关键字订单编号/备注/任务节点要求/产品序号:No1~No99/产品名称/图号/批次号/项目号" placeholder="请输入关键字订单编号/产品名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
style="width:240px;"
/> />
</FormItem> </FormItem>
<FormItem> <FormItem>
...@@ -34,7 +43,10 @@ ...@@ -34,7 +43,10 @@
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="addModal=true">创建</Button> <Button type="primary" @click="addModal=true">创建</Button>
<Button type="primary" >修改</Button> </template>
<template slot="batch">
<Button type="primary" class="mr10 ml10">订单派发</Button>
<Button type="primary" class="mr10 ml10">批量删除</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="新增" footer-hide width="1000"> <Modal v-model="addModal" title="新增" footer-hide width="1000">
...@@ -71,8 +83,7 @@ export default { ...@@ -71,8 +83,7 @@ export default {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: op: "mesCode,productName",
"mesCode,productCode,productName,drawnNumber,batchNumber,projectNumber",
value: null value: null
} }
}, },
...@@ -81,25 +92,39 @@ export default { ...@@ -81,25 +92,39 @@ export default {
detailModal: false, detailModal: false,
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
id:"id",
columns: [ columns: [
{
key: "selection",
type: "selection",
width: 50,
align: "center"
},
{
key: "id",
title: this.l("id"),
hide:true,
},
{ {
key: "mesCode", key: "mesCode",
title: this.l("mesCode"), title: this.l("mesCode"),
align: "left", align: "left",
width: 240,
easy: true, easy: true,
high: true high: true,
tree: true
}, },
{ {
key: "taskType", key: "taskType",
title: this.l("taskType"), title: this.l("taskType"),
align: "left", align: "center",
high: true, high: true,
code: "mes.mes_plan.task_type" code: "plan.order.taskType"
}, },
{ {
key: "quantity", key: "quantity",
title: this.l("quantity"), title: this.l("quantity"),
align: "left", align: "right",
high: true high: true
}, },
{ {
...@@ -113,9 +138,9 @@ export default { ...@@ -113,9 +138,9 @@ export default {
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "left", align: "center",
high: true, high: true,
code: "mes.mes_plan.status" code: "plan.order.status"
}, },
{ {
key: "productCode", key: "productCode",
...@@ -158,7 +183,7 @@ export default { ...@@ -158,7 +183,7 @@ export default {
title: this.l("urgencyLevel"), title: this.l("urgencyLevel"),
align: "left", align: "left",
high: true, high: true,
code: "mes.mes_plan.urgency_level" code: "plan.order.urgencyLevel"
}, },
{ {
key: "productingPreparationPeople", key: "productingPreparationPeople",
...@@ -205,7 +230,7 @@ export default { ...@@ -205,7 +230,7 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 180,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -232,11 +257,199 @@ export default { ...@@ -232,11 +257,199 @@ export default {
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}, },
"删除" "删除"
),
h(
"op",
{
attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row.id) }
},
"分解"
) )
]); ]);
} }
} }
], ],
listTemp: [
{
actualFinishDate: "2020-04-09 18:36:31",
actualStartDate: "2020-04-09 17:52:42",
batchNumber: "5",
creationTime: "2020-04-09 17:32:06",
creatorUserId: 0,
demandFinishDate: "2020-04-10 00:00:00",
demandStartDate: "2020-04-09 00:00:00",
designer: "",
drawnNumber: "TY9-06-0803",
functionaryOffice: "",
guestName: "",
id: 540,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_13",
modelVersion: "",
officeFunctionary: "",
orderQuotationStatus: 0,
outerDrawnNumber: "",
outer_Envelope_Size: "4",
printSupply: "",
productId: 27,
productName: "气源分配器壳体",
projectNumber: "5",
putintDocmentCode: "5",
quantity: 10,
remark: "555",
rootCode: "DDBH_20200409_13",
rootId: 540,
routing_Method: "1",
stage: "1",
status: 13,
taskCode: "5",
taskInputDate: "2020-04-09 17:32:06",
taskRequire: "5",
taskType: "1",
technologyDocmentCode: "5",
upId: 0,
urgencyLevel: "1",
_disabled: true,
children: [
{
actualFinishDate: "2020-04-09 18:36:31",
actualStartDate: "2020-04-09 17:52:42",
batchNumber: "5",
creationTime: "2020-04-09 17:32:06",
creatorUserId: 0,
demandFinishDate: "2020-04-10 00:00:00",
demandStartDate: "2020-04-09 00:00:00",
designer: "",
drawnNumber: "TY9-06-0803",
functionaryOffice: "",
guestName: "",
id: 540,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_13_01",
modelVersion: "",
officeFunctionary: "",
orderQuotationStatus: 0,
outerDrawnNumber: "",
outer_Envelope_Size: "4",
printSupply: "",
productId: 27,
productName: "气源分配器壳体",
projectNumber: "5",
putintDocmentCode: "5",
quantity: 10,
remark: "555",
rootCode: "DDBH_20200409_13",
rootId: 540,
routing_Method: "1",
stage: "1",
status: 13,
taskCode: "5",
taskInputDate: "2020-04-09 17:32:06",
taskRequire: "5",
taskType: "1",
technologyDocmentCode: "5",
upId: 0,
urgencyLevel: "1",
_disabled: false
}
]
},
{
actualFinishDate: "2020-04-09 18:36:31",
actualStartDate: "2020-04-09 17:52:42",
batchNumber: "5",
creationTime: "2020-04-09 17:32:06",
creatorUserId: 0,
demandFinishDate: "2020-04-10 00:00:00",
demandStartDate: "2020-04-09 00:00:00",
designer: "",
drawnNumber: "TY9-06-0803",
functionaryOffice: "",
guestName: "",
id: 540,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_14",
modelVersion: "",
officeFunctionary: "",
orderQuotationStatus: 0,
outerDrawnNumber: "",
outer_Envelope_Size: "4",
printSupply: "",
productId: 27,
productName: "气源分配器壳体",
projectNumber: "5",
putintDocmentCode: "5",
quantity: 10,
remark: "555",
rootCode: "DDBH_20200409_13",
rootId: 540,
routing_Method: "1",
stage: "1",
status: 13,
taskCode: "5",
taskInputDate: "2020-04-09 17:32:06",
taskRequire: "5",
taskType: "1",
technologyDocmentCode: "5",
upId: 0,
urgencyLevel: "1",
_disabled: false,
},
{
actualFinishDate: "2020-04-09 18:36:31",
actualStartDate: "2020-04-09 17:52:42",
batchNumber: "5",
creationTime: "2020-04-09 17:32:06",
creatorUserId: 0,
demandFinishDate: "2020-04-10 00:00:00",
demandStartDate: "2020-04-09 00:00:00",
designer: "",
drawnNumber: "TY9-06-0803",
functionaryOffice: "",
guestName: "",
id: 540,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_15",
modelVersion: "",
officeFunctionary: "",
orderQuotationStatus: 0,
outerDrawnNumber: "",
outer_Envelope_Size: "4",
printSupply: "",
productId: 27,
productName: "气源分配器壳体",
projectNumber: "5",
putintDocmentCode: "5",
quantity: 10,
remark: "555",
rootCode: "DDBH_20200409_13",
rootId: 540,
routing_Method: "1",
stage: "1",
status: 13,
taskCode: "5",
taskInputDate: "2020-04-09 17:32:06",
taskRequire: "5",
taskType: "1",
technologyDocmentCode: "5",
upId: 0,
urgencyLevel: "1",
_disabled: false,
}
],
treeData: [], treeData: [],
treeInputSearch: "", treeInputSearch: "",
ocolumn: [], ocolumn: [],
...@@ -379,11 +592,11 @@ export default { ...@@ -379,11 +592,11 @@ export default {
let vkey = "mes_plan" + "." + key; let vkey = "mes_plan" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
}, },
//new start //new tree start
initTree() { initTree() {
var sumData = []; var sumData = [];
this.$http.order.getallselecttree().then(res => { this.$http.order.getallselecttree().then(res => {
alert(JSON.stringify(res)) //alert(JSON.stringify(res))
if (res.result) { if (res.result) {
for (var i = 0; i < res.result.length; i++) { for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i]); sumData = sumData.concat(res.result[i]);
...@@ -455,6 +668,18 @@ export default { ...@@ -455,6 +668,18 @@ export default {
data.title data.title
); );
}, },
//new tree end
//list start
onSelect(a, b) {
alert(JSON.stringify(a));
//批量选择
let selectRows = a;
this.arrPartPkId = [];
// selectRows.forEach(e => {
// this.arrPartPkId.push(e.part_task_pk);
// });
}
//list end
} }
}; };
</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