Browse Source

BUG修改

master_hella_20240701
叶佳兴 7 months ago
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. 26
      src/views/eam/maintainExperience/maintainExperience.data.ts
  7. 23
      src/views/eam/repairExperience/repairExperience.data.ts
  8. 3
      src/views/eam/sparePartsInLocationRecord/index.vue
  9. 158
      src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts
  10. 5
      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) {
delete params.isSearch
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 {
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) => {
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 (
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 (
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) => {
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
export const exportSparePartsOutLocationDetailRecord = async (params) => {
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
})
}
// 下载用户导入模板
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(
reactive<CrudSchema[]>([
{
label: '编号',
field: 'number',
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: true,
isForm: false
isForm: false,
table: {
width: 180,
fixed: 'left'
}
},
{
label: '出库编号',
field: 'requestNumber',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '入库主题',
field: 'theme',
sort: 'custom',
isSearch: true
table: {
width: 110
}
},
{
label: '入库类型',
field: 'type',
label: '备件名称',
field: 'name',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string'
isSearch: true,
table: {
width: 110
}
},
{
label: '流程状态',
field: 'status',
label: '备件类型',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
isSearch: false,
isForm: false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string'
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm: false
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm: false
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '审核时间',
field: 'approveTime',
label: '计量单位',
field: 'uom',
sort: 'custom',
formatter: dateFormatter,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
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'
isTable: true,
tableForm: {
type: 'Select'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
{
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
{
label: '入库时间',
field: 'createTime',
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')]
}
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
label: '出库时问',
field: 'createTime',
sort: 'custom'
}
])
)

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

@ -153,7 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
//
const Echo = []
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" />
<!-- 详情 -->
<DetailLedger
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"
/>
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
<!-- 导入 -->
<ImportForm

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

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

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

@ -4,20 +4,16 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MaintainExperienceRules = reactive({
name: [required],
maintainNumber: [required],
maintainNumber: [required]
})
export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
export const MaintainExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '经验内容',
@ -29,7 +25,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
type: 'textarea',
height: 200
}
},
}
},
{
@ -37,7 +33,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintainNumber',
sort: 'custom',
isSearch: true,
isForm: false,
isForm: false
},
{
label: '工单类型',
@ -47,7 +43,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
form: {
component: 'SelectV2'
},
}
},
{
label: '来源字典',
@ -90,8 +86,6 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
]))
}
])
)

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

@ -4,21 +4,16 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RepairExperienceRules = reactive({
name: [required],
repairNumber: [required],
repairNumber: [required]
})
export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
export const RepairExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '维修工单编号',
@ -26,7 +21,7 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false,
isForm: false
},
{
label: '经验内容',
@ -40,7 +35,7 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
valueHtml: '',
height: 200
}
},
}
},
{
@ -112,6 +107,6 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
]))
}
])
)

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

@ -86,7 +86,7 @@ const updataTableColumns = (val) => {
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SparePartsInLocationRecordMainApi.getSparePartsInLocationRecordMainPage //
getListApi: SparePartsInLocationRecordDetailApi.getSparePartsInLocationRecordDetailPage //
})
//
@ -100,7 +100,6 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//

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

@ -3,129 +3,102 @@ import { dateFormatter } from '@/utils/formatTime'
import * as ItemAccountsApi from '@/api/eam/itemAccounts'
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
// 表单校验
export const SparePartsInLocationRecordMainRules = reactive({
number: [required],
theme: [required],
type: [required],
type: [required]
})
// 备件入库主表
export const SparePartsInLocationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const SparePartsInLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: false,
isTable: false,
isSearch: true,
isForm: false,
isDetail:false,
table: {
width: 180,
fixed: 'left'
}
},
{
label: '编号',
field: 'number',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 110
}
},
{
label: '入库主题',
field: 'theme',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
table: {
width: 110
}
},
{
label: '流程状态',
field: 'status',
label: '备件类型',
field: 'classification',
sort: 'custom',
isSearch: false,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm:false
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm:false
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '审核时间',
field: 'approveTime',
label: '计量单位',
field: 'uom',
sort: 'custom',
formatter: dateFormatter,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
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')]
isTable: true,
tableForm: {
type: 'Select'
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
{
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
},
{
label: '入库时间',
label: '出库时问',
field: 'createTime',
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')]
sort: 'custom'
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
]))
])
)
// 备件入库子表
export const SparePartsInLocationRecordDetailRules = reactive({
number: [required],
@ -133,10 +106,11 @@ export const SparePartsInLocationRecordDetailRules = reactive({
locationCode: [required],
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
applyQty: [required]
})
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const SparePartsInLocationRecordDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '库位编号',
field: 'locationCode',
@ -250,9 +224,7 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
]))
isSearch: true
}
])
)

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

@ -363,11 +363,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
console.log(formRef.value)
formRef.value.formLoading = true
let isHave = data.subList.some(item=>item.applyQty>item.currentQty)
if(isHave){
message.warning('申领数量不能大于库存数量')
return
}
try {
if (formType === 'create') {
await SparePartsInLocationMainApi.createSparePartsInLocationMain(data)

Loading…
Cancel
Save