Commit fb30343f by caoyanzhi

fix: 调整接口

parent 0180125f
posmembers
wechatmembers
wechattotal
\ No newline at end of file
......@@ -143,7 +143,13 @@ export default {
authStatus: 0
},
integralFlag: "",
debounce
debounce,
loadmoreStore: {
query: '',
currentPage: 0,
totalPage: 1,
loading: false
}
};
},
computed: {
......@@ -402,22 +408,34 @@ export default {
});
},
changeSubStore() {
if (this.storeForm.subOptType == 1) {
this.storeForm.modefiySubStoreName = "";
this.storeForm.modefiySubStoreId = "";
this.storeForm.deleteSubStoreId = "";
if (this.storeForm.subOptType != 1) {
this.storeForm.addSubStoreId = '';
this.storeForm.addSubStoreName = '';
}
if (this.storeForm.subOptType == 2) {
this.storeForm.addSubStoreName = "";
this.storeForm.addSubStoreId = "";
this.storeForm.deleteSubStoreId = "";
if (this.storeForm.subOptType != 2) {
this.storeForm.premodefiySubStoreId = '';
this.storeForm.modefiySubStoreName = '';
this.storeForm.modefiySubStoreId = '';
}
if (this.storeForm.subOptType == 3) {
this.storeForm.addSubStoreName = "";
this.storeForm.addSubStoreId = "";
this.storeForm.modefiySubStoreName = "";
this.storeForm.modefiySubStoreId = "";
if (this.storeForm.subOptType != 3) {
this.storeForm.deleteSubStoreId = '';
}
// if (this.storeForm.subOptType == 1) {
// this.storeForm.modefiySubStoreName = "";
// this.storeForm.modefiySubStoreId = "";
// this.storeForm.deleteSubStoreId = "";
// }
// if (this.storeForm.subOptType == 2) {
// this.storeForm.addSubStoreName = "";
// this.storeForm.addSubStoreId = "";
// this.storeForm.deleteSubStoreId = "";
// }
// if (this.storeForm.subOptType == 3) {
// this.storeForm.addSubStoreName = "";
// this.storeForm.addSubStoreId = "";
// this.storeForm.modefiySubStoreName = "";
// this.storeForm.modefiySubStoreId = "";
// }
},
submitStore(formName) {
this.$refs[formName].validate(valid => {
......@@ -493,33 +511,30 @@ export default {
}
});
},
getSubStoreList() {
let memberIdsArr = [];
if (this.multipleList.length > 0) {
this.multipleList.forEach(item => {
memberIdsArr.push(item.memberId);
});
} else {
checkFalse("会员不能为空");
return false;
}
doFetch(url.membersSubStoreList, {
memberIds: memberIdsArr.join(","),
isCurrent: this.selectAll == true ? 2 : this.multipleList.length == this.page.pageSize ? 1 : 0,
memberSearchParamStr: this.memberSearchStr ? this.memberSearchStr : '',
pageName: 'wxMember',
phoneNameCard: this.phoneNameCard
})
.then(res => {
if (res.data.errorCode === 0) {
this.subStoreList = res.data.result.storeList;
} else {
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
});
getOnlineStore() {
const { query, currentPage, loading, totalPage } = this.loadmoreStore;
if (loading || currentPage >= totalPage) return;
this.loadmoreStore.loading = true;
doFetchqs(url.getOnlineStore, {
currentPage: currentPage + 1,
pageSize: 20,
searchName: query
}).then(res => {
const { errorCode, message, result } = res.data || {};
if (errorCode == 0) {
this.subStoreList = this.subStoreList.concat(result.list || []);
this.loadmoreStore.totalPage = result.page.totalPage || 1;
this.loadmoreStore.currentPage = currentPage + 1;
} else {
checkFalse(message);
}
}).finally(() => this.loadmoreStore.loading = false);
},
getSubStoreList(query) {
this.loadmoreStore.query = query;
this.loadmoreStore.currentPage = 0;
this.subStoreList = [];
this.getOnlineStore();
},
closeProcess() {
clearInterval(this.timer);
......@@ -901,7 +916,6 @@ export default {
if (this.$refs.storeForm) {
this.$refs.storeForm.resetFields();
}
this.getSubStoreList();
return;
}
},
......
......@@ -745,13 +745,12 @@
:label=1
v-model="storeForm.subOptType"
>增加协管门店
<span style="color: #000;">{{ storeForm.addSubStoreName }}</span>
<span
style="color: #000;"
<span>{{ storeForm.addSubStoreName }}</span>
<el-button
v-if="storeForm.subOptType == 1"
class="pointer"
type="text"
@click="changeStore"
>选择门店</span>
>选择门店</el-button>
</el-radio>
<p>
<el-radio
......@@ -761,8 +760,13 @@
>将协管门店</el-radio>
<el-select
v-model="storeForm.premodefiySubStoreId"
placeholder="请选择"
filterable
remote
:remote-method="getSubStoreList"
placeholder="请输入关键字搜索门店"
:disabled="storeForm.subOptType == 2 ? false : true"
v-select-loadmore="getOnlineStore"
@visible-change="(flag) => flag ? getSubStoreList() : ''"
>
<el-option
v-for="item in subStoreList"
......@@ -771,11 +775,12 @@
:value="item.storeId"
></el-option>
</el-select>
修改为 {{ storeForm.modefiySubStoreName }}<span
修改为 {{ storeForm.modefiySubStoreName }}
<el-button
v-if="storeForm.subOptType == 2"
class="pointer"
type="text"
@click="changeStore"
>选择门店</span>
>选择门店</el-button>
</p>
<el-radio
@change="changeSubStore"
......@@ -784,8 +789,13 @@
>将协管门店
<el-select
v-model="storeForm.deleteSubStoreId"
placeholder="请选择"
filterable
remote
:remote-method="getSubStoreList"
placeholder="请输入关键字搜索门店"
:disabled="storeForm.subOptType == 3 ? false : true"
v-select-loadmore="getOnlineStore"
@visible-change="flag => flag ? getSubStoreList() : ''"
>
<el-option
v-for="item in subStoreList"
......@@ -793,7 +803,7 @@
:label="item.storeName"
:value="item.storeId"
></el-option>
</el-select><span style="color: #000;cursor: default;"> 删除</span></el-radio>
</el-select><span> 删除</span></el-radio>
</el-form-item>
<el-form-item
label="原因备注"
......
......@@ -741,7 +741,7 @@
:label=1
v-model="storeForm.subOptType"
>增加协管门店
<span style="color: #000;">{{ storeForm.addSubStoreName }}</span>
<span>{{ storeForm.addSubStoreName }}</span>
<el-button
v-if="storeForm.subOptType == 1"
type="text"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment