diff --git a/.env.development b/.env.development index baddd93b..04773efd 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,15 @@ -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_BASE_URL=http://localhost:12080/admin-api +#VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api +# VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"成都","value":2}]' +VITE_TENANT='[{"text":"英泰","value":1}]' # 是否是测试环境 -VITE_isDevelopment=false +VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' \ No newline at end of file +VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/src/api/request2.js b/src/api/request2.js index f0937b0f..3cd28982 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -586,6 +586,16 @@ export function cancleTakePurchaseReceiptJob(id) { export function getPurchaseReceiptJobDetail(id) { return http.get("/wms/purchasereceipt-job-main/getPurchasereceiptJobyId?id=" + id) } + +/** + * 采购收货 获取收货记录的列表 + * @param {*} id 任务id + * + */ +export function getPurchaseReceiptJobDetailListByNmber(requestNumber) { + return http.get("/wms/purchasereceipt-record-detail/listByNmber?requestNumber=" + requestNumber) +} + /** * 采购收货 任务提交 * @param {*} 任务id @@ -2675,6 +2685,14 @@ export function containerUnBindRecordSubmit(params) { export function splitPackageRecordSubmit(params) { return http.post("/wms/packagesplit-main/create" ,params) } + +/** + * 拆包 英泰 提交 + * @param {*} params + */ +export function splitPackageRecordForYtSubmit(data) { + return http.post("/wms/packagesplit-main/createForYT" ,data) +} /** * 合包 提交 * @param {*} params diff --git a/src/common/detail.js b/src/common/detail.js index ddd2c345..5673f450 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -46,50 +46,51 @@ export function getTreeDataSource(dataList) { } export function getThreeDataSource(data) { let items = [] - // let obj ={ - // ...data.subList[0] - // } - // console.log(12) - // data.subList.forEach((item)=>{ - // item.threeList = [{ - // fromLocationCode:item.fromLocationCode, - // batch:item.batch, - // handleQty:0, - // qty:item.qty, - // inventoryStatus:item.inventoryStatus, - // toLocationCode:item.toLocationCode, - // }] - // item.packList=[{ - // scaned : false, - // scanDate: new Date() - // }] - // }) - // obj.subList = data.subList - // items.push(obj) - // return items; + let obj ={ + ...data.subList[0] + } + console.log(12) data.subList.forEach((item)=>{ - item.subList = [{ + item.threeList = [{ fromLocationCode:item.fromLocationCode, batch:item.batch, handleQty:0, qty:item.qty, inventoryStatus:item.inventoryStatus, toLocationCode:item.toLocationCode, - // packList:[{ - // scaned : false, - // scanDate: new Date() - // }] }] - + item.packList=[{ + scaned : false, + scanDate: new Date() + }] + }) + obj.subList = data.subList + items.push(obj) + return items; +} +export function getDataSourceBatch(subList) { + let items = []; + subList.forEach(detail => { + var item = items.find(r => + r.itemCode == detail.itemCode ) + if (item == undefined) { + item = createItemInfo(detail); + let newDetail = createDetailInfo(detail); // + item.subList.push(newDetail); + items.push(item) + } else { + item.qty = calc.add(item.qty, detail.qty) + let newDetail = createDetailInfo(detail); // + item.subList.push(newDetail); + } }) - items = data.subList return items; } export function getDataSource(subList) { let items = []; subList.forEach(detail => { var item = items.find(r => - r.itemCode == detail.itemCode && r.batch == detail.batch) + r.itemCode == detail.itemCode) if (item == undefined) { item = createItemInfo(detail); let newDetail = createDetailInfo(detail); // @@ -155,6 +156,24 @@ export function calcHandleQty(detailSource) { } } } +//计算计划外入库实际数量和任务数量 +export function calcHandleQtyPlanOut(detailSource) { + for (let item of detailSource) { + item.handleQty = new Decimal(0).toNumber(); + item.qty = new Decimal(0).toNumber(); + for (let detail of item.subList) { + if (detail != undefined) { + if (detail.scaned) { + item.handleQty = calc.add(item.handleQty, detail.handleQty); + } + console.log(detail.isRecommend) + if(detail.isRecommend){ + item.qty = calc.add(item.qty, detail.qty); + } + } + } + } +} //计算推荐和扫描的不是用一个的数量 export function calcHandleNewQty(detailSource) { for (let item of detailSource) { @@ -187,6 +206,8 @@ export function calcTreeHandleQty(detailSource) { detail.handleQty = calc.add(detail.handleQty, pack.handleQty); } } + }else{ + detail.handleQty = new Decimal(0).toNumber(); } if(detail.handleQty){ item.handleQty = calc.add(item.handleQty, detail.handleQty); diff --git a/src/common/directory.js b/src/common/directory.js index d53eb8cd..62dfd6fa 100644 --- a/src/common/directory.js +++ b/src/common/directory.js @@ -211,7 +211,15 @@ export function getListItemTypeDesc(list) { desc = desc.slice(0, -1); return desc; } - +//获取物品状态(多个) +export function getListItemStatusDesc(list) { + let desc = ''; + list.forEach(res => { + desc += getItemStateInfo(res).label + "," + }) + desc = desc.slice(0, -1); + return desc; +} //获取物品类型 export function getItemTypeInfo(value) { var resultInfo = ""; @@ -304,6 +312,19 @@ export function getLocationAreaTypeName(value) { return location == '' ? value : location.label; } +//获取物品类型名称 +export function getItemTypeName(value) { + let location = getItemTypeInfo(value); + + return location == '' ? value : location.label; +} + +//获取物品状态名称 +export function getItemStatusName(value) { + let location = getItemStateInfo(value); + + return location == '' ? value : location.label; +} //获取库位类型名称 export function getLocationTypeName(value) { @@ -646,3 +667,19 @@ export function getPriorityName(value) { } return resultInfo } +//获取优先级 +export function getDeliverMethod(value) { + var resultInfo = ""; + if (priorityList.length == 0) { + priorityList = getDirectoryInfo("deliver_method") + } + if (priorityList.length > 0) { + for (let item of priorityList) { + if (item.value == value) { + resultInfo = item.label + break; + } + } + } + return resultInfo +} \ No newline at end of file diff --git a/src/common/label.js b/src/common/label.js index b14e1ac7..28cc4719 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -14,7 +14,7 @@ import { getManagementPrecisions } from '@/common/balance.js'; -export function getLabelInfo(scanMsg,headerType, callBack,locationCode) { +export function getLabelInfo(scanMsg,headerType, callBack,locationCode,isHavePackNumber) { if (scanMsg.length == 0) { return null } @@ -42,17 +42,17 @@ export function getLabelInfo(scanMsg,headerType, callBack,locationCode) { let type = header.substring(header.length - 1, header.length); if (type == 'Q') //qrcode { - getQRCodeInfo(header, version, scanMsg, callBack,locationCode); + getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber); } // else if (type == 'B') //barcode // { // getBarCodeInfo(header, version, items[2], callBack); // } else { //直接输入文本 - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); } }else { - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); // let labelResult = { // label: { // labelType: "", @@ -67,7 +67,7 @@ export function getLabelInfo(scanMsg,headerType, callBack,locationCode) { } } -export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { +export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) { //获取包装信息 let labelItem = labelDic.find(r => r.header == header && r.version == version); if (labelItem == undefined) { @@ -92,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { }; labelDic.push(newItem); - getLabelItems(newItem, scanMsg, callBack,locationCode); + getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber); } }).catch(err => { labelResult.success = false; @@ -100,7 +100,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { callBack(err); }) } else { - getLabelItems(labelItem, scanMsg, callBack,locationCode); + getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber); } } @@ -117,7 +117,9 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { const managementList = res.list; managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING' if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ - packingNumber = '' + if(!isHavePackNumber){ + packingNumber = '' + } } } }) @@ -131,6 +133,7 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { labelResult.success = false; labelResult.message = '包装号[' + packingNumber + ']没有包装信息'; } + labelResult.managementType = managementType callBack(labelResult); }).catch(err => { labelResult.success = false; @@ -175,8 +178,15 @@ export function analysisQRCodeLabel(labelItem, scanMsg) { let scanItems = scanMsg.split(separators); if (scanItems.length > 0) { scanItems.forEach((item, index) => { - let type = item.substring(0, 1); - let value = item.substring(1, item.length); + let type = '' + let value = '' + if(item.includes('PU')||item.includes('PQ')){ + type = item.substring(0, 2); + value = item.substring(2, item.length); + }else{ + type = item.substring(0, 1); + value = item.substring(1, item.length); + } if (type == 'H') { labelResult.label.header = item; } else if (type == 'V') { @@ -197,7 +207,6 @@ export function analysisQRCodeLabel(labelItem, scanMsg) { } } - // console.log('标签', labelResult.label) return labelResult; } diff --git a/src/common/record.js b/src/common/record.js index 92c870ac..899af2e5 100644 --- a/src/common/record.js +++ b/src/common/record.js @@ -131,7 +131,8 @@ export function getBusinessType(typeCode, callback) { businessType: '', fromLocationAreaTypeList:'', toLocationAreaTypeList:'', - itemCodeTypeList:"", + itemTypeList: "", + itemStatusList:"", useOnTheWay:"FALSE", fromInventoryStatuses: '', toInventoryStatuses: '', @@ -142,7 +143,8 @@ export function getBusinessType(typeCode, callback) { result.businessType = res.data.list[0]; result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ; result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ; - result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes) + result.itemTypeList = getDirectoryItemArray(res.data.list[0].itemTypes) + result.itemStatusList =getDirectoryItemArray(res.data.list[0].itemStatuses) result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses; result.toInventoryStatuses = res.data.list[0].inInventoryStatuses; result.useOnTheWay =res.data.list[0].useOnTheWay diff --git a/src/common/utils/storage.js b/src/common/utils/storage.js index d4c6f93e..0ebd9599 100644 --- a/src/common/utils/storage.js +++ b/src/common/utils/storage.js @@ -10,11 +10,11 @@ const setStorage = (key,value)=>{ // 清除全部本地存储 const clearStorage = ()=>{ - const overPackageRecordPointParams = '' + let overPackageRecordPointParams = '' if( uni.getStorageSync('overPackageRecordPointParams')){ overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') } - const overPackageJobDetailPointParams = '' + let overPackageJobDetailPointParams = '' if( uni.getStorageSync('overPackageJobDetailPointParams')){ overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') } diff --git a/src/manifest.json b/src/manifest.json index afcfb5fb..edf3f08b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,115 +1,115 @@ { - "name": "富维汽车镜", - "package":"uni.UNI43932FE", - "appid": "__UNI__DA78BC9", - "description": "", - "versionName" : "1.0.44", - "versionCode" : 44, - "transformPx": false, - /* 5+App特有相关 */ - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - /* 模块配置 */ - "modules": {}, - /* 应用发布信息 */ - "distribute": { - /* android打包配置 */ - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - /* ios打包配置 */ - "ios": { - "dSYMs": false - }, - /* SDK配置 */ - "sdkConfigs": { - "ad": {} - }, - "nativePlugins": { - "TestModule": { - "__plugin_info__": { - "name": "TestModule", - "description": "打印", - "platforms": "Android", - "url": "", - "android_package_name": "", - "ios_bundle_id": "", - "isCloud": false, - "bought": -1, - "pid": "", - "parameters": {} - } - } - } - }, - "nativePlugins": { - "TestModule": { - "__plugin_info__": { - "name": "TestModule", - "description": "打印", - "platforms": "Android", - "url": "", - "android_package_name": "", - "ios_bundle_id": "", - "isCloud": false, - "bought": -1, - "pid": "", - "parameters": {} - } - } - } - }, - /* 快应用特有相关 */ - "quickapp": {}, - /* 小程序特有相关 */ - "mp-weixin": { - "appid": "wx6176535b0b0153f0", - "setting": { - "urlCheck": false - }, - "usingComponents": true - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "uniStatistics": { - "enable": false - }, - "vueVersion": "3", - "h5": { - "template": "index.html", - "devServer": { - "port": 9020 - } - } -} \ No newline at end of file + "name" : "富维汽车镜", + "package" : "uni.UNI43932FE", + "appid" : "__UNI__DA78BC9", + "description" : "", + "versionName" : "1.0.44", + "versionCode" : 44, + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : { + "dSYMs" : false + }, + /* SDK配置 */ + "sdkConfigs" : { + "ad" : {} + }, + "nativePlugins" : { + "TestModule" : { + "__plugin_info__" : { + "name" : "TestModule", + "description" : "打印", + "platforms" : "Android", + "url" : "", + "android_package_name" : "", + "ios_bundle_id" : "", + "isCloud" : false, + "bought" : -1, + "pid" : "", + "parameters" : {} + } + } + } + }, + "nativePlugins" : { + "TestModule" : { + "__plugin_info__" : { + "name" : "TestModule", + "description" : "打印", + "platforms" : "Android", + "url" : "", + "android_package_name" : "", + "ios_bundle_id" : "", + "isCloud" : false, + "bought" : -1, + "pid" : "", + "parameters" : {} + } + } + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx6176535b0b0153f0", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3", + "h5" : { + "template" : "index.html", + "devServer" : { + "port" : 9020 + } + } +} diff --git a/src/mycomponents/balance/balance.vue b/src/mycomponents/balance/balance.vue index 4ac5a6e4..909fc035 100644 --- a/src/mycomponents/balance/balance.vue +++ b/src/mycomponents/balance/balance.vue @@ -2,9 +2,8 @@ - - + + @@ -72,6 +71,10 @@ const props = defineProps({ type: Boolean, default: true }, + isShowPackingNumberProps: { + type: Boolean, + default: false + } }) const copy = () => { // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 diff --git a/src/mycomponents/detail/comRecommendDetailCard.vue b/src/mycomponents/detail/comRecommendDetailCard.vue index c97f9eac..e300da8a 100644 --- a/src/mycomponents/detail/comRecommendDetailCard.vue +++ b/src/mycomponents/detail/comRecommendDetailCard.vue @@ -16,24 +16,21 @@ 推 荐 - - + 实 际 - - + - + < @@ -41,16 +38,16 @@ diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue index 07ba1917..c9f7b34b 100644 --- a/src/mycomponents/package/packageCard.vue +++ b/src/mycomponents/package/packageCard.vue @@ -6,7 +6,7 @@ - + @@ -15,17 +15,18 @@ - + - +