From 2adce788c1a411959b81f08d5569d92861c7f300 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 17 十月 2023 16:54:52 +0800
Subject: [PATCH] 删除无用代码 修改部分逻辑 调整部分样式

---
 pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue     |   41 +++++---
 pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue                |   12 +-
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   14 ++
 pages/customer-page/fleet-management/fleet-management.vue                               |   21 +---
 pages/login/resetPassword/resetPassword.vue                                             |   43 +++++++-
 pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue                     |   21 ++++
 uni_modules/uview-ui/components/u-input/u-input.vue                                     |  111 +++++++++++-----------
 pages/customer-page/customer-my/customer-my.vue                                         |   12 +-
 store/index.js                                                                          |    3 
 9 files changed, 166 insertions(+), 112 deletions(-)

diff --git a/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue b/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
index e80422a..3e7ee8c 100644
--- a/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
+++ b/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
@@ -23,13 +23,13 @@
 		</view>
 		<view class="addBtn"><u-button text="閭�璇�"
 				type="primary"
-				@click="addToHuoDaiOrDriver"></u-button></view>
+				@click="addToHuoDaiOrDriver"
+				:loading="loading"></u-button></view>
 	</view>
 </template>
 
 <script>
 	import { customerId } from '@/utils/status.js';
-	import { mapMutations } from 'vuex';
 	export default {
 		onLoad(params) {
 			this.role = params.role;
@@ -44,11 +44,11 @@
 				name: '',
 				phone: '',
 				carNo: '',
-				customerId
+				customerId,
+				loading: false
 			};
 		},
 		methods: {
-			...mapMutations(['lengthchange']),
 			init() {},
 			addToHuoDaiOrDriver() {
 				switch (this.role) {
@@ -79,8 +79,9 @@
 			},
 			// 閭�璇疯揣浠�
 			bindHuoDai() {
-				// this.$reqPost('bindHuoDai', { customerId: this.customerId, name: this.name, phone: this.phone }, 'params').then(res => {
+				this.loading = true
 				this.$reqPost('bindHuoDai', { name: this.name, phone: this.phone }, 'params').then(res => {
+					this.loading = false
 					if (res.code == 0) {
 						this.$u.toast('娣诲姞鎴愬姛');
 						setTimeout(() => {
@@ -91,28 +92,38 @@
 					} else {
 						this.$u.toast(res.msg ? res.msg : '鏈垚鍔熸坊鍔�');
 					}
-				});
+				}).catch(e => {
+					this.loading = false
+				})
 			},
 			// 閭�璇峰徃鏈�
 			bindUserFleet() {
-				this.$reqPost('bindUserFleet', { fleetId: this.fleetId, name: this.name, phone: this.phone, carNo: this
-						.carNo }, 'params').then(res => {
+				this.loading = true
+				this.$reqPost('bindUserFleet', {
+					fleetId: this.fleetId,
+					name: this.name,
+					phone: this.phone,
+					carNo: this
+						.carNo
+				}, 'params').then(res => {
 					console.log('閭�璇峰徃鏈�', res);
+					this.loading = false
 					if (res.code == 0) {
 						this.$u.toast(res.msg ? res.msg : '鎿嶄綔鎴愬姛');
-						this.$reqGet('GetUserFleet', { fleetId: this.fleetId }).then(response => {
-							this.lengthchange(response.data.length);
-						});
-						uni.navigateBack({
-							delta: 1
-						});
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 1000)
 					} else {
 						uni.showToast({
 							title: res.msg ? res.msg : '鎿嶄綔澶辫触',
 							duration: 2000
 						});
 					}
-				});
+				}).catch(e => {
+					this.loading = false
+				})
 			}
 		}
 	};
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index fb1ec25..93236cf 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -75,12 +75,12 @@
 					type="primary"
 					@click="userManage"
 					v-if="roleType == 1 && userEntity.isHostUser === '0'"></u-button></view>
-			<view class="logout"><u-button text="淇敼瀵嗙爜"
+			<!-- <view class="logout"><u-button text="淇敼瀵嗙爜"
 					type="primary"
 					@click="modifyPwd"></u-button></view>
 			<view class="logout"><u-button text="閲嶇疆瀵嗙爜"
 					type="primary"
-					@click="initPwd"></u-button></view>
+					@click="initPwd"></u-button></view> -->
 			<view class="logout"><u-button text="閫�鍑虹櫥褰�"
 					type="primary"
 					@click="logout()"></u-button></view>
@@ -151,16 +151,16 @@
 				@cancel="logoutCancel"></u-modal>
 		</view>
 		<!-- 閲嶇疆瀵嗙爜寮瑰嚭妗� -->
-		<view class="initPwdModal">
+		<!-- <view class="initPwdModal">
 			<u-modal :show="initPwdShow"
 				title="閲嶇疆瀵嗙爜"
 				showCancelButton
 				content="鍒濆瀵嗙爜灏嗗彉鏇翠负123456,鏄惁纭閲嶇疆"
 				@confirm="initPwdConfirm"
 				@cancel="initPwdCancel"></u-modal>
-		</view>
+		</view> -->
 		<!-- 淇敼瀵嗙爜寮瑰嚭妗� -->
-		<view class="modifyPwdModal">
+		<!-- <view class="modifyPwdModal">
 			<u-modal :show="modifyPwdShow"
 				title="淇敼瀵嗙爜"
 				showCancelButton
@@ -173,7 +173,7 @@
 						type="password"></u-input>
 				</view>
 			</u-modal>
-		</view>
+		</view> -->
 	</view>
 </template>
 
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 48b6a60..93a757f 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -905,7 +905,8 @@
 						margin-left: vww(20);
 						padding-bottom: vww(12);
 						position: relative;
-						@include flex flex-direction: column;
+						@include flex;
+						flex-direction: column;
 						align-items: flex-start;
 
 						.first-line {
@@ -935,6 +936,13 @@
 									color: #ffffff;
 									margin-right: vww(20);
 								}
+
+								.filedname {
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+									flex: 1;
+								}
 							}
 
 							.main-divider {
@@ -961,6 +969,7 @@
 						.first-extra {
 							@include firstLine;
 							height: vww(32);
+							align-items: center;
 
 							.main-information {
 								width: 100%;
@@ -974,6 +983,9 @@
 									height: vww(28);
 									line-height: vww(28);
 									text-align: center;
+									// display: flex;
+									// justify-content: center;
+									// align-items: center;
 									background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
 									background-size: contain;
 									font-size: 30rpx;
@@ -981,6 +993,13 @@
 									color: #ffffff;
 									margin-right: vww(20);
 								}
+
+								.filedname {
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+									flex: 1;
+								}
 							}
 						}
 
diff --git a/pages/customer-page/fleet-management/fleet-management.vue b/pages/customer-page/fleet-management/fleet-management.vue
index 0150781..7269c06 100644
--- a/pages/customer-page/fleet-management/fleet-management.vue
+++ b/pages/customer-page/fleet-management/fleet-management.vue
@@ -6,10 +6,9 @@
 		<view class="groupCars"
 			v-if="groupCarsShow">
 			<u-collapse @change="change"
-				@close="close"
-				@open="open"
 				:border="false"
-				:value="['0']">
+				:value="['0']"
+				ref="collapse">
 				<u-empty mode="data"
 					icon="http://cdn.uviewui.com/uview/empty/data.png"
 					v-if="fleetDriverData.length == 0"
@@ -59,18 +58,7 @@
 </template>
 
 <script>
-	import { mapState } from 'vuex';
 	export default {
-		computed: {
-			...mapState(['fleetDriverDataLength'])
-		},
-		watch: {
-			fleetDriverDataLength(v) {
-				if (this.fleetDriverData.length !== v) {
-					this.GetUserFleet();
-				}
-			}
-		},
 		onLoad(params) {
 			this.deleteDriveObj.fleetId = params.id;
 		},
@@ -110,11 +98,12 @@
 				this.$reqGet('GetUserFleet', { fleetId: this.deleteDriveObj.fleetId }).then(res => {
 					uni.hideLoading();
 					this.fleetDriverData = res.data;
+					this.$nextTick(() => {
+						this.$refs.collapse.init()
+					})
 				});
 			},
 			change() {},
-			close() {},
-			open() {},
 			deleteGroupClick(args) {
 				this.deleteDriveObj.id = args.name;
 				this.fleetDriverData.forEach(item => {
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 72ae6c0..ea56d85 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
@@ -417,8 +417,11 @@
 							this.isSkinWeigh = false;
 							this.outBuy = true;
 							this.temporaryWeighObj.hair = newV;
-							this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(
-								2);
+							let x = new BigNumber(this.temporaryWeighObj.hair)
+							let y = new BigNumber(this.weighList.skin)
+							this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2)
+							// this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(
+							// 	2);
 							this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
 								.temporaryWeighObj
 								.clean < 0;
@@ -439,8 +442,11 @@
 							let yy = new BigNumber(newV)
 							this.errorTipShow = (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) &&
 								this.avgSkin !== 0;
-							this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
-								2);
+							let x = new BigNumber(this.weighList.hair)
+							let y = new BigNumber(this.temporaryWeighObj.skin)
+							this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2)
+							// this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
+							// 	2);
 							this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
 								.temporaryWeighObj
 								.clean < 0;
diff --git a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
index e3cbe92..f9e1544 100644
--- a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
+++ b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
@@ -75,12 +75,12 @@
 
 		<!-- <view class="statistics"><u-button text="鍙戣繍缁熻" type="primary" @click="statistics"></u-button></view> -->
 		<view class="utils-button">
-			<view class="utils"><u-button text="淇敼瀵嗙爜"
+			<!-- <view class="utils"><u-button text="淇敼瀵嗙爜"
 					type="primary"
 					@click="modifyPwd"></u-button></view>
 			<view class="utils"><u-button text="閲嶇疆瀵嗙爜"
 					type="primary"
-					@click="initPwd"></u-button></view>
+					@click="initPwd"></u-button></view> -->
 			<view class="utils"><u-button text="閫�鍑虹櫥褰�"
 					type="primary"
 					@click="logout"></u-button></view>
@@ -107,16 +107,16 @@
 				@cancel="logoutCancel"></u-modal>
 		</view>
 		<!-- 閲嶇疆瀵嗙爜寮瑰嚭妗� -->
-		<view class="initPwdModal">
+		<!-- <view class="initPwdModal">
 			<u-modal :show="initPwdShow"
 				title="閲嶇疆瀵嗙爜"
 				showCancelButton
 				content="鍒濆瀵嗙爜灏嗗彉鏇翠负123456,鏄惁纭閲嶇疆"
 				@confirm="initPwdConfirm"
 				@cancel="initPwdCancel"></u-modal>
-		</view>
+		</view> -->
 		<!-- 淇敼瀵嗙爜寮瑰嚭妗� -->
-		<view class="modifyPwdModal">
+		<!-- <view class="modifyPwdModal">
 			<u-modal :show="modifyPwdShow"
 				title="淇敼瀵嗙爜"
 				showCancelButton
@@ -129,7 +129,7 @@
 						type="password"></u-input>
 				</view>
 			</u-modal>
-		</view>
+		</view> -->
 	</view>
 </template>
 
diff --git a/pages/login/resetPassword/resetPassword.vue b/pages/login/resetPassword/resetPassword.vue
index a9f0586..8cd4b41 100644
--- a/pages/login/resetPassword/resetPassword.vue
+++ b/pages/login/resetPassword/resetPassword.vue
@@ -9,19 +9,31 @@
 				label="瀵嗙爜"
 				required
 				borderBottom>
-				<u--input v-model="modelForm.password"
+				<u-input v-if='inputType==="password"'
+					v-model="modelForm.password"
 					border="surround"
-					placeholder="璇疯緭鍏ュ瘑鐮�"
-					type='password'></u--input>
+					placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)"
+					:type='inputType' />
+				<u-input v-else
+					v-model="modelForm.password"
+					border="surround"
+					placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)"
+					:type='inputType' />
 			</u-form-item>
 			<u-form-item prop="secondPassword"
 				label="浜屾纭"
 				required
 				borderBottom>
-				<u--input v-model="modelForm.secondPassword"
+				<u-input v-if='inputType==="password"'
+					v-model="modelForm.secondPassword"
 					border="surround"
-					placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�"
-					type='password'></u--input>
+					placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)"
+					type='password' />
+				<u-input v-else
+					v-model="modelForm.secondPassword"
+					border="surround"
+					placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)"
+					type='text' />
 			</u-form-item>
 			<u-form-item>
 				<view class="process-button">
@@ -30,6 +42,18 @@
 						:loading="processLoading"
 						@click.stop="process"></u-button>
 				</view>
+			</u-form-item>
+			<u-form-item prop="checkboxValue">
+				<u-checkbox-group v-model="checkboxValue"
+					@change="checkChange">
+					<u-checkbox label="鏄剧ず瀵嗙爜"
+						name="鏄剧ず"
+						iconSize="32"
+						label-size="32"
+						size="40"
+						shape="circle">
+					</u-checkbox>
+				</u-checkbox-group>
 			</u-form-item>
 		</u-form>
 	</view>
@@ -40,6 +64,9 @@
 		data() {
 			return {
 				userInfo: {},
+				checkboxValue: [],
+				inputType: 'password',
+				isFocus: false,
 				modelForm: {
 					password: '',
 					secondPassword: ''
@@ -68,6 +95,10 @@
 			this.$refs.uForm.setRules(this.rules)
 		},
 		methods: {
+			checkChange(name) {
+				this.inputType = name.length === 0 ? 'password' : ''
+				this.isFocus = true
+			},
 			process() {
 				if (this.modelForm.password !== this.modelForm.secondPassword) return uni.$u.toast('瀵嗙爜涓嶄竴鑷�,璇锋鏌�')
 				this.userInfo.password = this.modelForm.secondPassword;
diff --git a/store/index.js b/store/index.js
index 9e1b08f..bd9cb60 100644
--- a/store/index.js
+++ b/store/index.js
@@ -152,9 +152,6 @@
 		globalWarning: false,
 	},
 	mutations: {
-		lengthchange(state, payload) {
-			state.fleetDriverDataLength = payload
-		},
 		setUserInfo(state, identity) {
 			state.userInfo = userObj[identity]
 		},
diff --git a/uni_modules/uview-ui/components/u-input/u-input.vue b/uni_modules/uview-ui/components/u-input/u-input.vue
index c755390..a3e1f9d 100644
--- a/uni_modules/uview-ui/components/u-input/u-input.vue
+++ b/uni_modules/uview-ui/components/u-input/u-input.vue
@@ -285,69 +285,70 @@
 };
 </script>
 
-<style lang="scss" scoped>
-@import "../../libs/css/components.scss";
+<style lang="scss"
+	scoped>
+	@import "../../libs/css/components.scss";
 
-.u-input {
-    @include flex(row);
-    align-items: center;
-    justify-content: space-between;
-    flex: 1;
+	.u-input {
+		@include flex(row);
+		align-items: center;
+		justify-content: space-between;
+		flex: 1;
 
-    &--radius,
-    &--square {
-        border-radius: 4px;
-    }
+		&--radius,
+		&--square {
+			border-radius: 4px;
+		}
 
-    &--no-radius {
-        border-radius: 0;
-    }
+		&--no-radius {
+			border-radius: 0;
+		}
 
-    &--circle {
-        border-radius: 100px;
-    }
+		&--circle {
+			border-radius: 100px;
+		}
 
-    &__content {
-        flex: 1;
-        @include flex(row);
-        align-items: center;
-        justify-content: space-between;
+		&__content {
+			flex: 1;
+			@include flex(row);
+			align-items: center;
+			justify-content: space-between;
 
-        &__field-wrapper {
-            position: relative;
-            @include flex(row);
-            margin: 0;
-            flex: 1;
-			
-			&__field {
-				line-height: 26px;
-				text-align: left;
-				color: $u-main-color;
-				height: 24px;
-				font-size: 15px;
+			&__field-wrapper {
+				position: relative;
+				@include flex(row);
+				margin: 0;
 				flex: 1;
+
+				&__field {
+					line-height: 26px;
+					text-align: left;
+					color: $u-main-color;
+					height: 24px;
+					font-size: 15px;
+					flex: 1;
+				}
 			}
-        }
 
-        &__clear {
-            width: 20px;
-            height: 20px;
-            border-radius: 100px;
-            background-color: #c6c7cb;
-            @include flex(row);
-            align-items: center;
-            justify-content: center;
-            transform: scale(0.82);
-            margin-left: 4px;
-        }
+			&__clear {
+				width: 20px;
+				height: 20px;
+				border-radius: 100px;
+				background-color: #c6c7cb;
+				@include flex(row);
+				align-items: center;
+				justify-content: center;
+				transform: scale(0.82);
+				margin-left: 4px;
+			}
 
-        &__subfix-icon {
-            margin-left: 4px;
-        }
+			&__subfix-icon {
+				margin-left: 4px;
+			}
 
-        &__prefix-icon {
-            margin-right: 4px;
-        }
-    }
-}
-</style>
+			&__prefix-icon {
+				margin-right: 4px;
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.1