Commit de2028fd authored by renjintao's avatar renjintao

mesplan

parent 9beb9f4a
...@@ -37,41 +37,12 @@ ...@@ -37,41 +37,12 @@
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="8">
<FormItem label="阶段" style="width:100%" prop="stage">
<dictionary code="plan.order.stage" v-model="orderSearchForm.stage" style="width:240px"></dictionary>
</FormItem>
</Col>
<Col span="8">
<FormItem label="材料" style="width:100%" prop="materialId">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem label="数量" style="width:100%" prop="quantity"> <FormItem label="数量" style="width:100%" prop="quantity">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber> <InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8">
<FormItem label="工艺方法" style="width:100%" prop="routing_Method">
<dictionary
code="plan.order.routingMethod"
v-model="orderSearchForm.routing_Method"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8">
<FormItem label="外包络尺寸(mm)" style="width:100%">
<Input v-model="orderSearchForm.outer_Envelope_Size" style="width:240px"></Input>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem label="开始时间" style="width:100%"> <FormItem label="开始时间" style="width:100%">
<DatePicker <DatePicker
...@@ -83,8 +54,6 @@ ...@@ -83,8 +54,6 @@
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8"> <Col span="8">
<FormItem label="完成时间" style="width:100%"> <FormItem label="完成时间" style="width:100%">
<DatePicker <DatePicker
...@@ -96,22 +65,13 @@ ...@@ -96,22 +65,13 @@
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> </Row>
<FormItem label="甲方客户" style="width:100%"> <Row>
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.guestName"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem label="项目号" style="width:100%"> <FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" style="width:240px" /> <Input v-model="orderSearchForm.projectNumber" style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8"> <Col span="8">
<FormItem label="批次号" style="width:100%"> <FormItem label="批次号" style="width:100%">
<Input v-model="orderSearchForm.batchNumber" style="width:240px" /> <Input v-model="orderSearchForm.batchNumber" style="width:240px" />
...@@ -126,30 +86,13 @@ ...@@ -126,30 +86,13 @@
></dictionary> ></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8">
<FormItem label="甲方任务号" style="width:100%">
<Input v-model="orderSearchForm.taskCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="24">
<FormItem label="任务节点要求" style="width:100%"> <FormItem label="任务节点要求" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder style="width:240px" /> <Input v-model="orderSearchForm.taskRequire" placeholder />
</FormItem> </FormItem>
</Col> </Col>
<Col span="8">
<FormItem label="甲方投产输入文件(编号)" style="width:100%">
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="8">
<FormItem label="甲方技术输入文件(编号)" style="width:100%">
<Input v-model="orderSearchForm.technologyDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="24"> <Col span="24">
<FormItem label="备注" style="width:100%"> <FormItem label="备注" style="width:100%">
<Input v-model="orderSearchForm.remark" placeholder type="textarea" :rows="3" /> <Input v-model="orderSearchForm.remark" placeholder type="textarea" :rows="3" />
...@@ -193,26 +136,10 @@ export default { ...@@ -193,26 +136,10 @@ export default {
productName: "", //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段
materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDateEnd(tomorrowDate), //完成时间
remark: "", //备注 remark: "", //备注
projectNumber: "", //项目号 projectNumber: "", //项目号
batchNumber: "", //批次号 batchNumber: "", //批次号
...@@ -235,22 +162,6 @@ export default { ...@@ -235,22 +162,6 @@ export default {
type: "number" type: "number"
} }
], ],
stage: [
{
required: true,
message: "请选择阶段",
type: "number",
trigger: "change"
}
],
materialId: [
{
required: true,
message: "请选择材料",
type: "number",
trigger: "change"
}
],
quantity: [ quantity: [
{ {
required: true, required: true,
...@@ -259,14 +170,6 @@ export default { ...@@ -259,14 +170,6 @@ export default {
trigger: "change" trigger: "change"
} }
], ],
routing_Method: [
{
required: true,
message: "请选择工艺方法",
type: "number",
trigger: "change"
}
]
}, },
disabled:false, disabled:false,
}; };
...@@ -279,7 +182,8 @@ export default { ...@@ -279,7 +182,8 @@ export default {
this.$refs.formValidate.validate(v => { this.$refs.formValidate.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
Api.create(this.entity) this.orderSearchForm.status=1
Api.mesplancreate(this.orderSearchForm)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
...@@ -394,11 +298,11 @@ export default { ...@@ -394,11 +298,11 @@ export default {
}, },
getFinishedDate(value) { getFinishedDate(value) {
if (value == "") { if (value == "") {
this.orderSearchForm.demandFinishDate = this.getFormatDate( this.orderSearchForm.demandFinishDate = this.getFormatDateEnd(
tomorrowDate tomorrowDate
); );
} else { } else {
this.orderSearchForm.demandFinishDate = this.getFormatDate(value); this.orderSearchForm.demandFinishDate = this.getFormatDateEnd(value);
} }
}, },
getFormatDate(dates) { getFormatDate(dates) {
...@@ -408,7 +312,17 @@ export default { ...@@ -408,7 +312,17 @@ export default {
"-" + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
"-" + "-" +
this.p(d.getDate()); this.p(d.getDate())+ " 00:00:01";
return resDate;
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate())+ " 23:59:59";
return resDate; return resDate;
}, },
p(s) { p(s) {
......
...@@ -50,6 +50,6 @@ export default { ...@@ -50,6 +50,6 @@ export default {
}, },
//订单分解--保存子订单,除设置值外其他字段同父订单 //订单分解--保存子订单,除设置值外其他字段同父订单
mesorderdivide(params) { mesorderdivide(params) {
return Api.post(`${PlanUrl}/mesplan/mesorderupdate`, params); return Api.post(`${PlanUrl}/mesplan/mesorderdivide`, params);
}, },
} }
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<Filed :span="12" :name="l('urgencyLevel')"> <Filed :span="12" :name="l('urgencyLevel')">
<state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state> <state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state>
</Filed> </Filed>
<Filed :span="12" :name="l('demandStartDate')">{{entity.demandStartDate}}</Filed> <Filed :span="12" :name="l('demandStartDate')"><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></Filed>
<Filed :span="12" :name="l('demandFinishDate')">{{entity.demandFinishDate}}</Filed> <Filed :span="12" :name="l('demandFinishDate')"><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></Filed>
<Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed> <Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed> <Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
</Row> </Row>
......
<template> <template>
<Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate"> <Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate">
<Row> <Row>
<!-- <Col span="24"> <Col span="8">
<FormItem label="订单编号" style="width:100%"> <FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem>
{{this.orderSearchForm.mesCode}} </Col>
</FormItem>
</Col>-->
<Col span="8"> <Col span="8">
<FormItem :label="l('productName')" style="width:100%" prop="productId"> <FormItem :label="l('productName')" style="width:100%" prop="productId">
<Select <Select
...@@ -30,6 +28,8 @@ ...@@ -30,6 +28,8 @@
<Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" /> <Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" />
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('taskType')" style="width:100%" prop="taskType"> <FormItem :label="l('taskType')" style="width:100%" prop="taskType">
<dictionary <dictionary
...@@ -39,43 +39,11 @@ ...@@ -39,43 +39,11 @@
></dictionary> ></dictionary>
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8">
<FormItem :label="l('stage')" style="width:100%" prop="stage">
<dictionary code="plan.order.stage" v-model="orderSearchForm.stage" style="width:240px"></dictionary>
</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('materialId')" style="width:100%" prop="materialId">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('quantity')" style="width:100%" prop="quantity"> <FormItem :label="l('quantity')" style="width:100%" prop="quantity">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber> <InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8">
<FormItem :label="l('routing_Method')" style="width:100%" prop="routing_Method">
<dictionary
code="plan.order.routingMethod"
v-model="orderSearchForm.routing_Method"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('outer_Envelope_Size')" style="width:100%">
<Input v-model="orderSearchForm.outer_Envelope_Size" style="width:240px"></Input>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('demandStartDate')" style="width:100%"> <FormItem :label="l('demandStartDate')" style="width:100%">
<DatePicker <DatePicker
...@@ -100,27 +68,19 @@ ...@@ -100,27 +68,19 @@
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8">
<FormItem :label="l('guestName')" style="width:100%">
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.guestName"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('projectNumber')" style="width:100%"> <FormItem :label="l('projectNumber')" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" style="width:240px" /> <Input v-model="orderSearchForm.projectNumber" style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('batchNumber')" label="批次号" style="width:100%"> <FormItem :label="l('batchNumber')" label="批次号" style="width:100%">
<Input v-model="orderSearchForm.batchNumber" style="width:240px" /> <Input v-model="orderSearchForm.batchNumber" style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('urgencyLevel')" style="width:100%"> <FormItem :label="l('urgencyLevel')" style="width:100%">
<dictionary <dictionary
...@@ -130,26 +90,9 @@ ...@@ -130,26 +90,9 @@
></dictionary> ></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="24">
<FormItem :label="l('taskCode')" style="width:100%">
<Input v-model="orderSearchForm.taskCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="8">
<FormItem :label="l('taskRequire')" style="width:100%"> <FormItem :label="l('taskRequire')" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder style="width:240px" /> <Input v-model="orderSearchForm.taskRequire" placeholder />
</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('putintDocmentCode')" style="width:100%">
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('technologyDocmentCode')" style="width:100%">
<Input v-model="orderSearchForm.technologyDocmentCode" placeholder style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -177,11 +120,34 @@ export default { ...@@ -177,11 +120,34 @@ export default {
disabled: false, disabled: false,
orderSearchForm: {}, orderSearchForm: {},
ruleValidate: { ruleValidate: {
name: [{ required: true, message: "必填", trigger: "blur" }] productId: [
{
required: true,
message: "请选择产品名称",
type: "number",
trigger: "change"
}
],
taskType: [
{
required: true,
message: "请选择任务类型",
trigger: "change",
type: "number"
}
],
quantity: [
{
required: true,
message: "请输入数量",
type: "number",
trigger: "change"
}
],
}, },
placeholdeinfo:'', placeholdeinfo: "",
list:[], list: [],
data1:[], data1: []
}; };
}, },
props: { props: {
...@@ -192,8 +158,8 @@ export default { ...@@ -192,8 +158,8 @@ export default {
} }
} }
}, },
mounted(){ mounted() {
this.loadTree() this.loadTree();
}, },
methods: { methods: {
load(v) { load(v) {
...@@ -203,10 +169,11 @@ export default { ...@@ -203,10 +169,11 @@ export default {
}); });
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.formValidate.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
Api.update(this.orderSearchForm) this.orderSearchForm.status=1
Api.mesorderupdate(this.orderSearchForm)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
...@@ -252,27 +219,14 @@ export default { ...@@ -252,27 +219,14 @@ export default {
productName: "", //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段
materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDateEnd(tomorrowDate), //完成时间
remark: "" //备注 remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
}; };
}, },
loadTree() { loadTree() {
...@@ -289,7 +243,6 @@ export default { ...@@ -289,7 +243,6 @@ export default {
this.$Message.error("加载产品树失败!"); this.$Message.error("加载产品树失败!");
} }
}); });
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
//渲染树的样式 //渲染树的样式
...@@ -321,11 +274,11 @@ export default { ...@@ -321,11 +274,11 @@ export default {
}, },
getFinishedDate(value) { getFinishedDate(value) {
if (value == "") { if (value == "") {
this.orderSearchForm.demandFinishDate = this.getFormatDate( this.orderSearchForm.demandFinishDate = this.getFormatDateEnd(
tomorrowDate tomorrowDate
); );
} else { } else {
this.orderSearchForm.demandFinishDate = this.getFormatDate(value); this.orderSearchForm.demandFinishDate = this.getFormatDateEnd(value);
} }
}, },
getFormatDate(dates) { getFormatDate(dates) {
...@@ -335,7 +288,19 @@ export default { ...@@ -335,7 +288,19 @@ export default {
"-" + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
"-" + "-" +
this.p(d.getDate()); this.p(d.getDate()) +
" 00:00:01";
return resDate;
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate; return resDate;
}, },
p(s) { p(s) {
...@@ -347,7 +312,7 @@ export default { ...@@ -347,7 +312,7 @@ export default {
row(v) { row(v) {
if (v != null) { if (v != null) {
this.orderSearchForm = this.$u.clone(this.row); this.orderSearchForm = this.$u.clone(this.row);
this.placeholdeinfo=this.orderSearchForm.productName this.placeholdeinfo = this.orderSearchForm.productName;
} }
} }
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
</Modal> </Modal>
<Modal v-model="sendModal" title="订单派发" width="1200"> <Modal v-model="sendModal" title="订单派发" width="1200">
<Send :row="rowDataArry" ref="orderSplit" /> <Send :row="rowDataArry" ref="orderSend" />
<div slot="footer"> <div slot="footer">
<Button @click="sendModal = false">取消</Button> <Button @click="sendModal = false">取消</Button>
<Button type="primary" @click="sendOk">确定派发</Button> <Button type="primary" @click="sendOk">确定派发</Button>
...@@ -272,14 +272,16 @@ export default { ...@@ -272,14 +272,16 @@ export default {
title: this.l("demandStartDate"), title: this.l("demandStartDate"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
type: "date"
}, },
{ {
key: "demandFinishDate", key: "demandFinishDate",
title: this.l("demandFinishDate"), title: this.l("demandFinishDate"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
type: "date"
}, },
{ {
title: "操作", title: "操作",
...@@ -309,7 +311,7 @@ export default { ...@@ -309,7 +311,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "remove" }, attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row.id) }, on: { click: () => this.remove(params.row) },
style: params.row._disabled ? "display:none" : "" style: params.row._disabled ? "display:none" : ""
}, },
"删除" "删除"
...@@ -327,331 +329,6 @@ export default { ...@@ -327,331 +329,6 @@ export default {
} }
} }
], ],
listTemp: [
{
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,
divideMark: 1,
_showChildren: 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: 541,
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: 1,
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: 540,
urgencyLevel: "1",
_disabled: false,
divideMark: 0,
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: 542,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_13_02",
modelVersion: "",
officeFunctionary: "",
orderQuotationStatus: 0,
outerDrawnNumber: "",
outer_Envelope_Size: "4",
printSupply: "",
productId: 27,
productName: "气源分配器壳体",
projectNumber: "5",
putintDocmentCode: "5",
quantity: 9,
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: 540,
urgencyLevel: "1",
_disabled: true,
divideMark: 0,
children: []
}
]
},
{
_showChildren: true,
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: 543,
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,
divideMark: 0,
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: 544,
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,
divideMark: 0,
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: 545,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_16",
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,
divideMark: 0,
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: 546,
isDeleted: 0,
mainDepartmentId: "",
mainRoutingPeople: "",
materialId: "1",
mesCode: "DDBH_20200409_17",
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,
divideMark: 0,
children: []
}
],
treeData: [], treeData: [],
treeInputSearch: "", treeInputSearch: "",
ocolumn: [], ocolumn: [],
...@@ -662,24 +339,8 @@ export default { ...@@ -662,24 +339,8 @@ export default {
productId: "", //产品id productId: "", //产品id
productName: "", //产品名称 productName: "", //产品名称
taskType: "", //任务类型 taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: null, //数量 quantity: null, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间 demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间 demandFinishDate: "", //完成时间
remark: "", //备注 remark: "", //备注
...@@ -709,7 +370,8 @@ export default { ...@@ -709,7 +370,8 @@ export default {
sendList: [], sendList: [],
metCodesStrTxt: "", metCodesStrTxt: "",
actIds: [], //批量处理时ids actIds: [], //批量处理时ids
actMescodes: [] actMescodes: [],
delNum: 0
}; };
}, },
created() { created() {
...@@ -788,7 +450,6 @@ export default { ...@@ -788,7 +450,6 @@ export default {
let orderListQuantity = 0; let orderListQuantity = 0;
let quantyStatu = false; //子订单计划数是否为0或空 let quantyStatu = false; //子订单计划数是否为0或空
let dateStatu = false; //子订单开始完成时间是否为空 let dateStatu = false; //子订单开始完成时间是否为空
// alert(JSON.stringify(returnDatalist))
if (returnDatalist.items.length > 0) { if (returnDatalist.items.length > 0) {
returnDatalist.items.forEach(data => { returnDatalist.items.forEach(data => {
orderListQuantity = orderListQuantity + parseFloat(data.quantity); orderListQuantity = orderListQuantity + parseFloat(data.quantity);
...@@ -820,6 +481,29 @@ export default { ...@@ -820,6 +481,29 @@ export default {
} }
}, },
modalInfoOk() { modalInfoOk() {
let itemsTemp = [];
this.dataListRetrun.items.forEach(ele => {
let objTemp = {};
objTemp.mesCode = ele.mesCode;
objTemp.quantity = Number(ele.quantity);
objTemp.demandStartDate = ele.demandStartDate + " 00:00:01";
objTemp.demandFinishDate = ele.demandFinishDate + " 23:59:59";
itemsTemp.push(objTemp);
});
let params = {
id: this.dataListRetrun.id,
items: itemsTemp
};
Api.mesorderdivide(params).then(res => {
if (res.result) {
this.$Message.success("订单分解成功!");
this.$refs.grid.load();
} else {
this.$Message.error("订单分解失败!");
}
});
this.splitModal = false;
this.ModalInfo = false;
//确定批量操作 //确定批量操作
// if (this.ModalInfoStaut == 'orderSendReview') { // if (this.ModalInfoStaut == 'orderSendReview') {
// this.$http.order.batchstart(this.dataListRetrun).then((res) => { // this.$http.order.batchstart(this.dataListRetrun).then((res) => {
...@@ -853,17 +537,14 @@ export default { ...@@ -853,17 +537,14 @@ export default {
// } // }
// }) // })
// } else { // } else {
this.$http.order.orderSplit(this.dataListRetrun).then(res => { // Api.mesorderdivide(this.dataListRetrun).then(res => {
if (res.result) { // if (res.result) {
this.$Message.success("订单分解成功!"); // this.$Message.success("订单分解成功!");
this.easySearch(""); // } else {
this.ModalOrderSplit = false; // this.$Message.error("订单分解失败!");
} else { // }
this.$Message.error("订单分解失败!"); // });
}
});
//} //}
this.ModalInfo = false;
}, },
//打开派发 //打开派发
openSendModal() { openSendModal() {
...@@ -889,36 +570,89 @@ export default { ...@@ -889,36 +570,89 @@ export default {
}); });
}, },
//单条删除 //单条删除
remove(id) { remove(row) {
this.deletelModal = true; this.delNum = 0;
//this.curId = id; this.actIds = [];
this.actIds.push(row.id);
if (row.id != row.rootId) {
this.sondeletecheck(row.rootId);
}
setTimeout(() => {
if (this.delNum > 0) {
this.$Message.error("删除的原始订单中有非新建状态的子订单!");
this.actIds = []; this.actIds = [];
this.actIds.push(id); return false;
}
}, 400);
this.deletelModal = true;
}, },
//批量删除 //批量删除
removeList() { removeList() {
let metCodesSingle = []; //没有子订单的订单
let metCodesFather = []; //有子订单的原始订单
this.actIds = [];
if (this.rowDataArry.length > 0) { if (this.rowDataArry.length > 0) {
this.deletelModal = true;
this.deactIdslIds = [];
this.rowDataArry.forEach(data => { this.rowDataArry.forEach(data => {
this.delNum = 0;
this.actIds.push(data.id); this.actIds.push(data.id);
if (data.id == data.rootId) {
//this.metCodesSingle.push(data.id);
} else {
this.sondeletecheck(row.rootId);
}
}); });
setTimeout(() => {
if (this.delNum > 0) {
this.$Message.error("删除的原始订单中有非新建状态的子订单!");
this.actIds = [];
return false;
}
}, 400);
this.deletelModal = true;
// this.actIds = [];
// this.rowDataArry.forEach(data => {
// this.actIds.push(data.id);
// });
} else { } else {
this.$Message.error("请选择订单"); this.$Message.error("请选择订单");
} }
}, },
//删除前判断子订单是否能删除
sondeletecheck(code) {
let param = { id: code };
Api.sondeletecheck(param).then(res => {
if (res.result == 1) {
this.delNum += 0;
} else {
this.delNum += 1;
}
});
},
//删除确定 //删除确定
removeOk() { removeOk() {
let params = { let params = { ids: this.actIds };
ids: this.delIds Api.mesorderdelete(params)
}; .then(r => {
// Api.delete({ id: this.curId }).then(r => { if (r.success) {
// if (r.success) { if (r.result) {
// this.$refs.grid.load(); this.$refs.grid.load();
// this.deletelModal = false; this.deletelModal = false;
// this.$Message.success("删除成功"); this.$Message.success("删除成功");
// } } else {
// }); this.deletelModal = false;
this.$Message.error("删除失败");
}
} else {
this.deletelModal = false;
this.$Message.error("删除失败");
}
})
.catch(err => {
this.deletelModal = false;
this.$Message.error("操作失败");
});
}, },
removeCancel() { removeCancel() {
this.deletelModal = false; this.deletelModal = false;
......
...@@ -90,25 +90,8 @@ export default { ...@@ -90,25 +90,8 @@ export default {
mesCode: "", //订单编号 mesCode: "", //订单编号
productName: "", //产品名称 productName: "", //产品名称
drawingNo: "", //图号 drawingNo: "", //图号
producePic: "", //产品图号
stage: "", //阶段
orderCat: "", //任务类型 orderCat: "", //任务类型
quantity: "", //数量 quantity: "", //数量
materail: "", //材料
printDepartment: "", //3D打印承制单位
ownerGust: "", //甲方客户
mainDept: "", //厂内责任主体部门
inhouseOffice: "", //厂内责任机关
nodeRequire: "", //任务接点要求
inputDate: "", //任务输入日期
techniqueInputDoc: "", //甲方技术输入文件
productInputDoc: "", //甲方投产输入文件
modalVersion: "", //模型版本
drawNumber: "", //模型号
ownerDesigner: "", //甲方设计人员
missionCode: "", //甲方任务号
mainRoutingPeople: "", //厂内主工艺人员
inhousePrincipal: "", //厂内机关负责人
remark: "" //备注 remark: "" //备注
}, },
orderForm: { orderForm: {
......
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