Browse Source

[SBBJ-1224]查询自己

master
zengqinyuan 6 days ago
parent
commit
29d6cd0940
  1. 158
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

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

@ -3,14 +3,15 @@ import { dateFormatter } from '@/utils/formatTime'
import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data' import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { validateHanset, validateEmail } from '@/utils/validator' import { getUserListAll } from '@/api/system/user'
import Detail from '@/views/bpm/oa/leave/detail.vue'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemApplyMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '领用编号', label: '领用编号',
field: 'number', field: 'number',
@ -20,29 +21,68 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '申领人', label: '申领人',
field: 'applyId', field: 'applyId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isSearch: false, hiddenSearchHigh: true,
isSearch: true,
search: {
show: true,
component: 'Select',
api: () => getUserListAll(),
componentProps: {
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true
}
}
}, },
{ {
label: '审批人', label: '审批人',
field: 'approveId', field: 'approveId',
hiddenSearchHigh: true,
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isSearch: false, isSearch: true,
search: {
show: true,
component: 'Select',
api: () => getUserListAll(),
componentProps: {
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true
}
}
}, },
{ {
label: '出库人', label: '出库人',
field: 'outId', field: 'outId',
hiddenSearchHigh: true,
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isSearch: false, isSearch: true,
search: {
show: true,
component: 'Select',
api: () => getUserListAll(),
componentProps: {
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true
}
}
}, },
{ {
label: '是否已审批', label: '是否已审批',
@ -81,13 +121,13 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '申请主题', label: '申请主题',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom'
}, },
{ {
label: '成本中心', label: '成本中心',
field: 'costCenter', field: 'costCenter',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT, dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT
}, },
{ {
label: '创建者', label: '创建者',
@ -138,26 +178,19 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)
//表单校验 //表单校验
export const ItemApplyMainRules = reactive({ export const ItemApplyMainRules = reactive({
name: [ name: [{ required: true, message: '请填写描述', trigger: 'change' }],
{ required: true, message: '请填写描述', trigger: 'change' } remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
], available: [{ required: true, message: '请选择是否可用', trigger: 'change' }],
remark: [ costCenter: [{ required: true, message: '请填写描述', trigger: 'change' }]
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
costCenter:[
{ required: true, message: '请填写描述', trigger: 'change' }
],
}) })
export const DeviceMOLD = useCrudSchemas(
export const DeviceMOLD = useCrudSchemas(reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '编号', label: '编号',
field: 'number', field: 'number',
@ -166,25 +199,26 @@ export const DeviceMOLD = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '名称', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom'
}, },
{ {
label: '规格型号', label: '规格型号',
field: 'specification', field: 'specification',
sort: 'custom', sort: 'custom'
}, }
])
])) )
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemApplyDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '备件编号', label: '备件编号',
field: 'itemNumber', field: 'itemNumber',
@ -197,11 +231,12 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '备件信息', searchTitle: '备件信息',
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}, }
] ]
}, },
form: { form: {
@ -213,11 +248,13 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '备件信息', searchTitle: '备件信息',
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},] }
]
} }
} }
}, },
@ -249,7 +286,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select', type: 'Select',
disabled: false disabled: false
}, },
isTableForm: true, isTableForm: true
}, },
{ {
label: '规格型号', label: '规格型号',
@ -281,13 +318,15 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '单号信息', searchTitle: '单号信息',
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: "TRUE", value: 'TRUE',
isMainValue: false isMainValue: false
}, { },
{
key: 'type', key: 'type',
value: "type", value: 'type',
isMainValue: true isMainValue: true
} }
] ]
@ -301,15 +340,18 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '单号信息', searchTitle: '单号信息',
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: "TRUE", value: 'TRUE',
isMainValue: false isMainValue: false
}, { },
{
key: 'type', key: 'type',
value: "type", value: 'type',
isMainValue: true isMainValue: true
}] }
]
} }
} }
}, },
@ -353,7 +395,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'InputNumber', type: 'InputNumber',
min: 0, min: 0,
precision: 2 precision: 2
}, }
}, },
{ {
label: '库存总数', label: '库存总数',
@ -369,7 +411,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
min: 0, min: 0,
precision: 2 precision: 2
}, },
isTable:false, isTable: false
}, },
{ {
label: '可申请库存数量', label: '可申请库存数量',
@ -385,7 +427,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
min: 0, min: 0,
precision: 2 precision: 2
}, },
isTable:false, isTable: false
}, },
{ {
label: '已出库数量', label: '已出库数量',
@ -400,8 +442,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'InputNumber', type: 'InputNumber',
min: 0, min: 0,
precision: 2 precision: 2
}, }
}, }
// { // {
// label: '是否账内库', // label: '是否账内库',
@ -458,24 +500,18 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
// }, // },
// isTableForm: false, // isTableForm: false,
// } // }
])) ])
)
//表单校验 //表单校验
export const ItemApplyDetailRules = reactive({ export const ItemApplyDetailRules = reactive({
itemNumber: [ itemNumber: [{ required: true, message: '请选择备件编号', trigger: 'change' }],
{ required: true, message: '请选择备件编号', trigger: 'change' }
],
// type: [ // type: [
// { required: true, message: '请选择类型', trigger: 'change' } // { required: true, message: '请选择类型', trigger: 'change' }
// ], // ],
// deviceNumber: [ // deviceNumber: [
// { required: true, message: '请选择设备模具编号', trigger: 'change' } // { required: true, message: '请选择设备模具编号', trigger: 'change' }
// ], // ],
qty: [ qty: [{ required: true, message: '请输入申领数量', trigger: 'change' }],
{ required: true, message: '请输入申领数量', trigger: 'change' } available: [{ required: true, message: '请选择是否可用', trigger: 'change' }]
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
}) })

Loading…
Cancel
Save