|
@@ -121,7 +121,7 @@
|
|
<pl-table
|
|
<pl-table
|
|
v-loading="listLoading"
|
|
v-loading="listLoading"
|
|
:data="dataList"
|
|
:data="dataList"
|
|
- row-key="id"
|
|
|
|
|
|
+ row-key="index"
|
|
use-virtual
|
|
use-virtual
|
|
fixedColumnsRoll
|
|
fixedColumnsRoll
|
|
:dataChangesScrollTop="false"
|
|
:dataChangesScrollTop="false"
|
|
@@ -201,7 +201,7 @@
|
|
filterable
|
|
filterable
|
|
@change="handleSalesType($event, scope.row, scope.$index, 'saleTypeId')"
|
|
@change="handleSalesType($event, scope.row, scope.$index, 'saleTypeId')"
|
|
>
|
|
>
|
|
- <el-option v-for="item in typeList" :key="item.id" :label="item.saleName" :value="item.id" />
|
|
|
|
|
|
+ <el-option v-for="(item,index) in typeList" :key="index" :label="item.saleName" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</pl-table-column>
|
|
</pl-table-column>
|
|
@@ -708,10 +708,13 @@ export default {
|
|
|
|
|
|
this.typeList = typeData.data.records
|
|
this.typeList = typeData.data.records
|
|
},
|
|
},
|
|
- handleSalesType(e, row, index, name) {
|
|
|
|
- const item = this.typeList.filter(k => {
|
|
|
|
|
|
+ handleSalesType(e, row, index, name) {
|
|
|
|
+ let item
|
|
|
|
+ try {
|
|
|
|
+ item= this.typeList.filter(k => {
|
|
return k.id === e
|
|
return k.id === e
|
|
})[0]
|
|
})[0]
|
|
|
|
+
|
|
const linshi = []
|
|
const linshi = []
|
|
const rebateList = []
|
|
const rebateList = []
|
|
this.rebateList.forEach(k => {
|
|
this.rebateList.forEach(k => {
|
|
@@ -722,10 +725,14 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
+
|
|
if (rebateList.length) {
|
|
if (rebateList.length) {
|
|
this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])]
|
|
this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])]
|
|
this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])])
|
|
this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])])
|
|
}
|
|
}
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
this.dataList[index][name] = row[name]
|
|
this.dataList[index][name] = row[name]
|
|
this.dataList[index].saleTypeCode = item.saleCode
|
|
this.dataList[index].saleTypeCode = item.saleCode
|
|
this.dataList[index].saleTypeName = item.saleName
|
|
this.dataList[index].saleTypeName = item.saleName
|
|
@@ -977,7 +984,8 @@ export default {
|
|
handleNewInfo() {
|
|
handleNewInfo() {
|
|
// 物料列表
|
|
// 物料列表
|
|
|
|
|
|
- this.dataList.push({
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.dataList.push({
|
|
id: '',
|
|
id: '',
|
|
discAmount: '',
|
|
discAmount: '',
|
|
materialId: '',
|
|
materialId: '',
|
|
@@ -991,9 +999,11 @@ export default {
|
|
saleTypeName: '',
|
|
saleTypeName: '',
|
|
specification: '',
|
|
specification: '',
|
|
walletIds: [this.NoRebateWalletList[0].id],
|
|
walletIds: [this.NoRebateWalletList[0].id],
|
|
- walletRelaList: []
|
|
|
|
|
|
+ walletRelaList: [],
|
|
|
|
+ rebateWalletIds:[]
|
|
})
|
|
})
|
|
this.sleectBox.currentPage = 1
|
|
this.sleectBox.currentPage = 1
|
|
|
|
+ })
|
|
// this.listTotal += 1;
|
|
// this.listTotal += 1;
|
|
// this.dataList.push(this.addList[this.addList.length-1])
|
|
// this.dataList.push(this.addList[this.addList.length-1])
|
|
},
|
|
},
|
|
@@ -1031,6 +1041,9 @@ export default {
|
|
|
|
|
|
this.$successMsg('保存成功')
|
|
this.$successMsg('保存成功')
|
|
this.handletwoList()
|
|
this.handletwoList()
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.fullscreenLoading = false
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleK3List(e, row, index, name) {
|
|
handleK3List(e, row, index, name) {
|