From d9a34e63b00162452c5439b5c409aee53b76bb25 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期三, 18 十月 2023 15:45:23 +0800
Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
---
src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue | 389 ++++++++++++++++++++++++++++++++++++++++++++++++
src/views/eam/Daily3MaintenanceOrderList.vue | 27 +++
src/views/eam/DailyMaintenanceOrderList.vue | 5
3 files changed, 419 insertions(+), 2 deletions(-)
diff --git a/src/views/eam/Daily3MaintenanceOrderList.vue b/src/views/eam/Daily3MaintenanceOrderList.vue
index 777c289..2c7e916 100644
--- a/src/views/eam/Daily3MaintenanceOrderList.vue
+++ b/src/views/eam/Daily3MaintenanceOrderList.vue
@@ -275,6 +275,14 @@
v-if="record.status === '5'&& record.isNotStoveCategoryFlag == false && record.precisionParameters == '0' "
type="vertical"
/>
+ <a
+ v-if="record.status === '5' "
+ @click="handleMaintenance3Receipt(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">
@@ -341,6 +349,10 @@
ref="EquipmentTechnologyStatusModal"
@ok="modalFormOk"
></equipment-technology-status-modal>
+ <maintenance-3-receipt-modal
+ ref="Maintenance3ReceiptModal"
+ @ok="modalFormOk"
+ ></maintenance-3-receipt-modal>
</a-card>
</template>
@@ -357,6 +369,7 @@
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import EquipmentTechnologyStatusModal from './modules/daily3MaintenanceOrder/EquipmentTechnologyStatusModal'
+import Maintenance3ReceiptModal from './modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue'
import { getAction, postAction, requestPut } from '@/api/manage'
export default {
@@ -370,7 +383,8 @@
DailyMaintenanceOrderExeDrawer,
MaintenanceOrderChangeModal,
StoveCategoryModal,
- EquipmentTechnologyStatusModal
+ EquipmentTechnologyStatusModal,
+ Maintenance3ReceiptModal
},
data() {
return {
@@ -620,7 +634,11 @@
this.$refs.MaintenanceOrderChangeModal.disableSubmit = false;
},
-
+ handleMaintenance3Receipt: function (record) {
+ this.$refs.Maintenance3ReceiptModal.edit(record);
+ this.$refs.Maintenance3ReceiptModal.title = "鐢熶骇璁惧涓夌骇淇濆吇楠屾敹鍗�";
+ this.$refs.Maintenance3ReceiptModal.disableSubmit = false;
+ },
handleOrderIssue(record) {
const that = this;
@@ -688,6 +706,11 @@
this.$refs.MaintenanceOrderAssignModal.title = '宸ュ崟鏀规淳'
this.$refs.MaintenanceOrderAssignModal.disableSubmit = false
},
+
+ searchReset() {
+ this.queryParam = { maintenanceType: '3' }
+ this.loadData(1);
+ },
// modalFormOk() {
// alert(0)
// // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue
index 0174fad..8812cc1 100644
--- a/src/views/eam/DailyMaintenanceOrderList.vue
+++ b/src/views/eam/DailyMaintenanceOrderList.vue
@@ -596,6 +596,11 @@
this.$refs.MaintenanceOrderAssignModal.title = '宸ュ崟鏀规淳'
this.$refs.MaintenanceOrderAssignModal.disableSubmit = false
},
+
+ searchReset() {
+ this.queryParam = { maintenanceType: '2' }
+ this.loadData(1);
+ },
// modalFormOk() {
// alert(0)
// // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
diff --git a/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue
new file mode 100644
index 0000000..5eef2e1
--- /dev/null
+++ b/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue
@@ -0,0 +1,389 @@
+<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: normal;font-size: 30px;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-form>
+ </a-spin>
+ <a-table
+ ref="table"
+ bordered
+ rowKey="id"
+ :columns="columns"
+ :dataSource="dataSource"
+ :pagination="false"
+ >
+ <!-- @change="handleTableChange" -->
+ <!-- :pagination="ipagination" -->
+ <template
+ v-for="col in columns"
+ :slot="col.dataIndex"
+ slot-scope='text, record, index'
+ >
+ <div :key="col.dataIndex">
+ <a-input
+ :value="text"
+ v-if="col.dataIndex == 'position'"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ :disabled="false"
+ placeholder="璇疯緭鍏ヤ繚鍏婚儴浣�"
+ />
+ <a-textarea
+ :value="text"
+ v-if="col.dataIndex == 'content'"
+ :maxLength="500"
+ auto-size
+ placeholder="璇疯緭鍏ヤ繚鍏诲唴瀹�"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ />
+ <a-textarea
+ :value="text"
+ v-if="col.dataIndex == 'standard'"
+ :maxLength="500"
+ auto-size
+ placeholder="璇疯緭鍏ヤ繚鍏绘爣鍑�"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ :disabled="false"
+ />
+ <a-input
+ :value="text"
+ v-if="col.dataIndex == 'firstInspect'"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ :disabled="false"
+ placeholder="璇疯緭鍏ョ涓�娆℃"
+ />
+ <a-input
+ :value="text"
+ v-if="col.dataIndex == 'secondInspect'"
+ @change="(e)=>handleChange(e, record.key, col, index)"
+ :disabled="false"
+ placeholder="璇疯緭鍏ョ浜屾妫�"
+ />
+
+ </div>
+ </template>
+ </a-table>
+ <div :style="{height: '60px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
+ <a-row :gutter="24">
+ <a-col :span="12">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="妫�鏌ヤ汉鍛�"
+ >
+ <span v-if="this.model != null">{{ this.model.inspectUser}}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label="妫�鏌ユ棩鏈�"
+ >
+ <span v-if="this.model != null">{{ this.model.inspectDate }}</span>
+ <span v-else>-</span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </div>
+ <a-button
+ style="width: 100%; margin-top: 0px; margin-bottom: 8px"
+ type="dashed"
+ icon="plus"
+ @click="addHour"
+ >娣诲姞鍐呭</a-button>
+ <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: "Maintenance3ReceiptModal",
+ 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: 'position',
+ scopedSlots: { customRender: 'position' }
+ },
+ {
+ title: '淇濆吇鍐呭',
+ align: 'center',
+ dataIndex: 'content',
+ scopedSlots: { customRender: 'content' }
+ },
+ {
+ title: '楠屾敹鏍囧噯',
+ align: 'center',
+ dataIndex: 'standard',
+ scopedSlots: { customRender: 'standard' }
+ },
+ {
+ title: '绗竴娆℃',
+ align: 'center',
+ dataIndex: 'firstInspect',
+ scopedSlots: { customRender: 'firstInspect' }
+ },
+ {
+ title: '绗簩娆℃',
+ align: 'center',
+ dataIndex: 'secondInspect',
+ scopedSlots: { customRender: 'secondInspect' }
+ },
+ ],
+ 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),
+ url: {
+ add: "/eam/maintenanceThreeAcceptance/add",
+ getMaintenance3Receipt: "/eam/maintenanceThreeAcceptance/getMaintenanceThreeAcceptanceList",
+ list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId",
+ },
+ }
+ },
+
+ methods: {
+
+ addHour() {
+ this.dataSource.push({ id: '', maintenanceOrderId: this.model.id, position: '', content: '', standard: '', firstInspect: '', secondInspect: '' })
+ },
+
+ edit(record) {
+ let that = this;
+ this.form.resetFields();
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ this.getMaintenance3Receipt()
+ that.$nextTick(() => {
+ // that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark'));
+ });
+
+ },
+
+ close() {
+ this.$emit('close');
+ this.visible = false;
+ },
+
+ handleCancel() {
+ this.close();
+ },
+
+ getMaintenance3Receipt() {
+ getAction(this.url.getMaintenance3Receipt, { maintenanceOrderId: this.model.id }).then((res) => {
+ if (res.success) {
+ this.dataSource = res.result
+ }
+ })
+ },
+
+ handleOk() {
+
+ const that = this;
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ that.form.validateFields((err, values) => {
+ if (!err) {
+ this.$confirm({
+ title: '鐢熶骇璁惧涓夌骇淇濆吇楠屾敹鍗�',
+ content: '鎻愮ず锛氳璋ㄦ厧鎿嶄綔锛�',
+ okText: '纭',
+ cancelText: '鍙栨秷',
+ onOk() {
+ let formData = Object.assign(that.model, values);
+ formData.maintenanceOrderId = that.model.id
+ formData.maintenanceThreeAcceptances = that.dataSource
+ that.confirmLoading = true;
+ postAction(that.url.add, formData).then((res) => {
+ if (res.success) {
+ that.$message.success(res.message);
+ that.$emit('ok', new Date());
+ } else {
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ that.close();
+ })
+ },
+ })
+ }
+ })
+ },
+
+ handleChange(value, key, column, index) {
+ let that = this;
+ const temp = [...that.dataSource];
+ const target = temp.filter(item => key === item.key)[index];
+ if (target) {
+ if (column.dataIndex == 'position') {
+ target[column.dataIndex] = value.target.value;
+ }
+ if (column.dataIndex == 'content') {
+ target[column.dataIndex] = value.target.value;
+ }
+ if ('standard' == column.dataIndex) {
+ target['standard'] = value.target.value;
+ }
+ if (column.dataIndex == 'firstInspect') {
+ target[column.dataIndex] = value.target.value;
+ }
+ if (column.dataIndex == 'secondInspect') {
+ target[column.dataIndex] = value.target.value;
+ }
+ //鏄剧ず甯﹁繃鏉ョ殑鏁版嵁
+ that.dataSource = temp;
+ }
+ },
+
+ },
+}
+</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;
+}
+
+.line {
+ width: 1px;
+ height: 300px;
+ background-color: #000;
+ border: none;
+ float: left;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3