shish 3 лет назад
Родитель
Сommit
83f755cf4f

+ 61 - 21
ghsApp/src/admin/billing/affirm.vue

@@ -46,8 +46,9 @@
               <view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
               <view class="operate-view" v-else @click="gobackEvent" style="font-size:33upx;font-weight:bold;"><text class="iconfont icongouwuche" style="margin-right:5upx;"></text>返回修改</view>
               <view class="describe-view">
-                共<text style="font-size:32upx;font-weight:bold;color:red;">{{ selectList.length }}种</text>,<text style="font-size:32upx;font-weight:bold;" v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
-                <text style="font-size:30upx;font-weight:bold;" v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>,合计<text class="price">¥{{ allPrice }}</text>
+                共<text style="color:red;">{{ selectList.length }}种</text>,
+                <text v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
+                <text v-if="Number(totalItemNum.small)>0">{{totalItemNum.small?parseFloat(totalItemNum.small):0}}支</text>,{{ allCount.weight }}公斤,合计<text class="price">¥{{ allPrice }}</text>
               </view>
             </view>
             <view class="summary-bar">
@@ -59,7 +60,10 @@
         <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
           <template slot="customContent">
             <view class="select-cmd_bx" v-if="customData">
-              <view class="kc"><text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text><text class="unit_price"> ¥{{ parseFloat(customData.price) }}</text></view>
+              <view class="kc">
+                <text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
+                <text class="unit_price"> ¥{{ parseFloat(customData.price) }}</text>
+              </view>
 
               <view class="num_bx">
                 <input style="width: 430upx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="单价" :disabled="false" />
@@ -91,28 +95,43 @@
         </modal-module>
 
         <view class="module-com input-line-wrap">
-					<view class="" v-if="isBilling">
+					<view class="">
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">客户</view>
             <view class="tui-input">{{ form.customName }}</view>
           </tui-list-cell>
 
-          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
-            <view class="tui-title">配送方式</view>
-            <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(0)" class="admin-button-com mini-btn" :class="form.sendType == 0 ? 'blue' : 'default'">送货</button>
-            <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(1)" class="admin-button-com mini-btn" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
-            <button style="margin-right:16upx;height:70upx;line-height:46upx;" @click="setSendType(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">跑腿</button>
-            <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="setSendType(3)" class="admin-button-com mini-btn" :class="form.sendType == 3 ? 'blue' : 'default'">物流</button>
-          </tui-list-cell>
-
-          <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 2">
+<block v-if="currentShop.pfLevel && currentShop.pfLevel == 1">
+  <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+    <view class="tui-title">配送方式</view>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setTransType(0)" class="admin-button-com mini-btn" :class="form.transType == 0 ? 'blue' : 'default'">德帮</button>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setTransType(1)" class="admin-button-com mini-btn" :class="form.transType == 1 ? 'blue' : 'default'">顺丰</button>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @click="setTransType(2)" class="admin-button-com mini-btn" :class="form.transType == 2 ? 'blue' : 'default'">冷链</button>
+    <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="setTransType(3)" class="admin-button-com mini-btn" :class="form.transType == 3 ? 'blue' : 'default'">航空</button>
+  </tui-list-cell>
+</block>
+<block v-else>
+  <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+    <view class="tui-title">配送方式</view>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(0)" class="admin-button-com mini-btn" :class="form.sendType == 0 ? 'blue' : 'default'">送货</button>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(1)" class="admin-button-com mini-btn" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
+    <button style="margin-right:16upx;height:70upx;line-height:46upx;" @click="setSendType(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">跑腿</button>
+    <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="setSendType(3)" class="admin-button-com mini-btn" :class="form.sendType == 3 ? 'blue' : 'default'">物流</button>
+  </tui-list-cell>
+  <tui-list-cell class="line-cell" :hover="false" v-show="form.sendType == 3">
+    <div class="tui-title">配送物流</div>
+    <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+  </tui-list-cell>
+</block>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="displaySendCost == true">
             <view class="tui-title">运费</view>
             <input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
           </tui-list-cell>
 
-          <tui-list-cell class="line-cell" :hover="false" v-show="form.sendType == 3">
-            <div class="tui-title">配送物流</div>
-            <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="displayPackCost == true">
+            <view class="tui-title">打包费</view>
+            <input type="digit" placeholder="请填写打包费" v-model="form.packCost" placeholder-class="tui-placeholder"/>
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
@@ -189,7 +208,8 @@
 			<view style="display:flex;padding:40upx 20upx 20upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 
         <block v-if="!$util.isEmpty(diffPriceList)">
-          <view  v-for="(item, index) in diffPriceList" :key="index" style="font-size:32upx;color:red;font-weight:bold;margin-top:10upx;">
+          <view  v-for="(item, index) in diffPriceList" :key="index" 
+          style="font-size:32upx;color:red;font-weight:bold;margin-top:10upx;">
             <text>{{item.name}}</text>
             <text style="margin-left:25upx;">系统售价 ¥{{item.price?parseFloat(item.price):0}}</text>
             <text style="margin-left:25upx;">您开价 ¥{{item.kdPrice?parseFloat(item.kdPrice):0}}</text>
@@ -244,7 +264,6 @@ export default {
   data () {
     return {
       autoLoad: false,
-      isBilling: true,
       staffList:[],
 			payWayList:[{name:"线下微信",id:0},{name:"线下支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
 			payWayindex:0,
@@ -258,11 +277,13 @@ export default {
         receiveLong: "",
         receiveLat: "",
         sendType: 0,
+        transType:0,
         sendSide: "2",
         sendDate: "",
         sendTimeWant: "",
         sendCost: "",
         customId: "",
+        packCost:"",
         product: "",
         remark:"",
         payWay:0,
@@ -301,6 +322,7 @@ export default {
 
     //默认送货
     this.setSendType(0)
+    this.setTransType(0)
 
     if(Number(option.customId) > 0){
       this.form.customId = option.customId
@@ -355,6 +377,21 @@ export default {
 	},
   computed: {
     ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
+    displayPackCost(){
+      if(this.currentShop.pfLevel && this.currentShop.pfLevel == 1){
+        return true
+      }
+      return false
+    },
+    displaySendCost(){
+      if(this.form.sendType == 2){
+        return true
+      }
+      if(this.currentShop.pfLevel && this.currentShop.pfLevel == 1){
+        return true
+      }
+      return false
+    },
     totalItemNum(){
       let big = 0
       let small = 0
@@ -424,6 +461,9 @@ export default {
     setPayWay(payWay){
       this.form.payWay = payWay
     },
+    setTransType(type){
+      this.form.transType = type
+    },
     setSendType (type) {
       this.form.sendType = type
       if (type !== 2) {
@@ -685,10 +725,10 @@ export default {
           display: flex;
           align-items: center;
           color: #333;
-          font-size: 32upx;
+          font-size: 30upx;
+          font-weight:bold;
           .price {
-            font-weight: bold;
-            font-size: 36upx;
+            margin-left:8upx;
           }
         }
       }

+ 0 - 2
ghsApp/src/admin/billing/index.vue

@@ -110,8 +110,6 @@
 			</view>
 		</uni-popup>
 
-		<image v-if="showClassRemind" @click="hideClassRemind" style="position:absolute;width:610upx;height:699upx;top:98upx;left:80upx;z-index:9999;" :src="`${constant.imgUrl}/class_remind.png`"></image>
-
 	</view>
 </view>
 </template>

+ 6 - 1
ghsApp/src/mixins/product.js

@@ -82,13 +82,18 @@ export default {
 		allCount() {
 			let bigLength = 0;
 			let smallLength = 0;
+			let weight = 0
 			if (this.selectList) {
 				for (const item of this.selectList) {
 					bigLength += Number(item.bigCount)
 					smallLength += Number(item.smallCount)
+					let currentWeight = item.weight ? item.weight : 0
+					weight = Number(weight) + Number(currentWeight)
 				}
+				weight = weight.toFixed(2)
+				weight = parseFloat(weight)
 			}
-			return {bigLength:bigLength,smallLength:smallLength,};
+			return {bigLength:bigLength,smallLength:smallLength,weight:weight};
 		},
 		//当前选中商品列表中是否有没有库存的商品
 		hasNoStock() {