|
@@ -45,6 +45,7 @@
|
|
|
</div>
|
|
|
<div class="address_text" v-else>{{ transmitMessageVlaue.addresseeProvince }}{{
|
|
|
transmitMessageVlaue.addresseeCity }}{{ transmitMessageVlaue.addresseeCounty }}{{
|
|
|
+ transmitMessageVlaue.addresseeTown }}{{
|
|
|
transmitMessageVlaue.addresseeAddrInfo }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -167,7 +168,6 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="adderMessage">
|
|
|
- <p style="font-size: 16px;text-align: center;margin-bottom: 16px;">{{ title }}</p>
|
|
|
<van-form @submit="onSubmit">
|
|
|
<van-field v-model="discern.name" name="姓名" label="姓名" placeholder="自动填充"
|
|
|
:rules="[{ required: false }]" />
|
|
@@ -194,11 +194,7 @@
|
|
|
<van-picker title="付款方式" show-toolbar :columns="pricelist" @confirm="onConfirm2"
|
|
|
@cancel="priceshow = false" />
|
|
|
</van-popup>
|
|
|
- <!-- 弹窗地址类型类型 -->
|
|
|
- <van-popup v-model="addressshow" position="bottom">
|
|
|
- <van-picker title="邮购类型" show-toolbar :columns="addlist" @confirm="onConfirm8"
|
|
|
- @cancel="addressshow = false" />
|
|
|
- </van-popup>
|
|
|
+
|
|
|
|
|
|
<!-- 打印机选择器 -->
|
|
|
<van-popup v-model="printerShow" position="bottom">
|
|
@@ -215,13 +211,11 @@
|
|
|
import areaList from "@/script/areas.js"
|
|
|
import { Toast } from 'vant';
|
|
|
import { saveMailDo, getSendInfo, geLogisticsList, getListOfPrinters, } from '../api/index'
|
|
|
-import { spiltAddress, editUserAddressInfoById } from '../api/addressBoook'
|
|
|
+import { spiltAddress } from '../api/addressBoook'
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- qweqwe: '',
|
|
|
- titlename: "寄件",
|
|
|
wptype: "物品",//物品类型
|
|
|
addresstype: "顾客邮购",//地址类型
|
|
|
youGouType: "",//邮购类型
|
|
@@ -235,8 +229,6 @@ export default {
|
|
|
max: '',//最大数
|
|
|
priceshow: false,//付款类型弹窗显示
|
|
|
pricelist: ["到付", "自费(个人件)", "月结(公司件)",],
|
|
|
- index: "",
|
|
|
- title: "",
|
|
|
check: false,//契约条款
|
|
|
bz: '',//快递备注
|
|
|
showPicker: false,//快递
|
|
@@ -251,9 +243,7 @@ export default {
|
|
|
waybillNo: '',//运单号
|
|
|
wayShow: true,
|
|
|
accountType: '',//账号类型
|
|
|
- showPicker9: false,
|
|
|
costCenterList: [],//成本中心列表
|
|
|
- costCenterInfoShow: "",
|
|
|
costCenterName: "",//成本中心展示
|
|
|
costCenterId: "",//成本中心展示
|
|
|
elvenPhone: '',//收件人输入的手机号
|
|
@@ -277,6 +267,7 @@ export default {
|
|
|
proDisTown: '',
|
|
|
},//识别后的信息
|
|
|
disabled: false,//确定按钮的使用
|
|
|
+ isAddressIdTransfer: false,//是否传送地址铺的Id
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
@@ -290,8 +281,10 @@ export default {
|
|
|
} else {
|
|
|
this.SendInfoValue = res
|
|
|
}
|
|
|
-
|
|
|
- console.log(this.SendInfoValue, 'this.SendInfoValue')
|
|
|
+ // 当从地址铺回来时将this.isAddressIdTransfer状态改变
|
|
|
+ if (this.transmitMessageVlaue.isAddressIdTransfer) {
|
|
|
+ this.isAddressIdTransfer = this.transmitMessageVlaue.isAddressIdTransfer
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
// 运单号扫描
|
|
@@ -422,21 +415,21 @@ export default {
|
|
|
this.transmitMessageVlaue.addresseeName = this.discern.name
|
|
|
this.transmitMessageVlaue.addresseePhone = this.discern.phone
|
|
|
|
|
|
- this.discern = {
|
|
|
- name: '',
|
|
|
- phone: '',
|
|
|
- province: '',
|
|
|
- city: '',
|
|
|
- district: '',
|
|
|
- town: '',
|
|
|
- address: '',
|
|
|
- proDisTown: '',
|
|
|
- }
|
|
|
+ this.isAddressIdTransfer = false,//修改了收件人的信息,地址铺Id不传
|
|
|
+ this.discern = {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ province: '',
|
|
|
+ city: '',
|
|
|
+ district: '',
|
|
|
+ town: '',
|
|
|
+ address: '',
|
|
|
+ proDisTown: '',
|
|
|
+ }
|
|
|
this.discernMessage = ''
|
|
|
|
|
|
},
|
|
|
|
|
|
-
|
|
|
// 财务核销码哦icon扫描
|
|
|
async vxSearchIcon() {
|
|
|
console.log('123')
|
|
@@ -460,7 +453,6 @@ export default {
|
|
|
// 快递公司
|
|
|
async geLogisticsListAPIList() {
|
|
|
const res = await geLogisticsList({})
|
|
|
- console.log(res, '======================')
|
|
|
this.columns = res.list.map((item) => {
|
|
|
return {
|
|
|
id: item.id,
|
|
@@ -470,26 +462,10 @@ export default {
|
|
|
},
|
|
|
// 选择快递公司
|
|
|
onConfirm(e) {
|
|
|
- console.log(e, '=============')
|
|
|
this.expressInfoShow = e.expresCompanyName
|
|
|
this.expressInfo = e.id
|
|
|
this.showPicker = false
|
|
|
},
|
|
|
-
|
|
|
- // 选择成本中心
|
|
|
- onConfirm9(e) {
|
|
|
- this.costCenterInfoShow = e.text
|
|
|
- this.costCenterId = e.id
|
|
|
- this.costCenterName = e.costCenterName
|
|
|
- this.showPicker9 = false
|
|
|
- console.log("costCenterId:" + this.costCenterId)
|
|
|
- console.log("costCenterName:" + this.costCenterName)
|
|
|
- },
|
|
|
-
|
|
|
- onConfirm0(e) {
|
|
|
- this.mainType = e
|
|
|
- this.showPicker2 = false
|
|
|
- },
|
|
|
// 选择物品确定
|
|
|
onConfirm1(e) {//确定
|
|
|
this.wptype = e
|
|
@@ -500,17 +476,17 @@ export default {
|
|
|
this.pricetype = e
|
|
|
this.priceshow = false
|
|
|
},
|
|
|
- // 填写地址类型确定
|
|
|
- onConfirm8(e) {//确定
|
|
|
- this.addresstype = e
|
|
|
- this.addressshow = false
|
|
|
- },
|
|
|
// 地址簿跳转
|
|
|
link(obj) {
|
|
|
this.$router.push({ path: '/Myaddressbook', query: { active: obj } })
|
|
|
+ // this.isAddressIdTransfer = true //进入地址铺了,传递
|
|
|
},
|
|
|
//立即寄件交互
|
|
|
async save() {
|
|
|
+ if (this.SendInfoValue.name == '' || this.SendInfoValue.name == undefined) {
|
|
|
+ Toast('寄件人姓名不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.SendInfoValue.phone == '' || this.SendInfoValue.phone == undefined) {
|
|
|
Toast('寄件人手机号不能为空')
|
|
|
return
|
|
@@ -594,15 +570,14 @@ export default {
|
|
|
}
|
|
|
return
|
|
|
},
|
|
|
-
|
|
|
+ // 打印机确认
|
|
|
async onPrinter(e) {
|
|
|
this.printerName = e.printerName;
|
|
|
this.printerId = e.id;
|
|
|
await this.shipServe(e.id)
|
|
|
},
|
|
|
-
|
|
|
+ // 寄件
|
|
|
async shipServe(printId) {
|
|
|
- //先走基础打印
|
|
|
const $toast = Toast.loading({
|
|
|
message: '保存中...',
|
|
|
forbidClick: true,
|
|
@@ -624,7 +599,7 @@ export default {
|
|
|
}
|
|
|
let parmas = {
|
|
|
expressInfo: this.expressInfo,//快递公司1-顺丰
|
|
|
- userAddressId: this.transmitMessageVlaue.id,
|
|
|
+ userAddressId: this.isAddressIdTransfer == false ? '' : this.transmitMessageVlaue.id,//收发室ID
|
|
|
// userAddressId: 'ede4f065286a406dbb82064ec7524b4e',
|
|
|
expressType: wptypeValue,//快件类型 1-文件 2-物品
|
|
|
expressNum: this.stepper, //快递数量
|
|
@@ -632,11 +607,17 @@ export default {
|
|
|
expressRemark: this.bz,//快递备注
|
|
|
expressWeight: this.Kilogram,//公斤
|
|
|
expressPrice: this.declaredValue,//价值
|
|
|
+ name: this.SendInfoValue.name,//寄件人姓名
|
|
|
phone: this.SendInfoValue.phone,//寄件人手机号
|
|
|
addresseeName: this.transmitMessageVlaue.addresseeName,//收件人姓名
|
|
|
addresseePhone: this.transmitMessageVlaue.addresseePhone,//收件人手机号
|
|
|
+ addresseeProvince: this.transmitMessageVlaue.addresseeProvince,//省
|
|
|
+ addresseecity: this.transmitMessageVlaue.addresseeCity,//s市
|
|
|
+ addresseeCounty: this.transmitMessageVlaue.addresseeCounty,//区
|
|
|
+ addresseeTown: this.transmitMessageVlaue.addresseeTown,//镇
|
|
|
+ addresseeAddrInfo: this.transmitMessageVlaue.addresseeAddrInfo,//详细地址
|
|
|
verificationCode: this.authorization, //财务核销码
|
|
|
- printId: printId
|
|
|
+ printId: printId,//打印机ID
|
|
|
}
|
|
|
const res = await saveMailDo({ ...parmas })
|
|
|
if (res.msg == 'success') {
|
|
@@ -758,7 +739,7 @@ export default {
|
|
|
text-align: center;
|
|
|
border-left: .01rem solid #ededed;
|
|
|
padding-left: .2rem;
|
|
|
- width: 42px;
|
|
|
+ width: 50px;
|
|
|
|
|
|
img {
|
|
|
width: .39rem;
|