From ec66fc3df6f44bcadb3b2f7a4ed629a93aab4749 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 9 Sep 2024 13:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98=E6=98=BE?= =?UTF-8?q?=E7=A4=BA2024/7/18=2010:33:31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 17 + src/common/basic.js | 17 +- src/common/style/new_style.css | 19 +- src/pages.json | 32 ++ src/pages/fg/coms/comReceiptPopup.vue | 466 +++++++++--------- src/pages/fg/receiptByPlan.vue | 176 ++++++- .../job/ccProductReceiptDetail.vue | 134 ++--- .../job/ccProductReceiptJob.vue | 12 +- .../coms/comReturnRequestCard.vue | 2 +- .../purchaseReturn/record/returnRecord.vue | 4 + .../request/returnRequestCreate.vue | 2 + 11 files changed, 571 insertions(+), 310 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index c4a89c64..84c1664b 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -2630,4 +2630,21 @@ export function getBalanceByParams(data) { export function getBusinessType() { return http.get("/wms/businesstype/page?pageSize=1000&pageNo=1") +} +/** + * 获取生产计划信息通过生产线和日期 + * @param {*} + */ + +export function getPlaneInfoByproductLine(productionLine,planDate) { + return http.get("/wms/production-main/getPlanProductionByProductionLineAndPlanDate?productionLine="+productionLine+"&planDate="+planDate) +} + +/** + * 按 + * @param {*} + */ + +export function planReceiptSubmit(data) { + return http.post("/wms/production-main/getPlanProductionByProductionLineAndPlanDate",data) } \ No newline at end of file diff --git a/src/common/basic.js b/src/common/basic.js index 213ca785..2ed70ee4 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -37,6 +37,7 @@ export function clearCacheData() { scrapReasonList = []; inspectFailedReasonList = []; switchList=[] + businessList = [] } @@ -352,8 +353,8 @@ export function getSwitchInfoByCode(code) { break; } } - isCheck =resultInfo.effectiveSetValue=="TRUE"?true:false - return isCheck; + isCheck = resultInfo.effectiveSetValue == "TRUE" ? true : false + return isCheck; } //获取业务类型名称 @@ -857,6 +858,18 @@ export function getBatch() { var batch = year.toString() + month.toString() + day.toString() return batch; } +//20270717 +export function getBatch8() { + var date = new Date(); + //获取日期部分 + var year = date.getFullYear(); //年 + var month = date.getMonth() + 1; //月 + var day = date.getDate(); //日 + + month = month < 10 ? "0" + month : month; + day = day < 10 ? "0" + day : day; + return year + month + day; +} export function getCurrDate() { var date = new Date(); diff --git a/src/common/style/new_style.css b/src/common/style/new_style.css index 3808b7c6..33875327 100644 --- a/src/common/style/new_style.css +++ b/src/common/style/new_style.css @@ -2448,7 +2448,24 @@ button[disabled] { padding-right: 20rpx; z-index: 10; } - +.btn_single_clear{ + background-color: #fff; + font-size: 30rpx; + color: #000; + text-align: center; + width: 180rpx; +} + +.btn_single_clear{ + background-color: #fff; + font-size: 30rpx; + color: #000; + text-align: center; + width: 180rpx; +} +.btn_clear_after { + opacity: 0.7; +} .btn_single_commit { background-color: #3C9CFF; font-size: 30rpx; diff --git a/src/pages.json b/src/pages.json index 3877c7d9..1c85e701 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1009,7 +1009,39 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/productReceipt/job/ccProductReceiptJob", + "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/productReceipt/job/ccProductReceiptDetail", + "style": { + "navigationBarTitleText": "装配完工收货详情", + "enablePullDownRefresh": false + } + }, { "path": "pages/productReceipt/job/scrapReceiptJob", "style": { diff --git a/src/pages/fg/coms/comReceiptPopup.vue b/src/pages/fg/coms/comReceiptPopup.vue index 212edaec..f6324b35 100644 --- a/src/pages/fg/coms/comReceiptPopup.vue +++ b/src/pages/fg/coms/comReceiptPopup.vue @@ -12,39 +12,62 @@ - - - 生产线: + + 生产线: + + {{ productionLineName }} + - + - - 物料: - + + 物料代码: + {{ itemCode }} + - + - - - 数量: - - - - () + + 批次: + + + + + + + + 计划数量: + + {{ planQty }} + + + + + 包装规格: + + {{ packUnit }} + + + + + + + + @@ -54,14 +77,16 @@ - diff --git a/src/pages/productReceipt/job/ccProductReceiptDetail.vue b/src/pages/productReceipt/job/ccProductReceiptDetail.vue index ce948f16..a3980809 100644 --- a/src/pages/productReceipt/job/ccProductReceiptDetail.vue +++ b/src/pages/productReceipt/job/ccProductReceiptDetail.vue @@ -83,6 +83,10 @@ import winScanPack from '@/mycomponents/scan/winScanPack.vue' import comDetailCard from '@/mycomponents/detail/comDetailCard.vue' import jobTop from '@/mycomponents/job/jobTop.vue' import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' + +import { useCountStore } from '@/store' +// 获取自定义的store +const store = useCountStore() const id= ref('') const receiptJob= ref({}) const toLocationCode= ref('') @@ -102,10 +106,12 @@ const scanPopup= ref() const comMessageRef= ref() onLoad((option)=> { + setTimeout(res=>{ uni.setNavigationBarTitle({ title: `${option.title}详情` }) + },50) id.value = option.id scanedPackingNumber.value = option.scaned || '' status.value = option.status || '' @@ -282,7 +288,7 @@ const comMessageRef= ref() } const showMessageHint(hint, callback) { - this.$refs.comMessage.showErrorMessage(hint, (res) => { + comMessageRef.value.showErrorMessage(hint, (res) => { if (res) { callback() } @@ -290,39 +296,39 @@ const comMessageRef= ref() } const commit=() =>{ scanCount.value = getScanCount(subList.value) - if (this.scanCount == 0) { - this.showErrorMessage('扫描数为0,请先扫描') + if (scanCount.value == 0) { + showErrorMessage('扫描数为0,请先扫描') return } // 校验库位、 - if (!this.checkLocation()) { + if (!checkLocation()) { return } // 扫描数量和任务数量相等,直接提交 - if (this.scanCount == this.subList.length) { - if (this.checkCount()) { - this.submitJob() + if (scanCount.value == subList.value.length) { + if (checkCount()) { + submitJob() } - } else if (this.scanCount < this.subList.length) { + } else if (scanCount.value < subList.value.length) { // 扫描数量小于任务数量,判断是否允许部分提交 - if (this.jobContent.allowPartialComplete == 'TRUE') { + if (jobContent.value.allowPartialComplete == 'TRUE') { // 提交 - if (this.checkCount()) { - this.submitJob() + if (checkCount()) { + submitJob() } } else { // 不允许部分提交,提示 - this.showMessage('请完成扫描后,再进行提交
' + `已经扫描[${this.scanCount}]总共[${this.subList.length}]`) + showMessage('请完成扫描后,再进行提交
' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`) } } - }, + } - checkCount() { + const checkCount=()=> { let isCheck = true let hint = '' - for (let i = 0; i < this.detailSource.length; i++) { - const item = this.detailSource[i] + for (let i = 0; i < detailSource.value.length; i++) { + const item =detailSource.value[i] for (let j = 0; j < item.subList.length; j++) { const subItem = item.subList[i] if (calc.sub(subItem.handleQty, subItem.qty) < 0) { @@ -333,120 +339,118 @@ const comMessageRef= ref() } } if (!isCheck) { - this.showQuestMessage(hint, (res) => { + showQuestMessage(hint, (res) => { if (res) { - this.submitJob() + submitJob() } }) } return isCheck - }, + } - submitJob() { + const submitJob=() =>{ uni.showLoading({ title: '提交中....', mask: true }) const itemCodes = [] - this.detailSource.forEach((item) => { + detailSource.value.forEach((item) => { itemCodes.push(item.itemCode) }) - getManagementPrecisions(itemCodes, this.toLocationCode, (res) => { + getManagementPrecisions(itemCodes,toLocationCode.value, (res) => { if (res.success) { - this.managementList = res.list - const params = this.setParams() - console.log('提交参数', JSON.stringify(params)) + managementList.value = res.list + const params = setParams() ccProductReceiptJobsubmit(params) .then((res) => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage(`提交成功
生成预生产收货记录
${res.data}`) + showCommitSuccessMessage("提交成功
生成装配收货记录
" + res.data ) } else { - this.showErrorMessage(`提交失败[${res.msg}]`) + showErrorMessage(`提交失败[${res.msg}]`) } }) .catch((error) => { uni.hideLoading() - this.showErrorMessage(error) + showErrorMessage(error) }) } else { uni.hideLoading() - this.showErrorMessage(res.message) + showErrorMessage(res.message) } }) - }, + } - setParams() { + const setParams=() =>{ const subList = [] - const creator = this.$store.state.user.id + const creator = store.id - this.detailSource.forEach((item) => { + detailSource.value.forEach((item) => { item.subList.forEach((detail) => { if (detail.scaned) { - const info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.packingNumber, detail.batch) + const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) detail.toPackingNumber = info.packingNumber detail.toBatch = info.batch detail.toContainerNumber = '' detail.toInventoryStatus = detail.inventoryStatus - detail.toLocationCode = this.toLocationCode + detail.toLocationCode =toLocationCode.value subList.push(detail) } }) }) - this.jobContent.subList = subList - this.jobContent.creator = creator - return this.jobContent - }, - - scanPopupGetFocus() { - if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.getfocus() + jobContent.value.subList = subList + jobContent.value.creator = creator + return jobContent.value + } + + const scanPopupGetFocus=() =>{ + if (scanPopup.value != undefined) { + scanPopup.value.getfocus() } - }, + } - scanPopupLoseFocus() { - if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.losefocus() + const scanPopupLoseFocus=()=> { + if (scanPopup.value != undefined) { + scanPopup.value.losefocus() } - }, + } - showMessage(message) { + const showMessage=(message)=> { setTimeout((r) => { - this.scanPopupLoseFocus() - this.$refs.comMessage.showMessage(message, (res) => { + scanPopupLoseFocus() + comMessageRef.value.showMessage(message, (res) => { if (res) { - this.scanPopupGetFocus() + scanPopupGetFocus() } }) }) - }, + } - showErrorMessage(message) { + const showErrorMessage=(message)=> { setTimeout((r) => { - this.scanPopupLoseFocus() - this.$refs.comMessage.showErrorMessage(message, (res) => { + scanPopupLoseFocus() + comMessageRef.value.showErrorMessage(message, (res) => { if (res) { - this.scanPopupGetFocus() + scanPopupGetFocus() } }) }) - }, + } - showCommitSuccessMessage(hint) { - this.$refs.comMessage.showSuccessMessage(hint, (res) => { + const showCommitSuccessMessage=(hint) =>{ + comMessageRef.value.showSuccessMessage(hint, (res) => { navigateBack(1) }) - }, - showQuestMessage(hint, callBack) { - this.$refs.comMessage.showQuestionMessage(hint, (res) => { + } + const showQuestMessage=(hint, callBack) =>{ + comMessageRef.value.showQuestionMessage(hint, (res) => { if (res) { callBack(true) } }) } - } -} + diff --git a/src/pages/productReceipt/job/ccProductReceiptJob.vue b/src/pages/productReceipt/job/ccProductReceiptJob.vue index 85be9d5a..f8099cc7 100644 --- a/src/pages/productReceipt/job/ccProductReceiptJob.vue +++ b/src/pages/productReceipt/job/ccProductReceiptJob.vue @@ -28,7 +28,7 @@