Commit 06a52e3f authored by dragondean@qq.com's avatar dragondean@qq.com Committed by 332784038@qq.com

入仓单电话脱敏

parent 2d4f54e2
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div id="myproa"> <div id="myproa">
<p style="padding-bottom:10px;font-size:16px;"> <p style="padding-bottom:10px;font-size:16px;">
{{$t('订单号')}}{{detail.orderNo}} {{$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')}} &nbsp;&nbsp;&nbsp;{{$t('提货地点')}}{{$l(objective, 'title')}}
<img :src="qrcode" style="margin-left: 10px;width:17mm;vertical-align:middle" /> <img :src="qrcode" style="margin-left: 10px;width:17mm;vertical-align:middle" />
</p> </p>
...@@ -111,7 +111,23 @@ import {getOrderWarehouseIn, getOrderDetail} from '@/api/ecw/order' ...@@ -111,7 +111,23 @@ import {getOrderWarehouseIn, getOrderDetail} from '@/api/ecw/order'
import qrcode from 'qrcode' import qrcode from 'qrcode'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
export default { 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: { }, components: { },
props:{ props:{
orderId: [String, Number] orderId: [String, Number]
......
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