Browse Source

BUG修改

master_hella_20240701
parent
commit
921fe88769
  1. 24
      src/api/eam/sparePartsOutLocationRecordDetail/index.ts
  2. 133
      src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts
  3. 2
      src/views/eam/SparePartsOutLocationRecord/index.vue
  4. 15
      src/views/eam/itemAccounts/index.vue
  5. 3
      src/views/eam/itemAccounts/itemAccounts.data.ts
  6. 164
      src/views/eam/maintainExperience/maintainExperience.data.ts
  7. 205
      src/views/eam/repairExperience/repairExperience.data.ts
  8. 7
      src/views/eam/sparePartsInLocationRecord/index.vue
  9. 392
      src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts
  10. 49
      src/views/eam/sparepartsinlocation/index.vue

24
src/api/eam/sparePartsOutLocationRecordDetail/index.ts

@ -28,45 +28,49 @@ export const getSparePartsOutLocationDetailRecordPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = { ...params } const data = { ...params }
return await request.post({ url: '/eam/spare-parts-in-location-main-record/senior', data }) return await request.post({ url: '/eam/spare-parts-out-location-detail-record/senior', data })
} else { } else {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/page`, params }) return await request.get({ url: `/eam/spare-parts-out-location-detail-record/page`, params })
} }
} }
// 查询备件入库记录主详情 // 查询备件入库记录主详情
export const getSparePartsOutLocationDetailRecord = async (id: number) => { export const getSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/get?id=` + id }) return await request.get({ url: `/eam/spare-parts-out-location-detail-record/get?id=` + id })
} }
// 新增备件入库记录主 // 新增备件入库记录主
export const createSparePartsOutLocationDetailRecord = async ( export const createSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO data: SparePartsOutLocationRecordDetailVO
) => { ) => {
return await request.post({ url: `/eam/spare-parts-in-location-main-record/create`, data }) return await request.post({ url: `/eam/spare-parts-out-location-detail-record/create`, data })
} }
// 修改备件入库记录主 // 修改备件入库记录主
export const updateSparePartsOutLocationDetailRecord = async ( export const updateSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO data: SparePartsOutLocationRecordDetailVO
) => { ) => {
return await request.put({ url: `/eam/spare-parts-in-location-main-record/update`, data }) return await request.put({ url: `/eam/spare-parts-out-location-detail-record/update`, data })
} }
// 删除备件入库记录主 // 删除备件入库记录主
export const deleteSparePartsOutLocationDetailRecord = async (id: number) => { export const deleteSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main-record/delete?id=` + id }) return await request.delete({
url: `/eam/spare-parts-out-location-detail-record/delete?id=` + id
})
} }
// 导出备件入库记录主 Excel // 导出备件入库记录主 Excel
export const exportSparePartsOutLocationDetailRecord = async (params) => { export const exportSparePartsOutLocationDetailRecord = async (params) => {
return await request.download({ return await request.download({
url: `/eam/spare-parts-in-location-main-record/export-excel`, url: `/eam/spare-parts-out-location-detail-record/export-excel`,
params params
}) })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-main-record/get-import-template' }) return request.download({
url: '/eam/spare-parts-out-location-detail-record/get-import-template'
})
} }

133
src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts

@ -11,113 +11,88 @@ import { dateFormatter } from '@/utils/formatTime'
export const SparePartsOutLocationRecordMain = useCrudSchemas( export const SparePartsOutLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '编号', label: '备件编号',
field: 'number', field: 'sparePartsCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
table: {
width: 180,
fixed: 'left'
}
}, },
{ {
label: '出库编号', label: '备件名称',
field: 'requestNumber', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false table: {
width: 110
}
}, },
{ {
label: '入库主题', label: '备件名称',
field: 'theme', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
table: {
width: 110
}
}, },
{ {
label: '入库类型', label: '备件类型',
field: 'type', field: 'classification',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE, dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string' dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
}, },
{ {
label: '流程状态', label: '规格型号',
field: 'status', field: 'specifications',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm: false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string'
}, },
{ {
label: '入库申请人', label: '存放位置',
field: 'applyer', field: 'locationCode',
sort: 'custom', sort: 'custom'
isSearch: false
}, },
{ {
label: '审核人', label: '计量单位',
field: 'approver', field: 'uom',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm: false isTable: true,
tableForm: {
type: 'Select'
}
}, },
{ {
label: '审核内容', label: '生产厂家',
field: 'approveContent', field: 'brand',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm: false
}, },
{ {
label: '审核时间', label: '申请单号',
field: 'approveTime', field: 'requestNumber',
sort: 'custom', sort: 'custom'
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
}, },
{ {
label: '入库时间', label: '申领数量',
field: 'createTime', field: 'applyQty',
sort: 'custom', sort: 'custom'
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
}, },
{ {
label: '备注', label: '出库时问',
field: 'remark', field: 'createTime',
sort: 'custom', sort: 'custom'
isSearch: false
} }
]) ])
) )

2
src/views/eam/SparePartsOutLocationRecord/index.vue

@ -153,7 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
// //
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SparePartsOutLocationRecordMainApi.getSparePartsOutLocationRecordMainPage // getListApi: SparePartsOutLocationRecordDetailApi.getSparePartsOutLocationDetailRecordPage //
}) })
// //

15
src/views/eam/itemAccounts/index.vue

@ -60,20 +60,7 @@
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- 详情 --> <!-- 详情 -->
<DetailLedger <Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
ref="detailRef"
:isBasic="true"
:allSchemas="ItemAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm

3
src/views/eam/itemAccounts/itemAccounts.data.ts

@ -22,6 +22,9 @@ export const ItemAccounts = useCrudSchemas(
field: 'itemNumber', field: 'itemNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 200
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {

164
src/views/eam/maintainExperience/maintainExperience.data.ts

@ -4,94 +4,88 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const MaintainExperienceRules = reactive({ export const MaintainExperienceRules = reactive({
name: [required], name: [required],
maintainNumber: [required], maintainNumber: [required]
}) })
export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const MaintainExperience = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: 'id', {
field: 'id', label: '经验标题',
sort: 'custom', field: 'name',
}, sort: 'custom',
{ isSearch: true
label: '经验标题', },
field: 'name', {
sort: 'custom', label: '经验内容',
isSearch: true, field: 'content',
}, sort: 'custom',
{ isTable: true,
label: '经验内容', form: {
field: 'content', componentProps: {
sort: 'custom', type: 'textarea',
isTable:true, height: 200
form: { }
componentProps: { }
type: 'textarea', },
height: 200
{
label: '保养工单编号',
field: 'maintainNumber',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '工单类型',
field: 'orderType',
sort: 'custom',
isForm: false,
isTable: false,
form: {
component: 'SelectV2'
} }
}, },
}, {
label: '来源字典',
{ field: 'sources',
label: '保养工单编号', sort: 'custom',
field: 'maintainNumber', dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
sort: 'custom', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: false,
isForm: false, isForm: false
}, },
{ {
label: '工单类型', label: '保养类型',
field: 'orderType', field: 'type',
sort: 'custom', sort: 'custom',
isForm: false, dictType: DICT_TYPE.DEVICE_TYPE,
isTable: false, dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { isSearch: false,
component: 'SelectV2' isForm: false
}, },
}, {
{ label: '设备/工装编号',
label: '来源字典', field: 'equipmentCode',
field: 'sources', sort: 'custom',
sort: 'custom', isSearch: false,
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, isForm: false
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 },
isSearch: false, {
isForm:false label: '设备/工装名称',
}, field: 'equipmentName',
{ sort: 'custom',
label: '保养类型', isSearch: false,
field: 'type', isForm: false
sort: 'custom', },
dictType: DICT_TYPE.DEVICE_TYPE, {
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 label: '创建时间',
isSearch: false, field: 'createTime',
isForm:false sort: 'custom',
}, formatter: dateFormatter,
{ isForm: false,
label: '设备/工装编号', detail: {
field: 'equipmentCode', dateFormat: 'YYYY-MM-DD HH:mm:ss'
sort: 'custom', }
isSearch:false,
isForm:false
},
{
label: '设备/工装名称',
field: 'equipmentName',
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
} }
}, ])
)
]))

205
src/views/eam/repairExperience/repairExperience.data.ts

@ -4,114 +4,109 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const RepairExperienceRules = reactive({ export const RepairExperienceRules = reactive({
name: [required], name: [required],
repairNumber: [required], repairNumber: [required]
}) })
export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const RepairExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '维修工单编号',
field: 'repairNumber',
sort: 'custom',
isSearch: true,
{ isForm: false
label: 'id', },
field: 'id', {
sort: 'custom', label: '经验内容',
}, field: 'content',
{ sort: 'custom',
label: '经验标题', isSearch: false,
field: 'name', form: {
sort: 'custom', component: 'Input',
isSearch: true, componentProps: {
}, type: 'textarea',
{ valueHtml: '',
label: '维修工单编号', height: 200
field: 'repairNumber', }
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '经验内容',
field: 'content',
sort: 'custom',
isSearch:false,
form: {
component: 'Input',
componentProps: {
type:'textarea',
valueHtml: '',
height: 200
} }
}, },
},
{
{ label: '来源字典',
label: '来源字典', field: 'sources',
field: 'sources', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, dictClass: 'string', // 默认都是字符串类型其他暂不考虑
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: false,
isSearch: false, isForm: false
isForm:false },
}, {
{ label: '报修类型',
label: '报修类型', field: 'type',
field: 'type', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.DEVICE_TYPE,
dictType: DICT_TYPE.DEVICE_TYPE, dictClass: 'string', // 默认都是字符串类型其他暂不考虑
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: false,
isSearch: false, isForm: false
isForm:false },
}, {
{ label: '设备/工装编号',
label: '设备/工装编号', field: 'equipmentCode',
field: 'equipmentCode', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch:false, isForm: false
isForm:false },
}, {
{ label: '设备/工装名称',
label: '设备/工装名称', field: 'equipmentName',
field: 'equipmentName', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch:false, isForm: false
isForm:false },
}, {
{ label: '故障时间',
label: '故障时间', field: 'faultTime',
field: 'faultTime', formatter: dateFormatter,
formatter: dateFormatter, sort: 'custom',
sort: 'custom', isSearch: false,
isSearch:false, isForm: false,
isForm:false, detail: {
detail:{ dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD HH:mm:ss' }
} },
}, {
{ label: '故障类型',
label: '故障类型', field: 'faultType',
field: 'faultType', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false
isForm:false },
}, {
{ label: '创建人',
label: '创建人', field: 'createTime',
field: 'createTime', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch:false, isForm: false,
isForm:false, isTable: false,
isTable:false, isDetail: false
isDetail:false },
}, {
{ label: '创建时间',
label: '创建时间', field: 'createTime',
field: 'createTime', sort: 'custom',
sort: 'custom', formatter: dateFormatter,
formatter: dateFormatter, isForm: false,
isForm: false, isSearch: false,
isSearch:false, detail: {
detail:{ dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD HH:mm:ss' }
} }
}, ])
)
]))

7
src/views/eam/sparePartsInLocationRecord/index.vue

@ -44,7 +44,7 @@
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
@ -86,7 +86,7 @@ const updataTableColumns = (val) => {
// //
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SparePartsInLocationRecordMainApi.getSparePartsInLocationRecordMainPage // getListApi: SparePartsInLocationRecordDetailApi.getSparePartsInLocationRecordDetailPage //
}) })
// //
@ -100,12 +100,11 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'refresh') { if (val == 'refresh') {
// //
getList() getList()
} else if (val == 'filtrate') { } else if (val == 'filtrate') {

392
src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts

@ -3,129 +3,102 @@ import { dateFormatter } from '@/utils/formatTime'
import * as ItemAccountsApi from '@/api/eam/itemAccounts' import * as ItemAccountsApi from '@/api/eam/itemAccounts'
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
// 表单校验 // 表单校验
export const SparePartsInLocationRecordMainRules = reactive({ export const SparePartsInLocationRecordMainRules = reactive({
number: [required], number: [required],
theme: [required], theme: [required],
type: [required], type: [required]
}) })
// 备件入库主表 // 备件入库主表
export const SparePartsInLocationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: 'id', {
field: 'id', label: '备件编号',
sort: 'custom', field: 'sparePartsCode',
isSearch: false, sort: 'custom',
isTable: false, isSearch: true,
isForm: false, isForm: false,
isDetail:false, table: {
}, width: 180,
{ fixed: 'left'
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '入库主题',
field: 'theme',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: false,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string',
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false,
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm:false
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm:false
},
{
label: '审核时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { {
component: 'DatePicker', label: '备件名称',
componentProps: { field: 'name',
type: 'datetime', sort: 'custom',
valueFormat: 'x' isSearch: true,
table: {
width: 110
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 110
}
}, },
}, {
{ label: '备件类型',
label: '入库时间', field: 'classification',
field: 'createTime', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.PART_CLASS,
formatter: dateFormatter, dictClass: 'string',
isSearch: false, isSearch: false,
search: { isTable: true,
component: 'DatePicker', tableForm: {
componentProps: { type: 'Select'
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false,
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '规格型号',
field: 'specifications',
sort: 'custom'
}, },
},
{
{ label: '存放位置',
label: '备注', field: 'locationCode',
field: 'remark', sort: 'custom'
sort: 'custom', },
isSearch: false, {
}, label: '计量单位',
])) field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
},
{
label: '出库时问',
field: 'createTime',
sort: 'custom'
}
])
)
// 备件入库子表 // 备件入库子表
export const SparePartsInLocationRecordDetailRules = reactive({ export const SparePartsInLocationRecordDetailRules = reactive({
number: [required], number: [required],
@ -133,24 +106,42 @@ export const SparePartsInLocationRecordDetailRules = reactive({
locationCode: [required], locationCode: [required],
areaCode: [required], areaCode: [required],
sparePartsCode: [required], sparePartsCode: [required],
applyQty: [required], applyQty: [required]
}) })
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationRecordDetail = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '库位编号', {
field: 'locationCode', label: '库位编号',
sort: 'custom', field: 'locationCode',
isSearch: false, sort: 'custom',
form: { isSearch: false,
componentProps: { form: {
isSearchList: true, // 开启查询弹窗 componentProps: {
searchListPlaceholder: '请选择库位编号', // 输入框占位文本 isSearchList: true, // 开启查询弹窗
searchField: 'code', // 查询弹窗赋值字段 searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchTitle: '库位信息', // 查询弹窗标题 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
@ -160,99 +151,80 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
] ]
} }
}, },
tableForm: { {
isInpuFocusShow: true, label: '库区编号',
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 field: 'areaCode',
searchField: 'itemNumber', // 查询弹窗赋值字段 sort: 'custom',
searchTitle: '备件信息', // 查询弹窗标题 isSearch: false,
form: {
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 componentProps: {
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 disabled: true
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
} }
] },
} tableForm: {
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true disabled: true
} }
}, },
tableForm:{ {
disabled: true label: '备件编号',
} field: 'sparePartsCode',
}, sort: 'custom',
{ table: {
label: '备件编号', width: 150
field: 'sparePartsCode', },
sort: 'custom', form: {
table: { componentProps: {
width: 150 disabled: true
}, }
form: { },
componentProps: { tableForm: {
disabled: true disabled: true
} }
}, },
tableForm:{ {
disabled: true label: '库存数量',
} field: 'currentQty',
}, sort: 'custom',
{ isSearch: false,
label: '库存数量', tableForm: {
field: 'currentQty', disabled: true
sort: 'custom', },
isSearch: false, form: {
tableForm: { componentProps: {
disabled: true disabled: true
}
},
isDetail: false,
isTable: false
}, },
form:{ {
componentProps:{ label: '申领数量',
disabled: true field: 'applyQty',
} sort: 'custom',
isSearch: false
}, },
isDetail:false, {
isTable:false label: '创建时间',
}, field: 'createTime',
{ sort: 'custom',
label: '申领数量', formatter: dateFormatter,
field: 'applyQty', isSearch: true,
sort: 'custom', search: {
isSearch: false component: 'DatePicker',
}, componentProps: {
{ valueFormat: 'YYYY-MM-DD HH:mm:ss',
label: '创建时间', type: 'daterange',
field: 'createTime', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
sort: 'custom', }
formatter: dateFormatter, },
isSearch: true, isForm: false,
search: { isTableForm: false
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}, },
isForm: false, {
isTableForm:false label: '备注',
}, field: 'remark',
{ sort: 'custom',
label: '备注', isSearch: true
field: 'remark', }
sort: 'custom', ])
isSearch: true, )
},
]))

49
src/views/eam/sparepartsinlocation/index.vue

@ -132,29 +132,29 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
console.log(11, val[0]) console.log(11, val[0])
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'locationCode') { if (formField == 'locationCode') {
row['locationCode'] = val[0].locationNumber row['locationCode'] = val[0].locationNumber
row['areaCode'] = val[0].areaNumber row['areaCode'] = val[0].areaNumber
row['sparePartsCode'] = val[0].itemNumber row['sparePartsCode'] = val[0].itemNumber
row['currentQty'] = val[0].qty row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn row['isRadeIn'] = val[0].isRadeIn
} }
} else { } else {
if (formField == 'locationCode') { if (formField == 'locationCode') {
setV['locationCode'] = val[0].locationNumber setV['locationCode'] = val[0].locationNumber
setV['areaCode'] = val[0].areaNumber setV['areaCode'] = val[0].areaNumber
setV['sparePartsCode'] = val[0].itemNumber setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn setV['isRadeIn'] = val[0].isRadeIn
}
} }
formRef.setValues(setV) }
}) formRef.setValues(setV)
})
} }
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
@ -363,11 +363,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
console.log(formRef.value) console.log(formRef.value)
formRef.value.formLoading = true formRef.value.formLoading = true
let isHave = data.subList.some(item=>item.applyQty>item.currentQty)
if(isHave){
message.warning('申领数量不能大于库存数量')
return
}
try { try {
if (formType === 'create') { if (formType === 'create') {
await SparePartsInLocationMainApi.createSparePartsInLocationMain(data) await SparePartsInLocationMainApi.createSparePartsInLocationMain(data)

Loading…
Cancel
Save