diff --git a/src/views/eam/itemAccounts/itemAccounts.data.ts b/src/views/eam/itemAccounts/itemAccounts.data.ts index 0f1284160..cdafeec23 100644 --- a/src/views/eam/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/itemAccounts/itemAccounts.data.ts @@ -141,7 +141,7 @@ export const ItemAccounts = useCrudSchemas( label: '库区编号', field: 'areaNumber', sort: 'custom', - isTable: false, + isTable: true, isSearch: true, table: { width: 180 diff --git a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts index 19a1a537a..287a1e917 100644 --- a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts +++ b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts @@ -230,19 +230,17 @@ export const SparePartsApplyMainRules = reactive({ export const SparePartsApplyDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -259,6 +257,7 @@ export const SparePartsApplyDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -270,7 +269,36 @@ export const SparePartsApplyDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -278,7 +306,14 @@ export const SparePartsApplyDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量', diff --git a/src/views/eam/sparePartsApplyMain/index.vue b/src/views/eam/sparePartsApplyMain/index.vue index 526ca9dc1..ddb76807f 100644 --- a/src/views/eam/sparePartsApplyMain/index.vue +++ b/src/views/eam/sparePartsApplyMain/index.vue @@ -132,18 +132,27 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { - nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - if (formField == 'sparePartsCode') { + const setV = {} + setV[formField] = val[0][searchField] + console.log(11, val[0]) + if (type == 'tableForm') { + if (formField == 'locationCode') { + row['locationCode'] = val[0].locationNumber + row['areaCode'] = val[0].areaNumber row['sparePartsCode'] = val[0].itemNumber row['currentQty'] = val[0].qty + row['isRadeIn'] = val[0].isRadeIn } - if (formField == 'equipmentCode') { - row['equipmentCode'] = val[0].code + } else { + if (formField == 'locationCode') { + setV['locationCode'] = val[0].locationNumber + setV['areaCode'] = val[0].areaNumber + setV['sparePartsCode'] = val[0].itemNumber + setV['currentQty'] = val[0].qty + setV['isRadeIn'] = val[0].isRadeIn } - formRef.setValues(setV) - }) + } + formRef.setValues(setV) }) } // 查询页面返回——详情 diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index 72589ea1b..ed9ee8067 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -132,7 +132,6 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { - nextTick(() => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] @@ -156,7 +155,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } formRef.setValues(setV) }) - }) } // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef) => { diff --git a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts index 4c6785760..2041ab575 100644 --- a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts +++ b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts @@ -217,19 +217,17 @@ export const SparePartsOutLocationMainRules = reactive({ export const SparePartsOutLocationDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -246,6 +244,7 @@ export const SparePartsOutLocationDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -257,7 +256,36 @@ export const SparePartsOutLocationDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -265,7 +293,14 @@ export const SparePartsOutLocationDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts index 865b0b2a8..791637252 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts @@ -2,6 +2,15 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { TableColumn } from '@/types/table' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' + /** * @returns {Array} 计划外出库任务主表 */ @@ -95,6 +104,138 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ } }, }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '过期时间', field: 'expiredTime', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts index d9bdbbbf8..0952ec3d1 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts @@ -2,6 +2,15 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { TableColumn } from '@/types/table' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' + /** * @returns {Array} 计划外出库记录主表 */ @@ -136,6 +145,138 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ } }, }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '从仓库代码', field: 'fromWarehouseCode', @@ -355,6 +496,7 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '单据号', field: 'number', sort: 'custom', + hiddenInMain:true, table: { width: 180 }, @@ -411,6 +553,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '器具号', field: 'containerNumber', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -482,6 +628,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '成本中心代码', field: 'costcentreCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -490,6 +640,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '科目代码', field: 'qadProjectCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -498,6 +652,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '货主代码', field: 'ownerCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 4befdd5ec..e1d9ef743 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -42,6 +42,8 @@ if (type == 'tableForm') { // 明细查询页赋值 if(formField === 'itemCode'){ - row[formField] = val[0][searchField] - row['packingNumber'] = val[0]['packingNumber'] - row['containerNumber'] = val[0]['containerNumber'] - row['batch'] = val[0]['batch'] - row['inventoryStatus'] = val[0]['inventoryStatus'] - row['fromLocationCode'] = val[0]['locationCode'] - row['itemCode'] = val[0]['itemCode'] - row['uom'] = val[0]['uom'] + let newRow = JSON.parse(JSON.stringify(tableFormKeys)) + val.forEach(item=>{ + newRow[formField] =item[searchField] + newRow['packingNumber'] = item['packingNumber'] + newRow['containerNumber'] = item['containerNumber'] + newRow['batch'] = item['batch'] + newRow['inventoryStatus'] = item['inventoryStatus'] + newRow['fromLocationCode'] = item['locationCode'] + newRow['itemCode'] = item['itemCode'] + newRow['uom'] = item['uom'] + newRow['qty'] = item['qty'] + tableData.value.push(newRow) + }) } if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] @@ -133,6 +140,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['usageDescription'] = val[0]['usageDescription'] setV['usageCode'] = val[0]['code'] } + if(formField === 'costCenterCode'){ + setV['costcentreCode'] = val[0]['costcentreCode'] + setV['costCenterType'] = val[0]['costcentreType'] + } + if(formField === 'reasonCodeRequisition'){ + setV['reasonCodeRequisition'] = val[0]['code'] + } + if(formField === 'projectCode'){ + setV['projectCode'] = val[0]['projectCode'] + } setV[formField] = val[0][searchField] formRef.setValues(setV) } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 9de1cdcfb..745856d85 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -5,6 +5,12 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + import * as SubjectAccountApi from '@/api/wms/subjectAccount' import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' @@ -69,6 +75,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm:false, isForm: false, isTable:false, }, @@ -76,6 +83,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ label: '领用描述', field: 'usageDescription', sort: 'custom', + isTableForm:false, + isForm: false, + isTable:false, table: { width: 150 }, @@ -99,6 +109,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return cellValue }, + isTableForm:false, + isForm: false, + isTable:false, table: { width: 150 }, @@ -112,6 +125,138 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ filterable: true } }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '申请时间', field: 'requestTime', @@ -119,6 +264,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + isTableForm:false, + isForm: false, + isTable:false, sort: 'custom', table: { width: 180 @@ -140,6 +288,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + isTableForm:false, + isForm: false, + isTable:false, sort: 'custom', table: { width: 180 @@ -173,7 +324,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -183,7 +334,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -290,12 +441,21 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, { label: '直接生成记录', field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isForm: false, + isForm: true, isTable: false, sort: 'custom', table: { @@ -306,20 +466,10 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ value: requestsettingData.directCreateRecord, componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + activeValue: 'TRUE' } } }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, { label: '创建时间', field: 'createTime', @@ -427,6 +577,15 @@ export const UnplannedissueRequestMainRules = reactive({ usageDescription:[ { required: true, message: '请选择领用描述', trigger: 'blur' } ], + costCenterCode: [ + { required: true, message: '请输入成本中心代码', trigger: 'blur' } + ], + costCenterType: [ + { required: true, message: '请输入成本中心类型', trigger: 'blur' } + ], + reasonCodeRequisition: [ + { required: true, message: '请输入领用原因代码', trigger: 'blur' } + ], }) /** @@ -456,12 +615,32 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm:{ + multiple:true,//多选 isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请输入包装号', searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + }] }, form: { // labelMessage: '信息提示说明!!!', @@ -471,7 +650,26 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + }] } } }, @@ -512,6 +710,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled:true + } }, { label: '包装号', @@ -520,6 +726,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + tableForm: { + disabled:true + }, + form: { + componentProps: { + disabled: true + } + } }, { label: '器具号', @@ -563,7 +777,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled:true + }, + form: { + componentProps: { + disabled: true + } } }, { @@ -577,7 +797,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } } }, { @@ -587,6 +813,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled:true + } }, { label: '成本中心代码', @@ -595,6 +829,9 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTable:false, + isDetail:false, + isTableForm:false, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '选择成本中心', @@ -634,6 +871,9 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTable:false, + isDetail:false, + isTableForm:false, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '选择科目代码', @@ -792,14 +1032,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive //表单校验 export const UnplannedissueRequestDetailRules = reactive({ - packingNumber: [ - { required: true, message: '请输入包装号', trigger: 'change' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], - batch: [ - { required: true, message: '请输入批次', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], + // packingNumber: [ + // { required: true, message: '请输入包装号', trigger: 'change' }, + // { max: 50, message: '不得超过50个字符', trigger: 'blur' } + // ], + // batch: [ + // { required: true, message: '请输入批次', trigger: 'blur' }, + // { max: 50, message: '不得超过50个字符', trigger: 'blur' } + // ], containerNumber: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], @@ -823,4 +1063,4 @@ export const UnplannedissueRequestDetailRules = reactive({ qadProjectCode:[ { required: true, message: '请选择科目代码', trigger: 'change' } ] -}) \ No newline at end of file +}) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index d923bcaa8..94435be74 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -687,6 +687,7 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] } else if(formField == 'itemCode'){ - const isType = await isItemType(val[0]['code'], labelType.value) - if(!isType){ - message.warning('当前物料可制造与其他数据不一致,请重新选择!') - } else { - row['itemCode'] = val[0]['code'] - row['uom'] = val[0]['uom'] - // 有效期 \ 过期日期 - row['validityDays'] = val[0]['validityDays'] - // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) - // .then(res => { - // row['singlePrice'] = res.price - // }) + if(val.length==0){ + return + } + const enableBuy = val[0]['enableBuy'] + let newVal = val.filter(item=>item.enableBuy==enableBuy) + if(newVal.length{ + let tfk = JSON.parse(JSON.stringify(tableFormKeys)) + tfk.batch = formatTime(new Date(), 'yyyyMMdd') + //生产日期 到货日期 默认当天 + tfk['produceDate'] = dayjs().valueOf() + tfk['arriveDate'] = dayjs().valueOf() + tfk['itemCode'] = item['code'] + tfk['uom'] = item['uom'] + tfk['validityDays'] = item['validityDays'] + tableData.value.push(tfk) + }) } else if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] } else if(formField === 'qadProjectCode'){ diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index a6d0e49f4..43ab7f668 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -451,7 +451,7 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isForm: true, - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -461,7 +461,7 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive value: requestsettingData.directCreateRecord, componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE', + activeValue: 'TRUE' } } }, @@ -615,6 +615,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive