|
@@ -19,8 +19,46 @@
|
|
|
{{ detaile.remark }}
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="service-info order-card" v-if="detaile.orderStatus === 1">
|
|
|
+ <view class="font-title ">反馈信息</view>
|
|
|
+ <view class="info-list">
|
|
|
+ <up-textarea v-model="detaile.volunteerReview" placeholder="请输入内容" ></up-textarea>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
- <view class="service-info order-card">
|
|
|
+ <view v-if="detaile.orderStatus !== 1">
|
|
|
+ <view class="user-info order-card">
|
|
|
+ <view class="font-title">志愿者反馈信息</view>
|
|
|
+ <view class="user-box">
|
|
|
+ <view class="info-list">
|
|
|
+ <view class="info-item">{{ detaile.volunteerReview }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="upload-box">
|
|
|
+ <view class="upload-img-item" v-for="(item) in volunteerPicture" :key="item.url">
|
|
|
+ <img class="upload-img" :src="item.url" :alt="item.fileName" srcset="">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="user-info order-card">
|
|
|
+ <view class="font-title">用户评价信息</view>
|
|
|
+ <view class="user-box">
|
|
|
+ <view class="info-list">
|
|
|
+ <view class="info-item">{{ detaile.userReview || '用户未完成评价'}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="upload-box">
|
|
|
+ <view class="upload-img-item" v-for="(item) in userPicture" :key="item.url">
|
|
|
+ <img class="upload-img" :src="item.url" :alt="item.fileName" srcset="">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <view class="service-info order-card" v-if="detaile.orderStatus === 1">
|
|
|
<view class="font-title">图片上传</view>
|
|
|
<view class="upload-box">
|
|
|
<view class="upload-img-item" v-for="(item, index) in fileList" :key="item.url">
|
|
@@ -33,6 +71,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<view class=" footer-g" v-if="detaile.orderStatus === 1">
|
|
|
<up-button type="primary" text="确定结束" @click="onSubmit"></up-button>
|
|
|
</view>
|
|
@@ -40,7 +80,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, toRaw } from 'vue';
|
|
|
+import { ref, toRaw, computed } from 'vue';
|
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
import { getVolunteerOrderInfo, getVolunteerFinishSecondOrder } from '@/api/volunteer.js'
|
|
|
import { getAddress } from '@/api/address.js'
|
|
@@ -49,7 +89,10 @@ import { useDict } from '@/utils/dict.js';
|
|
|
import DictTag from '@/components/DictTag/index.vue'
|
|
|
const fileList = ref([]);
|
|
|
const orderId = ref('');
|
|
|
-const detaile = ref({});
|
|
|
+const detaile = ref({
|
|
|
+ volunteerReview:''
|
|
|
+});
|
|
|
+
|
|
|
const {
|
|
|
lrr_service_category
|
|
|
} = useDict('lrr_service_category');
|
|
@@ -69,6 +112,26 @@ const onPhone = (phone) => {
|
|
|
wxMakePhoneCall(phone)
|
|
|
}
|
|
|
|
|
|
+//志愿者图片反馈
|
|
|
+const volunteerPicture = computed(() => {
|
|
|
+ if (detaile.value.volunteerPicture) {
|
|
|
+ return detaile.value.volunteerPicture.split(',').map(item => {
|
|
|
+ return { url: item }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+})
|
|
|
+
|
|
|
+//用户图片评价
|
|
|
+const userPicture = computed(() => {
|
|
|
+ if (detaile.value.userPicture) {
|
|
|
+ return detaile.value.userPicture.split(',').map(item => {
|
|
|
+ return { url: item }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+})
|
|
|
+
|
|
|
const getOrderDetail = async () => {
|
|
|
try {
|
|
|
uni.showLoading({
|
|
@@ -85,11 +148,11 @@ const getOrderDetail = async () => {
|
|
|
telephone: ad_res.data.telephone
|
|
|
}
|
|
|
}
|
|
|
- if (data.serviceLog) {
|
|
|
- fileList.value = data.serviceLog.split(',').map(item => {
|
|
|
- return { url: item }
|
|
|
- });
|
|
|
- }
|
|
|
+ // if (data.volunteerPicture) {
|
|
|
+ // fileList.value = data.volunteerPicture.split(',').map(item => {
|
|
|
+ // return { url: item }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
detaile.value = data;
|
|
|
console.log('detaile.value', detaile.value);
|
|
|
|
|
@@ -110,8 +173,9 @@ const onSubmit = () => {
|
|
|
|
|
|
getVolunteerFinishSecondOrder({
|
|
|
secondOrderId: orderId.value,
|
|
|
- serviceLog: img_urls,
|
|
|
- volunteerId: detaile.value.volunteerId
|
|
|
+ volunteerPicture: img_urls,
|
|
|
+ volunteerId: detaile.value.volunteerId,
|
|
|
+ volunteerReview: detaile.value.volunteerReview
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
uni.showToast({
|
|
@@ -126,7 +190,7 @@ const onSubmit = () => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: res.data,
|
|
|
icon: 'error',
|
|
@@ -155,7 +219,7 @@ onLoad((options) => {
|
|
|
bottom: 0;
|
|
|
padding: 12px 12px 24px;
|
|
|
background: rgba(245, 245, 245, 1);
|
|
|
-
|
|
|
+ overflow-y: auto;
|
|
|
|
|
|
.order-card {
|
|
|
border-radius: 8px;
|
|
@@ -246,5 +310,9 @@ onLoad((options) => {
|
|
|
.phone {
|
|
|
color: #3c9cff;
|
|
|
}
|
|
|
+
|
|
|
+ .info-item {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|