Commit 25b16e47 authored by 康振飞's avatar 康振飞

班组派工拆分

parent b12079ca
......@@ -39,6 +39,13 @@
v-if="item.quantity > 1 && item.pid == 0"
@click="setChai(item,index)"
></op>
<op
title="删除"
type="icon"
icon="md-close-circle"
v-else-if="item.pid != 0"
@click="removeDetail(item,index)"
></op>
<!-- -->
</p>
<p>{{item.beginTime}}--{{item.endTime}}</p>
......@@ -493,12 +500,20 @@ export default {
this.rowIndex = index
},
okChai() {
var detail = this.$u.clone(this.list[this.rowIndex])
this.list[this.rowIndex].quantity -= this.chaiNum
var detail = this.$u.clone(this.listTask[this.rowIndex])
this.listTask[this.rowIndex].quantity -= this.chaiNum
// detail.pid = this.$u.guid()
detail.pid = this.$u.guid()
detail.quantity = this.chaiNum
this.list.splice(this.rowIndex + 1, 0, detail)
this.listTask.splice(this.rowIndex + 1, 0, detail)
},
// 删除行
removeDetail(item, index) {
let oldList = this.listTask;
let clickRow = oldList.filter(listRow=>listRow.process_name===item.process_name)[0];
clickRow.quantity += this.chaiNum
this.listTask.splice(index, 1)
this.$Message.success('拆分项已删除。')
},
cancle() {//取消
this.facilityModal = false
......
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