From 37a0b120e66bcda386b0a8c256ca0fe9f09b29cb Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 29 六月 2023 18:16:26 +0800
Subject: [PATCH] 司机首页添加状态,细节修改
---
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 77 ++++++++++++++++++++------------------
1 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index b2ec273..ba94a84 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -141,6 +141,10 @@
<view class="suffix">{{ weighList.coalName || '' }}</view>
</view>
<view class="main-information">
+ <view class="prefix">璁㈠崟绫诲瀷:</view>
+ <view class="suffix">{{ weighList.orderType || '' }}</view>
+ </view>
+ <view class="main-information">
<view class="prefix">鐨噸:</view>
<view class="suffix">{{ showWeigh.skin||"" }}
</view>
@@ -172,7 +176,7 @@
<!-- 澶栭攢璁㈠崟绉扮毊鏃讹紝杩斿洖鍔犲噺鍚ㄦ寜閽疆鐏般�傜О姣涙椂鍙敤.澶栬喘璁㈠崟锛屼笉鍑虹幇杩斿洖鍔犲噺鍚ㄧ殑鎸夐挳 -->
<u-button type="primary"
text="纭畾绉伴噸"
- :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin"
+ :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh "
:loading="isConfirmWeighLoading"
loadingText="纭"
@click="confirmWeigh"></u-button>
@@ -181,11 +185,11 @@
:disabled="addAndSubtractCoalDisabled"
@click="addAndSubtractCoal"
class="jiajian"
- v-if="outsourcing"></u-button>
+ v-if="outBuy"></u-button>
<u-button type="primary"
text="缁х画鍗歌揣"
@click="UnloadingAgainHandle"
- v-if='outBuy'></u-button>
+ v-if='canUnload'></u-button>
</view>
<!-- <view class="four" v-if="weighList.orderType !== '澶栬喘'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view> -->
<!-- 鏀剧┖寮圭獥 -->
@@ -276,8 +280,8 @@
isfocus2: false,
// 澶栬喘绫诲瀷
outBuy: true,
- // 澶栭攢绫诲瀷
- outsourcing: true
+ // 缁х画鍗歌揣鎸夐挳
+ canUnload: false
};
},
watch: {
@@ -286,7 +290,6 @@
'杞嚭') {
if (this.weighList.skin == 0) {
this.temporaryWeighObj.skin = newV;
- this.isweigh = this.temporaryWeighObj.skin > this.weighList.orderSurplus;
} else {
this.temporaryWeighObj.hair = newV;
this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
@@ -297,7 +300,6 @@
.orderType == '杞叆') {
if (this.weighList.hair == 0) {
this.temporaryWeighObj.hair = newV;
- this.isweigh = this.temporaryWeighObj.hair > this.weighList.orderSurplus;
} else {
this.temporaryWeighObj.skin = newV;
this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(2);
@@ -369,21 +371,9 @@
this.weighData.filedId = res.data.filedId;
this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
- if (this.weighList.orderType == '澶栬喘') {
- this.outBuy = true
- this.outsourcing = false;
- // this.firstHairCustomernameShow = true;
- // if (this.weighList.hair > 0) {
- // this.haveInputOrigin = true;
- // this.isInputOrigin = true;
- // }
- // if (this.weighList.hair == 0) {
- // this.outBuy = false;
- // }
- } else if (this.weighList.orderType == '澶栭攢') {
- this.outsourcing = true;
- this.outBuy = false
- }
+ this.outBuy = (this.weighList.orderType.indexOf('閿�') !== -1) && this.showWeigh.skin > 0;
+ // 缁х画鍗歌揣鍙湁澶栬喘绫诲瀷绗簩娆′細鏈�
+ this.canUnload = this.weighList.orderType === '澶栬喘' && this.showWeigh.hair > 0;
}
});
},
@@ -445,7 +435,8 @@
gateCameraId: this.weighData.gateCameraId,
equipmentCode: this.weighData.equipmentCode,
tmCode: this.weighData.tmCode,
- sceneInOut: this.weighData.sceneInOut
+ sceneInOut: this.weighData.sceneInOut,
+ weigh: this.realTimeWeigh
}, 'json').then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
@@ -473,11 +464,16 @@
gateCameraId: this.weighData.gateCameraId,
equipmentCode: this.weighData.equipmentCode,
tmCode: this.weighData.tmCode,
- sceneInOut: this.weighData.sceneInOut
+ sceneInOut: this.weighData.sceneInOut,
+ weigh: this.realTimeWeigh
}, 'json').then(res => {
if (res.code == 0) {
- this.$u.toast('鎿嶄綔鎴愬姛');
-
+ this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ }, 1000);
} else {
this.$u.toast('鎿嶄綔澶辫触锛岃绋嶅�欓噸璇�');
}
@@ -696,7 +692,7 @@
width: calc(100% - 60rpx);
box-sizing: border-box;
height: 630rpx;
- margin: 0 vww(15) vww(45) vww(15);
+ margin: 0 vww(15) vww(25) vww(15);
background: #ffffff;
box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
border-radius: 20rpx;
@@ -738,20 +734,27 @@
}
.three {
- margin: 0 auto vww(20);
- flex: 0.7;
- display: flex;
+ margin: 0 auto vww(5);
+ width: 96%;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
+ justify-content: center;
+ gap: vww(10);
color: #939393;
.u-button {
- &:nth-of-type(2) {
- margin-left: vww(10);
- }
-
- &:nth-of-type(3) {
- margin-left: vww(10);
- }
+ width: vww(90);
}
+
+ // .u-button {
+ // &:nth-of-type(2) {
+ // margin-left: vww(10);
+ // }
+
+ // &:nth-of-type(3) {
+ // margin-left: vww(10);
+ // }
+ // }
}
.four {
--
Gitblit v1.9.1