fix:添加店铺主店列表修改
This commit is contained in:
@@ -23,8 +23,8 @@
|
|||||||
<!-- <el-form-item label="主店账号" prop="mainId" v-if="state.form.shopType != 'only'"> -->
|
<!-- <el-form-item label="主店账号" prop="mainId" v-if="state.form.shopType != 'only'"> -->
|
||||||
<el-select v-model="state.form.mainId" placeholder="请选择主店铺" filterable reserve-keyword
|
<el-select v-model="state.form.mainId" placeholder="请选择主店铺" filterable reserve-keyword
|
||||||
:remote-method="getTableData" :loading="state.shopListLoading" :disabled="state.form.id || state.type == 'addBranch'">
|
:remote-method="getTableData" :loading="state.shopListLoading" :disabled="state.form.id || state.type == 'addBranch'">
|
||||||
<el-option v-for="item in state.shopList" :label="`${item.shopName}`" :value="item.shopId"
|
<el-option v-for="item in state.shopList" :label="`${item.shopName}`" :value="item.id"
|
||||||
:key="item.shopId"></el-option>
|
:key="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="连锁店扩展店名">
|
<el-form-item label="连锁店扩展店名">
|
||||||
@@ -305,17 +305,20 @@ onMounted(() => {
|
|||||||
state.resetForm = { ...state.form };
|
state.resetForm = { ...state.form };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// 获取商家列表
|
// 获取商家列表
|
||||||
async function getTableData(query = "") {
|
async function getTableData(query = "") {
|
||||||
console.log(123)
|
console.log(123)
|
||||||
state.shopListLoading = true;
|
state.shopListLoading = true;
|
||||||
try {
|
try {
|
||||||
const res = await ShopApi.getBranchList({
|
const res = await ShopApi.getList({
|
||||||
|
page: 1,
|
||||||
|
size: 100,
|
||||||
|
shopName: query,
|
||||||
|
type: "only",
|
||||||
isHeadShop: 1,
|
isHeadShop: 1,
|
||||||
});
|
});
|
||||||
state.shopListLoading = false;
|
state.shopListLoading = false;
|
||||||
state.shopList = res;
|
state.shopList = res.records;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
state.shopListLoading = false;
|
state.shopListLoading = false;
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user