From 4efbd1e895f6983dcdfcca5c4ad7df7f49c26cab Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期二, 30 一月 2024 14:35:45 +0800 Subject: [PATCH] Mr.Shi --- company/src/components/business/OperaInsuranceApplyWindow.vue | 292 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 227 insertions(+), 65 deletions(-) diff --git a/company/src/components/business/OperaInsuranceApplyWindow.vue b/company/src/components/business/OperaInsuranceApplyWindow.vue index 37a6fca..c71c349 100644 --- a/company/src/components/business/OperaInsuranceApplyWindow.vue +++ b/company/src/components/business/OperaInsuranceApplyWindow.vue @@ -44,7 +44,7 @@ border style="width: 100%"> <el-table-column - prop="code" + prop="applyCode" align="center" label="淇濆崟鍙�"> </el-table-column> @@ -88,62 +88,77 @@ </div> <div class="desc_item_cate"> <el-tabs v-model="activeName" @tab-click="handleClick"> - <el-tab-pane label="鍦ㄤ繚浜哄憳" name="first"></el-tab-pane> - <el-tab-pane label="鍔�/鍑忎繚璁板綍" name="second"></el-tab-pane> - <el-tab-pane label="鎹㈠巶璁板綍" name="third"></el-tab-pane> + <el-tab-pane label="鍦ㄤ繚浜哄憳" name="0"></el-tab-pane> + <el-tab-pane label="鍔�/鍑忎繚璁板綍" name="1"></el-tab-pane> + <el-tab-pane label="鎹㈠巶璁板綍" name="2"></el-tab-pane> </el-tabs> </div> <div class="desc_item_search"> - <el-form :inline="true" :model="formInline" class="demo-form-inline"> - <el-form-item label="鍦ㄤ繚鐘舵��" prop="region"> - <el-select v-model="formInline.region" placeholder="璇烽�夋嫨"> + <el-form :inline="true" :model="formInline" ref="sou" class="demo-form-inline"> + <el-form-item label="鍦ㄤ繚鐘舵��" prop="applyStatus"> + <el-select v-model="formInline.applyStatus" @change="search" placeholder="璇烽�夋嫨"> + <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="region"> - <el-select v-model="formInline.region" placeholder="璇烽�夋嫨"> - <el-option label="淇濋殰涓�" value="1"></el-option> - <el-option label="涓嶅湪淇�" value="2"></el-option> + <el-form-item label="娲鹃仯鍗曚綅" prop="duId"> + <el-select v-model="formInline.duId" placeholder="璇烽�夋嫨" @change="search"> + <el-option + v-for="item in dwList" + :key="item.id" + :label="item.name" + :value="item.id"> + </el-option> </el-select> </el-form-item> - <el-form-item label="鎵�灞炲伐绉�" prop="region"> - <el-select v-model="formInline.region" placeholder="璇烽�夋嫨"> - <el-option label="淇濋殰涓�" value="1"></el-option> - <el-option label="涓嶅湪淇�" value="2"></el-option> + <el-form-item label="鎵�灞炲伐绉�" prop="workTypeId"> + <el-select v-model="formInline.workTypeId" placeholder="璇烽�夋嫨" @change="search"> + <el-option + v-for="item in gzList" + :key="item.id" + :label="item.name" + :value="item.id"> + </el-option> </el-select> </el-form-item> - <el-form-item label="鍛樺伐濮撳悕" prop="user"> - <el-input v-model="formInline.user" placeholder="璇疯緭鍏�"></el-input> + <el-form-item label="鍛樺伐濮撳悕" prop="memberName"> + <el-input v-model="formInline.memberName" placeholder="璇疯緭鍏�" @keypress.enter.native="search"></el-input> </el-form-item> - <el-form-item label="淇濋櫓鐢熸晥璧锋湡" prop="user"> + <el-form-item label="淇濋櫓鐢熸晥璧锋湡" prop="end"> <el-date-picker - v-model="formInline.user" + @change="changeStart" + v-model="formInline.end" type="daterange" + format="yyyy 骞� MM 鏈� dd 鏃�" + value-format="yyyy-MM-dd" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"> </el-date-picker> </el-form-item> - <el-form-item label="淇濋櫓鐢熸晥璧锋湡" prop="user"> + <el-form-item label="淇濋櫓鐢熸晥姝㈡湡" prop="start"> <el-date-picker - v-model="formInline.user" + @change="changeEnd" + v-model="formInline.start" type="daterange" + format="yyyy 骞� MM 鏈� dd 鏃�" + value-format="yyyy-MM-dd" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"> </el-date-picker> </el-form-item> <section> - <el-button type="primary" @click="onSubmit">鏌ヨ</el-button> - <el-button>閲嶇疆</el-button> - <el-button type="primary">瀵煎嚭鍚嶅崟</el-button> + <el-button type="primary" @click="search">鏌ヨ</el-button> + <el-button @click="resetting">閲嶇疆</el-button> + <el-button type="primary" @click="exportExcel">瀵煎嚭鍚嶅崟</el-button> </section> </el-form> </div> <div class="desc_item_from"> <el-table - :data="tableData" + :data="list" border style="width: 100%"> <el-table-column label="搴忓彿"> @@ -152,48 +167,48 @@ </template> </el-table-column> <el-table-column - prop="date" + prop="memberName" label="鍛樺伐濮撳悕"> </el-table-column> <el-table-column - prop="name" - label="鎬у埆" - width="180"> + label="鎬у埆"> + <template slot-scope="{row}"> + <span v-if="row.sex === 0">鐢�</span> + <span v-else>濂�</span> + </template> </el-table-column> <el-table-column - prop="address" + prop="idcardNo" label="韬唤璇佸彿"> </el-table-column> <el-table-column - prop="address" + prop="duName" label="娲鹃仯鍗曚綅"> </el-table-column> <el-table-column - prop="address" + prop="workTypeName" label="鎵�灞炲伐绉�"> </el-table-column> <el-table-column - prop="address" + prop="startTime" label="淇濋櫓鐢熸晥璧锋湡"> </el-table-column> <el-table-column - prop="address" + prop="endTime" label="淇濋櫓鐢熸晥姝㈡湡"> </el-table-column> <el-table-column - prop="address" + prop="fee" label="浜х敓璐圭敤锛堝厓锛�"> </el-table-column> </el-table> <div class="desc_item_from_page"> <el-pagination - @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" - :page-sizes="[100, 200, 300, 400]" - :page-size="100" - layout="total, sizes, prev, pager, next, jumper" - :total="400"> + :page-size="10" + layout="total, prev, pager, next, jumper" + :total="total"> </el-pagination> </div> </div> @@ -226,10 +241,12 @@ import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow' import applyReturn from '@/components/enterprise/applyReturn' -import {getDetail, getSignLink} from "@/api/business/insuranceApply"; +import { getDetail, getSignLink, applyDetailPage, applyChagneDetailPage, exportExcel, applyChagneDetailExcel } from "@/api/business/insuranceApply"; +import { findListByDTO } from "@/api/business/dispatchUnit"; +import { findListByDTO as worktypeFindListByDTO } from "@/api/business/worktype"; import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow' import { mapState } from 'vuex' -import {all as solutionAll} from "@/api/business/solutions"; + export default { name: 'OperaInsuranceApplyWindow', extends: BaseOpera, @@ -247,8 +264,17 @@ rules: { }, formInline: { - user: '', - region: '' + applyStatus: '', + duId: '', + workTypeId: '', + memberName: '', + end: [], + start: [], + endTimeE: '', + endTimeS: '', + startTimeE: '', + startTimeS: '', + types: '' }, visible1: false, visible2: false, @@ -257,21 +283,13 @@ visible5: false, reverse: true, radio: 0, - fileList: [ - {name: 'food.pdf', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'} - ], - activities: [{ - content: '娲诲姩鎸夋湡寮�濮�', - timestamp: '2018-04-15' - }, { - content: '閫氳繃瀹℃牳', - timestamp: '2018-04-13' - }, { - content: '鍒涘缓鎴愬姛', - timestamp: '2018-04-11' - }], + activities: [], tableData: [], - activeName: 'first', + list: [], + dwList: [], + gzList: [], + activeName: '0', + total: 0, currentPage: 1 } }, @@ -290,13 +308,155 @@ this.title = title this.dataId = target.id this.getDetail() + this.getList() + this.getDW() + this.getGZ() }, + // 娲鹃仯鍗曚綅 + getDW() { + findListByDTO({ applyId: this.dataId }) + .then(res => { + this.dwList = res + }) + }, + // 宸ョ + getGZ() { + worktypeFindListByDTO({ + id: this.dataId, + queryType: 2 + }).then(res => { + this.gzList = res + }) + }, + resetting() { + this.formInline.end = [] + this.formInline.end = [] + this.formInline.endTimeE = '' + this.formInline.endTimeS = '' + this.formInline.startTimeE = '' + this.formInline.startTimeS = '' + this.$refs.sou.resetFields(); + this.search() + }, + search() { + this.currentPage = 1 + this.getList() + }, + changeStart(e) { + if (e.length > 0) { + this.formInline.startTimeE = e[0] + this.formInline.startTimeS = e[1] + } else { + this.formInline.startTimeE = '' + this.formInline.startTimeS = '' + } + this.search() + }, + changeEnd(e) { + if (e.length > 0) { + this.formInline.endTimeE = e[0] + this.formInline.endTimeS = e[1] + } else { + this.formInline.endTimeE = '' + this.formInline.endTimeS = '' + } + this.search() + }, + exportExcel() { + if (this.activeName === '0') { + exportExcel({ + capacity: 10, + page: this.currentPage, + model: { + solutionName: this.tableData[0].solutionsName, + applyId: this.dataId, + applyStatus: this.formInline.applyStatus, + duId: this.formInline.duId, + workTypeId: this.formInline.workTypeId, + memberName: this.formInline.memberName, + endTimeE: this.formInline.endTimeE, + endTimeS: this.formInline.endTimeS, + startTimeE: this.formInline.startTimeE, + startTimeS: this.formInline.startTimeS + } + }).then(response => { + this.download(response) + }) + } else { + applyChagneDetailExcel({ + capacity: 10, + page: this.currentPage, + model: { + applyId: this.dataId, + applyStatus: this.formInline.applyStatus, + duId: this.formInline.duId, + workTypeId: this.formInline.workTypeId, + memberName: this.formInline.memberName, + endTimeE: this.formInline.endTimeE, + endTimeS: this.formInline.endTimeS, + startTimeE: this.formInline.startTimeE, + startTimeS: this.formInline.startTimeS, + types: this.formInline.types + } + }).then(response => { + this.download(response) + }) + } + }, + getList() { + if (this.activeName === '0') { + applyDetailPage({ + capacity: 10, + page: this.currentPage, + model: { + applyId: this.dataId, + applyStatus: this.formInline.applyStatus, + duId: this.formInline.duId, + workTypeId: this.formInline.workTypeId, + memberName: this.formInline.memberName, + endTimeE: this.formInline.endTimeE, + endTimeS: this.formInline.endTimeS, + startTimeE: this.formInline.startTimeE, + startTimeS: this.formInline.startTimeS + } + }).then(res => { + this.list = res.records + this.total = res.total + }) + } else { + applyChagneDetailPage({ + capacity: 10, + page: this.currentPage, + model: { + applyId: this.dataId, + applyStatus: this.formInline.applyStatus, + duId: this.formInline.duId, + workTypeId: this.formInline.workTypeId, + memberName: this.formInline.memberName, + endTimeE: this.formInline.endTimeE, + endTimeS: this.formInline.endTimeS, + startTimeE: this.formInline.startTimeE, + startTimeS: this.formInline.startTimeS, + types: this.formInline.types + } + }).then(res => { + this.list = res.records + this.total = res.total + }) + } + }, handleClick(e) { - console.log(e) + this.activeName = e.index + if (e.index === '1') { + this.formInline.types = [0, 1] + } else if (e.index === '2') { + this.formInline.types = [2] + } + this.resetting() }, goSign(){ getSignLink(this.dataId).then(res => { - window.open(res) + window.open(res) }).catch(err => { this.$tip.apiFailed(err) }) @@ -313,11 +473,13 @@ window.open(this.model.baoxiandanFile.fileurlFull) } }, - handleSizeChange(){ - + handleSizeChange(val){ + console.log(val) }, - handleCurrentChange(){ - + handleCurrentChange(val){ + console.log(val) + this.page = val + this.getList() }, onSubmit(){ @@ -328,7 +490,7 @@ this.tableData = new Array() this.tableData.push(res) console.log(this.tableData) - this.activities=res.applyLogList + this.activities = res.applyLogList }).catch(err => { }) }, -- Gitblit v1.9.3