Commit de2028fd authored by renjintao's avatar renjintao

mesplan

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