From 9166395640600a5ec596bfbeefa00906597f095d Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期三, 26 六月 2024 17:33:35 +0800
Subject: [PATCH] feat:库管测试问题& 客户 产品名称展示 & 库管日计划更换图标

---
 pages/loadUnload-page/selectTarget/selectTarget.vue |   84 +++++++++++++++++++++++++++++++-----------
 1 files changed, 62 insertions(+), 22 deletions(-)

diff --git a/pages/loadUnload-page/selectTarget/selectTarget.vue b/pages/loadUnload-page/selectTarget/selectTarget.vue
index 6981385..ce523c3 100644
--- a/pages/loadUnload-page/selectTarget/selectTarget.vue
+++ b/pages/loadUnload-page/selectTarget/selectTarget.vue
@@ -62,9 +62,7 @@
 			:key="i">
 							<view class="first">
 								<view class="">{{ item.carNo || '' }}</view>
-								<view class=""><u-icon name="arrow-right"
-										color="#999999"
-										size="40"></u-icon></view>
+								<view class=""></view>
 							</view>
 							<view class="second">
 								<view class="coal-name">{{ item.productName || '' }}</view>
@@ -79,7 +77,7 @@
 									<view class="third-line_text">浠撳簱:</view>
 									<view >{{ item.bunkerName }}</view>
 								</view>
-								<view class="third-line">
+								<view class="third-line"  v-if="item.productName === 'EDC'">
 									<view class="third-line_text">璐ㄦ鐘舵��:</view>
 									<view> <u-tag :text="checkStatusList[item.checkStatus]" plain > </u-tag></view>
 								</view>
@@ -106,8 +104,7 @@
 					<uni-tr>
 						<uni-th width='140'
 						align="center">鎿嶄綔</uni-th>
-					    <uni-th align="center">浜у搧</uni-th>
-						<uni-th align="center">杞︾墝鍙�</uni-th>
+					    <uni-th align="center" width='120'>浜у搧</uni-th>
 						<uni-th align="center">绫诲瀷</uni-th>
 						<uni-th align="center">鐨噸</uni-th>
 						<uni-th align="center">姣涢噸</uni-th>
@@ -120,14 +117,12 @@
 					<uni-tr v-for="(subItem, index) in item.tmTaskCoalList" :key="index">
 						 <uni-td  align="center">
 					<view class="btnBox"> 
-						<!-- v-if="subItem.flag"  -->
-						<text  @click="viewDetail(subItem)">鏌ョ湅</text>
-						<text @click="enterOk(subItem)">纭瑁呭嵏</text>
+						<!--   -->
+						<u-button   text='鏌ョ湅'  @click="viewDetail(subItem)"></u-button>
+						<u-button type='primary' text='纭瑁呭嵏'  v-if="subItem.flag" @click="enterOk(subItem)"></u-button>
 						</view></uni-td>
 						<uni-td align="center">
-							<view class="name">{{ subItem.productName }}</view></uni-td>
-							<uni-td align="center">
-							<view style="width:150rpx">{{ subItem.carNo }}</view></uni-td>
+							<view>{{ subItem.productName }}</view></uni-td>
 					<uni-td>
 						<view class="name">{{ subItem.orderType }}</view>
 					</uni-td>
@@ -178,11 +173,16 @@
 							<text>璇疯緭鍏�</text>锛�
 							  <u--input
 							     border="bottom"
+								 :disabled="activeObj.productName === 'PVC' && activeObj.packingType === 5"
 								:placeholder="isNumOk ?  '鏁伴噺' :'鎶樺惃'"
 								v-model="checkNum"
 							>
 							</u--input>
 							<text> {{isNumOk ? '浠�' : '鍚�' }}</text>
+							</view>
+							<!-- pvc 骞朵笖鏄ぇ鍖� -->
+							<view class="pvcBig" v-if="activeObj.productName === 'PVC' && activeObj.packingType === 5">
+								
 							</view>
 							<view v-if="isNumOk && activeObj.productQuantity">褰撳墠鏁伴噺锛歿{activeObj.productQuantity}}浠�</view>
 							<view v-if="activeObj.containerNumber"><span>闆嗚绠卞彿锛�</span>{{activeObj.containerNumber}}</view>
@@ -234,7 +234,7 @@
 					bunkerId:""
 				},
 				checkStatusList:[
-					'寰呭彇鏍�','宸插彇鏍�','鍚堟牸','涓嶅悎鏍�'
+					'寰呭彇鏍�','宸插彇鏍�','璐ㄦ涓�','寰呭鏍�','澶嶆牳涓�','寰呭瀹�','瀹″畾涓�','宸插畬鎴�'
 				],
 				index: '',
 				enterZx:false,
@@ -318,6 +318,7 @@
                     title:'鍔犺浇涓�'
                 })
 					this.$reqGet('getTaskCoalListByBunkerId', { bunkerId:this.dataForm.bunkerId }).then(res => {
+					uni.hideLoading();
 					if (res.code === 0) {
 						this.detailData = res.data.map(item=>{
 						   item.tmTaskCoalList.map(el=>{
@@ -327,8 +328,13 @@
 						 return item;
 						});
 						console.log(this.detailData,'detailData')
-					uni.hideLoading();
+					}else if(res.code === 1){
+						this.detailData = [];
+						this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触锛侊紒')
 					}
+				}).catch(err=>{
+					this.detailData = [];
+					this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触锛侊紒')
 				})
 
 			},
@@ -356,14 +362,21 @@
 			},
 			open(){},
 			enterOk(item){
-				console.log('123',item)
 				this.activeObj = item;
-				if(item.productQuantity){
+				if( (item.orderType === '澶栬喘' ||item.orderType === '澶栬喘閫�' ) &&  item.productQuantity){
 					this.isNumOk = true;
-						this.isClean = false;
-				}else if(item.isWeight === 1){
+					this.isClean = false;
+				}else if( item.orderType ==='澶栬喘' &&  item.isWeight === 1){
 					this.isClean = true;
 					this.isNumOk = false;
+				}else{
+					this.isNumOk = false;
+					this.isClean = false;
+				}
+				//pvc澶у寘鑷姩璁$畻鎶樺惃
+				if(item.productName === 'PVC' && item.packingType === 5){
+					this.checkNum =  (Number(item.productQuantity) * 60)
+
 				}
 			this.enterZx = true;
 				
@@ -378,18 +391,34 @@
 			},
 			confirmModal(){
 				this.enterZx = false;
+				    uni.showLoading({
+                    title:'鍔犺浇涓�'
+                })
 				this.$reqPost('confirmLoadAndUnload',{ 
 					id: this.activeObj.id,
 					productQuantity:this.isNumOk ? this.checkNum :this.activeObj.skin,
 					discount:this.isClean ? this.checkNum : null,
 					isPretendDischar:this.activeObj.isPretendDischar
 				 },'json').then(res=>{
+					uni.hideLoading();
 					console.log(res,'rez')
 					this.checkNum = '';
+					if(res.code === 1){
+						console.log('瑙﹀彂')
+						this.$u.toast(res.msg || '澶辫触');
+						uni.hideLoading();
+					}else{
 					  this.$u.toast('鎿嶄綔鎴愬姛');
-					  	this.getDetailData();
-					
+					}
+					setTimeout(() => {
+						this.getDetailData();
+					}, 500);
 				
+				}).catch((err) => {
+					 this.$u.toast(err.msg || '澶辫触');
+				}).finally(() => {
+				uni.hideLoading();
+					 	
 				})
 			},
 			//鍒ゆ柇鏄惁鏄� 涓夌鐗规畩绫诲瀷瀵瑰簲寮圭獥
@@ -435,6 +464,17 @@
 
 <style lang="scss"
 	scoped>
+::-webkit-scrollbar{
+		  display: none;
+	}
+	.table{
+	width: 100%;
+  /deep/ .uni-table{
+	min-width: 0!important;
+	margin-left: 20rpx;
+  }
+	
+}
 		// 鑷富閰嶉��
 			.self-deliver {
 			position: relative;
@@ -486,7 +526,7 @@
 			font-size: 12px;
 		  }
 	/deep/ .uni-table{
-			min-width: 100rpx!important;
+			min-width: 0rpx!important;
 			// position: sticky !important;;
 		}
 	/deep/ 	.uni-table-body-wrapper {
@@ -621,7 +661,7 @@
 
 			.third {
 				width: 96%;
-				height:  120rpx;
+				height:  auto;
 				font-size: 30rpx;
 				font-weight: 300;
 				color: #515151;

--
Gitblit v1.9.1