From b8093a2bc3c9534afa04e2160a38fdb2eabf48e0 Mon Sep 17 00:00:00 2001 From: FCD <2453864257@qq.com> Date: Mon, 16 Jun 2025 09:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=94=B6=E8=B4=A7=E6=94=B9=E4=B8=BA103=E6=9A=82?= =?UTF-8?q?=E6=94=B6=E3=80=81=E6=96=B0=E5=A2=9E105=E8=BF=87=E8=B4=A6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/wms/Raw/ReceivePO/index.vue | 82 +++++++++++++++++++++++- src/pages/wms/Raw/ReceivePO/model.ts | 13 ++++ src/pages/wms/Raw/ReceiveSRM/index.vue | 88 ++++++++++++++++++++++++-- src/pages/wms/Raw/ReceiveSRM/model.ts | 13 ++++ src/utils/url.ts | 2 + 5 files changed, 190 insertions(+), 8 deletions(-) diff --git a/src/pages/wms/Raw/ReceivePO/index.vue b/src/pages/wms/Raw/ReceivePO/index.vue index 03e4a5f..d08ad90 100644 --- a/src/pages/wms/Raw/ReceivePO/index.vue +++ b/src/pages/wms/Raw/ReceivePO/index.vue @@ -137,11 +137,14 @@ - - 确认收货 + + 103暂收 + + + 105过账 - + 返回 @@ -157,6 +160,7 @@ import jPicker from '@/components/J-Picker/jPicker.vue'; import model from './model'; import { session } from '@/store/modules/session'; import dayjs from 'dayjs'; +import { removeLeadingZeros } from '@/utils/tool'; interface OptionType { label: string; value: string; @@ -233,6 +237,13 @@ export default class receivePO extends BasePage { oldprodlist: any = []; oncefouces = true; twofouces = false; + isDisabled105 = false; + showStatus105 = false; + contentStatus150 = ''; + qualityStatusCo = { + Y: '检验合格', + N: '检验不合格', + }; async onReady() { //await this.model.Stashlist(); //this.whList = model.DictTypeList; @@ -516,6 +527,71 @@ export default class receivePO extends BasePage { type: 'success', }); } + + /** + * 105过账按钮 + * **/ + async handelSubmit105() { + this.isDisabled105 = true; + const list = this.list; + let params: any = []; + if (list.length > 0) { + for (const item of list) { + if (!item.orderStatus || item.orderStatus === '0') { + (this.$refs.uToast as any).show({ + title: '请先完成收货!', + type: 'default', + duration: 3000, + }); + this.isDisabled105 = false; + return; + } + + //待检、不合格不在手持机上过账 + if (!item.qualityStatus || item.qualityStatus === 'N') { + this.contentStatus150 = '采购单号:' + item.procureCode + ',物料编码:' + removeLeadingZeros(item.materialCode) + ',' + (this.qualityStatusCo[item.qualityStatus] || '未检验'); + this.showStatus105 = true; + this.isDisabled105 = false; + return; + } + + //rawOrderInId不为空 + if (item.rawOrderInId) { + params.push({ id: item.rawOrderInId }); + } + } + + if (params.length > 0) { + //去重 + params = params.filter((item: any, index: any, self: any) => self.findIndex((t: { [x: string]: any }) => t['id'] === item['id']) === index); + + await this.model.sap105temporarilyCollected(params); + this.isDisabled105 = false; + if (this.model.sap105code + '' === '200') { + (this.$refs.uToast as any).show({ + title: this.model.sap105msg, + type: 'primary', + duration: 6000, + }); + } + await this.query(); + } else { + this.isDisabled105 = false; + (this.$refs.uToast as any).show({ + title: '无可过账数据', + type: 'default', + duration: 3000, + }); + } + } else { + this.isDisabled105 = false; + (this.$refs.uToast as any).show({ + title: '未选择数据', + type: 'default', + duration: 3000, + }); + } + } }