From 94503c7382778632731b36cf6ad47f7552e4ccf9 Mon Sep 17 00:00:00 2001
From: xuefei <564615061@qq.cm>
Date: 星期六, 29 十一月 2025 14:47:07 +0800
Subject: [PATCH] fix:批量通过参数错误

---
 pages/jihua/jihua.vue |  154 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 104 insertions(+), 50 deletions(-)

diff --git a/pages/jihua/jihua.vue b/pages/jihua/jihua.vue
index bfe7338..5f6488b 100644
--- a/pages/jihua/jihua.vue
+++ b/pages/jihua/jihua.vue
@@ -17,6 +17,9 @@
 						<view class="jihua-main-line">
 							<view class="name">瀹㈡埛鍚嶇О锛歿{item.customerName || ''}}</view>
 						</view>
+            <view class="jihua-main-line" v-if="item.order && item.order.customerAddressName != item.customerName">
+              <view class="name">鏀惰揣鍗曚綅锛歿{item.order && item.order.customerAddressName || ''}}</view>
+            </view>
 						<view class="jihua-main-line">
 							<view class="main-flex">
 								<view>鐓ょ锛歿{ item.order.coalName || '' }}</view>
@@ -27,16 +30,24 @@
 							<view class="main-flex">
 								<view class="carNum-box">
 									<view>璁″垝杞︽暟锛�</view>
-									<!-- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputChange" @focus="faYunPlanCarsFocus(item)"></u--input> -->
-									<view class="planCars" :style="{color:item.numPlan  ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
-										<text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>
-										<view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId"><image src="@/static/cursor.gif" mode=""><image></view>
-									</view>
+									 <u--input
+                       placeholder="璇疯緭鍏ュ彂杩愯溅鏁�"
+                       border="surround"
+                       v-model="item.numPlan"
+                       @change="inputChange(item)"
+                       @focus="faYunPlanCarsFocus(item)"
+                       type="number" pattern="[0-9]*"></u--input>
+
+                  <!--									<view class="planCars" :style="{color:item.numPlan  ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
+                                      <text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>
+                  &lt;!&ndash;                    <text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>&ndash;&gt;
+                                      <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId"><image src="@/static/cursor.gif" mode=""><image></view>
+                                    </view>-->
 								</view>
 								<view style="margin-right:10px">瀹為檯鍙戣溅鏁帮細{{ item.numReal || '鏆傛棤' }}</view>
 							</view>
 						</view>
-						<u-keyboard    
+						<u-keyboard
 							@change="valChange"
 							@backspace="backspace"
 							@confirm="keyBoardConfirm"
@@ -48,7 +59,7 @@
 							:overlay="false"
 							:closeOnClickOverlay="false"
 							:dotDisabled="true"
-							zIndex="100000"   
+							zIndex="100000"
 						></u-keyboard>
 					</view>
 
@@ -70,18 +81,24 @@
 							<view class="main-flex">
 								<view class="carNum-box">
 									<view>璁″垝杞︽暟锛�</view>
-									<!-- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputTotalChange(item)" @focus="faYunPlanCarsFocus(item)"></u--input> -->
-									<view class="planCars" :style="{color:item.numPlan  ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
+									 <u--input
+                       placeholder="璇疯緭鍏ュ彂杩愯溅鏁�"
+                       border="surround"
+                       v-model="item.numPlan"
+                       @change="inputTotalChange(item)"
+                       @focus="faYunPlanCarsFocus(item)"
+                       type="number" pattern="[0-9]*"></u--input>
+<!--									<view class="planCars" :style="{color:item.numPlan  ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
 										<text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>
 										<view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId">
 											<image src="@/static/cursor.gif" mode="" />
 										</view>
-									</view>
+									</view>-->
 								</view>
 								<view style="margin-right:10px">瀹為檯鍙戣溅鏁帮細{{ item.numReal == null ? '鏆傛棤' : item.numReal }}</view>
 							</view>
 						</view>
-						<u-keyboard
+<!--						<u-keyboard
 							@change="valChange"
 							@backspace="backspace"
 							@confirm="keyBoardConfirm"
@@ -94,18 +111,18 @@
 							:closeOnClickOverlay="false"
 							:dotDisabled="true"
 							zIndex="100000"
-						></u-keyboard>
+						></u-keyboard>-->
 					</view>
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 淇敼寮瑰嚭妗� -->
 		<u-popup :show="editPopupShow" @close="editPopupClose" @open="editPopupOpen" mode="top" round="10">
 			<view class="editPopup">
 				<view class="editPopup__title"><text>璁″垝杞︽暟</text></view>
-				<view class="editPopup__input"><u--input v-model="keyBoardValue" @change="change" placeholder="璇疯緭鍏ュ唴瀹�" type="number" border="surround"></u--input></view>
-				<!-- <view class="editPopup__btn"><u-button text="纭畾" type="primary" @click="popupDetermineClick"></u-button></view> -->
+				<view class="editPopup__input"><u--input v-model="keyBoardValue" placeholder="璇疯緭鍏ュ唴瀹�" type="number" border="surround"></u--input></view>
+				<view class="editPopup__btn"><u-button text="纭畾" type="primary" @click="keyBoardConfirm"></u-button></view>
 			</view>
 		</u-popup>
 
@@ -118,16 +135,22 @@
 <script>
 import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
 import tool from '@/utils/tool.js';
-import { TrackOpTypes } from "vue";
+import { TrackOpTypes } from "vue";
+import row from "../../uni_modules/uview-ui/libs/config/props/row";
 export default {
 	components: {
 		popupMenu
 	},
+  computed: {
+    isShowCAN() {  //鏄惁鏄剧ず鏀惰揣鍗曚綅
+
+    }
+  },
 	data() {
 		return {
 			radioValue: '鍏ㄩ儴',
 			tabList: [
-				{  
+				{
 					name: '浠婃棩鍙戣繍璁″垝'
 				},
 				{
@@ -218,7 +241,7 @@
 		fyList() {
 			this.overlayShow = true;
 			//鍒楄〃鏌ヨ
-			uni.showLoading({   
+			uni.showLoading({
 				title: '姝e湪鍔犺浇...'
 			});
 			let compId = uni.getStorageSync('userInfo').compId;
@@ -228,7 +251,8 @@
 				status: 2,
 				trainType: 1,
 				compId: compId,
-				endDate: this.info.shippingDate
+        type: '澶栭攢',
+				endDate: this.info.shippingDate,
 			};
 			this.$reqGet('fyList', params).then(res => {
 				if (res.code == 0) {
@@ -274,17 +298,17 @@
 					e.shippingDate = this.info.shippingDate
 				}
 			});
-			this.$reqPost('addObj', this.fyData).then(res => {
+			this.$reqPost('xscarshippingdayplanAddObj', this.fyData).then(res => {
 				uni.hideLoading();
 				if(res.code == 0){
-					setTimeout(()=>{
-						uni.showToast({
-							title:'鏇存柊鎴愬姛锛�',
-							icon:'none',
-							duration:1000
-						})
-					},0)
 					this.fyList();
+          setTimeout(()=>{
+            uni.showToast({
+              title:'鏇存柊鎴愬姛锛�',
+              icon:'none',
+              duration:1000
+            })
+          },0)
 				}
 			});
 		},
@@ -372,16 +396,33 @@
 				duration: 300
 			});
 		},
-		inputChange(val) {
-			console.log('鍏ㄩ儴璁″垝', val);
+		inputChange(item) {
+      if(item.numPlan) {
+        let total = Math.floor(item.order.executiveSurplus / Number(34));
+        let max = total + (item.numReal ? item.numReal : 0) + 1
+        if(item.numPlan > max) {
+          this.$nextTick(() => {
+            item.numPlan = max
+            this.$set(item,'numPlan',max)
+          })
+          uni.showToast({
+            title:`璇ヨ鍗曟渶澶ц缃溅鏁颁负锛�${max}`,
+            icon:'none',
+            duration:1000
+          })
+        }
+      }
 		},
+    changeIn(val) {
+      console.log(val,'val=====')
+    },
 		inputTotalChange(val) {
 			console.log(val, 'val2=======val2,宸茶缃鍒�');
 			this.editRow = val;
-		},   
+		},
 		// input鑾峰彇鐒︾偣
 		faYunPlanCarsFocus(item) {
-			this.keyBoardShow = true;
+      console.log(item,'鍙戣繍杞︽暟璁″垝------------===========')
 			this.fayunPlanFocusId = item.orderId;
 			this.keyBoardValue = item.numPlan + '';
 			if(this.isTomJihua == '宸茶缃殑璁″垝'){
@@ -389,20 +430,21 @@
 			} else{
 				this.isCursor = true;
 			}
-			
+
 			// 鏍规嵁鍒楄〃涓嬫爣锛屼娇灞忓箷婊氬姩鍒扮浉搴斿彲瑙嗕綅缃�
-			for(let i = 0;i<this.fyData.length;i++){
-				if(this.fyData[i].orderId == item.orderId){
-					uni.pageScrollTo({
-						scrollTop: i*144,
-						duration: 300
-					});
-				}
-			}
-			
+			// for(let i = 0;i<this.fyData.length;i++){
+			// 	if(this.fyData[i].orderId == item.orderId){
+			// 		uni.pageScrollTo({
+			// 			scrollTop: i*144,
+			// 			duration: 300
+			// 		});
+			// 	}
+			// }
+
 		},
 		// 閿洏
 		valChange(val) {
+      console.log(val,'宸茶缃殑璁″垝====')
 			// this.keyBoardValue += val;
 			// 灏嗘瘡娆℃寜閿殑鍊兼嫾鎺ュ埌value鍙橀噺涓紝娉ㄦ剰+=鍐欐硶
 			this.fyData.map(item => {
@@ -418,7 +460,7 @@
 						item.numPlan = val;
 						this.keyBoardValue = item.numPlan;
 					}
-				}  
+				}
 			});
 		},
 		backspace() {
@@ -472,8 +514,19 @@
 	}
 };
 </script>
-
+<style>
+input{-webkit-appearance: none;}
+</style>
 <style lang="scss" scoped>
+.ceshi-box{
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+}
+.editPopup__btn{
+  width: vww(100);
+  margin:20rpx auto 0;
+}
 ::v-deep {
 	.u-tabs__wrapper__nav {
 		padding-left: vww(75.5);
@@ -495,7 +548,7 @@
 		width: vww(100);
 		z-index: 1;
 	}
-	
+
 	.u-radio-group--row {
 		height: 100%;
 		width: 100%;
@@ -556,7 +609,7 @@
 	// 	transform: translateX(-50%);
 	// 	border-radius: vww(20);
 	// }
-	
+
 }
 
 .jihua-main {
@@ -583,7 +636,7 @@
 
 	.main-block-box {
 		box-shadow: 0px 0px 8px 0px rgba(216, 218, 238, 0.8);
-		height: vww(120);
+		//height: vww(120);
 		padding: vww(10);
 		box-sizing: border-box;
 		margin-top: vww(12);
@@ -600,7 +653,8 @@
 			}
 
 			.name {
-				font-weight: 600 !important;
+				font-weight: 550 !important;
+        line-height: 54rpx;
 			}
 
 			.main-flex {
@@ -621,8 +675,8 @@
 						border: 1px solid #dddddd;
 						border-radius: vww(4);
 						padding: vww(1) vww(10);
-						
-						
+
+
 						// 杈撳叆鐒︾偣鍥剧墖
 						.cursor {
 							// float: left;
@@ -675,4 +729,4 @@
 		// 	}
 		// }
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1