|
@@ -17,16 +17,10 @@
|
|
|
<div class="jjaddress">
|
|
|
<p>寄</p>
|
|
|
<div>
|
|
|
- <div style="display: flex; justify-content: space-between;">
|
|
|
- <p style="font-size: 14px;">姓名 </p>
|
|
|
- <span style="margin-left: 70px;">{{
|
|
|
- SendInfoValue.address }}</span>
|
|
|
- </div>
|
|
|
- <div style="display: flex; justify-content: space-between;">
|
|
|
- <p style="font-size: 14px; margin: 0">手机号 <span style="margin-left: 70px;">{{
|
|
|
- SendInfoValue.phone }}</span></p>
|
|
|
- </div>
|
|
|
-
|
|
|
+ <van-field readonly v-model="SendInfoValue.address" label="姓名" name="pattern"
|
|
|
+ placeholder="请输入正确的手机号" />
|
|
|
+ <van-field v-model="SendInfoValue.phone" label="手机号" name="pattern"
|
|
|
+ placeholder="请输入正确的手机号" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="dzb" @click="link(1)">
|
|
@@ -38,13 +32,10 @@
|
|
|
<div class="jjaddress">
|
|
|
<p style="background: #fa9c22;">收</p>
|
|
|
<div>
|
|
|
- <div style="display: flex; justify-content: space-between;">
|
|
|
- <p style="font-size: 14px;">姓名 </p>
|
|
|
- <span style="margin-left: 70px;">{{
|
|
|
- transmitMessageVlaue.addresseeName }}</span>
|
|
|
- </div>
|
|
|
- <van-field v-model="elvenPhone" label="手机号" name="pattern" placeholder="请输入正确的手机号"
|
|
|
- :rules="[{ pattern, message: '请输入正确的手机号' }]" />
|
|
|
+ <van-field v-model="transmitMessageVlaue.addresseeName" name="" label="姓名"
|
|
|
+ placeholder="用户名" />
|
|
|
+ <van-field v-model="transmitMessageVlaue.addresseePhone" label="手机号" name="pattern"
|
|
|
+ placeholder="请输入正确的手机号" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dzb" @click="link(2)">
|
|
@@ -268,25 +259,10 @@ export default {
|
|
|
// }
|
|
|
this.mailRoomId = localStorage.getItem("roomId")
|
|
|
|
|
|
- //寄件地址
|
|
|
- if (JSON.stringify(this.$store.state.jjInfo) != '{}') {
|
|
|
- this.jjname = this.$store.state.jjInfo.jjname
|
|
|
- this.jjadd = this.$store.state.jjInfo.jjadd
|
|
|
- this.jjInfo = this.$store.state.jjInfo
|
|
|
- } else {
|
|
|
- //获取默认地址
|
|
|
- this.getDefaultAddress()
|
|
|
- }
|
|
|
|
|
|
- //收件地址
|
|
|
- if (JSON.stringify(this.$store.state.sjInfo) != '{}') {
|
|
|
- this.sjname = this.$store.state.sjInfo.sjname
|
|
|
- this.sjadd = this.$store.state.sjInfo.sjadd
|
|
|
- this.sjInfo = this.$store.state.sjInfo
|
|
|
- }
|
|
|
+
|
|
|
this.getLogisticsList()
|
|
|
- //获取成本中心
|
|
|
- this.getCostCenterList()
|
|
|
+
|
|
|
},
|
|
|
async mounted() {
|
|
|
this.SendInfoValue = await getSendInfo({ userId: localStorage.getItem("userId") })
|
|
@@ -543,12 +519,22 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
- if (this.elvenPhone == '' || this.elvenPhone == undefined) {
|
|
|
+ if (this.SendInfoValue.phone == '' || this.SendInfoValue.phone == undefined) {
|
|
|
+ Toast('寄件人手机号不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.transmitMessageVlaue.addresseeName == '' || this.transmitMessageVlaue.addresseeName == undefined) {
|
|
|
+ Toast('收件人姓名不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.transmitMessageVlaue.addresseePhone == '' || this.transmitMessageVlaue.addresseePhone == undefined) {
|
|
|
Toast('手机号码不能为空')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (!this.pattern.test(this.elvenPhone)) {
|
|
|
+ if (!this.pattern.test(this.transmitMessageVlaue.addresseePhone)) {
|
|
|
Toast('手机号码不正确')
|
|
|
return
|
|
|
}
|
|
@@ -619,14 +605,16 @@ export default {
|
|
|
expressRemark: this.bz,//快递备注
|
|
|
expressWeight: this.stepper,//公斤
|
|
|
expressPrice: this.declaredValue,//价值
|
|
|
- phone: this.elvenPhone,//收件人手机号
|
|
|
+ phone: this.SendInfoValue.phone,//寄件人手机号
|
|
|
+ addresseeName: this.transmitMessageVlaue.addresseeName,//
|
|
|
+ addresseePhone: this.transmitMessageVlaue.addresseePhone,//收件人手机号
|
|
|
}
|
|
|
const res = await saveMailDo({ ...parmas })
|
|
|
if (res.msg == 'success') {
|
|
|
Toast('寄件成功')
|
|
|
+ this.$router.push('/')
|
|
|
}
|
|
|
Toast.clear()
|
|
|
- console.log(res)
|
|
|
}
|
|
|
},
|
|
|
|