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