From fb5d35199bbaa01eeaea592ea3a341fcdcffc87a Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期五, 22 三月 2024 16:57:46 +0800
Subject: [PATCH] feat:井陉打印单隐藏

---
 pages/loadUnload-page/selectTarget/selectTarget.vue |   67 ++++++++++++++++++++++++++++++---
 1 files changed, 60 insertions(+), 7 deletions(-)

diff --git a/pages/loadUnload-page/selectTarget/selectTarget.vue b/pages/loadUnload-page/selectTarget/selectTarget.vue
index 77b3642..f21f595 100644
--- a/pages/loadUnload-page/selectTarget/selectTarget.vue
+++ b/pages/loadUnload-page/selectTarget/selectTarget.vue
@@ -23,17 +23,33 @@
 				<u-cell-group>
 					<u-cell :title="dataForm.secondClass"
 						value="璇烽�夋嫨"
-						@click="secondClassSelect">
+						@click="secondClassSelect"
+						:disabled="!dataForm.firstClass">
 						<u-icon name="arrow-right"
 							slot="right-icon"
 							size="30"></u-icon></u-cell>
+				</u-cell-group>
+			</u-form-item>
+			<u-form-item label="纾呭崟"
+				prop="orderType"
+				:borderBottom="false">
+				<u-cell-group>
+					<u-cell :title="dataForm.orderType"
+						:value="isOrderType"
+						@click="orderTypeSelect">
+						<view slot="right-icon"
+							@click.stop="cleanOrderType">
+							<u-icon :name="!dataForm.orderType?'arrow-right':'close-circle'"
+								size="30"></u-icon>
+						</view>
+					</u-cell>
 				</u-cell-group>
 			</u-form-item>
 		</u--form>
 		<view class="coal-name"
 			v-show="coalList.length!==0">
 			<u-checkbox-group v-model="checkedCoal"
-				placement="row"
+				placement="column"
 				@change="checkboxChange"
 				size="30">
 				<u-checkbox :customStyle="{marginBottom: '8px',fontSize:'20px'}"
@@ -64,6 +80,13 @@
 			:closeOnClickOverlay='true'
 			@close='secondClassClose'
 			@select="secondClassSelectClick"></u-action-sheet>
+		<!--纾呭崟绫诲瀷 -->
+		<u-action-sheet :actions="orderTypeList"
+			:show="orderTypeShow"
+			cancelText='鍙栨秷'
+			:closeOnClickOverlay='true'
+			@close='orderTypeClose'
+			@select="orderTypeSelectClick"></u-action-sheet>
 	</view>
 </template>
 
@@ -74,6 +97,7 @@
 				dataForm: {
 					firstClass: "",
 					secondClass: "",
+					orderType: ''
 				},
 				index: '',
 				// 鐓ゅ満鎿嶄綔鑿滃崟
@@ -86,7 +110,20 @@
 				checkedCoal: [],
 				userInfo: {},
 				filedId: "",
-				selectedCoal: []
+				selectedCoal: [],
+				orderTypeShow: false,
+				orderTypeList: [{
+						name: '澶栭攢',
+						id: Math.floor(Math.random() * 100) + 1,
+					},
+					{
+						name: '澶栬喘',
+						id: Math.floor(Math.random() * 100) + 1,
+					}
+				],
+				isOrderType: '璇烽�夋嫨', //纾呮埧绫诲瀷鏄惁閫夋嫨浜� 閫夋嫨浜嗘竻绌�
+				cleanIconClick: true, //淇敼鐐瑰嚮娓呯┖纾呮埧閫夋嫨浼氬嚭鐜�
+
 			};
 		},
 		methods: {
@@ -145,19 +182,35 @@
 						checked: false
 					}
 				})
-				console.log(this.coalList);
+			},
+			orderTypeSelect() {
+				this.orderTypeShow = true
+			},
+			orderTypeClose() {
+				this.orderTypeShow = false
+			},
+			orderTypeSelectClick(val) {
+				this.orderTypeShow = false
+				this.dataForm.orderType = val.name
+				this.isOrderType = ''
+			},
+			cleanOrderType() {
+				this.dataForm.orderType = null
+				this.isOrderType = '璇烽�夋嫨'
+				this.orderTypeShow = false
 			},
 			checkboxChange(e) {
 				this.selectedCoal = e
 			},
 			formHandle() {
+				if (!this.dataForm.firstClass || !this.dataForm.secondClass) return this.$u.toast('璇烽�夋嫨鐓ゅ満鎴栬�呯叅浠�')
+				if (this.selectedCoal.length === 0) return this.$u.toast('璇烽�夋嫨鐓ょ')
 				this.$reqPost('updateUser', Object.assign(this.userInfo, {
 					responsibilityCoal: this.selectedCoal.join(),
-					filedId: this
-						.filedId
+					filedId: this.filedId
 				}), 'json').then(res => {
 					uni.navigateTo({
-						url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail`
+						url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?orderType=${this.dataForm.orderType}`
 					})
 				})
 			}

--
Gitblit v1.9.1