v1.9 优化缴费页面扫码缴费

This commit is contained in:
wuxw 2025-08-01 16:07:20 +08:00
parent c6bec22b72
commit b8ac379c1b
2 changed files with 14 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog :title="$t('addInspectionPoint.title')" :visible.sync="dialogVisible" width="60%" top="5vh" <el-dialog :title="$t('addInspectionPoint.title')" :visible.sync="dialogVisible" width="60%" top="5vh"
@close="resetForm"> @close="resetForm">
<el-form ref="addForm" :model="addInspectionPointInfo" :rules="rules" label-width="120px" label-position="right"> <el-form ref="addForm" :model="addInspectionPointInfo" class="text-left" :rules="rules" label-width="120px" label-position="right">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('addInspectionPoint.inspectionName')" prop="inspectionName"> <el-form-item :label="$t('addInspectionPoint.inspectionName')" prop="inspectionName">
@ -31,7 +31,7 @@
</el-row> </el-row>
<el-row :gutter="20" v-if="addInspectionPointInfo.pointObjType === '1001'"> <el-row :gutter="20" v-if="addInspectionPointInfo.pointObjType === '1001'">
<el-col :span="24"> <el-col :span="12">
<el-form-item :label="$t('addInspectionPoint.machine')" prop="pointObjId"> <el-form-item :label="$t('addInspectionPoint.machine')" prop="pointObjId">
<machine-select2 ref="machineSelect" :parent-modal="true" @notify="handleMachineSelect" /> <machine-select2 ref="machineSelect" :parent-modal="true" @notify="handleMachineSelect" />
<div class="tip-text">{{ $t('addInspectionPoint.tip.addMachine') }}</div> <div class="tip-text">{{ $t('addInspectionPoint.tip.addMachine') }}</div>
@ -157,9 +157,10 @@ export default {
open() { open() {
this.dialogVisible = true this.dialogVisible = true
this.resetForm() this.resetForm()
this.getDictData()
this.$nextTick(() => { this.$nextTick(() => {
this.initMap() this.initMap()
this.getDictData()
this._listAddInspectionItems() this._listAddInspectionItems()
}) })
}, },
@ -168,6 +169,7 @@ export default {
try { try {
const data = await getDict('inspection_point', 'point_obj_type') const data = await getDict('inspection_point', 'point_obj_type')
this.addInspectionPointInfo.pointObjTypes = data this.addInspectionPointInfo.pointObjTypes = data
console.log(this.addInspectionPointInfo.pointObjTypes)
} catch (error) { } catch (error) {
console.error('获取字典数据失败:', error) console.error('获取字典数据失败:', error)
} }
@ -200,7 +202,9 @@ export default {
this.addInspectionPointInfo.pointObjName = '' this.addInspectionPointInfo.pointObjName = ''
if (this.addInspectionPointInfo.pointObjType === '1001') { if (this.addInspectionPointInfo.pointObjType === '1001') {
this.$refs.machineSelect.clearMachine() setTimeout(() => {
this.$refs.machineSelect.searchMachines()
}, 500)
} }
}, },
@ -266,9 +270,11 @@ export default {
this.$refs.addForm.resetFields() this.$refs.addForm.resetFields()
} }
setTimeout(() => {
if (this.$refs.machineSelect) { if (this.$refs.machineSelect) {
this.$refs.machineSelect.clearMachine() this.$refs.machineSelect.clearMachine()
} }
}, 500)
}, },
handlePositionChange(data) { handlePositionChange(data) {
this.addInspectionPointInfo.lng = data.lng this.addInspectionPointInfo.lng = data.lng

View File

@ -6,7 +6,7 @@
</template> </template>
<script> <script>
import { listEquipmentAccount } from '@/api/inspection/inspectionPointApi' import { listEquipmentAccount } from '@/api/inspection/addMaintainancePlanApi'
import { getCommunityId } from '@/api/community/communityApi' import { getCommunityId } from '@/api/community/communityApi'
export default { export default {