From ed5d2e831b337cc9f2865b5c51225726e3cceffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=83=9C=E6=A5=A0?= <2792649152@qq.com> Date: Fri, 24 Nov 2023 09:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E7=BB=93=E7=AE=97=E7=94=B3?= =?UTF-8?q?=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onlinesettlementRequestMain/index.vue | 18 ++++++-- .../onlinesettlementRequestMain.data.ts | 46 ++++++++++++++++++- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index ad60c2fdf..151aeaad1 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -82,6 +82,7 @@ import { OnlinesettlementRequestMain,OnlinesettlementRequestMainRules,Onlinesett import * as OnlinesettlementRequestMainApi from '@/api/wms/onlinesettlementRequestMain' import * as OnlinesettlementRequestDetailApi from '@/api/wms/onlinesettlementRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import * as SupplieritemApi from '@/api/wms/supplieritem' // 上线结算申请 defineOptions({ name: 'OnlinesettlementRequestMain' }) @@ -114,7 +115,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] + row[formField] = val[0][searchField] //row['poLine'] = val[0]['poLine'] //row['batch'] = val[0]['toBatch'] //row['altBatch'] = val[0]['altBatch'] @@ -127,10 +128,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => //row['uom'] = val[0]['uom'] } else { const setV = {} - setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] - formRef.setValues(setV) + SupplieritemApi.getSupplieritemPage({ + supplierCode: val[0]['supplierCode'], + itemCode: val[0]['itemCode'] + }).then(res => { + if(res?.list[0]?.settlementType == 'ONLINE'){ + setV['issueRecordNumber'] = val[0]['number'] + formRef.setValues(setV) + } else{ + message.error('找不到对应的结算方式') + } + }) } }) } diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts index 1442f3a29..642144188 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts @@ -1,8 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as IssueRecordDetailApi from '@/api/wms/issueRecordDetail' +import { IssueRecordDetail } from '../../issue/issueRecordMain/issueRecordMain.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -29,6 +33,17 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive width: 150 }, isSearch: true, + form: { + labelMessage: '该记录中物料代码、供应商代码会影响单号的选择,请在供应商物品信息中维护', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发料记录单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '发料记录', // 查询弹窗标题 + searchAllSchemas: IssueRecordDetail.allSchemas, // 查询弹窗所需类 + searchPage: IssueRecordDetailApi.getIssueRecordDetailPage, // 查询弹窗所需分页方法 + } + } }, { label: '仓库代码', @@ -332,6 +347,35 @@ export const OnlinesettlementRequestDetail = useCrudSchemas(reactive