更新
This commit is contained in:
parent
4d0999b7ee
commit
ff1f7e3728
@ -68,7 +68,7 @@
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name">商户分类</text>
|
||||
<picker @change="bindPickerChange" @columnchange="columnchange" mode="multiSelector" :value="index" :range="[array, array[bindPickerChangeidx].children]" range-key="category_name">
|
||||
<picker @change="bindPickerChange" @columnchange="columnchange" mode="multiSelector" :value="index" :range="[array, bindPickerChangeidx]" range-key="cate_name">
|
||||
<input placeholder="请选择商户分类" type="text" readonly disabled
|
||||
v-model="mer_classification">
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
@ -353,7 +353,7 @@
|
||||
category_name: '',
|
||||
merchant_category_id: ''
|
||||
}],
|
||||
bindPickerChangeidx: 0,
|
||||
bindPickerChangeidx: [],
|
||||
storeTypeArr: [{
|
||||
type_name: '',
|
||||
mer_type_id: ''
|
||||
@ -596,16 +596,17 @@
|
||||
}
|
||||
},
|
||||
bindPickerChange: function(e) {
|
||||
this.index = e.target.value
|
||||
let idx = e.target.value;
|
||||
this.merchantData.classification = this.array[idx]['merchant_category_id']
|
||||
this.mer_classification = this.array[idx]['category_name']
|
||||
// console.log(e.detail);
|
||||
this.index = e.target.value[1];
|
||||
let idx = e.target.value[1];
|
||||
this.merchantData.classification = this.bindPickerChangeidx[idx]['store_category_id']
|
||||
this.mer_classification = this.bindPickerChangeidx[idx]['cate_name']
|
||||
this.validateBtn()
|
||||
},
|
||||
columnchange(e){
|
||||
// console.log(e.detail);
|
||||
if(e.detail.column==0){
|
||||
this.bindPickerChangeidx = e.detail.value;
|
||||
this.bindPickerChangeidx = this.array[e.detail.value].children;
|
||||
}
|
||||
},
|
||||
bindPickerChange1: function(e) {
|
||||
@ -665,12 +666,13 @@
|
||||
// });
|
||||
getCategoryList()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
res.data.list.forEach(item=>{
|
||||
item.category_name = item.cate_name;
|
||||
item.merchant_category_id = item.store_category_id;
|
||||
})
|
||||
this.array = res.data.list;
|
||||
this.bindPickerChangeidx = this.array[0].children;
|
||||
})
|
||||
.catch(res => {
|
||||
this.$util.Tips({
|
||||
@ -844,6 +846,7 @@
|
||||
address: that.merchantData.address,
|
||||
social_credit_code: that.merchantData.social_credit_code,
|
||||
merchant_category_id: that.merchantData.classification,
|
||||
merchant_category_name: that.mer_classification,
|
||||
mer_type_id: that.merchantData.mer_type,
|
||||
mer_storeType: this.mer_storeType,
|
||||
area_id: this.area_id,
|
||||
@ -891,6 +894,7 @@
|
||||
}
|
||||
},
|
||||
formSubmit() {
|
||||
console.log('sss');
|
||||
if (this.validateForm() && this.validate) {
|
||||
if (this.codenote.length == 0) {
|
||||
this.isshow = true
|
||||
@ -979,7 +983,7 @@
|
||||
if (value.enterprise_name && value.user_name && value.phone && /^1(3|4|5|7|8|9|6)\d{9}$/i.test(
|
||||
value
|
||||
.phone) &&
|
||||
value.yanzhengma && that.isAgree && value.classification) {
|
||||
value.yanzhengma && that.isAgree && this.mer_classification) {
|
||||
if (!that.isShowCode) {
|
||||
that.validate = true;
|
||||
} else {
|
||||
@ -1020,7 +1024,7 @@
|
||||
if (!value.yanzhengma) return that.$util.Tips({
|
||||
title: '请填写验证码'
|
||||
});
|
||||
if (!value.classification) return that.$util.Tips({
|
||||
if (!this.mer_classification) return that.$util.Tips({
|
||||
title: '请选择商户分类'
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user