From 6b152bd561f64f01a5bb0a8cc9784dfa601a72d1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 27 六月 2024 11:53:40 +0800
Subject: [PATCH] 提交一把

---
 company/src/components/business/OperaSettleClaimsWindow.vue |  326 +++++++++++++++++++++++++++--------------------------
 1 files changed, 165 insertions(+), 161 deletions(-)

diff --git a/company/src/components/business/OperaSettleClaimsWindow.vue b/company/src/components/business/OperaSettleClaimsWindow.vue
index b887d4e..e35dfb2 100644
--- a/company/src/components/business/OperaSettleClaimsWindow.vue
+++ b/company/src/components/business/OperaSettleClaimsWindow.vue
@@ -385,7 +385,7 @@
             <div class="desc_times">
                 <el-timeline :reverse="reverse">
                     <el-timeline-item
-                        v-for="(activity, index) in model.settleClaimsLogList"
+                        v-for="(activity, index) in activeLogList"
                         :key="index"
                         :timestamp="activity.timestamp">
                       <div style="display: flex;  flex-direction: column;" v-if="activity.objType==3">
@@ -436,167 +436,171 @@
 
 <script>
 
-    import UploadFileCommon from '@/components/common/UploadFileCommon'
-    import BaseOpera from '@/components/base/BaseOpera'
-    import GlobalWindow from '@/components/common/GlobalWindow'
-    import OperaSettleClaimsCheckWindow from '@/components/business/OperaSettleClaimsCheckWindow'
-    import onlineReporting from '@/components/enterprise/onlineReporting'
-    import supplementaryExplanation from '@/components/enterprise/supplementaryExplanation'
-    import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
-    import upload from '@/components/common/upload'
-    import {confirmFile, findById,exportFiles,claimsUploadFile,delFile} from '@/api/business/settleClaims'
-    import { mapState } from 'vuex'
-    export default {
-        name: 'OperaSettleClaimsWindow',
-        extends: BaseOpera,
-        components: { GlobalWindow, OperaSettleClaimsCheckWindow, OperaInsuranceApplyDetails, UploadFileCommon, onlineReporting, supplementaryExplanation, upload },
-        data () {
-            return {
-                loading: false,
-                doneFileDate: null,
-                remarkLogList: [],
-                list: [],
-                model: {},
-                activeName: 'first',
-                reverse: false
-            }
-        },
-        computed: {
-            ...mapState(['userInfo'])
-        },
-        created () {
-            this.config({
-                api: '/business/settleClaims',
-                'field.id': 'id'
-            })
-        },
-        methods: {
-          open(title,target){
-            this.model = {}
-            this.model = target
-            this.title = title
-            this.visible = true
-            this.doneFileDate = null
-            this.remarkLogList = []
-            this.getDetail()
-          },
-            // 鍒ゆ柇涓や釜鏃堕棿涔嬮棿鐩稿樊鏄惁
-            contrast24(time1, time2) {
-              console.log(time1)
-              console.log(time2)
-              if (time1 && time2) {
-                  let a = new Date(time1)
-                  let b = new Date(time2)
-                  let timeDiff = Math.abs(a.getTime() - b.getTime());
-                  console.log(Math.ceil(timeDiff / (3600 * 1000)))
-                  return Math.ceil(timeDiff / (3600 * 1000)) <= 24;
-              } else {
-                  return false
-              }
-            },
-            contrast(time1, time2) {
-              if (time1 && time2) {
-                  let a = new Date(time1).getTime()
-                  let b = new Date(time2).getTime()
-                  return a > b
-              } else {
-                  return false
-              }
-            },
-            edit() {
-              let obj = JSON.parse(JSON.stringify(this.model))
-                obj.areaId = obj.areaId.split(',').map(item => Number(item))
-              this.$refs.onlineReporting.open('淇敼淇℃伅', obj)
-            },
-          openBaoxiandan(){
-            window.open(this.model.baoxiandanFile.fileurlFull);
-          },
-          delFile(id){
-            this.$dialog.messageConfirm('纭鍒犻櫎璇ラ檮浠跺悧锛屼竴鏃﹀垹闄ゆ棤娉曟挙鍥烇紵')
-                .then(() => {
-                    delFile(this.model.id, id).then(response => {
-                        this.getDetail()
-                    }).catch(err => {
-                        this.$tip.apiFailed(err)
-                    })
-                })
-          },
-          getDetail(){
-            findById( this.model.id)
-                .then(res => {
-                  this.model = res
-                  this.remarkLogList = []
-                  var logList = this.model.settleClaimsLogList
-                  if (logList) {
-                    logList.forEach(item => {
-                       if (item.objType == 2) {
-                         this.doneFileDate = item.createDate
-                       }
-                      if (item.objType==7) {
-                        this.remarkLogList.push(item)
-                      }
-                    })
-                  }
-                }).catch(err => {
-
-                })
-          },
-            handleClick(tab) {
-                this.activeName = tab.name
-            },
-          callback(){
-            this.getDetail()
-            this.$emit('success')
-          },
-          claimsUploadFile(e, objType) {
-                claimsUploadFile({
-                    id: this.model.id,
-                    objType,
-                    fileUrl: e.imgaddr,
-                    fileName: e.originname,
-                    fileType: e.type
-                }).then(response => {
-                    this.getDetail()
-                }).catch(err => {
-                    this.$tip.apiFailed(err)
-                }).finally(() => {
-                    this.loading = false
-                })
-            },
-            submit(type) {
-              var that = this
-              if (type == 0) {
-                this.$dialog.messageConfirm('鐞嗚禂鏉愭枡鏀堕泦瀹屾垚锛岃鍙婃椂鎻愪氦淇濋櫓鍏徃锛�')
-                    .then(() => {
-                      // this.isWorking = true
-                      confirmFile({id:that.model.id})
-                          .then(response => {
-                            that.getDetail()
-                          }).catch(err => {
-                        this.$tip.apiFailed(err)
-                      })
-                    })
-              }else if(type == 1){
-                //璧勬枡涓嬭浇
-                this.$dialog.exportConfirm('纭杩涜璧勬枡涓嬭浇鍚楋紵')
-                    .then(() => {
-                      this.isWorking = true
-                      exportFiles({ id: that.model.id })
-                          .then(response => {
-                            this.download(response)
-                          }).catch(err => {
-                            console.log(err)
-                            this.$message.error("涓嬭浇璧勬枡澶辫触锛岃纭璧勬枡鏁版嵁涓嶄负绌�")
-                          }).finally(() => {
-                            this.isWorking = false
-                          })
-                    })
-                    .catch(() => {
-                    })
-              }
-            }
-        }
+import UploadFileCommon from '@/components/common/UploadFileCommon'
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import OperaSettleClaimsCheckWindow from '@/components/business/OperaSettleClaimsCheckWindow'
+import onlineReporting from '@/components/enterprise/onlineReporting'
+import supplementaryExplanation from '@/components/enterprise/supplementaryExplanation'
+import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
+import upload from '@/components/common/upload'
+import { confirmFile, findById, exportFiles, claimsUploadFile, delFile } from '@/api/business/settleClaims'
+import { mapState } from 'vuex'
+export default {
+  name: 'OperaSettleClaimsWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow, OperaSettleClaimsCheckWindow, OperaInsuranceApplyDetails, UploadFileCommon, onlineReporting, supplementaryExplanation, upload },
+  data () {
+    return {
+      loading: false,
+      doneFileDate: null,
+      remarkLogList: [],
+      activeLogList:[],
+      list: [],
+      model: {},
+      activeName: 'first',
+      reverse: false
     }
+  },
+  computed: {
+    ...mapState(['userInfo'])
+  },
+  created () {
+    this.config({
+      api: '/business/settleClaims',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    open (title, target) {
+      this.model = {}
+      this.model = target
+      this.title = title
+      this.visible = true
+      this.doneFileDate = null
+      this.remarkLogList = []
+      this.activeLogList = []
+      this.getDetail()
+    },
+    // 鍒ゆ柇涓や釜鏃堕棿涔嬮棿鐩稿樊鏄惁
+    contrast24 (time1, time2) {
+      console.log(time1)
+      console.log(time2)
+      if (time1 && time2) {
+        const a = new Date(time1)
+        const b = new Date(time2)
+        const timeDiff = Math.abs(a.getTime() - b.getTime())
+        console.log(Math.ceil(timeDiff / (3600 * 1000)))
+        return Math.ceil(timeDiff / (3600 * 1000)) <= 24
+      } else {
+        return false
+      }
+    },
+    contrast (time1, time2) {
+      if (time1 && time2) {
+        const a = new Date(time1).getTime()
+        const b = new Date(time2).getTime()
+        return a > b
+      } else {
+        return false
+      }
+    },
+    edit () {
+      const obj = JSON.parse(JSON.stringify(this.model))
+      obj.areaId = obj.areaId.split(',').map(item => Number(item))
+      this.$refs.onlineReporting.open('淇敼淇℃伅', obj)
+    },
+    openBaoxiandan () {
+      window.open(this.model.baoxiandanFile.fileurlFull)
+    },
+    delFile (id) {
+      this.$dialog.messageConfirm('纭鍒犻櫎璇ラ檮浠跺悧锛屼竴鏃﹀垹闄ゆ棤娉曟挙鍥烇紵')
+        .then(() => {
+          delFile(this.model.id, id).then(response => {
+            this.getDetail()
+          }).catch(err => {
+            this.$tip.apiFailed(err)
+          })
+        })
+    },
+    getDetail () {
+      findById(this.model.id)
+        .then(res => {
+          this.model = res
+          this.remarkLogList = []
+          this.activeLogList =[]
+          var logList = this.model.settleClaimsLogList
+          if (logList) {
+            logList.forEach(item => {
+              if (item.objType == 2) {
+                this.doneFileDate = item.createDate
+              }
+              if (item.objType == 7) {
+                this.remarkLogList.push(item)
+              } else {
+                this.activeLogList.push(item)
+              }
+            })
+          }
+        }).catch(err => {
+        })
+    },
+    handleClick (tab) {
+      this.activeName = tab.name
+    },
+    callback () {
+      this.getDetail()
+      this.$emit('success')
+    },
+    claimsUploadFile (e, objType) {
+      claimsUploadFile({
+        id: this.model.id,
+        objType,
+        fileUrl: e.imgaddr,
+        fileName: e.originname,
+        fileType: e.type
+      }).then(response => {
+        this.getDetail()
+      }).catch(err => {
+        this.$tip.apiFailed(err)
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    submit (type) {
+      var that = this
+      if (type == 0) {
+        this.$dialog.messageConfirm('鐞嗚禂鏉愭枡鏀堕泦瀹屾垚锛岃鍙婃椂鎻愪氦淇濋櫓鍏徃锛�')
+          .then(() => {
+            // this.isWorking = true
+            confirmFile({ id: that.model.id })
+              .then(response => {
+                that.getDetail()
+              }).catch(err => {
+                this.$tip.apiFailed(err)
+              })
+          })
+      } else if (type == 1) {
+        // 璧勬枡涓嬭浇
+        this.$dialog.exportConfirm('纭杩涜璧勬枡涓嬭浇鍚楋紵')
+          .then(() => {
+            this.isWorking = true
+            exportFiles({ id: that.model.id })
+              .then(response => {
+                this.download(response)
+              }).catch(err => {
+                console.log(err)
+                this.$message.error('涓嬭浇璧勬枡澶辫触锛岃纭璧勬枡鏁版嵁涓嶄负绌�')
+              }).finally(() => {
+                this.isWorking = false
+              })
+          })
+          .catch(() => {
+          })
+      }
+    }
+  }
+}
 </script>
 <style>
     .v-modal {

--
Gitblit v1.9.3