Commit e94f0676066c922045265c4e7c83d58503832dd3

Authored by wuxw
1 parent 219071af

跳转到业务受理页面处理完成

src/components/community/AddRoomRenovation.vue
1 1 <template>
2 2 <el-dialog :title="$t('roomRenovationManage.add')" :visible.sync="visible" width="40%" @close="resetForm">
3   - <el-form :model="form" ref="form" label-width="120px">
  3 + <el-form :model="form" :rules="rules" ref="form" label-width="120px">
4 4 <el-form-item :label="$t('roomRenovationManage.room')" prop="roomName" required>
5 5 <el-input v-model.trim="form.roomName" :placeholder="$t('roomRenovationManage.roomNumberPlaceholder')"
6 6 @blur="queryRoom" />
... ... @@ -78,6 +78,32 @@ export default {
78 78 remark: '',
79 79 isPostpone: 'N',
80 80 communityId: ''
  81 + },
  82 + rules: {
  83 + roomName: [
  84 + { required: true, message: this.$t('roomRenovationManage.roomNumberPlaceholder'), trigger: 'blur' }
  85 + ],
  86 + personName: [
  87 + { required: true, message: this.$t('roomRenovationManage.contactPersonPlaceholder'), trigger: 'blur' }
  88 + ],
  89 + personTel: [
  90 + { required: true, message: this.$t('roomRenovationManage.phonePlaceholder'), trigger: 'blur' }
  91 + ],
  92 + startTime: [
  93 + { required: true, message: this.$t('roomRenovationManage.startTimePlaceholder'), trigger: 'blur' }
  94 + ],
  95 + endTime: [
  96 + { required: true, message: this.$t('roomRenovationManage.endTimePlaceholder'), trigger: 'blur' }
  97 + ],
  98 + renovationCompany: [
  99 + { required: true, message: this.$t('roomRenovationManage.renovationCompanyPlaceholder'), trigger: 'blur' }
  100 + ],
  101 + personMain: [
  102 + { required: true, message: this.$t('roomRenovationManage.renovationManagerPlaceholder'), trigger: 'blur' }
  103 + ],
  104 + personMainTel: [
  105 + { required: true, message: this.$t('roomRenovationManage.managerPhonePlaceholder'), trigger: 'blur' }
  106 + ]
81 107 }
82 108 }
83 109 },
... ... @@ -105,6 +131,11 @@ export default {
105 131  
106 132 async saveRoomRenovation() {
107 133 try {
  134 + // 表单验证
  135 + const valid = await this.$refs.form.validate()
  136 + if (!valid) return
  137 +
  138 +
108 139 this.form.communityId = getCommunityId()
109 140 await addRoomRenovation(this.form)
110 141 this.$message.success(this.$t('common.operationSuccess'))
... ... @@ -121,8 +152,8 @@ export default {
121 152  
122 153 try {
123 154 // 这里需要根据实际API实现查询房屋信息
124   - const {rooms} = await queryRooms({ roomName: this.form.roomName,page:1,row:10,communityId:getCommunityId() })
125   - if(rooms.length > 0){
  155 + const { rooms } = await queryRooms({ roomName: this.form.roomName, page: 1, row: 10, communityId: getCommunityId() })
  156 + if (rooms.length > 0) {
126 157 this.form.personName = rooms[0].ownerName
127 158 this.form.personTel = rooms[0].link
128 159 this.form.roomId = rooms[0].roomId
... ... @@ -139,13 +170,19 @@ export default {
139 170 }
140 171 </script>
141 172 <style scoped>
142   -.el-date-editor{
  173 +.el-date-editor {
143 174 width: 100%;
144 175 }
145   -.el-date-editor.el-input{
  176 +
  177 +.el-date-editor.el-input {
146 178 width: 100%;
147 179 }
148   -.el-form-item{
  180 +
  181 +.el-form-item {
149 182 width: 95%;
150 183 }
  184 +
  185 +.el-form-item__error {
  186 + display: none !important;
  187 +}
151 188 </style>
152 189 \ No newline at end of file
... ...
src/components/contract/contractDetailRoom.vue
... ... @@ -101,20 +101,8 @@ export default {
101 101 return totalArea.toFixed(2)
102 102 },
103 103 _toSimplifyAcceptance(room) {
104   - const date = new Date()
105   - this.$store.dispatch('app/saveData', {
106   - key: 'JAVA110_IS_BACK',
107   - value: date.getTime()
108   - })
109   - this.$store.dispatch('app/saveData', {
110   - key: 'simplifyAcceptanceSearch',
111   - value: {
112   - searchType: '1',
113   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
114   - searchPlaceholder: this.$t('contractDetailRoom.searchPlaceholder')
115   - }
116   - })
117   - this.$router.push('/property/simplifyAcceptance?tab=businessAcceptance')
  104 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
  105 +
118 106 },
119 107 _openAddContractRoom() {
120 108 this.$router.push('/admin/contractChangeDetail?param=contractChangeAssets')
... ...
src/components/fee/feeDetailRoom.vue
... ... @@ -83,20 +83,9 @@ export default {
83 83 this._loadFeeDetailRoomData()
84 84 },
85 85 _toSimplifyAcceptance(room) {
86   - const date = new Date()
87   - this.$store.dispatch('app/saveData', {
88   - key: 'JAVA110_IS_BACK',
89   - value: date.getTime()
90   - })
91   - this.$store.dispatch('app/saveData', {
92   - key: 'simplifyAcceptanceSearch',
93   - value: {
94   - searchType: '1',
95   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
96   - searchPlaceholder: this.$t('feeDetailRoom.searchPlaceholder')
97   - }
98   - })
99   - this.$router.push('/pages/property/simplifyAcceptance?tab=businessAcceptance')
  86 +
  87 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
  88 +
100 89 }
101 90 }
102 91 }
... ...
src/components/index/indexCommunity.vue
... ... @@ -95,10 +95,10 @@ export default {
95 95 })
96 96 },
97 97 _toOwner() {
98   - this.$router.push('/property/listOwner?tab=ownerInfo')
  98 + this.$router.push('/pages/property/listOwner?tab=ownerInfo')
99 99 },
100 100 _toCar() {
101   - this.$router.push('/property/listOwnerCar?tab=ownerCar')
  101 + this.$router.push('/pages/property/listOwnerCar?tab=ownerCar')
102 102 }
103 103 }
104 104 }
... ...
src/components/owner/ownerDetailRoom.vue
... ... @@ -171,20 +171,8 @@ export default {
171 171 })
172 172 },
173 173 _toSimplifyAcceptance(room) {
174   - const date = new Date()
175   - this.$store.dispatch('app/saveData', {
176   - key: 'JAVA110_IS_BACK',
177   - value: date.getTime()
178   - })
179   - this.$store.dispatch('app/saveData', {
180   - key: 'simplifyAcceptanceSearch',
181   - value: {
182   - searchType: '1',
183   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
184   - searchPlaceholder: this.$t('ownerDetailRoom.roomNumberPlaceholder')
185   - }
186   - })
187   - this.$router.push('/property/simplifyAcceptance?tab=businessAcceptance')
  174 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
  175 +
188 176 },
189 177 _openEditRoomModel(room) {
190 178 this.$refs.editRoom.open(room)
... ...
src/components/system/searchCommunityDataList.vue
... ... @@ -247,14 +247,8 @@ export default {
247 247 })
248 248 },
249 249 toSimplifyAcceptance(room) {
250   - const date = new Date()
251   - localStorage.setItem("JAVA110_IS_BACK", date.getTime())
252   - localStorage.setItem('simplifyAcceptanceSearch', JSON.stringify({
253   - searchType: '1',
254   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
255   - searchPlaceholder: this.$t('searchCommunityData.roomPlaceholder')
256   - }))
257   - window.open('/#/pages/property/simplifyAcceptance?tab=businessAcceptance')
  250 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
  251 +
258 252 },
259 253 clearSearchData() {
260 254 const ws = this.ws
... ...
src/i18n/commonLang.js
... ... @@ -58,7 +58,8 @@ export const messages = {
58 58 submitSuccess:'Submit successfully',
59 59 saveSuccess:'successfully',
60 60 noData:'No Data',
61   - file:'File'
  61 + file:'File',
  62 + hide:'Hide'
62 63 }
63 64 },
64 65 zh: {
... ... @@ -120,7 +121,8 @@ export const messages = {
120 121 submitSuccess:'提交成功',
121 122 saveSuccess:'成功',
122 123 noData:'暂无数据',
123   - file:'附件'
  124 + file:'附件',
  125 + hide:'隐藏'
124 126 }
125 127 }
126 128 }
127 129 \ No newline at end of file
... ...
src/views/car/carStructureList.vue
... ... @@ -81,20 +81,8 @@ export default {
81 81 return "#1296db"
82 82 },
83 83 toSimplifyAcceptance(car) {
84   - const date = new Date()
85   - this.$store.dispatch('app/saveData', {
86   - key: "JAVA110_IS_BACK",
87   - value: date.getTime()
88   - })
89   - this.$store.dispatch('app/saveData', {
90   - key: 'simplifyAcceptanceSearch',
91   - value: {
92   - searchType: '1',
93   - searchValue: `${car.floorNum}-${car.unitNum}-${car.roomNum}`,
94   - searchPlaceholder: this.$t('carStructure.searchPlaceholder')
95   - }
96   - })
97   - this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理')
  84 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${car.floorNum}-${car.unitNum}-${car.roomNum}`)
  85 +
98 86 }
99 87 }
100 88 }
... ...
src/views/community/roomRenovationManageLang.js
... ... @@ -62,7 +62,16 @@ export const messages = {
62 62 reviewPass: "Review Pass",
63 63 reviewReject: "Review Reject",
64 64 acceptanceSuccess: "Acceptance Success",
65   - acceptanceFailed: "Acceptance Failure"
  65 + acceptanceFailed: "Acceptance Failure",
  66 + // 表单验证消息
  67 + roomRequired: "Please enter room number",
  68 + contactPersonRequired: "Please enter contact person name",
  69 + phoneRequired: "Please enter phone number",
  70 + startTimeRequired: "Please select renovation start time",
  71 + endTimeRequired: "Please select renovation end time",
  72 + renovationCompanyRequired: "Please enter renovation company",
  73 + renovationManagerRequired: "Please enter renovation manager",
  74 + managerPhoneRequired: "Please enter manager phone number"
66 75 }
67 76 },
68 77 zh: {
... ... @@ -128,7 +137,16 @@ export const messages = {
128 137 reviewPass: "审核通过",
129 138 reviewReject: "审核不通过",
130 139 acceptanceSuccess: "验收成功",
131   - acceptanceFailed: "验收失败"
  140 + acceptanceFailed: "验收失败",
  141 + // 表单验证消息
  142 + roomRequired: "请输入房间号",
  143 + contactPersonRequired: "请输入联系人姓名",
  144 + phoneRequired: "请输入联系电话",
  145 + startTimeRequired: "请选择装修开始时间",
  146 + endTimeRequired: "请选择装修结束时间",
  147 + renovationCompanyRequired: "请输入装修公司",
  148 + renovationManagerRequired: "请输入装修负责人",
  149 + managerPhoneRequired: "请输入负责人电话"
132 150 }
133 151 }
134 152 }
135 153 \ No newline at end of file
... ...
src/views/fee/roomCreateFeeList.vue
... ... @@ -280,17 +280,9 @@ export default {
280 280 }, 500)
281 281 },
282 282 _roomCreateFeetoSimplifyAcceptance() {
283   - const date = new Date()
284   - localStorage.setItem('JAVA110_IS_BACK', date.getTime())
285   - localStorage.setItem(
286   - 'simplifyAcceptanceSearch',
287   - JSON.stringify({
288   - searchType: '1',
289   - searchValue: `${this.roomCreateFeeInfo.floorNum}-${this.roomCreateFeeInfo.unitNum}-${this.roomCreateFeeInfo.roomNum}`,
290   - searchPlaceholder: this.$t('inputSearchRoomDemo.searchPlaceholder')
291   - })
292   - )
293   - this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理')
  283 +
  284 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${this.roomCreateFeeInfo.floorNum}-${this.roomCreateFeeInfo.unitNum}-${this.roomCreateFeeInfo.roomNum}`)
  285 +
294 286 },
295 287 _toBatchCreateFee() {
296 288 this.$router.push('/pages/fee/roomCreatePayFee')
... ...
src/views/room/roomList.vue
... ... @@ -618,14 +618,7 @@ export default {
618 618 },
619 619  
620 620 toSimplifyAcceptance(room) {
621   - const date = new Date()
622   - localStorage.setItem('JAVA110_IS_BACK', date.getTime())
623   - localStorage.setItem('simplifyAcceptanceSearch', JSON.stringify({
624   - searchType: '1',
625   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
626   - searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1',
627   - }))
628   - this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理')
  621 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
629 622 },
630 623  
631 624 viewOwnerRooms(room) {
... ...
src/views/room/roomStructureList.vue
... ... @@ -2,7 +2,7 @@
2 2 <div class="room-structure-container">
3 3 <el-row :gutter="20">
4 4 <el-col :span="4">
5   - <floor-unit-tree ref="floorUnitTree" @switchFloorUnit="switchFloorUnit" />
  5 + <floor-unit-tree ref="floorUnitTree" @switchFloorUnit="switchFloorUnit" />
6 6 </el-col>
7 7 <el-col :span="20">
8 8 <el-card v-if="roomStructureInfo.layerRoomCount < 5" class="room-list-card">
... ... @@ -137,20 +137,7 @@ export default {
137 137 return "#1296db"
138 138 },
139 139 toSimplifyAcceptance(room) {
140   - const date = new Date()
141   - this.$store.dispatch('app/saveData', {
142   - key: "JAVA110_IS_BACK",
143   - value: date.getTime()
144   - })
145   - this.$store.dispatch('app/saveData', {
146   - key: 'simplifyAcceptanceSearch',
147   - value: {
148   - searchType: '1',
149   - searchValue: `${room.floorNum}-${room.unitNum}-${room.roomNum}`,
150   - searchPlaceholder: this.$t('roomStructure.searchPlaceholder')
151   - }
152   - })
153   - this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理')
  140 + this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
154 141 },
155 142 supportPark() {
156 143 const parkRooms = this.roomStructureInfo.parkRooms
... ...
src/views/simplify/simplifyAcceptanceList.vue
... ... @@ -381,18 +381,12 @@ export default {
381 381 },
382 382 methods: {
383 383 _initMethod() {
384   - if (!this.$route.query.isBack) {
  384 + if (!this.$route.query.searchValue) {
385 385 return
386 386 }
387   - // 检查是否有缓存数据
388   - let _tempData = localStorage.getItem(this.TEMP_SEARCH)
389   - if (_tempData == null) {
390   - return
391   - }
392   - _tempData = JSON.parse(_tempData)
393   - this.simplifyAcceptanceInfo.searchType = _tempData.searchType
394   - this.simplifyAcceptanceInfo.searchValue = _tempData.searchValue
395   - this.simplifyAcceptanceInfo.searchPlaceholder = _tempData.searchPlaceholder
  387 + this.simplifyAcceptanceInfo.searchType = '1'
  388 + this.simplifyAcceptanceInfo.searchValue = this.$route.query.searchValue
  389 + this.simplifyAcceptanceInfo.searchPlaceholder = 'simplifyAcceptance.houseNumberPlaceholder'
396 390 this._doSearch()
397 391 },
398 392 _changeSearchType() {
... ...