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;
} }
} }
} }
......
This diff is collapsed.
...@@ -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