选择物料

This commit is contained in:
2023-07-04 10:56:46 +08:00
parent f4719e1a3f
commit 31ab590cac
2 changed files with 42 additions and 3 deletions

View File

@@ -51,7 +51,7 @@
<button class="button button--primary" @click="toInConfirm">确认入库</button>
<button class="button button--primary" @click="toSearch">作业查询</button>
<button class="button button--primary" @click="toAddBillMater">添加单据物料</button>
<button class="button button--primary" @click="toDel">删除一行</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">删除一行</button>
</div>
</div>
</div>
@@ -152,6 +152,7 @@ export default {
}
},
toAddBillMater () {
this.$store.dispatch('setMaterArr', [])
this.$router.push('/selectfinishedmater')
},
toSearch () {
@@ -161,8 +162,12 @@ export default {
this.pkId = this.pkId === e.sale_code ? '' : e.sale_code
this.pkObj = this.pkId === e.sale_code ? e : {}
},
toDel () {
console.log('del')
delRow () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(el => el.sale_code !== this.pkId)
this.$store.dispatch('setMaterArr', this.dataList)
}
}
}