sunyize 2 лет назад
Родитель
Сommit
fe2f12f28f

+ 6 - 4
src/views/lotCheck/TaskUploadData.vue

@@ -1322,7 +1322,7 @@
       </div>
     </a-card>
    <!--    文件存储车图标-->
-    <div @click='showPhone(true)'
+    <div @click='showPhone(true,true)'
            ref="floatButton"
            class="float-info floating-button"
            :style="{'width': 70 + 'px', 'height': 70 + 'px', 'left':   94+'%' , 'top': 84 + '%'}"
@@ -1872,7 +1872,7 @@ export default {
     handleChange({fileList}) {
       this.fileList = fileList;
     },
-    showPhone(isShow) {
+    showPhone(isShow,msg) {
 
       var data = {
         customerNo: this.infoModel.customerNo,
@@ -1892,7 +1892,9 @@ export default {
             }
           } else {
             this.fileShoppingNumber = 0 ;
-            this.$message.warning("此类无历史上传");
+            if (msg){
+              this.$message.warning("此类无历史上传");
+            }
           }
         }else {
           this.fileShoppingNumber = 0 ;
@@ -2058,7 +2060,7 @@ export default {
       if (this.steps.stepsNow[current].status !== "finish") {
         this.steps.stepsNow[current].status = "process"
       }
-      this.showPhone();
+      this.showPhone(false,false);
     },
 
     getInfoDataById(id) {

+ 20 - 8
src/views/smscheck/modules/TaskUploadData.vue

@@ -2313,12 +2313,14 @@
         </swiper>
       </div>
     </a-card>
-    <div @click='showPhone'
+    <div @click='showPhone(true,true)'
        ref="floatButton"
       class="float-info floating-button"
       :style="{'width': 80 + 'px', 'height': 80 + 'px', 'left':   90+'%' , 'top': 80 + '%'}"
     >
-        <a-icon type="folder-add" :style="{ fontSize: '30px', color: '#08c' }"/>
+      <a-badge :count=fileShoppingNumber>
+        <img style="width: 89%;height: 81%;position: relative;top: 10%" :src="fileShopping" border="1">
+      </a-badge>
     </div>
 
   </a-spin>
@@ -2331,6 +2333,7 @@ import {getAction, httpAction, postAction} from "@api/manage";
 import noDataPng from '@/assets/nodata.png'
 import Vue from "vue";
 import {ACCESS_TOKEN, TENANT_ID} from "@/store/mutation-types";
+import fileShopping from '@assets/file_shopping.png'
 
 
 let Base64 = require('js-base64').Base64
@@ -2351,6 +2354,9 @@ export default {
   },
   data() {
     return {
+      // 购物车图标数
+      fileShoppingNumber:0,
+      fileShopping: fileShopping,
       idCurrent :'',
       previewVisible: false,
       previewImage: '',
@@ -2890,7 +2896,7 @@ export default {
     handleChange({ fileList }) {
       this.fileList = fileList;
     },
-    showPhone(){
+    showPhone(isShow,msg){
       var data = {
         customerNo:  this.infoModel.customerNo,
         stepsId: this.steps.stepsNow[this.steps.current].id,
@@ -2901,14 +2907,20 @@ export default {
         if (res.success) {
           this.phoneList=JSON.parse(res.result);
           if (this.phoneList!==null && this.phoneList.length!==0){
-            if (this.isPhoneshow===false){
+            this.fileShoppingNumber = this.phoneList.length
+            if (this.isPhoneshow === false && isShow) {
               this.isPhoneshow = true;
             }else {
               this.isPhoneshow = false;
             }
           }else {
-            this.$message.warning("此类无历史上传");
+            this.fileShoppingNumber = 0 ;
+            if (msg){
+              this.$message.warning("此类无历史上传");
+            }
           }
+        }else {
+          this.fileShoppingNumber = 0 ;
         }
       })
     },
@@ -3319,7 +3331,7 @@ export default {
       if (this.steps.stepsNow[current].status!== "finish") {
         this.steps.stepsNow[current].status = "process"
       }
-
+      this.showPhone(false,false);
     },
     /**返回上一级*/
     back() {
@@ -3346,7 +3358,7 @@ export default {
             that.infoModel.networkAccessTime =result.networkAccessTime;
             that.infoModel.staffName =result.staffName;
             that.notes =result.notes;
-
+            this.showPhone();
           }
         })
       }
@@ -3575,7 +3587,7 @@ export default {
   justify-content: center;
   align-items: center;
   z-index: 999;
-  background: #b3d4fc;
+  background: #1890FF;
   border-radius: 50%;
   cursor: pointer;
 }

+ 26 - 14
src/views/truckCheck/TaskUploadData.vue

@@ -2405,13 +2405,14 @@
         </swiper>
       </div>
     </a-card>
-    <div @click='showPhone'
+    <div @click='showPhone(true,true)'
          ref="floatButton"
          class="float-info floating-button"
          :style="{'width': 80 + 'px', 'height': 80 + 'px', 'left':   90+'%' , 'top': 80 + '%'}"
     >
-      <a-icon type="folder-add" :style="{ fontSize: '30px', color: '#08c' }"/>
-    </div>
+      <a-badge :count=fileShoppingNumber>
+        <img style="width: 89%;height: 81%;position: relative;top: 10%" :src="fileShopping" border="1">
+      </a-badge>    </div>
   </div>
 
 </template>
@@ -2422,6 +2423,7 @@ import { getAction, httpAction, postAction } from '@api/manage'
 /*无数据图片*/
 import noDataPng from '@/assets/nodata.png'
 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+import fileShopping from '@assets/file_shopping.png'
 
 let Base64 = require('js-base64').Base64
 function getBase64(file) {
@@ -2439,6 +2441,9 @@ export default {
   components: {noDataPng},
   data() {
     return {
+      // 购物车图标数
+      fileShoppingNumber:0,
+      fileShopping: fileShopping,
       idCurrent :'',
       isPhoneshow:false,
       phoneList:'',
@@ -3312,25 +3317,31 @@ export default {
     handleChange({ fileList }) {
       this.fileList = fileList;
     },
-    showPhone(){
+    showPhone(isShow,msg) {
       var data = {
         customerNo:  this.infoModel.customerNo,
         stepsId: this.steps.stepsNow[this.steps.current].id,
         type:'4'
       }
       getAction('/smsCheck/customerInfo/phone/customerPhone', data).then((res) => {
-        if (res.success) {
-          this.phoneList=JSON.parse(res.result);
-          if (this.phoneList!==null && this.phoneList.length!==0){
-            if (this.isPhoneshow===false){
-              this.isPhoneshow = true;
+          if (res.success) {
+            this.phoneList=JSON.parse(res.result);
+            if (this.phoneList!==null && this.phoneList.length!==0){
+              this.fileShoppingNumber = this.phoneList.length
+              if (this.isPhoneshow === false && isShow) {
+                this.isPhoneshow = true;
+              }else {
+                this.isPhoneshow = false;
+              }
             }else {
-              this.isPhoneshow = false;
+              this.fileShoppingNumber = 0 ;
+              if (msg){
+                this.$message.warning("此类无历史上传");
+              }
             }
           }else {
-            this.$message.warning("此类无历史上传");
+            this.fileShoppingNumber = 0 ;
           }
-        }
       })
     },
     isPhone(rule, value, callback) {
@@ -3417,6 +3428,7 @@ export default {
             that.infoModel.accountCode =result.accountCode;
             that.infoModel.staffName =result.staffName;
             that.notes =result.notes;
+            this.showPhone();
           }
         })
       }
@@ -3447,7 +3459,7 @@ export default {
       if (this.steps.stepsNow[current].status!== "finish") {
         this.steps.stepsNow[current].status = "process"
       }
-
+      this.showPhone(false,false);
     },
     back(name){
       if (name==='contractDate'){
@@ -4045,7 +4057,7 @@ h3 {
   justify-content: center;
   align-items: center;
   z-index: 999;
-  background: #b3d4fc;
+  background: #1890FF;
   border-radius: 50%;
   cursor: pointer;
 }