From 4bc2afd82ae0e670d824077b1062acf33344d74d Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 26 Mar 2024 17:41:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E8=B4=A7=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 3 +- .../deliverJobMain/deliverJobMain.data.ts | 8 + .../deliver/deliverJobMain/index.vue | 191 +++++++++--------- .../deliverRecordMain.data.ts | 8 + .../deliverRequestMain.data.ts | 71 ++++++- .../deliverPlanMain/deliverPlanMain.data.ts | 77 ++++++- 6 files changed, 256 insertions(+), 102 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a55244551..c2a9ff9f1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -276,5 +276,6 @@ export enum DICT_TYPE { PACK_UNIT_TYPE = 'pack_unit_type', // 包装规格类型 TRANSFER_REASON = 'transfer_reason', // 调拨出入库原因 PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源 - PLAN_PRODUCTION_TYPE = "plan_production_type" // 生产计划类型 + PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型 + DELIVER_TYPE="deliver_type",//发货类型 } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts index db84960d1..3e307ff01 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts @@ -761,6 +761,14 @@ export const DeliverJobDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '从库位代码', field: 'fromLocationCode', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index 8d5aeea6c..93cdffaa4 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -180,112 +180,109 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 - // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => {  if (val == 'mainJobExe') { // 执行 -    let aaa = { - "id": "1809190002130023685", - "requestNumber": "REQ1720231222-0004", - "deliverPlanNumber": "DP20231222-0004", - "customerDeliverNumber": "CUST20231222-00000005", - "customerCode": "CF", - "customerDockCode": "CFCKYT", - "deliverDock": null, - "carrierCode": null, - "transferMode": null, - "vehiclePlateNumber": null, - "fromWarehouseCode": null, - "toWarehouseCode": "CFCK", - "requestTime": 1703207798000, - "requestDueTime": 1703952000000, - "status": "2", - "expiredTime": null, - "updateTime": 1703207917000, - "updater": "超级管理员", - "jobStageStatus": null, - "priority": null, - "priorityincrement": null, - "departmentCode": "100", - "acceptUserId": "1", - "acceptTime": 1703207934000, - "completeUserId": null, - "completeTime": null, - "fromAreaTypes": "FG", - "toAreaTypes": "CUST", - "number": "JOB2420231222-0006", - "businessType": "DeliverJob", - "remark": "", - "createTime": 1703207917000, - "creator": "超级管理员", - "ruleUserId": null, - "fromAreaCodes": "采购在途库", - "toAreaCodes": "采购在途库", - "fromDockCode": null, - "autoComplete": "FALSE", - "allowModifyLocation": "FALSE", - "allowModifyQty": "TRUE", - "allowBiggerQty": "TRUE", - "allowSmallerQty": "TRUE", - "allowModifyInventoryStatus": "TRUE", - "allowContinuousScanning": "TRUE", - "allowPartialComplete": "TRUE", - "allowModifyBatch": "FALSE", - "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", - "concurrencyStamp": 1, - "subList": [{ - "id": "1809190001245559379", - "soNumber": null, - "soLine": null, - "packingNumber": null, - "batch": "20230808", - "inventoryStatus": "OK", - "ownerCode": null, - "containerNumber": null, - "fromLocationCode": "L-R-001-001-1-01", - "toLocationCode": "CUST", - "itemCode": "testCF", - "itemName": "陈放测试物料", - "itemDesc1": "测试用", - "itemDesc2": "测试用", - "projectCode": "5", - "qty": 5, - "uom": "EA", - "number": "JOB2420231222-0006", - "remark": "", - "createTime": 1703207917000, - "creator": "超级管理员", - "toPackingNumber": null, - "toContainerNumber": null, - "toBatch": null, - "handleQty": null, - "toInventoryStatus": null, - recordList: [{ - handleQty: 10, - toPackingNumber: '12', - toContainerNumber: '001', - toBatch: '21', + let aaa = { + "id": 3, + "requestNumber": "REQ1720240326-0012", + "deliverPlanNumber": "", + "customerDeliverNumber": "CUST20240326-00000012", + "customerCode": "KHV", + "customerDockCode": "YTV4", + "deliverDock": null, + "carrierCode": "", + "transferMode": "", + "vehiclePlateNumber": "", + "fromWarehouseCode": null, + "toWarehouseCode": "CKV", + "requestTime": 1711443936000, + "requestDueTime": null, + "status": "2", + "expiredTime": null, + "updateTime": 1711443936000, + "updater": "超级管理员", + "jobStageStatus": null, + "priority": null, + "priorityincrement": null, + "departmentCode": "100", + "acceptUserId": "1", + "acceptTime": 1711443941000, + "completeUserId": null, + "completeTime": null, + "fromAreaTypes": "FG,STOCK_UP", + "toAreaTypes": "CUST,THIRD_PARTY", + "number": "JOB2420240326-0013", + "businessType": "Deliver", + "remark": "", + "createTime": 1711443936000, + "creator": "超级管理员", + "ruleUserId": null, + "fromAreaCodes": "FG", + "toAreaCodes": "CUST,ZTQ", + "fromDockCode": null, + "autoComplete": "FALSE", + "allowModifyLocation": "FALSE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + "inInventoryStatuses": "OK", + "outInventoryStatuses": "OK", + "concurrencyStamp": 1, + "useOnTheWayLocation": null, + "subList": [{ + "id": 3, + "soNumber": null, + "soLine": null, + "packingNumber": null, + "batch": "2024021801", + "inventoryStatus": "OK", + "ownerCode": null, + "containerNumber": null, + "fromLocationCode": "FG", + "toLocationCode": "SFK", + "itemCode": "vvcs-zhj1", + "itemName": "测试物件", + "itemDesc1": "水冷系-散热器", + "itemDesc2": "水冷系-散热器", + "projectCode": "PJ001", + "qty": 11, + "uom": "PC", + "number": "JOB2420240326-0013", + "remark": "", + "createTime": 1711443936000, + "creator": "超级管理员", + "toPackingNumber": null, + "toContainerNumber": null, + "toBatch": null, + "handleQty": null, + "toInventoryStatus": null, + "updateTime": 1711443936000, + "updater": "超级管理员", + "onTheWayLocationCode": "FHZTK", + recordList: [{ + handleQty: 11, + toPackingNumber: null, + toContainerNumber: null, + toBatch: '2024021801', toInventoryStatus: 'OK', - toLocationCode: 'H03', - supplierCode: '31213', - },{ - handleQty: 22, - toPackingNumber: 'M20230421000005', - toContainerNumber: '001', - toBatch: '20230808', - toInventoryStatus: 'OK', - toLocationCode: 'SFG', + toLocationCode: "SFK", supplierCode: '31213', }] - }] + } + ] } handleHandle(aaa) console.log('列表-操作按钮事件-执行') diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts index a11a3c3f1..a3ca68a6e 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts @@ -516,6 +516,14 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '从库位代码', field: 'fromLocationCode', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index ae7805bab..fcb7b4b31 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -19,6 +19,9 @@ import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/cu import * as CarrierApi from '@/api/wms/carrier' import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier.data' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as WorkstationApi from '@/api/wms/workstation' const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -166,6 +169,16 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + }, { label: '承运商', field: 'carrierCode', @@ -200,6 +213,15 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '发货库区类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + table: { + width: 150 + }, + }, { label: '车牌号', field: 'vehiclePlateNumber', @@ -527,6 +549,9 @@ export const DeliverRequestMainRules = reactive({ customerCode: [ { required: true, message: '请选择客户代码', trigger: 'change' } ], + deliverType: [ + { required: true, message: '发货库区类型不能为空', trigger: 'change' } + ], customerDockCode: [ { required: true, message: '请选择客户月台代码', trigger: 'change' } ], @@ -783,7 +808,8 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled: true }, form: { componentProps: { @@ -798,8 +824,44 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, - isTableForm: false, - isForm: false, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: true + }] + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: false + }] + } + }, }, { label: '库存状态', @@ -966,4 +1028,7 @@ export const DeliverRequestDetailRules = reactive({ remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], }) \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index c7bea610a..0ab9228ad 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -10,8 +10,15 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome import * as CustomerItemApi from '@/api/wms/customeritem' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' + +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as WorkstationApi from '@/api/wms/workstation' + import * as getPlansettingApi from '@/api/wms/plansetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -23,6 +30,13 @@ const queryParams = { const data = await getPlansettingApi.getPlansettingPage(queryParams) const plansettingData =data?.list[0]||{} + const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'Deliver' +} +const data1 = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) +const businessTypeData =data1?.list[0]||{} /** * @returns {Array} 发货计划主表 */ @@ -63,6 +77,16 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ } } }, + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + }, { label: '计划日期', field: 'planDate', @@ -317,6 +341,9 @@ export const DeliverPlanMainRules = reactive({ customerCode: [ { required: true, message: '请选择客户代码', trigger: 'change' } ], + deliverType: [ + { required: true, message: '发货库区类型不能为空', trigger: 'change' } + ], planDate: [ { required: true, message: '计划日期不能为空', trigger: 'change' } ], @@ -405,7 +432,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false },{ key: 'customerCode', value: 'customerCode', @@ -500,6 +526,52 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ } } }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: true + }] + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: false + }] + } + }, + }, { label: '备注', field: 'remark', @@ -657,6 +729,9 @@ export const DeliverPlanDetailRules = reactive({ itemCode: [ { required: true, message: '请选择物料代码', trigger: 'change' } ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ],