shawnfei 6 лет назад
Родитель
Сommit
9e9cf1cc51
69 измененных файлов с 4438 добавлено и 0 удалено
  1. 31 0
      app.js
  2. 47 0
      app.json
  3. 31 0
      app.wxss
  4. BIN
      images/Home.png
  5. BIN
      images/Home_Click.png
  6. BIN
      images/about.png
  7. BIN
      images/account.png
  8. BIN
      images/advance.png
  9. BIN
      images/exit.png
  10. BIN
      images/login_background.png
  11. BIN
      images/login_logo.png
  12. BIN
      images/login_tou.png
  13. BIN
      images/music.png
  14. BIN
      images/password.png
  15. BIN
      images/personalcenter.png
  16. BIN
      images/personalcenter_Click.png
  17. BIN
      images/personalcenter_top.png
  18. BIN
      images/portrait.png
  19. BIN
      images/search.png
  20. BIN
      images/summary.png
  21. BIN
      images/thedatacenter.png
  22. BIN
      images/thedatacenter_Click.png
  23. BIN
      images/theorder.png
  24. BIN
      images/touxiang.png
  25. BIN
      images/wujilu.png
  26. BIN
      images/xia.png
  27. 66 0
      pages/advancerecord/index.js
  28. 3 0
      pages/advancerecord/index.json
  29. 116 0
      pages/advancerecord/index.wxml
  30. 68 0
      pages/advancerecord/index.wxss
  31. 118 0
      pages/detailsonthereceipt/index.js
  32. 3 0
      pages/detailsonthereceipt/index.json
  33. 127 0
      pages/detailsonthereceipt/index.wxml
  34. 102 0
      pages/detailsonthereceipt/index.wxss
  35. 717 0
      pages/index/index.js
  36. 6 0
      pages/index/index.json
  37. 111 0
      pages/index/index.wxml
  38. 260 0
      pages/index/index.wxss
  39. 160 0
      pages/login/login.js
  40. 3 0
      pages/login/login.json
  41. 29 0
      pages/login/login.wxml
  42. 78 0
      pages/login/login.wxss
  43. 83 0
      pages/music/index.js
  44. 3 0
      pages/music/index.json
  45. 18 0
      pages/music/index.wxml
  46. 36 0
      pages/music/index.wxss
  47. 104 0
      pages/personalcenter/index.js
  48. 3 0
      pages/personalcenter/index.json
  49. 45 0
      pages/personalcenter/index.wxml
  50. 65 0
      pages/personalcenter/index.wxss
  51. 265 0
      pages/submittherecord/index.js
  52. 3 0
      pages/submittherecord/index.json
  53. 95 0
      pages/submittherecord/index.wxml
  54. 214 0
      pages/submittherecord/index.wxss
  55. 242 0
      pages/thedatacenter/index.js
  56. 3 0
      pages/thedatacenter/index.json
  57. 96 0
      pages/thedatacenter/index.wxml
  58. 218 0
      pages/thedatacenter/index.wxss
  59. 370 0
      picker/picker.js
  60. 4 0
      picker/picker.json
  61. 21 0
      picker/picker.wxml
  62. 108 0
      picker/picker.wxss
  63. 13 0
      picker/tool.js
  64. 67 0
      project.config.json
  65. 7 0
      sitemap.json
  66. 111 0
      utils/base.js
  67. 10 0
      utils/config.js
  68. 139 0
      utils/home.js
  69. 19 0
      utils/util.js

+ 31 - 0
app.js

@@ -0,0 +1,31 @@
+//app.js
+App({
+  onLaunch: function () {
+    
+  },
+
+  onShow: function (e) {
+    var t = this;
+    try {
+      var n = wx.getUpdateManager();
+      n.onCheckForUpdate(function (e) {
+        console.log(e);
+      }), n.onUpdateReady(function () {
+        wx.showModal({
+          title: "更新提示",
+          content: "新版本已经准备好,重启应用?",
+          showCancel: !1,
+          success: function (e) {
+            e.confirm && n.applyUpdate();
+          }
+        });
+      });
+    } catch (e) {
+      console.log(e);
+    }
+  },
+
+  globalData: {
+    userInfo: null
+  }
+})

+ 47 - 0
app.json

@@ -0,0 +1,47 @@
+{
+  "pages": [
+    "pages/login/login",
+    "pages/index/index",
+    "pages/thedatacenter/index",
+    "pages/personalcenter/index",
+    "pages/detailsonthereceipt/index",
+    "pages/submittherecord/index",
+    "pages/advancerecord/index",
+    "pages/music/index"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#5D5166",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle": "white"
+  },
+  "tabBar": {
+    "color": "#6e6d6b",
+    "selectedColor": "#63576c",
+    "borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "首页",
+        "iconPath": "images/Home.png",
+        "selectedIconPath": "images/Home_Click.png"
+      },
+      {
+        "pagePath": "pages/thedatacenter/index",
+        "text": "数据中心",
+        "iconPath": "images/thedatacenter.png",
+        "selectedIconPath": "images/thedatacenter_Click.png"
+      },
+      {
+        "pagePath": "pages/personalcenter/index",
+        "text": "个人中心",
+        "iconPath": "images/personalcenter.png",
+        "selectedIconPath": "images/personalcenter_Click.png"
+      }
+    ],
+    "position": "bottom"
+  },
+  "debug": false,
+  "sitemapLocation": "sitemap.json"
+}

+ 31 - 0
app.wxss

@@ -0,0 +1,31 @@
+/**app.wxss**/
+.container {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  padding: 200rpx 0;
+  box-sizing: border-box;
+} 
+.Theglobalbackground{
+  width: 100%;
+  min-height: 100vh;
+  background: #efeff7;
+}
+.time_information {
+  margin: 0 auto;
+  width: 94%;
+  height: auto;
+  position: relative;
+  top: 20rpx;
+}
+.time{
+  margin:0 auto;
+width:94%;
+font-size: 25rpx;
+position: relative;
+  top: 30rpx;
+  text-align: right;
+  color: #ccc;
+}

BIN
images/Home.png


BIN
images/Home_Click.png


BIN
images/about.png


BIN
images/account.png


BIN
images/advance.png


BIN
images/exit.png


BIN
images/login_background.png


BIN
images/login_logo.png


BIN
images/login_tou.png


BIN
images/music.png


BIN
images/password.png


BIN
images/personalcenter.png


BIN
images/personalcenter_Click.png


BIN
images/personalcenter_top.png


BIN
images/portrait.png


BIN
images/search.png


BIN
images/summary.png


BIN
images/thedatacenter.png


BIN
images/thedatacenter_Click.png


BIN
images/theorder.png


BIN
images/touxiang.png


BIN
images/wujilu.png


BIN
images/xia.png


+ 66 - 0
pages/advancerecord/index.js

@@ -0,0 +1,66 @@
+// pages/advancerecord/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/advancerecord/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "预收记录详情"
+}

+ 116 - 0
pages/advancerecord/index.wxml

@@ -0,0 +1,116 @@
+<!--pages/advancerecord/index.wxml-->
+<view class='Theglobalbackground'>
+  <view class='time_information'>
+    <view class='ul'>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 区:</text>
+          <text>A校区</text>
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">缴&nbsp; 款&nbsp;人:</text>
+          <text>A校区</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">商&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 品:</text>
+          <text>A校区</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 量:</text>
+          <text>A校区</text>
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">缴费金额:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">预收金额:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">微信支付:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">口碑支付:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">现金支付:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">微店支付:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">押金抵扣:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">合作校前台支付:</text>
+          <text class='red'>1000元</text>
+        </view>
+      </view>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">备 &nbsp;&nbsp; &nbsp;&nbsp; 注:</text>
+          <text>无</text>
+        </view>
+      </view>
+    </view>
+
+  </view>
+  <view class='time'>
+    <text>*</text>
+    <text>如有数据变动请直接联系管理员修改</text>
+  </view>
+
+  <!--确定交付-->
+  <view>
+    <button class='delivery'>确定交付</button>
+  </view>
+
+
+  <!--已交付-->
+  <!-- <view>
+      <button class='alreadydelivered'>已交付</button>
+    </view> -->
+
+
+</view>

+ 68 - 0
pages/advancerecord/index.wxss

@@ -0,0 +1,68 @@
+/* pages/advancerecord/index.wxss */
+
+.time_information {
+  background: #fff;
+  height: auto;
+  border-radius: 15rpx;
+}
+
+.ul .li {
+  width: 100%;
+  line-height: 70rpx;
+  height: 70rpx;
+  border-bottom: 3rpx solid #efeff7;
+}
+
+.details {
+  width: 95%;
+  margin: 0 auto;
+  font-size: 30rpx;
+  color: #969696;
+}
+.details text:nth-of-type(1){
+  float: left
+}
+.details text:nth-of-type(2){
+  float: right;
+  text-align: right;
+}
+.red{
+  color: red;
+}
+.ul .li:nth-last-of-type(1){
+border: none;
+}
+
+.delivery{
+  width: 300rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  background: #63576c;
+  margin: 0 auto;
+  text-align: center;
+  color: #fff;
+  position: relative;
+  top: 50rpx;
+}
+
+.alreadydelivered{
+  width: 300rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  background: #DBD7D7;
+  margin: 0 auto;
+  text-align: center;
+  color: #A9A8A8;
+  position: relative;
+  top: 50rpx;
+  
+}
+.time{
+  margin:0 auto;
+width:94%;
+font-size: 25rpx;
+position: relative;
+  top: 30rpx;
+  text-align: right;
+  color: #ccc;
+}

+ 118 - 0
pages/detailsonthereceipt/index.js

@@ -0,0 +1,118 @@
+// pages/detailsonthereceipt/index.js
+// pages/index/index.js
+import {
+  Home
+} from '../../utils/home.js';
+let home = new Home(); //实例化 首页 对象
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    index:0,
+    data:[],
+    toast:true,
+  },
+  inputNum:function(e){
+    let that=this
+    that.setData({
+      num:e.detail.value
+    })
+  },
+  /**
+   * 交付
+   */
+  delivery: function() {
+    let that = this
+    if(!that.data.num){
+      that.setData({
+        toast:false
+      })
+      wx.showToast({
+        title: '请输入数量',
+        icon: 'none',
+        duration: 1500,
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+      return
+    }
+
+    var param = {
+      id: that.data.data[that.data.index].id,
+      num:that.data.num
+    }
+    home.delivery(param, (res) => {
+      (res.code == 1) ? wx.showToast({ title: res.msg, icon: 'success' })  : wx.showToast({ title: res.msg, icon: 'none' });
+      that.setData({ toast: true})
+      setTimeout(function () { wx.navigateBack({})  }, 1000);
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let that = this
+    console.log(JSON.parse(options.data))
+    var data = JSON.parse(options.data)
+    var index = options.index
+    var type = options.type
+    that.setData({
+      data: data,
+      index: index,
+      type: type
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 3 - 0
pages/detailsonthereceipt/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "数据详情"
+}

+ 127 - 0
pages/detailsonthereceipt/index.wxml

@@ -0,0 +1,127 @@
+<!--pages/detailsonthereceipt/index.wxml-->
+<view class='Theglobalbackground'>
+
+  <view class='time_information'>
+    <view class='ul'>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">最终缔结人:</text>
+          <text>{{data[index].admin_name}}</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 区:</text>
+          <text>{{data[index].campus_name}}</text>
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">缴&nbsp; 款&nbsp;人:</text>
+          <text>{{data[index].student_name}}</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">商&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 品:</text>
+          <text class="f20">{{data[index].goods_name}}</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 量:</text>
+          <view class='textt'>
+            <input class="{{toast?'input_placeholder':'input_placeholder1'}}" type='number' placeholder='0' bindinput="inputNum" wx:if="{{data[index].is_delivery=='未交付'}}"></input>
+                      <text class="input_placeholder" wx:if="{{data[index].is_delivery=='已交付'}}">{{data[index].goods_num}}</text>
+          </view>
+
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">销售金额:</text>
+          <text class='red'>{{data[index].sell_price}}元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">预收金额:</text>
+          <text class='red'>{{data[index].ys_price}}元</text>
+        </view>
+      </view>
+
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">微信支付:</text>
+          <text class='red'>{{data[index].weichatPay}}元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">口碑支付:</text>
+          <text class='red'>{{data[index].aliPay}}元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">现金支付:</text>
+          <text class='red'>{{data[index].cashPay}}元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">微店支付:</text>
+          <text class='red'>{{data[index].weidianPay}}元</text>
+        </view>
+      </view>
+
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">押金抵扣:</text>
+          <text class='red'>{{data[index].deposit}}元</text>
+        </view>
+      </view>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">合作校前台支付:</text>
+          <text class='red'>{{data[index].campusPay}}元</text>
+        </view>
+      </view>
+      <view class='li'>
+        <view class='details'>
+          <text decode="nbsp">备 &nbsp;&nbsp; &nbsp;&nbsp; 注:</text>
+          <text>{{data[index].remarks}}</text>
+        </view>
+      </view>
+    </view>
+  </view>
+
+
+  <view class='time' wx:if="{{type==2}}">
+    <text>*</text>
+    <text>如有数据变动请直接联系管理员修改</text>
+  </view>
+
+  <!--确定交付-->
+  <view wx:if="{{data[index].is_delivery=='未交付'&&type==2}}">
+    <button class='delivery' bindtap='delivery'>确定交付</button>
+  </view>
+
+
+  <!--已交付-->
+  <view wx:if="{{data[index].is_delivery=='已交付'&&type==2}}">
+    <button class='alreadydelivered'>已交付</button>
+  </view>
+</view>

+ 102 - 0
pages/detailsonthereceipt/index.wxss

@@ -0,0 +1,102 @@
+/* pages/detailsonthereceipt/index.wxss */
+.time_information {
+  background: #fff;
+  height: auto;
+  border-radius: 15rpx;
+}
+
+.ul .li {
+  width: 100%;
+  line-height: 70rpx;
+  height: 70rpx;
+  border-bottom: 3rpx solid #efeff7;
+  position: relative;
+}
+
+.details {
+  overflow: hidden;
+  width: 95%;
+  margin: 0 auto;
+  font-size: 26rpx;
+  color: #969696;
+}
+.details text:nth-of-type(1){
+  float: left
+}
+.details text:nth-of-type(2){
+  float: right;
+  text-align: right;
+}
+.red{
+  color: red;
+}
+.ul .li:nth-last-of-type(1){
+border: none;
+}
+
+.delivery{
+  width: 300rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  background: #63576c;
+  margin: 0 auto;
+  text-align: center;
+  color: #fff;
+  position: relative;
+  top: 50rpx;
+}
+
+.alreadydelivered{
+  width: 300rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  background: #DBD7D7;
+  margin: 0 auto;
+  text-align: center;
+  color: #A9A8A8;
+  position: relative;
+  top: 50rpx;
+}
+button {
+  background-color: #fff;
+}
+button::after {
+  border: none;
+}
+.time{
+  margin:0 auto;
+width:94%;
+font-size: 25rpx;
+position: relative;
+  top: 30rpx;
+  text-align: right;
+  color: #ccc;
+}
+.textt{
+  width: 90%;
+  height: 50rpx;
+  /* background: red; */
+  margin: 0 auto;
+  margin-top: 30rpx;
+}
+
+.input_placeholder{
+ width:75%;
+height:45rpx;
+padding:0rpx 20rpx 0rpx 0rpx;
+position:absolute;
+right:10rpx;
+top:8rpx;
+text-align: right;
+}
+.input_placeholder1{
+ width:75%;
+height:45rpx;
+border:1rpx solid red;
+padding:0rpx 20rpx 0rpx 0rpx;
+position:absolute;
+right:10rpx;
+top:8rpx;
+text-align: right;
+}
+.f20{font-size: 20rpx;}

+ 717 - 0
pages/index/index.js

@@ -0,0 +1,717 @@
+// pages/index/index.js
+import {
+  Home
+} from '../../utils/home.js';
+var home = new Home(); //实例化 首页 对象\
+var app = getApp();
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    goodsType:[["课程","教程","商品"]],
+    goodsTypeIndex:0,
+    temp: [],
+    isShow_goodsType:false,
+    isShow_goods: false,
+    isShow_campusName:false,
+    picker_01_data: [],
+
+    nickName: "",
+    avatarUrl: "",
+    qkong: false,
+    campusNameListIndex: 0,
+    selectType: true,
+    goodsListIndex: 0,
+    goodsList: [
+      []
+    ],
+    //课程隐藏数量
+    num_: 0,
+    //销售金额
+    sellPrice: 0,
+    //商品数量
+    num: 0,
+    //预收
+    prePrice: 0,
+    //微信
+    weichatPay: 0,
+    //口碑
+    aliPay: 0,
+    //现金
+    cashPay: 0,
+    //微店
+    weidianPay: 0,
+    //押金抵扣
+    pledgeDeduction: 0,
+    //校区合作
+    campusPay: '',
+    //备注
+    comment: '',
+    userName: '',
+    mobile: '',
+    pnumber: 1,
+    Gender: 'female',
+    casIndex: 0,
+    casIndexx: 0,
+    hiddenName: false,
+    isDelivery: '已交付',
+    deliverys: false,
+    inputValue: null,
+    weichatPay: 0,
+    aliPay: 0,
+    cashPay: 0,
+    weidianPay: 0,
+    pledgeDeduction: 0,
+    campusPay: 0,
+    jiaofeiren: '',
+    items: [{
+        value: '新',
+      },
+      {
+        value: '老',
+
+      },
+      {
+        value: 'U转吉',
+
+      },
+      {
+        value: '吉转吉',
+      },
+      {
+        value: '无',
+      }
+    ]
+  },
+  showPicker_campusName: function () {
+    this.setData({
+      isShow_campusName: true
+    })
+  },
+  //选择校区
+  // bindCasPickerChange: function (e) {
+  //   this.setData({
+  //     campusNameListIndex: e.detail.value
+  //   })
+  // },
+  sureCallBack_campusName(e) {
+    let that = this
+    that.setData({
+      isShow_campusName: false,
+      campusNameListIndex: e.detail.choosedIndexArr[0]
+    })
+  },
+  cancleCallBack_campusName() {
+    let that=this
+    that.data.isShow_campusName=false,
+    that.setData({
+      isShow_campusName: false,
+    })
+  },
+
+  showPicker_goodsList: function() {
+    let that=this
+    that.data.isShow_goods= true
+    that.setData({
+      isShow_goods: true
+    })
+  },
+  sureCallBack_goods(e) {
+    let that = this
+    if (that.data.objectGoodsList[e.detail.choosedIndexArr[0]].goods_tags == '商品') {
+      that.setData({
+        selectType: true,
+        num_: 0
+      })
+    } else {
+      that.setData({
+        selectType: false,
+        isDelivery: '已交付',
+        num_: 1,
+        num: 0
+      })
+    }
+    that.setData({
+      isShow_goods: false,
+      goodsListIndex: e.detail.choosedIndexArr[0]
+    })
+    that.sellPrice()
+  },
+  cancleCallBack_goods() {
+    this.setData({
+      isShow_goods: false,
+    })
+  },
+  showPicker_goodsTypeList: function () {
+    this.setData({
+      isShow_goodsType: true
+    })
+  },
+  sureCallBack_goodsType(e) {
+    let that = this
+    // if (that.data.goodsType[0][e.detail.choosedIndexArr[0]] == '商品') {
+    //   that.setData({
+    //     selectType: true,
+    //     num_: 0,
+    //     goodsListIndex:0
+    //   })
+    // } else {
+    //   that.setData({
+    //     selectType: false,
+    //     isDelivery: '已交付',
+    //     num_: 1,
+    //     num: 0,
+    //     goodsListIndex: 0
+    //   })
+    // }
+    that.setData({
+      goodsListIndex: 0
+    })
+    that.data.goodsTypeIndex=e.detail.choosedIndexArr[0]
+    that.setData({
+      isShow_goodsType: false,
+      goodsTypeIndex: e.detail.choosedIndexArr[0]
+    })
+    that.getGoodList()
+  },
+  cancleCallBack_goodsType() {
+    this.setData({
+      isShow_goodsType: false,
+    })
+  },
+
+  //填写缴费人
+  inputStudentName: function(e) {
+    let that = this
+    that.setData({
+      studentName: e.detail.value
+    })
+  },
+
+  //选择学生状态
+  radioChange: function(e) {
+    let that = this
+    this.setData({
+      studentStatus: e.detail.value,
+    })
+  },
+
+
+  //选择商品
+  bindPickerChangeGoodsList: function(e) {
+    let that = this
+    if (that.data.objectGoodsList[e.detail.value].goods_tags == '商品') {
+      that.setData({
+        selectType: true,
+        num_: 0
+      })
+    } else {
+      that.setData({
+        selectType: false,
+        isDelivery: '已交付',
+        num_: 1,
+        num: 0
+      })
+    }
+    this.setData({
+      goodsListIndex: e.detail.value
+    })
+    that.sellPrice()
+  },
+  //销售金额计算
+  sellPrice: function() {
+    let that = this
+    var sellPrice = that.data.objectGoodsList[that.data.goodsListIndex]['goods_price'] * that.data.num + that.data.objectGoodsList[that.data.goodsListIndex]['goods_price'] * that.data.num_
+    that.setData({
+      sellPrice: sellPrice,
+    })
+  },
+  /**
+   * 交付 
+   */
+  delivery: function(e) {
+    var that = this;
+    var b = this.data.isDelivery == "已交付" ? "未交付" : "已交付";
+    if (b) {
+      that.setData({
+        isDelivery: b,
+        'inputValue': '',
+        weichatPay: 0,
+        aliPay: 0,
+        cashPay: 0,
+        weidianPay: 0,
+        pledgeDeduction: 0,
+        campusPay: 0,
+        prePrice: 0
+      })
+    } else {
+      that.setData({
+        isDelivery: b,
+        'inputValue': '',
+      })
+    }
+  },
+  deliveryChange: function() {
+
+  },
+  /**
+   * 数量 input 数量 监听
+   */
+  numberInput: function(event) {
+    let that = this;
+    var inputSearch = event.detail.value;
+    if (inputSearch.length > 0) {
+      that.setData({
+        deliverys: true,
+        num: event.detail.value,
+        prePrice: 0
+      })
+    } else {
+      that.setData({
+        deliverys: false,
+        num: event.detail.value
+      })
+    }
+    that.sellPrice()
+  },
+  /**
+   * 预收金额
+   */
+  prePriceInput: function() {
+    let that = this
+    if (that.data.num < 1) {
+      let prePrice = 0
+      prePrice = parseFloat(that.data.weichatPay) + parseFloat(that.data.aliPay) + parseFloat(that.data.cashPay) + parseFloat(that.data.weidianPay) + parseFloat(that.data.pledgeDeduction) + parseFloat(that.data.campusPay)
+      that.setData({
+        prePrice: prePrice
+      })
+
+    }
+  },
+  /**
+   * 微信支付
+   */
+  weichatPayInput: function(e) {
+    let that = this
+    that.setData({
+      weichatPay: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 支付宝支付 口碑支付
+   */
+  aliPayInput: function(e) {
+    let that = this
+    that.setData({
+      aliPay: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 现金支付
+   */
+  cashPayInput: function(e) {
+    let that = this
+    that.setData({
+      cashPay: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 微店支付
+   */
+  weidianPayInput: function(e) {
+    let that = this
+    that.setData({
+      weidianPay: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 押金抵扣
+   */
+  pledgeDeductionInput: function(e) {
+    let that = this
+    that.setData({
+      pledgeDeduction: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 合作校前台支付
+   */
+  campusPayInput: function(e) {
+    let that = this
+    that.setData({
+      campusPay: that.checkInputText(e.detail.value)
+    })
+    that.prePriceInput()
+  },
+  /**
+   * 备注
+   */
+  commentInput: function(e) {
+    let that = this
+    that.setData({
+      comment: e.detail.value
+    })
+  },
+  time: function() {
+    let that = this
+    //获取当前时间戳  
+    var timestamp = Date.parse(new Date());
+    timestamp = timestamp / 1000;
+
+    //获取当前时间  
+    var n = timestamp * 1000;
+    var date = new Date(n);
+    //年  
+    var Y = date.getFullYear();
+    //月  
+    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
+    //日  
+    var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
+    //时  
+    var h = date.getHours();
+    //分  
+    var m = date.getMinutes();
+    //秒  
+    var s = date.getSeconds();
+
+    that.setData({
+      Y: Y,
+      M: M,
+      D: D,
+    })
+  },
+
+  //获取商品列表
+  getGoodList: function() {
+    let that = this
+    var param = {goods_type:that.data.goodsType[0][that.data.goodsTypeIndex]}
+    home.getGoodList(param, (res) => {
+      that.setData({
+        objectGoodsList: res.data
+      })
+      var glist = [[]]; 
+      res.data.forEach((res) => {
+        let that = this
+        //var a = that.data.goodsList
+        glist[0].push(res.goods_name)
+ 
+        if (that.data.objectGoodsList[that.data.goodsListIndex].goods_tags == '商品') {
+          that.setData({
+            selectType: true
+          })
+        } else {
+          that.setData({
+            selectType: false
+          })
+        }
+      })
+      that.setData({ goodsList:glist})
+      that.sellPrice()
+    })
+  },
+  //提交
+  submit: function() {
+    let that = this
+    if (that.data.studentName) {
+      if (that.data.studentStatus) {
+        if (that.data.num || that.data.isDelivery || that.data.objectGoodsList[that.data.goodsListIndex].goods_tags == '课程') {
+          if (that.data.prePrice || (that.data.weichatPay || that.data.aliPay || that.data.cashPay || that.data.weidianPay || that.data.pledgeDeduction || that.data.campusPay)) {
+            
+            var total = parseFloat(that.data.weichatPay) + parseFloat(that.data.aliPay) + parseFloat(that.data.cashPay) + parseFloat(that.data.weidianPay) + parseFloat(that.data.pledgeDeduction) + parseFloat(that.data.campusPay);
+            if (that.data.sellPrice == total || that.data.isDelivery == "未交付") {
+
+              var isDelivery = that.data.isDelivery;
+              var prePrice = that.data.prePrice;
+              if (that.data.objectGoodsList[that.data.goodsListIndex].goods_type == '课程') {
+                isDelivery = '已交付'
+                prePrice = 0
+              }
+              var param = {
+                //最终缔结人ID
+                user_id: that.data.user_id,
+                //最终缔结人姓名
+                user_name: that.data.user_name,
+                //校区
+                campusName: that.data.campusNameList[0][that.data.campusNameListIndex],
+                //缴费人
+                studentName: that.data.studentName,
+                //学生状态
+                studentStatus: that.data.studentStatus,
+                //商品
+                goods: that.data.goodsList[0][that.data.goodsListIndex],
+                //销售金额
+                sellPrice: that.data.sellPrice,
+                //数量
+                num: that.data.num,
+                //交付 未交付
+                isDelivery: isDelivery,
+                //预收
+                prePrice: prePrice,
+                //微信
+                weichatPay: that.data.weichatPay,
+                //口碑
+                aliPay: that.data.aliPay,
+                //现金
+                cashPay: that.data.cashPay,
+                //微店
+                weidianPay: that.data.weidianPay,
+                //押金抵扣
+                pledgeDeduction: that.data.pledgeDeduction,
+                //校区合作
+                campusPay: that.data.campusPay,
+                //备注
+                comment: that.data.comment,
+              }
+              home.submit(param, (res) => {
+                let that = this
+                if (res.code == 1) {
+                  wx.showToast({
+                    title: res.msg,
+                    icon: 'none',
+                    duration: 1000,
+                    mask: true,
+                    success: function(res) {},
+                    fail: function(res) {},
+                    complete: function(res) {
+                      that.setData({
+                        //最终缔结人ID
+                        user_id: '',
+                        //最终缔结人姓名
+                        user_name: '',
+                        //校区
+                        campusName: that.data.campusNameList[that.data.campusNameListIndex],
+                        campusNameListIndex: 0,
+                        //缴费人
+                        studentName: '',
+                        //学生状态
+                        studentStatus: '',
+                        //商品
+                        goods: that.data.goodsList[0][that.data.goodsListIndex],
+                        goodsListIndex: 0,
+                        //销售金额
+                        sellPrice: 0,
+                        //数量
+                        num: 0,
+                        //交付 未交付
+                        isDelivery: '已交付',
+                        //预收
+                        prePrice: 0,
+                        //微信
+                        weichatPay: 0,
+                        //口碑
+                        aliPay: 0,
+                        //现金
+                        cashPay: 0,
+                        //微店
+                        weidianPay: 0,
+                        //押金抵扣
+                        pledgeDeduction: 0,
+                        //校区合作
+                        campusPay: 0,
+                        //备注
+                        comment:'',
+                        qkong: true,
+                        jiaofeiren: '',
+                        deliverys: false
+                      })
+                      that.onShow()
+                    },
+                  })
+
+                } else if (res.code == 0) {
+                  wx.showToast({
+                    title: res.msg,
+                    icon: 'none',
+                    duration: 1000,
+                    mask: true,
+                    success: function(res) {},
+                    fail: function(res) {},
+                    complete: function(res) {},
+                  })
+                }
+              })
+            } else if (that.data.sellPrice < total) {
+              wx.showToast({
+                title: '支付金额大于销售金额',
+                icon: 'none',
+                image: '',
+                duration: 1000,
+                mask: true,
+                success: function(res) {},
+                fail: function(res) {},
+                complete: function(res) {},
+              })
+            } else if (that.data.sellPrice > total) {
+              wx.showToast({
+                title: '支付金额小于销售金额',
+                icon: 'none',
+                image: '',
+                duration: 1000,
+                mask: true,
+                success: function(res) {},
+                fail: function(res) {},
+                complete: function(res) {},
+              })
+            }
+          } else {
+            wx.showToast({
+              title: '请填写支付金额',
+              icon: 'none',
+              image: '',
+              duration: 1000,
+              mask: true,
+              success: function(res) {},
+              fail: function(res) {},
+              complete: function(res) {},
+            })
+          }
+        } else {
+          wx.showToast({
+            title: '请填写商品数量',
+            icon: 'none',
+            image: '',
+            duration: 1000,
+            mask: true
+          })
+        }
+      } else {
+        wx.showToast({
+          title: '请选择学生状态',
+          icon: 'none',
+          image: '',
+          duration: 1000,
+          mask: true,
+          success: function(res) {},
+          fail: function(res) {},
+          complete: function(res) {},
+        })
+      }
+    } else {
+      wx.showToast({
+        title: '请填写缴费人姓名',
+        icon: 'none',
+        image: '',
+        duration: 1000,
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+    }
+  },
+  //获取校区列表
+  campus: function() {
+    var that = this
+    var params = {}
+    home.campus(params, (res) => {
+     var list=[[]]
+     list[0]=res.data
+      that.setData({
+        campusNameList: list
+      })
+    })
+  },
+  onLoad: function() {
+
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    let that = this
+    that.time()
+    that.prePriceInput()
+    that.campus()
+    var user_name = wx.getStorage({
+      key: 'user_name',
+      success: function(res) {
+        that.setData({
+          user_name: res.data
+        })
+      },
+    })
+    wx.getStorage({
+      key: 'user_id',
+      success: function(res) {
+        that.setData({
+          user_id: res.data
+        })
+      },
+    })
+    that.setData({
+      objectGoodsList: [],
+      goodsList: [
+        []
+      ]
+    })
+    home.getTime({}, (res) => {
+      that.setData({
+        goodsType: res.data.cates,
+      })
+      that.getGoodList();
+    })
+  },
+
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+
+  //检查输入文本,限制只能为数字并且数字最多带2位小数
+  checkInputText: function (text) {
+    var reg = /^(\.*)(\d+)(\.?)(\d{0,2}).*$/g; 
+    if (reg.test(text)) { //正则匹配通过,提取有效文本
+      text = text.replace(reg, '$2$3$4');
+    } else { //正则匹配不通过,直接清空
+      text = '';
+    } 
+    if (text.substr(0,2) == '00') {
+      text = text.substr(1, text.length);
+    }
+    if (text.substr(0, 1) == '0' && text.substr(1, 1) != '0' && text.substr(1, 1) != '.' && text.length>=2){
+      text = text.substr(1, text.length);
+    } 
+    return text; //返回符合要求的文本(为数字且最多有带2位小数)
+  }
+
+})

+ 6 - 0
pages/index/index.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "首页",
+    "usingComponents": {
+      "picker": "../../picker/picker"
+    }
+}

+ 111 - 0
pages/index/index.wxml

@@ -0,0 +1,111 @@
+<!--pages/index/index.wxml-->
+<view class='Theglobalbackground'>
+  <view class='time_information'>
+    <view class='thecurrenttime'>
+      <text>当前时间:{{Y}}-{{M}}-{{D}}</text>
+      <text>最终缔结人:{{user_name}}</text>
+    </view>
+
+    <view class='information'>
+      <view class='guitarinformation '>
+        <text decode="nbsp">校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 区:</text>
+        <view bindtap="showPicker_campusName" class='xrgx'>
+          {{campusNameList[0][campusNameListIndex]}}</view>
+        <picker isShowPicker="{{isShow_campusName}}" bindsure="sureCallBack_campusName" bindcancle="cancleCallBack_campusName" scrollType="normal" listData="{{campusNameList}}" chooseItemTextStyle="font-size:20rpx" titleText="校区"></picker>
+
+      </view>
+
+      <view class='guitarinformation jiafeir'>
+        <text decode="nbsp">缴&nbsp; 费&nbsp;人:</text>
+        <input type="text" placeholder='输入姓名后请选择学员情况' bindinput='inputStudentName' value='{{jiaofeiren}}'></input>
+        <radio-group class="radio-group" bindchange="radioChange">
+          <label class="radio" wx:for-items="{{items}}" wx:key="{{items}}">
+            <radio value="{{item.value}}" checked="{{qkong?'':item.checked}}" />{{item.value}}
+          </label>
+        </radio-group>
+
+      </view>
+
+      <view class='goods'>
+        <text decode="nbsp">商&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 品:</text>
+        <view bindtap="showPicker_goodsTypeList" class="picker">
+          <image class="picker_img" src='/images/xia.png'></image>{{goodsType[0][goodsTypeIndex]}}</view>
+        <picker isShowPicker="{{isShow_goodsType}}" bindsure="sureCallBack_goodsType" bindcancle="cancleCallBack_goodsType" scrollType="normal" listData="{{goodsType}}" chooseItemTextStyle="font-size:20rpx" titleText="商品"></picker>
+
+        <view bindtap="showPicker_goodsList" class="picker">
+        
+          <image class="picker_img" src='/images/xia.png'></image>{{goodsList[0][goodsListIndex]}}</view>
+        <picker isShowPicker="{{isShow_goods}}" bindsure="sureCallBack_goods" bindcancle="cancleCallBack_goods" scrollType="normal" listData="{{goodsList}}" chooseItemTextStyle="font-size:20rpx" titleText="商品"></picker>
+
+
+
+      </view>
+
+      <!-- <view class='guitarinformation' wx:if="{{selectType}}"> -->
+        <view class='num_input' wx:if="{{selectType}}">
+        <text decode="nbsp">数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 量:</text>
+        <!-- <input type="number" placeholder='' disabled="{{isDelivery=='未交付'}}" bindinput='numberInput' value='{{num}}'></input>
+        <checkbox-group wx:if="{{selectType}}"> -->
+                <input class="num_picker" type="number" placeholder='' disabled="{{isDelivery=='未交付'}}" bindinput='numberInput' value='{{num}}'></input>
+        <checkbox-group wx:if="{{selectType}}">
+          <text decode="nbsp" class='checkboxx'>未交付: &nbsp;</text>
+          <checkbox class='checkbox' bindtap='delivery' disabled="{{deliverys}}" checked="{{isDelivery=='未交付'?true:false}}"></checkbox>
+        </checkbox-group>
+      </view>
+
+      <view class='thetotalamountof '>
+        <text decode="nbsp">销售金额:</text>
+        <view class='thetotalamountof_text'>{{sellPrice}} 元</view>
+      </view>
+
+      <view class='pay' wx:if="{{selectType}}">
+        <text decode="nbsp">预收金额:</text>
+        <view class='prePrice'>{{prePrice}}</view>
+        <text>元</text>
+      </view>
+
+      <view class='pay'>
+        <text decode="nbsp">微信支付:</text>
+        <input type="digit" placeholder='' bindinput='weichatPayInput' value='{{weichatPay}}'></input>
+        <text>元</text>
+      </view>
+      <view class='pay'>
+        <text decode="nbsp">口碑支付:</text>
+        <input type="digit" placeholder='' bindinput='aliPayInput' value='{{aliPay}}'></input>
+        <text>元</text>
+      </view>
+      <view class='pay'>
+        <text decode="nbsp">现金支付:</text>
+        <input type="digit" placeholder='' bindinput='cashPayInput' value='{{cashPay}}'></input>
+        <text>元</text>
+      </view>
+      <view class='pay'>
+        <text decode="nbsp">微店支付:</text>
+        <input type="digit" placeholder='' bindinput='weidianPayInput' value='{{weidianPay}}'></input>
+        <text>元</text>
+      </view>
+
+      <view class='pay'>
+        <text decode="nbsp">押金抵扣:</text>
+        <input type="digit" placeholder='' bindinput='pledgeDeductionInput' value='{{pledgeDeduction}}'></input>
+        <text>元</text>
+      </view>
+
+      <view class='pay'>
+        <text decode="nbsp">合作校前台支付:</text>
+        <input class='cooperation' type="digit" placeholder='' bindinput='campusPayInput' value='{{campusPay}}'></input>
+        <text>元</text>
+      </view>
+
+      <view class='guitarinformation '>
+        <text decode="nbsp">备 &nbsp;&nbsp; &nbsp; 注:</text>
+        <input type="text" placeholder='' bindinput='commentInput'  value='{{comment}}'></input>
+      </view>
+    </view>
+  </view>
+
+  <view class='submit'>
+    <button bindtap='submit'>提交</button>
+  </view>
+
+</view>

+ 260 - 0
pages/index/index.wxss

@@ -0,0 +1,260 @@
+/* pages/index/index.wxss */
+
+.Theglobalbackground{
+  min-height: 105vh;
+}
+.a{
+  font-size:20rpx;
+}
+.picker{
+  font-size: 20rpx;
+
+}
+
+.thecurrenttime {
+  width: 100%;
+  height: 80rpx;
+  background: #fff;
+  border-radius: 15rpx 15rpx 0rpx 0rpx;
+  line-height: 80rpx;
+  margin: 0rpx 0rpx 10rpx 0rpx;
+}
+
+.thecurrenttime text {
+  font-size: 30rpx;
+}
+
+.thecurrenttime text:nth-of-type(1) {
+  float: left;
+  margin-left: 10px;
+}
+
+.thecurrenttime text:nth-of-type(2) {
+  float: right;
+  margin-right: 10px;
+}
+
+.information {
+  width: 100%;
+  height: auto;
+  margin: 0 auto;
+  background: #fff;
+  font-size: 30rpx;
+  padding: 0rpx 0rpx 60rpx 0rpx;
+  border-radius: 0rpx 0rpx 15rpx 15rpx;
+}
+
+.guitarinformation {
+  width: 100%;
+  height: 85rpx;
+  line-height: 85rpx;
+}
+
+.guitarinformation text {
+  float: left;
+  margin-left: 10px;
+}
+
+.guitarinformation input {
+  float: right;
+  margin-right: 10px;
+  border: 3rpx solid #efefef;
+  text-align: right;
+  padding: 5px;
+  width: 68%;
+  margin-top: 5px;
+  border-radius: 10rpx;
+  font-size:26rpx;
+
+}
+
+.goods {
+  width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+  display: flex;
+}
+.num_input{
+    width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+}
+
+.num_picker{
+    text-align: right;
+    padding-right:10rpx; 
+  overflow: hidden;
+  float:left;
+margin-right:10px;
+border:3rpx solid #efefef;
+width:35%;
+margin-top:6px;
+border-radius:10rpx;
+height:60rpx;
+line-height:60rpx;
+z-index: 99;
+position: relative;
+left: 19rpx;
+}
+
+.num_input text {
+  float: left;
+  margin-left: 10px;
+  
+}
+.goods text {
+  margin-left: 10px;
+}
+.checkboxx{
+  position: relative;
+  left: 50rpx !important;
+}
+.xrgx {
+float:right;
+margin-right:10px;
+border:3rpx solid #efefef;
+text-align:right;
+padding:5px;
+width:68%;
+margin-top:5px;
+border-radius:10rpx;
+font-size:26rpx;
+height:45rpx;
+line-height:45rpx;
+}
+.jiafeir{
+  height:155rpx !important;
+}
+/* .jiafeir text{
+  position: relative;
+  top: 40rpx;
+} */
+.xrgx image {
+  width: 35rpx;
+  height: 35rpx;
+  position: absolute;
+  right: 10rpx;
+  top: 8px;
+}
+
+.radio-group {
+  width: 520rpx;
+  float: right;
+  position: relative;
+  left: -5rpx;
+  top: 2px;
+   height: 60rpx;
+  line-height: 60rpx;
+}
+
+.thetotalamountof {
+  width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+}
+.thetotalamountof text {
+  float: left;
+  margin-left: 10px;
+}
+.thetotalamountof_text{
+  width: 71%;
+  float: right;
+  border-bottom: 2rpx solid #efefef;
+  height: 2rem;
+  line-height: 2rem;
+  position: relative;
+  left: -20rpx;
+  text-align: right;
+}
+
+.pay {
+  width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+}
+
+.pay text {
+  float: left;
+  margin-left: 10px;
+}
+
+.pay input {
+  float: left;
+  margin-left: 3%;
+  border: 3rpx solid #efefef;
+  text-align: right;
+  padding: 5px;
+  width: 60%;
+  margin-top: 5px;
+  border-radius: 10rpx;
+}
+.prePrice {
+  float: left;
+  margin-left: 3%;
+  border: 3rpx solid #efefef;
+  text-align: right;
+  padding: 5px;
+  width: 60%;
+  margin-top: 5px;
+  border-radius: 10rpx;
+  height:45rpx;
+  line-height: 45rpx
+}
+.cooperation{
+  width: 47.5% !important;
+}
+.submit{
+  width: 94%;
+  margin: 0 auto;
+}
+.submit button{
+  margin: 50rpx 0rpx; 
+  border: none;
+  background:#63576c;
+  color: #fff;
+  border-radius: 10rpx;
+  }
+.checkbox .wx-checkbox-input{
+border-radius: 50%;
+height: 40rpx;
+width: 40rpx;
+margin-top: -4rpx;
+ position: relative;
+  left: 50rpx;
+}
+.radio{
+  font-size: 19rpx;
+}
+.radio radio{
+transform: scale(0.8, 0.8);
+}
+
+
+
+checkbox-group{
+  position: relative;
+  top: 6rpx;
+  
+}
+.picker{
+  overflow: hidden;
+margin-right:10px;
+border:3rpx solid #efefef;
+width:31%;
+margin-top:6px;
+border-radius:10rpx;
+height:60rpx;
+line-height:60rpx;
+z-index: 99;
+position: relative;
+left: 19rpx;
+padding:0rpx 0rpx 0rpx 20rpx;
+
+}
+.picker_img{
+   width: 35rpx;
+  height: 35rpx;
+  position: absolute;
+  right: 10rpx;
+  top: 8px;
+}

+ 160 - 0
pages/login/login.js

@@ -0,0 +1,160 @@
+// pages/login/login.js
+import {
+  Home
+} from '../../utils/home.js';
+var home = new Home(); //实例化 首页 对象
+// pages/index/index.js
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+
+  data: {
+
+  },
+  // nameInput: function (e) {
+  //   let that = this
+  //   that.setData({
+  //     userName: e.detail.value
+  //   })
+  // },
+  telInput: function (e) {
+    let that = this
+    that.setData({
+      tel: e.detail.value
+    })
+  },
+  passWordInput: function (e) {
+    let that = this
+    that.setData({
+      passWord: e.detail.value
+    })
+  },
+
+  intoButton: function () {
+    let that = this;
+    if (!that.data.tel) {
+      wx.showToast({
+        title: '请将信息填写完整',
+        icon: 'none'
+      })
+      return;
+    }
+
+    if (!(/^1[34578]\d{9}$/.test(that.data.tel))) {
+      wx.showToast({
+        title: '手机号格式有误,请重填',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!that.data.passWord) {
+      wx.showToast({
+        title: '登录密码不能为空',
+        icon: 'none'
+      })
+      return;
+    }
+    // if (!that.data.userName) {
+    //   wx.showToast({
+    //     title: '姓名不能为空',
+    //     icon: 'none'
+    //   })
+    //   return;
+    // }
+    var params = {
+      tel: that.data.tel,
+      admin_password: that.data.passWord,
+    }
+    home.login(params, (res) => {
+      if (res.code == 1) {
+        wx.setStorageSync('cwxcx_token', res.data.token)
+        wx.setStorageSync('user_id', res.data.user_id)
+        wx.setStorageSync('user_name', res.data.user_name)
+        wx.setStorageSync('tel', that.data.tel)
+        wx.switchTab({
+          url: '/pages/index/index',
+          success: function(res) {},
+          fail: function(res) {},
+          complete: function(res) {},
+        })
+      } else {
+        wx.showToast({
+          title: res.msg,
+          icon: 'none',
+          duration: 1500,
+          mask: true,
+          success: function (res) { },
+          fail: function (res) { },
+          complete: function (res) { },
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    var token = wx.getStorageSync('cwxcx_token')
+    if (token) {
+      wx.switchTab({
+        url: '../index/index',
+        success: function (res) { },
+        fail: function (res) { },
+        complete: function (res) { },
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/login/login.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "喜报 "
+}

+ 29 - 0
pages/login/login.wxml

@@ -0,0 +1,29 @@
+<!--pages/login/login.wxml-->
+<view>
+  <image class='login_background' src='/images/login_background.png'></image>
+  <view class='login'>
+    <view class='login_logo'>
+      <image src='/images/login_logo.png'></image>
+      <view></view>
+      <text decode="nbsp"> &nbsp;为教销一体服务的 \n 个人销售管理系统</text>
+    </view>
+    <view class='input'>
+      <!-- <view class='input_1'>
+        <image src='/images/login_tou.png'></image>
+        <input type='text' placeholder='请输入姓名' bindinput='nameInput'></input>
+      </view> -->
+
+      <view class='input_1'>
+        <image src='/images/account.png'></image>
+        <input type='number' placeholder='请输入手机号' bindinput='telInput'></input>
+      </view>
+      <view class='input_1'>
+        <image src='/images/password.png'></image>
+        <input type='password' placeholder='请输入密码' bindinput='passWordInput'></input>
+      </view>
+    
+        <button bindtap='intoButton'>登录系统</button>
+
+    </view>
+  </view>
+</view>

+ 78 - 0
pages/login/login.wxss

@@ -0,0 +1,78 @@
+/* pages/login/login.wxss */
+.login_background{
+  width: 100%;
+  min-height: 100vh;
+   position: absolute;
+   top: 0px;
+   left: 0px;
+   z-index: 1px;
+}
+.login{
+  width: 100%;
+  min-height: 100vh;
+ 
+  z-index: 9;
+  position: absolute;
+}
+
+.login_logo{
+  width: 100%;
+  height: 500rpx;
+   text-align: center;
+}
+.login_logo image{
+ width:460rpx;
+height:85rpx;
+margin:120rpx 0rpx 0rpx 0rpx;
+
+}
+.login_logo text{
+ font-size:26rpx;
+letter-spacing:3rpx;
+color:#63576c;
+
+}
+.input{
+  width: 70%;
+  margin: 0 auto;
+  
+}
+.input_1{
+ margin:30rpx 0rpx;
+position:relative;
+}
+.input_1 image{
+  width:45rpx;
+height:45rpx;
+padding: 10rpx 20rpx 10rpx 10rpx;
+position: relative;
+top: 12rpx;
+left: 20rpx;
+z-index:9;
+
+}
+.input_1 input{
+  width:85%;
+display:block;
+float:right;
+background:#fff;
+border-radius:50rpx;
+height:80rpx;
+line-height:80rpx;
+padding:0rpx 0rpx 0rpx 80rpx;
+position: absolute;
+top: 0rpx;
+border: 0.5rpx solid #867d91;
+background: #F4F4F7;
+font-size: 34rpx;
+  }
+.input button{
+    background: linear-gradient(to right, #5a4e63 , #867d91);
+  border: none;
+  color: #fff;
+  border-radius: 50rpx;
+  position: relative;
+  top: 30rpx;
+  height:80rpx;
+  line-height: 80rpx;
+}

+ 83 - 0
pages/music/index.js

@@ -0,0 +1,83 @@
+// pages/music/index.js
+import {
+  Home
+} from '../../utils/home.js';
+var home = new Home(); //实例化 首页 对象
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  weInfo:function(){
+    let that=this
+    var param={
+
+    }
+    home.weInfo(param,(res)=>{
+      that.setData({
+        title: res.data[0].article_tittle,
+        content: res.data[0].article_content
+      })
+
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    let that=this
+    that.weInfo()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/music/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "关于音乐钥匙"
+}

+ 18 - 0
pages/music/index.wxml

@@ -0,0 +1,18 @@
+<!--pages/music/index.wxml-->
+<view class='music'>
+  <image src='/images/music.png'></image>
+  <view class='musickeys'>
+    <view class='information'>
+
+      <view class='music_pto'>
+        <text>{{title}}</text>
+      </view>
+
+      <view class='music_text' >
+        <text decode="nbsp">
+{{content}}
+  </text>
+      </view>
+    </view>
+  </view>
+</view>

+ 36 - 0
pages/music/index.wxss

@@ -0,0 +1,36 @@
+/* pages/music/index.wxss */
+.music{
+width: 100%;
+min-height: 100vh;
+}
+.music image{
+  width: 100%;
+  height: 100%;
+  position: absolute;
+}
+.musickeys{
+  width: 100%;
+  z-index: 9;
+  position: absolute;
+}
+.information{
+  width: 95%;
+  min-height: 90vh;
+  background: rgba(255,255,255,0.8);
+  margin: 0 auto;
+  border-radius: 15rpx;
+  position: relative;
+  top: 50rpx;
+  font-size: 30rpx;
+}
+.music_pto{
+  width: 100%;
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+  border-bottom: 3rpx solid #fff;
+}
+.music_text{
+  width: 95%;
+  margin: 0 auto;
+}

+ 104 - 0
pages/personalcenter/index.js

@@ -0,0 +1,104 @@
+// pages/personalcenter/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  //跳转到地址
+
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    let that=this
+    wx.getStorage({
+      key: 'user_name',
+      success: function(res) {},
+      fail: function(res) {},
+      complete: function(res) {
+        that.setData({
+          userName:res.data
+        })
+      },
+    })
+    wx.getStorage({
+      key: 'tel',
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) {
+        that.setData({
+          tel: res.data
+        })
+      },
+    })
+  },
+  outLogin:function(){
+    wx.setStorage({
+      key: 'cwxcx_token',
+      data: '',
+      success: function(res) {},
+      fail: function(res) {},
+      complete: function(res) {
+        wx.reLaunch({
+          url: '../login/login',
+          success: function(res) {},
+          fail: function(res) {},
+          complete: function(res) {},
+        })
+      },
+    })
+  },
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/personalcenter/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "个人中心"
+}

+ 45 - 0
pages/personalcenter/index.wxml

@@ -0,0 +1,45 @@
+<!--pages/personalcenter/index.wxml-->
+
+<view class='Theglobalbackground'>
+  <view class='image'>
+    <image src='/images/personalcenter_top.png'></image>
+  </view>
+
+  <view class='time_information'>
+    <view class='portrait'>
+      <view class='portrait_image'>
+        <image src='/images/touxiang.png'></image>
+      </view>
+      <view class='portrait_text'>
+        <text> 最终缔结人:{{userName}} \n</text>
+        <text decode="nbsp">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话:{{tel}}</text>
+      </view>
+    </view>
+
+    <view>
+
+      <view class='ul'>
+        <navigator url='/pages/submittherecord/index'>
+          <view class="li">
+            <image src='/images/theorder.png'></image>
+            <text>提交记录管理</text>
+          </view>
+        </navigator>
+
+
+        <navigator url='/pages/music/index'>
+          <view class="li">
+            <image src='/images/about.png'></image>
+            <text>关于音乐钥匙</text>
+          </view>
+        </navigator>
+        <view>
+          <view class="li" bindtap='outLogin'>
+            <image src='/images/portrait.png'></image>
+            <text>退出</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 65 - 0
pages/personalcenter/index.wxss

@@ -0,0 +1,65 @@
+/* pages/personalcenter/index.wxss */
+.time_information {
+position:relative;
+top:-155rpx;
+}
+
+.image {
+  width: 100%;
+  height: 370rpx;
+}
+
+.image image {
+  width: 100%;
+  height: 100%;
+}
+
+.portrait image {
+  width: 150rpx;
+  height: 150rpx;
+}
+
+.portrait {
+  width: 100%;
+  height: 210rpx;
+  background: #fff;
+  border-radius: 15rpx;
+  margin: 0rpx 0rpx 30rpx;
+}
+
+.portrait_image {
+  float: left;
+  margin-left: 25px;
+  margin-top: 15px;
+}
+
+.portrait_text {
+  float: left;
+  font-size: 30rpx;
+  margin-left: 15px;
+  margin-top: 35px;
+}
+
+.li {
+  font-size: 30rpx;
+ padding: 30rpx;
+ border-bottom: 3rpx solid #EFEFF7;
+ display: block;
+}
+
+.li image {
+  width: 40rpx;
+  height: 40rpx;
+  position: relative;
+  top: 10rpx;
+}
+.li text{
+  position: relative;
+  left: 10rpx;
+}
+.ul{
+  width: 100%;
+  height: 320rpx;
+  background: #fff;
+  border-radius: 15rpx;
+}

+ 265 - 0
pages/submittherecord/index.js

@@ -0,0 +1,265 @@
+import {
+  Home
+} from '../../utils/home.js';
+var home = new Home(); //实例化 首页 对象\
+var app = getApp();
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    keywords: '',
+    message: [],
+    page: 1,
+    pageTrue: true,
+    isDelivery: '未交付'
+  },
+
+  /**
+   * 日期计算
+   */
+  countDate: function(date, date_) {
+    var date = date.split("-");
+    var nDate = new Date(date[1] + '-' + date[2] + '-' + date[0]); //转换为MM-DD-YYYY格式  
+    var date_ = date_.split("-");
+    var nDate_ = new Date(date_[1] + '-' + date_[2] + '-' + date_[0]); //转换为MM-DD-YYYY格式  
+
+    if (Math.abs(nDate) >= Math.abs(nDate_) && (Math.abs(nDate) - Math.abs(nDate_)) > (31 * 24 * 60 * 60 * 1000)) {
+      return false
+    } else {
+      return true
+    }
+
+  },
+
+
+  nowTime: function() {
+    let that = this
+    var param = {
+
+    }
+    home.getTime(param, (res) => {
+      var pickerTimeStart1 = res.data.qs_date
+      var pickerTimeStart2 = res.data.js_date
+      that.data.pickerTimeStart1 = pickerTimeStart1,
+        that.data.pickerTimeStart2 = pickerTimeStart2,
+        that.setData({
+          pickerTimeStart1: pickerTimeStart1,
+          pickerTimeStart2: pickerTimeStart2,
+          currentTab: 0
+        })
+      that.filtrate()
+    })
+
+  },
+
+ 
+  ysjilu: function() {
+    let that = this
+    that.data.isDelivery = '未交付'
+    that.setData({
+      currentTab: 0,
+      isDelivery: '未交付'
+    })
+    that.filtrate()
+  },
+  xsjilu: function() {
+    let that = this
+    that.data.isDelivery = "已交付"
+
+    that.setData({
+      currentTab: 1,
+      isDelivery: '已交付'
+    })
+    that.filtrate()
+  },
+
+  /**
+   * 选择开始时间
+   */
+  changeTimeStart: function(e) {
+    let that = this
+    that.setData({
+      pickerTimeStart1: e.detail.value
+    })
+    console.log(e.detail.value)
+    // that.timeDispose()
+  },
+  /**
+   * 查询条件
+   */
+  searchInput: function(e) {
+    let that = this
+    if (!e.detail.value) {
+      that.setData({
+        page: 1
+      })
+    }
+    that.setData({
+      keywords: e.detail.value
+    })
+    console.log(e.detail.value)
+  },
+  /**
+   * 选择结束时间
+   */
+  changeTimeEnd: function(e) {
+    let that = this
+    that.setData({
+      pickerTimeStart2: e.detail.value
+    })
+    console.log(e)
+    // that.timeDispose()
+  },
+  /**
+   * 数据查找
+   */
+  findData_: function(e) {
+    let that = this
+    var param = {
+      //如果开始时间结束时间为空 就默认上月所有数据 
+      //页
+      page: that.data.page,
+      //条数
+      pageSize: 13,
+      //筛选
+      keywords: that.data.keywords,
+      //开始时间
+      startTime: that.data.pickerTimeStart1,
+      //结束时间
+      endTime: that.data.pickerTimeStart2,
+      //交付未交付
+      isDelivery: that.data.isDelivery,
+      //用户ID
+      admin_id: wx.getStorageSync('user_id')
+    }
+    if (that.data.pageTrue) {
+      wx.showLoading({
+        title: '正在加载',
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+      home.findData_(param, (res) => {
+        var total = res.data[2].arr_length
+        var moneyTotal = res.data[1].is_pay_total_price
+        if (total == 0) {
+          that.setData({
+            pageTrue: false
+          })
+        }
+        if (that.data.pageSize > res.data.length) {
+          that.setData({
+            pageTrue: false
+          })
+        }
+
+        res.data[0].forEach((val, index) => {
+          var create_time = val.create_time.substring(0, 10);
+          val.create_time = create_time.replace(/-/g, ".");
+        });
+
+        var message = that.data.message.concat(res.data[0])
+
+        if (message.length > 12) {
+          var findLen = 12
+        } else {
+          var findLen = message.length
+        }
+        that.setData({
+          findLen: findLen,
+          message: message,
+          messageParam: JSON.stringify(message),
+          moneyTotal: moneyTotal
+        })
+        wx.hideLoading()
+      })
+    } else if (e) {
+      wx.showLoading({
+        title: '正在加载',
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+      home.findData_(param, (res) => {
+        var moneyTotal = res.data[1].total_prce
+        var message = res.data[0]
+        if (message.length > 12) {
+          var findLen = 12
+        } else {
+          var findLen = message.length
+        }
+        that.setData({
+          findLen: findLen,
+          message: message,
+          messageParam: JSON.stringify(message),
+          moneyTotal: moneyTotal
+        })
+        wx.hideLoading()
+      })
+
+    }
+  },
+  findInput: function(e) {
+    let that = this
+    console.log(e.detail.value)
+    that.setData({
+      keywords: e.detail.value
+    })
+  },
+  upper: function() {
+    let that = this
+    var page = that.data.page + 1
+    that.setData({
+      page: page
+    })
+    that.findData_()
+  },
+  filtrate: function() {
+    let that = this
+    that.setData({
+      message: [],
+      page: 1,
+      pageTrue: true
+    })
+    that.findData_()
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let that = this
+    that.nowTime();
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    this.filtrate();
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {},
+})

+ 3 - 0
pages/submittherecord/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "提交管理记录"
+}

+ 95 - 0
pages/submittherecord/index.wxml

@@ -0,0 +1,95 @@
+<!--pages/thedatacenter/index.wxml-->
+<view class='Theglobalbackground'>
+
+  <view class='time_information'>
+    <view class="swiper-tab">
+      <image src='/images/summary.png'></image>
+      <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="ysjilu">预收记录</view>
+      <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="xsjilu">销售记录</view>
+    </view>
+    <view class='search'>
+      <view>
+        <view class="page">
+          <!-- 时间段 -->
+          <view class="picker_group">
+            <view class='details'>
+              <text>开始时间</text>
+              <picker mode="date" value="{{pickerTimeStart1}}"bindchange="changeTimeStart">
+                <view class="picker">
+                  {{pickerTimeStart1}}
+                </view>
+              </picker>
+            </view>
+
+            <view class='details'>
+              <text>结束时间</text>
+              <picker mode="date" value="{{pickerTimeStart2}}" bindchange="changeTimeEnd">
+                <view class="picker">
+                  {{pickerTimeStart2}}
+                </view>
+              </picker>
+            </view>
+
+          </view>
+        </view>
+
+      </view>
+      <view>
+        <image src='/images/search.png'></image>
+        <input type='text' class='search_input' placeholder='请输入校区/商品/缴款人/价格' bindinput='searchInput'></input>
+        <view class='search_button' bindtap='filtrate'>筛选</view>
+      </view>
+    </view>
+
+    <view class='total'>
+      <view>
+        <text>合计</text>
+      </view>
+      <view>
+        <text>¥{{moneyTotal?moneyTotal:0}}</text>
+      </view>
+    </view>
+
+    <view class="top">
+      <view class='ul taitou'>
+        <view class='li'>时间</view>
+        <view class='li'>校区</view>
+        <view class='li'>缴款人</view>
+        <view class='li'>商品</view>
+        <view class='li'>金额</view>
+        <view class='li'>详情</view>
+      </view>
+      <!--内容-->
+      <scroll-view scroll-y='{{findLen>12?"true":"false"}}' style="height:600rpx" bindscrolltolower="upper" class='searchcontent' wx:if="{{findLen>0}}">
+        <view class='ul' wx:for="{{message}}" wx:key="{{message}}">
+          <view class='li'>
+            <view class='ul'>
+              <view class='li'>{{item.create_time}}</view>
+              <view class='li'>{{item.campus_name}}</view>
+              <view class='li'>{{item.student_name}}</view>
+              <view class='li'>{{item.goods_name}}</view>
+              <view class='li'>¥{{item.sell_price!=0?item.sell_price:item.ys_price}}</view>
+              <view class='li an'>
+                <navigator url='/pages/detailsonthereceipt/index?data={{messageParam}}&index={{index}}&type=2'>
+                  <text>查看</text>
+                </navigator>
+              </view>
+            </view>
+          </view>
+        </view>
+
+      </scroll-view>
+
+
+
+      <!--暂无记录-->
+      <view class='norecord' wx:else>
+        <image src='/images/wujilu.png'></image>
+      </view>
+    </view>
+  </view>
+
+
+
+
+</view>

+ 214 - 0
pages/submittherecord/index.wxss

@@ -0,0 +1,214 @@
+
+
+.swiper-tab {
+  width: 100%;
+  height: 100rpx;
+  background: #fff;
+  border-radius: 15rpx 15rpx 0rpx 0rpx;
+  line-height: 100rpx;
+  margin: 0rpx 0rpx 10rpx 0rpx;
+  text-align: left;
+}
+
+.swiper-tab image {
+  width: 45rpx;
+  height: 45rpx;
+  float: left;
+  position: relative;
+  left: 30rpx;
+  top: 30rpx;
+}
+
+.swiper-tab-list {
+  float: left;
+  border: solid 2rpx #63576c;
+  line-height: 65rpx;
+  font-size: 30rpx;
+  color: #63576c;
+  width: 39%;
+  text-align: center;
+  margin: 15rpx;
+  border-radius: 10rpx;
+  position: relative;
+  left: 5%;
+}
+
+.on {
+  color: #fff;
+  background: #63576c;
+}
+
+.search {
+  width: 100%;
+  height: 160rpx;
+  background: #fff;
+  position: relative;
+  margin: 0rpx 0rpx 10rpx 0rpx;
+}
+
+.search input {
+  float:left;
+border:3rpx solid #efeff7;
+margin-right:5rpx;
+width:65%;
+margin-left:20rpx;
+font-size:26rpx;
+display:block;
+padding:0rpx 0rpx 0rpx 55rpx;
+}
+
+.search_button {
+  width: 15%;
+  height: 45rpx;
+  text-align: center;
+  line-height: 45rpx;
+  color: #fff;
+  border-radius: 10rpx;
+  float: right;
+  margin-right: 15rpx;
+  font-size: 20rpx;
+  background: #76d1b1;
+  outline: medium;
+  border: none;
+  position: relative;
+  left: -20rpx;
+  top: 10rpx;
+}
+
+.search image {
+  width:32rpx;
+height:32rpx;
+float:left;
+position:absolute;
+left:35rpx;
+top:100rpx;
+
+}
+
+.top {
+  width: 100%;
+  /* height: auto !important; */
+  background: #fff;
+  /* border-radius: 0rpx 0rpx 15rpx 15rpx; */
+  min-height: 68vh;
+}
+
+.top .ul .li {
+  float: left;
+  width: 16%;
+  border-top: 1rpx solid #efeff7;
+  border-left: 3rpx solid #efeff7;
+  font-size: 21rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  background: #fff;
+}
+
+.searchcontent .ul .li {
+  width: 100%;
+  height: 60rpx;
+  line-height: 60rpx;
+}
+
+.searchcontent .ul .li .ul .li {
+  float: left;
+  width: 16%;
+  border-bottom: 1rpx solid #efeff7;
+  border-left: 3rpx solid #efeff7;
+  font-size: 21rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  margin-top: -1rpx;
+}
+
+.an {
+  color: red;
+}
+
+.searchcontent .ul .li .ul .li:nth-of-type(1) {
+  border: none !important;
+}
+.norecord{
+  width: 100%;
+  text-align: center;
+  padding: 150rpx 0rpx;
+  /* height: 430rpx; */
+  min-height: 38vh;
+}
+.norecord image{
+   width: 200rpx;
+   height: 200rpx;
+}
+.taitou{
+  height: 65rpx;
+}
+/* 日期选择 */
+.details{
+  width: 45%;
+  float: left;
+  margin: 0% 2%
+}
+.picker_group {
+  height: 85rpx;
+  line-height: 85rpx;
+  /* justify-content: center; */
+  display: flex;
+  align-items: center;
+  font-size: 30rpx;
+  color: #888;
+}
+
+.picker_group picker {
+color:#969696;
+height:40rpx;
+line-height:40rpx;
+margin:0 2%;
+border:1rpx solid #969696;
+border-radius:10rpx;
+width:55%;
+float:left;
+position:relative;
+top:20rpx;
+z-index:25rpx;
+font-size:22rpx;
+
+
+}
+.picker_group text {
+  float: left;
+}
+.search_input{
+  position: relative;
+  top: 10rpx;
+  font-size:26rpx;
+
+}
+.picker{
+  height:40rpx;
+  width:100%;
+}
+.total view{
+  float: left;
+  width: 49%;
+  text-align: center;
+  border-left: 3rpx solid #efeff7;
+  height: 60rpx;
+  line-height: 60rpx;
+  font-size: 21rpx;
+}
+.total view:nth-of-type(1){
+   border: none;
+}
+.total{
+  height: 60rpx;
+  background: #fff;
+  width: 100%;
+  margin: 8rpx 0rpx;
+}

+ 242 - 0
pages/thedatacenter/index.js

@@ -0,0 +1,242 @@
+// pages/thedatacenter/index.js
+import {
+  Home
+} from '../../utils/home.js';
+var home = new Home(); //实例化 首页 对象\
+var app = getApp();
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    keywords: '',
+    message: [],
+    page: 1,
+    pageTrue: true,
+    currentTab: 1
+  },
+  getTime: function() {
+    let that = this
+    var param = {
+
+    }
+    home.getTime(param, (res) => {
+      var pickerTimeStart1 = res.data.qs_date
+      var pickerTimeStart2 = res.data.js_date
+      that.data.pickerTimeStart1 = pickerTimeStart1,
+        that.data.pickerTimeStart2 = pickerTimeStart2,
+        that.setData({
+          pickerTimeStart1: pickerTimeStart1,
+          pickerTimeStart2: pickerTimeStart2,
+          currentTab: 1
+        })
+      that.filtrate()
+    })
+
+  },
+
+  /**
+   * 选择开始时间
+   */
+  changeTimeStart: function (e) {
+    let that = this
+    that.setData({
+      pickerTimeStart1: e.detail.value
+    })
+    console.log(e.detail.value)
+    // that.timeDispose()
+  },
+  /**
+   * 选择结束时间
+   */
+  changeTimeEnd: function (e) {
+    let that = this
+    that.setData({
+      pickerTimeStart2: e.detail.value
+    })
+    console.log(e)
+    // that.timeDispose()
+  },
+  /**
+   * 上月时间
+   */
+  lastTime: function() {
+    let that = this
+    var start = that.data.pickerTimeStart1.split("-");
+    var end = that.data.pickerTimeStart2.split("-");
+
+    start[1] = (((parseInt(start[1]) - 1) < 0 ? parseInt(start[1]) - 1 + 12 : parseInt(start[1]) - 1).toString()).length == 1 ? "0" + (parseInt(start[1]) - 1).toString() : (parseInt(start[1]) - 1).toString()
+    end[1] = (((parseInt(end[1]) - 1) < 0 ? parseInt(end[1]) - 1 + 12 : parseInt(end[1]) - 1).toString()).length == 1 ? "0" + (parseInt(end[1]) - 1).toString() : (parseInt(end[1]) - 1).toString()
+    that.data.pickerTimeStart1 = start.join("-"),
+      that.data.pickerTimeStart2 = end.join("-"),
+      that.setData({
+        pickerTimeStart1: start.join("-"),
+        pickerTimeStart2: end.join("-"),
+        currentTab: 0
+      })
+    that.filtrate()
+  },
+  /**
+   * 查询条件
+   */
+  searchInput: function(e) {
+    let that = this
+    if (!e.detail.value) {
+      that.setData({
+        page: 1
+      })
+    }
+    that.setData({
+      keywords: e.detail.value
+    })
+    console.log(e.detail.value)
+  },
+
+  /**
+   * 数据查找
+   */
+  findData: function(e) {
+    let that = this
+    var param = {
+      //如果开始时间结束时间为空 就默认上月所有数据 
+      //页
+      page: that.data.page,
+      //条数
+      pageSize: 20,
+      //筛选
+      keywords: that.data.keywords,
+      //开始时间
+      startTime: that.data.pickerTimeStart1,
+      //结束时间
+      endTime: that.data. pickerTimeStart2
+    }
+    if (that.data.pageTrue) {
+      wx.showLoading({
+        title: '正在加载',
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+      home.findData(param, (res) => {
+        var total = res.data[2].arr_length
+        var moneyTotal = res.data[1].total_price
+        if (total == 0) {
+          that.setData({
+            pageTrue: false
+          })
+        }
+        if (that.data.pageSize > res.data.length) {
+          that.setData({
+            pageTrue: false
+          })
+        }
+
+        res.data[0].forEach((val, index) => {
+          var create_time = val.create_time.substring(0, 10);
+          val.create_time = create_time.replace(/-/g, ".");
+        });
+
+        var message = that.data.message.concat(res.data[0])
+
+        if (message.length > 14) {
+          var findLen = 14
+        } else {
+          var findLen = message.length
+        }
+        that.setData({
+          findLen: findLen,
+          message: message,
+          messageParam: JSON.stringify(message),
+          moneyTotal: moneyTotal
+        })
+        wx.hideLoading()
+      })
+    } else if (e) {
+      wx.showLoading({
+        title: '正在加载',
+        mask: true,
+        success: function(res) {},
+        fail: function(res) {},
+        complete: function(res) {},
+      })
+      home.findData(param, (res) => {
+        var moneyTotal = res.data[1].total_prce
+        var message = res.data[0]
+        if (message.length > 14) {
+          var findLen = 14
+        } else {
+          var findLen = message.length
+        }
+        that.setData({
+          findLen: findLen,
+          message: message,
+          messageParam: JSON.stringify(message),
+          moneyTotal: moneyTotal
+        })
+        wx.hideLoading()
+      })
+
+    }
+  },
+  findInput: function(e) {
+    let that = this
+    console.log(e.detail.value)
+    that.setData({
+      keywords: e.detail.value
+    })
+  },
+  upper: function() {
+    let that = this
+    var page = that.data.page + 1
+    that.setData({
+      page: page
+    })
+    that.findData()
+  },
+  filtrate: function() {
+    let that = this
+    that.setData({
+      message: [],
+      page: 1,
+      pageTrue: true
+    })
+    that.findData()
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let that = this
+    that.getTime()
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    this.filtrate()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {},
+})

+ 3 - 0
pages/thedatacenter/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "数据中心"
+}

+ 96 - 0
pages/thedatacenter/index.wxml

@@ -0,0 +1,96 @@
+<!--pages/thedatacenter/index.wxml-->
+<view class='Theglobalbackground'>
+
+  <view class='time_information'>
+    <view class="swiper-tab">
+      <image src='/images/summary.png'></image>
+      <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="getTime">本月汇总数据</view>
+
+      <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="lastTime">上月汇总数据</view>
+      
+    </view>
+    <view class='search'>
+      <view>
+        <view class="page">
+          <!-- 时间段 -->
+          <view class="picker_group">
+            <view class='details'>
+              <text>开始时间</text>
+              <picker mode="date" value="{{pickerTimeStart1}}" bindchange="changeTimeStart">
+                <view class="picker">
+                  {{pickerTimeStart1}}
+                </view>
+              </picker>
+            </view>
+
+            <view class='details'>
+              <text>结束时间</text>
+              <picker mode="date" value="{{pickerTimeStart2}}" bindchange="changeTimeEnd">
+                <view class="picker">
+                  {{pickerTimeStart2}}
+                </view>
+              </picker>
+            </view>
+
+          </view>
+        </view>
+
+      </view>
+      <view>
+        <image src='/images/search.png'></image>
+        <input type='text' class='search_input' placeholder='请输入校区/商品/缴款人/价格' bindinput='searchInput'></input>
+        <view class='search_button' bindtap='filtrate'>筛选</view>
+      </view>
+    </view>
+
+    <view class='total'>
+      <view>
+        <text>合计</text>
+      </view>
+      <view>
+        <text>¥{{moneyTotal?moneyTotal:0}}</text>
+      </view>
+    </view>
+
+    <view class="top">
+      <view class='ul taitou'>
+        <view class='li'>时间</view>
+        <view class='li'>校区</view>
+        <view class='li'>缴款人</view>
+        <view class='li'>商品</view>
+        <view class='li'>金额</view>
+        <view class='li'>详情</view>
+      </view>
+      <!--内容-->
+      <scroll-view scroll-y='{{findLen>15?"true":"false"}}' style="height:700rpx" bindscrolltolower="upper" wx:if="{{findLen>0}}">
+        <view class='searchcontent'>
+          <view class='ul'>
+            <view class='li' wx:for="{{message}}" wx:key="{{message}}">
+              <view class='ul'>
+                <view class='li'>{{item.create_time}}</view>
+                <view class='li'>{{item.campus_name}}</view>
+                <view class='li'>{{item.student_name}}</view>
+                <view class='li'>{{item.goods_name}}</view>
+                <view class='li'>¥{{item.sell_price!=0?item.sell_price:item.ys_price}}</view>
+                <view class='li an'>
+                  <navigator url='/pages/detailsonthereceipt/index?data={{messageParam}}&index={{index}}&type=1'>
+                    <text>查看</text>
+                  </navigator>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+
+      </scroll-view>
+      <!--暂无记录-->
+      <view class='norecord'wx:else>
+        <image src='/images/wujilu.png'></image>
+      </view>
+    </view>
+  </view>
+
+
+
+
+</view>

+ 218 - 0
pages/thedatacenter/index.wxss

@@ -0,0 +1,218 @@
+
+
+.swiper-tab {
+  width: 100%;
+  height: 100rpx;
+  background: #fff;
+  border-radius: 15rpx 15rpx 0rpx 0rpx;
+  line-height: 100rpx;
+  margin: 0rpx 0rpx 10rpx 0rpx;
+  text-align: left;
+}
+
+.swiper-tab image {
+  width: 45rpx;
+  height: 45rpx;
+  float: left;
+  position: relative;
+  left: 30rpx;
+  top: 30rpx;
+}
+
+.swiper-tab-list {
+  float: left;
+  border: solid 2rpx #63576c;
+  line-height: 65rpx;
+  font-size: 30rpx;
+  color: #63576c;
+  width: 39%;
+  text-align: center;
+  margin: 15rpx;
+  border-radius: 10rpx;
+  position: relative;
+  left: 5%;
+}
+
+.on {
+  color: #fff;
+  background: #63576c;
+}
+
+.search {
+  width: 100%;
+  height: 160rpx;
+  background: #fff;
+  position: relative;
+  margin: 0rpx 0rpx 10rpx 0rpx;
+}
+
+.search input {
+  float:left;
+border:3rpx solid #efeff7;
+margin-right:5rpx;
+width:65%;
+margin-left:20rpx;
+font-size:26rpx;
+display:block;
+padding:0rpx 0rpx 0rpx 55rpx;
+}
+
+.search_button {
+  width: 15%;
+  height: 45rpx;
+  text-align: center;
+  line-height: 45rpx;
+  color: #fff;
+  border-radius: 10rpx;
+  float: right;
+  margin-right: 15rpx;
+  font-size: 20rpx;
+  background: #76d1b1;
+  outline: medium;
+  border: none;
+  position: relative;
+  left: -20rpx;
+  top: 10rpx;
+}
+
+.search image {
+  width:32rpx;
+height:32rpx;
+float:left;
+position:absolute;
+left:35rpx;
+top:100rpx;
+
+}
+
+.top {
+  width: 100%;
+  height: auto !important;
+  background: #fff;
+  z-index: 9999;
+  position: relative;
+  /* border-radius: 0rpx 0rpx 15rpx 15rpx; */
+}
+
+.top .ul .li {
+  float: left;
+  width: 16%;
+  border-top: 1rpx solid #efeff7;
+  border-left: 3rpx solid #efeff7;
+  font-size: 21rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  background: #fff;
+}
+
+.searchcontent .ul .li {
+  width: 100%;
+  height: 60rpx;
+  line-height: 60rpx;
+}
+
+.searchcontent .ul .li .ul .li {
+  float: left;
+  width: 16%;
+  border-bottom: 1rpx solid #efeff7;
+  border-left: 3rpx solid #efeff7;
+  font-size: 21rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  margin-top: -1rpx;
+}
+
+.an {
+  color: red;
+}
+
+.searchcontent .ul .li .ul .li:nth-of-type(1) {
+  border: none !important;
+}
+.searchcontent .ul{
+  height: auto;
+}
+.norecord{
+  width: 100%;
+  text-align: center;
+  padding: 150rpx 0rpx;
+  height: 345rpx;
+  
+}
+.norecord image{
+   width: 200rpx;
+   height: 200rpx;
+}
+.taitou{
+  height: 65rpx;
+}
+/* 日期选择 */
+.details{
+  width: 45%;
+  float: left;
+  margin: 0% 2%
+}
+.picker_group {
+  height: 85rpx;
+  line-height: 85rpx;
+  /* justify-content: center; */
+  display: flex;
+  align-items: center;
+  font-size: 30rpx;
+  color: #888;
+}
+
+.picker_group picker {
+color:#969696;
+height:40rpx;
+line-height:40rpx;
+margin:0 2%;
+border:1rpx solid #969696;
+border-radius:10rpx;
+width:55%;
+float:left;
+position:relative;
+top:20rpx;
+z-index:25rpx;
+font-size:22rpx;
+
+
+}
+.picker_group text {
+  float: left;
+}
+.search_input{
+  position: relative;
+  top: 10rpx;
+  font-size:26rpx;
+
+}
+.picker{
+  height:40rpx;
+  width:100%;
+}
+.total view{
+  float: left;
+  width: 49%;
+  text-align: center;
+  border-left: 3rpx solid #efeff7;
+  height: 60rpx;
+  line-height: 60rpx;
+  font-size: 21rpx;
+}
+.total view:nth-of-type(1){
+   border: none;
+}
+.total{
+  height: 60rpx;
+  background: #fff;
+  width: 100%;
+  margin: 8rpx 0rpx;
+}

+ 370 - 0
picker/picker.js

@@ -0,0 +1,370 @@
+// picker/picker.js
+import { isString,isPlainObject } from './tool';
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    scrollType:{
+      type: String,
+      value: "normal"//"link": scroll间联动  "normal": scroll相互独立
+    },
+    
+    listData: {
+      type: Array,
+      value: [],
+      observer: function(newVal) {
+        if (newVal.length === 0 || this._compareDate()) return;
+        this._setTempData();
+        let tempArr = [...new Array(newVal.length).keys()].map(() => 0)
+        // console.log(tempArr,'测试~')
+        this.data.lastValue = this.data.tempValue =tempArr;
+        console.log(this.data.tempValue,'测试2')
+        this._setDefault()
+
+        // let {defaultPickData} = this.properties;
+        // if(newVal.length === 0) return;
+        //
+        // this._setDefault(newVal, defaultPickData)
+      }
+    },
+    defaultPickData:{
+      type: Array,
+      value: [],
+      observer: function (newVal) {
+        if (newVal.length === 0 || this._compareDate()) return;
+        this._setTempData();
+        this._setDefault()
+      }
+    },
+    keyWordsOfShow:{
+      type: String,
+      value: "name"
+    },
+    isShowPicker:{
+      type: Boolean,
+      value: false,
+      observer: function(newVal) {
+        if (newVal) {
+          this.setData({
+            donghua:true
+          })
+          this._openPicker()
+        }else{
+ 
+          this._closePicker()
+
+        }
+      }
+    },
+    titleText: {//标题文案
+      type: String,
+      value: "标题"
+    },
+    cancelText:{//取消按钮文案
+      type: String,
+      value: "取消"
+    },
+    sureText:{//确定按钮文案
+      type: String,
+      value: "确定"
+    },
+    pickerHeaderStyle: String,//标题栏样式 view
+    sureStyle: String, //标题栏确定样式  text
+    cancelStyle: String,//标题栏取消样式 text
+    titleStyle: String,//标题栏标题样式  view
+    maskStyle: String,//设置蒙层的样式(详见picker-view) view
+    indicatorStyle: String,//设置选择器中间选中框的样式(详见picker-view) view
+    chooseItemTextStyle: String//设置picker列表文案样式 text
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    columnsData:[],
+    value:[],
+    backData:[],
+    height:0,
+    isOpen: false,
+    isUseKeywordOfShow: false,
+    scrollEnd : true,//滚动是否结束
+    lastValue : [],//上次各个colum的选择索引
+    tempValue : [],
+    isFirstOpen : true,
+    onlyKey : '',
+    defaultPickDataTemp: '',
+    listDataTemp: '',
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    tapModal () {
+      this.properties.isShowPicker = false;
+      this._closePicker()
+    },
+    cancle () {
+      this.setData({
+        donghua:false
+      })
+      this.triggerEvent('cancle')
+      this._closePicker()
+    },
+    sure () {
+      let that=this
+      this.setData({
+        donghua: false
+      })
+      setTimeout(function(){
+
+      let { scrollEnd, tempValue} = that.data;
+      console.log(scrollEnd,"滚动")
+        
+        // if (!that.data.scrollEnd) return;
+   
+    
+      let backData = that._getBackDataFromValue(tempValue);
+      that.setData({
+        backData
+      })
+      that.triggerEvent('sure', {
+        choosedData:backData,
+        choosedIndexArr:tempValue
+      })
+      that._closePicker()
+
+    },900)
+    },
+    _bindChange (e) {
+      console.log(e)
+      let {scrollType} = this.properties;
+      let { lastValue } = this.data;
+      let val = e.detail.value;
+      let backData = [];
+      switch (scrollType) {
+        case "normal":
+          this.data.tempValue = val.concat();
+          this.data.tempValue = val.concat();
+          break;
+        case "link":
+           //let column_02 = this._getColumnData(this.properties.listData[val[0]].children);
+           //let column_03 = this._getColumnData(this.properties.listData[val[0]].children[val[1]].children);
+          let tempArray = [];
+          if(val.length>1){
+            val.slice(0,val.length-1).reduce((t,c,i) => {
+              let v = t[c].children;
+              tempArray.push(this._getColumnData(v))
+              return v
+            },this.properties.listData)
+          }
+          //let columnsData = [this.data.columnsData[0],column_02,column_03];
+          let columnsData = [this.data.columnsData[0], ...tempArray];
+
+          //设置value关联
+          let compareIndex = this._getScrollCompareIndex(lastValue, val);
+          if(compareIndex > -1){
+            let tempI = 1;
+            while(val[compareIndex+tempI]!==undefined){
+              val[compareIndex+tempI] = 0;
+              tempI++;
+            }
+          }
+          val = this._validate(val);
+          this.data.lastValue = val.concat();
+          this.data.tempValue = val.concat();
+          this.setData({
+            columnsData,
+            // value: val
+          })
+      }
+
+    },
+    _validate (val) {
+      let { columnsData } = this.data;
+      columnsData.forEach((v, i) => {
+        if(columnsData[i].length - 1 < val[i]){
+          val[i] = columnsData[i].length - 1;
+        }
+      })
+      this.setData({
+        value: val
+      })
+      return val;
+    },
+    _bindpickend(){
+      console.log("滚动结束")
+      this.data.scrollEnd = true;
+    },
+    _bindpickstart(){
+      this.data.scrollEnd = false;
+      console.log("滚动开始")
+    },
+    _openPicker () {
+
+      if(!this.data.isFirstOpen){
+        if(this.properties.listData.length !== 0){
+          this._setDefault(this._computedBackData(this.data.backData))
+        }
+      }
+      this.data.isFirstOpen = false;
+      this.setData({
+        isOpen: true
+      })
+
+    },
+    _closePicker () {
+     this.setData({
+       isOpen: false
+     })
+    },
+    _getColumnData (arr) {
+      return arr.map((v) => this._fomateObj(v))
+    },
+    _fomateObj (o) {
+      let tempO = {};
+      for(let k in o){
+        k !== "children" && (tempO[k] = o[k]);
+      }
+      return tempO;
+    },
+    _getScrollCompareIndex (arr1, arr2)  {
+      let tempIndex = -1;
+      for(let i = 0, len = arr1.length; i<len; i++){
+        if(arr1[i] !== arr2[i]){
+          tempIndex = i;
+          break;
+        }
+      }
+      return tempIndex;
+    },
+    //根据id获取索引
+    _getIndexByIdOfObject (listData,idArr,key,arr) {
+      if(!Array.isArray(listData)) return;
+      for(let i = 0,len = listData.length; i<len; i++){
+       if(listData[i][key] == idArr[arr.length][key]){
+         arr.push(i)
+         return this._getIndexByIdOfObject(listData[i].children,idArr,key,arr)
+       }
+      }
+
+    },
+    _setDefault (inBackData) {
+      let {listData,defaultPickData,scrollType} = this.properties;
+      let { lastValue, tempValue, onlyKey } = this.data;
+      if(inBackData){
+        defaultPickData = inBackData;
+      }
+      let backData = [];
+      switch (scrollType) {
+        case "normal":
+          if(isPlainObject(listData[0][0])){
+            this.setData({
+              isUseKeywordOfShow: true
+            })
+          }
+          if(Array.isArray(defaultPickData) && defaultPickData.length>0){
+            backData = listData.map((v, i) => v[defaultPickData[i]]);
+            this.data.tempValue = defaultPickData;
+            this.data.lastValue = defaultPickData;
+          }else{
+            backData = listData.map((v) => v[0]);
+          }
+          this.setData({
+            columnsData: listData,
+            backData: backData,
+            value: defaultPickData
+          })
+          break;
+        case "link":
+          // let column_01 = this._getColumnData(newVal);
+          // let column_02 = this._getColumnData(newVal[0].children);
+          // let column_03 = this._getColumnData(newVal[0].children[0].children);
+          // let columnsData = [column_01,column_02,column_03];
+          let columnsData = [];
+          //如果默认值
+          if(Array.isArray(defaultPickData) && defaultPickData.length>0 && defaultPickData.every((v, i) => isPlainObject(v))){
+            let key = onlyKey = Object.keys(defaultPickData[0])[0];
+            let arr = [];
+            this._getIndexByIdOfObject(listData, defaultPickData, key, arr);
+            defaultPickData = arr;
+            let tempI = 0;
+            do{
+              lastValue.push(defaultPickData[tempI]);
+              columnsData.push(this._getColumnData(listData))
+              listData = listData[defaultPickData[tempI]].children;
+              tempI++;
+            }while (listData)
+            backData = columnsData.map((v, i) => v[defaultPickData[i]]);
+            //如果没有默认值
+          }else{
+            this.data.onlyKey = this.properties.keyWordsOfShow||'name';
+            do{
+              lastValue.push(0);
+              columnsData.push(this._getColumnData(listData))
+              listData = listData[0].children;
+            }while (listData)
+            backData = columnsData.map((v) => v[0]);
+          }
+          this.data.tempValue = defaultPickData;
+          this.data.lastValue = defaultPickData;
+          this.setData({
+            isUseKeywordOfShow: true,
+            columnsData,
+            backData,
+          })
+          setTimeout(()=>{
+            this.setData({
+              value: defaultPickData
+            })
+          },0)
+          break;
+      }
+    },
+    _computedBackData(backData) {
+      let {scrollType, listData} = this.properties;
+      let { onlyKey } = this.data;
+      if(scrollType === 'normal'){
+        return backData.map((v, i) => listData[i].findIndex((vv, ii) => this._compareObj(v, vv)))
+      }else{
+        return backData.map((v, i) => {
+          let o = {};
+          o[onlyKey] = v[onlyKey]
+          return o;
+        })
+      }
+    },
+    _compareObj (o1, o2) {
+      let {keyWordsOfShow} = this.properties;
+      if(typeof o1 !== "object"){
+        return o1 === o2
+      }else{
+        return o1[keyWordsOfShow] === o2[keyWordsOfShow]
+      }
+    },
+    _getBackDataFromValue (val) {
+      let tempArr = [];
+      if(val.length > 0){
+        tempArr = this.data.columnsData.reduce((t, v, i) => {
+          return t.concat(v[val[i]])
+        }, [])
+      }else{
+        tempArr = this.data.columnsData.map((v, i) => v[0])
+      }
+      return tempArr
+    },
+    _compareDate () { //完全相等返回true
+      let {defaultPickDataTemp, listDataTemp} = this.data;
+      let {defaultPickData, listData}  = this.properties
+
+      return defaultPickDataTemp === defaultPickData && listDataTemp === listData
+    },
+    _setTempData () {
+      let {defaultPickData, listData}  = this.properties;
+      this.data.defaultPickDataTemp = defaultPickData;
+      this.data.listDataTemp = listData;
+    }
+  }
+
+  })

+ 4 - 0
picker/picker.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 21 - 0
picker/picker.wxml

@@ -0,0 +1,21 @@
+<!--picker/picker.wxml-->
+<view class="full-box {{isOpen?'cur':''}}">
+  <!--<view class="modal" bindtap="tapModal"></view>-->
+  <view class="{{donghua?'pickers':'pickers_'}}">
+    <view class="picker-header" style="{{pickerHeaderStyle}}">
+      <view bindtap="cancle" class="cancel_button">
+        <text style="{{cancelStyle}}">{{cancelText}}</text>
+      </view>
+      <view bindtap="sure" class="sure_buttton">
+        <text style="{{sureStyle}}">{{sureText}}</text>
+      </view>
+    </view>
+    <picker-view value="{{value}}" class="picker-content" bindpickstart="_bindpickstart" bindchange="_bindChange" bindpickend="_bindpickend" indicator-style="{{indicatorStyle}}" mask-style="{{maskStyle}}">
+      <picker-view-column wx:for="{{columnsData}}" wx:key="{{index}}">
+        <view wx:for="{{item}}" wx:for-item="itemIn" class="picker-line" wx:key="{{index}}">
+          <text class="line1" style="{{chooseItemTextStyle}}">{{isUseKeywordOfShow?itemIn[keyWordsOfShow]:itemIn}}</text>
+        </view>
+      </picker-view-column>
+    </picker-view>
+  </view>
+</view>

+ 108 - 0
picker/picker.wxss

@@ -0,0 +1,108 @@
+/* picker/picker.wxss */
+
+.sure_buttton{
+  height: 100rpx;
+  width: 200rpx;
+    display: flex;
+align-items: center;
+justify-content: center;
+}
+.cancel_button{
+  height: 100rpx;
+  width: 200rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center
+}
+.full-box{
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	top: 0;
+	z-index: 9999;
+	opacity: 0;
+	background:rgba(0,0,0,.4);
+	transition:all .4s ease-in-out 0;
+	pointer-events:none;
+}
+.full-box.cur{
+	opacity:1;
+	pointer-events:auto
+}
+
+.modal{
+	position: absolute;
+	width: 100%;
+	height: 50%;
+	bottom:-50%;
+	left: 0;
+	background: transparent;
+	transition:all .4s ease-in-out 0;
+}
+.cur {
+	bottom:0;
+}
+.pickers{
+	position: absolute;
+	width: 100%;
+	height: 235px;
+  	bottom:0;
+	left: 0;
+	background: #fff;
+	display: flex;
+	flex-direction: column;
+	transition:bottom 0.6s linear 0.1s;
+}
+.pickers_{
+  	position: absolute;
+	width: 100%;
+  bottom:-235px;
+	left: 0;
+	background: #fff;
+	display: flex;
+	flex-direction: column;
+	transition:bottom 0.6s linear 0.1s;
+
+}
+
+
+.cur .modal{
+	bottom:50%;
+}
+.picker-line{
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+
+}
+
+.picker-header {
+	height: 20%;
+	box-sizing: border-box;
+	padding: 0 20rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	border-bottom: 1px solid #eeeeee;
+}
+.picker-header view {
+	height: 100%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+.picker-header view text{
+	font-size: 36rpx;
+}
+.picker-content {
+	flex-grow: 1;
+}
+.line1{
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+  height: 100rpx
+	/* lines:1 */
+}

+ 13 - 0
picker/tool.js

@@ -0,0 +1,13 @@
+function _typeof(obj) {
+  return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
+}
+function isString(o) { //是否字符串
+  return _typeof(obj) === 'string'
+}
+function isPlainObject(obj) {
+  return _typeof(obj) === 'object';
+}
+module.exports = {
+  isString,
+  isPlainObject
+}

+ 67 - 0
project.config.json

@@ -0,0 +1,67 @@
+{
+	"description": "项目配置文件",
+	"packOptions": {
+		"ignore": []
+	},
+	"setting": {
+		"urlCheck": false,
+		"es6": true,
+		"postcss": true,
+		"minified": true,
+		"newFeature": true,
+		"autoAudits": false
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.5.0",
+	"appid": "wxec2cf92919734942",
+	"projectname": "%E9%9F%B3%E4%B9%90%E9%92%A5%E5%8C%99%E8%B4%A2%E5%8A%A1%E7%B3%BB%E7%BB%9F",
+	"debugOptions": {
+		"hidedInDevtools": []
+	},
+	"isGameTourist": false,
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"condition": {
+		"search": {
+			"current": -1,
+			"list": []
+		},
+		"conversation": {
+			"current": -1,
+			"list": []
+		},
+		"plugin": {
+			"current": -1,
+			"list": []
+		},
+		"game": {
+			"currentL": -1,
+			"list": []
+		},
+		"miniprogram": {
+			"current": 2,
+			"list": [
+				{
+					"id": -1,
+					"name": "登录",
+					"pathName": "pages/login/login",
+					"query": ""
+				},
+				{
+					"id": -1,
+					"name": "数据中心",
+					"pathName": "pages/thedatacenter/index",
+					"query": "",
+					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "提交记录",
+					"pathName": "pages/submittherecord/index",
+					"query": "",
+					"scene": null
+				}
+			]
+		}
+	}
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

+ 111 - 0
utils/base.js

@@ -0,0 +1,111 @@
+/**
+ * Created by jimmy-jiang on 2016/11/21.
+ */
+import {
+  Config
+} from 'config.js';
+
+class Base {
+  constructor() {
+    "use strict";
+    this.baseRestUrl = Config.restUrl;
+  }
+  request(params, noRefetch) {
+    var that = this,
+      url = this.baseRestUrl + params.url,
+      pheader = {};
+    if (!params.type) {
+      params.type = 'POST';
+    }
+    /*不需要再次组装地址*/
+    if (params.setUpUrl == false) {
+      url = params.url;
+    }
+
+    var token = {
+      'token': wx.getStorageSync('cwxcx_token'),
+    };
+    if (!params.header) {
+      pheader = {
+        'content-type': 'application/x-www-form-urlencoded',
+      }
+    } else {
+      pheader = params.header;
+    }
+    // var header = Object.assign(token, pheader);
+    var param=Object.assign(token,params.data)
+    
+    // console.log(header)
+    wx.request({
+      url: url,
+      data: param,
+      method: params.type,
+      header: pheader,
+      success: function (res) {
+        if(res.data.code == -1){
+          wx.setStorageSync('cwxcx_token', '')
+          wx.reLaunch({
+            url: '/pages/login/login',
+          })
+        }else{
+        if (res.statusCode == 20010) {
+          wx.switchTab({
+            url: '/pages/index/index',
+            success: function (res) {
+              wx.setStorageSync('login', false)
+            },
+            fail: function (res) { },
+            complete: function (res) { },
+          })
+        } else if (res.statusCode !== 200 || typeof res.data !== 'object') {
+          wx.showModal({
+            title: '',
+            content: '网络请求出错',
+            showCancel: false
+          })
+          return false;
+        }
+        // 判断以2(2xx)开头的状态码为正确
+        // 异常不要返回到回调中,就在request中处理,记录日志并showToast一个统一的错误即可
+        var code = res.statusCode.toString();
+        var startChar = code.charAt(0);
+        if (startChar == '2') {
+          params.sCallback && params.sCallback(res.data);
+        } else {
+          if (code == '401') {
+            if (!noRefetch) {
+              that._refetch(params);
+            }
+          }
+          that._processError(res);
+          params.eCallback && params.eCallback(res.data);
+        }
+
+      }},
+      fail: function (err) {
+        that._processError(err);
+      }
+    });
+  }
+
+  _processError(err) {
+    console.log(err,'12312313');
+  }
+
+  _refetch(param) {
+    var token = new Token();
+    token.getTokenFromServer((token) => {
+      this.request(param, true);
+    });
+  }
+
+  /*获得元素上的绑定的值*/
+  getDataSet(event, key) {
+    return event.currentTarget.dataset[key];
+  };
+
+};
+
+export {
+  Base
+};

+ 10 - 0
utils/config.js

@@ -0,0 +1,10 @@
+class Config {
+  constructor() {
+  }
+}
+
+// Config.restUrl = 'https://xcx.jiugell.com/music_key/public/index.php?s=';//api接口
+Config.restUrl = 'https://www.ylysjy.top/index.php?s=';
+// Config.restUrl = 'http://192.168.0.115'; //api接口
+// Config.onPay = true;  //是否启用支付
+export { Config };

+ 139 - 0
utils/home.js

@@ -0,0 +1,139 @@
+import {
+  Base
+} from 'base.js';
+class Home extends Base {
+  constructor() {
+    super();
+  }
+  login(params, callback) {
+    var param = {
+      url: '/api/api/login',
+      data: params,
+      sCallback: function(data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+  /**
+   * 获取时间
+   */
+  getTime(params,callback){
+    var param={
+      url:'/api/api/gettime',
+      data: params,
+      sCallback: function (data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+
+  /**
+   * 交付
+   */
+  delivery(params, callback) {
+    var param = {
+      url: '/api/api/chageDeliveryStatus',
+      data: params,
+      sCallback: function (data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+  /**
+   * 关于音乐钥匙
+   */
+  weInfo(params,callback){
+    var param = {
+      url: '/api/api/article',
+      data: params,
+      type: 'GET',
+      sCallback: function (data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+    /**
+   * 商品列表
+   */
+  getGoodList(params, callback) {
+    var param = {
+      url: '/api/api/goods',
+      data: params,
+      type: 'GET',
+      sCallback: function(data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+  /**
+   * 数据查找
+   */
+  findData(params,callback){
+    var param={
+      url:'/api/api/keywords',
+      data:params,
+      type:'GET',
+      sCallback:function(data){
+        callback&&callback(data);
+      }
+    }
+    this.request(param);
+  }
+  /**
+ * 数据查找
+ */
+  findData_(params, callback) {
+    var param = {
+      url: '/api/api/isPay',
+      data: params,
+      type: 'GET',
+      sCallback: function (data) {
+        callback && callback(data);
+      }
+    }
+    this.request(param);
+  }
+  /**
+   * 校区列表
+   */
+  campus(params,callback){
+    var param = {
+      url: '/api/api/campus',
+      data: params,
+      type: 'GET',
+      sCallback: function (data) {
+        callback && callback(data);
+      }
+    }
+      this.request(param)
+  }
+
+  submit(params, callback) {
+    var param = {
+      url: '/api/api/info',
+      data: params,
+      sCallback: function(data) {
+        callback && callback(data);
+      }
+    };
+    this.request(param);
+  }
+  getCampus(params,callback){
+    var param={
+      url:'/api/collect/getCampus',
+      data:params,
+      sCallback:function(data){
+        callback&&callback(data);
+      }
+    };
+    this.request(param);
+  }
+}
+export {
+  Home
+};

+ 19 - 0
utils/util.js

@@ -0,0 +1,19 @@
+const formatTime = date => {
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1
+  const day = date.getDate()
+  const hour = date.getHours()
+  const minute = date.getMinutes()
+  const second = date.getSeconds()
+
+  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
+}
+
+const formatNumber = n => {
+  n = n.toString()
+  return n[1] ? n : '0' + n
+}
+
+module.exports = {
+  formatTime: formatTime
+}