From 825abb00f52fe7d68b3479f328928bf74a47171e Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期四, 18 七月 2024 10:56:11 +0800
Subject: [PATCH] 细节问题

---
 pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice.vue |   53 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice.vue
index 84225ba..f0eb7ea 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice.vue
@@ -129,7 +129,7 @@
                   :loading="repeatWeighLoading"
                   loadingText="纭"
                   :disabled="isFuBangSHow"
-                  @click="confirmRepeatWeigh"></u-button>
+                  @click="showModal = true"></u-button>
       </view>
       <view class="chengzhong-btn" v-if="weighData.tmId && outBuy && roleType == 4">
         <u-button type="primary"
@@ -139,13 +139,13 @@
                   class="jiajian"
         ></u-button>
       </view>
-      <view class="chengzhong-btn" v-if='weighData.tmId && canUnload && !isJixuxiehuo && roleType == 4'>
+      <view class="chengzhong-btn" v-if='weighData.tmId && canUnload && isJixuxiehuo && roleType == 4'>
         <u-button type="primary"
                   text="缁х画鍗歌揣"
                   @click="UnloadingAgainHandle"
-                  :loading="UnloadingAgainLoading"
+
                   loadingText="纭"
-                  :disabled="isweigh||realTimeWeigh == 0"
+                  :disabled="isweigh||realTimeWeigh == 0 || statusWeigh == 3"
         ></u-button>
       </view>
       <!-- 鏀剧┖ -->
@@ -157,7 +157,16 @@
                   throttleTime="500"
                   :disabled="!isEvacuation"></u-button>
       </view>
-
+      <!--浜屾纭-->
+      <u-modal :show="showModal"
+               :asyncClose="true"
+               @cancel="showModal = false"
+               :content="modalContent"
+               :showCancelButton="true"
+               :cancelButtonText="'鍙栨秷'"
+               :showConfirmButton="true"
+               :confirmButtonText="'纭'"
+               @confirm="confirmRepeatWeigh" />
     </view>
     <!-- 鏀剧┖寮圭獥 -->
     <view class="evacuationModal">
@@ -252,7 +261,9 @@
       applyHouseId:'',  //纾呮埧鍙�
       noCarNo:0,  //鏄惁鏈夎溅鐗屽彿(鏈夎溅鐗�0锛屾棤杞︾墝1)
       status:null,  //鐘舵��
-      orderCode:''
+      orderCode:'',
+      showModal: false,
+      modalContent: '纭瑕佸纾呭悧锛�'
     };
   },
   watch: {
@@ -341,7 +352,7 @@
     ...mapState(['globalinfraredStatus', 'globalWarning', 'globalisconnect', 'globalisUploadimg',
       'globalisLogin', 'socketTask','is_open_socket',
     ]),
-    ...mapGetters(['globalweigh','yuanFaList']),
+    ...mapGetters(['globalweigh']),
     token() {
       return uni.getStorageSync('token');
     },
@@ -437,10 +448,8 @@
       }
     },
     isJixuxiehuo() {   //鏄惁鏄剧ず缁х画鍗歌揣鎸夐挳
-      console.log(this.yuanFaList,'this.yuanFaList=====璐ㄦ鍛�---鏄惁鏄剧ず缁х画鍗歌揣11111')
-      if(this.weighList?.tmTaskCoalItems && this.weighList?.tmTaskCoalItems.length > 0 && this.yuanFaList && this.yuanFaList.length > 0) {
-        console.log(this.yuanFaList,'this.yuanFaList=====璐ㄦ鍛�---鏄惁鏄剧ず缁х画鍗歌揣2222222')
-        return this.weighList?.tmTaskCoalItems.length == this.yuanFaList.length
+      if(this.weighList?.tmTaskCoalItems && this.weighList?.tmTaskCoalItems.length > 0) {
+        return this.weighList?.tmTaskCoalItems.length > 0
       }else {
         return false
       }
@@ -450,6 +459,7 @@
       if(this.noCarNo == 1) {  //鏃犺溅鐗岀殑鏃跺�欏纾呴兘鑳界偣鍑�
         //鏉′欢锛� 涓嶆槸绉伴噸瀹屾垚+涓嶆槸鏈О閲�+鏈夎溅鐗�+鍙告満  銆愭湭绉伴噸0锛岀О閲嶄腑1锛岄獙璐ㄤ腑2锛岀О閲嶅畬鎴�3,楠岃川瀹屾垚4銆�  noCarNo 鏄惁鏈夎溅鐗屽彿(鏈夎溅鐗�0锛屾棤杞︾墝1)
         if(this.statusWeigh == 0 || this.statusWeigh == 3 || this.globalweigh == 0) {
+        // if( this.statusWeigh == 3 || this.globalweigh == 0) {
           return true
         }else {
           return false
@@ -513,7 +523,6 @@
           // 缁х画鍗歌揣鍙湁澶栬喘绫诲瀷绗簩娆′細鏈�
           this.canUnload = this.weighList.orderType === '澶栬喘' && this.showWeigh.hair > 0;
           this.getShebeiData()  //鑾峰彇璁惧淇℃伅
-          this.getYuanfaList()
         }else {
           Object.keys(this.weighList).forEach(key => {
             this.weighList[key] = '';
@@ -521,14 +530,6 @@
           this.$u.toast(res.msg ? res.msg : '鍗犳棤纾呭崟淇℃伅');
         }
       });
-    },
-    getYuanfaList() {  //鍘熷彂淇℃伅list
-      this.$reqGet('getMaterialDetailByOrderCode', { orderCode: this.orderCode }).then(res => {
-        if(res.code == 0) {
-          this.$store.commit('GET_YUANFALIST',res.data)
-        }
-
-      })
     },
     getShebeiData() {  //鑾峰彇璁惧淇℃伅
       let params = {
@@ -577,7 +578,7 @@
     saveWeigh() {  //鐐瑰嚮纭绉伴噸鎸夐挳
       // this.weighData.coalContactClean = this.coalContactClean;
       console.log(this.weighData,'澶嶇鍙傛暟----')
-      this.$reqPost('saveWeighYZY', this.weighData, 'json')
+      this.$reqPost('saveWeigh', this.weighData, 'json')
           .then(res => {
             console.log(res, '绉伴噸鎺ュ彛');
             if (res.code == 0) {
@@ -600,14 +601,20 @@
         this.isConfirmWeighLoading = false;
       });
     },
-    confirmRepeatWeigh() {  //澶嶇
+    confirmAction() {  //澶嶇
+      this.showModal = true
+    },
+    confirmRepeatWeigh() {  //澶嶇浜屾纭
       this.repeatWeighLoading = true
+      setTimeout(() => {
+        // 3绉掑悗鑷姩鍏抽棴
+        this.showModal = false;
+      }, 2000)
       console.log(this.weighData.weigh,'this.weighData.weigh======')
       if(this.weighData.weigh && this.weighData.weigh != 0) {
         this.$reqPost('reWeighYZY', this.weighData, 'json').then(res => {
           if (res.code == 0) {
             this.repeatWeighLoading = false;
-            this.init()
             setTimeout(() => {
               uni.navigateBack({
                 delta: 1

--
Gitblit v1.9.1