From 623c691a3cbf09fc0fe68bfa50d9354d12a3da77 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 17 十一月 2023 14:34:51 +0800
Subject: [PATCH] 1、车间看板页面修改设备详情弹窗触发条件由悬浮改为单击 2、大屏车间管理页面增加有关设备编号字体颜色各项功能,由用户自行设置
---
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue | 165 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 136 insertions(+), 29 deletions(-)
diff --git a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
index 68a136f..bacf158 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,13 +146,13 @@
: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"
:slot="col.dataIndex"
- slot-scope='text, record'
+ slot-scope='text, record, index'
>
<div :key="col.dataIndex">
<span
@@ -175,11 +192,39 @@
棰勮
</a> -->
+ <a-input
+ :value="text"
+ v-if="col.dataIndex == 'maintenanceOrderDetailUda1'"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ placeholder="璇疯緭鍏ヤ繚鍏讳汉"
+ />
+ <a-input
+ :value="text"
+ v-if="col.dataIndex == 'maintenanceOrderDetailUda2'"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ placeholder="璇疯緭鍏ユ墽琛屾儏鍐�"
+ />
</div>
-
</template>
-
</a-table>
+ <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
+ <a-row :style="{textAlign:'right'}">
+ <a-button
+ :style="{marginRight: '8px'}"
+ @click="handleCancel"
+ >
+ 鍙栨秷
+ </a-button>
+ <a-button
+ @click="handleOk()"
+ type="primary"
+ :disabled="this.model.status!='4'"
+ :loading="confirmLoading"
+ >淇濆瓨</a-button>
+ </a-row>
+ <!-- v-has="'dailyMaintenanceOrder:actualWorkHoursSave'" -->
+ <!-- :disabled="false" -->
+ </div>
</div>
</a-tab-pane>
@@ -280,7 +325,7 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { requestPut, getAction, downFile } from '@/api/manage'
+import { requestPut, getAction, downFile, postAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import { preview } from 'vue-photo-preview'
@@ -310,7 +355,7 @@
},
data() {
return {
- title: "鏃ュ父淇濆吇宸ュ崟鎵ц",
+ title: "浜岀骇淇濆吇宸ュ崟鎵ц",
visible: false,
maskClosable: true,
confirmLoading: false,
@@ -322,6 +367,7 @@
maintenanceStandardId: '-1',
dataSource: [],
model: {},
+ form: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
@@ -329,6 +375,13 @@
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 },
+ },
+ validatorRules: {
+ // description: {
+ // rules: [
+ // { required: true, message: '璇疯緭鍏ユ弿杩�!' },
+ // ]
+ // }
},
columns: [
{
@@ -365,35 +418,49 @@
align: 'center',
dataIndex: 'standard',
},
- {
- title: '鏂规硶',
- align: 'center',
- dataIndex: 'maintenanceMethodName',
- },
- {
- title: '宸ュ叿',
- align: 'center',
- dataIndex: 'maintenanceTool',
- },
- {
- title: '瀹夊叏瑕佹眰',
- align: 'center',
- dataIndex: 'maintenanceRequire',
- },
- {
- title: '宸ユ椂瀹氶锛堝皬鏃讹級',
- align: 'center',
- dataIndex: 'workingHourQuota',
- },
+ // {
+ // title: '鏂规硶',
+ // align: 'center',
+ // dataIndex: 'maintenanceMethodName',
+ // },
+ // {
+ // title: '宸ュ叿',
+ // align: 'center',
+ // dataIndex: 'maintenanceTool',
+ // },
+ // {
+ // title: '瀹夊叏瑕佹眰',
+ // align: 'center',
+ // dataIndex: 'maintenanceRequire',
+ // },
+ // {
+ // title: '宸ユ椂瀹氶锛堝皬鏃讹級',
+ // align: 'center',
+ // dataIndex: 'workingHourQuota',
+ // },
{
title: '淇濆吇鍛ㄦ湡',
align: 'center',
dataIndex: 'maintenanceCycleName',
},
+ // {
+ // title: '缁翠繚涓撲笟',
+ // align: 'center',
+ // dataIndex: 'maintenanceSpecialtyName',
+ // },
{
- title: '缁翠繚涓撲笟',
+ title: '鎵ц鎯呭喌',
align: 'center',
- dataIndex: 'maintenanceSpecialtyName',
+ dataIndex: 'maintenanceOrderDetailUda2',
+ width: 200,
+ scopedSlots: { customRender: 'maintenanceOrderDetailUda2' },
+ },
+ {
+ title: '淇濆吇浜�',
+ align: 'center',
+ dataIndex: 'maintenanceOrderDetailUda1',
+ width: 200,
+ scopedSlots: { customRender: 'maintenanceOrderDetailUda1' },
},
],
url: {
@@ -403,6 +470,7 @@
editStatus: "/eam/dailyMaintenanceOrder/editStatus",
revocation: "/eam/dailyMaintenanceOrder/revocation",
report: "/eam/dailyMaintenanceOrder/report",
+ edit: "/eam/dailyMaintenanceOrderDetail/edit"
},
}
},
@@ -514,7 +582,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)
@@ -563,7 +631,46 @@
},
//淇濆瓨
handleOk() {
+ const that = this
+ this.loading = true;
+ this.form.validateFields((err, values) => {
+ if (!err) {
+ that.confirmLoading = true
+ let formData = {}
+ formData.dailyMaintenanceOrderDetails = that.dataSource;
+ let obj = obj = postAction(this.url.edit, formData)
+ obj.then((res) => {
+ if (res.success) {
+ that.$message.success(res.message)
+ that.$emit('ok')
+ } else {
+ that.$message.warning(res.message)
+ }
+ }).finally(() => {
+ that.confirmLoading = false
+ that.loadData1();
+ this.loading = false;
+ })
+ }
+ })
+ },
+
+ 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 ('maintenanceOrderDetailUda2' == column.dataIndex) {
+ target['maintenanceOrderDetailUda2'] = value.target.value;
+ }
+ that.dataSource = temp;
+ }
},
view(record) {
--
Gitblit v1.9.3