| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'deviceName', |
| | | title: '设备名称', |
| | | title: t('machine.basicName'), |
| | | editRender: {}, |
| | | slots: {default: 'basicCategory_default', edit: 'deviceName'} |
| | | }, |
| | | { |
| | | field: 'type', |
| | | title: '类型', |
| | | title: t('machine.type'), |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | }, |
| | | { |
| | | field: 'faultTime', |
| | | title: '故障日期', |
| | | title: t('machine.faultTime'), |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | }, |
| | | { |
| | | field: 'faultReason', |
| | | title: '故障原因', |
| | | title: t('machine.faultReason'), |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | }, |
| | | { |
| | | field: 'maintenanceTime', |
| | | title: '保养日期', |
| | | title: t('machine.maintenanceTime'), |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | }, |
| | | { |
| | | field: 'maintenanceIllustrate', |
| | | title: '保养说明', |
| | | title: t('machine.maintenanceIllustrate'), |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | }, |
| | | { |
| | | field: 'startTime', |
| | | title: '维修/保养开始时间', |
| | | title: t('machine.startTime'), |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | }, |
| | | { |
| | | field: 'stopTime', |
| | | title: '维修/保养结束时间', |
| | | title: t('machine.stopTime'), |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | }, |
| | | |
| | | { |
| | | field: 'process', |
| | | title: '所在工序', |
| | | title: t('machine.process'), |
| | | editRender: {}, |
| | | slots: {default: 'reportingDeviceSort_default', edit: 'process'} |
| | | }, |
| | | { |
| | | field: 'personnel', |
| | | title: '维修/保养人员', |
| | | title: t('machine.personnel'), |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | }, |
| | | { |
| | | field: 'cost', |
| | | title: '费用', |
| | | title: t('machine.cost'), |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | }, |
| | | ], |
| | |
| | | buttons: [ |
| | | {code: 'removeRow', name: t('basicData.delete'), status: 'primary', icon: 'vxe-icon-delete'}, |
| | | {code: 'addRow', name: t('reportingWorks.increase'), status: 'primary', icon: 'vxe-icon-square-plus'}, |
| | | {code: 'save', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'save', name: t('basicData.save'), status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return '' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | |
| | | }) |
| | | request.post("/maintenance/saveMaintenanceAndRepair", machineData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | //router.push('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({ |
| | | path: '/main/machine/AddMaintenanceAndRepair', |