|
@@ -393,6 +393,8 @@ import {
|
|
|
getListOfPrinters
|
|
|
} from "../api/index";
|
|
|
import { spiltAddress } from "../api/addressBoook";
|
|
|
+import { Decrypt, getUrlParam } from '../utils/utils.js'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -412,18 +414,18 @@ export default {
|
|
|
check: false, //契约条款
|
|
|
bz: "", //快递备注
|
|
|
showPicker: false, //快递
|
|
|
- expressInfoShow: "顺丰快递", //快递公司展示
|
|
|
+ expressInfoShow: "京东快递", //快递公司展示
|
|
|
expressPhone: "", //快递公司电话传值
|
|
|
- expressInfo: "1", //快递公司传值
|
|
|
+ expressInfo: "2", //快递公司传值
|
|
|
columns: [], //快递公司列表
|
|
|
mailingTypeCol: [
|
|
|
- { value: "顺丰特快", id: 1 },
|
|
|
{ value: "顺丰标快", id: 2 },
|
|
|
+ { value: "顺丰特快", id: 1 },
|
|
|
{ value: "港澳台寄件", id: 2 }
|
|
|
], //港澳列表
|
|
|
isMailingType: false, //港澳弹窗
|
|
|
- mailingTypeVlaue: "顺丰特快", //港澳选择的值
|
|
|
- mailingTypeId: 1, //传给后端的id
|
|
|
+ mailingTypeVlaue: "顺丰标快", //港澳选择的值
|
|
|
+ mailingTypeId: 2, //传给后端的id
|
|
|
columns2: ["个人件", "公司件"],
|
|
|
declaredValue: "0", //声明价值
|
|
|
showPicker2: false,
|
|
@@ -699,13 +701,13 @@ export default {
|
|
|
},
|
|
|
// 选择快递公司
|
|
|
onConfirm(e) {
|
|
|
- this.transmitMessageVlaue.addresseeProvince = "";
|
|
|
- this.transmitMessageVlaue.addresseeCity = "";
|
|
|
- this.transmitMessageVlaue.addresseeCounty = "";
|
|
|
- this.transmitMessageVlaue.addresseeName = "";
|
|
|
- this.transmitMessageVlaue.addresseePhone = "";
|
|
|
- this.transmitMessageVlaue.addresseeTown = "";
|
|
|
- this.transmitMessageVlaue.addresseeAddrInfo = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeProvince = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeCity = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeCounty = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeName = "";
|
|
|
+ // this.transmitMessageVlaue.addresseePhone = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeTown = "";
|
|
|
+ // this.transmitMessageVlaue.addresseeAddrInfo = "";
|
|
|
|
|
|
this.expressInfoShow = e.expresCompanyName;
|
|
|
this.expressInfo = e.id;
|
|
@@ -820,7 +822,6 @@ export default {
|
|
|
if (getPrinters.code == 0) {
|
|
|
if (getPrinters.data.length == []) {
|
|
|
this.shipServe();
|
|
|
- Toast("没有打印机");
|
|
|
} else {
|
|
|
this.getPrintersList = getPrinters.data.map(item => {
|
|
|
return { printerName: item.printerName, id: item.id };
|
|
@@ -894,15 +895,33 @@ export default {
|
|
|
waybillNo: this.waybillNo, // 运单号
|
|
|
expressTypeId: this.mailingTypeId //快递类型的id
|
|
|
};
|
|
|
+
|
|
|
+ if(getUrlParam('posParams')){
|
|
|
+ try{
|
|
|
+ let posParams = getUrlParam('posParams')
|
|
|
+ posParams = Decrypt(posParams)
|
|
|
+ posParams = JSON.parse(posParams)
|
|
|
+ parmas.orderNo = posParams.orderId;
|
|
|
+ parmas.posParams = posParams.posParams;
|
|
|
+ }catch(err){
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
+ }
|
|
|
const res = await saveMailDo({ ...parmas });
|
|
|
if (res.msg == "success") {
|
|
|
- Toast("寄件成功");
|
|
|
- this.$router.push("/");
|
|
|
+ this.$toast("寄件成功");
|
|
|
+ setTimeout(()=>{
|
|
|
+ $toast.clear();
|
|
|
+ this.$router.push("/");
|
|
|
+ },1000)
|
|
|
} else {
|
|
|
// this.$toast(res.error)
|
|
|
- this.$toast(res.msg);
|
|
|
+ this.$toast(res.msg || '下单失败');
|
|
|
+ setTimeout(()=>{
|
|
|
+ $toast.clear();
|
|
|
+ },1000)
|
|
|
}
|
|
|
- $toast.clear();
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|