完善商家入驻逻辑,保存提交数据
This commit is contained in:
parent
a3443ff129
commit
6b229b8639
@ -3,7 +3,7 @@
|
|||||||
<view class="auditStatusContainer" v-if="itemObj.status == 1">
|
<view class="auditStatusContainer" v-if="itemObj.status == 1">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="statusIcon">
|
<view class="statusIcon">
|
||||||
<image src="http://localhost:8080//enter_audit1.png" mode="aspectFill" class="auditStatus" />
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill" class="auditStatus" />
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
审核中
|
审核中
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<view class="auditStatusContainer" v-if="itemObj.status == 3">
|
<view class="auditStatusContainer" v-if="itemObj.status == 3">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="statusIcon">
|
<view class="statusIcon">
|
||||||
<image src="http://localhost:8080//enter_audit2.png" mode="aspectFill" class="auditStatus" />
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit2.png" mode="aspectFill" class="auditStatus" />
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
审核失败
|
审核失败
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<button class="btn" @click="resubmit">重新提交</button>
|
<button class="btn" @click="resubmit">修改并重新提交</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -167,10 +167,44 @@ export default {
|
|||||||
show3: false,
|
show3: false,
|
||||||
classify: [],
|
classify: [],
|
||||||
show4: false,
|
show4: false,
|
||||||
|
|
||||||
|
itemObj: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 根据ad_code解析省市区信息
|
||||||
|
parseAdCode(adCode) {
|
||||||
|
if (!adCode) return;
|
||||||
|
|
||||||
|
// 提取省级ad_code(前2位)
|
||||||
|
const provinceCode = adCode.toString().substring(0, 2) + '0000';
|
||||||
|
// 提取市级ad_code(前4位)
|
||||||
|
const cityCode = adCode.toString().substring(0, 4) + '00';
|
||||||
|
// 区县级ad_code(完整6位)
|
||||||
|
const districtCode = adCode.toString();
|
||||||
|
|
||||||
|
// 查找省份信息
|
||||||
|
const province = this.pro.find(item => item.ad_code == provinceCode);
|
||||||
|
if (province) {
|
||||||
|
this.confirmProv = province;
|
||||||
|
|
||||||
|
// 获取对应城市列表并查找城市信息
|
||||||
|
this.getCity(provinceCode).then(() => {
|
||||||
|
const city = this.city.find(item => item.ad_code == cityCode);
|
||||||
|
if (city) {
|
||||||
|
this.confirmCity = city;
|
||||||
|
|
||||||
|
// 获取对应区县列表并查找区县信息
|
||||||
|
this.getBuss(cityCode).then(() => {
|
||||||
|
const district = this.buss.find(item => item.ad_code == districtCode);
|
||||||
|
if (district) {
|
||||||
|
this.confirmBusiness = district;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
cancelBuss() {
|
cancelBuss() {
|
||||||
this.show3 = false;
|
this.show3 = false;
|
||||||
@ -194,7 +228,6 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
clickPro(e) {
|
clickPro(e) {
|
||||||
console.log(e);
|
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.getCity(e.value[0].ad_code)
|
this.getCity(e.value[0].ad_code)
|
||||||
this.confirmProv = e.value[0]
|
this.confirmProv = e.value[0]
|
||||||
@ -221,7 +254,6 @@ export default {
|
|||||||
afterReadImg(e) {
|
afterReadImg(e) {
|
||||||
e.file.forEach(item => {
|
e.file.forEach(item => {
|
||||||
upload(item.url, res => {
|
upload(item.url, res => {
|
||||||
console.log(res.data.path);
|
|
||||||
this.imgList.push({ url: this.picUrl + res.data.path })
|
this.imgList.push({ url: this.picUrl + res.data.path })
|
||||||
this.imgList2.push(res.data.path)
|
this.imgList2.push(res.data.path)
|
||||||
})
|
})
|
||||||
@ -349,35 +381,52 @@ export default {
|
|||||||
|
|
||||||
// 省市区
|
// 省市区
|
||||||
getPro() {
|
getPro() {
|
||||||
request(MapApi.getArea, "POST", {}).then(res => {
|
return request(MapApi.getArea, "POST", {}).then(res => {
|
||||||
console.log(res);
|
|
||||||
this.pro = res.rows
|
this.pro = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCity(e) {
|
getCity(e) {
|
||||||
request(MapApi.getArea, "POST", {
|
return request(MapApi.getArea, "POST", {
|
||||||
parent_ad_code: e
|
parent_ad_code: e
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.city = res.rows
|
this.city = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getBuss(e) {
|
getBuss(e) {
|
||||||
request(MapApi.getArea, "POST", {
|
return request(MapApi.getArea, "POST", {
|
||||||
parent_ad_code: e
|
parent_ad_code: e
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.buss = res.rows
|
this.buss = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getClassify(e) {
|
getClassify() {
|
||||||
request(apiArr.getMerChantCateList, "POST", {}).then(res => {
|
return request(apiArr.getMerChantCateList, "POST", {}).then(res => {
|
||||||
this.classify = res.rows
|
this.classify = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
this.getPro()
|
// 先执行数据获取方法
|
||||||
this.getClassify()
|
Promise.all([this.getPro(), this.getClassify()]).then(() => {
|
||||||
|
// 数据获取完成后再进行赋值操作
|
||||||
|
if(options.itemObj){
|
||||||
|
this.itemObj = JSON.parse(options.itemObj)
|
||||||
|
this.store_name = this.itemObj.merchant_name
|
||||||
|
this.address = this.itemObj.address
|
||||||
|
this.contact_name = this.itemObj.contact_name
|
||||||
|
this.contact_phone = this.itemObj.phone
|
||||||
|
this.confirmClassify = this.classify.find(item => item.id == this.itemObj.merchant_cate_id)
|
||||||
|
this.bank_card = this.itemObj.bank_card
|
||||||
|
// 解析ad_code回显省市区
|
||||||
|
if (this.itemObj.ad_code) {
|
||||||
|
this.parseAdCode(this.itemObj.ad_code);
|
||||||
|
}
|
||||||
|
this.imgList = this.itemObj.facade_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||||
|
this.imgList3 = this.itemObj.interior_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||||
|
this.imgList5 = this.itemObj.license_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #f6f7fb;
|
background-color: #ffffff;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="sucessImg">
|
<div class="sucessImg">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_sucess.png" mode="aspectFill"></image>
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill"></image>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="Msg1">提交成功</div>
|
<div class="Msg1">提交成功</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user