From 2490d3321f6d6f9b5bacf29225387f7c3f89a2b4 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 20 六月 2024 15:47:15 +0800 Subject: [PATCH] feat:司机填写集装箱号 --- pages/public-page/forward/forward.vue | 76 ++++++++++++++++++++++++++----------- 1 files changed, 53 insertions(+), 23 deletions(-) diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue index 39b78d9..f27b4b9 100644 --- a/pages/public-page/forward/forward.vue +++ b/pages/public-page/forward/forward.vue @@ -88,13 +88,21 @@ :hairline="false" @click.stop="addForm" :disabled="whetherClick"></u-button></view> + <!--鍒嗕韩鏃ヨ鍒� --> + <view + class="AdddBtn"><u-button text="鍒嗕韩鏃ヨ鍒�" + :hairline="false" + open-type="share" + :loading='loading'></u-button></view> <!-- 鎻愪氦鎸夐挳 --> - <view class="forwardBtn"><u-button text="鎻愪氦" + <view + class="forwardBtn"><u-button text="鎻愪氦" :hairline="false" type="warning" @click.stop="submitForm" :disabled="whetherClick1" :loading='loading'></u-button></view> + </view> <!-- 澧炲姞鎸夐挳 --> @@ -160,28 +168,41 @@ this.carNumSurplusHuodai = this.forwardSurplus = Number(params.carNumSurplusHuodai || 0); this.orderPlanId = params.orderPlanId; // 鍒ゆ柇鏄惁杞彂瀹屾垚 瀹屾垚鍒欎笉鍙啀娣诲姞 - if (this.roleType === 1) { + if (this.roleType === 1) { //roleType 1瀹㈡埛 this.whetherClick = this.carNumSurplus1 === 0 - } else if (this.roleType === 2) { + } else if (this.roleType === 2) { //roleType 2璐т唬 this.whetherClick = this.forwardSurplus === 0 } this.getOrderPlan() }, + onShareAppMessage(res) { + 銆�銆�if (res.from === 'button') {// 鏉ヨ嚜椤甸潰鍐呭垎浜寜閽� + 銆�銆�銆�銆�console.log(res.target) + 銆�銆�} + 銆�銆�return { + 銆�銆�銆�銆�title: '鍒嗕韩鏃ヨ鍒�', + 銆�銆�銆�銆�path: 'pages/driver-page/delivery-my/delivery-my/delivery-my?'+ `id=${this.orderPlanId}` + 銆�銆�} + + }, + + data() { return { forwardSurplus: 0, paramsName: {}, huoDaiData: [], + isClickFlag:true,// true 鍙互 or false for forward and back to the direction of the car direction (default fleetData: [], // 鏃ヨ鍒抜d orderPlanId: '', - jhOrderPlanForwardList: [{ - orderPlanId: '', - name: '', - carNum: null, - xsUserId: 0, - fleetId: 0, - checkboxValue1: '', + jhOrderPlanForwardList: [{ //杞彂瀵硅薄 + orderPlanId: '', //鏃ヨ鍒扞d + name: '', //杞﹂槦鎴栬揣浠e悕绉� + carNum: null, //杞彂鏁伴噺 + xsUserId: 0, //璐т唬Id + fleetId: 0, //杞﹂槦Id + checkboxValue1: '', //鍏ㄩ儴杞彂 isSelected: false }], // 绱㈠紩锛屽埄鐢ㄧ储寮曟纭樉绀� @@ -190,15 +211,15 @@ selectPopupShow: false, list1: [{ name: '杞﹂槦' }, { name: '璐т唬' }], tabHuoDai: false, - carNumSurplus1: '', + carNumSurplus1: '', //鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺锛堣浆鍙戠殑鏁伴噺 - 棰嗗彇鐨勬暟閲忥級 tempcarNumSurplus1: '', - cars2: '', + cars2: '', //宸茬粡棰嗗彇鐨勮溅鏁� carNum: '', carNumSurplusHuodai: '', formNum: 1, // 涓汉杞彂鏁版嵁 personalForward: {}, - whetherClick: false, + whetherClick: false, //娣诲姞鎸夐挳 whetherClick1: false, // 婊戝姩鍗曞厓鏍奸厤缃� options1: [{ @@ -209,10 +230,10 @@ }], loading: false, //鎻愪氦loading originForwardName: '', //鍘熻浆鍙戝璞� - laterForwardName: '', //鍚庤浆鍙戝璞� + laterForwardName: '', //鍚庤浆鍙戝璞� errorDataList: [], // 閿欒鏁版嵁 isDirectAdd: false, // 鏄惁鏄湪鍘熸潵鏈夊璞$殑item淇敼 鏄殑涓簍rue - forwardId: '' //鍘熸潵鏈夊璞� 鐐瑰嚮璧嬪�� + forwardId: '' //鍘熸潵鏈夊璞� 鐐瑰嚮璧嬪�� }; }, onShow() { @@ -362,13 +383,18 @@ this.fleetData = res.data; }); }, - // 杞彂 + // 杞彂瀵硅薄 forwardObjectClick(index, name, id) { + if(!id){ this.selectPopupShow = true; this.index = index; this.originForwardName = name || '' this.isDirectAdd = this.originForwardName !== '' this.forwardId = id + }else{ + return + } + }, selectPopupClose() { this.selectPopupShow = false; @@ -410,7 +436,7 @@ this.jhOrderPlanForwardList[this.index].xsUserId = item.userId; this.jhOrderPlanForwardList[this.index].name = item.name; this.jhOrderPlanForwardList[this.index].fleetId = 0; - this.jhOrderPlanForwardList[this.index].forWardType = 1; + this.jhOrderPlanForwardList[this.index].forWardType = 1; //forWardType 杞彂绫诲瀷 璐т唬1 杞﹂槦2 } // } }); @@ -462,12 +488,13 @@ return cur.carNum + prev; }, 0); console.log(total, '鎻愮叅鍗曚竴鍏辩殑鏁版嵁'); + //roleType 1瀹㈡埛 2 璐т唬 3鍙告満 5瑁呭嵏鍛� if (this.roleType == 1) { if (Number(this.cars2) > total) { this.carNumSurplus1 = Number(this.cars2) - total; this.whetherClick = false; this.whetherClick1 = false; - } else if (Number(this.cars2) == total) { + } else if (Number(this.cars2) == total) { //鍓╀綑鐨勬彁鐓ゅ崟涓�0锛堟坊鍔犮�佹彁浜ゆ寜閽笉鑳界偣鍑伙級 this.whetherClick = true; this.whetherClick1 = false; this.carNumSurplus1 = Number(this.cars2) - total; @@ -499,6 +526,7 @@ let time; let that = this; that.$set(that.jhOrderPlanForwardList[index], 'carNum', Number(value)); + //forWardType 杞彂绫诲瀷 1璐т唬 2杞﹂槦 that.$set(that.jhOrderPlanForwardList[index], 'forWardType', xsUserId ? 1 : 2); return (function() { if (!time) { @@ -591,11 +619,12 @@ return isPass; } }); + console.log(this.jhOrderPlanForwardList,'jhOderPlan') if (isPass) { this.loading = true; this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => { console.log(res, 'zh'); - // res.data.length == 0 鎻愪氦鎴愬姛 鍚﹀垯鎻愪氦澶辫触 + // res.data.length == 0 鎻愪氦鎴愬姛 鍚﹀垯鎻愪氦澶辫触 if (res.data.length == 0) { this.loading = false this.$u.toast('鎻愪氦鎴愬姛'); @@ -618,7 +647,7 @@ } else { this.tabHuoDai = false; } - } + }, } }; </script> @@ -782,11 +811,12 @@ } .utils-buttonGroup { - width: 610rpx; + width: 700rpx; @include flex; + justify-content: space-between; position: fixed; bottom: vww(30); - left: vww(30); + left: vww(18); z-index: 3; .AdddBtn, @@ -832,4 +862,4 @@ } } } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.1