From bc20b6ea5783d782750d7d89e84be686e745c2e9 Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期五, 06 九月 2024 08:44:07 +0800
Subject: [PATCH] feture:复磅申请添加复磅是毛重还是皮重

---
 pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue |  303 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 301 insertions(+), 2 deletions(-)

diff --git a/pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue b/pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue
index 5ddc1c7..57e5352 100644
--- a/pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue
+++ b/pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue
@@ -1,8 +1,64 @@
 <template>
-  <view>
+  <view class="zhijian-bangfang-wrap">
     <view class="bangfang-btns">
       <view class="btn" v-for="(item,index) in  bangfangList" :key="index">
         <u-button type="primary" @click="handleBangfangClick(item)">{{item.name}}</u-button>
+      </view>
+    </view>
+    <view class="bangfang-liebiao-main" v-if="liebiaoList && liebiaoList.length > 0">
+      <view class="collection-form-item"
+            v-for="(item, index) in liebiaoList"
+            :key="index">
+        <view class="first-line">
+          <view class="dispatch-receive">
+            <view class="dispatch">{{ item.filedName||'' }}</view>
+          </view>
+          <view class="point-number"
+                v-if="roleType == 1">
+            <text class="residue">{{ item.cars2||'' }}</text>
+            <text>/{{ item.carNum ||''}}</text>
+          </view>
+        </view>
+        <view class="second-line">
+          <view class="coal-name">
+            <view class="">{{ item.coalName ||''}}</view>
+            <view class="black-bar"></view>
+            <view class="coal-type"
+                  v-if="item.orderType">{{ item.orderType||'' }}</view>
+          </view>
+        </view>
+        <view class="second-line">
+          <view class="coal-name">
+            <view class="">{{ item.orderCode ||''}}</view>
+          </view>
+        </view>
+        <view class="second-line">
+
+          <text class="car-num " style="font-size: 28rpx;">渚涘簲鍟嗭細{{ item.customerName }}</text>
+
+        </view>
+        <!-- 娣诲姞鍒涘缓鏃堕棿 -->
+        <view class="second-line">
+
+          <text class="car-num " style="font-size: 28rpx;">鍒涘缓鏃堕棿锛�</text>
+
+          <view style="font-size: 28rpx;">{{ item.createTime }}</view>
+        </view>
+        <view class="second-line justyflyItem">
+          <text class="car-num " style="font-size: 28rpx;">鍙告満锛歿{ item.xsUser1Name }}</text>
+        </view>
+        <view class="second-line justyflyItem">
+          <text class="car-num " style="font-size: 28rpx;">澶嶇锛歿{ item.remarks }}</text>
+        </view>
+        <view class="second-line justyflyEndItem">
+          <view class="agreeBtn">
+            <u-button type="primary" :loading="agreeModalShow" loadingText="纭涓�" @click="agreeWeighClick(item)">鍚屾剰澶嶇</u-button>
+          </view>
+          <view class="agreeBtn">
+            <u-button :loading="disAgreeModalShow" loadingText="纭涓�" @click="disAgreeWeighClick(item)">鎷掔粷澶嶇</u-button>
+          </view>
+        </view>
+
       </view>
     </view>
     <tab-bar :current="1"></tab-bar>
@@ -16,13 +72,67 @@
   name: "zhijian-bangfang",
   data() {
     return {
-      bangfangList:[]
+      bangfangList:[],
+      liebiaoList: [],
+      agreeModalShow: false,
+      disAgreeModalShow: false,
     }
   },
   onShow() {
     this.getPoundRoomByList()
+    this.getReWeighList()
   },
   methods: {
+    agreeWeighClick(item) {  //鍚屾剰澶嶇
+      console.log(item,'item----')
+      let params = {
+        deptId: item.deptId,
+        filedId: item.filedId,
+        tmId: item.id
+      }
+      this.agreeModalShow = true
+      this.$reqPost('agreeWeigh', params, 'json').then(res => {
+        console.log(res, '鍚屾剰');
+        if (res.code == 0) {
+          this.$u.toast(res.msg ? res.msg : '鍚屾剰');
+          this.agreeModalShow = false;
+          this.getReWeighList()  //鍒锋柊鍒楄〃
+        } else {
+          this.$u.toast(res.msg ? res.msg : '澶辫触');
+          this.agreeModalShow = false;
+        }
+      }).finally(() => {
+        this.agreeModalShow = false
+      })
+    },
+    disAgreeWeighClick(item) {
+      let params = {
+        deptId: item.deptId,
+        filedId: item.filedId,
+        tmId: item.id
+      }
+      this.agreeModalShow = true
+      this.$reqPost('disAgreeWeigh', params, 'json').then(res => {
+        console.log(res, '鎷掔粷');
+        if (res.code == 0) {
+          this.$u.toast(res.msg ? res.msg : '鎷掔粷瀹屾垚');
+          this.agreeModalShow = false;
+          this.getReWeighList()  //鍒锋柊鍒楄〃
+        } else {
+          this.$u.toast(res.msg ? res.msg : '澶辫触');
+          this.agreeModalShow = false;
+        }
+      }).finally(() => {
+        this.agreeModalShow = false
+      })
+    },
+    getReWeighList() {
+      this.$reqGet('getReWeighList').then(res => {
+        if(res.code == 0) {
+          this.liebiaoList = res.data
+        }
+      })
+    },
     getPoundRoomByList() {
       this.$reqGet('getPoundRoomsByZJY').then(res => {
         console.log(res,'纾呮埧鍒楄〃====')
@@ -37,6 +147,13 @@
         url: `/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice?houseId=${item.id}&weighHouseCode=${item?.code}`
       })
     }
+  },
+  onPullDownRefresh() {
+    this.getPoundRoomByList()
+    this.getReWeighList()
+    setTimeout(() => {
+      uni.stopPullDownRefresh()
+    }, 1000);
   }
 }
 </script>
@@ -55,6 +172,11 @@
   width: 100%;
   height: 100%;
 }
+.zhijian-bangfang-wrap{
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+}
 .bangfang-btns{
   width: 100%;
   height: 100%;
@@ -68,6 +190,183 @@
     padding-top: 20rpx;
     box-sizing: border-box;
   }
+}
+.collection-form-item {
+  width: 690rpx;
+  background: #ffffff;
+  box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+  border-radius: 20rpx;
+  overflow: hidden;
+  @include flex;
+  flex-direction: column;
+  position: relative;
+  align-items: flex-start;
+  margin: vww(10) auto;
+  padding: 20rpx 0;
+  box-sizing: border-box;
 
+  .first-line {
+    width: 100%;
+    height: vww(30);
+    padding: 20rpx;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+
+    .dispatch-receive {
+      width: 70%;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+    }
+
+    .point-number {
+      width: 15%;
+
+      text {
+        font-size: 24rpx;
+        font-weight: 400;
+        color: #c78a64;
+      }
+
+      .residue {
+        font-size: 40rpx;
+        font-weight: 400;
+        color: #f81414;
+      }
+    }
+  }
+
+  .second-line {
+    width: 100%;
+    height: vww(30);
+    padding: 20rpx;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: flex-start;
+
+    .coal-name {
+      flex-grow: 1;
+      height: 30rpx;
+      font-size: 30rpx;
+      font-weight: 300;
+      color: #515151;
+      position: relative;
+      display: flex;
+      align-items: center;
+
+      .black-bar {
+        width: 2rpx;
+        height: 30rpx;
+        background: #515151;
+        margin-left: vww(12);
+      }
+
+      .coal-type {
+        margin-left: vww(12);
+        min-width: vww(50);
+        height: 30rpx;
+        line-height: 30rpx;
+        font-size: 30rpx;
+        font-weight: 300;
+        color: #515151;
+      }
+    }
+  }
+
+  .third-line {
+    width: 80%;
+    height: vww(30);
+    padding: 20rpx;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+
+    .send-date {
+      margin-left: vww(14);
+      width: 148rpx;
+      height: 24rpx;
+      line-height: 24rpx;
+      font-size: 28rpx;
+      font-weight: 300;
+      color: #515151;
+    }
+
+    .car-num {
+      color: #515151;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+  }
+
+  .fourth-line {
+    @include flex;
+    justify-content: flex-end;
+
+    .receive,
+    .forward {
+
+      @include flex;
+      justify-content: center;
+      color: #ffffff;
+      font-size: 28rpx;
+      position: absolute;
+
+      .button-image {
+        border: 1px solid #3b56eb;
+        border-radius: 40rpx;
+        width: vww(90);
+        height: vww(28);
+        background-size: 100% 100%;
+        font-size: 28rpx;
+        font-weight: 300;
+        color: #ffffff;
+        text-align: center;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-right: 20rpx;
+      }
+    }
+
+    .receive {
+      left: vww(20);
+    }
+
+    .forward {
+      @include flex;
+
+      .button-image {
+        font-size: 28rpx;
+        font-weight: 300;
+        color: #3b56eb;
+        text-align: center;
+      }
+    }
+
+  }
+  .justyflyItem{
+    width: 100%;
+    justify-content: space-between;
+  }
+  .justyflyEndItem{
+    width: 100%;
+    display: flex;
+    justify-content: flex-end;
+    .agreeBtn{
+      margin-right: 20rpx;
+    }
+    ::v-deep{
+      .u-button{
+        border-radius: 50rpx;
+        padding: 0 36rpx!important;
+        height: 68rpx!important;
+      }
+
+    }
+  }
 }
 </style>

--
Gitblit v1.9.1