18016688350 4 anni fa
parent
commit
9310970066
59 ha cambiato i file con 1044 aggiunte e 363 eliminazioni
  1. 8 5
      app.json
  2. 10 0
      app.wxss
  3. 125 0
      pages/agent/add.js
  4. 9 0
      pages/agent/add.json
  5. 39 0
      pages/agent/add.wxml
  6. 0 0
      pages/agent/add.wxss
  7. 151 0
      pages/agent/edit.js
  8. 9 0
      pages/agent/edit.json
  9. 41 0
      pages/agent/edit.wxml
  10. 1 1
      pages/agent/edit.wxss
  11. 115 0
      pages/agent/index.js
  12. 8 0
      pages/agent/index.json
  13. 31 0
      pages/agent/index.wxml
  14. 6 6
      pages/agent/index.wxss
  15. 16 16
      pages/device/index.js
  16. 8 8
      pages/device/index.wxml
  17. 2 2
      pages/device/list.js
  18. 1 1
      pages/device/list.wxml
  19. 17 17
      pages/divide/index.js
  20. 4 4
      pages/divide/index.wxml
  21. 20 2
      pages/index/index.wxml
  22. 30 30
      pages/order/index.js
  23. 4 4
      pages/order/index.wxml
  24. 12 12
      pages/orderGoods/buy.js
  25. 2 2
      pages/orderGoods/buy.wxml
  26. 18 18
      pages/orderGoods/order.js
  27. 3 3
      pages/product/index.js
  28. 6 5
      pages/product/index.wxml
  29. 14 14
      pages/pssRecord/index.js
  30. 2 2
      pages/pssRecord/index.wxml
  31. 17 17
      pages/scheme/form.js
  32. 3 3
      pages/scheme/form.wxml
  33. 11 11
      pages/scheme/index.js
  34. 7 7
      pages/scheme/index.wxml
  35. 2 2
      pages/scheme/select.js
  36. 17 17
      pages/scheme/sync.js
  37. 2 2
      pages/scheme/sync.wxml
  38. 13 13
      pages/stock/stockout.js
  39. 2 2
      pages/stock/stockout.wxml
  40. 18 18
      pages/store/add.js
  41. 0 0
      pages/store/add.json
  42. 11 11
      pages/store/add.wxml
  43. 29 0
      pages/store/add.wxss
  44. 46 30
      pages/store/edit.js
  45. 0 0
      pages/store/edit.json
  46. 14 13
      pages/store/edit.wxml
  47. 30 0
      pages/store/edit.wxss
  48. 19 19
      pages/store/index.js
  49. 0 0
      pages/store/index.json
  50. 10 10
      pages/store/index.wxml
  51. 37 0
      pages/store/index.wxss
  52. 1 1
      pages/total/index.js
  53. 1 1
      pages/vendingMachine/index.wxml
  54. 12 12
      pages/vendingMachine/settledStore.js
  55. 0 0
      pages/vendingMachine/settledStore.json
  56. 2 2
      pages/vendingMachine/settledStore.wxml
  57. 0 0
      pages/vendingMachine/settledStore.wxss
  58. 1 1
      project.config.json
  59. 27 19
      utils/util.js

+ 8 - 5
app.json

@@ -13,14 +13,14 @@
     "pages/contractTime/index",
     "pages/pwdSet/index",
     "pages/role/index",
-    "pages/hotel/index",
-    "pages/hotel/add",
-    "pages/hotel/edit",
+    "pages/store/index",
+    "pages/store/add",
+    "pages/store/edit",
     "pages/device/index",
     "pages/device/list",
     "pages/device/detail",
     "pages/vendingMachine/index",
-    "pages/vendingMachine/settledHotel",
+    "pages/vendingMachine/settledStore",
     "pages/product/index",
     "pages/product/edit",
     "pages/scheme/index",
@@ -51,7 +51,10 @@
     "pages/role/introducerList",
     "pages/role/addIntroducer",
     "pages/role/editIntroducer",
-    "pages/accountRecord/index"
+    "pages/accountRecord/index",
+    "pages/agent/index",
+    "pages/agent/add",
+    "pages/agent/edit"
   ],
 
   "tabBar": {

+ 10 - 0
app.wxss

@@ -87,6 +87,16 @@ button::after {
   color: #898989;
 }
 
+.btn-red {
+  background: red;
+  color: #fff !important;
+}
+
+.btn-red-hover {
+  background: #f04b4b !important;
+  color: #fff;
+}
+
 .btn-white {
   background: #fff;
   color: #333 !important;

+ 125 - 0
pages/agent/add.js

@@ -0,0 +1,125 @@
+const utils = require('../../utils/util')
+const form = require('../../utils/formValidation')
+const util = require('../../utils/util.js');
+const app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    user: {
+      username:'',
+      realname:'',
+      password:'',
+      agentPhone:''
+    }
+   
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+  formSubmit: function(e) {
+    //表单规则
+    let rules = [{
+      name: "username",
+      rule: ["required"], //可使用区间,此处主要测试功能
+      msg: ["请输入账户"]
+    }, {
+      name: "realname",
+      rule: ["required"],
+      msg: ["请输入代理名称"]
+    },{
+      name: "agentPhone",
+      rule: ["required", "isMobile"],
+      msg: ["请输入代理手机号", "请输入正确的手机号"]
+    }];
+    //进行表单检查
+    let formData = e.detail.value;
+    let checkRes = form.validation(formData, rules);
+    if (!checkRes) {
+      var that = this
+      util.request(util.api.agentAdd, that.data.user, "POST", false, true,app.globalData.token).then((res)=>{
+        if (res.code == 200) {
+          wx.navigateTo({
+            url: '/pages/agent/index',
+          })
+        }else{
+          util.toast("该代理或联系方式已存在,请重新输入")
+        }
+      }).catch((res) => {})
+    } else {
+      wx.showToast({
+        title: checkRes,
+        icon: "none"
+      });
+    }
+  },
+  formReset: function(e) {
+    console.log("清空数据")
+  },
+
+  inputedit: function (e) {
+    let _this = this;
+    let dataset = e.currentTarget.dataset;
+    let value = e.detail.value;
+    let name = dataset.name;
+    _this.data[name] = value;
+    _this.setData({
+      [name]: _this.data[name]
+    });
+  },
+})

+ 9 - 0
pages/agent/add.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "新增代理",
+  "navigationBarBackgroundColor": "#5677fc",
+  "navigationBarTextStyle": "white",
+  "usingComponents": {
+    "tui-list-cell":"/components/list-cell/list-cell",
+    "time-picker": "../../components/timePicker/timePicker"
+  }
+}

+ 39 - 0
pages/agent/add.wxml

@@ -0,0 +1,39 @@
+<view class="container">
+  <form bindsubmit="formSubmit" bindreset="formReset">
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>账户:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="username" placeholder="请输入账户" maxlength="50" catchinput="inputedit" data-name="user.username"/>
+      </view>
+    </tui-list-cell>
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>代理名称:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="realname" placeholder="请输入代理名称" maxlength="50" catchinput="inputedit" data-name="user.realname"/>
+      </view>
+    </tui-list-cell>
+
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>密码:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="password" placeholder="请输入密码"
+          maxlength="50" catchinput="inputedit" data-name="user.password"/>
+      </view>
+    </tui-list-cell>
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>联系方式:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="agentPhone" placeholder="请输入联系方式"
+          maxlength="11" type="number" catchinput="inputedit" data-name="user.agentPhone"/>
+      </view>
+    </tui-list-cell>
+
+    <view class="tui-btn-box">
+      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="addStore">提交</button>
+      <button class="btn-primary btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
+    </view>
+
+  <time-picker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide"
+    bind:setPickerTime="setPickerTime" config="{{pickerConfig}}"></time-picker>
+  </form>
+</view>

+ 0 - 0
pages/hotel/add.wxss → pages/agent/add.wxss


+ 151 - 0
pages/agent/edit.js

@@ -0,0 +1,151 @@
+// pages/store/edit1.js
+const utils = require('../../utils/util')
+const form = require('../../utils/formValidation')
+const util = require('../../utils/util.js');
+const app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    id:'',
+    user: {
+      realname:'',
+      password:'',
+      agentPhone:''
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      id: options.id
+    })
+    this.bindAgent()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+
+
+
+  formSubmit: function(e) {
+    //表单规则
+    let rules = [{
+      name: "realname",
+      rule: ["required"],
+      msg: ["请输入代理名称"]
+    },{
+      name: "agentPhone",
+      rule: ["required", "isMobile"],
+      msg: ["请输入代理手机号", "请输入正确的手机号"]
+    }];
+    //进行表单检查
+    let formData = e.detail.value;
+    let checkRes = form.validation(formData, rules);
+    if (!checkRes) {
+      var that = this
+      util.request(util.api.agentEdit, that.data.user, "PUT", false, true,app.globalData.token).then((res)=>{
+        if (res.code == 200) {
+          wx.navigateBack({
+            url: '/pages/agent/index',
+          })
+        }
+      }).catch((res) => {})
+      // wx.showToast({
+      //   title: "验证通过!",
+      //   icon: "none"
+      // });
+    } else {
+      wx.showToast({
+        title: checkRes,
+        icon: "none"
+      });
+      return;
+    }
+  },
+
+  delete:function(){
+    util.request(util.api.agentDelete,{id:this.data.id}, "DELETE", true, true,app.globalData.token).then((res)=>{
+      if (res.code == 200) {
+        wx.navigateTo({
+          url: '/pages/agent/index',
+        })
+      }
+    }).catch((res) => {})
+  },
+
+  formReset: function(e) {
+    console.log("清空数据")
+  },
+
+  bindAgent(){
+    var that = this
+    util.request(util.api.agentQueryById, {id:that.data.id}, "GET", false, true,app.globalData.token).then((res)=>{
+      if (res.code == 200) {
+        that.setData({
+          user: res.result,
+        })
+      }
+    }).catch((res) => {})
+  },
+  inputedit: function (e) {
+    let _this = this;
+    let dataset = e.currentTarget.dataset;
+    let value = e.detail.value;
+    let name = dataset.name;
+    _this.data[name] = value;
+    _this.setData({
+      [name]: _this.data[name]
+    });
+  },
+})

+ 9 - 0
pages/agent/edit.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "编辑代理",
+  "navigationBarBackgroundColor": "#5677fc",
+  "navigationBarTextStyle": "white",
+  "usingComponents": {
+    "tui-list-cell":"/components/list-cell/list-cell",
+    "time-picker": "../../components/timePicker/timePicker"
+  }
+}

+ 41 - 0
pages/agent/edit.wxml

@@ -0,0 +1,41 @@
+<!--pages/store/edit1.wxml-->
+<view class="container">
+  <form bindsubmit="formSubmit" bindreset="formReset">
+    <!-- <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>账户:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="username" placeholder="请输入账户" maxlength="50" catchinput="inputedit" value="{{user.username}}" data-name="user.username"/>
+      </view>
+    </tui-list-cell> -->
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>代理名称:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="realname" placeholder="请输入代理名称" maxlength="50" catchinput="inputedit" value="{{user.realname}}" data-name="user.realname"/>
+      </view>
+    </tui-list-cell>
+
+    <!-- <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>密码:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="password" placeholder="请输入密码"
+          maxlength="50" catchinput="inputedit" value="{{user.password}}" data-name="user.password"/>
+      </view>
+    </tui-list-cell> -->
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title"><text style="color:red;">*</text>联系方式:</view>
+        <input placeholder-class="phcolor" class="tui-input" name="agentPhone" placeholder="请输入联系方式"
+          maxlength="11" type="number" catchinput="inputedit" value="{{user.agentPhone}}" data-name="user.agentPhone"/>
+      </view>
+    </tui-list-cell>
+
+    <view class="tui-btn-box">
+      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="editStore">提交</button>
+      <button class="btn-primary margin-bottom-xs btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
+      <button class="btn-primary btn-red" hover-class="btn-hover" formType="delete" type="primary" data-id="" bindtap="delete">删除</button>
+    </view>
+
+  <time-picker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide"
+    bind:setPickerTime="setPickerTime" config="{{pickerConfig}}"></time-picker>
+  </form>
+</view>

+ 1 - 1
pages/hotel/edit.wxss → pages/agent/edit.wxss

@@ -1,4 +1,4 @@
-/* pages/hotel/edit1.wxss */
+/* pages/store/edit1.wxss */
 
 .tui-line-cell {
   width: 100%;

+ 115 - 0
pages/agent/index.js

@@ -0,0 +1,115 @@
+const utils = require('../../utils/util')
+const app = getApp();
+Page({
+
+  data: {
+    searchParams: {
+      pageNo: 1,
+      pageSize: 10,
+      realname:'',
+    },
+    list:[],
+  },
+
+    /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+    this.setData({
+      ["searchParams.pageNo"]: 1,
+      pullUpOn: true,
+      loadding: false,
+      list: []
+    })
+    this.getList()
+    setTimeout(() => {
+      wx.stopPullDownRefresh()
+    }, 300);
+  },
+
+  
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    let that = this;
+    //只是测试效果,逻辑以实际数据为准
+    this.setData({ 
+      loadding: true,
+      pullUpOn: true
+    })
+    this.setData({
+      ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
+    })
+    this.getList()
+  },
+
+  onLoad: function (options) {
+      this.getList();
+  },
+  onReady: function (options) {
+  },
+ 
+  searchAgent(){
+    this.setData({
+      ["searchParams.pageNo"]: 1,
+      pullUpOn: true,
+      loadding: false,
+      list: []
+    })
+    this.getList()
+  },
+  getList() {
+    var that = this
+
+    utils.request(utils.api.agentList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
+      if (res.code == 200) {
+        if (res.result.records.length > 0) {
+          if (that.data.list.length > 0) {
+            let list = that.data.list
+            res.result.records.forEach((e)=>{
+              list.push(e)
+            })
+            that.setData({
+              list: list
+            })
+          }else{
+            that.setData({
+              list: res.result.records
+            })
+          }
+        } else {
+          that.setData({
+            loadding: false,
+            pullUpOn: false,
+            ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
+          })
+        }
+
+      }
+    }).catch((res) => {})
+  },
+
+
+  toAddAgent(){
+    wx.navigateTo({
+      url: '/pages/agent/add',
+    })
+  },
+  toDetail(e){
+    wx.navigateTo({
+      url: '/pages/agent/edit?id='+e.currentTarget.dataset.id,
+    })
+  },
+  inputedit: function (e) {
+    let _this = this;
+    let dataset = e.currentTarget.dataset;
+    let value = e.detail.value;
+    let name = dataset.name;
+    _this.data[name] = value;
+    _this.setData({
+      [name]: _this.data[name]
+    });
+  },
+ 
+})

+ 8 - 0
pages/agent/index.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "代理管理",
+  "navigationBarBackgroundColor": "#5677fc",
+  "navigationBarTextStyle": "white",
+  "usingComponents": { 
+    "tui-button": "../../components/extend/button/button"
+  }
+}

+ 31 - 0
pages/agent/index.wxml

@@ -0,0 +1,31 @@
+<view class="container">
+  <view class="cu-bar search bg-white margin-bottom-xs">
+    <view class="search-form round">
+      <text class="cuIcon-search"></text>
+      <input type="text" placeholder="输入代理名称" confirm-type="search" data-name="searchParams.realname" catchinput="inputedit"></input>
+    </view>
+    <view class="action">
+      <button class="cu-btn bg-blue shadow-blur round" bindtap="searchAgent">搜索</button>
+    </view>
+  </view>
+
+  <view class="bg-white store-grid">
+    <view class="grid col-2">
+      <block wx:for="{{list}}">
+      <view>
+        <view class="margin-sm padding-sm radius shadow-warp store-list-row" bindtap="toDetail" data-id="{{item.id}}">
+          <view style="width:100%;">
+            <view class="padding-bottom-sm store-name">{{item.realname}}</view>
+            <view class="store-mobile">{{item.phone?item.phone:""}}</view>
+          </view>
+          <view class="store-img">
+            <!-- <image src="../../static/images/my/ico_store@3x.png"></image> -->
+          </view>
+        </view>
+      </view>
+      </block>
+    </view>
+  </view>
+  
+  <tui-button type="blue" height="98rpx" shape="rightAngle" bindtap="toAddAgent" style="position:fixed;bottom:0;width:100%;">新增代理</tui-button>
+</view>

+ 6 - 6
pages/hotel/index.wxss → pages/agent/index.wxss

@@ -7,31 +7,31 @@ page{
   height: 100%;
   padding-bottom: calc(env(safe-area-inset-bottom) / 2 + 100rpx);
 }
-.hotel-grid{
+.store-grid{
   height: 100%;
 }
-.hotel-list-row{
+.store-list-row{
   display: flex;
   align-items: center;
   position: relative;
 }
-.hotel-list-row .hotel-name{
+.store-list-row .store-name{
   font-weight: 600;
 }
 
-.hotel-list-row .hotel-mobile{
+.store-list-row .store-mobile{
   font-size:24rpx;
   color:#999;
 }
 
-.hotel-list-row .hotel-img{
+.store-list-row .store-img{
   float:right;
   flex-direction: column;
   align-items: center;
   height:100rpx;
   width:100rpx;
 }
-.hotel-list-row .hotel-img image{
+.store-list-row .store-img image{
   height:100rpx;
   width:100rpx;
 }

+ 16 - 16
pages/device/index.js

@@ -9,9 +9,9 @@ Page({
     searchParams: {
       pageNo: 1,
       pageSize: 10,
-      hotelName:'',
+      storeName:'',
     },
-    hotelList: [],
+    storeList: [],
     loadding: false,
     pullUpOn: true,
   },
@@ -20,7 +20,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
   },
 
   /**
@@ -58,9 +58,9 @@ Page({
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
-      hotelList: []
+      storeList: []
     })
-    this.bindHotelList()
+    this.bindStoreList()
     setTimeout(() => {
       wx.stopPullDownRefresh()
     }, 300);
@@ -78,7 +78,7 @@ Page({
     this.setData({
       ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
     })
-    this.bindHotelList()
+    this.bindStoreList()
   },
 
   /**
@@ -89,34 +89,34 @@ Page({
   },
   toDevice(e) {
     wx.navigateTo({
-      url: '/pages/device/list?hotelId=' + e.currentTarget.dataset.id,
+      url: '/pages/device/list?storeId=' + e.currentTarget.dataset.id,
     })
   },
-  searchHotel(){
+  searchStore(){
     this.setData({
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
-      hotelList: []
+      storeList: []
     })
-    this.bindHotelList()
+    this.bindStoreList()
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelListPage, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
+    util.request(util.api.storeListPage, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
       if (res.code == 200) {
         if (res.result.records.length > 0) {
-          if (that.data.hotelList.length > 0) {
-            let list = that.data.hotelList
+          if (that.data.storeList.length > 0) {
+            let list = that.data.storeList
             res.result.records.forEach((e)=>{
               list.push(e)
             })
             that.setData({
-              hotelList: list
+              storeList: list
             })
           }else{
             that.setData({
-              hotelList: res.result.records
+              storeList: res.result.records
             })
           }
         } else {

+ 8 - 8
pages/device/index.wxml

@@ -2,23 +2,23 @@
   <view class="cu-bar search bg-white margin-bottom-xs">
     <view class="search-form round">
       <text class="cuIcon-search"></text>
-      <input type="text" placeholder="输入门店名称" confirm-type="search" data-name="searchParams.hotelName" catchinput="inputedit"></input>
+      <input type="text" placeholder="输入门店名称" confirm-type="search" data-name="searchParams.storeName" catchinput="inputedit"></input>
     </view>
     <view class="action">
-      <button class="cu-btn bg-blue shadow-blur round" bindtap="searchHotel">搜索</button>
+      <button class="cu-btn bg-blue shadow-blur round" bindtap="searchStore">搜索</button>
     </view>
   </view>
 
-  <view class="bg-white hotel-grid">
+  <view class="bg-white store-grid">
     <view class="grid col-2">
-      <block wx:for="{{hotelList}}">
+      <block wx:for="{{storeList}}">
         <view>
-          <view class="margin-xs padding-sm radius shadow-warp hotel-list-row" bindtap="toDevice" data-id="{{item.id}}">
+          <view class="margin-xs padding-sm radius shadow-warp store-list-row" bindtap="toDevice" data-id="{{item.id}}">
             <view style="width:100%;">
-              <view class="padding-bottom-sm hotel-name">{{item.hotelName}}</view>
-              <view class="hotel-mobile">{{item.hotelTel}}</view>
+              <view class="padding-bottom-sm store-name">{{item.storeName}}</view>
+              <view class="store-mobile">{{item.storeTel}}</view>
             </view>
-            <view class="hotel-img">
+            <view class="store-img">
               <image src="../../static/images/my/ico_equipment@3x.png"></image>
             </view>
           </view>

+ 2 - 2
pages/device/list.js

@@ -9,7 +9,7 @@ Page({
     searchParams: {
       pageNo: 1,
       pageSize: 20,
-      hotelId: ''
+      storeId: ''
     },
     deviceList: [],
     loadding: false,
@@ -22,7 +22,7 @@ Page({
    */
   onLoad: function (options) {
     this.setData({
-      ["searchParams.hotelId"]: options.hotelId
+      ["searchParams.storeId"]: options.storeId
     })
     this.bindDeviceList()
   },

+ 1 - 1
pages/device/list.wxml

@@ -8,7 +8,7 @@
     <view class="flex" bindtap="toDetail" data-id="{{item.id}}">
       <view class="flex-sub padding-sm text-center">{{item.deviceSn}}</view>
       <view class="flex-sub padding-sm text-center">{{item.deviceLocation}}</view>
-      <view class="flex-sub padding-sm text-center">{{item.hotelName}}</view>
+      <view class="flex-sub padding-sm text-center">{{item.storeName}}</view>
     </view>
   </block>
 		<!--加载loadding-->

+ 17 - 17
pages/divide/index.js

@@ -25,7 +25,7 @@ Page({
       createTime_begin:"",
       createTime_end:"",
       tradingStatus:1,
-      hotelName:""
+      storeName:""
     },
     dataStr: '',
     totalAmount:0,
@@ -33,10 +33,10 @@ Page({
     pullUpOn: true,
     list:[],
     values: {
-      hotelId: '',
-      hotelName: '',
+      storeId: '',
+      storeName: '',
     },
-    hotelList: [],
+    storeList: [],
   },
 
   /**
@@ -76,7 +76,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-      this.bindHotelList()
+      this.bindStoreList()
       this.btnsearch();
     
   },
@@ -117,22 +117,22 @@ Page({
 
   },
 
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     this.setData({
-      ['values.hotelId']: item.id,
-      ['values.hotelName']: item.hotelName,
-      ['searchParams.hotelId']: item.id,
+      ['values.storeId']: item.id,
+      ['values.storeName']: item.storeName,
+      ['searchParams.storeId']: item.id,
       list:[]
     })
     this.btnsearch();
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    utils.request(utils.api.hotelList, {}, "GET", false, true,app.globalData.token).then((res) => {
+    utils.request(utils.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})
@@ -153,7 +153,7 @@ Page({
   },
   setPickerTime: function (val) {
     console.log(111111)
-    console.log(this.data.searchParams.hotelName)
+    console.log(this.data.searchParams.storeName)
     let data = val.detail;
     let startTime = utils.formatDate(data.startTime,'yyyy-MM-dd')
     let endTime = utils.formatDate(data.endTime,'yyyy-MM-dd')
@@ -163,7 +163,7 @@ Page({
       dataStr: startTime +" ~ "+ endTime,
       ["searchParams.createTime_begin"]: data.startTime,
       ["searchParams.createTime_end"]: data.endTime,
-      ["searchParams.hotelName"]: this.data.searchParams.hotelName,
+      ["searchParams.storeName"]: this.data.searchParams.storeName,
       list:[]
     });
     this.btnsearch();
@@ -208,12 +208,12 @@ Page({
     }).catch((res) => {})
   },
 
-  inputeditHotelName: function (e) {
+  inputeditStoreName: function (e) {
     let _this = this; 
     let value = e.detail.value; 
 
     _this.setData({
-      ["searchParams.hotelName"]: value
+      ["searchParams.storeName"]: value
     });
   },
 })

+ 4 - 4
pages/divide/index.wxml

@@ -8,7 +8,7 @@
 	<!-- <tui-list-cell hover="{{false}}">
 	<view class="tui-line-cell">
 			<view class="tui-title">门店名称:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="searchParams.hotelName" placeholder="请输入门店名称" maxlength="50" catchinput="inputeditHotelName" />
+        <input placeholder-class="phcolor" class="tui-input" name="searchParams.storeName" placeholder="请输入门店名称" maxlength="50" catchinput="inputeditStoreName" />
  
 		<view class="action"> 
         <button class="cu-btn bg-blue shadow-blur round" bindtap="btnsearch">搜索</button>
@@ -17,12 +17,12 @@
   </tui-list-cell> -->
 
 
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店:</view>
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-          value="{{values.hotelName}}" name="hotelName" />
+          value="{{values.storeName}}" name="storeName" />
       </view>
     </tui-list-cell>
   </picker> 
@@ -43,7 +43,7 @@
 						<view class="tui-msg-item">
               <view class="tui-msg-name">{{list[index].linkId}}</view>
               <view class="tui-msg-content" style="font-size:28rpx;margin-top:18rpx">
-								 {{list[index].hotelId_dictText}}
+								 {{list[index].storeId_dictText}}
 							</view>  
 							<view class="tui-msg-content" style="font-size:28rpx;margin-top:18rpx">
 								 {{list[index].productName}}

+ 20 - 2
pages/index/index.wxml

@@ -79,8 +79,11 @@
         </view>
       </view>
     </view>
-    <view  wx:if="{{userInfo.mgvmRole!=1&&userInfo.mgvmRole!=2}}">
-      <view class="margin-xs padding radius shadow-warp common-list-row" bindtap="toRouter" data-url="/pages/hotel/index">
+
+
+    <view>
+    <!-- <view  wx:if="{{userInfo.mgvmRole==3||userInfo.mgvmRole==4}}"> -->
+      <view class="margin-xs padding radius shadow-warp common-list-row" bindtap="toRouter" data-url="/pages/store/index">
         <view style="width:100%;">
           <view class="padding-bottom-sm common-name">门店列表</view>
           <view class="common-name-ex">门店信息管理</view>
@@ -126,6 +129,21 @@
         </view>
       </view>
     </view>
+
+   
+    <view>
+    <!-- <view wx:if="{{userInfo.mgvmRole==0||userInfo.mgvmRole==3}}"> -->
+      <view class="margin-xs padding radius shadow-warp common-list-row" bindtap="toRouter" data-url="/pages/agent/index">
+        <view style="width:100%;">
+          <view class="padding-bottom-sm common-name">代理管理</view>
+          <view class="common-name-ex">查看代理信息</view>
+        </view>
+        <view class="common-img">
+          <image src="../../static/images/my/ico_operation@3x.png"></image>
+        </view>
+      </view>
+    </view>
+
   </view>
 
   <!-- <view class="flex">

+ 30 - 30
pages/order/index.js

@@ -22,17 +22,17 @@ Page({
       // endTime: "2019-12-01",
       startTime: '',
       endTime: '',
-      hotelId:'',
-      hotelName:'',
+      storeId:'',
+      storeName:'',
       orderSn:'',
     },
     orderList:{
       status:'',
     },
     dataStr: '',
-    hotelList:{
+    storeList:{
       id:'',
-      hotelName:''
+      storeName:''
     },
     selectH: 0
   },
@@ -42,7 +42,7 @@ Page({
    */
   onLoad: function (options) {
     // this.bindOrderList();
-    this.bindHotelList();
+    this.bindStoreList();
     this.submitSearch();
   },
 
@@ -138,15 +138,15 @@ Page({
     this.data.searchParams.startTime = data.startTime;
     this.data.searchParams.endTime = data.endTime;
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName
     })
-    this.data.searchParams.hotelId = item.id;
-    // this.data.searchParams.hotelName
+    this.data.searchParams.storeId = item.id;
+    // this.data.searchParams.storeName
   },
   showSearchModel: function() {
     this.setData({
@@ -160,18 +160,18 @@ Page({
   },
   clearSearch(){
     this.setData({
-      ['searchParams.hotelName']: '',
-      ['searchParams.hotelId']: '',
+      ['searchParams.storeName']: '',
+      ['searchParams.storeId']: '',
       ['searchParams.startTime']: '',
       ['searchParams.endTime']: '',
     })
   },
   submitSearch(){
-    if(this.data.searchParams.hotelId === undefined){
-      this.data.searchParams.hotelId = ''
+    if(this.data.searchParams.storeId === undefined){
+      this.data.searchParams.storeId = ''
     }
-    if(this.data.searchParams.hotelName === undefined){
-      this.data.searchParams.hotelName = ''
+    if(this.data.searchParams.storeName === undefined){
+      this.data.searchParams.storeName = ''
     }
     this.setData({
       selectH: 0,
@@ -184,11 +184,11 @@ Page({
   },
   bindOrderList(){
     var that = this
-    if(this.data.searchParams.hotelId === undefined){
-      this.data.searchParams.hotelId = ''
+    if(this.data.searchParams.storeId === undefined){
+      this.data.searchParams.storeId = ''
     }
-    if(this.data.searchParams.hotelName === undefined){
-      this.data.searchParams.hotelName = ''
+    if(this.data.searchParams.storeName === undefined){
+      this.data.searchParams.storeName = ''
     }
     util.request(util.api.orderListPage, that.data.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
       if (res.code == 200) {
@@ -217,24 +217,24 @@ Page({
       }
     }).catch((res) => {})
   },
-  bindHotelList(){
+  bindStoreList(){
     var that = this
-    util.request(util.api.hotelList, that.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
+    util.request(util.api.storeList, that.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result,
-          ['searchParams.hotelId']: res.result.id,
-          ['searchParams.hotelName']: res.result.hotelName
+          storeList: res.result,
+          ['searchParams.storeId']: res.result.id,
+          ['searchParams.storeName']: res.result.storeName
         })
       }
     }).catch((res) => {})
   },
   searchOrder(){
-    if(this.data.searchParams.hotelId === undefined){
-      this.data.searchParams.hotelId = ''
+    if(this.data.searchParams.storeId === undefined){
+      this.data.searchParams.storeId = ''
     }
-    if(this.data.searchParams.hotelName === undefined){
-      this.data.searchParams.hotelName = ''
+    if(this.data.searchParams.storeName === undefined){
+      this.data.searchParams.storeName = ''
     }
     this.bindOrderList()
   },

+ 4 - 4
pages/order/index.wxml

@@ -29,11 +29,11 @@
         </tui-list-cell>
       </view>
       <view class="tui-search-model-item">
-        <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+        <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
           <tui-list-cell hover="{{false}}">
             <view class="tui-line-cell">
               <view class="tui-title">门店</view>
-              <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.hotelName}}" catchinput="inputedit" data-name="searchParams.hotelId"/>
+              <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.storeName}}" catchinput="inputedit" data-name="searchParams.storeId"/>
             </view>
           </tui-list-cell>
         </picker>
@@ -67,7 +67,7 @@
         <view class="tui-goods-item">
           <image src="{{item.productImg}}" class="tui-goods-img"></image>
           <view class="tui-goods-center">
-            <view class="tui-goods-name">门店名称:{{item.hotelName}}</view>
+            <view class="tui-goods-name">门店名称:{{item.storeName}}</view>
             <view class="tui-goods-name">商品名称:{{item.productName}}</view>
 
           </view>
@@ -86,7 +86,7 @@
         <view class="tui-goods-price">
           <view> 门店佣金:</view>
           <view class="tui-size-24">¥</view>
-          <view class="tui-price-large">{{filter.toDecimal2Penny(item.hotelCommission)}}</view>
+          <view class="tui-price-large">{{filter.toDecimal2Penny(item.storeCommission)}}</view>
           <!-- <view class="tui-size-24">.00</view> -->
         </view>
       </tui-list-cell>

+ 12 - 12
pages/orderGoods/buy.js

@@ -6,10 +6,10 @@ Page({
    * 页面的初始数据
    */
   data: {
-    hotelList:[],
+    storeList:[],
     searchParams:{
-      hotelId:'',
-      hotelName:''
+      storeId:'',
+      storeName:''
     },
     productList:[],
     totalPrice:0,
@@ -21,26 +21,26 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.bindProductStockList()
 
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName
     })
     this.bindProductStockList()
   },
@@ -117,7 +117,7 @@ Page({
     console.log("2222")
     wx.navigateTo({
       
-      url: '/pages/orderGoods/submitBuy?strJson='+encodeURIComponent(JSON.stringify(this.data.sellProductList))+'&hotelId='+this.data.searchParams.hotelId,
+      url: '/pages/orderGoods/submitBuy?strJson='+encodeURIComponent(JSON.stringify(this.data.sellProductList))+'&storeId='+this.data.searchParams.storeId,
     })
   }
 })

+ 2 - 2
pages/orderGoods/buy.wxml

@@ -1,10 +1,10 @@
 <wxs src="../../utils/filter.wxs" module="filter"></wxs>
 <view class="container">
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店</view>
-        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.hotelName}}" />
+        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.storeName}}" />
       </view>
     </tui-list-cell>
   </picker>

+ 18 - 18
pages/orderGoods/order.js

@@ -20,16 +20,16 @@ Page({
     searchParams: {
       startTime: "",
       endTime: "",
-      hotelId:'',
+      storeId:'',
       pageNo: 1,
       pageSize: 10,
       orderSn:'',
-      hotelName:'',
+      storeName:'',
     },
     loadding: false,
     pullUpOn: true,
     dataStr: '',
-    hotelList:[],
+    storeList:[],
     selectH: 0,
     orderList:[]
   },
@@ -38,7 +38,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.submitSearch()
   },
   timePickerShow: function () {
@@ -67,14 +67,14 @@ Page({
     this.data.searchParams.startTime = data.startTime;
     this.data.searchParams.endTime = data.endTime;
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName
     })
-    this.data.searchParams.hotelId = item.id;
+    this.data.searchParams.storeId = item.id;
   },
   /**
    * 页面相关事件处理函数--监听用户下拉动作
@@ -119,18 +119,18 @@ Page({
   },
   clearSearch(){
     this.setData({
-      ['searchParams.hotelName']: '',
-      ['searchParams.hotelId']: '',
+      ['searchParams.storeName']: '',
+      ['searchParams.storeId']: '',
       ['searchParams.startTime']: '',
       ['searchParams.endTime']: '',
     })
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})
@@ -173,11 +173,11 @@ Page({
     }).catch((res) => {})
   },
   searchProductOrder(){
-    if(this.data.searchParams.hotelId === undefined){
-      this.data.searchParams.hotelId = ''
+    if(this.data.searchParams.storeId === undefined){
+      this.data.searchParams.storeId = ''
     }
-    if(this.data.searchParams.hotelName === undefined){
-      this.data.searchParams.hotelName = ''
+    if(this.data.searchParams.storeName === undefined){
+      this.data.searchParams.storeName = ''
     }
     this.bindProductOrderList()
   },

+ 3 - 3
pages/product/index.js

@@ -2,14 +2,14 @@ const util = require('../../utils/util')
 const app = getApp()
 Page({
 
-  /**
+  /** 
    * 页面的初始数据
    */
   data: {
     searchParams: {
       pageNo: 1,
       pageSize: 10,
-      productName: ''
+      productName: '',
     },
     productList: [],
     loadding: false,
@@ -88,7 +88,7 @@ Page({
   },
   bindProductList() {
     var that = this
-    util.request(util.api.vmProductListPage, that.data.searchParams, "GET", false, false, app.globalData.token).then((res) => {
+    util.request(util.api.MgVmProductSkuPage, that.data.searchParams, "GET", false, false, app.globalData.token).then((res) => {
       if (res.code == 200) {
         if (res.result.records.length > 0) {
           if (that.data.productList.length > 0) {

+ 6 - 5
pages/product/index.wxml

@@ -20,16 +20,17 @@
       <tui-list-cell padding="0">
         <view class="tui-goods-item">
           <image src="{{item.productImg}}" class="tui-goods-img"></image>
-          <view class="tui-goods-center"  bindtap="toEdit" data-id="{{item.id}}">
+          <!-- <view class="tui-goods-center"  bindtap="toEdit" data-id="{{item.id}}"> -->
+          <view class="tui-goods-center"   data-id="{{item.id}}">
             <view class="tui-goods-name">{{item.productName}}</view>
             <view class="tui-goods-attr">商品进货价(元):<text style="color:red;">¥{{filter.toDecimal2Penny(item.productPrice)}}</text></view>
-            <view class="tui-goods-attr">商品售价(元):<text style="color:red;">¥{{filter.toDecimal2Penny(item.productSellPrice)}}</text></view>
+            <view class="tui-goods-attr">商品售价(元):<text style="color:red;">¥{{filter.toDecimal2Penny(item.productPrice)}}</text></view>
             <view class="tui-goods-attr">商品应用格子:
         <tui-tag size="small" tui-tag-class="tui-mrbtm" wx:for="{{filter.gridList(item.productGrid)}}">{{item}}</tui-tag></view>
           </view>
-          <view class="tui-price-right">
+          <!-- <view class="tui-price-right">
             <button class="tui-btn tui-btn-small tui-warning tui-fillet"  bindtap="deleteProduct" data-id="{{item.id}}">删除</button> 
-          </view>
+          </view> -->
         </view>
       </tui-list-cell>
     </view>
@@ -39,6 +40,6 @@
 		<tui-loadmore visible="{{loadding}}" index="{{3}}" type="red"></tui-loadmore>
 		<tui-nomore visible="{{!pullUpOn}}" bgcolor="#fafafa"></tui-nomore>
 		<!--加载loadding-->
-  <tui-button type="blue" height="98rpx" shape="rightAngle" bindtap="toAddProduct" style="position:fixed;bottom:0;width:100%;">添加商品</tui-button>
+  <!-- <tui-button type="blue" height="98rpx" shape="rightAngle" bindtap="toAddProduct" style="position:fixed;bottom:0;width:100%;">添加商品</tui-button> -->
 
 </view>

+ 14 - 14
pages/pssRecord/index.js

@@ -14,17 +14,17 @@ Page({
       name: "出库"
     }],
     searchParams: {
-      hotelId:'',
+      storeId:'',
       pageNo: 1,
       pageSize: 20,
-      hotelName: ''
+      storeName: ''
     },
      params: {
-      hotelId:'',
+      storeId:'',
       pageNo: 1,
       pageSize: 20,
     },
-    hotelList:[],
+    storeList:[],
     orderList:[],
     loadding: false,
     pullUpOn: true,
@@ -34,7 +34,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.bindOrderist()
   },
   /**
@@ -68,12 +68,12 @@ Page({
     })
     this.bindOrderist()
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName,
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName,
       ["searchParams.pageNo"]: 1,
       orderList: []
     })
@@ -92,14 +92,14 @@ Page({
   },
   bindOrderist(){
     var that = this
-    if(!that.data.searchParams.hotelId){
+    if(!that.data.searchParams.storeId){
       this.setData({
         orderList: []
       })
       return;
     }
     if(that.data.currentTab == 0){ 
-      that.data.params.hotelId = that.data.searchParams.hotelId;
+      that.data.params.storeId = that.data.searchParams.storeId;
       that.data.params.pageNo = that.data.searchParams.pageNo;
       that.data.params.pageSize = that.data.searchParams.pageSize;
       // that.data.params = Object.assign( that.data.params, that.data.searchParams)
@@ -181,12 +181,12 @@ Page({
       }).catch((res) => {})
     }
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true,app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})

+ 2 - 2
pages/pssRecord/index.wxml

@@ -2,12 +2,12 @@
   <tui-tabs tabs="{{navbar}}" currentTab="{{currentTab>1?0:currentTab}}" bind:change="changeTab" itemWidth="50%">
   </tui-tabs>
 
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店</view>
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-          value="{{searchParams.hotelName}}" />
+          value="{{searchParams.storeName}}" />
       </view>
     </tui-list-cell>
   </picker>

+ 17 - 17
pages/scheme/form.js

@@ -8,10 +8,10 @@ Page({
    */
   data: {
     isEdit: false,
-    hotelList: [],
+    storeList: [],
     values: {
-      hotelId: '',
-      hotelName: '',
+      storeId: '',
+      storeName: '',
       schemeName: '',
       schemeProductList: []
     },
@@ -40,7 +40,7 @@ Page({
             productName: '请选择商品',
             productImg: '',
             productSchemePrice: 0,
-            hotelDivide: 0,
+            storeDivide: 0,
             gridNum:i
           }
           schemeProductList.push(item)
@@ -56,13 +56,13 @@ Page({
     wx.setNavigationBarTitle({
       title: that.data.isEdit ? '方案编辑' : '新增方案'
     })
-    this.bindHotelList()
+    this.bindStoreList()
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     this.setData({
-      ['values.hotelId']: item.id,
-      ['values.hotelName']: item.hotelName
+      ['values.storeId']: item.id,
+      ['values.storeName']: item.storeName
     })
   },
   formSubmit: function (e) {
@@ -87,11 +87,11 @@ Page({
           util.toast("请输入商品价格")
           return;
         } 
-        if(schemeProductList[i].hotelDivide==0){
+        if(schemeProductList[i].storeDivide==0){
           util.toast('请输入门店分成')
           return;
         }  
-        if(schemeProductList[i].hotelDivide<1||schemeProductList[i].hotelDivide>100){
+        if(schemeProductList[i].storeDivide<1||schemeProductList[i].storeDivide>100){
           util.toast('门店分成必须是1-100的分成')
           return;
         }  
@@ -167,8 +167,8 @@ Page({
         value = parseInt(parseFloat(value)*100);
         itemProduct.productSchemePrice = value
         break;
-      case "hotelDivide":
-        itemProduct.hotelDivide = value
+      case "storeDivide":
+        itemProduct.storeDivide = value
         break;
     }
     list.splice(index,1,itemProduct)
@@ -177,12 +177,12 @@ Page({
     })
     
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})
@@ -209,7 +209,7 @@ Page({
           productName: '请选择商品',
           productImg: '',
           productSchemePrice: 0,
-          hotelDivide: 0,
+          storeDivide: 0,
           gridNum:i
         }
         for (let k = 0; k < schemeProductLists.length; k++) {

+ 3 - 3
pages/scheme/form.wxml

@@ -1,12 +1,12 @@
 <wxs src="../../utils/filter.wxs" module="filter"></wxs>
 <view class="container">
   <form bindsubmit="formSubmit" bindreset="formReset">
-    <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+    <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
       <tui-list-cell hover="{{false}}">
         <view class="tui-line-cell">
           <view class="tui-title">门店</view>
           <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-          model:value="{{values.hotelName}}" />
+          model:value="{{values.storeName}}" />
         </view>
       </tui-list-cell>
     </picker>
@@ -35,7 +35,7 @@
         <tui-list-cell hover="{{false}}" padding="20rpx 20rpx">
           <view class="tui-line-cell">
             <view class="tui-title">门店分成(%):</view>
-            <input placeholder-class="phcolor" class="tui-input" placeholder="请填写门店分成比例" type="number" value="{{item.hotelDivide}}" bindblur="inputeditRow" data-name="hotelDivide" data-index="{{index}}" data-item="{{item}}"/>
+            <input placeholder-class="phcolor" class="tui-input" placeholder="请填写门店分成比例" type="number" value="{{item.storeDivide}}" bindblur="inputeditRow" data-name="storeDivide" data-index="{{index}}" data-item="{{item}}"/>
           </view>
         </tui-list-cell>
 

+ 11 - 11
pages/scheme/index.js

@@ -6,11 +6,11 @@ Page({
    * 页面的初始数据
    */
   data: {
-    hotelList:[],
+    storeList:[],
     selectH: 0,
     searchParams:{
-      hotelId: '',
-      hotelName: '',
+      storeId: '',
+      storeName: '',
       pageNo: 1,
       pageSize: 20,
       schemeName: ''
@@ -24,7 +24,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.bindScheme()
   },
 
@@ -64,12 +64,12 @@ Page({
     })
     this.bindScheme()
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName,
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName,
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
@@ -99,12 +99,12 @@ Page({
       url: '/pages/scheme/form',
     })
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true,app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})

+ 7 - 7
pages/scheme/index.wxml

@@ -12,12 +12,12 @@
       </view>
 
     </view>
-    <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+    <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
       <tui-list-cell hover="{{false}}">
         <view class="tui-line-cell">
           <view class="tui-title">门店</view>
           <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-            value="{{searchParams.hotelName}}" />
+            value="{{searchParams.storeName}}" />
         </view>
       </tui-list-cell>
     </picker>
@@ -25,15 +25,15 @@
   <!--screen-->
 
   <!--list-->
-  <view class="bg-white hotel-grid">
+  <view class="bg-white store-grid">
     <view class="grid col-2">
       <view wx:for="{{schemeList}}">
-        <view class="margin-xs padding-sm radius shadow-warp hotel-list-row" bindtap="toEdit" data-id="{{item.id}}">
+        <view class="margin-xs padding-sm radius shadow-warp store-list-row" bindtap="toEdit" data-id="{{item.id}}">
           <view style="width:100%;">
-            <view class="padding-bottom-sm hotel-name">{{item.schemeName}}</view>
-            <view class="hotel-mobile">{{item.hotelName}}</view>
+            <view class="padding-bottom-sm store-name">{{item.schemeName}}</view>
+            <view class="store-mobile">{{item.storeName}}</view>
           </view>
-          <view class="hotel-img">
+          <view class="store-img">
             <tui-icon name="feedback" size="60" color="#5677fc"></tui-icon>
           </view>
         </view>

+ 2 - 2
pages/scheme/select.js

@@ -63,7 +63,7 @@ Page({
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
-      hotelList: []
+      storeList: []
     })
     this.bindProductList()
     setTimeout(() => {
@@ -103,7 +103,7 @@ Page({
     itemProduct.productName = row.productName
     itemProduct.productImg = row.productImg
     itemProduct.productSchemePrice = row.productSellPrice
-    itemProduct.hotelDivide = 30
+    itemProduct.storeDivide = 30
     list.splice(this.data.index,1,itemProduct)
     prevPage.setData({
       ["values.schemeProductList"]:list

+ 17 - 17
pages/scheme/sync.js

@@ -6,13 +6,13 @@ Page({
    * 页面的初始数据
    */
   data: {
-    hotelList:[],
+    storeList:[],
     schemeList:[],
     deviceList:[],
     selectList:[],
     values:{
-      hotelId: '',
-      hotelName: '',
+      storeId: '',
+      storeName: '',
       schemeId: '',
       schemeName: ''
     },
@@ -23,19 +23,19 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.bindSchemeList()
 
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     
     console.log(item)
     this.setData({
-      ['values.hotelId']: item.id,
-      ['values.hotelName']: item.hotelName
+      ['values.storeId']: item.id,
+      ['values.storeName']: item.storeName
     })
-    this.binddeviceListByHotelId()
+    this.binddeviceListByStoreId()
   },
   bindSchemePickerChange: function (e) {
     var item = this.data.schemeList[e.detail.value]
@@ -65,12 +65,12 @@ Page({
       selectList: list
     })
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})
@@ -85,9 +85,9 @@ Page({
       }
     }).catch((res) => {})
   },
-  binddeviceListByHotelId(){
+  binddeviceListByStoreId(){
     var that = this
-    util.request(util.api.deviceListByHotelId, {hotelId:that.data.values.hotelId}, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.deviceListByStoreId, {storeId:that.data.values.storeId}, "GET", false, true, app.globalData.token).then((res) => {
       console.log(res)
       if (res.code == 200) {
         res.result.forEach((e)=>{
@@ -115,7 +115,7 @@ Page({
   },
   saveInfo(){
     var that = this;
-    var hotelId = this.data.values.hotelId
+    var storeId = this.data.values.storeId
     var schemeId = this.data.values.schemeId
     var selectList = this.data.selectList
     var selectList1 = [];
@@ -123,7 +123,7 @@ Page({
       selectList1.push(selectList[i].deviceSn)
     }
 
-    if(hotelId==null||hotelId==""){
+    if(storeId==null||storeId==""){
       wx.showToast({
         icon: "none",
         title: "门店不能为空"
@@ -144,7 +144,7 @@ Page({
       });
       return;
     }
-    util.request(util.api.upDevice, {hotelId:hotelId,schemeId:schemeId,selectList:selectList1}, "POST", true, true,app.globalData.token).then((res)=>{
+    util.request(util.api.upDevice, {storeId:storeId,schemeId:schemeId,selectList:selectList1}, "POST", true, true,app.globalData.token).then((res)=>{
       console.log(res)
       if (res.code == 200) {
         util.toast('保存成功')

+ 2 - 2
pages/scheme/sync.wxml

@@ -1,10 +1,10 @@
 <view class="container">
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店</view>
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-          value="{{values.hotelName}}" />
+          value="{{values.storeName}}" />
       </view>
     </tui-list-cell>
   </picker>

+ 13 - 13
pages/stock/stockout.js

@@ -7,10 +7,10 @@ Page({
    * 页面的初始数据
    */
   data: {
-    hotelList:{id:'', hotelName:''},
+    storeList:{id:'', storeName:''},
     searchParams: {
-      hotelId:'',
-      hotelName:'',
+      storeId:'',
+      storeName:'',
     },
     deviceList: {
       deviceDetail:{
@@ -24,15 +24,15 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
     this.bindDeviceList()
   },
-  bindHotelPickerChange: function (e) {
-    var item = this.data.hotelList[e.detail.value]
+  bindStorePickerChange: function (e) {
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['searchParams.hotelId']: item.id,
-      ['searchParams.hotelName']: item.hotelName
+      ['searchParams.storeId']: item.id,
+      ['searchParams.storeName']: item.storeName
     })
     this.bindDeviceList()
   },
@@ -41,14 +41,14 @@ Page({
       url: '/pages/stock/stockDeviceDetail?deviceId=' + e.currentTarget.dataset.id,
     })
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true,app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result,
-          ['searchParams.hotelId']: res.result.id,
-          ['searchParams.hotelName']: res.result.hotelName
+          storeList: res.result,
+          ['searchParams.storeId']: res.result.id,
+          ['searchParams.storeName']: res.result.storeName
         })
       }
     }).catch((res) => {})

+ 2 - 2
pages/stock/stockout.wxml

@@ -1,9 +1,9 @@
 <view class="container">
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店</view>
-        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.hotelName}}" />
+        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true" value="{{searchParams.storeName}}" />
       </view>
     </tui-list-cell>
   </picker>

+ 18 - 18
pages/hotel/add.js → pages/store/add.js

@@ -22,16 +22,16 @@ Page({
       startTime: "2019-01-01 ",
       endTime: "2019-12-01"
     },
-    hotelInfo:{
-      hotelName: '',
-      hotelPrincipal: '',
-      hotelPrincipalPhone: '',
-      hotelTel: '',
-      hotelHouseNum: '',
-      hotelArea: '',
-      hotelAddress: '',
-      hotelContractStart: '',
-      hotelContractEnd: '',
+    storeInfo:{
+      storeName: '',
+      storePrincipal: '',
+      storePrincipalPhone: '',
+      storeTel: '',
+      storeHouseNum: '',
+      storeArea: '',
+      storeAddress: '',
+      storeContractStart: '',
+      storeContractEnd: '',
     },
     dataStr: '',
     region: [],
@@ -115,21 +115,21 @@ Page({
       ["values.endTime"]: data.endTime,
       dataStr: startTime +" ~ "+ endTime
     });
-    this.data.hotelInfo.hotelContractStart = this.data.values.startTime;
-    this.data.hotelInfo.hotelContractEnd = this.data.values.endTime;
+    this.data.storeInfo.storeContractStart = this.data.values.startTime;
+    this.data.storeInfo.storeContractEnd = this.data.values.endTime;
   },
   formSubmit: function(e) {
     //表单规则
     let rules = [{
-      name: "hotelName",
+      name: "storeName",
       rule: ["required"], //可使用区间,此处主要测试功能
       msg: ["请输入门店名称"]
     }, {
-      name: "hotelPrincipal",
+      name: "storePrincipal",
       rule: ["required", "isChinese", "minLength:2", "maxLength:6"],
       msg: ["请输入负责人姓名", "姓名必须全部为中文", "姓名必须2个或以上字符", "姓名不能超过6个字符"]
     },{
-      name: "hotelPrincipalPhone",
+      name: "storePrincipalPhone",
       rule: ["required", "isMobile"],
       msg: ["请输入负责人手机号", "请输入正确的手机号"]
     }];
@@ -138,10 +138,10 @@ Page({
     let checkRes = form.validation(formData, rules);
     if (!checkRes) {
       var that = this
-      util.request(util.api.addHotel, that.data.hotelInfo, "POST", false, true,app.globalData.token).then((res)=>{
+      util.request(util.api.addStore, that.data.storeInfo, "POST", false, true,app.globalData.token).then((res)=>{
         if (res.code == 200) {
           wx.navigateTo({
-            url: '/pages/hotel/index',
+            url: '/pages/store/index',
           })
         }else{
           util.toast("该门店名称已存在,请重新输入")
@@ -163,7 +163,7 @@ Page({
     this.setData({
       region: e.detail.value
     })
-    this.data.hotelInfo.hotelArea = this.data.region.join(" ")
+    this.data.storeInfo.storeArea = this.data.region.join(" ")
   },
   inputedit: function (e) {
     let _this = this;

+ 0 - 0
pages/hotel/add.json → pages/store/add.json


+ 11 - 11
pages/hotel/add.wxml → pages/store/add.wxml

@@ -3,41 +3,41 @@
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>门店名称:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelName" placeholder="请输入门店名称" maxlength="50" catchinput="inputedit" data-name="hotelInfo.hotelName"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeName" placeholder="请输入门店名称" maxlength="50" catchinput="inputedit" data-name="storeInfo.storeName"/>
       </view>
     </tui-list-cell>
 
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>门店负责人:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelPrincipal" placeholder="请输入门店负责人"
-          maxlength="50" catchinput="inputedit" data-name="hotelInfo.hotelPrincipal"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storePrincipal" placeholder="请输入门店负责人"
+          maxlength="50" catchinput="inputedit" data-name="storeInfo.storePrincipal"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>负责人电话:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelPrincipalPhone" placeholder="请输入负责人电话"
-          maxlength="11" type="number" catchinput="inputedit" data-name="hotelInfo.hotelPrincipalPhone"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storePrincipalPhone" placeholder="请输入负责人电话"
+          maxlength="11" type="number" catchinput="inputedit" data-name="storeInfo.storePrincipalPhone"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">前台电话:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelTel" placeholder="请输入前台电话" maxlength="50" catchinput="inputedit" data-name="hotelInfo.hotelTel"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeTel" placeholder="请输入前台电话" maxlength="50" catchinput="inputedit" data-name="storeInfo.storeTel"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">客房数量:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelHouseNum" placeholder="请输入客房数量" type="number" catchinput="inputedit" data-name="hotelInfo.hotelHouseNum"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeHouseNum" placeholder="请输入客房数量" type="number" catchinput="inputedit" data-name="storeInfo.storeHouseNum"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">所在地区:</view>
-        <!-- <input placeholder-class="phcolor" class="tui-input" name="hotelArea" placeholder="请输入所在地区" catchinput="inputedit" data-name="hotelInfo.hotelArea"/> -->
-        <picker mode="region" name="hotelArea" bindchange="bindRegionChange" value="{{region}}">
+        <!-- <input placeholder-class="phcolor" class="tui-input" name="storeArea" placeholder="请输入所在地区" catchinput="inputedit" data-name="storeInfo.storeArea"/> -->
+        <picker mode="region" name="storeArea" bindchange="bindRegionChange" value="{{region}}">
           <text class="tui-input" wx:if="{{region==''}}">请选择所在地区</text>
           <text class="tui-input" wx:if="{{region!=''}}">{{region[0]}}{{region[1]}}{{region[2]}}</text>
         </picker>
@@ -46,7 +46,7 @@
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">详细地址:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelAddress" placeholder="请输入所在地区" catchinput="inputedit" data-name="hotelInfo.hotelAddress"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeAddress" placeholder="请输入所在地区" catchinput="inputedit" data-name="storeInfo.storeAddress"/>
       </view>
     </tui-list-cell>
 
@@ -58,7 +58,7 @@
       </view>
     </tui-list-cell> -->
     <view class="tui-btn-box">
-      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="addHotel">提交</button>
+      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="addStore">提交</button>
       <button class="btn-primary btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
     </view>
 

+ 29 - 0
pages/store/add.wxss

@@ -0,0 +1,29 @@
+
+	.tui-line-cell {
+		width: 100%;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+	}
+
+	.tui-title {
+		font-size: 24rpx;
+		line-height: 24rpx;
+		flex-shrink: 0;
+	}
+
+	.tui-input {
+		font-size: 24rpx;
+		color: #333;
+		padding-left: 20rpx;
+		flex: 1;
+  }
+  
+	.tui-btn-box {
+		background-color: #fff;
+		padding: 40rpx 50rpx;
+		box-sizing: border-box;
+	}
+	.phcolor{
+		font-size: 24rpx;
+	}

+ 46 - 30
pages/hotel/edit.js → pages/store/edit.js

@@ -1,4 +1,4 @@
-// pages/hotel/edit1.js
+// pages/store/edit1.js
 const utils = require('../../utils/util')
 const form = require('../../utils/formValidation')
 const util = require('../../utils/util.js');
@@ -23,19 +23,19 @@ Page({
       startTime: "2019-01-01 ",
       endTime: "2019-12-01"
     },
-    hotelInfo:{
-      hotelName: '',
-      hotelPrincipal: '',
-      hotelPrincipalPhone: '',
-      hotelTel: '',
-      hotelHouseNum: '',
-      hotelArea: '',
-      hotelAddress: '',
-      hotelContractStart: '',
-      hotelContractEnd: '',
+    storeInfo:{
+      storeName: '',
+      storePrincipal: '',
+      storePrincipalPhone: '',
+      storeTel: '',
+      storeHouseNum: '',
+      storeArea: '',
+      storeAddress: '',
+      storeContractStart: '',
+      storeContractEnd: '',
     },
     dataStr: '',
-    hotelId:'',
+    storeId:'',
     region: [],
   },
 
@@ -44,9 +44,9 @@ Page({
    */
   onLoad: function (options) {
     this.setData({
-      hotelId: options.hotelId
+      storeId: options.storeId
     })
-    this.bindHotel()
+    this.bindStore()
   },
 
   /**
@@ -121,21 +121,21 @@ Page({
       ["values.endTime"]: data.endTime,
       dataStr: startTime +" ~ "+ endTime
     });
-    this.data.hotelInfo.hotelContractStart = this.data.values.startTime;
-    this.data.hotelInfo.hotelContractEnd = this.data.values.endTime;
+    this.data.storeInfo.storeContractStart = this.data.values.startTime;
+    this.data.storeInfo.storeContractEnd = this.data.values.endTime;
   },
   formSubmit: function(e) {
     //表单规则
     let rules = [{
-      name: "hotelName",
+      name: "storeName",
       rule: ["required"], //可使用区间,此处主要测试功能
       msg: ["请输入门店名称"]
     }, {
-      name: "hotelPrincipal",
+      name: "storePrincipal",
       rule: ["required", "isChinese", "minLength:2", "maxLength:6"],
       msg: ["请输入负责人姓名", "姓名必须全部为中文", "姓名必须2个或以上字符", "姓名不能超过6个字符"]
     },{
-      name: "hotelPrincipalPhone",
+      name: "storePrincipalPhone",
       rule: ["required", "isMobile"],
       msg: ["请输入负责人手机号", "请输入正确的手机号"]
     }];
@@ -144,13 +144,13 @@ Page({
     let checkRes = form.validation(formData, rules);
     if (!checkRes) {
       var that = this
-      util.request(util.api.editHotel, that.data.hotelInfo, "PUT", false, true,app.globalData.token).then((res)=>{
+      util.request(util.api.editStore, that.data.storeInfo, "PUT", false, true,app.globalData.token).then((res)=>{
         if (res.code == 200) {
-          wx.navigateTo({
-            url: '/pages/hotel/index',
+          wx.navigateBack({
+            url: '/pages/store/index',
           })
           console.log("========================")
-          console.log(hotelInfo)
+          console.log(storeInfo)
         }
       }).catch((res) => {})
       // wx.showToast({
@@ -165,6 +165,22 @@ Page({
       return;
     }
   },
+
+  delete:function(){
+
+    
+
+    util.request(util.api.storeDelete,{id:this.data.storeId}, "DELETE", true, true,app.globalData.token).then((res)=>{
+      if (res.code == 200) {
+        wx.navigateTo({
+          url: '/pages/store/index',
+        })
+        console.log("========================")
+        console.log(storeInfo)
+      }
+    }).catch((res) => {})
+  },
+
   formReset: function(e) {
     console.log("清空数据")
   },
@@ -174,19 +190,19 @@ Page({
     this.setData({
       region: e.detail.value
     })
-    this.data.hotelInfo.hotelArea = this.data.region.join("")
+    this.data.storeInfo.storeArea = this.data.region.join("")
   },
-  bindHotel(){
+  bindStore(){
     var that = this
-    util.request(util.api.queryByHotelId, {id:that.data.hotelId}, "GET", false, true,app.globalData.token).then((res)=>{
+    util.request(util.api.queryByStoreId, {id:that.data.storeId}, "GET", false, true,app.globalData.token).then((res)=>{
       if (res.code == 200) {
         that.setData({
-          hotelInfo: res.result,
-          dataStr: res.result.hotelContractStart +" ~ "+ res.result.hotelContractEnd,
-          region: (res.result.hotelArea).split(" ")
+          storeInfo: res.result,
+          dataStr: res.result.storeContractStart +" ~ "+ res.result.storeContractEnd,
+          region: (res.result.storeArea).split(" ")
         })
         console.log("========================")
-        console.log(hotelInfo)
+        console.log(storeInfo)
       }
     }).catch((res) => {})
   },

+ 0 - 0
pages/hotel/edit.json → pages/store/edit.json


+ 14 - 13
pages/hotel/edit.wxml → pages/store/edit.wxml

@@ -1,44 +1,44 @@
-<!--pages/hotel/edit1.wxml-->
+<!--pages/store/edit1.wxml-->
 <view class="container">
   <form bindsubmit="formSubmit" bindreset="formReset">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>门店名称:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelName" placeholder="请输入门店名称" maxlength="50" catchinput="inputedit" value="{{hotelInfo.hotelName}}" data-name="hotelInfo.hotelName"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeName" placeholder="请输入门店名称" maxlength="50" catchinput="inputedit" value="{{storeInfo.storeName}}" data-name="storeInfo.storeName"/>
       </view>
     </tui-list-cell>
 
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>门店负责人:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelPrincipal" placeholder="请输入门店负责人"
-          maxlength="50" value="{{hotelInfo.hotelPrincipal}}" catchinput="inputedit" data-name="hotelInfo.hotelPrincipal"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storePrincipal" placeholder="请输入门店负责人"
+          maxlength="50" value="{{storeInfo.storePrincipal}}" catchinput="inputedit" data-name="storeInfo.storePrincipal"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title"><text style="color:red;">*</text>负责人电话:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelPrincipalPhone" placeholder="请输入负责人电话"
-          maxlength="11" type="number" value="{{hotelInfo.hotelPrincipalPhone}}" catchinput="inputedit" data-name="hotelInfo.hotelPrincipalPhone"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storePrincipalPhone" placeholder="请输入负责人电话"
+          maxlength="11" type="number" value="{{storeInfo.storePrincipalPhone}}" catchinput="inputedit" data-name="storeInfo.storePrincipalPhone"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">前台电话:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelTel" placeholder="请输入前台电话" maxlength="50" value="{{hotelInfo.hotelTel}}" catchinput="inputedit" data-name="hotelInfo.hotelTel"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeTel" placeholder="请输入前台电话" maxlength="50" value="{{storeInfo.storeTel}}" catchinput="inputedit" data-name="storeInfo.storeTel"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">客房数量:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelHouseNum" placeholder="请输入客房数量" type="number" value="{{hotelInfo.hotelHouseNum}}" catchinput="inputedit" data-name="hotelInfo.hotelHouseNum"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeHouseNum" placeholder="请输入客房数量" type="number" value="{{storeInfo.storeHouseNum}}" catchinput="inputedit" data-name="storeInfo.storeHouseNum"/>
       </view>
     </tui-list-cell>
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">所在地区:</view>
-        <!-- <input placeholder-class="phcolor" class="tui-input" name="hotelArea" placeholder="请输入所在地区" catchinput="inputedit" value="{{hotelInfo.hotelArea}}" data-name="hotelInfo.hotelArea"/> -->
-        <picker mode="region" name="hotelArea" bindchange="bindRegionChange" value="{{region}}" placeholder="请选择所在地区">
+        <!-- <input placeholder-class="phcolor" class="tui-input" name="storeArea" placeholder="请输入所在地区" catchinput="inputedit" value="{{storeInfo.storeArea}}" data-name="storeInfo.storeArea"/> -->
+        <picker mode="region" name="storeArea" bindchange="bindRegionChange" value="{{region}}" placeholder="请选择所在地区">
           <text class="tui-input" wx:if="{{region==''}}">请选择所在地区</text>
           <text class="tui-input">{{region[0]}}{{region[1]}}{{region[2]}}</text>
         </picker>
@@ -47,7 +47,7 @@
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">详细地址:</view>
-        <input placeholder-class="phcolor" class="tui-input" name="hotelAddress" placeholder="请输入所在地区" catchinput="inputedit" value="{{hotelInfo.hotelAddress}}" data-name="hotelInfo.hotelAddress"/>
+        <input placeholder-class="phcolor" class="tui-input" name="storeAddress" placeholder="请输入所在地区" catchinput="inputedit" value="{{storeInfo.storeAddress}}" data-name="storeInfo.storeAddress"/>
       </view>
     </tui-list-cell>
 
@@ -59,8 +59,9 @@
       </view>
     </tui-list-cell> -->
     <view class="tui-btn-box">
-      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="editHotel">提交</button>
-      <button class="btn-primary btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
+      <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary" bindtap="editStore">提交</button>
+      <button class="btn-primary margin-bottom-xs btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
+      <button class="btn-primary btn-red" hover-class="btn-hover" formType="delete" type="primary" data-id="" bindtap="delete">删除</button>
     </view>
 
   <time-picker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide"

+ 30 - 0
pages/store/edit.wxss

@@ -0,0 +1,30 @@
+/* pages/store/edit1.wxss */
+
+.tui-line-cell {
+  width: 100%;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+}
+
+.tui-title {
+  font-size: 24rpx;
+  line-height: 24rpx;
+  flex-shrink: 0;
+}
+
+.tui-input {
+  font-size: 24rpx;
+  color: #333;
+  padding-left: 20rpx;
+  flex: 1;
+}
+
+.tui-btn-box {
+  background-color: #fff;
+  padding: 40rpx 50rpx;
+  box-sizing: border-box;
+}
+.phcolor{
+  font-size: 24rpx;
+}

+ 19 - 19
pages/hotel/index.js → pages/store/index.js

@@ -1,4 +1,4 @@
-// pages/hotel/index.js
+// pages/store/index.js
 const util = require('../../utils/util.js');
 const app = getApp();
 Page({
@@ -10,9 +10,9 @@ Page({
     searchParams:{
       pageNo:1,
       pageSize:20,
-      hotelName:'',
+      storeName:'',
     },
-    hotelList:[],
+    storeList:[],
     loadding: false,
     pullUpOn: true,
     
@@ -22,7 +22,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
   },
 
   /**
@@ -61,9 +61,9 @@ Page({
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
-      hotelList: []
+      storeList: []
     })
-    this.bindHotelList()
+    this.bindStoreList()
     setTimeout(() => {
       wx.stopPullDownRefresh()
     }, 300);
@@ -82,7 +82,7 @@ Page({
     this.setData({
       ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
     })
-    this.bindHotelList()
+    this.bindStoreList()
   },
 
   onPageScroll(e) {
@@ -97,34 +97,34 @@ Page({
   onShareAppMessage: function () {
 
   },
-  toAddHotel(){
+  toAddStore(){
     wx.navigateTo({
-      url: '/pages/hotel/add',
+      url: '/pages/store/add',
     })
   },
   toDetail(e){
     wx.navigateTo({
-      url: '/pages/hotel/edit?hotelId='+e.currentTarget.dataset.id,
+      url: '/pages/store/edit?storeId='+e.currentTarget.dataset.id,
     })
   },
-  bindHotelList(){
+  bindStoreList(){
     var that = this
-    util.request(util.api.hotelListPage, that.data.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
+    util.request(util.api.storeListPage, that.data.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
       if (res.code == 200) {
         if (res.result.records.length > 0) {
-          if (that.data.hotelList.length > 0) {
-            let list = that.data.hotelList
+          if (that.data.storeList.length > 0) {
+            let list = that.data.storeList
             var records = res.result.records
             records.forEach(record => {
               list.push(record)
             });
 
             that.setData({
-              hotelList: list
+              storeList: list
             })
           } else {
             that.setData({
-              hotelList: res.result.records
+              storeList: res.result.records
             })
           }
         } else {
@@ -137,14 +137,14 @@ Page({
       }
     }).catch((res) => {})
   },
-  searchHotel(){
+  searchStore(){
     this.setData({
       ["searchParams.pageNo"]: 1,
       pullUpOn: true,
       loadding: false,
-      hotelList: []
+      storeList: []
     })
-    this.bindHotelList()
+    this.bindStoreList()
   },
   inputedit: function (e) {
     let _this = this;

+ 0 - 0
pages/hotel/index.json → pages/store/index.json


+ 10 - 10
pages/hotel/index.wxml → pages/store/index.wxml

@@ -2,24 +2,24 @@
   <view class="cu-bar search bg-white margin-bottom-xs">
     <view class="search-form round">
       <text class="cuIcon-search"></text>
-      <input type="text" placeholder="输入门店名称" confirm-type="search" data-name="searchParams.hotelName" catchinput="inputedit"></input>
+      <input type="text" placeholder="输入门店名称" confirm-type="search" data-name="searchParams.storeName" catchinput="inputedit"></input>
     </view>
     <view class="action">
-      <button class="cu-btn bg-blue shadow-blur round" bindtap="searchHotel">搜索</button>
+      <button class="cu-btn bg-blue shadow-blur round" bindtap="searchStore">搜索</button>
     </view>
   </view>
 
-  <view class="bg-white hotel-grid">
+  <view class="bg-white store-grid">
     <view class="grid col-2">
-      <block wx:for="{{hotelList}}">
+      <block wx:for="{{storeList}}">
       <view>
-        <view class="margin-xs padding-sm radius shadow-warp hotel-list-row" bindtap="toDetail" data-id="{{item.id}}">
+        <view class="margin-sm padding-sm radius shadow-warp store-list-row" bindtap="toDetail" data-id="{{item.id}}">
           <view style="width:100%;">
-            <view class="padding-bottom-sm hotel-name">{{item.hotelName}}</view>
-            <view class="hotel-mobile">{{item.hotelTel}}</view>
+            <view class="padding-bottom-sm store-name">{{item.storeName}}</view>
+            <view class="store-mobile">{{item.storeTel}}</view>
           </view>
-          <view class="hotel-img">
-            <image src="../../static/images/my/ico_hotel@3x.png"></image>
+          <view class="store-img">
+            <image src="../../static/images/my/ico_store@3x.png"></image>
           </view>
         </view>
       </view>
@@ -27,5 +27,5 @@
     </view>
   </view>
   
-  <tui-button type="blue" height="98rpx" shape="rightAngle" bindtap="toAddHotel" style="position:fixed;bottom:0;width:100%;">新增门店</tui-button>
+  <tui-button type="blue" height="98rpx" shape="rightAngle" bindtap="toAddStore" style="position:fixed;bottom:0;width:100%;">新增门店</tui-button>
 </view>

+ 37 - 0
pages/store/index.wxss

@@ -0,0 +1,37 @@
+
+
+page{
+  height: 100%;
+}
+.container{
+  height: 100%;
+  padding-bottom: calc(env(safe-area-inset-bottom) / 2 + 100rpx);
+}
+.store-grid{
+  height: 100%;
+}
+.store-list-row{
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+.store-list-row .store-name{
+  font-weight: 600;
+}
+
+.store-list-row .store-mobile{
+  font-size:24rpx;
+  color:#999;
+}
+
+.store-list-row .store-img{
+  float:right;
+  flex-direction: column;
+  align-items: center;
+  height:100rpx;
+  width:100rpx;
+}
+.store-list-row .store-img image{
+  height:100rpx;
+  width:100rpx;
+}

+ 1 - 1
pages/total/index.js

@@ -186,7 +186,7 @@ Page({
         if(this.data.userInfo.mgvmRole==3){
           saleYdata.push(d.agentMoney==null?0:d.agentMoney/100)
         }else if(this.data.userInfo.mgvmRole==2){
-          saleYdata.push(d.hotelCommission==null?0:d.hotelCommission/100)
+          saleYdata.push(d.storeCommission==null?0:d.storeCommission/100)
         }else if(this.data.userInfo.mgvmRole==0){
           console.log(d.productSellPrice)
           saleYdata.push(d.productSellPrice==null?0:d.productSellPrice/100)

+ 1 - 1
pages/vendingMachine/index.wxml

@@ -31,7 +31,7 @@
   </view>
 
   <view class="grid col-2">
-    <view bindtap="toRouter" data-url="settledHotel">
+    <view bindtap="toRouter" data-url="settledStore">
       <view class="margin-xs padding radius shadow-warp common-list-row">
         <tui-icon name="house" size="30" color="#5677fc"></tui-icon>
         <text class='item-name'>设备入驻</text>

+ 12 - 12
pages/vendingMachine/settledHotel.js → pages/vendingMachine/settledStore.js

@@ -7,10 +7,10 @@ Page({
    * 页面的初始数据
    */
   data: {
-    hotelList: [],
+    storeList: [],
     values: {
-      hotelId: '',
-      hotelName: '',
+      storeId: '',
+      storeName: '',
       deviceSn: '',
       deviceLocation: '',
       remark: ''
@@ -22,7 +22,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindHotelList()
+    this.bindStoreList()
   },
   scanCodeEvent() {
     var that = this;
@@ -40,7 +40,7 @@ Page({
     var that = this
     //表单规则
     let rules = [{
-      name: "hotelName",
+      name: "storeName",
       rule: ["required"], //可使用区间,此处主要测试功能
       msg: ["请输入门店名称"]
     }, {
@@ -76,22 +76,22 @@ Page({
   formReset: function (e) {
     console.log("清空数据")
   },
-  bindHotelPickerChange: function (e) {
+  bindStorePickerChange: function (e) {
     console.log("=====================")
     console.log(e)
-    var item = this.data.hotelList[e.detail.value]
+    var item = this.data.storeList[e.detail.value]
     console.log(item)
     this.setData({
-      ['values.hotelId']: item.id,
-      ['values.hotelName']: item.hotelName
+      ['values.storeId']: item.id,
+      ['values.storeName']: item.storeName
     })
   },
-  bindHotelList() {
+  bindStoreList() {
     var that = this
-    util.request(util.api.hotelList, {}, "GET", false, true,app.globalData.token).then((res) => {
+    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
       if (res.code == 200) {
         that.setData({
-          hotelList: res.result
+          storeList: res.result
         })
       }
     }).catch((res) => {})

+ 0 - 0
pages/vendingMachine/settledHotel.json → pages/vendingMachine/settledStore.json


+ 2 - 2
pages/vendingMachine/settledHotel.wxml → pages/vendingMachine/settledStore.wxml

@@ -6,12 +6,12 @@
       <view class="text-lg text-bold">入驻基本信息</view>
     </view>
   </tui-list-cell>
-  <picker bindchange="bindHotelPickerChange" value="{{index}}" range="{{hotelList}}" range-key="hotelName">
+  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
     <tui-list-cell hover="{{false}}">
       <view class="tui-line-cell">
         <view class="tui-title">门店:</view>
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
-          value="{{values.hotelName}}" name="hotelName" />
+          value="{{values.storeName}}" name="storeName" />
       </view>
     </tui-list-cell>
   </picker>

+ 0 - 0
pages/vendingMachine/settledHotel.wxss → pages/vendingMachine/settledStore.wxss


+ 1 - 1
project.config.json

@@ -39,7 +39,7 @@
     "showES6CompileOption": false
   },
   "compileType": "miniprogram",
-  "libVersion": "2.19.2",
+  "libVersion": "2.14.4",
   "appid": "wx788fbe16a4cdacdc",
   "projectname": "mg-vending-machine-applets-manage",
   "debugOptions": {

+ 27 - 19
utils/util.js

@@ -30,7 +30,7 @@ const utils = {
   
   interfaceUrl: function () {
     //接口地址
-    // return "https://mgvmapi.mengguohotel.com/";
+    // return "https://mgvmapi.mengguostore.com/";
     return "http://127.0.0.1:8111/";
   },
   toast: function (text, duration, success) {
@@ -178,12 +178,14 @@ const utils = {
     return year + '-' + month + '-' + day + ' ' + hour() + ':' + minute() + ":" + second();
   },
   api:{
-    deviceListPage: 'mgvm/mgVmDevice/deviceListPage',
-    hotelListPage: 'mgvm/mgVmHotel/hotelListPage',
-    queryByDeviceId: 'mgvm/mgVmDevice/queryByDeviceId',
-    hotelList: 'mgvm/mgVmHotel/hotelList',
-    addDevice: 'mgvm/mgVmDevice/addDevice',
+    deviceListPage: 'api/device/deviceListPage',
+    storeListPage: 'mgvm/mgVmStoreApi/storeListPage',
+    queryByDeviceId: 'api/device/queryByDeviceId',
+    storeList: 'mgvm/mgVmStoreApi/storeList',
+    addDevice: 'api/device/addDevice',
     vmProductListPage: '/mgvm/mgVmProductApi/vmProductListPage',
+    MgVmProductSkuPage:'/mgvm/mgVmProductSkuApi/list' ,
+
     productListPage: 'mgvm/mgSysProduct/sysProductListPage',
     queryByProductId: 'mgvm/mgSysProduct/queryByProductId',
     queryByVmProductId: 'mgvm/mgVmProductApi/queryByVmProductId',
@@ -197,25 +199,25 @@ const utils = {
     orderListPage: 'mgvm/mgVmOrder/orderListPage',
     repairsListPage: 'mgvm/mgVmRepairs/repairsListPage',
     addRepairs: 'mgvm/mgVmRepairs/addRepairs',
-    queryByHotelId: 'mgvm/mgVmHotel/queryByHotelId',
-    addHotel: 'mgvm/mgVmHotel/addHotel',
-    editHotel: 'mgvm/mgVmHotel/editHotel',
-    stockDeviceList: 'mgvm/mgVmDevice/stockDeviceList',
-    upDevice:'mgvm/mgVmDevice/upDeviceByHotelIdAnddevnceSn',
+    queryByStoreId: 'mgvm/mgVmStoreApi/queryByStoreId',
+    addStore: 'mgvm/mgVmStoreApi/addStore',
+    editStore: 'mgvm/mgVmStoreApi/editStore',
+    stockDeviceList: 'api/device/stockDeviceList',
+    upDevice:'api/device/upDeviceByStoreIdAnddevnceSn',
     productStockList: 'mgvm/mgVmProductApi/productStockList',
     editVmProductStock: 'mgvm/mgVmProductApi/editVmProductStock',
     addMerchantOrder: 'mgvm/mgSysProductOrder/addMerchantOrder',
-    deviceListByHotelId: 'mgvm/mgVmDevice/deviceListByHotelId',
+    deviceListByStoreId: 'api/device/deviceListByStoreId',
     productOrderListPage: 'mgvm/mgSysProductOrder/productOrderListPage',   
     queryByRepairsId: 'mgvm/mgVmRepairs/queryByRepairsId',
-    hotelList: 'mgvm/mgVmHotel/hotelList',
+    storeList: 'mgvm/mgVmStoreApi/storeList',
     merchantLogin:'mgvm/miniLogin/merchantLogin',
     miniAppLogin:'mgvm/miniLogin/miniAppLogin',
-    stockWarning: 'mgvm/mgVmDevice/stockWarning',
-    editMgVmDeviceGridProduct: 'mgvm/mgVmDevice/editMgVmDeviceGridProduct',
-    hotelInfo: 'mgvm/mgVmHotel/hotelInfo',
-    getDeviceNum: 'mgvm/mgVmDevice/getDeviceNum',
-    getStockDeviceNum: 'mgvm/mgVmDevice/getStockDeviceNum',
+    stockWarning: 'api/device/stockWarning',
+    editMgVmDeviceGridProduct: 'api/device/editMgVmDeviceGridProduct',
+    storeInfo: 'mgvm/mgVmStoreApi/storeInfo',
+    getDeviceNum: 'api/device/getDeviceNum',
+    getStockDeviceNum: 'api/device/getStockDeviceNum',
     changePassword: 'mgvm/info/changePassword',    
     updateBankInfo:'mgvm/merchant/updateBankInfo',
     updateInfo:'mgvm/merchant/updateInfo', 
@@ -230,12 +232,18 @@ const utils = {
     deleteSchemeById:'mgvm/mgVmSchemeApi/deleteSchemeById',
 
     mgVmBillList:'mgvm/mgVmBill/list',
-    unbundling:'mgvm/mgVmDevice/unbundling',
+    unbundling:'api/device/unbundling',
     withdrawList:'mgvm/mgVmBill/withdrawList',
 
     
     indexSalesOrderApp:'mgvm/orderStatisApi/indexSalesOrderApp',
     salesOrderApp:'mgvm/orderStatisApi/salesOrderApp',
+    storeDelete:'/mgvm/mgVmStoreApi/delete',
+    agentList:'/mgvm/mgSysAgentApi/list',
+    agentAdd:'/mgvm/mgSysAgentApi/add',
+    agentEdit:'/mgvm/mgSysAgentApi/edit',
+    agentDelete:'/mgvm/mgSysAgentApi/delete',
+    agentQueryById:'/mgvm/mgSysAgentApi/queryById',
     
     
   },