Commit 0b10c798d6bd9f812130d7056534376a99d624fb
1 parent
7684a533
v1.9 优化报修相关bug
Showing
14 changed files
with
58 additions
and
37 deletions
src/api/work/repairPoolManageApi.js
| ... | ... | @@ -46,10 +46,10 @@ export function dispatchRepair(data) { |
| 46 | 46 | } |
| 47 | 47 | }).then(response => { |
| 48 | 48 | const res = response.data |
| 49 | - if (res.code === 0) { | |
| 49 | + if (res.code == 0) { | |
| 50 | 50 | resolve(res) |
| 51 | 51 | } else { |
| 52 | - reject(new Error(res.msg || 'Dispatch failed')) | |
| 52 | + reject(new Error(res.msg )) | |
| 53 | 53 | } |
| 54 | 54 | }).catch(error => { |
| 55 | 55 | reject(error) | ... | ... |
src/components/room/addShops.vue
src/components/work/addOwnerRepair.vue
| 1 | 1 | <template> |
| 2 | 2 | <el-dialog :title="$t('addOwnerRepair.title')" :visible.sync="visible" width="50%" @close="closeDialog"> |
| 3 | 3 | <el-form ref="form" :model="formData" :rules="rules" label-width="120px"> |
| 4 | - <el-form-item :label="$t('addOwnerRepair.repairScope')" prop="repairObjType" required> | |
| 4 | + <el-form-item :label="$t('addOwnerRepair.repairScope')" prop="repairObjType" > | |
| 5 | 5 | <el-select v-model="formData.repairObjType" style="width:100%" @change="changeRepairObjType"> |
| 6 | 6 | <el-option v-for="item in repairObjTypes" :key="item.value" :label="item.label" :value="item.value" /> |
| 7 | 7 | </el-select> |
| ... | ... | @@ -27,26 +27,26 @@ |
| 27 | 27 | </el-select> |
| 28 | 28 | </el-form-item> |
| 29 | 29 | |
| 30 | - <el-form-item :label="$t('addOwnerRepair.repairType')" prop="repairType" required> | |
| 30 | + <el-form-item :label="$t('addOwnerRepair.repairType')" prop="repairType" > | |
| 31 | 31 | <el-select v-model="formData.repairType" style="width:100%"> |
| 32 | 32 | <el-option v-for="item in repairSettings" :key="item.repairType" :label="item.repairTypeName" |
| 33 | 33 | :value="item.repairType" /> |
| 34 | 34 | </el-select> |
| 35 | 35 | </el-form-item> |
| 36 | 36 | |
| 37 | - <el-form-item :label="$t('addOwnerRepair.repairName')" prop="repairName" required> | |
| 37 | + <el-form-item :label="$t('addOwnerRepair.repairName')" prop="repairName" > | |
| 38 | 38 | <el-input v-model.trim="formData.repairName" :placeholder="$t('addOwnerRepair.placeholder.repairName')" /> |
| 39 | 39 | </el-form-item> |
| 40 | 40 | |
| 41 | - <el-form-item :label="$t('addOwnerRepair.tel')" prop="tel" required> | |
| 41 | + <el-form-item :label="$t('addOwnerRepair.tel')" prop="tel" > | |
| 42 | 42 | <el-input v-model.trim="formData.tel" type="tel" :placeholder="$t('addOwnerRepair.placeholder.tel')" /> |
| 43 | 43 | </el-form-item> |
| 44 | 44 | |
| 45 | - <el-form-item :label="$t('addOwnerRepair.appointmentTime')" prop="appointmentTime" required> | |
| 45 | + <el-form-item :label="$t('addOwnerRepair.appointmentTime')" prop="appointmentTime" > | |
| 46 | 46 | <el-date-picker v-model="formData.appointmentTime" type="datetime" style="width:100%" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('addOwnerRepair.placeholder.appointmentTime')" /> |
| 47 | 47 | </el-form-item> |
| 48 | 48 | |
| 49 | - <el-form-item :label="$t('addOwnerRepair.context')" prop="context" required> | |
| 49 | + <el-form-item :label="$t('addOwnerRepair.context')" prop="context" > | |
| 50 | 50 | <el-input v-model.trim="formData.context" type="textarea" rows="4" :placeholder="$t('addOwnerRepair.placeholder.context')" /> |
| 51 | 51 | </el-form-item> |
| 52 | 52 | </el-form> | ... | ... |
src/components/work/chooseSingleResource.vue
| ... | ... | @@ -273,7 +273,8 @@ export default { |
| 273 | 273 | price: this.form.price, |
| 274 | 274 | useNumber: this.form.useNumber, |
| 275 | 275 | isCustom: this.form.isCustom, |
| 276 | - customGoodsName: this.form.customGoodsName | |
| 276 | + customGoodsName: this.form.customGoodsName, | |
| 277 | + resName:this.form.customGoodsName | |
| 277 | 278 | } |
| 278 | 279 | |
| 279 | 280 | if (this.form.isCustom) { | ... | ... |
src/components/work/dispatchRepair.vue
src/components/work/forceFinishRepair.vue
| 1 | 1 | <template> |
| 2 | 2 | <el-dialog :title="$t('forceFinishRepair.title')" :visible.sync="visible" width="40%" @close="closeDialog"> |
| 3 | 3 | <el-form label-width="120px"> |
| 4 | - <el-form-item v-if="form.repairObjType !== '004'" :label="$t('forceFinishRepair.useMaterial')"> | |
| 4 | + <!-- <el-form-item v-if="form.repairObjType !== '004'" :label="$t('forceFinishRepair.useMaterial')"> | |
| 5 | 5 | <el-select v-model="form.maintenanceType" placeholder="请选择" style="width:100%"> |
| 6 | 6 | <template v-for="item in maintenanceTypes"> |
| 7 | 7 | <el-option :key="item.statusCd" :label="item.name" :value="item.statusCd" |
| ... | ... | @@ -17,18 +17,18 @@ |
| 17 | 17 | v-if="item.statusCd !== '1003' && item.statusCd !== '1004'" /> |
| 18 | 18 | </template> |
| 19 | 19 | </el-select> |
| 20 | - </el-form-item> | |
| 20 | + </el-form-item> --> | |
| 21 | 21 | |
| 22 | 22 | <template v-if="form.maintenanceType === '1001' || form.maintenanceType === '1003'"> |
| 23 | 23 | <el-form-item :label="$t('forceFinishRepair.goodsType')"> |
| 24 | 24 | <el-select v-model="form.rsId" placeholder="请选择" style="width:100%" @change="listSonResourceStoreType"> |
| 25 | - <el-option v-for="item in resourceStoreTypes" :key="item.rstId" :label="item.name" :value="item.rstId" /> | |
| 25 | + <el-option v-for="item in form.resourceStoreTypes" :key="item.rstId" :label="item.name" :value="item.rstId" /> | |
| 26 | 26 | </el-select> |
| 27 | 27 | </el-form-item> |
| 28 | 28 | |
| 29 | 29 | <template v-if="form.isCustom"> |
| 30 | 30 | <el-form-item :label="$t('forceFinishRepair.goodsName')"> |
| 31 | - <el-input v-model="form.customGoodsName" :placeholder="$t('forceFinishRepair.goodsNamePlaceholder')" /> | |
| 31 | + <el-input v-model="form.customGoodsName" :placeholder="$t('forceFinishRepair.goodsName')" /> | |
| 32 | 32 | </el-form-item> |
| 33 | 33 | |
| 34 | 34 | <el-form-item v-if="form.maintenanceType === '1001'" :label="$t('forceFinishRepair.customPrice')"> |
| ... | ... | @@ -39,13 +39,14 @@ |
| 39 | 39 | <template v-else> |
| 40 | 40 | <el-form-item :label="$t('forceFinishRepair.secondaryCategory')"> |
| 41 | 41 | <el-select v-model="form.rstId" placeholder="请选择" style="width:100%" @change="choseGoods"> |
| 42 | - <el-option v-for="item in sonResourceStoreTypes" :key="item.rstId" :label="item.name" :value="item.rstId" /> | |
| 42 | + <el-option v-for="item in form.sonResourceStoreTypes" :key="item.rstId" :label="item.name" | |
| 43 | + :value="item.rstId" /> | |
| 43 | 44 | </el-select> |
| 44 | 45 | </el-form-item> |
| 45 | 46 | |
| 46 | 47 | <el-form-item v-if="form.rstId" :label="$t('forceFinishRepair.goods')"> |
| 47 | 48 | <el-select v-model="form.resId" placeholder="请选择" style="width:100%" @change="chosePrice"> |
| 48 | - <el-option v-for="item in resourceStores" :key="item.resId" :label="item.resName" :value="item.resId" /> | |
| 49 | + <el-option v-for="item in form.resourceStores" :key="item.resId" :label="item.resName" :value="item.resId" /> | |
| 49 | 50 | </el-select> |
| 50 | 51 | </el-form-item> |
| 51 | 52 | </template> |
| ... | ... | @@ -64,8 +65,7 @@ |
| 64 | 65 | </template> |
| 65 | 66 | |
| 66 | 67 | <el-form-item :label="$t('forceFinishRepair.explanation')"> |
| 67 | - <el-input v-model="form.context" type="textarea" :placeholder="$t('forceFinishRepair.explanation')" | |
| 68 | - :rows="4" /> | |
| 68 | + <el-input v-model="form.context" type="textarea" :placeholder="$t('forceFinishRepair.explanation')" :rows="4" /> | |
| 69 | 69 | </el-form-item> |
| 70 | 70 | </el-form> |
| 71 | 71 | |
| ... | ... | @@ -99,7 +99,7 @@ export default { |
| 99 | 99 | repairType: '', |
| 100 | 100 | repairObjType: '', |
| 101 | 101 | context: '', |
| 102 | - maintenanceType: '', | |
| 102 | + maintenanceType: '1002', | |
| 103 | 103 | resId: '', |
| 104 | 104 | rsId: '', |
| 105 | 105 | isCustom: false, |
| ... | ... | @@ -174,13 +174,15 @@ export default { |
| 174 | 174 | try { |
| 175 | 175 | const params = { |
| 176 | 176 | repairId: this.form.repairId, |
| 177 | - rstId: this.form.rstId | |
| 177 | + rstId: this.form.rstId, | |
| 178 | + page:1, | |
| 179 | + row:50 | |
| 178 | 180 | } |
| 179 | 181 | const data = await listUserStorehouses(params) |
| 180 | 182 | this.form.resourceStores = data |
| 181 | 183 | } catch (error) { |
| 182 | 184 | console.error('获取商品失败:', error) |
| 183 | - this.$message.error('获取商品失败') | |
| 185 | + this.$message.error(error) | |
| 184 | 186 | } |
| 185 | 187 | }, |
| 186 | 188 | chosePrice() { | ... | ... |
src/components/work/visitOwnerRepair.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="$t('repairReturnVisit.visitTitle')" :visible.sync="visible" width="600px" @close="resetForm"> | |
| 2 | + <el-dialog :title="$t('repairReturnVisit.visit')" :visible.sync="visible" width="600px" @close="resetForm"> | |
| 3 | 3 | <el-form ref="visitForm" :model="formData" :rules="rules" label-width="100px" label-position="right"> |
| 4 | 4 | <el-form-item :label="$t('repairReturnVisit.satisfaction')" prop="visitType"> |
| 5 | 5 | <el-select v-model="formData.visitType" :placeholder="$t('repairReturnVisit.satisfaction')" | ... | ... |
src/i18n/commonLang.js
| ... | ... | @@ -80,7 +80,8 @@ export const messages = { |
| 80 | 80 | friday: 'Friday', |
| 81 | 81 | saturday: 'Saturday', |
| 82 | 82 | sunday: 'Sunday', |
| 83 | - map:'Map' | |
| 83 | + map:'Map', | |
| 84 | + remove:'Remove' | |
| 84 | 85 | } |
| 85 | 86 | }, |
| 86 | 87 | zh: { |
| ... | ... | @@ -129,6 +130,7 @@ export const messages = { |
| 129 | 130 | disabled: '禁用', |
| 130 | 131 | import: '导入', |
| 131 | 132 | remark: '备注', |
| 133 | + remove: '删除', | |
| 132 | 134 | hour:'时', |
| 133 | 135 | more:'更多', |
| 134 | 136 | tip:'提示', | ... | ... |
src/views/work/finishRepairList.vue
| ... | ... | @@ -42,9 +42,9 @@ |
| 42 | 42 | v-if="(finishRepairInfo.maintenanceType == '1001' || finishRepairInfo.maintenanceType == '1003') && finishRepairInfo.choosedGoodsList.length > 0"> |
| 43 | 43 | <el-form-item :label="$t('finishRepair.usedGoods')"> |
| 44 | 44 | <el-table :data="finishRepairInfo.choosedGoodsList" border> |
| 45 | - <el-table-column prop="rstName" :label="$t('finishRepair.category')" width="120"></el-table-column> | |
| 46 | - <el-table-column prop="resName" :label="$t('finishRepair.goods')" width="120"></el-table-column> | |
| 47 | - <el-table-column prop="price" :label="$t('finishRepair.price')" width="120" | |
| 45 | + <el-table-column prop="rstName" :label="$t('finishRepair.category')" ></el-table-column> | |
| 46 | + <el-table-column prop="resName" :label="$t('finishRepair.goods')"></el-table-column> | |
| 47 | + <el-table-column prop="price" :label="$t('finishRepair.price')" | |
| 48 | 48 | v-if="finishRepairInfo.maintenanceType == '1001'"> |
| 49 | 49 | <template slot-scope="scope"> |
| 50 | 50 | <el-input-number v-model="scope.row.price" |
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | </span> |
| 57 | 57 | </template> |
| 58 | 58 | </el-table-column> |
| 59 | - <el-table-column :label="$t('finishRepair.quantity')" width="150"> | |
| 59 | + <el-table-column :label="$t('finishRepair.quantity')" > | |
| 60 | 60 | <template slot-scope="scope"> |
| 61 | 61 | <el-input-number v-model="scope.row.useNumber" @change="updateTotalPrice" :min="1"> |
| 62 | 62 | </el-input-number> |
| ... | ... | @@ -115,7 +115,7 @@ |
| 115 | 115 | </el-row> |
| 116 | 116 | </el-card> |
| 117 | 117 | |
| 118 | - <choose-single-resource ref="chooseSingleResource"></choose-single-resource> | |
| 118 | + <choose-single-resource ref="chooseSingleResource" @choose-single-resource="chooseSingleResource"></choose-single-resource> | |
| 119 | 119 | </div> |
| 120 | 120 | </template> |
| 121 | 121 | |
| ... | ... | @@ -123,6 +123,7 @@ |
| 123 | 123 | import { getDict } from '@/api/community/communityApi' |
| 124 | 124 | import { getCommunityId } from '@/api/community/communityApi' |
| 125 | 125 | import { repairFinish } from '@/api/work/finishRepairApi' |
| 126 | +import {getUserName} from '@/api/user/userApi' | |
| 126 | 127 | import UploadImageUrl from '@/components/upload/UploadImageUrl' |
| 127 | 128 | import ChooseSingleResource from '@/components/work/chooseSingleResource' |
| 128 | 129 | |
| ... | ... | @@ -159,6 +160,10 @@ export default { |
| 159 | 160 | this.initData() |
| 160 | 161 | }, |
| 161 | 162 | methods: { |
| 163 | + chooseSingleResource(goods) { | |
| 164 | + this.finishRepairInfo.choosedGoodsList.push(goods) | |
| 165 | + this.updateTotalPrice() | |
| 166 | + }, | |
| 162 | 167 | async initData() { |
| 163 | 168 | this.finishRepairInfo.repairType = this.$route.query.repairType |
| 164 | 169 | this.finishRepairInfo.repairId = this.$route.query.repairId |
| ... | ... | @@ -240,7 +245,8 @@ export default { |
| 240 | 245 | try { |
| 241 | 246 | const params = { |
| 242 | 247 | ...this.finishRepairInfo, |
| 243 | - communityId: this.communityId | |
| 248 | + communityId: this.communityId, | |
| 249 | + userName:getUserName() | |
| 244 | 250 | } |
| 245 | 251 | const res = await repairFinish(params) |
| 246 | 252 | if (res.code === 0) { | ... | ... |
src/views/work/ownerRepairManageList.vue
src/views/work/repairPoolManageLang.js
| ... | ... | @@ -44,7 +44,8 @@ export const messages = { |
| 44 | 44 | freeService: 'Free Service', |
| 45 | 45 | needMaterials: 'Need Materials', |
| 46 | 46 | noMaterialsNeeded: 'No Materials Needed', |
| 47 | - timedTaskProcessing: 'Timed Task Processing' | |
| 47 | + timedTaskProcessing: 'Timed Task Processing', | |
| 48 | + cannotTransferSelf:' can not transfer to yourself' | |
| 48 | 49 | } |
| 49 | 50 | }, |
| 50 | 51 | zh: { |
| ... | ... | @@ -92,7 +93,8 @@ export const messages = { |
| 92 | 93 | freeService: '免费服务', |
| 93 | 94 | needMaterials: '需要材料', |
| 94 | 95 | noMaterialsNeeded: '不需要材料', |
| 95 | - timedTaskProcessing: '定时任务处理中' | |
| 96 | + timedTaskProcessing: '定时任务处理中', | |
| 97 | + cannotTransferSelf: '不能转单给自己' | |
| 96 | 98 | } |
| 97 | 99 | } |
| 98 | 100 | } |
| 99 | 101 | \ No newline at end of file | ... | ... |
src/views/work/repairPoolManageList.vue
| ... | ... | @@ -19,9 +19,9 @@ |
| 19 | 19 | <el-card class="box-card"> |
| 20 | 20 | <div slot="header" class="flex justify-between"> |
| 21 | 21 | <span>{{ $t('repairPoolManage.queryConditions') }}</span> |
| 22 | - <el-button style="float: right; padding: 3px 0" type="text" @click="toggleMoreCondition"> | |
| 22 | + <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="toggleMoreCondition"> | |
| 23 | 23 | {{ moreCondition ? $t('repairPoolManage.hide') : $t('repairPoolManage.more') }} |
| 24 | - </el-button> | |
| 24 | + </el-button> --> | |
| 25 | 25 | </div> |
| 26 | 26 | |
| 27 | 27 | <el-form :model="conditions" label-width="auto"> | ... | ... |
src/views/work/repairReturnVisitLang.js
| ... | ... | @@ -22,7 +22,10 @@ export const messages = { |
| 22 | 22 | satisfaction: 'Satisfaction', |
| 23 | 23 | visitContent: 'Visit Content', |
| 24 | 24 | satisfied: 'Satisfied', |
| 25 | - unsatisfied: 'Unsatisfied' | |
| 25 | + unsatisfied: 'Unsatisfied', | |
| 26 | + satisfactionRequired: 'Please select satisfaction', | |
| 27 | + visitContentRequired: 'Please enter visit content', | |
| 28 | + visitContentMaxLength: 'The length of visit content cannot exceed 1000 characters' | |
| 26 | 29 | } |
| 27 | 30 | }, |
| 28 | 31 | zh: { |
| ... | ... | @@ -48,7 +51,10 @@ export const messages = { |
| 48 | 51 | satisfaction: '满意度', |
| 49 | 52 | visitContent: '回访内容', |
| 50 | 53 | satisfied: '满意', |
| 51 | - unsatisfied: '不满意' | |
| 54 | + unsatisfied: '不满意', | |
| 55 | + satisfactionRequired: '请选择满意度', | |
| 56 | + visitContentRequired: '请输入回访内容', | |
| 57 | + visitContentMaxLength: '回访内容长度不能超过1000个字符' | |
| 52 | 58 | } |
| 53 | 59 | } |
| 54 | 60 | } |
| 55 | 61 | \ No newline at end of file | ... | ... |
src/views/work/repairSettingList.vue
| ... | ... | @@ -44,9 +44,9 @@ |
| 44 | 44 | <div slot="header" class="flex justify-between"> |
| 45 | 45 | <span>{{ $t('repairSetting.repairSettingTitle') }}</span> |
| 46 | 46 | <div style="float: right"> |
| 47 | - <el-button type="text" @click="showDocumentation"> | |
| 47 | + <!-- <el-button type="text" @click="showDocumentation"> | |
| 48 | 48 | {{ $t('repairSetting.documentation') }} |
| 49 | - </el-button> | |
| 49 | + </el-button> --> | |
| 50 | 50 | <el-button type="primary" size="small" @click="openAddDialog"> |
| 51 | 51 | {{ $t('repairSetting.add') }} |
| 52 | 52 | </el-button> | ... | ... |