增加:联盟商家和酒道馆申请入驻时需要选择商户子类型

This commit is contained in:
wuhui_zzw 2024-06-28 10:45:26 +08:00
parent a2e68daf8f
commit 9b0b933c08
1 changed files with 82 additions and 16 deletions

View File

@ -91,6 +91,20 @@
</view>
</view>
</view>
<view class="item" v-if="[0,1].includes(Number(merchant_type))">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">商户类型</text>
<picker @change="changeSubType" :value="sub_type_index" :range="subTypeList" range-key="title">
<input placeholder="请选择店铺类型" type="text" disabled readonly v-model="sub_type_title">
<view v-if="sub_type_title" @tap.stop="sub_type_title=''" class="iconfont icon-guanbi2"></view>
<view class='iconfont icon-jiantou'></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
@ -186,7 +200,8 @@
enterprise_name: "",
user_name: "",
phone: "",
classification: ''
classification: '',
merchant_sub_type: '',
},
validate: false,
successful: false,
@ -216,6 +231,14 @@
agent_id: 0,
merchant_type: 0,
pageTitle: '',
//
subTypeList: [{
title: '',
value: ''
}],
sub_type_index: 0,
sub_type_title: ''
};
},
beforeDestroy() {
@ -236,10 +259,10 @@
title: _this.pageTitle + '申请入驻'
})
}
if (this.isLogin) {
this.getClassfication();
this.getStoreType();
this.getSubTypeList();
} else {
this.isAuto = true;
this.isShowAuth = true
@ -313,13 +336,16 @@
//
this.merchantData.manage_uid = resData.manage_uid || ''
this.manage_search = Number(this.merchantData.manage_uid) || ''
this.merchantData.merchant_sub_type = resData.merchant_sub_type || 0
})
this.pics = resData.images
this.merchant_type = resData.merchant_type
this.agent_id = resData.agent_id
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
uni.hideLoading();
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
this.sub_type_title = this.getSubTypeName(resData.merchant_sub_type, this.subTypeList)
uni.hideLoading();
})
},
//
@ -330,15 +356,15 @@
}
}
},
//
getStoreTypeName(id, arr) {
for (let i = 0; i < arr.length; i++) {
if (arr[i].mer_type_id === id) {
return arr[i]['type_name']
}
}
},
bindPickerChange: function(e) {
//
getStoreTypeName(id, arr) {
for (let i = 0; i < arr.length; i++) {
if (arr[i].mer_type_id === id) {
return arr[i]['type_name']
}
}
},
bindPickerChange: function(e) {
this.index = e.target.value
let idx = e.target.value
this.merchantData.classification = this.array[idx]['merchant_category_id']
@ -514,7 +540,7 @@
let that = this;
if (that.validateForm() && that.validate) {
let requestData = {
phone: that.merchantData.phone,
phone: that.merchantData.phone,
manage_uid: that.merchantData.manage_uid,
mer_name: that.merchantData.enterprise_name,
name: that.merchantData.user_name,
@ -523,7 +549,8 @@
mer_type_id: that.merchantData.mer_type,
images: that.pics,
agent_id: that.agent_id || 0,
merchant_type: that.merchant_type || 0
merchant_type: that.merchant_type || 0,
merchant_sub_type: that.merchantData.merchant_sub_type || 0
}
that.validate = false;
if (that.mer_i_id) {
@ -616,7 +643,46 @@
title: '请勾选并同意入驻协议'
});
this.$refs.verify.show();
}
},
//
getSubTypeList(){
// 0=1=/2=/
if(this.merchant_type == 0){
this.subTypeList = [
{ title: '大型餐厅', value: 1},
{ title: '中小型餐厅', value: 2},
];
}else if(this.merchant_type == 1){
this.subTypeList = [
{ title: '酒道馆', value: 1},
{ title: '小酒馆', value: 2},
];
}
},
//
changeSubType(e){
this.sub_type_index = e.detail.value || e.target.value;
let info = this.subTypeList[this.sub_type_index] || {};
this.merchantData.merchant_sub_type = info.value || 0;
this.sub_type_title = info.title || '';
this.validateBtn();
},
//
getSubTypeName(id, arr) {
for (let i = 0; i < arr.length; i++) {
if (arr[i].value === id) {
this.sub_type_index = i;
return arr[i]['title']
}
}
},
},
// #ifdef MP