From 153d2d110c7b43c4f8407ff3d851c7a4434b5c21 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 18 十二月 2025 17:25:37 +0800
Subject: [PATCH] #

---
 pages/sockroom/sockroom.vue |  549 +++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 356 insertions(+), 193 deletions(-)

diff --git a/pages/sockroom/sockroom.vue b/pages/sockroom/sockroom.vue
index f5199ee..9f2117f 100644
--- a/pages/sockroom/sockroom.vue
+++ b/pages/sockroom/sockroom.vue
@@ -1,18 +1,20 @@
 <template>
 	<view class="sockpage">
 		<view class="column">
-			<!-- 鎵樼洏缂栫爜鏍忥紙瀵瑰簲鍚庣barcode锛� -->
 			<view class="form-card">
 				<view class="form-row">
 					<view class="label">
 						<text class="required">*</text>鎵樼洏缂栫爜锛�
 					</view>
-					<view class="picker-wrap" @click="scan" hover-class="picker-hover">
+					<view class="picker-wrap" hover-class="picker-hover">
 						<view class="input-box">
-							<text class="input-placeholder" v-if="!barcode">鐐瑰嚮鎵爜褰曞叆</text>
-							<text class="input-value" v-else>{{barcode}}</text>
+							<input 
+							id="pdacode"
+							type="text"
+							v-model="barcode"
+							placeholder="璇锋壂鐮�"
+							/>
 						</view>
-						<view class="scan-icon">馃摲</view>
 					</view>
 				</view>
 			</view>
@@ -34,6 +36,25 @@
 				</view>
 			</view>
 			
+				<view class="form-card">
+					<view class="form-row">
+						<view class="label">
+							<text class="required">*</text>鐗╂枡鐮侊細
+						</view>
+						<view class="picker-wrap" hover-class="picker-hover">
+							<view class="textareainput">
+								<textarea
+								style="max-height: 15px;overflow: hidden;"
+								id="pdacode"
+								type="text"
+								v-model="thingCode"
+								placeholder="璇锋壂鐮�"
+								@input="handleBarcodeInput"
+								/>
+							</view>
+						</view>
+					</view>
+				</view>
 			<!-- 鐗╂枡淇℃伅杈撳叆鏍忥紙瀵瑰簲鍚庣MatList锛� -->
 			<view class="form-card material-card">
 				<view class="card-title">鐗╂枡淇℃伅</view>
@@ -44,8 +65,9 @@
 							class="material-input" 
 							type="text" 
 							v-model="matList.model"
-							placeholder="璇疯緭鍏ュ嵎鍙�"
+							placeholder="璇锋壂鐮佹垨杈撳叆鍗峰彿"
 							placeholder-class="input-placeholder"
+							ref="modelInput"
 						/>
 					</view>
 					<view class="material-item">
@@ -54,8 +76,9 @@
 							class="material-input" 
 							type="text" 
 							v-model="matList.batch"
-							placeholder="璇疯緭鍏ョ鍙�"
+							placeholder="璇锋壂鐮佹垨杈撳叆绠卞彿"
 							placeholder-class="input-placeholder"
+							ref="batchInput"
 						/>
 					</view>
 					<view class="material-item">
@@ -74,7 +97,7 @@
 							class="material-input" 
 							type="number" 
 							v-model="matList.rollExtent"
-							placeholder="璇疯緭鍏ラ暱搴�(m)"
+							placeholder="璇疯緭鍏ラ暱搴�"
 							placeholder-class="input-placeholder"
 						/>
 					</view>
@@ -84,7 +107,7 @@
 							class="material-input" 
 							type="number" 
 							v-model="matList.weight"
-							placeholder="璇疯緭鍏ュ噣閲�(kg)"
+							placeholder="璇疯緭鍏ュ噣閲�"
 							placeholder-class="input-placeholder"
 						/>
 					</view>
@@ -94,7 +117,7 @@
 							class="material-input" 
 							type="number" 
 							v-model="matList.roughWeight"
-							placeholder="璇疯緭鍏ユ瘺閲�(kg)"
+							placeholder="璇疯緭鍏ユ瘺閲�"
 							placeholder-class="input-placeholder"
 						/>
 					</view>
@@ -110,233 +133,370 @@
 					</view>
 				</view>
 			</view>
-			
 			<!-- 鎿嶄綔鎸夐挳缁� -->
 			<view class="btn-group">
-				<button class="operate-btn scan-btn" @click="scantwo">鎵揣鐗╃爜</button>
 				<button class="operate-btn submit-btn" @click="submit">鎴愬搧鍏ュ簱</button>
 			</view>
 		</view>
 	</view>
 </template>
-
 <script>
-import { onLoad } from '../../uni_modules/uview-ui/libs/mixin/mixin'
-
 export default {
-	onLoad(){
-		// 鍏堣鍙栫紦瀛橈紝鍐嶆墽琛岃姹�
-		this.baseUrl = uni.getStorageSync('baseUrl');
-		this.token = uni.getStorageSync('token');
-		// 椤甸潰鍔犺浇鏃� mode 涓虹┖锛岃皟鐢ㄦ帴鍙e悗鎵嶅~鍏呮暟鎹�
+	onLoad(options){
+		this.checkLoginStatus();
 		this.POSTinfo(); 
 	},
+
+	onShow() {
+		this.checkLoginStatus();
+	},
+
+	onHide() {
+		if (this.scanTimeout) {
+			clearTimeout(this.scanTimeout);
+			this.scanTimeout = null;
+		}
+	},
+
 	data() {
 		return {
+			thingCode:'',
+			focusState: false,
 			baseUrl: '',
-			barcodeNum:'',
-			barcode: '', // 鎵樼洏鐮�
-			palletizingNo: '1', // 鐮佸灈浣嶇紪鍙�
-			boxType: '', // 鏈ㄧ绫诲瀷
+			token: '',
+			barcode: '',
+			palletizingNo: '1',
+			boxType: '',
 			matList: {
-				matnr: '', // 瑙勬牸
-				maktx: '', // 鐗╂枡鍚嶇О
-				batch: '', // 鏈ㄧ缂栧彿
-				model: '', // 鍗风紪鍙�
-				position: '1', // 鏈ㄧ鐮佸灈浣嶇疆
-				weight: '', // 鍑�閲�
-				roughWeight: '', // 姣涢噸
-				anfme: 1.0, // 榛樿鍊�1.0
-				rollExtent: '', // 鍗烽暱搴�
-				joint: 0, // 鎺ュご
-				cutting: 2, // 榛樿鈥滃惁鈥�
-				qualified: 0, // 榛樿鈥滃惁鈥�
-				modelFront: '', // 鍒嗗垏鍓嶇缂栧彿
-				batchFront: '' ,// 鍒嗗垏鍓嶅嵎鍙�
+				matnr: '',
+				maktx: '',
+				batch: '',
+				model: '',
+				position: '1',
+				weight: '',
+				roughWeight: '',
+				anfme: 1.0,
+				rollExtent: '',
+				joint: 0,
+				cutting: 2,
+				qualified: 0,
+				modelFront: '',
+				batchFront: ''
 			},
-			// 鍏抽敭1锛氬垵濮嬪寲 mode 涓虹┖鏁扮粍 鈫� 椤甸潰鍔犺浇鏃剁鍨嬫棤鏁版嵁
 			mode: [], 
 			index_mode: 0,
-			index_num: 0,
-			submitData: {} // 鏈�缁堟彁浜ょ粰鍚庣鐨勬暟鎹�
+			submitData: {},
+			scanBuffer: '',
+			scanTimeout: null,
+			lastScanTime: 0,
+			isProcessingScan: false
 		}
 	},
 	methods: {
+		// 妫�鏌ョ櫥褰曠姸鎬�
+		checkLoginStatus() {
+			this.token = uni.getStorageSync('token');
+			this.baseUrl = uni.getStorageSync('baseUrl');
+			
+			if (!this.token || !this.baseUrl) {
+				uni.showModal({
+					title: '鎻愮ず',
+					content: '璇峰厛鐧诲綍',
+					showCancel: false,
+					success: (res) => {
+						if (res.confirm) {
+							uni.navigateTo({
+								url: '/pages/login/login'
+							});
+						}
+					}
+				});
+				return false;
+			}
+			return true;
+		},
+		
+		// 鑾峰彇绠卞瀷鏁版嵁
 		POSTinfo(){
+			if (!this.checkLoginStatus()) return;
+			
+			uni.showLoading({
+				title: '鍔犺浇涓�...'
+			});
+			
 			uni.request({
 				url: this.baseUrl + '/mobile/box/type/complete/auth/v2',
-				method:'POST',
+				method: 'POST',
 				header: {
-					'Content-Type': 'application/json'
+					'Content-Type': 'application/json',
+					'Authorization': 'Bearer ' + this.token
 				},
-				success:(res)=>{
-					// 鎺ュ彛杩斿洖鍚庢墠濉厖绠卞瀷鏁版嵁
-					this.mode = res.data.data.map(item => item.boxSpecs || '').filter(item => item);
-					console.log('鎻愬彇鐨勭鍨嬫暟鎹�:', this.mode);
+				success: (res) => {
+					uni.hideLoading();
+					console.log('绠卞瀷鎺ュ彛杩斿洖:', res.data);
+					
+					if (res.data && res.data.code === 200) {
+						if (Array.isArray(res.data.data)) {
+							// 灏濊瘯澶氱鍙兘鐨勫瓧娈靛悕
+							this.mode = res.data.data
+								.map(item => item.boxSpecs || item.boxType || item.typeName || item.name || '')
+								.filter(item => item && item.trim() !== '');
+							
+							console.log('鎻愬彇鐨勭鍨嬪垪琛�:', this.mode);
+							
+							if (this.mode.length === 0) {
+								uni.showToast({
+									title: '鏃犲彲鐢ㄧ鍨�',
+									icon: 'none'
+								});
+							}
+						} else {
+							console.warn('杩斿洖鏁版嵁鏍煎紡涓嶇锛屼笉鏄暟缁�:', res.data.data);
+							uni.showToast({
+								title: '鏁版嵁鏍煎紡閿欒',
+								icon: 'none'
+							});
+						}
+					} else {
+						uni.showToast({
+							title: res.data?.message || '鑾峰彇绠卞瀷澶辫触',
+							icon: 'none'
+						});
+					}
 				},
-				fail:(err)=>{
-					console.error('鑾峰彇绠卞瀷澶辫触:', err)
+				fail: (err) => {
+					uni.hideLoading();
+					console.error('鑾峰彇绠卞瀷澶辫触:', err);
+					uni.showToast({
+						title: '缃戠粶閿欒',
+						icon: 'none'
+					});
 				}
-			})
+			});
 		},
 		modePickerChange(e) {
 			this.index_mode = e.detail.value;
-			this.boxType = this.mode[this.index_mode]; // 鍚屾鍒癰oxType
+			this.boxType = this.mode[this.index_mode];
+			console.log('閫夋嫨鐨勭鍨�:', this.boxType);
 		},
-		numPickerChange(e) {
-			this.index_num = e.detail.value
-		},
-		// 鍏抽敭2锛氫慨鏀归噸缃柟娉� 鈫� 娓呯┖ mode 鍙婄浉鍏崇姸鎬�
+		
+		handleBarcodeInput(e) {
+				// 鍦╱ni-app涓紝textarea鐨刬nput浜嬩欢鍙兘鏄痚.detail.value
+				const value = e.detail ? e.detail.value : e.target.value;
+				this.thingCode = value;
+				this.parseBarcodeContent(value);
+			},
+			
+			parseBarcodeContent(content) {
+				if (!content) return;
+				
+				// 鎸夎鍒嗗壊鍐呭
+				const lines = content.split('\n').filter(line => line.trim() !== '');
+				
+				console.log('瑙f瀽鐨勮鏁版嵁:', lines);
+				
+				// 鏍规嵁浣犳彁渚涚殑鏍蜂緥鏍煎紡瑙f瀽
+				// 鏍煎紡涓�:
+				// 2511080305A22B6  (鍗峰彿)
+				// Y251113764        (绠卞彿)
+				// 5渭m脳1050mm       (瑙勬牸)
+				// 8700 m           (闀垮害)
+				// 418.0 kg         (鍑�閲�)
+				// 441.0 kg         (姣涢噸)
+				// 0 涓�             (鎺ュご)
+				
+				if (lines.length >= 7) {
+					// 鍗峰彿 (绗竴琛�)
+					this.matList.model = lines[0].trim();
+					
+					// 绠卞彿 (绗簩琛�)
+					this.matList.batch = lines[1].trim();
+					
+					// 瑙勬牸 (绗笁琛�)
+					this.matList.matnr = lines[2].trim();
+					
+					// 闀垮害 (绗洓琛�) - 鎻愬彇鏁板瓧閮ㄥ垎
+					const lengthMatch = lines[3].match(/([\d.]+)/);
+					if (lengthMatch) {
+						this.matList.rollExtent = lengthMatch[1];
+					}
+					
+					// 鍑�閲� (绗簲琛�) - 鎻愬彇鏁板瓧閮ㄥ垎
+					const weightMatch = lines[4].match(/([\d.]+)/);
+					if (weightMatch) {
+						this.matList.weight = weightMatch[1];
+					}
+					
+					// 姣涢噸 (绗叚琛�) - 鎻愬彇鏁板瓧閮ㄥ垎
+					const roughWeightMatch = lines[5].match(/([\d.]+)/);
+					if (roughWeightMatch) {
+						this.matList.roughWeight = roughWeightMatch[1];
+					}
+					
+					// 鎺ュご (绗竷琛�) - 鎻愬彇鏁板瓧閮ㄥ垎
+					const jointMatch = lines[6].match(/([\d.]+)/);
+					if (jointMatch) {
+						this.matList.joint = jointMatch[1];
+					}
+					
+					console.log('瑙f瀽鍚庣殑鏁版嵁:', this.matList);
+				} else if (lines.length > 0) {
+					// 濡傛灉琛屾暟涓嶅锛屼篃鍙互灏濊瘯鏅鸿兘鍖归厤
+					this.autoMatchFields(lines);
+				}
+			},
+			
+			// 鏅鸿兘鍖归厤鏂规硶锛岀敤浜庡鐞嗗彲鑳界殑涓嶈鍒欐暟鎹�
+			autoMatchFields(lines) {
+				lines.forEach((line, index) => {
+					line = line.trim();
+					
+					// 鏍规嵁鍐呭鐗瑰緛鍖归厤
+					if (index === 0 && !this.matList.model) {
+						// 鍋囪绗竴琛屾�绘槸鍗峰彿
+						this.matList.model = line;
+					} else if (index === 1 && !this.matList.batch) {
+						// 鍋囪绗簩琛屾�绘槸绠卞彿
+						this.matList.batch = line;
+					} else if (line.includes('渭m') || line.includes('mm') || line.includes('脳')) {
+						// 鍖呭惈瑙勬牸鐗瑰緛鐨�
+						this.matList.matnr = line;
+					} else if (line.includes('m') && line.match(/[\d.]+ m/)) {
+						// 闀垮害鐗瑰緛
+						const match = line.match(/([\d.]+)/);
+						if (match) this.matList.rollExtent = match[1];
+					} else if (line.includes('kg') && line.match(/[\d.]+ kg/)) {
+						// 閲嶉噺鐗瑰緛锛岄渶瑕佸尯鍒嗗噣閲嶅拰姣涢噸
+						const match = line.match(/([\d.]+)/);
+						if (match) {
+							const weightValue = match[1];
+							if (!this.matList.weight) {
+								this.matList.weight = weightValue;
+							} else if (!this.matList.roughWeight) {
+								this.matList.roughWeight = weightValue;
+							}
+						}
+					} else if (line.includes('涓�') && line.match(/[\d.]+ 涓�/)) {
+						// 鎺ュご鐗瑰緛
+						const match = line.match(/([\d.]+)/);
+						if (match) this.matList.joint = match[1];
+					}
+				});
+			},
+		// 閲嶇疆琛ㄥ崟
 		resetForm() {
-			this.barcodeNum = '';
-			this.barcode = ''; 
-			this.boxType = ''; 
-			this.index_mode = 0; 
-			this.index_num = 0; 
-			this.submitData = {}; 
-			// 娓呯┖ mode 鏁扮粍 鈫� 绠卞瀷閫夋嫨鍣ㄦ仮澶嶆棤鏁版嵁鐘舵��
-			this.mode = [];
-			// 閲嶇疆鐗╂枡淇℃伅锛堜繚鐣欓粯璁ゅ�硷級
+			this.barcode = '';
+			this.boxType = '';
+			this.index_mode = 0;
 			this.matList = {
 				matnr: '',
 				maktx: '',
 				batch: '',
 				model: '',
-				position: '1', 
+				position: '1',
 				weight: '',
 				roughWeight: '',
-				anfme: 1.0, 
+				anfme: 1.0,
 				rollExtent: '',
-				joint: 0, 
-				cutting: 2, 
-				qualified: 0, 
+				joint: 0,
+				cutting: 2,
+				qualified: 0,
 				modelFront: '',
 				batchFront: ''
 			};
-			// 鍙�夛細閲嶇疆鍚庨噸鏂拌姹傜鍨嬫暟鎹紙鏍规嵁闇�姹傞�夋嫨锛�
-			// this.POSTinfo();
+			this.scanBuffer = '';
+			this.focusState = false;
 		},
-		submit(){
-		    // 鏍¢獙蹇呭~椤�
-		    if(!this.barcode) return uni.showToast({title: '璇锋壂鎻忔墭鐩樼紪鐮�', icon: 'none'})
-		    if(!this.boxType) return uni.showToast({title: '璇烽�夋嫨绠卞瀷', icon: 'none'})
-		    if(!this.matList.model || !this.matList.batch) return uni.showToast({title: '璇峰~鍐欏嵎鍙�/绠卞彿', icon: 'none'})
-		    
-		    // 鏁版嵁绫诲瀷杞崲
-		    const matItem = {
-		        ...this.matList,
-		        weight: this.matList.weight ? Number(this.matList.weight) : null,
-		        roughWeight: this.matList.roughWeight ? Number(this.matList.roughWeight) : null,
-		        rollExtent: this.matList.rollExtent ? Number(this.matList.rollExtent) : null,
-		        joint: this.matList.joint ? Number(this.matList.joint) : 0,
-		        anfme: 1.0,
-		        cutting: 2,
-		        qualified: 0
-		    }
-		    
-		    // 缁勮鎻愪氦鏁版嵁
-		    this.submitData = {
-		        barcode: this.barcode,
-		        palletizingNo: this.palletizingNo,
-		        boxType: this.boxType,
-		        matList: [matItem]
-		    }
-		    console.log('淇绫诲瀷鍚庣殑鎻愪氦鏁版嵁锛�', this.submitData)
-		    
-		    // 鎻愪氦璇锋眰
-		    uni.request({
-		        url: this.baseUrl + '/mobile/truss/comd/auth/v2',
-		        method: 'POST',
-		        header: {'Content-Type': 'application/json'},
-		        data: this.submitData,
-		        success: (res) => {
-		            console.log('鍚庣杩斿洖锛�', res)
-		            uni.showToast({title:'鎻愪氦鎴愬姛',icon: 'success'})
-		            // 鎻愪氦鎴愬姛鍚庨噸缃墍鏈夋暟鎹�
-		            this.resetForm();
-		            // 鍙�夛細閲嶇疆鍚庨噸鏂版媺鍙栫鍨嬫暟鎹紝鏂逛究涓嬫鎿嶄綔
-		            // setTimeout(() => {
-		            //     this.POSTinfo();
-		            // }, 300);
-		        },
-		        fail: (err) => {
-		            console.error('璇锋眰澶辫触璇︽儏锛�', err)
-		            uni.showToast({title:'鎻愪氦澶辫触',icon: 'none'})
-		        },
-		        complete: (res) => {
-		            console.log('璇锋眰瀹屾垚鐘舵�侊細', res)
-		        }
-		    })
-		},
-		scan(){
-			uni.scanCode({
-				autoDecodeCharSet: true,
-				scanType: ['barCode'],
-				onlyFromCamera: true,
-				continuousScan: false,
-				camera: 'back',
-				timeout: 5000,
+		
+		// 鎻愪氦鏁版嵁
+		submit() {
+			// 1. 楠岃瘉鐧诲綍
+			if (!this.checkLoginStatus()) return;
+			
+			// 2. 楠岃瘉蹇呭~椤�
+			if (!this.barcode) {
+				uni.showToast({title: '璇锋壂鎻忔墭鐩樼紪鐮�', icon: 'none'});
+				return;
+			}
+			
+			if (!this.boxType) {
+				uni.showToast({title: '璇烽�夋嫨绠卞瀷', icon: 'none'});
+				return;
+			}
+			
+			if (!this.matList.model) {
+				uni.showToast({title: '璇峰~鍐欏嵎鍙�', icon: 'none'});
+				return;
+			}
+			
+			if (!this.matList.batch) {
+				uni.showToast({title: '璇峰~鍐欑鍙�', icon: 'none'});
+				return;
+			}
+			
+			// 3. 鍑嗗鏁版嵁
+			const matItem = {
+				...this.matList,
+				weight: this.matList.weight ? Number(this.matList.weight) : null,
+				roughWeight: this.matList.roughWeight ? Number(this.matList.roughWeight) : null,
+				rollExtent: this.matList.rollExtent ? Number(this.matList.rollExtent) : null,
+				joint: this.matList.joint ? Number(this.matList.joint) : 0
+			};
+			
+			const submitData = {
+				barcode: this.barcode,
+				palletizingNo: this.palletizingNo,
+				boxType: this.boxType,
+				matList: [matItem]
+			};
+			
+			console.log('鎻愪氦鏁版嵁:', submitData);
+			
+			// 4. 鍙戦�佽姹�
+			uni.showLoading({
+				title: '鎻愪氦涓�...',
+				mask: true
+			});
+			
+			uni.request({
+				url: this.baseUrl + '/mobile/truss/comd/auth/v2',
+				method: 'POST',
+				header: {
+					'Content-Type': 'application/json',
+					'Authorization': 'Bearer ' + this.token
+				},
+				data: submitData,
 				success: (res) => {
-					this.barcodeNum = res.result
-					this.barcode = res.result
-					uni.showToast({title: `鎵樼洏缂栫爜鎵爜鎴愬姛`,icon: 'success'})
+					uni.hideLoading();
+					console.log('鎻愪氦杩斿洖:', res.data);
+					
+					if (res.data.code === 200) {
+						uni.showToast({
+							title: '鎻愪氦鎴愬姛',
+							icon: 'success',
+							duration: 2000
+						});
+						
+						setTimeout(() => {
+							this.resetForm();
+						}, 1500);
+					} else {
+						uni.showToast({
+							title: res.data.message || '鎻愪氦澶辫触',
+							icon: 'none'
+						});
+					}
 				},
 				fail: (err) => {
-					uni.showToast({title: '鎵爜澶辫触鎴栧彇娑�',icon: 'none'})
-				}
-			})
-		},
-		parseQrCodeText(text) {
-			const result = {};
-			const regMap = {
-				model: /鍗峰彿锛�(.+)/,
-				batch: /绠卞彿锛�(.+)/,
-				matnr: /瑙勬牸锛�(.+)/,
-				rollExtent: /闀垮害锛�(.+?)\s*m/,
-				weight: /鍑�閲嶏細(.+?)\s*kg/,
-				roughWeight: /姣涢噸锛�(.+?)\s*kg/,
-				joint: /鎺ュご锛�(.+?)\s*涓�/
-			};
-			Object.keys(regMap).forEach(key => {
-				const match = text.match(regMap[key]);
-				if (match && match[1]) {
-					result[key] = match[1].trim();
+					uni.hideLoading();
+					console.error('鎻愪氦澶辫触:', err);
+					uni.showToast({
+						title: '缃戠粶閿欒',
+						icon: 'none'
+					});
 				}
 			});
-			return result;
 		},
-		scantwo(){
-			uni.scanCode({
-				autoDecodeCharSet:true,
-				scanType: ['qrCode'], 
-				success: (res) => {
-					const qrResult = res.result.trim();
-					this.barcodeNum = qrResult;
-					let parseResult = {};
-					
-					try {
-						parseResult = JSON.parse(qrResult);
-						parseResult = {
-							model: parseResult.鍗峰彿 || '',
-							batch: parseResult.绠卞彿 || '',
-							matnr: parseResult.瑙勬牸 || '',
-							rollExtent: (parseResult.闀垮害 || '').replace(/\s*m/g, '') || '',
-							weight: (parseResult.鍑�閲� || '').replace(/\s*kg/g, '') || '',
-							roughWeight: (parseResult.姣涢噸 || '').replace(/\s*kg/g, '') || '',
-							joint: (parseResult.鎺ュご || '').replace(/\s*涓�/g, '') || ''
-						};
-					} catch (e) {
-						parseResult = this.parseQrCodeText(qrResult);
-					}
-					
-					this.matList = { ...this.matList, ...parseResult };
-					uni.showToast({title: `鐗╂枡淇℃伅鎵爜鎴愬姛`,icon: 'success'});
-				},
-				fail: (err) => {
-					uni.showToast({title: '鎵爜澶辫触鎴栧彇娑�',icon: 'none'})
-				}
-			})
-		}
 	}
 }
 </script>
@@ -364,12 +524,19 @@
 	padding: 24rpx;
 	transition: all 0.2s ease;
 }
-
+.textareainput{
+	width: 60%;
+	height: 15px;
+	font-size: 28rpx;
+	padding: 16rpx 12rpx;
+	border: 1rpx solid #e5e7eb;
+	border-radius: 8rpx;
+	transition: border-color 0.2s ease;
+}
 /* 鐗╂枡淇℃伅鍗$墖鐗规畩鏍峰紡 */
 .material-card {
 	padding: 0;
 }
-
 .card-title {
 	font-size: 30rpx;
 	font-weight: 500;
@@ -428,11 +595,6 @@
 	border-color: #f97316;
 }
 
-/* 鍗犱綅绗︽牱寮� */
-.input-placeholder {
-	color: #9ca3af;
-}
-
 /* 杈撳叆鍊兼牱寮� */
 .input-value {
 	color: #1f2937;
@@ -468,6 +630,7 @@
 
 /* 鐗╂枡杈撳叆妗� */
 .material-input {
+	width: 45%;
 	font-size: 28rpx;
 	color: #1f2937;
 	padding: 16rpx 12rpx;

--
Gitblit v1.9.1