diff --git a/.env.development b/.env.development index 2c183308..8fd8b72c 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ -VITE_BASE_URL=http://172.21.32.13:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api +VITE_BASE_URL=http://172.22.32.9:81/api/admin-api +VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' +VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' # 是否是测试环境 -VITE_isDevelopment=false +VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' +VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' diff --git a/.env.production b/.env.production index 9a603299..f6803774 100644 --- a/.env.production +++ b/.env.production @@ -1,11 +1,12 @@ -VITE_BASE_URL=http://172.21.32.13:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api +VITE_BASE_URL=http://172.22.32.8:81/api/admin-api +VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' +VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' # 是否是测试环境 VITE_isDevelopment=false + # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' +VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' diff --git a/src/common/basic.js b/src/common/basic.js index 8d1fb95d..0217bd96 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -344,9 +344,7 @@ export function getInspectReasonList(value) { export function getSwitchInfoByCode(code) { var isCheck = false var resultInfo = "" - if (switchList.length == 0) { - switchList = uni.getStorageSync("switch") - } + switchList = uni.getStorageSync("switch") for (let item of switchList) { if (item.code == code) { diff --git a/src/common/label.js b/src/common/label.js index 83308d4c..355b68c6 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -12,45 +12,45 @@ import { -export function getLabelInfo(scanMsg,headerType, callBack) { - console.log('扫描信息:', scanMsg); +export function getLabelInfo(scanMsg, headerType, callBack) { + console.log('扫描信息:', scanMsg); if (scanMsg.length == 0) { return null } let items = scanMsg.split(';'); let header = items[0]; let version = items[1]; - if ((header != undefined) && (version!=undefined)) { - var hearList =getDirectoryItemArray(headerType) - if(!checkDirectoryItemExist(hearList,header)){ + if ((header != undefined) && (version != undefined)) { + var hearList = getDirectoryItemArray(headerType) + if (!checkDirectoryItemExist(hearList, header)) { let labelResult = { label: { labelType: "", barType: '', - code:"" + code: "" }, package: null, success: false, - message: '请输入'+headerType+"开始的标签", + message: '请输入' + headerType + "开始的标签", } callBack(labelResult); return; } - + //解析扫描的是一维码还是二维码 let type = header.substring(header.length - 1, header.length); if (type == 'Q') //qrcode { getQRCodeInfo(header, version, scanMsg, callBack); - } + } // else if (type == 'B') //barcode // { // getBarCodeInfo(header, version, items[2], callBack); // } - else { //直接输入文本 + else { //直接输入文本 getBarCodeInfo('text', 'V1.0', scanMsg, callBack); } - }else { + } else { getBarCodeInfo('text', 'V1.0', scanMsg, callBack); // let labelResult = { // label: { @@ -79,7 +79,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) { message: '' } getLabelByHeader(header, version).then(res => { - if (res.data==null) { + if (res.data == null) { labelResult.success = false; labelResult.message = '未查找到标签头为[' + header + ']的标签类型'; callBack(labelResult); @@ -89,7 +89,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) { version: version, label: res.data, }; - + labelDic.push(newItem); getLabelItems(newItem, scanMsg, callBack); } @@ -108,13 +108,13 @@ export function getLabelItems(labelItem, scanMsg, callBack) { if (labelResult.label.labelType == 'PurchaseLabel' || labelResult.label.labelType == 'MakeLabel') { //查询包装信息 let packingNumber = labelResult.label.packingNumber - if (packingNumber != undefined) { + if (packingNumber != undefined && packingNumber != '') { getPackageListByNumber(packingNumber).then(pack => { if (pack.data.reqPackage) { labelResult.package = pack.data.reqPackage; labelResult.package.subList = pack.data.subList; console.log('包装信息', JSON.stringify(labelResult.package)) - + } else { labelResult.success = false; labelResult.message = '包装号[' + packingNumber + ']没有包装信息'; @@ -126,9 +126,12 @@ export function getLabelItems(labelItem, scanMsg, callBack) { callBack(labelResult); }) } else { - labelResult.success = false; - labelResult.message = '在条码中未解析到箱码'; + //线边的物料可能没有箱码 + labelResult.package = labelResult.label; callBack(labelResult); + // labelResult.success = false; + // labelResult.message = '在条码中未解析到箱码'; + // callBack(labelResult); } } else { callBack(labelResult); @@ -145,7 +148,7 @@ export function analysisQRCodeLabel(labelItem, scanMsg) { success: true, message: '' } - + let separators = labelItem.label.separators; if (separators == undefined || separators == null) { labelResult.message = "未读取到分隔符"; @@ -189,11 +192,11 @@ export function getBarCodeInfo(header, version, value, callBack) { label: { labelType: header, barType: 'BarCode', - code:value + code: value }, package: null, success: true, message: '', } callBack(labelResult); -} +} \ No newline at end of file diff --git a/src/components/show-modal/show-modal.vue b/src/components/show-modal/show-modal.vue index b9dd4784..38d55460 100644 --- a/src/components/show-modal/show-modal.vue +++ b/src/components/show-modal/show-modal.vue @@ -82,7 +82,9 @@ cancelClose() { clearInterval(this.timer) //清空timer - this.$refs.modal.popupClose(); + if(this.$refs.modal){ + this.$refs.modal.popupClose(); + } this.success({ // cancel: true, confirm: false, diff --git a/src/mycomponents/balance/level.vue b/src/mycomponents/balance/level.vue index 57c2a22e..89a7844a 100644 --- a/src/mycomponents/balance/level.vue +++ b/src/mycomponents/balance/level.vue @@ -15,8 +15,8 @@ }, props: { priority: { - type: String, - default:'2' + type: Number, + default:2 }, title: { type: String, diff --git a/src/mycomponents/common/comMessage.vue b/src/mycomponents/common/comMessage.vue index e9beb857..bc82cdc0 100644 --- a/src/mycomponents/common/comMessage.vue +++ b/src/mycomponents/common/comMessage.vue @@ -109,7 +109,9 @@ if (this.show) { this.show = false; clearInterval(this.timer) //清空timer - this.$refs.modal.popupClose(); + if(this.$refs.modal){ + this.$refs.modal.popupClose(); + } this.success({ // cancel: false, confirm: true, diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue index deeb70ad..84e9db14 100644 --- a/src/mycomponents/job/jobFilter.vue +++ b/src/mycomponents/job/jobFilter.vue @@ -1,40 +1,53 @@