From 50fb58286ed3b718c39a97e0987ee7561a295651 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 04 七月 2025 17:56:41 +0800
Subject: [PATCH] git ch

---
 company/src/views/enterprise/myPolicy.vue |  348 ++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 241 insertions(+), 107 deletions(-)

diff --git a/company/src/views/enterprise/myPolicy.vue b/company/src/views/enterprise/myPolicy.vue
index 4b875c3..2f1dd47 100644
--- a/company/src/views/enterprise/myPolicy.vue
+++ b/company/src/views/enterprise/myPolicy.vue
@@ -6,27 +6,41 @@
                 <el-input v-model="searchForm.code" placeholder="璇疯緭鍏�" @keypress.enter.native="search"></el-input>
             </el-form-item>
             <el-form-item label="淇濋櫓鏂规" prop="baseSolutionId">
-                <el-select v-model="searchForm.baseSolutionId" placeholder="璇烽�夋嫨" @change="search">
+                <el-select v-model="searchForm.baseSolutionId" filterable 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="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-form-item label="鎶曚繚绫诲瀷" prop="solutionType">
+                <el-select v-model="searchForm.solutionType" placeholder="璇烽�夋嫨" @change="search">
+                    <el-option label="鐩存帴鎶曚繚" value="0"></el-option>
+                    <el-option label="濮旀墭鎶曚繚" value="1"></el-option>
                 </el-select>
             </el-form-item>
+            <el-form-item label="鐘舵��" prop="timeOut">
+                <el-select v-model="searchForm.timeOut" placeholder="璇烽�夋嫨" @change="search">
+                    <el-option label="寰呯敓鏁�" value="0"></el-option>
+                    <el-option label="淇濋殰涓�" value="1"></el-option>
+                    <el-option label="宸茶繃鏈�" value="2"></el-option>
+                </el-select>
+            </el-form-item>
+<!--            <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="time1">
                 <el-date-picker
                     v-model="time1"
@@ -56,48 +70,96 @@
         </el-form>
         <!-- 琛ㄦ牸鍜屽垎椤� -->
         <template v-slot:table-wrap>
+            <div style="margin-bottom: 15px;" v-if="obj.waitSignNum > 0 || obj.renewalNum > 0">
+                <el-alert type="warning" show-icon :closable="false" :style="obj.waitSignNum > 0 ? 'margin-bottom: 15px;' : ''" v-if="obj.renewalNum > 0">
+                    <span style="margin-right: 15px;">缁繚鎻愰啋: 鎮ㄦ湁鍗冲皢鍒版湡淇濋櫓</span>
+                    <el-button type="text" @click="$refs.renewalInsurance.open('缁繚鎻愰啋')">鏌ョ湅璇︽儏</el-button>
+                    <el-button type="text" @click="closeRemind(6)">鍏抽棴鎻愰啋</el-button>
+                </el-alert>
+                <el-alert type="warning" :closable="false" show-icon v-if="obj.waitSignNum > 0">
+                    <span style="margin-right: 15px;">鎶曚繚鎻愰啋: 鎮ㄦ湁鎶曚繚鐢宠寰呯缃�</span>
+                    <el-button type="text" @click="see">鏌ョ湅璇︽儏</el-button>
+                    <el-button type="text" @click="closeRemind(1)">鍏抽棴鎻愰啋</el-button>
+                </el-alert>
+            </div>
             <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.OperaInsuranceApplyWindow.open('鎶曚繚鐢宠', { type: '' })">鎶曚繚鐢宠</el-button></li>
             </ul>
             <el-table
                 v-loading="isWorking.search"
                 :data="tableData.list"
                 stripe
             >
-                <el-table-column label="搴忓彿" width="80px">
+                <el-table-column label="搴忓彿" width="80px" align="center" fixed>
                     <template slot-scope="scope">
                         <span>{{scope.$index + 1}}</span>
                     </template>
                 </el-table-column>
-                <el-table-column prop="statusInfo" label="鐘舵��">
+                <el-table-column prop="statusInfo" align="center" fixed label="鐘舵��">
                   <template slot-scope="{row}">
-                    <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
+                    <span style="color:#f95601;" v-if="row.status === 5 && row.statusInfo === '寰呯敓鏁�'">{{row.statusInfo}}</span>
+                    <span style="color:#999;" v-else-if="row.status === 5 && row.statusInfo === '宸茶繃鏈�'">{{row.statusInfo}}</span>
+                    <span :class="'apply-status'+row.status" v-else>{{row.statusInfo}}</span>
                   </template>
                 </el-table-column>
-                <el-table-column prop="solutionsName" label="淇濋櫓鏂规"></el-table-column>
-                <el-table-column label="淇濆崟鍙�">
+                <el-table-column prop="solutionsName" align="center" fixed label="淇濋櫓鏂规" 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="淇濆崟鍙�" align="center" fixed>
                     <template slot-scope="{row}">
                         <span>{{row.code ? row.code : '-'}}</span>
                     </template>
                 </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="currentFee" 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 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="褰撳墠鍦ㄤ繚浜烘暟" width="120">
+                  <template slot-scope="{row}">
+                    <span>{{(row.guaranteeNum||0)}} 浜�</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="鎶曚繚鏃堕暱" align="center">
+                    <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" width="120">
+                    <template slot-scope="{row}">
+                        <span>{{row.changeMoney+' 鍏�'}}</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"
                 >
                     <template slot-scope="{row}">
-                        <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.id })" v-permissions="['business:insuranceapply:update']">鏌ョ湅璇︽儏</el-button>
-                        <template v-if="row.statusCollect === 2">
-                            <el-button type="text" @click="$refs.additionSubtractionApplication.open('鍔犲噺淇濈敵璇�', { id: row.id })">鍔犲噺淇濈敵璇�</el-button>
-                        </template>
+                        <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 })" v-if="isShow(row.status, row.endTime)">鍔犲噺淇濈敵璇�</el-button>
+<!--                        </template>-->
                     </template>
                 </el-table-column>
             </el-table>
@@ -109,90 +171,162 @@
             </pagination>
         </template>
         <!--    鏂板鎶曚繚    -->
-        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
+        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="result" />
         <!--    鎶曚繚璇︽儏    -->
         <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
+      <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
         <!--    鍔犲噺淇濈敵璇�    -->
         <additionSubtractionApplication ref="additionSubtractionApplication" @success="handlePageChange" />
+        <!--    缁繚寮圭獥    -->
+<!--        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" @success="handlePageChange" />-->
+        <renewalInsurance ref="renewalInsurance" @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 OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
-    import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow'
+import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
+import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
+import renewalInsurance from '@/components/enterprise/renewalInsurance'
+import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
+import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
 
-    import { all as solutionAll} from '@/api/business/solutions'
-    export default {
-        name: 'myPolicy',
-        extends: BaseTable,
-        components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails, additionSubtractionApplication },
-        data () {
-            return {
-                // 鎼滅储
-                searchForm: {
-                    code: '',
-                    endTimeE: '',
-                    endTimeS: '',
-                    startTimeE: '',
-                    startTimeS: '',
-                    baseSolutionId: '',
-                    statusCollect: '2'
-                },
-                time1: [],
-                time2: [],
-                solutionList:[]
-            }
-        },
-        created () {
-            this.config({
-                module: '鎶曚繚鐢宠淇℃伅琛�',
-                api: '/business/insuranceApply',
-                'field.id': 'id',
-                'field.main': 'id'
-            })
-            this.search()
-            this.loadSelectList()
-        },
-        methods:{
-            reset() {
-                this.time1 = []
-                this.time2 = []
-                this.searchForm.endTimeE = ''
-                this.searchForm.endTimeS = ''
-                this.searchForm.startTimeE = ''
-                this.searchForm.startTimeS = ''
-                this.$refs.searchForm.resetFields()
-                this.search()
-            },
-            changeE(e) {
-                if (e.length > 0) {
-                    this.searchForm.endTimeS = e[0]
-                    this.searchForm.endTimeE = e[1]
-                } else {
-                    this.searchForm.endTimeS = ''
-                    this.searchForm.endTimeE = ''
-                }
-                this.search()
-            },
-            changeS(e) {
-                if (e.length > 0) {
-                    this.searchForm.startTimeS = e[0]
-                    this.searchForm.startTimeE = e[1]
-                } else {
-                    this.searchForm.startTimeS = ''
-                    this.searchForm.startTimeE = ''
-                }
-                this.search()
-            },
-            loadSelectList() {
-                solutionAll({ dataType: 0 }).then(res => {
-                    this.solutionList = res
-                })
-            }
-        }
+import { all as solutionAll } from '@/api/business/solutions'
+import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
+export default {
+  name: 'myPolicy',
+  extends: BaseTable,
+  components: {
+    TableLayout,
+    Pagination,
+    OperaInsuranceApplyWindow,
+    OperaInsuranceApplyDetails,
+    renewalInsurance,
+    // OperaApplyChangeMonthWindow,
+    additionSubtractionApplication,
+    OperaWtbApplyShopWindow
+  },
+  data () {
+    return {
+      // 鎼滅储
+      searchForm: {
+        code: '',
+        endTimeE: '',
+        endTimeS: '',
+        startTimeE: '',
+        startTimeS: '',
+        baseSolutionId: '',
+        status: '5,27',
+        solutionType: '',
+        timeOut: ''
+      },
+      obj: {
+        renewalNum: 0,
+        waitSignNum: 0
+      },
+      time1: [],
+      time2: [],
+      solutionList: []
     }
+  },
+  created () {
+    this.config({
+      module: '鎶曚繚鐢宠淇℃伅琛�',
+      api: '/business/insuranceApply',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    this.search()
+    this.loadSelectList()
+    this.getNum()
+  },
+  methods: {
+    // 鍒ゆ柇鏄惁鏄剧ず鍔犲噺淇�
+    isShow(status, endTime) {
+      const currentDate = new Date();
+      const specifiedDate = new Date(endTime);
+      return [5,27].includes(status) && (currentDate < specifiedDate);
+    },
+    godetail (row) {
+      if (row.solutionType == 1) {
+        this.$refs.OperaWtbApplyShopWindow.open('濮旀墭鎶曚繚璇︽儏', { id: row.id })
+      } else {
+        this.$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.id })
+      }
+    },
+    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()
+    },
+    see () {
+      this.searchForm.statusCollect = '7'
+      this.search()
+    },
+    closeRemind (type) {
+      this.$confirm('纭畾鍏抽棴姝ゆ彁绀哄悧?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        closeApplyNotice(type)
+          .then(res => {
+            this.getNum()
+          })
+      }).catch(() => {
+
+      })
+    },
+    getNum () {
+      getCaptcha()
+        .then(res => {
+          this.obj.renewalNum = res.renewalNum
+          this.obj.waitSignNum = res.waitSignNum
+        })
+    },
+    reset () {
+      this.time1 = []
+      this.time2 = []
+      this.searchForm.endTimeE = ''
+      this.searchForm.endTimeS = ''
+      this.searchForm.startTimeE = ''
+      this.searchForm.startTimeS = ''
+      this.$refs.searchForm.resetFields()
+      this.search()
+    },
+    changeE (e) {
+      if (e.length > 0) {
+        this.searchForm.endTimeS = e[0]
+        this.searchForm.endTimeE = e[1]
+      } else {
+        this.searchForm.endTimeS = ''
+        this.searchForm.endTimeE = ''
+      }
+      this.search()
+    },
+    changeS (e) {
+      if (e.length > 0) {
+        this.searchForm.startTimeS = e[0]
+        this.searchForm.startTimeE = e[1]
+      } else {
+        this.searchForm.startTimeS = ''
+        this.searchForm.startTimeE = ''
+      }
+      this.search()
+    },
+    loadSelectList () {
+      solutionAll({ dataType: 0 }).then(res => {
+        this.solutionList = res
+      })
+    }
+  }
+}
 </script>

--
Gitblit v1.9.3