From a20bf71a183e02d3f01826152df9061855bc39e8 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期一, 26 五月 2025 18:00:37 +0800
Subject: [PATCH] 设备管理新增生产设备自主维护点检表页面
---
src/views/eam/DailyInspectionOrderList.vue | 368 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 252 insertions(+), 116 deletions(-)
diff --git a/src/views/eam/DailyInspectionOrderList.vue b/src/views/eam/DailyInspectionOrderList.vue
index 0a13ad4..2c9f042 100644
--- a/src/views/eam/DailyInspectionOrderList.vue
+++ b/src/views/eam/DailyInspectionOrderList.vue
@@ -1,7 +1,7 @@
<template>
<a-card
:bordered="false"
- title="鏃ュ父鐐规宸ュ崟"
+ title=""
>
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
@@ -14,44 +14,74 @@
: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="璐d换鐝粍"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ >
+ <j-dict-select-tag
+ dictCode="mom_base_team,name,id,status='1' and del_flag='0'"
+ placeholder="璇烽�夋嫨璐d换鐝粍"
+ 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>
@@ -64,7 +94,20 @@
@click="handleAdd"
type="primary"
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"
@@ -119,6 +162,7 @@
:loading="loading"
class="j-table-force-nowrap"
@change="handleTableChange"
+ :rowClassName="tableRowClass"
>
<!-- :rowSelection="rowSelection" -->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
@@ -128,10 +172,11 @@
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'"
@@ -140,6 +185,7 @@
<a-popconfirm
title="纭畾鎾ゅ洖宸ュ崟鍚�?"
@confirm="() => handleOrderReset(record)"
+ v-has="'dailyInspectionOrder:issue'"
>
<a v-if="record.status == '2'">鎾ゅ洖</a>
</a-popconfirm>
@@ -147,44 +193,50 @@
v-if="record.status == '2'"
type="vertical"
/>
- <a-popconfirm
+ <!-- <a-popconfirm
title="纭畾鎭㈠宸ュ崟鍚�?"
@confirm="() => handleOrderRecover(record)"
+ v-has="'dailyInspectionOrder:recover'"
>
<a v-if="record.status == '7'">鎭㈠</a>
</a-popconfirm>
<a-divider
v-if="record.status == '7'"
type="vertical"
- />
- <a-popconfirm
+ /> -->
+ <!-- <a-popconfirm
title="纭畾浣滃簾宸ュ崟鍚�?"
@confirm="() => handleOrderCancel(record)"
+ v-has="'dailyInspectionOrder:recover'"
>
<a v-if="record.status == '2'">浣滃簾</a>
</a-popconfirm>
<a-divider
v-if="record.status == '2'"
type="vertical"
- />
+ /> -->
<a-popconfirm
title="纭畾棰嗗彇宸ュ崟鍚�?"
@confirm="() => handleOrderGet(record)"
+ v-has="'dailyInspectionOrder:get'"
>
<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)"
- >娲惧伐</a>
- <a
+ v-has="'dailyInspectionOrder:assign'"
+ >娲惧伐</a> -->
+ <!-- <a
v-if="record.status == '2'&& record.assignMode == '3' && record.inspectionUserName != null "
@click="handleAssignOrder(record)"
+ v-has="'dailyInspectionOrder:assign'"
>鏀规淳</a>
<a
v-if="record.status == '3'"
@click="handleAssignOrder(record)"
- >鏀规淳</a>
+ v-has="'dailyInspectionOrder:assign'"
+ >鏀规淳</a>-->
<a-divider
v-if="record.status == '2'"
type="vertical"
@@ -196,14 +248,27 @@
<a
v-if="record.status === '3' || record.status === '4' "
@click="handleOrderExe(record)"
+ v-has="'dailyInspectionOrder:exe'"
>鎵ц</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
v-if="record.status === '1'"
@click="handleEdit(record)"
+ v-has="'dailyInspectionOrder:edit'"
>缂栬緫</a>
<a-divider
v-if="record.status === '1'"
@@ -219,6 +284,7 @@
<a-popconfirm
title="纭畾鍒犻櫎鍚�?"
@confirm="() => handleDelete(record.id)"
+ v-has="'dailyInspectionOrder:delete'"
>
<a v-if="record.status === '1'">鍒犻櫎</a>
</a-popconfirm>
@@ -232,7 +298,7 @@
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>
@@ -274,6 +340,7 @@
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',
@@ -286,7 +353,8 @@
},
data() {
return {
- description: '鏃ュ父鐐规宸ュ崟',
+ description: '鑷富缁存姢鐐规宸ュ崟',
+ finishTime: [],
// 琛ㄥご
columns: [
{
@@ -299,11 +367,7 @@
return parseInt(index) + 1;
}
},
- {
- title: '鐘舵��',
- align: "center",
- dataIndex: 'statusName'
- },
+
{
title: '鐐规宸ュ崟鍙�',
align: "center",
@@ -311,31 +375,44 @@
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",
@@ -347,7 +424,7 @@
dataIndex: 'equipmentModel'
},
{
- title: '瀵硅薄閮ㄩ棬',
+ title: '浣跨敤閮ㄩ棬',
align: "center",
dataIndex: 'useDepartName'
},
@@ -356,45 +433,41 @@
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) {
@@ -402,15 +475,28 @@
// }
},
{
- 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: '鎿嶄綔',
@@ -430,7 +516,14 @@
edit: "/eam/inspectionOrder/editStatus",
orderGet: "/eam/inspectionOrder/orderGet",
},
-
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
}
},
@@ -469,7 +562,7 @@
},
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//淇濆瓨銆佹殏瀛樸�佹姤宸�
@@ -483,7 +576,7 @@
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
@@ -528,15 +621,15 @@
}
})
},
- //浣滃簾
- 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("宸ュ崟瀹屽伐澶辫触锛�")
}
})
},
@@ -554,10 +647,53 @@
})
},
+ 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>
\ No newline at end of file
--
Gitblit v1.9.3