Commit 789ce9cb32e81047ec5b6f0c24416d0b6042f941

Authored by liujun001
1 parent fbfccc7b

用户和企业负责人只评价一次

garbage-removal/src/pages/order-info/order-driver/detail/index.vue
... ... @@ -184,7 +184,9 @@
184 184 <u-button @click="handleEvaluate(orderId, userType)"
185 185 v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#a9e08f"
186 186 text="去评价"></u-button>
187   -
  187 + <u-button @click="handleEvaluateDetail(orderId, userType)"
  188 + v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人' && dataGram.haveEvaluateOfClient==1" shape="square" color="#a9e08f"
  189 + text="查看评价" ></u-button>
188 190 <u-button @click="handleEvaluateDetail(orderId, userType)"
189 191 v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人' && dataGram.haveEvaluateOfClient==1" shape="square" color="#a9e08f"
190 192 text="查看评价"></u-button>
... ...
garbage-removal/src/pages/order-info/order-other/detail/index.vue
... ... @@ -220,6 +220,9 @@
220 220 v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#19a97c"
221 221 text="去评价"></u-button>
222 222 <u-button @click="handleEvaluateDetail(orderId, userType)"
  223 + v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人' && dataGram.haveEvaluateOfClient==1" shape="square" color="#19a97c"
  224 + text="查看评价"></u-button>
  225 + <u-button @click="handleEvaluateDetail(orderId, userType)"
223 226 v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人' && dataGram.haveEvaluateOfClient==1" shape="square" color="#19a97c"
224 227 text="查看评价"></u-button>
225 228 <u-button @click="handleEvaluateDetail(orderId, userType)"
... ...
garbage-removal/src/pages/order-info/order-other/evaluate-info/index.vue
... ... @@ -16,7 +16,7 @@
16 16 </view>
17 17  
18 18 </view>
19   - <view class="evaluate-user-box">
  19 + <view class="evaluate-user-box" v-if="size==1 && userType=='运输企业负责人'">
20 20 <view class="user-info-title">
21 21 <u-avatar :src="pic" size="70"></u-avatar>
22 22 <view class="user-name">{{userType}} </view>
... ... @@ -30,8 +30,8 @@
30 30 <u-textarea @blur="blur" :value="content" :placeholder="评价回复" style="height: 180rpx;margin-top: 15px;"></u-textarea>
31 31  
32 32 <view class="issue-btn-box" style="margin-top: 5px;margin-bottom: 10px;">
33   - <button class="submit-btn" type="primary" @click="doSubmit(orderId, -1, 0)" v-if="userType ==='用户'">提交回复</button>
34   - <button class="submit-btn" type="primary" @click="doSubmit(orderId, -1, 1)" v-else>提交回复</button>
  33 + <u-button class="submit-btn" type="primary" @click="doSubmit(orderId, -1, 0)" v-if="userType ==='用户'">提交回复</u-button>
  34 + <u-button class="submit-btn" type="primary" @click="doSubmit(orderId, -1, 1)" v-else>提交回复</u-button>
35 35 </view>
36 36 </view>
37 37  
... ... @@ -53,6 +53,7 @@ const content = ref(&quot;&quot;)
53 53 const orderId = ref()
54 54 const evaluteData=ref([])
55 55 const userType=ref()
  56 +const size=ref(0)
56 57  
57 58 onLoad((options) => {
58 59 orderId.value = options.orderId;
... ... @@ -63,6 +64,10 @@ onLoad((options) =&gt; {
63 64 // 查询评价
64 65 queryEvaluateDetail(options.orderId).then(res => {
65 66 evaluteData.value=res.data.data;
  67 + if(res.data.data){
  68 + size.value = res.data.data.length;
  69 + }
  70 +
66 71 console.log(evaluteData.value);
67 72 })
68 73 })
... ...