Browse Source

EAM ——> 设备台账 台账验收更新

hella_online_20240829
gaojs 4 months ago
parent
commit
09ccf1e7d3
  1. 4
      src/api/eam/equipmentSigning/index.ts
  2. 26
      src/views/eam/equipmentSigning/equipmentSigning.data.ts
  3. 4
      src/views/eam/equipmentSigning/index.vue

4
src/api/eam/equipmentSigning/index.ts

@ -50,6 +50,10 @@ export const getEquipmentSigning = async (id: number) => {
export const createEquipmentSigning = async (data: EquipmentSigningVO) => { export const createEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.post({ url: `/eam/equipment-signing/create`, data }) return await request.post({ url: `/eam/equipment-signing/create`, data })
} }
export const createsEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.post({ url: `/eam/equipment-signing/creates`, data })
}
// 修改设备到货签收记录 // 修改设备到货签收记录
export const updateEquipmentSigning = async (data: EquipmentSigningVO) => { export const updateEquipmentSigning = async (data: EquipmentSigningVO) => {

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

@ -54,10 +54,15 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '设备信息', // 查询弹窗标题 searchTitle: '设备信息', // 查询弹窗标题
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchPage: EquipmentAccountsApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法 searchPage: EquipmentAccountsApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition:
[{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'status',
value: 'TOACCEPT',
isMainValue: false
}] }]
} }
}, },
@ -263,6 +268,7 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'storageLocation', field: 'storageLocation',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
@ -282,28 +288,14 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { isForm: false,
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
}, },
{ {
label: '产线编号', label: '产线编号',
field: 'lineCode', field: 'lineCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {

4
src/views/eam/equipmentSigning/index.vue

@ -45,7 +45,7 @@
:rules="EquipmentSigningRules" :rules="EquipmentSigningRules"
:formAllSchemas="EquipmentSigning.allSchemas" :formAllSchemas="EquipmentSigning.allSchemas"
:apiUpdate="EquipmentSigningApi.updateEquipmentSigning" :apiUpdate="EquipmentSigningApi.updateEquipmentSigning"
:apiCreate="EquipmentSigningApi.createEquipmentSigning" :apiCreate="EquipmentSigningApi.createsEquipmentSigning"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange" @onChange="onChange"
@ -179,7 +179,7 @@ const formsSuccess = async (formType,data) => {
if(data.activeTime==0)data.activeTime = null; if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') { if (formType === 'create') {
await EquipmentSigningApi.createEquipmentSigning(data) await EquipmentSigningApi.createsEquipmentSigning(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await EquipmentSigningApi.updateEquipmentSigning(data) await EquipmentSigningApi.updateEquipmentSigning(data)

Loading…
Cancel
Save