18016688350 4 rokov pred
rodič
commit
f2f2e7bf2f

+ 2 - 1
app.json

@@ -54,7 +54,8 @@
     "pages/accountRecord/index",
     "pages/agent/index",
     "pages/agent/add",
-    "pages/agent/edit"
+    "pages/agent/edit",
+    "pages/vendingMachine/select"
   ],
 
   "tabBar": {

+ 34 - 0
pages/device/detail.js

@@ -98,5 +98,39 @@ Page({
         that.bindDevice()
       }
     }).catch((res) => {})
+  },
+  number: function (e) {
+    let value = this.validateNumber(e.detail.value)
+    let inx = `deviceInfo.gridList[${e.target.dataset.index}].repairNum`
+    this.setData({
+      //parseInt将数字字符串转换成数字
+      [inx]: parseInt(value)
+    })
+  },
+  validateNumber(val) {
+    //正则表达式指定字符串只能为数字
+    return val.replace(/\D/g, '')
+  },
+  updateSkuStock(e){
+    console.log(e)
+    var repairnum = e.currentTarget.dataset.repairnum?e.currentTarget.dataset.repairnum:0
+
+    let data = this.data.deviceInfo.gridList[e.target.dataset.index];
+    var stockCount = data.stockCount?data.stockCount:0
+    var gridCount = data.gridCount?data.gridCount:0
+
+      console.log(data)
+
+    if((stockCount+repairnum)>gridCount){
+      util.toast('超过格子可存放数量')
+      return;
+    }
+    var that = this;
+    util.request(util.api.replenishment, {gridId:e.currentTarget.dataset.id,goodsNumber:repairnum}, "POST", true, true,app.globalData.token).then((res)=>{
+      if (res.code == 200) {
+        that.bindDevice()
+      }
+    }).catch((res) => {})
   }
+  
 })

+ 14 - 5
pages/device/detail.wxml

@@ -31,17 +31,16 @@
       <label class="tui-label">{{item.mgVmDevice.schemeName}}</label>
     </view>
   </tui-list-cell>
-  <tui-list-cell hover="{{false}}">
+  <!-- <tui-list-cell hover="{{false}}">
     <view class="tui-line-cell">
       <view class="tui-title">缺货格子:</view>
       <label class="tui-label" style="display:flex;">
         <tui-tag size="small" tui-tag-class="tui-mrbtm" wx:for="{{filter.gridList(item.stockGrid)}}">{{item}}</tui-tag>
       </label>
     </view>
-  </tui-list-cell>
+  </tui-list-cell> -->
 </view>
   </block>
-
   <tui-list-cell padding="0" hover="{{false}}" wx:for="{{deviceInfo.gridList}}">
     <view class="tui-goods-item">
       <image src="{{item.productImg}}" class="tui-goods-img"></image>
@@ -51,10 +50,20 @@
           对应格子:
           <tui-tag size="small" tui-tag-class="tui-mrbtm">{{item.productGrid}}</tui-tag>
         </view>
+        <view class="tui-goods-attr">
+          <view style="margin-top:14rpx">当前数量:{{item.stockCount?item.stockCount:0}}</view>
+        </view>
+        <view class="tui-goods-attr">
+          <view style="margin-top:14rpx">补货数量:</view>
+          <input placeholder-class="phcolor" class="tui-input" placeholder="请填写补货数量" type="number" value="{{item.repairNum}}"  
+          bindinput="number" data-name="repairNum" data-index="{{index}}" data-item="{{item}}"/>
+        </view>
       </view>
       <view class="tui-price-right">
-        <tui-button data-id="{{item.gridId}}" data-as="{{item.isStock}}" type="primary" size="mini" tui-button-class="tui-mbtm" wx:if="{{item.isStock == 1}}" bindtap="updateIsStock">有货</tui-button>
-        <tui-button data-id="{{item.gridId}}" type="danger" data-as="{{item.isStock}}" size="mini" tui-button-class="tui-mbtm" bindtap="updateIsStock" wx:else>缺货</tui-button>
+        <!-- <tui-button data-id="{{item.gridId}}" data-as="{{item.isStock}}" type="primary" size="mini" tui-button-class="tui-mbtm" wx:if="{{item.isStock == 1}}" bindtap="updateIsStock">有货</tui-button>
+        <tui-button data-id="{{item.gridId}}" type="danger" data-as="{{item.isStock}}" size="mini" tui-button-class="tui-mbtm" bindtap="updateIsStock" wx:else>缺货</tui-button> -->
+
+        <tui-button data-id="{{item.gridId}}" data-index="{{index}}" data-repairnum="{{item.repairNum}}" type="primary" size="mini" tui-button-class="tui-mbtm"  bindtap="updateSkuStock">补货</tui-button>
       </view>
     </view>
   </tui-list-cell>

+ 3 - 3
pages/device/detail.wxss

@@ -46,8 +46,8 @@
 }
 
 .tui-goods-img {
-	width: 180rpx;
-	height: 180rpx;
+	width: 200rpx;
+	height: 220rpx;
 	display: block;
 	flex-shrink: 0;
 }
@@ -59,7 +59,7 @@
 }
 
 .tui-goods-name {
-	max-width: 310rpx;
+	max-width: 290rpx;
 	word-break: break-all;
 	overflow: hidden;
 	text-overflow: ellipsis;

+ 35 - 31
pages/orderGoods/buy.js

@@ -21,20 +21,10 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindStoreList()
     this.bindProductStockList()
 
   },
-  bindStoreList() {
-    var that = this
-    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
-      if (res.code == 200) {
-        that.setData({
-          storeList: res.result
-        })
-      }
-    }).catch((res) => {})
-  },
+
   bindStorePickerChange: function (e) {
     var item = this.data.storeList[e.detail.value]
     console.log(item)
@@ -46,16 +36,18 @@ Page({
   },
   changeNum: function (e) {
     this.setData({
-      productNum: e.detail.value
+      skuStock: e.detail.value
     })
   },
   bindProductStockList() {
+    //获取平台商品用来订货
     var that = this
-    util.request(util.api.productStockList, that.data.searchParams, "GET", false, true, app.globalData.token).then((res) => {
+    util.request(util.api.orderGoods, that.data.searchParams, "GET", false, true, app.globalData.token).then((res) => {
       if (res.code == 200) {
+        console.log(res)
         res.result.forEach(item => {
           item.checkout = false
-          item.productNum = 0
+          item.skuStock = 0
         });
         that.setData({
           productList: res.result
@@ -63,22 +55,22 @@ Page({
       }
     }).catch((res) => {})
   },
-  productNumChange(e){
+  skuStockChange(e){
     let that = this;
     let dataset = e.currentTarget.dataset;
     let value = e.detail.value;
     var list = that.data.productList
     var index = dataset.index;
     var itemProduct = dataset.item
-    itemProduct.productNum = value
+    itemProduct.skuStock = value
     list.splice(index,1,itemProduct)
     that.setData({
       productList:list
     })
-    var list = this.data.productList.filter((e)=>e.checkout == true && e.productNum > 0)
+    var list = this.data.productList.filter((e)=>e.checkout == true && e.skuStock > 0)
     var totalPrice = 0
     list.forEach((e)=>{
-      totalPrice += e.productPrice * e.productNum
+      totalPrice += e.productPrice * e.skuStock
     })
     this.setData({
       totalPrice: totalPrice,
@@ -97,27 +89,39 @@ Page({
     that.setData({
       productList:list
     })
-    var list = this.data.productList.filter((e)=>e.checkout == true && e.productNum > 0)
+    var list = this.data.productList.filter((e)=>e.checkout == true && e.skuStock > 0)
     var totalPrice = 0
     list.forEach((e)=>{
-      totalPrice += e.productPrice * e.productNum
+      totalPrice += e.productPrice * e.skuStock
     })
     this.setData({
       totalPrice: totalPrice,
       sellProductList: list
     })
   },
-  btnPay(){
-    if(this.data.sellProductList.length<1){
-      util.toast('请选择下单商品,并且订货数量必须大于0')
-      return
-    }
-    console.log("1111")
-    console.log(this.data.sellProductList)
-    console.log("2222")
-    wx.navigateTo({
+  // btnPay(){
+  //   if(this.data.sellProductList.length<1){
+  //     util.toast('请选择下单商品,并且订货数量必须大于0')
+  //     return
+  //   }
+  //   console.log("1111")
+  //   console.log(this.data.sellProductList)
+  //   console.log("2222")
+  //   wx.navigateTo({
       
-      url: '/pages/orderGoods/submitBuy?strJson='+encodeURIComponent(JSON.stringify(this.data.sellProductList))+'&storeId='+this.data.searchParams.storeId,
-    })
+  //     url: '/pages/orderGoods/submitBuy?strJson='+encodeURIComponent(JSON.stringify(this.data.sellProductList))+'&storeId='+this.data.searchParams.storeId,
+  //   })
+  // }
+  reserve(){
+    console.log(this.data.sellProductList)
+    var that = this;
+    util.request(util.api.reserve, this.data.sellProductList, "post", false, true, app.globalData.token).then((res) => {
+      if (res.code == 200) {
+        util.toast('订货成功,等待平台审批')
+        wx.navigateTo({
+          url: '/pages/stock/index',
+        })
+      }
+    }).catch((res) => {})
   }
 })

+ 25 - 24
pages/orderGoods/buy.wxml

@@ -1,37 +1,37 @@
 <wxs src="../../utils/filter.wxs" module="filter"></wxs>
 <view class="container">
-  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
+  <!-- <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.storeName}}" />
       </view>
     </tui-list-cell>
-  </picker>
-
-  <tui-list-cell padding="0" hover="{{false}}" wx:for="{{productList}}">
-    <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.productName}}</view>
-        <view class="tui-goods-attr">
-          进货价(元):<text class="text-red">¥{{filter.toDecimal2Penny(item.productPrice)}}</text>
-        </view>
-        <view class="tui-goods-attr">
-          门店库存:{{item.skuStock}}
+  </picker> -->
+  <view style="margin-bottom:100rpx">
+    <tui-list-cell padding="0" hover="{{false}}" wx:for="{{productList}}">
+      <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.skuProductName}}</view>
+          <view class="tui-goods-attr">
+            进货价(元):<text class="text-red">¥{{filter.toDecimal2Penny(item.productPrice)}}</text>
+          </view>
+          <!-- <view class="tui-goods-attr">
+            门店库存:{{item.skuStock}}
+          </view> -->
+          <view class="tui-goods-attr">
+            订货数量:<tui-numberbox value="{{item.skuStock}}" bind:change="skuStockChange" data-index="{{index}}" data-item="{{item}}"></tui-numberbox>
+          </view>
         </view>
-        <view class="tui-goods-attr">
-          订货数量:<tui-numberbox value="{{item.productNum}}" bind:change="productNumChange" data-index="{{index}}" data-item="{{item}}"></tui-numberbox>
+        <view class="tui-price-right">
+          <checkbox-group bindchange="checkboxChange" data-index="{{index}}" data-item="{{item}}">
+            <checkbox value="true" checked="{{item.checkout}}"></checkbox>
+          </checkbox-group>
         </view>
       </view>
-      <view class="tui-price-right">
-        <checkbox-group bindchange="checkboxChange" data-index="{{index}}" data-item="{{item}}">
-          <checkbox value="true" checked="{{item.checkout}}"></checkbox>
-        </checkbox-group>
-      </view>
-    </view>
-  </tui-list-cell>
-
+    </tui-list-cell>
+  </view>
 
   <view class="tui-tabbar">
     <view class="tui-flex-end tui-color-red tui-pr-20">
@@ -40,7 +40,8 @@
       <view class="tui-price-large">{{filter.toDecimal2Penny(totalPrice)}}</view>
     </view>
     <view class="tui-pr25">
-      <tui-button width="200rpx" height="70rpx" type="danger" shape="circle" bindtap="btnPay">提交订单</tui-button>
+      <!-- <tui-button width="200rpx" height="70rpx" type="danger" shape="circle" bindtap="btnPay">提交订单</tui-button> -->
+      <tui-button width="200rpx" height="70rpx" type="danger" shape="circle" bindtap="reserve">订货</tui-button>
     </view>
   </view>
   <!--弹出-->

+ 2 - 2
pages/orderGoods/order.wxml

@@ -59,7 +59,7 @@
       <tui-list-cell hover="{{false}}" lineLeft="{{false}}">
         <view class="tui-goods-title">
           <view>订单号:{{item.orderSn}}</view>
-          <view class="tui-order-status">{{filter.orderProductStatus(item.status)}}</view>
+          <view class="tui-order-status" style="color:red">{{filter.orderProductStatus(item.status)}}</view>
         </view>
       </tui-list-cell>
       <tui-list-cell padding="0" bindclick="detail" wx:for="{{item.productOrderDetailList}}">
@@ -70,7 +70,7 @@
           </view>
           <view class="tui-price-right">
             <view>¥{{filter.toDecimal2Penny(item.productPrice)}}</view>
-            <view>x{{item.productNum}}</view>
+            <view>x{{item.productQuantity}}</view>
           </view>
         </view>
       </tui-list-cell>

+ 2 - 0
pages/product/index.js

@@ -96,6 +96,8 @@ Page({
             res.result.records.forEach((e)=>{
               list.push(e)
             })
+            console.log(list)
+            console.log(666)
             that.setData({
               productList: list
             })

+ 1 - 1
pages/product/index.wxml

@@ -22,7 +22,7 @@
           <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"   data-id="{{item.id}}">
-            <view class="tui-goods-name">{{item.productName}}</view>
+            <view class="tui-goods-name">{{item.skuProductName}}</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.productPrice)}}</text></view> -->
             <view class="tui-goods-attr">商品应用格子:

+ 1 - 1
pages/scheme/select.js

@@ -102,7 +102,7 @@ Page({
     itemProduct.productId = row.id
     itemProduct.productName = row.skuProductName
     itemProduct.productImg = row.productImg
-    itemProduct.productSchemePrice = row.productSellPrice
+    itemProduct.productSchemePrice = row.productPrice
     itemProduct.storeDivide = 30
     list.splice(this.data.index,1,itemProduct)
     prevPage.setData({

+ 15 - 12
pages/stock/index.js

@@ -7,6 +7,7 @@ Page({
    */
   data: {
     storeList: [],
+    userInfo: app.globalData.userInfo,
     searchParams: {
       storeId: '',
       storeName: '',
@@ -18,7 +19,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindStoreList()
+    // this.bindStoreList()
     this.bindProductStockList()
   },
 
@@ -32,16 +33,16 @@ Page({
     this.bindProductStockList()
 
   },
-  bindStoreList() {
-    var that = this
-    util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
-      if (res.code == 200) {
-        that.setData({
-          storeList: res.result
-        })
-      }
-    }).catch((res) => {})
-  },
+  // bindStoreList() {
+  //   var that = this
+  //   util.request(util.api.storeList, {}, "GET", false, true, app.globalData.token).then((res) => {
+  //     if (res.code == 200) {
+  //       that.setData({
+  //         storeList: res.result
+  //       })
+  //     }
+  //   }).catch((res) => {})
+  // },
   formSubmit: function (e) {
     var that = this
     console.log(that.data.stockList)
@@ -85,7 +86,9 @@ Page({
   },
   bindProductStockList() {
     var that = this
-    util.request(util.api.productStockList, that.data.searchParams, "GET", true, true, app.globalData.token).then((res) => {
+   
+    console.log( this.data.userInfo)
+    util.request(util.api.productStockList, null, "GET", true, true, app.globalData.token).then((res) => {
       console.log(res)
       if (res.code == 200) {
         that.setData({

+ 5 - 5
pages/stock/index.wxml

@@ -2,7 +2,7 @@
 <view class="container">
 
   <form bindsubmit="formSubmit" bindreset="formReset">
-    <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
+    <!-- <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>
@@ -10,24 +10,24 @@
             value="{{searchParams.storeName}}" />
         </view>
       </tui-list-cell>
-    </picker>
+    </picker> -->
     <view class="tui-goods-item" wx:for="{{stockList}}">
       <image src="{{item.productImg}}" class="tui-goods-img"></image>
 
       <view class="tui-goods-center">
         <tui-list-cell hover="{{false}}" padding="20rpx 20rpx">
           <view class="tui-line-cell">
-            <view class="tui-title">{{item.productName}}</view>
+            <view class="tui-title">{{item.skuProductName}}</view>
           </view>
         </tui-list-cell>
-        <tui-list-cell hover="{{false}}" padding="20rpx 20rpx">
+        <!-- <tui-list-cell hover="{{false}}" padding="20rpx 20rpx">
           <view class="tui-line-cell">
             <view class="tui-title">适应格子</view>
             <view class="tui-label" style="display:flex;">
               <tui-tag size="small" tui-tag-class="tui-mrbtm" wx:for="{{filter.gridList(item.productGrid)}}">{{item}}</tui-tag>
             </view>
           </view>
-        </tui-list-cell>
+        </tui-list-cell> -->
         <tui-list-cell hover="{{false}}" padding="20rpx 20rpx">
           <view class="tui-line-cell">
             <view class="tui-title">商品库存:</view>

+ 2 - 2
pages/vendingMachine/index.wxml

@@ -62,12 +62,12 @@
         <text class='item-name'>订货管理</text>
       </view>
     </view>
-    <view  wx:if="{{userInfo.mgvmRole!=2&&userInfo.mgvmRole!=4}}" bindtap="toRouter" data-url="/pages/scheme/sync">
+    <!-- <view  wx:if="{{userInfo.mgvmRole!=2&&userInfo.mgvmRole!=4}}" bindtap="toRouter" data-url="/pages/scheme/sync">
       <view class="margin-xs padding radius shadow-warp common-list-row">
         <tui-icon name="square-selected" size="30" color="#5677fc"></tui-icon>
         <text class='item-name'>方案同步</text>
       </view>
-    </view>
+    </view> -->
     <view  wx:if="{{userInfo.mgvmRole!=2&&userInfo.mgvmRole!=4}}" bindtap="toRouter" data-url="/pages/pssRecord/index">
       <view class="margin-xs padding radius shadow-warp common-list-row">
         <tui-icon name="order" size="30" color="#5677fc"></tui-icon>

+ 163 - 0
pages/vendingMachine/select.js

@@ -0,0 +1,163 @@
+const util = require('../../utils/util')
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    searchParams: {
+      pageNo: 1,
+      pageSize: 10,
+      productName: ''
+    },
+    productList: [],
+    loadding: false,
+    pullUpOn: true,
+    index:0,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    let index = parseInt(options.index)
+    this.setData({
+      index:index
+    })
+    this.bindProductList()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+    this.setData({
+      ["searchParams.pageNo"]: 1,
+      pullUpOn: true,
+      loadding: false,
+      storeList: []
+    })
+    this.bindProductList()
+    setTimeout(() => {
+      wx.stopPullDownRefresh()
+    }, 300);
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    var that = this
+    //只是测试效果,逻辑以实际数据为准
+    this.setData({
+      loadding: true,
+      pullUpOn: true
+    })
+    this.setData({
+      ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
+    })
+    this.bindProductList()
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+  toEdit(e) {
+    var row = e.currentTarget.dataset.item;
+    var pages = getCurrentPages();
+    var prevPage = pages[pages.length - 2];  //上一个页面
+    var list = prevPage.data.values.gridProductList
+    var itemProduct = JSON.parse(JSON.stringify(list))[this.data.index]
+    itemProduct.productId = row.id
+    itemProduct.productName = row.skuProductName
+    itemProduct.productImg = row.productImg
+    itemProduct.productSchemePrice = row.productPrice
+    itemProduct.productPrice = row.productPrice
+    list.splice(this.data.index,1,itemProduct)
+    prevPage.setData({
+      ["values.gridProductList"]:list
+    })
+    wx.navigateBack()
+  },
+  bindProductList() {
+    var that = this
+    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) {
+            let list = that.data.productList
+            res.result.records.forEach((e)=>{
+              list.push(e)
+            })
+            that.setData({
+              productList: list
+            })
+          } else {
+            that.setData({
+              productList: res.result.records
+            })
+          }
+        } else {
+          that.setData({
+            loadding: false,
+            pullUpOn: false,
+            ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
+          })
+        }
+      }
+    }).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]
+    });
+  },
+  btnSearch(){
+    console.log("1111")
+    console.log(this.data.searchParams)
+    console.log("2222")
+    this.setData({
+      ["searchParams.pageNo"]: 1,
+      pullUpOn: true,
+      loadding: false,
+      productList: []
+    })
+    this.bindProductList()
+  }
+})

+ 12 - 0
pages/vendingMachine/select.json

@@ -0,0 +1,12 @@
+{
+  "navigationBarTitleText": "选择商品",
+  "navigationBarBackgroundColor": "#5677fc",
+  "navigationBarTextStyle": "white",
+  "usingComponents": {
+    "tui-button": "../../components/extend/button/button",
+    "tui-list-cell":"../../components/list-cell/list-cell",
+    "tui-tag":"../../components/tag/tag",
+    "tui-loadmore": "../../components/loadmore/loadmore",
+    "tui-nomore": "../../components/nomore/nomore"
+  }
+}

+ 41 - 0
pages/vendingMachine/select.wxml

@@ -0,0 +1,41 @@
+<wxs src="../../utils/filter.wxs" module="filter"></wxs>
+<view class="container">
+  <!--screen-->
+  <view class="tui-header-screen">
+    <view class="cu-bar search bg-white">
+      <view class="search-form round">
+        <text class="cuIcon-search"></text>
+        <input type="text" placeholder="输入商品名称" confirm-type="search" value="{{searchParams.skuProductName}}" data-name="searchParams.skuProductName" catchinput="inputedit" bindblur="inputedit"></input>
+      </view>
+      <view class="action">
+        <button class="cu-btn bg-blue shadow-blur round" bindtap="btnSearch">搜索</button>
+      </view>
+    </view>
+  </view>
+  <!--screen-->
+
+  <view class="tui-order-list">
+    <view class="tui-order-item" wx:for="{{productList}}">
+      <tui-list-cell padding="0">
+        <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.skuProductName}}</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">商品应用格子:
+        <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">
+            <button class="tui-btn tui-btn-small tui-warning tui-fillet" hover-class="tui-warning-hover" bindtap="toEdit" data-item="{{item}}">添加</button>
+          </view>
+        </view>
+      </tui-list-cell>
+    </view>
+  </view>
+
+		<!--加载loadding-->
+		<tui-loadmore visible="{{loadding}}" index="{{3}}" type="red"></tui-loadmore>
+		<tui-nomore visible="{{!pullUpOn}}" bgcolor="#fafafa"></tui-nomore>
+		<!--加载loadding-->
+</view>

+ 119 - 0
pages/vendingMachine/select.wxss

@@ -0,0 +1,119 @@
+
+/*列表*/
+
+.tui-order-item {
+	margin-top: 20rpx;
+	border-radius: 10rpx;
+	overflow: hidden;
+}
+
+.tui-goods-title {
+	width: 100%;
+	font-size: 28rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.tui-order-status {
+	color: #888;
+	font-size: 26rpx;
+}
+
+.tui-goods-item {
+	width: 100%;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+	display: flex;
+	justify-content: space-between;
+}
+
+.tui-goods-img {
+	width: 180rpx;
+	height: 180rpx;
+	display: block;
+	flex-shrink: 0;
+}
+
+.tui-goods-center {
+	flex: 1;
+	padding: 5rpx 8rpx;
+	box-sizing: border-box;
+}
+
+.tui-goods-name {
+	word-break: break-all;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+	font-size: 26rpx;
+	line-height: 32rpx;
+}
+
+.tui-goods-attr {
+	font-size: 24rpx;
+	color: #888888;
+	line-height: 32rpx;
+	word-break: break-all;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: flex;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+	padding: 4rpx 0;
+}
+
+.tui-price-right {
+	font-size: 24rpx;
+  color: #888888;  
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.tui-color-red {
+	color: #E41F19;
+	padding-right: 30rpx;
+}
+
+.tui-goods-price {
+	width: 100%;
+	display: flex;
+	align-items: flex-end;
+	justify-content: flex-end;
+	font-size: 24rpx;
+}
+
+.tui-size-24 {
+	font-size: 24rpx;
+	line-height: 24rpx;
+}
+
+.tui-price-large {
+	font-size: 32rpx;
+	line-height: 30rpx;
+	font-weight: 500;
+}
+
+.tui-order-btn {
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	background: #fff;
+	padding: 10rpx 30rpx 20rpx;
+	box-sizing: border-box;
+}
+
+.tui-btn-ml {
+	margin-left: 20rpx;
+}
+
+.tui-mrbtm{
+  margin: 0 5rpx;
+  padding: 5rpx 8rpx !important;
+}
+
+	

+ 187 - 40
pages/vendingMachine/settledStore.js

@@ -8,12 +8,22 @@ Page({
    */
   data: {
     storeList: [],
+    schemeList:[],
+    deviceTypeList:[],
+    dictList:[],
+    agentList:[],
+    payTypeList:[{name:'微信',value:'wx'},{name:'支付宝',value:'zfb'},{name:'现金',value:'xj'}],
     values: {
-      storeId: '',
-      storeName: '',
-      deviceSn: '',
+      deviceSn:'',
+      deviceName:'',
       deviceLocation: '',
-      remark: ''
+      schemeId: '',
+      storeId: '',
+      deviceTypeId: '',
+      deviceBrand: '',
+      agentId: '',
+      payType:'wx,zfb,xj',//默认选择所有支付方式
+      gridProductList:[]
     }
 
   },
@@ -22,40 +32,113 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.bindStoreList()
+    this.bindStoreList();
+    this.bindSchemeList();
+    this.deviceTypeList();
+    this.getDictByCode();
+    this.getAllAgentList();
   },
-  scanCodeEvent() {
-    var that = this;
-    wx.scanCode({
-      onlyFromCamera: true, // 只允许从相机扫码
-      success(res) {
-        console.log("扫码成功:" + JSON.stringify(res))
+
+  //商品方案列表
+  bindSchemeList() {
+    var that = this
+    util.request(util.api.schemeList, {}, "GET", false, true, app.globalData.token).then((res) => {
+      if (res.code == 200) {
         that.setData({
-          ['values.deviceSn']: res.result
+          schemeList: res.result
         })
       }
-    })
+    }).catch((res) => {})
+  },
+  //设备类型列表
+  deviceTypeList() {
+    var that = this
+    util.request(util.api.deviceTypeList, {}, "GET", false, true, app.globalData.token).then((res) => {
+      if (res.code == 200) {
+        that.setData({
+          deviceTypeList: res.result
+        })
+      }
+    }).catch((res) => {})
+  },
+  //门店列表
+  bindStoreList() { 
+    var that = this
+    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
+      if (res.code == 200) {
+        that.setData({
+          storeList: res.result
+        })
+      }
+    }).catch((res) => {})
   },
+    //设备品牌
+    getDictByCode() { 
+      var that = this
+      util.request(util.api.getDictByCode, {code:"device_brand"}, "GET", false, true,app.globalData.token).then((res) => {
+        if (res.code == 200) {
+          that.setData({
+            dictList: res.result
+          })
+        }
+      }).catch((res) => {})
+    },
+
+    //代理商
+    getAllAgentList() { 
+      var that = this
+      util.request(util.api.allAgentList, {}, "GET", false, true,app.globalData.token).then((res) => {
+        if (res.code == 200) {
+          that.setData({
+            agentList: res.result
+          })
+        }
+      }).catch((res) => {})
+    },
+
+  
+  
   formSubmit: function (e) {
+    console.log(this.data.values)
     var that = this
     //表单规则
     let rules = [{
-      name: "storeName",
+      name: "deviceSn",
       rule: ["required"], //可使用区间,此处主要测试功能
-      msg: ["请输入门店名称"]
+      msg: ["请输入设备编号"]
     }, {
-      name: "deviceSn",
+      name: "deviceName",
       rule: ["required"], //可使用区间,此处主要测试功能
-      msg: ["请输入设备码"]
+      msg: ["请输入设备名称"]
     }, {
       name: "deviceLocation",
       rule: ["required"],
-      msg: ["请输入客房房间号"]
+      msg: ["请输入设备号"]
+    }, {
+      name: "schemeName",
+      rule: ["required"],
+      msg: ["请输入方案"]
+    }, {
+      name: "storeName",
+      rule: ["required"],
+      msg: ["请输入门店"]
+    }, {
+      name: "deviceTypeName",
+      rule: ["required"],
+      msg: ["请输入设备类型"]
+    }, {
+      name: "deviceBrandName",
+      rule: ["required"],
+      msg: ["请输入设备品牌"]
+    }, {
+      name: "agentName",
+      rule: ["required"],
+      msg: ["请输入代理商"]
     }];
+
     //进行表单检查
     let formData = e.detail.value;
     let checkRes = form.validation(formData, rules);
-    console.log(that.data.values)
     if (!checkRes) {
       util.request(util.api.addDevice, that.data.values, "POST", false, true,app.globalData.token).then((res) => {
         if (res.code == 200) {
@@ -76,34 +159,98 @@ Page({
   formReset: function (e) {
     console.log("清空数据")
   },
+//选设备类型
+  bindDeviceTypePickerChange: function (e) {
+    var item = this.data.deviceTypeList[e.detail.value]
+    var gridSize =  item.gridSize?item.gridSize:0
+    var gridProductList =[];
+    for (let index = 0; index < gridSize; index++) {
+      gridProductList.push({productGrid:index+1});
+    }
+
+    console.log(gridProductList)
+
+    this.setData({
+      ['values.deviceTypeId']: item.id,
+      ['values.deviceTypeName']: item.deviceName,
+      ['values.gridProductList']:gridProductList
+    })
+  },
+//选门店
   bindStorePickerChange: function (e) {
-    console.log("=====================")
-    console.log(e)
     var item = this.data.storeList[e.detail.value]
-    console.log(item)
     this.setData({
       ['values.storeId']: item.id,
       ['values.storeName']: item.storeName
     })
   },
-  bindStoreList() {
-    var that = this
-    util.request(util.api.storeList, {}, "GET", false, true,app.globalData.token).then((res) => {
-      if (res.code == 200) {
-        that.setData({
-          storeList: res.result
+  //选方案
+  bindSchemePickerChange: function (e) {
+    var item = this.data.schemeList[e.detail.value]
+    this.setData({
+      ['values.schemeId']: item.id,
+      ['values.schemeName']: item.schemeName
+    })
+  },
+    //选设备品牌
+    bindDictPickerChange: function (e) {
+      var item = this.data.dictList[e.detail.value]
+      this.setData({
+        ['values.deviceBrand']: item.value,
+        ['values.deviceBrandName']: item.text
+      })
+    },
+    //选择代理
+    bindAgentPickerChange: function (e) {
+      var item = this.data.agentList[e.detail.value]
+      this.setData({
+        ['values.agentId']: item.id,
+        ['values.agentName']: item.username
+      })
+    },
+    //前往选择商品
+    toSelect(e) {
+      wx.navigateTo({
+        url: '/pages/vendingMachine/select?index=' + e.currentTarget.dataset.index,
+      })
+    },
+    //选择支付类别 数组拼装成逗号分割
+    checkboxChange(e){
+      console.log(e)
+      var selectPayTypeList =  e.detail.value;
+      
+      var payTypes = "";
+      selectPayTypeList.forEach(payType => {
+        payTypes+=payType+","
+      });
+      if(payTypes!=""){
+        payTypes = payTypes.slice(0,payTypes.length-1);
+        this.setData({
+          'values.payType': payTypes
         })
       }
-    }).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]
-    });
-  },
+    },
+    number: function (e) {
+      console.log(e)
+      let value = this.validateNumber(e.detail.value)
+      let inx = `values.gridProductList[${e.target.dataset.index}].${e.target.dataset.name}`
+      this.setData({
+        //parseInt将数字字符串转换成数字
+        [inx]: parseInt(value)
+      })
+    },
+    validateNumber(val) {
+      //正则表达式指定字符串只能为数字
+      return val.replace(/\D/g, '')
+    },
+    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]
+      });
+    },
 })

+ 111 - 22
pages/vendingMachine/settledStore.wxml

@@ -6,41 +6,130 @@
       <view class="text-lg text-bold">入驻基本信息</view>
     </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" placeholder="请输入设备编号"  name="deviceSn" type="text"
+        value="{{values.deviceSn}}" data-name="values.deviceSn" catchinput="inputedit" bindblur="inputedit" />
+    </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" placeholder="请输入设备名称" name="deviceName" type="text"
+        value="{{values.deviceName}}" data-name="values.deviceName" catchinput="inputedit" bindblur="inputedit" />
+    </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" placeholder="请输入设备号" name="deviceLocation" type="text"
+        value="{{values.deviceLocation}}" data-name="values.deviceLocation" catchinput="inputedit" bindblur="inputedit" />
+    </view>
+  </tui-list-cell>
+
+  <picker bindchange="bindSchemePickerChange" value="{{index}}" range="{{schemeList}}"  range-key="schemeName">
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title">方案</view>
+        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择方案" name="schemeName" type="text" disabled="true"
+          value="{{values.schemeName}}" />
+      </view>
+    </tui-list-cell>
+  </picker>
+
   <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.storeName}}" name="storeName" />
+        <view class="tui-title">门店</view>
+        <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" name="storeName"  type="text" disabled="true"
+          value="{{values.storeName}}" />
       </view>
     </tui-list-cell>
   </picker>
 
+  <picker bindchange="bindDeviceTypePickerChange" value="{{index}}" range="{{deviceTypeList}}" range-key="deviceName">
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title">设备类型</view>
+        <input placeholder-class="phcolor" class="tui-input" name="deviceTypeName" placeholder="请选择设备类型" type="text" disabled="true"
+          value="{{values.deviceTypeName}}" />
+      </view>
+    </tui-list-cell>
+  </picker>
+
+  <picker bindchange="bindDictPickerChange" value="{{index}}" range="{{dictList}}" range-key="text">
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title">设备品牌</view>
+        <input placeholder-class="phcolor" class="tui-input" name="deviceBrandName" placeholder="请选择设备品牌" type="text" disabled="true"
+          value="{{values.deviceBrandName}}" />
+      </view>
+    </tui-list-cell>
+  </picker>
+
+  <picker bindchange="bindAgentPickerChange" value="{{index}}" range="{{agentList}}" range-key="username">
+    <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title">代理商</view>
+        <input placeholder-class="phcolor" class="tui-input" name="agentName" placeholder="请选择代理商" type="text" disabled="true"
+          value="{{values.agentName}}" />
+      </view>
+    </tui-list-cell>
+  </picker>
+
+
   <tui-list-cell hover="{{false}}">
     <view class="tui-line-cell">
-      <view class="tui-title">设备号</view>
-      <!-- <input placeholder-class="phcolor" class="tui-input" name="deviceSn" placeholder="扫一扫显示设备号" maxlength="50"
-        type="text" disabled="true" bindtap="scanCodeEvent" value="{{values.deviceSn}}" />
-      <tui-icon name="sweep" size="24" bindtap="scanCodeEvent"></tui-icon> -->
-        <input placeholder-class="phcolor" class="tui-input" placeholder="请输入设备号" name="deviceSn" type="text"
-        value="{{values.deviceSn}}" data-name="values.deviceSn" catchinput="inputedit" bindblur="inputedit"/>
-    </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" placeholder="请输入客房房间号" name="deviceLocation" type="text"
-        value="{{values.deviceLocation}}" data-name="values.deviceLocation" catchinput="inputedit" bindblur="inputedit"/>
+      <view class="tui-title">支付方式</view>
+        <checkbox-group bindchange="checkboxChange"  >
+          <lable wx:for="{{payTypeList}}" wx:key="key" wx:for-item="item">
+            <checkbox style="margin:0rpx 20rpx" value="{{item.value}}"  checked="{{item.value}}">{{item.name}}</checkbox>
+          </lable>
+        </checkbox-group>
     </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" placeholder="请输入位置特征" type="text"
-        value="{{values.remark}}" data-name="values.remark" catchinput="inputedit" bindblur="inputedit"/>
+
+
+
+  <view class="tui-goods-item" wx:for="{{values.gridProductList}}">
+      <image wx:if="{{!item.productImg==''}}" src="{{item.productImg}}" class="tui-goods-img"  data-index="{{index}}"></image>      
+      <view wx:else class="tui-goods-grid" bindtap="toSelect" data-index="{{index}}"><text>{{index+1}}号柜</text></view>
+      <view class="tui-goods-center">
+
+        <tui-list-cell hover="{{false}}" padding="0rpx 20rpx">
+          <view class="tui-line-cell">
+            <view class="tui-title">{{item.productName?item.productName:'请选择商品'}}</view>
+          </view>
+        </tui-list-cell>
+
+        
+        <tui-list-cell hover="{{false}}" padding="0rpx 20rpx">
+          <view class="tui-line-cell">
+            <view class="tui-title">格子数量</view>
+            <input placeholder-class="phcolor" class="tui-input" type="number" placeholder="请输入格子数量"
+            data-name="gridCount" maxlength="50" type="digit" value="{{item.gridCount}}"  bindinput="number" data-index="{{index}}" data-item="{{item}}"/>
+          </view>
+        </tui-list-cell>
+        <tui-list-cell hover="{{false}}" padding="0rpx 20rpx">
+          <view class="tui-line-cell">
+            <view class="tui-title">库存数量:</view>
+            <input placeholder-class="phcolor" class="tui-input" placeholder="请填写库存数量" type="number" value="{{item.stockCount}}" bindinput="number" data-name="stockCount" data-index="{{index}}" data-item="{{item}}"/>
+          </view>
+        </tui-list-cell>
+
+        <tui-list-cell hover="{{false}}" padding="0rpx 20rpx">
+          <view class="tui-line-cell">
+            <view class="tui-title">货道:</view>
+            <view style="margin-left:20rpx;color:red">{{item.productGrid?item.productGrid:index+1}}</view>
+          </view>
+        </tui-list-cell>
+      </view>
     </view>
-  </tui-list-cell> -->
+
+
+
 
   <view class="tui-btn-box">
     <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary">提交</button>

+ 75 - 1
pages/vendingMachine/settledStore.wxss

@@ -4,6 +4,7 @@
 		box-sizing: border-box;
 		display: flex;
 		align-items: center;
+		height:48rpx;
 	}
 	.tui-title {
 		font-size: 24rpx;
@@ -32,4 +33,77 @@
 	}
 	.phcolor{
 		font-size: 24rpx;
-	}
+	}
+	
+  .tui-goods-item {
+    width: 100%;
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+    background-color: white;
+  }
+  
+  .tui-goods-img {
+    width: 180rpx;
+    height: 180rpx;
+    display: block;
+    flex-shrink: 0;
+  }
+	
+  .tui-goods-grid {
+    width: 180rpx;
+    height: 180rpx;
+    display: flex;
+		flex-shrink: 0;
+		background-color: #999999;
+		color: #fff;
+		align-items: center;
+    justify-content: center;
+
+  }
+	
+  .tui-goods-center {
+    flex: 1;
+    box-sizing: border-box;
+	}
+	
+	.tui-input {
+		font-size: 24rpx;
+		color: #333;
+		padding-left: 20rpx;
+		flex: 1;
+	}
+
+
+
+	
+/*checkbox 选项框大小  */
+checkbox .wx-checkbox-input {
+  width: 30rpx;
+  height: 30rpx;
+  border-radius: 50%;
+}
+
+/*checkbox选中后样式  */
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+  background: #fed6e3;
+}
+
+/*checkbox选中后图标样式  */
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+  width: 30rpx;
+  height: 30rpx;
+  line-height: 28rpx;
+  text-align: center;
+  font-size: 18rpx;
+  color: #fff;
+  background: transparent;
+  transform: translate(-50%, -50%) scale(1);
+  -webkit-transform: translate(-50%, -50%) scale(1);
+}
+
+	
+
+
+  

+ 19 - 11
utils/filter.wxs

@@ -56,17 +56,25 @@ var auditStatus = function (value){
 
 var orderProductStatus = function (value){
   //活动状态:START【进行中】NO【未开始】已结束【OVER】
-  if (value === 0) {
-    return '待付款';
-  } else if (value === 1) {
-    return '待发货';
-  } else if (value === 2) {
-    return '已发货';
-  } else if (value === 2) {
-    return '已完成';
-  } else if (value === 2) {
-    return '已关闭';
-  }
+  // if (value === 0) {
+  //   return '待付款';
+  // } else if (value === 1) {
+  //   return '待发货';
+  // } else if (value === 2) {
+  //   return '已发货';
+  // } else if (value === 2) {
+  //   return '已完成';
+  // } else if (value === 2) {
+  //   return '已关闭';
+  // }
+
+    if (value === 1) {
+      return '待审核';
+    } else if (value === 2) {
+      return '审核通过';
+    } else if (value === 3) {
+      return '审核失败';
+    } 
 }
 module.exports = {
   toDecimal2Penny: toDecimal2Penny,

+ 7 - 2
utils/util.js

@@ -240,12 +240,17 @@ const utils = {
     salesOrderApp:'mgvm/orderStatisApi/salesOrderApp',
     storeDelete:'/mgvm/mgVmStoreApi/delete',
     agentList:'/mgvm/mgSysAgentApi/list',
+    allAgentList:'/mgvm/mgSysAgentApi/agentList',
     agentAdd:'/mgvm/mgSysAgentApi/add',
     agentEdit:'/mgvm/mgSysAgentApi/edit',
     agentDelete:'/mgvm/mgSysAgentApi/delete',
     agentQueryById:'/mgvm/mgSysAgentApi/queryById',
-    
-    
+    orderGoods: 'mgvm/mgVmProductSkuApi/orderGoods',
+    reserve: 'mgvm/mgVmProductSkuApi/reserve',
+
+    deviceTypeList:'/api/mgVmDeviceType/list',
+    getDictByCode:'/api/sysDict/getDictByCode',
+    replenishment: 'api/device/replenishment'
   },
   staticDomain:'https://mgvm.oss-cn-beijing.aliyuncs.com/',