Commit 9337fa34 authored by yujinyao's avatar yujinyao

Merge branch 'dev' of...

Merge branch 'dev' of http://110.41.143.128:8081/lanbaoming/jiedao-app-operator-master into yujinyao
parents ada79867 945e091f
......@@ -5,7 +5,7 @@
<div id="myproa">
<p style="padding-bottom:10px;font-size:16px;">
{{$t('订单号')}}{{detail.orderNo}}
&nbsp;&nbsp;&nbsp;{{$t('发货人电话')}}{{detail.consignorVO.countryCode}} {{detail.consignorVO.phone}}
&nbsp;&nbsp;&nbsp;{{$t('发货人电话')}}+{{detail.consignorVO.countryCode}} {{detail.consignorVO.phone|maskPhoneNumber}}
&nbsp;&nbsp;&nbsp;{{$t('提货地点')}}{{$l(objective, 'title')}}
<img :src="qrcode" style="margin-left: 10px;width:17mm;vertical-align:middle" />
</p>
......@@ -111,7 +111,23 @@ import {getOrderWarehouseIn, getOrderDetail} from '@/api/ecw/order'
import qrcode from 'qrcode'
import Decimal from 'decimal.js'
export default {
filters: {parseTime},
filters: {
parseTime,
maskPhoneNumber(phoneNumber) {
const length = phoneNumber.length;
if (length <= 5) {
return phoneNumber.slice(0, -3) + '*'.repeat(Math.min(3, length));
}
const mid = Math.floor(length / 2);
const offset = length % 2 === 0 ? 2 : 3;
const start = mid - offset;
const end = mid + 3;
return phoneNumber.slice(0, start) + '*'.repeat(5) + phoneNumber.slice(end);
}
},
components: { },
props:{
orderId: [String, Number]
......
......@@ -775,22 +775,22 @@ export default {
},
computed:{
rules(){
return {
const rules = {
marks: [
{required: true, message: this.$t('请填写唛头')},
{
validator: (rule, value, callback) => {
/* 20240823 新需求:唛头数据校验修改成字母+数字组合,去掉原必须字母开头的限制
if(!/[a-zA-Z]/.test(value.charAt(0))){
return callback(new Error(this.$t('唛头必须以字母开头')))
} */
// 必须是字母和数字
let reg = /^[a-zA-Z0-9]*$/;
if (!reg.test(value)) {
return callback(new Error(this.$t('唛头只能是字母和数字')));
}
callback()
},
trigger: 'blur'
}
],
consignorContactsId : [{required: true, message: this.$t('发货人不能为空')}],
consigneeContactsId : [{required: true, message: this.$t('收货人不能为空')}],
transportId : [{required: true, message: this.$t('请选择运输方式')}],
departureId : [{required: true, message: this.$t('请选择始发城市')}],
objectiveId : [{required: true, message: this.$t('请选择目的城市')}],
......@@ -806,6 +806,11 @@ export default {
warehouseType : [{required: true, message: this.$t('请选择入仓类型')}],
harvestMethod : [{required: true, message: this.$t('请选择收货方式')}]
}
// 有收货人则添加收货人校验
if(this.hasConsignee){
rules.consigneeContactsId = [{required: true, message: this.$t('收货人不能为空')}]
}
return rules
},
// 是否已完成入仓
inWarehouse(){
......@@ -1342,11 +1347,17 @@ export default {
this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName)
this.$set(this.form, this.contactChooseType + 'NameEn', contact.contactsNameEn||'')
this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew)
this.noConsignee = contact.noConsignee
// 如果发货人不允许无收货人,则重置为有收货人
if(!this.noConsignee && !this.hasConsignee){
this.$set(this, 'hasConsignee', true)
if(this.contactChooseType == 'consignor'){
this.noConsignee = contact.noConsignee
// 如果允许无收货人,则默认无收货人、控货
if(this.noConsignee){
this.hasConsignee = false
}
// 如果发货人不允许无收货人,则重置为有收货人
if(!this.noConsignee && !this.hasConsignee){
this.$set(this, 'hasConsignee', true)
}
}
this.contactChooseType = null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment