|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div>
|
|
|
- <el-page-header @back="goBack" content="存货调价单"> </el-page-header>
|
|
|
+ <el-page-header @back="goBack" :content="!cid?'存货调价单':'编辑'"> </el-page-header>
|
|
|
</div>
|
|
|
<br /><br />
|
|
|
<div>
|
|
@@ -343,6 +343,7 @@
|
|
|
<template v-if="!cid">
|
|
|
<el-select
|
|
|
multiple
|
|
|
+ clearable
|
|
|
v-model="scope.row.walletsId"
|
|
|
@change="handelWallets($event, scope.$index, scope.row)"
|
|
|
placeholder="请选择现金钱包"
|
|
@@ -358,6 +359,7 @@
|
|
|
<template v-else>
|
|
|
<el-select
|
|
|
multiple
|
|
|
+ clearable
|
|
|
v-model="scope.row.walletsId"
|
|
|
@change="handelWallets($event, scope.$index, scope.row)"
|
|
|
placeholder="请选择现金钱包"
|
|
@@ -975,7 +977,6 @@ export default {
|
|
|
// xua
|
|
|
handelWallets(e, index, row) {
|
|
|
let id = row.cid
|
|
|
- console.log(e,index,row);
|
|
|
|
|
|
if (!this.wall1.includes(e[e.length-1])) {
|
|
|
this.items[index].wallets.push( {
|
|
@@ -987,7 +988,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// if ( this.items[index].wallets.length) {
|
|
|
// for (let j = 0; j < this.items[index].wallets.length; j++) {
|
|
|
// if (row.walleList[i].id !== this.items[index].wallets[j].walletId) {
|
|
@@ -1013,6 +1013,19 @@ export default {
|
|
|
|
|
|
},
|
|
|
handelRebateList(e, index, row) {
|
|
|
+
|
|
|
+ // let id = row.cid
|
|
|
+
|
|
|
+ // if (!this.wall1.includes(e[e.length-1])) {
|
|
|
+ // this.items[index].wallets.push( {
|
|
|
+ // type: "COMMONLY",
|
|
|
+ // id: "",
|
|
|
+ // updPriceBillId: id,
|
|
|
+ // updPriceBillItemId: id,
|
|
|
+ // walletId: e[e.length-1],
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
for (let i = 0; i < e.length; i++) {
|
|
|
if (this.items[index].wallets.length) {
|
|
|
for (let j = 0; j < this.items[index].wallets.length; j++) {
|
|
@@ -1052,6 +1065,7 @@ export default {
|
|
|
this.serviceId = adminCompany.roleId;
|
|
|
},
|
|
|
goBack() {
|
|
|
+ this.$parent.cid=''
|
|
|
this.$parent.show = 1;
|
|
|
// 更新父组件数据
|
|
|
this.$parent.getList();
|
|
@@ -1172,6 +1186,7 @@ export default {
|
|
|
let rebateList= []
|
|
|
getProductRriceDetail({ id:this.cid }).then((res) => {
|
|
|
// this.editData = res.data;
|
|
|
+
|
|
|
for (let i = 0; i < res.data.items.length; i++) {
|
|
|
res.data.items[i].isPublishArr= [
|
|
|
{
|
|
@@ -1193,27 +1208,24 @@ export default {
|
|
|
bool: false,
|
|
|
},
|
|
|
]
|
|
|
+ let walletIds=[]
|
|
|
+ res.data.items[i].walletsId = ''
|
|
|
+ for (let p = 0; p < res.data.items[i].wallets2.length; p++) {
|
|
|
+ walletIds.push(res.data.items[i].wallets2[p].walletIds)
|
|
|
+ }
|
|
|
+ this.$set(res.data.items[i],'walletsId',walletIds)
|
|
|
|
|
|
rebateList = this.rebateList.filter((k) => {
|
|
|
return res.data.items[i].saleTypeId === k.saleTypeId;
|
|
|
-
|
|
|
});
|
|
|
-
|
|
|
this.items =res.data.items
|
|
|
this.base = res.data
|
|
|
- // let str=[]
|
|
|
- // res.data.items[i].walletsId = ''
|
|
|
- // for (let p = 0; p < res.data.items[i].wallets2.length; p++) {
|
|
|
- // str.push(res.data.items[i].wallets2[p].walletId)
|
|
|
- // }
|
|
|
- // this.$set(res.data.items[i],'walletsId',str)
|
|
|
res.data.items[i].wallets =[]
|
|
|
res.data.items[i].walleList = res.data.items[i].wallets2
|
|
|
res.data.items[i].rebateWallets=[]
|
|
|
res.data.items[i].rebateList=rebateList
|
|
|
res.data.items[i].fang = false;
|
|
|
- // console.log(rebateList,'475454',i);
|
|
|
- // this.$set(this.items[i], "rebateList", rebateList);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1287,6 +1299,7 @@ export default {
|
|
|
...this.base
|
|
|
}).then(res=>{
|
|
|
this.$successMsg("成功");
|
|
|
+ this.$parent.cid=''
|
|
|
this.$parent.show = 1;
|
|
|
this.$parent.getList();
|
|
|
})
|