Procházet zdrojové kódy

修改,询价和核价中心里面的询价完成和核价完成修改为按照当前登录者有没有出价判断

Yannay před 2 týdny
rodič
revize
11269a3433

+ 1 - 1
components/inquiry-verification-list/index.vue

@@ -16,7 +16,7 @@
16 16
                         <text class="desc">{{ type == '1' ? '意向' : item.model }}</text>
17 17
                     </view>
18 18
                     <view class="top_right">
19
-                        <u-tag plain plainFill :text="formtterStatus(item.status)" :type="item.status == '1' ? 'warning' : item.status == '2' ? 'primary' : 'success'"></u-tag>
19
+                        <u-tag plain plainFill :text="formtterStatus(item)" :type="(item.currentUserCompleted || (item.myPrice != null && item.myPrice !== '')) ? 'success' : 'warning'"></u-tag>
20 20
                     </view>
21 21
                 </view>
22 22
                 <view class="imgs">

+ 7 - 5
components/inquiry-verification-list/mixins/inquiryVerificationList.js

@@ -41,12 +41,14 @@ export default {
41 41
             this.queryParams.pageNum++;
42 42
             this.getList();
43 43
         },
44
-        formtterStatus(status) {
45
-            if(this.type == 1){
46
-                return status == '1' ? '待询价' : '询价完成'
44
+        formtterStatus(item) {
45
+            // 按当前用户是否已出价显示:后端返回 currentUserCompleted(有 myPrice 即已出价)
46
+            const completed = item.currentUserCompleted === true || (item.myPrice != null && item.myPrice !== '');
47
+            if (this.type == 1) {
48
+                return completed ? '询价完成' : '待询价';
47 49
             }
48
-            if(this.type == 2){
49
-                return status == '1' ? '待核价' : '核价完成'
50
+            if (this.type == 2) {
51
+                return completed ? '核价完成' : '待核价';
50 52
             }
51 53
         },
52 54
         handleClick(item) {