Просмотр исходного кода

核对记录表统计方式改造

fangq 4 лет назад
Родитель
Сommit
f9728e01f2
3 измененных файлов с 37 добавлено и 23 удалено
  1. 1 1
      src/api/system/dict.js
  2. 35 21
      src/views/report/reportlist.vue
  3. 1 1
      src/views/system/dict.vue

+ 1 - 1
src/api/system/dict.js

@@ -57,7 +57,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/api/blade-system/dict/submit',
+    url: '/api/blade-system/dict/update',
     method: 'post',
     data: row
   })

+ 35 - 21
src/views/report/reportlist.vue

@@ -55,6 +55,7 @@
   import {getDeptTree, getTree} from "@/api/system/dept";
   import CheckChart from "../../components/chart/check-chart";
   import {getReport} from "../../api/bank/home";
+  import {dateFormat} from "../../util/date";
 
 export default {
   components: {CheckChart},
@@ -132,18 +133,10 @@ export default {
               trigger: "blur"
             }]
           },*/
-         /* {
+          {
             label: "核對日期",
-            prop: "date",
-            type: "datetime",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-            rules: [{
-              required: true,
-              message: "请输入核對日期",
-              trigger: "blur"
-            }]
-          },*/
+            prop: "checkDate",
+          },
           {
             label: "日期",
             prop: "dateRange",
@@ -156,11 +149,27 @@ export default {
             editDisplay: false,
             viewDisplay: false,
             search: true,
-            rules: [{
-              required: true,
-              message: "请输入交接日期",
-              trigger: "blur"
-            }]
+          },
+          {
+            label: "週",
+            prop: "week",
+            type: "week",
+            format: "yyyy 第 WW 週",
+            hide: true,
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: false,
+            search: false,
+          },
+          {
+            label: "月",
+            prop: "month",
+            type: "month",
+            hide: true,
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: false,
+            search: false,
           },
           {
             label: "分類",
@@ -256,11 +265,6 @@ export default {
     }
   },
   mounted() {
-    getDeptTree().then(res => {
-      const column = this.findObject(this.option.column, "orgNos");
-      let treeData = getTree(res.data.data, this.userInfo.dept_id);
-      column.dicData = treeData;
-    });
   },
   methods: {
     handleInit(){
@@ -286,6 +290,10 @@ export default {
     },
     handleClick(tab, event) {
       this.cycle = tab.name;
+      this.findObject(this.option.column, 'dateRange').search = tab.name == 'day';
+      this.findObject(this.option.column, 'week').search = tab.name == 'week';
+      this.findObject(this.option.column, 'month').search = tab.name == 'month';
+
       this.onLoad(this.page);
     },
     beforeOpen(done, type) {
@@ -317,6 +325,12 @@ export default {
         params.date_begin = params.dateRange[0], params.date_end = params.dateRange[1];
         params.dateRange = null;
       }
+      if (params.week){
+        params.date_begin = dateFormat(params.week, "yyyy-MM-dd");
+      }
+      if (params.month){
+        params.date_begin = dateFormat(params.month, "yyyy-MM-dd");
+      }
 
       this.query = params;
       this.page.currentPage = 1;

+ 1 - 1
src/views/system/dict.vue

@@ -29,7 +29,7 @@
           v-if="permission.dict_delete"
           plain
           @click="handleDelete"
-        >删 除
+        >删 除123
         </el-button>
       </template>
       <template slot-scope="scope" slot="menu">