18016688350 3 лет назад
Родитель
Сommit
209ec59e13

+ 2 - 1
app.json

@@ -55,7 +55,8 @@
     "pages/agent/index",
     "pages/agent/index",
     "pages/agent/add",
     "pages/agent/add",
     "pages/agent/edit",
     "pages/agent/edit",
-    "pages/vendingMachine/select"
+    "pages/vendingMachine/select",
+    "pages/order/detail/index"
   ],
   ],
 
 
   "tabBar": {
   "tabBar": {

+ 1 - 1
pages/accountRecord/index.js

@@ -143,7 +143,7 @@ Page({
       if (res.code == 200) {
       if (res.code == 200) {
         console.log(res)
         console.log(res)
         if (res.result.records.length > 0) {
         if (res.result.records.length > 0) {
-          if (that.data.list.length > 0) {
+          if (that.data.searchParams.pageNo > 0) {
             let list = that.data.list
             let list = that.data.list
             res.result.records.forEach((e)=>{
             res.result.records.forEach((e)=>{
               list.push(e)
               list.push(e)

+ 1 - 1
pages/agent/index.js

@@ -65,7 +65,7 @@ Page({
     utils.request(utils.api.agentList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
     utils.request(utils.api.agentList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
       if (res.code == 200) {
       if (res.code == 200) {
         if (res.result.records.length > 0) {
         if (res.result.records.length > 0) {
-          if (that.data.list.length > 0) {
+          if (that.data.searchParams.pageNo > 0) {
             let list = that.data.list
             let list = that.data.list
             res.result.records.forEach((e)=>{
             res.result.records.forEach((e)=>{
               list.push(e)
               list.push(e)

+ 7 - 13
pages/billing/index.js

@@ -124,10 +124,13 @@ Page({
     var that = this
     var that = this
     utils.request(utils.api.mgVmBillList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
     utils.request(utils.api.mgVmBillList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
       if (res.code == 200) {
       if (res.code == 200) {
-        if (res.result.records.length > 0) {
-          if (that.data.list.length > 0) {
+        that.setData({
+            totalAmount: res.result.allMoney,
+        })
+        if (res.result.list.records.length > 0) {
+          if (that.data.searchParams.pageNo > 0) {
             let list = that.data.list
             let list = that.data.list
-            res.result.records.forEach((e)=>{
+            res.result.list.records.forEach((e)=>{
               list.push(e)
               list.push(e)
             })
             })
             that.setData({
             that.setData({
@@ -135,7 +138,7 @@ Page({
             })
             })
           }else{
           }else{
             that.setData({
             that.setData({
-              list: res.result.records
+              list: res.result.list.records
             })
             })
           }
           }
         } else {
         } else {
@@ -145,15 +148,6 @@ Page({
             ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
             ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
           })
           })
         }
         }
-        var allList = that.data.list;
-        var allNumber = 0;
-        for (let i = 0; i < allList.length; i++) {
-          allNumber+=allList[i].number==null?0:allList[i].number;
-        }
-
-        that.setData({
-          totalAmount: allNumber.toFixed(2),
-        })
       }
       }
     }).catch((res) => {})
     }).catch((res) => {})
   },
   },

+ 7 - 14
pages/divide/index.js

@@ -173,10 +173,13 @@ Page({
     utils.request(utils.api.mgVmBillList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
     utils.request(utils.api.mgVmBillList, that.data.searchParams, "GET", true, false, app.globalData.token).then((res) => {
       if (res.code == 200) {
       if (res.code == 200) {
         console.log(res)
         console.log(res)
-        if (res.result.records.length > 0) {
-          if (that.data.list.length > 0) {
+        that.setData({
+        totalAmount: res.result.allMoney,
+        })
+        if (res.result.list.records.length > 0) {
+          if (that.data.searchParams.pageNo > 1) {
             let list = that.data.list
             let list = that.data.list
-            res.result.records.forEach((e)=>{
+            res.result.list.records.forEach((e)=>{
               list.push(e)
               list.push(e)
             })
             })
             that.setData({
             that.setData({
@@ -184,7 +187,7 @@ Page({
             })
             })
           }else{
           }else{
             that.setData({
             that.setData({
-              list: res.result.records
+              list: res.result.list.records
             })
             })
           }
           }
         } else {
         } else {
@@ -194,16 +197,6 @@ Page({
             ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
             ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
           })
           })
         }
         }
-
-        var allList = that.data.list;
-        var allNumber = 0;
-        for (let i = 0; i < allList.length; i++) {
-          allNumber+=allList[i].number==null?0:allList[i].number;
-        }
-
-        that.setData({
-          totalAmount: allNumber.toFixed(2),
-        })
       }
       }
     }).catch((res) => {})
     }).catch((res) => {})
   },
   },

+ 39 - 0
pages/order/detail/index.js

@@ -0,0 +1,39 @@
+const util = require('../../../utils/util.js');
+const app = getApp();
+Page({
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        orderSn:"",
+        agentMoney:"",
+        areaAgentMoney:"",
+        storeCommission:"",
+        list:[]
+    },
+    onLoad: function (options) {
+        this.setData({
+            orderSn:options.orderSn,
+            agentMoney:options.agentMoney,
+            areaAgentMoney:options.areaAgentMoney,
+            storeCommission:options.storeCommission
+        })
+        this.getOrderDetail(options.orderSn);
+
+    },
+    getOrderDetail(){ 
+        var that = this;
+        if(!that.data.orderSn){
+            return;
+        }
+        util.request(util.api.queryDetailListByOrderSn, {"orderSn":that.data.orderSn}, "GET", false, true, app.globalData.token).then((res) => {
+            if (res.code == 200) {
+                console.log(res)
+                this.setData({
+                    list:res.result,
+                })
+            }
+        }).catch((res) => {})
+    }
+    
+})

+ 8 - 0
pages/order/detail/index.json

@@ -0,0 +1,8 @@
+{
+    "navigationBarTitleText": "订单详情",
+    "navigationBarBackgroundColor": "#5677fc",
+    "navigationBarTextStyle": "white",
+    "usingComponents": {
+        "tui-list-cell":"/components/list-cell/list-cell"
+    }
+}

+ 44 - 0
pages/order/detail/index.wxml

@@ -0,0 +1,44 @@
+<view class="container">
+    <view>
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">订单号:</view>
+                <label class="tui-label">{{orderSn}}</label>
+            </view>
+        </tui-list-cell>
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">代理佣金:</view>
+                <label class="tui-label">{{agentMoney}}</label>
+            </view>
+        </tui-list-cell>
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">区代佣金:</view>
+                <label class="tui-label">{{areaAgentMoney}}</label>
+            </view>
+        </tui-list-cell>
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">门店佣金:</view>
+                <label class="tui-label">{{storeCommission}}</label>
+            </view>
+        </tui-list-cell>
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">商品信息:</view>
+            </view>
+        </tui-list-cell>
+        
+        <tui-list-cell hover="{{false}}" wx:for="{{list}}">
+            <view class="tui-line-cell">
+                <view class="tui-title">{{item.productName}}</view>
+                <label class="tui-label">
+                    <image style="width:120rpx;height:120rpx" src="{{item.productImg}}" class="tui-goods-img"></image>
+                </label>
+            </view>
+        </tui-list-cell>
+
+        
+    </view>
+</view>

+ 25 - 0
pages/order/detail/index.wxss

@@ -0,0 +1,25 @@
+.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-label {
+    font-size: 24rpx;
+    color: #333;
+    padding-left: 20rpx;
+    flex: 1;
+  }

+ 240 - 230
pages/order/index.js

@@ -3,250 +3,260 @@ const util = require('../../utils/util.js');
 const app = getApp();
 const app = getApp();
 Page({
 Page({
 
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    isPickerRender: false,
-    isPickerShow: false,
-    pickerConfig: {
-      endDate: true,
-      dateLimit: true,
-      initStartTime: "2020-01-01",
-      initEndTime: "2020-12-01",
-      limitStartTime: "2015-01-01",
-      limitEndTime: "2095-01-01"
-    },
-    searchParams: {
-      // startTime: "2019-01-01",
-      // endTime: "2019-12-01",
-      startTime: '',
-      endTime: '',
-      storeId:'',
-      storeName:'',
-      orderSn:'',
-    },
-    orderList:{
-      status:'',
-    },
-    dataStr: '',
-    storeList:{
-      id:'',
-      storeName:''
-    },
-    selectH: 0
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // this.bindOrderList();
-    this.bindStoreList();
-    this.submitSearch();
-  },
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        isPickerRender: false,
+        isPickerShow: false,
+        pickerConfig: {
+            endDate: true,
+            dateLimit: true,
+            initStartTime: "2020-01-01",
+            initEndTime: "2020-12-01",
+            limitStartTime: "2015-01-01",
+            limitEndTime: "2095-01-01"
+        },
+        searchParams: {
+            // startTime: "2019-01-01",
+            // endTime: "2019-12-01",
+            startTime: '',
+            endTime: '',
+            storeId: '',
+            storeName: '',
+            orderSn: '',
+        },
+        orderList: {
+            status: '',
+        },
+        dataStr: '',
+        storeList: {
+            id: '',
+            storeName: ''
+        },
+        selectH: 0
+    },
 
 
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        // this.bindOrderList();
+        this.bindStoreList();
+        this.submitSearch();
+    },
 
 
-  },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
 
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
+    },
 
 
-  },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
 
 
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
+    },
 
 
-  },
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
 
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
+    },
 
 
-  },
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
 
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-    this.setData({
-      ["searchParams.pageNo"]: 1,
-      pullUpOn: true,
-      loadding: false,
-      orderList: []
-    })
-    this.bindOrderList()
-    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.bindOrderList()
-  },
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+        this.setData({
+            ["searchParams.pageNo"]: 1,
+            pullUpOn: true,
+            loadding: false,
+            orderList: []
+        })
+        this.bindOrderList()
+        setTimeout(() => {
+            wx.stopPullDownRefresh()
+        }, 300);
+    },
 
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+        var that = this
+        //只是测试效果,逻辑以实际数据为准
+        this.setData({
+            loadding: true,
+            pullUpOn: true
+        })
+        this.setData({
+            ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
+        })
+        this.bindOrderList()
+    },
 
 
-  },
-  timePickerShow: function () {
-    this.setData({
-      isPickerShow: true,
-      isPickerRender: true,
-      chartHide: true
-    });
-  },
-  pickerHide: function () {
-    this.setData({
-      isPickerShow: false,
-      chartHide: false
-    });
-  },
-  setPickerTime: function (val) {
-    console.log(val);
-    let data = val.detail;
-    let startTime = utils.formatDate(data.startTime)
-    let endTime = utils.formatDate(data.endTime)
-    this.setData({
-      ["searchParams.startTime"]: data.startTime,
-      ["searchParams.endTime"]: data.endTime,
-      dataStr: startTime +" ~ "+ endTime
-    });
-    this.data.searchParams.startTime = data.startTime;
-    this.data.searchParams.endTime = data.endTime;
-  },
-  bindStorePickerChange: function (e) {
-    var item = this.data.storeList[e.detail.value]
-    console.log(item)
-    this.setData({
-      ['searchParams.storeId']: item.id,
-      ['searchParams.storeName']: item.storeName
-    })
-    this.data.searchParams.storeId = item.id;
-    // this.data.searchParams.storeName
-  },
-  showSearchModel: function() {
-    this.setData({
-      selectH: 300,
-    })
-  },
-  hideSearchModel: function() {
-    this.setData({
-      selectH: 0
-    })
-  },
-  clearSearch(){
-    this.setData({
-      ['searchParams.storeName']: '',
-      ['searchParams.storeId']: '',
-      ['searchParams.startTime']: '',
-      ['searchParams.endTime']: '',
-      dataStr:  '',
-    })
-  },
-  submitSearch(){
-    if(this.data.searchParams.storeId === undefined){
-      this.data.searchParams.storeId = ''
-    }
-    if(this.data.searchParams.storeName === undefined){
-      this.data.searchParams.storeName = ''
-    }
-    this.setData({
-      selectH: 0,
-      ["searchParams.pageNo"]: 1,
-      pullUpOn: true,
-      loadding: false,
-      orderList: []
-    })
-    this.bindOrderList()
-  },
-  bindOrderList(){
-    var that = this
-    if(this.data.searchParams.storeId === undefined){
-      this.data.searchParams.storeId = ''
-    }
-    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) {
-        if (res.result.records.length > 0) {
-          if (that.data.orderList.length > 0) {
-            let list = that.data.orderList
-            var records = res.result.records
-            records.forEach(record => {
-              list.push(record)
-            });
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
 
 
-            that.setData({
-              orderList: list
-            })
-          }else{
-            that.setData({
-              orderList: res.result.records
-            })
-          }
-        } else {
-          that.setData({
+    },
+    timePickerShow: function () {
+        this.setData({
+            isPickerShow: true,
+            isPickerRender: true,
+            chartHide: true
+        });
+    },
+    pickerHide: function () {
+        this.setData({
+            isPickerShow: false,
+            chartHide: false
+        });
+    },
+    setPickerTime: function (val) {
+        console.log(val);
+        let data = val.detail;
+        let startTime = utils.formatDate(data.startTime)
+        let endTime = utils.formatDate(data.endTime)
+        this.setData({
+            ["searchParams.startTime"]: data.startTime,
+            ["searchParams.endTime"]: data.endTime,
+            dataStr: startTime + " ~ " + endTime
+        });
+        this.data.searchParams.startTime = data.startTime;
+        this.data.searchParams.endTime = data.endTime;
+    },
+    bindStorePickerChange: function (e) {
+        var item = this.data.storeList[e.detail.value]
+        console.log(item)
+        this.setData({
+            ['searchParams.storeId']: item.id,
+            ['searchParams.storeName']: item.storeName
+        })
+        this.data.searchParams.storeId = item.id;
+        // this.data.searchParams.storeName
+    },
+    showSearchModel: function () {
+        this.setData({
+            selectH: 450,
+        })
+    },
+    hideSearchModel: function () {
+        this.setData({
+            selectH: 0
+        })
+    },
+    clearSearch() {
+        this.setData({
+            ['searchParams.storeName']: '',
+            ['searchParams.storeId']: '',
+            ['searchParams.startTime']: '',
+            ['searchParams.endTime']: '',
+            dataStr: '',
+        })
+    },
+    submitSearch() {
+        if (this.data.searchParams.storeId === undefined) {
+            this.data.searchParams.storeId = ''
+        }
+        if (this.data.searchParams.storeName === undefined) {
+            this.data.searchParams.storeName = ''
+        }
+        this.setData({
+            selectH: 0,
+            ["searchParams.pageNo"]: 1,
+            pullUpOn: true,
             loadding: false,
             loadding: false,
-            pullUpOn: false
-          })
+            orderList: []
+        })
+        this.bindOrderList()
+    },
+    bindOrderList() {
+        var that = this
+        if (this.data.searchParams.storeId === undefined) {
+            this.data.searchParams.storeId = ''
         }
         }
-      }
-    }).catch((res) => {})
-  },
-  bindStoreList(){
-    var that = this
-    util.request(util.api.storeList, that.searchParams, "GET", false, true,app.globalData.token).then((res)=>{
-      if (res.code == 200) {
-        that.setData({
-          storeList: res.result,
-          ['searchParams.storeId']: res.result.id,
-          ['searchParams.storeName']: res.result.storeName
+        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) {
+                if (res.result.records.length > 0) {
+                    if (that.data.orderList.length > 0) {
+                        let list = that.data.orderList
+                        var records = res.result.records
+                        records.forEach(record => {
+                            list.push(record)
+                        });
+
+                        that.setData({
+                            orderList: list
+                        })
+                    } else {
+                        that.setData({
+                            orderList: res.result.records
+                        })
+                    }
+                } else {
+                    that.setData({
+                        loadding: false,
+                        pullUpOn: false
+                    })
+                }
+            }
+        }).catch((res) => {})
+    },
+    bindStoreList() {
+        var that = this
+        util.request(util.api.storeList, that.searchParams, "GET", false, true, app.globalData.token).then((res) => {
+            if (res.code == 200) {
+                that.setData({
+                    storeList: res.result,
+                    ['searchParams.storeId']: res.result.id,
+                    ['searchParams.storeName']: res.result.storeName
+                })
+            }
+        }).catch((res) => {})
+    },
+    searchOrder() {
+        if (this.data.searchParams.storeId === undefined) {
+            this.data.searchParams.storeId = ''
+        }
+        if (this.data.searchParams.storeName === undefined) {
+            this.data.searchParams.storeName = ''
+        }
+        this.bindOrderList()
+    },
+    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]
+        });
+    },
+    toDetail(e) {
+        console.log(e)
+        const agentmoney = e.currentTarget.dataset.agentmoney?e.currentTarget.dataset.agentmoney:0
+        const areaAgentMoney = e.currentTarget.dataset.areaAgentMoney?e.currentTarget.dataset.areaAgentMoney:0
+        const storeCommission = e.currentTarget.dataset.storeCommission?e.currentTarget.dataset.storeCommission:0
+        var url = '/pages/order/detail/index?orderSn=' + e.currentTarget.dataset.id + '&agentMoney=' + agentmoney + '&areaAgentMoney=' + areaAgentMoney + '&storeCommission=' + storeCommission
+        wx.navigateTo({
+            url: url
         })
         })
-      }
-    }).catch((res) => {})
-  },
-  searchOrder(){
-    if(this.data.searchParams.storeId === undefined){
-      this.data.searchParams.storeId = ''
-    }
-    if(this.data.searchParams.storeName === undefined){
-      this.data.searchParams.storeName = ''
-    }
-    this.bindOrderList()
-  },
-  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]
-    });
-  },
+    },
 })
 })

+ 11 - 3
pages/order/index.wxml

@@ -6,7 +6,6 @@
       <view class="search-form round">
       <view class="search-form round">
         <text class="cuIcon-search"></text>
         <text class="cuIcon-search"></text>
         <input type="text" placeholder="输入订单号" confirm-type="search" data-name="searchParams.orderSn" catchinput="inputedit"></input>
         <input type="text" placeholder="输入订单号" confirm-type="search" data-name="searchParams.orderSn" catchinput="inputedit"></input>
-        <input type="text" placeholder="输入订单号" confirm-type="search" data-name="searchParams.orderSn" catchinput="inputedit"></input>
       </view>
       </view>
       <view class="action">
       <view class="action">
         <button class="cu-btn bg-blue shadow-blur round" bindtap="submitSearch">搜索</button>
         <button class="cu-btn bg-blue shadow-blur round" bindtap="submitSearch">搜索</button>
@@ -40,6 +39,15 @@
         </picker>
         </picker>
       </view>
       </view>
 
 
+      <view class="tui-search-model-item">
+        <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="{{searchParams.productName}}" catchinput="inputedit" data-name="searchParams.productName"/>
+        </view>
+        </tui-list-cell>
+      </view>
+
       <view class="tui-attr-btnbox">
       <view class="tui-attr-btnbox">
         <view class="tui-attr-safearea">
         <view class="tui-attr-safearea">
           <view class="tui-drawer-btn tui-drawerbtn-black" hover-class="tui-white-hover" hover-stay-time="150"
           <view class="tui-drawer-btn tui-drawerbtn-black" hover-class="tui-white-hover" hover-stay-time="150"
@@ -57,7 +65,7 @@
 
 
   <view class="tui-order-list">
   <view class="tui-order-list">
     <block wx:for="{{orderList}}">
     <block wx:for="{{orderList}}">
-    <view class="tui-order-item">
+    <view class="tui-order-item" data-id="{{item.orderSn}}" data-agentMoney="{{item.agentMoney}}" data-areaAgentMoney="{{item.areaAgentMoney}}"  data-storeCommission="{{item.storeCommission}}"  bindtap="toDetail">
       <tui-list-cell hover="{{false}}" lineLeft="{{false}}" >
       <tui-list-cell hover="{{false}}" lineLeft="{{false}}" >
         <view class="tui-goods-title">
         <view class="tui-goods-title">
           <view>订单号:{{item.orderSn}}</view> 
           <view>订单号:{{item.orderSn}}</view> 
@@ -67,7 +75,7 @@
       <tui-list-cell padding="0" bindclick="detail">
       <tui-list-cell padding="0" bindclick="detail">
         <view class="tui-goods-item">
         <view class="tui-goods-item">
           <view class="tui-goods-left-bolck"></view>
           <view class="tui-goods-left-bolck"></view>
-          <image src="{{item.productImg}}" class="tui-goods-img"></image>
+          <!-- <image src="{{item.productImg}}" class="tui-goods-img"></image> -->
           <view class="tui-goods-center">
           <view class="tui-goods-center">
             <view class="tui-goods-name">门店名称:{{item.storeName}}</view>
             <view class="tui-goods-name">门店名称:{{item.storeName}}</view>
             <view class="tui-goods-name">商品名称:{{item.productName}}</view>
             <view class="tui-goods-name">商品名称:{{item.productName}}</view>

+ 2 - 2
pages/product/select.wxml

@@ -23,8 +23,8 @@
             <view class="tui-goods-name">{{item.productName}}</view>
             <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.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.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 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>
           <view class="tui-price-right">
           <view class="tui-price-right">
             <button class="tui-btn tui-btn-small tui-warning tui-fillet" hover-class="tui-warning-hover" bindtap="toEdit" data-id="{{item.id}}">添加</button>
             <button class="tui-btn tui-btn-small tui-warning tui-fillet" hover-class="tui-warning-hover" bindtap="toEdit" data-id="{{item.id}}">添加</button>

+ 199 - 182
pages/pssRecord/index.js

@@ -2,194 +2,211 @@ const util = require('../../utils/util')
 const app = getApp()
 const app = getApp()
 Page({
 Page({
 
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    currentTab: 0,
-    bgColor: "linear-gradient(90deg, rgb(255, 118, 38), rgb(252, 30, 82))",
-    navbar: [{
-      name: "进库"
-    }, {
-      name: "出库"
-    }],
-    searchParams: {
-      storeId:'',
-      pageNo: 1,
-      pageSize: 20,
-      storeName: ''
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        currentTab: 0,
+        bgColor: "linear-gradient(90deg, rgb(255, 118, 38), rgb(252, 30, 82))",
+        navbar: [{
+            name: "进库"
+        }, {
+            name: "出库"
+        }],
+        searchParams: {
+            storeId: '',
+            pageNo: 1,
+            pageSize: 20,
+            storeName: ''
+        },
+        params: {
+            storeId: '',
+            pageNo: 1,
+            pageSize: 20,
+        },
+        storeList: [],
+        orderList: [],
+        loadding: false,
+        pullUpOn: true,
     },
     },
-     params: {
-      storeId:'',
-      pageNo: 1,
-      pageSize: 20,
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.bindStoreList()
+        this.bindOrderist()
+    },
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+        this.setData({
+            ["searchParams.pageNo"]: 1,
+            pullUpOn: true,
+            loadding: false,
+            orderList: []
+        })
+        this.bindOrderist()
+        setTimeout(() => {
+            wx.stopPullDownRefresh()
+        }, 300);
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+        //只是测试效果,逻辑以实际数据为准
+        this.setData({
+            loadding: true,
+            pullUpOn: true
+        })
+        var that = this
+        this.setData({
+            ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
+        })
+        this.bindOrderist()
+    },
+    bindStorePickerChange: function (e) {
+        var item = this.data.storeList[e.detail.value]
+        console.log(item)
+        this.setData({
+            ['searchParams.storeId']: item.id,
+            ['searchParams.storeName']: item.storeName,
+            ["searchParams.pageNo"]: 1,
+            orderList: []
+        })
+        this.bindOrderist()
+    },
+    changeTab(e) {
+        console.log(e)
+        this.setData({
+            currentTab: e.detail.index,
+            ["searchParams.pageNo"]: 1,
+            pullUpOn: true,
+            loadding: false,
+            orderList: []
+        })
+        this.bindOrderist()
     },
     },
-    storeList:[],
-    orderList:[],
-    loadding: false,
-    pullUpOn: true,
-  },
+    bindOrderist() {
+        var that = this
+        
+        if (that.data.currentTab == 0) {
+            // 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.orderSn = that.data.searchParams.orderSn ? that.data.searchParams.orderSn : "";
 
 
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.bindStoreList()
-    this.bindOrderist()
-  },
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-    this.setData({
-      ["searchParams.pageNo"]: 1,
-      pullUpOn: true,
-      loadding: false,
-      orderList: []
-    })
-    this.bindOrderist()
-    setTimeout(() => {
-      wx.stopPullDownRefresh()
-    }, 300);
-  },
 
 
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    //只是测试效果,逻辑以实际数据为准
-    this.setData({
-      loadding: true,
-      pullUpOn: true
-    })
-    var that = this
-    this.setData({
-      ["searchParams.pageNo"]: that.data.searchParams.pageNo + 1
-    })
-    this.bindOrderist()
-  },
-  bindStorePickerChange: function (e) {
-    var item = this.data.storeList[e.detail.value]
-    console.log(item)
-    this.setData({
-      ['searchParams.storeId']: item.id,
-      ['searchParams.storeName']: item.storeName,
-      ["searchParams.pageNo"]: 1,
-      orderList: []
-    })
-    this.bindOrderist()
-  },
-  changeTab(e) {
-    console.log(e)
-    this.setData({
-      currentTab: e.detail.index,
-      ["searchParams.pageNo"]: 1,
-      pullUpOn: true,
-      loadding: false,
-      orderList: []
-    })
-    this.bindOrderist()
-  },
-  bindOrderist(){
-    var that = this
-    if(!that.data.searchParams.storeId){
-      this.setData({
-        orderList: []
-      })
-      return;
-    }
-    if(that.data.currentTab == 0){ 
-      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)
-      console.log(that.data.params)
-      util.request(util.api.productOrderDetailPage, that.data.params, "GET", false, false, app.globalData.token).then((res) => {
-        if (res.code == 200) {
-          console.log(res)
-          if (res.result.records.length > 0) {
-            if (that.data.orderList.length > 0) {
-              let list = that.data.orderList
-              res.result.records.forEach(element => {
-                var item = {}
-                item.orderSn = element.orderSn
-                item.productName = element.productName
-                item.productNum = element.productQuantity
-                list.push(item)
-              });
-              that.setData({
-                orderList: list
-              })
-            } else {
-              let list = []
-              res.result.records.forEach(element => {
-                var item = {}
-                item.orderSn = element.orderSn
-                item.productName = element.productName
-                item.productNum = element.productQuantity
-                list.push(item)
-              });
-              that.setData({
-                orderList: list
-              })
+            // that.data.params = Object.assign( that.data.params, that.data.searchParams)
+            console.log(that.data.params)
+            util.request(util.api.productOrderDetailPage, that.data.params, "GET", false, false, app.globalData.token).then((res) => {
+                if (res.code == 200) {
+                    console.log(res)
+                    if (res.result.records.length > 0) {
+                        if (this.data.searchParams.pageNo > 1) {
+                            let list = that.data.orderList
+                            res.result.records.forEach(element => {
+                                var item = {}
+                                item.orderSn = element.orderSn
+                                item.productName = element.productName
+                                item.productNum = element.productQuantity
+                                list.push(item)
+                            });
+                            that.setData({
+                                orderList: list
+                            })
+                        } else {
+                            let list = []
+                            res.result.records.forEach(element => {
+                                var item = {}
+                                item.orderSn = element.orderSn
+                                item.productName = element.productName
+                                item.productNum = element.productQuantity
+                                list.push(item)
+                            });
+                            that.setData({
+                                orderList: list
+                            })
+                        }
+                    } else {
+                        that.setData({
+                            loadding: false,
+                            pullUpOn: false,
+                            ["searchParams.pageNo"]: that.data.searchParams.pageNo - 1,
+                            orderList: []
+                        })
+                    }
+                }
+            }).catch((res) => {})
+        } else {
+            if (!that.data.searchParams.storeId) {
+                this.setData({
+                    orderList: []
+                })
+                return;
             }
             }
-          } else {
-            that.setData({
-              loadding: false,
-              pullUpOn: false,
-              ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
-            })
-          }
+            util.request(util.api.orderListPage, that.data.searchParams, "GET", false, false, app.globalData.token).then((res) => {
+                if (res.code == 200) {
+                    if (res.result.records.length > 0) {
+                        if (this.data.searchParams.pageNo > 1) {
+                            let list = that.data.orderList
+                            res.result.records.forEach(element => {
+                                var item = {}
+                                item.orderSn = element.orderSn
+                                item.productName = element.productName
+                                item.productNum = 1
+                                list.push(item)
+                            });
+                            that.setData({
+                                orderList: list
+                            })
+                        } else {
+                            let list = []
+                            res.result.records.forEach(element => {
+                                var item = {}
+                                item.orderSn = element.orderSn
+                                item.productName = element.productName
+                                item.productNum = 1
+                                list.push(item)
+                            });
+                            that.setData({
+                                orderList: list
+                            })
+                        }
+                    } else {
+                        that.setData({
+                            loadding: false,
+                            pullUpOn: false,
+                            ["searchParams.pageNo"]: that.data.searchParams.pageNo - 1,
+                            orderList: []
+                        })
+                    }
+                }
+            }).catch((res) => {})
         }
         }
-      }).catch((res) => {})
-    }else{
-      util.request(util.api.orderListPage, that.data.searchParams, "GET", false, false, app.globalData.token).then((res) => {
-        if (res.code == 200) {
-          if (res.result.records.length > 0) {
-            if (that.data.orderList.length > 0) {
-              let list = that.data.orderList
-              res.result.records.forEach(element => {
-                var item = {}
-                item.orderSn = element.orderSn
-                item.productName = element.productName
-                item.productNum = 1
-                list.push(item)
-              });
-              that.setData({
-                orderList: list
-              })
-            } else {
-              let list = []
-              res.result.records.forEach(element => {
-                var item = {}
-                item.orderSn = element.orderSn
-                item.productName = element.productName
-                item.productNum = 1
-                list.push(item)
-              });
-              that.setData({
-                orderList: list
-              })
+    },
+    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
+                })
             }
             }
-          } else {
-            that.setData({
-              loadding: false,
-              pullUpOn: false,
-              ["searchParams.pageNo"]:that.data.searchParams.pageNo-1
-            })
-          }
-        }
-      }).catch((res) => {})
+        }).catch((res) => {})
+    },
+    serchOrderNo(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]
+        });
+        this.bindOrderist()
     }
     }
-  },
-  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) => {})
-  },
 })
 })

+ 9 - 2
pages/pssRecord/index.wxml

@@ -2,8 +2,8 @@
   <tui-tabs tabs="{{navbar}}" currentTab="{{currentTab>1?0:currentTab}}" bind:change="changeTab" itemWidth="50%">
   <tui-tabs tabs="{{navbar}}" currentTab="{{currentTab>1?0:currentTab}}" bind:change="changeTab" itemWidth="50%">
   </tui-tabs>
   </tui-tabs>
 
 
-  <picker bindchange="bindStorePickerChange" value="{{index}}" range="{{storeList}}" range-key="storeName">
-    <tui-list-cell hover="{{false}}">
+  <picker bindchange="bindStorePickerChange"  value="{{index}}" range="{{storeList}}" range-key="storeName">
+    <tui-list-cell hover="{{false}}" wx:if="{{currentTab!=0}}">
       <view class="tui-line-cell">
       <view class="tui-line-cell">
         <view class="tui-title">门店</view>
         <view class="tui-title">门店</view>
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
         <input placeholder-class="phcolor" class="tui-input" placeholder="请选择门店" type="text" disabled="true"
@@ -11,6 +11,13 @@
       </view>
       </view>
     </tui-list-cell>
     </tui-list-cell>
   </picker>
   </picker>
+  <tui-list-cell hover="{{false}}">
+      <view class="tui-line-cell">
+        <view class="tui-title">订单编号</view>
+        <input placeholder-class="phcolor" catchinput="serchOrderNo"  class="tui-input" data-name="searchParams.orderSn" placeholder="请选择订单编号" type="text" 
+          value="{{searchParams.orderSn}}" />
+      </view>
+    </tui-list-cell>
   <view class="flex">
   <view class="flex">
     <view class="flex-sub bg-grey padding-sm text-center text-bold">商品名称</view>
     <view class="flex-sub bg-grey padding-sm text-center text-bold">商品名称</view>
     <view class="flex-sub bg-grey padding-sm text-center text-bold">订单编号</view>
     <view class="flex-sub bg-grey padding-sm text-center text-bold">订单编号</view>

+ 1 - 1
pages/scheme/form.js

@@ -117,7 +117,7 @@ Page({
           util.toast('门店分成必须是0-100的分成')
           util.toast('门店分成必须是0-100的分成')
           return;
           return;
         }  
         }  
-        if(schemeBillEntryList[i].storeDivide+schemeBillEntryList[i].areaDivide!=100){
+        if(schemeBillEntryList[i].storeDivide+schemeBillEntryList[i].areaDivide<100){
           util.toast('分成之和应为100%')
           util.toast('分成之和应为100%')
           return;
           return;
         }  
         }  

+ 2 - 2
pages/scheme/select.wxml

@@ -23,8 +23,8 @@
             <view class="tui-goods-name">{{item.skuProductName}}</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">商品售价(元):<text style="color:red;">¥{{filter.toDecimal2Penny(item.productSellPrice)}}</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 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>
           <view class="tui-price-right">
           <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>
             <button class="tui-btn tui-btn-small tui-warning tui-fillet" hover-class="tui-warning-hover" bindtap="toEdit" data-item="{{item}}">添加</button>

+ 1 - 1
pages/vendingMachine/settledStore.js

@@ -243,7 +243,7 @@ Page({
       tab.name = '柜子'+deviceNum
       tab.name = '柜子'+deviceNum
       tabs.push(tab)
       tabs.push(tab)
       for (let index = 0; index < gridSize; index++) {
       for (let index = 0; index < gridSize; index++) {
-        gridProductList.push({productGrid:index+1,deviceNum:deviceNum});
+        gridProductList.push({productGrid:index+1,deviceNum:deviceNum,gridCount:5});
       }
       }
       gridLists.push(gridProductList)
       gridLists.push(gridProductList)
     }
     }

+ 121 - 131
pages/vendingMachine/settledStore.wxml

@@ -1,140 +1,130 @@
 <view class="container">
 <view class="container">
 
 
-<form bindsubmit="formSubmit" bindreset="formReset">
-  <tui-list-cell hover="{{false}}">
-    <view class="tui-line-cell">
-      <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="请选择门店" 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 wx:if="{{userInfo.mgvmRole!=3}}" 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>
-        <checkbox-group style="line-height:40rpx" bindchange="checkboxChange"  >
-          <view wx:for="{{payTypeList}}" style="	display: inline-block;height:50rpx;margin:0rpx 20rpx;"  wx:key="key" wx:for-item="item">
-            <checkbox  value="{{item.value}}"  checked="{{item.value}}"></checkbox>
-            <label >{{item.name}} </label>
-          </view>
-        </checkbox-group>
-    </view>
-  </tui-list-cell>
-  <view style="width:100%">
-    <tui-tabs tabs="{{tabs}}" currentTab="{{currentTab}}" wx:if="{{isTabs}}" bind:change="selectDevice" itemWidth="{{tabsWidth}}"></tui-tabs>
-  </view>
-
-
-  <view wx:if="{{isTabs}}" class="tui-goods-item" wx:for="{{selectGridProductList}}">
-    <image wx:if="{{!item.productImg==''}}" bindtap="toSelect" 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" style="width:90%">{{item.productName?item.productName:'请选择商品'}}</view>
+    <form bindsubmit="formSubmit" bindreset="formReset">
+        <tui-list-cell hover="{{false}}">
+            <view class="tui-line-cell">
+                <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="请选择门店" 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 wx:if="{{userInfo.mgvmRole!=3}}" 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>
+                <checkbox-group style="line-height:40rpx" bindchange="checkboxChange">
+                    <view wx:for="{{payTypeList}}" style="	display: inline-block;height:50rpx;margin:0rpx 20rpx;" wx:key="key" wx:for-item="item">
+                        <checkbox value="{{item.value}}" checked="{{item.value}}"></checkbox>
+                        <label>{{item.name}} </label>
+                    </view>
+                </checkbox-group>
+            </view>
+        </tui-list-cell>
+        <view style="width:100%">
+            <tui-tabs tabs="{{tabs}}" currentTab="{{currentTab}}" wx:if="{{isTabs}}" bind:change="selectDevice" itemWidth="{{tabsWidth}}"></tui-tabs>
         </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 wx:if="{{isTabs}}" class="tui-goods-item" wx:for="{{selectGridProductList}}">
+            <image wx:if="{{!item.productImg==''}}" bindtap="toSelect" 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" style="width:90%">{{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>
         </view>
-      </tui-list-cell>
-    </view>
-  </view>
 
 
 
 
-
-
-  <view class="tui-btn-box">
-    <button class="btn-primary margin-bottom-xs" hover-class="btn-hover" formType="submit" type="primary">提交</button>
-    <button class="btn-primary btn-gray" hover-class="btn-gray-hover" formType="reset">重置</button>
-  </view>
-</form>
+        <view style="height:160rpx"></view>
+        <view class="tui-btn-box" style="z-index:999999;bottom: 0;position: fixed;width:100%;background-color: #ffffff;">
+            <button class="btn-primary margin-bottom-xs" style="opacity:1" hover-class="btn-hover" formType="submit" type="primary">提交</button>
+            <!-- <button class="btn-primary btn-gray" style="width:45%" hover-class="btn-gray-hover" formType="reset">重置</button> -->
+        </view>
+    </form>
 </view>
 </view>

+ 55 - 56
project.config.json

@@ -1,37 +1,62 @@
 {
 {
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "setting": {
-    "urlCheck": false,
-    "es6": false,
-    "enhance": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": false,
-    "coverView": true,
-    "nodeModules": true,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": true,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": true,
-    "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
+    "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+    "setting": {
+        "urlCheck": false,
+        "es6": false,
+        "enhance": true,
+        "postcss": true,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "newFeature": false,
+        "coverView": true,
+        "nodeModules": true,
+        "autoAudits": false,
+        "showShadowRootInWxmlPanel": true,
+        "scopeDataCheck": false,
+        "uglifyFileName": true,
+        "checkInvalidKey": true,
+        "checkSiteMap": true,
+        "uploadWithSourceMap": true,
+        "compileHotReLoad": true,
+        "lazyloadPlaceholderEnable": false,
+        "useMultiFrameRuntime": true,
+        "useApiHook": true,
+        "useApiHostProcess": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        },
+        "compileType": "miniprogram",
+        "simulatorType": "wechat",
+        "simulatorPluginLibVersion": {},
+        "condition": {},
+        "editorSetting": {
+            "tabIndent": "insertSpaces",
+            "tabSize": 4
+        },
+        "libVersion": "2.24.5",
+        "packOptions": {
+            "ignore": [],
+            "include": []
+        },
+        "appid": "wxc42df73f9710a566",
+        "projectname": "mg-vending-machine-applets-manage",
+        "useIsolateContext": true,
+        "userConfirmedBundleSwitch": false,
+        "packNpmManually": false,
+        "packNpmRelationList": [],
+        "minifyWXSS": true,
+        "disableUseStrict": false,
+        "minifyWXML": true,
+        "showES6CompileOption": false,
+        "useCompilerPlugins": false,
+        "ignoreUploadUnusedFiles": true,
+        "useStaticServer": true
     },
     },
-<<<<<<< HEAD
     "compileType": "miniprogram",
     "compileType": "miniprogram",
     "simulatorType": "wechat",
     "simulatorType": "wechat",
     "simulatorPluginLibVersion": {},
     "simulatorPluginLibVersion": {},
-    "condition": {},
     "editorSetting": {
     "editorSetting": {
         "tabIndent": "insertSpaces",
         "tabIndent": "insertSpaces",
         "tabSize": 4
         "tabSize": 4
@@ -42,31 +67,5 @@
         "include": []
         "include": []
     },
     },
     "appid": "wxc42df73f9710a566",
     "appid": "wxc42df73f9710a566",
-    "projectname": "mg-vending-machine-applets-manage"
-=======
-    "useIsolateContext": true,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "disableUseStrict": false,
-    "minifyWXML": true,
-    "showES6CompileOption": false,
-    "useCompilerPlugins": false,
-    "ignoreUploadUnusedFiles": true
-  },
-  "compileType": "miniprogram",
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 4
-  },
-  "libVersion": "2.24.5",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "appid": "wxc42df73f9710a566",
-  "condition": {}
+    "condition": {}
 }
 }

+ 3 - 1
utils/util.js

@@ -220,6 +220,7 @@ const utils = {
     miniAppLogin:'mgvm/miniLogin/miniAppLogin',
     miniAppLogin:'mgvm/miniLogin/miniAppLogin',
     stockWarning: 'api/device/stockWarning',
     stockWarning: 'api/device/stockWarning',
     editMgVmDeviceGridProduct: 'api/device/editMgVmDeviceGridProduct',
     editMgVmDeviceGridProduct: 'api/device/editMgVmDeviceGridProduct',
+    editMgVmDeviceGridProductQc: 'api/device/editMgVmDeviceGridProductQc',
     storeInfo: 'mgvm/mgVmStoreApi/storeInfo',
     storeInfo: 'mgvm/mgVmStoreApi/storeInfo',
     getDeviceNum: 'api/device/getDeviceNum',
     getDeviceNum: 'api/device/getDeviceNum',
     getStockDeviceNum: 'api/device/getStockDeviceNum',
     getStockDeviceNum: 'api/device/getStockDeviceNum',
@@ -258,7 +259,8 @@ const utils = {
     replenishment: 'api/device/replenishment',
     replenishment: 'api/device/replenishment',
     mgVmStoreProductSkuList:'/api/mgVmStoreProductSku/list',
     mgVmStoreProductSkuList:'/api/mgVmStoreProductSku/list',
 
 
-    childListByMtLei:'/sys/category/childListByMtLei'
+    childListByMtLei:'/sys/category/childListByMtLei',
+    queryDetailListByOrderSn:'/mgvm/mgVmOrder/queryDetailListByOrderSn'
   },
   },
   staticDomain:'https://mgvm.oss-cn-beijing.aliyuncs.com/',
   staticDomain:'https://mgvm.oss-cn-beijing.aliyuncs.com/',