| | |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title: '设备ID', |
| | | title: '设备编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId' |
| | | dataIndex: 'equipmentId_dictText' |
| | | }, |
| | | { |
| | | title: '标准ID', |
| | | title: '标准名称', |
| | | align: 'center', |
| | | dataIndex: 'standardId' |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title: '计划执行日期', |
| | | title: '计划保养日期', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceDate' |
| | | }, |
| | |
| | | { |
| | | title: '保养人', |
| | | align: 'center', |
| | | dataIndex: 'operator' |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: '保养状态', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStatus' |
| | | dataIndex: 'maintenanceStatus_dictText' |
| | | }, |
| | | { |
| | | title: '创建方式', |
| | | align: 'center', |
| | | dataIndex: 'creationMethod' |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: '确认人', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser' |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认时间', |
| | |
| | | dataIndex: 'confirmTime' |
| | | }, |
| | | { |
| | | title: '保养执行图片;id以逗号分隔', |
| | | title: '保养图片', |
| | | align: 'center', |
| | | dataIndex: 'imageFiles' |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | dataIndex: 'remark', |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | methods: { |
| | | add() { |
| | | //初始化默认值 |
| | | this.model = {}; |
| | | this.visible = true; |
| | | this.editable = false; |
| | | this.detail.dataSource = []; |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | // debugger |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true; |
| | | this.detail.dataSource = []; |
| | | this.loadDetail(record.id); |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | |
| | | }, |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable(); |
| | | if(errMap){ |
| | | this.$message.warning("数据校验失败!"); |
| | | return; |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | } |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData(); |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData(); |
| | | that.model.tableDetailList = [...tableData]; |
| | | that.model.removeDetailList = [...removeData]; |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData() |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.removeDetailList = [...removeData] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod = selectObj.maintenancePeriod |
| | | this.model.standardId = selectObj.id |
| | | if(!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id); |
| | | //标准名称,保养周期不刷新解决办法 |
| | | //办法一 |
| | | const newObj = { |
| | | standardName: selectObj.standardName, |
| | | maintenancePeriod: selectObj.maintenancePeriod, |
| | | standardId : selectObj.id, |
| | | }; |
| | | this.model = Object.assign({}, newObj, this.model) |
| | | //办法二 |
| | | // this.$set(this.model, 'standardName', selectObj.standardName) |
| | | // this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | // this.$set(this.model, 'standardId', selectObj.id) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | }, |
| | | //加载详情数据 |
| | |
| | | }, |
| | | //标准选择变化 |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |