From 20a7373f6a6d827fdf4497236755f78ea2bb8df5 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 21 Dec 2023 16:59:35 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/httpRequest3.js | 14 +- .../coms/comReturnDetailCard.vue | 148 ++++++++++++++++++ .../coms/returnDetailInfoPopup.vue | 68 ++++++++ pages/productionReturn/job/returnDetail.vue | 51 ++++-- pages/repleinsh/job/repleinshDetail.vue | 3 +- pages/unPlanned/job/receiptJobDetail.vue | 2 +- static/config.json | 2 +- 7 files changed, 264 insertions(+), 24 deletions(-) create mode 100644 pages/productionReturn/coms/comReturnDetailCard.vue create mode 100644 pages/productionReturn/coms/returnDetailInfoPopup.vue diff --git a/api/httpRequest3.js b/api/httpRequest3.js index d51a546d..aeec1a3e 100644 --- a/api/httpRequest3.js +++ b/api/httpRequest3.js @@ -27,27 +27,27 @@ function service(options = {}) { if(res.data.code==0){ resolve(res.data); }else { - reject( res.data.msg) + reject("系统:"+res.data.msg) } }else { - reject( res.data.msg) + reject("系统:"+ res.data.msg) } } else { - reject(res.data.msg) + reject("系统:"+res.data.msg) } }; options.fail = (error) => { var message = error.errMsg if (message === 'Network Error') { - message = '后端接口连接异常' + message = '接口连接异常' } else if (message.includes('timeout')) { - message = '系统接口请求超时' + message = '接口请求超时' } else if (message.includes('Request failed with status code')) { - message = '系统接口' + message.substr(message.length - 3) + '异常' + message = '接口' + message.substr(message.length - 3) + '异常' } - reject(message); + reject("系统:"+message); }; uni.request(options); }); diff --git a/pages/productionReturn/coms/comReturnDetailCard.vue b/pages/productionReturn/coms/comReturnDetailCard.vue new file mode 100644 index 00000000..1aff431e --- /dev/null +++ b/pages/productionReturn/coms/comReturnDetailCard.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/pages/productionReturn/coms/returnDetailInfoPopup.vue b/pages/productionReturn/coms/returnDetailInfoPopup.vue new file mode 100644 index 00000000..d01fcc04 --- /dev/null +++ b/pages/productionReturn/coms/returnDetailInfoPopup.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue index ac488a07..42a8aa97 100644 --- a/pages/productionReturn/job/returnDetail.vue +++ b/pages/productionReturn/job/returnDetail.vue @@ -7,17 +7,37 @@ 申请单号 : {{jobContent.requestNumber}} - - + + + + 车间 + {{jobContent.workshopCode}} + + + 生产线 + {{titleInfo.productionLineCode}} + + + 工位 + {{ titleInfo.workStationCode }} + + + 原材料库 + {{ titleInfo.toLocationCode}} + + + + + + - - + + @@ -29,8 +49,8 @@ style="background-color:ghostwhite; width: 100%; "> + :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode' + :locationTypeList="toLocationTypeList"> @@ -78,7 +98,7 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" - import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" + import comReturnDetailCard from "@/pages/productionReturn/coms/comReturnDetailCard.vue" import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue' import comMessage from '@/mycomponents/common/comMessage.vue' import jobTop from '@/mycomponents/job/jobTop.vue' @@ -91,7 +111,7 @@ requiredLocation, // winScanPackAndLocation, winScanPack, - comDetailCard, + comReturnDetailCard, detailInfoPopup, comMessage, jobTop @@ -109,9 +129,10 @@ detailSource: [], //绑定在页面上的数据源 fromLocationCode: '', toLocationCode: '', - tolocationTypeList: [], + toLocationTypeList: [], toLocationInfo: {}, - businessTypeInfo: {} + businessTypeInfo: {}, + titleInfo: "" }; }, onLoad(option) { @@ -192,6 +213,7 @@ that.fromLocationCode = that.subList[0].fromLocationCode that.toLocationCode = that.subList[0].toLocationCode that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) + that.titleInfo = that.subList[0]; } else { that.showMessage('列表数据为0'); } @@ -278,11 +300,12 @@ } else { itemDetail.scaned = true; itemDetail.handleQty = Number(result.package.qty) + itemDetail.inventoryStatus = "OK" itemDetail.stdPackQty = result.package.stdPackQty itemDetail.stdPackUnit = result.package.stdPackUnit this.calcHandleQty(); - - + + //合格退料时不能查库存余额,因为生产退料时新生成的批次是000000 --nxt // let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); // let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index 08437cf9..a4a1f3ed 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -57,7 +57,7 @@ getDirectoryItemArray, getPackingNumberAndBatch, } from '@/common/basic.js'; - + import { getDataSource } from '@/pages/issue/js/issue.js'; @@ -198,6 +198,7 @@ submit() { + uni.showLoading({ title: "提交中....", mask: true diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index 43ae3769..a8a18ab0 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -87,7 +87,6 @@ data() { return { id: '', - receiptJob: {}, received: false, scanCount: 0, jobContent: {}, //任务内容 @@ -231,6 +230,7 @@ itemDetail.scaned = true; itemDetail.handleQty = Number(result.label.qty); itemDetail.toLocationCode = this.toLocationCode; + itemDetail.stdPackQty = result.package.stdPackQty itemDetail.labelQty = Number(result.label.qty); calcHandleQty(this.detailSource); this.continueScan() diff --git a/static/config.json b/static/config.json index f1ce854b..7426682e 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.180:12080/admin-api", + "value": "http://dev.ccwin-in.com:25100/api/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api", From 4045a0db9c34b1ddb8f36d5f6747191853c19a55 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 21 Dec 2023 17:41:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/scrap/record/scrapRecord.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pages/scrap/record/scrapRecord.vue b/pages/scrap/record/scrapRecord.vue index 6b54bdbd..9150d69f 100644 --- a/pages/scrap/record/scrapRecord.vue +++ b/pages/scrap/record/scrapRecord.vue @@ -119,7 +119,7 @@ this.tolocationTypeList = res.tolocationTypeList; this.showFromLocationPopup(); } else { - this.$refs.comMessage.showBreakMessage(res.message ); + this.showErrorMessage(res.message) } }); @@ -250,11 +250,12 @@ title: "提交中....", mask: true }); - + var params = this.setParams() + console.log("提交参数", JSON.stringify(params)); scrapRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成报废出库记录" + res.data) + this.showCommitSuccessMessage("提交成功
生成报废出库记录
" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } @@ -267,6 +268,7 @@ setParams() { var subList = [] + var creator = this.$store.state.user.id this.detailSource.forEach(item => { item.subList.forEach(detail => { if (detail.scaned) { @@ -294,7 +296,10 @@ } }) }) - return subList; + this.dataContent.subList =subList + this.dataContent.creator = creator; + return this.dataContent; + }, From c4a45492ed4f99ab6a8d7173ac5c31bb1b2c7ba9 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 21 Dec 2023 18:36:17 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request2.js | 6 +++--- pages/unPlanned/record/issueRecord.vue | 28 +++++++++++++++----------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/api/request2.js b/api/request2.js index 9d8a3a71..b1088156 100644 --- a/api/request2.js +++ b/api/request2.js @@ -1376,7 +1376,7 @@ export function unPlannedReceiptRequestHandle(id) { * 计划外入库记录 提交 * @param {*} params */ -export function unPlannedReceiptRecordbSubmit(id, params) { +export function unPlannedReceiptRecordbSubmit(params) { return request({ url: baseApi + "/wms/unplannedreceipt-record-main/create", method: "post", @@ -1531,8 +1531,8 @@ export function unPlannedIssueRequestHandle(id) { */ export function unPlannedIssueRecordSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", - method: "put", + url: baseApi + "/wms/unplannedissue-record-main/create", + method: "post", data: params, }); } diff --git a/pages/unPlanned/record/issueRecord.vue b/pages/unPlanned/record/issueRecord.vue index 5f038671..c134f140 100644 --- a/pages/unPlanned/record/issueRecord.vue +++ b/pages/unPlanned/record/issueRecord.vue @@ -218,21 +218,22 @@ } var params =this.setParams() console.log("提交" + JSON.stringify(params)) - // unPlannedIssueRecordSubmit(params).then(res => { - // uni.hideLoading() - // if (res.data) { - // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, ) - // } else { - // this.showErrorMessage("提交失败[" + res.msg + "]") - // } - // }).catch(error => { - // uni.hideLoading() - // this.showErrorMessage(error) - // }) + unPlannedIssueRecordSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成采购收货记录
" + res.data ) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) }, setParams() { var subList = [] + var creator = this.$store.state.user.id this.detailSource.forEach(item => { item.subList.forEach(detail => { if (detail.scaned) { @@ -260,7 +261,10 @@ } }) }) - return subList; + + this.dataContent.subList = subList; + this.dataContent.creator = creator; + return this.dataContent; }, reasonChange(e) { From bd7543f09d284a5b42f09d19e1f506efb558ffa3 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 21 Dec 2023 19:59:07 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=A5=E6=96=99?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8F=90=E4=BA=A4=E6=89=AB=E6=8F=8F=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/productionReturn/coms/comReturn.vue | 3 +-- pages/repleinsh/job/repleinshDetail.vue | 27 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/pages/productionReturn/coms/comReturn.vue b/pages/productionReturn/coms/comReturn.vue index 2915c41d..a64553a4 100644 --- a/pages/productionReturn/coms/comReturn.vue +++ b/pages/productionReturn/coms/comReturn.vue @@ -107,7 +107,6 @@ data() { return { id: '', - scanCount: 0, dataContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 @@ -297,7 +296,7 @@ productionReturnRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成制品收货记录
" + res.data) + this.showCommitSuccessMessage("提交成功
生成退料收货记录
" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index a4a1f3ed..429f3377 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -173,7 +173,6 @@ that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.detailSource = getDataSource(that.detailSource, that.subList) that.resizeCollapse(); - uni.hideLoading(); } else { that.showMessage('列表数据为0'); } @@ -198,7 +197,11 @@ submit() { - + var scanCount= this.getScanCount(this.subList); + if(scanCount==0){ + this.showErrorMessage("扫描数为0,请先扫描") + return; + } uni.showLoading({ title: "提交中....", mask: true @@ -237,7 +240,7 @@ repleinshJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成补料记录" + res.data) + this.showCommitSuccessMessage("提交成功
生成补料记录
" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") } @@ -432,6 +435,24 @@ }) }, + getScanCount(subList){ + var scanCount = 0; + this.detailSource.forEach(toLocationCode => { + toLocationCode.Items.forEach(item => { + item.Locations.forEach(fromLocation => { + fromLocation.Batchs.forEach(batch => { + let subItem = batch.detail; + if (batch.Records.length > 0) { + scanCount+=batch.Records.length + } + }) + }) + }) + }) + return scanCount; + } + + } }; From 97f7bc486d9589cb2db3e5a17ca24fda76cd53bb Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 22 Dec 2023 09:33:45 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B6=E5=93=81?= =?UTF-8?q?=E5=8F=91=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/scan/winScanPackAndLocation.vue | 2 +- pages/deliver/job/deliverDetail.vue | 56 +++++++++++--------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue index 98d9f6f0..222e1ef4 100644 --- a/mycomponents/scan/winScanPackAndLocation.vue +++ b/mycomponents/scan/winScanPackAndLocation.vue @@ -97,7 +97,7 @@ }, headerType: { type: String, - default: "HPQ" + default: "HPQ,HMQ" }, }, data() { diff --git a/pages/deliver/job/deliverDetail.vue b/pages/deliver/job/deliverDetail.vue index eb804fbb..6d090fa0 100644 --- a/pages/deliver/job/deliverDetail.vue +++ b/pages/deliver/job/deliverDetail.vue @@ -1,30 +1,31 @@