From 98e7b6368d974b02294056cacf2a6c3fb40b90c3 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Fri, 18 Oct 2024 17:32:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?YT-273=E9=87=87=E8=B4=AD=E6=8D=A2=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseBarterRecord/index.vue | 26 ++++++++++++++++++- .../purchaseBarterRequestMain.data.ts | 2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/index.vue b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/index.vue index 6fcd4a008..b3c3c1724 100644 --- a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/index.vue +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/index.vue @@ -28,6 +28,14 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > + + @@ -66,6 +74,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; const { loadStart, loadDone } = usePageLoading() // 采购换货申请 @@ -100,7 +109,9 @@ const HeadButttondata = [ defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 ] +const buttonTableClick = async (val, row) => { +} // 头部按钮事件 const buttonBaseClick = (val, item) => { if (val == 'export') { // 导出 @@ -119,10 +130,23 @@ const buttonBaseClick = (val, item) => { } } +// 列表-操作按钮 +const butttondata = (row,$index) => { + const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 + if(findIndex>-1&&findIndex<$index){ + return [] + } + return [] +} const formRef = ref() const detailRef = ref() - +const { wsCache } = useCache() +const openDetail = (row: any, titleName: any, titleValue: any) => { + const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name + if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) + detailRef.value.openDetail(row, titleName, titleValue,'recordPurchaseBarter') +} /** 导出按钮操作 */ const handleExport = async () => { diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts index 4ada3c32d..8f3612b02 100644 --- a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts @@ -194,6 +194,8 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive field: 'uom', sort: 'custom', isSearch: false, + dictType: DICT_TYPE.UOM, + dictClass: 'string', tableForm: { disabled: true }, From 16357a47bb55865211c40e10ebe7e8f09c07a2d4 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 21 Oct 2024 08:55:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?YT-450=E5=AE=A2=E6=88=B7=E7=89=A9=E6=96=99?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=8C=E6=9C=89=E5=AE=A2=E6=88=B7=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E9=87=8F=E3=80=81=E5=AE=A2=E6=88=B7=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=EF=BC=8C=E7=82=B9=E4=BF=9D=E5=AD=98=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E4=BA=86=EF=BC=8C=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 266b38258..909333405 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -840,10 +840,6 @@ const submitForm = async () => { const data = unref(formRef)?.formModel if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' - data.packUnit='' - data.packQty='' - data.outPackUnit='' - data.inPackUnit='' } emit('submitForm', formType.value, data) } finally { @@ -855,10 +851,6 @@ const submitForm = async () => { const data = unref(formRef)?.formModel if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' - data.packUnit='' - data.packQty='' - data.outPackUnit='' - data.inPackUnit='' } console.log(data); @@ -875,10 +867,6 @@ const submitForm = async () => { // 清空包装号 if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' - data.packUnit='' - data.packQty='' - data.outPackUnit='' - data.inPackUnit='' } emit('success', formType.value, data) } finally {