| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-col :span="17"> |
| | | <a-form-item |
| | | label="问题及处理措施描述" |
| | | label="问题/处理措施" |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:18}" |
| | | class="hightColor" |
| | |
| | | <a-textarea |
| | | allowClear |
| | | :disabled="this.model.status!='4'" |
| | | :placeholder="'请输入问题及处理措施描述'" |
| | | :placeholder="'请维修人员签字填写!'" |
| | | v-model="model.description" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="7"> |
| | | <a-form-item |
| | | label="保养人" |
| | | :labelCol="{span:4}" |
| | | :wrapperCol="{span:17}" |
| | | class="hightColor" |
| | | > |
| | | <a-input |
| | | :disabled="this.model.status!='4'" |
| | | allow-clear |
| | | placeholder="请输入保养人" |
| | | v-model="model.maintenanceUserId" |
| | | @change="handleMaintenancePerson" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <span |
| | | <!-- <span |
| | | v-if=" col.dataIndex == 'photo' && !text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >无图片</span> |
| | |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | /> --> |
| | | <!-- 示意图 开始 --> |
| | | <!-- <Tooltip |
| | | placement="top" |
| | |
| | | v-if="col.dataIndex == 'maintenanceOrderDetailUda1'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | placeholder="请输入保养人" |
| | | :disabled="true" |
| | | /> |
| | | <a-input |
| | | <!-- :disabled="record.disabled" --> |
| | | <!-- <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'maintenanceOrderDetailUda2'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | placeholder="请输入执行情况" |
| | | /> --> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'maintenanceOrderDetailUda2'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入执行情况" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | <!-- <a-tab-pane |
| | | tab='计划用料' |
| | | key="2" |
| | | > |
| | |
| | | :equipmentId="this.model.equipmentId" |
| | | ></actual-material-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tab-pane>--> |
| | | <a-tab-pane |
| | | tab='实际工时' |
| | | key="6" |
| | |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | /* 分页参数 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 99, |
| | | pageSizeOptions: ['99'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | validatorRules: { |
| | | // description: { |
| | | // rules: [ |
| | |
| | | } |
| | | |
| | | }, |
| | | { |
| | | title: '部位', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | }, |
| | | // { |
| | | // title: '部位', |
| | | // align: 'center', |
| | | // dataIndex: 'location', |
| | | // }, |
| | | // class: "notshow" |
| | | // { |
| | | // title: '示意图', |
| | | // align: 'center', |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'photo' }, |
| | | // }, |
| | | // class: "notshow" |
| | | { |
| | | title: '示意图', |
| | | title: '保养角色', |
| | | align: 'center', |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'photo' }, |
| | | dataIndex: 'maintenanceRole', |
| | | }, |
| | | // class: "notshow" |
| | | { |
| | | title: '保养项目', |
| | | title: '保养内容', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceProjectNum', |
| | | }, |
| | | { |
| | | title: '保养标准', |
| | | align: 'center', |
| | | dataIndex: 'standard', |
| | | }, |
| | | // { |
| | | // title: '保养标准', |
| | | // align: 'center', |
| | | // dataIndex: 'standard', |
| | | // }, |
| | | // { |
| | | // title: '方法', |
| | | // align: 'center', |
| | |
| | | // align: 'center', |
| | | // dataIndex: 'workingHourQuota', |
| | | // }, |
| | | { |
| | | title: '保养周期', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCycleName', |
| | | }, |
| | | // { |
| | | // title: '保养周期', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceCycleName', |
| | | // }, |
| | | // { |
| | | // title: '维保专业', |
| | | // align: 'center', |
| | |
| | | // } |
| | | //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | // if (res.result.total) { |
| | | // this.ipagination.total = res.result.total; |
| | | // } else { |
| | | // this.ipagination.total = 0; |
| | | // } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | that.loadData1(1) |
| | | } else { |
| | | that.$message.warning("工单开工失败!") |
| | | } |
| | |
| | | handleReport() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | for (let i = 0; i < that.dataSource.length; i++) { |
| | | let o = this.dataSource[i] |
| | | if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') { |
| | | that.$message.warning("请填写第" + (i + 1) + "执行情况!"); |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | | // if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') { |
| | | // that.$message.warning("请填写第" + (i + 1) + "保养人!"); |
| | | // that.confirmLoading = false; |
| | | // return |
| | | // } |
| | | } |
| | | if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") { |
| | | that.$message.warning("请填写保养人!"); |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | | this.$confirm({ |
| | | title: '保养工单报工', |
| | | content: '提示:报工后保养完工,请谨慎操作!', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk() { |
| | | requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => { |
| | | requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '5' |
| | | that.$message.success(res.message) |
| | |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | that.loadData1(1) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | |
| | | handleOk() { |
| | | const that = this |
| | | this.loading = true; |
| | | for (let i = 0; i < that.dataSource.length; i++) { |
| | | let o = this.dataSource[i] |
| | | if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') { |
| | | that.$message.warning("请填写第" + (i + 1) + "执行情况!"); |
| | | that.loading = false; |
| | | return |
| | | } |
| | | // if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') { |
| | | // that.$message.warning("请填写第" + (i + 1) + "保养人!"); |
| | | // that.loading = false; |
| | | // return |
| | | // } |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | |
| | | let obj = obj = postAction(this.url.edit, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$message.success("保存成功!") |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | |
| | | }) |
| | | }, |
| | | |
| | | //保养人回显table |
| | | handleMaintenancePerson() { |
| | | const that = this; |
| | | for (let i = 0; i < that.dataSource.length; i++) { |
| | | let o = this.dataSource[i] |
| | | o.maintenanceOrderDetailUda1 = this.model.maintenanceUserId |
| | | } |
| | | }, |
| | | |
| | | |
| | | handleChange(value, key, column, index) { |
| | | debugger |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | if ('maintenanceOrderDetailUda1' == column.dataIndex) { |
| | | target['maintenanceOrderDetailUda1'] = value.target.value; |
| | | } |
| | | // if ('maintenanceOrderDetailUda1' == column.dataIndex) { |
| | | // target['maintenanceOrderDetailUda1'] = value.target.value; |
| | | // } |
| | | if ('maintenanceOrderDetailUda2' == column.dataIndex) { |
| | | target['maintenanceOrderDetailUda2'] = value.target.value; |
| | | } |