zs 3 years ago
parent
commit
c65c49bb62
59 changed files with 4072 additions and 155 deletions
  1. 9 0
      app.json
  2. 1 1
      pages/home/index.js
  3. 185 0
      pages/indepot/detail.js
  4. 0 0
      pages/indepot/detail.json
  5. 190 0
      pages/indepot/detail.less
  6. 215 0
      pages/indepot/detail.wxml
  7. 155 0
      pages/indepot/detail.wxss
  8. 100 0
      pages/indepot/index.js
  9. 0 0
      pages/indepot/index.json
  10. 144 0
      pages/indepot/index.less
  11. 50 0
      pages/indepot/index.wxml
  12. 118 0
      pages/indepot/index.wxss
  13. 144 0
      pages/outdepot/detail.js
  14. 6 0
      pages/outdepot/detail.json
  15. 167 0
      pages/outdepot/detail.less
  16. 130 0
      pages/outdepot/detail.wxml
  17. 158 0
      pages/outdepot/detail.wxss
  18. 100 0
      pages/outdepot/index.js
  19. 6 0
      pages/outdepot/index.json
  20. 127 0
      pages/outdepot/index.less
  21. 54 0
      pages/outdepot/index.wxml
  22. 120 0
      pages/outdepot/index.wxss
  23. 149 0
      pages/stock/detail.js
  24. 6 0
      pages/stock/detail.json
  25. 86 0
      pages/stock/detail.less
  26. 104 0
      pages/stock/detail.wxml
  27. 71 0
      pages/stock/detail.wxss
  28. 108 0
      pages/stock/index.js
  29. 6 0
      pages/stock/index.json
  30. 84 0
      pages/stock/index.less
  31. 64 0
      pages/stock/index.wxml
  32. 75 0
      pages/stock/index.wxss
  33. 108 0
      pages/stock_order/index.js
  34. 6 0
      pages/stock_order/index.json
  35. 155 0
      pages/stock_order/index.less
  36. 70 0
      pages/stock_order/index.wxml
  37. 126 0
      pages/stock_order/index.wxss
  38. 22 22
      pages/user copy/index.js
  39. 6 0
      pages/type/detail.json
  40. 42 0
      pages/type/detail.less
  41. 36 0
      pages/type/detail.wxml
  42. 35 0
      pages/type/detail.wxss
  43. 102 0
      pages/type/index.js
  44. 6 0
      pages/type/index.json
  45. 18 9
      pages/user copy/index.less
  46. 31 0
      pages/type/index.wxml
  47. 9 3
      pages/user copy/index.wxss
  48. 0 84
      pages/user copy/detail.js
  49. 0 8
      pages/user copy/detail.less
  50. 0 5
      pages/user copy/detail.wxml
  51. 0 7
      pages/user copy/detail.wxss
  52. 38 1
      pages/user/detail.js
  53. 35 1
      pages/user/detail.less
  54. 83 2
      pages/user/detail.wxml
  55. 28 0
      pages/user/detail.wxss
  56. 25 1
      pages/user/index.js
  57. 88 1
      pages/user/index.less
  58. 0 10
      pages/user/index.wxml
  59. 71 0
      pages/user/index.wxss

+ 9 - 0
app.json

@@ -7,6 +7,15 @@
         "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/test/index",
         "pages/logs/logs"
     ],

+ 1 - 1
pages/home/index.js

@@ -78,7 +78,7 @@ Page({
   },
   // 监听用户是否登录
   watchLogin: function () {
-    let data = { type: '0' }
+    let data = { type: '4' }
     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 () {
+
+    }
+})

pages/user copy/detail.json → pages/indepot/detail.json


+ 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 () {
+
+    }
+})

pages/user copy/index.json → pages/indepot/index.json


+ 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="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>
+    </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;
+}

+ 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="name" 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;
+}

+ 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;
+}

+ 22 - 22
pages/user copy/index.js

@@ -1,3 +1,4 @@
+// pages/login/login.js
 import WxValidate from '../../utils/wxValidate'
 const app = getApp()
 Page({
@@ -6,40 +7,39 @@ Page({
    * 页面的初始数据
    */
   data: {
-    frameStyle: { useTop: true, name: '用户管理', leftArrow: false, useBar: true },
+    frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
-    // 信息列表
-    list: [{ name: '测试人员', phone: '12345678901', email: '123456@qq.com' }],
-    // 弹框
-    dialog: { title: '详细信息', show: false, type: '1' },
     // 详细信息
-    info: { name: '测试人员', phone: '12345678901', email: '123456@qq.com', address: '1', dept: '1', zw: '1', company: '1', type: '超级管理员' },
+    info: { id: '1234567', code: '8', name: '其他' },
+    form: {},
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  // 添加用户
-  toAdd: function () {
-    wx.navigateTo({ url: `/pages/user/detail` })
+  initValidate() {
+    const rules = { code: { required: true, }, name: { required: true } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { code: { required: '请输入类型类别', }, name: { required: '请输入类别名称', } };
+    this.WxValidate = new WxValidate(rules, messages)
   },
-  // 详细信息
-  toView: function (e) {
-    this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
-  },
-  // 信息变更
-  toEdit: function (e) {
+  back: function () {
+    wx.navigateBack({ url: '/pages/type/index' })
   },
-  // 密码重置
-  toReset: function (e) {
+  // 取消保存
+  onReset: function (e) {
+    this.back()
   },
-  // 刪除信息
-  toDel: function (e) {
+  // 提交保存
+  onSubmit: function (e) {
+    console.log(e.detail.value);
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    if (options.id) {
+      this.setData({ 'form': this.data.info })
+    }
+    //验证规则函数
+    this.initValidate();
     // 计算高度
     this.searchHeight()
   },

+ 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"
+  }
+}

+ 18 - 9
pages/user copy/index.less

@@ -3,7 +3,7 @@
     width: 100%;
 
     .one {
-        position: relative;
+        float: left;
         width: 100%;
         text-align: center;
         border-bottom: 1px dashed #000000;
@@ -14,7 +14,8 @@
     }
 
     .two {
-        position: relative;
+        float: left;
+        width: 95%;
         padding: 10px;
 
         .list {
@@ -62,21 +63,29 @@
     padding: 0 8px;
 
     .content {
-        position: relative;
+        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 {
+        }
+
+        .left text {
             font-size: 14px;
             color: #666666;
-          }
-          .right input {
+        }
+
+        .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>

+ 9 - 3
pages/user copy/index.wxss

@@ -3,7 +3,7 @@
   width: 100%;
 }
 .main .one {
-  position: relative;
+  float: left;
   width: 100%;
   text-align: center;
   border-bottom: 1px dashed #000000;
@@ -12,7 +12,8 @@
   margin: 10px;
 }
 .main .two {
-  position: relative;
+  float: left;
+  width: 95%;
   padding: 10px;
 }
 .main .two .list {
@@ -50,7 +51,8 @@
   padding: 0 8px;
 }
 .dialog .content {
-  position: relative;
+  float: left;
+  width: 100%;
   padding: 8px 0;
   border-radius: 6px;
   margin: 0 0 5px 0;
@@ -67,3 +69,7 @@
 .dialog .content .right input {
   font-size: 12px;
 }
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 0 - 84
pages/user copy/detail.js

@@ -1,84 +0,0 @@
-// pages/login/login.js
-import WxValidate from '../../utils/wxValidate'
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    frameStyle: { useTop: true, name: '基本信息', leftArrow: false, useBar: true },
-    // 主体高度
-    infoHeight: '',
-  },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  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 () {
-
-  }
-})

+ 0 - 8
pages/user copy/detail.less

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

+ 0 - 5
pages/user copy/detail.wxml

@@ -1,5 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
-    <view slot="info" class="main" style="height:{{infoHeight}}px;">
-        模板
-    </view>
-</mobile-main>

+ 0 - 7
pages/user copy/detail.wxss

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

+ 38 - 1
pages/user/detail.js

@@ -7,17 +7,54 @@ Page({
    * 页面的初始数据
    */
   data: {
-    frameStyle: { useTop: true, name: '基本信息', leftArrow: false, useBar: true },
+    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()
   },

+ 35 - 1
pages/user/detail.less

@@ -3,6 +3,40 @@
     width: 100%;
 
     .one {
-        text-align: center; 
+        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;
+        }
     }
 }

+ 83 - 2
pages/user/detail.wxml

@@ -1,5 +1,86 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
-    <view slot="info" class="main" style="height:{{infoHeight}}px;">
-        模板
+  <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>

+ 28 - 0
pages/user/detail.wxss

@@ -3,5 +3,33 @@
   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;
+}

+ 25 - 1
pages/user/index.js

@@ -10,13 +10,37 @@ Page({
     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 () {
-    console.log('1');
+    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 })
   },
   /**
    * 生命周期函数--监听页面加载

+ 88 - 1
pages/user/index.less

@@ -1,4 +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;
+  }

+ 0 - 10
pages/user/index.wxml

@@ -1,10 +0,0 @@
-<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>
-    </view>
-</mobile-main>

+ 71 - 0
pages/user/index.wxss

@@ -2,3 +2,74 @@
   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;
+}