YY 2 years ago
parent
commit
5baa5c2119
72 changed files with 5208 additions and 84 deletions
  1. 70 57
      app.json
  2. 136 0
      pages/basic/index.js
  3. 6 0
      pages/basic/index.json
  4. 40 0
      pages/basic/index.less
  5. 68 0
      pages/basic/index.wxml
  6. 31 0
      pages/basic/index.wxss
  7. 34 19
      pages/home/index.js
  8. 185 0
      pages/indepot/detail.js
  9. 6 0
      pages/indepot/detail.json
  10. 190 0
      pages/indepot/detail.less
  11. 215 0
      pages/indepot/detail.wxml
  12. 155 0
      pages/indepot/detail.wxss
  13. 100 0
      pages/indepot/index.js
  14. 6 0
      pages/indepot/index.json
  15. 144 0
      pages/indepot/index.less
  16. 50 0
      pages/indepot/index.wxml
  17. 118 0
      pages/indepot/index.wxss
  18. 9 0
      pages/index/index.less
  19. 0 2
      pages/index/index.wxml
  20. 1 2
      pages/index/index.wxss
  21. 144 0
      pages/outdepot/detail.js
  22. 6 0
      pages/outdepot/detail.json
  23. 167 0
      pages/outdepot/detail.less
  24. 130 0
      pages/outdepot/detail.wxml
  25. 158 0
      pages/outdepot/detail.wxss
  26. 100 0
      pages/outdepot/index.js
  27. 6 0
      pages/outdepot/index.json
  28. 127 0
      pages/outdepot/index.less
  29. 54 0
      pages/outdepot/index.wxml
  30. 120 0
      pages/outdepot/index.wxss
  31. 152 0
      pages/password/index.js
  32. 6 0
      pages/password/index.json
  33. 38 0
      pages/password/index.less
  34. 20 0
      pages/password/index.wxml
  35. 31 0
      pages/password/index.wxss
  36. 149 0
      pages/stock/detail.js
  37. 6 0
      pages/stock/detail.json
  38. 86 0
      pages/stock/detail.less
  39. 104 0
      pages/stock/detail.wxml
  40. 71 0
      pages/stock/detail.wxss
  41. 108 0
      pages/stock/index.js
  42. 6 0
      pages/stock/index.json
  43. 84 0
      pages/stock/index.less
  44. 64 0
      pages/stock/index.wxml
  45. 75 0
      pages/stock/index.wxss
  46. 108 0
      pages/stock_order/index.js
  47. 6 0
      pages/stock_order/index.json
  48. 155 0
      pages/stock_order/index.less
  49. 70 0
      pages/stock_order/index.wxml
  50. 126 0
      pages/stock_order/index.wxss
  51. 1 1
      pages/test/index.less
  52. 106 0
      pages/type/detail.js
  53. 6 0
      pages/type/detail.json
  54. 42 0
      pages/type/detail.less
  55. 36 0
      pages/type/detail.wxml
  56. 35 0
      pages/type/detail.wxss
  57. 102 0
      pages/type/index.js
  58. 6 0
      pages/type/index.json
  59. 91 0
      pages/type/index.less
  60. 31 0
      pages/type/index.wxml
  61. 75 0
      pages/type/index.wxss
  62. 121 0
      pages/user/detail.js
  63. 6 0
      pages/user/detail.json
  64. 42 0
      pages/user/detail.less
  65. 86 0
      pages/user/detail.wxml
  66. 35 0
      pages/user/detail.wxss
  67. 112 0
      pages/user/index.js
  68. 6 0
      pages/user/index.json
  69. 91 0
      pages/user/index.less
  70. 59 0
      pages/user/index.wxml
  71. 75 0
      pages/user/index.wxss
  72. 3 3
      project.config.json

+ 70 - 57
app.json

@@ -1,60 +1,73 @@
 {
-  "pages": [
-    "pages/index/index",
-    "pages/home/index",
-    "pages/login/index",
-    "pages/login/agreement",
-    "pages/test/index",
-    "pages/logs/logs"
-  ],
-  "usingComponents": {
-    "van-button": "/miniprogram_npm/@vant/weapp/button/index",
-    "van-row": "/miniprogram_npm/@vant/weapp/row/index",
-    "van-col": "/miniprogram_npm/@vant/weapp/col/index",
-    "van-datetime-picker": "/miniprogram_npm/@vant/weapp/datetime-picker/index",
-    "van-picker": "/miniprogram_npm/@vant/weapp/picker/index",
-    "van-popup": "/miniprogram_npm/@vant/weapp/popup/index",
-    "van-radio": "/miniprogram_npm/@vant/weapp/radio/index",
-    "van-radio-group": "/miniprogram_npm/@vant/weapp/radio-group/index",
-    "van-action-sheet": "/miniprogram_npm/@vant/weapp/action-sheet/index",
-    "van-search": "/miniprogram_npm/@vant/weapp/search/index",
-    "van-tree-select": "/miniprogram_npm/@vant/weapp/tree-select/index",
-    "van-overlay": "/miniprogram_npm/@vant/weapp/overlay/index",
-    "van-dialog": "/miniprogram_npm/@vant/weapp/dialog/index",
-    "van-tab": "/miniprogram_npm/@vant/weapp/tab/index",
-    "van-tabs": "/miniprogram_npm/@vant/weapp/tabs/index",
-    "van-stepper": "/miniprogram_npm/@vant/weapp/stepper/index",
-    "van-collapse": "/miniprogram_npm/@vant/weapp/collapse/index",
-    "van-collapse-item": "/miniprogram_npm/@vant/weapp/collapse-item/index",
-    "van-cell": "/miniprogram_npm/@vant/weapp/cell/index",
-    "van-cell-group": "/miniprogram_npm/@vant/weapp/cell-group/index",
-    "van-toast": "/miniprogram_npm/@vant/weapp/toast/index",
-    "van-field": "/miniprogram_npm/@vant/weapp/field/index",
-    "van-checkbox": "/miniprogram_npm/@vant/weapp/checkbox/index",
-    "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index",
-    "van-loading": "/miniprogram_npm/@vant/weapp/loading/index",
-    "van-icon": "/miniprogram_npm/@vant/weapp/icon/index",
-    "van-nav-bar": "/miniprogram_npm/@vant/weapp/nav-bar/index",
-    "van-tabbar": "/miniprogram_npm/@vant/weapp/tabbar/index",
-    "van-tabbar-item": "/miniprogram_npm/@vant/weapp/tabbar-item/index",
-    "van-rate": "/miniprogram_npm/@vant/weapp/rate/index",
-    "van-uploader": "@vant/weapp/uploader/index",
-    "van-divider": "@vant/weapp/divider/index"
-  },
-  "window": {
-    "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "耗材-小程序",
-    "navigationBarTextStyle": "black",
-    "navigationStyle": "custom"
-  },
-  "requiredBackgroundModes": [
-    "location"
-  ],
-  "sitemapLocation": "sitemap.json",
-  "permission": {
-    "scope.userLocation": {
-      "desc": "你的位置信息将用于小程序位置接口的效果展示"
+    "pages": [
+        "pages/index/index",
+        "pages/login/index",
+        "pages/login/agreement",
+        "pages/home/index",
+        "pages/basic/index",
+        "pages/user/index",
+        "pages/user/detail",
+        "pages/type/index",
+        "pages/type/detail",
+        "pages/stock/index",
+        "pages/stock/detail",
+        "pages/stock_order/index",
+        "pages/indepot/index",
+        "pages/indepot/detail",
+        "pages/outdepot/index",
+        "pages/outdepot/detail",
+        "pages/password/index",
+        "pages/test/index",
+        "pages/logs/logs"
+    ],
+    "usingComponents": {
+        "van-button": "/miniprogram_npm/@vant/weapp/button/index",
+        "van-row": "/miniprogram_npm/@vant/weapp/row/index",
+        "van-col": "/miniprogram_npm/@vant/weapp/col/index",
+        "van-datetime-picker": "/miniprogram_npm/@vant/weapp/datetime-picker/index",
+        "van-picker": "/miniprogram_npm/@vant/weapp/picker/index",
+        "van-popup": "/miniprogram_npm/@vant/weapp/popup/index",
+        "van-radio": "/miniprogram_npm/@vant/weapp/radio/index",
+        "van-radio-group": "/miniprogram_npm/@vant/weapp/radio-group/index",
+        "van-action-sheet": "/miniprogram_npm/@vant/weapp/action-sheet/index",
+        "van-search": "/miniprogram_npm/@vant/weapp/search/index",
+        "van-tree-select": "/miniprogram_npm/@vant/weapp/tree-select/index",
+        "van-overlay": "/miniprogram_npm/@vant/weapp/overlay/index",
+        "van-dialog": "/miniprogram_npm/@vant/weapp/dialog/index",
+        "van-tab": "/miniprogram_npm/@vant/weapp/tab/index",
+        "van-tabs": "/miniprogram_npm/@vant/weapp/tabs/index",
+        "van-stepper": "/miniprogram_npm/@vant/weapp/stepper/index",
+        "van-collapse": "/miniprogram_npm/@vant/weapp/collapse/index",
+        "van-collapse-item": "/miniprogram_npm/@vant/weapp/collapse-item/index",
+        "van-cell": "/miniprogram_npm/@vant/weapp/cell/index",
+        "van-cell-group": "/miniprogram_npm/@vant/weapp/cell-group/index",
+        "van-toast": "/miniprogram_npm/@vant/weapp/toast/index",
+        "van-field": "/miniprogram_npm/@vant/weapp/field/index",
+        "van-checkbox": "/miniprogram_npm/@vant/weapp/checkbox/index",
+        "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index",
+        "van-loading": "/miniprogram_npm/@vant/weapp/loading/index",
+        "van-icon": "/miniprogram_npm/@vant/weapp/icon/index",
+        "van-nav-bar": "/miniprogram_npm/@vant/weapp/nav-bar/index",
+        "van-tabbar": "/miniprogram_npm/@vant/weapp/tabbar/index",
+        "van-tabbar-item": "/miniprogram_npm/@vant/weapp/tabbar-item/index",
+        "van-rate": "/miniprogram_npm/@vant/weapp/rate/index",
+        "van-uploader": "@vant/weapp/uploader/index",
+        "van-divider": "@vant/weapp/divider/index"
+    },
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "耗材-小程序",
+        "navigationBarTextStyle": "black",
+        "navigationStyle": "custom"
+    },
+    "requiredBackgroundModes": [
+        "location"
+    ],
+    "sitemapLocation": "sitemap.json",
+    "permission": {
+        "scope.userLocation": {
+            "desc": "你的位置信息将用于小程序位置接口的效果展示"
+        }
     }
-  }
 }

+ 136 - 0
pages/basic/index.js

@@ -0,0 +1,136 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '基本信息', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        form: {}
+    },
+    initValidate() {
+        const rules = { name: { required: true, }, phone: { required: true, tel: true }, email: { required: true, }, address: { required: true, }, dept: { required: true, }, zw: { required: true, }, company: { required: true, } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { name: { required: '请输入姓名', }, phone: { required: '请输入电话', }, email: { required: '请输入电子邮箱', }, address: { required: '请输入联系地址', }, dept: { required: '请输入部门', }, zw: { required: '请输入职务', }, company: { required: '请输入工作单位', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 取消修改
+    onReset: function () {
+        this.back()
+    },
+    // 提交修改
+    onSubmit: function (e) {
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            console.log(params);
+            // wx.request({
+            //     url: app.globalData.publicUrl + `/api/hc/user/update/${this.data.form.id}`,
+            //     method: "post",
+            //     data: { ...params },
+            //     header: {},
+            //     success: (res) => {
+            //         if (res.data.errcode == '0') {
+            //             wx.showToast({ title: `信息修改完成`, icon: 'success', duration: 2000 })
+            //             wx.setStorage({ key: "user", data: res.data.data });
+            //             app.globalData.userInfo = res.data.data;
+            //             wx.navigateTo({ url: '/pages/home/index' })
+            //         } else {
+            //             wx.showToast({ title: `${res.data.errmsg}`, icon: 'error', duration: 2000 })
+            //         }
+            //     },
+            // })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        //验证规则函数
+        this.initValidate();
+        // 监听用户是否登录
+        this.watchLogin();
+        // 计算高度
+        this.searchHeight()
+    },
+    // 监听用户是否登录
+    watchLogin: function () {
+        wx.getStorage({
+            key: 'user',
+            success: res => {
+                console.log(res);
+            }
+        })
+
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/basic/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 40 - 0
pages/basic/index.less

@@ -0,0 +1,40 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        position: relative;
+        padding: 10px;
+
+        .content {
+            position: relative;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+
+                .icon {
+                    color: #000000;
+                }
+            }
+
+            .right {
+                input {
+                    color: #000000;
+                }
+            }
+        }
+
+        .save {
+            text-align: center;
+
+            button {
+                margin: 10px;
+            }
+        }
+    }
+}

+ 68 - 0
pages/basic/index.wxml

@@ -0,0 +1,68 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <form bindsubmit="onSubmit" catchreset="onReset">
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-xingming1"></text>
+                    </view>
+                    <view class="right">
+                        <input name="name" value="{{form.name}}" placeholder='请输入姓名' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-dianhua"></text>
+                    </view>
+                    <view class="right">
+                        <input name="phone" type="number" maxlength="11" value="{{form.phone}}" placeholder='请输入电话' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-dianziyouxiang1"></text>
+                    </view>
+                    <view class="right">
+                        <input name="email" value="{{form.email}}" placeholder='请输入电子邮箱' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-dizhi"></text>
+                    </view>
+                    <view class="right">
+                        <input name="address" value="{{form.address}}" placeholder='请输入联系地址' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-bumen"></text>
+                    </view>
+                    <view class="right">
+                        <input name="dept" value="{{form.dept}}" placeholder='请输入部门' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-zhiwu"></text>
+                    </view>
+                    <view class="right">
+                        <input name="zw" value="{{form.zw}}" placeholder='请输入职务' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="left">
+                        <text class="icon iconfont icon-commpany"></text>
+                    </view>
+                    <view class="right">
+                        <input name="company" value="{{form.company}}" placeholder='请输入工作单位' placeholder-class="placeholder"></input>
+                    </view>
+                </view>
+                <view class="save">
+                    <button type="warn" size="mini" formType="reset">取消修改</button>
+                    <button type="primary" size="mini" formType="submit">提交修改</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 31 - 0
pages/basic/index.wxss

@@ -0,0 +1,31 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  position: relative;
+  padding: 10px;
+}
+.main .one .content {
+  position: relative;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}

+ 34 - 19
pages/home/index.js

@@ -18,33 +18,44 @@ Page({
   // 获取头像
   onChooseAvatar(e) {
     const { avatarUrl } = e.detail;
+    console.log(avatarUrl);
     this.setData({ avatarUrl })
   },
   // 跳转页面
   toPath: function (e) {
     const { data } = e.currentTarget.dataset;
+    // 绑定微信
     if (data.is_routine && data.is_routine == '1') {
-      wx.getStorage({
-        key: 'user',
-        success: res => {
-          if (res.data) {
-            const { openid } = app.globalData.wxInfo;
-            wx.request({
-              url: app.globalData.publicUrl + `/api/hc/user/update/${res.data.id}`,
-              method: "post",
-              data: { openid: openid },
-              header: {},
-              success: (res) => {
-                if (res.data.errcode == '0') {
-                  wx.showToast({ title: `绑定微信成功`, icon: 'success', duration: 2000 })
-                } else {
-                  wx.showToast({ title: `${res.data.errmsg}`, icon: 'error', duration: 2000 })
-                }
-              },
-            })
+      wx.showModal({
+        content: '您确定使用此微信绑定当前登录账号吗?',
+        title: '绑定微信',
+        success: (res) => {
+          if (res.confirm) {
+            wx.showToast({ title: `绑定微信成功`, icon: 'success', duration: 2000 })
           }
-        }
+        },
       })
+      // wx.getStorage({
+      //   key: 'user',
+      //   success: res => {
+      //     if (res.data) {
+      //       const { openid } = app.globalData.wxInfo;
+      //       wx.request({
+      //         url: app.globalData.publicUrl + `/api/hc/user/update/${res.data.id}`,
+      //         method: "post",
+      //         data: { openid: openid },
+      //         header: {},
+      //         success: (res) => {
+      //           if (res.data.errcode == '0') {
+      //             wx.showToast({ title: `绑定微信成功`, icon: 'success', duration: 2000 })
+      //           } else {
+      //             wx.showToast({ title: `${res.data.errmsg}`, icon: 'error', duration: 2000 })
+      //           }
+      //         },
+      //       })
+      //     }
+      //   }
+      // })
     } else if (data.is_routine && data.is_routine == '2') {
       wx.clearStorage({
         key: 'user',
@@ -68,7 +79,11 @@ Page({
   },
   // 监听用户是否登录
   watchLogin: function () {
+<<<<<<< HEAD
     let data = { type: '6' }
+=======
+    let data = { type: '4' }
+>>>>>>> 4a6b6903e6a3f0c706217a15a1196d73c0af8335
     this.searchRouter(data);
     // wx.getStorage({
     // key: 'user',

+ 185 - 0
pages/indepot/detail.js

@@ -0,0 +1,185 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate';
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        form: {},
+        // 弹框
+        dialog: { title: '添加商品', show: false, type: '1' },
+        // 入库商品
+        order: [{ name: '8', num: '111' }],
+        // 库存已存
+        oneorderForm: {},
+        // 查询库存
+        shoppinginput: '',
+        // 库存未存
+        twoorderForm: {},
+        img_url: [],
+        typeList: [],
+        stock_type: '',
+        stock_typeList: [
+            { value: '1', label: '固定资产' },
+            { value: '2', label: '商品' },
+        ]
+    },
+    initValidate() {
+        const rules = { register_name: { required: true, }, register_phone: { required: true, }, register_date: { required: true, }, reason: { required: true, } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { register_name: { required: '请输入登记人', }, register_phone: { required: '请输入电话', }, register_date: { required: '请选择登记时间', }, reason: { required: '请输入入库原因', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/indepot/index' })
+    },
+    // 选择登记时间
+    registerdateChange: function (e) {
+        let { value } = e.detail;
+        this.setData({ 'form.register_date': value })
+    },
+    // 添加商品
+    addOrder: function (e) {
+        const { type } = e.currentTarget.dataset;
+        this.setData({ dialog: { title: '添加商品', show: true, type: type } })
+    },
+    // 已有库存
+    // 取消保存
+    oneorderReset: function () {
+        this.setData({ dialog: { title: '添加商品', show: false, type: '1' } })
+    },
+    // 查询
+    shoppinginput: function (e) {
+        this.setData({ shoopingtext: e.detail.value })
+    },
+    // 查询库存
+    searchStock: function () {
+        console.log('查询库存');
+    },
+    // 确认选择商品
+    stockChange: function (e) {
+        const { item } = e.currentTarget.dataset;
+        this.setData({ 'oneorderForm.stock_market_id': item.id })
+        this.setData({ 'oneorderForm.name': item.name })
+    },
+    // 提交保存
+    oneorderSubmit: function (e) {
+        console.log(e.detail.value);
+    },
+    // 库存无商品
+    twoorderReset: function () {
+        this.setData({ dialog: { title: '添加商品', show: false, type: '2' } })
+    },
+    // 类别选择
+    stocktypeChange: function (e) {
+        let { value } = e.detail;
+        let data = this.data.stock_typeList[value];
+        this.setData({ 'stock_type': data.value })
+        this.setData({ 'twoorderForm.stock_type': data.value })
+        this.setData({ 'twoorderForm.stock_type_name': data.label })
+    },
+    // 选择商品类型
+    typeChange: function (e) {
+        let { value } = e.detail;
+        let data = this.data.typeList[value];
+        this.setData({ 'twoorderForm.type_id': data.id })
+        this.setData({ 'twoorderForm.type_name': data.name })
+    },
+    // 上传图片
+    afterRead: function (event) {
+        console.log(event.detail);
+    },
+    // 删除图片
+    uploadDelete: function (e) {
+        console.log(e.detail);
+    },
+    twoorderSubmit: function (e) {
+        console.log(e.detail);
+    },
+    // 取消保存
+    onReset: function (e) {
+        this.back()
+    },
+    // 提交保存
+    onSubmit: function (e) {
+        console.log(e.detail.value);
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        // 查询其他信息
+        this.searchOther();
+        //验证规则函数
+        this.initValidate()
+        // 计算高度
+        this.searchHeight()
+    },
+    // 查询其他信息
+    searchOther: function () {
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        // 减去状态栏
+        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/indepot/detail.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 190 - 0
pages/indepot/detail.less

@@ -0,0 +1,190 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .content {
+            float: left;
+            width: 100%;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+            }
+
+            .left .icon {
+                color: #000000;
+            }
+
+            .right input {
+                color: #000000;
+            }
+        }
+
+        .save {
+            float: left;
+            width: 100%;
+            text-align: center;
+        }
+
+        .save button {
+            margin: 10px;
+        }
+
+        .order {
+            float: left;
+            width: 95%;
+            padding: 10px;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .order_1 {
+                text-align: center;
+            }
+            .order_1 button {
+                margin: 0 5px;
+            }
+
+            .order_2 {
+                float: left;
+                width: 100%;
+                .list {
+                    margin: 0 0 8px 0;
+                    background-color: #f9f9f9;
+                    border-radius: 5px;
+                    padding: 8px 0;
+
+                    .name {
+                        font-size: 16px;
+                        margin: 0 0 5px 0;
+                        padding: 0 10px;
+                    }
+
+                    .other {
+                        .otherInfo {
+                            margin: 0 0 5px 0;
+                            font-size: 14px;
+                            color: #666666;
+                            padding: 0 10px;
+                        }
+
+                        .otherInfo text {
+                            color: #000000;
+                        }
+                    }
+
+                }
+            }
+        }
+    }
+}
+
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+
+    .dialog_1 {
+        .content {
+            float: left;
+            width: 100%;
+            padding: 8px 0;
+            border-radius: 6px;
+            margin: 0 0 5px 0;
+            background-color: #f1f1f1;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+            }
+
+            .left text {
+                font-size: 14px;
+                color: #666666;
+            }
+
+            .right input {
+                font-size: 12px;
+            }
+        }
+
+        .save {
+            float: left;
+            width: 100%;
+            text-align: center;
+        }
+
+        .save button {
+            margin: 10px;
+        }
+
+        .search_1 {
+            float: left;
+            width: 100%;
+            height: 40px;
+            overflow: hidden;
+            border-bottom: 1px dashed #000000;
+        }
+
+        .search_1 input {
+            float: left;
+            width: 80%;
+            padding: 2px 5px;
+            margin: 5px 0;
+            border-radius: 5px;
+            border: 1px solid #cccccc;
+            background-color: #ffffff;
+        }
+
+        .search_1 text {
+            float: left;
+            width: 14%;
+            margin-top: 2%;
+            padding-left: 6px;
+            font-size: 17px;
+        }
+
+        .search_2 {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+
+            .search_2list {
+                margin: 8px 0 0 0;
+                border-radius: 6px;
+                box-shadow: 0 0 5px #cccccc;
+
+                .name {
+                    padding: 0 5px;
+                }
+
+                .name text {
+                    width: 67%;
+                    float: left;
+                    padding: 9px 0;
+                    font-size: 14px;
+                }
+
+                .name button {
+                    margin: 5px 0 0 10px;
+                }
+
+            }
+        }
+    }
+
+}
+.van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 215 - 0
pages/indepot/detail.wxml

@@ -0,0 +1,215 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="operate_id" value="{{form.operate_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="operate_name" value="{{form.operate_name}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="register_name" value="{{form.register_name}}" placeholder='请输入登记人' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-dianhua"></text>
+          </view>
+          <view class="right">
+            <input name="register_phone" value="{{form.register_phone}}" placeholder='请输入登记人电话' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="register_date" bindchange="registerdateChange" value="{{form.register_date}}">
+              <view>{{form.register_date||'请选择登记时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-icon"></text>
+          </view>
+          <view class="right">
+            <input name="reason" value="{{form.reason}}" placeholder='请输入入库原因' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="order">
+          <view class="order_1">
+            <button type="primary" size="mini" bindtap="addOrder" data-type="1">添加商品(库存有)</button>
+            <button type="primary" size="mini" bindtap="addOrder" data-type="2">添加商品(库存无)</button>
+          </view>
+          <view class="order_2">
+            <view class="list" wx:key="item" wx:for="{{order}}">
+              <view class="name">{{item.name}}</view>
+              <view class="other">
+                <view class="otherInfo">商品数量:<text>{{item.num||'暂无' }}</text></view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" show-confirm-button="{{false}}">
+  <view class="dialog">
+    <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+      <form bindsubmit="oneorderSubmit" catchreset="oneorderReset">
+        <view class="search">
+          <view class="search_1">
+            <input value="{{shoopingtext}}" bindinput="shoppinginput" placeholder="请输入库存商品全称"></input>
+            <text bindtap="searchStock">搜索</text>
+          </view>
+          <view class="search_2">
+            <view class="search_2list" wx:key="item" wx:for="{{stockList}}">
+              <view class="name"><text class="textOver">{{item.name}}</text><button type="primary" size="mini" bindtap="stockChange" data-item="{{item}}">确认选择</button></view>
+            </view>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="stock_market_id" value="{{oneorderForm.stock_market_id}}" placeholder='请输入商品id' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{oneorderForm.name}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shuliang"></text>
+          </view>
+          <view class="right">
+            <input name="num" value="{{oneorderForm.num}}" type="number" placeholder='请输入商品数量' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+    <view wx:if="{{dialog.type=='2'}}" class="dialog_1">
+      <form bindsubmit="twoorderSubmit" catchreset="twoorderReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <input name="stock_type" value="{{twoorderForm.stock_type}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="stocktypeChange" name="stock_type_name" value="{{twoorderForm.stock_type_name}}" range="{{stock_typeList}}" range-key="label">
+              <view>{{twoorderForm.stock_type_name||'选择商品类别'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content" wx:if="{{stock_type=='1'}}">
+          <view class="left">
+            <text class="icon iconfont icon-bianhao"></text>
+          </view>
+          <view class="right">
+            <input name="code" value="{{twoorderForm.code}}" placeholder='请输入资产编号' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <input name="type_id" value="{{twoorderForm.type_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="typeChange" name="type_name" value="{{twoorderForm.type_name}}" range="{{typeList}}" range-key="name">
+              <view>{{twoorderForm.type_name||'选择商品类型'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{twoorderForm.name}}" placeholder='请输入商品名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shuliang"></text>
+          </view>
+          <view class="right">
+            <input name="num" value="{{twoorderForm.num}}" type="number" placeholder='请输入商品数量' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-jiage"></text>
+          </view>
+          <view class="right">
+            <input name="money" value="{{twoorderForm.money}}" type="number" placeholder='请输入商品单价' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-jianjie"></text>
+          </view>
+          <view class="right">
+            <input name="brief" value="{{twoorderForm.brief}}" placeholder='请输入商品简介' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-tupian"></text>
+          </view>
+          <view class="right">
+            <van-uploader file-list="{{ img_url }}" bind:after-read="afterRead" bind:delete="uploadDelete" />
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</van-dialog>

+ 155 - 0
pages/indepot/detail.wxss

@@ -0,0 +1,155 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .one .content {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}
+.main .one .order {
+  float: left;
+  width: 95%;
+  padding: 10px;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .order .order_1 {
+  text-align: center;
+}
+.main .one .order .order_1 button {
+  margin: 0 5px;
+}
+.main .one .order .order_2 {
+  float: left;
+  width: 100%;
+}
+.main .one .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .one .order .order_2 .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .dialog_1 .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .dialog_1 .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.dialog .dialog_1 .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .dialog_1 .content .right input {
+  font-size: 12px;
+}
+.dialog .dialog_1 .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.dialog .dialog_1 .save button {
+  margin: 10px;
+}
+.dialog .dialog_1 .search_1 {
+  float: left;
+  width: 100%;
+  height: 40px;
+  overflow: hidden;
+  border-bottom: 1px dashed #000000;
+}
+.dialog .dialog_1 .search_1 input {
+  float: left;
+  width: 80%;
+  padding: 2px 5px;
+  margin: 5px 0;
+  border-radius: 5px;
+  border: 1px solid #cccccc;
+  background-color: #ffffff;
+}
+.dialog .dialog_1 .search_1 text {
+  float: left;
+  width: 14%;
+  margin-top: 2%;
+  padding-left: 6px;
+  font-size: 17px;
+}
+.dialog .dialog_1 .search_2 {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+}
+.dialog .dialog_1 .search_2 .search_2list {
+  margin: 8px 0 0 0;
+  border-radius: 6px;
+  box-shadow: 0 0 5px #cccccc;
+}
+.dialog .dialog_1 .search_2 .search_2list .name {
+  padding: 0 5px;
+}
+.dialog .dialog_1 .search_2 .search_2list .name text {
+  width: 67%;
+  float: left;
+  padding: 9px 0;
+  font-size: 14px;
+}
+.dialog .dialog_1 .search_2 .search_2list .name button {
+  margin: 5px 0 0 10px;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 100 - 0
pages/indepot/index.js

@@ -0,0 +1,100 @@
+// pages/login/login.js
+const app = getApp();
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '入库管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        // 采购申请
+        list: [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        // 详细信息
+        info: { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] },
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 添加入库
+    toAdd: function () {
+        wx.navigateTo({ url: `/pages/indepot/detail` })
+    },
+    // 详细信息
+    toView: function (e) {
+        this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.search();
+        // 计算高度
+        this.searchHeight();
+    },
+    search: function () {
+        console.log("查询");
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        // 减去状态栏
+        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        this.search();
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/indepot/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 144 - 0
pages/indepot/index.less

@@ -0,0 +1,144 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1px dashed #000000;
+    }
+
+    .one button {
+        margin: 10px;
+    }
+
+    .two {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+            }
+
+            .other {
+                .otherInfo {
+                    margin: 0 0 5px 0;
+                    font-size: 14px;
+                    color: #666666;
+                    padding: 0 10px;
+                }
+
+                .otherInfo text {
+                    color: #000000;
+                }
+            }
+
+            .btn {
+                text-align: center;
+            }
+
+            .btn button {
+                margin: 0 5px;
+            }
+        }
+    }
+}
+
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+
+    .content {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+    }
+
+    .left {
+        float: left;
+        margin: 0 0 0 10px;
+    }
+
+    .left text {
+        font-size: 14px;
+        color: #666666;
+    }
+
+    .right input {
+        font-size: 12px;
+    }
+
+    .order {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+
+        .order_1 {
+            float: left;
+            width: 95%;
+            margin: 0 10px;
+        }
+
+        .order_1 text {
+            font-size: 14px;
+            color: #666666;
+        }
+
+        .order_2 {
+            float: left;
+            width: 99%;
+            padding: 0 5px;
+            margin: 5px 0 0 0;
+
+            .list {
+                margin: 0 0 8px 0;
+                background-color: #f9f9f9;
+                border-radius: 5px;
+                padding: 8px 0;
+
+                .name {
+                    font-size: 16px;
+                    margin: 0 0 5px 0;
+                    padding: 0 0 0 10px;
+                }
+
+                .other {
+                    .otherInfo {
+                        margin: 0 0 5px 0;
+                        font-size: 14px;
+                        color: #666666;
+                        padding: 0 10px;
+                    }
+                    .otherInfo text {
+                        color: #000000;
+                      }
+                }
+            }
+        }
+    }
+}
+.van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }
+  

+ 50 - 0
pages/indepot/index.wxml

@@ -0,0 +1,50 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <button type="primary" size="mini" bindtap="toAdd">添加入库</button>
+        </view>
+        <view class="two">
+            <view class="list" wx:key="item" wx:for="{{list}}">
+                <view class="name">{{item.register_name}}</view>
+                <view class="other">
+                    <view class="otherInfo">登记人电话:<text>{{item.register_phone||'暂无' }}</text></view>
+                    <view class="otherInfo textOver">登记时间:<text>{{item.register_date||'暂无' }}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+    <view class="dialog">
+        <view class="content">
+            <view class="left"><text>登记人:</text></view>
+            <view class="right"><input name="register_name" value="{{info.register_name}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>登记人电话:</text></view>
+            <view class="right"><input name="register_phone" value="{{info.register_phone}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>登记时间:</text></view>
+            <view class="right"><input name="register_date" value="{{info.register_date}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>入库原因:</text></view>
+            <view class="right"><input name="reason" value="{{info.reason}}" disabled></input></view>
+        </view>
+        <view class="order">
+            <view class="order_1"><text>商品列表:</text></view>
+            <view class="order_2">
+                <view class="list" wx:key="item" wx:for="{{info.order}}">
+                    <view class="name">{{item.name}}</view>
+                    <view class="other">
+                        <view class="otherInfo">商品数量:<text>{{item.num||'暂无' }}</text></view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</van-dialog>

+ 118 - 0
pages/indepot/index.wxss

@@ -0,0 +1,118 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+.main .one button {
+  margin: 10px;
+}
+.main .two {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .left {
+  float: left;
+  margin: 0 0 0 10px;
+}
+.dialog .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .right input {
+  font-size: 12px;
+}
+.dialog .order {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .order .order_1 {
+  float: left;
+  width: 95%;
+  margin: 0 10px;
+}
+.dialog .order .order_1 text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .order .order_2 {
+  float: left;
+  width: 99%;
+  padding: 0 5px;
+  margin: 5px 0 0 0;
+}
+.dialog .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.dialog .order .order_2 .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 0 0 10px;
+}
+.dialog .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.dialog .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 9 - 0
pages/index/index.less

@@ -0,0 +1,9 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        text-align: center;
+        padding: 10px 0;
+    }
+}

+ 0 - 2
pages/index/index.wxml

@@ -1,10 +1,8 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view class="one">
-      <view>11111</view>
       <button type="primary" size="mini" bindtap="toLogin" data-type="home">系统首页</button>
       <button type="primary" size="mini" bindtap="toLogin" data-type="login">系统登录</button>
-      1
     </view>
   </view>
 </mobile-main>

+ 1 - 2
pages/index/index.wxss

@@ -2,8 +2,7 @@
   position: relative;
   width: 100%;
 }
-
 .main .one {
   text-align: center;
   padding: 10px 0;
-}
+}

+ 144 - 0
pages/outdepot/detail.js

@@ -0,0 +1,144 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate';
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    // 弹框
+    dialog: { title: '添加商品', show: false, type: '1' },
+    // 入库商品
+    order: [],
+    // 库存已存
+    oneorderForm: {},
+    // 查询库存
+    shoppinginput: '',
+    stockList: [{ name: '1111' }],
+    //查询
+    shoopingtext: '',
+  },
+  initValidate() {
+    const rules = { register_name: { required: true, }, register_phone: { required: true, }, register_date: { required: true, }, reason: { required: true, } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { register_name: { required: '请输入登记人', }, register_phone: { required: '请输入电话', }, register_date: { required: '请选择登记时间', }, reason: { required: '请输入入库原因', } };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/indepot/index' })
+  },
+  // 选择登记时间
+  registerdateChange: function (e) {
+    let { value } = e.detail;
+    this.setData({ 'form.register_date': value })
+  },
+  // 添加商品
+  addOrder: function () {
+    this.setData({ dialog: { title: '添加商品', show: true, type: '1' } })
+  },
+  // 已有库存
+  // 取消保存
+  oneorderReset: function () {
+    this.setData({ dialog: { title: '添加商品', show: false, type: '1' } })
+  },
+  // 查询
+  shoppinginput: function (e) {
+    this.setData({ shoopingtext: e.detail.value })
+  },
+  // 查询库存
+  searchStock: function () {
+    wx.showToast({ title: `查询库存`, icon: 'error', duration: 2000 })
+  },
+  // 确认选择商品
+  stockChange: function (e) {
+    const { item } = e.currentTarget.dataset;
+    this.setData({ 'oneorderForm.stock_market_id': item.id })
+    this.setData({ 'oneorderForm.name': item.name })
+    this.setData({ 'oneorderForm.stockNum': item.num })
+  },
+  // 提交保存
+  oneorderSubmit: function (e) {
+    console.log(e.detail.value);
+  },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    console.log(e.detail.value);
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/outdepot/detail.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 167 - 0
pages/outdepot/detail.less

@@ -0,0 +1,167 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 95%;
+        padding: 10px;
+        .content {
+            float: left;
+            width: 100%;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+            .left {
+                float: left;
+                margin: 0 10px;
+              }
+              .left .icon {
+                color: #000000;
+              }
+              .right input {
+                color: #000000;
+              }
+          }
+          .save {
+            float: left;
+            width: 100%;
+            text-align: center;
+          }
+          .save button {
+            margin: 10px;
+          }
+          .order {
+            float: left;
+            width: 95%;
+            padding: 10px;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+            .order_1 {
+                float: left;
+                width: 100%;
+                text-align: center;
+              }
+              .order_1 button {
+                margin: 0 5px;
+              }
+              .order_2 {
+                float: left;
+                width: 100%;
+                .list {
+                    margin: 0 0 8px 0;
+                    background-color: #f9f9f9;
+                    border-radius: 5px;
+                    padding: 8px 0;
+                    .name {
+                        font-size: 16px;
+                        margin: 0 0 5px 0;
+                        padding: 0 10px;
+                      }
+                      .other {
+                        .otherInfo {
+                            margin: 0 0 5px 0;
+                            font-size: 14px;
+                            color: #666666;
+                            padding: 0 10px;
+                          }
+                          .otherInfo text {
+                            color: #000000;
+                          }
+                      }
+                  }
+              }
+              
+          }
+    }
+}
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+  }
+  .dialog_1 {
+    .content {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+        .left {
+            float: left;
+            margin: 0 10px;
+          }
+          .left text {
+            font-size: 14px;
+            color: #666666;
+          }
+          .right input {
+            font-size: 12px;
+          }
+          
+      }
+      .save {
+        float: left;
+        width: 100%;
+        text-align: center;
+      }
+      .save button {
+        margin: 10px;
+      }
+      .search_1 {
+        float: left;
+        width: 95%;
+        padding: 0 8px;
+        height: 40px;
+        overflow: hidden;
+        border-bottom: 1px dashed #000000;
+      }
+      .search_1 input {
+        float: left;
+        width: 80%;
+        padding: 2px 5px;
+        margin: 5px 0;
+        border-radius: 5px;
+        border: 1px solid #cccccc;
+        background-color: #ffffff;
+    }
+
+    .search_1 text {
+        float: left;
+        width: 13%;
+        margin-top: 2.3%;
+        padding-left: 8px;
+        font-size: 17px;
+    }
+      .search_2 {
+        float: left;
+        width: 100%;
+        margin: 0 0 8px 0;
+        .search_2list {
+            margin: 8px 0 0 0;
+            border-radius: 6px;
+            box-shadow: 0 0 5px #cccccc;
+            .name {
+                padding: 0 5px;
+              }
+              .name text {
+                width: 67%;
+                float: left;
+                padding: 9px 0;
+                font-size: 14px;
+              }
+              .name button {
+                margin: 5px 0 0 10px;
+              }
+              
+      }
+  }
+}
+.van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 130 - 0
pages/outdepot/detail.wxml

@@ -0,0 +1,130 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="operate_id" value="{{form.operate_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="operate_name" value="{{form.operate_name}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="register_name" value="{{form.register_name}}" placeholder='请输入登记人' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-dianhua"></text>
+          </view>
+          <view class="right">
+            <input name="register_phone" value="{{form.register_phone}}" placeholder='请输入登记人电话' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="register_date" bindchange="registerdateChange" value="{{form.register_date}}">
+              <view>{{form.register_date||'请选择登记时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-icon"></text>
+          </view>
+          <view class="right">
+            <input name="reason" value="{{form.reason}}" placeholder='请输入出库原因' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="order">
+          <view class="order_1">
+            <button type="primary" size="mini" bindtap="addOrder">添加商品</button>
+          </view>
+          <view class="order_2">
+            <view class="list" wx:key="item" wx:for="{{order}}">
+              <view class="name">{{item.name}}</view>
+              <view class="other">
+                <view class="otherInfo">商品数量:<text>{{item.num||'暂无' }}</text></view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" show-confirm-button="{{false}}">
+  <view class="dialog">
+    <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+      <form bindsubmit="oneorderSubmit" catchreset="oneorderReset">
+        <view class="search">
+          <view class="search_1">
+            <input value="{{shoopingtext}}" bindinput="shoppinginput" placeholder="请输入库存商品全称"></input>
+            <text bindtap="searchStock">搜索</text>
+          </view>
+          <view class="search_2">
+            <view class="search_2list" wx:key="item" wx:for="{{stockList}}">
+              <view class="name"><text class="textOver">{{item.name}}</text><button type="primary" size="mini" bindtap="stockChange" data-item="{{item}}">确认选择</button></view>
+            </view>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="stock_market_id" value="{{oneorderForm.stock_market_id}}" placeholder='请输入商品id' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{oneorderForm.name}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shuliang"></text>
+          </view>
+          <view class="right">
+            <input name="stockNum" value="{{oneorderForm.stockNum}}" disabled placeholder='商品库存数量'></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shuliang"></text>
+          </view>
+          <view class="right">
+            <input name="num" value="{{oneorderForm.num}}" type="number" maxlength="{{oneorderForm.stockNum}}" placeholder='请输入商品数量' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</van-dialog>

+ 158 - 0
pages/outdepot/detail.wxss

@@ -0,0 +1,158 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .one .content {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}
+.main .one .order {
+  float: left;
+  width: 95%;
+  padding: 10px;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .order .order_1 {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .order .order_1 button {
+  margin: 0 5px;
+}
+.main .one .order .order_2 {
+  float: left;
+  width: 100%;
+}
+.main .one .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .one .order .order_2 .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog_1 .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog_1 .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.dialog_1 .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog_1 .content .right input {
+  font-size: 12px;
+}
+.dialog_1 .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.dialog_1 .save button {
+  margin: 10px;
+}
+.dialog_1 .search_1 {
+  float: left;
+  width: 95%;
+  padding: 0 8px;
+  height: 40px;
+  overflow: hidden;
+  border-bottom: 1px dashed #000000;
+}
+.dialog_1 .search_1 input {
+  float: left;
+  width: 80%;
+  padding: 2px 5px;
+  margin: 5px 0;
+  border-radius: 5px;
+  border: 1px solid #cccccc;
+  background-color: #ffffff;
+}
+.dialog_1 .search_1 text {
+  float: left;
+  width: 13%;
+  margin-top: 2.3%;
+  padding-left: 8px;
+  font-size: 17px;
+}
+.dialog_1 .search_2 {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+}
+.dialog_1 .search_2 .search_2list {
+  margin: 8px 0 0 0;
+  border-radius: 6px;
+  box-shadow: 0 0 5px #cccccc;
+}
+.dialog_1 .search_2 .search_2list .name {
+  padding: 0 5px;
+}
+.dialog_1 .search_2 .search_2list .name text {
+  width: 67%;
+  float: left;
+  padding: 9px 0;
+  font-size: 14px;
+}
+.dialog_1 .search_2 .search_2list .name button {
+  margin: 5px 0 0 10px;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 100 - 0
pages/outdepot/index.js

@@ -0,0 +1,100 @@
+// pages/login/login.js
+const app = getApp();
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '出库管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        // 采购申请
+        list: [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        // 详细信息
+        info: { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] },
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 添加出库
+    toAdd: function () {
+        wx.navigateTo({ url: `/pages/outdepot/detail` })
+    },
+    // 详细信息
+    toView: function (e) {
+        this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.search();
+        // 计算高度
+        this.searchHeight();
+    },
+    search: function () {
+        console.log("查询");
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        // 减去状态栏
+        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        this.search();
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/outdepot/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 127 - 0
pages/outdepot/index.less

@@ -0,0 +1,127 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1px dashed #000000;
+    }
+    .one button {
+        margin: 10px;
+      }
+      .two {
+        float: left;
+        width: 95%;
+        padding: 10px;
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+              }
+              .other {
+                .otherInfo {
+                    margin: 0 0 5px 0;
+                    font-size: 14px;
+                    color: #666666;
+                    padding: 0 10px;
+                  }
+                  .otherInfo text {
+                    color: #000000;
+                  }
+              }
+              .btn {
+                text-align: center;
+              }
+              .btn button {
+                margin: 0 5px;
+              }
+          }
+      }
+}
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+    .dialog_1 {
+        .content {
+            float: left;
+            width: 100%;
+            padding: 8px 0;
+            border-radius: 6px;
+            margin: 0 0 5px 0;
+            background-color: #f1f1f1;
+            .left {
+                float: left;
+                margin: 0 0 0 10px;
+              }
+              .left text {
+                font-size: 14px;
+                color: #666666;
+              }
+              .right input {
+                font-size: 12px;
+              }
+          }
+          .order {
+            float: left;
+            width: 100%;
+            padding: 8px 0;
+            border-radius: 6px;
+            margin: 0 0 5px 0;
+            background-color: #f1f1f1;
+            .order_1 {
+                float: left;
+                width: 95%;
+                margin: 0 10px;
+              }
+              .order_1 text {
+                font-size: 14px;
+                color: #666666;
+              }
+              .order_2 {
+                float: left;
+                width: 95%;
+                padding: 0 5px;
+                margin: 5px 0 0 0;
+                .list {
+                    margin: 0 0 8px 0;
+                    background-color: #f9f9f9;
+                    border-radius: 5px;
+                    padding: 8px 0;
+                    .name {
+                        float: left;
+                        width: 100%;
+                        font-size: 16px;
+                        margin: 0 0 5px 0;
+                        padding: 0 0 0 10px;
+                      }
+                      .other {
+                        .otherInfo {
+                            margin: 0 0 5px 0;
+                            font-size: 14px;
+                            color: #666666;
+                            padding: 0 10px;
+                          }
+                          .otherInfo text {
+                            color: #000000;
+                          }
+                      }
+                  }
+              }
+          }
+    }
+  }
+  .van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 54 - 0
pages/outdepot/index.wxml

@@ -0,0 +1,54 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <button type="primary" size="mini" bindtap="toAdd">添加出库</button>
+    </view>
+    <view class="two">
+      <view class="list" wx:key="item" wx:for="{{list}}">
+        <view class="name">{{item.register_name}}</view>
+        <view class="other">
+          <view class="otherInfo">登记人电话:<text>{{item.register_phone||'暂无' }}</text></view>
+          <view class="otherInfo textOver">登记时间:<text>{{item.register_date||'暂无' }}</text></view>
+        </view>
+        <view class="btn">
+          <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+        </view>
+      </view>
+    </view>
+  </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+  <view class="dialog">
+    <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+      <form>
+        <view class="content">
+          <view class="left"><text>登记人:</text></view>
+          <view class="right"><input name="user_name" value="{{info.register_name}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>登记人电话:</text></view>
+          <view class="right"><input name="register_phone" value="{{info.register_phone}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>登记时间:</text></view>
+          <view class="right"><input name="register_date" value="{{info.register_date}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>出库原因:</text></view>
+          <view class="right"><input name="reason" value="{{info.reason}}" disabled></input></view>
+        </view>
+        <view class="order">
+          <view class="order_1"><text>商品列表:</text></view>
+          <view class="order_2">
+            <view class="list" wx:key="item" wx:for="{{info.order}}">
+              <view class="name">{{item.name}}</view>
+              <view class="other">
+                <view class="otherInfo">商品数量:<text>{{item.num||'暂无' }}</text></view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </form>
+    </view>
+  </view>
+</van-dialog>

+ 120 - 0
pages/outdepot/index.wxss

@@ -0,0 +1,120 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+.main .one button {
+  margin: 10px;
+}
+.main .two {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .dialog_1 .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .dialog_1 .content .left {
+  float: left;
+  margin: 0 0 0 10px;
+}
+.dialog .dialog_1 .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .dialog_1 .content .right input {
+  font-size: 12px;
+}
+.dialog .dialog_1 .order {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .dialog_1 .order .order_1 {
+  float: left;
+  width: 95%;
+  margin: 0 10px;
+}
+.dialog .dialog_1 .order .order_1 text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .dialog_1 .order .order_2 {
+  float: left;
+  width: 95%;
+  padding: 0 5px;
+  margin: 5px 0 0 0;
+}
+.dialog .dialog_1 .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.dialog .dialog_1 .order .order_2 .list .name {
+  float: left;
+  width: 100%;
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 0 0 10px;
+}
+.dialog .dialog_1 .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.dialog .dialog_1 .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 152 - 0
pages/password/index.js

@@ -0,0 +1,152 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '修改密码', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        form: {}
+    },
+    initValidate() {
+        const rules = { password: { required: true, } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { password: { required: '请输入新密码', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 取消修改
+    onReset: function () {
+        this.back()
+    },
+    // 提交修改
+    onSubmit: function (e) {
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            console.log(params);
+            // wx.getStorage({
+            //     key: 'user',
+            //     success: res => {
+            //         if (res.data) {
+            //             wx.request({
+            //                 url: app.globalData.publicUrl + `/api/hc/user/password`,
+            //                 method: "post",
+            //                 data: { ...params, id: res.data.id },
+            //                 header: {},
+            //                 success: (res) => {
+            //                     if (res.data.errcode == '0') {
+            //                         wx.showToast({ title: `修改密码成功`, icon: 'success', duration: 2000 });
+            //                         wx.clearStorage({
+            //                             key: 'toekn',
+            //                             success: res => { wx.redirectTo({ url: '/pages/login/index', }) }
+            //                         })
+            //                     } else {
+            //                         wx.showToast({ title: `${res.data.errmsg}`, icon: 'error', duration: 2000 })
+            //                     }
+            //                 },
+            //             })
+            //         }
+            //     }
+            // })
+
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        //验证规则函数
+        this.initValidate();
+        // 监听用户是否登录
+        this.watchLogin();
+        // 计算高度
+        this.searchHeight()
+    },
+    // 监听用户是否登录
+    watchLogin: function () {
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/password/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 38 - 0
pages/password/index.less

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        position: relative;
+        padding: 10px;
+
+        .content {
+            position: relative;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+
+                .icon {
+                    color: #000000;
+                }
+            }
+
+            .right input {
+                color: #000000;
+            }
+        }
+
+        .save {
+            text-align: center;
+
+            button {
+                margin: 10px;
+            }
+        }
+    }
+}

+ 20 - 0
pages/password/index.wxml

@@ -0,0 +1,20 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="password" value="{{form.password}}" password placeholder='请输入新密码' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消修改</button>
+          <button type="primary" size="mini" formType="submit">提交修改</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 31 - 0
pages/password/index.wxss

@@ -0,0 +1,31 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  position: relative;
+  padding: 10px;
+}
+.main .one .content {
+  position: relative;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}

+ 149 - 0
pages/stock/detail.js

@@ -0,0 +1,149 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        // 类型
+        typeList: [
+            { id: '0', name: '其他' },
+            { id: '1', name: '办公生活用品' },
+            { id: '2', name: '办公机械' },
+            { id: '3', name: '金融用品' },
+            { id: '4', name: '纸制品' },
+            { id: '5', name: '书写工具' },
+            { id: '6', name: '桌面办公文具' },
+        ],
+        info: { id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' },
+        form: {},
+        stock_type: '',
+        // 图片
+        img_url: [],
+        // 商品类型
+        stock_typeList: [
+            { value: '1', label: '固定资产' },
+            { value: '2', label: '商品' },
+        ]
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    initValidate() {
+        const rules = { stock_type: { required: true, }, code: { required: false, }, type_name: { required: true, }, name: { required: true, }, num: { required: true, }, money: { required: true, }, brief: { required: true, } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { stock_type: { required: '请选择商品类型', }, code: { required: '请输入固定资产编号', }, type_name: { required: '请选择类型', }, name: { required: '请输入商品名称', }, num: { required: '请输入商品数量', }, money: { required: '请输入商品单价', }, brief: { required: '请输入商品简介', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/stock/index' })
+    },
+    // 类型选择
+    stocktypeChange: function (e) {
+        let { value } = e.detail;
+        let data = this.data.stock_typeList[value];
+        this.setData({ 'stock_type': data.value })
+        this.setData({ 'form.stock_type': data.value })
+        this.setData({ 'form.stock_type_name': data.label })
+    },
+    // 类型选择
+    typeChange: function (e) {
+        let { value } = e.detail;
+        let data = this.data.typeList[value];
+        this.setData({ 'form.type_id': data.id })
+        this.setData({ 'form.type_name': data.name })
+    },
+    // 上传图片
+    afterRead: function (event) {
+        console.log(event.detail);
+    },
+    // 删除图片
+    uploadDelete: function (e) {
+        console.log(e);
+    },
+    // 取消保存
+    onReset: function (e) {
+        this.back()
+    },
+    // 提交保存
+    onSubmit: function (e) {
+        console.log(e.detail.value);
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        if (options.id) {
+            this.setData({ 'form': this.data.info })
+        }
+        //验证规则函数
+        this.initValidate()
+        // 计算高度
+        this.searchHeight()
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stock/detail.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 86 - 0
pages/stock/detail.less

@@ -0,0 +1,86 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .content {
+            float: left;
+            width: 100%;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+            }
+
+            .left .icon {
+                color: #000000;
+            }
+
+            .right input {
+                color: #000000;
+            }
+        }
+
+        .save {
+            float: left;
+            width: 100%;
+            text-align: center;
+        }
+
+        .save button {
+            margin: 10px;
+        }
+
+        .order {
+            float: left;
+            width: 100%;
+            padding: 10px;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .order_1 {
+                float: left;
+                width: 100%;
+                text-align: center;
+            }
+
+            .order_2 {
+                float: left;
+
+                .list {
+                    margin: 0 0 8px 0;
+                    background-color: #f9f9f9;
+                    border-radius: 5px;
+                    padding: 8px 0;
+
+                    .name {
+                        font-size: 16px;
+                        margin: 0 0 5px 0;
+                        padding: 0 10px;
+                    }
+
+                    .other {
+                        .otherInfo {
+                            margin: 0 0 5px 0;
+                            font-size: 14px;
+                            color: #666666;
+                            padding: 0 10px;
+                        }
+                        .otherInfo text {
+                            color: #000000;
+                          }
+                    }
+                }
+            }
+        }
+    }
+}

+ 104 - 0
pages/stock/detail.wxml

@@ -0,0 +1,104 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="id" value="{{form.id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <input name="stock_type" value="{{form.stock_type}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="stocktypeChange" name="stock_type_name" value="{{form.stock_type_name}}" range="{{stock_typeList}}" range-key="label">
+              <view>{{form.stock_type_name||'选择商品类型'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content" wx:if="{{stock_type=='1'}}">
+          <view class="left">
+            <text class="icon iconfont icon-bianhao"></text>
+          </view>
+          <view class="right">
+            <input name="code" value="{{form.code}}" placeholder='请输入资产编号' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <input name="type_id" value="{{form.type_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-leixing"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="typeChange" name="type_name" value="{{form.type_name}}" range="{{typeList}}" range-key="name">
+              <view>{{form.type_name||'选择商品类型'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入商品名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shuliang"></text>
+          </view>
+          <view class="right">
+            <input name="num" value="{{form.num}}" type="number" placeholder='请输入商品数量' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-jiage"></text>
+          </view>
+          <view class="right">
+            <input name="money" value="{{form.money}}" type="number" placeholder='请输入商品单价' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-jianjie"></text>
+          </view>
+          <view class="right">
+            <input name="brief" value="{{form.brief}}" placeholder='请输入商品简介' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-tupian"></text>
+          </view>
+          <view class="right">
+            <van-uploader file-list="{{ img_url }}" bind:after-read="afterRead" bind:delete="uploadDelete" />
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 71 - 0
pages/stock/detail.wxss

@@ -0,0 +1,71 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .one .content {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}
+.main .one .order {
+  float: left;
+  width: 100%;
+  padding: 10px;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .order .order_1 {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .order .order_2 {
+  float: left;
+}
+.main .one .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .one .order .order_2 .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .one .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}

+ 108 - 0
pages/stock/index.js

@@ -0,0 +1,108 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '库存管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        // 库存列表
+        list: [{ id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' }],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        // 详细信息
+        info: { id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' },
+        // 类型
+        typeList: [
+            { value: '1', label: '固定资产' },
+            { value: '2', label: '商品' },
+        ]
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 添加采购申请
+    toAdd: function () {
+        wx.navigateTo({ url: `/pages/stock/detail` })
+    },
+    // 详细信息
+    toView: function (e) {
+        this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    // 信息变更
+    toEdit: function (e) {
+        const { id } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/stock/detail?id=${id}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        // 计算高度
+        this.searchHeight()
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stock/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 84 - 0
pages/stock/index.less

@@ -0,0 +1,84 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1px dashed #000000;
+    }
+
+    .one button {
+        margin: 10px;
+    }
+
+    .two {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+            }
+            .btn {
+                text-align: center;
+              }
+              .btn button {
+                margin: 0 5px;
+              }
+        }
+
+        .other {
+            .otherInfo {
+                margin: 0 0 5px 0;
+                font-size: 14px;
+                color: #666666;
+                padding: 0 10px;
+            }
+            .otherInfo text {
+                color: #000000;
+              }
+        }
+    }
+}
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+    .content {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+        .left {
+            float: left;
+            margin: 0 0 0 10px;
+          }
+          .left text {
+            font-size: 14px;
+            color: #666666;
+          }
+          .right input {
+            font-size: 12px;
+          }
+      }
+  }
+  .van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }
+  

+ 64 - 0
pages/stock/index.wxml

@@ -0,0 +1,64 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <button type="primary" size="mini" bindtap="toAdd">添加库存商品</button>
+        </view>
+        <view class="two">
+            <view class="list" wx:key="item" wx:for="{{list}}">
+                <view class="name">{{item.name}}</view>
+                <view class="other">
+                    <view class="otherInfo textOver">商品类型:<text>{{item.type_name||'暂无' }}</text></view>
+                    <view class="otherInfo textOver">库存数量:<text>{{item.num||'暂无' }}</text></view>
+                    <view class="otherInfo textOver">商品单价:<text style="color: #ff0000;font-weight: bold;">{{item.money||'暂无' }}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+                    <button type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">信息变更</button>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+    <view class="dialog">
+        <view class="content">
+            <view class="right">
+                <swiper indicator-dots='true' autoplay='true' interval='2000' duration='1000' circular='true'>
+                    <block wx:for="{{info.img_url}}" wx:key="item">
+                        <swiper-item>
+                            <image src='{{item.url}}' mode='aspectFill'></image>
+                        </swiper-item>
+                    </block>
+                </swiper>
+            </view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品类型:</text></view>
+            <view class="right">{{info.stock_type=='1'?'固定资产':'商品'}}</view>
+        </view>
+        <view class="content" wx:if="{{info.stock_type=='1'}}">
+            <view class="left"><text>固定资产编号:</text></view>
+            <view class="right">{{info.code||'暂无'}}</view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品类型:</text></view>
+            <view class="right">{{info.type_name||'暂无'}}</view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品名称:</text></view>
+            <view class="right">{{info.name||'暂无'}}</view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品数量:</text></view>
+            <view class="right">{{info.num||'暂无'}}</view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品单价(元):</text></view>
+            <view class="right">{{info.money||'暂无'}}</view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品简介:</text></view>
+            <view class="right">{{info.brief||'暂无'}}</view>
+        </view>
+    </view>
+</van-dialog>

+ 75 - 0
pages/stock/index.wxss

@@ -0,0 +1,75 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+.main .one button {
+  margin: 10px;
+}
+.main .two {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.main .two .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .other .otherInfo text {
+  color: #000000;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .content .left {
+  float: left;
+  margin: 0 0 0 10px;
+}
+.dialog .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .content .right input {
+  font-size: 12px;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 108 - 0
pages/stock_order/index.js

@@ -0,0 +1,108 @@
+// pages/login/login.js
+
+const { buy_status } = require('../../utils/dict');
+const app = getApp();
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '采买订单管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        // 查询
+        shoopingtext: '',
+        // 采买列表
+        list: [],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        // 详细信息
+        info: {},
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 详细信息
+    toView: function (e) {
+        this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    // 订单签收
+    toSign: function (e) {
+        console.log(e.currentTarget.dataset);
+    },
+    // 查询
+    shoppinginput: function (e) {
+        this.setData({ shoopingtext: e.detail.value })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.search();
+        // 计算高度
+        this.searchHeight();
+    },
+    search: function (data) {
+        console.log(data);
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        // 减去状态栏
+        let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        this.search();
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stock_order/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 155 - 0
pages/stock_order/index.less

@@ -0,0 +1,155 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        padding: 0 8px;
+        height: 40px;
+        overflow: hidden;
+        border-bottom: 1px dashed #000000;
+    }
+
+    .one input {
+        float: left;
+        width: 83%;
+        padding: 2px 5px;
+        margin: 5px 0;
+        border-radius: 5px;
+        border: 1px solid #cccccc;
+        background-color: #ffffff;
+    }
+
+    .one text {
+        float: left;
+        width: 10%;
+        padding-left: 5px;
+        margin-top: 1.5%;
+        font-size: 17px;
+    }
+
+    .two {
+        float: left;
+        width: 100%;
+        padding: 10px;
+
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+                font-weight: bold;
+            }
+
+            .other {
+                .otherInfo {
+                    margin: 0 0 5px 0;
+                    font-size: 14px;
+                    color: #666666;
+                    padding: 0 10px;
+                }
+
+                .otherInfo text {
+                    color: #000000;
+                }
+            }
+
+            .btn {
+                text-align: center;
+            }
+
+            .btn button {
+                margin: 0 5px;
+            }
+        }
+    }
+}
+
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+
+    .content {
+        float: left;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+
+        .left {
+            float: left;
+            margin: 0 0 0 10px;
+        }
+
+        .left text {
+            font-size: 14px;
+            color: #666666;
+        }
+
+        .right input {
+            font-size: 12px;
+        }
+
+    }
+
+    .order {
+        float: left;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+
+        .order_1 {
+            float: left;
+            margin: 0 10px;
+        }
+
+        .order_1 text {
+            font-size: 14px;
+            color: #666666;
+        }
+
+        .order_2 {
+            float: left;
+            padding: 0 5px;
+            margin: 5px 0 0 0;
+
+            .list {
+                margin: 0 0 8px 0;
+                background-color: #f9f9f9;
+                border-radius: 5px;
+                padding: 8px 0;
+
+                .name {
+                    font-size: 16px;
+                    margin: 0 0 5px 0;
+                    padding: 0 10px;
+                }
+
+                .other {
+                    .otherInfo {
+                        margin: 0 0 5px 0;
+                        font-size: 14px;
+                        color: #666666;
+                        padding: 0 10px;
+                    }
+                    .otherInfo text {
+                        color: #000000;
+                      }
+
+                }
+
+            }
+        }
+    }
+}

+ 70 - 0
pages/stock_order/index.wxml

@@ -0,0 +1,70 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <input value="{{shoopingtext}}" bindinput="shoppinginput" placeholder="请输入收货人"></input>
+            <text bindtap="search">搜索</text>
+        </view>
+        <view class="two">
+            <view class="list" wx:key="item" wx:for="{{list}}">
+                <view class="name">{{item.order_num}}</view>
+                <view class="other">
+                    <view class="otherInfo textOver">收货人:<text>{{item.receive_user_name }}</text></view>
+                    <view class="otherInfo textOver">供货单位:<text>{{item.mech_name }}</text></view>
+                    <view class="otherInfo textOver">货物状态:<text>{{item.status_name }}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+                    <button type="primary" size="mini" bindtap="toSign" data-id="{{item.id}}" wx:if="{{item.status=='1'}}">订单签收</button>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+    <view class="dialog">
+        <view class="content">
+            <view class="left"><text>订单号:</text></view>
+            <view class="right"><input name="order_num" value="{{info.order_num}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>采买人:</text></view>
+            <view class="right"><input name="user_name" value="{{info.user_name}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>采买人电话:</text></view>
+            <view class="right"><input name="user_phone" value="{{info.user_phone}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>供货单位:</text></view>
+            <view class="right"><input name="mech_name" value="{{info.mech_name}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>供货总价(元):</text></view>
+            <view class="right" style="color: #ff0000;font-weight: bold;"><input name="money" value="{{info.money}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>收货人:</text></view>
+            <view class="right"><input name="receive_user_name" value="{{info.receive_user_name}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>收货人电话:</text></view>
+            <view class="right"><input name="receive_user_phone" value="{{info.receive_user_phone}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>收货地址:</text></view>
+            <view class="right"><input name="receive_address" value="{{info.receive_address}}" disabled></input></view>
+        </view>
+        <view class="order">
+            <view class="order_1"><text>商品列表:</text></view>
+            <view class="order_2">
+                <view class="list" wx:key="item" wx:for="{{info.order}}">
+                    <view class="name">{{item.name}}</view>
+                    <view class="other">
+                        <view class="otherInfo">购买数量:<text>{{item.num||'暂无' }}</text></view>
+                        <view class="otherInfo">商品单价:<text>{{item.money||'暂无' }}</text></view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</van-dialog>

+ 126 - 0
pages/stock_order/index.wxss

@@ -0,0 +1,126 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  padding: 0 8px;
+  height: 40px;
+  overflow: hidden;
+  border-bottom: 1px dashed #000000;
+}
+.main .one input {
+  float: left;
+  width: 83%;
+  padding: 2px 5px;
+  margin: 5px 0;
+  border-radius: 5px;
+  border: 1px solid #cccccc;
+  background-color: #ffffff;
+}
+.main .one text {
+  float: left;
+  width: 10%;
+  padding-left: 5px;
+  margin-top: 1.5%;
+  font-size: 17px;
+}
+.main .two {
+  float: left;
+  width: 100%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+  font-weight: bold;
+}
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .content {
+  float: left;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .content .left {
+  float: left;
+  margin: 0 0 0 10px;
+}
+.dialog .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .content .right input {
+  font-size: 12px;
+}
+.dialog .order {
+  float: left;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .order .order_1 {
+  float: left;
+  margin: 0 10px;
+}
+.dialog .order .order_1 text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .order .order_2 {
+  float: left;
+  padding: 0 5px;
+  margin: 5px 0 0 0;
+}
+.dialog .order .order_2 .list {
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.dialog .order .order_2 .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.dialog .order .order_2 .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.dialog .order .order_2 .list .other .otherInfo text {
+  color: #000000;
+}

+ 1 - 1
pages/test/index.less

@@ -3,6 +3,6 @@
     width: 100%;
 
     .one {
-        text-align: center;
+        text-align: center; 
     }
 }

+ 106 - 0
pages/type/detail.js

@@ -0,0 +1,106 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    // 详细信息
+    info: { id: '1234567', code: '8', name: '其他' },
+    form: {},
+  },
+  initValidate() {
+    const rules = { code: { required: true, }, name: { required: true } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { code: { required: '请输入类型类别', }, name: { required: '请输入类别名称', } };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/type/index' })
+  },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    console.log(e.detail.value);
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (options.id) {
+      this.setData({ 'form': this.data.info })
+    }
+    //验证规则函数
+    this.initValidate();
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/type/detail.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 42 - 0
pages/type/detail.less

@@ -0,0 +1,42 @@
+.main {
+  position: relative;
+  width: 100%;
+
+  .one {
+    float: left;
+    width: 95%;
+    padding: 10px;
+
+    .content {
+      float: left;
+      width: 100%;
+      padding: 10px 0;
+      box-shadow: 0 0 5px #000000;
+      margin: 0 0 10px 0;
+      border-radius: 5px;
+
+      .left {
+        float: left;
+        margin: 0 10px;
+      }
+
+      .left .icon {
+        color: #000000;
+      }
+
+      .right input {
+        color: #000000;
+      }
+    }
+
+    .save {
+      float: left;
+      width: 100%;
+      text-align: center;
+    }
+
+    .save button {
+      margin: 10px;
+    }
+  }
+}

+ 36 - 0
pages/type/detail.wxml

@@ -0,0 +1,36 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-leibie"></text>
+          </view>
+          <view class="right">
+            <input name="id" value="{{form.id}}" type="number" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-leibie"></text>
+          </view>
+          <view class="right">
+            <input name="code" value="{{form.code}}" type="number" placeholder='请输入类型类别' placeholder-class="placeholder" disabled="{{form.id?true:false}}"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mingcheng"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入类型名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 35 - 0
pages/type/detail.wxss

@@ -0,0 +1,35 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .one .content {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}

+ 102 - 0
pages/type/index.js

@@ -0,0 +1,102 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '商品类型管理', leftArrow: true, useBar: false },
+        // 主体高度
+        infoHeight: '',
+        list: [{ id: '1234567', code: '8', name: '其他' }],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        // 详细信息
+        info: { id: '1234567', code: '8', name: '其他' },
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/home/index' })
+    },
+    // 添加采购申请
+    toAdd: function () {
+        wx.navigateTo({ url: `/pages/type/detail` })
+    },
+    // 详细信息
+    toView: function (e) {
+        this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    // 信息变更
+    toEdit: function (e) {
+        const { id } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/type/detail?id=${id}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        // 计算高度
+        this.searchHeight()
+    },
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/type/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 91 - 0
pages/type/index.less

@@ -0,0 +1,91 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1px dashed #000000;
+    }
+
+    .one button {
+        margin: 10px;
+    }
+
+    .two {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+            }
+
+            .other {
+                .otherInfo {
+                    margin: 0 0 5px 0;
+                    font-size: 14px;
+                    color: #666666;
+                    padding: 0 10px;
+                }
+
+                .otherInfo text {
+                    color: #000000;
+                }
+            }
+
+            .btn {
+                text-align: center;
+            }
+
+            .btn button {
+                margin: 0 5px;
+            }
+        }
+    }
+}
+
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+
+    .content {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+
+        .left {
+            float: left;
+            margin: 0 10px;
+        }
+
+        .left text {
+            font-size: 14px;
+            color: #666666;
+        }
+
+        .right input {
+            font-size: 12px;
+        }
+    }
+}
+.van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 31 - 0
pages/type/index.wxml

@@ -0,0 +1,31 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <button type="primary" size="mini" bindtap="toAdd">添加商品类型</button>
+        </view>
+        <view class="two">
+            <view class="list" wx:key="item" wx:for="{{list}}">
+                <view class="name">{{item.code}}</view>
+                <view class="other">
+                    <view class="otherInfo">类型名称:<text>{{item.name||'暂无' }}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+                    <button type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">信息变更</button>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+    <view class="dialog">
+        <view class="content">
+            <view class="left"><text>商品类别:</text></view>
+            <view class="right"><input name="code" value="{{info.code}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>商品名称:</text></view>
+            <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
+        </view>
+    </view>
+</van-dialog>

+ 75 - 0
pages/type/index.wxss

@@ -0,0 +1,75 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+.main .one button {
+  margin: 10px;
+}
+.main .two {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.dialog .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .content .right input {
+  font-size: 12px;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 121 - 0
pages/user/detail.js

@@ -0,0 +1,121 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '基本信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    info: { id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com', address: '1', dept: '1', zw: '1', company: '1', type: '0', type_name: '超级管理员' },
+    form: {},
+    // 用户类别
+    typeList: [
+      { value: '0', label: '超级管理员' },
+      { value: '1', label: '科室人员' },
+      { value: '2', label: '办公室人员' },
+      { value: '3', label: '采购部门' },
+      { value: '4', label: '入库管理部门' },
+      { value: '5', label: '财务部门' },
+      { value: '6', label: '供货单位' },]
+  },
+  initValidate() {
+    const rules = { type_name: { required: true, }, name: { required: true, }, phone: { required: true, tel: true }, email: { required: true, }, address: { required: true, }, dept: { required: true, }, zw: { required: true, }, company: { required: true, } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { type_name: { required: '请选择用户类别', }, name: { required: '请输入姓名', }, phone: { required: '请输入电话', }, email: { required: '请输入电子邮箱', }, address: { required: '请输入联系地址', }, dept: { required: '请输入部门', }, zw: { required: '请输入职务', }, company: { required: '请输入工作单位', } };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  // 选择用户类别
+  typeChange: function (e) {
+    let { value } = e.detail;
+    let data = this.data.typeList[value];
+    this.setData({ 'form.type': data.value })
+    this.setData({ 'form.type_name': data.label })
+  },
+  // 取消修改
+  onReset: function () {
+    this.back()
+  },
+  // 提交修改
+  onSubmit: function (e) {
+    console.log(e.detail.value)
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (options.id) {
+      this.setData({ 'form': this.data.info })
+    }
+    //验证规则函数
+    this.initValidate();
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/user/detail.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 42 - 0
pages/user/detail.less

@@ -0,0 +1,42 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .content {
+            float: left;
+            width: 100%;
+            padding: 10px 0;
+            box-shadow: 0 0 5px #000000;
+            margin: 0 0 10px 0;
+            border-radius: 5px;
+
+            .left {
+                float: left;
+                margin: 0 10px;
+
+                .icon {
+                    color: #000000;
+                }
+            }
+
+            .right input {
+                color: #000000;
+            }
+        }
+
+        .save {
+            float: left;
+            width: 100%;
+            text-align: center;
+        }
+
+        .save button {
+            margin: 10px;
+        }
+    }
+}

+ 86 - 0
pages/user/detail.wxml

@@ -0,0 +1,86 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-shenfenleibie"></text>
+          </view>
+          <view class="right">
+            <input name="type" value="{{form.type}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shenfenleibie"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="typeChange" name="type_name" value="{{form.type_name}}" range="{{typeList}}" range-key="label">
+              <view>{{form.type_name||'选择用户类别'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming1"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入姓名' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-dianhua"></text>
+          </view>
+          <view class="right">
+            <input name="phone" type="number" maxlength="11" value="{{form.phone}}" placeholder='请输入电话' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-dianziyouxiang1"></text>
+          </view>
+          <view class="right">
+            <input name="email" value="{{form.email}}" placeholder='请输入电子邮箱' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-dizhi"></text>
+          </view>
+          <view class="right">
+            <input name="address" value="{{form.address}}" placeholder='请输入联系地址' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-bumen"></text>
+          </view>
+          <view class="right">
+            <input name="dept" value="{{form.dept}}" placeholder='请输入部门' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-zhiwu"></text>
+          </view>
+          <view class="right">
+            <input name="zw" value="{{form.zw}}" placeholder='请输入职务' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-commpany"></text>
+          </view>
+          <view class="right">
+            <input name="company" value="{{form.company}}" placeholder='请输入工作单位' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消修改</button>
+          <button type="primary" size="mini" formType="submit">提交修改</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 35 - 0
pages/user/detail.wxss

@@ -0,0 +1,35 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .one .content {
+  float: left;
+  width: 100%;
+  padding: 10px 0;
+  box-shadow: 0 0 5px #000000;
+  margin: 0 0 10px 0;
+  border-radius: 5px;
+}
+.main .one .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.main .one .content .left .icon {
+  color: #000000;
+}
+.main .one .content .right input {
+  color: #000000;
+}
+.main .one .save {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+.main .one .save button {
+  margin: 10px;
+}

+ 112 - 0
pages/user/index.js

@@ -0,0 +1,112 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '用户管理', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    // 信息列表
+    list: [{ id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com' }],
+    // 弹框
+    dialog: { title: '详细信息', show: false, type: '1' },
+    // 详细信息
+    info: { id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com', address: '1', dept: '1', zw: '1', company: '1', type: '超级管理员' },
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  // 添加用户
+  toAdd: function () {
+    wx.navigateTo({ url: '/pages/user/detail' })
+  },
+  // 详细信息
+  toView: function (e) {
+    this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+  },
+  // 信息变更
+  toEdit: function (e) {
+    const { id } = e.currentTarget.dataset;
+    wx.navigateTo({ url: `/pages/user/detail?id=${id}` })
+  },
+  // 密码重置
+  toReset: function (e) {
+    wx.showToast({ title: `密码重置`, icon: 'error', duration: 1000 })
+  },
+
+  // 刪除信息
+  toDel: function (e) {
+    wx.showToast({ title: `刪除信息`, icon: 'error', duration: 1000 })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 是否去掉状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/user/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 91 - 0
pages/user/index.less

@@ -0,0 +1,91 @@
+.main {
+    position: relative;
+    width: 100%;
+
+    .one {
+        float: left;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1px dashed #000000;
+    }
+
+    .one button {
+        margin: 10px;
+    }
+
+    .two {
+        float: left;
+        width: 95%;
+        padding: 10px;
+
+        .list {
+            float: left;
+            width: 100%;
+            margin: 0 0 8px 0;
+            background-color: #f9f9f9;
+            border-radius: 5px;
+            padding: 8px 0;
+
+            .name {
+                font-size: 16px;
+                margin: 0 0 5px 0;
+                padding: 0 10px;
+            }
+
+            .other {
+                .otherInfo {
+                    margin: 0 0 5px 0;
+                    font-size: 14px;
+                    color: #666666;
+                    padding: 0 10px;
+                }
+
+                .otherInfo text {
+                    color: #000000;
+                }
+            }
+
+            .btn {
+                text-align: center;
+            }
+
+            .btn button {
+                margin: 0 5px;
+            }
+        }
+    }
+}
+
+.dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+
+    .content {
+        float: left;
+        width: 100%;
+        padding: 8px 0;
+        border-radius: 6px;
+        margin: 0 0 5px 0;
+        background-color: #f1f1f1;
+
+        .left {
+            float: left;
+            margin: 0 10px;
+        }
+
+        .left text {
+            font-size: 14px;
+            color: #666666;
+        }
+
+        .right input {
+            font-size: 12px;
+        }
+    }
+}
+.van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 59 - 0
pages/user/index.wxml

@@ -0,0 +1,59 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one">
+            <button type="primary" size="mini" bindtap="toAdd">添加用户</button>
+        </view>
+        <view class="two">
+            <view class="list" wx:key="item" wx:for="{{list}}">
+                <view class="name">{{item.name}}</view>
+                <view class="other">
+                    <view class="otherInfo">联系电话:<text>{{item.phone||'暂无' }}</text></view>
+                    <view class="otherInfo textOver">电子邮箱:<text>{{item.email||'暂无' }}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+                    <button type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">信息变更</button>
+                    <button type="primary" size="mini" bindtap="toUnbound" data-id="{{item.id}}" wx:if="{{item.openid!=''&&item.openid!=null&&item.openid!=underfined}}">微信解绑</button>
+                    <button type="primary" size="mini" bindtap="toReset" data-id="{{item.id}}">密码重置</button>
+                    <button type="warn" size="mini" bindtap="toDel" data-id="{{item.id}}">删除信息</button>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+    <view class="dialog">
+        <view class="content">
+            <view class="left"><text>姓名:</text></view>
+            <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>电话:</text></view>
+            <view class="right"><input name="phone" value="{{info.phone}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>电子邮箱:</text></view>
+            <view class="right"><input name="email" value="{{info.email}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>联系地址:</text></view>
+            <view class="right"><input name="address" value="{{info.address}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>部门:</text></view>
+            <view class="right"><input name="dept" value="{{info.dept}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>职务:</text></view>
+            <view class="right"><input name="zw" value="{{info.zw}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>工作单位:</text></view>
+            <view class="right"><input name="company" value="{{info.company}}" disabled></input></view>
+        </view>
+        <view class="content">
+            <view class="left"><text>用户类型:</text></view>
+            <view class="right"><input name="type" value="{{info.type}}" disabled></input></view>
+        </view>
+    </view>
+</van-dialog>

+ 75 - 0
pages/user/index.wxss

@@ -0,0 +1,75 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.main .one {
+  float: left;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+.main .one button {
+  margin: 10px;
+}
+.main .two {
+  float: left;
+  width: 95%;
+  padding: 10px;
+}
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+.dialog .content {
+  float: left;
+  width: 100%;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+.dialog .content .left {
+  float: left;
+  margin: 0 10px;
+}
+.dialog .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+.dialog .content .right input {
+  font-size: 12px;
+}
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 3 - 3
project.config.json

@@ -25,7 +25,7 @@
         "checkInvalidKey": true,
         "checkSiteMap": true,
         "uploadWithSourceMap": true,
-        "compileHotReLoad": true,
+        "compileHotReLoad": false,
         "lazyloadPlaceholderEnable": false,
         "useMultiFrameRuntime": true,
         "useApiHook": true,
@@ -35,6 +35,7 @@
             "disablePlugins": [],
             "outputPath": ""
         },
+        "enableEngineNative": false,
         "useIsolateContext": false,
         "userConfirmedBundleSwitch": false,
         "packNpmManually": false,
@@ -43,8 +44,7 @@
         "disableUseStrict": false,
         "minifyWXML": true,
         "showES6CompileOption": false,
-        "useCompilerPlugins": false,
-        "ignoreUploadUnusedFiles": true
+        "useCompilerPlugins": false
     },
     "compileType": "miniprogram",
     "libVersion": "2.19.4",