From b08cf6a0630006974ddc7f11c570748492147616 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 16 Jul 2024 13:36:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptJobMain.data.ts | 120 +++++++++--------- .../unplannedreceiptRecordMain.data.ts | 16 +-- .../unplannedreceiptRequestMain/index.vue | 67 ++++++---- .../unplannedreceiptRequestMain.data.ts | 28 ++-- 4 files changed, 124 insertions(+), 107 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts index c61f696fb..1013017a6 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts @@ -220,26 +220,26 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ } }, }, - { - label: '过期时间', - field: 'expiredTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, + // { + // label: '过期时间', + // field: 'expiredTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, { label: '到仓库代码', field: 'toWarehouseCode', @@ -298,14 +298,14 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ isForm: false, isTable:false, }, - { - label: '领用描述', - field: 'usageDescription', - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '领用描述', + // field: 'usageDescription', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '优先级', field: 'priority', @@ -334,30 +334,30 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ component: 'InputNumber', } }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '业务类型', + // field: 'businessType', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '自动完成', field: 'autoComplete', @@ -879,14 +879,14 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '替代批次', - field: 'altBatch', - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '成本中心代码', field: 'costcentreCode', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index 35573b9bb..07d00586d 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -276,14 +276,14 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( width: 150 }, }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '到库区代码范围', + // field: 'toAreaCodes', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '领用代码', field: 'usageCode', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index eb3cde1ea..3dbc06861 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -130,7 +130,6 @@ import * as ItembasicApi from "@/api/wms/itembasic"; import * as PackageApi from "@/api/wms/package"; import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' -import * as StdcostpriceApi from '@/api/wms/stdcostprice' import { getJmreportBaseUrl } from '@/utils/systemParam' // 计划外入库申请 @@ -384,14 +383,14 @@ const butttondata = (row,$index) => { { label: '创建标签', name: 'cjbq', - hide: isShowMainButton(row,['3']), + hide: isShowMainButton(row,['1']), type: 'primary', icon: '', color: '', hasPermi: '', link: true, // 文本展现按钮 }, - defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','6','8']) }), // 标签打印 + defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['1','3','6','8']) }), // 标签打印 ] } @@ -503,50 +502,70 @@ const buttonTableClick = async (val, row) => { const handleClose = async (id: number) => { await message.confirm(t('common.confirmColse')) tableObject.loading = true - await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) - message.success(t('common.closeSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) + message.success(t('common.closeSuccess')) + tableObject.loading = false + await getList() + }catch{ + tableObject.loading = false + } } /** 重新添加按钮操作 */ const handleReAdd = async (id: number) => { await message.confirm(t('common.confirmReAdd')) tableObject.loading = true - await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) - message.success(t('common.reAddSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) + message.success(t('common.reAddSuccess')) + tableObject.loading = false + await getList() + }catch{ + tableObject.loading = false + } } /** 提交按钮操作 */ const handleSubmit = async (id: number) => { await message.confirm(t('common.confirmSubmit')) tableObject.loading = true - await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) - message.success(t('common.submitSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) + message.success(t('common.submitSuccess')) + tableObject.loading = false + await getList() + }catch{ + tableObject.loading = false + } } /** 审批驳回按钮操作 */ const handleRefused = async (id: number) => { await message.confirm(t('common.confirmRefused')) tableObject.loading = true - await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) - message.success(t('common.refusedSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) + message.success(t('common.refusedSuccess')) + tableObject.loading = false + await getList() + }catch{ + tableObject.loading = false + } } /** 审批通过按钮操作 */ const handleAgree = async (id: number) => { await message.confirm(t('common.confirmAgree')) tableObject.loading = true - await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) - message.success(t('common.agreeSuccess')) - tableObject.loading = false - await getList() + try{ + await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) + message.success(t('common.agreeSuccess')) + tableObject.loading = false + await getList() + }catch{ + tableObject.loading = false + } } /** 处理按钮操作 */ @@ -557,7 +576,6 @@ const handleHandle = async (id: number) => { await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id) message.success(t('common.handleSuccess')) await getList() - } finally { tableObject.loading = false } @@ -566,7 +584,6 @@ const handleHandle = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { - UnplannedreceiptRequestMain.allSchemas.formSchema.forEach((item) => { if(type == "update"){ if (item.field == 'costCenterCode') { diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index bf1e6a7e4..96b8bc38c 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -546,7 +546,7 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive isDetail: false, isForm: false, table: { - width: 300, + width: 350, fixed: 'right' }, } @@ -702,19 +702,19 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive