Commit 29c5f162 by 王志慧

commit

1 parent 7d80a671
......@@ -41,7 +41,7 @@
<template slot="putMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putMerchantId'" :rules="rules.putMerchantId">
<el-select style="width: 100%" v-model="scope.scope.putMerchantId" placeholder="请选择" @change="handleStoreSelect(scope.scope, scope.scope.putMerchantId)">
<el-option v-for="item in refByYqShopList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
<el-option v-for="item in scope.scope.refByYqShopList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select>
</el-form-item>
</template>
......@@ -169,11 +169,11 @@ export default {
},
getRefByYqShopList(data, value) {
this.$apis.purchaseShopping.get4SRefByYqShopList({ scene: 1, merchantId: value }).then(res => {
this.refByYqShopList = res
data.refByYqShopList = res
if (data) {
this.refByYqShopList.unshift({
data.refByYqShopList.unshift({
merchantName: data.putYqMerchantName,
merchantId: data.putYqMerchantId
merchantId: Number(data.putYqMerchantId)
})
}
})
......@@ -228,7 +228,15 @@ export default {
},
getData() {
this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => {
this.formdata.tableData = res
res.forEach(item => {
item.putYqMerchantId = String(item.putYqMerchantId)
item.putMerchantId = item.putMerchantId
item.refByYqShopList = []
this.getRefByYqShopList(item, item.putYqMerchantId)
})
this.$nextTick(() => {
this.formdata.tableData = res
})
})
},
handleDelete(index) {
......@@ -304,6 +312,7 @@ export default {
addLine() {
let { storeUsageList } = this
this.formdata.tableData.unshift({
refByYqShopList:[],
upgradeGoodsId: '',
type: '',
goodsName: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!