소스 검색

Merge branch 'presell'

shish 3 년 전
부모
커밋
64088c7585

+ 2 - 2
ghsApp/src/admin/home/apply.vue

@@ -61,8 +61,8 @@ export default {
                 {
                     title:'订单与销售',
                     list:[
-                        {name: "预订单",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
-                        {name: "预订单设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/bookSet"},
+                        {name: "预",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
+                        {name: "预设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/bookSet"},
                     ]
                 },
                 {

+ 6 - 3
ghsApp/src/admin/item/components/ItemStock.vue

@@ -12,12 +12,15 @@
 				<text v-if="info.variety && info.variety ==1" class="show-color">
 				</text>
 			</view>
-			<view class="kc">¥{{ parseFloat(info.price) }} <text style="margin-left:25upx;color:#555555;font-weight:normal;">¥{{ parseFloat(info.skPrice) }}</text></view>
+			<view class="kc">¥{{ parseFloat(info.price) }} 
+				<text style="margin-left:25upx;color:#555555;font-weight:normal;">¥{{ parseFloat(info.skPrice) }}</text>
+				<text style="margin-left:32upx;color:#999;font-size:23upx;font-weight:normal;">成本 ¥{{ info.cost?parseFloat(info.cost):0 }}</text>
+			</view>
 			<view class="num-open_bx">
 				<template>
 					<view class="open-bx">
-						还剩 <text style="font-size: 23upx;margin-left:8upx;">{{ parseFloat(info.stock) }}</text>
-						<text style="margin-left:30upx;font-size: 23upx;display:inline-block;color:#999;">销量 {{ parseFloat(info.actualSold) }}</text>
+						还剩 <text style="font-size:23upx;margin-left:8upx;">{{ info.stock?parseFloat(info.stock):0 }}</text>
+						<text style="margin-left:15upx;font-size:23upx;display:inline-block;color:#999;">销量 {{ info.actualSold?parseFloat(info.actualSold):0 }}</text>
 					</view>
 				</template>
 			</view>

+ 11 - 12
ghsApp/src/admin/order/bookSet.vue

@@ -3,15 +3,13 @@
     <view>
       <form @submit="formSubmit">
         <view class="module-com input-line-wrap">
-          <tui-list-cell class="line-cell" :hover="false">
-            <view class="tui-title">起订公斤数</view>
-            <input v-model="form.miniKilo" placeholder-class="phcolor" class="tui-input" name="miniKilo" placeholder="预订的最少公斤数" maxlength="50" type="number" />
-          </tui-list-cell>
 
-          <tui-list-cell class="line-cell" :hover="false">
-            <view class="tui-title">每公斤服务费</view>
-            <input v-model="form.kiloFee" placeholder-class="phcolor" class="tui-input" name="kiloFee" placeholder="请填写" maxlength="50" type="digit" />
-          </tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">预售</view>
+					<view>
+						<switch style="transform:scale(0.7,0.7)" :checked="form.presell == 0 ? false : true" @change="presellChange" /> {{form.presell==0 ? '关闭' : '开启'}}
+					</view>
+				</tui-list-cell>
 
         </view>
         <view class="confirm-btn">
@@ -34,8 +32,7 @@ export default {
   data() {
     return {
       form: {
-        kiloFee: "",
-        miniKilo: ""
+        presell:0,
       }
     };
   },
@@ -44,10 +41,12 @@ export default {
   onShow() {
   },
   methods: {
+		presellChange(e){
+			this.form.presell = e.target.value ? 1 : 0
+		},
     async init() {
       const { data } = await getInfo()
-      this.form.kiloFee = parseFloat(data.kiloFee)
-      this.form.miniKilo = parseFloat(data.miniKilo)
+      this.form.presell = data.presell
       this.$forceUpdate()
     },
     confirmFn() {

+ 5 - 6
ghsApp/src/admin/order/statBook.vue

@@ -14,14 +14,13 @@
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
 				<t-table :headerBackgroundColor="'#F0F2F6'">
-					<t-tr header><t-th>日期</t-th><t-th>花材</t-th><t-th>数量</t-th><t-th>明细</t-th></t-tr>
+					<t-tr header><t-th>日期</t-th><t-th>花材</t-th><t-th>数量</t-th></t-tr>
 					<template v-if="!$util.isEmpty(profile)">
 						<view v-for="(item, index) in profile" :key="index" @click="goDetail(item)">
 							<t-tr>
-								<t-td><view>{{item.time.substr(4,4)}}</view></t-td>
-								<t-td><view>{{item.name}}</view></t-td>
-								<t-td><view>{{item.num}}</view></t-td>
-								<t-td><view><text style="color:#3385FF">查看</text></view></t-td>
+								<t-td><view style="color:#333333;font-size:30upx;">{{item.time.substr(4,4)}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:30upx;">{{item.name}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:30upx;">{{item.num}}</view></t-td>
 							</t-tr>
 						</view>
 					</template>
@@ -153,7 +152,7 @@ export default {
 		left: 0;
 		display: flex;
 		width: 100%;
-		top:153upx;
+		top:125upx;
 		z-index: 20;
 		.bar{
 			width: 50%;

+ 3 - 3
ghsApp/src/admin/order/statKhBook.vue

@@ -18,9 +18,9 @@
 						<template v-if="!$util.isEmpty(profile)">
 							<view v-for="(item, index) in profile" :key="index" @click="goDetail(item)">
 								<t-tr>
-									<t-td><view>{{item.name}}</view></t-td>
-									<t-td><view>{{parseFloat(item.num)}}</view></t-td>
-									<t-td><view>{{parseFloat(item.amount)}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:30upx;">{{item.name}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:30upx;">{{parseFloat(item.num)}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:30upx;">{{parseFloat(item.amount)}}</view></t-td>
 								</t-tr>
 							</view>
 						</template>

+ 13 - 2
ghsApp/src/admin/shop/add.vue

@@ -87,6 +87,13 @@
 					<input v-model="form.packCost" @focus="form.packCost=''" placeholder-class="phcolor" class="tui-input" name="packCost" placeholder="打包费" type="digit" />
 				</tui-list-cell>
 
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">预售</view>
+					<view>
+						<switch style="transform:scale(0.7,0.7)" :checked="form.presell == 0 ? false : true" @change="presellChange" /> {{form.presell==0 ? '关闭' : '开启'}}
+					</view>
+				</tui-list-cell>
+
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">客户欠款</view>
 					<view>
@@ -128,7 +135,7 @@ import { updateShop as update, addShop as add } from '@/api/shop'
 import {mapActions} from "vuex";
 import {getDetail} from "@/api/shop"
 export default {
-	name: 'staff-add',
+	name: 'add',
 	components: {
 		TuiListCell,
 		AppAvatarModule,
@@ -159,7 +166,8 @@ export default {
 				packCost:0,
 				img: [],
 				allowDebt:0,
-				allowDebtAmount:5000
+				allowDebtAmount:5000,
+				presell:0
 			},
 			showRegion: false,
 			region: {
@@ -223,6 +231,9 @@ export default {
 				})
 			}
 		},
+		presellChange(e){
+			this.form.presell = e.target.value ? 1 : 0
+		},
 		allowDebtChange(e){
 			this.form.allowDebt = e.target.value ? 1 : 0
 		},

+ 2 - 15
ghsApp/src/admin/shop/list.vue

@@ -3,28 +3,15 @@
 		<div class="list-wrap staff-list">
 			<block v-if="!$util.isEmpty(list.data)">
 				<div class="list" v-for="(item, index) in list.data" :key="index">
-					<div class="list-avatar">
-						<app-avatar-module :src="item.avatar" :width="90" />
-					</div>
-					<div class="list-det">
+					<div class="list-det" @click.stop="toModiyFn(item)">
 						<div class="list-det-left">
 							<div>
 								<span class="staff-name">{{ item.shopName }}</span>
 								<span>{{ item.telephone }}</span>
 							</div>
-							<div class="flex-center">
-								<div class="status-list">
-									<span class v-if="item.gatheringCode" @click="downQrCodeFn(item, index)">收款码下载</span>
-									<span v-else></span>
-								</div>
-								<div class="status-list">
-									<span class v-if="item.gatheringCode" @click="downMemberCodeFn(item, index)">会员码下载</span>
-									<span v-else></span>
-								</div>
-							</div>
 						</div>
 						<div class="list-det-right">
-							<div @click="toModiyFn(item)">
+							<div @click.stop="toModiyFn(item)">
 								<i class="iconfont iconbianji"></i>
 							</div>
 							<!-- 删除 -->

+ 2 - 2
ghsApp/src/pages.json

@@ -379,8 +379,8 @@
 			"root": "admin/order",
 			"pages": [
 				{"path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}},
-				{"path": "bookSet","style": {"navigationBarTitleText": "预订单设置"}},
-				{"path": "statBook","style": {"navigationBarTitleText": "预订单"}},
+				{"path": "bookSet","style": {"navigationBarTitleText": "预设置"}},
+				{"path": "statBook","style": {"navigationBarTitleText": "预"}},
 				{"path": "statKhBook","style": {"navigationBarTitleText": "详情"}}
 			]
 		},

+ 38 - 65
ghsApp/src/pagesOrder/arrival.vue

@@ -18,7 +18,7 @@
 									<text class="item-type"></text>
 									<view class="item-count">
 										<input type="number" class="num" v-model="s.xhNum" placeholder="到货数量" />
-										<input type="digit" class="price" v-model="s.currentCost" placeholder="成本" />
+										<text>¥{{s.xhPreUnitPrice?parseFloat(s.xhPreUnitPrice):0}}</text>
 									</view>
 								</view>
 							</view>
@@ -40,35 +40,16 @@
 						<view class="detail-price_box" style="font-size: 28upx;">{{ detailInfo.customName||'' }}</view>
 					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">重量(公斤)</view>
-						<view class="detail-price_box" style="font-size: 28upx;">
-						<text v-if="Number(miniKilo) > Number(totalWeight)" style="color:#CCCCCC;margin-right:15upx;">不足{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤算</text>
-						<text>{{ totalWeight }}</text>
-						</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">每公斤服务费</view>
-						<view class="detail-price_box" style="font-size: 28upx;">¥{{ kiloFee ? parseFloat(kiloFee) : 0}}</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">总服务费</view>
-						<view class="detail-price_box" style="font-size: 28upx;">¥{{totalKiloFee}}</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">商品金额</view>
-						<view class="detail-price_box" style="font-size: 28upx;">¥{{itemPrice}}</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">总计</view>
-						<view class="detail-price_box red" style="font-size: 28upx;">¥{{allPrice}}</view>
+						<view class="tui-title">应付</view>
+						<view class="detail-price_box" style="font-size: 28upx;">¥{{allPrice}}</view>
 					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">预付金额</view>
+						<view class="tui-title">已付</view>
 						<view class="detail-price_box red" style="font-size: 28upx;">¥{{ detailInfo.bookPrice ? parseFloat(detailInfo.bookPrice) : 0}}</view>
 					</tui-list-cell>
 
 					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">结</view>
+						<view class="tui-title">结算</view>
 						<view class="detail-price_box" style="font-size: 28upx;color:green;" v-if="settlePrice > 0">退 ¥{{settlePrice}},确认后自动退款</view>
 						<view class="detail-price_box" style="font-size: 28upx;color:red;" v-else-if="settlePrice < 0">欠 ¥{{Math.abs(settlePrice)}},确认后变成欠款单</view>
 						<view class="detail-price_box" style="font-size: 28upx;" v-else>0</view>
@@ -100,11 +81,7 @@ export default {
 		return {
 			detailInfo: {},
 			miniKilo:0,
-			kiloFee:0,
-			totalKiloFee:0,
-			itemPrice:0,
-			totalWeight:0,
-			settlePrice:0
+			totalWeight:0
 		};
 	},
 	onShow() {
@@ -113,40 +90,26 @@ export default {
 	computed: {
 		...mapGetters({ loginInfo: "getLoginInfo" }),
 		allPrice() {
+			let price = this.itemPrice
+			return price
+		},
+		itemPrice(){
 			let price = 0
-			this.itemPrice = 0
-			this.totalWeight = 0
 			if (this.detailInfo && this.detailInfo.product) {
 				for (const item of this.detailInfo.product) {
-					if(item.currentCost){
-						//花材价格
-						let currentPrice = Number(item.xhNum) * Number(item.currentCost)
-						currentPrice = currentPrice.toFixed(2)
-						this.itemPrice = Number(this.itemPrice) + Number(currentPrice)
-						this.itemPrice.toFixed(2)
-
-						//总重量
-						let thisWeight = Number(item.unitWeight)*Number(item.xhNum)
-						this.totalWeight = Number(this.totalWeight)+Number(thisWeight)
-						this.totalWeight = parseFloat(this.totalWeight.toFixed(2))
-
-					}
+					let current = Number(item.xhPreUnitPrice)*Number(item.xhNum)
+					price = Number(price)+Number(current)
+					price = parseFloat(price.toFixed(2))
 				}
 			}
-			this.itemPrice = parseFloat(this.itemPrice.toFixed(2))
-
-			//总服务费
-			let calcWeight = Number(this.totalWeight)>Number(this.miniKilo) ? Number(this.totalWeight) : this.miniKilo
-			this.totalKiloFee = Number(this.kiloFee)*calcWeight
-			this.totalKiloFee = parseFloat(this.totalKiloFee.toFixed(2))
-
-			//总计
-			price = Number(this.itemPrice) + Number(this.totalKiloFee)
-			price = parseFloat(price.toFixed(2))
-
-			this.settlePrice = Number(this.detailInfo.bookPrice) - Number(price)
-			this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
-
+			return price
+		},
+		settlePrice(){
+			let bookPrice = this.detailInfo.bookPrice ? parseFloat(this.detailInfo.bookPrice) : 0
+			let price = Number(bookPrice) - Number(this.allPrice)
+			price = Number(price)
+			price = price.toFixed(2)
+			price = parseFloat(price)
 			return price
 		}
 	},
@@ -160,7 +123,6 @@ export default {
 			});
 			this.detailInfo = res.data;
 			this.miniKilo = res.data.miniKilo
-			this.kiloFee = res.data.kiloFee
 		},
 		commitItem(){
 			let product = []
@@ -168,26 +130,37 @@ export default {
 			let that = this
 			if (this.detailInfo && this.detailInfo.product) {
 				for (const item of this.detailInfo.product) {
-						if(item.currentCost.length <= 0){
-							this.$msg('请填写进货价,价格要大于0')
+						let name = item.name
+						if(item.xhPreUnitPrice.length <= 0){
+							this.$msg(name+' 没有价格')
 							hasError = true;
 							break;
 						}
 						if(this.$util.isEmpty(item.xhNum) ||  Number(item.xhNum) < 0){
-							this.$msg('请填写到货数,没有填0')
+							this.$msg('请填写 '+name+' 到货数,没有填0')
 							hasError = true;
 							break;
 						}
+						let preNum = item.xhPreNum ? Number(item.xhPreNum):0
 						let num = item.xhNum ? Number(item.xhNum) : 0
-						let price = item.currentCost ? Number(item.currentCost) : 0
+						if(num > preNum){
+							this.$msg(name+' 超过预定数量')
+							hasError = true;
+							break;
+						}
+						let price = item.xhPreUnitPrice ? Number(item.xhPreUnitPrice) : 0
 						let productId = item.productId || 0
-						let unitType = 
-						product = [...product,{productId,price,num}]
+						let unitType = 0
+						product = [...product,{productId,price,num,unitType}]
 				}
 			}
 			if(hasError == true){
 				return false
 			}
+			if(Number(this.settlePrice) < 0){
+				this.$msg('结账金额有问题')
+				return
+			}
 			that.$util.confirmModal({content:'确认提交'},() => {
 				arrival({id:that.option.id,product:JSON.stringify(product)}).then(res=>{
 					if(res.code == 1){

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

@@ -201,25 +201,7 @@
 			<view class="content-box price-detail" v-else>
 				<div class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">重量(公斤)</div>
-					<div class="detail-price_box" style="font-size: 28upx;">
-					<text v-if="Number(detailInfo.miniKilo) > Number(detailInfo.weight)" style="color:#CCCCCC;margin-right:15upx;">未达{{parseFloat(detailInfo.miniKilo)}}公斤按{{parseFloat(detailInfo.miniKilo)}}公斤计算</text>
-					<text>{{ detailInfo.weight ? parseFloat(detailInfo.weight) : 0 }}</text>
-					</div>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">服务费</div>
-					<div class="detail-price_box" style="font-size: 28upx;">
-						<text style="color:#CCCCCC;margin-right:15upx;">{{ Number(detailInfo.miniKilo) > Number(detailInfo.weight) ? parseFloat(detailInfo.miniKilo) : parseFloat(detailInfo.weight) }}*¥{{ detailInfo.kiloFee ? parseFloat(detailInfo.kiloFee) : 0}}</text>
-						<text>¥{{ detailInfo.allKiloFee ? parseFloat(detailInfo.allKiloFee) : 0}}</text>
-					</div>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">商品金额</div>
-					<div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.itemPrice ? parseFloat(detailInfo.itemPrice) : 0 }}</div>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">总计</div>
+					<div class="tui-title">订单金额</div>
 					<div class="detail-price_box red" style="font-size: 28upx;">¥{{ detailInfo.orderPrice ? parseFloat(detailInfo.orderPrice) : 0 }}</div>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">

+ 3 - 6
hdApp/src/admin/billing/affirmGhs.vue

@@ -40,7 +40,6 @@
 											</text>
 										</view>
 									</view>
-
 								</view>
 							</view>
 						</view>
@@ -48,7 +47,7 @@
 							<view class="operate-view" @click="gobackEvent">
 								<text class="iconfont icongouwuche"></text>返回修改
 							</view>
-							<view class="describe-view">共{{ allCountFun.bigLength }}扎,合计 ¥<text class="price">{{ allPriceFun }}</text></view>
+							<view class="describe-view">共{{ allCountFun.bigLength }}扎合计 ¥<text class="price">{{ allPriceFun }}</text></view>
 						</view>
 					</view>
 				</view>
@@ -63,10 +62,10 @@
 
 					<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>
+							<text style="color: #3385FF;width:100%;">您自己来店里取,没有配送费</text>
 						</view>
 						<view v-if="form.sendType == 2">
 							<text style="color: #3385FF;width:100%;">请跑腿送货,有配送费</text>
@@ -219,12 +218,10 @@ export default {
 			this.form.hbId = 0
 			this.hasCoupon()
 		}
-
 		if(this.form.sendType == 2){
 			//计算运费
 			this.calcFreight()
 		}
-
 	},
 	computed: {
 		...mapGetters(["getMerchantInfo", "getLoginInfo"]),

+ 47 - 97
hdApp/src/admin/billing/affirmGhsBook.vue

@@ -14,7 +14,7 @@
 				<view class="module-com">
 					<view class="commodity-view">
 						<view class="commodity-list">
-							<view class="commodity-item" v-for="(item, index) in list" :key="index">
+							<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
 								<image class="item-icon" :src="item.cover" alt="" />
 								<view class="item-info">
 									<view class="info-line">
@@ -37,15 +37,29 @@
 						</view>
 						<view class="summary-bar">
 							<view class="operate-view" @click="gobackEvent">
-								<text class="iconfont icongouwuche"></text>修改花材
+								<text class="iconfont icongouwuche"></text>返回修改
 							</view>
-							<view class="describe-view">共{{ allCountFun.bigLength }}扎,合计 ¥<text class="price">{{ allPriceFun }}</text></view>
+							<view class="describe-view">共{{ allCountFun.bigLength }}扎合计 ¥<text class="price">{{ allPriceFun }}</text></view>
 						</view>
 					</view>
 				</view>
 
 				<view class="module-com input-line-wrap">
 
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+						<button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;"  @click="changeSendType(0)">有车到店</button>
+						<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;"  @click="changeSendType(1)">上门自取</button>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+						<view v-if="form.sendType == 0">
+							<text style="color: #3385FF;width:100%;">本店有出车到您店,请选此项,免配送费</text>
+						</view>				
+						<view v-if="form.sendType == 1">
+							<text style="color: #3385FF;width:100%;">您自己来店里取花,没有配送费</text>
+						</view>
+					</tui-list-cell>
+
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 						<view class="tui-title ">配送时间</view>
 						<picker mode="date" :value="sendTimeWant" @change="bindDateChange" style="width:400upx;">
@@ -54,27 +68,6 @@
                     	</picker>
 					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<view class="tui-title">花材(预付)</view>
-						<text style="color: #3385FF">¥{{ parseFloat(productPrice) }}</text>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<view class="tui-title">重量(公斤)</view>
-						<text style="color: #3385FF">
-							{{ currentWeight }}
-							<text v-if="currentWeight < miniKilo" style="margin-left:16upx;color:#CCCCCC;font-size:24upx;">不足{{miniKilo}}KG按{{miniKilo}}KG算</text>
-							<text style="margin-left:16upx;color:#CCCCCC;font-size:24upx;">{{parseFloat(kiloFee)}}元/公斤</text>
-						</text>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<view class="tui-title">服务费</view>
-						<text style="color: #3385FF">
-							¥{{ totalFee }}
-						</text>
-					</tui-list-cell>
-
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
 						<view class="tui-title">合计</view>
 						<text style="color: #3385FF">¥{{ modifyPrice }}</text>
@@ -148,11 +141,11 @@ export default {
 				receiveAddress: "",
 				receiveLong: "",
 				receiveLat: "",
-				sendType: 2,
-				sendSide: "2",
+				sendType: 0,
 				sendDate: "",
 				sendTimeWant: "",
-				sendCost: "",
+				sendCost: 0,
+				packCost:0,
 				customId: "",
 				product: "",
         		hbId: '0'
@@ -160,19 +153,8 @@ export default {
 			showCustomer: false,
 			today:'',
 			monthLater:'',
-			modifyPrice:0,
 			hasHb:0,
-			selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
-			currentWeight:0,
-			//预订单最低公斤数
-			miniKilo:0,
-			//用于计算的重量
-			calcWeight:0,
-			//每公斤服务费
-			kiloFee:0,
-			//总服务费
-			totalFee:0,
-			productPrice:0
+			selectedHb:{couponAmount:0,hbId:0,couponSelInx:0}
 		};
 	},
 	onLoad(e) {
@@ -180,62 +162,30 @@ export default {
 	},
 	onShow() {
 
-		this.miniKilo = this.option.miniKilo || 0
-		this.kiloFee = this.option.kiloFee || 0
-
-		let selectList = this.$util.copyObject(this.selectList);
-		let list = [];
-		if (!this.$util.isEmpty(selectList)){
-			for (let i=0;i<selectList.length;i++){
-				if(list==''){
-					list.push(selectList[i])
-				}else{
-					let has = false
-					list.map(res=>{
-						if(res.id == selectList[i].id){
-							res.bigCount = (res.bigCount+selectList[i].bigCount)
-							res.smallCount = (res.smallCount+selectList[i].smallCount)
-							has = true
-						}
-					})
-					if(has == false){
-						list.push(selectList[i])
-					}
-				}
+	},
+	computed: {
+		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
+		modifyPrice(){
+			let allPrice = this.allPrice.toFixed(2)
+			let price = Number(allPrice)
+			if(this.form.sendType == 2){
+				price = price + this.form.sendCost
 			}
-
-			
-			//计算重量
-			this.currentWeight = 0
-			for (let i=0;i<list.length;i++){
-				let small = Number(list[i].smallCount) / Number(list[i].ratio)
-				small = small.toFixed(2)
-				let count = Number(small) + Number(list[i].bigCount)
-				count = count.toFixed(2)
-				let thisWeight = Number(list[i].weight)*Number(count)
-				thisWeight = thisWeight.toFixed(2)
-				this.currentWeight = Number(this.currentWeight) + Number(thisWeight)
-				this.currentWeight = parseFloat(this.currentWeight.toFixed(2))
+			if(this.form.sendType == 2 || this.form.sendType == 0){
+				price = price + this.form.packCost
 			}
-			this.calcWeight = Number(this.currentWeight) > Number(this.miniKilo) ? Number(this.currentWeight) : Number(this.miniKilo)
-			this.totalFee = Number(this.calcWeight) * Number(this.kiloFee)
-			this.totalFee = parseFloat(this.totalFee.toFixed(2))
+			price = parseFloat(price)
+			return price
 		}
-		this.list = list;
-
-		this.productPrice = this.allPrice.toFixed(2)
-		this.modifyPrice = Number(this.productPrice) + Number(this.totalFee)
-		this.modifyPrice = parseFloat(this.modifyPrice.toFixed(2))
-
-	},
-	computed: {
-		...mapGetters(["getMerchantInfo", "getLoginInfo"])
 	},
 	methods: {
 		...mapActions(["initMerchantInfo"]),
 		init() {
 			this._getDet()
 		},
+		changeSendType(num){
+			this.form.sendType = num
+		},
 		bindDateChange(e){
 			let date = e.detail.value
 			this.sendTimeWant = date
@@ -309,14 +259,17 @@ export default {
 			});
 		},
 		affirmFormSubmit(){
-			const product = this.list.map(ele => {
+			const product = this.selectList.map(ele => {
 				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
 			});
+			if (this.$util.isEmpty(product)){
+				this.$msg('请选择花材')
+				return false				
+			}
 			if(this.sendTimeWant==''){
 				this.$msg('请选择配送时间')
 				return false
 			}
-
 			let xj = []
 			this.selectList.forEach((item) => {
 				let hasItem = uni.getStorageSync("ghsColorItem"+this.ghsInfo.id+"_"+item.itemId)
@@ -324,11 +277,10 @@ export default {
 					xj.push(hasItem)
 				}
 			})
-
 			let params = {
-				getType:this.form.sendType,
+				sendType:this.form.sendType,
 				sendTimeWant:this.sendTimeWant,
-				sendCost:this.form.sendType==2?'':this.form.sendCost,
+				sendCost:0,
 				remark:this.remark,
 				product:JSON.stringify(product),
 				ghsId:this.ghsInfo.id,
@@ -411,9 +363,7 @@ export default {
 				} else {
 					this.$msg(checkRes);
 				}
-			} catch (error) {
-				console.log(999999, error);
-			}
+			} catch (error) { }
 		},
 		gobackEvent() {
 			this.$util.pageTo({url: "/pagesPurchase/bookProduct",query: {id:this.options.id},type: 2})
@@ -496,12 +446,12 @@ export default {
 				border-top: 1px solid #eeeeee;
 				.operate-view {
 					display: flex;
-
 					align-items: center;
 					color: #3385ff;
-					font-size: 26upx;
+					font-size: 30upx;
+					font-weight:bold;
 					.iconfont {
-						margin-right: 20upx;
+						margin-right:16upx;
 						font-size: 40upx;
 					}
 				}

+ 29 - 7
hdApp/src/admin/home/workbench.vue

@@ -92,7 +92,7 @@
             </view>
             <view class="text-group_7 flex-col justify-between" @click="enterShop(ghsInfo)">
               <text class="text_8">{{ghsInfo.name}}</text>
-              <text class="text_9">{{ghsInfo.address}}{{ghsInfo.floor}}</text>
+              <text class="text_9"></text>
             </view>
           </view>
           <view class="box_4 flex-col"></view>
@@ -113,6 +113,9 @@
           </view>
           <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
           <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
+
+          <view class="button_6 flex-col" v-if="ghsInfo.presell && ghsInfo.presell == 1" @click="bookItem(ghsInfo)"><text class="text_13">预订</text></view>
+
         </view>
 
       </template>
@@ -123,8 +126,6 @@
     </view>
   </view>
 
-
-
   </view>
 
   </block>
@@ -229,6 +230,10 @@ export default {
       })
   },
   methods: {
+    bookItem(item){
+      const { id } = item
+      this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
+    },
     enterShop(item) {
       if(item.isOpen == 0){
         this.$msg('已休店,请选择其它门店')
@@ -791,8 +796,8 @@ export default {
         background-size: 137upx 137upx;
         width: 130upx;
         position: absolute;
-        left: 600upx;
-        top: 80upx;
+        left: 585upx;
+        top: 98upx;
         border-radius:39upx;
         .text_13 {
           color: rgba(255, 255, 255, 1);
@@ -808,8 +813,25 @@ export default {
         background-size: 137upx 137upx;
         width: 130upx;
         position: absolute;
-        left: 600upx;
-        top: 80upx;
+        left: 585upx;
+        top: 98upx;
+        border-radius:39upx;
+        .text_13 {
+          color: rgba(255, 255, 255, 1);
+          font-size: 30upx;
+          font-weight:bold;
+        }
+      }
+      .button_6 {
+        height: 80upx;
+        line-height:80upx;
+        text-align:center;
+        background-color:rgb(18, 175, 18);
+        background-size: 137upx 137upx;
+        width: 130upx;
+        position: absolute;
+        left: 390upx;
+        top: 98upx;
         border-radius:39upx;
         .text_13 {
           color: rgba(255, 255, 255, 1);

+ 3 - 3
hdApp/src/config.js

@@ -1,4 +1,4 @@
 export const ProjectName = 'hd'
-export const APIHOST = 'https://api.shop.huahb.cn'
-export const IMGHOST = 'https://img.huahb.cn'
-export const CURRENT_ENV = 'production'
+export const APIHOST = 'https://api.shop.huaml.com'
+export const IMGHOST = 'https://img.huaml.com'
+export const CURRENT_ENV = 'dev'

+ 6 - 6
hdApp/src/ext.json

@@ -1,12 +1,12 @@
 {
   "extEnable": true,
-  "extAppid": "wx0d42f5f1dcb3a370",
+  "extAppid": "wxe4675bab299a52f7",
   "directCommit": false,
   "ext": {
-    "account": 12358,
-    "apiHost": "https://api.shop.huahb.cn",
-    "socketApiHost": "api.shop.huahb.cn",
-    "imgHost": "https://img.huahb.cn",
-    "name":"花掌柜"
+    "account": 12362,
+    "apiHost": "https://api.shop.huaml.com",
+    "socketApiHost": "api.shop.huaml.com",
+    "imgHost": "https://img.huaml.com",
+    "name":"花美玲"
   }
 }

+ 1 - 1
hdApp/src/manifest.json

@@ -157,7 +157,7 @@
     "quickapp" : {},
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     "mp-weixin" : {
-        "appid" : "wx0d42f5f1dcb3a370",
+        "appid" : "wxe4675bab299a52f7",
         "setting" : {
             "urlCheck" : false
         },

+ 1 - 5
hdApp/src/pagesPurchase/bookExplain.vue

@@ -7,11 +7,7 @@
     </view>
     <view class="rank-bottom-wrap">
       <view class="rank-text">
-        <view>提前订货按门店进货价销售</view>
-        <view>下单时按下单当天销售价付款,到货后按到货当天进货价结算,多退少补</view>
-        <view>门店仅收取服务费,每公斤服务费{{parseFloat(kiloFee)}}元,不足{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤计算</view>
-        <view>当天15点前下单,第二天送达,15点后下单的,第三天送达</view>
-        <view>预订下单成功后不能取消</view>
+        <view>预订下单后不能退款!</view>
       </view>
       <view style="text-align:center;">
         <button style="margin:10upx auto;padding-left:50upx;padding-right:50upx;" class="admin-button-com blue middle" @click="goBack()">返回</button>

+ 271 - 13
hdApp/src/pagesPurchase/bookProduct.vue

@@ -8,13 +8,11 @@
 
 			<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id='+ghsInfo.id})">
 				{{ghsInfo.name}}
-				<text class="level">{{ghsInfo.giveLevelName||'普店'}}</text>
 			</view>
 
 			<view class="shop_intro">
-				<text>已采购 {{parseFloat(ghsInfo.expendAmount) || '0'}}</text>
-				<text style="margin-left:16upx;">欠款 {{parseFloat(ghsInfo.debtAmount) || '0'}}</text>
-				<text @click="pageTo('/pagesPurchase/bookExplain?id='+ghsInfo.id)" style="margin-left:16upx;font-weight:bold;text-decoration:underline;color:#060606;">预订说明</text>
+				<text>欠款 {{parseFloat(ghsInfo.debtAmount) || '0'}}</text>
+				<text @click="pageTo('/pagesPurchase/bookExplain?id='+ghsInfo.id)" style="margin-left:26upx;font-weight:bold;text-decoration:underline;color:red;">预售说明</text>
 			</view>
 
         </view>
@@ -22,11 +20,14 @@
       </view>
     </view>
 		<view class="input-wrap" >
+			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
+				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
+			</view>
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入首字母找花材,小菊输xj" @input="searchFn" />
+				<app-search-module v-model="py" placeholder="输入拼音首字母也可以搜索" @input="searchFn" />
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
-				<button class="admin-button-com middle blue" @click="removeMemory(option.id)">清除已选</button>
+				<button class="admin-button-com middle blue" @click="delMemory()">清除已选</button>
 			</view>
 		</view>
 		<view class="scroll-middle_bx">
@@ -53,7 +54,7 @@
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title">{{ classItem.className }}</view>
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 185upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+							<view :class="[productItem.variety == 1 ? 'color-box' : 'box']" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
 								<Commondity v-if="classItem.isActive"
 									:info="productItem"
 									:offVerifyRepertory="true"
@@ -67,6 +68,9 @@
 									@showBigCover="showBigCover"
 									@goToSpecialVariety="goToSpecialVariety"
 								></Commondity>
+								<view v-if="productItem.variety && productItem.variety == 1" class="has-color" @click="goToSpecialVariety(productItem)">
+									<view class="has-color-button">点我选颜色</view>
+								</view>
 							</view>
 						</template>
 					</view>
@@ -78,7 +82,7 @@
 			</scroll-view>
 
 		</view>
-		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30upx 30upx" >
+		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"></view>
@@ -89,11 +93,58 @@
 			</template>
 		</modal-module>
 
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
+		<view v-if="cartItemShow == true" style="position: fixed;z-index: 190;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0, 0, 0, 0.6);color: #fff;" @click="hideCartItem()">
+			<view style="position: fixed;bottom: 108upx;width:100vw;heigh:300upx;background-color:white;" @click.stop="">
+				<view class="commodity-view">
+					<view class="summary-bar">
+						<button class="admin-button-com blue mini-btn" @click.stop="delMemory()">清空花材</button>
+					</view>
+					<view class="commodity-list">
+						<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+							<image class="item-icon" :src="item.cover" alt="" />
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ item.itemName }}</text>
+									<text class="item-price">
+										<text class="unit">¥</text>
+										<text class="price">
+											{{ parseFloat(item.bigPrice)||0 }}
+										</text>
+									</text>
+								</view>
+								<view style="text-align:right;">
+									<view class="open-bx" >
+										<i class="iconfont iconjian" @click.stop="delItem(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
+										<text class="num" @click.stop="customUpdate(item)">
+										<text v-if="item.bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
+										<text v-if="item.smallCount > 0"><text v-if="item.bigCount > 0">/</text>{{ item.smallCount }}</text>
+										</text>
+										<i class="iconfont iconzeng" @click.stop="addEvents(item)"></i>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+		<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+
+			<view v-for="(item, index) in filterProductInfo" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
+			<image :src="item.classCover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+			<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
+			</view>
+
+		</view>
+		</uni-popup>
+
 	</view>
 </template>
 
@@ -173,7 +224,8 @@ export default {
 			//预订单最低公斤数
 			miniKilo:0,
 			//每公斤服务费
-			kiloFee:0
+			kiloFee:0,
+			cartItemShow:false,
 		};
 	},
 	onPullDownRefresh() {
@@ -273,6 +325,52 @@ export default {
 
 	},
 	methods: {
+		changeClass(index){
+			this.$refs.selectFlowerNumRef.close()
+			this.swichClass(index)
+		},
+		customUpdate(item) {
+			if(item.variety == 0){
+				this.customNum({ ...item, bigCount: item.bigCount, smallCount: item.smallCount })
+			}else{
+				this.$msg('多颜色请在列表里修改')
+			}
+		},
+		delItem(item) {
+			if(item.variety == 0){
+				this.delEvent(item)
+			}else{
+				this.$msg('多颜色请在列表里修改')
+			}
+		},
+		addEvents(item) {
+			if(item.variety == 0){
+				this.addEvent(item)
+			}else{
+				this.$msg('多颜色请在列表里修改')
+			}
+		},
+		showCartItem(){
+			if(this.cartItemShow == true){
+				this.cartItemShow = false
+			}else{
+				if(!this.$util.isEmpty(this.selectList)){
+					if(this.cartItemShow == false){
+						this.cartItemShow = true
+					}
+				}
+			}
+		},
+		hideCartItem(){
+			this.cartItemShow = false
+		},
+		delMemory(){
+			this.cartItemShow = false
+			this.removeMemory(this.option.id)
+		},
+		selectFlowerNumFn(){
+			this.$refs.selectFlowerNumRef.open('top')
+		},
 		closeInvite(){
 			this.showInvite = false
 		},
@@ -688,9 +786,29 @@ export default {
 	}
 	.item_list_bx {
 		padding: 40upx 16upx;
-    &:last-child{
-      margin-bottom: 70upx;
-    }
+		&:last-child{
+			margin-bottom: 70upx;
+		}
+		.box{
+			height: 185upx
+		}
+		.color-box{
+			height: 285upx
+		}
+		.has-color{
+			display:flex;
+			justify-content:center;
+			align-items:center;
+			height:110upx;
+			border-bottom:1upx solid rgb(247, 243, 243);
+			.has-color-button{
+				border:1upx solid #5a99f7;
+				border-radius:15upx;
+				padding:13upx 16upx;
+				font-size:30upx;
+				color:#3385ff;
+			}
+		}
 	}
 	.item_list_title {
 		margin-bottom: 20upx;
@@ -765,4 +883,144 @@ export default {
     }
   }
 }
+.commodity-view {
+	display: flex;
+	flex-direction: column;
+	.commodity-list {
+		overflow:scroll;
+		height:50vh;
+		padding: 20upx;
+		.commodity-item {
+			display: flex;
+			margin-bottom: 20upx;
+			.item-icon {
+				flex-shrink: 0;
+				width: 140upx;
+				height: 140upx;
+			}
+			.item-info {
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				flex: 1;
+				margin-left: 20upx;
+				.info-line {
+					margin-bottom: 20upx;
+					display: flex;
+					justify-content: space-between;
+					align-items: flex-end;
+					.item-name {
+						color: #666;
+						font-size: 28upx;
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						width:400upx;
+					}
+					.item-price {
+						color: #333;
+						font-size: 22upx;
+						.price {
+							font-size: 32upx;
+							font-weight: bold;
+						}
+					}
+					.item-type {
+						color: #999;
+						font-size: 24upx;
+					}
+					.item-count {
+						color: #666;
+						font-size: 24upx;
+					}
+				}
+
+
+	.open-bx {
+		align-items: center;
+		& .iconfont {
+			color: #3385ff;
+			font-size: 60upx;
+		}
+
+		.position{
+			display: block;
+			width: 70upx;
+			text-align: center;
+		}
+		.iconcachu {
+			margin: 0 6upx 0 20upx;
+			color: #ccc;
+			&.edit {
+				color: #3385ff;
+			}
+		}
+		& > .num {
+			display: inline-block;
+			width: 130upx;
+			height:55upx;
+			line-height:55upx;
+			text-align:center;
+			margin: 0 8upx;
+			color: #868686;
+			border-radius: 22upx;
+			background-color: #f5f5f5;
+			font-size: 28upx;
+		}
+		.change-input {
+			width: 164upx;
+			height: 60upx;
+			line-height: 60upx;
+			text-align: center;
+			background: #ffffff;
+			border: 1upx solid #dddddd;
+			border-radius: 4upx;
+			font-size: 25upx;
+		}
+		.btn-box{
+			width: 100upx;
+			height: 60upx;
+			line-height: 60upx;
+			color: #ffffff;
+			background: #3385ff;
+			text-align: center;
+			border-radius: 10upx;
+		}
+	}
+
+			}
+		}
+	}
+	.summary-bar {
+		padding: 0 20upx;
+		height: 90upx;
+		display: flex;
+
+		align-items: center;
+		justify-content: space-between;
+		border-top: 1px solid #eeeeee;
+		.operate-view {
+			display: flex;
+			align-items: center;
+			color: #3385ff;
+			font-size: 28upx;
+			font-weight:bold;
+			.iconfont {
+				margin-right: 20upx;
+				font-size: 40upx;
+			}
+		}
+		.describe-view {
+			display: flex;
+
+			align-items: center;
+			color: #333;
+			font-size: 24upx;
+			.price {
+				font-weight: bold;
+				font-size: 36upx;
+			}
+		}
+	}
+}
 </style>

+ 10 - 7
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -121,11 +121,11 @@
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
-		<view v-if="cartItemShow == true" style="position: fixed;z-index: 190;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0, 0, 0, 0.6);color: #fff;">
-			<view style="position: fixed;bottom: 108upx;width:100vw;heigh:300upx;background-color:white;">
+		<view v-if="cartItemShow == true" style="position: fixed;z-index: 190;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0, 0, 0, 0.6);color: #fff;" @click="hideCartItem()">
+			<view style="position: fixed;bottom: 108upx;width:100vw;heigh:300upx;background-color:white;" @click.stop="">
 				<view class="commodity-view">
 					<view class="summary-bar">
-						<button class="admin-button-com blue mini-btn" @click="delMemory()">清空花材</button>
+						<button class="admin-button-com blue mini-btn" @click.stop="delMemory()">清空花材</button>
 					</view>
 					<view class="commodity-list">
 						<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
@@ -142,12 +142,12 @@
 								</view>
 								<view style="text-align:right;">
 									<view class="open-bx" >
-										<i class="iconfont iconjian" @click="delItem(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
-										<text class="num" @click="customUpdate(item)">
+										<i class="iconfont iconjian" @click.stop="delItem(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
+										<text class="num" @click.stop="customUpdate(item)">
 										<text v-if="item.bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
 										<text v-if="item.smallCount > 0"><text v-if="item.bigCount > 0">/</text>{{ item.smallCount }}</text>
 										</text>
-										<i class="iconfont iconzeng" @click="addEvents(item)"></i>
+										<i class="iconfont iconzeng" @click.stop="addEvents(item)"></i>
 									</view>
 								</view>
 							</view>
@@ -343,6 +343,9 @@ export default {
 
 	},
 	methods: {
+		hideCartItem(){
+			this.cartItemShow = false
+		},
 		hideClassRemind(){
 			hasClassRemind().then(res=>{
 				if(res.code ==1){
@@ -357,7 +360,7 @@ export default {
 		selectFlowerNumFn(){
 			this.$refs.selectFlowerNumRef.open('top')
 		},
-		delMemory(id){
+		delMemory(){
 			this.cartItemShow = false
 			this.removeMemory(this.option.id)
 		},

+ 31 - 7
hdApp/src/pagesPurchase/order.vue

@@ -7,11 +7,11 @@
         <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
           <view class="image-text_7 flex-row justify-between">
             <view class="section_1 flex-col">
-              <image class="logo" :src="ghsInfo.avatar" @click="enterShop(ghsInfo)" />
+              <image class="logo" :src="ghsInfo.avatar" />
             </view>
-            <view class="text-group_7 flex-col justify-between" @click="enterShop(ghsInfo)">
+            <view class="text-group_7 flex-col justify-between">
               <text class="text_8">{{ghsInfo.name}}</text>
-              <text class="text_9">{{ghsInfo.address}}{{ghsInfo.floor}}</text>
+              <text class="text_9"></text>
             </view>
           </view>
           <view class="box_4 flex-col"></view>
@@ -32,6 +32,9 @@
           </view>
           <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
           <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
+
+          <view class="button_6 flex-col" v-if="ghsInfo.presell && ghsInfo.presell == 1" @click="bookItem(ghsInfo)"><text class="text_13">预订</text></view>
+
         </view>
 
       </template>
@@ -60,6 +63,10 @@ export default {
     })
   },
   methods: {
+    bookItem(item){
+      const { id } = item
+      this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
+    },
     enterShop(item) {
       if(item.isOpen == 0){
         this.$msg('已休店,请选择其它门店')
@@ -346,8 +353,8 @@ export default {
         background-size: 137upx 137upx;
         width: 130upx;
         position: absolute;
-        left: 590upx;
-        top: 80upx;
+        left: 585upx;
+        top: 98upx;
         border-radius:39upx;
         .text_13 {
           color: rgba(255, 255, 255, 1);
@@ -363,8 +370,25 @@ export default {
         background-size: 137upx 137upx;
         width: 130upx;
         position: absolute;
-        left: 590upx;
-        top: 80upx;
+        left: 585upx;
+        top: 98upx;
+        border-radius:39upx;
+        .text_13 {
+          color: rgba(255, 255, 255, 1);
+          font-size: 30upx;
+          font-weight:bold;
+        }
+      }
+      .button_6 {
+        height: 80upx;
+        line-height:80upx;
+        text-align:center;
+        background-color:rgb(18, 175, 18);
+        background-size: 137upx 137upx;
+        width: 130upx;
+        position: absolute;
+        left: 390upx;
+        top: 98upx;
         border-radius:39upx;
         .text_13 {
           color: rgba(255, 255, 255, 1);

+ 8 - 7
hdApp/src/pagesPurchase/purDetails.vue

@@ -276,7 +276,7 @@ export default {
 		}
 	},
   onPullDownRefresh() {
-			this.initData().then(res => {
+			this.initData(this.id).then(res => {
 				uni.stopPullDownRefresh()
 			})
 	},
@@ -331,13 +331,14 @@ export default {
       if(this.option.id){
         id = this.option.id
       }else{
-		//小票上的二维码打开
-		//https://api.shop.huaml.com/#/pagesPurchase/purDetails?id=1292
-		if(this.option.q){
-			let currentUrl = decodeURIComponent(this.option.q)
-			id = currentUrl.substring(currentUrl.lastIndexOf("?id=") + 4)
-		}
+        //小票上的二维码打开
+        //https://api.shop.huaml.com/#/pagesPurchase/purDetails?id=1292
+        if(this.option.q){
+          let currentUrl = decodeURIComponent(this.option.q)
+          id = currentUrl.substring(currentUrl.lastIndexOf("?id=") + 4)
+        }
       }
+      this.id = id
       this.initData(id)
     },
     initData (id) {

+ 6 - 6
hdApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {

+ 3 - 3
hdPad/src/config.js

@@ -1,4 +1,4 @@
 export const ProjectName = 'hd'
-export const APIHOST = 'https://api.shop.huahb.cn'
-export const IMGHOST = 'https://img.huahb.cn'
-export const CURRENT_ENV = 'production'
+export const APIHOST = 'https://api.shop.huaml.com'
+export const IMGHOST = 'https://img.huaml.com'
+export const CURRENT_ENV = 'dev'

+ 6 - 6
hdPad/src/ext.json

@@ -1,12 +1,12 @@
 {
   "extEnable": true,
-  "extAppid": "wx0d42f5f1dcb3a370",
+  "extAppid": "wxe4675bab299a52f7",
   "directCommit": false,
   "ext": {
-    "account": 12358,
-    "apiHost": "https://api.shop.huahb.cn",
-    "socketApiHost": "api.shop.huahb.cn",
-    "imgHost": "https://img.huahb.cn",
-    "name":"花掌柜"
+    "account": 12362,
+    "apiHost": "https://api.shop.huaml.com",
+    "socketApiHost": "api.shop.huaml.com",
+    "imgHost": "https://img.huaml.com",
+    "name":"花美玲"
   }
 }

+ 1 - 1
hdPad/src/manifest.json

@@ -118,7 +118,7 @@
     "quickapp" : {},
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     "mp-weixin" : {
-        "appid" : "wx0d42f5f1dcb3a370",
+        "appid" : "wxe4675bab299a52f7",
         "setting" : {
             "urlCheck" : false
         },

+ 6 - 6
hdPad/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://img.huahb.cn/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('https://img.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {