邹能昇 пре 3 месеци
родитељ
комит
f0d56be283
33 измењених фајлова са 2247 додато и 1 уклоњено
  1. 7 1
      app.json
  2. 13 0
      nova-tourism/components/my/index.js
  3. 1 0
      nova-tourism/components/my/index.wxml
  4. 172 0
      nova-tourism/pages/my/merchant/login/index.js
  5. 3 0
      nova-tourism/pages/my/merchant/login/index.json
  6. 111 0
      nova-tourism/pages/my/merchant/login/index.less
  7. 14 0
      nova-tourism/pages/my/merchant/login/index.wxml
  8. 0 0
      nova-tourism/pages/my/merchant/login/index.wxss
  9. 339 0
      nova-tourism/pages/my/merchant/merchant-home/index.js
  10. 6 0
      nova-tourism/pages/my/merchant/merchant-home/index.json
  11. 162 0
      nova-tourism/pages/my/merchant/merchant-home/index.less
  12. 154 0
      nova-tourism/pages/my/merchant/merchant-home/index.wxml
  13. 0 0
      nova-tourism/pages/my/merchant/merchant-home/index.wxss
  14. 99 0
      nova-tourism/pages/my/merchant/merchant-home/order-list/index.js
  15. 3 0
      nova-tourism/pages/my/merchant/merchant-home/order-list/index.json
  16. 83 0
      nova-tourism/pages/my/merchant/merchant-home/order-list/index.less
  17. 62 0
      nova-tourism/pages/my/merchant/merchant-home/order-list/index.wxml
  18. 1 0
      nova-tourism/pages/my/merchant/merchant-home/order-list/index.wxss
  19. 211 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/index.js
  20. 3 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/index.json
  21. 114 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/index.less
  22. 69 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/index.wxml
  23. 1 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/index.wxss
  24. 107 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.js
  25. 3 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.json
  26. 93 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.less
  27. 29 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.wxml
  28. 1 0
      nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.wxss
  29. 247 0
      nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.js
  30. 6 0
      nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.json
  31. 40 0
      nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.wxml
  32. 87 0
      nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.wxss
  33. 6 0
      project.private.config.json

+ 7 - 1
app.json

@@ -14,7 +14,13 @@
                 "pages/homestay/homestay-order/index",
                 "pages/homestay/customer/select-customer/index",
                 "pages/homestay/customer/customer-info/index",
-                "pages/collect/collect-detail/index"
+                "pages/collect/collect-detail/index",
+                "pages/my/merchant/login/index",
+                "pages/my/merchant/merchant-home/index",
+                "pages/my/merchant/merchant-home/store-withdraw/index",
+                "pages/my/merchant/merchant-home/order-list/index",
+                "pages/my/merchant/merchant-home/order2-list/index",
+                "pages/my/merchant/merchant-home/order2-list/order-deils/index"
             ]
         },
         {

+ 13 - 0
nova-tourism/components/my/index.js

@@ -67,5 +67,18 @@ Component({
             })
             console.log(this.data.User1List);
         },
+        //我是商户
+        merchant() {
+            let merchant = wx.getStorageSync('merchant');
+            if (merchant) {
+                wx.navigateTo({
+                    url: '/nova-tourism/pages/my/merchant/merchant-home/index'
+                });
+            } else {
+                wx.navigateTo({
+                    url: '/nova-tourism/pages/my/merchant/login/index'
+                });
+            }
+        },
     }
 })

+ 1 - 0
nova-tourism/components/my/index.wxml

@@ -56,4 +56,5 @@
         <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241122/qc3aet050423378.png"></image>
         <view class="leave-tex">退出登录</view>
     </view>
+    <view bindtap="merchant">我是商户</view>
 </view>

+ 172 - 0
nova-tourism/pages/my/merchant/login/index.js

@@ -0,0 +1,172 @@
+const Parse = getApp().Parse;
+const app = getApp();
+const company = getApp().globalData.company
+Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        username: "",
+        password: "",
+        confirmPassword: "",
+        code: "",
+        rightCode: "",
+        pageType: "login", //register,login ,forget
+        time: 60000,
+        waitStatus: false,
+
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            activeColor: getApp().globalData.activeColor || '#229293'
+          })
+    },
+    onClick(e) {
+        let {
+            type,
+            key,
+            value
+        } = e.currentTarget.dataset;
+        switch (type) {
+            case "register":
+                this.setData({
+                    [key]: value,
+                });
+                break;
+            case "forget":
+                this.setData({
+                    [key]: value,
+                });
+                break;
+            case "login":
+                this.setData({
+                    [key]: value,
+                });
+                break;
+        }
+    },
+
+    /* 用户登录 */
+    async userLogin() {
+        if (this.data.username.trim() == '' || this.data.password.trim() == "") {
+            wx.showToast({
+                icon: "none",
+                title: "请填写用户名/密码",
+            });
+            return;
+        }
+        wx.request({
+            url: "https://test.fmode.cn/api/auth/store_user",
+            method: "post", //请求方式
+            data: {
+                username: this.data.username,
+                password: this.data.password,
+                company: company,
+            },
+            success(res) {
+                console.log(res)
+                if(res && res.data &&  res.data.code == 200) {
+                    wx.showToast({
+                        icon: "none",
+                        title: "登录成功,页面跳转中",
+                    });
+                    let store = res.data.data.store
+                    let merchant = res.data.data.merchant
+                    wx.setStorageSync('merchant', merchant)
+                    wx.setStorageSync('store', store)
+                    wx.reLaunch({
+                        url: `/nova-tourism/pages/my/merchant/merchant-home/index?type=${store.type}`,
+                    });
+                }else {
+                    wx.showToast({
+                        icon: "none",
+                        title: res.data.mess
+                    });
+                }
+            },
+            fail(error) {
+                wx.showToast({
+                    icon: "none",
+                    title: error.data.mess
+                });
+                return
+            }
+        })
+        // let User = new Parse.Query('User')
+        // User.equalTo('username', this.data.username)
+        // User.equalTo('company', company)
+        // let user = await User.first()
+        // if (user && user.id) {
+        //     let store = await this.checkAdmin(user)
+        //     if (!store) {
+        //         wx.showToast({
+        //             icon: "none",
+        //             title: "非商户用户,登录失败",
+        //         });
+        //         return
+        //     }
+        //     wx.showToast({
+        //         icon: "none",
+        //         title: "登录成功,页面跳转中",
+        //     });
+        //     wx.setStorageSync('merchant', user)
+        //     wx.setStorageSync('store', store)
+        //     wx.reLaunch({
+        //         url: `/nova-tourism/pages/my/merchant/merchant-home/index?type=${store.type}`,
+        //     });
+        // } else {
+        //     wx.showToast({
+        //         title: "该商户不存在",
+        //         icon: "none",
+        //     });
+        // }
+
+    },
+    async checkAdmin(user) {
+        let ShopStore = new Parse.Query('ShopStore')
+        ShopStore.notEqualTo('isDeleted', "true")
+        ShopStore.equalTo('user', user.id)
+        ShopStore.equalTo('company', company)
+        let store = await ShopStore.first()
+        if (store && store.id) {
+            return store
+        }
+        return false
+    },
+
+    inputChange(event) {
+        if (event.currentTarget.dataset.type == "username") {
+            this.setData({
+                username: event.detail.value,
+            });
+            return;
+        }
+        if (event.currentTarget.dataset.type == "password") {
+            this.setData({
+                password: event.detail.value,
+            });
+            return;
+        }
+        if (event.currentTarget.dataset.type == "code") {
+            this.setData({
+                code: event.detail.value,
+            });
+            return;
+        }
+        if (event.currentTarget.dataset.type == "confirmPassword") {
+            this.setData({
+                confirmPassword: event.detail.value,
+            });
+            return;
+        }
+    },
+
+    async goBack() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+})

+ 3 - 0
nova-tourism/pages/my/merchant/login/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 111 - 0
nova-tourism/pages/my/merchant/login/index.less

@@ -0,0 +1,111 @@
+@import '../../../../styles/base.less';
+page{
+    font-size: 30rpx;
+    color: #333;
+    line-height: 1.5;
+    background: white;
+    height: 100%;
+  }
+  
+  .container {
+    background-color: #fff;
+    align-items: stretch;
+    overflow-x: hidden;
+    width: 100%;
+    padding: 100rpx 40rpx 0;
+  }
+  .input_wrapper {
+    display: flex;
+    align-items: center;
+    margin: 20rpx 0;
+    margin-bottom: 40rpx;
+  }
+  .code {
+    display: flex;
+    align-items: center;
+    margin: 20rpx 0;
+    margin-bottom: 40rpx;
+    justify-content: space-between;
+  }
+  .input_wrapper text {
+    width: 150rpx;
+    text-align: right;
+  }
+  .input_wrapper input {
+    background-color: #f2f2f2;  
+     /* border: 1rpx #f1f1f1 solid; */
+  }
+  .code input {
+    background-color: #f2f2f2; 
+    width: 60%;
+     /* border: 1rpx #f1f1f1 solid; */
+  }
+  
+  .input_wrapper input {
+    background-color: #f2f2f2; 
+     /* border: 1rpx #f1f1f1 solid; */
+  }
+  .code .get_code {
+    background-color: #009de1; 
+    color: #fff;
+    height: 76rpx;
+    border-radius: 10rpx;
+    width: 30%;
+    text-align: center;
+    line-height: 80rpx;
+    
+  }
+  
+  .van-count-down {
+    color: #fff!important;
+    line-height: 80rpx!important;
+  }
+  .input_wrapper input ::placeholder {
+    font-size: 36rpx;
+    font-family: Arial, Helvetica, sans-serif;
+    font-weight: 600;
+    width: 150rpx;
+    text-align: right;
+  }
+  input {
+    width: 100%;
+    height: 60rpx;
+    line-height: 60rpx;
+    padding: 10rpx;
+    border: 2px solid #fafafa;
+    border-radius: 10rpx;
+  }
+  .desc{
+    width: 100%;
+    height: 80rpx;
+    margin-top: 40rpx;
+    font-size: 28rpx;
+    color: #999;
+    text-align: center;
+  }
+  
+  .btn-login{
+    margin: 40rpx auto;
+    display: flex;
+    justify-content: center;
+    height: 80rpx;
+    width: 100%;
+    background: #009de1;
+    border-radius: 20rpx;
+    color: #fff;
+    align-items: center;
+    cursor: pointer;
+    font-size: 40rpx;
+    /* font-weight: 700; */
+  }
+  
+  
+  .bottom{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    
+    /* position: absolute;
+    bottom:40rpx;
+    border-right: 4rpx solid red; */
+  }

+ 14 - 0
nova-tourism/pages/my/merchant/login/index.wxml

@@ -0,0 +1,14 @@
+<nav type="back-two" title="登录" background-color="{{activeColor}}" frontColor="#ffffff" />
+<view class="page-section page-section-spacing">
+		<block wx:if="{{pageType == 'login'}}">
+				<view class='input_wrapper'>
+					<input  placeholder="用户名" style="border: 2rpx #f1f1f1 solid;" auto-focus model:value="{{username}}"  />
+				</view>
+				<view class='input_wrapper'>
+					<input  placeholder="密码"  style="border: 2rpx #f1f1f1 solid;" password model:value="{{password}}"   />
+				</view>
+				<view class='text' class='btn-login' bindtap='userLogin' style="{{activeColor}}">登录</view>
+				
+		</block>
+
+</view>

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
nova-tourism/pages/my/merchant/login/index.wxss


+ 339 - 0
nova-tourism/pages/my/merchant/merchant-home/index.js

@@ -0,0 +1,339 @@
+let Parse = getApp().Parse;
+const company = getApp().globalData.company
+const util = require('../../../../../utils/util.js')
+const dateF = require('../../../../../utils/date')
+const req = require('../../../../../utils/request')
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        time: null,
+        store: null,
+        merchant: null,
+        totalCount: 0,
+        todayCount: 0,
+        totalPrice: 0,
+        todayPrice: 0,
+        withdraw: 0
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        console.log(options)
+        var TIME = util.formatTime(new Date()); //当前时间
+        console.log(TIME);
+        let time = dateF.formatTime("YYYY-mm-dd", TIME)
+        this.setData({
+            time: time
+        });
+
+        let merchant = wx.getStorageSync('merchant'); //用户
+        this.setData({ merchant: merchant })
+        if (!merchant) {
+            wx.redirectTo({
+                url: '/nova-tourism/pages/my/merchant/login/index'
+            });
+        }
+        this.getShopStore()
+    },
+
+
+    async getShopStore() {
+        let ShopStore = new Parse.Query('ShopStore')
+        ShopStore.equalTo('company', company)
+        ShopStore.equalTo('user', this.data.merchant.objectId)
+        let shopStore = await ShopStore.first()
+        if (shopStore && shopStore.id) {
+            let id = shopStore.toJSON().objectId
+            this.setData({
+                store: shopStore.toJSON()
+            })
+            console.log(this.data.store, 11111);
+            await this.getShopOrder(id)
+            await this.getTodayOrder(id)
+        } else {
+            wx.setStorageSync('store', undefined)
+            wx.setStorageSync('merchant', undefined)
+        }
+    },
+    async getShopOrder(id) {
+
+        let sql = ''
+        if (this.data.store.type == 'stay') {
+            sql = `select count("objectId") as "count", sum("price") as "totalPrice"  from "RoomOrder"
+           where "company" = '${company}' and "shopStore" = '${id}' and "isPay" = true 
+           group by "shopStore"`
+        } else {
+            sql = `select count("objectId") as "count", sum("price") as "totalPrice"  from "ShopOrder"
+            where "company" = '${company}' and "shopStore" = '${id}' and "status" <> 100
+            group by "shopStore"`
+        }
+        let data = await req.customSQL(sql)
+        console.log(data)
+        if (data && data.length > 0) {
+            this.setData({
+                totalCount: data[0].count,
+                totalPrice: data[0].totalPrice,
+            })
+        }
+        await this.getWithdraw()
+    },
+
+    async getWithdraw() {
+        let sql = `select sum("count") as "withdraw" from "UserAgentWithdraw"
+        where "company" = '${company}' and "user" = '${this.data.merchant.objectId}' 
+        group by "user"`
+
+        let data = await req.customSQL(sql)
+        console.log(data)
+        if (data && data.length > 0) {
+            this.setData({
+                withdraw: data[0].withdraw,
+                earnings: (this.data.totalPrice - data[0].withdraw).toFixed(2)
+            })
+        } else {
+            this.setData({
+                earnings: this.data.totalPrice
+            })
+        }
+        console.log(this.data.earnings)
+    },
+
+    async getTodayOrder(id) {
+        var TIME = util.formatTime(new Date()); //当前时间
+        console.log(TIME);
+        let time = dateF.formatTime("YYYY-mm-dd 00:00:10", TIME)
+        console.log(time);
+        let sql = ''
+        if (this.data.store.type == 'stay') {
+            sql = `select count("objectId") as "count", sum("price") as "totalPrice"  from "RoomOrder"
+           where "company" = '${company}' and "shopStore" = '${id}' and "isPay" = true and "createdAt" > '${time}'
+           group by "shopStore"`
+        } else {
+            sql = `select count("objectId") as "count", sum("price") as "totalPrice"  from "ShopOrder"
+            where "company" = '${company}' and "shopStore" = '${id}' and "status" <> 100 and "createdAt" > '${time}'
+            group by "shopStore"`
+        }
+        let data = await req.customSQL(sql)
+        if (data && data.length > 0) {
+            this.setData({
+                todayCount: data[0].count,
+                todayPrice: data[0].totalPrice,
+            })
+        }
+
+    },
+
+    // orderlist() {
+    //     let storeId = this.data.store.objectId
+    //     wx.navigateTo({
+    //         url: '../merchant-home/order-list/index?storeId=' + storeId
+    //     });
+    // },
+    //民宿
+    order2list() {
+        let storeId = this.data.store.objectId
+        wx.navigateTo({
+            url: '../merchant-home/order2-list/index?storeId=' + storeId
+        });
+    },
+    // order3list() {
+    //     let storeId = this.data.store.objectId
+    //     wx.navigateTo({
+    //         url: '../merchant-home/order3-list/index?storeId=' + storeId
+    //     });
+    // },
+    goods() {
+        let id = this.data.store.objectId
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/goods/index?id=' + id
+        });
+
+    },
+
+    logout() {
+        wx.showModal({
+            title: '确认要退出吗?',
+            showCancel: true,
+            success(res) {
+                if (res.confirm) {
+                    wx.removeStorageSync('merchant')
+                    wx.removeStorageSync('store')
+                    wx.navigateTo({
+                        url: '/nova-tourism/pages/index/index'
+                    })
+                } else {
+
+                }
+            }
+        })
+    },
+    package() {
+
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/package/index'
+        });
+
+    },
+    dishes() {
+        let id = this.data.store.objectId
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/dishes/index?id=' + id
+        });
+
+    },
+    tables() {
+        let id = this.data.store.objectId
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/tables/index?id=' + id
+        });
+
+    },
+    category() {
+        let id = this.data.store.objectId
+        let type = this.data.store.type
+        wx.navigateTo({
+            url: `/nova-tourism/pages/my/merchant/merchant-home/category/index?id=${id}&&type=${type}`
+        });
+
+    },
+    roommanage() {
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/room-manage/index'
+        });
+
+    },
+    account() {
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/account/index'
+        });
+
+    },
+
+    comments() {
+        switch (this.data.store.type) {
+            case 'stay':
+                wx.navigateTo({
+                    url: '/nova-tourism/pages/my/merchant/comments/hotel/index'
+                });
+                break;
+            case 'catering':
+                wx.navigateTo({
+                    url: '/nova-tourism/pages/my/merchant/comments/setmeal/index'
+                });
+                break;
+            case 'shop':
+                wx.navigateTo({
+                    url: '/nova-tourism/pages/my/merchant/comments/setmeal/index'
+                });
+                break;
+            default:
+                break;
+        }
+
+    },
+
+
+    async codeVerify() {
+        console.log(this.data.store.type);
+        let that = this
+        wx.scanCode({
+            success(res) {
+                let content = res.result
+                console.log(content)
+                let code1 = content.match(/\id=(.*)/)[1]
+                console.log(code1);
+                switch (that.data.store.type) {
+                    case 'stay':
+                        wx.navigateTo({
+                            url: `/nova-tourism/pages/my/merchant/code-verify/index?id=${code1}`
+                        });
+                        break;
+                    case 'catering':
+                        wx.navigateTo({
+                            url: `/nova-tourism/pages/shop-admin/index?id=${code1}`
+                        });
+                        break;
+                    case 'shop':
+                        wx.navigateTo({
+                            url: `/nova-tourism/pages/shop-admin/index?id=${code1}`
+                        });
+                        break;
+                    default:
+                        break;
+                }
+                // wx.navigateTo({
+                //     url: `/nova-tourism/pages/my/merchant/code-verify/index?id=${res.id}`
+                // });
+            },
+            fail(err) {
+                console.log(err)
+                wx.showToast({
+                    title: '扫码失败,请确认二维码信息正确',
+                    icon: 'none'
+                })
+            }
+        })
+    },
+    toWithdraw() {
+        let id = this.data.store.storeName
+        wx.navigateTo({
+            url: `../../merchant/merchant-home/store-withdraw/index?earnings=${this.data.earnings}&&id=${id}`,
+        })
+    },
+
+
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
nova-tourism/pages/my/merchant/merchant-home/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+      "van-rate": "@vant/weapp/rate/index",
+      "van-icon": "@vant/weapp/icon/index"
+  }
+}

+ 162 - 0
nova-tourism/pages/my/merchant/merchant-home/index.less

@@ -0,0 +1,162 @@
+page {
+    background: #f6f6f6;
+    padding-bottom: 148rpx;
+}
+
+.box {
+    // margin: 30rpx;
+    // display: flex;
+    // flex-wrap: wrap;
+    // justify-content: space-between;
+    position: relative;
+
+    .business {
+        position: absolute;
+        top: 195rpx;
+        left: 30rpx;
+        width: 690rpx;
+        background: #ffffff;
+        display: flex;
+        justify-content: center;
+
+        border-radius: 30rpx;
+
+        .business-x {
+            border-right: 1rpx solid #efefef;
+            width: 50%;
+
+            .order-number {
+                border-bottom: 1rpx solid #efefef;
+
+                .order-title {
+                    text-align: center;
+                    margin-top: 20rpx;
+                }
+
+                .order-titles {
+                    text-align: center;
+                    margin: 30rpx 0;
+                }
+            }
+
+            .order-today {
+                .order-title {
+                    text-align: center;
+                    margin-top: 20rpx;
+                }
+
+                .order-titles {
+                    text-align: center;
+                    margin: 30rpx 0;
+                }
+            }
+        }
+
+        .business-y {
+            width: 50%;
+
+            .order-number {
+                border-bottom: 1rpx solid #efefef;
+
+                .order-title {
+                    text-align: center;
+                    margin-top: 20rpx;
+                }
+
+                .order-titles {
+                    text-align: center;
+                    margin: 30rpx 0;
+                }
+            }
+
+            .order-today {
+                .order-title {
+                    text-align: center;
+                    margin-top: 20rpx;
+                }
+
+                .order-titles {
+                    text-align: center;
+                    margin: 30rpx 0;
+                }
+            }
+        }
+    }
+
+    .store {
+        background: #46a9a4;
+        height: 360rpx;
+        padding: 30rpx;
+        display: flex;
+
+        .store-img {
+            width: 100rpx;
+            height: 100rpx;
+            border-radius: 50%;
+        }
+
+        .store-box {
+            margin: 10rpx 0 0 20rpx;
+        }
+
+        .store-score {
+            color: #fd863a;
+        }
+
+        .draw_box {
+            display: flex;
+            align-items: center;
+
+            .withdraw {
+                background: red;
+                width: 120rpx;
+                height: 56rpx;
+                color: #fff;
+                font-size: 30rpx;
+                line-height: 56rpx;
+                text-align: center;
+                border-radius: 20rpx;
+                font-weight: 600;
+                margin-right: 20rpx;
+            }
+
+        }
+
+    }
+
+    .management {
+        // display: flex;
+        // flex-wrap: wrap;
+        // justify-content: space-between;
+        margin: 180rpx 30rpx 0 30rpx;
+
+        .box-title {
+            background: #fff;
+            // border-radius: 30rpx;
+            // width: 45%;
+            padding: 20rpx;
+            // text-align: center;
+            margin-top: 10rpx;
+            display: flex;
+            justify-content: space-between;
+
+            .box-details {
+                display: flex;
+
+                .name {
+                    margin-left: 10rpx;
+                }
+            }
+        }
+    }
+
+}
+
+.bommon {
+    margin: 50rpx;
+    width: 650rpx;
+    background: #46a9a4;
+    padding: 20rpx 50rpx;
+    border-radius: 30rpx;
+    text-align: center;
+}

+ 154 - 0
nova-tourism/pages/my/merchant/merchant-home/index.wxml

@@ -0,0 +1,154 @@
+<nav type="back" url="/nova-tourism/pages/index/index?active=4" background-color="#46a9a4" title="商户端" />
+<view class="box">
+    <view class="store">
+        <image class="store-img" src="{{store.cover}}" />
+        <view class="store-box">
+            <view class="store-name">{{store.storeName}}</view>
+            <view class="store-score">
+                <van-rate readonly value="{{ store.score }}" size="{{ 15 }}" color="#fd863a" allow-half />
+                {{store.score}}
+            </view>
+            <view class="draw_box">
+                <view class="withdraw" bindtap="toWithdraw">
+                    提现
+                </view>
+                <view>
+                    可提现 {{earnings}} 元
+                </view>
+
+            </view>
+
+
+        </view>
+    </view>
+    <view class="business">
+        <view class="business-x">
+            <view class="order-number">
+                <view class="order-title">总订单数</view>
+                <view class="order-titles">{{totalCount}}</view>
+            </view>
+            <view class="order-today">
+                <view class="order-title">今日订单数</view>
+                <view class="order-titles">{{todayCount}}</view>
+            </view>
+        </view>
+        <view class="business-y">
+            <view class="order-number">
+                <view class="order-title">总营业额</view>
+                <view class="order-titles">{{totalPrice}}</view>
+            </view>
+            <view class="order-today">
+                <view class="order-title">今日营业额</view>
+                <view class="order-titles">{{todayPrice}}</view>
+            </view>
+        </view>
+    </view>
+
+    <view class="management">
+        <!-- <block wx:if="{{store.type=='catering'}}">
+            <view class="box-title" bindtap="orderlist">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20"/>
+                    <view class="name">订单管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+        </block> -->
+        <block wx:if="{{store.type=='stay'}}">
+            <view class="box-title" bindtap="order2list">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20"/>
+                    <view class="name">订单管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+        </block>
+        <!-- <block wx:if="{{store.type=='shop'}}">
+            <view class="box-title" bindtap="order3list">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20"/>
+                    <view class="name">订单管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+        </block> -->
+        <view class="box-title" bindtap="account">
+            <view class="box-details">
+                <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/vbg148112459179.png" size="20"/>
+                <view class="name">账户管理</view>
+            </view>
+            <van-icon name="arrow" />
+        </view>
+        <view class="box-title" bindtap="comments"wx:if="{{store.type!='shop'}}">
+            <view class="box-details">
+                <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/eb7p71112500348.png" size="20"/>
+                <view class="name">评价管理</view>
+            </view>
+            <van-icon name="arrow" />
+        </view>
+
+        <block wx:if="{{store.type=='catering'}}">
+            <view class="box-title" bindtap="package">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/mujk1h112500264.png" size="20"/>
+                    <view class="name">套餐管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+            <view class="box-title" bindtap="dishes">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/ct7c17112500163.png" size="20"/>
+                    <view class="name">菜品管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+            <view class="box-title" bindtap="tables">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/1ue61m112500082.png" size="20"/>
+                    <view class="name">桌台管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+            <view class="box-title" bindtap="category">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/kl11mf112459857.png" size="20"/>
+                    <view class="name">菜品类型管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+
+        </block>
+        <block wx:if="{{store.type=='stay'}}">
+   
+            <view class="box-title" bindtap="roommanage">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/7d11hf112459718.png" size="20"/>
+                    <view class="name">房型管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+        </block>
+        <block wx:if="{{store.type=='shop'}}">
+            <!-- <view class="box-title">商品管理</view> -->
+            <view class="box-title" bindtap="goods">
+                <view class="box-details">
+                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/l1hdoe112459997.png" size="20"/>
+                    <view class="name">商品管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view>
+            <!-- <view class="box-title" bindtap="category">
+                <view class="box-details">
+                    <van-icon name="gift-o" />
+                    <view>类型管理</view>
+                </view>
+                <van-icon name="arrow" />
+            </view> -->
+        </block>
+    </view>
+</view>
+<view class="bommon" bind:tap="codeVerify">扫码核销</view>
+<view class="bommon" bind:tap="logout">退出登录</view>
+<!-- <block wx:if="{{store.type=='catering'}}">
+    <view class="bommon" bind:tap="code">扫码核销</view>
+</block> -->

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
nova-tourism/pages/my/merchant/merchant-home/index.wxss


+ 99 - 0
nova-tourism/pages/my/merchant/merchant-home/order-list/index.js

@@ -0,0 +1,99 @@
+let Parse = getApp().Parse;
+const company = getApp().globalData.company
+const dateF = require('../../../../../../utils/date')
+Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        store: null,
+        list: null,
+    },
+    async getShopOrder() {
+        let ShopOrder = new Parse.Query('ShopOrder')
+        ShopOrder.equalTo('company', company)
+        ShopOrder.equalTo('shopStore', this.data.store)
+        ShopOrder.include('shopStore')
+        ShopOrder.include('user')
+        ShopOrder.greaterThan('status', 100)
+        ShopOrder.descending('createdAt')
+        let shopOrder = await ShopOrder.find()
+        let listJSON = []
+        if (shopOrder && shopOrder.length > 0) {
+            shopOrder.forEach(c => {
+                let order = c.toJSON()
+                order.time =  dateF.formatTime("YYYY-mm-dd HH:MM:SS", order.createdAt)
+                listJSON.push(order)
+            })
+        }
+        this.setData({
+            list: listJSON
+        })
+        console.log(this.data.list);
+    },
+    orderdeils(e) {
+        let id = e.currentTarget.dataset.item.objectId
+        console.log(id);
+        wx.navigateTo({
+            url: '/nova-tourism/pages/my/merchant/merchant-home/order-list/order-deils/index?id=' + id,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function(options) {
+        let store = options.storeId; //用户
+        console.log(store);
+        this.setData({ store: store })
+        this.getShopOrder()
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function() {
+
+    }
+})

+ 3 - 0
nova-tourism/pages/my/merchant/merchant-home/order-list/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 83 - 0
nova-tourism/pages/my/merchant/merchant-home/order-list/index.less

@@ -0,0 +1,83 @@
+page {
+    background: #f6f6f6;
+    padding-bottom: 148rpx;
+}
+.box {
+    background: #ffffff;
+    margin: 30rpx;
+    padding: 30rpx;
+    border-radius: 30rpx;
+
+    .order-number {
+        display: flex;
+        justify-content: space-between;
+
+        .number {
+            font-size: 30rpx;
+        }
+
+        .state {
+            font-size: 30rpx;
+        }
+    }
+
+    .order-txt {
+        display: flex;
+        margin: 20rpx 0rpx 0 0;
+
+        .order-image {
+            width: 240rpx;
+            height: 180rpx;
+            margin-right: 20rpx;
+        }
+
+        .order-name {
+
+
+            margin-top: 5rpx;
+
+            .order-price {
+                color: red;
+                margin-top: 12rpx;
+            }
+            .order-time {
+                font-size: 27rpx;
+                margin-top: 12rpx;
+                color: #b2b2b2;
+            }
+        }
+    }
+
+    .order-order {
+        display: flex;
+        justify-content: flex-end;
+        margin-top: 20rpx;
+
+        .bu {
+            border: 1rpx solid #BBBBBB !important;
+            border-radius: 24rpx !important;
+            font-size: 30rpx !important;
+            padding: 0rpx 20rpx !important;
+            margin-right: 20rpx !important;
+            background: #ffffff !important;
+        }
+
+        .service {
+            border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 20rpx;
+            margin-right: 20rpx;
+        }
+
+        .pay {
+            // border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 0;
+            width: 180rpx;
+            text-align: center;
+            background: #46a9a4;
+        }
+    }
+}

+ 62 - 0
nova-tourism/pages/my/merchant/merchant-home/order-list/index.wxml

@@ -0,0 +1,62 @@
+<nav type="back" background-color="#46a9a4" title="订单列表" />
+<block wx:for="{{list}}" wx:key="index">
+    <view class="box" data-item="{{item}}" bindtap="orderdeils">
+        <view class="order-number">
+            <view class="number">订单号:{{item.orderNum}}</view>
+            <block wx:if="{{item.status==100}}">
+                <view class="state">未付款</view>
+            </block>
+            <block wx:if="{{item.status==200}}">
+                <view class="state">未使用</view>
+            </block>
+            <block wx:if="{{item.status==400}}">
+                <view class="state">未评价</view>
+            </block>
+            <block wx:if="{{item.status==500}}">
+                <view class="state">申请退款</view>
+            </block>
+            <block wx:if="{{item.status==601}}">
+                <view class="state">退款审核通过</view>
+            </block>
+            <block wx:if="{{item.status==602}}">
+                <view class="state">退款被驳回</view>
+            </block>
+            <block wx:if="{{item.status==700}}">
+                <view class="state">退款成功</view>
+            </block>
+            <block wx:if="{{item.status==800}}">
+                <view class="state">已完成</view>
+            </block>
+        </view>
+        <view class="order-txt" data-item="{{item}}">
+            <image class="order-image" src="{{item.image}}" />
+            <view class="order-name">
+                <view>{{item.name}}</view>
+                <view class="order-price">¥{{item.price}}</view>
+                <view class="order-time">下单用户:{{item.user.mobile ? item.user.mobile : '暂无' }}</view>
+                <view class="order-time">下单时间:{{item.time}}</view>
+            </view>
+        </view>
+        <!-- <view class="order-order">
+                
+                <block wx:if="{{item.status == 800}}">
+                    <view class="pay" data-item="{{item}}" catchtap="orderpay">订单详情</view>
+                </block>
+                <block wx:if="{{item.status==100}}">
+                    <view class="service" data-index="{{index}}" catchtap="delOrder">取消定单</view>
+                </block>
+                <block wx:if="{{item.status==200}}">
+                    <view class="service">申请退款</view>
+                </block>
+                <block wx:if="{{item.status==100}}">
+                    <view class="pay" data-item="{{item}}" catchtap="storepackage">去支付</view>
+                </block>
+                <block wx:if="{{item.status==200}}">
+                    <view class="pay" data-item="{{item}}" catchtap="orderpay">去使用</view>
+                </block>
+                <block wx:if="{{item.status==400}}">
+                    <view class="pay" data-item="{{item}}" catchtap="evaluation">去评价</view>
+                </block>
+            </view> -->
+    </view>
+</block>

+ 1 - 0
nova-tourism/pages/my/merchant/merchant-home/order-list/index.wxss

@@ -0,0 +1 @@
+page{background:#f6f6f6;padding-bottom:148rpx}.box{background:#ffffff;margin:30rpx;padding:30rpx;border-radius:30rpx}.box .order-number{display:flex;justify-content:space-between}.box .order-number .number{font-size:30rpx}.box .order-number .state{font-size:30rpx}.box .order-txt{display:flex;margin:20rpx 0rpx 0 0}.box .order-txt .order-image{width:240rpx;height:180rpx;margin-right:20rpx}.box .order-txt .order-name{margin-top:5rpx}.box .order-txt .order-name .order-price{color:red;margin-top:12rpx}.box .order-txt .order-name .order-time{font-size:27rpx;margin-top:12rpx;color:#b2b2b2}.box .order-order{display:flex;justify-content:flex-end;margin-top:20rpx}.box .order-order .bu{border:1rpx solid #BBBBBB !important;border-radius:24rpx !important;font-size:30rpx !important;padding:0rpx 20rpx !important;margin-right:20rpx !important;background:#ffffff !important}.box .order-order .service{border:1rpx solid #BBBBBB;border-radius:24rpx;font-size:30rpx;padding:20rpx 20rpx;margin-right:20rpx}.box .order-order .pay{border-radius:24rpx;font-size:30rpx;padding:20rpx 0;width:180rpx;text-align:center;background:#46a9a4}

+ 211 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/index.js

@@ -0,0 +1,211 @@
+const Parse = getApp().Parse;
+const app = getApp();
+const company = getApp().globalData.company
+const dateF = require('../../../../../../utils/date')
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        active: 0,
+        list: [],
+        price: null,
+        storeId:null
+    },
+    onChange(event) {
+        let active = event.detail.name
+        this.setData({
+            active: active
+        })
+        console.log(active);
+        this.getShopOrder()
+    },
+    storepackage(e) {
+        let price = e.currentTarget.dataset.item.price
+        console.log(price);
+        this.setData({
+            show: true,
+            price: price
+        })
+    },
+    async acceptResult(e) {
+        let {
+            order,
+        } = this.data
+        let that = this
+        let {
+            params,
+            no
+        } = e.detail;
+        that.setData({
+            show: false
+        })
+        try {
+            if (params == "ok") {
+                order.set("isPay", true)
+                await order.save()
+                this.setData({
+                    isPay: true
+                })
+                wx.showToast({
+                    title: '报名成功',
+                    icon: 'none',
+                    image: '',
+                    duration: 1500,
+                    mask: false,
+                });
+            } else {
+                wx.showToast({
+                    title: '支付失败,取消订单',
+                    icon: 'none',
+                    image: '',
+                    duration: 1500,
+                    mask: false,
+                });
+            }
+        } catch (error) {
+            console.log(error)
+            wx.showToast({
+                title: "支付失败",
+                icon: "error",
+                duration: 1500,
+            });
+            wx.hideLoading()
+        }
+    },
+
+    //删除
+
+    // evaluation(e) {
+    //     let id = e.currentTarget.dataset.item.objectId
+    //     console.log(id);
+    //     wx.navigateTo({
+    //         url: '/nova-tourism/pages/my/homestay-order/evaluation/index?id=' + id
+    //     });
+
+    // },
+    // orderpay(e) {
+    //     let id = e.currentTarget.dataset.item.objectId
+    //     console.log(id);
+    //     wx.navigateTo({
+    //         url: '/nova-tourism/pages/my/homestay-order/homestay-details/index?id=' + id
+    //     });
+
+    // },
+    phone(e) {
+        let phone = e.currentTarget.dataset.item.shopStore.mobile
+
+        console.log(phone);
+        wx.makePhoneCall({
+            phoneNumber: phone
+        })
+    },
+    async getShopOrder() {
+
+        let ShopOrder = new Parse.Query('RoomOrder')
+        ShopOrder.equalTo('company', company)
+        ShopOrder.include('room')
+        ShopOrder.equalTo('shopStore', this.data.storeId)
+        if (this.data.active == 1) {
+            ShopOrder.equalTo('status', 100)
+        }
+        if (this.data.active == 2) {
+            ShopOrder.equalTo('status', 200)
+        }
+        if (this.data.active == 3) {
+            console.log(this.data.active)
+            ShopOrder.equalTo('status', 400)
+        }
+
+        ShopOrder.include('room')
+        ShopOrder.exists('status')
+        ShopOrder.find().then(res => {
+            let list = []
+            res.forEach(item => {
+                let activitys = item.toJSON()
+                activitys.orderTime = dateF.formatTime("mm-dd", activitys.startTime.iso)
+                activitys.Time = dateF.formatTime("mm-dd", activitys.endTime.iso)
+                activitys.a = dateF.formatTime("YYYY-mm-dd HH:MM:SS", activitys.startTime.iso)
+                activitys.e = dateF.formatTime("YYYY-mm-dd HH:MM:SS", activitys.endTime.iso)
+                    //计算天数
+                activitys.day = parseInt((new Date(activitys.e.replace(/-/g, '/')).getTime() - new Date(activitys.a.replace(/-/g, '/')).getTime()) / (1000 * 60 * 60 * 24));
+                list.push(activitys)
+            })
+
+
+            this.setData({
+                    list
+                }),
+                console.log(this.data.list)
+        })
+    },
+
+    orderdeils(e) {
+        let id = e.currentTarget.dataset.item.objectId
+        console.log(id);
+        wx.navigateTo({
+            url: '../order2-list/order-deils/index?id=' + id,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function(options) {
+        let storeId = options.storeId;
+        console.log(storeId);
+        this.setData({ storeId: storeId })
+        this.getShopOrder()
+
+        // this.getDayAll()
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function() {
+
+    }
+})

+ 3 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 114 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/index.less

@@ -0,0 +1,114 @@
+page {
+    background: #f6f6f6;
+    padding-bottom: 148rpx;
+}
+.box {
+    background: #ffffff;
+    margin: 30rpx;
+    padding: 30rpx;
+    border-radius: 30rpx;
+
+    .order-times {
+        width: 90%;
+        background: #FFFFFF;
+        border: 1rpx solid #FFE300;
+        border-radius: 30rpx;
+        margin: 20rpx 5%;
+        display: flex;
+        justify-content: space-between;
+        padding: 10rpx 30rpx;
+
+        .order-date {
+            display: flex;
+            .date {
+                margin-right: 20rpx;
+            }
+        }
+
+        .price {
+            color: red;
+        }
+    }
+
+    .order-number {
+        display: flex;
+        justify-content: space-between;
+
+        .number {
+            font-size: 30rpx;
+        }
+
+        .state {
+            font-size: 30rpx;
+        }
+    }
+
+    .order-txt {
+        display: flex;
+        margin: 20rpx 0rpx 0 0;
+
+        .order-image {
+            width: 240rpx;
+            height: 180rpx;
+            margin-right: 20rpx;
+        }
+
+        .order-name {
+
+
+            margin-top: 5rpx;
+
+            .name {
+                overflow: hidden; //一定要写
+                text-overflow: ellipsis; //超出省略号
+                display: -webkit-box; //一定要写
+                -webkit-line-clamp: 1; //控制行数
+                -webkit-box-orient: vertical; //一定要写
+
+
+            }
+
+            .order-price {
+                color: red;
+                margin-top: 20rpx;
+            }
+
+            .order-time {
+                margin-top: 20rpx;
+            }
+        }
+    }
+
+    .order-order {
+        display: flex;
+        justify-content: flex-end;
+        margin-top: 20rpx;
+
+        .bu {
+            border: 1rpx solid #BBBBBB !important;
+            border-radius: 24rpx !important;
+            font-size: 30rpx !important;
+            padding: 0rpx 20rpx !important;
+            margin-right: 20rpx !important;
+            background: #ffffff !important;
+        }
+
+        .service {
+            border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 20rpx;
+            margin-right: 20rpx;
+        }
+
+        .pay {
+            // border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 0;
+            width: 180rpx;
+            text-align: center;
+            background: #46a9a4;
+        }
+    }
+}

+ 69 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/index.wxml

@@ -0,0 +1,69 @@
+<nav type="back" background-color="#46a9a4" title="订单列表" />
+<block wx:for="{{list}}" wx:key="index">
+    <view class="box" data-item="{{item}}" bindtap="orderdeils">
+        <view class="order-number">
+            <view class="number">订单号:{{item.orderNum}}</view>
+            <block wx:if="{{item.status==100}}">
+                <view class="state">已付款</view>
+            </block>
+            <block wx:if="{{item.status==200}}">
+                <view class="state">已入住</view>
+            </block>
+            <block wx:if="{{item.status==200}}">
+                <view class="state">续住</view>
+            </block>
+            <block wx:if="{{item.status==400}}">
+                <view class="state">已退房</view>
+            </block>
+             <block wx:if="{{item.status==500}}">
+                <view class="state">申请退款</view>
+            </block>
+             <block wx:if="{{item.status==601}}">
+                <view class="state">退款审核通过</view>
+            </block>
+             <block wx:if="{{item.status==602}}">
+                <view class="state">退款被驳回</view>
+            </block>
+             <block wx:if="{{item.status==00}}">
+                <view class="state">退款成功</view>
+            </block>
+            <block wx:if="{{item.status==800}}">
+                <view class="state">已完成</view>
+            </block>
+        </view>
+        <view class="order-txt">
+            <image class="order-image" src="{{item.images[0]}}" />
+            <view class="order-name">
+                <view class="name">{{item.room.name}}</view>
+                <view class="order-price">¥{{item.room.price}}/晚</view>
+                <view class="order-time">{{item.shopStore.address}}</view>
+            </view>
+        </view>
+        <view class="order-times">
+            <view class="order-date">
+                <view class="date">{{item.orderTime}}——{{item.Time}}</view>
+                <view class="sky">{{item.day}}晚</view>
+            </view>
+            <view class="price">¥{{item.price}}</view>
+        </view>
+        <!-- <view class="order-order">
+                <view class="service">联系客服</view> 
+                <view class="service"  >联系房东</view>
+                <block wx:if="{{item.status==100}}">
+                    <view class="service" data-index="{{index}}" catchtap="delOrder">取消定单</view>
+                </block>
+                <block wx:if="{{item.status==200}}">
+                    <view class="service">申请退款</view>
+                </block>
+                <block wx:if="{{item.status==100}}">
+                    <view class="pay" data-item="{{item}}" catchtap="storepackage">去支付</view>
+                </block>
+                <block wx:if="{{item.status==200}}">
+                    <view class="pay">详情</view>
+                </block>
+                <block wx:if="{{item.status==400}}">
+                    <view class="pay" data-item="{{item}}" catchtap="evaluation">去评价</view>
+                </block>
+            </view> -->
+    </view>
+</block>

+ 1 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/index.wxss

@@ -0,0 +1 @@
+page{background:#f6f6f6;padding-bottom:148rpx}.box{background:#ffffff;margin:30rpx;padding:30rpx;border-radius:30rpx}.box .order-times{width:90%;background:#FFFFFF;border:1rpx solid #FFE300;border-radius:30rpx;margin:20rpx 5%;display:flex;justify-content:space-between;padding:10rpx 30rpx}.box .order-times .order-date{display:flex}.box .order-times .order-date .date{margin-right:20rpx}.box .order-times .price{color:red}.box .order-number{display:flex;justify-content:space-between}.box .order-number .number{font-size:30rpx}.box .order-number .state{font-size:30rpx}.box .order-txt{display:flex;margin:20rpx 0rpx 0 0}.box .order-txt .order-image{width:240rpx;height:180rpx;margin-right:20rpx}.box .order-txt .order-name{margin-top:5rpx}.box .order-txt .order-name .name{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.box .order-txt .order-name .order-price{color:red;margin-top:20rpx}.box .order-txt .order-name .order-time{margin-top:20rpx}.box .order-order{display:flex;justify-content:flex-end;margin-top:20rpx}.box .order-order .bu{border:1rpx solid #BBBBBB !important;border-radius:24rpx !important;font-size:30rpx !important;padding:0rpx 20rpx !important;margin-right:20rpx !important;background:#ffffff !important}.box .order-order .service{border:1rpx solid #BBBBBB;border-radius:24rpx;font-size:30rpx;padding:20rpx 20rpx;margin-right:20rpx}.box .order-order .pay{border-radius:24rpx;font-size:30rpx;padding:20rpx 0;width:180rpx;text-align:center;background:#46a9a4}

+ 107 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.js

@@ -0,0 +1,107 @@
+let Parse = getApp().Parse;
+const company = getApp().globalData.company
+const dateF = require('../../../../../../../utils/date')
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        order: null,
+        id: null,
+        time: null
+    },
+    async getShopOrder() {
+        let ShopOrder = new Parse.Query('RoomOrder')
+        ShopOrder.include('shopStore')
+        ShopOrder.include('user')
+        let Store = await ShopOrder.get(this.data.id)
+        let order = Store.toJSON()
+        let time = dateF.formatTime("YYYY-mm-dd HH:MM:SS", order.createdAt)
+        console.log(order);
+        this.setData({ order: order, time: time })
+    },
+    phone() {
+        let phone = this.data.order.user.mobile
+        console.log(phone);
+        wx.makePhoneCall({
+            phoneNumber: phone
+        })
+    },
+
+    copywxtap: function() {
+        wx.showToast({
+            title: '复制成功',
+        })
+        wx.setClipboardData({
+            data: this.data.order.orderNum,
+            success: function(res) {
+                wx.getClipboardData({
+                    //这个api是把拿到的数据放到电脑系统中的
+                    success: function(res) {
+                        console.log(res.data) // data
+                    }
+                })
+            }
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function(options) {
+        let id = options.id
+        console.log(id);
+        this.setData({ id: id })
+        this.getShopOrder()
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function() {
+
+    }
+})

+ 3 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": { "van-icon": "@vant/weapp/icon/index" }
+}

+ 93 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.less

@@ -0,0 +1,93 @@
+page {
+    background: #f6f6f6;
+}
+
+.box {
+    background: #ffffff;
+    margin: 30rpx;
+    padding: 30rpx ;
+    border-radius: 30rpx;
+
+    .order-number {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 20rpx;
+
+        .order-title {
+            margin-right: 20rpx;
+        }
+
+        .order-txts {
+            color: #767676;
+        }
+
+        .number {
+            font-size: 30rpx;
+        }
+
+        .state {
+            font-size: 30rpx;
+        }
+    }
+
+    .order-txt {
+        display: flex;
+        margin: 0rpx 0rpx 0 0;
+
+        .order-image {
+            width: 240rpx;
+            height: 180rpx;
+            margin-right: 30rpx;
+        }
+
+
+        .order-name {
+
+
+            margin-top: 5rpx;
+
+            .order-price {
+                color: red;
+                margin-top: 20rpx;
+            }
+
+            .order-time {
+                font-size: 30rpx;
+                margin-top: 20rpx;
+            }
+        }
+    }
+
+    .order-order {
+        display: flex;
+        justify-content: flex-end;
+        margin-top: 20rpx;
+
+        .bu {
+            border: 1rpx solid #BBBBBB !important;
+            border-radius: 24rpx !important;
+            font-size: 30rpx !important;
+            padding: 0rpx 20rpx !important;
+            margin-right: 20rpx !important;
+            background: #ffffff !important;
+        }
+
+        .service {
+            border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 20rpx;
+            margin-right: 20rpx;
+        }
+
+        .pay {
+            // border: 1rpx solid #BBBBBB;
+            border-radius: 24rpx;
+            font-size: 30rpx;
+            padding: 20rpx 0;
+            width: 180rpx;
+            text-align: center;
+            background: #46a9a4;
+        }
+    }
+}

+ 29 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.wxml

@@ -0,0 +1,29 @@
+<nav type="back" background-color="#46a9a4" title="订单详情" />
+<view class="box">
+    <view class="order-txt" data-item="{{item}}">
+        <image class="order-image" src="{{order.shopStore.cover}}" />
+        <view class="order-name">
+            <view>{{order.room.name}}</view>
+            <view class="order-price">¥{{order.price}}</view>
+            <view class="order-time">营业时间:{{order.shopStore.workingTime}}</view>
+        </view>
+    </view>
+</view>
+<view class="box">
+ <view class="order-number">
+        <view class="order-title">订单编号:</view>
+        <view class="order-txts"bindtap="copywxtap">{{order.orderNum}} 复制</view>
+    </view>
+    <view class="order-number">
+        <view class="order-title">创建时间:</view>
+        <view class="order-txts">{{time}}</view>
+    </view>
+    <view class="order-number">
+        <view class="order-title">客户名称:</view>
+        <view class="order-txts">{{order.user.realname}}</view>
+    </view>
+    <view class="order-number">
+        <view class="order-title">联系电话:</view>
+        <view class="order-txts"bindtap="phone">{{order.user.mobile}}  <van-icon name="phone" /></view>
+    </view>
+</view>

+ 1 - 0
nova-tourism/pages/my/merchant/merchant-home/order2-list/order-deils/index.wxss

@@ -0,0 +1 @@
+page{background:#f6f6f6}.box{background:#ffffff;margin:30rpx;padding:30rpx ;border-radius:30rpx}.box .order-number{display:flex;justify-content:space-between;margin-bottom:20rpx}.box .order-number .order-title{margin-right:20rpx}.box .order-number .order-txts{color:#767676}.box .order-number .number{font-size:30rpx}.box .order-number .state{font-size:30rpx}.box .order-txt{display:flex;margin:0rpx 0rpx 0 0}.box .order-txt .order-image{width:240rpx;height:180rpx;margin-right:30rpx}.box .order-txt .order-name{margin-top:5rpx}.box .order-txt .order-name .order-price{color:red;margin-top:20rpx}.box .order-txt .order-name .order-time{font-size:30rpx;margin-top:20rpx}.box .order-order{display:flex;justify-content:flex-end;margin-top:20rpx}.box .order-order .bu{border:1rpx solid #BBBBBB !important;border-radius:24rpx !important;font-size:30rpx !important;padding:0rpx 20rpx !important;margin-right:20rpx !important;background:#ffffff !important}.box .order-order .service{border:1rpx solid #BBBBBB;border-radius:24rpx;font-size:30rpx;padding:20rpx 20rpx;margin-right:20rpx}.box .order-order .pay{border-radius:24rpx;font-size:30rpx;padding:20rpx 0;width:180rpx;text-align:center;background:#46a9a4}

+ 247 - 0
nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.js

@@ -0,0 +1,247 @@
+const Parse = getApp().Parse;
+const company = getApp().globalData.company
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        length: 0,
+        earnings: 0,
+        list: [
+            { 'num': '提现到银行卡' },
+        ],
+        idx: null,
+        id: null,
+        name: null,
+        price: null,
+        checked: true,
+        merchant: null,
+        names: null,
+        bankName: null,
+        accountId: null,
+        activeColor: getApp().globalData.activeColor,
+        titleColor: getApp().globalData.titleColor,
+    },
+    async getUserAgentWithdraw() {
+        let merchant = wx.getStorageSync("merchant");
+        if (merchant == "") {
+            wx.redirectTo({
+                url: '/nova-bzzb/pages/my/login/index'
+            });
+            return;
+        }
+        if (this.data.length > 2) {
+            wx.showToast({
+                title: '您本月的提现次数已到上限',
+                icon: 'none',
+
+            });
+            return;
+        }
+        if (!this.data.price) {
+            wx.showToast({
+                title: '请输入提现金额',
+                icon: 'none',
+
+            });
+            return
+        }
+        console.log(this.data.price, this.data.earnings);
+        console.log(this.data.price > this.data.earnings)
+        if (Number(this.data.price) > Number(this.data.earnings)) {
+            wx.showToast({
+                title: '您输入的金额超过了您的可提现金额',
+                icon: 'none',
+            });
+            return
+        }
+        if (this.data.price < 1000) {
+            wx.showToast({
+                title: '最低提现金额为1000元',
+                icon: 'none',
+
+            });
+            return
+        }
+
+        if (!this.data.name) {
+            wx.showToast({
+                title: '请选择提现方式',
+                icon: 'none',
+
+            });
+            return
+        }
+        if (!this.data.names || !this.data.bankName || !this.data.accountId) {
+            wx.showToast({
+                title: '请输入完整银行卡信息',
+                icon: 'none',
+
+            });
+            return
+        }
+        let UserAgentWithdraw = Parse.Object.extend("UserAgentWithdraw")
+        let userAgentWithdraw = new UserAgentWithdraw()
+        userAgentWithdraw.set("count", Number(this.data.price))
+        userAgentWithdraw.set("type", "bank")
+        userAgentWithdraw.set("isVerified", false)
+        userAgentWithdraw.set("company", {
+            __type: 'Pointer',
+            className: 'Company',
+            objectId: company
+        })
+        userAgentWithdraw.set("user", {
+            __type: 'Pointer',
+            className: '_User',
+            objectId: this.data.merchant
+
+        })
+        userAgentWithdraw.set("info", [{
+            name: this.data.names,
+            accountId: this.data.accountId,
+            bankName: this.data.bankName,
+            storeName: this.data.id,
+        }]
+
+        )
+
+        userAgentWithdraw.save().then(res => {
+            console.log(res)
+            wx.showToast({
+                title: '提现成功',
+                icon: 'none',
+
+            });
+            wx.navigateBack({
+                delta: 1
+
+            })
+
+        })
+
+
+    },
+    goIndex(e) {
+        let index = e.currentTarget.dataset.index;
+        let name = e.currentTarget.dataset.item.num
+        if (index == this.data.idx) {
+            this.setData({
+                idx: null,
+                name: null
+            })
+        } else {
+            this.setData({
+                idx: index,
+                name: name
+            })
+        }
+    },
+    blur(e) {
+        let name = e.currentTarget.dataset.name
+        this.setData({
+            [name]: e.detail.value
+        })
+    },
+    async getTotal(startTime, endTime) {
+        let UserAgentWithdraw = new Parse.Query('UserAgentWithdraw')
+        UserAgentWithdraw.equalTo('user', this.data.merchant)
+        UserAgentWithdraw.equalTo('type', 'bank')
+        UserAgentWithdraw.greaterThan('createdAt', startTime)
+        UserAgentWithdraw.lessThan('createdAt', endTime)
+        let userAgentWithdraw = await UserAgentWithdraw.find()
+        let length
+        if (userAgentWithdraw) {
+            console.log(userAgentWithdraw.length);
+            length = userAgentWithdraw.length
+        }
+        this.setData({
+            length: length
+        })
+        console.log(this.data.length);
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        console.log(Parse.User.current().id);
+        let earnings = options.earnings
+        let id = options.id
+        let merchant = wx.getStorageSync('merchant'); //用户
+        console.log(merchant);
+        console.log(earnings);
+        this.setData({
+            earnings: earnings,
+            merchant: merchant.objectId,
+            id: id
+        })
+        let d = new Date();
+        this.date = d
+        let data = new Date(d.getFullYear(), d.getMonth() + 1, 0);
+        let day = data.getDate();
+        this.data.year = d.getFullYear()
+        this.data.month = d.getMonth() + 1 > 9 ? d.getMonth() + 1 : "0" + (d.getMonth() + 1)
+        let dayArr = []
+        for (let i = 0; i < day; i++) {
+            if (i < 9) {
+                dayArr.push("0" + (i + 1))
+            } else {
+                dayArr.push((i + 1))
+            }
+
+        }
+        let startTime = this.data.year + "-" + this.data.month + "-" + "01" + " 00:00:00"
+        let endTime = this.data.year + "-" + this.data.month + "-" + dayArr.length + " 23:59:57"
+        console.log(startTime, endTime);
+        this.getTotal(startTime, endTime)
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+      "van-icon": "@vant/weapp/icon/index"
+
+  }
+}

+ 40 - 0
nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.wxml

@@ -0,0 +1,40 @@
+<nav type="back" background-color="#46a9a4" frontColor="{{titleColor ? titleColor : '#000000'}}" title="申请提现"></nav>
+<view class="earnings">¥{{earnings ? earnings:'0'}}</view>
+<view class="apply">
+    <view class="title">提现金额</view>
+    <view class="string">
+        ¥
+        <input bindblur="blur" type="text" data-name="price" type="number" value="{{price}}" class="input" placeholder="请输入提现金额,最低1000起提现"></input>
+    </view>
+</view>
+<view class="apply">
+    <view class="way">提现方式</view>
+    <view class='box'>
+        <view class='box-container' wx:for="{{list}}" wx:key="list">
+            <view class="{{index==idx?'_left':'left'}}" bindtap='goIndex' data-index="{{index}}" data-item="{{item}}">
+                <view>
+                    <van-icon name="cash-back-record" />
+                    {{item.num}}
+                </view>
+                <view class="choose">
+                    <van-icon name="success" color="#ffffff" size="50rpx" />
+                </view>
+            </view>
+        </view>
+        <block wx:if="{{name=='提现到银行卡'}}">
+            <view class="bank">
+                <view class="name">所属银行:</view>
+                <input bindblur="blur" type="text" data-name="bankName" value="{{bankName}}" placeholder="请输入所属银行"></input>
+            </view>
+            <view class="bank">
+                <view class="name">姓名:</view>
+                <input bindblur="blur" type="text" data-name="names" value="{{names}}" placeholder="请输入姓名"></input>
+            </view>
+            <view class="bank">
+                <view class="name">卡号:</view>
+                <input bindblur="blur" type="text" data-name="accountId" value="{{accountId}}" placeholder="请输入卡号"></input>
+            </view>
+        </block>
+    </view>
+</view>
+<view class="withdrawal" bindtap="getUserAgentWithdraw">提现</view>

+ 87 - 0
nova-tourism/pages/my/merchant/merchant-home/store-withdraw/index.wxss

@@ -0,0 +1,87 @@
+page {
+    background: #f6f6f6;
+    padding-top: 20rpx;
+  }
+  .earnings {
+    background: #ffffff;
+    padding: 30rpx;
+    font-size: 48rpx;
+    color: #e8c423;
+  }
+  .apply {
+    background: #ffffff;
+    margin-top: 20rpx;
+    padding: 20rpx 30rpx;
+  }
+  .apply .box {
+    width: 100%;
+    height: auto;
+    border-top: 1px solid #efefef;
+  }
+  .apply .box .bank {
+    display: flex;
+    margin-top: 20rpx;
+  }
+  .apply .box .bank .name {
+    margin-right: 20rpx;
+    width: 150rpx;
+  }
+  .apply .box-container {
+    width: 90;
+    display: flex;
+    height: 80rpx;
+    align-items: center;
+  }
+  .apply .left {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    font-size: 32rpx;
+    margin-top: 20rpx;
+  }
+  .apply .left .choose {
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 50%;
+    border: 1rpx solid #d1cfcf;
+    margin: auto 20rpx;
+  }
+  .apply ._left {
+    margin-top: 20rpx;
+    width: 100%;
+    font-size: 32rpx;
+    color: #14a1fd;
+    display: flex;
+    justify-content: space-between;
+  }
+  .apply ._left .choose {
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 50%;
+    background: #14a1fd;
+    margin: auto 20rpx;
+    padding: auto;
+  }
+  .apply .way {
+    padding-bottom: 20rpx;
+    border-bottom: 1rpx solid #edebeb;
+  }
+  .apply .string {
+    color: #e8c423;
+    margin-top: 20rpx;
+    display: flex;
+  }
+  .apply .string .input {
+    width: 100%;
+  }
+  .withdrawal {
+    width: 690rpx;
+    background: #1a999e;
+    color: #ffffff;
+    padding: 20rpx 0;
+    border-radius: 10rpx;
+    margin: 0 30rpx;
+    text-align: center;
+    margin-top: 50rpx;
+  }
+  

+ 6 - 0
project.private.config.json

@@ -45,6 +45,12 @@
                     "pathName": "nova-tourism/pages/collect/collect-detail/index",
                     "query": "",
                     "scene": null
+                },
+                {
+                    "name": "商户端首页",
+                    "pathName": "nova-tourism/pages/my/merchant/merchant-home/index",
+                    "query": "",
+                    "scene": null
                 }
             ]
         }

Неке датотеке нису приказане због велике количине промена