Jelajahi Sumber

用戶軌跡差异性处理

fangq 4 tahun lalu
induk
melakukan
bd81990869

+ 18 - 0
src/api/system/dict.js

@@ -87,3 +87,21 @@ export const getDictionary = (params) => {
     params,
   })
 }
+
+export const getDictValue = (params) => {
+  return request({
+    url: '/api/blade-system/dict/getDictValue',
+    method: 'get',
+    params,
+  })
+}
+
+export const getDictByCodes = (codes) => {
+  return request({
+    url: '/api/blade-system/dict/getDictByCodes',
+    method: 'get',
+    params: {
+      codes,
+    }
+  })
+}

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

@@ -234,6 +234,8 @@
               label: "數量",
               prop: "number",
               type: "number",
+              tip: "number1",
+              labelTip: "number2",
               disabled: true,
               rules: [{
                 required: true,

+ 3 - 1
src/views/bank/sealhandover.vue

@@ -88,7 +88,6 @@
           searchShow: true,
           searchMenuSpan: 6,
           border: true,
-          addTitle: '东莞市分公司的非官方东莞市电饭锅水电费鬼地方个的双方各得杀伐果断是分公司电饭锅第三方个东莞市分公司的非官方东莞市电饭锅水电费鬼地方个的双方各得杀伐果断是分公司电饭锅第三方个东莞市分公司的非官方东莞市电饭锅水电费鬼地方个的双方各得杀伐果断是分公司电饭锅第三方个东莞市分公司的非官方东莞市电饭锅水电费鬼地方个的双方各得杀伐果断是分公司电饭锅第三方个',
           index: true,
           viewBtn: true,
           selection: true,
@@ -150,6 +149,9 @@
                     delete this.form.handoverPersonName;
                   } else {
                     // $handoverNo.disabled = true;
+                    if (this.form.id == data.id){
+                      return;
+                    }
                     this.form.handoverPersonNo = data.receiverNo;
                     this.form.handoverPersonName = data.receiverName;
                   }

+ 699 - 0
src/views/bank/user-log-view.vue

@@ -0,0 +1,699 @@
+<template>
+  <basic-container>
+    <div v-if="formVisible">
+      <avue-form :option="option" v-model="form" @submit="handleSubmit" @tab-click="handleTabClick">
+      </avue-form>
+    </div>
+  </basic-container>
+</template>
+
+<script>
+  import {getDictByCodes, getDictValue} from "../../api/system/dict";
+
+  export default {
+    name: "user-log-view",
+    props: {
+      form: {
+        type: Object
+      },
+    },
+    data(){
+      return {
+        formVisible: false,
+        dicts: {},
+
+        option:{
+          emptyBtn: false,
+          submitBtn: false,
+          column:[
+            {
+              label: "銀行號",
+              prop: "bankNo",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "请输入銀行號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "機構號",
+              prop: "orgNo",
+              disabled: true,
+              rules: [{
+                required: true,
+                message: "请输入機構號",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "表名",
+              prop: "tableName",
+              type: "select",
+              disabled: true,
+              dicData: [
+                {
+                  label: "網點鎖匙/密碼登記表", value: "keypwd"
+                },
+                {
+                  label: "業務印章交接登記表", value: "sealhandover"
+                },
+                {
+                  label: "網點出納主管及專管員崗位表更記錄表", value: "postchange"
+                },
+                {
+                  label: "查庫流水賬記錄表", value: "checkwarehouse"
+                },
+                {
+                  label: "核對記錄表", value: "checklist"
+                },
+                {
+                  label: "櫃員尾箱檢查流水賬記錄表", value: "tellertrunk"
+                },
+                {
+                  label: "使用及出入庫登記表", value: "goodsuse"
+                },
+                {
+                  label: "新開戶退件登記表", value: "returns"
+                },
+                {
+                  label: "自助設備吞沒卡處理", value: "cardswallow"
+                },
+                {
+                  label: "信息發佈", value: "message"
+                },
+              ],
+            },
+            {
+              label: "員工號",
+              prop: "personNo",
+              disabled: true,
+            },
+            {
+              label: "用戶姓名",
+              prop: "personName",
+              disabled: true,
+            },
+            {
+              label: "操作類型",
+              prop: "operationType",
+              type: "select",
+              disabled: true,
+              dicData: [
+                {
+                  label: "新增", value: "add"
+                },
+                {
+                  label: "編輯", value: "edit"
+                },
+                {
+                  label: "刪除", value: "del"
+                },
+                {
+                  label: "上傳", value: "upload"
+                },
+              ],
+            },
+            {
+              label: "舊數據",
+              prop: "oldData",
+              disabled: true,
+              type: "textarea",
+            },
+            {
+              label: "新數據",
+              prop: "newData",
+              disabled: true,
+              type: "textarea",
+            },
+          ],
+          group:[
+          ]
+        },
+        keypwdGroup: [{
+          label: "網點鎖匙/密碼登記表",
+          column: [
+            {
+              label: "分類種類",
+              prop: "category",
+              checkStrictly: true,
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "數量",
+              prop: "number",
+              type: "number",
+            },
+            {
+              label: "交出人",
+              prop: "handoverPersonName",
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+            },
+            {
+              label: "接收人",
+              prop: "receiverName",
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "備註",
+              prop: "remark",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+          ],
+        }],
+        sealhandoverGroup: [{
+          label: "業務印章交接登記表",
+          column: [
+            {
+              label: "印章類型",
+              prop: "sealType",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=seal_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+              search: true,
+              searchMultiple: true,
+
+            },
+            {
+              label: "印章編號",
+              prop: "sealNo",
+            },
+            {
+              label: "交出人",
+              prop: "handoverPersonName",
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "接收人",
+              prop: "receiverName",
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+            },
+            {
+              label: "備註",
+              prop: "remark",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+          ]
+        }],
+        checkwarehouseGroup: [{
+          label: "查庫流水賬記錄表",
+          column: [
+            {
+              label: "檢查時間開始",
+              prop: "checkTimeBegin",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "檢查時間結束",
+              prop: "checkTimeEnd",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "檢查單位",
+              prop: "checkUnit",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=unit_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+            {
+              label: "檢查目的",
+              prop: "checkPurpose",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_purpose",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "檢查內容",
+              prop: "checkContent",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_content_warehouse",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+            {
+              label: "核對結果",
+              prop: "checkResult",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_result",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "查庫人員",
+              prop: "checkPersonName",
+            },
+            {
+              label: "查庫人員工號",
+              prop: "checkPersonNo",
+              disabled: true,
+            },
+            {
+              label: "備註(可簡要補充檢查發現情況)",
+              prop: "remark",
+              span: 24,
+              labelWidth: 150,
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+          ]
+        }],
+        tellertrunkGroup: [{
+          label: "櫃員尾箱檢查流水賬記錄表",
+          column: [
+            {
+              label: "檢查內容",
+              prop: "checkContent",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_content_tellertrunk",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "檢查時間開始",
+              prop: "checkTimeBegin",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "檢查時間結束",
+              prop: "checkTimeEnd",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "檢查單位",
+              prop: "checkUnit",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=unit_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+            {
+              label: "本單位持有現金/重空櫃員數量",
+              prop: "holdingNumberUnit",
+              type: "number",
+
+            },
+            {
+              label: "本次檢查持有現金/重空櫃員數量",
+              prop: "holdingNumberCheck",
+              type: "number",
+
+            },
+            {
+              label: "檢查類型",
+              prop: "checkType",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "核對結果",
+              prop: "checkResult",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_result",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+
+            {
+              label: "查庫人員",
+              prop: "checkPersonName",
+            },
+            {
+              label: "查庫人員工號",
+              prop: "checkPersonNo",
+            },
+            {
+              label: "查庫人員姓名",
+              prop: "checkPersonNameOut",
+            },
+            {
+              label: "查庫人身份證後四位",
+              prop: "checkPersonNoOut",
+            },
+            {
+              label: "備註(可簡要補充檢查發現情況)",
+              prop: "remark",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+            {
+              label: "附件",
+              prop: "enclosureName",
+            },
+          ]
+        }],
+        checklistGroup: [{
+          label: "核對記錄表",
+          column: [
+
+            {
+              label: "核對日期",
+              prop: "checkDate",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              rules: [{
+                required: true,
+                message: "请输入核對日期",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分類",
+              prop: "type",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_category",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "核對項目",
+              prop: "item",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_item",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+            {
+              label: "核對內容/標準",
+              prop: "content",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=check_content_normal",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+
+            },
+            {
+              label: "已核對",
+              prop: "checked",
+              type: "checkbox",
+              dicData: [{
+                value: 1
+              }],
+            },
+            {
+              label: "核對人",
+              prop: "checkName",
+              disabled: true,
+
+            },
+            {
+              label: "核對人員工號",
+              prop: "checkNo",
+
+            },
+            {
+              label: "備註",
+              prop: "remark",
+
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+
+            },
+          ]
+        }],
+        goodsuseGroup: [{
+          label: "使用及出入庫登記表",
+          column: [
+            {
+              label: "日期",
+              prop: "date",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+            },
+            {
+              label: "憑證/實物種類",
+              prop: "type",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=voucher_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+
+            },
+            {
+              label: "使用數量",
+              prop: "useNumber",
+              type: "number",
+
+            },
+            {
+              label: "領入數量",
+              prop: "receiptNumber",
+              type: "number",
+
+            },
+            {
+              label: "註銷數量",
+              prop: "writeOffNumber",
+              type: "number",
+
+            },
+            {
+              label: "開始編號",
+              prop: "beginNo",
+
+            },
+            {
+              label: "結束編號",
+              prop: "endNo",
+            },
+            {
+              label: "餘額",
+              prop: "balance",
+              type: "number",
+              disabled: true,
+            },
+            {
+              label: "備註",
+              prop: "remark",
+            },
+            {
+              label: "填報人員工號",
+              prop: "fillingNo",
+            },
+            {
+              label: "填報人姓名",
+              prop: "fillingName",
+            },
+            {
+              label: "確認人員工號",
+              prop: "confirmNo",
+            },
+            {
+              label: "確認人姓名",
+              prop: "confirmName",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+            },
+
+            {
+              label: "確認人",
+              prop: "personName",
+            },
+            {
+              label: "確認人員工號",
+              prop: "personNo",
+            },
+            {
+              label: "審批時間",
+              prop: "approveTime",
+            },
+            {
+              label: "進度",
+              prop: "process",
+              dicData: [
+
+              ]
+            },
+            {
+              label: "是否已完成",
+              prop: "isCompleted",
+            },
+          ]
+        }]
+      }
+    },
+    created() {
+      this.initDict().then(res => {
+        this.initForm(res);
+        this.formVisible = true;
+      });
+    },
+    methods: {
+      initDict(){
+        return new Promise((resolve, reject) => {
+          let codeArr = ['seal_type', 'key_type', 'unit_type', 'check_purpose', 'check_content_warehouse', 'check_content_tellertrunk', 'check_type', 'check_result', 'check_category', 'check_item', 'check_content_normal', 'voucher_type'];
+          let dictObj = {};
+            getDictByCodes(codeArr.join()).then(res => {
+              let data = res.data.data;
+              for (let j = 0; j < data.length; j++) {
+                let item = data[j];
+                dictObj['' + item.code + item.dictKey] = item.dictValue;
+              }
+              resolve(dictObj);
+            })
+          // }
+        })
+      },
+      initForm(dictObj) {
+        const newData = JSON.parse(this.form.newData);
+        const tableName = this.form.tableName;
+        let arr = this[tableName + 'Group'][0].column;
+        if (this.form.operationType == 'edit') {
+          const oldData = JSON.parse(this.form.oldData);
+          for (let i = 0; i < arr.length; i++) {
+            let item = arr[i];
+            item.disabled = true;
+            let prop = item.prop;
+
+            let newVal = newData['' + prop];
+            let oldVal = oldData['' + prop];
+            if (newVal && newVal != oldVal) {
+              item.labelTip = oldVal;
+              if (item.type == 'select'){
+                item.labelTip = dictObj['' + item.dicUrl.split('code=')[1] + oldVal]
+              }
+            } else {
+              delete item.labelTip;
+            }
+          }
+        } else {
+          for (let i = 0; i < arr.length; i++) {
+            let item = arr[i];
+            item.disabled = true;
+            delete item.labelTip
+          }
+        }
+        this[tableName + 'Group'][0].column = arr;
+        delete this.option.group;
+        this.option.group = this[tableName + 'Group'];
+        Object.assign(this.form, newData)
+      },
+      handleSubmit(form) {
+        this.$message.success(JSON.stringify(this.form))
+      },
+      handleTabClick(event) {
+        this.$message.success(event);
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 168 - 4
src/views/report/userlog.vue

@@ -27,17 +27,33 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
+
+      <template slot="menu" slot-scope="{row, index}">
+        <el-button size="small" class="el-button--text" v-if="permission.userlog_view"  @click="viewData = row, detailVisible = true"><i class="el-icon-view"></i> 查 看</el-button>
+      </template>
     </avue-crud>
+
+    <el-dialog :append-to-body="true" :modal-append-to-body="false" :destroy-on-close="true" :fullscreen="true" :visible.sync="detailVisible" title="填报详情">
+      <div v-if="detailVisible">
+        <user-log-view :form="viewData"></user-log-view>
+      </div>
+    </el-dialog>
+
   </basic-container>
 </template>
 
 <script>
   import {getList, getDetail, add, update, remove} from "@/api/report/userlog";
   import {mapGetters} from "vuex";
+  import UserLogView from "../bank/user-log-view";
 
   export default {
+    components: {UserLogView},
     data() {
       return {
+        detailVisible: false,
+        viewData: {},
+
         form: {},
         query: {},
         loading: true,
@@ -55,7 +71,7 @@
           searchMenuSpan: 6,
           border: true,
           index: true,
-          viewBtn: true,
+          viewBtn: false,
           selection: true,
           dialogClickModal: false,
           column: [
@@ -164,6 +180,8 @@
             {
               label: "舊數據",
               prop: "oldData",
+              type: "textarea",
+              hide: true,
               rules: [{
                 required: true,
                 message: "请输入舊數據",
@@ -173,6 +191,8 @@
             {
               label: "新數據",
               prop: "newData",
+              type: "textarea",
+              hide: true,
               rules: [{
                 required: true,
                 message: "请输入新數據",
@@ -181,6 +201,126 @@
             },
           ]
         },
+        keypwdGroup: [{
+          label: "網點鎖匙/密碼登記表",
+          column: [
+            {
+              label: "分類種類",
+              prop: "category",
+              checkStrictly: true,
+              type: "tree",
+              // dicUrl: "/api/blade-system/dict/dictionary?code=key_type",
+              dicData: [],
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+            {
+              label: "數量",
+              prop: "number",
+              type: "number",
+            },
+            {
+              label: "交出人",
+              prop: "handoverPersonName",
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+            },
+            {
+              label: "接收人",
+              prop: "receiverName",
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "備註",
+              prop: "remark",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+          ],
+        }],
+        sealhandoverGroup: [{
+          label: "業務印章交接登記表",
+          column: [
+            {
+              label: "印章類型",
+              prop: "sealType",
+              type: "select",
+              dicUrl: "/api/blade-system/dict/dictionary?code=seal_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey",
+              },
+              search: true,
+              searchMultiple: true,
+
+            },
+            {
+              label: "印章編號",
+              prop: "sealNo",
+            },
+            {
+              label: "交出人",
+              prop: "handoverPersonName",
+            },
+            {
+              label: "交出人員工號",
+              prop: "handoverPersonNo",
+            },
+            {
+              label: "交接日期",
+              prop: "handoverDate",
+              type: "datetime",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+            },
+            {
+              label: "接收人",
+              prop: "receiverName",
+            },
+            {
+              label: "接收人員工號",
+              prop: "receiverNo",
+            },
+            {
+              label: "備註",
+              prop: "remark",
+            },
+            {
+              label: "填報時間",
+              prop: "fillingDate",
+              format: "yyyy-MM-dd HH:mm",
+              valueFormat: "yyyy-MM-dd HH:mm",
+
+            },
+            {
+              label: "填報人",
+              prop: "fillingPerson",
+            },
+          ]
+        }],
         data: []
       };
     },
@@ -270,9 +410,33 @@
       },
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
+          const newData = JSON.parse(this.form.newData);
+          const tableName = this.form.tableName;
+          let arr = this[tableName + 'Group'][0].column;
+          if (this.form.operationType == 'edit'){
+            const oldData = JSON.parse(this.form.oldData);
+            for (let i = 0; i < arr.length; i++) {
+              let item = arr[i];
+              let prop = item.prop;
+              let newVal = newData[''+prop];
+              let oldVal = oldData[''+prop];
+              if (newVal && newVal != oldVal){
+                item.labelTip = oldVal
+              }else{
+                delete item.labelTip;
+              }
+            }
+          }else{
+            for (let i = 0; i < arr.length; i++) {
+              let item = arr[i];
+              delete item.labelTip
+            }
+          }
+          this[tableName + 'Group'][0].column = arr;
+          delete this.option.group;
+          this.option.group = this[tableName + 'Group'];
+          Object.assign(this.form, newData)
+          this.$forceUpdate()
         }
         done();
       },