Commit 9c63edce by LJM

bug

parent 54c5368b
...@@ -668,38 +668,39 @@ ...@@ -668,38 +668,39 @@
* 匹配规则 * 匹配规则
*/ */
ruleChange() { ruleChange() {
var upperShipmentNumber = this.list[0].shipment_number;
//选择了其他物流,货品名称按钮 //选择了其他物流,货品名称按钮
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) {
//其他物流 //其他物流
var upperShipmentNumber = this.searchParams.shipment_number.toUpperCase(); // 转换为大写以便不区分大小写比较 upperShipmentNumber = upperShipmentNumber.toUpperCase(); // 转换为大写以便不区分大小写比较
shipment_number = this.searchParams.shipment_number; shipment_number = this.searchParams.shipment_number;
} }
if (this.index == 1) { if (this.index == 1) {
//货品名称 //货品名称
var upperShipmentNumber = this.searchParams.goods_name.toUpperCase(); // 转换为大写以便不区分大小写比较 upperShipmentNumber = upperShipmentNumber.toUpperCase(); // 转换为大写以便不区分大小写比较
shipment_number = this.searchParams.goods_name; shipment_number = this.searchParams.goods_name;
} }
if (upperShipmentNumber.startsWith('SF')) { if (upperShipmentNumber.startsWith('SF')) {
// A、物流单号为"SF"开头(不区分大小写),则自动选择物流公司为"顺丰速运" // A、物流单号为"SF"开头(不区分大小写),则自动选择物流公司为"顺丰速运"
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.logistics_sn = shipment_number; this.logistics_sn = shipment_number + '\n';
} else if (upperShipmentNumber.startsWith('1Z')) { } else if (upperShipmentNumber.startsWith('1Z')) {
// B、物流单号为"1Z"开头(不区分大小写),则自动选择物流公司为"UPS" // B、物流单号为"1Z"开头(不区分大小写),则自动选择物流公司为"UPS"
this.logistics_company_index = this.logistics_company.findIndex(company => company === 'UPS'); this.logistics_company_index = this.logistics_company.findIndex(company => company === 'UPS');
this.formParams.logistics_company = 'UPS'; this.formParams.logistics_company = 'UPS';
this.logistics_sn = shipment_number; this.logistics_sn = shipment_number + '\n';
} else { } else {
//如果未识别到,则不更新物流公司 物流单号也清空 //如果未识别到,则不更新物流公司 物流单号也清空
this.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.logistics_sn = this.searchParams.shipment_number; //注意这里是搜索的fedex 已经截取了的数据 this.logistics_sn = this.searchParams.shipment_number + '\n'; //注意这里是搜索的fedex 已经截取了的数据
} }
}, },
/** /**
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
logistics_company: [ logistics_company: [
{ name: '全部', value: '' }, { name: '全部', value: '' },
{ name: '联邦快递', value: '联邦快递' }, { name: '联邦快递', value: '联邦快递' },
{ name: 'DHL国际快递', value: '国际快递' }, { name: 'DHL国际快递', value: 'DHL国际快递' },
{ name: '顺丰速运', value: '顺丰速运' }, { name: '顺丰速运', value: '顺丰速运' },
{ name: '供应商配送', value: '供应商配送' }, { name: '供应商配送', value: '供应商配送' },
{ name: '快递送货', value: '快递送货' }, { name: '快递送货', value: '快递送货' },
......
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