Commit 853256cd by LJM

WMS--分货登记--增加美产提醒显示

parent 55fb5475
......@@ -26,7 +26,6 @@
}
}
.total-text {
margin-top: 15rpx;
justify-content: flex-end;
font-size: 16rpx;
color: #919399;
......@@ -84,7 +83,6 @@
}
}
.list {
margin-top: 15rpx;
padding-bottom: 150rpx;
flex-wrap: wrap;
.box {
......
......@@ -40,9 +40,12 @@
</view>
<view class="print-btn" @click="print()">打印入仓号</view>
</view>
<view class="total-text row" v-if="list.length > 0">
<view class="row"><text>{{total}}</text>条数据</view>
<view class="row" style="margin-left: 15rpx;"><text>{{erp_order_sn_num}}</text>个入仓号</view>
<view class="row bothSide verCente" style="margin: 15rpx 0;">
<view style="color: red;font-size: 16rpx;" v-show="contains_american_products">该包裹含有美产货物,请优先处理! </view>
<view class="total-text row" v-if="list.length > 0">
<view class="row"><text>{{total}}</text>条数据</view>
<view class="row" style="margin-left: 15rpx;"><text>{{erp_order_sn_num}}</text>个入仓号</view>
</view>
</view>
<!-- 列表数据 -->
<view class="list row bothSide" v-if="list.length > 0">
......@@ -59,7 +62,7 @@
<view class="wrap row verCente" style="margin-left: 24rpx;margin-top: 15rpx;">
<text class="t3" style="width: 228rpx;">{{item.goods_name}}</text>
<text class="t3" style="width: 150rpx">{{item.brand_name}}</text>
<text class="t3" style="width: 100rpx">{{item.origin}}</text>
<text class="t3" :style="item.origin === '美国' ? 'width: 100rpx; color: red;' : 'width: 100rpx'">{{item.origin}}</text>
<text class="t3" style="width: 100rpx">{{item.goods_num}}PCS</text>
</view>
</view>
......@@ -86,8 +89,11 @@
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">新增登记</text>
</view>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="label-title"><text style="color: red;">*</text>仓库:</view>
<view class="input-wrap column" style="margin-top: 20rpx;">
<view class="row bothSide verCente">
<view class="label-title"><text style="color: red;">*</text>仓库:</view>
<view style="color: red;font-size: 16rpx;font-weight: bold;" v-show="contains_american_products">该包裹含有美产货物,请优先处理! </view>
</view>
<view class="select-box row">
<picker @change="bindPickerChange($event,1)" :value="warehouse_index" :range="warehouse_arr" :range-key="'name'" style="width: 100%;">
<view class="row verCenter bothSide wrap">
......@@ -225,6 +231,7 @@
return {
img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统
noexebshowFalg: true, //控制是否会触发生命周期
contains_american_products: false, //是否含有美产货物
warehouse_arr: [],
warehouse_index: 0,
register_type: ['正常登记', '异常登记'],
......@@ -548,6 +555,9 @@
this.list = this.list.concat(res.data);
this.filter_list = createArray(this.list.length, false);
// 检查是否包含美国产地的商品
this.contains_american_products = this.list.some(item => item.origin === '美国');
this.erp_order_sn_num = new Set(res.data
.map(item => item.warehouse_receipt_sn)
.filter(Boolean)
......@@ -555,6 +565,7 @@
} else {
this.hasMoreData = false;
this.contains_american_products = false; // 无数据时重置美国产地标志
}
} else {
uni.showToast({
......@@ -790,35 +801,35 @@
let isValid = true;
let companyText = '';
// 校验“顺丰速运”
// 校验"顺丰速运"
if (logistics_company === '顺丰速运') {
if (!logistics_sn_arr.every(sn => sn.toLowerCase().startsWith('sf'))) {
isValid = false;
companyText = '物流公司为“顺丰速运”时,填写的物流单号需全部为“SF”开头';
companyText = '物流公司为"顺丰速运"时,填写的物流单号需全部为"SF"开头';
}
}
// 校验“UPS”
// 校验"UPS"
if (logistics_company === 'UPS') {
if (!logistics_sn_arr.every(sn => sn.toLowerCase().startsWith('1z'))) {
isValid = false;
companyText = '物流公司为“UPS”时,填写的物流单号需全部为“1Z”开头';
companyText = '物流公司为"UPS"时,填写的物流单号需全部为"1Z"开头';
}
}
// 校验“联邦快递”
// 校验"联邦快递"
if (logistics_company === '联邦快递') {
if (!logistics_sn_arr.every(sn => /^\d{12}$/.test(sn))) {
isValid = false;
companyText = '物流公司为“联邦快递”时,填写的物流单号需全部为数字开头且12位';
companyText = '物流公司为"联邦快递"时,填写的物流单号需全部为数字开头且12位';
}
}
// 校验“DHL国际快递”
// 校验"DHL国际快递"
if (logistics_company === 'DHL国际快递') {
if (!logistics_sn_arr.every(sn => /^\d{10}$/.test(sn))) {
isValid = false;
companyText = '物流公司为“DHL国际快递”时,填写的物流单号需全部为数字开头且10位';
companyText = '物流公司为"DHL国际快递"时,填写的物流单号需全部为数字开头且10位';
}
}
......@@ -914,6 +925,7 @@
this.filter_id = [];
this.list = [];
this.page = 1;
this.contains_american_products = false; // 重置美国产地标志
},
/**
* 再次获取焦点
......
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 sign in to comment