diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 2f532823e..e18780598 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="InventorychangeRequestMainRules" :formAllSchemas="InventorychangeRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="InventorychangeRequestDetail.allSchemas" :tableFormRules="InventorychangeRequestDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="InventorychangeRequestMain.allSchemas" :detailAllSchemas="InventorychangeRequestDetail.allSchemas" :detailAllSchemasRules="InventorychangeRequestDetailRules" - :searchTableParams="searchTableParams" :apiCreate="InventorychangeRequestDetailApi.createInventorychangeRequestDetail" :apiUpdate="InventorychangeRequestDetailApi.updateInventorychangeRequestDetail" :apiPage="InventorychangeRequestDetailApi.getInventorychangeRequestDetailPage" :apiDelete="InventorychangeRequestDetailApi.deleteInventorychangeRequestDetail" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -99,41 +98,36 @@ const updataTableColumns = (val) => { tableColumns.value = val } -// 查询列表页面参数设置 -const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} -]) - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row[formField] = val[0][searchField] + row['fromPackingNumber'] = val[0]['packingNumber'] + row['itemCode'] = val[0]['itemCode'] + row['fromBatch'] = val[0]['batch'] + row['locationCode'] = val[0]['locationCode'] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + setV['fromPackingNumber'] = val[0]['packingNumber'] + setV['itemCode'] = val[0]['itemCode'] + setV['fromBatch'] = val[0]['batch'] + setV['locationCode'] = val[0]['locationCode'] + formRef.setValues(setV) + }) +} + // 子表新增的时候选择表格之后需要会显得字段 // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const Echo = [] diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts index 7fb8bd0dd..51e6784bd 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts @@ -1,8 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -28,6 +32,7 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -47,6 +52,7 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + isForm: false, }, { label: '备注', @@ -71,6 +77,7 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -101,11 +108,13 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -121,6 +130,7 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -173,6 +183,7 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -283,9 +294,9 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( //表单校验 export const InventorychangeRequestMainRules = reactive({ - warehouseCode: [ - { required: true, message: '请选择仓库代码', trigger: 'change' } - ], + // warehouseCode: [ + // { required: true, message: '请选择仓库代码', trigger: 'change' } + // ], departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], @@ -320,6 +331,9 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive @@ -99,41 +98,38 @@ const updataTableColumns = (val) => { tableColumns.value = val } -// 查询列表页面参数设置 -const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} -]) - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { - // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row['fromPackingNumber'] = val[0]['packingNumber'] + row['fromContainerNumber'] = val[0]['containerNumber'] + row['itemCode'] = val[0]['itemCode'] + row['fromBatch'] = val[0]['batch'] + row['fromInventoryStatus'] = val[0]['inventoryStatus'] + row['fromLocationCode'] = val[0]['locationCode'] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + setV['fromPackingNumber'] = val[0]['packingNumber'] + setV['fromContainerNumber'] = val[0]['containerNumber'] + setV['itemCode'] = val[0]['itemCode'] + setV['fromBatch'] = val[0]['batch'] + setV['fromInventoryStatus'] = val[0]['inventoryStatus'] + setV['fromLocationCode'] = val[0]['locationCode'] + formRef.setValues(setV) + }) +} + // 子表新增的时候选择表格之后需要会显得字段 // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const Echo = [] diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 1ca8b697e..0854aed05 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -1,8 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -28,6 +32,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -39,6 +44,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库区代码范围', @@ -47,6 +53,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到仓库代码', @@ -55,6 +62,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到库位类型范围', @@ -67,6 +75,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + isForm: false, }, { label: '到库区代码范围', @@ -75,6 +84,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -99,7 +109,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false, }, { label: '备注', @@ -124,6 +135,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -154,11 +166,13 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -174,6 +188,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -226,6 +241,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -356,21 +372,21 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ //表单校验 export const InventorymoveRequestMainRules = reactive({ - fromWarehouseOde: [ - { required: true, message: '请选择从仓库代码', trigger: 'change' } - ], - fromLocationTypes: [ - { required: true, message: '请选择从库位类型范围', trigger: 'change' } - ], - fromAreaCodes: [ - { required: true, message: '请选择从库区代码范围', trigger: 'change' } - ], - toWarehouseCode: [ - { required: true, message: '请选择到仓库代码', trigger: 'change' } - ], - toLocationTypes: [ - { required: true, message: '请选择到库位类型范围', trigger: 'change' } - ], + // fromWarehouseOde: [ + // { required: true, message: '请选择从仓库代码', trigger: 'change' } + // ], + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // fromAreaCodes: [ + // { required: true, message: '请选择从库区代码范围', trigger: 'change' } + // ], + // toWarehouseCode: [ + // { required: true, message: '请选择到仓库代码', trigger: 'change' } + // ], + // toLocationTypes: [ + // { required: true, message: '请选择到库位类型范围', trigger: 'change' } + // ], departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], @@ -389,9 +405,9 @@ export const InventorymoveRequestMainRules = reactive({ directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } - ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], }) /** @@ -405,6 +421,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '从包装号', @@ -413,6 +431,25 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage + } + } }, { label: '从器具号', @@ -421,6 +458,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + disabled: true + } }, { label: '从批次', @@ -429,6 +469,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + disabled: true + } }, { label: '从库位代码', @@ -437,6 +480,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + disabled: true + } }, { label: '从库存状态', @@ -448,6 +494,10 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + disabled: true, + type: 'Select' + } }, { label: '到货主代码', @@ -456,6 +506,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到包装号', @@ -464,6 +516,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到器具号', @@ -472,6 +526,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到批次', @@ -480,6 +536,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到库位代码', @@ -488,6 +546,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到库存状态', @@ -499,6 +559,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + type: 'Select' + }, }, { label: '单据号', @@ -546,6 +609,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -561,6 +625,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + disabled: true + } }, { label: '物品名称', @@ -569,6 +636,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述1', @@ -577,6 +646,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述2', @@ -585,6 +656,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '项目代码', @@ -593,6 +666,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '数量', @@ -603,6 +678,15 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -615,6 +699,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '最后更新者', @@ -640,6 +727,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -675,16 +763,16 @@ export const InventorymoveRequestDetailRules = reactive({ fromInventoryStatus: [ { required: true, message: '请选择从库存状态', trigger: 'change' } ], - toPackingNumber: [ - { required: true, message: '请选择到包装号', trigger: 'change' } - ], - toBatch: [ - { required: true, message: '请输入到批次', trigger: 'blur' } - ], - toLocationCode: [ - { required: true, message: '请选择到库位代码', trigger: 'change' } - ], - toInventoryStatus: [ - { required: true, message: '请选择到库存状态', trigger: 'change' } - ], + // toPackingNumber: [ + // { required: true, message: '请选择到包装号', trigger: 'change' } + // ], + // toBatch: [ + // { required: true, message: '请输入到批次', trigger: 'blur' } + // ], + // toLocationCode: [ + // { required: true, message: '请选择到库位代码', trigger: 'change' } + // ], + // toInventoryStatus: [ + // { required: true, message: '请选择到库存状态', trigger: 'change' } + // ], }) \ No newline at end of file