YY 3 年之前
父節點
當前提交
0fe50ee1d5

+ 57 - 0
commpents/upload/index.js

@@ -0,0 +1,57 @@
+// commpents/mobile-frame/mobile-main.js
+const app = getApp()
+Component({
+  /**
+   * 组件的属性列表
+   */
+  options: { multipleSlots: true },
+  properties: {
+    list: { type: 'array', value: [] },
+    count: { type: Number, value: 1 },
+    previewSize: { type: String, value: '60' }
+  },
+
+  // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
+  attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
+  ready: function () { },
+  pageLifetimes: {
+    // 组件所在页面的生命周期函数
+    show: function () { },
+    hide: function () { },
+    resize: function () { },
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    // 图片上传
+    imgUpload(event) {
+      const { file } = event.detail;
+      wx.uploadFile({
+        url: app.globalData.fileUrl + '/files/consumables/market/upload',
+        filePath: file.url,
+        name: 'file',
+        formData: {},
+        success: (res) => {
+          let arr = JSON.parse(res.data);
+          if (res.statusCode == 200) {
+            this.triggerEvent('imgUpload', { name: arr.name, url: `${app.globalData.imageUrl}` + arr.uri, uri: arr.uri })
+          } else {
+            wx.showToast({ title: `${res.errMsg}`, icon: 'fail', duration: 2000 })
+          }
+        }
+      })
+    },
+    // 图片删除
+    imgDel(e) {
+      this.triggerEvent('imgDel', { file: e.detail.file, index: e.detail.index })
+    }
+  }
+})
+

+ 4 - 0
commpents/upload/index.json

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

+ 1 - 0
commpents/upload/index.wxml

@@ -0,0 +1 @@
+<van-uploader file-list="{{list}}" max-count="{{count}}" bind:after-read="imgUpload" bind:delete="imgDel" preview-size="{{previewSize}}" />

+ 1 - 0
commpents/upload/index.wxss

@@ -0,0 +1 @@
+/* commpents/upload/index.wxss */

+ 20 - 0
commpents/upload/read.md

@@ -0,0 +1,20 @@
+# 上传图片组件使用说明
+## 参数
+### 图片存储列表:list
+### 图片上传数量限制:count
+### 自定义预览大小:previewSize
+
+## 方法
+### 上传图片---imgUpload
+### 传回父组件参数,图片名称:name,图片完整地址:url,图片地址:uri
+### 父组价接收参数变量:e.detail
+
+### 删除图片---imgDel
+### 传回父组件参数:图片数据:file,图片所在列表下标:index
+### 父组件接收参数变量:e.detail
+
+## 引用组件
+### json:"vanupload": "/commpents/upload/index"
+### 组件使用:<vanupload></vanupload>
+### 参数传值方式:list="{{list}}"
+### 方法传值方式:bind:imgUpload="imgUpload"

+ 133 - 133
pages/apply/index.less

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

+ 0 - 4
pages/home/index.js

@@ -79,11 +79,7 @@ Page({
   },
   // 监听用户是否登录
   watchLogin: function () {
-<<<<<<< HEAD
-    let data = { type: '6' }
-=======
     let data = { type: '4' }
->>>>>>> 4a6b6903e6a3f0c706217a15a1196d73c0af8335
     this.searchRouter(data);
     // wx.getStorage({
     // key: 'user',

+ 36 - 5
pages/indepot/detail.js

@@ -1,5 +1,6 @@
 // pages/login/login.js
 import WxValidate from '../../utils/wxValidate';
+const { stock_type } = require('../../utils/dict');
 const app = getApp()
 Page({
 
@@ -10,6 +11,7 @@ Page({
         frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
         // 主体高度
         infoHeight: '',
+        id:'',
         form: {},
         // 弹框
         dialog: { title: '添加商品', show: false, type: '1' },
@@ -24,10 +26,7 @@ Page({
         img_url: [],
         typeList: [],
         stock_type: '',
-        stock_typeList: [
-            { value: '1', label: '固定资产' },
-            { value: '2', label: '商品' },
-        ]
+        stock_typeList: stock_type
     },
     initValidate() {
         const rules = { register_name: { required: true, }, register_phone: { required: true, }, register_date: { required: true, }, reason: { required: true, } }
@@ -107,7 +106,14 @@ Page({
     },
     // 提交保存
     onSubmit: function (e) {
-        console.log(e.detail.value);
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            console.log(params);
+        }
     },
     /**
      * 生命周期函数--监听页面加载
@@ -117,9 +123,34 @@ Page({
         this.searchOther();
         //验证规则函数
         this.initValidate()
+        if (options.id) this.setData({ id: options.id })
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight()
     },
+    // 监听用户是否登录
+    watchLogin: function () {
+        const that = this;
+        let id = that.data.id;
+        if (id) {
+            // 如果有ID查询数据详情,赋值给form
+        }
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
+    },
     // 查询其他信息
     searchOther: function () {
     },

+ 1 - 0
pages/indepot/detail.less

@@ -57,6 +57,7 @@
             .order_2 {
                 float: left;
                 width: 100%;
+                margin-top: 2%;
                 .list {
                     margin: 0 0 8px 0;
                     background-color: #f9f9f9;

+ 1 - 0
pages/indepot/detail.wxss

@@ -50,6 +50,7 @@
 .main .one .order .order_2 {
   float: left;
   width: 100%;
+  margin-top: 2%;
 }
 .main .one .order .order_2 .list {
   margin: 0 0 8px 0;

+ 24 - 6
pages/indepot/index.js

@@ -10,11 +10,11 @@ Page({
         // 主体高度
         infoHeight: '',
         // 采购申请
-        list: [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }],
+        list: [],
         // 弹框
         dialog: { title: '详细信息', show: false, type: '1' },
         // 详细信息
-        info: { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] },
+        info: {},
     },
     back: function () {
         wx.navigateBack({ url: '/pages/home/index' })
@@ -25,18 +25,37 @@ Page({
     },
     // 详细信息
     toView: function (e) {
+        let data = { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] }
+        this.setData({ info: data })
         this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        this.search();
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight();
     },
-    search: function () {
-        console.log("查询");
+    // 监听用户是否登录
+    watchLogin: function () {
+        let data = [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }]
+        this.setData({ list: data })
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
     },
     // 计算高度
     searchHeight: function () {
@@ -60,7 +79,6 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        this.search();
     },
 
     /**

+ 1 - 1
pages/indepot/index.less

@@ -106,7 +106,7 @@
 
         .order_2 {
             float: left;
-            width: 99%;
+            width: 95%;
             padding: 0 5px;
             margin: 5px 0 0 0;
 

+ 1 - 1
pages/indepot/index.wxss

@@ -88,7 +88,7 @@
 }
 .dialog .order .order_2 {
   float: left;
-  width: 99%;
+  width: 95%;
   padding: 0 5px;
   margin: 5px 0 0 0;
 }

+ 1 - 1
pages/market/detail.js

@@ -159,4 +159,4 @@ Page({
    onShareAppMessage: function () {
 
    }
-})
+})

+ 1 - 1
pages/market/detail.json

@@ -3,4 +3,4 @@
   "usingComponents": {
     "mobile-main": "/commpents/mobile-frame/mobile-main"
   }
-}
+}

+ 1 - 1
pages/market/detail.wxml

@@ -83,4 +83,4 @@
       </form>
     </view>
   </view>
-</mobile-main>
+</mobile-main>

+ 34 - 1
pages/outdepot/detail.js

@@ -10,6 +10,7 @@ Page({
     frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
+    id: '',
     form: {},
     // 弹框
     dialog: { title: '添加商品', show: false, type: '1' },
@@ -71,7 +72,14 @@ Page({
   },
   // 提交保存
   onSubmit: function (e) {
-    console.log(e.detail.value);
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+    }
   },
   /**
    * 生命周期函数--监听页面加载
@@ -79,9 +87,34 @@ Page({
   onLoad: function (options) {
     //验证规则函数
     this.initValidate()
+    if (options.id) this.setData({ id: options.id })
+    // 监听用户是否登录
+    this.watchLogin();
     // 计算高度
     this.searchHeight()
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    const that = this;
+    let id = that.data.id;
+    if (id) {
+      // 如果有ID查询数据详情,赋值给form
+    }
+    // wx.getStorage({
+    // key: 'user',
+    // success: res => {
+    //   if (res.data) {
+    //     // 查询菜单
+    //     if (res.data) this.searchRouter(res.data);
+    //     res.data.type = type.find((i) => i.value == res.data.type).label;
+    //     if (res.data) this.setData({ userInfo: res.data });
+    //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+    //   } else {
+    //     wx.redirectTo({ url: '/pages/login/index', })
+    //   }
+    // }
+    // })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 180 - 147
pages/outdepot/detail.less

@@ -1,167 +1,200 @@
 .main {
-    position: relative;
-    width: 100%;
+  position: relative;
+  width: 100%;
+
+  .one {
+    float: left;
+    width: 95%;
+    padding: 10px;
 
-    .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: 10px 0;
+      box-shadow: 0 0 5px #000000;
+      margin: 0 0 10px 0;
+      border-radius: 5px;
+
+      .left {
         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;
-          }
-          
+        margin: 0 10px;
       }
-      .save {
+
+      .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;
       }
-      .save button {
-        margin: 10px;
+
+      .order_1 button {
+        margin: 0 5px;
       }
-      .search_1 {
+
+      .order_2 {
         float: left;
-        width: 95%;
-        padding: 0 8px;
-        height: 40px;
-        overflow: hidden;
-        border-bottom: 1px dashed #000000;
+        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;
+            }
+          }
+        }
       }
-      .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;
+.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;
     }
-      .search_2 {
+
+    .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 {
+      float: left;
+      width: 100%;
+      margin: 8px 0 0 0;
+      border-radius: 6px;
+      box-shadow: 0 0 5px #cccccc;
+
+      .name {
         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;
-              }
-              
+        width: 98%;
+        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;
-  }
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 4 - 0
pages/outdepot/detail.wxss

@@ -136,11 +136,15 @@
   margin: 0 0 8px 0;
 }
 .dialog_1 .search_2 .search_2list {
+  float: left;
+  width: 100%;
   margin: 8px 0 0 0;
   border-radius: 6px;
   box-shadow: 0 0 5px #cccccc;
 }
 .dialog_1 .search_2 .search_2list .name {
+  float: left;
+  width: 98%;
   padding: 0 5px;
 }
 .dialog_1 .search_2 .search_2list .name text {

+ 25 - 6
pages/outdepot/index.js

@@ -10,11 +10,11 @@ Page({
         // 主体高度
         infoHeight: '',
         // 采购申请
-        list: [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }],
+        list: [],
         // 弹框
         dialog: { title: '详细信息', show: false, type: '1' },
         // 详细信息
-        info: { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] },
+        info: {},
     },
     back: function () {
         wx.navigateBack({ url: '/pages/home/index' })
@@ -25,18 +25,37 @@ Page({
     },
     // 详细信息
     toView: function (e) {
+        let data = { id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16', reason: '无', order: [{ name: '商品1', num: '10' }] }
+        this.setData({ info: data })
         this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        this.search();
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight();
     },
-    search: function () {
-        console.log("查询");
+    // 监听用户是否登录
+    watchLogin: function () {
+        let data = [{ id: '1234567', register_name: '登记人', register_phone: '登记人电话', register_date: '2022-5-16' }]
+        this.setData({ list: data })
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
     },
     // 计算高度
     searchHeight: function () {
@@ -60,7 +79,7 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        this.search();
+        
     },
 
     /**

+ 54 - 22
pages/stock/detail.js

@@ -1,5 +1,6 @@
 // pages/login/login.js
 import WxValidate from '../../utils/wxValidate'
+const { stock_type } = require('../../utils/dict');
 const app = getApp()
 Page({
 
@@ -11,25 +12,14 @@ Page({
         // 主体高度
         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: '无' },
+        typeList: [],
+        id: '',
         form: {},
         stock_type: '',
         // 图片
         img_url: [],
         // 商品类型
-        stock_typeList: [
-            { value: '1', label: '固定资产' },
-            { value: '2', label: '商品' },
-        ]
+        stock_typeList: stock_type
     },
     back: function () {
         wx.navigateBack({ url: '/pages/home/index' })
@@ -59,12 +49,18 @@ Page({
         this.setData({ 'form.type_name': data.name })
     },
     // 上传图片
-    afterRead: function (event) {
-        console.log(event.detail);
+    imgUpl: function (e) {
+        const that = this;
+        let data = that.data.img_url;
+        data.push(e.detail)
+        that.setData({ img_url: data })
     },
     // 删除图片
-    uploadDelete: function (e) {
-        console.log(e);
+    imgDel: function (e) {
+        const that = this;
+        let list = that.data.img_url;
+        let arr = list.filter((i, index) => index != e.detail.index)
+        that.setData({ img_url: arr })
     },
     // 取消保存
     onReset: function (e) {
@@ -72,20 +68,56 @@ Page({
     },
     // 提交保存
     onSubmit: function (e) {
-        console.log(e.detail.value);
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            console.log(params);
+        }
     },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        if (options.id) {
-            this.setData({ 'form': this.data.info })
-        }
+        // 查询其他数据
+        this.searchOther()
         //验证规则函数
         this.initValidate()
+        if (options.id) this.setData({ id: options.id })
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight()
     },
+    // 监听用户是否登录
+    watchLogin: function () {
+        const that = this;
+        let id = that.data.id;
+        if (id) {
+            // 如果有ID查询数据详情,赋值给form
+        }
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
+    },
+    // 查询其他信息
+    searchOther: function () {
+        //查询类型
+        console.log('查询类型');
+    },
     // 计算高度
     searchHeight: function () {
         let frameStyle = this.data.frameStyle;

+ 2 - 1
pages/stock/detail.json

@@ -1,6 +1,7 @@
 {
   "component": true,
   "usingComponents": {
-    "mobile-main": "/commpents/mobile-frame/mobile-main"
+    "mobile-main": "/commpents/mobile-frame/mobile-main",
+    "vanupload": "/commpents/upload/index"
   }
 }

+ 1 - 1
pages/stock/detail.wxml

@@ -91,7 +91,7 @@
             <text class="icon iconfont icon-tupian"></text>
           </view>
           <view class="right">
-            <van-uploader file-list="{{ img_url }}" bind:after-read="afterRead" bind:delete="uploadDelete" />
+            <vanupload list="{{img_url}}" count="{{4}}" previewSize="{{80}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></vanupload>
           </view>
         </view>
         <view class="save">

+ 24 - 6
pages/stock/index.js

@@ -11,16 +11,13 @@ Page({
         // 主体高度
         infoHeight: '',
         // 库存列表
-        list: [{ id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' }],
+        list: [],
         // 弹框
         dialog: { title: '详细信息', show: false, type: '1' },
         // 详细信息
-        info: { id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' },
+        info: {},
         // 类型
-        typeList: [
-            { value: '1', label: '固定资产' },
-            { value: '2', label: '商品' },
-        ]
+        typeList: []
     },
     back: function () {
         wx.navigateBack({ url: '/pages/home/index' })
@@ -42,9 +39,30 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight()
     },
+    // 监听用户是否登录
+    watchLogin: function () {
+        let data = [{ id: '1234567', name: '11', type_name: '办公室生活用品', num: '11', money: '111', brief: '无' }]
+        this.setData({ list: data })
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
+    },
     // 计算高度
     searchHeight: function () {
         let frameStyle = this.data.frameStyle;

+ 23 - 5
pages/stock_order/index.js

@@ -25,6 +25,8 @@ Page({
     },
     // 详细信息
     toView: function (e) {
+        let data = { id: '1234567', code: '8', name: '其他' }
+        this.setData({ info: data })
         this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
     // 订单签收
@@ -39,12 +41,29 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        this.search();
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight();
     },
-    search: function (data) {
-        console.log(data);
+    // 监听用户是否登录
+    watchLogin: function () {
+        let data = [{ id: '1234567', code: '8', name: '其他' }]
+        this.setData({ list: data })
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
     },
     // 计算高度
     searchHeight: function () {
@@ -68,7 +87,6 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        this.search();
     },
 
     /**
@@ -105,4 +123,4 @@ Page({
     onShareAppMessage: function () {
 
     }
-})
+})

+ 34 - 5
pages/type/detail.js

@@ -11,7 +11,7 @@ Page({
     // 主体高度
     infoHeight: '',
     // 详细信息
-    info: { id: '1234567', code: '8', name: '其他' },
+    id: '',
     form: {},
   },
   initValidate() {
@@ -29,20 +29,49 @@ Page({
   },
   // 提交保存
   onSubmit: function (e) {
-    console.log(e.detail.value);
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+    }
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    if (options.id) {
-      this.setData({ 'form': this.data.info })
-    }
     //验证规则函数
     this.initValidate();
+    if (options.id) this.setData({ id: options.id })
+    // 监听用户是否登录
+    this.watchLogin();
     // 计算高度
     this.searchHeight()
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    const that = this;
+    let id = that.data.id;
+    if (id) {
+      // 如果有ID查询数据详情,赋值给form
+    }
+    // wx.getStorage({
+    // key: 'user',
+    // success: res => {
+    //   if (res.data) {
+    //     // 查询菜单
+    //     if (res.data) this.searchRouter(res.data);
+    //     res.data.type = type.find((i) => i.value == res.data.type).label;
+    //     if (res.data) this.setData({ userInfo: res.data });
+    //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+    //   } else {
+    //     wx.redirectTo({ url: '/pages/login/index', })
+    //   }
+    // }
+    // })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 23 - 2
pages/type/index.js

@@ -10,11 +10,11 @@ Page({
         frameStyle: { useTop: true, name: '商品类型管理', leftArrow: true, useBar: false },
         // 主体高度
         infoHeight: '',
-        list: [{ id: '1234567', code: '8', name: '其他' }],
+        list: [],
         // 弹框
         dialog: { title: '详细信息', show: false, type: '1' },
         // 详细信息
-        info: { id: '1234567', code: '8', name: '其他' },
+        info: {},
     },
     back: function () {
         wx.navigateBack({ url: '/pages/home/index' })
@@ -36,9 +36,30 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        // 监听用户是否登录
+        this.watchLogin();
         // 计算高度
         this.searchHeight()
     },
+    // 监听用户是否登录
+    watchLogin: function () {
+        let data = [{ id: '1234567', code: '8', name: '其他' }]
+        this.setData({ list: data })
+        // wx.getStorage({
+        // key: 'user',
+        // success: res => {
+        //   if (res.data) {
+        //     // 查询菜单
+        //     if (res.data) this.searchRouter(res.data);
+        //     res.data.type = type.find((i) => i.value == res.data.type).label;
+        //     if (res.data) this.setData({ userInfo: res.data });
+        //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+        //   } else {
+        //     wx.redirectTo({ url: '/pages/login/index', })
+        //   }
+        // }
+        // })
+    },
     // 计算高度
     searchHeight: function () {
         let frameStyle = this.data.frameStyle;

+ 36 - 13
pages/user/detail.js

@@ -1,5 +1,6 @@
 // pages/login/login.js
 import WxValidate from '../../utils/wxValidate'
+const { type } = require('../../utils/dict');
 const app = getApp()
 Page({
 
@@ -10,17 +11,10 @@ Page({
     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: '超级管理员' },
+    id: '',
     form: {},
     // 用户类别
-    typeList: [
-      { value: '0', label: '超级管理员' },
-      { value: '1', label: '科室人员' },
-      { value: '2', label: '办公室人员' },
-      { value: '3', label: '采购部门' },
-      { value: '4', label: '入库管理部门' },
-      { value: '5', label: '财务部门' },
-      { value: '6', label: '供货单位' },]
+    typeList: type
   },
   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, } }
@@ -44,20 +38,49 @@ Page({
   },
   // 提交修改
   onSubmit: function (e) {
-    console.log(e.detail.value)
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+    }
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    if (options.id) {
-      this.setData({ 'form': this.data.info })
-    }
     //验证规则函数
     this.initValidate();
+    if (options.id) this.setData({ id: options.id })
+    // 监听用户是否登录
+    this.watchLogin();
     // 计算高度
     this.searchHeight()
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    const that = this;
+    let id = that.data.id;
+    if (id) {
+      // 如果有ID查询数据详情,赋值给form
+    }
+    // wx.getStorage({
+    // key: 'user',
+    // success: res => {
+    //   if (res.data) {
+    //     // 查询菜单
+    //     if (res.data) this.searchRouter(res.data);
+    //     res.data.type = type.find((i) => i.value == res.data.type).label;
+    //     if (res.data) this.setData({ userInfo: res.data });
+    //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+    //   } else {
+    //     wx.redirectTo({ url: '/pages/login/index', })
+    //   }
+    // }
+    // })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 8 - 5
pages/user/detail.less

@@ -24,8 +24,10 @@
                 }
             }
 
-            .right input {
-                color: #000000;
+            .right {
+                input {
+                    color: #000000;
+                }
             }
         }
 
@@ -33,10 +35,11 @@
             float: left;
             width: 100%;
             text-align: center;
-        }
 
-        .save button {
-            margin: 10px;
+            button {
+                margin: 10px;
+            }
         }
+
     }
 }

+ 41 - 4
pages/user/index.js

@@ -11,11 +11,11 @@ Page({
     // 主体高度
     infoHeight: '',
     // 信息列表
-    list: [{ id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com' }],
+    list: [],
     // 弹框
     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: '超级管理员' },
+    info: {},
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
@@ -35,20 +35,57 @@ Page({
   },
   // 密码重置
   toReset: function (e) {
-    wx.showToast({ title: `密码重置`, icon: 'error', duration: 1000 })
+    wx.showModal({
+      content: '您确定密码重置吗?',
+      title: '密码重置',
+      success: (res) => {
+        if (res.confirm) {
+          wx.showToast({ title: `密码重置成功`, icon: 'success', duration: 2000 })
+        }
+      },
+    })
   },
 
   // 刪除信息
   toDel: function (e) {
-    wx.showToast({ title: `刪除信息`, icon: 'error', duration: 1000 })
+    wx.showModal({
+      content: '您确定刪除信息吗?',
+      title: '刪除信息',
+      success: (res) => {
+        if (res.confirm) {
+          wx.showToast({ title: `刪除信息成功`, icon: 'success', duration: 2000 })
+        }
+      },
+    })
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // 监听用户是否登录
+    this.watchLogin();
     // 计算高度
     this.searchHeight()
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    let data = [{ id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com' }]
+    this.setData({ list: data })
+    // wx.getStorage({
+    // key: 'user',
+    // success: res => {
+    //   if (res.data) {
+    //     // 查询菜单
+    //     if (res.data) this.searchRouter(res.data);
+    //     res.data.type = type.find((i) => i.value == res.data.type).label;
+    //     if (res.data) this.setData({ userInfo: res.data });
+    //     if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
+    //   } else {
+    //     wx.redirectTo({ url: '/pages/login/index', })
+    //   }
+    // }
+    // })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 25 - 25
pages/user/index.less

@@ -7,10 +7,10 @@
         width: 100%;
         text-align: center;
         border-bottom: 1px dashed #000000;
-    }
 
-    .one button {
-        margin: 10px;
+        button {
+            margin: 10px;
+        }
     }
 
     .two {
@@ -38,20 +38,22 @@
                     font-size: 14px;
                     color: #666666;
                     padding: 0 10px;
-                }
 
-                .otherInfo text {
-                    color: #000000;
+                    text {
+                        color: #000000;
+                    }
                 }
+
             }
 
             .btn {
                 text-align: center;
-            }
 
-            .btn button {
-                margin: 0 5px;
+                button {
+                    margin: 0 5px;
+                }
             }
+
         }
     }
 }
@@ -62,30 +64,28 @@
     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 {
+    .dialog_1 {
+        .content {
             float: left;
             margin: 0 10px;
-        }
 
-        .left text {
-            font-size: 14px;
-            color: #666666;
+            text {
+                font-size: 14px;
+                color: #666666;
+            }
         }
 
-        .right input {
-            font-size: 12px;
+
+        .right {
+            input {
+                font-size: 12px;
+            }
         }
     }
+
 }
+
 .van-dialog__header {
     padding-top: 0 !important;
     padding: 10px 0 !important;
-  }
+}

+ 33 - 31
pages/user/index.wxml

@@ -23,37 +23,39 @@
 </mobile-main>
 <van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
     <view class="dialog">
-        <view class="content">
-            <view class="left"><text>姓名:</text></view>
-            <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>电话:</text></view>
-            <view class="right"><input name="phone" value="{{info.phone}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>电子邮箱:</text></view>
-            <view class="right"><input name="email" value="{{info.email}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>联系地址:</text></view>
-            <view class="right"><input name="address" value="{{info.address}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>部门:</text></view>
-            <view class="right"><input name="dept" value="{{info.dept}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>职务:</text></view>
-            <view class="right"><input name="zw" value="{{info.zw}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>工作单位:</text></view>
-            <view class="right"><input name="company" value="{{info.company}}" disabled></input></view>
-        </view>
-        <view class="content">
-            <view class="left"><text>用户类型:</text></view>
-            <view class="right"><input name="type" value="{{info.type}}" disabled></input></view>
+        <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+            <view class="content">
+                <view class="left"><text>姓名:</text></view>
+                <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>电话:</text></view>
+                <view class="right"><input name="phone" value="{{info.phone}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>电子邮箱:</text></view>
+                <view class="right"><input name="email" value="{{info.email}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>联系地址:</text></view>
+                <view class="right"><input name="address" value="{{info.address}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>部门:</text></view>
+                <view class="right"><input name="dept" value="{{info.dept}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>职务:</text></view>
+                <view class="right"><input name="zw" value="{{info.zw}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>工作单位:</text></view>
+                <view class="right"><input name="company" value="{{info.company}}" disabled></input></view>
+            </view>
+            <view class="content">
+                <view class="left"><text>用户类型:</text></view>
+                <view class="right"><input name="type" value="{{info.type}}" disabled></input></view>
+            </view>
         </view>
     </view>
 </van-dialog>

+ 5 - 5
pages/user/index.wxss

@@ -42,7 +42,7 @@
   text-align: center;
 }
 .main .two .list .btn button {
-  margin: 0 5px;
+  margin: 2px 5px;
 }
 .dialog {
   min-height: 30px;
@@ -50,7 +50,7 @@
   overflow-y: auto;
   padding: 0 8px;
 }
-.dialog .content {
+.dialog .dialog_1 .content {
   float: left;
   width: 100%;
   padding: 8px 0;
@@ -58,15 +58,15 @@
   margin: 0 0 5px 0;
   background-color: #f1f1f1;
 }
-.dialog .content .left {
+.dialog .dialog_1 .content .left {
   float: left;
   margin: 0 10px;
 }
-.dialog .content .left text {
+.dialog .dialog_1 .content .left text {
   font-size: 14px;
   color: #666666;
 }
-.dialog .content .right input {
+.dialog .dialog_1 .content .right input {
   font-size: 12px;
 }
 .van-dialog__header {