From 86f49fc91c8fd8380f11300e98efde066e6edbdf Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 15 Jan 2024 08:46:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/itembasic/index.ts | 10 ++++++++ .../wms/supplierdeliverRecordMain/index.ts | 9 +++++-- src/components/Detail/src/Detail.vue | 15 ++++++++++++ .../deliverRequestMain.data.ts | 14 ++--------- .../deliver/deliverRequestMain/index.vue | 24 +++++++++++-------- .../inventorymoveRequestMain/index.vue | 16 +++++++++++++ .../inventorymoveRequestMain.data.ts | 21 ++++++++-------- .../purchaseMain/purchaseMain.data.ts | 10 +++++--- .../supplierdeliverRequestMain/index.vue | 21 ++++++++++++++++ .../supplierdeliverRequestMain.data.ts | 5 ++++ 10 files changed, 108 insertions(+), 37 deletions(-) diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts index 1575fd5c7..9faaeaadb 100644 --- a/src/api/wms/itembasic/index.ts +++ b/src/api/wms/itembasic/index.ts @@ -78,3 +78,13 @@ export const importTemplate = () => { } // 导入地址 export const importUrl = '/wms/itembasic/import' + +// 查询物品基本信息列表 +export const selectItembasicPageToFgAndSemibasicPage = async (params) => { + if (params.isSearch) { + const data = {...params} + return request.post({ url: '/wms/itembasic/itembasicPageToFgAndSemiSenior', data }) + } else { + return await request.get({ url: `/wms/itembasic/ItembasicPageToFgAndSemi`, params }) + } +} \ No newline at end of file diff --git a/src/api/wms/supplierdeliverRecordMain/index.ts b/src/api/wms/supplierdeliverRecordMain/index.ts index 1b1fce246..c205031cc 100644 --- a/src/api/wms/supplierdeliverRecordMain/index.ts +++ b/src/api/wms/supplierdeliverRecordMain/index.ts @@ -66,8 +66,13 @@ export const deleteSupplierdeliverRecordMain = async (id: number) => { // 导出供应商发货记录主 Excel export const exportSupplierdeliverRecordMain = async (params) => { - return await request.download({ url: `/wms/supplierdeliver-record-main/export-excel`, params }) -} + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/supplierdeliver-record-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/supplierdeliver-record-main/export-excel`, params }) + } + } // 下载用户导入模板 export const importTemplate = () => { diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index a013d3127..c63305294 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -434,6 +434,12 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: defaultButtons.defaultFilterBtn(null) // 筛选 ] } + //发货申请详情筛选 + if (props.fromeWhere == 'DeliverRequestMain') { + HeadButttondata.value = [ + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + } } // 动态显示操作列按钮 @@ -448,6 +454,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: ...props.buttondataTable ] } + //发货申请详情筛选 + if (props.fromeWhere == 'DeliverRequestMain') { + buttondata.value = [...[ + defaultButtons.mainListEditBtn({ + hide: isShowMainButton(row, ["1"]) + })], // 编辑 + ...props.buttondataTable + ] + } } finally { detailLoading.value = false } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index f34181dc2..5d9850aa1 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -645,12 +645,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ searchField: 'code', searchTitle: '物品基础信息', searchAllSchemas: Itembasic.allSchemas, - searchPage: ItembasicApi.getItembasicPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, }, form: { // labelMessage: '信息提示说明!!!', @@ -660,12 +655,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ searchField: 'code', searchTitle: '物品基础信息', searchAllSchemas: Itembasic.allSchemas, - searchPage: ItembasicApi.getItembasicPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, } } }, diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 008589295..57cfeb9d3 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -51,11 +51,13 @@ :apiUpdate="DeliverRequestMainApi.updateDeliverRequestMain" :apiCreate="DeliverRequestMainApi.createDeliverRequestMain" :isBusiness="true" + fromeWhere="DeliverRequestMain" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" :isShowButton = isShowButton + :isShowReduceButton = isShowButton /> @@ -70,8 +72,9 @@ :apiPage="DeliverRequestDetailApi.getDeliverRequestDetailPage" :apiDelete="DeliverRequestDetailApi.deleteDeliverRequestDetail" :Echo="Echo" + fromeWhere="DeliverRequestMain" @searchTableSuccessDetail="searchTableSuccessDetail" - :detailButtonIsShow = trueFalse + /> @@ -99,8 +102,9 @@ routeName.value = route.name const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) const isShowButton = ref(true) + //定义 展示子表数据时是否显示新增/修改/删除按钮 -const trueFalse = ref(true) +const trueFalse = ref(false) // 字段设置 更新主列表字段 const updataTableColumns = (val) => { @@ -318,9 +322,9 @@ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { console.log(999,row.deliverPlanNumber); if(row.deliverPlanNumber != null){ - trueFalse.value = false + trueFalse.value = true }else { - trueFalse.value = true + trueFalse.value = false } detailRef.value.openDetail(row, titleName, titleValue,'requestDeliverMain') } @@ -377,12 +381,6 @@ const flag = ref(false) // 主子数据 提交 const submitForm = async (formType, data) => { - if(tableData.value.length <= 0){ - message.warning(`子表明细不能为空!`) - flag.value = true - formRef.value.formLoading = false - return; - } data.subList = tableData.value // 拼接子表数据参数 data.subList.forEach(obj => { if(obj.qty == 0){ @@ -397,6 +395,12 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + if(tableData.value.length <= 0){ + message.warning(`子表明细不能为空!`) + flag.value = true + formRef.value.formLoading = false + return; + } await DeliverRequestMainApi.createDeliverRequestMain(data) message.success(t('common.createSuccess')) } else { diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 461ee2f13..567018941 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -257,6 +257,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} + if (formField == 'fromWarehouseCode') { + if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ + key: 'warehouseCode', + value: val[0]["code"], + isMainValue: false + }) + } else { + InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => { + if (item.key == 'warehouseCode') { + item.value = val[0]["code"] + } + }) + } + // console.log(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode'))); + } setV[formField] = val[0][searchField] formRef.setValues(setV) } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 375bb12d0..fcf04db5b 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -140,15 +140,6 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ } }, }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, { label: '从库位类型范围', field: 'fromLocationTypes', @@ -542,7 +533,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, - searchCondition: [{ + searchCondition: [ + { + key: 'warehouseCode', + value: 'fromWarehouseCode', + isMainValue: true + },{ key: 'locationCode', value: 'businessType', isMainValue: true @@ -558,6 +554,11 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchAllSchemas: Balance.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, searchCondition: [{ + key: 'warehouseCode', + value: 'fromWarehouseCode', + isMainValue: true + }, + { key: 'locationCode', value: 'businessType', isMainValue: true diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index c79413962..51d1e9f88 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -387,12 +387,16 @@ export const PurchaseDetail = useCrudSchemas(reactive([ searchField: 'itemCode', searchTitle: '供应商物品信息', searchAllSchemas: Supplieritem.allSchemas, - searchPage: SupplieritemApi.getSupplieritemPage, + searchPage: SupplieritemApi.selectItembasicTypeToSupplieritem, searchCondition: [{ key:'supplierCode', value:'supplierCode', isMainValue: true - }] + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] }, form: { // labelMessage: '信息提示说明!!!', @@ -402,7 +406,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ searchField: 'itemCode', searchTitle: '供应商物品信息', searchAllSchemas: Supplieritem.allSchemas, - searchPage: SupplieritemApi.getSupplieritemPage, + searchPage: SupplieritemApi.selectItembasicTypeToSupplieritem, searchCondition: [{ key:'supplierCode', value:'supplierCode', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index eaff57c58..db8b7319c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -316,6 +316,27 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { //添加/修改操作 const formRef = ref() const openForm = async (type: string, row?: number) => { + if(type == "update"){ + SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'supplierCode'){ + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if(item.field == 'ppNumber'){ + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if(item.field == 'asnNumber'){ + item.componentProps.disabled = true + } + if(item.field == 'planArriveTime'){ + item.componentProps.disabled = true + } + }) + }else { + item.componentProps.isSearchList = true + item.componentProps.disabled = true + } tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 9df65d733..f2a8d026c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -100,6 +100,11 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( key: 'status', value: 4, isMainValue: false + }, + { + key: 'available', + value: "TRUE", + isMainValue: false }] } } From 5a7445b83f5683ce51c5d0c0f50dfe7052b9565a Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 15 Jan 2024 09:20:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=85=88=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=AE=A2=E5=8D=95=E5=8F=B7=EF=BC=8C=E5=86=8D=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchaseDetail/index.ts | 22 ++++++++++++++++++- .../purchasePlanMain/purchasePlanMain.data.ts | 5 +++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/api/wms/purchaseDetail/index.ts b/src/api/wms/purchaseDetail/index.ts index bf16cece3..ca44d26bd 100644 --- a/src/api/wms/purchaseDetail/index.ts +++ b/src/api/wms/purchaseDetail/index.ts @@ -30,6 +30,8 @@ export interface PurchaseDetailVO { available: string } +const message = useMessage() // 消息弹窗 + // 查询采购订单子列表 export const getPurchaseDetailPage = async (params) => { if (params.isSearch) { @@ -41,6 +43,24 @@ export const getPurchaseDetailPage = async (params) => { } } +// 查询采购订单子列表 +export const getPurchaseDetailPagePoNumber = async (params) => { + if (params.isSearch) { + if(params.number == ''){ + return; + } + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchase-detail/senior', data }) + } else { + if(params.number == ''){ + return; + } + return await request.get({ url: `/wms/purchase-detail/page`, params }) + } +} + + // 查询采购订单子详情 export const getPurchaseDetail = async (id: number) => { return await request.get({ url: `/wms/purchase-detail/get?id=` + id }) @@ -69,4 +89,4 @@ export const exportPurchaseDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchase-detail/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 04c4ed12e..275f6eda8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -5,6 +5,7 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su import * as PurchaseMainApi from '@/api/wms/purchaseMain' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' +import {getPurchaseDetailPagePoNumber} from "@/api/wms/purchaseDetail"; const { t } = useI18n() // 国际化 /** @@ -316,7 +317,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ searchField: 'lineNumber', searchTitle: '采购订单信息', searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, + searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchCondition: [{ key: 'number', value: 'poNumber', @@ -334,7 +335,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ searchField: 'lineNumber', searchTitle: '采购订单信息', searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, + searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchCondition: [{ key: 'number', value: 'poNumber',