From fdb3e482f9a193eb7f793915e4c0dbbeba510ccf Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 02 四月 2024 14:01:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1

---
 company/src/components/business/OperaUnionApplyCheckWindow.vue |  324 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 182 insertions(+), 142 deletions(-)

diff --git a/company/src/components/business/OperaUnionApplyCheckWindow.vue b/company/src/components/business/OperaUnionApplyCheckWindow.vue
index 9c4dd14..2f0cacd 100644
--- a/company/src/components/business/OperaUnionApplyCheckWindow.vue
+++ b/company/src/components/business/OperaUnionApplyCheckWindow.vue
@@ -16,6 +16,11 @@
           <el-form-item label="涓婁紶鎶曚繚鍗曪細" prop="toubaodanFile">
             <UploadFile @remove="dele2" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList" @uploadSuccess="toubaoFileUploaded" />
           </el-form-item>
+          <div v-for="(item,index) in this.model.applyList" :key="index">
+            <el-form-item :label="(index+1)+'.琚繚闄╀汉锛�'+item.companyName+')锛�'" prop="tbdMultifileList[index]">
+              <UploadFile   :uploadData="{ folder: 'apply',fileType:'.pdf' }"  :fileIndex="index"  :showTips="showTips" :fileList="model.applyList[index].fileList" @uploadSuccess="toubaoFileUploaded2" />
+            </el-form-item>
+          </div>
         </el-form>
         <!--    涓婁紶淇濋櫓鍗�    -->
       <el-form v-if="visible3==true" :model="form" ref="form3" :rules="rules3" style="width: 100%;">
@@ -45,6 +50,11 @@
         <el-form-item label="涓婁紶淇濋櫓鍗曪細" prop="baoxianFile">
           <UploadFile @remove="dele3" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="baoxianFileUploaded" />
         </el-form-item>
+        <div v-for="(item,index) in this.model.applyList" :key="index">
+          <el-form-item :label="item.companyName" prop="bxdMultifileList[index]">
+            <UploadFile   :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileIndex="index" :showTips="showTips" :fileList="model.applyList[index].fileList1" @uploadSuccess="baoxianFileUploaded2" />
+          </el-form-item>
+        </div>
       </el-form>
       <template v-slot:footer>
         <el-button type="primary" @click="doSubmit">纭� 瀹�</el-button>
@@ -59,19 +69,20 @@
 import {
   cancel,
   uploadBXD,
-  uploadToubaodan,
-} from "@/api/business/unionApply";
-import UploadFile from "@/components/common/UploadFile";
-import {remark} from "@/api/business/settleClaims";
+  uploadToubaodan
+} from '@/api/business/unionApply'
+import UploadFile from '@/components/common/UploadFile'
+
 export default {
   name: 'OperaUnionApplyCheckWindow',
   extends: BaseOpera,
-  components: {UploadFile, GlobalWindow },
+  components: { UploadFile, GlobalWindow },
   data () {
     return {
       // 琛ㄥ崟鏁版嵁
       model: {},
-      falg :0,
+      falg: 0,
+      showTips:false,
       rules1: {
         backCheckInfo: [
           { required: true, message: '璇峰畬鍠勪俊鎭�' }
@@ -91,21 +102,21 @@
         ],
         baoxianFile: [
           { required: true, message: '璇峰畬鍠勪俊鎭�' }
-        ],
+        ]
       },
       form: {
-         id: null,
-         backCheckInfo:'',
-         editCheckInfo:'',
-        startTime:null,
-        code:null,
-        toubaodanFile:null,
-        baoxianFile:null,
-        tbdMultifileList:[],
-        bxdMultifileList:[],
+        id: null,
+        backCheckInfo: '',
+        editCheckInfo: '',
+        startTime: null,
+        code: null,
+        toubaodanFile: null,
+        baoxianFile: null,
+        tbdMultifileList: [],
+        bxdMultifileList: [],
         fileList: [],
         fileList1: [],
-        selectRadio:0
+        selectRadio: 0
       },
       visible1: false,
       visible2: false,
@@ -113,55 +124,76 @@
     }
   },
   created () {
-      this.config({
-          api: '/business/insuranceApply',
-          'field.id': 'id'
-      })
+    this.config({
+      api: '/business/insuranceApply',
+      'field.id': 'id'
+    })
   },
   methods: {
-    dele2() {
-      this.form.toubaodanFile = ''
+    dele2 () {
+      this.form.toubaodanFile= null
     },
-    dele3() {
-      this.form.baoxianFile = ''
+    deleIndex (flag,index) {
+      if(flag == 0)
+      this.form.tbdMultifileList[index].fileurl = null
+      this.form.tbdMultifileList[index].name = null
     },
-     open(title,target,flag){
-       this.visible=true
-       this.model={}
-       this.form= {
-         id: null,
-         backCheckInfo:'',
-         dealBackInfo:'',
-         editCheckInfo:'',
-         editDate: '',
-         editCode: '',
-         startTime:null,
-         code:null,
-         toubaodanFile:null,
-         baoxianFile:null,
-         editBaoxianFile:null,
-         fileList: [],
-         fileList1: [],
-         selectRadio:0
-       },
-       this.model = target
-       this.form.startTime = target.startTime
-       this.title = title
-       this.flag = flag
-       this.visible1 = false
-       this.visible2 = false
-       this.visible3 = false
-       if(flag == 1){
-         this.visible1 = true
-       }
-       if(flag == 2){
-         this.visible2 = true
-       }
-       if(flag == 3){
-         this.visible3 = true
-       }
-     },
-    doSubmit(){
+    dele3 () {
+      this.form.baoxianFile = null
+    },
+    open (title, target, flag) {
+      this.visible = true
+      this.model = {}
+      this.form = {
+        id: null,
+        backCheckInfo: '',
+        dealBackInfo: '',
+        editCheckInfo: '',
+        editDate: '',
+        editCode: '',
+        startTime: null,
+        code: null,
+        toubaodanFile: null,
+        baoxianFile: null,
+        editBaoxianFile: null,
+        fileList: [],
+        fileList1: [],
+        selectRadio: 0
+      }
+
+      this.model = target
+      this.form.startTime = target.startTime
+      this.title = title
+      this.flag = flag
+      this.visible1 = false
+      this.visible2 = false
+      this.visible3 = false
+      this.form.tbdMultifileList=[]
+      this.form.bxdMultifileList=[]
+      if (flag == 1) {
+        this.visible1 = true
+      }
+      if (flag == 2) {
+        this.visible2 = true
+        if(this.model.applyList){
+          this.model.applyList.forEach(item =>{
+            item.fileList =[]
+            this.form.tbdMultifileList.push({objId:item.id,fileurl:null,name:null})
+          })
+        }
+      }
+      console.log(this.model.applyList)
+      if (flag == 3) {
+        this.visible3 = true
+        if(this.model.applyList){
+          this.model.applyList.forEach(item =>{
+            item.fileList1 =[]
+            this.form.bxdMultifileList.push({objId:item.id,fileurl:null,name:null})
+          })
+        }
+      }
+    },
+    doSubmit () {
       if (this.flag == 1) {
         this.$refs.form1.validate((valid) => {
           // debugger
@@ -188,87 +220,95 @@
         })
       }
     },
-    selectChange(){
-       if(this.form.selectRadio == 0){
-         this.form.startTime = this.model.startTime
-       }else{
-         this.form.startTime = ''
-       }
-    },
-    toubaoFileUploaded(data){
-      this.form.toubaodanFile=data
-    },
-    baoxianFileUploaded(data){
-      this.form.baoxianFile=data
-    },
-    backDo(){
-      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
-          .then(() => {
-            this.isWorking = true
-            cancel({id:this.model.id,reason:this.form.backCheckInfo})
-                .then(response => {
-                  this.visible = false
-                  this.$emit('success')
-                  }).catch(err => {
-                this.$tip.apiFailed(err)
-                 })
-          })
-    },
-    uploadToubaodan(){
-      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
-          .then(() => {
-            this.isWorking = true
-            uploadToubaodan({businessId:this.model.id,fileurl:this.form.toubaodanFile.fileurl,name:this.form.toubaodanFile.name,multifileList:this.form.tbdMultifileList})
-                .then(response => {
-                  this.visible = false
-                  this.$emit('success')
-                }).catch(err => {
-                  this.$tip.apiFailed(err)
-                })
-          })
-    },
-
-    uploadBaoxiandan(){
-      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
-          .then(() => {
-            this.isWorking = true
-            uploadBXD({id:this.model.id,startTime:this.form.startTime,code:this.form.code,baoxiandanFile:this.form.baoxianFile})
-                .then(response => {
-                  this.visible = false
-                  this.$emit('success')
-                }).catch(err => {
-                  this.$tip.apiFailed(err)
-                })
-          })
-
-    },
-      handleRemove(file, fileList) {
-          console.log(file, fileList);
-      },
-      handlePreview(file) {
-          console.log(file);
-      },
-      handleExceed(files, fileList) {
-          this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶);
-      },
-      beforeRemove(file, fileList) {
-          return this.$confirm(`纭畾绉婚櫎 ${ file.name }锛焋);
-      },
-      successEvent() {
-
-      },
-      handleSizeChange(val) {
-          console.log(`姣忛〉 ${val} 鏉);
-      },
-      handleCurrentChange(val) {
-          console.log(`褰撳墠椤�: ${val}`);
-      },
-      handleClick(tab, event) {
-          console.log(tab, event);
-      },
-      onSubmit() {
-
+    selectChange () {
+      if (this.form.selectRadio == 0) {
+        this.form.startTime = this.model.startTime
+      } else {
+        this.form.startTime = ''
       }
+    },
+    toubaoFileUploaded (data) {
+      this.form.toubaodanFile = data
+    },
+    toubaoFileUploaded2 (data) {
+      this.form.tbdMultifileList[data.index].fileurl = data.fileurl
+      this.form.tbdMultifileList[data.index].name = data.name
+    },
+    baoxianFileUploaded (data) {
+      this.form.baoxianFile = data
+    },
+    baoxianFileUploaded2 (data) {
+      this.form.bxdMultifileList[data.index].fileurl = data.fileurl
+      this.form.bxdMultifileList[data.index].name = data.name
+    },
+    backDo () {
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+        .then(() => {
+          this.isWorking = true
+          cancel({ id: this.model.id, reason: this.form.backCheckInfo })
+            .then(response => {
+              this.visible = false
+              this.$emit('success')
+            }).catch(err => {
+              this.$tip.apiFailed(err)
+            })
+        })
+    },
+    uploadToubaodan () {
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+        .then(() => {
+          this.isWorking = true
+          console.log(this.form.tbdMultifileList )
+          uploadToubaodan({ businessId: this.model.id, fileurl: this.form.toubaodanFile.fileurl, name: this.form.toubaodanFile.name, multifileList: this.form.tbdMultifileList })
+            .then(response => {
+              this.visible = false
+              this.$emit('success')
+            }).catch(err => {
+              this.$tip.apiFailed(err)
+            })
+        })
+    },
+
+    uploadBaoxiandan () {
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+        .then(() => {
+          this.isWorking = true
+          uploadBXD({ id: this.model.id, startTime: this.form.startTime, code: this.form.code, baoxiandanFile: this.form.baoxianFile })
+            .then(response => {
+              this.visible = false
+              this.$emit('success')
+            }).catch(err => {
+              this.$tip.apiFailed(err)
+            })
+        })
+    },
+    handleRemove (file, fileList) {
+      console.log(file, fileList)
+    },
+    handlePreview (file) {
+      console.log(file)
+    },
+    handleExceed (files, fileList) {
+      this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶)
+    },
+    beforeRemove (file, fileList) {
+      return this.$confirm(`纭畾绉婚櫎 ${file.name}锛焋)
+    },
+    successEvent () {
+
+    },
+    handleSizeChange (val) {
+      console.log(`姣忛〉 ${val} 鏉)
+    },
+    handleCurrentChange (val) {
+      console.log(`褰撳墠椤�: ${val}`)
+    },
+    handleClick (tab, event) {
+      console.log(tab, event)
+    },
+    onSubmit () {
+
+    }
   }
 }
 </script>

--
Gitblit v1.9.3