From 60b3a617617ae46ba72bc04cee50c67ddf30a76c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 24 十月 2023 18:16:30 +0800
Subject: [PATCH] 111

---
 minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue |  165 +++++++++++++++++++++++++------------------------------
 1 files changed, 75 insertions(+), 90 deletions(-)

diff --git a/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue b/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue
index ea8d89a..9646e39 100644
--- a/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue
+++ b/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue
@@ -21,11 +21,11 @@
 						<div class="tl_list_item_go">
 							<span
 								:style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '璇烽�夋嫨'}}</span>
-							<van-icon name="arrow" color="#999999" />
+							<u-icon name="arrow-right" color="#999999" size="20"></u-icon>
 						</div>
 					</div>
 					<div class="tl_list_item" v-if="item.type === ''">
-						<div class="tl_list_item_label">灞炴�у��</div>
+						<div class="tl_list_item_label">灞炴�у��1</div>
 						<div class="tl_list_item_go">
 							<input type="text" v-model="item.num" placeholder="璇疯緭鍏�" />
 						</div>
@@ -33,15 +33,11 @@
 					<div class="tl_list_item" v-else-if="item.type === 0">
 						<div class="tl_list_item_label">灞炴�у��</div>
 						<div class="tl_list_item_go">
-							<u-radio-group v-model="item.num" placement="row">
-								<u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :label="item1">
+							<u-radio-group v-model="item.num" placement="row" @change="radioSelect">
+								<u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :name="item1"
+									:label="item1">
 								</u-radio>
 							</u-radio-group>
-							<!-- <van-radio-group v-model="item.num" direction="horizontal">
-								<van-radio :name="item1" checked-color="#4275FC" v-for="(item1, i) in item.data" :key="i">
-									{{item1}}
-								</van-radio>
-							</van-radio-group> -->
 						</div>
 					</div>
 					<div class="tl_list_item" v-else-if="item.type === 1">
@@ -53,80 +49,30 @@
 							</u-checkbox-group>
 						</div>
 					</div>
-					<div class="tl_list_item" v-else-if="item.type === 2 || item.type === 3">
+					<div class="tl_list_item" v-else-if="item.type === 2">
 						<div class="tl_list_item_label">灞炴�у��</div>
 						<div class="tl_list_item_go">
 							<input type="text" v-model="item.num" :placeholder="item.tips" />
+						</div>
+					</div>
+					<div class="tl_list_item" v-else-if="item.type === 3">
+						<div class="tl_list_item_label">灞炴�у��</div>
+						<div class="tl_list_item_go">
+							<input v-model="item.num" type="digit" :placeholder="item.tips" />
+							<!-- <u--input v-model="item.num" :placeholder="item.tips" type="digit"
+								border="surround"></u--input> -->
 						</div>
 					</div>
 					<div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4">
 						<div class="tl_list_item_label">灞炴�у��</div>
 						<div class="tl_list_item_go">
 							<span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span>
-							<u-icon name="arrow" color="#999999" />
+							<u-icon name="arrow-right" color="#999999" size="20"></u-icon>
 						</div>
 					</div>
 				</div>
 			</u-swipe-action-item>
 		</u-swipe-action>
-		<!-- <van-swipe-cell v-for="(item, index) in formList" :key="index">
-			<div class="tl_list">
-				<div class="tl_list_item" @click="open(index)">
-					<div class="tl_list_item_label">鐢熶骇灞炴��</div>
-					<div class="tl_list_item_go">
-						<span
-							:style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '璇烽�夋嫨'}}</span>
-						<van-icon name="arrow" color="#999999" />
-					</div>
-				</div>
-				<div class="tl_list_item" v-if="item.type === ''">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<input type="text" v-model="item.num" placeholder="璇疯緭鍏�" />
-					</div>
-				</div>
-				<div class="tl_list_item" v-else-if="item.type === 0">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<u-radio-group v-model="item.num" placement="row">
-							<u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :label="item1">
-							</u-radio>
-						</u-radio-group>
-					</div>
-				</div>
-				<div class="tl_list_item" v-else-if="item.type === 1">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<u-checkbox-group v-model="item.num" placement="row">
-							<u-checkbox v-for="(item1, i) in item.data" :key="i" :label="item1" :name="item1">
-							</u-checkbox>
-						</u-checkbox-group>
-					</div>
-				</div>
-				<div class="tl_list_item" v-else-if="item.type === 2">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<input type="text" v-model="item.num" :placeholder="item.tips" />
-					</div>
-				</div>
-				<div class="tl_list_item" v-else-if="item.type === 3">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<input type="text" v-model="item.num" :placeholder="item.tips" />
-					</div>
-				</div>
-				<div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4">
-					<div class="tl_list_item_label">灞炴�у��</div>
-					<div class="tl_list_item_go">
-						<span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span>
-						<u-icon name="arrow" color="#999999" />
-					</div>
-				</div>
-			</div>
-			<template #right>
-				<van-button square style="height: 100%;" type="danger" text="鍒犻櫎" @click="dele(index)" />
-			</template>
-		</van-swipe-cell> -->
 
 		<div class="tl_zw"></div>
 		<div class="tl_footer">
@@ -134,6 +80,8 @@
 		</div>
 		<u-picker :show="show" :columns="[gzqjData]" title="閫夋嫨鐢熶骇灞炴��" @confirm="gzqjConfirm" @cancel="show=false">
 		</u-picker>
+		<u-datetime-picker :show="timer" v-model="value1" @cancel="timer=false" @confirm="onConfirm" mode="datetime">
+		</u-datetime-picker>
 	</view>
 </template>
 
@@ -154,9 +102,14 @@
 		data() {
 			return {
 				options1: [{
-					text: '鍒犻櫎'
+					text: '鍒犻櫎',
+					style: {
+						backgroundColor: '#f00',
+					}
 				}],
+				value1: Number(new Date()),
 				show: false,
+				timer: false,
 				index: '',
 				workOrderId: '',
 				info: {},
@@ -218,6 +171,11 @@
 				this.index = index
 				this.show = true
 			},
+			// 鎵撳紑鏃ユ湡鎻掍欢
+			openTimer(index) {
+				this.index = index
+				this.timer = true
+			},
 			gzqjConfirm({
 				value
 			}) {
@@ -266,30 +224,43 @@
 				}
 				this.formList.splice(index, 1)
 			},
+			onConfirm(value) {
+				console.log(value);
+				this.formList.forEach((item, index) => {
+					if (this.index === index) {
+						item.num = setTimeO(new Date(value.value), '-')
+					}
+				})
+				this.timer = false;
+			},
+			radioSelect(v) {
+				console.log(v);
+			},
 			submit() {
-				let isOpen = true
-				let attrList = []
-				
+				let isOpen = true
+				let attrList = []
+
 				this.formList.forEach(item => {
-					if (item.type === 1) {
+					console.log('-------', item);
+					if (item.type === 1) {
 						if (item.attribute === '' || item.num.length === 0) {
-							isOpen = false
+							isOpen = false
 							return
-						} else {
-							attrList.push({
-								val: item.num.join(' '),
-								attrId: item.attribute
-							})
+						} else {
+							attrList.push({
+								val: item.num.join(' '),
+								attrId: item.attribute
+							})
 						}
-					} else {
+					} else {
 						if (item.attribute === '' || item.num === '') {
-							isOpen = false
+							isOpen = false
 							return
-						} else {
-							attrList.push({
-								val: item.num,
-								attrId: item.attribute
-							})
+						} else {
+							attrList.push({
+								val: item.num,
+								attrId: item.attribute
+							})
 						}
 					}
 				})
@@ -297,12 +268,13 @@
 					uni.$u.toast('璇峰皢淇℃伅濉啓瀹屾暣')
 					return
 				}
-				
+
 				createDJ({
 					attrList: attrList,
 					id: this.workOrderId
 				}).then(res => {
-					if (res.code === 200) {
+					if (res.code === 200) {
+						uni.$emit('spotAdd')
 						uni.$u.toast('鍒涘缓鎴愬姛')
 						setTimeout(() => {
 							uni.navigateBack()
@@ -369,7 +341,7 @@
 			flex-direction: column;
 			background: white;
 			padding: 0 30rpx;
-			margin-bottom: 20rpx;
+			// margin-bottom: 20rpx;
 
 			.tl_list_item {
 				min-height: 98rpx;
@@ -385,12 +357,15 @@
 				.tl_list_item_label {
 					font-size: 30rpx;
 					font-weight: 400;
+					flex-shrink: 1;
 					color: #222222;
 				}
 
 				.tl_list_item_go {
 					display: flex;
 					align-items: center;
+					flex: 1;
+					justify-content: flex-end;
 
 					input {
 						text-align: right;
@@ -443,4 +418,14 @@
 			}
 		}
 	}
+
+	/deep/ .u-checkbox-group {
+		flex-wrap: wrap;
+		max-width: 100%;
+	}
+
+	/deep/ .u-radio-group {
+		flex-wrap: wrap;
+		max-width: 100%;
+	}
 </style>

--
Gitblit v1.9.3