xiaoshushu před 3 roky
rodič
revize
f2497ca29a

+ 23 - 0
smart-admin/src/main/java/com/huijy/web/controller/api/ApiIndexController.java

@@ -375,6 +375,29 @@ public class ApiIndexController extends ApiAbstractController {
         return AjaxResult.success(orderService.insertShopRoomOrder(order));
     }
 
+    @GetMapping("/order")
+    @ApiOperation("酒店预订订单")
+    public TableDataInfo order(@LoginMember Member member, ShopRoomOrder order) {
+        startPage();
+        order.setMemberId(member.getMemberId());
+        List<ShopRoomOrder> list = orderService.selectShopRoomOrder(order);
+        return getDataTable(list);
+    }
+
+    //商家订单处理
+    @PostMapping("/orderDeal")
+    @ApiOperation("商家订单处理")
+    public AjaxResult orderDeal(@RequestBody ShopRoomOrder order) {
+        return AjaxResult.success(orderService.updateShopRoomOrder(order));
+    }
+
+    //商家订单删除
+    @GetMapping("/orderDelete")
+    @ApiOperation("商家订单删除")
+    public AjaxResult orderDelete(Long id) {
+        return AjaxResult.success(orderService.deleteShopRoomOrderById(id));
+    }
+
     //商家删除酒店房间
     @GetMapping("/roomDel")
     @ApiOperation("商家删除酒店房间")

+ 34 - 0
smart-system/src/main/java/com/huijy/management/domain/ShopRoomOrder.java

@@ -73,6 +73,40 @@ public class ShopRoomOrder extends BaseEntity {
     @Excel(name = "天数")
     private Long days;
 
+    private ShopRoom shopRoom;
+
+    private String shopName;
+    private String shopId;
+    private String role;
+
+    public String getRole() {
+        return role;
+    }
+
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    public String getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public ShopRoom getShopRoom() {
+        return shopRoom;
+    }
+
+    public void setShopRoom(ShopRoom shopRoom) {
+        this.shopRoom = shopRoom;
+    }
+
     public void setId(Long id) {
         this.id = id;
     }

+ 12 - 9
smart-system/src/main/java/com/huijy/management/mapper/ShopRoomOrderMapper.java

@@ -1,19 +1,20 @@
 package com.huijy.management.mapper;
 
 import java.util.List;
+
 import com.huijy.management.domain.ShopRoomOrder;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 酒店房间预订Mapper接口
- * 
+ *
  * @author lishuwen
  * @date 2021-11-10
  */
-public interface ShopRoomOrderMapper 
-{
+public interface ShopRoomOrderMapper {
     /**
      * 查询酒店房间预订
-     * 
+     *
      * @param id 酒店房间预订主键
      * @return 酒店房间预订
      */
@@ -21,7 +22,7 @@ public interface ShopRoomOrderMapper
 
     /**
      * 查询酒店房间预订列表
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 酒店房间预订集合
      */
@@ -29,7 +30,7 @@ public interface ShopRoomOrderMapper
 
     /**
      * 新增酒店房间预订
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface ShopRoomOrderMapper
 
     /**
      * 修改酒店房间预订
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface ShopRoomOrderMapper
 
     /**
      * 删除酒店房间预订
-     * 
+     *
      * @param id 酒店房间预订主键
      * @return 结果
      */
@@ -53,9 +54,11 @@ public interface ShopRoomOrderMapper
 
     /**
      * 批量删除酒店房间预订
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
     public int deleteShopRoomOrderByIds(Long[] ids);
+
+    public List<ShopRoomOrder> selectShopRoomOrder(ShopRoomOrder shopRoomOrder);
 }

+ 11 - 9
smart-system/src/main/java/com/huijy/management/service/IShopRoomOrderService.java

@@ -1,19 +1,19 @@
 package com.huijy.management.service;
 
 import java.util.List;
+
 import com.huijy.management.domain.ShopRoomOrder;
 
 /**
  * 酒店房间预订Service接口
- * 
+ *
  * @author lishuwen
  * @date 2021-11-10
  */
-public interface IShopRoomOrderService 
-{
+public interface IShopRoomOrderService {
     /**
      * 查询酒店房间预订
-     * 
+     *
      * @param id 酒店房间预订主键
      * @return 酒店房间预订
      */
@@ -21,7 +21,7 @@ public interface IShopRoomOrderService
 
     /**
      * 查询酒店房间预订列表
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 酒店房间预订集合
      */
@@ -29,7 +29,7 @@ public interface IShopRoomOrderService
 
     /**
      * 新增酒店房间预订
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface IShopRoomOrderService
 
     /**
      * 修改酒店房间预订
-     * 
+     *
      * @param shopRoomOrder 酒店房间预订
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface IShopRoomOrderService
 
     /**
      * 批量删除酒店房间预订
-     * 
+     *
      * @param ids 需要删除的酒店房间预订主键集合
      * @return 结果
      */
@@ -53,9 +53,11 @@ public interface IShopRoomOrderService
 
     /**
      * 删除酒店房间预订信息
-     * 
+     *
      * @param id 酒店房间预订主键
      * @return 结果
      */
     public int deleteShopRoomOrderById(Long id);
+
+    public List<ShopRoomOrder> selectShopRoomOrder(ShopRoomOrder shopRoomOrder);
 }

+ 14 - 14
smart-system/src/main/java/com/huijy/management/service/impl/ShopRoomOrderServiceImpl.java

@@ -1,6 +1,7 @@
 package com.huijy.management.service.impl;
 
 import java.util.List;
+
 import com.huijy.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -15,8 +16,7 @@ import com.huijy.management.service.IShopRoomOrderService;
  * @date 2021-11-10
  */
 @Service
-public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
-{
+public class ShopRoomOrderServiceImpl implements IShopRoomOrderService {
     @Autowired
     private ShopRoomOrderMapper shopRoomOrderMapper;
 
@@ -27,8 +27,7 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 酒店房间预订
      */
     @Override
-    public ShopRoomOrder selectShopRoomOrderById(Long id)
-    {
+    public ShopRoomOrder selectShopRoomOrderById(Long id) {
         return shopRoomOrderMapper.selectShopRoomOrderById(id);
     }
 
@@ -39,8 +38,7 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 酒店房间预订
      */
     @Override
-    public List<ShopRoomOrder> selectShopRoomOrderList(ShopRoomOrder shopRoomOrder)
-    {
+    public List<ShopRoomOrder> selectShopRoomOrderList(ShopRoomOrder shopRoomOrder) {
         return shopRoomOrderMapper.selectShopRoomOrderList(shopRoomOrder);
     }
 
@@ -51,8 +49,7 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 结果
      */
     @Override
-    public int insertShopRoomOrder(ShopRoomOrder shopRoomOrder)
-    {
+    public int insertShopRoomOrder(ShopRoomOrder shopRoomOrder) {
         shopRoomOrder.setCreateTime(DateUtils.getNowDate());
         return shopRoomOrderMapper.insertShopRoomOrder(shopRoomOrder);
     }
@@ -64,8 +61,7 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 结果
      */
     @Override
-    public int updateShopRoomOrder(ShopRoomOrder shopRoomOrder)
-    {
+    public int updateShopRoomOrder(ShopRoomOrder shopRoomOrder) {
         return shopRoomOrderMapper.updateShopRoomOrder(shopRoomOrder);
     }
 
@@ -76,8 +72,7 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 结果
      */
     @Override
-    public int deleteShopRoomOrderByIds(Long[] ids)
-    {
+    public int deleteShopRoomOrderByIds(Long[] ids) {
         return shopRoomOrderMapper.deleteShopRoomOrderByIds(ids);
     }
 
@@ -88,8 +83,13 @@ public class ShopRoomOrderServiceImpl implements IShopRoomOrderService
      * @return 结果
      */
     @Override
-    public int deleteShopRoomOrderById(Long id)
-    {
+    public int deleteShopRoomOrderById(Long id) {
         return shopRoomOrderMapper.deleteShopRoomOrderById(id);
     }
+
+    @Override
+    public List<ShopRoomOrder> selectShopRoomOrder(ShopRoomOrder shopRoomOrder) {
+        return shopRoomOrderMapper.selectShopRoomOrder(shopRoomOrder);
+    }
+
 }

+ 17 - 5
smart-system/src/main/resources/mapper/management/ShopRoomOrderMapper.xml

@@ -16,6 +16,16 @@
         <result property="max" column="max"/>
         <result property="createTime" column="create_time"/>
         <result property="days" column="days"/>
+        <result property="shopId" column="shopId"/>
+        <result property="shopName" column="shopName"/>
+        <association property="shopRoom" javaType="ShopRoom" resultMap="ShopRoomResult"/>
+    </resultMap>
+
+    <resultMap type="shopRoom" id="ShopRoomResult">
+        <result property="title" column="title"/>
+        <result property="price" column="price"/>
+        <result property="pic" column="pic"/>
+        <result property="nums" column="nums"/>
     </resultMap>
 
     <sql id="selectShopRoomOrderVo">
@@ -36,11 +46,13 @@
         where id = #{id}
     </select>
 
-    <select id="selectShopRoomOrderByUser" parameterType="Long" resultMap="ShopRoomOrderResult">
-       SELECT o.*,r.title,r.pic,r.price,s.name FROM tb_shop_room_order o
-       LEFT JOIN tb_shop_room r ON r.id=o.room_id
-       LEFT JOIN t_shop s ON s.shop_id=r.shop_id
-       WHERE s.member_id=2
+    <select id="selectShopRoomOrder" resultMap="ShopRoomOrderResult">
+        SELECT o.*,r.title,r.pic,r.price,s.name AS shopName,s.shop_id AS shopId FROM tb_shop_room_order o
+        LEFT JOIN tb_shop_room r ON r.id=o.room_id
+        LEFT JOIN t_shop s ON s.shop_id=r.shop_id
+        <if test="role =='member'">WHERE o.member_id=#{memberId}</if>
+        <if test="role =='sale'">WHERE s.member_id=#{memberId}</if>
+        <if test="state != null ">AND o.state = #{state}</if>
     </select>
 
     <insert id="insertShopRoomOrder" parameterType="ShopRoomOrder" useGeneratedKeys="true" keyProperty="id">

+ 1 - 1
smart-ui-app/App.vue

@@ -25,7 +25,7 @@ button::after { border: none }
 /**挂载iconfont图表*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/font_2816842_2k9wa39seum.ttf?t=1633934560136') format('truetype'); //在线
+	src: url('https://at.alicdn.com/t/font_2816842_tkwqsdidrg.ttf?t=1636688754837') format('truetype'); //在线
 	// src: url('~@/static/font/iconfont.ttf') format('truetype'); //本地
 }
 .icon {

+ 71 - 1
smart-ui-app/common/common.scss

@@ -16,6 +16,13 @@
 	background-color: white;
 	padding: 7px;
 }
+.btg {
+	padding: 15px;
+	background-color: #fef0f0;
+	color: #f56c6c;
+	margin-top: 15px;
+	border-radius: 5px;
+}
 .t_item {
 	background-color: white;
 	padding: 18px;
@@ -68,9 +75,14 @@
 		.ms {
 			margin-top: 5px;
 			color: $dar2;
+			.phone{
+				font-size: 30px;
+				    float: right;
+				    margin-top: -30px;
+			}
 			.rmb {
 				color: $orange;
-				font-size: 20px;
+				font-size: 18px;
 				padding-right: 3px;
 			}
 			.ll {
@@ -352,3 +364,61 @@
 		margin-top: 10px;
 	}
 }
+.order_title {
+	padding: 10px;
+	font-size: 15px;
+	font-weight: bold;
+	position: relative;
+	.zhu {
+		float: right;
+		font-size: 12px;
+		margin-top: 2px;
+	}
+}
+.tk {
+	font-size: 13px;
+	background-color: #fef0f0;
+	color: #f56c6c;
+	padding: 7px;
+	border-radius: 5px;
+	margin-top: 7px;
+}
+	.hotel_item {
+		margin-top: 10px;
+		padding: 10px;
+		border-radius: 5px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+		.name {
+			font-size: 20px;
+			font-weight: bold;
+			border-bottom: 1px solid #f2e6e6;
+			padding: 0px 10px 10px 10px;
+		}
+		.address {
+			color: $dar2;
+			padding: 10px;
+			.dz {
+				width: 87%;
+				float: left;
+			}
+			.dh {
+				width: 13%;
+				float: left;
+				color: #03a9f4;
+				text-align: right;
+			}
+		}
+	}
+	.v_title {
+		font-size: 20px;
+		font-weight: bold;
+		color: #333;
+		.lo {
+			width: 150px;
+		}
+		.hd {
+			position: absolute;
+			left: 35px;
+			margin-top: -36px;
+		}
+	}

+ 5 - 2
smart-ui-app/common/http.js

@@ -1,6 +1,6 @@
-//const ip = 'http://127.0.0.1:8080';
+const ip = 'http://127.0.0.1:8080';
 //const ip = 'https://qfnj.gaswkj.com/prod-api';
-const ip = 'http://192.168.2.101:8080';
+//const ip = 'http://192.168.2.101:8080';
 //const ip = 'https://xdmly.qiyiiot.com/prod-api';
 /**
  * 全部接口(集中管理)
@@ -24,6 +24,9 @@ const urls = {
 	hotelList: ip + '/api/index/hotelList', //酒店列表
 	hotelDetail: ip + '/api/index/hotelDetail', //酒店详情
 	hotelBook: ip + '/api/index/hotelBook', //酒店房间预订
+	order: ip + '/api/index/order', //预订房间订单
+	orderDeal: ip + '/api/index/orderDeal', //商家订单处理
+	orderDelete: ip + '/api/index/orderDelete', //商家订单删除
 	roomDel: ip + '/api/index/roomDel', //商家删除酒店房间
 	uploadImg: ip + '/api/index/uploadImg', //图片上传请求
 }

+ 22 - 34
smart-ui-app/pages.json

@@ -9,7 +9,7 @@
 				"navigationBarTitleText": "酒店详情",
 				"enablePullDownRefresh": false
 			}
-		
+
 		},
 		{
 			"path": "pages/index/index2",
@@ -143,49 +143,37 @@
 				"enablePullDownRefresh": false
 			}
 
-		},  {
-			"path": "pages/shop/hotel/my",
+		}, {
+			"path": "pages/shop/detail",
 			"style": {
-				"navigationBarTitleText": "我的预约",
+				"navigationBarTitleText": "店铺信息",
 				"enablePullDownRefresh": false
 			}
 
 		}, {
-			"path": "pages/shop/detail",
+			"path": "pages/shop/hotel/room",
 			"style": {
-				"navigationBarTitleText": "店铺信息",
+				"navigationBarTitleText": "房间管理",
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/order/my",
+			"style": {
+				"navigationBarTitleText": "我的预订",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/order/sale",
+			"style": {
+				"navigationBarTitleText": "我的店铺订单",
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
+			}
+
 		}
-	    ,{
-            "path" : "pages/shop/hotel/room",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "房间管理",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/order/my",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的预订",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/order/sale",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的店铺订单",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#c74547",

+ 162 - 7
smart-ui-app/pages/order/my.vue

@@ -1,19 +1,174 @@
 <template>
 	<view>
-		
+		<u-tabs :list="tab" active-color="#c74547" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		<view class="list">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<view class="order_title">
+					<text>{{ item.shopName }}</text>
+					<view class="zhu">
+						<text class="theme_bg" v-if="item.state == 0">待受理</text>
+						<text v-if="item.state == 1">已受理</text>
+						<text v-if="item.state == 2">订单</text>
+					</view>
+				</view>
+				<view class="r_item">
+					<image :src="ip + item.shopRoom.pic" mode="aspectFill" class="pic"></image>
+					<view class="con">
+						<view class="title omit">{{ item.shopRoom.title }}</view>
+						<view class="ms">
+							<text class="rmb">¥{{ item.shopRoom.price }}</text>
+							<text>起</text>
+						</view>
+						<view class="ms"><view class="icon phone">&#xe619;</view></view>
+					</view>
+					<view class="clear"></view>
+				</view>
+				<view class="hj">{{ item.createTime }}</view>
+				<view class="clear"></view>
+				<view class="tk" v-if="item.state == 2">抱歉,由于酒店房间客满的原因,我们无法提供服务。</view>
+			</view>
+			<view class="loading"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+		</view>
+		<!--预订订单信息-->
+		<u-popup v-model="popup_show" :mask-close-able="false" mode="center" border-radius="14" width="90%" height="auto" :closeable="true">
+			<view class="u-popup">
+				<view class="tttt" style="font-weight: bolder;">预订房间</view>
+				<u-steps :list="numList" mode="number" :current="0" active-color="#c74547" style="margin: 20px 0px 20px 0px;"></u-steps>
+				<view class="form_group hr">
+					<view class="lable">客户姓名</view>
+					<input v-model="book.name" :disabled="true" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">联系方式</view>
+					<input type="number" v-model="book.phone" :disabled="true" />
+					<text class="call" @click="call()">拨打</text>
+				</view>
+				<view class="form_group hr">
+					<view class="lable">入住日期</view>
+					<input v-model="book.day" :disabled="true" style="margin-left: -9px;flex: 0.67;" />
+				</view>
+				<view class="form_group">
+					<view class="lable">入住天数</view>
+					<input :value="book.days + '天'" :disabled="true" />
+				</view>
+				<u-divider style="padding-top: 10px;">订单处理</u-divider>
+				<button class="btn" style="background-color: #19BE6B;" @click="op(1)">确认</button>
+				<button class="btn" @click="op(2)">拒绝</button>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
+export default {
+	data() {
+		return {
+			ip: this.$http.urls.ip,
+			tab: [{ name: '所有预订', state: '' }, { name: '待受理', state: 0 }, { name: '已完成', state: 1 }],
+			numList: [{ name: '客户资料' }, { name: '订单确认' }, { name: '登记入住' }],
+			current: 0,
+			list: [],
+			param: { pageNum: 1, state: '', role: 'sale', orderByColumn: 'id', isAsc: 'desc' },
+			loadMore: true,
+			popup_show: false,
+			book: {}
+		};
+	},
+	onLoad() {
+		this.getData();
+	},
+	methods: {
+		//获取数据
+		getData() {
+			this.$http.request({
+				url: this.$http.urls.order,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+					res.data.rows.forEach(item => {
+						item.createTime = this.$u.timeFrom(new Date(item.createTime.replace(/\-/g, '/')).getTime());
+						this.list.push(item);
+					});
+				}
+			});
+		},
+		change(index) {
+			this.current = index;
+			this.param.state = this.tab[index].state;
+			this.refresh();
+		},
+		detail(item) {
+			this.book = item;
+			this.book.day = item.min + ' 至 ' + item.max;
+			this.popup_show = true;
+		},
+		call() {},
+		//处理订单
+		op(index) {
+			uni.showModal({
+				title: '提示',
+				content: '是否处理该订单?',
+				success: res => {
+					if (res.confirm) {
+						this.$http.request({
+							url: this.$http.urls.orderDeal,
+							data: { id: this.book.id, state: index },
+							method: 'POST',
+							success: res => {
+								uni.showToast({ title: '操作成功' });
+								this.popup_show = false;
+								this.refresh();
+							}
+						});
+					}
+				}
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh();
+			this.refresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-
+page {
+	background-color: $page;
+}
+.list {
+	padding: 0px 10px 25px 10px;
+	.item {
+		background-color: white;
+		padding: 5px 13px 13px 13px;
+		margin-top: 10px;
+		border-radius: 5px;
+		.hj {
+			text-align: right;
+			padding-top: 13px;
+			color: $dar2;
+		}
+	}
+}
+.call {
+	color: #03a9f4;
+}
 </style>

+ 168 - 7
smart-ui-app/pages/order/sale.vue

@@ -1,19 +1,180 @@
 <template>
 	<view>
-		
+		<u-tabs :list="tab" active-color="#c74547" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		<view class="list">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<view class="order_title">
+					<text>{{ item.shopName }}</text>
+					<text class="icon">&#xe62d;</text>
+					<view class="zhu">
+						<text class="theme_bg" v-if="item.state == 0">待受理</text>
+						<text v-if="item.state == 1" style="color:#4CAF50;">已受理</text>
+						<text v-if="item.state == 2" style="color:orange;">订单取消</text>
+					</view>
+				</view>
+				<view class="r_item">
+					<image :src="ip + item.shopRoom.pic" mode="aspectFill" class="pic"></image>
+					<view class="con">
+						<view class="title omit">{{ item.shopRoom.title }}</view>
+						<view class="ms">
+							<text class="rmb">¥{{ item.shopRoom.price }}</text>
+							<text>起</text>
+						</view>
+						<view class="ms"><view class="icon phone">&#xe619;</view></view>
+					</view>
+					<view class="clear"></view>
+				</view>
+				<view class="hj">{{ item.createTime }}</view>
+				<view class="clear"></view>
+				<view class="tk" v-if="item.state == 2">抱歉,由于酒店房间客满的原因,我们无法提供服务。</view>
+			</view>
+			<view class="loading"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+		</view>
+		<!--预订订单信息-->
+		<u-popup v-model="popup_show" :mask-close-able="false" mode="center" border-radius="14" width="90%" height="auto" :closeable="true">
+			<view class="u-popup">
+				<view class="tttt" style="font-weight: bolder;">预订房间</view>
+				<u-steps :list="numList" mode="number" :current="0" active-color="#c74547" style="margin: 20px 0px 20px 0px;"></u-steps>
+				<view class="form_group hr">
+					<view class="lable">客户姓名</view>
+					<input v-model="book.name" :disabled="true" style="margin-left: -9px;" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">联系方式</view>
+					<input type="number" v-model="book.phone" :disabled="true" />
+					<text class="call" @click="call()">拨打</text>
+				</view>
+				<view class="form_group hr">
+					<view class="lable">入住日期</view>
+					<input v-model="book.day" :disabled="true" style="margin-left: -9px;flex: 0.67;" />
+				</view>
+				<view class="form_group">
+					<view class="lable">入住天数</view>
+					<input :value="book.days + '天'" :disabled="true" style="margin-left: -9px;" />
+				</view>
+				<u-divider style="padding-top: 10px;">订单处理</u-divider>
+				<button class="btn" style="background-color:#607D8B;" @click="op(1)">受理</button>
+				<button class="btn" @click="op(2)">取消</button>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
+export default {
+	data() {
+		return {
+			ip: this.$http.urls.ip,
+			tab: [{ name: '所有预订', state: '' }, { name: '待受理', state: 0 }, { name: '已完成', state: 1 }],
+			numList: [{ name: '客户资料' }, { name: '订单确认' }, { name: '登记入住' }],
+			current: 0,
+			list: [],
+			param: { pageNum: 1, state: '', role: 'sale', orderByColumn: 'id', isAsc: 'desc' },
+			loadMore: true,
+			popup_show: false,
+			book: {}
+		};
+	},
+	onLoad() {
+		this.getData();
+	},
+	methods: {
+		//获取数据
+		getData() {
+			this.$http.request({
+				url: this.$http.urls.order,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+					res.data.rows.forEach(item => {
+						item.createTime = this.$u.timeFrom(new Date(item.createTime.replace(/\-/g, '/')).getTime());
+						this.list.push(item);
+					});
+				}
+			});
+		},
+		change(index) {
+			this.current = index;
+			this.param.state = this.tab[index].state;
+			this.refresh();
+		},
+		detail(item) {
+			this.book = item;
+			this.book.day = item.min + ' 至 ' + item.max;
+			this.popup_show = true;
+		},
+		call() {},
+		//处理订单
+		op(index) {
+			uni.showModal({
+				title: '提示',
+				content: '是否处理该订单?',
+				success: res => {
+					if (res.confirm) {
+						this.$http.request({
+							url: this.$http.urls.orderDeal,
+							data: { id: this.book.id, state: index },
+							method: 'POST',
+							success: res => {
+								uni.showToast({ title: '操作成功' });
+								this.popup_show = false;
+								this.refresh();
+							}
+						});
+					}
+				}
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh();
+			this.refresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-
+page {
+	background-color: $page;
+}
+.list {
+	padding: 0px 10px 25px 10px;
+	.item {
+		background-color: white;
+		padding: 5px 13px 13px 13px;
+		margin-top: 10px;
+		border-radius: 4px;
+		.hj {
+			text-align: right;
+			padding-top: 13px;
+			color: $dar2;
+		}
+	}
+}
+.call {
+	color: #03a9f4;
+}
+.del {
+	text-align: center;
+	margin-top: 15px;
+	color: $theme-color;
+}
 </style>

+ 0 - 7
smart-ui-app/pages/shop/apply.vue

@@ -190,13 +190,6 @@ export default {
 	text-align: center;
 	margin-top: 20px;
 }
-.btg {
-	padding: 15px;
-	background-color: #fef0f0;
-	color: #f56c6c;
-	margin-top: 15px;
-	border-radius: 5px;
-}
 .u-subsection {
 	margin-top: 20px;
 }

+ 75 - 10
smart-ui-app/pages/shop/detail.vue

@@ -1,19 +1,84 @@
 <template>
-	<view>
-		
+	<view class="page">
+		<u-swiper :list="item.imgs" :effect3d="true" :height="300"></u-swiper>
+		<view class="hotel_item">
+			<view class="name">{{ item.name }}</view>
+			<view class="address">
+				<view class="dz">{{ item.addres }}</view>
+			</view>
+			<map
+				style="width: 100%; height: 100px;margin-top: 20px;border-radius:5px;"
+				:latitude="item.lat"
+				:longitude="item.lng"
+				:markers="[{ latitude: item.lat, longitude: item.lng }]"
+			></map>
+		</view>
+		<view class="hotel_item">
+			<view class="v_title">
+				<image src="../../static/lo.png" class="lo" mode="widthFix"></image>
+				<view class="hd">菜单</view>
+			</view>
+			<u-grid :col="3" class="cd">
+				<u-grid-item>
+					<view class="icon" style="background-color: red">&#xe610;</view>
+					<view class="grid-text">店铺信息</view>
+				</u-grid-item>
+				<u-grid-item>
+					<view class="icon" style="background-color: red">&#xebb3;</view>
+					<view class="grid-text">上报数据</view>
+				</u-grid-item>
+				<u-grid-item>
+					<view class="icon" style="background-color: red">&#xe736;</view>
+					<view class="grid-text">房间管理</view>
+				</u-grid-item>
+				<u-grid-item>
+					<view class="icon" style="background-color: red">&#xe705;</view>
+					<view class="grid-text">预订订单</view>
+				</u-grid-item>
+			</u-grid>
+		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
+export default {
+	data() {
+		return {
+			ip: this.$http.urls.ip,
+			item: {}
+		};
+	},
+	onLoad(e) {
+		this.$http.request({
+			url: this.$http.urls.hotelDetail,
+			data: { shopId: 30 },
+			success: res => {
+				this.item = res.data.data;
+				this.item.imgs = []; //轮播图
+				this.item.showPictures = this.item.showPictures.split(',');
+				this.item.showPictures.forEach(item => {
+					this.item.imgs.push({ image: this.ip + item });
+				});
+			}
+		});
+	},
+	methods: {
+		dh() {}
 	}
+};
 </script>
-
 <style lang="scss">
-
+.page {
+	padding: 12px;
+}
+.cd {
+	margin-top: 10px;
+	.icon {
+		font-size: 30px;
+		padding: 5px 8px;
+		background-color: red;
+		color: white;
+		border-radius: 5px;
+	}
+}
 </style>

+ 0 - 19
smart-ui-app/pages/shop/hotel/my.vue

@@ -1,19 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>