Commit 29c5f162 by 王志慧

commit

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