| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="日常点检工单" |
| | | title="" |
| | | > |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="点检工单编码"> |
| | | <a-form-item label="统一编号"> |
| | | <a-input |
| | | placeholder="请输入点检工单编码" |
| | | v-model="queryParam.num" |
| | | placeholder="请输入统一编号" |
| | | v-model="queryParam.equipmentNum" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="点检方法名称"> |
| | | <j-input |
| | | placeholder="请输入点检方法名称" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | <a-form-item label="保养工单编码"> |
| | | <a-input |
| | | placeholder="请输入保养工单编码" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | label="使用部门" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >查询</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >重置</a-button> |
| | | </span> |
| | | <j-dict-select-tag |
| | | dictCode="sys_depart,depart_name,id" |
| | | placeholder="请输入使用部门" |
| | | v-model="queryParam.useDepartId" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | label="状态" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | dictCode="daily_inspection_standard_status" |
| | | placeholder="请选择状态" |
| | | v-model="queryParam.status" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | label="责任班组" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | dictCode="mom_base_team,name,id,status='1' and del_flag='0'" |
| | | placeholder="请选择责任班组" |
| | | v-model="queryParam.teamId" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="7"> |
| | | <a-form-item label="点检时间"> |
| | | <a-range-picker |
| | | style="width: 100%;" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | v-model="finishTime" |
| | | @change="timeChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | |
| | | icon="plus" |
| | | v-has="'dailyInspectionOrder:add'" |
| | | >新增</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | style="margin-left: 8px" |
| | | >查询</a-button> |
| | | <a-button |
| | | type="info" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >重置</a-button> |
| | | <!-- <a-button |
| | | type="primary" |
| | | icon="download" |
| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowClassName="tableRowClass" |
| | | > |
| | | <!-- :rowSelection="rowSelection" --> |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="确定下发工单吗?" |
| | | title="确定接收工单吗?" |
| | | @confirm="() => handleOrderIssue(record)" |
| | | v-has="'dailyInspectionOrder:issue'" |
| | | > |
| | | <a v-if="record.status == '1'">下发</a> |
| | | <a v-if="record.status == '1'">接收</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '1'" |
| | |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | <!-- <a-popconfirm |
| | | title="确定恢复工单吗?" |
| | | @confirm="() => handleOrderRecover(record)" |
| | | v-has="'dailyInspectionOrder:recover'" |
| | |
| | | <a-divider |
| | | v-if="record.status == '7'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | /> --> |
| | | <!-- <a-popconfirm |
| | | title="确定作废工单吗?" |
| | | @confirm="() => handleOrderCancel(record)" |
| | | v-has="'dailyInspectionOrder:recover'" |
| | |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> |
| | | /> --> |
| | | <a-popconfirm |
| | | title="确定领取工单吗?" |
| | | @confirm="() => handleOrderGet(record)" |
| | |
| | | > |
| | | <a v-if="record.status == '2' && record.assignMode == '1'">领取</a> |
| | | </a-popconfirm> |
| | | <a |
| | | <!-- <a |
| | | v-if="record.status == '2' && record.assignMode == '2' " |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | | >派工</a> |
| | | <a |
| | | >派工</a> --> |
| | | <!-- <a |
| | | v-if="record.status == '2'&& record.assignMode == '3' && record.inspectionUserName != null " |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | |
| | | v-if="record.status == '3'" |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | | >改派</a> |
| | | >改派</a>--> |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | |
| | | >执行</a> |
| | | <a-divider |
| | | v-if="record.status === '3' || record.status === '4' " |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="维修人确认完工吗?" |
| | | @confirm="() => handleOrderRepairConfirm(record)" |
| | | v-has="'dailyInspectionOrder:repairConfirm'" |
| | | > |
| | | <a v-if="record.status == '5'">维修确认</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '5'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '6' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | >{{record.num}}</a> |
| | |
| | | import InspectionOrderExeModal from './modules/dailyInspectionOrder/InspectionOrderExeModal' |
| | | import DailyInspectionOrderExeDrawer from './modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'DailyInspectionOrderList', |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '日常点检工单', |
| | | description: '自主维护点检工单', |
| | | finishTime: [], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | }, |
| | | |
| | | { |
| | | title: '点检工单号', |
| | | align: "center", |
| | |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: '点检日期', |
| | | align: "center", |
| | | dataIndex: 'inspectionDate', |
| | | customRender: function (text) { |
| | | return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: '点检时间', |
| | | align: "center", |
| | | dataIndex: 'inspectionTime', |
| | | customRender: function (text) { |
| | | return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: '截止时间', |
| | | align: "center", |
| | | dataIndex: 'inspectionDeadline', |
| | | }, |
| | | { |
| | | title: '设备编码', |
| | | title: '统一编码', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: '状态', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: '点检周期', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'inspectionCycleName' |
| | | }, |
| | | // { |
| | | // title: '点检日期', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionDate', |
| | | // customRender: function (text) { |
| | | // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | // }, |
| | | // { |
| | | // title: '点检时间', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionTime', |
| | | // // customRender: function (text) { |
| | | // // return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text) |
| | | // // } |
| | | // }, |
| | | // { |
| | | // title: '截止时间', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionDeadline', |
| | | // }, |
| | | |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '对象部门', |
| | | title: '使用部门', |
| | | align: "center", |
| | | dataIndex: 'useDepartName' |
| | | }, |
| | |
| | | align: "center", |
| | | dataIndex: 'teamName' |
| | | }, |
| | | { |
| | | title: '开工条件', |
| | | align: "center", |
| | | dataIndex: 'startWorkCondition', |
| | | customRender: (text) => { |
| | | if (text == '1') { |
| | | return "是"; |
| | | } else if (text == '0') { |
| | | return "否"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | title: '点检标准编码', |
| | | align: "center", |
| | | dataIndex: 'inspectionStandardNum' |
| | | }, |
| | | { |
| | | title: '点检周期', |
| | | align: "center", |
| | | dataIndex: 'inspectionCycleName' |
| | | }, |
| | | { |
| | | title: '派工方式', |
| | | align: "center", |
| | | dataIndex: 'assignModeName' |
| | | }, |
| | | { |
| | | title: '点检结果', |
| | | align: "center", |
| | | dataIndex: 'result' |
| | | }, |
| | | // { |
| | | // title: '开工条件', |
| | | // align: "center", |
| | | // dataIndex: 'startWorkCondition', |
| | | // customRender: (text) => { |
| | | // if (text == '1') { |
| | | // return "是"; |
| | | // } else if (text == '0') { |
| | | // return "否"; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // { |
| | | // title: '点检标准编码', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionStandardNum' |
| | | // }, |
| | | |
| | | // { |
| | | // title: '派工方式', |
| | | // align: "center", |
| | | // dataIndex: 'assignModeName' |
| | | // }, |
| | | // { |
| | | // title: '点检结果', |
| | | // align: "center", |
| | | // dataIndex: 'result' |
| | | // }, |
| | | { |
| | | title: '点检人', |
| | | align: "center", |
| | | dataIndex: 'inspectionUserName' |
| | | }, |
| | | { |
| | | title: '完成时间', |
| | | title: '点检时间', |
| | | align: "center", |
| | | dataIndex: 'actualEndTime', |
| | | // customRender: function (text) { |
| | |
| | | // } |
| | | }, |
| | | { |
| | | title: '创建人', |
| | | title: '维修确认人', |
| | | align: "center", |
| | | dataIndex: 'createBy' |
| | | dataIndex: 'repairConfirmPerson' |
| | | }, |
| | | { |
| | | title: '创建日期', |
| | | title: '确认时间', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | dataIndex: 'repairConfirmDate', |
| | | // customRender: function (text) { |
| | | // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | // { |
| | | // title: '创建人', |
| | | // align: "center", |
| | | // dataIndex: 'createBy' |
| | | // }, |
| | | // { |
| | | // title: '创建日期', |
| | | // align: "center", |
| | | // dataIndex: 'createTime', |
| | | // }, |
| | | |
| | | { |
| | | title: '操作', |
| | |
| | | }, |
| | | handleOrderExe(record) { |
| | | this.$refs.DailyInspectionOrderExeDrawer.visible = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.title = '日常点检工单执行' |
| | | this.$refs.DailyInspectionOrderExeDrawer.title = '自主维护点检执行' |
| | | this.$refs.DailyInspectionOrderExeDrawer.handleShow(record) |
| | | if (record.status === '3') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true//保存、暂存、报工 |
| | |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = false |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '7') { |
| | | } else if (record.status === '6') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //作废 |
| | | handleOrderCancel(record) { |
| | | //维修确认 |
| | | handleOrderRepairConfirm(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '7' }).then((res) => { |
| | | requestPut(that.url.edit, { id: record.id, status: '6' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工单作废成功!") |
| | | that.$message.success("工单完工成功!") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工单作废失败!") |
| | | that.$message.warning("工单完工失败!") |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.finishTime = [] |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | timeChange() { |
| | | this.queryParam.inspectionStartTime = moment(this.finishTime[0]).format("YYYY-MM-DD HH:mm:ss") |
| | | this.queryParam.inspectionEndTime = moment(this.finishTime[1]).format("YYYY-MM-DD HH:mm:ss") |
| | | }, |
| | | |
| | | |
| | | //预警颜色 |
| | | tableRowClass(record, index) { |
| | | if (("1" == record.status || "2" == record.status) && "1日" == record.inspectionCycleName) { |
| | | if (record.redWarningTime < record.currentDateTime) { |
| | | return 'error' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | font-weight: bold; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | .yellow { |
| | | color: rgba(255, 255, 0, 0.443); |
| | | font-weight: bold; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ant-table-tbody .red { |
| | | background-color: red !important; |
| | | } |
| | | </style> |