Kaynağa Gözat

计算运费

jf 5 yıl önce
ebeveyn
işleme
26da2f08ce

+ 15 - 9
ghsApp/src/components/app-form-send1.vue

@@ -12,7 +12,7 @@
 		</tui-list-cell>
 		<!-- 门店送或快递送需要设置地址 -->
 		<appAddressGroup :customId="customId" cityTitle="配送城市" @selectAdress="selectAdress" ></appAddressGroup>
-		<appSendTime :sendDate.sync="formData.sendDate" :sendTime.sync="formData.sendTime"></appSendTime>
+		<appSendTime @alterTime="selectAdress('')" :sendDate.sync="formData.sendDate" :sendTime.sync="formData.sendTime"></appSendTime>
 
 
 
@@ -105,23 +105,29 @@ export default {
 			this.formData.sendSide = list[0].id;
 		},
 		selectAdress(info) {
-			this.formData.receiveProvince = info.province;
-			this.formData.receiveCity = info.city;
-			this.formData.receiveFloor = info.floor;
-			this.formData.receiveAddress = info.address;
-			this.formData.receiveLong = info.longitude;
-			this.formData.receiveLat = info.latitude;
+			if(info){
+				this.formData.receiveProvince = info.province;
+				this.formData.receiveCity = info.city;
+				this.formData.receiveFloor = info.floor;
+				this.formData.receiveAddress = info.address;
+				this.formData.receiveLong = info.longitude;
+				this.formData.receiveLat = info.latitude;
+			}
+
 			console.log('this.formData',this.formData)
 			this.$nextTick(() => {
 				let params = {
+					id: this.orderid,
 					customId: this.customId,
-					expressId: this.formData.sendSide,
+					province: this.formData.receiveProvince,
 					city:this.formData.receiveCity,
 					address:this.formData.receiveAddress,
 					floor:this.formData.receiveFloor,
-					orderId: this.orderid,
+					expressId: this.formData.sendSide,
+					// orderId: this.orderid,
 					long: this.formData.receiveLong,
 					lat: this.formData.receiveLat,
+					sendTime: this.formData.sendTime,
 				};
 				this.freightCount(params);
 			});

+ 1 - 1
ghsApp/src/components/app-send-time.vue

@@ -102,7 +102,7 @@ export default {
 			let oneIndex = e.detail.value[0] || 0;
 			let twoIndex = e.detail.value[1] || 0;
 			this.timeValue = e.detail.value;
-
+			this.$emit("alterTime")
 			this.$emit(
 				"update:sendTime",
 				this.timeList[0][oneIndex] + ":" + this.timeList[1][twoIndex]

+ 1 - 1
ghsApp/src/pagesOrder/ship.vue

@@ -134,7 +134,7 @@ export default {
 			// this.showIndex = this.option.pageStatus || 0
 			this._getDet()
 			this._orderComDet()
-			this.freightCount()
+			// this.freightCount()
 		},
 		sendConfirm(type){
 			console.log(type)

+ 3 - 3
ghsApp/src/pagesOrder/shipInfo.vue

@@ -5,7 +5,7 @@
 			<form>
 				<!-- 登录信息 -->
 				<view class="module-com input-line-wrap">
-					<appFormSend :form.sync="form" :customId="customId" :orderid="orderid"> </appFormSend>
+					<appFormSend :form.sync="form" :customId="customId" :orderid="orderId"> </appFormSend>
 				</view>
 			</form>
 			<view class="admin-button-com-box">
@@ -78,8 +78,8 @@ export default {
 		};
 	},
 	onLoad(e) {
-		this.customId = e.id
-		this.orderId = e.orderId
+		this.customId = e.id;
+		this.orderId = e.orderId;
 		if (!this.getMerchantInfo) {
 			this.initMerchantInfo().then(data => {
 				uni.setNavigationBarTitle({