shish hace 3 años
padre
commit
cc1838a215

+ 27 - 40
ghsApp/src/admin/billing/affirm.vue

@@ -97,7 +97,7 @@
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">配送方式</view>
             <button @tap="setSendType(0)" class="admin-button-com middle" :class="form.sendType == 0 ? 'blue' : 'default'">出车</button>
-            <button @tap="setSendType(1)" class="admin-button-com middle" :class="form.sendType == 1 ? 'blue' : 'default'">客户自取</button>
+            <button @tap="setSendType(1)" class="admin-button-com middle" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
             <button @click="setSendType(2)" class="admin-button-com middle" :class="form.sendType == 2 ? 'blue' : 'default'">发快递</button>
           </tui-list-cell>
 
@@ -134,11 +134,18 @@
           </tui-list-cell>
           -->
 
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="(form.sendType == 0 || form.sendType == 2) && Number(form.packCost)>0" >
+            <view class="tui-title">
+              <text>打包费</text>  
+            </view>
+            <text style="color: #3385FF">¥{{parseFloat(form.packCost)}}</text>
+          </tui-list-cell>
+
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
             <view class="tui-title">
               <text>合计金额</text>  
             </view>
-            <text style="color: #3385FF">{{parseFloat(finalPrice)}}</text>
+            <text style="color: #3385FF">¥{{parseFloat(finalPrice)}}</text>
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
@@ -235,6 +242,7 @@ export default {
         sendDate: "",
         sendTimeWant: "",
         sendCost: "",
+        packCost:0,
         customId: "",
         product: "",
         remark:"",
@@ -259,13 +267,13 @@ export default {
 
     this.kdType = option.kdType
 
-    if (!this.getMerchantInfo) {
-      this.initMerchantInfo().then((data) => {
-        uni.setNavigationBarTitle({ title: data.name, })
-      });
-    } else {
-      uni.setNavigationBarTitle({ title: this.getMerchantInfo.name, })
-    }
+    let that = this
+    this.initMerchantInfo().then((data) => {
+
+        uni.setNavigationBarTitle({ title: data.name })
+        that.form.packCost = data.shopInfo.packCost?parseFloat(data.shopInfo.packCost):0
+
+    })
 
     //默认出车
     this.setSendType(0)
@@ -324,7 +332,13 @@ export default {
     ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
     finalPrice(){
       let totalPrice = this.allPrice.toFixed(2)
-      let finalPrice = (Number(totalPrice) + Number(this.form.sendCost)).toFixed(2)
+      let finalPrice = Number(totalPrice)
+      if(this.form.sendType == 2){
+        finalPrice = Number(finalPrice) + Number(this.form.sendCost)
+      }
+      if(this.form.sendType == 0 || this.form.sendType == 2){
+        finalPrice = finalPrice + Number(this.form.packCost)
+      }
       let currentPrice = parseFloat(finalPrice)
       this.modifyPrice = currentPrice 
       return currentPrice
@@ -364,35 +378,11 @@ export default {
       this.form.payWay = payWay
     },
     setSendType (type) {
-      this.form.sendType = type;
-      if (type === 2) {
-        this.form.sendCost = "";
+      this.form.sendType = type
+      if (type !== 2) {
+        this.form.sendCost = ""
       }
     },
-    changeCustomerFn (info) {
-      const product = this.selectList.map((ele) => {
-        return {
-          productId: ele.id,
-          bigNum: ele.bigCount,
-          smallNum: ele.smallCount,
-          classId: ele.classId,
-          itemId: ele.itemId,
-        };
-      });
-      let params = {
-        customId: info.id,
-        product: JSON.stringify(product),
-        province: info.province,
-        city: info.city,
-        address: info.address,
-        floor: info.floor,
-        long: info.long,
-        lat: info.lat,
-      };
-      this.form.sendCost = '';
-      this.form.customId = info.id;
-      this.form.customName = info.name;
-    },
     confirmSubmit () {
       let self = this;
         let rules = [
@@ -431,9 +421,6 @@ export default {
         await this.initMerchantInfo();
       }
       formData.shopId = this.getMerchantInfo.id;
-      if (formData.sendType == 2) {
-        formData.sendCost = "";
-      }
       if(Number(this.modifyPrice) <= 0){
         this.$msg('收款金额必须大于0');
         return false

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

@@ -44,7 +44,7 @@
 				<view class="order-info_box">
 					<view>送货方式:</view>
 					<view>
-{{ detailInfo.sendType==0?'出车':detailInfo.sendType==1?'上门自取':detailInfo.sendType==2?'发快递':'' }}
+{{ detailInfo.sendType==0?'出车':detailInfo.sendType==1?'自取':detailInfo.sendType==2?'发快递':'' }}
 					</view>
 				</view>
 				<view class="order-info_box">

+ 7 - 4
hdApp/src/admin/billing/affirmGhs.vue

@@ -63,7 +63,7 @@
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<view v-if="form.sendType == 0">
-							<text style="color: #3385FF;width:100%;">本店如有出车经过您的门店,请选此项,免配送费</text>
+							<text style="color: #3385FF;width:100%;">本店如有出车您的门店,请选此项,免配送费</text>
 						</view>				
 						<view v-if="form.sendType == 1">
 							<text style="color: #3385FF;width:100%;">您自己来店里取货,没有配送费</text>
@@ -87,7 +87,7 @@
 					<text style="color: #3385FF">¥{{ form.sendCost }}</text>
 					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 && Number(form.packCost)>0">
+					<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>
 					<text style="color: #3385FF">¥{{ form.packCost }}</text>
 					</tui-list-cell>
@@ -228,8 +228,11 @@ export default {
 			let price = Number(allPrice)
 
 			if(this.form.sendType == 2){
-				let add = this.form.sendCost + this.form.packCost
-				price = price + add
+				price = price + this.form.sendCost
+			}
+
+			if(this.form.sendType == 2 || this.form.sendType == 0){
+				price = price + this.form.packCost
 			}
 
 			price = parseFloat(price)

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

@@ -47,7 +47,7 @@
         <view class="order-info_box">
           <view>配送方式:</view>
           <view>
-{{ detailInfo.sendType==0?'出车':detailInfo.sendType==1?'上门自取':detailInfo.sendType==2?'发快递':'' }}
+{{ detailInfo.sendType==0?'出车':detailInfo.sendType==1?'自取':detailInfo.sendType==2?'发快递':'' }}
           </view>
         </view>
         <view class="order-info_box">
@@ -91,7 +91,7 @@
           <view>欠款状态:</view>
             <view style="font-weight:bold;color:red;">是</view>
             <view class="price">
-                <text @click="goToSettle(detailInfo)" style="font-weight:normal;color:#3385FF;">查看全部欠款</text>
+                <text @click="goToSettle(detailInfo)" style="font-weight:normal;color:#3385FF;">全部欠款</text>
             </view>
         </view>
         <view class="order-info_box" v-else>