| | |
| | | </view> |
| | | </template> |
| | | <wd-cell title="维修满意度"> |
| | | <wd-rate v-model="repairFb.repairSatisfaction" change="handleChange"></wd-rate> |
| | | <wd-radio-group v-model="repairFb.repairSatisfaction" inline shape="dot"> |
| | | <wd-radio :value="0">不满意</wd-radio> |
| | | <wd-radio :value="1">满意</wd-radio> |
| | | </wd-radio-group> |
| | | </wd-cell> |
| | | <wd-cell title="维修及时性"> |
| | | <wd-rate v-model="repairFb.repairTimeliness" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | <wd-cell title="维修及态度"> |
| | | <wd-rate v-model="repairFb.serviceAttitude" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | <wd-cell title="维修现场6S"> |
| | | <wd-rate v-model="repairFb.repairSs" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | |
| | | <wd-textarea |
| | | label="结果反馈" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairFb.fbResult" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请输入结果反馈" |
| | | clearable |
| | | /> |
| | | <wd-textarea |
| | | v-if="repairFb.repairSatisfaction === 0" |
| | | label="意见或建议" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | |
| | | show-word-limit |
| | | placeholder="请输入意见或建议" |
| | | clearable |
| | | required |
| | | |
| | | /> |
| | | </wd-cell-group> |
| | | |
| | | <wd-button style="margin: 20px" block @click="handleRepairFb">提交</wd-button> |
| | | </view> |
| | | </template> |
| | | <script setup lang="ts"> |
| | |
| | | updateRepairFb, |
| | | } from '@/service/repair' |
| | | import { reactive } from 'vue' |
| | | import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' |
| | | import { isLeader, isLineOrRepair } from '@/utils/RoleUtils' |
| | | import { RepairResVO, RepairFbVO, RepairRecordVO } from '@/service/repair.d' |
| | | import { useUserStore } from "@/store"; |
| | | |
| | | const userStore = useUserStore() |
| | | const isUpdate = ref(false) |
| | | const repairRes = reactive<RepairResVO>({ |
| | | id: '', |
| | |
| | | resCode: '', |
| | | fbResult: '', |
| | | suggestions: '', |
| | | repairSatisfaction: 0, |
| | | repairSatisfaction: 1, |
| | | repairTimeliness: 0, |
| | | serviceAttitude: 0, |
| | | repairSs: 0, |
| | |
| | | } |
| | | |
| | | function handleRepairFb() { |
| | | if(isOperatorOrRepair()){ |
| | | if(repairRes.reqUser !== userStore.userInfo.userId){ |
| | | uni.showToast({ |
| | | title: '无权限,请登录管理员账号操作', |
| | | title: '只有请求人才有评价权限', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | | } |
| | | if (repairFb.repairSatisfaction === 0 && !repairFb.suggestions) { |
| | | uni.showToast({ |
| | | title: '请填写意见或建议', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | |
| | | title: '修改成功', |
| | | icon: 'none', |
| | | }) |
| | | uni.navigateBack() |
| | | uni.$emit('res-list-refresh') |
| | | } |
| | | }) |
| | | .catch((res) => {}) |
| | |
| | | title: '评价成功', |
| | | icon: 'none', |
| | | }) |
| | | uni.navigateBack() |
| | | uni.$emit('res-list-refresh') |
| | | } |
| | | }) |
| | | .catch((res) => {}) |