Commit 99a2724e authored by renjintao's avatar renjintao

split

parent dc9bb3c2
...@@ -81,14 +81,14 @@ export default { ...@@ -81,14 +81,14 @@ export default {
productName: "", //产品名称 productName: "", //产品名称
drawingNo: "", //图号 drawingNo: "", //图号
orderCat: "", //任务类型 orderCat: "", //任务类型
quantity: "", //数量 quantity: 0, //数量
remark: "" //备注 remark: "" //备注
}, },
orderForm: { orderForm: {
mesCode: "", //订单编号 mesCode: "", //订单编号
productName: "", //产品名称 productName: "", //产品名称
stage: "", //阶段 stage: "", //阶段
quantity: "", //数量 quantity: 0, //数量
planStartTime: "", //计划开始时间 planStartTime: "", //计划开始时间
planEndTime: "", //计划结束时间 planEndTime: "", //计划结束时间
splitQuantity: 2, //分解数量 splitQuantity: 2, //分解数量
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
//打开modal层时给订单list赋值 //打开modal层时给订单list赋值
//alert(JSON.stringify(data)) //alert(JSON.stringify(data))
this.dataListRetrun.id = data[0].id; this.dataListRetrun.id = data[0].id;
this.dataListRetrun.quantity = data[0].quantity; this.dataListRetrun.quantity = Number(data[0].quantity);
this.dataListRetrun.mesCode = data[0].mesCode; this.dataListRetrun.mesCode = data[0].mesCode;
this.orderInfo = []; this.orderInfo = [];
this.dataList = []; this.dataList = [];
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
mesCode: this.orderInfo.mesCode, //订单编号 mesCode: this.orderInfo.mesCode, //订单编号
productName: this.orderInfo.productName, //产品名称 productName: this.orderInfo.productName, //产品名称
stage: this.orderInfo.stage, //阶段 stage: this.orderInfo.stage, //阶段
quantity: this.orderInfo.quantity, //数量 quantity: Number(this.orderInfo.quantity), //数量
planStartTime: this.orderInfo.demandStartDate, //计划开始时间 planStartTime: this.orderInfo.demandStartDate, //计划开始时间
planEndTime: this.orderInfo.demandFinishDate, //计划结束时间 planEndTime: this.orderInfo.demandFinishDate, //计划结束时间
splitQuantity: 2, //分解数量 splitQuantity: 2, //分解数量
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
this.dataList.push({ this.dataList.push({
mesCode: i + 1 < 10 ? mesCode: i + 1 < 10 ?
mesCodeSon + "0" + (i + 1) : mesCodeSon + "" + (i + 1), mesCodeSon + "0" + (i + 1) : mesCodeSon + "" + (i + 1),
quantity: "", quantity: 0,
demandDate: [planStartTime, planEndTime], demandDate: [planStartTime, planEndTime],
demandStartDate: planStartTime, demandStartDate: planStartTime,
demandFinishDate: planEndTime demandFinishDate: planEndTime
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
let forDemandStartDate = this.getFormatDate(row.demandDate[0]); let forDemandStartDate = this.getFormatDate(row.demandDate[0]);
let forDemandFinishDate = this.getFormatDate(row.demandDate[1]); let forDemandFinishDate = this.getFormatDate(row.demandDate[1]);
this.dataListRetrun.items[index].mesCode = row.mesCode; this.dataListRetrun.items[index].mesCode = row.mesCode;
this.dataListRetrun.items[index].quantity = row.quantity; this.dataListRetrun.items[index].quantity = Number(row.quantity);
this.dataListRetrun.items[index].demandStartDate = forDemandStartDate; this.dataListRetrun.items[index].demandStartDate = forDemandStartDate;
this.dataListRetrun.items[index].demandFinishDate = forDemandFinishDate; this.dataListRetrun.items[index].demandFinishDate = forDemandFinishDate;
this.dataList[index].demandDate = [ this.dataList[index].demandDate = [
...@@ -220,10 +220,10 @@ export default { ...@@ -220,10 +220,10 @@ export default {
this.dataList.forEach(el => { this.dataList.forEach(el => {
splitAmount = Number(splitAmount) + Number(el.quantity) splitAmount = Number(splitAmount) + Number(el.quantity)
}) })
this.amount = this.orderForm.quantity - splitAmount this.amount = Number(this.orderForm.quantity) - splitAmount
}, },
inputFocus(row, index) { inputFocus(row, index) {
this.amountMax = this.amount + row.quantity this.amountMax = this.amount + Number(row.quantity)
}, },
getFormatDate(dates) { getFormatDate(dates) {
const d = new Date(dates); const d = new Date(dates);
...@@ -259,7 +259,7 @@ export default { ...@@ -259,7 +259,7 @@ export default {
mesCode: this.orderInfo.mesCode, //订单编号 mesCode: this.orderInfo.mesCode, //订单编号
productName: "", //产品名称 productName: "", //产品名称
stage: "", //阶段 stage: "", //阶段
quantity: "", //数量 quantity: 0, //数量
planStartTime: "", //计划开始时间 planStartTime: "", //计划开始时间
planEndTime: "", //计划结束时间 planEndTime: "", //计划结束时间
splitQuantity: 2, //分解数量 splitQuantity: 2, //分解数量
...@@ -275,11 +275,11 @@ export default { ...@@ -275,11 +275,11 @@ export default {
this.orderForm.planEndTime = this.orderForm.demandFinishDate; this.orderForm.planEndTime = this.orderForm.demandFinishDate;
//this.orderForm.splitQuantity = 2; //this.orderForm.splitQuantity = 2;
this.dataListRetrun.id = this.orderForm.id; this.dataListRetrun.id = this.orderForm.id;
this.dataListRetrun.quantity = this.orderForm.quantity; this.dataListRetrun.quantity = Number(this.orderForm.quantity);
this.dataListRetrun.mesCode = this.orderForm.mesCode; this.dataListRetrun.mesCode = this.orderForm.mesCode;
this.dataList = [] this.dataList = []
this.amount = this.orderForm.quantity this.amount = Number(this.orderForm.quantity)
} }
} }
} }
......
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