Commit 68b4acc7 by LJM

add

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