diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue
index b64c242..757d409 100644
--- a/pages/store/settled/index.vue
+++ b/pages/store/settled/index.vue
@@ -91,6 +91,20 @@
+
+
+
+
+ 商户类型
+
+
+
+
+
+
+
+
+
请上传营业执照及行业相关资质证明图片
@@ -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