Commit 99a2724e authored by renjintao's avatar renjintao

split

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