gjy 2 jaren geleden
bovenliggende
commit
b07719adeb
3 gewijzigde bestanden met toevoegingen van 18 en 11 verwijderingen
  1. 2 2
      config/index.js
  2. 3 3
      pages/goodSource/index.vue
  3. 13 6
      pages/order/signContract.vue

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	baseUrlNew: 'https://apitest.eliangeyun.com',
-	// baseUrlNew: 'http://192.168.110.9:8099',
+	// baseUrlNew: 'https://apitest.eliangeyun.com',
+	baseUrlNew: 'http://192.168.110.9:8099',
 	// baseUrlNew: 'http://192.168.110.82:8999',
 	// baseUrlNew: 'http://192.168.1.119:8999',
 	h5Appid: 'wxb66b599f7f61b46f',

+ 3 - 3
pages/goodSource/index.vue

@@ -78,7 +78,7 @@
 									<view v-if="carWeight(good)">{{carWeight(good)}}</view>
 								</view>
 								<view class="flex row">
-									<view class="row-tips">{{good.taskDescription}}</view>
+									<view class="row-tips" v-if="good.taskDescription">{{good.taskDescription}}</view>
 								</view>
 							</view>
 							<view class="right flex h-color">
@@ -308,9 +308,9 @@
 					driverPhone: this.firstAuthentication.driverPhone,
 					cargoOwnerPhone: item.cargoOwnerPhone,
 					id:item.id,
-					billingMethod:item.billingMethod
+					billingMethod:item.billingMethod,
+					freightAdvance:item.freightAdvance
 				}
-
 				this.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
 						if (res.code == 200) {
 							this.$refs.uToast.show({

+ 13 - 6
pages/order/signContract.vue

@@ -55,7 +55,7 @@
 						class="text-align-right yf-input">{{dataDetails.freight}}元/车</view> -->
 				<view class="flex">
 					<u--input placeholder="请输入运费" border="none" type="number" v-model="dataDetails.freight"
-						inputAlign='right' clearable></u--input>
+						inputAlign='right' clearable @input="preMoney"></u--input>
 					<!-- <span> 元/车</span> -->
 				</view>
 			</view>
@@ -122,9 +122,7 @@
 			<view class='row-between'>
 				<view class="gray">装车后预付款</view>
 				<view class="">
-					
-					
-					<u--input placeholder="请输入装车后预付款" v-if="dataDetails.freightAdvance == 1" border="none"
+					<u--input placeholder="自动获取,不可编辑" v-if="dataDetails.freightAdvance == 1" border="none"
 						v-model="dataDetails.loadingAdvancePayment" inputAlign='right' clearable disabled></u--input>
 					<u--input placeholder="请输入装车后预付款" v-else border="none" v-model="dataDetails.loadingAdvancePayment"
 						inputAlign='right' clearable></u--input>
@@ -220,6 +218,7 @@
 				startShow: false,
 				endShow: false,
 				contractCheck:false,//判断合同是否提交
+				proportion:"",//垫付比例
 
 
 			};
@@ -273,6 +272,11 @@
 				})
 			}
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
+			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
+			if(this.dataDetails.freightAdvance == 1){
+				this.proportion = this.dataDetails.driverAdvancePayment > this.dataDetails.ownerAdvancePayment ? this.dataDetails.ownerAdvancePayment:this.dataDetails.driverAdvancePayment
+			}
+			console.log(this.dataDetails)
 			this.dataDetails.carrierInfo = {}
 			
 			this.ctx = uni.createCanvasContext("handWriting");
@@ -307,13 +311,17 @@
 					} else {
 						uni.$u.toast(res.message);
 					}
-
 				})
 				.catch(res => {
 					uni.$u.toast(res.message);
 				});
 		},
 		methods: {
+			preMoney(){
+				if(this.dataDetails.freightAdvance == 1){
+					this.dataDetails.loadingAdvancePayment = this.dataDetails.freight * this.proportion
+				}
+			},
 			collection() {
 				uni.$u.route('/pages/order/bankCard');
 			},
@@ -321,7 +329,6 @@
 				this.dataDetails.carrierInfo.carNo = e.value[0]
 				for (let i = 0; i < this.carlistCopy.length; i++) {
 					if (e.value[0] == this.carlistCopy[i].carNumber) {
-
 						this.dataDetails.trailerNumber = this.carlistCopy[i].guaCarNumber
 					}
 				}