Commit 36095936 authored by renjintao's avatar renjintao

mesplan

parent 695043a5
...@@ -920,7 +920,7 @@ export default { ...@@ -920,7 +920,7 @@ export default {
productId: '产品Id', productId: '产品Id',
quantity: '数量', quantity: '数量',
remark: '备注', remark: '备注',
taskRequire: '任务节点要求', taskRequire: '任务要求',
status: '订单状态', status: '订单状态',
divideMark: '分解标记:1-已分解;0-未分解', divideMark: '分解标记:1-已分解;0-未分解',
productCode: '产品序号:No1~No99', productCode: '产品序号:No1~No99',
...@@ -930,13 +930,13 @@ export default { ...@@ -930,13 +930,13 @@ export default {
batchNumber: '批次号', batchNumber: '批次号',
projectNumber: '项目号', projectNumber: '项目号',
urgencyLevel: '紧急程度', urgencyLevel: '紧急程度',
productingPreparationPeople: '生产准备(主制车间)', productingPreparationPeople: '生产车间',
productingPreparationFinishDate: '生产准备完成时间', productingPreparationFinishDate: '生产完成时间',
quotationPeople: '订单报价人员', quotationPeople: '订单报价人员',
quotationFinishDate: '订单报价完成时间', quotationFinishDate: '订单报价完成时间',
upId: '父订单id', upId: '父订单id',
demandStartDate: '投料时间', demandStartDate: '开始时间',
demandFinishDate: '节点时间', demandFinishDate: '完成时间',
//tempTitle------ //tempTitle------
stage: '阶段', stage: '阶段',
materialId: '材料', materialId: '材料',
......
...@@ -145,11 +145,6 @@ export default { ...@@ -145,11 +145,6 @@ export default {
width: 50, width: 50,
align: "center" align: "center"
}, },
{
key: "id",
title: this.l("id"),
hide: true
},
{ {
key: "mesCode", key: "mesCode",
title: this.l("mesCode"), title: this.l("mesCode"),
......
<template> <template>
<div style="width:100%;margin:0 auto"> <div style="width:100%;margin:0 auto">
<Detail ref="detailRow" :row="row1" v-show="dataList.length==1"></Detail> <Detail ref="detailRow" :row="row1" v-show="dataList.length==1"></Detail>
<Table <Table border :columns="columns1" :data="dataList" class="tableCommon" v-show="dataList.length>1" :height="tbHeight"></Table>
border
:columns="columns1"
:data="dataList"
class="tableCommon"
v-show="dataList.length>1"
:height="tbHeight"
></Table>
<div style="width100%;margin:40px auto"> <div style="width100%;margin:40px auto">
<Form <Form :model="orderForm" :label-width="140" class="margin-top-20 margin-bottom-50" :rules="ruleValidate" ref="formValidate">
:model="orderForm" <Row>
:label-width="110" <Col span="6">
class="margin-top-20 margin-bottom-50" <FormItem label="生产车间" style="width:100%" prop="ProductingPreparationPeople">
:rules="ruleValidate" <WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" />
ref="formValidate" </FormItem>
> </Col>
<Row> <Col span="6">
<Col span="6"> <FormItem label="生产完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<FormItem label="生产车间" style="width:100%" prop="ProductingPreparationPeople"> <DatePicker v-model="orderForm.ProductingPreparationFinishDate" type="date" placeholder="请选择日期" @on-change="getTimeProductPFD"></DatePicker>
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" /> </FormItem>
</FormItem> </Col>
</Col> <Col span="6">
<Col span="6"> <FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate"> <UserSelect ref="userSelected" v-model="orderForm.QuotationPeople" />
<DatePicker </FormItem>
v-model="orderForm.ProductingPreparationFinishDate" </Col>
type="date" <Col span="6">
placeholder="请选择日期" <FormItem label="订单报价完成时间" style="width:100%" prop="QuotationFinishDate">
@on-change="getTimeProductPFD" <DatePicker v-model="orderForm.QuotationFinishDate" type="date" placeholder="请选择日期" @on-change="getTimeQuotationFD"></DatePicker>
></DatePicker> </FormItem>
</FormItem> </Col>
</Col> </Row>
<Col span="6"> </Form>
<FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect ref="userSelected" v-model="orderForm.QuotationPeople" />
</FormItem>
</Col>
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate">
<DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
placeholder="请选择日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Detail from "./detail"; import Detail from "./detail";
var myDate = new Date(); var myDate = new Date();
export default { export default {
name: "send", name: "send",
components: { components: {
Detail Detail
}, },
data() { data() {
return { return {
divHeight: "400px", divHeight: "400px",
roleTitle: "工艺员", roleTitle: "工艺员",
orderForm: { orderForm: {
ProductingPreparationPeople: null, //生产准备 ProductingPreparationPeople: null, //生产准备
ProductingPreparationFinishDate: "", //生产准备完成时间 ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员 QuotationPeople: null, //订单报价人员
QuotationFinishDate: "" //订单报价完成时间 QuotationFinishDate: "" //订单报价完成时间
}, },
columns1: [ columns1: [{
{ title: this.l("mesCode"),
title: this.l("mesCode"), key: "mesCode",
key: "mesCode", width: 180,
width: 180, tooltip: true
tooltip: true },
{
title: this.l("productName"),
key: "productName",
tooltip: true
},
{
key: "drawnNumber",
title: this.l("drawnNumber"),
align: "center",
width: 140
},
{
title: this.l("projectNumber"),
key: "projectNumber",
width: 140
},
{
title: this.l("batchNumber"),
key: "batchNumber",
width: 120,
tooltip: true
},
{
title: this.l("quantity"),
key: "quantity",
align: "right",
width: 70
}
],
dataList: [],
row1: {},
dataListRetrun: [], //确定后返回数据
ruleValidate: {
ProductingPreparationPeople: [{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}],
ProductingPreparationFinishDate: [{
required: true,
message: "请选择时间",
trigger: "change"
}],
QuotationPeople: [{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}],
QuotationFinishDate: [{
required: true,
message: "请选择时间",
trigger: "change"
}]
},
rowList: [],
row1: {},
tbHeight: 0
};
},
props: {
row: {
type: Array,
default: () => {
return [];
}
}
},
methods: {
returnData() {
let objStr = {};
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
//返回审批数据
return objStr;
}, },
{ getTimeProductPFD(value) {
title: this.l("productName"), this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(
key: "productName", value
tooltip: true );
}, },
{ getTimeQuotationFD(value) {
key: "drawnNumber", this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value);
title: this.l("drawnNumber"),
align: "center",
width: 140
}, },
{ getFormatDateEnd(dates) {
title: this.l("projectNumber"), const d = new Date(dates);
key: "projectNumber", const resDate =
width: 140 d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate;
}, },
{ p(s) {
title: this.l("batchNumber"), return s < 10 ? "0" + s : s;
key: "batchNumber",
width: 120,
tooltip: true
}, },
{ l(key) {
title: this.l("quantity"), let vkey = "mes_plan" + "." + key;
key: "quantity", return this.$t(vkey) || key;
align: "right",
width: 70
} }
],
dataList: [],
row1: {},
dataListRetrun: [], //确定后返回数据
ruleValidate: {
ProductingPreparationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
ProductingPreparationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
],
QuotationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
QuotationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
]
},
rowList: [],
row1: {},
tbHeight: 0
};
},
props: {
row: {
type: Array,
default: () => {
return [];
}
}
},
methods: {
returnData() {
let objStr = {};
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
//返回审批数据
return objStr;
},
getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(
value
);
}, },
getTimeQuotationFD(value) { created() {
this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value); //var theight = window.innerHeight - 400 + "px";
// this.divHeight = theight;
}, },
getFormatDateEnd(dates) { mounted() {
const d = new Date(dates); // window.onresize = () => {
const resDate = // ///浏览器窗口大小变化
d.getFullYear() + // return (() => {
"-" + // window.screenHeight = window.innerHeight;
this.p(d.getMonth() + 1) + // this.divHeight = window.screenHeight - 400 + "px";
"-" + // })();
this.p(d.getDate()) + // };
" 23:59:59";
return resDate;
}, },
p(s) { watch: {
return s < 10 ? "0" + s : s; row(v) {
}, if (v != []) {
l(key) { this.dataList = this.$u.clone(this.row);
let vkey = "mes_plan" + "." + key; this.row1 = this.dataList[0];
return this.$t(vkey) || key; this.tbHeight = 0;
} if (this.dataList.length > 3) {
}, this.tbHeight = 200;
created() { }
//var theight = window.innerHeight - 400 + "px"; }
// this.divHeight = theight;
},
mounted() {
// window.onresize = () => {
// ///浏览器窗口大小变化
// return (() => {
// window.screenHeight = window.innerHeight;
// this.divHeight = window.screenHeight - 400 + "px";
// })();
// };
},
watch: {
row(v) {
if (v != []) {
this.dataList = this.$u.clone(this.row);
this.row1 = this.dataList[0];
this.tbHeight = 0;
if (this.dataList.length > 3) {
this.tbHeight = 200;
} }
}
} }
}
}; };
</script> </script>
\ No newline at end of file
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