From 4f02affb58bc7507086c3dc1914227189193f4ac Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 6 Mar 2024 16:07:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=BA=93=E5=8C=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=9A=90=E8=97=8F=E9=83=A8=E5=88=86=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itemManage/itemarea/itemarea.data.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 58096e357..c693b29fe 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -67,7 +67,7 @@ export const Itemarea = useCrudSchemas(reactive([ label: '入库包装规格', field: 'inPackUnit', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: 150 }, @@ -94,7 +94,7 @@ export const Itemarea = useCrudSchemas(reactive([ label: '出库包装规格', field: 'outPackUnit', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: 150 }, @@ -186,7 +186,7 @@ export const Itemarea = useCrudSchemas(reactive([ label: '补料来源库区', field: 'repleinshFromArea', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: 150 }, @@ -228,7 +228,7 @@ export const Itemarea = useCrudSchemas(reactive([ label: '管理精度', field: 'manageMode', sort: 'custom', - isSearch: true, + isSearch: false, dictType: DICT_TYPE.MANAGEMENT_MODE, dictClass: 'string', // colorType: 'danger', @@ -301,7 +301,7 @@ export const Itemarea = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', - isSearch: true, + isSearch: false, dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', // colorType: 'danger', @@ -322,13 +322,13 @@ export const Itemarea = useCrudSchemas(reactive([ label: '出库后剩余库存自动转换为出库包装规格', field: 'surplusToOutpackunit', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '超过高储是否允许叫料', field: 'allowIssueRequest', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '优先空库位', From 6a6436bf701c540ddaa3f6e92add7a216eab3830 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 6 Mar 2024 16:08:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=87=E4=BB=B6=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptJobMain/index.ts | 15 +++++++ .../wms/purchasereceiptRequestDetail/index.ts | 1 + .../wms/purchasereceiptRequestMain/index.ts | 5 +++ .../purchasereceiptRequestMain.data.ts | 10 +++++ .../sparereceiptJobMain/index.vue | 39 +++++++++++++++++-- .../sparereceiptRecordMain/index.vue | 35 ++--------------- .../sparereceiptRecordMain.data.ts | 3 +- .../sparereceiptRequestMain/index.vue | 11 +++--- .../sparereceiptRequestMain.data.ts | 16 +++++--- 9 files changed, 87 insertions(+), 48 deletions(-) diff --git a/src/api/wms/purchasereceiptJobMain/index.ts b/src/api/wms/purchasereceiptJobMain/index.ts index 67b1e982a..9e3463fb0 100644 --- a/src/api/wms/purchasereceiptJobMain/index.ts +++ b/src/api/wms/purchasereceiptJobMain/index.ts @@ -109,3 +109,18 @@ export const importTemplate = () => { export const closePurchasereceiptJobMain = (id: number) => { return request.put({ url: '/wms/purchasereceipt-job-main/close?id=' + id }) } + +// 执行备件收货任务主 +export const executePurchasereceiptJobMainSpare = (id: number) => { + return request.put({ url: '/wms/purchasereceipt-job-main/executeSpare?id=' + id }) +} + +// 放弃备件收货任务主 +export const abandonPurchasereceiptJobMainSpare = (id: number) => { + return request.put({ url: '/wms/purchasereceipt-job-main/abandon?id=' + id }) +} + +// 承接采购收货任务主 +export const acceptPurchasereceiptJobMain = (id: number) => { + return request.put({ url: '/wms/purchasereceipt-job-main/accept?id=' + id }) +} \ No newline at end of file diff --git a/src/api/wms/purchasereceiptRequestDetail/index.ts b/src/api/wms/purchasereceiptRequestDetail/index.ts index 0a59972a8..48d43d6d0 100644 --- a/src/api/wms/purchasereceiptRequestDetail/index.ts +++ b/src/api/wms/purchasereceiptRequestDetail/index.ts @@ -32,6 +32,7 @@ export interface PurchasereceiptRequestDetailVO { toOwnerCode: string createTime: Date creator: string + labelStatus: string } // 查询采购收货申请子列表 diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts index 58d866b5f..148b8e98a 100644 --- a/src/api/wms/purchasereceiptRequestMain/index.ts +++ b/src/api/wms/purchasereceiptRequestMain/index.ts @@ -63,6 +63,11 @@ export const createPurchasereceiptRequestMain = async (data: PurchasereceiptRequ return await request.post({ url: `/wms/purchasereceipt-request-main/create`, data }) } +// 新增备件收货申请主 +export const createPurchasereceiptRequestMainSpare = async (data: PurchasereceiptRequestMainVO) => { + return await request.post({ url: `/wms/purchasereceipt-request-main/createSpare`, data }) +} + // 修改采购收货申请主 export const updatePurchasereceiptRequestMain = async (data: PurchasereceiptRequestMainVO) => { return await request.put({ url: `/wms/purchasereceipt-request-main/update`, data }) diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index df3bb46c9..a95e7b69a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -445,6 +445,16 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( } } }, + { + label: '标签状态', + field: 'labelStatus', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isSearch: false, + }, { label: '操作', field: 'action', diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue index 252cbbfdf..cf4950cf8 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue @@ -172,10 +172,10 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 - // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:execute'}), // 执行 ] } @@ -183,15 +183,38 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 console.log('列表-操作按钮事件-执行') + handleExecuteSpare(row.id) } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') + handleAbandon(row.id) } else if (val == 'mainJobClo') { // 关闭 handleClose(row.id) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') + handleAccept(row.id) } } +/** 执行按钮操作 */ +const handleExecuteSpare = async (id: number) => { + try { + await message.confirm("是否确认执行任务!") + await PurchasereceiptJobMainApi.executePurchasereceiptJobMainSpare(id) + message.success("执行成功") + await getList() + } catch {} +} + +/** 放弃按钮操作 */ +const handleAbandon = async (id: number) => { + try { + await message.confirm("是否确认放弃任务!") + await PurchasereceiptJobMainApi.abandonPurchasereceiptJobMainSpare(id) + message.success("放弃成功") + await getList() + } catch {} +} + /** 关闭按钮操作 */ const handleClose = async (id: number) => { try { @@ -202,6 +225,16 @@ const handleClose = async (id: number) => { } catch {} } +/** 承接按钮操作 */ +const handleAccept = async (id: number) => { + try { + await message.confirm("是否承接任务!") + await PurchasereceiptJobMainApi.acceptPurchasereceiptJobMain(id) + message.success("承接成功") + await getList() + } catch {} +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue index 0bbfaea12..67066e8ce 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue @@ -125,46 +125,17 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:!row.inspectRequestFlag}),// 生成到货检验申请 - defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:!row.putawayRequestFlag}),// 生成采购上架申请 + ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - if (val == 'putawayRequest') { // 生成采购上架申请 - handleCreatePutawayRequest(row.number) - }else if(val == 'inspectRequest'){//生成到货检验申请 - handleCreateInspectRequest(row.number) - } + } -/** 生成采购上架申请按钮操作 */ -const handleCreatePutawayRequest = async (number:string) => { - try{ - await message.confirm(t('确认生成上架申请吗?')) - tableObject.loading = true - await PurchasereceiptRecordMainApi.createPutawayRequest(number) - message.success(t('上架申请生成成功')) - await getList() - }catch{}finally{ - tableObject.loading = false - } -} - -/** 生成到货检验申请按钮操作 */ -const handleCreateInspectRequest = async (number:string) => { - try{ - await message.confirm(t('确认生成到货检验申请吗?')) - tableObject.loading = true - await PurchasereceiptRecordMainApi.createPutawayRequest(number) - message.success(t('到货检验申请生成成功')) - await getList() - }catch{}finally{ - tableObject.loading = false - } -} +// /** 详情操作 */ const detailRef = ref() diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts index 6026e73f1..71eb3ce79 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts @@ -353,9 +353,10 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ label: '操作', field: 'action', isDetail: false, + isTable:false, isForm: false, table: { - width: 300, + width: 150, fixed: 'right' }, } diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index 856f5d31a..9b01ca8d3 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -137,8 +137,6 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { - //console.log("formRef",formRef) - //console.log("supplierCode",formRef.value.formRef.formModel.supplierCode) nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 @@ -238,7 +236,10 @@ const isShowMainButton = (row,val) => { // 根据状态返回该按钮是否显示 const isASNShowMainButton = (row,val) => { if (val.indexOf(row.status) > -1) { - if(row.sourceType == 'ASN_ExternalReceipt'){ + if(row.sourceType == 'spare_PartsReceipt' && row.labelStatus == '3'){ + return true + } + if(row.sourceType == 'spare_PartsReceipt' && row.labelStatus == '1'){ return false } } else { @@ -300,7 +301,6 @@ const buttonTableClick = async (val, row) => { } } - // 生成标签 const isCreateLabel = ref(false) const formLabelRef = ref() @@ -330,7 +330,6 @@ const labelPrint = async (row) => { window.open(src.value + '&asn_number=' + row.asnNumber) } - /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { @@ -469,7 +468,7 @@ const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { - await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data) + await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMainSpare(data) message.success(t('common.createSuccess')) } else { await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data) diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index a29cafc4a..3f212e558 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -446,6 +446,16 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( } } }, + { + label: '标签状态', + field: 'labelStatus', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isSearch: false, + }, { label: '操作', field: 'action', @@ -1073,18 +1083,12 @@ export const PurchasereceiptRequestDetailRules = reactive({ expireDate: [ { required: true, message: '请输入过期日期', trigger: 'change' } ], - packQty: [ - { required: true, message: '请输入包装数量', trigger: 'blur' } - ], poNumber: [ { required: true, message: '请输入订单号', trigger: 'change' } ], poLine: [ { required: true, message: '请输入订单行', trigger: 'change' } ], - packUnit: [ - { required: true, message: '请选择包装规格', trigger: 'change' } - ], convertRate: [ { required: true, message: '请输入转换率', trigger: 'blur' } ],