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 @@
-
+
{{title}}
{{packingCode}}
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {
+
+
+
+
@@ -29,13 +32,7 @@
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
- import location from '@/mycomponents/balance/location.vue'
- import toLocation from '@/mycomponents/balance/toLocation.vue'
- import batch from '@/mycomponents/balance/batch.vue'
- import {
- getRemoveOption,
- getEditRemoveOption
- } from '@/common/array.js';
+
import {
getDetailOption,
getPurchaseReceiptOption
@@ -50,10 +47,7 @@
jobDetailPopup,
receiptDetailInfoPopup,
detailList,
- packageList,
- location,
- toLocation,
- batch,
+ packageList
},
props: {
dataContent: {
@@ -75,10 +69,6 @@
isShowPackListStatus: {
type: Boolean,
default: true
- },
- isEdit: {
- type: Boolean,
- default: true
}
},
watch: {
@@ -95,10 +85,7 @@
},
locatonItem: {},
detailOptions: [],
- scanOptions: [],
- options: [],
- removeOptions: [],
- editAndRemoveOptions: []
+ scanOptions: []
}
},
@@ -110,9 +97,7 @@
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
- this.removeOptions = getRemoveOption();
- this.editAndRemoveOptions = getEditRemoveOption()
-
+
},
@@ -120,13 +105,13 @@
console.log('updated')
},
- methods: {
- collapseChange() {
+ methods: {
+ collapseChange(){
setTimeout(() => {
this.resizeCollapse();
}, 500)
},
-
+
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
@@ -147,8 +132,8 @@
this.$forceUpdate();
},
- swipeClick(e, item, type) {
- if (e.content.text == "编辑") {
+ swipeClick(e, item) {
+ if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
@@ -173,7 +158,7 @@
this.editItem.handleQty = qty;
this.$emit('updateData')
},
- updateData() {
+ updateData(){
this.$emit('updateData')
}
}
diff --git a/src/mycomponents/detail/comRecommendDetailCard.vue b/src/mycomponents/detail/comRecommendDetailCard.vue
index 49a86e37..a3b56d0b 100644
--- a/src/mycomponents/detail/comRecommendDetailCard.vue
+++ b/src/mycomponents/detail/comRecommendDetailCard.vue
@@ -13,24 +13,22 @@
-
-
-
- 推
+
+
+ 推
荐
-
-
+
-
-
- 实
+
+
+ 实
际
-
+
@@ -40,7 +38,10 @@
-
+
+
+
@@ -50,7 +51,8 @@
-
-
\ No newline at end of file
diff --git a/src/mycomponents/item/itemCompareQty.vue b/src/mycomponents/item/itemCompareQty.vue
index ed37206c..7c97325f 100644
--- a/src/mycomponents/item/itemCompareQty.vue
+++ b/src/mycomponents/item/itemCompareQty.vue
@@ -20,7 +20,7 @@
+
+
diff --git a/src/mycomponents/qty/packUnit.vue b/src/mycomponents/qty/packUnit.vue
index e076def7..1ae100d1 100644
--- a/src/mycomponents/qty/packUnit.vue
+++ b/src/mycomponents/qty/packUnit.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/mycomponents/qty/qtyEdit.vue b/src/mycomponents/qty/qtyEdit.vue
index c787a4d2..68542672 100644
--- a/src/mycomponents/qty/qtyEdit.vue
+++ b/src/mycomponents/qty/qtyEdit.vue
@@ -89,7 +89,11 @@
allowEditStatus: {
type: Boolean,
default: false
- }
+ },
+ allowBiggerQty: {
+ type: String,
+ default: 'TRUE'
+ },
},
methods: {
openEditPopup(item, handleQty) {
@@ -113,14 +117,15 @@
this.allQty = val * Number(this.dataContent.packQty);
},
setValue() {
+ console.log(344,this.allowBiggerQty)
var balanceQty = Number(this.dataContent.qty);
if (this.allQty == 0) {
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0',
res => {
this.allQty = balanceQty;
})
- } else if (this.allQty > balanceQty) {
- this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
+ } else if (this.allQty > balanceQty && this.allowBiggerQty == 'FALSE') {
+ this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于任务数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;
})
diff --git a/src/mycomponents/qty/recommendHandleQty.vue b/src/mycomponents/qty/recommendHandleQty.vue
new file mode 100644
index 00000000..20ac670d
--- /dev/null
+++ b/src/mycomponents/qty/recommendHandleQty.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+ {{Number(recommendQty)}}/
+
+
+ {{Number(dataContent.qty)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/mycomponents/qty/recommendQty.vue b/src/mycomponents/qty/recommendQty.vue
index a1406e0d..3ab5a815 100644
--- a/src/mycomponents/qty/recommendQty.vue
+++ b/src/mycomponents/qty/recommendQty.vue
@@ -1,23 +1,23 @@
-
+
- {{Number(dataContent.qty)}}
+ {{Number(dataContent.qty) ? Number(dataContent.qty) : ''}}
-
+
-
+
diff --git a/src/mycomponents/qty/recommendQtyEdit.vue b/src/mycomponents/qty/recommendQtyEdit.vue
index db2ad1e1..75bb6791 100644
--- a/src/mycomponents/qty/recommendQtyEdit.vue
+++ b/src/mycomponents/qty/recommendQtyEdit.vue
@@ -12,25 +12,22 @@
-
-
+
+
包装个数 :
{{getPackUnitName(dataContent.packUnit)}}
-
-
-
+
+
包装规格 :
-
-
总数量 :
@@ -41,6 +38,13 @@
+
+ 库存数量 :
+
+ {{Number(dataContent.balanceQty)}}
+
+
+
@@ -108,6 +112,19 @@ import { nextTick } from 'vue';
type: Object,
default: null
},
+ isNumTips: {
+ type: Boolean,
+ default: true
+ },
+ // 是否提示大于包装信息
+ isNumPackTips: {
+ type: Boolean,
+ default: false
+ },
+ showBalanceQty: {
+ type: Boolean,
+ default: false
+ },
},
methods: {
getPackUnitName(packUnit) {
@@ -170,7 +187,18 @@ import { nextTick } from 'vue';
setValue() {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
- if (this.allQty > this.labelQty) {
+ // 采购收货判断是否大于包装数量isNumPackTips这个字段做判断
+ if (this.allQty > parseFloat(this.dataContent.packQty) && this.isNumPackTips) {
+ this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于包装数量[' +
+ this.dataContent.packQty +
+ ']',
+ res => {
+ this.allQty = this.dataContent.packQty
+ })
+ return
+ }
+ // 其他功能判断是否大于标签数量
+ if (this.allQty > this.labelQty && this.isNumTips && !this.isNumPackTips) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' +
this.labelQty +
']',
diff --git a/src/mycomponents/query/fifoQuery.vue b/src/mycomponents/query/fifoQuery.vue
new file mode 100644
index 00000000..109dbccc
--- /dev/null
+++ b/src/mycomponents/query/fifoQuery.vue
@@ -0,0 +1,297 @@
+
+
+
+
+
+
+ 先进先出查询
+
+
+ 关闭
+
+
+
+
+
+
+
+ 物料号:
+
+
+
+
+
+
+
+
+ 仓库:
+
+
+
+
+
+
+
+
+ ({{index+1}}) 物料代码 : {{item.code}}
+
+
+ 名称 : {{item.name}}
+
+
+ 描述1 : {{item.desc1}}
+
+
+ 描述2 : {{item.desc1}}
+
+
+
+
+
+
+
+
+
+
+ 批次
+ 库位
+ 状态
+ 数量
+ 单位
+
+
+
+ {{item.batch}}
+ {{item.locationCode}}
+ {{statusDesc(item.inventoryStatus)}}
+ {{item.totalQty}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue
index d0144453..a60c3648 100644
--- a/src/mycomponents/record/recordComDetailCard.vue
+++ b/src/mycomponents/record/recordComDetailCard.vue
@@ -4,7 +4,7 @@
-
+
@@ -32,7 +34,7 @@
-
+
@@ -109,19 +111,32 @@
type: Boolean,
default: true
},
-
+ isShowHandleQty: {
+ type: Boolean,
+ default: true
+ },
isShowModifedLocation: {
type: Boolean,
default: false
},
allowModifyQty: {
type: Boolean,
- default: false
+ default: true
},
allowModifyLocation: {
type: Boolean,
default: false
- }
+ },
+ queryBalance: {
+ type: Boolean,
+ default: true
+ },
+ isShowPackingNumberProps: {
+ type: Boolean,
+ default: false
+ },
+
+
},
watch: {
diff --git a/src/mycomponents/record/recordComDetailCardBatch.vue b/src/mycomponents/record/recordComDetailCardBatch.vue
new file mode 100644
index 00000000..cb5eaf75
--- /dev/null
+++ b/src/mycomponents/record/recordComDetailCardBatch.vue
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue
index 0a55bf5f..5f2e2c31 100644
--- a/src/mycomponents/scan/winComScan.vue
+++ b/src/mycomponents/scan/winComScan.vue
@@ -58,6 +58,11 @@
import {
getLabelInfo
} from '../../common/label.js';
+
+ import {
+ getManagementPrecisions
+ } from '@/common/balance.js';
+
export default {
name: "winComScan",
@@ -83,7 +88,16 @@
headerType: {
type: String,
default: 'HPQ' //HLB HMQ HCQ HPQ
- }
+ },
+ locationCode:{
+ type: String,
+ default: ''
+ },
+ // 批次默认不显示包装号,采购收货要显示
+ isHavePackNumber: {
+ type: Boolean,
+ default: false
+ },
},
data() {
return {
@@ -99,7 +113,6 @@
}
},
mounted() {
-
},
watch: {
placeholder() {
@@ -149,8 +162,7 @@
// })
let that = this;
// if(index==-1){
- // that.scanMsg =that.scanMsg + "\n";
- // }
+ // that.sc
if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
@@ -170,6 +182,7 @@
if (that.isShowHistory) {
that.scanList.unshift(content);
}
+
getLabelInfo(content, this.headerType, callback => {
// uni.hideLoading();
let scanResult = callback;
@@ -187,7 +200,7 @@
}
})
}
- });
+ },this.locationCode,this.isHavePackNumber);
}, 200);
}
},
diff --git a/src/mycomponents/scan/winComScanBalance.vue b/src/mycomponents/scan/winComScanBalance.vue
index 148baaf9..04d835e2 100644
--- a/src/mycomponents/scan/winComScanBalance.vue
+++ b/src/mycomponents/scan/winComScanBalance.vue
@@ -131,7 +131,8 @@
}
this.getItemCodeType(result.package.itemCode, callBack => {
if(this.isCheckLocationBalance){
- this.getToLocationBalance(this.resultData)
+ // this.getToLocationBalance(this.resultData)
+ this.queryBalance(this.resultData);
}else {
this.queryBalance(this.resultData)
}
diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue
index e0f91a60..736a3f47 100644
--- a/src/mycomponents/scan/winComScanFg.vue
+++ b/src/mycomponents/scan/winComScanFg.vue
@@ -58,9 +58,7 @@
import {
getMesPackInfo
} from '@/api/request2.js';
- import {
- Exception
- } from 'sass';
+
export default {
name: "winComScan",
diff --git a/src/mycomponents/scan/winScanLocation.vue b/src/mycomponents/scan/winScanLocation.vue
index 0f4c0144..2d3d491f 100644
--- a/src/mycomponents/scan/winScanLocation.vue
+++ b/src/mycomponents/scan/winScanLocation.vue
@@ -38,7 +38,7 @@
components: {
winComScan,
},
- emits: ["getLocation"],
+ emits: ["getLocation","clearFromLocation"],
props: {
title: {
type: String,
@@ -88,7 +88,6 @@
this.$refs.scan.clearScanValue();
},
getScanResult(result) {
-
uni.showLoading({
title: '扫描中...',
mask: true
@@ -101,10 +100,9 @@
}
if(this.code==undefined){
uni.hideLoading();
- this.showErrorMessage("扫描库位[" + this.code + "]为空,请输入正确的库位")
+ this.showErrorMessage("扫描库位为空,请输入正确的库位")
return
}
-
getBasicLocationByCode(this.code).then(res => {
uni.hideLoading();
@@ -112,6 +110,7 @@
let result = res.data.list[0];
if(result.code!=this.code){
this.showErrorMessage('未查询到库位[' + this.code + ']')
+ this.$emit('clearFromLocation',this.code)
return;
}
var type = result.type;
@@ -131,6 +130,7 @@
}
} else {
this.showErrorMessage('未查询到库位[' + this.code + ']')
+ this.$emit('clearFromLocation',this.code)
}
}).catch(error => {
diff --git a/src/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue
index 7da05b49..68af998f 100644
--- a/src/mycomponents/scan/winScanPack.vue
+++ b/src/mycomponents/scan/winScanPack.vue
@@ -15,7 +15,7 @@
+ :isShowHistory="isShowHistory" :clearResult="true" :locationCode='locationCode' :isHavePackNumber='isHavePackNumber'>
@@ -48,11 +48,13 @@
headerType:{
type: String,
default: 'HPQ'
- }
+ },
},
data() {
return {
show: false,
+ locationCode:'',
+ isHavePackNumber:false,//默认是没有包装号不走包装接口
}
},
created() {
@@ -69,8 +71,10 @@
})
},
- openScanPopup() {
+ openScanPopup(locationCode1,isHavePackNumber) {
this.$refs.popup.open('bottom')
+ this.locationCode = locationCode1
+ this.isHavePackNumber = isHavePackNumber
setTimeout(res => {
this.getfocus()
}, 500)
diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue
index 63055f71..dfcad073 100644
--- a/src/mycomponents/scan/winScanPackAndLocation.vue
+++ b/src/mycomponents/scan/winScanPackAndLocation.vue
@@ -27,7 +27,7 @@
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
-
@@ -125,6 +125,11 @@
type: String,
default: ""
},
+ // 不走库存余额接口,只用于回显
+ isJustReplay: {
+ type: Boolean,
+ default: false
+ },
},
data() {
return {
@@ -144,7 +149,8 @@
managementPrecision: '',
fromInventoryStatuses: "",
isCheck: false,
- chooseWhich: '1'
+ chooseWhich: '1',
+ fromWarehouseCode:""
}
},
created() {
@@ -236,6 +242,9 @@
scanLocation(scanResult) {
+ if(scanResult.fromLocationCode){
+ this.fromLocationCode = scanResult.fromLocationCode
+ }
var isCheck = false;
if (this.fromLocationCode == '') {
this.showErrorMessage('来源库位不能为空', callback => {
@@ -269,8 +278,15 @@
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationAreaTypeList, type)) {
this.location = result;
+ this.fromWarehouseCode=result.warehouseCode
// this.packGetFocus();
- this.checkPackage(scanResult);
+ // 如果只回显
+ if(this.isJustReplay){
+ this.$emit("getResult",scanResult);
+ uni.hideLoading()
+ }else{
+ this.checkPackage(scanResult);
+ }
} else {
uni.hideLoading();
var hint = getListLocationAreaTypeDesc(this.fromLocationAreaTypeList);
@@ -297,7 +313,7 @@
})
},
- getScanResult(result) {
+ getScanResult(result,businessType) {
// console.log("扫描", result)
// if (this.fromLocationCode == '' || this.fromLocationCode == null) {
// this.showMessage('请先扫描来源库位', callback => {
@@ -305,6 +321,15 @@
// })
// return;
// } else
+ // 直接合格转隔离直接调用的时候需要
+ if(businessType){
+ this.businessType = businessType;
+ this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
+ this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //出库库存状态
+ this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //出库库区
+ }
+
+
this.scanLocation(result);
// debugger
// if(this.isCheck){
@@ -334,6 +359,10 @@
})
}
this.chooseWhich = '2'
+ if(!result.label.itemCode){
+ this.showErrorMessage('扫描标签不对,请重新扫描')
+ return
+ }
if (res.data && res.data.list && res.data.list.length > 1) {
this.showBalanceSelect(res.data.list);
} else {
@@ -389,6 +418,7 @@
mustHavaBalance(datas) {
if (datas.length == 0) {
this.showErrorMessage(this.getQueryCondition() + '\n未查找到库存记录', res => {
+ this.$emit('clearItemCode',this.scanResult)
this.packGetFocus();
})
} else if (datas.length == 1) {
@@ -442,11 +472,17 @@
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
+ fromWarehouseCode:this.fromWarehouseCode,
balance: datas,
fromLocationCode: this.fromLocationCode,
}
// this.packGetFocus();
- this.$emit("getResult", data);
+ // 如果管理精度是批次或者数量,给父组件多返回一个参数
+ if (this.managementPrecision == 'BY_BATCH'||this.managementPrecision == 'BY_QUANTITY') {
+ this.$emit("getResult", data, this.managementPrecision);
+ } else {
+ this.$emit("getResult", data);
+ }
this.$emit("getCountScanResult", data);
},
@@ -458,12 +494,13 @@
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
+ fromWarehouseCode:this.fromWarehouseCode,
balance: item,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
- // 如果管理精度是批次,给父组件多返回一个参数
- if (this.managementPrecision == 'BY_BATCH') {
+ // 如果管理精度是批次或者数量,给父组件多返回一个参数
+ if (this.managementPrecision == 'BY_BATCH'||this.managementPrecision == 'BY_QUANTITY') {
this.$emit("getResult", data, this.managementPrecision);
} else {
this.$emit("getResult", data);
diff --git a/src/pages.json b/src/pages.json
index d26dec1e..11059bbf 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -254,6 +254,62 @@
}
}
},
+ {
+ "path": "pages/purchaseReceipt/job/purchaseReceiptTool",
+ "style": {
+ "navigationBarTitleText": "协定品收货",
+ "enablePullDownRefresh": true,
+ "titleNView": {
+ // "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "path": "pages/purchaseReceipt/job/purchaseReceiptDevelop",
+ "style": {
+ "navigationBarTitleText": "号试品收货",
+ "enablePullDownRefresh": true,
+ "titleNView": {
+ // "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
{
"path": "pages/purchaseReceipt/job/purchaseReject",
"style": {
@@ -636,6 +692,13 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/issue/job/issueDetailBatch",
+ "style": {
+ "navigationBarTitleText": "发料任务详情",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/issue/job/issueJob0816",
"style": {
@@ -709,6 +772,35 @@
}
}
},
+ {
+ "path": "pages/issue/record/directIssueByBatch",
+ "style": {
+ "navigationBarTitleText": "直接发料",
+ "enablePullDownRefresh": false,
+ "titleNView": {
+ "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
+
{
"path": "pages/issue/record/directIssue0816",
"style": {
@@ -1411,6 +1503,15 @@
"enablePullDownRefresh": false
}
},
+
+ {
+ "path": "pages/productReceipt/record/productReceiptRecordByBatch",
+ "style": {
+ "navigationBarTitleText": "制品收货记录",
+ "enablePullDownRefresh": false
+ }
+ },
+
{
"path": "pages/productPutaway/job/productPutawayJob",
"style": {
@@ -1471,6 +1572,24 @@
}
},
+
+ {
+ "path": "pages/productPutaway/record/fgDirectPutawayByBatch",
+ "style": {
+ "navigationBarTitleText": "装配直接上架",
+ "enablePullDownRefresh": false
+
+ }
+ },
+
+ {
+ "path": "pages/productPutaway/record/semiDirectPutawayByBatch",
+ "style": {
+ "navigationBarTitleText": "预生产直接上架",
+ "enablePullDownRefresh": false
+
+ }
+ },
{
@@ -2153,7 +2272,7 @@
{
"path": "pages/inventoryMove/record/okToHoldRecord",
"style": {
- "navigationBarTitleText": "合格转隔离记录",
+ "navigationBarTitleText": "物料隔离记录",
"enablePullDownRefresh": false
}
},
@@ -2514,6 +2633,13 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/unPlanned/record/receiptRecordByBatch",
+ "style": {
+ "navigationBarTitleText": "计划外入库记录",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/unPlanned/record/issueRecord",
"style": {
@@ -2542,6 +2668,15 @@
"enablePullDownRefresh": false
}
},
+
+ {
+ "path": "pages/label/record/splitLabel",
+ "style": {
+ "navigationBarTitleText": "拆标签",
+ "enablePullDownRefresh": false
+ }
+ },
+
{
"path": "pages/package/record/mergePackageRecord",
"style": {
diff --git a/src/pages/count/job/countJob.vue b/src/pages/count/job/countJob.vue
index 0e441c34..fa45bfd1 100644
--- a/src/pages/count/job/countJob.vue
+++ b/src/pages/count/job/countJob.vue
@@ -20,7 +20,7 @@
-
+
@@ -84,7 +84,8 @@
creationTime: "",
status: "1,2",
fromLocationCode: ""
- }
+ },
+ manageModel:import.meta.env.VITE_MANAGE_MODEL
};
},
onLoad(option) {
@@ -209,7 +210,7 @@
if (this.queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.queryParams.creationTime
})
}
diff --git a/src/pages/count/job/fuzzyCountJob.vue b/src/pages/count/job/fuzzyCountJob.vue
index e57b4aba..d5199cb3 100644
--- a/src/pages/count/job/fuzzyCountJob.vue
+++ b/src/pages/count/job/fuzzyCountJob.vue
@@ -150,7 +150,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue
index b89836b9..ac6118dc 100644
--- a/src/pages/customerReturn/job/returnDetail.vue
+++ b/src/pages/customerReturn/job/returnDetail.vue
@@ -16,15 +16,15 @@
-
-
+ -->
+ :locationAreaTypeList="toLocationAreaTypeList" >
@@ -79,6 +79,10 @@
calcHandleQty,
getScanCount
} from '@/common/detail.js';
+
+ import {
+ calc
+ } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@@ -246,7 +250,7 @@
},
openScanPopup() {
- this.$refs.scanPopup.openScanPopup();
+ this.$refs.scanPopup.openScanPopup( this.fromLocationCode );
},
closeScanPopup() {
@@ -254,13 +258,59 @@
},
getScanResult(result) {
+ console.log(result)
+ if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
+ this.setDataBatch(result)
+ }else{
+ this.setData(result)
+ }
+
+ },
+ setDataBatch(result){
try {
var packingNumber = result.package.number;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
-
+
+ if (detail == undefined) {
+ this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+ console.log(366,batch)
+ console.log(366,detail.subList)
+ var itemDetail = detail.subList.find(r => {
+ return r.batch == batch
+ })
+ if (itemDetail == undefined) {
+ this.showErrorMessage( "批次[" + batch + "]不在列表中")
+ } else {
+ if (itemDetail.scaned) {
+ // this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
+ itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
+ } else {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty)
+ itemDetail.packQty = Number(result.package.packQty)
+ itemDetail.packUnit = result.package.packUnit
+ itemDetail.balanceQty=result.label.qty
+ this.calcHandleQty();
+
+ }
+ }
+ }
+ } catch (e) {
+ this.showMessage(e.message)
+ }
+ },
+ setData(result){
+ try {
+ var packingNumber = result.package.number;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
@@ -279,7 +329,7 @@
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
this.calcHandleQty();
-
+
}
}
}
@@ -287,7 +337,6 @@
this.showMessage(e.message)
}
},
-
scanLocationCode(location, code) {
this.toLocationCode = code
this.detailSource.forEach(item => {
@@ -310,12 +359,20 @@
// //扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
- this.checkCount();
+ if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
+ this.checkCount();
+ }
} else if (this.scanCount < this.subList.length) {
//扫描数量小于任务数量,判断是否允许部分提交
if (this.jobContent.allowPartialComplete == "TRUE") {
//提交
- this.checkCount();
+ if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
+ this.checkCount();
+ }
} else {
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@@ -354,7 +411,61 @@
this.submitJob()
}
},
-
+ checkCountBatch(){
+ // 提交的数量和任务数量不一致提示
+ let str = ''
+ let str1 = ''
+ let str2 = ''
+ let str3 = ''
+ this.detailSource.forEach((item) => {
+ item.subList.forEach(cur => {
+ if (cur.qty != cur.handleQty) {
+ var tempHandleQty =0
+ if(cur.handleQty){
+ tempHandleQty=cur.handleQty
+ }else {
+ tempHandleQty =0
+ }
+ str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
+ }
+ if(cur.handleQty > cur.qty){
+ str1 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于推荐数量【${cur.qty}】`
+ }
+ if(cur.handleQty < cur.qty){
+ str2 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以小于推荐数量【${cur.qty}】`
+ }
+
+ if(parseFloat(cur.handleQty)>parseFloat(cur.balanceQty)){
+ str3 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}】\n`
+ }
+ })
+ })
+ // this.jobContent.allowBiggerQty = 'FALSE'
+ if(this.jobContent.allowBiggerQty == 'FALSE' &&str1){
+ this.$refs.comMessage.showConfirmWarningModal(str1)
+ return
+ }
+ if(this.jobContent.allowSmallerQty == 'FALSE' && str2){
+ this.$refs.comMessage.showConfirmWarningModal(str2)
+ return
+ }
+ if(str3){
+ this.$refs.comMessage.showErrorMessage(str3);
+ return;
+ }
+
+ if (str) {
+ str = '任务明细未全部完成,是否提交?\n'+str
+ this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
+ if (res) {
+ this.submitJob()
+ }
+ });
+ } else {
+ this.submitJob()
+ }
+
+ },
submitJob() {
uni.showLoading({
title: "提交中....",
@@ -370,6 +481,7 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
+ return;
customerReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/customerReturn/job/returnJob.vue b/src/pages/customerReturn/job/returnJob.vue
index c562ee51..ce074f2f 100644
--- a/src/pages/customerReturn/job/returnJob.vue
+++ b/src/pages/customerReturn/job/returnJob.vue
@@ -133,7 +133,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/customerReturn/record/recordList.vue b/src/pages/customerReturn/record/recordList.vue
index c59f4018..af97d0bd 100644
--- a/src/pages/customerReturn/record/recordList.vue
+++ b/src/pages/customerReturn/record/recordList.vue
@@ -147,7 +147,7 @@
if (this.queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.queryParams.creationTime
})
}
diff --git a/src/pages/customerReturn/record/returnRecord.vue b/src/pages/customerReturn/record/returnRecord.vue
index da15f46f..19eec7c8 100644
--- a/src/pages/customerReturn/record/returnRecord.vue
+++ b/src/pages/customerReturn/record/returnRecord.vue
@@ -70,6 +70,10 @@
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
+
+ import {
+ calc
+ } from '@/common/calc.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@@ -109,7 +113,8 @@
toLocationAreaTypeList: [],
managementList: [],
toWarehouseCode: '',
- toInventoryStatuses:""
+ toInventoryStatuses:"",
+ managementType:""
};
},
onLoad(option) {
@@ -145,7 +150,18 @@
},
methods: {
- getScanResult(result) {
+ getScanResult(result,managementTypeParams) {
+ this.managementType = managementTypeParams
+ console.log(managementTypeParams)
+ if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
+ this.setDataBatch(result)
+ } else {
+ this.setData(result)
+ }
+
+ },
+
+ setData(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
@@ -180,7 +196,40 @@
}
}
this.calcHandleQty();
-
+ },
+ setDataBatch(result){
+ let balance = result.balance;
+ let label = result.label;
+ let pack = result.package;
+ var item = this.detailSource.find(res => {
+ if (res.itemCode == balance.itemCode) {
+ return res
+ }
+ })
+ if (item == undefined) {
+
+ var itemp = createItemInfo(balance, pack);
+ let newDetail = createDetailInfo(balance, pack); //
+ newDetail.packingNumber =pack.number
+ newDetail.handleQty =result.label.qty
+ itemp.subList.push(newDetail);
+ this.detailSource.push(itemp)
+ } else {
+ var detail = item.subList.find(r => {
+ if (r.batch == balance.batch &&
+ r.locationCode == balance.locationCode &&
+ r.inventoryStatus == balance.inventoryStatus) {
+ return r;
+ }
+ })
+ if (detail == undefined) {
+ let newDetail = createDetailInfo(balance, pack);
+ item.subList.push(newDetail);
+ } else {
+ detail.handleQty =calc.add(detail.handleQty, result.label.qty)
+ }
+ }
+ this.calcHandleQty();
},
showErrorMessage(message) {
@@ -266,7 +315,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交" + JSON.stringify(params))
+ console.log("提交" ,params)
+ let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
+ if(obj){
+ this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
customerReturnRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue
index 76008fbb..fe39b788 100644
--- a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue
+++ b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue
@@ -1,23 +1,32 @@
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -25,39 +34,42 @@
diff --git a/src/pages/deliver/job/deliverJob.vue b/src/pages/deliver/job/deliverJob.vue
index 58d58a70..6aeda18c 100644
--- a/src/pages/deliver/job/deliverJob.vue
+++ b/src/pages/deliver/job/deliverJob.vue
@@ -139,7 +139,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/deliver/record/deliverRecord.vue b/src/pages/deliver/record/deliverRecord.vue
index 048328c0..1cf8f54e 100644
--- a/src/pages/deliver/record/deliverRecord.vue
+++ b/src/pages/deliver/record/deliverRecord.vue
@@ -8,7 +8,9 @@
-
@@ -80,6 +82,9 @@
calcHandleQty
} from '@/common/record.js';
+ import {
+ calc
+ } from '@/common/calc.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@@ -115,7 +120,8 @@
customerCode : "",
dataContent:{},
managementList:[],
- deliverType:''//发货类型:寄售库CUST,三方库THIRD_PARTY
+ deliverType:'',//发货类型:寄售库CUST,三方库THIRD_PARTY
+ managementType:""
};
},
onLoad(option) {
@@ -162,7 +168,16 @@
mounted() {},
methods: {
- getScanResult(result) {
+ getScanResult(result,managementTypeParams) {
+ this.managementType = managementTypeParams
+ if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
+ this.setDataBatch(result)
+ } else {
+ this.setData(result)
+ }
+ },
+
+ setData(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
@@ -197,8 +212,42 @@
}
}
this.calcHandleQty();
-
},
+
+ setDataBatch(result){
+ let balance = result.balance;
+ let label = result.label;
+ let pack = result.package;
+ let labelQty =result.label.qty;
+ let balanceQty =result.balance.qty;
+ var item = this.detailSource.find(res => {
+ if (res.itemCode == balance.itemCode) {
+ return res
+ }
+ })
+ if (item == undefined) {
+ var itemp = createItemInfo(balance, pack);
+ let newDetail = createDetailInfo(balance, pack); //
+ itemp.subList.push(newDetail);
+ this.detailSource.push(itemp)
+ } else {
+ var detail = item.subList.find(r => {
+ if (r.batch == balance.batch &&
+ r.locationCode == balance.locationCode &&
+ r.inventoryStatus == balance.inventoryStatus) {
+ return r;
+ }
+ })
+ if (detail == undefined) {
+ let newDetail = createDetailInfo(balance, pack);
+ item.subList.push(newDetail);
+ } else {
+ detail.handleQty =calc.add(detail.handleQty, result.label.qty)
+ }
+ }
+ this.calcHandleQty();
+ },
+
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@@ -228,12 +277,16 @@
},
openScanPopup() {
-
- if (this.fromLocationCode == "") {
- this.showFromLocationPopup();
- return
+ if (this.businessType) {
+ if (this.fromLocationCode == "") {
+ this.showFromLocationPopup();
+ return
+ }
+ this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
+ } else {
+ this.getBusinessType()
}
- this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
+
},
showFromLocationPopup() {
@@ -286,7 +339,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交" + JSON.stringify(params))
+ console.log("提交",params)
+ let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
+ if(obj){
+ this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
deliverRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/fg/coms/comNoReceiptPopup.vue b/src/pages/fg/coms/comNoReceiptPopup.vue
index 7014a8da..84bb8a81 100644
--- a/src/pages/fg/coms/comNoReceiptPopup.vue
+++ b/src/pages/fg/coms/comNoReceiptPopup.vue
@@ -112,7 +112,7 @@
-
+
创建检验申请
@@ -156,6 +156,10 @@
import {
calc
} from '@/common/calc.js';
+
+ import {
+ getSwitchInfoByCode
+ } from '@/common/basic.js';
import uom from '@/mycomponents/qty/uom.vue'
import packQty from '@/mycomponents/qty/packQty.vue'
@@ -200,7 +204,8 @@
workshop: "",
bomVersion: "",
putAwayRequestSwitch:true,
- putAwayInspectSwitch:true
+ putAwayInspectSwitch:true,
+ EnableQms:true
}
},
props: {
@@ -213,6 +218,9 @@
default: []
},
},
+ mounted() {
+ this.EnableQms = getSwitchInfoByCode('EnableQms')
+ },
methods: {
openRequestPopup() {
@@ -291,7 +299,9 @@
this.showErrorMessage("请选择包装规格")
return
}
-
+ if (!this.EnableQms) {
+ this.putAwayInspectSwitch = false
+ }
this.callback();
},
diff --git a/src/pages/fg/coms/comReceiptPopup.vue b/src/pages/fg/coms/comReceiptPopup.vue
index 4f7bf20a..dff4d848 100644
--- a/src/pages/fg/coms/comReceiptPopup.vue
+++ b/src/pages/fg/coms/comReceiptPopup.vue
@@ -107,7 +107,7 @@
-
+
创建检验申请
@@ -151,7 +151,9 @@
import {
calc
} from '@/common/calc.js';
-
+import {
+ getSwitchInfoByCode
+ } from '@/common/basic.js';
import uom from '@/mycomponents/qty/uom.vue'
import packQty from '@/mycomponents/qty/packQty.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
@@ -193,7 +195,8 @@
fgLocationCode: "",
rawLocationCode: "",
putAwayRequestSwitch:true,
- putAwayInspectSwitch:true
+ putAwayInspectSwitch:true,
+ EnableQms:true
}
},
props: {
@@ -206,6 +209,10 @@
default: []
},
},
+ mounted() {
+ this.EnableQms = getSwitchInfoByCode('EnableQms')
+ console.log(777,this.EnableQms)
+ },
methods: {
openRequestPopup() {
this.initData();
@@ -279,7 +286,9 @@
this.showErrorMessage("请选择包装规格")
return
}
-
+ if (!this.EnableQms) {
+ this.putAwayInspectSwitch = false
+ }
this.callback();
},
diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue
index a112d5c4..44b65e22 100644
--- a/src/pages/fg/receiptByPlan.vue
+++ b/src/pages/fg/receiptByPlan.vue
@@ -130,9 +130,7 @@
import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import light from '@/mycomponents/balance/light.vue'
- import {
- Exception
- } from 'sass';
+
import {
nextTick
} from 'vue';
diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue
index d4625d95..3fd09b51 100644
--- a/src/pages/fg/receiptNoPlan.vue
+++ b/src/pages/fg/receiptNoPlan.vue
@@ -124,9 +124,7 @@
import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import light from '@/mycomponents/balance/light.vue'
- import {
- Exception
- } from 'sass';
+
export default {
components: {
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 0fb9ea53..234ec17f 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -388,7 +388,7 @@
console.log("包装规格获取失败", res)
})
- var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,semiProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated";
+ var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,semiProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated,EnableQms,ShowPackingNumber,directIssueFifoSwitch";
getSwitchByCode(switchCode).then(res=>{
uni.setStorageSync("switch", res.data)
diff --git a/src/pages/inspect/job/inspectJob.vue b/src/pages/inspect/job/inspectJob.vue
index 4ac64d4c..0d21bc92 100644
--- a/src/pages/inspect/job/inspectJob.vue
+++ b/src/pages/inspect/job/inspectJob.vue
@@ -126,7 +126,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
index bb58c12c..2f379ad2 100644
--- a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
+++ b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
@@ -3,7 +3,11 @@
-
+
+
+
@@ -27,6 +31,7 @@
-
-
\ No newline at end of file
diff --git a/src/pages/inventoryMove/coms/comMoveJob.vue b/src/pages/inventoryMove/coms/comMoveJob.vue
index 4e77583f..ef029a01 100644
--- a/src/pages/inventoryMove/coms/comMoveJob.vue
+++ b/src/pages/inventoryMove/coms/comMoveJob.vue
@@ -170,7 +170,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index b0559bff..b42a2ec8 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -1,7 +1,7 @@
-
+
@@ -11,7 +11,7 @@
+ :allowEditQty="true" :allowEditStatus="allowEditStatus">
@@ -31,12 +31,18 @@
-
+
+
+
+ :locationAreaTypeList="fromLocationAreaTypeList"
+ @clearFromLocation="clearFromLocationCode">
+
@@ -49,17 +55,23 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
+ import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
- import {
- getInventoryStatusName
- } from '@/common/directory.js';
import {
inventoryMoveRecordSubmit,
getBasicLocationByCode,
+ getBasicItemByCode
} from '@/api/request2.js';
import {
- getDirectoryItemArray
+ getDirectoryItemArray,
+ getItemTypeName,
+ getInventoryStatusName,
+ checkDirectoryItemExist,
+ getListItemTypeDesc,
+ getListItemStatusDesc,
+ getItemStatusName,
+ getInventoryStatusDesc
} from '@/common/directory.js';
import {
@@ -68,16 +80,22 @@
import {
getPackingNumberAndBatchByList,
- deepCopyData
+ deepCopyData,
} from '@/common/basic.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
- calcHandleQty
+ calcHandleQty,
+ createItemInfoForLabel,
+ createDetailInfoForLabel
} from '@/common/record.js';
+ import {
+ calc
+ } from '@/common/calc.js';
+
export default {
components: {
comEmptyView,
@@ -87,6 +105,7 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
+ okToHoldRecordPack,
},
props: {
// fromInventoryStatus: {
@@ -117,6 +136,11 @@
type: String,
default: ""
},
+ // 是否显示第一层弹窗
+ showOnePop: {
+ type: Boolean,
+ default: false
+ },
},
data() {
return {
@@ -132,7 +156,12 @@
dataContent: {},
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
- isShowEditLocation: false
+ itemTypeList: [],
+ itemStatusList: [],
+ fromInventoryStatuses:[],
+ isShowEditLocation: false,
+ isJustReplay: true, //是否只是回显,不走库存余额接口
+ fromWarehouseCode: ""
}
},
@@ -140,9 +169,12 @@
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
+ this.itemTypeList = res.itemTypeList;
+ this.itemStatusList = res.itemStatusList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
- this.showFromLocationPopup();
+ this.fromInventoryStatuses =getDirectoryItemArray(res.fromInventoryStatuses);
+ this.showPopup()
} else {
this.showErrorMessage(res.message)
}
@@ -153,6 +185,7 @@
methods: {
+
initData() {
if (this.businessTypeCode == "Move") {
// this.title = "库存转移记录";
@@ -218,6 +251,8 @@
},
openScanPopup() {
+ this.isJustReplay = true
+ this.fromLocationCode = this.$refs.okToHoldRecordPackRef.fromLocationCode || ' '
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
@@ -225,20 +260,152 @@
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
- this.$nextTick(() => {
- this.$refs.scanFromLocationCode.openScanPopup();
- })
+ // this.$refs.scanPopup.
+ this.$refs.scanFromLocationCode.openScanPopup();
+ },
+ showPopup() {
+ setTimeout(() => {
+ if (this.showOnePop) {
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ this.$refs.okToHoldRecordPackRef.batch = ''
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
+ this.$refs.okToHoldRecordPackRef.showOne = true
+ } else {
+ this.$refs.scanFromLocationCode.openScanPopup();
+ }
+ }, 500)
},
getFromLocation(location) {
this.fromLocationCode = location.code;
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = location.code
this.fromLocationInfo = location;
- this.openScanPopup();
+ if (!this.showOnePop) {
+ this.openScanPopup();
+ } else {
+ this.itemCode = ''
+ this.batch = ''
+ }
},
getToLocation(location, code) {
this.toLocationCode = code;
this.toLocationInfo = location;
},
- getScanResult(result) {
+ getScanResult(result, managementTypeParams) {
+ this.fromWarehouseCode = result.fromWarehouseCode
+ this.managementType = managementTypeParams
+ if (this.showOnePop) {
+ if (this.isJustReplay) {
+ this.checkItemCode(result.label.itemCode, callBack => {
+ if (callBack) {
+ var itemType = callBack.itemType
+ var itemStatus = callBack.itemStatus
+ if (checkDirectoryItemExist(this.itemTypeList, itemType)) {
+ if (checkDirectoryItemExist(this.itemStatusList, itemStatus)) {
+ this.$refs.okToHoldRecordPackRef.itemCode = result.label.itemCode
+ this.$refs.okToHoldRecordPackRef.batch = result.label.batch
+ this.$refs.okToHoldRecordPackRef.uom = result.balance ? result.balance.uom : ""
+ this.getResult = result //存储接受的结果
+ this.$refs.scanPopup.closeScanPopup()
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ var hint = getListItemStatusDesc(this.itemStatusList);
+ this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
+ getItemStatusName(itemStatus) + "],需要的物料状态是[" + hint + "]")
+ }
+
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ var hint = getListItemTypeDesc(this.itemTypeList);
+ this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
+ getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]")
+ }
+
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ this.showErrorMessage('未查找到物料【' + result.label.itemCode + '】');
+ }
+ })
+
+
+ } else {
+ this.getScanResultAfterBatch(result, managementTypeParams)
+
+
+ }
+ } else {
+ if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
+ this.getScanResultAfterBatch(result, managementTypeParams)
+ } else {
+ this.getScanResultAfter(result, managementTypeParams)
+ }
+ }
+
+ },
+ okToHoldRecordPackConfirm(obj) {
+ // this.getResult. = result//存储接受的结果
+ if (!obj.fromLocationCode) {
+ this.$refs.comMessage.showErrorMessage('请输入来源库位');
+ return;
+ }
+ if (!obj.itemCode) {
+ this.$refs.comMessage.showErrorMessage('请输入零件');
+ return;
+ }
+ if (!obj.handleQty) {
+ this.$refs.comMessage.showErrorMessage('请输入数量');
+ return;
+ }
+
+ this.getResult = this.getResult ? this.getResult : {
+ label: {},
+ fromLocationCode: ''
+ }
+ this.getResult.fromLocationCode = obj.fromLocationCode
+ this.getResult.label.itemCode = obj.itemCode
+ this.getResult.label.batch = obj.batch
+ this.getResult.label.qty = obj.handleQty
+ this.isJustReplay = false
+ this.$refs.scanPopup.getScanResult(this.getResult, this.businessType)
+
+ },
+ checkItemCode(itemCode, callBack) {
+ getBasicItemByCode(itemCode).then(res => {
+ if (res.data.list.length > 0) {
+ var itemType = res.data.list[0].type
+ var itemStatus = res.data.list[0].status
+ var info = {
+ itemType: itemType,
+ itemStatus: itemStatus
+ }
+ callBack(info)
+ } else {
+ callBack(null)
+ }
+
+ }).catch(error => {
+ callBack(null)
+ })
+ },
+
+ checkInventoryStatus(result,inventoryStatus) {
+ var isPass=true;
+ if (!checkDirectoryItemExist(this.fromInventoryStatuses, inventoryStatus)) {
+ isPass=false
+ var hint = getInventoryStatusDesc(this.fromInventoryStatuses);
+ this.showErrorMessage("查询库存是[" +
+ getInventoryStatusName(inventoryStatus) + "],需要的库存状态是[" + hint + "]")
+
+ }
+ return isPass;
+ },
+
+ clearFromLocationCode() {
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ },
+
+
+ getScanResultAfter(result) {
var balance = result.balance;
var pack = result.package;
var item = this.detailSource.find(res => {
@@ -297,8 +464,165 @@
}
}
calcHandleQty(this.detailSource);
+ },
+ getScanResultAfterBatch(result, managementTypeParams) {
+ if(!this.checkInventoryStatus(result,result.balance.inventoryStatus)){
+ return;
+ }
+ var balance = result.balance;
+ this.balanceInfo = result.balance;
+ var pack = result.package;
+ var item = this.detailSource.find(res => {
+ if (res.itemCode == balance.itemCode) {
+ return res
+ }
+ })
+ // 库存余额是0不让添加
+ if (!balance.qty) {
+ this.$refs.comMessage.showConfirmWarningModal("物料号[" + result.label.itemCode + "]库存余额数量是0")
+ return
+ }
+ // 不可以大于库存余额数量
+ if (result.label.qty > balance.qty) {
+ this.$refs.comMessage.showConfirmWarningModal("物料号[" + result.label.itemCode + "]数量[" + result.label
+ .qty + "]不可以大于库存余额数量[" + balance.qty + "]")
+ return
+ }
+ if (item == undefined) {
+ var itemp = createItemInfoForLabel(balance, result.label);
+ let newDetail = createDetailInfoForLabel(balance, pack, result.label);
+
+ // if (newDetail.packingNumber == '') {
+ // newDetail.packingNumber = pack.number;
+ // }
+
+ if (this.businessTypeCode == "Move") {
+ newDetail.toInventoryStatus = balance.inventoryStatus;
+ } else {
+ newDetail.toInventoryStatus = this.toInventoryStatus;
+ }
+ newDetail.toLocationCode = this.toLocationCode;
+ newDetail.managementTypeParams = managementTypeParams;
+ newDetail.fromLocationCode = result.fromLocationCode
+ newDetail.handleQty = Number(result.label.qty)
+ newDetail.batch = result.balance.batch
+ newDetail.packQty = balance.packQty;
+ newDetail.packUnit = balance.packUnit;
+ itemp.subList.push(newDetail);
+ this.detailSource.push(itemp)
+
+ this.clearFromLocation()
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
+ this.$refs.okToHoldRecordPackRef.showOne = false
+ } else {
+ var detail = ''
+ if (managementTypeParams == 'BY_QUANTITY') {
+ detail = item.subList.find(r => {
+ if (r.fromLocationCode == balance.locationCode &&
+ r.scaned == true) {
+ return r;
+ }
+ })
+ } else if (managementTypeParams == 'BY_BATCH') {
+ detail = item.subList.find(r => {
+ if (r.batch == result.label.batch &&
+ r.fromLocationCode == balance.locationCode &&
+ r.scaned == true) {
+ return r;
+ }
+ })
+ }
+ console.log(detail)
+ if (detail == undefined) {
+ let newDetail = createDetailInfoForLabel(balance, pack, result.label);
+ // newDetail.inventoryStatus = balance.inventoryStatus;
+ if (this.businessTypeCode == "Move") {
+ newDetail.toInventoryStatus = balance.inventoryStatus;
+ } else {
+ newDetail.toInventoryStatus = this.toInventoryStatus;
+ }
+
+ // if (newDetail.packingNumber == '') {
+ // newDetail.packingNumber = pack.number;
+ // }
+ newDetail.toLocationCode = this.toLocationCode;
+ newDetail.managementTypeParams = managementTypeParams;
+ newDetail.fromLocationCode = result.fromLocationCode
+ newDetail.batch = result.label.batch
+ newDetail.handleQty = result.label.qty
+ newDetail.packQty = balance.packQty;
+ newDetail.packUnit = balance.packUnit;
+ item.subList.push(newDetail);
+ this.clearFromLocation()
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
+ this.$refs.okToHoldRecordPackRef.showOne = false
+ } else {
+ // console.log(999,detail.handleQty)
+ // detail.handleQty =calc.add(detail.handleQty, result.label.qty)
+ if (managementTypeParams == 'BY_QUANTITY') {
+ this.showErrorMessage(
+ "物料号[" + item.itemCode + "]\n" + "批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "已经存在")
+ } else if (managementTypeParams == 'BY_BATCH') {
+ this.showErrorMessage(
+ "物料号[" + item.itemCode + "]\n" + "批次[" + detail.batch + "]\n" + "库位[" + detail
+ .fromLocationCode + "]\n" +
+ "已经存在")
+ }
+ }
+ }
+ calcHandleQty(this.detailSource);
+ },
+ getInputMsgResult(result, fromWitch) {
+ if (fromWitch == 'fromLocationScanMsg') {
+ this.isClearFromLocationCode = false
+ this.$refs.scanFromLocationCode.getScanResult(result)
+ } else if (fromWitch == 'itemCodeScan') {
+ result.fromLocationCode = this.fromLocationCode
+ result.label.itemCode = result.label.code
+ this.checkItemCode(result.label.itemCode, callBack => {
+ if (callBack) {
+ var itemType = callBack.itemType
+ var itemStatus = callBack.itemStatus
+
+ if (checkDirectoryItemExist(this.itemTypeList, itemType)) {
+ if (checkDirectoryItemExist(this.itemStatusList, itemStatus)) {
+ this.$refs.okToHoldRecordPackRef.itemCode=result.label.itemCode
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ var hint = getListItemStatusDesc(this.itemStatusList);
+ this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
+ getItemStatusName(itemStatus) + "],需要的物料状态是[" + hint + "]")
+ }
+
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ var hint = getListItemTypeDesc(this.itemTypeList);
+ this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
+ getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]")
+ }
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ this.showErrorMessage('未查找到物料【' + result.label.itemCode + '】');
+ }
+
+ })
+ }
},
+ // 清除来源库位
+ clearFromLocation(fromLocationCodeParams) {
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ // this.$refs.okToHoldRecordPackRef.itemCode =''
+ // this.$refs.okToHoldRecordPackRef.batch =''
+ // this.isClearFromLocationCode = true
+ },
+ // 清除批次和物料
+ clearItemCode(label) {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ // this.$refs.okToHoldRecordPackRef.batch =''
+ },
+
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
@@ -407,7 +731,15 @@
});
return;
}
- console.log("提交" + JSON.stringify(params))
+ // if(this.balanceInfo)
+ console.log("提交", params)
+ let obj = params.subList.find(item => item.balanceQty < item.handleQty)
+ if (obj) {
+ this.$refs.comMessage.showConfirmWarningModal('物料号[' + obj.itemCode + ']批次[' + obj.batch + ']数量[' + obj
+ .handleQty + ']不允许大于库存数量[' + obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@@ -451,6 +783,7 @@
setParams() {
var subList = []
var creator = this.$store.state.user.id
+ console.log(233, this.detailSource)
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
@@ -458,16 +791,16 @@
detail.packingNumber, detail.toLocationCode, detail.batch);
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
- submitItem.itemName = detail.package.itemName;
- submitItem.itemDesc1 = detail.package.itemDesc1;
- submitItem.itemDesc2 = detail.package.itemDesc2;
+ submitItem.itemName = detail.itemName;
+ submitItem.itemDesc1 = detail.itemDesc1;
+ submitItem.itemDesc2 = detail.itemDesc2;
submitItem.fromInventoryStatus = detail.inventoryStatus;
submitItem.toInventoryStatus = detail.toInventoryStatus;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
-
+ submitItem.packingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
@@ -488,7 +821,7 @@
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
- this.dataContent.fromWarehouseCode = this.fromLocationInfo.warehouseCode;
+ this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
this.dataContent.toWarehouseCode = this.toLocationInfo.warehouseCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
diff --git a/src/pages/inventoryMove/coms/comMoveRecordCard.vue b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
index 8c0449b2..05da7341 100644
--- a/src/pages/inventoryMove/coms/comMoveRecordCard.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
@@ -16,9 +16,9 @@
-
+ :isShowLocation="true" :allowEditStatus='allowEditStatus' :isShowPack='item.managementTypeParams == "BY_PACKAGING"' >
@@ -152,7 +152,7 @@
edit(item) {
this.editItem = item;
- this.$refs.balanceQtyEdit.openEditPopup(item, item.qty);
+ this.$refs.balanceQtyEdit.openEditPopup(item, item.handleQty);
},
detail(item) {
diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
new file mode 100644
index 00000000..6fa4ba3a
--- /dev/null
+++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
@@ -0,0 +1,313 @@
+
+
+
+
+
+ 需求信息
+
+
+
+
+ 来源库位:
+
+
+
+
+
+
+
+
+
+ 零件:
+
+
+
+
+
+
+
+
+
+ 批次:
+
+
+
+
+
+
+
+ 数量:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue
index 39b037ad..0cf75f87 100644
--- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue
+++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue
@@ -12,15 +12,9 @@
-
-
+ :allowEditQty="jobContent.allowModifyQty=='TRUE'?true:false" @openDetail="openDetail">
@@ -73,11 +67,14 @@
getPackingNumberAndBatchByList,
getInventoryStatusName,
} from '@/common/basic.js';
+ import {
+ calc
+ } from '@/common/calc.js';
+
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue'
- import comInventoryDetailCardBatch from '@/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@@ -89,7 +86,6 @@
winScanButton,
winScanPack,
comInventoryDetailCard,
- comInventoryDetailCardBatch,
winScanPackAndLocation,
detailInfoPopup,
jobTop
@@ -104,7 +100,7 @@
toLocationInfo: {},
businessTypeInfo: {},
managementList: [],
- managementType:'',
+ managementType: '',
businessTypeCode: '',
toLocationCode: '',
toInventoryStatus: '',
@@ -242,7 +238,7 @@
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes);
that.jobStatus = res.data.status
that.subList = res.data.subList;
- that.detailSource =await getDataSource(that.subList)
+ that.detailSource = await getDataSource(that.subList)
//获取管理模式,封装参数
var itemCodes = []
this.detailSource.forEach(item => {
@@ -253,7 +249,8 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
+ this.managementType = this.managementList.some(item => item
+ .ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
@@ -288,6 +285,7 @@
calcHandleQty() {
calcHandleQty(this.detailSource)
+ console.log(this.detailSource)
this.continueScan()
this.$forceUpdate();
},
@@ -315,7 +313,17 @@
},
- getScanResult(result) {
+ getScanResult(result, managementPrecision) {
+ this.managementType = managementPrecision
+ if (managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') {
+ this.setDataBatch(result, managementPrecision)
+ } else {
+ this.setData(result, managementPrecision)
+ }
+
+ },
+ setDataBatch(result, managementPrecision) {
+ console.log(877, result.balance.qty)
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@@ -325,11 +333,94 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
- var itemDetail = detail.subList.find(r => {
- return r.batch == batch
- })
- if (itemDetail == undefined) {
- this.showErrorMessage( "批次[" + batch + "]不在列表中")
+ var itemDetail = ''
+ if (managementPrecision == 'BY_QUANTITY') {
+ itemDetail = detail.subList.find(r => {
+ return r.itemCode == result.label.itemCode
+ })
+ } else {
+ itemDetail = detail.subList.find(r => {
+ return r.batch == batch
+ })
+ }
+
+ if (itemDetail == undefined && managementPrecision != 'BY_QUANTITY') {
+ this.showErrorMessage("批次[" + batch + "]不在列表中")
+ } else {
+ if (itemDetail.scaned) {
+ // this.showMessage("批次【" + batch + "】已经扫描")
+ itemDetail.handleQty = calc.add(itemDetail.handleQty, Number(result.label.qty));
+ this.calcHandleQty();
+ } else {
+ let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
+ let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
+ if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
+ if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
+ this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
+ itemStatus +
+ ']不一致,是否继续转移?', res => {
+ if (res) {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = Number(result.balance.qty);
+ itemDetail.balance.packQty = Number(result.package.packQty)
+ itemDetail.balance.packUnit = result.package.packUnit
+ this.calcHandleQty();
+ } else {
+ this.scanPopupGetFocus();
+ }
+ });
+ } else {
+ this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
+ itemStatus +
+ ']不一致,不允许转移!', res => {
+ this.scanPopupGetFocus();
+ });
+ }
+ } else {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = Number(result.balance.qty);
+ itemDetail.balance.packQty = Number(result.package.packQty)
+ itemDetail.balance.packUnit = result.package.packUnit
+ this.calcHandleQty();
+ }
+ }
+ }
+ }
+ this.scanPopupGetFocus();
+ } catch (e) {
+ this.showErrorMessage(e.message);
+ }
+ },
+
+ setData(result, managementPrecision) {
+ try {
+ var packingNumber = result.label.packingNumber;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ if (detail == undefined) {
+ this.showMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+ var itemDetail = ''
+ if (managementPrecision == 'BY_QUANTITY') {
+ itemDetail = detail.subList.find(r => {
+ return r.itemCode == result.label.itemCode
+ })
+ } else {
+ itemDetail = detail.subList.find(r => {
+ return r.batch == batch
+ })
+ }
+
+ if (itemDetail == undefined && managementPrecision != 'BY_QUANTITY') {
+ this.showErrorMessage("批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
this.showMessage("批次【" + batch + "】已经扫描")
@@ -380,23 +471,44 @@
}
},
-
- commit() {
+ async commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
-
+ //查询管理模式
+ this.managementList = [];
+ var precisionStrategParams = this.setPrecisionStrategParams()
+ await getPrecisionStrategyList(precisionStrategParams, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList && this.managementList[0] && this
+ .managementList[0].ManagementPrecision ? this.managementList[0]
+ .ManagementPrecision : 'BY_PACKAGING'
+ console.log(11, this.managementType)
+ } else {
+ uni.hideLoading();
+ this.showErrorMessage(res.message);
+ }
+ })
//允许部分提交
//扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
- this.checkCount();
+ if (this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY') {
+ this.checkCountBatch();
+ } else {
+ this.checkCount();
+ }
} else if (this.scanCount < this.subList.length) {
//扫描数量小于任务数量,判断是否允许部分提交
if (this.jobContent.allowPartialComplete == "TRUE") {
//提交
- this.checkCount();
+ if (this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY') {
+ this.checkCountBatch();
+ } else {
+ this.checkCount();
+ }
} else {
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@@ -435,44 +547,73 @@
this.submitJob()
}
},
+ checkCountBatch() {
+ // 提交的数量和任务数量不一致提示
+ let str = ''
+ let str1 = ''
+ this.detailSource.forEach((item) => {
+ item.subList.forEach(cur => {
+ if (cur.scaned) {
+ if (cur.qty != cur.handleQty) {
+ var tempHandleQty = 0
+ if (cur.handleQty) {
+ tempHandleQty = cur.handleQty
+ } else {
+ tempHandleQty = 0
+ }
+ var batchHint = cur.batch ? `批次【${cur.batch}】` : ``
+ str += `物料号【${item.itemCode}】` + `${batchHint}` +
+ `提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
+ if (cur.handleQty > cur.balance.balanceQty) {
+ str1 += `物料号【${item.itemCode}】` + `${batchHint}` +
+ `提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】`
+ }
+ }
+ } else {
+ var batchHint = cur.batch ? `批次【${cur.batch}】` : ``
+ str += `物料号【${item.itemCode}】` + `${batchHint}` +
+ `提交数量【0】与任务物料数量【${cur.qty}】不一致\n`
+ }
+ })
+ })
+ if (str1) {
+ this.$refs.comMessage.showConfirmWarningModal(str1)
+ return
+ }
+ if (str) {
+ str = '任务明细未全部完成,是否提交?\n' + str
+ this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
+ if (res) {
+ this.submitJob()
+ }
+ });
+ } else {
+ this.submitJob()
+ }
+ },
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
-
- //查询管理模式
- this.managementList = [];
- var precisionStrategParams = this.setPrecisionStrategParams()
- getPrecisionStrategyList(precisionStrategParams, res => {
- if (res.success) {
- this.managementList = res.list;
-
- var params = this.setParams()
- console.log("提交" + JSON.stringify(params))
- inventoryMoveSubmit(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- let showTitle = this.title
- if (this.title.indexOf('任务') == this.title.length - 2) {
- showTitle = this.title.replace('任务', '')
- }
- this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data)
- } else {
- this.showErrorMessage("提交失败[" + res.msg + "]")
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
+ var params = this.setParams()
+ console.log("提交" + JSON.stringify(params))
+ inventoryMoveSubmit(params).then(res => {
+ uni.hideLoading()
+ if (res.data) {
+ let showTitle = this.title
+ if (this.title.indexOf('任务') == this.title.length - 2) {
+ showTitle = this.title.replace('任务', '')
+ }
+ this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data)
} else {
- uni.hideLoading();
- this.showErrorMessage(res.message);
+ this.showErrorMessage("提交失败[" + res.msg + "]")
}
-
+ }).catch(error => {
+ uni.hideLoading()
+ this.showErrorMessage(error)
})
-
},
setPrecisionStrategParams() {
diff --git a/src/pages/inventoryMove/job/inventoryMoveJob.vue b/src/pages/inventoryMove/job/inventoryMoveJob.vue
index 97ef5176..69619c2a 100644
--- a/src/pages/inventoryMove/job/inventoryMoveJob.vue
+++ b/src/pages/inventoryMove/job/inventoryMoveJob.vue
@@ -119,7 +119,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/inventoryMove/record/holdToOkRecord.vue b/src/pages/inventoryMove/record/holdToOkRecord.vue
index d708cc99..224a5c05 100644
--- a/src/pages/inventoryMove/record/holdToOkRecord.vue
+++ b/src/pages/inventoryMove/record/holdToOkRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue
index e025da9a..8adb3cec 100644
--- a/src/pages/inventoryMove/record/okToHoldRecord.vue
+++ b/src/pages/inventoryMove/record/okToHoldRecord.vue
@@ -1,6 +1,7 @@
-
+
+
diff --git a/src/pages/issue/coms/comIssueDetailCardBatch.vue b/src/pages/issue/coms/comIssueDetailCardBatch.vue
index b70a9763..cd9f8272 100644
--- a/src/pages/issue/coms/comIssueDetailCardBatch.vue
+++ b/src/pages/issue/coms/comIssueDetailCardBatch.vue
@@ -3,40 +3,30 @@
-
+
-
+
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
-
+
+
+
@@ -54,6 +44,7 @@
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import batch from '@/mycomponents/balance/batch.vue'
+ import qtyEdit from '@/mycomponents/qty/qtyEdit.vue'
import {
getDetailOption,
getEditRemoveOption,
@@ -73,7 +64,7 @@
location,
detailInfoPopup,
comIssueRequestInfo,
- batch
+ batch,
},
props: {
dataContent: {
@@ -84,6 +75,10 @@
type: Object,
default: {}
},
+ isEdit: {
+ type: Boolean,
+ default: true
+ },
},
watch: {
@@ -97,7 +92,8 @@
batchItem: {},
detailOptions: [],
scanOptions: [],
- removeOptions: []
+ removeOptions: [],
+ editAndRemoveOptions:[]
}
},
@@ -105,17 +101,18 @@
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
+ this.editAndRemoveOptions = getEditRemoveOption()
+ console.log(888,this.dataContent)
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
- this.$refs.collapse.forEach(r => {
- r.childrens.forEach(i => {
+ this.$refs.collapse.resize()
+ this.$refs.collapse.childrens.forEach(i => {
i.init();
})
- r.resize();
- })
+
});
},
swipeClick(e, batch,
@@ -132,18 +129,19 @@
},
itemCoceClick(e, item, index) {
- if (e.content.text == "移除") {
- this.dataContent.Items.splice(index, 1);
- this.$emit('removeItemCode')
+ if (e.content.text == "编辑") {
+ this.edit(item)
+ } else if (e.content.text == "移除") {
+ // this.dataContent.subList.splice(index, 1);
+ item.scaned = false
+ item.handleQty=0
+ this.$emit('updateData')
}
},
- edit(batch, item) {
- let that = this;
- that.editItem = item;
- that.batchItem = batch;
- item.balance.balanceQty = item.balance.qty;
- that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
+ edit(item) {
+ this.editItem = item;
+ this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
detail(item) {
@@ -167,13 +165,8 @@
});
},
confirm(val) {
- this.editItem.qty = val;
+ this.editItem.handleQty = Number(val);
this.$emit('updateData', this.editItem)
- // let qty = 0;
- // this.batchItem.Records.forEach(r => {
- // qty += Number(r.qty);
- // })
- // this.batchItem.handleQty = qty;
}
}
}
diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue
index c7994f2d..ecf674cf 100644
--- a/src/pages/issue/coms/comScanIssuePack.vue
+++ b/src/pages/issue/coms/comScanIssuePack.vue
@@ -55,7 +55,7 @@
+ headerType="HPQ,HMQ" :isShowHistory="false" :locationCode='locationCode'>
@@ -152,6 +152,10 @@
type: String,
default: ''
},
+ locationCode:{
+ type: String,
+ default: ''
+ }
},
data() {
return {
@@ -179,7 +183,7 @@
fontSize: "100rpx"
},
bussinessCode: 'Issue',
- toLocationAreaTypeList: []
+ toLocationAreaTypeList: [],
}
},
created() {
@@ -270,7 +274,7 @@
}
},
- queryBalance(result) {
+ queryBalance(result , managementType ) {
try {
let that = this;
// if (that.fromLocationCode == '') {
@@ -281,7 +285,12 @@
// }
let packageInfo = result.package;
let itemCode = result.label.itemCode;
- let packingCode = result.label.packingNumber;
+ let packingCode = '';
+ if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){
+ packingCode = ''
+ } else{
+ packingCode = result.label.packingNumber;
+ }
let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
@@ -401,7 +410,7 @@
},
- onScan(result) {
+ onScan(result, managementType) {
if (!result.package) {
this.showErrorMessage('扫描数据错误[' + result.label.code + "]",
res => {
@@ -427,12 +436,12 @@
this.getToLocationBalance(result)
}
}else{
- this.queryBalance(result)
+ this.queryBalance(result, managementType)
}
},
//查询到目标库位的库存余额
- getToLocationBalance(result) {
+ getToLocationBalance(result, managementType) {
uni.showLoading({
title: '查询中',
mask: true
@@ -470,7 +479,7 @@
// value: this.toLocationAreaTypeList.join(',')
// })
- this.queryBalance(result);
+ this.queryBalance(result, managementType);
// var params = {
// filters: filters,
// pageNo: 1,
@@ -916,9 +925,8 @@
if (item != undefined) {
item.Locations.forEach(l => {
- let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
+ let batch = l.Batchs.find(b => b
.batch == record.batch);
-
if (batch && batch.Records && batch.Records.length > 0) {
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r.batch == record.batch);
@@ -931,7 +939,9 @@
}
});
},
-
+ clearList(){
+ this.issueRecord=[]
+ },
packGetFocus() {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus();
diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue
index 0c10e75f..2a09a298 100644
--- a/src/pages/issue/job/issueDetail.vue
+++ b/src/pages/issue/job/issueDetail.vue
@@ -15,18 +15,11 @@
-
-
-
+ @updateData='updateData'>
@@ -230,8 +223,7 @@
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
- 'BY_BATCH') ? 'BY_BATCH' : ''
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
}
})
setTimeout(r => {
@@ -475,6 +467,24 @@
//防止重复点击
this.$throttle(this.submit, 2000, this)()
} else {
+ // let record = this.creatRecord(label, balance, packageInfo);
+ // batch.Records.push(record);
+ // this.issueRecord.unshift(record)
+ // this.calcBatchHandleQty(batch);
+ // this.getfocus();
+ // this.$emit("afterScan");
+ this.detailSource.forEach(detail => {
+ detail.Items.forEach(item => {
+ taskQty =calc.add(taskQty,item.qty)
+ item.Locations.forEach(lco => {
+ lco.Batchs.forEach(batch => {
+ batch.Records = []
+ })
+ })
+ })
+ })
+ this.$refs.comScanIssuePack.clearList()
+
this.scanPopupGetFocus()
}
});
diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue
new file mode 100644
index 00000000..f99df8af
--- /dev/null
+++ b/src/pages/issue/job/issueDetailBatch.vue
@@ -0,0 +1,828 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 6ab76832..9f98eadc 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -25,7 +25,7 @@
-
+
@@ -61,6 +61,11 @@
getDetailGiveupOption,
getDetailCloseOption
} from '@/common/array.js';
+
+
+ import {
+ getManagementPrecisions
+ } from '@/common/balance.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
@@ -109,7 +114,8 @@
businessTypeCode: "Issue",
businessType: null,
timer: null,
- productionLineCode:""
+ productionLineCode:"",
+ manageModel:import.meta.env.VITE_MANAGE_MODEL
};
},
onLoad(option) {
@@ -239,6 +245,9 @@
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
+ if(this.manageModel!='BY_BATCH'){
+ this.openScanPopup()
+ }
}
var list = res.data.list;
@@ -255,9 +264,7 @@
if (type === "refresh") {
uni.stopPullDownRefresh();
}
- if(this.jobList.length>0){
- this.openScanPopup()
- }
+
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
@@ -282,7 +289,7 @@
if (queryParams.creationTime ) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: queryParams.creationTime
})
}
@@ -355,8 +362,7 @@
openJobDetail(item, scanMessage = '') {
- this.getJobInfoByNumber(item.number, scanMessage)
-
+ this.getJobInfoByNumber(item, scanMessage)
},
showItemList(itemList) {
@@ -433,7 +439,7 @@
})
},
- getJobInfoByNumber(number, scanMessage) {
+ getJobInfoByNumber(item, scanMessage) {
let that = this;
uni.showLoading({
title: "加载中....",
@@ -448,7 +454,7 @@
filters.push({
column: "number",
action: "==",
- value: number
+ value: item.number
})
var params = {
@@ -475,11 +481,27 @@
return;
}
- uni.navigateTo({
- url: './issueDetail?id=' + result.masterId + '&status=' + result.status +
- '&scanMessage=' +
- scanMessage + '&title=' + this.title
- });
+
+ getManagementPrecisions([item.itemCode], item.fromLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision
+ if(this.managementType == 'BY_BATCH'||this.managementType == 'BY_QUANTITY'){
+ uni.navigateTo({
+ url: './issueDetailBatch?id=' + result.masterId + '&status=' + result.status +
+ '&scanMessage=' +
+ scanMessage + '&title=' + this.title
+ });
+ }else{
+ uni.navigateTo({
+ url: './issueDetail?id=' + result.masterId + '&status=' + result.status +
+ '&scanMessage=' +
+ scanMessage + '&title=' + this.title
+ });
+ }
+ }
+ })
+
this.scanMessage = ""
}
}).catch(error => {
diff --git a/src/pages/issue/job/issueJob0816.vue b/src/pages/issue/job/issueJob0816.vue
index a3017f95..c714bfc1 100644
--- a/src/pages/issue/job/issueJob0816.vue
+++ b/src/pages/issue/job/issueJob0816.vue
@@ -234,7 +234,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
@@ -333,7 +333,7 @@
// if (this.checkedToday) {
// filters.push({
// column: "create_time",
- // action: "betweeen",
+ // action: "between",
// value: this.todayTime
// })
// }
diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue
index de6a8e70..b0d956cf 100644
--- a/src/pages/issue/record/directIssue.vue
+++ b/src/pages/issue/record/directIssue.vue
@@ -1,7 +1,7 @@
-
+
@@ -177,7 +177,7 @@
this.businessType = res.businessType;
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
- this.openScanPopup();
+ this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
@@ -395,11 +395,11 @@
},
openScanPopup() {
- if (this.businessType) {
- this.$refs.scanPopup.openScanPopup(this.businessType);
- } else {
- this.getBusinessType()
+ if (this.fromLocationCode == "") {
+ this.showFromLocationPopup();
+ return
}
+ this.$refs.scanPopup.openScanPopup(this.businessType);
},
showFromLocationPopup() {
diff --git a/src/pages/issue/record/directIssueByBatch.vue b/src/pages/issue/record/directIssueByBatch.vue
new file mode 100644
index 00000000..82413d30
--- /dev/null
+++ b/src/pages/issue/record/directIssueByBatch.vue
@@ -0,0 +1,569 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/itemHold/record/recordList.vue b/src/pages/itemHold/record/recordList.vue
index c4558f64..9feae876 100644
--- a/src/pages/itemHold/record/recordList.vue
+++ b/src/pages/itemHold/record/recordList.vue
@@ -146,7 +146,7 @@
if (this.queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.queryParams.creationTime
})
}
diff --git a/src/pages/label/record/splitLabel.vue b/src/pages/label/record/splitLabel.vue
new file mode 100644
index 00000000..5503f4cc
--- /dev/null
+++ b/src/pages/label/record/splitLabel.vue
@@ -0,0 +1,391 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 拆出数量 :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index f6c8f562..852a5f19 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -132,7 +132,7 @@
storage.clearStorage()
if (process.env.NODE_ENV === 'development') {
this.username = "admin"
- this.password = "win123456";
+ this.password = "CD_win09";
}
uni.setNavigationBarColor({
frontColor: '#ffffff',
diff --git a/src/pages/package/job/overPackageJob.vue b/src/pages/package/job/overPackageJob.vue
index 7a4cd225..1715c018 100644
--- a/src/pages/package/job/overPackageJob.vue
+++ b/src/pages/package/job/overPackageJob.vue
@@ -190,7 +190,7 @@
if (queryParams.creationTime ) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: queryParams.creationTime
})
}
diff --git a/src/pages/productDismantle/job/productDismantleJob.vue b/src/pages/productDismantle/job/productDismantleJob.vue
index 4712fc84..ea90a1d0 100644
--- a/src/pages/productDismantle/job/productDismantleJob.vue
+++ b/src/pages/productDismantle/job/productDismantleJob.vue
@@ -132,7 +132,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue
index bc151e08..7c42f58a 100644
--- a/src/pages/productPutaway/job/productPutawayDetail.vue
+++ b/src/pages/productPutaway/job/productPutawayDetail.vue
@@ -271,7 +271,7 @@
},
updateData() {
- // this.calcHandleQty();
+ this.calcHandleQty();
},
openDetail(item) {
@@ -334,15 +334,20 @@
var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
-
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
- var itemDetail = detail.subList.find(r => {
- return r.batch == batch &&
- r.fromLocationCode == result.fromLocationCode
- })
- if (itemDetail == undefined) {
+ let itemDetail = ''
+ this.detailSource.find(item => {
+ const itemDetail1 = item.subList.find(r => {
+ return r.batch == result.label.batch && r.fromLocationCode == result.fromLocationCode
+ })
+ if(itemDetail1){
+ itemDetail = itemDetail1
+ }
+ console.log(99,itemDetail1)
+ });
+ if (!itemDetail) {
this.showErrorMessage("批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中")
} else {
@@ -379,6 +384,7 @@
}
}
} catch (e) {
+ console.log(2333,e)
this.showMessage(e.message)
}
},
diff --git a/src/pages/productPutaway/job/productPutawayJob.vue b/src/pages/productPutaway/job/productPutawayJob.vue
index 25541856..0228ac61 100644
--- a/src/pages/productPutaway/job/productPutawayJob.vue
+++ b/src/pages/productPutaway/job/productPutawayJob.vue
@@ -161,7 +161,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productPutaway/record/fgDirectPutawayByBatch.vue b/src/pages/productPutaway/record/fgDirectPutawayByBatch.vue
new file mode 100644
index 00000000..5eb29749
--- /dev/null
+++ b/src/pages/productPutaway/record/fgDirectPutawayByBatch.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/productPutaway/record/productPutawayRecordByBatch.vue b/src/pages/productPutaway/record/productPutawayRecordByBatch.vue
new file mode 100644
index 00000000..2d410e6d
--- /dev/null
+++ b/src/pages/productPutaway/record/productPutawayRecordByBatch.vue
@@ -0,0 +1,651 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/productPutaway/record/semiDirectPutawayByBatch.vue b/src/pages/productPutaway/record/semiDirectPutawayByBatch.vue
new file mode 100644
index 00000000..22ed7f1c
--- /dev/null
+++ b/src/pages/productPutaway/record/semiDirectPutawayByBatch.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue
index 2fc2be38..3a21ce92 100644
--- a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue
+++ b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue
@@ -1,31 +1,28 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -36,36 +33,27 @@
diff --git a/src/pages/productReceipt/coms/comProductRecordBatch.vue b/src/pages/productReceipt/coms/comProductRecordBatch.vue
new file mode 100644
index 00000000..3b5fdd2a
--- /dev/null
+++ b/src/pages/productReceipt/coms/comProductRecordBatch.vue
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/productReceipt/job/ccProductReceiptJob.vue b/src/pages/productReceipt/job/ccProductReceiptJob.vue
index a9e11e68..3fbc9781 100644
--- a/src/pages/productReceipt/job/ccProductReceiptJob.vue
+++ b/src/pages/productReceipt/job/ccProductReceiptJob.vue
@@ -152,7 +152,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productReceipt/job/completeReceiveJob.vue b/src/pages/productReceipt/job/completeReceiveJob.vue
index e8520ab7..5cd87b95 100644
--- a/src/pages/productReceipt/job/completeReceiveJob.vue
+++ b/src/pages/productReceipt/job/completeReceiveJob.vue
@@ -131,7 +131,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue
index 2d8887dc..44636dc0 100644
--- a/src/pages/productReceipt/job/productReceiptDetail.vue
+++ b/src/pages/productReceipt/job/productReceiptDetail.vue
@@ -42,7 +42,7 @@
0) {
that.jobContent = res.data;
+ console.log(344,that.jobContent.allowModifyLocation)
that.subList = res.data.subList;
that.jobStatus = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode;
@@ -285,23 +286,23 @@
} else {
detail.scaned = true
var itemDetail = detail.subList.find(r =>
- r.packingNumber == packingNumber &&
r.batch == batch);
if (itemDetail == undefined) {
- this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
+ this.showErrorMessage("批次[" + batch + "]不在任务列表中")
} else {
if (itemDetail.scaned) {
- this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
+ // this.showErrorMessage("批次[" + batch + "]已经扫描")
+ itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty);
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
- itemDetail.toLocationCode = this.toLocationCode;
+ // itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
- calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
+ calcHandleQty(this.detailSource);
}
}
},
@@ -360,7 +361,7 @@
});
},
- commit() {
+ async commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
@@ -375,18 +376,40 @@
}else{
this.toLocationCode = this.jobToLocationCode
}
+ //获取管理模式,封装参数
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+ await getManagementPrecisions(itemCodes, this.toLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
+ }
+ })
//扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
- if (this.checkCount()) {
- this.submitJob();
+ if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
+ if (this.checkCountBatch()) {
+ this.submitJob();
+ }
+ }else{
+ if (this.checkCount()) {
+ this.submitJob();
+ }
}
-
} else if (this.scanCount < this.subList.length) {
//扫描数量小于任务数量,判断是否允许部分提交
if (this.jobContent.allowPartialComplete == "TRUE") {
//提交
- if (this.checkCount()) {
- this.submitJob();
+ if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
+ if (this.checkCountBatch()) {
+ this.submitJob();
+ }
+ }else{
+ if (this.checkCount()) {
+ this.submitJob();
+ }
}
} else {
//不允许部分提交,提示
@@ -424,7 +447,34 @@
return isCheck;
},
-
+ checkCountBatch(){
+ var isCheck = true;
+ var hint = ""
+ for (var i = 0; i < this.detailSource.length; i++) {
+ var item = this.detailSource[i];
+ for (var j = 0; j < item.subList.length; j++) {
+ var subItem = item.subList[i]
+ console.log(calc.sub(subItem.handleQty, subItem.qty) )
+ if (calc.sub(subItem.handleQty, subItem.qty) < 0 || calc.sub(subItem.handleQty, subItem.qty) > 0) {
+ isCheck = false;
+ hint = "批次【" + subItem.batch + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty +
+ "]不相等,是否继续收货?"
+ break
+ }
+
+ }
+ }
+ console.log(isCheck)
+ if (!isCheck) {
+ this.showQuestMessage(hint, res => {
+ if (res) {
+ this.submitJob();
+ }
+ })
+ }
+
+ return isCheck;
+ },
submitJob() {
uni.showLoading({
title: "提交中....",
@@ -437,12 +487,20 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- var params = this.setParams();
+ let params = this.setParams();
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
- this.showCommitSuccessMessage("提交成功\n生成预生产收货记录\n" + res.data, )
+ var hint = ""
+ if(params.type=='predict'){
+ hint="提交成功\n生成补给品收货记录\n" +res.data
+ }else if(params.type=='assemble'){
+ hint="提交成功\n生成号口品收货记录\n" +res.data
+ }else {
+ hint="提交成功\n生成收货记录\n"
+ }
+ this.showCommitSuccessMessage(hint)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
diff --git a/src/pages/productReceipt/job/productReceiptJob.vue b/src/pages/productReceipt/job/productReceiptJob.vue
index baf01cda..fb26b22e 100644
--- a/src/pages/productReceipt/job/productReceiptJob.vue
+++ b/src/pages/productReceipt/job/productReceiptJob.vue
@@ -20,7 +20,7 @@
-
+
@@ -84,7 +84,8 @@
detailOptions: [],
detailGiveupOptions: [],
scanMessage: "",
- timer:null
+ timer:null,
+ manageModel:import.meta.env.VITE_MANAGE_MODEL
};
},
// 装配收货:type = 'assemble'
@@ -136,19 +137,19 @@
timerRefresh() {
this.getList('refresh');
- this.stopRefresh();
- var that = this;
- this.timer = setInterval(function() {
- that.getList('refresh');
- console.log('装配刷新');
- }, planRefreshTime)
+ // this.stopRefresh();
+ // var that = this;
+ // this.timer = setInterval(function() {
+ // that.getList('refresh');
+ // console.log('装配刷新');
+ // }, planRefreshTime)
},
stopRefresh() {
console.log('stopRefresh装配刷新');
- if (this.timer) {
- clearInterval(this.timer);
- this.timer = null;
- }
+ // if (this.timer) {
+ // clearInterval(this.timer);
+ // this.timer = null;
+ // }
},
getList(type) {
let that = this;
@@ -165,7 +166,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
@@ -449,7 +450,7 @@
return;
}
- if (this.type == 'predict') {
+ if (this.type == 'predict'||this.type == 'assemble') {
uni.navigateTo({
url: './productReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
diff --git a/src/pages/productReceipt/job/scrapReceiptDetail.vue b/src/pages/productReceipt/job/scrapReceiptDetail.vue
index 186b0a6a..1cacee4d 100644
--- a/src/pages/productReceipt/job/scrapReceiptDetail.vue
+++ b/src/pages/productReceipt/job/scrapReceiptDetail.vue
@@ -226,8 +226,13 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
- var itemDetail = detail.subList.find(r =>
- r.batch == batch);
+ var itemDetail = ''
+ if(this.managementPrecision == 'BY_QUANTITY'){
+ itemDetail = detail.subList.find(r => r.itemCode == result.label.itemCode);
+ }else{
+ itemDetail = detail.subList.find(r => r.batch == batch);
+ }
+
if (itemDetail == undefined) {
this.showErrorMessage("批次[" + batch + "]不在任务列表中")
} else {
@@ -368,6 +373,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
+ this.managementPrecision = this.managementList[0].ManagementPrecision
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
diff --git a/src/pages/productReceipt/record/productReceiptRecordByBatch.vue b/src/pages/productReceipt/record/productReceiptRecordByBatch.vue
new file mode 100644
index 00000000..c50e0cff
--- /dev/null
+++ b/src/pages/productReceipt/record/productReceiptRecordByBatch.vue
@@ -0,0 +1,496 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/productReceipt/record/recordList.vue b/src/pages/productReceipt/record/recordList.vue
index 831613b1..ca564a58 100644
--- a/src/pages/productReceipt/record/recordList.vue
+++ b/src/pages/productReceipt/record/recordList.vue
@@ -146,7 +146,7 @@
if (this.queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.queryParams.creationTime
})
}
diff --git a/src/pages/productRecycle/coms/comRecycleJobCard.vue b/src/pages/productRecycle/coms/comRecycleJobCard.vue
index 216deb18..efce0ba2 100644
--- a/src/pages/productRecycle/coms/comRecycleJobCard.vue
+++ b/src/pages/productRecycle/coms/comRecycleJobCard.vue
@@ -1,6 +1,6 @@
-
+
@@ -21,6 +21,10 @@
type: Object,
default: {}
},
+ isShowToLocation: {
+ type: Boolean,
+ default: true
+ },
},
methods: {
diff --git a/src/pages/productRecycle/job/productRecycleJob.vue b/src/pages/productRecycle/job/productRecycleJob.vue
index 3f2e2dcc..72a6f3bb 100644
--- a/src/pages/productRecycle/job/productRecycleJob.vue
+++ b/src/pages/productRecycle/job/productRecycleJob.vue
@@ -11,7 +11,7 @@
-
+
@@ -134,7 +134,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
@@ -161,6 +161,9 @@
if (type === "refresh") {
uni.stopPullDownRefresh();
}
+ res.data.list.forEach(item=>{
+ item.fromLocationCode = item.toLocationCode
+ })
var list = res.data.list;
this.totalCount = res.data.total
updateTitle(this.title+"(" + this.totalCount + ")");
diff --git a/src/pages/productRecycle/job/productRecycleJobDetail.vue b/src/pages/productRecycle/job/productRecycleJobDetail.vue
index 0eed8fb0..d1cbf98b 100644
--- a/src/pages/productRecycle/job/productRecycleJobDetail.vue
+++ b/src/pages/productRecycle/job/productRecycleJobDetail.vue
@@ -71,6 +71,10 @@
import {
getManagementPrecisions
} from '@/common/balance.js';
+
+ import {
+ calc
+ } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
@@ -201,8 +205,7 @@
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
- 'BY_BATCH') ? 'BY_BATCH' : ''
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision?this.managementList[0].ManagementPrecision:'BY_PACKAGING'
}
})
} else {
@@ -244,10 +247,20 @@
},
updateData() {
- // this.calcHandleQty();
+ this.calcHandleQty();
},
getScanResult(result) {
+ console.log(result.label)
+ this.labelInfo = result.label
+ if(this.managementType == 'BY_BATCH' ||this.managementType == "BY_QUANTITY" ){
+ this.getScanResultAfterBatch(result)
+ }else{
+ this.getScanResultAfter(result)
+ }
+
+ },
+ getScanResultAfter(result){
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@@ -266,7 +279,7 @@
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode &&
r.inventoryStatus == result.balance.inventoryStatus
-
+
})
if (itemDetail) {
// 箱码、批次、库位、状态一致
@@ -292,7 +305,7 @@
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode
})
-
+
if (itemDetail) {
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
//箱码、批次、库位相等,状态不相等
@@ -324,16 +337,116 @@
this.showErrorMessage("箱码【" + packingNumber + "】\n批次【" + batch + "】\n库位【" + result
.fromLocationCode + "】\n状态【" + balanceStatus + "】\n不在任务列表中")
}
-
+
}
-
+
+ }
+ this.scanPopupGetFocus();
+ } catch (e) {
+ this.showErrorMessage(e.message);
+ }
+ },
+ getScanResultAfterBatch(result){
+ try {
+ var packingNumber = result.label.packingNumber;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var itemDetail = undefined;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ if (detail == undefined) {
+ this.showMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+ detail.scaned = true
+ let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
+ //箱码、批次、库位、状态 都相等
+ itemDetail = detail.subList.find(r => {
+ return
+ r.batch == batch &&
+ r.fromLocationCode == result.fromLocationCode &&
+ r.inventoryStatus == result.balance.inventoryStatus
+
+ })
+ if (itemDetail) {
+ // 箱码、批次、库位、状态一致
+ if (itemDetail.scaned) {
+ // this.showErrorMessage("\n批次【" + batch + "】\n库位【" + result
+ // .fromLocationCode + "】\n状态【" + balanceStatus + "】\n已经扫描")
+ itemDetail.handleQty = calc.add(itemDetail.handleQty,Number(result.label.qty));
+ itemDetail.balanceQty = Number(result.label.qty);
+ } else {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.balanceQty = Number(result.label.qty);
+ itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ itemDetail.inventoryStatus = result.balance.inventoryStatus;
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = Number(result.balance.qty);
+ itemDetail.balance.packQty = Number(result.package.packQty)
+ itemDetail.balance.packUnit = result.package.packUnit
+ }
+ this.calcHandleQty();
+ } else {
+ //箱码、批次、库位相等
+ itemDetail = detail.subList.find(r => {
+ return r.batch == batch &&
+ r.fromLocationCode == result.fromLocationCode
+ })
+
+ if (itemDetail) {
+ let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
+ //箱码、批次、库位相等,状态不相等
+ if(balanceStatus!=itemStatus){
+ if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
+ this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
+ ']不一致,是否继续回收?', res => {
+ if (res) {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = itemDetail.handleQty ? calc.add(itemDetail.handleQty,Number(result.label.qty)) : Number(result.label.qty);
+ itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ itemDetail.inventoryStatus = result.balance.inventoryStatus;
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = result.balance.qty;
+ itemDetail.balance.packQty = result.package.packQty
+ itemDetail.balance.packUnit = result.package.packUnit
+ this.calcHandleQty();
+ } else {
+ this.scanPopupGetFocus();
+ }
+ });
+ } else {
+ this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
+ itemStatus +
+ ']不一致,不允许回收!', res => {
+ this.scanPopupGetFocus();
+ });
+ }
+ //箱码、批次、库位相等,状态相等
+ }else{
+ itemDetail.scaned = true;
+ itemDetail.handleQty = itemDetail.handleQty ? calc.add(itemDetail.handleQty,Number(result.label.qty)) : Number(result.label.qty);
+ itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ itemDetail.inventoryStatus = result.balance.inventoryStatus;
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = result.balance.qty;
+ itemDetail.balance.packQty = result.package.packQty
+ itemDetail.balance.packUnit = result.package.packUnit
+ this.calcHandleQty();
+ }
+
+ } else {
+ this.showErrorMessage("\n批次【" + batch + "】\n库位【" + result
+ .fromLocationCode + "】\n状态【" + balanceStatus + "】\n不在任务列表中")
+ }
+
+ }
+
}
this.scanPopupGetFocus();
} catch (e) {
this.showErrorMessage(e.message);
}
},
-
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
@@ -344,12 +457,20 @@
// //允许部分提交
// //扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
+ if(this.managementType == 'BY_BATCH' ||this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
this.checkCount();
+ }
} else if (this.scanCount < this.subList.length) {
//扫描数量小于任务数量,判断是否允许部分提交
if (this.jobContent.allowPartialComplete == "TRUE") {
//提交
+ if(this.managementType == 'BY_BATCH' ||this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
this.checkCount();
+ }
} else {
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@@ -388,6 +509,41 @@
this.submitJob()
}
},
+ checkCountBatch(){
+ // 提交的数量和任务数量不一致提示
+ let str = ''
+ let str1 = ''
+ this.detailSource.forEach((item) => {
+ item.subList.forEach(cur => {
+ if (cur.qty != cur.handleQty) {
+ var tempHandleQty =0
+ if(cur.handleQty){
+ tempHandleQty=cur.handleQty
+ }else {
+ tempHandleQty =0
+ }
+ str += `物料号【${item.itemCode}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
+ }
+ if(cur.handleQty > cur.balance.qty){
+ str1 += `物料号【${item.itemCode}】提交数量【${cur.handleQty}】不可以大于库存数量【${cur.balance.qty}】`
+ }
+ })
+ })
+ if (str1) {
+ this.$refs.comMessage.showMessage(str1);
+ return
+ }
+ if (str) {
+ str = '任务明细未全部完成,是否提交?\n'+ str
+ this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
+ if (res) {
+ this.submitJob()
+ }
+ });
+ } else {
+ this.submitJob()
+ }
+ },
submitJob() {
uni.showLoading({
@@ -402,7 +558,7 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交参数", JSON.stringify(params));
+ console.log("提交参数",params);
productRecycleJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@@ -434,7 +590,7 @@
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
- detail.fromPackingNumber = info.packingNumber;
+ detail.fromPackingNumber = this.labelInfo.packingNumber;
subList.push(detail)
}
})
diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index 4d1f72a0..5d33464d 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -195,7 +195,7 @@
if (queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: queryParams.creationTime
})
}
diff --git a/src/pages/productionReturn/coms/comReturnDetailCard.vue b/src/pages/productionReturn/coms/comReturnDetailCard.vue
index 304ee867..bb8e8fd6 100644
--- a/src/pages/productionReturn/coms/comReturnDetailCard.vue
+++ b/src/pages/productionReturn/coms/comReturnDetailCard.vue
@@ -95,12 +95,18 @@
},
mounted() {
- if (this.detailOptions.length == 0) {
- this.detailOptions = getDetailOption();
- }
+
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation)
}
+
+ if(import.meta.env.VITE_MANAGE_MODEL=="BY_PACKAGING"){
+ if (this.detailOptions.length == 0) {
+ this.detailOptions = getDetailOption();
+ }
+ }else {
+ this.scanOptions.splice(0,1)
+ }
},
methods: {
@@ -139,6 +145,8 @@
if (res) {
item.scaned = false
item.handleQty = null
+ item.packUnit="";
+ item.packQty=undefined
this.$forceUpdate()
this.$emit('remove', item)
}
diff --git a/src/pages/productionReturn/coms/comReturnDetailCardBatch.vue b/src/pages/productionReturn/coms/comReturnDetailCardBatch.vue
new file mode 100644
index 00000000..304ee867
--- /dev/null
+++ b/src/pages/productionReturn/coms/comReturnDetailCardBatch.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/productionReturn/job/holdToReturnJob.vue b/src/pages/productionReturn/job/holdToReturnJob.vue
index 1c10671f..c571028f 100644
--- a/src/pages/productionReturn/job/holdToReturnJob.vue
+++ b/src/pages/productionReturn/job/holdToReturnJob.vue
@@ -135,7 +135,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productionReturn/job/okToReturnDetail.vue b/src/pages/productionReturn/job/okToReturnDetail.vue
index 017e0c77..5e5351d4 100644
--- a/src/pages/productionReturn/job/okToReturnDetail.vue
+++ b/src/pages/productionReturn/job/okToReturnDetail.vue
@@ -66,7 +66,9 @@
getManagementPrecisions
} from '@/common/balance.js';
-
+ import {
+ calc
+ } from '@/common/calc'
import {
getDataSource,
createRecordInfo,
@@ -204,17 +206,24 @@
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
- 'BY_BATCH') ? 'BY_BATCH' : ''
- if(this.managementType == 'BY_BATCH'){
- that.detailSource.forEach(item=>{
- item.subList.forEach(cur=>{
- cur.packingNumber=''
- cur.toPackingNumber=''
- cur.fromPackingNumber=''
- })
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision
+ if(this.managementType == 'BY_BATCH'){
+ that.detailSource.forEach(item=>{
+ item.subList.forEach(cur=>{
+ cur.packingNumber=''
+ cur.toPackingNumber=''
+ cur.fromPackingNumber=''
+ })
+ })
+ }else if(this.managementType == 'BY_QUANTITY'){
+ that.detailSource.forEach(item=>{
+ item.subList.forEach(cur=>{
+ cur.packingNumber=''
+ cur.toPackingNumber=''
+ cur.fromPackingNumber=''
})
- }
+ })
+ }
}
})
} else {
@@ -256,7 +265,7 @@
},
openScanPopup() {
- this.$refs.scanPopup.openScanPopup();
+ this.$refs.scanPopup.openScanPopup(this.fromLocationCode);
// let fromlocationCode = '';
// let fromlocationList = [];
// for (var i = 0; i < this.detailSource.length; i++) {
@@ -282,14 +291,88 @@
getScanResult(result) {
+ if (this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY') {
+ this.setDataBatch(result)
+ } else {
+ this.setData(result)
+ }
+
+ },
+ setDataBatch(result){
+ try {
+ var packingNumber = result.label.packingNumber;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ let itemcodes = this.detailSource.map(item=>item.itemCode).join(',')
+ if (detail == undefined) {
+ this.showErrorMessage(`扫描的物料【 ${ result.label.itemCode} 】与任务明细中的物料【 ${itemcodes} 】不一致`)
+ } else {
+ var itemDetail = detail.subList.find(r => {
+ return r.batch == batch
+ })
+ if (itemDetail == undefined) {
+ this.showErrorMessage("批次[" + batch + "]不在列表中")
+ } else {
+ if (itemDetail.scaned) {
+ // this.showErrorMessage("批次[" + batch + "]已经扫描")
+ itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.package.qty))
+ } else {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.package.qty)
+ itemDetail.inventoryStatus = "OK"
+ itemDetail.packQty = result.package.packQty
+ itemDetail.packUnit = result.package.packUnit
+
+
+ //合格退料时不能查库存余额,因为生产退料时新生成的批次是000000 --nxt
+ // let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
+ // let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
+ // if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
+ // this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
+ // ']不一致,是否继续上架?', res => {
+ // if (res) {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty)
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = result.balance.qty;
+ // itemDetail.balance.packQty = result.package.packQty
+ // itemDetail.balance.packUnit = result.package.packUnit
+ // this.calcHandleQty();
+ // } else {
+ // this.scanPopupGetFocus();
+ // }
+ // });
+ // } else {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty)
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = result.balance.qty;
+ // itemDetail.balance.packQty = result.package.packQty
+ // itemDetail.balance.packUnit = result.package.packUnit
+ // this.calcHandleQty();
+ // }
+ }
+ this.calcHandleQty();
+ }
+ }
+ this.scanPopupGetFocus();
+ } catch (e) {
+ this.showErrorMessage(e.message);
+ }
+ },
+
+ setData(result){
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ let itemcodes = this.detailSource.map(item=>item.itemCode).join(',')
if (detail == undefined) {
- this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
+ this.showErrorMessage(`扫描的物料【 ${ result.label.itemCode} 】与任务明细中的物料【 ${itemcodes} 】不一致`)
} else {
var itemDetail = detail.subList.find(r => {
return r.batch == batch
@@ -306,8 +389,8 @@
itemDetail.packQty = result.package.packQty
itemDetail.packUnit = result.package.packUnit
this.calcHandleQty();
-
-
+
+
//合格退料时不能查库存余额,因为生产退料时新生成的批次是000000 --nxt
// let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
// let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
@@ -400,12 +483,12 @@
itemCode: itemCodes,
locationCode: this.toLocationCode
}
+
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交参数", JSON.stringify(params));
-
+ console.log("提交参数", params);
productionReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/productionReturn/job/okToReturnJob.vue b/src/pages/productionReturn/job/okToReturnJob.vue
index f6aaada1..bbe43ac5 100644
--- a/src/pages/productionReturn/job/okToReturnJob.vue
+++ b/src/pages/productionReturn/job/okToReturnJob.vue
@@ -135,7 +135,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productionReturn/job/returnJob.vue b/src/pages/productionReturn/job/returnJob.vue
index 5dd8a87b..f4df3056 100644
--- a/src/pages/productionReturn/job/returnJob.vue
+++ b/src/pages/productionReturn/job/returnJob.vue
@@ -135,7 +135,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/productionReturn/record/returnToHoldRecordList.vue b/src/pages/productionReturn/record/returnToHoldRecordList.vue
index 4e3f2d6a..a6f20096 100644
--- a/src/pages/productionReturn/record/returnToHoldRecordList.vue
+++ b/src/pages/productionReturn/record/returnToHoldRecordList.vue
@@ -145,7 +145,7 @@
if (this.queryParams.creationTime) {
filterParams.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.queryParams.creationTime
})
}
diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue
index bd31d00b..0756ec5d 100644
--- a/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue
+++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue
@@ -12,7 +12,7 @@
diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
index 1266e56f..2c2a63e1 100644
--- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
+++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
@@ -1,24 +1,23 @@
-
+
+ @click="swipeClick($event,dataContent)">
-
-
-
-
+
-
+
@@ -34,13 +33,9 @@
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
+ import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
-
- import pack from '@/mycomponents/balance/pack.vue'
- import location from '@/mycomponents/balance/location.vue'
- import toLocation from '@/mycomponents/balance/toLocation.vue'
- import batch from '@/mycomponents/balance/batch.vue'
import {
getDetailOption,
@@ -58,11 +53,7 @@
receiptDetailInfoPopup,
winScanLocation,
detailList,
- packageList,
- pack,
- location,
- toLocation,
- batch
+ packageList
},
props: {
dataContent: {
@@ -77,6 +68,11 @@
type: Object,
default: null
},
+ isNumPackTips: {
+ type: Boolean,
+ default: false
+ },
+
},
watch: {
@@ -99,9 +95,6 @@
},
mounted() {
- this.$nextTick(()=>{
- console.log(this.dataContent)
- })
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
@@ -127,9 +120,9 @@
},
resizeCollapse() {
- this.$nextTick(r => {
+ setTimeout(() => {
this.$refs.collapse.resize()
- });
+ }, 500)
this.$forceUpdate();
},
@@ -184,13 +177,11 @@
item.subList.forEach(lst => {
lst.scaned = false;
lst.handleQty = null;
- lst.packList.forEach(pack => {
- pack.scaned = false;
- pack.handleQty = null;
- })
+ lst.packList=[]
})
// this.$forceUpdate()
// this.$emit('remove', item)
+ this.updateData()
}
});
},
@@ -210,10 +201,9 @@
this.editItem.handleQty = qty;
this.$emit('updateData')
},
- updateData() {
- this.$emit('updateData')
- },
-
+ updateData(item,type,index,ele) {
+ this.$emit('updateData',item,type,index,ele)
+ }
}
}
diff --git a/src/pages/purchaseReceipt/job/purchaseReceipt.vue b/src/pages/purchaseReceipt/job/purchaseReceipt.vue
index 9d8042b8..60eda37e 100644
--- a/src/pages/purchaseReceipt/job/purchaseReceipt.vue
+++ b/src/pages/purchaseReceipt/job/purchaseReceipt.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue b/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
new file mode 100644
index 00000000..eecfd51e
--- /dev/null
+++ b/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue b/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
new file mode 100644
index 00000000..58f46eca
--- /dev/null
+++ b/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 9957d8bd..70d58910 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -5,7 +5,7 @@
-
整单收货
@@ -32,9 +32,9 @@
-
+ v-if="managementType == 'BY_BATCH' || managementType =='BY_QUANTITY'" :isNumPackTips='true'>
@@ -76,7 +76,7 @@
-
+
@@ -89,7 +89,8 @@
getPurchaseReceiptJobDetail,
takePurchaseReceiptJob,
cancleTakePurchaseReceiptJob,
- getPutawayJobList
+ getPutawayJobList,
+ getPurchaseReceiptJobDetailListByNmber
} from '@/api/request2.js';
import {
@@ -117,7 +118,14 @@
calcTreeHandleQty
} from '@/common/detail.js';
-
+ import {
+ Decimal
+ } from 'decimal.js'; //引入
+
+ import {
+ calc
+ } from '@/common/calc'
+
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndCont from '@/mycomponents/scan/winScanPackAndCont.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@@ -169,10 +177,12 @@
switchCode1: "",
isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位
reasonText: "",
-
-
+ packingNumberList:[],
+ source_type:'',
+ idValue:0
// printDeafult: {}, //默认打印机
// templateDeafult: {} //默认的模板
+
};
},
@@ -181,12 +191,13 @@
this.id = option.id;
this.scanMessage = option.scanMessage;
this.operation = option.operation;
- this.status = option.status;
+ this.status = option.status;
+ this.source_type = option.source_type;
this.switchCode = "purchasereceiptPrintPDA" //采购收货PDA打印开关
this.switchCode1 = "EnableQms" //根据开关中是否启用QMS去判断,如果为TRUE显示检验指引单,如果为FALSE不显示检验指引单
- },
-
- onShow() {
+ uni.setNavigationBarTitle({
+ title:option.title + '详情'
+ })
if (this.id != undefined) {
//新建的任务自动接收
if (this.status == "1") {
@@ -198,6 +209,10 @@
}
}
},
+
+ onShow() {
+
+ },
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@@ -273,20 +288,25 @@
} else {
that.toLocationCode = that.jobToLocationCode;
}
+ console.log(777,that.toLocationCode)
that.isAllReceived = false;
- //获取管理模式,封装参数
- var itemCodes = []
- this.detailSource.forEach(item => {
- itemCodes.push(item.itemCode)
- })
- getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
- if (res.success) {
- this.managementList = res.list;
- this.managementType = this.managementList.some(item => item.ManagementPrecision ==
- 'BY_BATCH') ? 'BY_BATCH' : ''
- }
- })
+ //获取管理模式,封装参数
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+ getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
+ }
+ })
+ // 获取收货记录列表,用于判断扫描包装是否已被收货
+ getPurchaseReceiptJobDetailListByNmber(that.jobContent.requestNumber).then((res)=>{
+ console.log(res)
+ this.receiptRecordList = res.data
+ })
// if (uni.getStorageSync('purchaseReceiptDetailPointParams')) {
// const purchaseReceiptDetailPointParams = uni.getStorageSync(
// 'purchaseReceiptDetailPointParams')
@@ -301,8 +321,6 @@
if (this.scanMessage) {
this.$refs.scanPopup.simulateScan(this.scanMessage);
}
-
-
} else {
that.showMessage('列表数据为0');
}
@@ -312,17 +330,24 @@
this.showErrorMessage(error)
})
},
-
-
getScanResult(result) {
+ this.balanceInfo = result.balance
+ if(this.managementType == 'BY_BATCH'||this.managementType == 'BY_QUANTITY'){
+ this.getScanResultAfterBatch(result)
+ }else{
+ this.getScanResultAfter(result)
+ }
+ },
+ // 包装扫码之后逻辑
+ getScanResultAfter(result){
try {
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
- detail.scaned = true;
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
return;
}
+ detail.scaned = true;
if (result.label.labelType == "ContainerLabel") {
var containerNumber = result.label.container;
var itemDetail = detail.subList.filter(r => r.containerNumber == containerNumber);
@@ -359,7 +384,7 @@
if (itemDetail == undefined) {
itemDetail = detail.subList.find(r => r.packingNumber == parentpackingNumber && r.batch ==
batch);
-
+
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
@@ -379,11 +404,11 @@
pack.labelQty = Number(result.label.qty);
}
}
- calcTreeHandleQty(this.detailSource);
+ calcHandleQty(this.detailSource);
itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序
this.$forceUpdate()
}
-
+
} else {
//扫描的是外包装,将包装集合全部扫描
var scanedLength = 0;
@@ -408,7 +433,7 @@
pac.handleQty = Number(pac.qty);
pac.toLocationCode = this.toLocationCode;
})
-
+
calcTreeHandleQty(this.detailSource);
this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
this.continueScan()
@@ -417,12 +442,145 @@
}
}
}
-
+
+ } catch (e) {
+ this.showErrorMessage(e.message)
+ }
+ },
+ // 批次扫码之后逻辑
+ getScanResultAfterBatch(result){
+ console.log(222,result)
+ try {
+ var itemCode = result.label.itemCode;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ if (detail == undefined) {
+ this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
+ return;
+ }
+ detail.scaned = true;
+ if (result.label.labelType == "ContainerLabel") {
+ var containerNumber = result.label.container;
+ var itemDetail = detail.subList.filter(r => r.containerNumber == containerNumber);
+ if (itemDetail.length == 0) {
+ this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中")
+ } else {
+ if (itemDetail[0].scaned) {
+ this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描")
+ } else {
+ itemDetail.forEach(item => {
+ item.scaned = true;
+ itemDetail.scanDate = new Date();
+ item.handleQty = calc.add(item.handleQty,result.label.qty)
+ item.toLocationCode = this.toLocationCode;
+ })
+ // calcHandleQty(this.detailSource);
+ this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
+ this.continueScan()
+ this.$forceUpdate()
+ }
+ }
+ } else if (result.label.labelType == "PurchaseLabel") {
+ // debugger
+ var packingNumber = result.package.number;
+ var parentpackingNumber = result.package.parentNumber;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ if (detail == undefined) {
+ this.showMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+ //物料在列表中
+ const batchDetailList = detail.subList.filter(r => r.batch ==
+ batch);
+ if (!batchDetailList || batchDetailList && batchDetailList.length == 0) {
+ this.showMessage("批次【" + batch + "】不在列表中")
+ } else {
+ // 箱码是否已经扫描
+ var isHavePackingNumber1 =this.receiptRecordList.find(r => r.packingNumber == packingNumber);
+ if(isHavePackingNumber1){
+ this.showMessage("箱码【" + packingNumber + "】已经生成任务");
+ return
+ }
+ var isHavePackingNumber =this.packingNumberList.find(r => r.packingNumber == packingNumber);
+ if(isHavePackingNumber){
+ this.showMessage("箱码【" + packingNumber + "】已经扫描");
+ return
+ }
+ for(let i = 0 ; i {
+ pack.handleQty =pack.handleQty? pack.handleQty :0
+ packAllHandleQty = calc.add(packAllHandleQty,pack.handleQty)
+ })
+ // 批次任务数量减去当前扫描总箱码数量的差为该批次还有多少任务数量没有扫
+ let handleQtySub = calc.sub(parseFloat(batchDetailList[i].qty),parseFloat(packAllHandleQty))
+ let pack = {}
+ pack.packingNumber =packingNumber
+ pack.packQty = Number(result.package.packQty);
+ pack.packUnit = result.package.packUnit
+ pack.qty = batchDetailList[i].qty
+
+ pack.toLocationCode = this.toLocationCode;
+ console.log(999,result.package)
+ pack.labelQty = Number(result.label.qty);
+ pack.scaned = true;
+ // 当前批次剩余可以扫进的数量大于当前扫描的标签数量的时候直接插入当前的批次
+ if(handleQtySub >= parseFloat(qty)){
+ pack.handleQty = Number(qty);
+ batchDetailList[i].packList.push(pack)
+ batchDetailList[i].scaned = true
+ const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
+ if(!isHave){
+ this.packingNumberList.push(pack)
+ }
+ calcTreeHandleQty(this.detailSource);
+ break
+ }else{
+ // 如果扫描的数量大于每行的任务剩余扫进去的数量
+ if(handleQtySub != 0){
+ // 如果是最后一行所有数量直接放入最后一行
+ if(batchDetailList.length-1 == i){
+ pack.handleQty = qty;
+ }else{
+ // 不是最后一行取当前批次剩余可以扫进的数量
+ pack.handleQty = handleQtySub;
+ }
+ batchDetailList[i].packList.push(pack)
+ batchDetailList[i].scaned = true
+ qty = calc.sub(parseFloat(qty),parseFloat(handleQtySub))
+ // 如果箱码没有被扫过直接插入记录箱码的列表,扫过了不计入
+ const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
+ if(!isHave){
+ this.packingNumberList.push(pack)
+ }
+ calcTreeHandleQty(this.detailSource);
+ }
+ }
+
+
+ }
+ console.log(8777,this.detailSource)
+
+ setTimeout(()=>{
+ this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
+ item.resizeCollapse()
+
+ item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{
+ cur.resize()
+ })
+ })
+ },500)
+
+ }
+
+ }
+ }
+
} catch (e) {
this.showErrorMessage(e.message)
}
},
-
//继续扫描
continueScan() {
this.scanCount = getScanCount(this.subList);
@@ -433,14 +591,43 @@
}
},
- updateData() {
- calcTreeHandleQty(this.detailSource)
- // calcHandleQty(this.detailSource);
+ updateData(type,item,index,ele) {
+ if(type == 'parent'){
+ item.packList=[]
+ item.scaned = false
+ }else if(type == 'child'){
+ console.log(ele)
+ ele.packList.splice(index,1)
+ if(ele.packList.length == 0){
+ ele.scaned = false
+ }
+ }
+ this.packingNumberList = []
+ this.detailSource.forEach(item=>{
+ item.subList.forEach(cur=>{
+ if(cur.packList.length>0){
+ cur.packList.forEach(i=>{
+ this.packingNumberList.push(i)
+ })
+ }
+ })
+ })
+ setTimeout(()=>{
+ this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
+ item.resizeCollapse()
+
+ item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{
+ cur.resize()
+ })
+ })
+ },500)
+ calcTreeHandleQty(this.detailSource);
},
scanLocationCode(location, code) {
if (this.jobContent.allowModifyLocation == 'TRUE') {
this.toLocationCode = code;
+ this.jobToLocationCode= code
} else {
if (code == this.jobToLocationCode) {
this.toLocationCode = code;
@@ -449,15 +636,16 @@
}
}
- // this.toLocationCode = code
- // this.detailSource.forEach(item => {
- // item.subList.forEach(detail => {
- // detail.toLocationCode = code
- // })
- // })
+ // this.toLocationCode = code
+ // this.detailSource.forEach(item => {
+ // item.subList.forEach(detail => {
+ // detail.toLocationCode = code
+ // })
+ // })
},
commit() {
+ this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
@@ -466,7 +654,29 @@
if (!this.checkLocation()) {
return
}
-
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+
+ //获取管理模式,封装参数
+ getManagementPrecisions(itemCodes, this.toLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
+ if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
+ this.checkBatch()
+ }else{
+ this.check()
+ }
+ } else {
+ uni.hideLoading();
+ this.showErrorMessage(res.message);
+ }
+ })
+ },
+ // 校验
+ check(){
//扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
this.submitJob();
@@ -476,6 +686,7 @@
//提交
this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
+
this.submitJob()
}
});
@@ -483,14 +694,78 @@
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
- this.openScanPopup();
+ this.openScanPopup(this.jobToLocationCode);
}
});
}
}
-
+
+ },
+ //按批次的校验
+ checkBatch(){
+ //扫描数量和任务数量相等,直接提交
+ let str = ''
+ let str1 = ''
+ let str2 = ''
+ this.detailSource.forEach((item) => {
+ item.subList.forEach(cur=>{
+ if(cur.scaned){
+ if(parseFloat(cur.qty)>parseFloat(cur.handleQty)){
+ str += `物料号【${item.itemCode}】批次【${cur.batch}】扫描数量【${cur.handleQty}】小于任务推荐数量【${cur.qty}】,\n请修改后再提交`
+ }
+ if(parseFloat(cur.qty) {
+ if (res) {
+ if(str2){
+ setTimeout(()=>{
+ this.$refs.comMessage.showQuestionMessage1(str2 + "是否提交?", 'red', res => {
+ if (res) {
+ this.submitJob()
+ }
+ });
+ },100)
+ }else{
+ this.submitJob()
+ }
+
+ }
+ });
+ } else {
+ //不允许部分提交,提示
+ this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
+ if (res) {
+ this.openScanPopup(this.jobToLocationCode);
+ }
+ });
+ }
+ }else{
+ this.submitJob();
+ }
},
-
reject() {
if (!this.reasonText) {
this.showMessage("请输入拒收原因")
@@ -519,130 +794,170 @@
}
})
},
-
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
- var itemCodes = []
- this.detailSource.forEach(item => {
- itemCodes.push(item.itemCode)
- })
-
-
- //获取管理模式,封装参数
- getManagementPrecisions(itemCodes, this.toLocationCode, res => {
- if (res.success) {
- this.managementList = res.list;
- var params = this.setParams();
- let that = this
- purchaseReceiptJobSubmit(params).then(res => {
- if (res.data) {
- let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单
- let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//是否显示采购收货检验指引单
- if (isCheckPrint1 && !isCheckPrint) {
+
+ var params = '';
+ if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
+ params = this.setParamsBatch()
+ }else{
+ params = this.setParams()
+ }
+ let that = this
+ console.log(877,params)
+ purchaseReceiptJobSubmit(params).then(res => {
+
+ if (res.data) {
+ let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单
+ let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//是否显示采购收货检验指引单
+ if (isCheckPrint1 && !isCheckPrint) {
+ uni.hideLoading()
+ // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
+ uni.redirectTo({
+ url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number
+ })
+ }else if(!isCheckPrint1 && !isCheckPrint){
+ this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
+ uni.hideLoading()
+ }else if(that.source_type!='TOOL'&&that.source_type!='Develop'){
+ // if (res.data == '打印任务已发送,等待打印机处理!') {
+ // this.showCommitSuccessMessage(res.data)
+ // const purchaseReceiptDetailPointParams = {
+ // printDeafult: this.printDeafult,
+ // templateDeafult: this.templateDeafult,
+ // }
+ // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams)
+ // } else {
+ // this.showErrorMessage(res.data)
+ // }
+
+ uni.showLoading({
+ title: "提交成功,将跳转到打印页面",
+ mask: true
+ });
+
+ // 获取上架任务
+ let timerCount = 0
+ const timer1 = setInterval(async () => {
+ if (timerCount == 15) {
+ clearInterval(timer1)
uni.hideLoading()
- // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
- uni.redirectTo({
- url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number
- })
- }else if(!isCheckPrint1 && !isCheckPrint){
- this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
- }else {
- // if (res.data == '打印任务已发送,等待打印机处理!') {
- // this.showCommitSuccessMessage(res.data)
- // const purchaseReceiptDetailPointParams = {
- // printDeafult: this.printDeafult,
- // templateDeafult: this.templateDeafult,
- // }
- // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams)
- // } else {
- // this.showErrorMessage(res.data)
- // }
- uni.showLoading({
- title: "提交成功,将跳转到打印页面",
- mask: true
- });
-
- // 获取上架任务
- let timerCount = 0
- const timer1 = setInterval(async () => {
- if (timerCount == 15) {
- clearInterval(timer1)
- uni.hideLoading()
- this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请")
- return;
+ this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请")
+ return;
+ }
+ await getPutawayJobList({
+ filters: [{
+ column: "purchaseReceiptRecordNumber",
+ action: "in",
+ value: res.data.number
+ }],
+ pageNo: 1,
+ pageSize: 1000,
+ }).then(res1 => {
+ timerCount = timerCount + 1
+ if (res1.data && res1.data.list && res1
+ .data
+ .list.length && (res1.data.total >= res
+ .data.detailCount)) {
+ uni.hideLoading()
+ clearInterval(timer1)
+ const dataParams = {
+ toLocationCode: res1.data.list[
+ 0]
+ .toLocationCode,
+ number: res1.data.list[0]
+ .number,
+ creator: res1.data.list[0]
+ .creator,
+ createTime: res1.data.list[0]
+ .createTime,
+ ids: res1.data.list.map(item =>
+ item.masterId).join(
+ ',')
}
- await getPutawayJobList({
- filters: [{
- column: "purchaseReceiptRecordNumber",
- action: "in",
- value: res.data.number
- }],
- pageNo: 1,
- pageSize: 1000,
- }).then(res1 => {
- timerCount = timerCount + 1
- if (res1.data && res1.data.list && res1
- .data
- .list.length && (res1.data.total >= res
- .data.detailCount)) {
- uni.hideLoading()
- clearInterval(timer1)
- const dataParams = {
- toLocationCode: res1.data.list[
- 0]
- .toLocationCode,
- number: res1.data.list[0]
- .number,
- creator: res1.data.list[0]
- .creator,
- createTime: res1.data.list[0]
- .createTime,
- ids: res1.data.list.map(item =>
- item.masterId).join(
- ',')
- }
- uni.hideLoading()
- if(!isCheckPrint1 && isCheckPrint){
- uni.redirectTo({
- url: '/pages/pointPutawayJob/index?data=' +
- encodeURIComponent(JSON.stringify(dataParams))
- })
- }else if(isCheckPrint1 && isCheckPrint){
- uni.redirectTo({
- url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number +
- '&data=' +
- encodeURIComponent(JSON.stringify(dataParams))
- })
- }
-
- }
- })
- }, 2000)
+ uni.hideLoading()
+ if(!isCheckPrint1 && isCheckPrint){
+ uni.redirectTo({
+ url: '/pages/pointPutawayJob/index?data=' +
+ encodeURIComponent(JSON.stringify(dataParams))
+ })
+ }else if(isCheckPrint1 && isCheckPrint){
+ uni.redirectTo({
+ url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number +
+ '&data=' +
+ encodeURIComponent(JSON.stringify(dataParams))
+ })
+ }
+
+ }
+ })
+ }, 2000)
- }
+ }else if(that.source_type=='TOOL'||that.source_type=='Develop'){
+ uni.hideLoading()
+ this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
+ }
- } else {
- this.showErrorMessage("提交失败[" + res.msg + "]")
- }
- }).catch(error => {
- uni.hideLoading()
- this.$refs.comMessage.showErrorMessage(error, res => {
- if (res) {
- navigateBack(1)
- }
- });
- })
} else {
- uni.hideLoading();
- this.showErrorMessage(res.message);
+ this.showErrorMessage("提交失败[" + res.msg + "]")
}
- });
+ }).catch(error => {
+ uni.hideLoading()
+ this.$refs.comMessage.showErrorMessage(error, res => {
+ if (res) {
+ navigateBack(1)
+ }
+ });
+ })
+
},
+ setParamsBatch() {
+ var subList = []
+ var createTime = getCurrDateTime();
+ var creator = this.$store.state.user.id
+console.log(8787,this.detailSource)
+ this.detailSource.forEach(item => {
+ let obj = ''
+ item.subList.forEach(detail => {
+ // if (!detail.scaned) {
+ // detail.handleQty = 0
+ // }
+ if(detail.scaned){
+ detail.packList.forEach(pack => {
+ obj= {...item,...detail, ...pack}
+ obj.toLocationCode = detail.toLocationCode
+ if (!pack.scaned) {
+ pack.handleQty = 0
+ }
+ obj.toPackingNumber =pack.packingNumber
+ // obj.packingNumber = ''
+ delete obj.subList
+ delete obj.packList
+ subList.push(obj)
+ })
+ // // obj.packList = []
+ // obj.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode
+ var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch);
+ // console.log(info)
+ // obj.toPackingNumber =info.packingNumber;
+ // obj.packingNumber = info.packingNumber;
+ // obj.formPackingNumber = info.packingNumber;
+ obj.toBatch = info.batch;
+ }
+
+ })
+ })
+
+ this.jobContent.subList = subList
+ this.jobContent.createTime = createTime;
+ this.jobContent.creator = creator;
+ return this.jobContent;
+ },
setParams() {
var subList = []
var createTime = getCurrDateTime();
@@ -660,9 +975,7 @@
})
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
- detail.toPackingNumber = info.packingNumber;
- detail.packingNumber = info.packingNumber;
- detail.formPackingNumber = info.packingNumber;
+ detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
subList.push(detail)
})
@@ -731,6 +1044,7 @@
})
})
+ this.scanCount = getScanCount(this.detailSource);
calcHandleQty(this.detailSource);
} else {
this.$refs.comMessage.showQuestionMessage("是否要关闭整单收货?", res => {
@@ -773,7 +1087,8 @@
},
openScanPopup() {
- this.$refs.scanPopup.openScanPopup();
+ // 第一个参数是库位查精度,第二个参数是判断是否走包装信息接口
+ this.$refs.scanPopup.openScanPopup(this.jobToLocationCode,true);
},
closeScanPopup() {
diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue
index cb517066..11fb464a 100644
--- a/src/pages/purchaseReceipt/job/receiptJob.vue
+++ b/src/pages/purchaseReceipt/job/receiptJob.vue
@@ -20,7 +20,7 @@
-
+
@@ -78,7 +78,9 @@
status: '1,2', //待处理 、进行中
detailOptions: [],
detailGiveupOptions: [],
- scanMessage: ""
+ scanMessage: "",
+ manageModel:import.meta.env.VITE_MANAGE_MODEL,
+ scanHintTitle:""
};
},
@@ -99,6 +101,10 @@
title: {
type: String,
default: ''
+ },
+ source_type: {
+ type: String,
+ default: ''
},
},
@@ -153,6 +159,12 @@
this.getList("more");
},
refresh() {
+ if(this.manageModel=='BY_BATCH'){
+ this.scanHintTitle="ASN单号"
+ }else {
+ this.scanHintTitle="箱标签/ASN单号"
+ }
+
this.getList('refresh');
},
openFilter() {
@@ -176,7 +188,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
@@ -190,7 +202,15 @@
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
- })
+ })
+ if(this.source_type){
+ filters.push({
+ column: "source_type",
+ action: "==",
+ value: this.source_type
+ })
+ }
+
var params = {
filters: filters,
@@ -290,7 +310,7 @@
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
- .operation + '&scanMessage=' + scanMessage
+ .operation + '&scanMessage=' + scanMessage + '&source_type=' + this.source_type + '&title=' + this.title
});
this.scanMessage = ""
},
@@ -397,6 +417,10 @@
value: this.$store.state.user.id
}]
} else {
+ if(this.manageModel=="BY_BATCH"){
+ this.showMessage("请扫描ASN单号")
+ return;
+ }
filters = [{
column: "packingNumber",
action: "in",
diff --git a/src/pages/purchaseReturn/job/returnJob.vue b/src/pages/purchaseReturn/job/returnJob.vue
index c9761207..86572ea5 100644
--- a/src/pages/purchaseReturn/job/returnJob.vue
+++ b/src/pages/purchaseReturn/job/returnJob.vue
@@ -136,7 +136,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/purchaseReturn/job/returnJob_0904.vue b/src/pages/purchaseReturn/job/returnJob_0904.vue
index 97f80e7c..2ab89e75 100644
--- a/src/pages/purchaseReturn/job/returnJob_0904.vue
+++ b/src/pages/purchaseReturn/job/returnJob_0904.vue
@@ -134,7 +134,7 @@
if (this.checkedToday) {
filters.push({
column: "create_time",
- action: "betweeen",
+ action: "between",
value: this.todayTime
})
}
diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue
index b298b7c0..c07d41f9 100644
--- a/src/pages/putaway/job/putawayDetail.vue
+++ b/src/pages/putaway/job/putawayDetail.vue
@@ -16,14 +16,15 @@
-
-
+
@@ -31,7 +32,8 @@