Browse Source

914&915问题修复

fangq 4 years ago
parent
commit
2321799e10

+ 5 - 5
src/components/chart/check-chart.vue

@@ -9,7 +9,7 @@
     name: "check-chart",
     data() {
       return {
-        titles: ['每日監控圖表', '每週監控圖表', '每月監控圖表'],
+        titles: {day: '每日監控圖表', week: '每週監控圖表', month: '每月監控圖表'},
         option: {
           title: {
             text: '每日监控图表',
@@ -63,9 +63,9 @@
       }
     },
     props: {
-      dataType: {
-        type: Number,
-        default: 1
+      cycle: {
+        type: String,
+        default: 'day'
       },
       data: {
         type: Object,
@@ -73,7 +73,7 @@
       }
     },
     mounted() {
-      this.option.title.text = this.titles[this.dataType-1];
+      this.option.title.text = this.titles['' + this.cycle];
       this.option.series[0].data[0].value = this.data.checkedCount;
       this.option.series[0].data[1].value = this.data.noCheckCount;
 

+ 38 - 0
src/components/common/cardswallow-comfirm.vue

@@ -5,8 +5,17 @@
                :data="data"
                @row-update="infoSubmit"
                @row-del="removeItem"
+               @selection-change="selectionChange"
                v-model="form"
                ref="crud2">
+      <template slot="menuLeft">
+        <el-button type="success"
+                   size="small"
+                   icon="el-icon-circle-check"
+                   plain
+                   @click="handleSubmit">批量提交
+        </el-button>
+      </template>
     </avue-crud>
   </div>
 </template>
@@ -20,6 +29,7 @@
       return {
         loading: false,
         data: [],
+        selectionList: [],
         form: {},
         option: {
           height:'auto',
@@ -174,6 +184,15 @@
         }
       }
     },
+    computed: {
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
     props: {
       data: {
         type: Array
@@ -194,9 +213,28 @@
           done();
         });
       },
+      handleSubmit(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        for (let i = 0; i < this.selectionList.length; i++) {
+          let item = this.selectionList[i];
+          cardswallowSubmit(item).then(() => {
+            this.data.splice(item.$index, 1);
+          });
+        }
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+      },
       removeItem(row, index){
         this.data.splice(index, 1)
       },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
     }
   }
 </script>

+ 1 - 1
src/components/common/cardswallow-issue.vue

@@ -13,7 +13,7 @@
       return {
         form: {},
         option: {
-          submitText: "發",
+          submitText: "發",
           emptyBtn: false,
           column: [
             {

+ 9 - 3
src/components/common/flow-settings.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <avue-form ref="form" v-model="form" :option="option" @submit="submit">
+    <avue-form ref="form" v-model="form" :option="option" @submit="submit" @reset-change="test2">
       <template slot="personName" slot-scope="scope">
         <select-dialog-user :id="id" :ehr="ehr" :name="name" :callback="selectCallback"></select-dialog-user>
       </template>
@@ -34,7 +34,7 @@
               slot: true,
               rules: [{
                 required: true,
-                message: "请输入銀行號",
+                message: "請輸入審批人",
                 trigger: "change"
               }]
             },
@@ -43,7 +43,7 @@
               prop: "personNo",
               disabled: true,
               rules: [{
-                required: true,
+                required: false,
                 message: "请输入銀行號",
                 trigger: "blur"
               }]
@@ -72,6 +72,12 @@
       this.form.personName = this.name;
     },
     methods: {
+      test1(){
+        debugger
+      },
+      test2(){
+        this.name = ''
+      },
       selectCallback(row){
         this.form.personId = row.id;
         this.form.personName = row.name;

+ 35 - 6
src/views/bank/cardswallow.vue

@@ -31,7 +31,7 @@
                    icon="el-icon-setting"
                    plain
                    v-if="permission.cardswallow_setting"
-                   @click="handleSetting">設置發
+                   @click="handleSetting">設置發
         </el-button>
         <el-button type="primary"
                    size="small"
@@ -40,16 +40,23 @@
                    v-if="permission.cardswallow_upload"
                    @click="attachBox = true">上 傳
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.cardswallow_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="process" slot-scope="{row, index}">
-        <el-tag size="small " type="primary" plain v-if="row.process == 2">待發佈</el-tag>
-        <el-tag size="small " type="warning" plain v-if="row.process == 3">待確認</el-tag>
-        <el-tag size="small " type="success" plain v-if="row.process == 4">已確認</el-tag>
+        <el-tag size="small " type="primary" plain v-if="row.process == 2">待發</el-tag>
+        <el-tag size="small " type="warning" plain v-if="row.process == 3">待簽收</el-tag>
+        <el-tag size="small " type="success" plain v-if="row.process == 4">已簽收</el-tag>
       </template>
       <template slot="menu" slot-scope="{row, index}">
         <el-button size="small" class="el-button--text" v-if="row.process <= 2" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
         <el-button size="small" class="el-button--text" v-if="row.process <= 2" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 编 辑</el-button>
-        <el-button size="mini " type="primary" plain v-if="permission.cardswallow_issue && row.process == 2 && row.personNo == userInfo.user_ehr" @click="form = row,issueVisible = true">去發</el-button>
+        <el-button size="mini " type="primary" plain v-if="permission.cardswallow_issue && row.process == 2 && row.personNo == userInfo.user_ehr" @click="form = row,issueVisible = true">去發</el-button>
         <el-button size="mini " type="warning" plain v-if="permission.cardswallow_confirm && row.process == 3" @click="form = row,issueVisible = true">去簽收</el-button>
       </template>
     </avue-crud>
@@ -490,6 +497,28 @@
             });
           });
       },
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "自助設備吞沒卡處理" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -533,7 +562,7 @@
           params.sendDate_begin = params.sendDateRange[0], params.sendDate_end = params.sendDateRange[1];
           params.sendDateRange = null;
         }
-        debugger
+
         if (params.sendStatus){
           params.sendStatus = params.sendStatus.join();
         }

+ 85 - 22
src/views/bank/checklist.vue

@@ -1,5 +1,15 @@
 <template>
   <basic-container>
+
+    <el-tabs type="card" v-model="cycle" @tab-click="handleClick">
+      <el-tab-pane label="每日報表" name="day">
+      </el-tab-pane>
+      <el-tab-pane label="每週報表" name="week">
+      </el-tab-pane>
+      <el-tab-pane label="每月報表" name="month">
+      </el-tab-pane>
+    </el-tabs>
+
     <avue-crud :option="option"
                :table-loading="loading"
                :data="data"
@@ -26,8 +36,27 @@
                    v-if="permission.checklist_delete"
                    @click="handleDelete">删 除
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.checklist_download"
+                   @click="handleDownload">下載
+        </el-button>
+      </template>
+
+      <template slot="isChecked" slot-scope="{row, index}">
+        <el-tag size="small " type="primary" plain v-if="row.isChecked == 1">√</el-tag>
       </template>
+
+      <template slot="isCheckedForm" slot-scope="{row, index}">
+        <el-checkbox v-model="row.isChecked"></el-checkbox>
+        <el-tag size="small " type="success" plain v-if="row.isChecked">已核對</el-tag>
+        <el-tag size="small " type="danger" plain v-if="!row.isChecked">未核對</el-tag>
+      </template>
+
     </avue-crud>
+
   </basic-container>
 </template>
 
@@ -42,6 +71,7 @@
   export default {
     data() {
       return {
+        cycle: "day",
         form: {},
         query: {},
         loading: true,
@@ -52,7 +82,10 @@
         },
         selectionList: [],
         option: {
-          height:'auto',
+          /*addTitle: '新增【每日】',
+          editTitle: '編輯【每日】',
+          viewTitle: '查看【每日】',*/
+          height: 'auto',
           calcHeight: 30,
           tip: false,
           searchShow: true,
@@ -188,13 +221,10 @@
             },
             {
               label: "已核對",
-              prop: "checked",
-              type: "checkbox",
-              dicData: [{
-                value: 1
-              }],
+              prop: "isChecked",
+              formslot: true,
               rules: [{
-                required: true,
+                required: false,
                 message: "請勾選已核對",
                 trigger: "blur"
               }]
@@ -271,7 +301,7 @@
       });
       getStandardByCode("checklist").then(res => {
         const data = res.data.data;
-        if (data){
+        if (Object.keys(data).length > 0){
           this.option.addTitle = data.content;
           this.option.editTitle = data.content;
           this.option.viewTitle = data.content;
@@ -279,8 +309,49 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "核對記錄表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
+      handleClick(tab, event) {
+        if (!this.option.addTitle){
+          if (this.cycle == 'day'){
+            this.option.addTitle  = '新增【每日】';
+            this.option.editTitle = '編輯【每日】';
+            this.option.viewTitle = '查看【每日】';
+          }else if (this.cycle == 'week'){
+            this.option.addTitle  = '新增【每週】';
+            this.option.editTitle = '編輯【每週】';
+            this.option.viewTitle = '查看【每週】';
+          }else{
+            this.option.addTitle  = '新增【每月】';
+            this.option.editTitle = '編輯【每月】';
+            this.option.viewTitle = '查看【每月】';
+          }
+        }
+        this.cycle = tab.name;
+        this.onLoad(this.page);
+      },
       rowSave(row, done, loading) {
-        row.isChecked = row.checked[0];
+        row.isChecked = !row.isChecked ? 0 : 1;
         add(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -294,6 +365,7 @@
         });
       },
       rowUpdate(row, index, done, loading) {
+        row.isChecked = !row.isChecked ? 0 : 1;
         update(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -346,9 +418,6 @@
           });
       },
       beforeOpen(done, type) {
-        let arr = [];
-        arr.push(this.form.isChecked)
-        this.form.checked = arr;
         if (type === 'add'){
           let userInfoStr = localStorage.getItem("saber-userInfo");
           let userInfo = JSON.parse(userInfoStr);
@@ -364,17 +433,10 @@
           });
         }
         if (["edit", "view"].includes(type)) {
-          if (type == "view"){
-            this.findObject(this.option.column, "content").tip = this.form.$content;
-            console.log(this.form)
-          }
-          getDetail(this.form.id).then(res => {
+          this.form.isChecked = this.form.isChecked == 1;
+          /*getDetail(this.form.id).then(res => {
             this.form = res.data.data;
-            if (type == "view"){
-              this.findObject(this.option.column, "content").tip = "this.form.$content";
-              console.log(this.form)
-            }
-          });
+          });*/
 
         }
         done();
@@ -422,6 +484,7 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        params.cycle = this.cycle;
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;

+ 93 - 3
src/views/bank/checkwarehouse.vue

@@ -26,11 +26,24 @@
                    v-if="permission.checkwarehouse_delete"
                    @click="handleDelete">删 除
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.checkwarehouse_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="checkPersonNameForm">
         <select-dialog-user :name="form.checkPersonName" :ehr="form.checkPersonNo" :disabled="false" :callback="selectCallback"></select-dialog-user>
       </template>
+
+      <template slot="enclosureForm" slot-scope="{row}">
+        <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-after="uploadAfter" :upload-error="uploadError" :upload-delete="uploadDelete">
+        </avue-form>
+      </template>
     </avue-crud>
+
   </basic-container>
 </template>
 
@@ -47,6 +60,29 @@
     components: {SelectDialogUser},
     data() {
       return {
+        attachBox: false,
+        attachForm: {},
+        attachOption: {
+          submitBtn: false,
+          emptyBtn: false,
+          column: [
+            {
+              // label: '附件上传',
+              prop: 'attachFile',
+              type: 'upload',
+              drag: true,
+              loadText: '模板上传中,请稍等',
+              span: 24,
+              fileSize: 1024,
+              propsHttp: {
+                res: 'data'
+              },
+              name: "namesrc",
+              action: "/api/blade-resource/oss/endpoint/put-file-attach"
+            }
+          ]
+        },
+
         form: {
         },
         query: {},
@@ -298,7 +334,7 @@
             {
               label: "備註(可簡要補充檢查發現情況)",
               prop: "remark",
-              span: 24,
+              // span: 24,
               labelWidth: 150,
               rules: [{
                 required: false,
@@ -328,6 +364,17 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "附件",
+              prop: "enclosure",
+              formslot: true,
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请上傳附件",
+                trigger: "blur"
+              }]
+            },
           ]
         },
         data: []
@@ -368,6 +415,41 @@
       });
     },
     methods: {
+      uploadError(error,column){
+        this.$message.warning(error + ',不能大于' + column.fileSize + 'KB');
+      },
+      uploadAfter(res, done, loading, column) {
+        this.attachForm.attachFile = [res];
+        this.form.enclosure = res.link;
+        this.form.enclosureName = res.originalName;
+        this.attachBox = false;
+        done(res);
+      },
+      uploadDelete(column,file) {
+        return this.$confirm(`是否确定移除该选项?`);
+      },
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "查庫流水賬記錄表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       selectCallback(value){
         this.form.checkPersonNo = value.ehr;
         this.form.checkPersonName = value.name;
@@ -460,7 +542,12 @@
 
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
+            const data = res.data.data;
+            data.name = data.enclosureName;
+            this.attachForm.attachFile = [
+              {label: data.name, value: data.originalName}
+            ];
+            this.form = data;
           });
         }
         done();
@@ -521,5 +608,8 @@
   };
 </script>
 
-<style>
+<style scoped>
+  >>>.el-form-item__content{
+    margin-left: 10px !important;
+  }
 </style>

+ 59 - 5
src/views/bank/goodsuse.vue

@@ -40,6 +40,13 @@
                    v-if="permission.goodsuse_transfer"
                    @click="handleTransfer">一鍵移交
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.goodsuse_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
 
       <template slot="personNameForm">
@@ -96,6 +103,7 @@
 
         sureVisible: false,
 
+        type: '',
         form: {},
         query: {},
         loading: true,
@@ -257,6 +265,18 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "上日餘額",
+              prop: "lastBalance",
+              type: "number",
+              disabled: true,
+              viewDisplay: false,
+              rules: [{
+                required: true,
+                message: "请输入餘額",
+                trigger: "blur"
+              }]
+            },
             {
               label: "餘額",
               prop: "balance",
@@ -448,7 +468,32 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "使用及出入庫登記表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       calcBalance(){
+        if (this.type != 'add'){
+          return;
+        }
         if (!this.form.type || !this.form.useNumber){
           return;
         }
@@ -461,9 +506,10 @@
         getLastByType(this.form.type).then(res => {
           const data = res.data.data;
           let lastBalance = 0;
-          debugger
+
           if (data && Object.keys(data).length > 0){
             lastBalance = data.balance;
+            this.form.lastBalance = lastBalance;
           }
           this.form.balance = lastBalance + this.form.receiptNumber - this.form.writeOffNumber - this.form.useNumber;
         });
@@ -594,8 +640,8 @@
           });
       },
       beforeOpen(done, type) {
+        this.type = type;
         if (type === 'add'){
-
           this.form.writeOffNumber = 0;
           this.form.receiptNumber = 0;
           this.form.handoverDate = dateFormat(new Date(), "yyyy-MM-dd hh:mm");
@@ -605,12 +651,20 @@
             this.form.orgNo = data.orgNo;
           });
 
-          let userInfoStr = localStorage.getItem("saber-userInfo");
-          let userInfo = JSON.parse(userInfoStr);
+          getSetting().then((res) => {
+            let data = res.data.data;
+            if (!!data) {
+              this.form.personId = data.personId;
+              this.form.personNo = data.personNo;
+              this.form.personName = data.personName;
+            }
+          })
 
+          /*let userInfoStr = localStorage.getItem("saber-userInfo");
+          let userInfo = JSON.parse(userInfoStr);
           this.form.personId =userInfo.content.user_id;
           this.form.personNo =userInfo.content.user_ehr;
-          this.form.personName =userInfo.content.user_name;
+          this.form.personName =userInfo.content.user_name;*/
         }
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {

+ 30 - 2
src/views/bank/keypwd.vue

@@ -34,6 +34,13 @@
                    v-if="permission.keypwd_keep_view"
                    @click="keepVisible = true">保管人查詢
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.keypwd_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="receiverNameForm">
         <select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="disabeldReceiver" :callback="selectCallback"></select-dialog-user>
@@ -234,8 +241,6 @@
               label: "數量",
               prop: "number",
               type: "number",
-              tip: "number1",
-              labelTip: "number2",
               disabled: true,
               rules: [{
                 required: true,
@@ -383,6 +388,28 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "網點鎖匙/密碼登記表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       initTypeDict(){
         getKeyType().then(res => {
 
@@ -409,6 +436,7 @@
                 it.dictValue = item.dictValue + '-' + it.dictValue;
                 item.children.push(it)
                 item.hasChildren = true;
+                item.disabled = true;
               }
             })
           })

+ 22 - 0
src/views/bank/message.vue

@@ -242,6 +242,28 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "新開戶退件登記表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       uploadError(error,column){
         this.$message.warning(error + ',不能大于' + column.fileSize + 'KB');
       },

+ 31 - 2
src/views/bank/postchange.vue

@@ -29,9 +29,16 @@
                    size="small"
                    icon="el-icon-setting"
                    plain
-                   v-if="permission.postchange_setting"
+                   v-if="permission.postchange_download"
                    @click="handleSetting">设置審批人
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.postchange_setting"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="process" slot-scope="{row, index}">
         <el-tag size="small " type="warning" plain v-if="row.process == 2">待確認</el-tag>
@@ -556,8 +563,30 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "網點出納主管及專管員崗位表更記錄表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       approveSubmit(row){
-        debugger
+
       },
       handleView(row, index){
         this.viewForm = row;

+ 33 - 4
src/views/bank/returns.vue

@@ -40,6 +40,13 @@
                    v-if="permission.returns_setting"
                    @click="handleSetting">設置發佈人
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.returns_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="menu" slot-scope="{row, index}">
         <el-button size="small" class="el-button--text" v-if="permission.returns_delete && row.process <= 2" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
@@ -198,7 +205,7 @@
                 trigger: "blur"
               }]
             },
-            {
+            /*{
               label: "序號",
               prop: "serialNo",
               rules: [{
@@ -206,7 +213,7 @@
                 message: "请输入序號",
                 trigger: "blur"
               }]
-            },
+            },*/
             {
               label: "支行",
               prop: "subBank",
@@ -484,6 +491,28 @@
           window.console.log('error');
         });
       },
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "新開戶退件登記表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       handleSetting(){
         getSetting().then((res) => {
           let data = res.data.data;
@@ -621,8 +650,8 @@
       },
       searchChange(params, done) {
         if (params.handlingDateRange){
-          params.handlingDate_begin = params.handlingDateRange[0], params.handlingDate_end = params.handlingDate[1];
-          params.handlingDate = null;
+          params.handlingDate_begin = params.handlingDateRange[0], params.handlingDate_end = params.handlingDateRange[1];
+          params.handlingDateRange = null;
         }
         if (params.orgNos){
           params.orgNostr = params.orgNos.join();

+ 29 - 0
src/views/bank/sealhandover.vue

@@ -34,6 +34,13 @@
                    v-if="permission.sealhandover_keep_view"
                    @click="keepVisible = true">保管人查詢
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.sealhandover_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="receiverNameForm">
         <select-dialog-user :name="form.receiverName" :ehr="form.receiverNo" :disabled="false" :callback="selectCallback"></select-dialog-user>
@@ -328,6 +335,28 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "業務印章交接登記表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       handoverSelectCallback(value){
         this.form.handoverPersonNo = value.ehr;
         this.form.handoverPersonName = value.name;

+ 30 - 1
src/views/bank/tellertrunk.vue

@@ -26,6 +26,13 @@
                    v-if="permission.tellertrunk_delete"
                    @click="handleDelete">删 除
         </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-download"
+                   plain
+                   v-if="permission.tellertrunk_download"
+                   @click="handleDownload">下載
+        </el-button>
       </template>
       <template slot="checkPersonNameForm">
         <select-dialog-user :name="form.checkPersonName" :ehr="form.checkPersonNo" :disabled="false" :callback="selectCallback"></select-dialog-user>
@@ -382,7 +389,7 @@
               hide: true,
               rules: [{
                 required: true,
-                message: "请输入附件",
+                message: "请上傳附件",
                 trigger: "blur"
               }]
             },
@@ -426,6 +433,28 @@
       });
     },
     methods: {
+      handleDownload(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        let columns = this.deepClone(this.option.column);
+        for (let i = 0; i < columns.length; i++) {
+          let item = columns[i];
+          if (item.hide || item.prop == 'process'){
+            columns.splice(i, 1);
+            i--;
+          }
+          if (item.type == 'select' || item.type == 'tree'){
+            item.prop = '$' + item.prop;
+          }
+        }
+        this.$Export.excel({
+          title: "櫃員尾箱檢查流水賬記錄表" || new Date().getTime(),
+          columns: columns,
+          data: this.selectionList
+        });
+      },
       uploadError(error,column){
         this.$message.warning(error + ',不能大于' + column.fileSize + 'KB');
       },

+ 10 - 8
src/views/report/abnormal-reportlist.vue

@@ -1,6 +1,6 @@
 <template>
   <basic-container>
-    <el-tabs type="card" @tab-click="handleClick">
+    <el-tabs type="card" v-model="cycle" @tab-click="handleClick">
       <el-tab-pane label="每日報表" name="day">
       </el-tab-pane>
       <el-tab-pane label="每週報表" name="week">
@@ -43,7 +43,7 @@
 
     <el-dialog :append-to-body="true" :modal-append-to-body="false" :visible.sync="chartVisible" title="圖表">
       <div v-if="chartVisible">
-        <check-chart :data-type="dataType" :data="chartData"></check-chart>
+        <check-chart :cycle="cycle" :data="chartData"></check-chart>
       </div>
     </el-dialog>
 
@@ -61,7 +61,8 @@ export default {
   components: {CheckChart},
   data() {
     return {
-      dataType: 1,
+      // dataType: 1,
+      cycle: "day",
       chartData: {},
       chartVisible: false,
 
@@ -318,10 +319,10 @@ export default {
     handleInitAll(){
       getHomeCount().then(res => {
         const data = res.data.data;
-        if (this.dataType == 1){
+        if (this.cycle == 'day'){
           this.chartData = {checkedCount: data.dayCheckedCount, noCheckCount: data.dayNocheckCount};
 
-        }else if (this.dataType == 2){
+        }else if (this.cycle == 'week'){
           this.chartData = {checkedCount: data.weekCheckedCount, noCheckCount: data.weekNocheckCount};
         }else{
           this.chartData = {checkedCount: data.monthCheckedCount, noCheckCount: data.monthNocheckCount};
@@ -336,13 +337,14 @@ export default {
     },
     handleClick(tab, event) {
       // console.log(tab, event);
-      if (tab.name == 'day'){
+      /*if (tab.name == 'day'){
         this.dataType = 1;
       }else if(tab.name == 'week'){
         this.dataType = 2;
       }else if (tab.name == 'month'){
         this.dataType = 3;
-      }
+      }*/
+      this.cycle = tab.name;
       this.onLoad(this.page);
     },
     beforeOpen(done, type) {
@@ -408,7 +410,7 @@ export default {
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      params.dataType = this.dataType;
+      params.cycle = this.cycle;
       params.isChecked = 0; // 未完成
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
         const data = res.data.data;

+ 10 - 8
src/views/report/reportlist.vue

@@ -1,6 +1,6 @@
 <template>
   <basic-container>
-    <el-tabs type="card" @tab-click="handleClick">
+    <el-tabs type="card" v-model="cycle" @tab-click="handleClick">
       <el-tab-pane label="每日報表" name="day">
       </el-tab-pane>
       <el-tab-pane label="每週報表" name="week">
@@ -43,7 +43,7 @@
 
     <el-dialog :append-to-body="true" :modal-append-to-body="false" :visible.sync="chartVisible" title="圖表">
       <div v-if="chartVisible">
-        <check-chart :data-type="dataType" :data="chartData"></check-chart>
+        <check-chart :cycle="cycle" :data="chartData"></check-chart>
       </div>
     </el-dialog>
 
@@ -61,7 +61,8 @@ export default {
   components: {CheckChart},
   data() {
     return {
-      dataType: 1,
+      // dataType: 1,
+      cycle: "day",
       chartData: {},
       chartVisible: false,
 
@@ -318,10 +319,10 @@ export default {
     handleInitAll(){
       getHomeCount().then(res => {
         const data = res.data.data;
-        if (this.dataType == 1){
+        if (this.cycle == 'day'){
           this.chartData = {checkedCount: data.dayCheckedCount, noCheckCount: data.dayNocheckCount};
 
-        }else if (this.dataType == 2){
+        }else if (this.cycle == 'week'){
           this.chartData = {checkedCount: data.weekCheckedCount, noCheckCount: data.weekNocheckCount};
         }else{
           this.chartData = {checkedCount: data.monthCheckedCount, noCheckCount: data.monthNocheckCount};
@@ -336,13 +337,14 @@ export default {
     },
     handleClick(tab, event) {
       // console.log(tab, event);
-      if (tab.name == 'day'){
+      /*if (tab.name == 'day'){
         this.dataType = 1;
       }else if(tab.name == 'week'){
         this.dataType = 2;
       }else if (tab.name == 'month'){
         this.dataType = 3;
-      }
+      }*/
+      this.cycle = tab.name;
       this.onLoad(this.page);
     },
     beforeOpen(done, type) {
@@ -408,7 +410,7 @@ export default {
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      params.dataType = this.dataType;
+      params.cycle = this.cycle;
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
         const data = res.data.data;
         this.page.total = data.total;

+ 2 - 2
src/views/system/user.vue

@@ -59,13 +59,13 @@
                        icon="el-icon-setting"
                        @click="handlePlatform">平台配置
             </el-button>-->
-            <el-button type="success"
+            <!--<el-button type="success"
                        size="small"
                        plain
                        v-if="userInfo.role_name.includes('admin')"
                        icon="el-icon-upload2"
                        @click="handleImport">导入
-            </el-button>
+            </el-button>-->
             <el-button type="warning"
                        size="small"
                        plain