Commit 36095936 authored by renjintao's avatar renjintao

mesplan

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