From b13760a228deb5957f1c029689c2a28676bce94f Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 30 十二月 2025 19:39:17 +0800
Subject: [PATCH] #

---
 pages/pakin/pakin.vue |  417 ++---------------------------------------------------------
 1 files changed, 18 insertions(+), 399 deletions(-)

diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index bef38bf..76b2afd 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -106,7 +106,7 @@
 				<uni-icons type="refresh" size="18" color="#909399"></uni-icons>
 				<text class="btn-text">閲嶇疆</text>
 			</view>
-			<view class="btn-submit" :class="{'btn-disabled': dataList.length === 0}" @click="combConfirm('warn')">
+			<view class="btn-submit" :class="{'btn-disabled': isSubmitting || dataList.length === 0}" @click="combConfirm('warn')">
 				<uni-icons type="checkbox" size="18" color="#ffffff"></uni-icons>
 				<text class="btn-text">纭缁勬墭</text>
 			</view>
@@ -192,7 +192,8 @@
 				removeNum: 0,
 				ck1: true,
 				ck2: false,
-				isFull: true
+				isFull: true,
+				isSubmitting: false
 			}
 		},
 		onLoad() {
@@ -416,7 +417,7 @@
 				this.count = value
 			},
 			combConfirm(type) {
-				if (this.dataList.length === 0) return;
+				if (this.isSubmitting || this.dataList.length === 0) return;
 				this.msgType = type
 				this.title = '纭缁勬墭'
 				this.content = '纭灏嗗晢鍝佺粍鎵樺叆搴擄紵'
@@ -428,20 +429,24 @@
 			comb() {
 				uni.vibrateShort();
 				let that = this;
+				that.isSubmitting = true;
 				if (that.barcode === '') {
 					this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
 					this.messageToggle('error')
+					that.isSubmitting = false;
 					return;
 				}
 				if (that.dataList.length === 0) {
 					this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
 					this.messageToggle('error')
+					that.isSubmitting = false;
 					return;
 				}
 				for (var i = 0; i < that.dataList.length; i++) {
 					if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
 						this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
 						this.messageToggle('error')
+						that.isSubmitting = false;
 						return;
 					}
 				}
@@ -476,6 +481,13 @@
 							that.messageText = res.msg
 							that.messageToggle('error')
 						}
+					},
+					fail: () => {
+						that.messageText = "缃戠粶璇锋眰瓒呮椂"
+						that.messageToggle('error')
+					},
+					complete: () => {
+						that.isSubmitting = false;
 					}
 				});
 			},
@@ -507,401 +519,8 @@
 </script>
 
 <style>
+	/* 寮曞叆鍏叡鏍峰紡 */
+	@import url('../../static/css/common.css');
 	@import url('../../static/css/wms.css/wms.css');
-
-	page {
-		height: 100%;
-		background: #f5f7fa;
-	}
-
-	.page-container {
-		min-height: 100vh;
-		background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
-		padding-bottom: 110rpx;
-		box-sizing: border-box;
-	}
-
-	/* 琛ㄥ崟鍖哄煙 */
-	.form-section {
-		background: #ffffff;
-		padding: 12rpx 20rpx;
-		box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
-	}
-
-	.form-item {
-		display: flex;
-		align-items: center;
-		padding: 12rpx 0;
-		border-bottom: 1rpx solid #f0f0f0;
-	}
-
-	.form-item:last-child {
-		border-bottom: none;
-	}
-
-	.form-label {
-		display: flex;
-		align-items: center;
-		width: 140rpx;
-		flex-shrink: 0;
-	}
-
-	.label-text {
-		font-size: 26rpx;
-		color: #303133;
-		margin-left: 6rpx;
-	}
-
-	.form-input-wrap {
-		flex: 1;
-		display: flex;
-		align-items: center;
-		background: #f5f7fa;
-		border-radius: 6rpx;
-		padding: 0 16rpx;
-		height: 60rpx;
-	}
-
-	.form-input {
-		flex: 1;
-		height: 60rpx;
-		font-size: 26rpx;
-		color: #303133;
-	}
-
-	/* 鍒楄〃澶撮儴 */
-	.list-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 16rpx 20rpx;
-		background: #ffffff;
-		margin-top: 12rpx;
-		box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
-	}
-
-	.header-left {
-		display: flex;
-		align-items: center;
-	}
-
-	.header-title {
-		font-size: 28rpx;
-		color: #303133;
-		font-weight: 600;
-	}
-
-	.count-badge {
-		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-		border-radius: 16rpx;
-		padding: 2rpx 12rpx;
-		margin-left: 12rpx;
-	}
-
-	.count-text {
-		font-size: 20rpx;
-		color: #ffffff;
-		font-weight: 500;
-	}
-
-	/* 鍟嗗搧鍒楄〃 */
-	.list-container {
-		padding: 0 20rpx;
-	}
-
-	.mat-card {
-		background: #ffffff;
-		border-radius: 12rpx;
-		margin-top: 12rpx;
-		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-		overflow: hidden;
-	}
-
-	.card-top {
-		display: flex;
-		align-items: center;
-		padding: 14rpx 16rpx;
-		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-	}
-
-	.card-index {
-		width: 36rpx;
-		height: 36rpx;
-		background: rgba(255, 255, 255, 0.25);
-		border-radius: 50%;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		font-size: 22rpx;
-		color: #ffffff;
-		font-weight: 600;
-		margin-right: 12rpx;
-	}
-
-	.mat-code-wrap {
-		flex: 1;
-	}
-
-	.mat-code {
-		font-size: 26rpx;
-		color: #ffffff;
-		font-weight: 600;
-	}
-
-	.qty-badge {
-		background: rgba(255, 255, 255, 0.3);
-		padding: 4rpx 14rpx;
-		border-radius: 16rpx;
-	}
-
-	.qty-text {
-		font-size: 24rpx;
-		color: #ffffff;
-		font-weight: 600;
-	}
-
-	/* 鍗$墖鍐呭 */
-	.card-content {
-		padding: 12rpx 16rpx;
-	}
-
-	.info-row {
-		display: flex;
-		margin-bottom: 8rpx;
-	}
-
-	.info-row:last-child {
-		margin-bottom: 0;
-	}
-
-	.info-col {
-		flex: 1;
-	}
-
-	.info-col.half {
-		width: 50%;
-		flex: none;
-	}
-
-	.info-label {
-		font-size: 20rpx;
-		color: #909399;
-		display: block;
-	}
-
-	.info-value {
-		font-size: 24rpx;
-		color: #303133;
-		display: block;
-		margin-top: 2rpx;
-	}
-
-	.info-value.highlight {
-		color: #667eea;
-		font-weight: 500;
-	}
-
-	.info-value.qty {
-		font-size: 28rpx;
-		color: #303133;
-		font-weight: 600;
-	}
-
-	/* 鍗$墖鎿嶄綔 */
-	.card-actions {
-		display: flex;
-		border-top: 1rpx solid #f0f0f0;
-	}
-
-	.action-btn {
-		flex: 1;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		padding: 14rpx 0;
-	}
-
-	.edit-btn {
-		border-right: 1rpx solid #f0f0f0;
-	}
-
-	.action-text {
-		font-size: 24rpx;
-		color: #667eea;
-		margin-left: 6rpx;
-	}
-
-	.delete-text {
-		color: #f56c6c;
-	}
-
-	/* 绌虹姸鎬� */
-	.empty-state {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		padding: 80rpx 0;
-	}
-
-	.empty-text {
-		font-size: 26rpx;
-		color: #909399;
-		margin-top: 16rpx;
-	}
-
-	.empty-hint {
-		font-size: 22rpx;
-		color: #c0c4cc;
-		margin-top: 8rpx;
-	}
-
-	.bottom-placeholder {
-		height: 20rpx;
-	}
-
-	/* 搴曢儴鎿嶄綔鏍� */
-	.bottom-bar {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		display: flex;
-		padding: 16rpx 20rpx;
-		background: #ffffff;
-		box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
-	}
-
-	.btn-reset {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 160rpx;
-		height: 72rpx;
-		background: #f5f7fa;
-		border-radius: 36rpx;
-		margin-right: 16rpx;
-	}
-
-	.btn-reset .btn-text {
-		font-size: 26rpx;
-		color: #909399;
-		margin-left: 6rpx;
-	}
-
-	.btn-submit {
-		flex: 1;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		height: 72rpx;
-		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-		border-radius: 36rpx;
-	}
-
-	.btn-submit .btn-text {
-		font-size: 28rpx;
-		color: #ffffff;
-		font-weight: 500;
-		margin-left: 6rpx;
-	}
-
-	.btn-disabled {
-		opacity: 0.6;
-	}
-
-	/* 寮圭獥鏍峰紡 */
-	.popup-card {
-		width: 600rpx;
-		background: #ffffff;
-		border-radius: 16rpx;
-		overflow: hidden;
-	}
-
-	.popup-header {
-		padding: 24rpx;
-		text-align: center;
-		border-bottom: 1rpx solid #f0f0f0;
-		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-	}
-
-	.popup-title {
-		font-size: 30rpx;
-		color: #ffffff;
-		font-weight: 600;
-	}
-
-	.popup-body {
-		padding: 24rpx;
-	}
-
-	.popup-row {
-		display: flex;
-		align-items: center;
-		margin-bottom: 20rpx;
-		height: 70rpx;
-	}
-
-	.popup-row:last-child {
-		margin-bottom: 0;
-	}
-
-	.popup-label {
-		width: 80rpx;
-		font-size: 26rpx;
-		color: #606266;
-		flex-shrink: 0;
-	}
-
-	.popup-value {
-		flex: 1;
-		height: 70rpx;
-		background: #f5f7fa;
-		border-radius: 8rpx;
-		padding: 0 16rpx;
-		font-size: 26rpx;
-		color: #303133;
-		display: flex;
-		align-items: center;
-		box-sizing: border-box;
-	}
-
-	.popup-value.disabled {
-		color: #909399;
-		background: #f0f0f0;
-	}
-
-	.popup-value.input {
-		padding: 0 16rpx;
-	}
-
-	.popup-value.number {
-		justify-content: center;
-		background: transparent;
-		padding: 0;
-	}
-
-	.popup-footer {
-		display: flex;
-		border-top: 1rpx solid #f0f0f0;
-	}
-
-	.popup-btn {
-		flex: 1;
-		height: 90rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		font-size: 28rpx;
-	}
-
-	.popup-btn.cancel {
-		color: #909399;
-		border-right: 1rpx solid #f0f0f0;
-	}
-
-	.popup-btn.confirm {
-		color: #667eea;
-		font-weight: 600;
-	}
+	
 </style>

--
Gitblit v1.9.1