diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue index 3173482dd..4bea72d15 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -253,17 +253,17 @@ const submitForm = async (formType, submitData) => { } formRef.value.formLoading = true console.log('data',data) - // try { - // if (formType === 'create') { - // await InventorymoveRecordMainApi.createInventorymoveRecordMain(data) - // message.success(t('common.createSuccess')) - // } - // formRef.value.dialogVisible = false - // // 刷新当前列表 - // getList() - // } finally { - // formRef.value.formLoading = false - // } + try { + if (formType === 'create') { + await InventorymoveRecordMainApi.createInventorymoveRecordMain(data) + message.success(t('common.createSuccess')) + } + formRef.value.dialogVisible = false + // 刷新当前列表 + getList() + } finally { + formRef.value.formLoading = false + } } // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { @@ -292,6 +292,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} + if(formField=='fromLocationCode'){ + //从库位代码 + setV['fromWarehouseCode'] = val[0]['warehouseCode'] + }else if(formField=='toLocationCode'){ + //到库位代码 + setV['toWarehouseCode'] = val[0]['warehouseCode'] + } setV[formField] = val[0][searchField] formRef.setValues(setV) } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts index 20784f2cc..4674afe6c 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts @@ -35,102 +35,6 @@ const queryParams = { * @returns {Array} 库存转移申请主表 */ export const InventorymoveRequestMain = useCrudSchemas(reactive([ - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - enterSearch: true, - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择从仓库代码', - searchField: 'code', - searchTitle: '仓库基础信息', - searchAllSchemas: Warehouse.allSchemas, - searchPage: WarehouseApi.pageBusinessTypeToWarehouse, - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'businessType', - value: 'Move', - isMainValue: false - },{ - key: 'isIn', - value: 'out', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择从仓库代码', - searchField: 'code', - searchTitle: '仓库基础信息', - searchAllSchemas: Warehouse.allSchemas, - searchPage: WarehouseApi.pageBusinessTypeToWarehouse, - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'businessType', - value: 'Move', - isMainValue: false - },{ - key: 'isIn', - value: 'out', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - } - } - }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, { label: '从库位代码', field: 'fromLocationCode', @@ -263,6 +167,27 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, ])) //表单校验 @@ -270,6 +195,9 @@ export const InventorymoveRequestMainRules = reactive({ fromWarehouseCode: [ { required: true, message: '请选择从仓库代码', trigger: 'blur' } ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'blur' } + ], fromLocationCode: [ { required: true, message: '请选择从库位代码', trigger: 'change' } ],