From 92ff846fb659c62037a32b1d8c15eae9df9d9b54 Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期一, 18 九月 2023 13:24:30 +0800 Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430 --- src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 370 insertions(+), 0 deletions(-) diff --git a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue new file mode 100644 index 0000000..13d9c64 --- /dev/null +++ b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue @@ -0,0 +1,370 @@ +<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-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" + rows="3" + /> + </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 -- Gitblit v1.9.3