Commit 68b4acc7 by LJM

add

parent 9c63edce
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="btn row rowCenter verCenter"> <view class="btn row rowCenter verCenter" style="position: absolute;bottom: 0;left: 0;">
<view class="row btn2 row rowCenter verCenter" style="width:50%" @click="closeDrawer()">取消</view> <view class="row btn2 row rowCenter verCenter" style="width:50%" @click="closeDrawer()">取消</view>
<view class="row btn1 row rowCenter verCenter" style="width:50%" @click="print(true)">打印</view> <view class="row btn1 row rowCenter verCenter" style="width:50%" @click="print(true)">打印</view>
</view> </view>
...@@ -668,38 +668,52 @@ ...@@ -668,38 +668,52 @@
* 匹配规则 * 匹配规则
*/ */
ruleChange() { ruleChange() {
var upperShipmentNumber = this.list[0].shipment_number; let shipping_name_match = this.list.length > 0 ? this.list[0].shipping_name : '';
//选择了其他物流,货品名称按钮 //选择了其他物流,货品名称按钮
if (this.index == 0 || this.index == 1) { if (this.index == 0 || this.index == 1) {
var shipment_number = ''; //物流单号 var shipment_number = ''; //物流单号
if (this.index == 0) { if (this.index == 0) {
//其他物流
upperShipmentNumber = upperShipmentNumber.toUpperCase(); // 转换为大写以便不区分大小写比较
shipment_number = this.searchParams.shipment_number; shipment_number = this.searchParams.shipment_number;
} }
if (this.index == 1) { if (this.index == 1) {
//货品名称
upperShipmentNumber = upperShipmentNumber.toUpperCase(); // 转换为大写以便不区分大小写比较
shipment_number = this.searchParams.goods_name; shipment_number = this.searchParams.goods_name;
} }
if (upperShipmentNumber.startsWith('SF')) {
// A、物流单号为"SF"开头(不区分大小写),则自动选择物流公司为"顺丰速运" // 定义一个对象来映射物流公司和其对应的处理逻辑
this.logistics_company_index = this.logistics_company.findIndex(company => company === '顺丰速运'); const logisticsMapping = {
this.formParams.logistics_company = '顺丰速运'; '顺丰速运': '顺丰速运',
this.logistics_sn = shipment_number + '\n'; 'UPS': 'UPS',
} else if (upperShipmentNumber.startsWith('1Z')) { '联邦快递': '联邦快递',
// B、物流单号为"1Z"开头(不区分大小写),则自动选择物流公司为"UPS" 'DHL国际快递': 'DHL国际快递',
this.logistics_company_index = this.logistics_company.findIndex(company => company === 'UPS'); '供应商配送': '供应商配送',
this.formParams.logistics_company = 'UPS'; '快递送货': '快递送货',
this.logistics_sn = shipment_number + '\n'; '韵达快递': '韵达快递',
} else { '速尔快递': '速尔快递',
//如果未识别到,则不更新物流公司 物流单号也清空 'TNT快递': 'TNT快递',
this.logistics_sn = shipment_number + '\n'; '自提': '自提',
'京东快递': '京东快递',
'优速物流': '优速物流',
'顺丰特惠': '顺丰特惠',
'Air': 'Air',
'其他': '其他'
};
const matchedCompany = logisticsMapping[shipping_name_match];
if (matchedCompany) {
this.logistics_company_index = this.logistics_company.findIndex(company => company === matchedCompany);
this.formParams.logistics_company = matchedCompany;
} }
// 物流单号不论是否匹配都需要更新
this.formParams.logistics_sn = shipment_number;
this.logistics_sn = shipment_number + '\n';
} else if (this.index == 2) { } else if (this.index == 2) {
//选择了fedex弹窗则自动选中联邦快递 //选择了fedex弹窗则自动选中联邦快递
this.logistics_company_index = this.logistics_company.findIndex(company => company === '联邦快递');; this.logistics_company_index = this.logistics_company.findIndex(company => company === '联邦快递');;
this.formParams.logistics_company = '联邦快递'; this.formParams.logistics_company = '联邦快递';
this.formParams.logistics_sn = this.searchParams.shipment_number; //赋值表单里的值
this.logistics_sn = this.searchParams.shipment_number + '\n'; //注意这里是搜索的fedex 已经截取了的数据 this.logistics_sn = this.searchParams.shipment_number + '\n'; //注意这里是搜索的fedex 已经截取了的数据
} }
}, },
......
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统 // const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统 // const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统 // const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统 // const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统 const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统 const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统 const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = { const API = {
......
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