From 7e7d01bc2c64ef12429845c4130d449439d4be33 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 29 一月 2024 20:11:51 +0800
Subject: [PATCH] Mr.Shi
---
company/src/components/enterprise/applyReturn.vue | 72 ++++++++++++++
company/src/components/enterprise/OperaInsuranceApplyWindow.vue | 100 +++++++++++++++----
company/src/api/business/insuranceApply.js | 15 +++
company/src/components/business/OperaInsuranceApplyWindow.vue | 55 ++++++++---
company/src/views/enterprise/insuranceApply.vue | 35 +++---
company/.env.development | 2
6 files changed, 224 insertions(+), 55 deletions(-)
diff --git a/company/.env.development b/company/.env.development
index 5e235ca..4f05da6 100644
--- a/company/.env.development
+++ b/company/.env.development
@@ -13,6 +13,6 @@
# VUE_APP_API = 'http://192.168.0.134:10023/'
-VUE_APP_API = 'http://localhost:10023/'
+#VUE_APP_API = 'http://localhost:10023/'
# VUE_APP_API = 'http://192.168.0.134:10023/'
diff --git a/company/src/api/business/insuranceApply.js b/company/src/api/business/insuranceApply.js
index a4c416f..038246a 100644
--- a/company/src/api/business/insuranceApply.js
+++ b/company/src/api/business/insuranceApply.js
@@ -42,6 +42,11 @@
return request.post('/business/insuranceApply/getCountCyclePriceVO', data)
}
+// 鐢宠璁板綍鐘舵�佸鐞�
+export function applyOpt (data) {
+ return request.post('/business/insuranceApply/applyOpt', data)
+}
+
export function exportDetailExcel (data) {
return request.post('/business/insuranceApply/exportDetailExcel', data, {
trim: true,
@@ -59,3 +64,13 @@
trim: true
})
}
+
+// 鍒楄〃鏌ヨ
+export function findList (data) {
+ return request.post('/business/applyDetail/findList', data)
+}
+
+// 淇敼
+export function updateData (data) {
+ return request.post('/business/insuranceApply/updateData', data)
+}
diff --git a/company/src/components/business/OperaInsuranceApplyWindow.vue b/company/src/components/business/OperaInsuranceApplyWindow.vue
index bff0dfe..37a6fca 100644
--- a/company/src/components/business/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -15,16 +15,27 @@
<span>鎻愪氦鏃堕棿锛歿{ model.createDate }}</span>
</div>
<div class="desc_item_label_right">
- <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�',model,0)">瀵煎嚭璇﹀崟</el-button>
- <el-button v-if="model.status == 2 ||model.status == 3 ||model.status == 5 ||model.status == 7 ||model.status == 8 " type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
- <el-button v-if="model.status == 5 " type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
- <el-button v-if="model.status == 10 " type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶鎶曚繚鍗�',model,2)">涓婁紶鎶曚繚鍗�</el-button>
- <el-button v-if="model.status == 3 " type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶淇濋櫓鍗�',model,3)">涓婁紶淇濋櫓鍗�</el-button>
- <el-button v-if="model.status == 2 " type="primary" @click="goSign">浼佷笟绛剧珷</el-button>
- <el-button v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('椹冲洖閫�鍥炵敵璇�',model,5)">椹冲洖閫�鍥炵敵璇�</el-button>
- <el-button v-if="model.status == 0 " type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚瀹℃牳',model,1)">鎶曚繚瀹℃牳</el-button>
- <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('閫�鍥炴姇淇�',model,1)">閫�鍥炴姇淇�</el-button>
- <el-button v-if="model.status == 5 " type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('淇敼淇濋櫓鍗�',model,4)">淇敼淇濋櫓鍗�</el-button>
+ <template v-if="userInfo.type === 1">
+ <el-button v-if="[0, 2, 3, 10].includes(model.status)" type="danger" @click="$refs.applyReturn.open('鐢宠閫�鍥�', {id: dataId})">鐢宠閫�鍥�</el-button>
+ <el-button v-if="model.status == 4" type="primary" @click="$refs.OperaInsuranceApply.open('鎶曚繚鐢宠', {id: dataId})">鍐嶆鎶曚繚</el-button>
+ <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�',model,0)">瀵煎嚭璇﹀崟</el-button>
+ <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
+ <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
+ <el-button v-if="model.status == 2" type="primary" @click="goSign">绛剧讲鎶曚繚鍗�</el-button>
+ </template>
+ <template v-else>
+ <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�',model,0)">瀵煎嚭璇﹀崟</el-button>
+ <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
+ <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
+ <el-button v-if="model.status == 10" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶鎶曚繚鍗�',model,2)">涓婁紶鎶曚繚鍗�</el-button>
+ <el-button v-if="model.status == 3" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶淇濋櫓鍗�',model,3)">涓婁紶淇濋櫓鍗�</el-button>
+ <el-button v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('椹冲洖閫�鍥炵敵璇�',model,5)">椹冲洖閫�鍥炵敵璇�</el-button>
+ <el-button v-if="model.status == 0" type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚瀹℃牳',model,1)">鎶曚繚瀹℃牳</el-button>
+ <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('閫�鍥炴姇淇�',model,1)">閫�鍥炴姇淇�</el-button>
+ <el-button v-if="model.status == 5" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('淇敼淇濋櫓鍗�',model,4)">淇敼淇濋櫓鍗�</el-button>
+ </template>
+
+
</div>
</div>
<div class="desc_item_from">
@@ -201,7 +212,10 @@
</div>
<InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
<OperaInsuranceApplyCheckWindow ref="OperaInsuranceApplyCheckWindow" @success="successEvent" />
- <!-- 閫�鍥炴姇淇� -->
+ <!-- 浼佷笟鐢宠閫�鍥� -->
+ <applyReturn ref="applyReturn" @success="successEvent" />
+ <!-- 鏂板鎶曚繚 -->
+ <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
</GlobalWindow>
</template>
@@ -210,12 +224,16 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import InsuranceDetails from '@/components/business/InsuranceDetails'
import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow'
+
+import applyReturn from '@/components/enterprise/applyReturn'
import {getDetail, getSignLink} from "@/api/business/insuranceApply";
+import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow'
+import { mapState } from 'vuex'
import {all as solutionAll} from "@/api/business/solutions";
export default {
name: 'OperaInsuranceApplyWindow',
extends: BaseOpera,
- components: { GlobalWindow, InsuranceDetails ,OperaInsuranceApplyCheckWindow},
+ components: { GlobalWindow, InsuranceDetails ,OperaInsuranceApplyCheckWindow, applyReturn, OperaInsuranceApply },
data () {
return {
// 琛ㄥ崟鏁版嵁
@@ -263,12 +281,19 @@
'field.id': 'id'
})
},
+ computed: {
+ ...mapState(['userInfo'])
+ },
methods: {
open(title,target){
- this.visible=true;
- this.dataId=target.id
- this.getDetail()
+ this.visible = true;
+ this.title = title
+ this.dataId = target.id
+ this.getDetail()
},
+ handleClick(e) {
+ console.log(e)
+ },
goSign(){
getSignLink(this.dataId).then(res => {
window.open(res)
diff --git a/company/src/components/enterprise/OperaInsuranceApplyWindow.vue b/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
index 424cb7b..d31b415 100644
--- a/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -142,7 +142,7 @@
import importEmployees from '@/components/enterprise/importEmployees'
import confirmJobType from '@/components/enterprise/confirmJobType'
import { all } from '@/api/business/solutions'
-import { create, getCountCyclePriceVO } from '@/api/business/insuranceApply'
+import { create, getCountCyclePriceVO, getDetail, findList, updateData } from '@/api/business/insuranceApply'
export default {
name: 'OperaInsuranceApplyWindow',
extends: BaseOpera,
@@ -151,6 +151,7 @@
return {
form: {
id: null,
+ ID: null,
solutionId: '',
applyStartTime: '',
applyEndTime: ''
@@ -187,14 +188,35 @@
this.form.solutionId = ''
this.form.applyStartTime = ''
this.form.applyEndTime = ''
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- this.form[this.configData['field.id']] = null
- })
- this.visible = true
+ if (target && target.id) {
+ this.form.id = target.id
+ this.getDetails()
+ } else {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ })
+ }
this.getCompany()
+ this.visible = true
this.updatePickerOptions()
},
+ // 鑾峰彇鎶曚繚璇︽儏
+ getDetails() {
+ findList({ applyId: this.form.id })
+ .then(res => {
+ res.forEach(item => {
+ item.idCard = item.idcardNo
+ item.fee = ''
+ })
+ this.tableData = res
+ })
+ getDetail(this.form.id)
+ .then(res => {
+ this.form.solutionId = res.solutionId
+ this.changeSolution1(res.solutionId)
+ })
+ },
getSummaries(param) {
const { columns, data } = param
const sums = []
@@ -245,22 +267,42 @@
item.idcardNo = item.idCard
})
this.isWorking = true
- create({
- applyDetailList: arr,
- applyStartTime: this.form.applyStartTime,
- applyEndTime: this.form.applyEndTime,
- solutionId: this.form.solutionId
- }).then(() => {
- this.visible = false
- this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
- this.$emit('success')
- })
- .catch(e => {
- this.$tip.apiFailed(e)
- })
- .finally(() => {
- this.isWorking = false
- })
+ if (!this.form.id) {
+ create({
+ applyDetailList: arr,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ solutionId: this.form.solutionId
+ }).then(() => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ } else {
+ updateData({
+ id: this.form.id,
+ applyDetailList: arr,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ solutionId: this.form.solutionId
+ }).then(() => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ }).catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ }
+
}
})
},
@@ -328,6 +370,7 @@
},
// 鍒囨崲鏂规
changeSolution(e) {
+ this.tableData = []
this.company.forEach(item => {
if (item.id === e) {
// this.price = item.price
@@ -339,6 +382,19 @@
item.fee = this.price
})
},
+ // 鍒囨崲鏂规
+ changeSolution1(e) {
+ this.company.forEach(item => {
+ if (item.id === e) {
+ // this.price = item.price
+ this.item = item
+ this.updatePickerOptions()
+ }
+ })
+ this.tableData.forEach(item => {
+ item.fee = this.price
+ })
+ },
dele(index) {
this.tableData.splice(index, 1)
},
diff --git a/company/src/components/enterprise/applyReturn.vue b/company/src/components/enterprise/applyReturn.vue
new file mode 100644
index 0000000..4c2f107
--- /dev/null
+++ b/company/src/components/enterprise/applyReturn.vue
@@ -0,0 +1,72 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ width="40%"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <el-form ref="form" :model="form" label-width="130px">
+ <el-form-item label="濉啓鐢宠璇存槑">
+ <el-input type="textarea" v-model="form.remark"></el-input>
+ </el-form-item>
+ </el-form>
+ </GlobalWindow>
+</template>
+
+<script>
+ import BaseOpera from '@/components/base/BaseOpera'
+ import GlobalWindow from '@/components/common/GlobalWindow'
+ import { applyOpt } from '@/api/business/insuranceApply'
+
+ export default {
+ name: 'applyReturn',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ remark: ''
+ }
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/insurance',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ })
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ })
+ },
+ confirm() {
+ this.isWorking = true
+ applyOpt({ applyId: this.form.id, optIllustration: this.form.remark, optType: 1 })
+ .then(res => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ }
+ }
+ }
+</script>
diff --git a/company/src/views/enterprise/insuranceApply.vue b/company/src/views/enterprise/insuranceApply.vue
index 0561cbf..c956493 100644
--- a/company/src/views/enterprise/insuranceApply.vue
+++ b/company/src/views/enterprise/insuranceApply.vue
@@ -2,12 +2,16 @@
<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-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="2"></el-option>
- <el-option label="宸茬缃�" value="3"></el-option>
- <el-option label="宸叉挙閿�" value="7"></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-select>
</el-form-item>
<el-form-item label="淇濋櫓鏂规" prop="baseSolutionId">
@@ -51,14 +55,7 @@
<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="statusInfo" label="鐘舵��"></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>
@@ -73,7 +70,7 @@
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>
+ <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.id })" v-permissions="['business:insuranceapply:update']">鏌ョ湅璇︽儏</el-button>
</template>
</el-table-column>
</el-table>
@@ -85,7 +82,9 @@
</pagination>
</template>
<!-- 鏂板鎶曚繚 -->
- <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @sucess="handlePageChange" />
+ <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
+ <!-- 鎶曚繚璇︽儏 -->
+ <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
</TableLayout>
</template>
@@ -94,11 +93,13 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
+import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
+
import { all as solutionAll} from '@/api/business/solutions'
export default {
name: 'InsuranceApply',
extends: BaseTable,
- components: { TableLayout, Pagination, OperaInsuranceApplyWindow },
+ components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails },
data () {
return {
// 鎼滅储
@@ -106,7 +107,7 @@
createTimeS: '',
createTimeE: '',
baseSolutionId: '',
- status: '2'
+ statusCollect: ''
},
solutionList:[]
}
--
Gitblit v1.9.3