|
@@ -155,7 +155,7 @@
|
|
|
|
|
|
<!-- 填写地址 -->
|
|
|
|
|
|
- <van-popup position="bottom" :style="{ height: '70%' }" v-model="adderInfoShow" class="whrite_add">
|
|
|
+ <van-popup position="bottom" :style="{ height: '85%' }" v-model="adderInfoShow" class="whrite_add">
|
|
|
<div class="recognition">
|
|
|
<van-cell-group inset>
|
|
|
<van-field style="height: auto;" v-model="discernMessage" rows="1" label="识别" type="textarea"
|
|
@@ -173,8 +173,10 @@
|
|
|
:rules="[{ required: false }]" />
|
|
|
<van-field v-model="discern.phone" maxlength="11" type="number" name="手机" label="手机"
|
|
|
placeholder="自动填充" :rules="[{ required: false }]" />
|
|
|
- <van-field readonly clickable name="area" :value="discern.proDisTown" label="省市区镇"
|
|
|
- placeholder="自动填充" />
|
|
|
+ <van-field name="area" v-model="discern.province" label="省" placeholder="自动填充" />
|
|
|
+ <van-field name="area" v-model="discern.city" label="市" placeholder="自动填充" />
|
|
|
+ <van-field name="area" v-model="discern.district" label="区" placeholder="自动填充" />
|
|
|
+ <van-field name="area" v-model="discern.town" label="镇" placeholder="自动填充" />
|
|
|
<van-field v-model="discern.address" maxlength="50" name="详细地址" label="详细地址" placeholder="自动填充"
|
|
|
:rules="[{ required: false }]" />
|
|
|
<div style="margin-top: 16px;">
|
|
@@ -285,6 +287,7 @@ export default {
|
|
|
if (this.transmitMessageVlaue.isAddressIdTransfer) {
|
|
|
this.isAddressIdTransfer = this.transmitMessageVlaue.isAddressIdTransfer
|
|
|
}
|
|
|
+ console.log(this.isAddressIdTransfer, 'this.isAddressIdTransfer')
|
|
|
},
|
|
|
methods: {
|
|
|
// 运单号扫描
|
|
@@ -345,6 +348,14 @@ export default {
|
|
|
// 收件人信息弹框
|
|
|
changeAdderInfo() {
|
|
|
this.adderInfoShow = true
|
|
|
+ // 回显
|
|
|
+ this.discern.province = this.transmitMessageVlaue.addresseeProvince
|
|
|
+ this.discern.city = this.transmitMessageVlaue.addresseeCity
|
|
|
+ this.discern.district = this.transmitMessageVlaue.addresseeCounty
|
|
|
+ this.discern.name = this.transmitMessageVlaue.addresseeName
|
|
|
+ this.discern.phone = this.transmitMessageVlaue.addresseePhone
|
|
|
+ this.discern.town = this.transmitMessageVlaue.addresseeTown
|
|
|
+ this.discern.address = this.transmitMessageVlaue.addresseeAddrInfo
|
|
|
},
|
|
|
async shibie() {
|
|
|
if (this.discernMessage == '') {
|
|
@@ -360,7 +371,6 @@ export default {
|
|
|
this.discern.district = res.district
|
|
|
this.discern.town = res.town
|
|
|
this.discern.address = res.addr_info
|
|
|
- this.discern.proDisTown = res.prov + res.city + res.district + res.town
|
|
|
} else {
|
|
|
Toast('请求失败')
|
|
|
}
|
|
@@ -407,25 +417,42 @@ export default {
|
|
|
Toast('请输入详细地址')
|
|
|
return
|
|
|
}
|
|
|
+ // 关闭弹窗
|
|
|
this.adderInfoShow = false
|
|
|
|
|
|
+ function equal(key1, key2) {
|
|
|
+ return key1 === key2
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果发生修改 false , 没有修改 true
|
|
|
+ this.isAddressIdTransfer = equal(this.transmitMessageVlaue.addresseeProvince, this.discern.province) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseeCity, this.discern.city) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseeCounty, this.discern.district) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseeName, this.discern.name) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseePhone, this.discern.phone) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseeTown, this.discern.town) &&
|
|
|
+ equal(this.transmitMessageVlaue.addresseeAddrInfo, this.discern.address)
|
|
|
+
|
|
|
+ console.log("4444", this.isAddressIdTransfer)
|
|
|
+
|
|
|
this.transmitMessageVlaue.addresseeProvince = this.discern.province
|
|
|
this.transmitMessageVlaue.addresseeCity = this.discern.city
|
|
|
this.transmitMessageVlaue.addresseeCounty = this.discern.district
|
|
|
this.transmitMessageVlaue.addresseeName = this.discern.name
|
|
|
this.transmitMessageVlaue.addresseePhone = this.discern.phone
|
|
|
+ this.transmitMessageVlaue.addresseeTown = this.discern.town
|
|
|
+ this.transmitMessageVlaue.addresseeAddrInfo = this.discern.address
|
|
|
|
|
|
- this.isAddressIdTransfer = false,//修改了收件人的信息,地址铺Id不传
|
|
|
- this.discern = {
|
|
|
- name: '',
|
|
|
- phone: '',
|
|
|
- province: '',
|
|
|
- city: '',
|
|
|
- district: '',
|
|
|
- town: '',
|
|
|
- address: '',
|
|
|
- proDisTown: '',
|
|
|
- }
|
|
|
+ this.discern = {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ province: '',
|
|
|
+ city: '',
|
|
|
+ district: '',
|
|
|
+ town: '',
|
|
|
+ address: '',
|
|
|
+ proDisTown: '',
|
|
|
+ }
|
|
|
this.discernMessage = ''
|
|
|
|
|
|
},
|