|
@@ -157,14 +157,14 @@
|
|
|
<!-- 添加或修改推荐店铺对话框 -->
|
|
<!-- 添加或修改推荐店铺对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
- <el-form-item label="推荐店铺Id" prop="storeSeq">
|
|
|
|
|
|
|
+ <el-form-item label="推荐店铺" prop="storeSeq">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="form.storeSeq"
|
|
|
|
|
|
|
+ v-model="form.storeId"
|
|
|
filterable
|
|
filterable
|
|
|
remote
|
|
remote
|
|
|
:remote-method="searchStore"
|
|
:remote-method="searchStore"
|
|
|
:loading="storeLoading"
|
|
:loading="storeLoading"
|
|
|
- placeholder="请输入并搜索店铺名称"
|
|
|
|
|
|
|
+ placeholder="请输入店铺名称/店铺Id"
|
|
|
clearable
|
|
clearable
|
|
|
@change="setStore"
|
|
@change="setStore"
|
|
|
>
|
|
>
|
|
@@ -244,6 +244,7 @@ export default {
|
|
|
statusOptions: [],
|
|
statusOptions: [],
|
|
|
storeLoading: false, // 店铺搜索加载状态
|
|
storeLoading: false, // 店铺搜索加载状态
|
|
|
storeOptions: [],
|
|
storeOptions: [],
|
|
|
|
|
+ storeName: null,
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -291,21 +292,18 @@ export default {
|
|
|
//
|
|
//
|
|
|
setStore(){
|
|
setStore(){
|
|
|
let storeId = this.form.storeId;
|
|
let storeId = this.form.storeId;
|
|
|
- this.form.storeName = this.storeOptions.filter(item => item.storeId === storeId)[0].storeName;
|
|
|
|
|
|
|
+ this.storeName = this.storeOptions.filter(item => item.storeId === storeId)[0].storeName;
|
|
|
|
|
+ this.form.storeName = this.storeName
|
|
|
},
|
|
},
|
|
|
// 搜索店铺
|
|
// 搜索店铺
|
|
|
searchStore(query) {
|
|
searchStore(query) {
|
|
|
if (query !== '') {
|
|
if (query !== '') {
|
|
|
- var isNum = this.isPureNumber(query);
|
|
|
|
|
- console.log(isNum);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ var isNum = this.isPureNumber(query);
|
|
|
this.storeLoading = true;
|
|
this.storeLoading = true;
|
|
|
let queryObj = { storeName: query };
|
|
let queryObj = { storeName: query };
|
|
|
- if(isNum){
|
|
|
|
|
|
|
+ if(isNum){
|
|
|
queryObj.queryStoreId = query;
|
|
queryObj.queryStoreId = query;
|
|
|
- }
|
|
|
|
|
- // 这里应该调用实际的API来搜索店铺
|
|
|
|
|
- // 示例代码,需要根据实际API调整
|
|
|
|
|
|
|
+ }
|
|
|
listStore(queryObj).then(response => {
|
|
listStore(queryObj).then(response => {
|
|
|
this.storeOptions = response.rows;
|
|
this.storeOptions = response.rows;
|
|
|
this.storeLoading = false;
|
|
this.storeLoading = false;
|