From 3a57b78e4de42dbb934d3ecf12006c47f1ff52de Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期一, 30 十二月 2024 10:36:18 +0800
Subject: [PATCH] feat:临时司机填原发限制&分配吨数输入框修改类型

---
 pages/driver-page/delivery-my/delivery-my/delivery-my.vue |  177 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 104 insertions(+), 73 deletions(-)

diff --git a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
index da776db..8aa752c 100644
--- a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
+++ b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
@@ -31,7 +31,20 @@
 						placeholder="璇疯緭鍏ュ唴瀹�"
 						clearable></u--input>
 				</u-form-item>
+				<u-form-item  label="鏄惁鏈夎溅鐗�"
+				labelWidth="28%"
+				borderBottom
+				>
+				<u-radio-group 
+					v-model="isCarNo"
+					@change="radioChange"
+					placement="row">
+					<u-radio   labelSize="26" iconSize="40" label="鏄�" name="鏄�" style="margin-right: 30rpx;"></u-radio>
+					<u-radio   labelSize="26" iconSize="40"  label="鍚�" name="鍚�"></u-radio>
+				</u-radio-group>
+				</u-form-item>
 				<u-form-item prop="carNo"
+				  v-if="isCarNo == '鏄�'"
 					label="杞︾墝鍙�"
 					labelWidth="20%"
 					borderBottom
@@ -43,7 +56,7 @@
 					label="鐨噸"
 					labelWidth="20%"
 					borderBottom
-					required v-if="daydata.isWeighing==1">
+					required v-if="(daydata.isWeighing==1&&daydata.productId=='1818237609508347905')||(daydata.isWeighing==1&&daydata.productId=='1818237832536268801')||(daydata.isWeighing==1&&daydata.productId=='1818211942485995521')">
 					<u--input v-model="skin"
 					border="surround"
 						placeholder="璇疯緭鍏ョ毊閲�"
@@ -53,7 +66,7 @@
 					label="姣涢噸"
 					labelWidth="20%"
 					borderBottom
-					required v-if="daydata.isWeighing==1">
+					required v-if="(daydata.isWeighing==1&&daydata.productId=='1818237609508347905')||(daydata.isWeighing==1&&daydata.productId=='1818237832536268801')||(daydata.isWeighing==1&&daydata.productId=='1818211942485995521')">
 					<u--input v-model="hair"
 					border="surround"
 						placeholder="璇疯緭鍏ユ瘺閲�"
@@ -63,7 +76,7 @@
 					label="鍑�閲�"
 					labelWidth="20%"
 					borderBottom
-					required v-if="daydata.isWeighing==1">
+					required v-if="(daydata.isWeighing==1&&daydata.productId=='1818237609508347905')||(daydata.isWeighing==1&&daydata.productId=='1818237832536268801')||(daydata.isWeighing==1&&daydata.productId=='1818211942485995521')">
 					<u--input v-model="clean"
 					border="surround"
 					disabled
@@ -91,7 +104,7 @@
 						</view></uni-td>
 					</uni-tr>
 					</uni-table>
-					<u-form-item prop='contactPicture'>
+					<!-- <u-form-item prop='contactPicture'>
 						<view class="label-text">
 							鍘熷彂鍗曟嵁
 						</view>
@@ -105,7 +118,7 @@
 							height="150"
 							:previewFullImage="true"
 							></u-upload>
-					</u-form-item>
+					</u-form-item> -->
 				<!-- <u-form-item labelWidth="20%"
 					label="绌鸿溅鍑哄巶"
 					borderBottom
@@ -224,7 +237,7 @@
 			if (params.id) {
 			  this.id = params.id
 			}
-			this.fileList1 = []
+			// this.fileList1 = []
 			this.GetMyDelivery()
 			uni.getStorage({
 			    key: 'myDelivery',
@@ -250,12 +263,13 @@
 				scrollTop: 0,
 				id:"",
 				value: 0,
+				isCarNo:'鏄�',
 				daydata:{},
 				tmTaskCoalList:[],
 				range: [{"value": 0,"label": "鍚�"	},{"value": 1,"label": "鏄�"}],
 				carNumShow: false,
 				yuYueData: [],
-				fileList1: [], //鍥剧墖鍒楄〃
+				// fileList1: [], //鍥剧墖鍒楄〃
 				contactPicture:"",
 				registerFormModel: {
 					phone: '',
@@ -325,23 +339,23 @@
 							trigger: ['blur', 'change']
 						}
 					],
-					// carNo: [{
-					// 		type: 'string',
-					// 		required: true,
-					// 		message: '璇疯緭鍏ヨ溅鐗屽彿',
-					// 		trigger: ['blur', 'change']
-					// 	},
-					// 	{
-					// 		transform(value) {
-					// 			return String(value);
-					// 		},
-					// 		validator: (rule, value, callback) => {
-					// 			return uni.$u.test.carNo(value);
-					// 		},
-					// 		message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
-					// 		trigger: ['change', 'blur']
-					// 	}
-					// ],
+					carNo: [{
+							type: 'string',
+							required: true,
+							message: '璇疯緭鍏ヨ溅鐗屽彿',
+							trigger: ['blur', 'change']
+						},
+						{
+							transform(value) {
+								return String(value);
+							},
+							validator: (rule, value, callback) => {
+								return uni.$u.test.carNo(value);
+							},
+							message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
+							trigger: ['change', 'blur']
+						}
+					],
 				},
 			};
 		},
@@ -390,52 +404,52 @@
 					this.isInputOrigin = true;
 				}
 			},
-			deletePic(event) {
-				this.changeisUploadimg(true);
-				this[`fileList${event.name}`].splice(event.index, 1);
-			},
-			async afterRead(event) {
-				// 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
-				let lists = [].concat(event.file);
-				let fileListLen = this[`fileList${event.name}`].length;
-				lists.map(item => {
-					this[`fileList${event.name}`].push({
-						...item,
-						status: 'uploading',
-						message: '涓婁紶涓�'
-					});
-				});
-				for (let i = 0; i < lists.length; i++) {
-					const result = await this.uploadFilePromise(lists[i].url, event.name);
-					let item = this[`fileList${event.name}`][fileListLen];
-					this[`fileList${event.name}`].splice(
-						fileListLen,
-						1,
-						Object.assign(item, {
-							status: 'success',
-							message: '涓婁紶鎴愬姛',
-							url: result
-						})
-					);
-					fileListLen++;
-				}
-			},
-			uploadFilePromise(url, num) {
-				return new Promise((resolve, reject) => {
-					let a = uni.uploadFile({
-						url: BaseUrl + '/admin/sys-file/uploadUnToken',
-						filePath: url,
-						name: 'file',
-						success: res => {
-							if (num == 1) {
-								this.contactPicture = JSON.parse(res.data)
-									.data.url;
-								resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
-							}
-						}
-					});
-				});
-			},
+			// deletePic(event) {
+			// 	this.changeisUploadimg(true);
+			// 	this[`fileList${event.name}`].splice(event.index, 1);
+			// },
+			// async afterRead(event) {
+			// 	// 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
+			// 	let lists = [].concat(event.file);
+			// 	let fileListLen = this[`fileList${event.name}`].length;
+			// 	lists.map(item => {
+			// 		this[`fileList${event.name}`].push({
+			// 			...item,
+			// 			status: 'uploading',
+			// 			message: '涓婁紶涓�'
+			// 		});
+			// 	});
+			// 	for (let i = 0; i < lists.length; i++) {
+			// 		const result = await this.uploadFilePromise(lists[i].url, event.name);
+			// 		let item = this[`fileList${event.name}`][fileListLen];
+			// 		this[`fileList${event.name}`].splice(
+			// 			fileListLen,
+			// 			1,
+			// 			Object.assign(item, {
+			// 				status: 'success',
+			// 				message: '涓婁紶鎴愬姛',
+			// 				url: result
+			// 			})
+			// 		);
+			// 		fileListLen++;
+			// 	}
+			// },
+			// uploadFilePromise(url, num) {
+			// 	return new Promise((resolve, reject) => {
+			// 		let a = uni.uploadFile({
+			// 			url: BaseUrl + '/admin/sys-file/uploadUnToken',
+			// 			filePath: url,
+			// 			name: 'file',
+			// 			success: res => {
+			// 				if (num == 1) {
+			// 					this.contactPicture = JSON.parse(res.data)
+			// 						.data.url;
+			// 					resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+			// 				}
+			// 			}
+			// 		});
+			// 	});
+			// },
 			lohOutLogin(){
 				this.$refs.regesterFormRef.validate().then(res => {
 					if(this.daydata.orderType=='澶栬喘'){
@@ -453,7 +467,7 @@
 								...this.registerFormModel,
 								tmTaskCoalContact:{
 									coalName:this.daydata.productName,
-									contactPicture:this.contactPicture,
+									// contactPicture:this.contactPicture,
 									skin:this.skin,
 									hair:this.hair,
 									clean:this.clean
@@ -492,7 +506,7 @@
 								yyId:this.ids.id,
 								...this.registerFormModel,
 								tmTaskCoalContact:{								
-									contactPicture:this.contactPicture,
+									// contactPicture:this.contactPicture,
 									numDtoList:numDtoList
 								}
 							}, 'json').then(res => {
@@ -549,7 +563,12 @@
 				})
 			},
 			logoutConfirm() {
-				
+				    //鍘熷彂鍑�閲嶉檺鍒�
+				if(this.clean && this.clean > 200){
+					this.$u.toast('褰撳墠鍑�閲嶈秴杩囨甯稿�硷紝璇锋鏌ョ毊姣涢噸')
+					return
+							
+				}
 					if(this.registerFormModel.carNo==""){
 						this.lohOutLogin()
 					}else{
@@ -583,6 +602,7 @@
 						this.logoutShow = true;
 						this.ids=item
 					}else{
+						this.ids=item
 						this.logoutConfirm();
 					}
 				})
@@ -620,6 +640,17 @@
 						this.tmTaskCoalList=res.data.jhOrderPlanList
 					}
 				});
+			},
+			//
+			radioChange(name){
+				console.log(name,'name');
+				if(name === '鏄�'){
+					this.registerFormModel.carNo = '';
+				}else{
+					this.registerFormModel.carNo = '';
+
+				}
+
 			}
 		}
 	};

--
Gitblit v1.9.1