Commit 7b811b92 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 640dc1ee 8244b431
...@@ -964,7 +964,13 @@ html [type=button] { ...@@ -964,7 +964,13 @@ html [type=button] {
font-weight: bold; font-weight: bold;
font-size: 24px; font-size: 24px;
color: #249e91; color: #249e91;
};
.ivu-icon-ios-cog{
font-weight: bold;
font-size: 24px;
color: #249e91;
} }
} }
} }
......
...@@ -237,6 +237,7 @@ export default { ...@@ -237,6 +237,7 @@ export default {
type: Number, type: Number,
default: 24 default: 24
}, },
//table控件children子数据控制功能
rowKey:{ rowKey:{
type:[String,Number] type:[String,Number]
} }
...@@ -250,9 +251,9 @@ export default { ...@@ -250,9 +251,9 @@ export default {
this.columnsCur = this.$u.clone(this.columns); this.columnsCur = this.$u.clone(this.columns);
}, },
mounted() { mounted() {
if (this.data && this.data.length > 0) { if (this.data && this.data.length > 0) {
this.list = this.data; this.list = this.data;
return; //return;
} }
this.keys = ""; this.keys = "";
this.intY(); this.intY();
...@@ -260,6 +261,7 @@ export default { ...@@ -260,6 +261,7 @@ export default {
return; return;
} }
this.loadUserConfig(); this.loadUserConfig();
if (this.height === 0) { if (this.height === 0) {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
...@@ -271,6 +273,7 @@ export default { ...@@ -271,6 +273,7 @@ export default {
} else { } else {
this.tableHeight = this.height; this.tableHeight = this.height;
} }
//注册拖拽事件。 //注册拖拽事件。
this.$dragging.$on("dragend", e => { this.$dragging.$on("dragend", e => {
// console.log("dragend",e); // console.log("dragend",e);
......
...@@ -903,7 +903,7 @@ export default { ...@@ -903,7 +903,7 @@ export default {
deleterUserId: '删除人', deleterUserId: '删除人',
mesCode: '订单编号', mesCode: '订单编号',
taskType: '任务类型', taskType: '任务类型',
productId: '产品主键', productId: '产品Id',
quantity: '数量', quantity: '数量',
remark: '备注', remark: '备注',
taskRequire: '任务节点要求', taskRequire: '任务节点要求',
...@@ -923,6 +923,15 @@ export default { ...@@ -923,6 +923,15 @@ export default {
upId: '父订单id', upId: '父订单id',
demandStartDate: '投料时间', demandStartDate: '投料时间',
demandFinishDate: '节点时间', demandFinishDate: '节点时间',
//tempTitle------
stage:'阶段',
materialId:'材料',
routing_Method:'工艺方法',
outer_Envelope_Size:'外包络尺寸',
guestName:'甲方客户',
taskCode:'甲方任务号',
putintDocmentCode:'甲方投产输入文件(编号)',
technologyDocmentCode:'甲方技术输入文件(编号)',
}, },
mes_part_task_plan_simulate: { mes_part_task_plan_simulate: {
id: '', id: '',
......
...@@ -206,7 +206,8 @@ export default { ...@@ -206,7 +206,8 @@ export default {
title: this.l("spare_qty"), title: this.l("spare_qty"),
align: "right", align: "right",
width: 100, width: 100,
high: true high: true,
hide: true,
}, },
{ {
key: "plan_start", key: "plan_start",
...@@ -240,7 +241,8 @@ export default { ...@@ -240,7 +241,8 @@ export default {
title: this.l("demand_start"), title: this.l("demand_start"),
align: "center", align: "center",
resizable: true, resizable: true,
width: 150 width: 150,
type:"date"
}, },
{ {
key: "demand_finish", key: "demand_finish",
...@@ -248,7 +250,8 @@ export default { ...@@ -248,7 +250,8 @@ export default {
align: "center", align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 150 width: 150,
type:"date"
}, },
{ {
key: "badjustflag", key: "badjustflag",
......
This diff is collapsed.
...@@ -2,71 +2,57 @@ ...@@ -2,71 +2,57 @@
<div class="detail"> <div class="detail">
<Row> <Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed> <Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed>
<Filed :span="12" :name="l('taskType')">{{entity.taskType}}</Filed> <Filed :span="12" :name="l('taskType')">
<Filed :span="12" :name="l('productId')">{{entity.productId}}</Filed> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state>
</Filed>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed> <Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed> <Filed :span="12" :name="l('status')">
<Filed :span="24" :name="l('taskRequire')">{{entity.taskRequire}}</Filed> <state code="plan.order.status" :value="entity.status" type="text"></state>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> </Filed>
<Filed :span="12" :name="l('divideMark')">{{entity.divideMark}}</Filed>
<Filed :span="24" :name="l('productCode')">{{entity.productCode}}</Filed>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed> <Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed>
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed> <Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed>
<Filed :span="12" :name="l('rootId')">{{entity.rootId}}</Filed>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed> <Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed> <Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed>
<Filed :span="12" :name="l('urgencyLevel')">{{entity.urgencyLevel}}</Filed> <Filed :span="12" :name="l('urgencyLevel')">
<Filed <state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state>
:span="12" </Filed>
:name="l('productingPreparationPeople')"
>{{entity.productingPreparationPeople}}</Filed>
<Filed
:span="12"
:name="l('productingPreparationFinishDate')"
>{{entity.productingPreparationFinishDate}}</Filed>
<Filed :span="12" :name="l('quotationPeople')">{{entity.quotationPeople}}</Filed>
<Filed :span="12" :name="l('quotationFinishDate')">{{entity.quotationFinishDate}}</Filed>
<Filed :span="12" :name="l('upId')">{{entity.upId}}</Filed>
<Filed :span="12" :name="l('demandStartDate')">{{entity.demandStartDate}}</Filed> <Filed :span="12" :name="l('demandStartDate')">{{entity.demandStartDate}}</Filed>
<Filed :span="12" :name="l('demandFinishDate')">{{entity.demandFinishDate}}</Filed> <Filed :span="12" :name="l('demandFinishDate')">{{entity.demandFinishDate}}</Filed>
<Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
</Row> </Row>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
name: "Add", name: "detail",
data() { data() {
return { return {
entity: {}, entity: {}
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }]
}
}; };
}, },
props: { props: {
eid: Number row: {
type: Object,
default: () => {
return null;
}
}
}, },
methods: { methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
l(key) { l(key) {
key = "mes_plan" + "." + key; key = "mes_plan" + "." + key;
return this.$t(key); return this.$t(key);
} },
}, },
watch: { watch: {
eid(v) { row(v) {
if (v != 0) { if (v != null) {
this.load(v); this.entity = this.$u.clone(this.row);
} }
} }
} }
......
This diff is collapsed.
This diff is collapsed.
<template>
<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>
<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>
</div>
</div>
</template>
<script>
import Detail from "./detail";
var myDate = new Date();
export default {
name: "send",
components: {
Detail
},
data() {
return {
divHeight: "400px",
osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表
info: {
status: true,
orderInfo: []
},
roleTitle: "工艺员",
orderForm: {
DistributeMainRouting: null, //主工艺人员
MainRoutingFinishDate: "", //主工艺人员完成时间
MajorRoutingPeople: null, //专业工艺人员
MajorRoutingFinishDate: "", //专业工艺人员完成时间
CheckUpPeople: 1, //校对人员 暂时不用
CheckUpFinishDate: "2019-12-19", //校对人员完成时间
ProductingPreparationPeople: null, //生产准备人员
ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员
QuotationFinishDate: "" //订单报价完成时间
},
columns1: [
{
title: "订单编码",
key: "mesCode",
width: 180,
tooltip: true
},
{
title: "任务类型",
key: "taskType",
align: "center",
width: 100,
tooltip: true
},
{
title: "产品名称",
key: "productName",
tooltip: true
},
{
title: "阶段",
key: "stage",
width: 80
},
{
title: "材料",
key: "materialId",
width: 100,
tooltip: true
},
{
title: "数量",
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: {
returnDataList() {
this.dataListRetrun = [];
this.dataList.forEach(item => {
let objStr = {};
objStr.id = item.id;
objStr.mesCode = item.mesCode;
objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting;
objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate;
objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople;
objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate;
objStr.CheckUpPeople = this.orderForm.CheckUpPeople;
objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate;
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
this.dataListRetrun.push(objStr);
});
//返回审批数据
return this.dataListRetrun;
},
getTimeMainRFD(value) {
this.orderForm.MainRoutingFinishDate = value;
},
getTimeMajorRFD(value) {
this.orderForm.MajorRoutingFinishDate = value;
},
getTimeCheckFD(value) {
this.orderForm.CheckUpFinishDate = value;
},
getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = value;
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value;
}
},
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>
\ No newline at end of file
<template>
<div style="width:100%;overflow:auto" :style="{height:divHeight}">
<Form
:model="orderForm"
:label-width="80"
class="margin-top-20 margin-bottom-50"
:rules="ruleValidate"
ref="formValidate"
>
<Row>
<Col span="12">
<FormItem label="订单编号" style="width:100%">
<Input v-model="orderForm.mesCode" disabled style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="产品名称" style="width:100%">
<Input v-model="orderForm.productName" disabled style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="开始时间" style="width:100%">
<Input v-model="orderForm.planStartTime" disabled style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="完成时间" style="width:100%">
<Input v-model="orderForm.planEndTime" disabled style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="数量" style="width:100%">
<Input v-model="orderForm.quantity" disabled style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="分解数量" style="width:100%" prop="splitQuantity">
<InputNumber :min="1" v-model="orderForm.splitQuantity" :step="1" style="width:180px"></InputNumber>
<Button type="primary" @click="addSplitOrder">确定</Button>
</FormItem>
</Col>
</Row>
</Form>
<Table :loading="loading" border :columns="columns1" :data="dataList" class="tableCommon">
<template slot-scope="{ row, index }" slot="slotPlanQ">
<Input type="text" v-model="row.quantity" @on-change="inputOrderCat(row,index)" />
</template>
<template slot-scope="{ row, index }" slot="slotTime">
<DatePicker
v-model="row.demandDate"
type="daterange"
placeholder="请选择日期"
style="width:240px"
transfer="true"
:options="optionsDate"
@on-change="inputOrderCat(row,index)"
></DatePicker>
</template>
</Table>
</div>
</template>
<script>
export default {
name: "split",
data() {
return {
optionsDate: {
disabledDate: date => {
let beginDateVal = new Date(this.orderForm.planStartTime);
let endDateVal = new Date(this.orderForm.planEndTime);
if (beginDateVal) {
return (
(date && date.valueOf() < beginDateVal.getTime() - 86400000) ||
date.valueOf() > endDateVal.getTime()
);
}
}
},
divHeight: "260px",
osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表
loading: false,
orderInfo: {
id: "", //订单id
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: {
mesCode: "", //订单编号
productName: "", //产品名称
stage: "", //阶段
quantity: "", //数量
planStartTime: "", //计划开始时间
planEndTime: "", //计划结束时间
splitQuantity: 2, //分解数量
splitList: [] //分解后产生的列表
},
columns1: [
{
title: "序号",
type: "index",
width: 80,
align: "right",
tooltip: true
},
{
title: "计划编号",
key: "mesCode",
tooltip: true
},
{
title: "计划数量",
key: "quantity",
align: "right",
width: 100,
slot: "slotPlanQ"
},
{
title: "开始--完成时间",
key: "demandDate",
width: 320,
align: "center",
slot: "slotTime"
}
],
dataList: [],
dataListRetrun: { id: null, quantity: null, mesCode: "", items: [] }, //确定后返回数据
ruleValidate: {
splitQuantity: [
{
required: true,
message: "请输入数量",
type: "number",
trigger: "change"
}
]
}
};
},
props: {
row: {
type: Object,
default: () => {
return null;
}
}
},
methods: {
intData(data) {
//打开modal层时给订单list赋值
//alert(JSON.stringify(data))
this.dataListRetrun.id = data[0].id;
this.dataListRetrun.quantity = data[0].quantity;
this.dataListRetrun.mesCode = data[0].mesCode;
this.orderInfo = [];
this.dataList = [];
this.orderInfo = data[0];
this.orderForm = {
mesCode: this.orderInfo.mesCode, //订单编号
productName: this.orderInfo.productName, //产品名称
stage: this.orderInfo.stage, //阶段
quantity: this.orderInfo.quantity, //数量
planStartTime: this.orderInfo.demandStartDate, //计划开始时间
planEndTime: this.orderInfo.demandFinishDate, //计划结束时间
splitQuantity: 2, //分解数量
splitList: [] //分解后产生的列表
};
},
//确定增加数量
addSplitOrder() {
if (this.orderForm.quantity >= this.orderForm.splitQuantity) {
this.dataListRetrun.items = [];
this.$refs["formValidate"].validate(valid => {
if (valid) {
this.dataList = [];
let demandDate = [];
let splitQuantity = this.orderForm.splitQuantity;
let mesCodeSon = this.orderForm.mesCode;
let planStartTime = this.orderForm.planStartTime;
let planEndTime = this.orderForm.planEndTime;
for (var i = 0; i < splitQuantity; i++) {
this.dataList.push({
mesCode:
i + 1 < 10
? mesCodeSon + "0" + (i + 1)
: mesCodeSon + "" + (i + 1),
quantity: "",
demandDate: [planStartTime, planEndTime],
demandStartDate: planStartTime,
demandFinishDate: planEndTime
});
}
this.dataListRetrun.items = this.dataListRetrun.items.concat(
this.dataList
);
}
});
} else {
this.$Message.error("分解数量大于订单数量");
}
},
inputOrderCat(row, index) {
let forDemandStartDate = this.getFormatDate(row.demandDate[0]);
let forDemandFinishDate = this.getFormatDate(row.demandDate[1]);
this.dataListRetrun.items[index].mesCode = row.mesCode;
this.dataListRetrun.items[index].quantity = row.quantity;
this.dataListRetrun.items[index].demandStartDate = forDemandStartDate;
this.dataListRetrun.items[index].demandFinishDate = forDemandFinishDate;
this.dataList[index].demandDate = [
forDemandStartDate,
forDemandFinishDate
];
},
getFormatDate(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate());
return resDate;
},
p(s) {
return s < 10 ? "0" + s : s;
},
returnDataList() {
//返回审批数据
return this.dataListRetrun;
}
},
created() {
var theight = window.innerHeight - 400 + "px";
this.divHeight = theight;
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + "px";
})();
};
this.orderForm = {
mesCode: this.orderInfo.mesCode, //订单编号
productName: "", //产品名称
stage: "", //阶段
quantity: "", //数量
planStartTime: "", //计划开始时间
planEndTime: "", //计划结束时间
splitQuantity: 2, //分解数量
splitList: [] //分解后产生的列表
};
},
watch: {
row(v) {
if (v != null) {
this.orderForm = this.$u.clone(this.row);
this.orderForm.planStartTime = this.orderForm.demandStartDate;
this.orderForm.planEndTime = this.orderForm.demandFinishDate;
this.orderForm.splitQuantity = 2;
this.dataListRetrun.id = this.orderForm.id;
this.dataListRetrun.quantity = this.orderForm.quantity;
this.dataListRetrun.mesCode = this.orderForm.mesCode;
}
}
}
};
</script>
\ No newline at end of file
...@@ -43,13 +43,13 @@ ...@@ -43,13 +43,13 @@
inline inline
> >
<Row> <Row>
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" >
<Input <Input
size="large" size="large"
v-model.trim="formValidate.code" v-model.trim="formValidate.code"
placeholder="请输入..." placeholder="请输入..."
style="width:240px" style="width:240px"
:disabled="isview" disabled="true"
/> />
</FormItem> </FormItem>
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
......
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