From 9ef6ae66ffe40ae77f48dc17ec046d4d4ad32427 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 16 Aug 2024 11:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=E7=94=B3?= =?UTF-8?q?=E8=AF=B7-=E6=96=B0=E7=89=88=E7=9A=84=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereturnRequestMainNew/index.vue | 26 +- ...s => purchasereturnRequestMainNew.data.ts} | 467 ++---------------- 2 files changed, 65 insertions(+), 428 deletions(-) rename src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/{purchasereturnRequestMain.data.ts => purchasereturnRequestMainNew.data.ts} (64%) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index ab994d604..0b342081e 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -54,10 +54,10 @@ import download from '@/utils/download' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { + PurchasereturnRequestMainNew, + PurchasereturnRequestMainRulesNew, + PurchasereturnRequestDetailNew, + PurchasereturnRequestDetailRulesNew, + PurchasereturnPurchasereceiptRecordNew +} from './purchasereturnRequestMainNew.data' import { PurchasereturnRequestMain, - PurchasereturnRequestMainRules, PurchasereturnRequestDetail, PurchasereturnRequestDetailRules, - PurchasereReturnRequestDetailLabel, - PurchasereceiptRecordMain1, - PurchasereturnPurchasereceiptRecord -} from './purchasereturnRequestMain.data' + PurchasereReturnRequestDetailLabel +} from '../purchasereturnRequestMain/purchasereturnRequestMain.data' import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain' import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' @@ -275,7 +279,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro }) console.log('物料供应商',res) if(res&&res.length>0){ - PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ + PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{ if(item.field == 'supplierCode'){ item.componentProps.options = res } @@ -604,7 +608,7 @@ const chooseReceiptList = ()=>{ } searchTableRef.value.open( "收货单明细", - PurchasereturnPurchasereceiptRecord.allSchemas, + PurchasereturnPurchasereceiptRecordNew.allSchemas, PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode, "hahaha", "hahaha", diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts similarity index 64% rename from src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts rename to src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts index 444b562c1..4814a83f2 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts @@ -43,120 +43,10 @@ const userDept = userStore.userSelfInfo.dept userDept.id = userDept.id.toString() const userDeptArray: any = [userDept] -// 采购收货记录展示列 -export const PurchasereceiptRecordMain1 = useCrudSchemas( - reactive([ - { - label: '物料代码', - field: 'itemCode', - fixed: 'left', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true - }, - { - label: '采购收货记录单号', - field: 'number', - fixed: 'left', - sort: 'custom', - table: { - width: 200 - }, - isSearch: true - }, - { - label: '发货单号', - field: 'asnNumber', - sort: 'custom', - table: { - width: 180 - }, - sortTableDefault: 2, - isSearch: true - }, - { - label: '采购订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true - }, - { - label: '订单行', - field: 'poLine', - sort: 'custom', - table: { - width: 150 - } - }, - - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - } - }, - { - label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面 - field: 'fromBatch', - sort: 'custom', - isForm: false, - isTableForm: false, - table: { - width: 150 - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - } - }, - // { - // label: '包装规格', - // field: 'packUnit', - // dictClass: 'string', - // isTable: true, - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - // { - // label: '从库位代码', - // field: 'fromLocationCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // - // }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - } - } - ]) -) - /** * @returns {Array} 采购退货申请主表 */ -export const PurchasereturnRequestMain = useCrudSchemas( +export const PurchasereturnRequestMainNew = useCrudSchemas( reactive([ { label: '物料代码', @@ -431,9 +321,53 @@ export const PurchasereturnRequestMain = useCrudSchemas( } ]) ) +//表单校验 +export const PurchasereturnRequestMainRulesNew = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + dueTime: [ + { required: true, message: '请选择截止时间', trigger: 'blur' } + ], + // purchaseReceiptRecordNumber: [ + // { required: true, message: '请输入采购收货记录单号', trigger: 'blur' } + // ], + carrierCode: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + vehiclePlateNumber: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) - -export const PurchasereturnPurchasereceiptRecord = useCrudSchemas( +export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas( reactive([ { label: '收货日期', @@ -556,56 +490,12 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas( ]) ) -//表单校验 -export const PurchasereturnRequestMainRules = reactive({ - supplierCode: [ - { required: true, message: '请输入供应商代码', trigger: 'blur' } - ], - dueTime: [ - { required: true, message: '请选择截止时间', trigger: 'blur' } - ], - // purchaseReceiptRecordNumber: [ - // { required: true, message: '请输入采购收货记录单号', trigger: 'blur' } - // ], - carrierCode: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - ], - vehiclePlateNumber: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - ], - remark: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], - fromWarehouseCode: [ - { required: true, message: '请输入从仓库代码', trigger: 'blur' } - ], - fromAreaTypes: [ - { required: true, message: '请选择从库区类型范围', trigger: 'change' } - ], - departmentCode: [ - { required: true, message: '请输入部门', trigger: 'blur' } - ], - autoCommit: [ - { required: true, message: '请选择是否自动提交', trigger: 'change' } - ], - autoAgree: [ - { required: true, message: '请选择是否自动通过', trigger: 'change' } - ], - autoExecute: [ - { required: true, message: '请选择是否自动执行', trigger: 'change' } - ], - directCreateRecord: [ - { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } - ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } - ], -}) + /** * @returns {Array} 采购退货申请子表 */ -export const PurchasereturnRequestDetail = useCrudSchemas(reactive([ +export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive([ { label: '批次', field: 'batch', @@ -731,264 +621,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive ])) //表单校验 -export const PurchasereturnRequestDetailRules = reactive({ +export const PurchasereturnRequestDetailRulesNew = reactive({ }) -export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive([ - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - disabled: true - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - disabled:true - }, - isTableForm: true, - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - disabled:true - }, - isTableForm: true, - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isTableForm: false, - isForm: false - }, - // { - // label: '器具号', - // field: 'containerNumber', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTableForm: false, - // isForm: false - // }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - disabled:true, - min: 1, - precision: 6 - }, - }, - tableForm: { - disabled:true, - type: 'InputNumber', - min: 1, - precision: 6 - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - } - }, - { - label: '从库位代码1', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - { - label: '生产日期', - field: 'produceDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - disabled:true, - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - tableForm:{ - disabled:true, - type:'FormDate', - placeholder: '请选择生产日期', - valueFormat: 'x', - }, - }, - - // { - // label: '替代批次', - // field: 'altBatch', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTableForm: false, - // isForm: false - // }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false, - tableForm: { - type: 'Select' - } - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - componentProps: { - disabled: true, - isSearchList: true, - searchListPlaceholder: '请选择包装', - searchField: 'packQty', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true - }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - - ] - } - }, - tableForm: { - disabled: true, - isInpuFocusShow: true, - searchListPlaceholder: '请选择包装', - searchField: 'packQty', - searchTitle: '物品包装信息', - searchAllSchemas: Itempackaging.allSchemas, - searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, - searchCondition: [ - { - key: 'itemCode', - value: 'itemCode', - message: '请选择订单行', - isMainValue: true - }, - { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - }, - isTableForm: true, - isForm: true - }, - { - label: '包装规格', - field: 'packUnit', - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150, - componentProps: { - disabled: true - } - }, - tableForm:{ - disabled:true - }, - isTableForm: true, - isForm: true - }, -]))