From ee3df152bfd2b3dd4083f7856caaf7f02601e180 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期五, 01 九月 2023 20:28:45 +0800
Subject: [PATCH] 审批完成
---
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue | 369 +++++++++++++++++++++++++++++++++++++++++
src/views/eam/DailyMaintenanceOrderList.vue | 115 ++---------
src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue | 1
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue | 28 ++
src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue | 5
5 files changed, 425 insertions(+), 93 deletions(-)
diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue
index 91351b9..0f0a36d 100644
--- a/src/views/eam/DailyMaintenanceOrderList.vue
+++ b/src/views/eam/DailyMaintenanceOrderList.vue
@@ -117,7 +117,7 @@
<a-table
ref="table"
size="middle"
- :scroll="{ x: 'calc(2500px + 50%)', y: 900 }"
+ :scroll="{ x: 'calc(2800px + 50%)', y: 900 }"
bordered
rowKey="id"
:columns="columns"
@@ -129,94 +129,6 @@
:rowSelection="rowSelection"
:rowClassName="tableRowClass"
>
- <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
- <!-- <span
- slot="action"
- slot-scope="text, record"
- >
- <a-popconfirm
- title="纭畾涓嬪彂宸ュ崟鍚�?"
- @confirm="() => handleOrderIssue(record)"
- >
- <a v-if="record.status === '1'">涓嬪彂</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎾ゅ洖宸ュ崟鍚�?"
- @confirm="() => handleOrderReset(record)"
- >
- <a v-if="record.status === '2'">鎾ゅ洖</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎭㈠宸ュ崟鍚�?"
- @confirm="() => handleOrderRecover(record)"
- >
- <a v-if="record.status === '7'">鎭㈠</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '7'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾浣滃簾宸ュ崟鍚�?"
- @confirm="() => handleOrderCancel(record)"
- >
- <a v-if="record.status === '2'">浣滃簾</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾棰嗗彇宸ュ崟鍚�?"
- @confirm="() => handleOrderGet(record)"
- >
- <a v-if="record.status === '2'">棰嗗彇</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- @click="handleOrderExe(record)"
- >鎵ц</a>
- <a-divider
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- type="vertical"
- />
- <a
- v-if="record.status === '1'"
- @click="handleEdit(record)"
- >缂栬緫</a>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a v-if="record.status === '1'">鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span> -->
<span
slot="action"
@@ -313,6 +225,14 @@
v-if="record.status === '1'"
type="vertical"
/>
+ <a
+ v-if="record.status === '5'"
+ @click="handleFinish(record)"
+ >纭</a>
+ <a-divider
+ v-if="record.status === '5'"
+ type="vertical"
+ />
<a-dropdown>
<a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
<a-menu slot="overlay">
@@ -351,6 +271,10 @@
ref="modalForm"
@ok="modalFormOk"
></maintenance-order-modal>
+ <finish-devolution-modal
+ ref="FinishDevolutionModal"
+ @ok="modalFormOk"
+ ></finish-devolution-modal>
<maintenance-order-assign-modal
ref="MaintenanceOrderAssignModal"
@ok="modalFormOk"
@@ -368,6 +292,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal'
+import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal'
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import { getAction, postAction, requestPut } from '@/api/manage'
@@ -377,6 +302,7 @@
mixins: [JeecgListMixin, mixinDevice],
components: {
MaintenanceOrderModal,
+ FinishDevolutionModal,
MaintenanceOrderAssignModal,
DailyMaintenanceOrderExeDrawer
},
@@ -487,6 +413,11 @@
dataIndex: 'maintenanceUserName'
},
{
+ title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�',
+ align: "center",
+ dataIndex: 'description'
+ },
+ {
title: '鍒涘缓浜�',
align: "center",
dataIndex: 'createBy'
@@ -575,6 +506,12 @@
}
},
+ handleFinish: function (record) {
+ this.$refs.FinishDevolutionModal.edit(record);
+ this.$refs.FinishDevolutionModal.title = "鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�";
+ this.$refs.FinishDevolutionModal.disableSubmit = false;
+ },
+
handleOrderIssue(record) {
const that = this;
requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => {
diff --git a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
index 68a136f..1e3fb34 100644
--- a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
+++ b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -106,6 +106,23 @@
</a-form-item>
</a-col>
</a-row>
+ <a-row :gutter="24">
+ <a-col :span="24">
+ <a-form-item
+ label="闂鍙婂鐞嗘帾鏂芥弿杩�"
+ :labelCol="{span:3}"
+ :wrapperCol="{span:18}"
+ class="hightColor"
+ >
+ <a-textarea
+ allowClear
+ :disabled="this.model.status!='4'"
+ :placeholder="'璇疯緭鍏ラ棶棰樺強澶勭悊鎺柦鎻忚堪'"
+ v-model="model.description"
+ />
+ </a-form-item>
+ </a-col>
+ </a-row>
</div>
<a-tabs
@@ -129,8 +146,8 @@
:loading="loading"
@change="handleTableChange"
:pagination="ipagination"
- :scroll="{ x: 'calc(1200px + 50%)', y: 900 }"
>
+ <!-- :scroll="{ x: 'calc(1200px + 50%)', y: 900 }" -->
<!-- :scroll="{x:true}" -->
<template
v-for="col in columns"
@@ -330,6 +347,13 @@
xs: { span: 24 },
sm: { span: 18 },
},
+ validatorRules: {
+ // description: {
+ // rules: [
+ // { required: true, message: '璇疯緭鍏ユ弿杩�!' },
+ // ]
+ // }
+ },
columns: [
{
title: '#',
@@ -514,7 +538,7 @@
okText: '纭',
cancelText: '鍙栨秷',
onOk() {
- requestPut(that.url.report, { id: that.model.id, status: '5' }).then((res) => {
+ requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
if (res.success) {
that.model.status = '5'
that.$message.success(res.message)
diff --git a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
new file mode 100644
index 0000000..a485e4e
--- /dev/null
+++ b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
@@ -0,0 +1,369 @@
+<template>
+ <a-modal
+ :width="1250"
+ :visible="visible"
+ :maskClosable="false"
+ @ok="handleOk"
+ cancelText="鍏抽棴"
+ @cancel="handleCancel"
+ :confirmLoading="confirmLoading"
+ >
+ <!-- :title="title" -->
+ <a-spin :spinning="confirmLoading">
+ <a-form :form="form">
+ <a-divider
+ orientation="center"
+ style="font-size: large;font-style: italic;color: #66aeed;"
+ > 鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗� </a-divider>
+ <a-row :gutter="24">
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="璁惧鍚嶇О"
+ >
+ <span v-if="this.model != null">{{ this.model.equipmentName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="璁惧鍨嬪彿"
+ >
+ <span v-if="this.model != null">{{ this.model.equipmentModel }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="缁熶竴缂栫爜"
+ >
+ <span v-if="this.model != null">{{ this.model.equipmentNum }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ <a-row :gutter="24">
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="浣跨敤鍗曚綅"
+ >
+ <span v-if="this.model != null">{{ this.model.departName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="淇濆吇鏃ユ湡"
+ >
+ <span v-if="this.model != null">{{ this.model.actualEndTime }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form>
+ </a-spin>
+ <a-table
+ ref="table"
+ bordered
+ size="middle"
+ rowKey='id'
+ :columns="columns"
+ :dataSource="dataSource"
+ >
+
+ </a-table>
+ <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
+ <div class="ant-descriptions-title">闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩帮細</div>
+ <a-textarea
+ allowClear
+ :disabled="true"
+ :placeholder="'璇疯緭鍏ラ棶棰樺強澶勭悊鎺柦鎻忚堪'"
+ v-model="model.description"
+ />
+ </div>
+ <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
+ <div class="ant-descriptions-title">璇ヨ澶囩粡浜岀骇淇濆吇妫�鏌ュ悗锛岃揪鍒颁繚鍏昏鑼冭姹傘��</div>
+ <a-row :gutter="24">
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="鎿嶄綔浜哄憳"
+ >
+ <span v-if="this.model != null">{{ this.model.operateUserName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="缁翠慨瀹や富浠�"
+ >
+ <span v-if="this.model != null">{{ this.model.repairDirectorUserName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ <a-row :gutter="24">
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="缁翠慨浜哄憳"
+ >
+ <span v-if="this.model != null">{{ this.model.repairUserName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="8">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="璁惧妫�楠屽憳"
+ >
+ <span v-if="this.model != null">{{ this.model.equipmentInspectorUserName }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </div>
+ <template slot="footer">
+ <a-button
+ :style="{marginRight: '8px'}"
+ @click="handleCancel()"
+ >
+ 鍏抽棴
+ </a-button>
+
+ <a-button
+ @click="handleOk()"
+ type="primary"
+ :loading="confirmLoading"
+ :disabled="disableSubmit || confirmLoading"
+ >纭畾</a-button>
+ </template>
+
+ </a-modal>
+
+</template>
+
+<script>
+import { getAction, postAction, requestPut } from '@/api/manage'
+import pick from 'lodash.pick'
+import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
+import Tooltip from 'ant-design-vue/es/tooltip'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { getFileAccessHttpUrl } from '@/api/manage';
+
+export default {
+ name: "MaintenanceOrderModal",
+ mixins: [JeecgListMixin],
+ components: {
+ JMultiSelectTag,
+ Tooltip,
+ },
+ data() {
+ return {
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ align: 'center',
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1
+ },
+ width: 50,
+ },
+ {
+ title: '绫诲瀷',
+ align: 'center',
+ dataIndex: 'maintenanceMethod1'
+ },
+
+ {
+ title: '閮ㄤ綅',
+ align: 'center',
+ dataIndex: 'location'
+ },
+ {
+ title: '淇濆吇椤圭洰',
+ align: 'center',
+ dataIndex: 'maintenanceProjectNum'
+ },
+ {
+ title: '淇濆吇鏍囧噯',
+ align: 'center',
+ dataIndex: 'standard'
+ },
+ {
+ title: '鎵ц鎯呭喌',
+ align: 'center',
+ dataIndex: 'maintenanceTool1'
+ },
+ {
+ title: '鎵ц浜�',
+ align: 'center',
+ dataIndex: 'photo1',
+ },
+
+ ],
+ title: "鎿嶄綔",
+ visible: false,
+ disableSubmit: false,
+ codeDisable: true,
+ dataSource: [],
+ model: {},
+ departs: [],
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 6 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 18 },
+ },
+ confirmLoading: false,
+ form: this.$form.createForm(this),
+ validatorRules: {
+ num: {
+ rules: [
+ { required: true, message: '璇疯緭鍏ヤ繚鍏诲伐鍗曠紪鐮�!' },
+ ]
+ },
+ },
+ url: {
+ add: "/eam/dailyMaintenanceOrder/add",
+ edit: "/eam/dailyMaintenanceOrder/approve",
+ getSysDeparts: "/eam/dailyMaintenanceOrder/getSysDeparts",
+ list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId",
+ },
+
+ }
+ },
+
+ methods: {
+
+ edit(record) {
+ let that = this;
+ this.getSysDeparts()
+ this.form.resetFields();
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ if (record.dailyMaintenanceDetails != undefined) {
+ const temp = [...record.dailyMaintenanceDetails];
+ that.dataSource = temp;
+ }
+ that.$nextTick(() => {
+ that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark'));
+ });
+ if (record.id) {
+ this.codeDisable = true;
+ } else {
+ this.codeDisable = false;
+ }
+ },
+
+
+ close() {
+ this.$emit('close');
+ this.visible = false;
+ },
+
+ handleCancel() {
+ this.close();
+ },
+
+ handleOk() {
+ const that = this;
+ this.form.validateFields((err, values) => {
+ if (!err) {
+ that.confirmLoading = true;
+ let formData = Object.assign(this.model, values);
+ requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => {
+ if (res.success) {
+ that.$message.success(res.message);
+ that.$emit('ok');
+ } else {
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ that.close();
+ })
+ }
+ })
+ },
+
+ handleDelete(text, record, index) {
+ this.dataSource.splice(index, 1);
+ },
+
+
+ getSysDeparts() {
+ getAction(this.url.getSysDeparts).then((res) => {
+ if (res.success) {
+ this.departs = res.result
+ }
+ })
+ },
+
+ },
+}
+</script>
+
+<style lang="less" scoped>
+/deep/ .frozenRowClass {
+ color: #c9c9c9;
+}
+.fontweight {
+ font-weight: bold;
+}
+.ant-btn {
+ padding: 0 10px;
+ margin-left: 3px;
+}
+
+.ant-form-item-control {
+ line-height: 0px;
+}
+
+/** 涓昏〃鍗曡闂磋窛 */
+.ant-form .ant-form-item {
+ margin-bottom: 10px;
+}
+
+/** Tab椤甸潰琛岄棿璺� */
+.ant-tabs-content .ant-form-item {
+ margin-bottom: 0px;
+}
+.hightColor {
+ height: 10%;
+ font-weight: bold;
+ font-size: 20px;
+ color: #1b1e1e;
+}
+.frozenRowClass {
+ color: #c9c9c9;
+}
+.fontweight {
+ font-weight: bold;
+}
+.hight {
+ color: #f5222d;
+}
+/deep/ .red {
+ color: red;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue
index c6cf907..4cf31ae 100644
--- a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue
+++ b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue
@@ -368,6 +368,7 @@
@click="handleOk()"
type="primary"
:loading="confirmLoading"
+ :disabled="disableSubmit || confirmLoading"
>纭畾</a-button>
</template>
diff --git a/src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue b/src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue
index fb6be1c..829470a 100644
--- a/src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue
+++ b/src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue
@@ -50,7 +50,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
- <a-input-search
+ <a-input-search
:disabled="disableSubmit"
:placeholder="disableSubmit?'':'璇烽�夋嫨涓撲笟淇濆吇鏂规'"
enter-button
@@ -179,6 +179,7 @@
@click="handleOk()"
type="primary"
:loading="confirmLoading"
+ :disabled="disableSubmit || confirmLoading"
>纭畾</a-button>
</template>
<specialty-maintenance-plan-list
@@ -274,7 +275,7 @@
this.model = Object.assign({}, record);
this.visible = true;
that.$nextTick(() => {
- that.form.setFieldsValue(pick(that.model, 'num','specialtyMaintenancePlanNum','assignMode','assignModeName','teamId','teamName', 'specialtyMaintenancePlanId', 'planStartTime'));
+ that.form.setFieldsValue(pick(that.model, 'num', 'specialtyMaintenancePlanNum', 'assignMode', 'assignModeName', 'teamId', 'teamName', 'specialtyMaintenancePlanId', 'planStartTime'));
});
if (record.id) {
this.codeDisable = true;
--
Gitblit v1.9.3