Commit 789ce9cb32e81047ec5b6f0c24416d0b6042f941

Authored by liujun001
1 parent fbfccc7b

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

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