增加:联盟商家和酒道馆申请入驻时需要选择商户子类型
This commit is contained in:
parent
a2e68daf8f
commit
9b0b933c08
|
|
@ -91,6 +91,20 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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="item no-border">
|
||||||
<view class='acea-row row-middle'>
|
<view class='acea-row row-middle'>
|
||||||
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
|
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
|
||||||
|
|
@ -186,7 +200,8 @@
|
||||||
enterprise_name: "",
|
enterprise_name: "",
|
||||||
user_name: "",
|
user_name: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
classification: ''
|
classification: '',
|
||||||
|
merchant_sub_type: '',
|
||||||
},
|
},
|
||||||
validate: false,
|
validate: false,
|
||||||
successful: false,
|
successful: false,
|
||||||
|
|
@ -216,6 +231,14 @@
|
||||||
agent_id: 0,
|
agent_id: 0,
|
||||||
merchant_type: 0,
|
merchant_type: 0,
|
||||||
pageTitle: '',
|
pageTitle: '',
|
||||||
|
// 商户子类型
|
||||||
|
subTypeList: [{
|
||||||
|
title: '',
|
||||||
|
value: ''
|
||||||
|
}],
|
||||||
|
sub_type_index: 0,
|
||||||
|
sub_type_title: ''
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
@ -236,10 +259,10 @@
|
||||||
title: _this.pageTitle + '申请入驻'
|
title: _this.pageTitle + '申请入驻'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getClassfication();
|
this.getClassfication();
|
||||||
this.getStoreType();
|
this.getStoreType();
|
||||||
|
this.getSubTypeList();
|
||||||
} else {
|
} else {
|
||||||
this.isAuto = true;
|
this.isAuto = true;
|
||||||
this.isShowAuth = true
|
this.isShowAuth = true
|
||||||
|
|
@ -313,13 +336,16 @@
|
||||||
// 管理员相关处理
|
// 管理员相关处理
|
||||||
this.merchantData.manage_uid = resData.manage_uid || ''
|
this.merchantData.manage_uid = resData.manage_uid || ''
|
||||||
this.manage_search = Number(this.merchantData.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.pics = resData.images
|
||||||
this.merchant_type = resData.merchant_type
|
this.merchant_type = resData.merchant_type
|
||||||
this.agent_id = resData.agent_id
|
this.agent_id = resData.agent_id
|
||||||
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
|
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
|
||||||
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
|
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
|
||||||
uni.hideLoading();
|
this.sub_type_title = this.getSubTypeName(resData.merchant_sub_type, this.subTypeList)
|
||||||
|
|
||||||
|
uni.hideLoading();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取商户分类名称
|
//获取商户分类名称
|
||||||
|
|
@ -330,15 +356,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取店铺类型名称
|
//获取店铺类型名称
|
||||||
getStoreTypeName(id, arr) {
|
getStoreTypeName(id, arr) {
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
if (arr[i].mer_type_id === id) {
|
if (arr[i].mer_type_id === id) {
|
||||||
return arr[i]['type_name']
|
return arr[i]['type_name']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
this.index = e.target.value
|
this.index = e.target.value
|
||||||
let idx = e.target.value
|
let idx = e.target.value
|
||||||
this.merchantData.classification = this.array[idx]['merchant_category_id']
|
this.merchantData.classification = this.array[idx]['merchant_category_id']
|
||||||
|
|
@ -514,7 +540,7 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.validateForm() && that.validate) {
|
if (that.validateForm() && that.validate) {
|
||||||
let requestData = {
|
let requestData = {
|
||||||
phone: that.merchantData.phone,
|
phone: that.merchantData.phone,
|
||||||
manage_uid: that.merchantData.manage_uid,
|
manage_uid: that.merchantData.manage_uid,
|
||||||
mer_name: that.merchantData.enterprise_name,
|
mer_name: that.merchantData.enterprise_name,
|
||||||
name: that.merchantData.user_name,
|
name: that.merchantData.user_name,
|
||||||
|
|
@ -523,7 +549,8 @@
|
||||||
mer_type_id: that.merchantData.mer_type,
|
mer_type_id: that.merchantData.mer_type,
|
||||||
images: that.pics,
|
images: that.pics,
|
||||||
agent_id: that.agent_id || 0,
|
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;
|
that.validate = false;
|
||||||
if (that.mer_i_id) {
|
if (that.mer_i_id) {
|
||||||
|
|
@ -616,7 +643,46 @@
|
||||||
title: '请勾选并同意入驻协议'
|
title: '请勾选并同意入驻协议'
|
||||||
});
|
});
|
||||||
this.$refs.verify.show();
|
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
|
// #ifdef MP
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue