Browse Source

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

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

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

@ -50,6 +50,10 @@ export const getEquipmentSigning = async (id: number) => {
export const createEquipmentSigning = async (data: EquipmentSigningVO) => {
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) => {
@ -69,4 +73,4 @@ export const exportEquipmentSigning = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-signing/get-import-template' })
}
}

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

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

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

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

Loading…
Cancel
Save