Commit b105c727 authored by 张海景's avatar 张海景

update:修改申请单的任务单

parent 24cfa444
......@@ -109,7 +109,9 @@ export default {
form: {},
// 表单校验
rules: {
}
},
addList: [],
detailList: []
};
},
watch: {
......@@ -127,7 +129,7 @@ export default {
methods: {
onItemSelect(list){
// console.log(list, 'list')
const datas = list.map(item => {
this.addList = list.map(item => {
return {
itemId:item.itemId,
itemName:item.itemName,
......@@ -135,7 +137,7 @@ export default {
nextMaintenPeriod: this.$attrs.quantity
}
})
this.tmToolRequestItemList = this.tmToolRequestItemList.concat(datas)
this.tmToolRequestItemList = this.detailList.concat(this.addList)
this.$emit('sum')
},
/** 查询刀模板物料申请单列表 */
......@@ -154,13 +156,19 @@ export default {
this.queryParams.taskId = this.$attrs.taskId;
this.queryParams.pageSize = 10000;
getTaskIdMaxProcessTool(this.queryParams).then(response => {
const datas = response.data.map(item => {
this.detailList = response.data.map(item => {
return {
...item,
allQuantity: item.AllQuantity
}
});
this.tmToolRequestItemList = this.tmToolRequestItemList.concat(datas)
this.addList = this.addList.map(item => {
return {
...item,
nextMaintenPeriod: this.$attrs.quantity
}
})
this.tmToolRequestItemList = this.detailList.concat(this.addList)
// this.total = response.total;
this.loading = false;
this.$emit('sum')
......
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