fix:添加店铺主店列表修改
This commit is contained in:
parent
373fd88226
commit
f8c3c41247
|
|
@ -13,7 +13,7 @@
|
||||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
|
||||||
<span style="margin-left: 30px;">同步设置:</span>
|
<span style="margin-left: 30px;">设置同步方式:</span>
|
||||||
<el-select v-model="state.par.dataSyncMethod" @change="setDataSync" placeholder="请设置同步方式"
|
<el-select v-model="state.par.dataSyncMethod" @change="setDataSync" placeholder="请设置同步方式"
|
||||||
style="width: 200px">
|
style="width: 200px">
|
||||||
<el-option v-for="item in state.status" :key="item.type" :label="item.label" :value="item.type" />
|
<el-option v-for="item in state.status" :key="item.type" :label="item.label" :value="item.type" />
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,12 @@
|
||||||
<el-radio :value="0">否</el-radio>
|
<el-radio :value="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主店账号" prop="mainId" v-if="state.form.isHeadShop == '0'&&state.form.shopType != 'only'">
|
<el-form-item label="选择主店" prop="mainId" v-if="state.form.isHeadShop == '0'&&state.form.shopType != 'only'">
|
||||||
<!-- <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.id"
|
<el-option v-for="item in state.shopList" :label="`${item.shopName}`" :value="item.shopId"
|
||||||
:key="item.id"></el-option>
|
:key="item.shopId"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="连锁店扩展店名">
|
<el-form-item label="连锁店扩展店名">
|
||||||
|
|
@ -305,19 +305,17 @@ 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.getList({
|
const res = await ShopApi.getBranchList({
|
||||||
page: 1,
|
isHeadShop: 1,
|
||||||
size: 100,
|
|
||||||
shopName: query,
|
|
||||||
type: "only",
|
|
||||||
});
|
});
|
||||||
state.shopListLoading = false;
|
state.shopListLoading = false;
|
||||||
state.shopList = res.records;
|
state.shopList = res;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
state.shopListLoading = false;
|
state.shopListLoading = false;
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue