xiaohaizhao %!s(int64=2) %!d(string=hai) anos
pai
achega
b0e4d4c0f7

+ 86 - 2
packageA/report/index.js

@@ -8,12 +8,73 @@ Page({
             title: "我发出的",
             id: "SendOut"
         }],
-        active: "Receive"
+        active: "Receive",
+        filterShow: false,
+        filtratelist: [{
+            label: "模板类型",
+            index: null,
+            showName: "reportname", //显示字段
+            valueKey: "sys_workreportmodelid", //返回Key
+            selectKey: "sys_workreportmodelid", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: []
+        }, {
+            label: "阅读状态",
+            index: null,
+            showName: "name", //显示字段
+            valueKey: "readstatus", //返回Key
+            selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: [{
+                name: "全部",
+                value: ""
+            }, {
+                name: "已读",
+                value: "1"
+            }, {
+                name: "未读",
+                value: "0"
+            }]
+        }],
+        isread: {
+            label: "阅读状态",
+            index: null,
+            showName: "name", //显示字段
+            valueKey: "readstatus", //返回Key
+            selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: [{
+                name: "全部",
+                value: ""
+            }, {
+                name: "已读",
+                value: "1"
+            }, {
+                name: "未读",
+                value: "0"
+            }]
+        },
+        where: {
+            condition: "",
+
+        }
     },
     onLoad(options) {
         this.getList();
     },
     onChange(e) {
+        let list = this.selectComponent("#Yl_Filtrate1").data.list;
+        if (e.detail.name == 'SendOut') {
+            this.data.isread = list[1];
+            this.setData({
+                filtratelist: [list[0]]
+            })
+        } else {
+            list.push(this.data.isread)
+            this.setData({
+                filtratelist: list
+            })
+        }
         this.setData({
             active: e.detail.name
         });
@@ -39,7 +100,8 @@ Page({
                 mask: true
             })
             this.setData({
-                modelList: res.data
+                modelList: res.data,
+                "filtratelist[0].list": res.data
             })
         })
     },
@@ -55,5 +117,27 @@ Page({
     /* Picker选择器选择新建模版 */
     onPickerSelected(e) {
         this.newData("", e.detail.value)
+    },
+    /* 搜索 */
+    onSearch({
+        detail
+    }) {
+        if (this.data.where.condition == detail) return;
+        this.data.where.condition = detail;
+        this.selectComponent("#" + this.data.active).getList(true);
+    },
+    /* 筛选 */
+    handleFilter({
+        detail
+    }) {
+        let condition = this.data.where.condition;
+        this.data.where = detail;
+        this.data.where.condition = condition;
+        this.selectComponent("#" + this.data.active).getList(true);
+    },
+    onClick() {
+        this.setData({
+            filterShow: true
+        })
     }
 })

+ 2 - 1
packageA/report/index.json

@@ -1,7 +1,8 @@
 {
     "usingComponents": {
         "Receive": "./modules/receive/index",
-        "SendOut": "./modules/sendOut/index"
+        "SendOut": "./modules/sendOut/index",
+        "Yl_Filtrate1": "/components/Yl_Filtrate1/index"
     },
     "navigationBarTitleText": "工作汇报"
 }

+ 4 - 1
packageA/report/index.scss

@@ -1 +1,4 @@
-/* packageA/report/index.wxss */
+page {
+    height: 100vw;
+    overflow: hidden;
+}

+ 7 - 1
packageA/report/index.wxml

@@ -1,3 +1,8 @@
+<van-search shape='round' placeholder="请输入搜索关键词" use-action-slot bind:clear='onSearch' bind:search="onSearch">
+    <navigator style="padding:0 20rpx; color: #666;" url="#" slot="action" bind:tap="onClick">
+        <text class="iconfont icon-shaixuan" style="margin-right:10rpx;" />筛选
+    </navigator>
+</van-search>
 <van-tabs active="{{ active }}" title-active-color='var(--assist)' color='var(--assist)' bind:change="onChange">
     <van-tab wx:for="{{tabs}}" wx:key="id" title="{{item.title}}" name='{{item.id}}' />
 </van-tabs>
@@ -17,4 +22,5 @@
     <picker mode="selector" wx:else range="{{modelList}}" range-key='reportname' bindchange='onPickerSelected'>
         <Yl_FloatingButton />
     </picker>
-</block>
+</block>
+<Yl_Filtrate1 id='Yl_Filtrate1' show='{{filterShow}}' list="{{filtratelist}}" bindhandle="handleFilter" />

+ 10 - 6
packageA/report/insert.wxml

@@ -4,13 +4,17 @@
     </view>
     {{date}}
 </view>
-
-<view class="inputs {{item.editable==0?'disabled':''}}" wx:for="{{list}}" wx:key="rowindex">
-    <view style="margin-bottom: 20rpx;">
-        {{item.title}}
+<block wx:for="{{list}}" wx:key="rowindex">
+    <!-- {{item.editable==0?'disabled':''}} -->
+    <view class="inputs" wx:if="{{item.editable!=0}}">
+        <view style="margin-bottom: 20rpx;">
+            {{item.title}}
+        </view>
+        <!-- disabled='{{item.editable==0}}' -->
+        <textarea value="{{item.content}}" placeholder="请输入..." auto-height maxlength='-1' data-index="{{index}}" data-item="{{item}}" bindinput='onInput' />
     </view>
-    <textarea value="{{item.content}}" disabled='{{item.editable==0}}' placeholder="请输入..." auto-height maxlength='-1' data-index="{{index}}" data-item="{{item}}" bindinput='onInput' />
-</view>
+
+</block>
 
 <view class="inputs">
     <view class="files-box">

+ 2 - 8
packageA/report/modules/receive/index.js

@@ -1,17 +1,10 @@
 const _Http = getApp().globalData.http;
 Component({
-    properties: {
-
-    },
     data: {
         content: {
             "pageNumber": 1,
             "pageTotal": 1,
-            "pageSize": 20,
-            "where": {
-                "condition": "",
-                "sys_workreportmodelid": ""
-            }
+            "pageSize": 20
         },
     },
     methods: {
@@ -19,6 +12,7 @@ Component({
             let content = this.data.content;
             if (init) content.pageNumber = 1;
             if (content.pageNumber > content.pageTotal) return;
+            content.where = getCurrentPages().find(v => v.__route__ == 'packageA/report/index').data.where;
             _Http.basic({
                 "id": "20230524103102",
                 content

+ 9 - 8
packageA/report/modules/sendOut/index.js

@@ -1,17 +1,10 @@
 const _Http = getApp().globalData.http;
 Component({
-    properties: {
-
-    },
     data: {
         content: {
             "pageNumber": 1,
             "pageTotal": 1,
-            "pageSize": 20,
-            "where": {
-                "condition": "",
-                "sys_workreportmodelid": ""
-            }
+            "pageSize": 20
         },
         list: []
     },
@@ -20,6 +13,7 @@ Component({
             let content = this.data.content;
             if (init) content.pageNumber = 1;
             if (content.pageNumber > content.pageTotal) return;
+            content.where = getCurrentPages().find(v => v.__route__ == 'packageA/report/index').data.where;
             _Http.basic({
                 "id": "20230524102802",
                 content
@@ -38,6 +32,13 @@ Component({
                 })
                 getCurrentPages().find(v => v.__route__ == 'packageA/report/index').selectComponent('#ListBox').RefreshToComplete();
             })
+        },
+        onSearch({
+            detail
+        }) {
+            if (this.data.content.where.condition == detail) return;
+            this.data.content.where.condition = detail
+            this.getList(true);
         }
     }
 })

+ 4 - 0
pages/tabbar/home/index.js

@@ -77,6 +77,10 @@ Page({
                     name: "通讯录",
                     path: "/packageA/contacts/index",
                     icon: "work-xiaochengxutongxunlu"
+                }, {
+                    name: "工作汇报",
+                    path: "/packageA/report/index",
+                    icon: "work-gongzuohuibao"
                 }];
                 let app = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['通用']),
                     list = [];

+ 7 - 0
project.private.config.json

@@ -35,6 +35,13 @@
                     "query": "id=226",
                     "launchMode": "default",
                     "scene": null
+                },
+                {
+                    "name": "工作汇报",
+                    "pathName": "packageA/report/index",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
                 }
             ]
         }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
static/stylesheet.wxss


+ 62 - 59
static/work-icon.wxss

@@ -1,226 +1,229 @@
 @import "./work.wxss";
 
 .work {
-	font-family: "work" !important;
-	font-size: 16px;
-	font-style: normal;
-	-webkit-font-smoothing: antialiased;
-	-moz-osx-font-smoothing: grayscale;
+    font-family: "work" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
 }
 
+.work-gongzuohuibao:before {
+    content: "\e601";
+}
 
 .work-xiaoxigundong:before {
-	content: "\e674";
+    content: "\e674";
 }
 
 .work-shenqingdan:before {
-	content: "\e686";
+    content: "\e686";
 }
 
 .work-gongdan:before {
-	content: "\e687";
+    content: "\e687";
 }
 
 .work-yewuyuanfuwushenqingdan:before {
-	content: "\e688";
+    content: "\e688";
 }
 
 .work-shenqingdanguanli:before {
-	content: "\e689";
+    content: "\e689";
 }
 
 .work-jujianfeijiesuan:before {
-	content: "\e684";
+    content: "\e684";
 }
 
 .work-dakuanpingzheng:before {
-	content: "\e685";
+    content: "\e685";
 }
 
 .work-yingxiaogongju:before {
-	content: "\e683";
+    content: "\e683";
 }
 
 .work-a-shangxueyuanxuexi:before {
-	content: "\e63d";
+    content: "\e63d";
 }
 
 .work-a-tibaoguanlitibao:before {
-	content: "\e63f";
+    content: "\e63f";
 }
 
 .work-xiaochengxu_xiaoshouyuce:before {
-	content: "\e68e";
+    content: "\e68e";
 }
 
 .work-gouwuche:before {
-	content: "\e682";
+    content: "\e682";
 }
 
 .work-a-woderenwuzhongxin:before {
-	content: "\e649";
+    content: "\e649";
 }
 
 .work-a-wodemendianxinxidizhi:before {
-	content: "\e64b";
+    content: "\e64b";
 }
 
 .work-xiaochengxutongxunlu:before {
-	content: "\e68c";
+    content: "\e68c";
 }
 
 .work-xiaoshouxiansuo:before {
-	content: "\e680";
+    content: "\e680";
 }
 
 .work-xiaochengxu_xiaoshoumubiao:before {
-	content: "\e68d";
+    content: "\e68d";
 }
 
 .work-tianjialianxiren:before {
-	content: "\e690";
+    content: "\e690";
 }
 
 .work-a-shouyejingangqushangxueyuan:before {
-	content: "\e60d";
+    content: "\e60d";
 }
 
 .work-a-shouyejingangquhehuoren:before {
-	content: "\e60e";
+    content: "\e60e";
 }
 
 .work-a-shouyejingangqutongxunlu:before {
-	content: "\e610";
+    content: "\e610";
 }
 
 .work-a-shouyejingangqutonggao:before {
-	content: "\e613";
+    content: "\e613";
 }
 
 .work-a-shouyejingangqutuiguangsucai:before {
-	content: "\e614";
+    content: "\e614";
 }
 
 .work-a-shouyejingangquxiaoshouxiansuo:before {
-	content: "\e616";
+    content: "\e616";
 }
 
 .work-a-shouyejingangqutibao:before {
-	content: "\e617";
+    content: "\e617";
 }
 
 .work-a-shouyejingangquyingxiaowuliao:before {
-	content: "\e618";
+    content: "\e618";
 }
 
 .work-webshangxueyuan:before {
-	content: "\e665";
+    content: "\e665";
 }
 
 .work-webtonggaoguanli:before {
-	content: "\e666";
+    content: "\e666";
 }
 
 .work-webtibaoguanli:before {
-	content: "\e667";
+    content: "\e667";
 }
 
 .work-webyingxiaowuliao:before {
-	content: "\e668";
+    content: "\e668";
 }
 
 .work-kehu:before {
-	content: "\e6ba";
+    content: "\e6ba";
 }
 
 .work-hetong:before {
-	content: "\e6bb";
+    content: "\e6bb";
 }
 
 .work-xiangmubaojia:before {
-	content: "\e6bc";
+    content: "\e6bc";
 }
 
 .work-gonghaikehu:before {
-	content: "\e6bd";
+    content: "\e6bd";
 }
 
 .work-xiangmushangji:before {
-	content: "\e6be";
+    content: "\e6be";
 }
 
 .work-jingzhengduishou:before {
-	content: "\e6c4";
+    content: "\e6c4";
 }
 
 .work-shichanghuodong:before {
-	content: "\e6c5";
+    content: "\e6c5";
 }
 
 .work-gonghaixiansuo:before {
-	content: "\e6c6";
+    content: "\e6c6";
 }
 
 .work-zuijinshiyong:before {
-	content: "\e6df";
+    content: "\e6df";
 }
 
 .work-tongyong:before {
-	content: "\e6e0";
+    content: "\e6e0";
 }
 
 .work-E-dingdan:before {
-	content: "\e6e1";
+    content: "\e6e1";
 }
 
 .work-CRM:before {
-	content: "\e6e2";
+    content: "\e6e2";
 }
 
 .work-E-fuwu:before {
-	content: "\e6e3";
+    content: "\e6e3";
 }
 
 .work-a-biaoqianlanshouyexuanzhong:before {
-	content: "\e606";
+    content: "\e606";
 }
 
 .work-shouhuo:before {
-	content: "\e677";
+    content: "\e677";
 }
 
 .work-dingdan:before {
-	content: "\e678";
+    content: "\e678";
 }
 
 .work-zhanghu:before {
-	content: "\e679";
+    content: "\e679";
 }
 
 .work-kaipiao:before {
-	content: "\e67a";
+    content: "\e67a";
 }
 
 .work-tuifan:before {
-	content: "\e67b";
+    content: "\e67b";
 }
 
 .work-shangcheng:before {
-	content: "\e67c";
+    content: "\e67c";
 }
 
 .work-shujuchaxun:before {
-	content: "\e67d";
+    content: "\e67d";
 }
 
 .work-cuxiaohuodong:before {
-	content: "\e67e";
+    content: "\e67e";
 }
 
 .work-yejimubiao:before {
-	content: "\e67f";
+    content: "\e67f";
 }
 
 .work-gongjuchaxun:before {
-	content: "\e681";
+    content: "\e681";
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
static/work.wxss


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio