Commit 4ca4c829 authored by renjintao's avatar renjintao

taskTime workHourManage

parent acb8e040
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<DatePicker v-model="row.demandDate" type="daterange" placeholder="请选择日期" style="width:240px" :transfer="true" :options="optionsDate" @on-change="inputOrderCat(row,index)"></DatePicker> <DatePicker v-model="row.demandDate" type="daterange" placeholder="请选择日期" style="width:240px" :transfer="true" :options="optionsDate" @on-change="inputOrderCat(row,index)"></DatePicker>
</template> </template>
</Table> </Table>
<p>剩余数量:{{amount}}</p>
</div> </div>
</template> </template>
...@@ -131,7 +132,8 @@ export default { ...@@ -131,7 +132,8 @@ export default {
type: "number", type: "number",
trigger: "change" trigger: "change"
}] }]
} },
amount: 0,
}; };
}, },
props: { props: {
...@@ -210,6 +212,15 @@ export default { ...@@ -210,6 +212,15 @@ export default {
forDemandStartDate, forDemandStartDate,
forDemandFinishDate forDemandFinishDate
]; ];
let splitAmount = 0
this.dataList.forEach(el => {
splitAmount = Number(splitAmount) + Number(el.quantity)
})
this.amount = this.orderForm.quantity - splitAmount
// setTimeout(() => {
// this.amount = this.orderForm.quantity - splitAmount
// }, 1000);
}, },
getFormatDate(dates) { getFormatDate(dates) {
const d = new Date(dates); const d = new Date(dates);
...@@ -264,6 +275,8 @@ export default { ...@@ -264,6 +275,8 @@ export default {
this.dataListRetrun.quantity = this.orderForm.quantity; this.dataListRetrun.quantity = this.orderForm.quantity;
this.dataListRetrun.mesCode = this.orderForm.mesCode; this.dataListRetrun.mesCode = this.orderForm.mesCode;
this.dataList = [] this.dataList = []
this.amount = 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