|
@@ -17,10 +17,16 @@
|
|
|
<div class="jjaddress">
|
|
|
<p>寄</p>
|
|
|
<div>
|
|
|
- <p v-if="jjname == '' || jjname == ' '">寄件地址</p>
|
|
|
- <p v-else>{{ jjname }} {{ jjInfo.senderMobile }}</p>
|
|
|
- <p v-if="jjadd == '' || jjadd == ' '" @click="addtype(1)">填写寄件地址</p>
|
|
|
- <p v-else @click="addtype(1)">{{ jjadd }}</p>
|
|
|
+ <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>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="dzb" @click="link(1)">
|
|
@@ -32,10 +38,13 @@
|
|
|
<div class="jjaddress">
|
|
|
<p style="background: #fa9c22;">收</p>
|
|
|
<div>
|
|
|
- <p v-if="sjname == '' || sjname == ' '">收件地址</p>
|
|
|
- <p v-else>{{ sjname }} {{ sjInfo.receiveMobile }}</p>
|
|
|
- <p v-if="sjadd == '' || sjadd == ' '" @click="addtype(2)">填写收件地址</p>
|
|
|
- <p v-else @click="addtype(2)">{{ sjadd }}</p>
|
|
|
+ <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: '请输入正确的手机号' }]" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dzb" @click="link(2)">
|
|
@@ -186,8 +195,9 @@
|
|
|
<script>
|
|
|
import areaList from "@/script/areas.js"
|
|
|
import { Stepper, Toast } from 'vant';
|
|
|
-import { saveMailDo } from '../api/index'
|
|
|
+import { saveMailDo, getSendInfo } from '../api/index'
|
|
|
export default {
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
titlename: "寄件",
|
|
@@ -227,6 +237,7 @@ export default {
|
|
|
columns2: ["个人件", "公司件"],
|
|
|
jjInfo: {},
|
|
|
sjInfo: {},
|
|
|
+ // transmitMessageVlaue: {},
|
|
|
declaredValue: '0', //声明价值
|
|
|
showPicker2: false,
|
|
|
goodOrderNo: '',//商品订单编号
|
|
@@ -238,12 +249,14 @@ export default {
|
|
|
costCenterList: [],//成本中心列表
|
|
|
costCenterInfoShow: "",
|
|
|
costCenterName: "",//成本中心展示
|
|
|
- costCenterId: ""//成本中心展示
|
|
|
+ costCenterId: "",//成本中心展示
|
|
|
+ elvenPhone: '',//收件人输入的手机号
|
|
|
+ pattern: /^\d{11}$/,
|
|
|
+ SendInfoValue: {},//寄件人信息
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
|
this.isLogin();
|
|
|
-
|
|
|
this.userId = localStorage.getItem("userId")
|
|
|
this.accountType = localStorage.getItem("accountType")
|
|
|
console.log("accountType:" + this.accountType)
|
|
@@ -275,6 +288,9 @@ export default {
|
|
|
//获取成本中心
|
|
|
this.getCostCenterList()
|
|
|
},
|
|
|
+ async mounted() {
|
|
|
+ this.SendInfoValue = await getSendInfo({ userId: localStorage.getItem("userId") })
|
|
|
+ },
|
|
|
methods: {
|
|
|
wxScanCode(type) {
|
|
|
// let purl = /(Android)/i.test(navigator.userAgent) ? window.location.href.split('#')[0] : encodeURI(window.location.href.split('#')[0]);
|
|
@@ -399,6 +415,7 @@ export default {
|
|
|
},
|
|
|
// 填写地址确定
|
|
|
onSubmit() {
|
|
|
+
|
|
|
if (this.name == '' || this.name == undefined) {
|
|
|
Toast('请填写姓名')
|
|
|
return
|
|
@@ -475,7 +492,8 @@ export default {
|
|
|
},
|
|
|
// 地址簿跳转
|
|
|
link(obj) {
|
|
|
- this.$router.push({ path: '/Addressbook', query: { active: obj } })
|
|
|
+ // this.$router.push({ path: '/Addressbook', query: { active: obj } })
|
|
|
+ this.$router.push({ path: '/Myaddressbook', query: { active: obj } })
|
|
|
},
|
|
|
//立即寄件交互
|
|
|
async save() {
|
|
@@ -523,11 +541,25 @@ export default {
|
|
|
// return
|
|
|
// }
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ if (this.elvenPhone == '' || this.elvenPhone == undefined) {
|
|
|
+ Toast('手机号码不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.pattern.test(this.elvenPhone)) {
|
|
|
+ Toast('手机号码不正确')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (this.expressInfo == '' || this.expressInfo == undefined) {
|
|
|
Toast('请选择快递公司')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if (this.wptype == '' || this.wptype == undefined) {
|
|
|
Toast('请选择物品类型')
|
|
|
return
|
|
@@ -587,6 +619,7 @@ export default {
|
|
|
expressRemark: this.bz,//快递备注
|
|
|
expressWeight: this.stepper,//公斤
|
|
|
expressPrice: this.declaredValue,//价值
|
|
|
+ addressee_phone: this.elvenPhone,//收件人手机号
|
|
|
}
|
|
|
const res = await saveMailDo({ ...parmas })
|
|
|
if (res.msg == 'success') {
|
|
@@ -600,7 +633,10 @@ export default {
|
|
|
computed: {
|
|
|
areaList() {
|
|
|
return areaList
|
|
|
- }
|
|
|
+ },
|
|
|
+ transmitMessageVlaue() {
|
|
|
+ return this.$store.state.transmitMessageVlaue;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -658,6 +694,19 @@ export default {
|
|
|
display: flex;
|
|
|
padding: .1rem 0rem;
|
|
|
|
|
|
+ .van-cell {
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+
|
|
|
+
|
|
|
+ .van-field__label.van-cell__title {
|
|
|
+ width: 0.2em !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
>p {
|
|
|
font-size: .24rem;
|
|
|
font-weight: bold;
|