From 5cbba170e270e6f1c99a91e27dbb7951a27d596a Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期五, 24 十一月 2023 16:41:32 +0800 Subject: [PATCH] 故障报修验收 --- src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 95 +++++++++++++++++------------------------------ 1 files changed, 34 insertions(+), 61 deletions(-) diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue index 8fc53a6..1dafa9a 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue @@ -18,7 +18,8 @@ > <a-input v-model="model.num" - placeholder="璇疯緭鍏ュ崟鎹彿" + placeholder="灏嗙敱绯荤粺鑷姩鐢熸垚" + disabled ></a-input> </a-form-model-item> </a-col> @@ -74,13 +75,14 @@ :dataSource="equipmentSealDetailTable.dataSource" :maxHeight="300" :disabled="formDisabled" - :alwaysEdit='true' - :bordered='true' + :alwaysEdit="true" + :bordered="true" :rowNumber="true" :rowSelection="true" :toolbar="true" :toolbarConfig="toolbarConfig" :linkage-config="linkageConfig" + :addDefaultRowNum="0" > <template slot="toolbarPrefix"> <a-button @@ -91,27 +93,6 @@ </a-button> </template> - <!-- 璁惧鍥剧墖鎻掓Ы --> - <!-- <template v-slot:equipmentPhoto='props'> - <Tooltip - placement="top" - title="棰勮鍥剧墖" - > - <span - v-if="!text" - style="font-size: 12px;font-style: italic;" - >鏃犲浘鐗�</span> - <img - v-else - :preview="props.equipmentId" - :src="getImgView(text)" - height="25px" - alt="" - style="max-width:80px;font-size: 12px;font-style: italic;" - /> - </Tooltip> - </template> --> - <!-- :preview="props.rowId"equipmentId --> <template v-slot:action="props"> <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @@ -124,21 +105,16 @@ </a-tab-pane> </a-tabs> <equipment-select-modal ref="EquipmentSelectModal"></equipment-select-modal> - <!-- <equipment-selection @selectionRows="selectionRows" :equipmentStatus="['2', '3']" - ref="EquipmentSelection"></equipment-selection> --> </a-spin> </template> <script> -import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin' -import { randomUUID, randomNumber } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util' -import pick from 'lodash.pick' -import { getAction, postAction, requestPut } from '@api/manage' // import EquipmentSelection from '@/components/tools/EquipmentSelection.vue' import EquipmentSelectModal from './EquipmentSelectModal.vue' +import { getAction, postAction, requestPut } from '@api/manage' import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' import { JVXETypes } from '@comp/jeecg/JVxeTable' import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' @@ -168,19 +144,15 @@ xs: { span: 24 }, sm: { span: 16 } }, - // manageList: [ - // { label: '绌�', value: '' }, - // { label: '淇濆吇鏍囧噯涓�', value: '1001' }, - // { label: '淇濆吇鏍囧噯浜�', value: '1002' } - // ], - // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 addDefaultRowNum: 0, model: {}, validatorRules: { + num: [ { required: true, message: '璇疯緭鍏ュ崟鎹彿!' }, { validator: (rule, value, callback) => validateDuplicateValue('mom_eam_equipment_change', 'num', value, this.model.id, callback) } ], + remark: [ { required: false, message: '璇疯緭鍏ュ娉�!' } ] @@ -207,7 +179,7 @@ title: '璁惧灏佸瓨鏄庣粏id', key: 'id', type: JVXETypes.hidden, - width: '100px', + width: '100px' }, // fixed: 'left' { @@ -224,11 +196,11 @@ defaultValue: '' }, { - title: '璁惧缂栫爜', + title: '缁熶竴缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, width: '150px', - align: "center", + align: 'center' // placeholder: '璇疯緭鍏�${title}', }, // fixed: 'left' @@ -238,7 +210,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { @@ -247,7 +219,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { @@ -256,7 +228,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -265,7 +237,7 @@ key: 'assetNumber', type: JVXETypes.normal, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { @@ -273,7 +245,7 @@ key: 'sealReason', type: JVXETypes.input, width: '200px', - align: "center", + align: 'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '', validateRules: [{ @@ -286,7 +258,7 @@ key: 'sealDate', type: JVXETypes.datetime, width: '150px', - align: "center", + align: 'center', placeholder: '璇烽�夋嫨${title}', defaultValue: '', validateRules: [{ @@ -300,7 +272,7 @@ key: 'planUnsealDate', type: JVXETypes.date, width: '150px', - align: "center", + align: 'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -311,7 +283,7 @@ disabled: true, placeholder: '璇疯緭鍏�${title}', defaultValue: '', - width: '150px', + width: '150px' }, { title: '鐗圭璁惧', @@ -319,7 +291,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, @@ -329,7 +301,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { @@ -338,7 +310,7 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { @@ -347,7 +319,7 @@ type: JVXETypes.normal, disabled: true, width: '200px', - align: "center", + align: 'center' }, { title: '閲嶈搴�', @@ -355,14 +327,14 @@ type: JVXETypes.normal, disabled: true, width: '150px', - align: "center", + align: 'center', defaultValue: '' }, { title: '閲嶈搴�', key: 'equipmentImportanceId', type: JVXETypes.hidden - }, + } // { // title: '璁惧鍥剧墖', // key: 'equipmentPhoto', @@ -387,6 +359,7 @@ add: '/eam/equipmentSeal/add', edit: '/eam/equipmentSeal/edit', queryById: '/eam/equipmentSeal/queryById', + getNum: '/eam/sysIdentity/getNumNew', equipmentSealDetail: { list: '/eam/equipmentSeal/listEquipmentSealDetailByMainId' } @@ -416,6 +389,7 @@ }) }, methods: { + handleChange(value, data) { this.$nextTick(() => { this.$set(data, 'maintenanceAfterUnseal', data.maintenanceAfterUnseal) @@ -496,6 +470,12 @@ if (this.model.id) { let params = { equipmentChangeId: this.model.id } this.requestSubTableData(this.url.equipmentSealDetail.list, params, this.equipmentSealDetailTable) + }else{ + getAction(this.url.getNum, { type: 'EquipmentSeal', length: '4' }).then((res) => { + if (res.success) { + this.model.num = res.message + } + }) } }, //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 @@ -531,15 +511,8 @@ </script> <style scoped> -/** tab panel 涓湁涓嬫媺妗�/鏃ユ湡 杩欑被甯︿笅鎷夋晥鏋滅殑锛岄渶瑕佸姞姝ゆ牱寮� */ -::v-deep .jeecg-tabs-top { +/deep/ .jeecg-tabs-top { overflow: visible; -} - -::v-deep .ant-form-explain { - position: absolute; - right: -50px; - top: 12px; } </style> \ No newline at end of file -- Gitblit v1.9.3