From 3e1a5520f6153a66a436109719d553fb0550e41b Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 26 六月 2024 15:35:47 +0800
Subject: [PATCH] 提交一把

---
 company/src/views/enterprise/insuranceApply.vue |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/company/src/views/enterprise/insuranceApply.vue b/company/src/views/enterprise/insuranceApply.vue
index e77ea30..c134487 100644
--- a/company/src/views/enterprise/insuranceApply.vue
+++ b/company/src/views/enterprise/insuranceApply.vue
@@ -28,7 +28,7 @@
             <el-form-item label="鎻愪氦鏃ユ湡" prop="createDate">
                 <el-date-picker
                     v-model="searchForm.createDate"
-                    @change="search"
+                    @change="changeTime"
                     type="daterange"
                     range-separator="鑷�"
                     value-format="yyyy-MM-dd"
@@ -44,7 +44,7 @@
         <!-- 琛ㄦ牸鍜屽垎椤� -->
         <template v-slot:table-wrap>
             <ul class="toolbar" v-permissions="['business:dispatchunit:create']">
-                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyWindow.open('鎶曚繚鐢宠', {type: ''})">鎶曚繚鐢宠</el-button></li>
+                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyAddWindow.open('鎶曚繚鐢宠', {type: ''})">鎶曚繚鐢宠</el-button></li>
             </ul>
             <el-table
                 v-loading="isWorking.search"
@@ -69,6 +69,7 @@
                   </template>
                 </el-table-column>
                 <el-table-column prop="insureNum" label="鎶曚繚浜烘暟"></el-table-column>
+                <el-table-column prop="guaranteeNum" label="鍦ㄤ繚浜烘暟"></el-table-column>
                 <el-table-column label="鎶曚繚鏃堕暱锛堝ぉ锛�">
                     <template slot-scope="{row}">
                         <span>{{(row.serviceDays - row.loseEfficacyDays) < 0 ? `-` : row.serviceDays - row.loseEfficacyDays}}</span>
@@ -90,11 +91,12 @@
                 <el-table-column
                     v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
                     label="鎿嶄綔"
-                    min-width="120"
+                    min-width="150"
                     fixed="right"
                 >
                     <template slot-scope="{row}">
-                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">鏌ョ湅璇︽儏</el-button>
+                      <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">鏌ョ湅璇︽儏</el-button>
+                      <el-button type="text" @click="$refs.OperaApplyChangeMonthWindow.open('鍔犲噺淇濇湀搴﹁垂鐢ㄧ粺璁�',row)" v-permissions="['business:applychange:query']">鍔犲噺淇濊垂鐢�</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -106,26 +108,27 @@
             </pagination>
         </template>
         <!--    鏂板鎶曚繚    -->
-        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
+        <OperaInsuranceApplyAddWindow ref="OperaInsuranceApplyAddWindow" @success="result" />
+        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" @success="handlePageChange" />
         <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
         <!--    鎶曚繚璇︽儏    -->
         <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
     </TableLayout>
 </template>
-
 <script>
 import BaseTable from '@/components/base/BaseTable'
 import TableLayout from '@/layouts/TableLayout'
 import Pagination from '@/components/common/Pagination'
-import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
+import OperaInsuranceApplyAddWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow'
 import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
 import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
+import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
 
 import { all as solutionAll } from '@/api/business/solutions'
 export default {
   name: 'InsuranceApply',
   extends: BaseTable,
-  components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
+  components: { TableLayout, Pagination,OperaApplyChangeMonthWindow, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
   data () {
     return {
       // 鎼滅储
@@ -149,6 +152,23 @@
     this.loadSelectList()
   },
   methods: {
+      reset() {
+          this.searchForm.createTimeS = ''
+          this.searchForm.createTimeE = ''
+          this.$refs.searchForm.resetFields()
+          this.search()
+      },
+    result(flag,param){
+      console.log(flag,param)
+      if(param && param.godetail && param.id){
+        if (param.type == 1) {
+          this.$refs.OperaWtbApplyShopWindow.open('濮旀墭鎶曚繚璇︽儏', { id: param.id })
+        } else {
+          this.$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: param.id })
+        }
+      }
+      this.handlePageChange()
+    },
     godetail (row) {
       if (row.solutionType == 1) {
         this.$refs.OperaWtbApplyShopWindow.open('濮旀墭鎶曚繚璇︽儏', { id: row.id })
@@ -160,6 +180,11 @@
       solutionAll({ dataType: 2 }).then(res => {
         this.solutionList = res
       })
+    },
+    changeTime (e) {
+        this.searchForm.createTimeS = e[0]
+        this.searchForm.createTimeE = e[1]
+        this.search()
     }
   }
 }

--
Gitblit v1.9.3