shish 3 лет назад
Родитель
Сommit
36957e1535

+ 21 - 10
hdApp/src/admin/billing/affirmGhs.vue

@@ -108,7 +108,7 @@
 <block v-if="$util.isEmpty(wlList)">
 <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
 	<view class="tui-title">配送物流</view>
-	<input type="text" placeholder="请填物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+	<input type="text" placeholder="请填物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
 </tui-list-cell>
 </block>
 <block v-else>
@@ -120,8 +120,8 @@
 	</picker>
 </tui-list-cell>
 </block>
-					<tui-list-cell class="line-cell" :hover="false" v-if="(form.sendType == 2 || form.sendType == 0)&& Number(form.packCost)>0">
-					<view class="tui-title">包费</view>
+					<tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
+					<view class="tui-title">包费</view>
 					<text style="color: #3385FF">¥{{ form.packCost }}</text>
 					</tui-list-cell>
 
@@ -225,6 +225,7 @@ export default {
 				wlName:'',
 				wlId:0
 			},
+			lackExpend:0,
 			showCustomer: false,
 			today:'',
 			monthLater:'',
@@ -242,7 +243,8 @@ export default {
 				showAddress:''
 			},
 			wlList:[],
-			wlSelData: {id:0,name:''}
+			wlSelData: {id:0,name:''},
+			needAddPackCost:false
 		};
 	},
 	onLoad() {
@@ -264,14 +266,19 @@ export default {
 		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
 		modifyPrice(){
 			let allPrice = this.allPrice.toFixed(2)
-			let price = Number(allPrice)
+			allPrice = Number(allPrice)
+			let price = allPrice
 
 			if(this.form.sendType == 2){
 				price = price + this.form.sendCost
 			}
-
-			if(this.form.sendType == 2 || this.form.sendType == 0){
-				price = price + this.form.packCost
+			this.needAddPackCost = false
+			if(this.form.sendType == 2 || this.form.sendType == 0 || this.form.sendType == 3){
+				//设置了订单金额低200需要付包装费,当前只付一次
+				if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
+					price = price + this.form.packCost
+					this.needAddPackCost = true
+				}
 			}
 			price = Number(price)
 			price = price.toFixed(2)
@@ -469,6 +476,7 @@ export default {
 			getGhsDataApi({id:id}).then(res => {
 				that.ghsInfo = res.data
 				that.form.packCost = res.data.packCost?parseFloat(res.data.packCost):0
+				that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
 				that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
 
 				//杭州斗南鲜花批发部不需要显示免费配送
@@ -505,7 +513,7 @@ export default {
 
 			if(this.form.sendType == 3){
 				if (this.$util.isEmpty(this.form.wlName)){
-					this.$msg('请填物流')
+					this.$msg('请填物流')
 					return false
 				}
 			}
@@ -514,6 +522,8 @@ export default {
 			let xj = uni.getStorageSync("ghsColorItem"+this.ghsInfo.id)
 
 			let getType = this.form.sendType == 2 ? 1 : 2
+			//用于计划是否要包装费
+			let itemTotalAmount = this.allPriceFun
 			let params = {
 				getType:getType,
 				sendTimeWant:this.sendTimeWant,
@@ -524,7 +534,8 @@ export default {
 				ghsId:this.ghsInfo.id,
 				hbId: this.form.hbId,
 				wlName:this.form.wlName,
-				xj:JSON.stringify(xj)
+				xj:JSON.stringify(xj),
+				itemTotalAmount:itemTotalAmount
 			}
 			let self = this;
 			self.$util.confirmModal({content:'确认提交?'},() => {

+ 2 - 2
hdApp/src/pagesPurchase/details.vue

@@ -53,7 +53,7 @@
 				</view>
 				<view class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">包费</view>
+						<view class="tui-title ">包费</view>
 						<input
 							:disabled="!canIEdit"
 							v-model="form.packingCharge"
@@ -175,7 +175,7 @@ export default {
 			pageType: "purchase",
 
 			form: {
-				packingCharge: "", //包费
+				packingCharge: "", //包
 				shortCharge: "",
 				longCharge: "",
 				pickCharge: "",

+ 1 - 1
hdApp/src/pagesPurchase/info.vue

@@ -105,7 +105,7 @@
 			<view class="content-box price-detail">
 				<div class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">包费</div>
+						<div class="tui-title">包费</div>
 						<div class="detail-price_box">¥{{ detailInfo.packingCharge }}</div>
 					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">

+ 1 - 1
hdApp/src/pagesPurchase/purDetails.vue

@@ -188,7 +188,7 @@
             <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.sendCost?parseFloat(detailInfo.sendCost):0 }}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false" v-if="Number(detailInfo.packCost)>0">
-            <div class="tui-title">包费</div>
+            <div class="tui-title">包费</div>
             <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.packCost?parseFloat(detailInfo.packCost):0 }}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.discountAmount > 0">