Jelajahi Sumber

门店下单管理

shish 4 tahun lalu
induk
melakukan
8ee4b6942f
3 mengubah file dengan 45 tambahan dan 32 penghapusan
  1. 25 24
      ghsApp/src/admin/shop/add.vue
  2. 1 1
      ghsApp/src/pages.json
  3. 19 7
      hdApp/src/pagesPurchase/order.vue

+ 25 - 24
ghsApp/src/admin/shop/add.vue

@@ -3,23 +3,38 @@
 		<form @submit="formSubmit">
 		<form @submit="formSubmit">
 			<view class="module-com input-line-wrap">
 			<view class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title required">门店名称</view>
+					<view class="tui-title">名称</view>
 					<input v-model="form.shopName" placeholder-class="phcolor" class="tui-input" name="shopName" placeholder="请输入名称,如同安店" maxlength="50" type="text" />
 					<input v-model="form.shopName" placeholder-class="phcolor" class="tui-input" name="shopName" placeholder="请输入名称,如同安店" maxlength="50" type="text" />
 				</tui-list-cell>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title">营业状态</view>
-					<view><switch style="transform:scale(0.7,0.7)" :checked="form.open == 0 ? false : true" @change="openChange" /></view>
+					<view class="tui-title">类型</view>
+					<radio-group class="tui-input" @change="joinChange">
+						<label class="list" for="chainLink">
+							<radio id="chainLink" value="0" :checked="form.join == 0" style="transform:scale(0.7,0.7)" />
+							<span class="checkbox-text">直营</span>
+						</label>
+						<label class="list" for="joinLink">
+							<radio id="joinLink" value="1" :checked="form.join == 1" style="transform:scale(0.7,0.7)" />
+							<span class="checkbox-text">加盟</span>
+						</label>
+					</radio-group>
+				</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.open == 0 ? false : true" @change="openChange" /> {{form.open==0 ? '休息' : '营业'}}
+					</view>
 				</tui-list-cell>
 				</tui-list-cell>
 				<template v-if="visible">
 				<template v-if="visible">
 					<tui-list-cell class="line-cell" :hover="false">
 					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">营业时间</view>
+						<view class="tui-title">时间</view>
 						<radio-group class="tui-input" @change="radioChange">
 						<radio-group class="tui-input" @change="radioChange">
 							<label class="list" for="hourLink">
 							<label class="list" for="hourLink">
-								<radio id="hourLink" value="0" :checked="form.openType == 0" />
+								<radio id="hourLink" value="0" :checked="form.openType == 0" style="transform:scale(0.7,0.7)" />
 								<span class="checkbox-text">24小时</span>
 								<span class="checkbox-text">24小时</span>
 							</label>
 							</label>
 							<label class="list" for="setTimeLink">
 							<label class="list" for="setTimeLink">
-								<radio id="setTimeLink" value="1" :checked="form.openType == 1" />
+								<radio id="setTimeLink" value="1" :checked="form.openType == 1" style="transform:scale(0.7,0.7)" />
 								<span class="checkbox-text">指定时段</span>
 								<span class="checkbox-text">指定时段</span>
 							</label>
 							</label>
 							<input v-model="form.openType" name="openType" hidden />
 							<input v-model="form.openType" name="openType" hidden />
@@ -43,36 +58,23 @@
 					</template>
 					</template>
 				</template>
 				</template>
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title">门店类型</view>
-					<radio-group class="tui-input" @change="joinChange">
-						<label class="list" for="chainLink">
-							<radio id="chainLink" value="0" :checked="form.join == 0" />
-							<span class="checkbox-text">直营店</span>
-						</label>
-						<label class="list" for="joinLink">
-							<radio id="joinLink" value="1" :checked="form.join == 1" />
-							<span class="checkbox-text">加盟店</span>
-						</label>
-					</radio-group>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title required">手机号</view>
+					<view class="tui-title">手机</view>
 					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" maxlength="50" type="number" />
 					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" maxlength="50" type="number" />
 				</tui-list-cell>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
-					<view class="tui-title required">所在城市</view>
+					<view class="tui-title">城市</view>
 					<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
 					<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
 					<view class="tui-placeholder" v-else>请选择</view>
 					<view class="tui-placeholder" v-else>请选择</view>
 					<input v-model="form.province" name="province" hidden />
 					<input v-model="form.province" name="province" hidden />
 				</tui-list-cell>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
-					<view class="tui-title required">地址</view>
+					<view class="tui-title">地址</view>
 					<view class="tui-input" v-if="form.address">{{ form.address }}</view>
 					<view class="tui-input" v-if="form.address">{{ form.address }}</view>
 					<view class="tui-placeholder" v-else>请填写详细地址</view>
 					<view class="tui-placeholder" v-else>请填写详细地址</view>
 					<input v-model="form.address" name="address" hidden />
 					<input v-model="form.address" name="address" hidden />
 				</tui-list-cell>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
-					<view class="tui-title ">门牌</view>
+					<view class="tui-title ">门牌</view>
 					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
 					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
 				</tui-list-cell>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell remark-wrap" :hover="false">
 				<tui-list-cell class="line-cell remark-wrap" :hover="false">
@@ -82,7 +84,6 @@
 					</view>
 					</view>
 				</tui-list-cell>
 				</tui-list-cell>
 			</view>
 			</view>
-			<!-- 提交 -->
 			<view class="confirm-btn">
 			<view class="confirm-btn">
 				<button class="admin-button-com big blue" formType="submit">提交</button>
 				<button class="admin-button-com big blue" formType="submit">提交</button>
 			</view>
 			</view>

+ 1 - 1
ghsApp/src/pages.json

@@ -157,7 +157,7 @@
 		{
 		{
 			"root": "admin/shop",
 			"root": "admin/shop",
 			"pages": [
 			"pages": [
-				{"path": "list","style": {"navigationBarTitleText": "店铺管理"}},
+				{"path": "list","style": {"navigationBarTitleText": "店"}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
 				{"path": "print","style": {"navigationBarTitleText": "云打印"}},
 				{"path": "print","style": {"navigationBarTitleText": "云打印"}},
 				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}},
 				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}},

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

@@ -10,7 +10,7 @@
               <view class="accumulative"></view>
               <view class="accumulative"></view>
             </view>
             </view>
             <text class="debt-amount" v-if="Number(ghsInfo.debtAmount)>0">-¥{{parseFloat(ghsInfo.debtAmount)}}</text>
             <text class="debt-amount" v-if="Number(ghsInfo.debtAmount)>0">-¥{{parseFloat(ghsInfo.debtAmount)}}</text>
-            <view class="cg-button" @click="enterShop(ghsInfo)">进店</view>
+            <view :class="[ghsInfo.isOpen == 0 ? 'cg-button-rest' : 'cg-button']" @click="enterShop(ghsInfo)">进店</view>
 
 
             <view class="store_btn">
             <view class="store_btn">
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})">结账单</view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})">结账单</view>
@@ -18,8 +18,8 @@
               <view class="btn_entrance" @click="settleAccounts(ghsInfo)"> 待结订单 </view>
               <view class="btn_entrance" @click="settleAccounts(ghsInfo)"> 待结订单 </view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})">欠款变动明细</view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})">欠款变动明细</view>
             </view>
             </view>
-            <text v-if="ghsInfo.isOpen == 0" style="position:absolute;bottom:90upx;left:120upx;color:#3385FF;">休息了</text>
-            <text v-if="ghsInfo.isOpen == 0" style="position:absolute;bottom:90upx;right:50upx;color:#3385FF;">营业 {{ghsInfo.openStartTime}}-{{ghsInfo.openEndTime}}</text>
+            <text v-if="ghsInfo.isOpen == 0" 
+            style="position:absolute;top:0upx;left:0upx;color:white;background-color:#CCCCCC;padding:3upx 18upx;font-size:24upx;">已休店</text>
           </view>
           </view>
         </block>
         </block>
         <block v-else>
         <block v-else>
@@ -71,7 +71,7 @@ export default {
 		},
 		},
     enterShop(item) {
     enterShop(item) {
       if(item.isOpen == 0){
       if(item.isOpen == 0){
-        this.$msg('门店休息了')
+        this.$msg('门店休息了')
         return false
         return false
       }
       }
       const { id } = item
       const { id } = item
@@ -145,7 +145,7 @@ export default {
       .debt-amount{
       .debt-amount{
         color:red;
         color:red;
         position: absolute;
         position: absolute;
-        top:65upx;
+        top:75upx;
         font-size:26upx;
         font-size:26upx;
         right:260upx;
         right:260upx;
       }
       }
@@ -157,10 +157,22 @@ export default {
           border-radius: 110upx;
           border-radius: 110upx;
           padding: 20upx 35upx;
           padding: 20upx 35upx;
           position: absolute;
           position: absolute;
-          top:40upx;
+          top:50upx;
           right:70upx;
           right:70upx;
           background: #3385FF;
           background: #3385FF;
       }
       }
+      .cg-button-rest{
+          display: inline-block;
+          font-size: 28upx;
+          color: white;
+          border: 1px solid #CCCCCC;
+          border-radius: 110upx;
+          padding: 20upx 35upx;
+          position: absolute;
+          top:50upx;
+          right:70upx;
+          background: #CCCCCC;
+      }
       .book-button{
       .book-button{
           display: inline-block;
           display: inline-block;
           font-size: 25upx;
           font-size: 25upx;
@@ -200,7 +212,7 @@ export default {
         width: 700upx;
         width: 700upx;
         display: block;
         display: block;
         position: absolute;
         position: absolute;
-        top:50upx;
+        top:70upx;
         left: 0upx;
         left: 0upx;
         image{
         image{
           width:50upx;
           width:50upx;