From 3a45da15c947c2d478a44a51bd0f926647b1b841 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 11 四月 2025 16:33:17 +0800
Subject: [PATCH] 提交

---
 company/src/views/enterprise/insuranceApply.vue |  236 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 156 insertions(+), 80 deletions(-)

diff --git a/company/src/views/enterprise/insuranceApply.vue b/company/src/views/enterprise/insuranceApply.vue
index 0561cbf..f9e368b 100644
--- a/company/src/views/enterprise/insuranceApply.vue
+++ b/company/src/views/enterprise/insuranceApply.vue
@@ -2,28 +2,33 @@
     <TableLayout :permissions="['business:insuranceapply:query']">
         <!-- 鎼滅储琛ㄥ崟 -->
         <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
-            <el-form-item label="鐘舵��" prop="status">
-                <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨" @change="search">
-                    <el-option label="寰呭鎵�" value="0"></el-option>
-                    <el-option label="寰呯缃�" value="2"></el-option>
-                    <el-option label="宸茬缃�" value="3"></el-option>
-                    <el-option label="宸叉挙閿�" value="7"></el-option>
+            <el-form-item label="鐘舵��" prop="statusCollect">
+                <el-select v-model="searchForm.statusCollect" placeholder="璇烽�夋嫨" @change="search">
+                    <el-option label="寰呭鏍�" value="0"></el-option>
+                    <el-option label="寰呭嚭鍗�" value="1"></el-option>
+                    <el-option label="寰呯缃�" value="7"></el-option>
+                    <el-option label="淇濋殰涓�" value="2"></el-option>
+                    <el-option label="宸茶繃鏈�" value="3"></el-option>
+                    <el-option label="宸查��鍥�" value="4"></el-option>
+                    <el-option label="閫�鍥炵敵璇蜂腑" value="5"></el-option>
+                    <el-option label="宸插叧闂�" value="6"></el-option>
+                    <el-option label="鎶曚繚涓�" value="26"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="淇濋櫓鏂规" prop="baseSolutionId">
                 <el-select v-model="searchForm.baseSolutionId" placeholder="璇烽�夋嫨" @change="search">
                     <el-option
                         v-for="item in solutionList"
-                        :key="item.id"
+                        :key="item.baseId"
                         :label="item.name"
-                        :value="item.id">
+                        :value="item.baseId">
                     </el-option>
                 </el-select>
             </el-form-item>
             <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"
@@ -39,44 +44,79 @@
         <!-- 琛ㄦ牸鍜屽垎椤� -->
         <template v-slot:table-wrap>
             <ul class="toolbar" v-permissions="['business:dispatchunit:create']">
-                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyWindow.open('鎶曚繚鐢宠')">鎶曚繚鐢宠</el-button></li>
+                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyAddWindow.open('鎶曚繚鐢宠', {type: ''})">鎶曚繚鐢宠</el-button></li>
             </ul>
-            <el-table
-                v-loading="isWorking.search"
-                :data="tableData.list"
-                stripe
+          <el-table
+              v-loading="isWorking.search"
+              :data="tableData.list"
+              stripe
+          >
+            <el-table-column label="搴忓彿"  align="center" width="80px" fixed>
+              <template slot-scope="scope">
+                <span>{{scope.$index + 1}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="statusInfo"   align="center"  fixed label="鐘舵��">
+              <template slot-scope="{row}">
+                <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="solutionsName" fixed label="淇濋櫓鏂规" align="center" min-width="150"></el-table-column>
+            <el-table-column label="绫诲瀷" fixed  align="center">
+              <template slot-scope="{row}">
+                <span style="color: #00BA92" v-if="row.solutionType == 1">濮旀墭鎶曚繚</span>
+                <span style="color: #F95601;"  v-else>鐩存帴鎶曚繚</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="淇濆崟鍙�" fixed>
+              <template slot-scope="{row}">
+                <span>{{row.code ? row.code : '-'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="insureNum" align="center" label="鎶曚繚浜烘暟"  >
+              <template slot-scope="{row}">
+                <span>{{(row.insureNum||0)}} 浜�</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="guaranteeNum"  align="center" label="鍦ㄤ繚浜烘暟"  >
+              <template slot-scope="{row}">
+                <span>{{(row.guaranteeNum||0)}} 浜�</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="鎶曚繚鏃堕暱">
+              <template slot-scope="{row}">
+                <span>{{(row.serviceDays - row.loseEfficacyDays) < 0 ? `-` : (row.serviceDays - row.loseEfficacyDays+'澶�')}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="currentFee" label="宸蹭骇鐢熻垂鐢�"  align="center">
+              <template slot-scope="{row}">
+                <span>{{row.currentFee!=null?row.currentFee+' 鍏�': '-'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="fee" label="鎬昏垂鐢�"  align="center">
+              <template slot-scope="{row}">
+                <span>{{row.fee!=null?row.fee+' 鍏�': '-'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="createDate" label="鎻愪氦鏃ユ湡" align="center" min-width="150"></el-table-column>
+            <el-table-column prop="startTime" label="鎶曚繚鐢熸晥鏃ユ湡" align="center" min-width="150"></el-table-column>
+            <el-table-column prop="endTime" label="鎶曚繚澶辨晥鏃ユ湡"  align="center" min-width="150"></el-table-column>
+            <el-table-column
+                v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
+                label="鎿嶄綔"
+                min-width="150"
+                fixed="right"
+                align="center"
             >
-                <el-table-column label="搴忓彿" width="80px">
-                    <template slot-scope="scope">
-                        <span>{{scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="status" label="鐘舵��">
-                    <template slot-scope="{row}">
-                        <span v-if="row.status === 0">寰呭鎵�</span>
-                        <span v-if="row.status === 2">寰呯缃�</span>
-                        <span v-if="row.status === 3">宸茬缃�</span>
-                        <span v-if="row.status === 4">宸叉挙閿�</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="solutionsName" label="淇濋櫓鏂规"></el-table-column>
-                <el-table-column prop="insureNum" label="鎶曚繚浜烘暟"></el-table-column>
-                <el-table-column prop="serviceDays" label="鎶曚繚鏃堕暱锛堝ぉ锛�"></el-table-column>
-                <el-table-column prop="fee" label="鎬昏垂鐢紙鍏冿級"></el-table-column>
-                <el-table-column prop="checkDate" label="鎻愪氦鏃ユ湡"></el-table-column>
-                <el-table-column prop="startTime" label="鎶曚繚鐢熸晥鏃ユ湡"></el-table-column>
-                <el-table-column prop="endTime" label="鎶曚繚澶辨晥鏃ユ湡"></el-table-column>
-                <el-table-column
-                    v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
-                    label="鎿嶄綔"
-                    min-width="120"
-                    fixed="right"
-                >
-                    <template slot-scope="{row}">
-                        <el-button type="text" @click="$refs.operaInsuranceApplyWindow.open('缂栬緫鎶曚繚鐢宠淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:insuranceapply:update']">鏌ョ湅璇︽儏</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
+              <template slot-scope="{row}">
+                <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 v-if="row.statusCollect === 2">-->
+                <!--                            <el-button type="text" @click="$refs.additionSubtractionApplication.open('鍔犲噺淇濈敵璇�', { id: row.id })">鍔犲噺淇濈敵璇�</el-button>-->
+                <!--                        </template>-->
+              </template>
+            </el-table-column>
+          </el-table>
             <pagination
                 @size-change="handleSizeChange"
                 @current-change="handlePageChange"
@@ -85,48 +125,84 @@
             </pagination>
         </template>
         <!--    鏂板鎶曚繚    -->
-        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @sucess="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 { all as solutionAll} from '@/api/business/solutions'
+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 },
-    data () {
-        return {
-            // 鎼滅储
-            searchForm: {
-                createTimeS: '',
-                createTimeE: '',
-                baseSolutionId: '',
-                status: '2'
-            },
-            solutionList:[]
-        }
-    },
-    created () {
-        this.config({
-            module: '鎶曚繚鐢宠淇℃伅琛�',
-            api: '/business/insuranceApply',
-            'field.id': 'id',
-            'field.main': 'id'
-        })
-        this.search()
-        this.loadSelectList()
-    },
-    methods:{
-        loadSelectList() {
-          solutionAll({ dataType:0 }).then(res => {
-              this.solutionList = res
-            })
-        }
+  name: 'InsuranceApply',
+  extends: BaseTable,
+  components: { TableLayout, Pagination,OperaApplyChangeMonthWindow, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
+  data () {
+    return {
+      // 鎼滅储
+      searchForm: {
+        createTimeS: '',
+        createTimeE: '',
+        baseSolutionId: '',
+        statusCollect: ''
+      },
+      solutionList: []
     }
+  },
+  created () {
+    this.config({
+      module: '鎶曚繚鐢宠淇℃伅琛�',
+      api: '/business/insuranceApply',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    this.search()
+    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 })
+      } else {
+        this.$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.id })
+      }
+    },
+    loadSelectList () {
+      solutionAll({ dataType: 2 }).then(res => {
+        this.solutionList = res
+      })
+    },
+    changeTime (e) {
+        this.searchForm.createTimeS = e[0]
+        this.searchForm.createTimeE = e[1]
+        this.search()
+    }
+  }
 }
 </script>

--
Gitblit v1.9.3