diff --git a/.env.development b/.env.development index 7d8c9122..07d31a59 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,6 @@ VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://localhost:12080' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" diff --git a/.env.hella13 b/.env.hella13 deleted file mode 100644 index 9a603299..00000000 --- a/.env.hella13 +++ /dev/null @@ -1,11 +0,0 @@ -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_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=false - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' diff --git a/.env.hella14 b/.env.hella14 deleted file mode 100644 index 91cea3ff..00000000 --- a/.env.hella14 +++ /dev/null @@ -1,11 +0,0 @@ -VITE_BASE_URL=http://172.21.32.14:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' diff --git a/.env.hella15 b/.env.hella15 deleted file mode 100644 index b40ff86e..00000000 --- a/.env.hella15 +++ /dev/null @@ -1,11 +0,0 @@ -VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api -VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' diff --git a/.env.hella16 b/.env.hella16 deleted file mode 100644 index 406618cf..00000000 --- a/.env.hella16 +++ /dev/null @@ -1,11 +0,0 @@ -VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api -VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' diff --git a/.env.hella8 b/.env.hella8 deleted file mode 100644 index f6803774..00000000 --- a/.env.hella8 +++ /dev/null @@ -1,12 +0,0 @@ -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":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=false - - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' diff --git a/.env.hella9 b/.env.hella9 deleted file mode 100644 index fc674a67..00000000 --- a/.env.hella9 +++ /dev/null @@ -1,11 +0,0 @@ -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":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' diff --git a/.env.production b/.env.production index f6803774..a3d9c20b 100644 --- a/.env.production +++ b/.env.production @@ -1,12 +1,14 @@ -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_BASE_URL=http://192.168.120.34:81/api/admin-api +VITE_BASE_URL_IMAGE=http://192.168.120.34:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"英泰","value":1}]' # 是否是测试环境 -VITE_isDevelopment=false - +VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' +VITE_JMREPORT_BASE_URL='http://192.168.120.34:81/api' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.test b/.env.test index 16293197..b3c1ab1b 100644 --- a/.env.test +++ b/.env.test @@ -1,12 +1,14 @@ - -VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api -VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api +VITE_BASE_URL=http://192.168.120.35:81/api/admin-api +VITE_BASE_URL_IMAGE=http://192.168.120.35:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"英泰","value":1}]' # 是否是测试环境 VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' +VITE_JMREPORT_BASE_URL='http://192.168.120.35:81/api' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.test-dev b/.env.test-dev new file mode 100644 index 00000000..024ae336 --- /dev/null +++ b/.env.test-dev @@ -0,0 +1,15 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:28051/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"英泰","value":1}]' + +# 是否是测试环境 +VITE_isDevelopment=false + + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:28051' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/Dockerfile_prod b/Dockerfile_prod deleted file mode 100644 index 116cbdac..00000000 --- a/Dockerfile_prod +++ /dev/null @@ -1,7 +0,0 @@ -# 设置基础镜像 -FROM win-nginx - -WORKDIR /opt/sfms3.0-uniapp -COPY nginx_prod.conf /usr/local/nginx/conf/nginx.conf -# 将dist/build/h5/文件中的内容复制到 /opt/sfms3.0-uniapp 这个目录下面 -COPY dist/build/h5/ /opt/sfms3.0-uniapp diff --git a/nginx.conf b/nginx.conf index 2b8d1e32..02896bfc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -41,6 +41,27 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $http_x_forwarded_for; } + location ^~ /jmreport/ { + proxy_pass http://localhost:100/jmreport/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location ^~ /magic/ { + proxy_pass http://localhost:100/magic/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + alias /opt/profile/; + index index.html index.htm; + } location / { proxy_cache my_zone; proxy_cache_valid 200 304 12h; diff --git a/nginx_prod.conf b/nginx_prod.conf deleted file mode 100644 index 2f9b3691..00000000 --- a/nginx_prod.conf +++ /dev/null @@ -1,57 +0,0 @@ -user root; -worker_processes 2; - -events { - worker_connections 1024; -} - -http { - include mime.types; - charset utf-8,gbk; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; - - proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; - access_log logs/access.log main; - sendfile on; - #tcp_nopush on; - keepalive_timeout 600s; - client_max_body_size 200m; - gzip on; - gzip_min_length 10k; - gzip_comp_level 9; - gzip_buffers 4 16k; - gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; - gzip_vary on; - gzip_disable "MSIE [1-6]\."; - upstream sfms3.0 { - server localhost:90 weight=10 max_fails=3 fail_timeout=10s; - } - server { - listen 81; - server_name_in_redirect off; - server_name _; - location /api/ { - proxy_pass http://sfms3.0/; - proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; - proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $http_x_forwarded_for; - } - location /profile/ { - alias /opt/profile/; - index index.html index.htm; - } - location / { - proxy_cache my_zone; - proxy_cache_valid 200 304 12h; - proxy_cache_key $host$uri$is_args$args; - try_files $uri $uri/ /index.html; - root /opt/sfms3.0-uniapp; - index index.html index.htm; - } - } -} \ No newline at end of file diff --git a/package.json b/package.json index 0d932a24..c4d16606 100644 --- a/package.json +++ b/package.json @@ -8,19 +8,14 @@ "dev": "uni", "dev:h5:ssr": "uni --ssr", "dev:mp-weixin": "uni -p mp-weixin", - "hella8:app": "uni build -p app --mode hella8", - "hella8:app-android": "uni build -p app-android --mode hella8", - "hella8:app-ios": "uni build -p app-ios --mode hella8", - "hella8:h5:ssr": "uni build --ssr --mode hella8", - "hella8:mp-weixin": "uni build -p mp-weixin --mode hella8", - "prod": "uni build --mode production", + "test:app": "uni build -p app --mode test", + "test:app-android": "uni build -p app-android --mode test", + "test:app-ios": "uni build -p app-ios --mode test", + "test:h5:ssr": "uni build --ssr --mode test", + "test:mp-weixin": "uni build -p mp-weixin --mode test", + "prod": "uni build --mode production", "test": "uni build --mode test", - "hella8": "uni build --mode hella8", - "hella9": "uni build --mode hella9", - "hella13": "uni build --mode hella13", - "hella14": "uni build --mode hella14", - "hella15": "uni build --mode hella15", - "hella16": "uni build --mode hella16" + "test-dev": "uni build --mode test-dev" }, "dependencies": { "@dcloudio/uni-app": "3.0.0-3090920231225001", diff --git a/src/api/request2.js b/src/api/request2.js index 2f8668c8..cb1d2fc0 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -421,7 +421,7 @@ export function getPackageByNumber(number) { * @param {*} * */ -export function getPackageListByNumber(number) { +export async function getPackageListByNumber(number) { var params = { number: number, pageNo: 1, @@ -866,7 +866,18 @@ export function getPurchaseReceiptJobDetail(id) { data: {}, }); } - +/** + * 采购收货 获取收货记录的列表 + * @param {*} id 任务id + * + */ +export function getPurchaseReceiptJobDetailListByNmber(requestNumber) { + return request({ + url: baseApi + "/wms/purchasereceipt-record-detail/listByNmber?requestNumber=" + requestNumber, + method: "get", + data: {}, + }); +} /** * 采购收货 任务提交 * @param {*} 任务id @@ -4270,6 +4281,18 @@ export function splitPackageRecordSubmit(params) { }); } +/** + * 拆包 英泰 提交 + * @param {*} params + */ +export function splitPackageRecordForYtSubmit(params) { + return request({ + url: baseApi + "/wms/packagesplit-main/createForYT", + method: "post", + data: params, + }); +} + /** * 合包 提交 * @param {*} params @@ -4301,8 +4324,8 @@ export function overPackageRecordSubmit(params) { * @param {*} * */ -export function getManagementPrecision(params) { - return request({ +export async function getManagementPrecision(params) { + return await request({ url: baseApi + "/wms/rule/getPrecisionStrategyByItemCodes", method: "post", data: params, @@ -4370,8 +4393,8 @@ export function getTransactionByFilter(param) { * @param {*} * */ -export function getPrecisionStrategy(param) { - return request({ +export async function getPrecisionStrategy(param) { + return await request({ url: baseApi + "/wms/rule/getPrecisionStrategy", method: "post", data: param, diff --git a/src/common/balance.js b/src/common/balance.js index 75e207e5..d6f9b4a8 100644 --- a/src/common/balance.js +++ b/src/common/balance.js @@ -75,7 +75,7 @@ export function getPrecisionStrategyParamsByLocation(detailSource, toLocationCod * @param {*} * */ -export function getPrecisionStrategyList(itemList, callback) { +export async function getPrecisionStrategyList(itemList, callback) { // let jsonParem = JSON.stringify(param) let result = { list: [], @@ -83,7 +83,7 @@ export function getPrecisionStrategyList(itemList, callback) { message: '' }; - getPrecisionStrategy(itemList).then(res => { + await getPrecisionStrategy(itemList).then(res => { if (res.data == null) { result.success = false result.message = '未查询到管理精度信息' @@ -105,7 +105,7 @@ export function getPrecisionStrategyList(itemList, callback) { * @param {*} * */ -export function getManagementPrecisions(itemCodes, locationCode, callback) { +export async function getManagementPrecisions(itemCodes, locationCode, callback) { // let jsonParem = JSON.stringify(param) let result = { list: [], @@ -117,7 +117,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) { itemCodes: itemCodes, locationCode: locationCode } - getManagementPrecision(params).then(res => { + await getManagementPrecision(params).then(res => { if (res.data == null) { result.success = false result.message = '未查询到管理精度信息' @@ -397,13 +397,13 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback) }) filters.push({ column: "packingNumber", - action: "==", - value: null + action: "isStr", + value: '' }) filters.push({ column: "batch", - action: "==", - value: null + action: "isStr", + value:'' }) filters.push({ column: "locationCode", diff --git a/src/common/detail.js b/src/common/detail.js index ac1b3ed2..a4a580f9 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -41,7 +41,49 @@ export function getTreeDataSource(dataList) { }) ) } + return items; +} +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; +} +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); + } + }) return items; } @@ -102,6 +144,7 @@ export function createRecordInfo(detail, balance) { //计算实际数量 export function calcHandleQty(detailSource) { + console.log(999,detailSource) for (let item of detailSource) { item.handleQty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber(); @@ -115,7 +158,25 @@ export function calcHandleQty(detailSource) { } } } - +//计算计划外入库实际数量和任务数量 +export function calcHandleQtyPlanOut(detailSource) { + console.log(999,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) { @@ -151,6 +212,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 369ed7ed..1903a950 100644 --- a/src/common/directory.js +++ b/src/common/directory.js @@ -211,6 +211,18 @@ export function getListItemTypeDesc(list) { 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 +316,20 @@ 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) { diff --git a/src/common/label.js b/src/common/label.js index 355b68c6..82bec5b7 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -10,10 +10,11 @@ import { getDirectoryItemArray } from '../common/directory.js'; + import { + getManagementPrecisions + } from '@/common/balance.js'; - -export function getLabelInfo(scanMsg, headerType, callBack) { - console.log('扫描信息:', scanMsg); +export function getLabelInfo(scanMsg, headerType, callBack,locationCode,isHavePackNumber) { if (scanMsg.length == 0) { return null } @@ -41,17 +42,17 @@ export function getLabelInfo(scanMsg, headerType, callBack) { let type = header.substring(header.length - 1, header.length); if (type == 'Q') //qrcode { - getQRCodeInfo(header, version, scanMsg, callBack); + 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); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); } } else { - getBarCodeInfo('text', 'V1.0', scanMsg, callBack); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); // let labelResult = { // label: { // labelType: "", @@ -66,7 +67,7 @@ export function getLabelInfo(scanMsg, headerType, callBack) { } } -export function getQRCodeInfo(header, version, scanMsg, callBack) { +export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) { //获取包装信息 let labelItem = labelDic.find(r => r.header == header && r.version == version); if (labelItem == undefined) { @@ -91,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) { }; labelDic.push(newItem); - getLabelItems(newItem, scanMsg, callBack); + getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber); } }).catch(err => { labelResult.success = false; @@ -99,22 +100,35 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) { callBack(err); }) } else { - getLabelItems(labelItem, scanMsg, callBack); + getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber); } } -export function getLabelItems(labelItem, scanMsg, callBack) { +export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { + let managementType = "" let labelResult = analysisQRCodeLabel(labelItem, scanMsg); if (labelResult.label.labelType == 'PurchaseLabel' || labelResult.label.labelType == 'MakeLabel') { //查询包装信息 let packingNumber = labelResult.label.packingNumber + let packingNumber1 = labelResult.label.packingNumber//记录单号 + if(locationCode){ + await getManagementPrecisions([labelResult.label.itemCode], locationCode, res => { + if (res.success) { + const managementList = res.list; + managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING' + if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ + if(!isHavePackNumber){ + packingNumber = '' + } + } + } + }) + } if (packingNumber != undefined && packingNumber != '') { - getPackageListByNumber(packingNumber).then(pack => { + await 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 + ']没有包装信息'; @@ -128,6 +142,10 @@ export function getLabelItems(labelItem, scanMsg, callBack) { } else { //线边的物料可能没有箱码 labelResult.package = labelResult.label; + labelResult.package.number = packingNumber1 ? packingNumber1 : '' + labelResult.package.packingNumber='' + labelResult.managementType = managementType + console.log(999,labelResult) callBack(labelResult); // labelResult.success = false; // labelResult.message = '在条码中未解析到箱码'; diff --git a/src/common/record.js b/src/common/record.js index 6cbcb38b..c6b44261 100644 --- a/src/common/record.js +++ b/src/common/record.js @@ -31,6 +31,22 @@ export function createItemInfo(balance, pack) { item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number; return item; } +export function createItemInfoForLabel(balance, label) { + let item = { + itemCode: label.itemCode, + itemName: label.itemName, + packQty: '', + packUnit: '', + qty: new Decimal(balance.qty).toNumber(), + handleQty: new Decimal(0).toNumber(), + uom: balance.uom, + subList: [], + // packingNumber: pack.number, + // parentPackingNumber: pack.parentNumber, + } + item.containerNumber = balance.parentNumber ? balance.parentNumber : balance.number; + return item; +} export function createDetailInfo(balance, pack) { balance.scaned = true; @@ -48,7 +64,23 @@ export function createDetailInfo(balance, pack) { return detail; } +export function createDetailInfoForLabel(balance, pack,label) { + balance.scaned = true; + // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus; + // data.inventoryStatus = data.inventoryStatus; + let detail = deepCopyData(balance); + detail.balanceQty = new Decimal(detail.qty).toNumber() + detail.qty = new Decimal(balance.qty).toNumber(); + detail.packQty ='' + detail.packUnit ='' + console.log(988,label.qty) + detail.handleQty = new Decimal(label.qty).toNumber(); + // detail.package = pack; + // detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的 + // detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的 + return detail; +} export function createDetailByPackInfo(pack) { @@ -79,7 +111,22 @@ export function calcHandleQty(detailSource) { } } } - +//添加数量 +export function calcHandleQtyAdd(detailSource,label) { + for (let item of detailSource) { + item.handleQty = item.handleQty || new Decimal(0).toNumber(); + item.qty = item.qty|| new Decimal(0).toNumber(); + item.handleQty = calc.add(item.handleQty, label.qty); + for (let detail of item.subList) { + if (detail != undefined) { + if (detail.scaned) { + detail.handleQty = calc.add(detail.handleQty, label.qty); + } + // item.qty = calc.add(item.qty, detail.qty); + } + } + } +} export function calcTreeHandleQty(detailSource) { for (let item of detailSource) { item.handleQty = new Decimal(0).toNumber(); @@ -104,7 +151,8 @@ export function getBusinessType(typeCode, callback) { businessType: '', fromLocationAreaTypeList: '', toLocationAreaTypeList: '', - itemCodeTypeList: "", + itemTypeList: "", + itemStatusList:"", useOnTheWay: "FALSE", fromInventoryStatuses: '', toInventoryStatuses: '', @@ -115,7 +163,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/mycomponents/balance/balance.vue b/src/mycomponents/balance/balance.vue index fc5582ab..e07702d9 100644 --- a/src/mycomponents/balance/balance.vue +++ b/src/mycomponents/balance/balance.vue @@ -4,7 +4,9 @@ - + @@ -96,6 +98,12 @@ type: Boolean, default: true }, + isShowPackingNumberProps: { + type: Boolean, + default: false + }, + + }, watch: { diff --git a/src/mycomponents/balance/pack.vue b/src/mycomponents/balance/pack.vue index 05d4be77..ddfcd8cd 100644 --- a/src/mycomponents/balance/pack.vue +++ b/src/mycomponents/balance/pack.vue @@ -1,33 +1,40 @@ diff --git a/src/mycomponents/detail/comJobDetailCardBatch.vue b/src/mycomponents/detail/comJobDetailCardBatch.vue index c80074bb..521db21e 100644 --- a/src/mycomponents/detail/comJobDetailCardBatch.vue +++ b/src/mycomponents/detail/comJobDetailCardBatch.vue @@ -1,20 +1,23 @@ -