|
@@ -283,14 +283,14 @@
|
|
|
<el-table-column show-overflow-tooltip v-if="showColumn.artificialAdjust" label="人工调整数" align="center" prop="artificialAdjust" width="80px"/>
|
|
|
<el-table-column show-overflow-tooltip v-if="showColumn.modifyReason" label="修改原因" align="center" prop="modifyReason" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason"/>
|
|
|
+ <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason" @change="jilu(scope.$index)"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column show-overflow-tooltip v-if="showColumn.suggestionPurchase" label="建议采购量" align="center" prop="suggestionPurchase" width="80px"/>
|
|
|
<!-- <el-table-column show-overflow-tooltip v-if="showColumn.status" label="建议净采购量" align="center" prop="suggestBuyQty" width="100px"/> -->
|
|
|
<el-table-column show-overflow-tooltip v-if="showColumn.finalBuyQty" label="最终采购量" align="center" prop="finalBuyQty" width="80px">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty"/>
|
|
|
+ <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty" @change="jilu(scope.$index)"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column show-overflow-tooltip v-if="showColumn.materialClassifyTwoName" label="二级品类" align="center" prop="materialClassifyTwoName" width="120px"/>
|
|
@@ -504,6 +504,8 @@ export default {
|
|
|
// isPage: true,
|
|
|
// title: ''
|
|
|
// }
|
|
|
+ // 用于保存临时记录修改行的数组
|
|
|
+ record:[]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -664,7 +666,15 @@ export default {
|
|
|
this.getList(this.queryParams)
|
|
|
},
|
|
|
saveList() {
|
|
|
- editSummaryList(this.tableList).then(res => {
|
|
|
+ // console.log('记录',this.record)
|
|
|
+ // 对记录的数据进行去重
|
|
|
+ let newRecord = Array.from(new Set(this.record))
|
|
|
+ // console.log('去重后的', newRecord)
|
|
|
+ let changeList = newRecord.map(i => {
|
|
|
+ return this.tableList[i]
|
|
|
+ })
|
|
|
+ // console.log('shuzu', changeList)
|
|
|
+ editSummaryList(changeList).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$modal.notifySuccess("保存成功");
|
|
|
this.lineDisable = true
|
|
@@ -791,6 +801,7 @@ export default {
|
|
|
}
|
|
|
if (this.referCondition.title == '明细采购员') {
|
|
|
console.log('选择进了吗',this.tableList)
|
|
|
+ this.record.push(this.tableIndex)
|
|
|
this.tableList[this.tableIndex].buyer = selection[0].code
|
|
|
this.tableList[this.tableIndex].buyerName = selection[0].name
|
|
|
}
|
|
@@ -856,7 +867,10 @@ export default {
|
|
|
this.referCondition.isPage = isPage
|
|
|
this.referCondition.title = title
|
|
|
this.$refs.refer.init(this.referCondition)
|
|
|
- }
|
|
|
+ },
|
|
|
+ jilu(index) {
|
|
|
+ this.record.push(index)
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|