From e8d4fe17689e206d071abe616ec2eb3e68999b0d Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 5 Dec 2023 17:24:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=B1=95=E7=A4=BA=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/customerreturnJobMain/index.ts | 8 +- .../customerreturnJobMain.data.ts | 1 + .../customerreturnJobMain/index.vue | 106 +++++++++++------- .../customerreturnRequestMain.data.ts | 50 ++++++++- .../customerreturnRequestMain/index.vue | 24 ++-- 5 files changed, 135 insertions(+), 54 deletions(-) diff --git a/src/api/wms/customerreturnJobMain/index.ts b/src/api/wms/customerreturnJobMain/index.ts index 7151aea2d..ae00479d0 100644 --- a/src/api/wms/customerreturnJobMain/index.ts +++ b/src/api/wms/customerreturnJobMain/index.ts @@ -95,17 +95,17 @@ export const importTemplate = () => { } // 承接客户退货任务主 Excel -export const submitCustomerreturnJobMain = async (id) => { +export const acceptCustomerreturnJobMain = async (id) => { return await request.put({ url: `/wms/customerreturn-job-main/accept?id=` + id }) } // 取消承接客户退货任务主 Excel -export const agreeCustomerreturnJobMain = async (id) => { +export const abandonCustomerreturnJobMain = async (id) => { return await request.put({ url: `/wms/customerreturn-job-main/abandon?id=` + id }) } -// 取消客户退货任务主 Excel -export const refusedCustomerreturnJobMain = async (id) => { +// 关闭客户退货任务主 Excel +export const closeCustomerreturnJobMain = async (id) => { return await request.put({ url: `/wms/customerreturn-job-main/close?id=` + id }) } diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts index 6db63b468..b3e6cf65e 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts @@ -88,6 +88,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ label: '运输方式', field: 'transferMode', sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, table: { width: 150 }, diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index e98d74d97..e10c534ea 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -184,45 +184,46 @@ const butttondata = (row) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 + let aaa = { - "id": "1809200001805505470", - "requestNumber": "REQ1820231124-0007", - "deliverRecordNumber": "D001", - "deliverPlanNumber": "F001", - "customerCode": "K001", - "customerDockCode": "CD001", + "id": "1809200001805505476", + "requestNumber": "REQ1820231205-0005", + "deliverRecordNumber": "JOB2420231205-0002", + "deliverPlanNumber": "DP20231205-0002", + "customerCode": "CF", + "customerDockCode": "CFCKYT", "receiptDock": null, - "carrierCode": "", - "transferMode": "", - "vehiclePlateNumber": "", + "carrierCode": "cys-001", + "transferMode": "AIR", + "vehiclePlateNumber": "车牌号", "fromWarehouseCode": null, "toWarehouseCode": null, - "requestTime": null, - "requestDueTime": null, + "requestTime": 1701756307000, + "requestDueTime": 1704470400000, "status": "2", "expiredTime": null, - "updateTime": 1700788390000, + "updateTime": 1701764165000, "updater": "1", "jobStageStatus": null, "priority": null, "priorityIncrement": null, "departmentCode": "研发部门", - "acceptUserId": null, - "acceptTime": null, + "acceptUserId": "1", + "acceptTime": 1701764178000, "completeUserId": null, "completeTime": null, - "fromLocationTypes": "INSP", - "toLocationTypes": "HOLD", - "number": "JOB2520231124-0007", + "fromLocationTypes": "INSP,HOLD", + "toLocationTypes": "HOLD,INSP", + "number": "JOB2520231205-0014", "businessType": "CustomerRejectJob", - "remark": "", - "createTime": 1700788390000, + "remark": "主表备注", + "createTime": 1701764165000, "creator": "1", "fromAreaCodes": "采购在途库", "toAreaCodes": "采购在途库", "toDockCode": null, "autoComplete": "FALSE", - "allowModifyLocation": "TRUE", + "allowModifyLocation": "FALSE", "allowModifyQty": "TRUE", "allowBiggerQty": "TRUE", "allowSmallerQty": "TRUE", @@ -231,43 +232,72 @@ const buttonTableClick = async (val, row) => { "allowPartialComplete": "TRUE", "allowModifyBatch": "FALSE", "allowModifyPackingNumber": "FALSE", - - "subList": [{"id": "1809200000441442033", - "soNumber": "222", - "soLine": "22", - "packingNumber": "P20230427000026", - "batch": "20231120001", + "subList": [{ + "id": "1809200000441442039", + "soNumber": null, + "soLine": null, + "packingNumber": "M20230421000005", + "batch": "20230808", "inventoryStatus": "OK", "ownerCode": null, - "containerNumber": "", - "fromLocationCode": "INSPECT", - "toLocationCode": "CF1111", - "itemCode": "CE115F11161AG", + "containerNumber": null, + "fromLocationCode": "Loc_testCF", + "toLocationCode": "INSPECT", + "itemCode": "testCF", "itemName": null, "itemDesc1": null, "itemDesc2": null, "projectCode": null, - "qty": 5, - "uom": null, - "number": null, - "remark": "", + "qty": 22, + "uom": "EA", + "number": "REQ1820231205-0005", + "remark": "子表备注", "createtime": null, "creator": "1", - handleQty: 10, - toPackingNumber: '12', + "handleQty": null, + "toPackingNumber": null, + "toContainerNumber": null, + "toBatch": null, + "toInventoryStatus": null, + recordList: [{ + handleQty: 22, + toPackingNumber: 'M20230421000005', toContainerNumber: '001', - toBatch: '21', + toBatch: '20230808', toInventoryStatus: 'OK', + toLocationCode: 'SFG', supplierCode: '31213', -}] + }] + }] } handleHandle(aaa) } else if (val == 'mainJobAba') { // 放弃 + await message.confirm('确认要放弃吗?') console.log('列表-操作按钮事件-放弃') + CustomerreturnJobMainApi.abandonCustomerreturnJobMain(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainJobClo') { // 关闭 + await message.confirm('确认要关闭吗?') console.log('列表-操作按钮事件-关闭') + CustomerreturnJobMainApi.closeCustomerreturnJobMain(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainJobAcc') { // 承接 + await message.confirm('确认要承接吗?') console.log('列表-操作按钮事件-承接') + CustomerreturnJobMainApi.acceptCustomerreturnJobMain(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } } diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index 74cafcc82..d2d52748b 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -14,9 +14,15 @@ import { SaleDetail, SaleMain } from '../../deliverplan/saleMain/saleMain.data' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import * as CarrierApi from '@/api/wms/carrier' +import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier.data' + import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -128,10 +134,27 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择承运商', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '承运商信息', // 查询弹窗标题 + searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类 + searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 @@ -594,12 +617,33 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - tableForm: { - disabled: true + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] }, form: { + // labelMessage: '信息提示说明!!!', componentProps: { - disabled: true + isSearchList: true, + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } } }, diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 732c3b615..ad51814e4 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -117,11 +117,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} - setV[formField] = val[0][searchField] + if(formField == 'deliverRecordNumber') { setV['deliverRecordNumber'] = val[0]['number'] setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] setV['customerCode'] = val[0]['customerCode'] setV['customerDockCode'] = val[0]['customerDockCode'] + } else { + setV[formField] = val[0][searchField] + } formRef.setValues(setV) } }) @@ -204,13 +207,14 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListEditBtn({hasPermi:'wms:customerreturn-request-main:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerreturn-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customerreturn-request-main:close'}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:customerreturn-request-main:reAdd'}), // 重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreturn-request-main:submit'}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreturn-request-main:refused'}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreturn-request-main:agree'}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:customerreturn-request-main:handle'}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreturn-request-main:update'}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerreturn-request-main:delete'}), // 删除 ] } @@ -242,7 +246,7 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'mainTurnDown') { // 驳回 - await message.confirm('确认要重新添加吗?') + await message.confirm('确认要驳回审批吗?') CustomerreturnRequestMainApi.refused(row.id).then(() => { message.success(t('common.updateSuccess')) getList() @@ -250,6 +254,7 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'mainApprove') { // 审批通过 + await message.confirm('确认要审批通过吗?') CustomerreturnRequestMainApi.agree(row.id).then(() => { message.success(t('common.updateSuccess')) getList() @@ -257,6 +262,7 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'mainHandle') { // 处理 + await message.confirm('确认要处理吗?') CustomerreturnRequestMainApi.handle(row.id).then(() => { message.success(t('common.updateSuccess')) getList() From b6ce4fe01e170c9f8c9118ca421411e6ae2194ae Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 6 Dec 2023 19:07:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/deliverPlanDetail/index.ts | 5 ++ .../customerreturnJobMain/index.vue | 24 ++------ .../customerreturnRequestMain/index.vue | 3 +- .../customersettleRequestMain/index.vue | 34 ++++++----- .../deliver/deliverJobMain/index.vue | 22 +++---- .../deliver/deliverRequestMain/index.vue | 58 ++++++++++++++++++- 6 files changed, 97 insertions(+), 49 deletions(-) diff --git a/src/api/wms/deliverPlanDetail/index.ts b/src/api/wms/deliverPlanDetail/index.ts index 6cfe8a5d6..33aeffdb9 100644 --- a/src/api/wms/deliverPlanDetail/index.ts +++ b/src/api/wms/deliverPlanDetail/index.ts @@ -17,6 +17,11 @@ export interface DeliverPlanDetailVO { available: string } +// 查询发货计划子列表 +export const selectDetailByMasterID = async (id: number) => { + return await request.get({ url: `/wms/deliver-plan-detail/detailList?id=` + id }) +} + // 查询发货计划子列表 export const getDeliverPlanDetailPage = async (params) => { return await request.get({ url: `/wms/deliver-plan-detail/page`, params }) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index e10c534ea..11a7bee1d 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -233,10 +233,10 @@ const buttonTableClick = async (val, row) => { "allowModifyBatch": "FALSE", "allowModifyPackingNumber": "FALSE", "subList": [{ - "id": "1809200000441442039", + "id": "1809200000441442040", "soNumber": null, "soLine": null, - "packingNumber": "M20230421000005", + "packingNumber": "testCF", "batch": "20230808", "inventoryStatus": "OK", "ownerCode": null, @@ -250,25 +250,11 @@ const buttonTableClick = async (val, row) => { "projectCode": null, "qty": 22, "uom": "EA", - "number": "REQ1820231205-0005", + "number": "REQ1820231206-0001", "remark": "子表备注", "createtime": null, - "creator": "1", - "handleQty": null, - "toPackingNumber": null, - "toContainerNumber": null, - "toBatch": null, - "toInventoryStatus": null, - recordList: [{ - handleQty: 22, - toPackingNumber: 'M20230421000005', - toContainerNumber: '001', - toBatch: '20230808', - toInventoryStatus: 'OK', - toLocationCode: 'SFG', - supplierCode: '31213', - }] - }] + "creator": "1" +}] } handleHandle(aaa) } else if (val == 'mainJobAba') { // 放弃 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index ad51814e4..e24806d3e 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -142,11 +142,10 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['fromLocationCode'] = val[0]['locationCode'] setV['itemCode'] = val[0]['itemCode'] setV['uom'] = val[0]['uom'] - formRef.setValues(setV) } else { setV[formField] = val[0][searchField] - formRef.setValues(setV) } + formRef.setValues(setV) }) } diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index 9bd481c89..a300a7250 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -103,11 +103,12 @@ const updataTableColumns = (val) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { + console.log(106, val[0]) row['soNumber'] = val[0]['soNumber'] row['soLine'] = val[0]['soLine'] row['packingNumber'] = val[0]['packingNumber'] row['batch'] = val[0]['batch'] - row['itemCode'] = val[0]['itemCode'] + row['itemCode'] = val[0]['code'] } else { const setV = {} setV[formField] = val[0][searchField] @@ -122,12 +123,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(() => { const setV = {} + if(formField == 'deliverRecordNumber') { + setV['deliverRecordNumber'] = val[0]['deliverRecordNumber'] + setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] + setV['customerCode'] = val[0]['customerCode'] + }else if(formField == 'itemCode') { + setV['packingNumber'] = val[0]['packingNumber'] + setV['batch'] = val[0]['batch'] + setV['itemCode'] = val[0]['itemCode'] + } + else { setV[formField] = val[0][searchField] - setV['soNumber'] = val[0]['soNumber'] - setV['soLine'] = val[0]['soLine'] - setV['packingNumber'] = val[0]['packingNumber'] - setV['batch'] = val[0]['batch'] - setV['itemCode'] = val[0]['itemCode'] + } formRef.setValues(setV) }) } @@ -145,8 +152,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增——需要手动修改下权限 - defaultButtons.defaultImportBtn({hasPermi:'wms:customersettle-request-main:import'}), // 导入 + // defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultImportBtn({hasPermi:'wms:customersettle-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:customersettle-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -163,11 +170,12 @@ const HeadButttondata = [ // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'import') { // 导入 - handleImport() - } else if (val == 'export') { // 导出 + // if (val == 'add') { // 新增 + // openForm('create') + // } else if (val == 'import') { // 导入 + // handleImport() + // } else + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 getList() diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index ee5df0ad5..e2c62302d 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -185,23 +185,23 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => {  if (val == 'mainJobExe') { // 执行     let aaa = { - "id": "1809190002130023676", - "requestNumber": "REQ1720231205-0001", + "id": "1809200001805505477", + "requestNumber": "REQ1820231206-0001", + "deliverRecordNumber": "JOB2420231206-0005", "deliverPlanNumber": "DP20231205-0002", - "customerDeliverNumber": "CUST20231205-00000001", "customerCode": "CF", "customerDockCode": "CFCKYT", - "deliverDock": null, + "receiptDock": null, "carrierCode": "cys-001", "transferMode": "LOAD", "vehiclePlateNumber": "车牌号", "fromWarehouseCode": null, - "toWarehouseCode": "CFCK", - "requestTime": 1701740774000, + "toWarehouseCode": null, + "requestTime": 1701826510000, "requestDueTime": 1704470400000, "status": "2", "expiredTime": null, - "updateTime": 1701740969000, + "updateTime": 1701827786000, "updater": "1", "jobStageStatus": null, "priority": null, @@ -218,7 +218,6 @@ const buttonTableClick = async (val, row) => { "remark": "主表备注", "createTime": 1701740969000, "creator": "1", - "ruleUserId": null, "fromAreaCodes": "采购在途库", "toAreaCodes": "采购在途库", "fromDockCode": null, @@ -232,8 +231,6 @@ const buttonTableClick = async (val, row) => { "allowPartialComplete": "TRUE", "allowModifyBatch": "FALSE", "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", "subList": [{ "id": "1809190001245559377", "soNumber": null, @@ -259,7 +256,6 @@ const buttonTableClick = async (val, row) => { "toPackingNumber": null, "toContainerNumber": null, "toBatch": null, - "handleQty": null, "toInventoryStatus": null, recordList: [{ handleQty: 10, @@ -286,8 +282,8 @@ const buttonTableClick = async (val, row) => { DeliverJobMainApi.abandonDeliverJobMain(row.id) } else if (val == 'mainJobClo') { // 关闭 DeliverJobMainApi.closeDeliverJobMain(row.id) - } else if (val == 'mainJobAcc') { // 执行 - DeliverJobMainApi.executeDeliverJobMain(row.id) + } else if (val == 'mainJobAcc') { // 承接 + DeliverJobMainApi.acceptDeliverJobMain(row.id) } } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 1bdac4a75..5c6848479 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -83,6 +83,7 @@ import { DeliverRequestMain,DeliverRequestMainRules,DeliverRequestDetail,Deliver import * as DeliverRequestMainApi from '@/api/wms/deliverRequestMain' import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' // 发货申请 defineOptions({ name: 'DeliverRequestMain' }) @@ -95,6 +96,8 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) +const isShowButton = ref(true) + // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val @@ -111,11 +114,37 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'deliverPlanNumber') { setV['deliverPlanNumber'] = val[0]['number'] setV['customerCode'] = val[0]['customerCode'] - formRef.setValues(setV) + isShowButton.value = false + // 获取子表数据 getBomDisassemble + DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id']) + .then(res => { + console.log(120,res) + res.forEach(item => { + item.qty = item.planQty + }) + if (res) tableData.value = res + // 修改 tableform 属性 + DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { + if(item.field == 'itemCode') { + item.isInpuFocusShow = false + item.tableForm.isInpuFocusShow = false + item.tableForm.disabled = true + } + if(item.field == 'qty') { + item.tableForm.disabled = true + } + if(item.field == 'uom') { + item.tableForm.disabled = true + } + }) + }).catch(err => { + console.log(err) + message.error('错误') + }) } else { setV[formField] = val[0][searchField] - formRef.setValues(setV) } + formRef.setValues(setV) } }) } @@ -161,6 +190,7 @@ const HeadButttondata = [ const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 openForm('create') + resetShow() } else if (val == 'import') { // 导入 handleImport() } else if (val == 'export') { // 导出 @@ -360,6 +390,30 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } + +// 恢复最初属性:明细添加/删除行按钮,字段查询弹窗,可输入状态等 +// 列表头部 新增按钮 触发 +const resetShow = async () => { + isShowButton.value = true // tableform按钮恢复到显示 + // 修改 tableform 属性 + DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { + if(item.field == 'itemCode') { + item.isInpuFocusShow = true + item.tableForm.isInpuFocusShow = true + item.tableForm.disabled = false + } + if(item.field == 'planQty') { + item.tableForm.disabled = false + } + if(item.field == 'uom') { + item.tableForm.disabled = false + } + if(item.field == 'available') { + item.tableForm.disabled = false + } + }) +} + /** 初始化 **/ onMounted(async () => { getList() From de73d1a466e2a007087a4c0435685fbb49269ec0 Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 7 Dec 2023 11:00:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/package/index.ts | 9 +++++++-- src/components/ImportForm/src/ImportForm.vue | 2 +- src/views/system/tenant/TenantForm.vue | 14 ++++++++++++-- .../labelManage/purchasePackage/index.vue | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index fdb147004..9de36a25a 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -77,8 +77,13 @@ export const deletePackage = async (id: number) => { // 导出包装 Excel export const exportPackage = async (params) => { - return await request.download({ url: `/wms/package/export-excel`, params }) -} + if (params.isSearch) { + const data = {...params} + return await request.download({ url: `/wms/package/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/package/export-excel`, params }) + } + } // 下载用户导入模板 export const importTemplate = () => { diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue index 362fe8d0a..d911a51be 100644 --- a/src/components/ImportForm/src/ImportForm.vue +++ b/src/components/ImportForm/src/ImportForm.vue @@ -223,7 +223,7 @@ const submitFormSuccess = (response: any) => { // console.log(172, import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/' + response.data.errorFile) // console.log(172, import.meta.env.VITE_BASE_URL + '/admin-api/opt/profile/' + response.data.errorFile) window.open( - import.meta.env.VITE_BASE_URL + '/admin-api/profile/' + response.data.errorFile, + import.meta.env.VITE_BASE_URL + '/admin-api' + response.data.errorFile, '222' ) // downloadElement.setAttribute('href', import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + response.data.errorFile ) diff --git a/src/views/system/tenant/TenantForm.vue b/src/views/system/tenant/TenantForm.vue index a6085363f..fb238561d 100644 --- a/src/views/system/tenant/TenantForm.vue +++ b/src/views/system/tenant/TenantForm.vue @@ -26,8 +26,8 @@ - - + + @@ -175,4 +176,13 @@ const resetForm = () => { } formRef.value?.resetFields() } + +/**只能选取当前日期以后的日期 */ +const disabledDate =(time) => { + if (time.getTime() < Date.now()) { + return true; + } else { + return false; + } +} diff --git a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue index f802f472b..d1759be6f 100644 --- a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue @@ -218,7 +218,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await PackageApi.exportPackage(setSearchParams) + const data = await PackageApi.exportPackage(tableObject.params) download.excel(data, '包装.xlsx') } catch { } finally {