|
@@ -108,8 +108,6 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
<div class="type_price" v-show="this.accountType == 1">
|
|
|
<div>
|
|
|
<p>邮购类型</p>
|
|
@@ -117,19 +115,27 @@
|
|
|
<p v-else @click="addressshow = true">{{ addresstype }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 备注 -->
|
|
|
<div class="bz">
|
|
|
<div>
|
|
|
- <van-field v-model="bz" name="备注" label="备注" placeholder="包装运输等要求" />
|
|
|
+ <van-field style="font-size: 16px;" v-model="bz" name="备注" label="备注" placeholder="包装运输等要求" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 授权码 -->
|
|
|
+ <div class="az">
|
|
|
+ <van-field style="font-size: 16px;" v-model="authorization" name="authorization" label="授权码"
|
|
|
+ placeholder="请输入授权码" />
|
|
|
+ <img @click="vxSearchIcon" src="../assets/images/sm.png" alt="">
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 我同意 -->
|
|
|
<div class="check">
|
|
|
<van-checkbox icon-size=".24rem" v-model="check" shape="">我同意《电子运单契约条款》</van-checkbox>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- 寄件 -->
|
|
|
<div class="btn-jj">
|
|
|
<van-button type="info" color="#00c4b8" @click="save()">立即寄件</van-button>
|
|
@@ -149,27 +155,6 @@
|
|
|
<van-picker title="邮购类型" show-toolbar :columns="addlist" @confirm="onConfirm8"
|
|
|
@cancel="addressshow = false" />
|
|
|
</van-popup>
|
|
|
- <!-- 填写地址 -->
|
|
|
- <van-popup round v-model="addshow" class="whrite_add" closeable @closed="close" :close-on-click-overlay="false">
|
|
|
- <div>
|
|
|
- <p style="font-size: 16px;text-align: center;margin-bottom: 16px;">{{ title }}</p>
|
|
|
- <van-form @submit="onSubmit">
|
|
|
- <van-field v-model="name" name="姓名" label="姓名" placeholder="请输入姓名" :rules="[{ required: false }]" />
|
|
|
- <van-field v-model="phone" maxlength="11" type="number" name="手机" label="手机" placeholder="请输入手机"
|
|
|
- :rules="[{ required: false }]" />
|
|
|
- <van-field v-model="telPhone" maxlength="20" type="text" name="座机" label="座机" placeholder="请输入座机"
|
|
|
- :rules="[{ required: false }]" />
|
|
|
- <van-field readonly clickable name="area" :value="city" label="省市区" placeholder="请选择省市区"
|
|
|
- @click="areashow = true" :rules="[{ required: false }]" />
|
|
|
- <van-field v-model="address" maxlength="50" name="详细地址" label="详细地址" placeholder="请输入详细地址"
|
|
|
- :rules="[{ required: false }]" />
|
|
|
- <div style="margin-top: 16px;">
|
|
|
- <van-button color="#00c4b8" block type="info" native-type="submit">确定</van-button>
|
|
|
- </div>
|
|
|
- </van-form>
|
|
|
- </div>
|
|
|
-
|
|
|
- </van-popup>
|
|
|
<!-- 城市选择 -->
|
|
|
<van-popup v-model="areashow" position="bottom">
|
|
|
<van-area :area-list="areaList" @confirm="onConfirm3" @cancel="areashow = false" />
|
|
@@ -179,7 +164,7 @@
|
|
|
|
|
|
<script>
|
|
|
import areaList from "@/script/areas.js"
|
|
|
-import { Stepper, Toast } from 'vant';
|
|
|
+import { Toast } from 'vant';
|
|
|
import { saveMailDo, getSendInfo, geLogisticsList } from '../api/index'
|
|
|
export default {
|
|
|
|
|
@@ -196,7 +181,7 @@ export default {
|
|
|
pricetype: "月结(公司件)",//付款类型
|
|
|
stepper: '',//件数
|
|
|
Kilogram: '',//公斤
|
|
|
- max: '',
|
|
|
+ max: '',//最大数
|
|
|
priceshow: false,//付款类型弹窗显示
|
|
|
pricelist: ["到付", "自费(个人件)", "月结(公司件)",],
|
|
|
addshow: false,
|
|
@@ -204,25 +189,18 @@ export default {
|
|
|
phone: "",
|
|
|
telPhone: '',
|
|
|
city: "",
|
|
|
- address: "",
|
|
|
+ address: "",//详细地址
|
|
|
areashow: false,
|
|
|
index: "",
|
|
|
title: "",
|
|
|
- jjname: "",
|
|
|
- jjadd: "",
|
|
|
- sjname: "",
|
|
|
- sjadd: "",
|
|
|
- bz: "",
|
|
|
check: false,
|
|
|
- userId: '',
|
|
|
+ bz: '',//快递备注
|
|
|
showPicker: false,//快递
|
|
|
expressInfoShow: "",//快递公司展示
|
|
|
expressPhone: "",//快递公司电话传值
|
|
|
expressInfo: "",//快递公司传值
|
|
|
columns: [],//快递公司列表
|
|
|
columns2: ["个人件", "公司件"],
|
|
|
- jjInfo: {},
|
|
|
- sjInfo: {},
|
|
|
// transmitMessageVlaue: {},
|
|
|
declaredValue: '0', //声明价值
|
|
|
showPicker2: false,
|
|
@@ -239,11 +217,11 @@ export default {
|
|
|
elvenPhone: '',//收件人输入的手机号
|
|
|
pattern: /^\d{11}$/,
|
|
|
SendInfoValue: {},//寄件人信息
|
|
|
+ authorization: '',//授权码
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
|
this.isLogin();
|
|
|
- this.userId = localStorage.getItem("userId")
|
|
|
this.accountType = localStorage.getItem("accountType")
|
|
|
console.log("accountType:" + this.accountType)
|
|
|
// if (this.accountType == '1') {
|
|
@@ -262,27 +240,10 @@ export default {
|
|
|
async mounted() {
|
|
|
this.SendInfoValue = await getSendInfo({ userId: localStorage.getItem("userId") })
|
|
|
console.log(this.SendInfoValue, 'this.SendInfoValue')
|
|
|
- this.geLogisticsListAPIList()
|
|
|
},
|
|
|
methods: {
|
|
|
- async geLogisticsListAPIList() {
|
|
|
- const res = await geLogisticsList({ page: 1, limit: 30 })
|
|
|
- console.log(res, '+==============res')
|
|
|
- this.columns = res.data.map((item) => {
|
|
|
- return {
|
|
|
- id: item.id,
|
|
|
- expressCompany: item.expressCompany
|
|
|
- }
|
|
|
- })
|
|
|
- console.log(this.columns, 'this.columns+=================')
|
|
|
- },
|
|
|
-
|
|
|
+ // 运单号扫描
|
|
|
wxScanCode(type) {
|
|
|
- // let purl = /(Android)/i.test(navigator.userAgent) ? window.location.href.split('#')[0] : encodeURI(window.location.href.split('#')[0]);
|
|
|
- // let dataForm = {
|
|
|
- // 'url': purl
|
|
|
- // }
|
|
|
- //alert(purl)
|
|
|
let wx = this.$wx;
|
|
|
this.$http.post(this.$store.state.host + "/weixin/getWxConfig", {
|
|
|
url: window.location.href.split('#')[0]
|
|
@@ -335,6 +296,28 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ // 授权码哦icon扫描
|
|
|
+ vxSearchIcon() {
|
|
|
+ console.log('123')
|
|
|
+ wx.scanQRCode({
|
|
|
+ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
|
|
+ scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
|
|
|
+ success: (res) => {
|
|
|
+ //alert(res)
|
|
|
+ console.log(res, '==============')
|
|
|
+ var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
|
|
|
+ if (result.indexOf(",") != -1) {
|
|
|
+ let result1 = res.resultStr.split(",");
|
|
|
+ result = result1[result1.length - 1];
|
|
|
+ }
|
|
|
+ this.authorization = value
|
|
|
+ },
|
|
|
+ error: function (res) {
|
|
|
+ console.log(res, 'error++++++++++');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 选择快递公司
|
|
|
onConfirm(e) {
|
|
|
console.log(e, '=============')
|
|
@@ -393,76 +376,6 @@ export default {
|
|
|
}
|
|
|
this.addshow = true
|
|
|
},
|
|
|
- // 填写地址确定
|
|
|
- // onSubmit() {
|
|
|
-
|
|
|
- // if (this.name == '' || this.name == undefined) {
|
|
|
- // Toast('请填写姓名')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // // if(this.phone == '' || this.phone == undefined ){
|
|
|
- // // Toast('请填写手机')
|
|
|
- // // return
|
|
|
- // // }
|
|
|
- // // let regPhone = new RegExp(this.$store.state.regPhone)
|
|
|
- // // if(!regPhone.test(this.phone)){
|
|
|
- // // Toast('手机号格式不正确')
|
|
|
- // // return
|
|
|
- // // }
|
|
|
-
|
|
|
- // if ((this.phone == '' || this.phone == undefined) && (this.telPhone == '' || this.telPhone == undefined)) {
|
|
|
- // Toast('请填写手机号或者座机号')
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.phone != '' && this.phone != undefined) {
|
|
|
- // let regPhone = new RegExp(this.$store.state.regPhone)
|
|
|
- // if (!regPhone.test(this.phone)) {
|
|
|
- // Toast('手机号格式不正确')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.city == '' || this.city == undefined) {
|
|
|
- // Toast('请选择省市区')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (this.address == '' || this.address == undefined) {
|
|
|
- // Toast('请填写详细地址')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (this.index == 1) {
|
|
|
- // this.jjname = this.name + ' ' + this.phone
|
|
|
- // this.jjadd = this.city + ' ' + this.address
|
|
|
- // this.jjInfo.jjname = this.jjname
|
|
|
- // this.jjInfo.jjadd = this.jjadd
|
|
|
- // this.jjInfo.sender = this.name
|
|
|
- // this.jjInfo.senderPhone = this.phone
|
|
|
- // this.jjInfo.senderMobile = this.telPhone
|
|
|
- // this.jjInfo.sendAddr = this.city
|
|
|
- // this.jjInfo.sendAddress = this.address
|
|
|
- // this.$store.commit("getJjInfo", this.jjInfo)
|
|
|
- // }
|
|
|
- // if (this.index == 2) {
|
|
|
- // this.sjname = this.name + ' ' + this.phone
|
|
|
- // this.sjadd = this.city + ' ' + this.address
|
|
|
- // this.sjInfo.sjname = this.sjname
|
|
|
- // this.sjInfo.sjadd = this.sjadd
|
|
|
- // this.sjInfo.receiver = this.name
|
|
|
- // this.sjInfo.receiverPhone = this.phone
|
|
|
- // this.sjInfo.receiveMobile = this.telPhone
|
|
|
- // this.sjInfo.receiveAddr = this.city
|
|
|
- // this.sjInfo.receiveAddress = this.address
|
|
|
- // this.$store.commit("getSjInfo", this.sjInfo)
|
|
|
- // }
|
|
|
-
|
|
|
- // this.addshow = false
|
|
|
- // this.name = ""
|
|
|
- // this.phone = ""
|
|
|
- // this.telPhone = ""
|
|
|
- // this.city = ""
|
|
|
- // this.address = ""
|
|
|
- // },
|
|
|
close() {
|
|
|
this.name = ""
|
|
|
this.phone = ""
|
|
@@ -827,16 +740,42 @@ export default {
|
|
|
}
|
|
|
|
|
|
.bz {
|
|
|
- margin-top: -0.53rem;
|
|
|
- padding: .33rem;
|
|
|
- font-size: .3rem;
|
|
|
+ // margin-top: -0.53rem;
|
|
|
+ padding: 0 .33rem;
|
|
|
+ font-size: 16px;
|
|
|
+
|
|
|
+ /deep/.van-field__value {
|
|
|
+
|
|
|
+ input {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .az {
|
|
|
+ margin: 0px .33rem;
|
|
|
+ font-size: 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ background-color: #fff;
|
|
|
+
|
|
|
+
|
|
|
+ // position: absolute;
|
|
|
|
|
|
/deep/.van-field__value {
|
|
|
+
|
|
|
input {
|
|
|
text-align: right;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: .4rem;
|
|
|
+ height: .4rem;
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.check {
|
|
@@ -854,7 +793,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.btn-jj {
|
|
|
- padding: .33rem;
|
|
|
+ padding: 0 .33rem .33rem;
|
|
|
|
|
|
button {
|
|
|
width: 100%;
|