Browse Source

导出修改

master
叶佳兴 3 weeks ago
parent
commit
ae9332a44b
  1. 677
      src/views/eam/basic/item/item.data.ts
  2. 35
      src/views/eam/item/adjustRecord/adjustRecord.data.ts
  3. 35
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  4. 54
      src/views/eam/item/countRecord/countRecord.data.ts
  5. 36
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  6. 35
      src/views/eam/item/countadjustWork/countadjustWork.data.ts
  7. 35
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  8. 57
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  9. 51
      src/views/eam/item/itemMaintenance/itemMaintenance.data.ts
  10. 37
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts
  11. 44
      src/views/eam/item/itemOutLocation/itemOutLocation.data.ts
  12. 2
      src/views/eam/item/itemUseRecordMain/index.vue
  13. 261
      src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts
  14. 42
      src/views/eam/item/replaceItemDes/replaceItemDes.data.ts

677
src/views/eam/basic/item/item.data.ts

@ -16,370 +16,375 @@ export const ItemRules = reactive({
{ required: true, message: '请选择备件单位', trigger: 'blur' }, { required: true, message: '请选择备件单位', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
classification: [ classification: [{ required: true, message: '请选择备件分类', trigger: 'blur' }],
{ required: true, message: '请选择备件分类', trigger: 'blur' }, describes: [{ max: 600, message: '不得超过600个字符', trigger: 'blur' }]
],
describes: [
{ max: 600, message: '不得超过600个字符', trigger: 'blur' }
],
}) })
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ export const Item = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '备件编号', {
field: 'number', label: '备件编号',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
isForm: true, isSearch: true,
table: { isForm: true,
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
}, }
{
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 110,
}, },
}, {
{ label: '备件名称',
label: '规格', field: 'name',
field: 'specifications', sort: 'custom',
sort: 'custom', isSearch: true,
}, table: {
{ width: 110
label: '是否常储', }
field: 'isConstant',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 110,
}, },
tableForm: { {
type: 'Select', label: '规格',
inactiveValue: 'FALSE', field: 'specifications',
disabled: true sort: 'custom'
}, },
form: { {
component: 'Switch', label: '是否常储',
value: 'TRUE', field: 'isConstant',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 110
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
} },
}, {
{ label: '科目',
label: '科目', field: 'subject',
field: 'subject', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.ITEM_SUBJECT,
dictType: DICT_TYPE.ITEM_SUBJECT, dictClass: 'string',
dictClass: 'string', isSearch: false,
isSearch: false, isTable: true,
isTable: true, tableForm: {
tableForm: { type: 'Select'
type: 'Select' }
} },
},
{ {
label: '科目代码', label: '科目代码',
field: 'subjectCode', field: 'subjectCode',
sort: 'custom', sort: 'custom',
isTable: true, isTable: true
}, },
{ {
label: '单位', label: '单位',
field: 'uom', field: 'uom',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '类别', label: '类别',
field: 'category', field: 'category',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.ITEM_CATEGORY, dictType: DICT_TYPE.ITEM_CATEGORY,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
},
{
label: '备件分类',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '区域',
field: 'region',
sort: 'custom',
dictType: DICT_TYPE.ITEM_REGION,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '采购方式',
field: 'purchaseWay',
sort: 'custom',
dictType: DICT_TYPE.PURCHASE_WAY,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '物料类型',
field: 'itemType',
sort: 'custom',
isSearch: true,
table: {
width: 110,
}, },
}, {
{ label: '备件分类',
label: '单价', field: 'classification',
field: 'singlePrice', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.CLASSIFICATION,
}, dictClass: 'string',
{ isSearch: false,
label: '重采购点', isTable: true,
field: 'reprocurement', tableForm: {
sort: 'custom', type: 'Select'
table: { }
width: 110,
}, },
form: { {
component: 'InputNumber', label: '区域',
value: 0 field: 'region',
sort: 'custom',
dictType: DICT_TYPE.ITEM_REGION,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
}, },
}, {
{ label: '采购方式',
label: '安全库存', field: 'purchaseWay',
field: 'safetyStock', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.PURCHASE_WAY,
isSearch: false, dictClass: 'string',
isForm: true, isSearch: false,
table: { isTable: true,
width: 110, tableForm: {
type: 'Select'
}
}, },
form: { {
component: 'InputNumber', label: '物料类型',
value: 0, field: 'itemType',
sort: 'custom',
isSearch: true,
table: {
width: 110
}
}, },
}, {
{ label: '单价',
label: '成本中心', field: 'singlePrice',
field: 'cost', sort: 'custom'
sort: 'custom',
table: {
width: 110,
}, },
}, {
{ label: '重采购点',
label: '采购员', field: 'reprocurement',
field: 'purchaser', sort: 'custom',
sort: 'custom', table: {
table: { width: 110
width: 100, },
form: {
component: 'InputNumber',
value: 0
}
}, },
}, {
{ label: '安全库存',
label: '财务', field: 'safetyStock',
field: 'financer', sort: 'custom',
sort: 'custom', isSearch: false,
}, isForm: true,
{ table: {
label: '是否以旧换新', width: 110
field: 'isRadeIn', },
dictType: DICT_TYPE.TRUE_FALSE, form: {
dictClass: 'string', component: 'InputNumber',
isSearch: false, value: 0
isTable: true, }
sort: 'custom',
table: {
width: 140
}, },
tableForm: { {
type: 'Select', label: '成本中心',
inactiveValue: 'FALSE', field: 'cost',
disabled: true sort: 'custom',
table: {
width: 110
}
}, },
form: { {
component: 'Switch', label: '采购员',
value: 'TRUE', field: 'purchaser',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', table: {
activeValue: 'TRUE' width: 100
} }
}
},
{
label: '是否框架协议',
field: 'isFramework',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 140
}, },
tableForm: { {
type: 'Select', label: '财务',
inactiveValue: 'FALSE', field: 'financer',
disabled: true sort: 'custom'
}, },
form: { {
component: 'Switch', label: '是否以旧换新',
value: 'TRUE', field: 'isRadeIn',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 140
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
}
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
}, },
}, {
{ label: '是否框架协议',
label: '描述', field: 'isFramework',
field: 'describes', dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom', dictClass: 'string',
form: { isSearch: false,
component: 'Input', isTable: true,
componentProps: { sort: 'custom',
type: 'textarea', table: {
width: 140
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
}, },
colProps: { form: {
span: 24, component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
}
},
// {
// label: '图片',
// field: 'upload',
// isTable: true,
// },
// {
// label: '文件',
// field: 'filePathListView',
// sort: 'custom',
// isTable: false,
// table: {
// },
// form: {
// component: 'UploadFile',
// componentProps: {
// }
// }
// },
{
label: '文件',
field: 'attachmentFileList',
sort: 'custom',
isTable: false,
isForm: true,
table: {
}, },
form: { // {
component: 'UploadImgs', // label: '是否可用',
colProps: { // field: 'available',
span: 24 // dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '描述',
field: 'describes',
sort: 'custom',
form: {
component: 'Input',
componentProps: {
type: 'textarea'
},
colProps: {
span: 24
}
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
}
},
// {
// label: '图片',
// field: 'upload',
// isTable: true,
// },
// {
// label: '文件',
// field: 'filePathListView',
// sort: 'custom',
// isTable: false,
// table: {
// },
// form: {
// component: 'UploadFile',
// componentProps: {
// }
// }
// },
{
label: '文件',
field: 'attachmentFileList',
sort: 'custom',
isTable: false,
isForm: true,
table: {},
form: {
component: 'UploadImgs',
colProps: {
span: 24
}
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 200,
fixed: 'right'
} }
} }
}, ])
{ )
label: '操作',
field: 'action',
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
]))
export const ItemSearchTable = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemSearchTable = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '备件编号', {
field: 'number', label: '备件编号',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
isForm: false, isSearch: true,
table: { isForm: false,
fixed: 'left' table: {
fixed: 'left'
}
}, },
}, {
{ label: '备件名称',
label: '备件名称', field: 'name',
field: 'name', sort: 'custom',
sort: 'custom', isSearch: true,
isSearch: true, table: {}
table: {
}, },
}, {
{ label: '数量',
label: '数量', field: 'qty',
field: 'qty', sort: 'custom'
sort: 'custom', }
} ])
])) )

35
src/views/eam/item/adjustRecord/adjustRecord.data.ts

@ -26,6 +26,41 @@ export const AdjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', // label: '操作',
// field: 'action', // field: 'action',

35
src/views/eam/item/applicationRecord/applicationRecordMain.data.ts

@ -115,6 +115,41 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

54
src/views/eam/item/countRecord/countRecord.data.ts

@ -59,25 +59,41 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '创建时间', label: '创建者',
field: 'createTime', field: 'creator',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, isSearch: false
isSearch: false, },
search: { {
component: 'DatePicker', label: '创建时间',
componentProps: { field: 'createTime',
valueFormat: 'YYYY-MM-DD HH:mm:ss', formatter: dateFormatter,
type: 'daterange', detail: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] dateFormat: 'YYYY-MM-DD HH:mm:ss'
} },
}, sort: 'custom',
isForm: false, isTable: true,
detail: { form: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' component: 'DatePicker',
} componentProps: {
}, style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

36
src/views/eam/item/countadjustPlan/countadjustPlan.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data' import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data'
import * as LocationAreaApi from '@/api/eam/basic/locationArea' import * as LocationAreaApi from '@/api/eam/basic/locationArea'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const CountadjustPlanRules = reactive({ export const CountadjustPlanRules = reactive({
@ -93,6 +94,41 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

35
src/views/eam/item/countadjustWork/countadjustWork.data.ts

@ -35,6 +35,41 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

35
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -531,6 +531,41 @@ export const ItemAccounts = useCrudSchemas(
}, },
isForm: false isForm: false
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

57
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -90,29 +90,40 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT, dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT,
}, },
{ {
label: '创建时间', label: '创建者',
field: 'createTime', field: 'creator',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, isSearch: false
isTable: true, },
table: { {
width: 180, label: '创建时间',
}, field: 'createTime',
isSearch: true, formatter: dateFormatter,
search: { detail: {
component: 'DatePicker', dateFormat: 'YYYY-MM-DD HH:mm:ss'
componentProps: { },
valueFormat: 'YYYY-MM-DD HH:mm:ss', sort: 'custom',
type: 'daterange', isTable: true,
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] form: {
} component: 'DatePicker',
}, componentProps: {
isForm: false, style: { width: '100%' },
detail: { type: 'datetime',
width: 180, dateFormat: 'YYYY-MM-DD HH:mm:ss',
dateFormat: 'YYYY-MM-DD HH:mm:ss' valueFormat: 'x'
}, }
}, },
isForm: false,
isSearch: true,
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: '操作', label: '操作',

51
src/views/eam/item/itemMaintenance/itemMaintenance.data.ts

@ -64,22 +64,6 @@ export const ItemMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
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')]
}
},
isForm: false,
},
{ {
label: '维修原因', label: '维修原因',
field: 'reasons', field: 'reasons',
@ -110,6 +94,41 @@ export const ItemMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', // label: '操作',
// field: 'action', // field: 'action',

37
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { Item } from '@/views/eam/basic/item/item.data' import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
@ -140,6 +140,41 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

44
src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

@ -50,15 +50,41 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{
{ label: '创建者',
label: '创建时间', field: 'creator',
field: 'createTime', sort: 'custom',
sort: 'custom', isSearch: false
formatter: dateFormatter, },
isTable: true, {
isForm: false label: '创建时间',
}, field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

2
src/views/eam/item/itemUseRecordMain/index.vue

@ -117,7 +117,7 @@
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'item:itemUseRecordMain:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'item:itemUseRecordMain:create'}), //
// defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

261
src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts

@ -8,160 +8,159 @@ const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ItemUseRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemUseRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '收货单编号', {
field: 'number', label: '收货单编号',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
table: { isSearch: true,
fixed: 'left' table: {
fixed: 'left'
}
},
{
label: '关联工单',
field: 'associatedNumber',
sort: 'custom'
}, },
},
{
label: '关联工单',
field: 'associatedNumber',
sort: 'custom',
},
{ {
label: '库存动作', label: '库存动作',
field: 'inventoryAction', field: 'inventoryAction',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INVENTORY_ACTION, dictType: DICT_TYPE.INVENTORY_ACTION,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '操作者', label: '操作者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false
},
{
label: '操作时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
{ sort: 'custom',
label: '操作时间', isTable: true,
field: 'createTime', form: {
formatter: dateFormatter, component: 'DatePicker',
detail: { componentProps: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' style: { width: '100%' },
}, type: 'datetime',
sort: 'custom', dateFormat: 'YYYY-MM-DD HH:mm:ss',
isTable: true, valueFormat: 'x'
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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,
// label: '操作', isSearch: true,
// field: 'action', search: {
// isDetail: false, component: 'DatePicker',
// isForm: false, componentProps: {
// table: { valueFormat: 'YYYY-MM-DD HH:mm:ss',
// width: 200, type: 'daterange',
// fixed: 'right' defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
// } }
// } }
])) }
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 200,
// fixed: 'right'
// }
// }
])
)
//表单校验 //表单校验
export const ItemUseRecordMainRules = reactive({ export const ItemUseRecordMainRules = reactive({
number: [ number: [required, { max: 20, message: '请输入收货订单号', trigger: 'blur' }]
required,
{ max: 20, message: '请输入收货订单号', trigger: 'blur' },
]
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ItemInLocationInaccount = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemInLocationInaccount = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '备件编号', {
field: 'itemNumber', label: '备件编号',
sort: 'custom', field: 'itemNumber',
isSearch: true, sort: 'custom',
tableForm: { isSearch: true,
isInpuFocusShow: true, tableForm: {
searchListPlaceholder: '请选择备件编号', isInpuFocusShow: true,
searchField: 'number', searchListPlaceholder: '请选择备件编号',
searchTitle: '备件信息', searchField: 'number',
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 searchTitle: '备件信息',
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
searchCondition: [{ searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
key: 'available', searchCondition: [
value: 'TRUE', {
isMainValue: false key: 'available',
value: 'TRUE',
isMainValue: false
}
]
} }
]
}, },
}, {
{ label: '库位编号',
label: '库位编号', field: 'locationNumber',
field: 'locationNumber', sort: 'custom',
sort: 'custom', isForm: false,
isForm: false, isSearch: true,
isSearch: true, table: {
table: { width: 180
width: 180, }
}, },
}, {
{ label: '入库类型',
label: '入库类型', field: 'type',
field: 'type', sort: 'custom',
sort: 'custom', isSearch: true,
isSearch: true, dictType: DICT_TYPE.ITEM_OUT_IN_TYPE,
dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, dictClass: 'string',
dictClass: 'string', form: {
form: { component: 'Select'
component: 'Select' }
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'InputNumber', label: '数量',
componentProps: { field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1, min: 1,
precision: 6 precision: 6
} }
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
} }
}, ])
])) )
//表单校验 //表单校验
export const ItemInLocationInaccountRules = reactive({ export const ItemInLocationInaccountRules = reactive({
itemNumber: [ itemNumber: [{ required: true, message: '请输入备件编号', trigger: 'blur' }]
{ required: true, message: '请输入备件编号', trigger: 'blur' },
],
}) })

42
src/views/eam/item/replaceItemDes/replaceItemDes.data.ts

@ -62,13 +62,41 @@ export const ReplaceItemDes = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ {
label: '创建时间', label: '创建者',
field: 'createTime', field: 'creator',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, isSearch: false
isForm: false },
}, {
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
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: '操作', label: '操作',
field: 'action', field: 'action',

Loading…
Cancel
Save