| company/src/api/business/applyChange.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/business/OperaInsuranceApplyWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/OperaInsuranceApplyWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/additionSubtractionApplication.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/dispatchUnitDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/factoryChange.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/selectEmployees.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/components/enterprise/selectEmployeesCopy.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/views/enterprise/add_subtract.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/views/enterprise/dispatchUnit.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| company/src/views/enterprise/myPolicy.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
company/src/api/business/applyChange.js
@@ -11,3 +11,13 @@ export function updateById (data) { return request.post('/business/applyChange/updateById', data) } // æ°å»º export function create (data) { return request.post('/business/applyChange/create', data) } // æ°å»º export function getChangeCountCyclePriceVO (data) { return request.post('/business/applyChange/getChangeCountCyclePriceVO', data) } company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -8,6 +8,14 @@ > <div class="desc"> <div class="desc_item"> <div class="desc_item_label" v-if="model.statusCollect === 2 || model.statusCollect === 3"> <div class="desc_item_label_left"> <span>ä¿é©å°æè¿æ <b style="color: #F95601;">{{model.loseEfficacyDays ? model.loseEfficacyDays : '-'}}</b> 天</span> <el-button type="primary" v-if="model.statusCollect === 2 || model.statusCollect === 3" @click="$refs.OperaInsuranceApply.open('æä¿ç³è¯·', { id: dataId })">ä¸é®ç»ä¿</el-button> <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.additionSubtractionApplication.open('å åä¿ç³è¯·', { id: dataId })">å åä¿ç³è¯·</el-button> <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.factoryChange.open('æ¢åç³è¯·', { id: dataId })">æ¢åç³è¯·</el-button> </div> </div> <div class="desc_item_label"> <div class="desc_item_label_left"> <span>æä¿ä¼ä¸ï¼{{ model.companyName }}</span> @@ -34,8 +42,6 @@ <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"> @@ -231,6 +237,10 @@ <applyReturn ref="applyReturn" @success="successEvent" /> <!-- æ°å¢æä¿ --> <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" /> <!-- å åä¿ç³è¯· --> <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" /> <!-- æ¢åç³è¯· --> <factoryChange ref="factoryChange" @success="successEvent" /> </GlobalWindow> </template> @@ -239,6 +249,8 @@ import GlobalWindow from '@/components/common/GlobalWindow' import InsuranceDetails from '@/components/business/InsuranceDetails' import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow' import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication' import factoryChange from '@/components/enterprise/factoryChange' import applyReturn from '@/components/enterprise/applyReturn' import { getDetail, getSignLink, applyDetailPage, applyChagneDetailPage, exportExcel, applyChagneDetailExcel } from "@/api/business/insuranceApply"; @@ -250,7 +262,15 @@ export default { name: 'OperaInsuranceApplyWindow', extends: BaseOpera, components: { GlobalWindow, InsuranceDetails ,OperaInsuranceApplyCheckWindow, applyReturn, OperaInsuranceApply }, components: { GlobalWindow, InsuranceDetails, OperaInsuranceApplyCheckWindow, applyReturn, OperaInsuranceApply, additionSubtractionApplication, factoryChange }, data () { return { // è¡¨åæ°æ® company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -189,8 +189,11 @@ this.form.applyStartTime = '' this.form.applyEndTime = '' if (target && target.id) { this.form.id = target.id this.getDetails() this.$nextTick(() => { this.$refs.form.resetFields() this.form.id = target.id this.getDetails() }) } else { this.$nextTick(() => { this.$refs.form.resetFields() company/src/components/enterprise/additionSubtractionApplication.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,565 @@ <template> <GlobalWindow :title="title" width="100%" text="æä¿ç³è¯·" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <div class="list"> <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> <el-form-item label="ä¿é©æ¹æ¡"> <span>{{form.solutionsName}}</span> </el-form-item> <el-form-item label="æ¹åçæèµ·æ" prop="applyStartTime"> <div style="display: flex; flex-direction: column;"> <el-date-picker @change="changeApplyStartTime" v-model="form.applyStartTime" type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" format="yyyy å¹´ MM æ dd æ¥" placeholder="éæ©æ¥æ"> </el-date-picker> <span style="color: #F95601; font-size: 14px;">ï¼æ¬¡æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶ æ¶æäº¤ä»¥ä¿é©å为åï¼</span> </div> </el-form-item> <el-form-item label="æä¿å¹´é¾" v-if="item"> <span>{{item.minAge}} è³ {{item.maxAge}}</span> </el-form-item> <el-form-item label="è´¹ç¨" v-if="item"> <span>{{item.price}}å </span> <span v-if="item.timeUnit === 0">/天</span> <span v-if="item.timeUnit === 1">/åæ</span> <span v-if="item.timeUnit === 2">/æ</span> <span v-if="item.timeUnit === 3">/å¹´</span> <span>/人</span> </el-form-item> </el-form> </div> <div class="desc_item_from"> <el-table :data="list" border style="width: 100%"> <el-table-column prop="code" align="center" label="å ³èä¿åå·"> </el-table-column> <el-table-column prop="solutionsName" label="ä¿é©æ¹æ¡" align="center" width="180"> </el-table-column> <el-table-column prop="startTime" align="center" label="ä¿é©çæèµ·æ"> </el-table-column> <el-table-column prop="endTime" align="center" label="ä¿é©çææ¢æ"> </el-table-column> <el-table-column prop="insureNum" align="center" label="æä¿äººæ°"> </el-table-column> <el-table-column prop="serviceDays" align="center" label="å¨ä¿æ¶é¿ï¼å¤©ï¼"> </el-table-column> <el-table-column prop="currentFee" align="center" label="å½åè´¹ç¨(å )"> </el-table-column> <el-table-column prop="fee" align="center" label="æ»è´¹ç¨(å )"> </el-table-column> </el-table> </div> <div class="desc_item_cate"> <el-tabs v-model="activeName" @tab-click="handleClick"> <el-tab-pane label="å ä¿åå·¥" name="0"></el-tab-pane> <el-tab-pane label="åä¿åå·¥" name="1"></el-tab-pane> </el-tabs> </div> <div class="btns"> <div class="btns_item"> <el-button type="primary" @click="seleUser">éååå·¥</el-button> <el-button type="primary" @click="uploadUser" v-if="activeName !== '1'">å¯¼å ¥åå·¥</el-button> <el-button type="primary" @click="addUser" v-if="activeName !== '1'">æ·»å åå·¥</el-button> <el-button type="danger" @click="deleItem">å é¤</el-button> </div> <div class="btns_item" v-if="activeName !== '1'"> <el-button type="primary" @click="sele">éåæ´¾é£åä½</el-button> </div> </div> <el-table :data="activeName === '0' ? form.addDetailList : form.delDetailList" border show-summary :summary-method="getSummaries" ref="multipleTable" @selection-change="handleSelectionChange" style="width: 100%;margin-bottom: 15px;"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column label="åºå·" width="80px"> <template slot-scope="scope"> <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="memberName" label="å§å"> </el-table-column> <el-table-column prop="idCard" label="身份è¯å·"> </el-table-column> <el-table-column label="å¹´é¾"> <template slot-scope="{row}"> <span style="color: red;" v-if="(getAgeByIdCard(row.idCard) < item.minAge) || (getAgeByIdCard(row.idCard) > item.maxAge)">{{getAgeByIdCard(row.idCard)}}</span> <span v-else>{{ getAgeByIdCard(row.idCard) }}</span> </template> </el-table-column> <el-table-column prop="duName" label="æ´¾é£åä½"> </el-table-column> <el-table-column prop="workTypeName" label="æå±å·¥ç§"> </el-table-column> <el-table-column label="è´¹ç¨"> <template slot-scope="{row}"> <span v-if="activeName === '0'">{{row.fee}}</span> <span v-else>-{{row.fee}}</span> </template> </el-table-column> <el-table-column label="æä½"> <template slot-scope="scope"> <el-button type="text" style="color: red;" @click="dele(scope.$index)">å é¤</el-button> </template> </el-table-column> </el-table> <div class="info" v-if="item"> <span v-if="item.specialAgreement">{{item.specialAgreement}}</span> <span v-if="item.specialInfo">{{item.specialInfo}}</span> <span v-if="item.ortherInfo">{{item.ortherInfo}}</span> </div> <!-- éæ©åå·¥ --> <selectEmployees ref="selectEmployees" @result="getValue" /> <!-- æ·»å åå·¥ --> <addEmployee ref="addEmployee" @result="getValue" /> <!-- å¯¼å ¥åå --> <importEmployees ref="importEmployees" @result="getValue" /> <!-- ç¡®è®¤å·¥ç§ --> <confirmJobType ref="confirmJobType" @result="getUser" /> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import selectEmployees from '@/components/enterprise/selectEmployees' import addEmployee from '@/components/enterprise/addEmployee' import importEmployees from '@/components/enterprise/importEmployees' import confirmJobType from '@/components/enterprise/confirmJobType' import { all } from '@/api/business/solutions' import { getDetail } from '@/api/business/insuranceApply' import { create, getChangeCountCyclePriceVO } from '@/api/business/applyChange' export default { name: 'additionSubtractionApplication', extends: BaseOpera, components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType }, data () { return { form: { id: null, solutionId: '', solutionsName: '', applyStartTime: '', applyEndTime: '', addDetailList: [], delDetailList: [], }, activeName: '0', pickerOptions: {}, price: '', endTime: '', // å®é ä¿é©çææ¢æ company: [], seleData: [], item: null, // éªè¯è§å rules: { applyStartTime: [ { required: true, message: 'è¯·éæ©æ¹åçæèµ·æ' } ] }, list: [] } }, created () { this.config({ api: '/business/insuranceApply', 'field.id': 'id' }) }, methods: { open (title, target) { this.title = title this.form.addDetailList = [] this.form.delDetailList = [] this.list = [] this.form.id = null this.item = null this.form.solutionId = '' this.form.solutionsName = '' this.form.applyStartTime = '' this.form.applyEndTime = '' if (target && target.id) { this.$nextTick(() => { this.$refs.form.resetFields() 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() }, changeApplyStartTime(e) { getChangeCountCyclePriceVO({ applyId: this.form.id, validTime: e }).then(res => { this.price = res.cyclePrice this.form.addDetailList.forEach(item => { item.fee = res.cyclePrice }) this.form.delDetailList.forEach(item => { item.fee = res.cyclePrice }) }) }, handleClick(e) { this.activeName = e.index }, // è·åæä¿è¯¦æ 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.list.push(res) this.endTime = res.endTime this.form.solutionId = res.solutionId this.form.solutionsName = res.solutionsName this.pickerOptions = { disabledDate(time) { // - 8.64e7 return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() } }; this.changeSolution1(res.solutionId) }) }, getSummaries(param) { const { columns, data } = param const sums = [] columns.forEach((column, index) => { if (index === 0) { sums[index] = 'æ»ä»·' return } else if (index === 7) { let total = 0 if (this.activeName === '0') { this.form.addDetailList.forEach(item => { total += item.fee }) } else { this.form.delDetailList.forEach(item => { total += item.fee }) } sums[index] = '-' + total return } }) return sums }, deleItem() { if (this.seleData.length === 0) { this.$message.warning('è³å°éæ©ä¸é¡¹å 容') return } if (this.activeName === '0') { this.seleData.forEach(item => { this.form.addDetailList.forEach((row, index) => { if (item === row.name) { this.form.addDetailList.splice(index, 1) } }) }) } else { this.seleData.forEach(item => { this.form.delDetailList.forEach((row, index) => { if (item === row.name) { this.form.delDetailList.splice(index, 1) } }) }) } }, confirm() { this.$refs.form.validate((valid) => { if (valid) { // if (this.form.addDetailList.length === 0) { // this.$message.warning('è³å°æ·»å ä¸é¡¹åå·¥') // return // } for (let i = 0; i < this.form.addDetailList.length; i++) { if (!this.form.addDetailList[i].worktypeId || !this.form.addDetailList[i].duId) { this.$message.warning('请å®åå ä¿æ´¾é£åä½åå·¥ç§ä¿¡æ¯') return } } for (let i = 0; i < this.form.delDetailList.length; i++) { if (!this.form.delDetailList[i].worktypeId || !this.form.delDetailList[i].duId) { this.$message.warning('请å®ååä¿æ´¾é£åä½åå·¥ç§ä¿¡æ¯') return } } this.form.addDetailList.forEach(item => { item.idcardNo = item.idCard }) this.form.delDetailList.forEach(item => { item.idcardNo = item.idCard }) // let arr = JSON.parse(JSON.stringify(this.form.addDetailList)) // arr.forEach(item => { // item.idcardNo = item.idCard // }) this.isWorking = true create({ applyId: this.form.id, addDetailList: this.form.addDetailList, delDetailList: this.form.delDetailList, validTime: this.form.applyStartTime, type: 0 }).then(() => { this.visible = false this.$tip.apiSuccess('æä½æå') this.$emit('success') }).catch(e => { this.$tip.apiFailed(e) }).finally(() => { this.isWorking = false }) } }) }, seleUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } if (this.activeName === '0') { this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.addDetailList, price: this.price, notInInsuranceApplyId: this.form.id }) } else { this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id }) } }, addUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } if (this.activeName === '0') { this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.addDetailList, price: this.price }) } else { this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.delDetailList, price: this.price }) } }, uploadUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } if (this.activeName === '0') { this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.addDetailList, price: this.price }) } else { this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.delDetailList, price: this.price }) } }, // åæ¢æ¹æ¡ changeSolution1(e) { this.company.forEach(item => { if (item.id === e) { this.item = item } }) // this.tableData.forEach(item => { // item.fee = this.price // }) }, dele(index) { if (this.activeName === '0') { this.form.addDetailList.splice(index, 1) } else { this.form.delDetailList.splice(index, 1) } }, getUser(obj) { this.seleData.forEach(item => { if (this.activeName === '0') { this.form.addDetailList.forEach(row => { if (item === row.name) { row.workTypeName = obj.workTypeName row.worktypeId = obj.worktypeId row.duName = obj.duName row.duId = obj.duId } }) } else { this.form.delDetailList.forEach(row => { if (item === row.name) { row.workTypeName = obj.workTypeName row.worktypeId = obj.worktypeId row.duName = obj.duName row.duId = obj.duId } }) } }) this.seleData = [] this.$refs.multipleTable.clearSelection(); }, // éæ©åå·¥ sele() { if (!this.form.solutionId) { this.$message.warning('è¯·éæ©ä¿é©æ¹æ¡') return } if (this.seleData.length === 0) { this.$message.warning('è¯·éæ©åå·¥') return } this.$refs.confirmJobType.open('确认工ç§', { solutionId: this.form.solutionId }) }, // æ¥è¯¢å ¨é¨æ¹æ¡ getCompany() { all({}) .then(res => { this.company = res }) }, getAgeByIdCard(idCard){ const sexAndAge = {} //è·åç¨æ·èº«ä»½è¯å·ç const userCard = idCard //å¦æç¨æ·èº«ä»½è¯å·ç 为undefinedåè¿å空 if (!userCard) { return sexAndAge } // è·ååºçæ¥æ const yearBirth = userCard.substring(6, 10) const monthBirth = userCard.substring(10, 12) const dayBirth = userCard.substring(12, 14) // è·åå½åå¹´ææ¥å¹¶è®¡ç®å¹´é¾ const myDate = new Date() const monthNow = myDate.getMonth() + 1 const dayNow = myDate.getDate() let age = myDate.getFullYear() - yearBirth if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) { age-- } // å¾å°å¹´é¾ sexAndAge.age = age return sexAndAge.age }, handleSelectionChange (e) { this.seleData = e.map(item => item.name) }, getValue(list) { console.log(list) if (this.activeName === '0') { this.form.addDetailList.push(...list) } else { this.form.delDetailList.push(...list) } } } } </script> <style lang="scss" scoped> .list { width: 100%; } .btns { width: 100%; margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; .btns_item { display: flex; align-items: center; } } .submit { width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; } .desc_item_from { width: 100%; margin-bottom: 10px; .desc_item_from_page { width: 100%; display: flex; align-items: center; justify-content: end; margin-top: 10px; } } .desc_item_cate { width: 100%; margin-bottom: 10px; } .info { width: 100%; font-size: 14px; color: black; } </style> company/src/components/enterprise/dispatchUnitDetails.vue
@@ -18,9 +18,13 @@ </div> <div class="info_list_item"> <div class="info_list_item_label">æ´¾é£åä½ç¶æï¼</div> <div class="info_list_item_val" v-if="form.unitStatus === 0">å¾ å®¡æ ¸</div> <div class="info_list_item_val" style="color: green;" v-if="form.unitStatus === 1">å®¡æ ¸éè¿</div> <div class="info_list_item_val" style="color: red;" v-if="form.unitStatus === 2">å®¡æ ¸ä¸éè¿</div> <div class="info_list_item_val" style="color:#2E68EC;" v-if="form.unitStatus === 0">å¾ å®¡æ ¸</div> <div class="info_list_item_val" v-if="form.unitStatus === 1"> <span style="color:#2E68EC;" v-if="form.worktypeStatus ==null||form.worktypeStatus === 0">å·¥ç§å¾ 审</span> <span style="color: green" v-if="form.worktypeStatus === 1">å®¡æ ¸éè¿</span> <span style="color: red;" v-if="form.worktypeStatus === 2">å·¥ç§å®¡æ ¸ä¸éè¿</span> </div> <div class="info_list_item_val" style="color: red;" v-if="form.unitStatus === 2">å®¡æ ¸ä¸éè¿</div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ´¾é£åä½è¯¦è¿°ï¼</div> company/src/components/enterprise/factoryChange.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,477 @@ <template> <GlobalWindow :title="title" width="100%" text="æä¿ç³è¯·" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <div class="list"> <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> <el-form-item label="ä¿é©æ¹æ¡"> <span>{{form.solutionsName}}</span> </el-form-item> <el-form-item label="æ¹åçæèµ·æ" prop="applyStartTime"> <div style="display: flex; flex-direction: column;"> <el-date-picker v-model="form.applyStartTime" type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" format="yyyy å¹´ MM æ dd æ¥" placeholder="éæ©æ¥æ"> </el-date-picker> <span style="color: #F95601; font-size: 14px;">ï¼æ¬¡æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶ æ¶æäº¤ä»¥ä¿é©å为åï¼</span> </div> </el-form-item> <el-form-item label="æä¿å¹´é¾" v-if="item"> <span>{{item.minAge}} è³ {{item.maxAge}}</span> </el-form-item> <el-form-item label="è´¹ç¨" v-if="item"> <span>{{item.price}}å </span> <span v-if="item.timeUnit === 0">/天</span> <span v-if="item.timeUnit === 1">/åæ</span> <span v-if="item.timeUnit === 2">/æ</span> <span v-if="item.timeUnit === 3">/å¹´</span> <span>/人</span> </el-form-item> </el-form> </div> <div class="desc_item_from"> <el-table :data="list" border style="width: 100%"> <el-table-column prop="code" align="center" label="å ³èä¿åå·"> </el-table-column> <el-table-column prop="solutionsName" label="ä¿é©æ¹æ¡" align="center" width="180"> </el-table-column> <el-table-column prop="startTime" align="center" label="ä¿é©çæèµ·æ"> </el-table-column> <el-table-column prop="endTime" align="center" label="ä¿é©çææ¢æ"> </el-table-column> <el-table-column prop="insureNum" align="center" label="æä¿äººæ°"> </el-table-column> <el-table-column prop="serviceDays" align="center" label="å¨ä¿æ¶é¿ï¼å¤©ï¼"> </el-table-column> <el-table-column prop="currentFee" align="center" label="å½åè´¹ç¨(å )"> </el-table-column> <el-table-column prop="fee" align="center" label="æ»è´¹ç¨(å )"> </el-table-column> </el-table> </div> <div class="btns"> <div class="btns_item"> <el-button type="primary" @click="seleUser">éååå·¥</el-button> <el-button type="danger" @click="deleItem">å é¤</el-button> </div> <div class="btns_item"> <el-button type="primary" @click="sele">éåæ´¾é£åä½</el-button> </div> </div> <el-table :data="form.factory" border ref="multipleTable" @selection-change="handleSelectionChange" style="width: 100%;margin-bottom: 15px;"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column label="åºå·" width="80px"> <template slot-scope="scope"> <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="memberName" label="å§å"> </el-table-column> <el-table-column prop="idCard" label="身份è¯å·"> </el-table-column> <el-table-column prop="oldDuName" label="åæ´¾é£åä½"> </el-table-column> <el-table-column prop="oldWorkTypeName" label="åæå±å·¥ç§"> </el-table-column> <el-table-column prop="duName" label="åæ´åæ´¾é£åä½"> </el-table-column> <el-table-column prop="workTypeName" label="åæ´åæå±å·¥ç§"> </el-table-column> <el-table-column label="æä½"> <template slot-scope="scope"> <el-button type="text" style="color: red;" @click="dele(scope.$index)">å é¤</el-button> </template> </el-table-column> </el-table> <div class="info" v-if="item"> <span v-if="item.specialAgreement">{{item.specialAgreement}}</span> <span v-if="item.specialInfo">{{item.specialInfo}}</span> <span v-if="item.ortherInfo">{{item.ortherInfo}}</span> </div> <!-- éæ©åå·¥ --> <selectEmployees ref="selectEmployees" @result="getValue" /> <!-- æ·»å åå·¥ --> <addEmployee ref="addEmployee" @result="getValue" /> <!-- å¯¼å ¥åå --> <importEmployees ref="importEmployees" @result="getValue" /> <!-- ç¡®è®¤å·¥ç§ --> <confirmJobType ref="confirmJobType" @result="getUser" /> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import selectEmployees from '@/components/enterprise/selectEmployees' import addEmployee from '@/components/enterprise/addEmployee' import importEmployees from '@/components/enterprise/importEmployees' import confirmJobType from '@/components/enterprise/confirmJobType' import { all } from '@/api/business/solutions' import { getDetail, findList } from '@/api/business/insuranceApply' import { create } from '@/api/business/applyChange' export default { name: 'factoryChange', extends: BaseOpera, components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType }, data () { return { form: { id: null, solutionId: '', solutionsName: '', applyStartTime: '', applyEndTime: '', factory: [] }, pickerOptions: {}, price: '', endTime: '', // å®é ä¿é©çææ¢æ company: [], seleData: [], item: null, // éªè¯è§å rules: { applyStartTime: [ { required: true, message: 'è¯·éæ©æ¹åçæèµ·æ' } ] }, list: [] } }, created () { this.config({ api: '/business/insuranceApply', 'field.id': 'id' }) }, methods: { open (title, target) { this.title = title this.form.addDetailList = [] this.form.delDetailList = [] this.list = [] this.form.id = null this.item = null this.form.solutionId = '' this.form.solutionsName = '' this.form.applyStartTime = '' this.form.applyEndTime = '' if (target && target.id) { this.$nextTick(() => { this.$refs.form.resetFields() 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 = '' }) res.forEach(item => { item.oldDuId = item.duId item.oldDuName = item.duName item.oldWorkTypeName = item.workTypeName item.oldWorktypeId = item.worktypeId item.workTypeName = '' item.worktypeId = '' item.duId = '' item.duName = '' }) // this.form.factory = res }) getDetail(this.form.id) .then(res => { this.list.push(res) this.endTime = res.endTime this.form.solutionId = res.solutionId this.form.solutionsName = res.solutionsName this.pickerOptions = { disabledDate(time) { // - 8.64e7 return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() } }; this.changeSolution1(res.solutionId) }) }, deleItem() { if (this.seleData.length === 0) { this.$message.warning('è³å°éæ©ä¸é¡¹å 容') return } this.seleData.forEach(item => { this.form.factory.forEach((row, index) => { if (item === row.memberName) { this.form.factory.splice(index, 1) } }) }) }, confirm() { this.$refs.form.validate((valid) => { if (valid) { // if (this.form.addDetailList.length === 0) { // this.$message.warning('è³å°æ·»å ä¸é¡¹åå·¥') // return // } for (let i = 0; i < this.form.factory.length; i++) { if (!this.form.factory[i].worktypeId || !this.form.factory[i].duId) { this.$message.warning('请å®åæ´¾é£åä½åå·¥ç§ä¿¡æ¯') return } } this.form.factory.forEach(item => { item.idcardNo = item.idCard }) // let arr = JSON.parse(JSON.stringify(this.form.factory)) // arr.forEach(item => { // item.idcardNo = item.idCard // }) this.isWorking = true create({ applyId: this.form.id, changeDetailList: this.form.factory, validTime: this.form.applyStartTime, type: 1 }).then(() => { this.visible = false this.$tip.apiSuccess('æä½æå') this.$emit('success') }).catch(e => { this.$tip.apiFailed(e) }).finally(() => { this.isWorking = false }) } }) }, seleUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id }) }, addUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.factory, price: this.price }) }, uploadUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.factory, price: this.price }) }, // åæ¢æ¹æ¡ changeSolution1(e) { this.company.forEach(item => { if (item.id === e) { this.item = item } }) // this.tableData.forEach(item => { // item.fee = this.price // }) }, dele(index) { this.form.factory.splice(index, 1) }, getUser(obj) { console.log(obj) this.seleData.forEach(item => { this.form.factory.forEach(row => { if (item === row.memberName) { row.workTypeName = obj.workTypeName row.worktypeId = obj.worktypeId row.duName = obj.duName row.duId = obj.duId } }) }) this.seleData = [] this.$refs.multipleTable.clearSelection(); }, // éæ©åå·¥ sele() { if (!this.form.solutionId) { this.$message.warning('è¯·éæ©ä¿é©æ¹æ¡') return } if (this.seleData.length === 0) { this.$message.warning('è¯·éæ©åå·¥') return } this.$refs.confirmJobType.open('确认工ç§', { solutionId: this.form.solutionId }) }, // æ¥è¯¢å ¨é¨æ¹æ¡ getCompany() { all({}) .then(res => { this.company = res }) }, getAgeByIdCard(idCard){ const sexAndAge = {} //è·åç¨æ·èº«ä»½è¯å·ç const userCard = idCard //å¦æç¨æ·èº«ä»½è¯å·ç 为undefinedåè¿å空 if (!userCard) { return sexAndAge } // è·ååºçæ¥æ const yearBirth = userCard.substring(6, 10) const monthBirth = userCard.substring(10, 12) const dayBirth = userCard.substring(12, 14) // è·åå½åå¹´ææ¥å¹¶è®¡ç®å¹´é¾ const myDate = new Date() const monthNow = myDate.getMonth() + 1 const dayNow = myDate.getDate() let age = myDate.getFullYear() - yearBirth if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) { age-- } // å¾å°å¹´é¾ sexAndAge.age = age return sexAndAge.age }, handleSelectionChange (e) { this.seleData = e.map(item => item.memberName) }, getValue(list) { let arr = JSON.parse(JSON.stringify(list)) arr.forEach(item => { item.oldDuId = item.duId item.oldDuName = item.duName item.oldWorkTypeName = item.workTypeName item.oldWorktypeId = item.worktypeId item.duId = '' item.duName = '' item.workTypeName = '' item.worktypeId = '' }) this.form.factory.push(...arr) } } } </script> <style lang="scss" scoped> .list { width: 100%; } .btns { width: 100%; margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; .btns_item { display: flex; align-items: center; } } .submit { width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; } .desc_item_from { width: 100%; margin-bottom: 10px; .desc_item_from_page { width: 100%; display: flex; align-items: center; justify-content: end; margin-top: 10px; } } .desc_item_cate { width: 100%; margin-bottom: 10px; } .info { width: 100%; font-size: 14px; color: black; } </style> company/src/components/enterprise/selectEmployees.vue
@@ -54,6 +54,8 @@ val: '', list: [], price: '', insuranceApplyId: '', notInInsuranceApplyId: '', seleData: [], oldList: [] } @@ -66,8 +68,17 @@ }, methods: { open (title, obj) { this.insuranceApplyId = '' this.notInInsuranceApplyId = '' this.price = obj.price this.oldList = obj.arr this.list = [] if (obj.insuranceApplyId) { this.insuranceApplyId = obj.insuranceApplyId } if (obj.notInInsuranceApplyId) { this.notInInsuranceApplyId = obj.notInInsuranceApplyId } this.title = title this.visible = true this.getList() @@ -88,10 +99,13 @@ this.seleData.forEach(item => { item.idCard = item.idcardNo item.memberName = item.name item.workTypeName = '' item.worktypeId = '' item.duId = '' item.duName = '' item.memberId = item.id if (this.notInInsuranceApplyId) { item.workTypeName = '' item.worktypeId = '' item.duId = '' item.duName = '' } item.fee = this.price }) this.$emit('result', this.seleData) @@ -102,7 +116,9 @@ }, getList() { findListByDTO({ name: this.val name: this.val, insuranceApplyId: this.insuranceApplyId, notInInsuranceApplyId: this.notInInsuranceApplyId }).then(res => { res.forEach(item => { item.fee = '' company/src/components/enterprise/selectEmployeesCopy.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,140 @@ <template> <GlobalWindow :title="title" width="100%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <el-input v-model="val" placeholder="æ¥è¯¢åå·¥å§å" @keypress.enter.native="getList" style="margin-bottom: 15px;"></el-input> <el-table :data="list" border @selection-change="handleSelectionChange" style="width: 100%"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column label="åºå·" width="80px"> <template slot-scope="scope"> <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="name" label="å§å"> </el-table-column> <el-table-column prop="idcardNo" label="身份è¯å·"> </el-table-column> <el-table-column prop="duName" label="æ´¾é£åä½"> </el-table-column> <el-table-column prop="workTypeName" label="æå±å·¥ç§"> </el-table-column> </el-table> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { findListByDTO } from '@/api/business/member' export default { name: 'selectEmployeesCopy', extends: BaseOpera, components: { GlobalWindow }, data () { return { val: '', list: [], price: '', insuranceApplyId: '', notInInsuranceApplyId: '', seleData: [], oldList: [] } }, created () { this.config({ api: '/business/dispatchUnit', 'field.id': 'id' }) }, methods: { open (title, obj) { this.insuranceApplyId = '' this.notInInsuranceApplyId = '' this.price = obj.price this.oldList = obj.arr this.list = [] if (obj.insuranceApplyId) { this.insuranceApplyId = obj.insuranceApplyId } if (obj.notInInsuranceApplyId) { this.notInInsuranceApplyId = obj.notInInsuranceApplyId } this.title = title this.visible = true this.getList() }, confirm() { if (this.seleData.length === 0) { this.$message.warning('è³å°éæ©ä¸é¡¹å 容') return } for (let i = 0; i < this.seleData.length; i++) { for (let a = 0; a < this.oldList.length; a++) { if (this.seleData[i].name === this.oldList[a].memberName || this.seleData[i].idCard === this.oldList[a].idcardNo) { this.$message.warning(`[${this.seleData[i].name}]åå·¥éå¤`) return } } } this.seleData.forEach(item => { item.idCard = item.idcardNo item.memberName = item.name item.memberId = item.id item.oldDuId = JSON.parse(JSON.stringify(item.duId)) item.oldDuName = JSON.parse(JSON.stringify(item.duName)) item.oldWorkTypeName = JSON.parse(JSON.stringify(item.workTypeName)) item.oldWorktypeId = JSON.parse(JSON.stringify(item.worktypeId)) item.duId = '' item.duName = '' item.workTypeName = '' item.worktypeId = '' item.fee = this.price }) this.$emit('result', this.seleData) this.visible = false }, handleSelectionChange (e) { this.seleData = e }, getList() { findListByDTO({ name: this.val, insuranceApplyId: this.insuranceApplyId, notInInsuranceApplyId: this.notInInsuranceApplyId }).then(res => { res.forEach(item => { item.fee = '' }) this.list = res }) } } } </script> <style lang="scss" scoped> </style> company/src/views/enterprise/add_subtract.vue
@@ -9,8 +9,9 @@ <el-option label="å¾ å®¡æ ¸" value="1"></el-option> <el-option label="å·²çæ" value="2"></el-option> <el-option label="ç³è¯·éå" value="3"></el-option> <el-option label="å·²éå" value="2"></el-option> <el-option label="å·²å ³é" value="3"></el-option> <!-- 3 4 齿¯éåç³è¯·ä¸--> <el-option label="å·²éå" value="5"></el-option> <el-option label="å·²å ³é" value="6"></el-option> </el-select> </el-form-item> <el-form-item label="ä¿é©æ¹æ¡" prop="solutionsId"> company/src/views/enterprise/dispatchUnit.vue
@@ -26,11 +26,15 @@ </template> </el-table-column> <el-table-column prop="name" label="æ´¾é£åä½"></el-table-column> <el-table-column label="ä¼ä¸ç¶æ"> <el-table-column label="æ´¾é£åä½ç¶æ" min-width="100px"> <template slot-scope="{row}"> <span v-if="row.unitStatus === 0">å¾ å®¡æ ¸</span> <span v-if="row.unitStatus === 1" style="color: green;">å®¡æ ¸éè¿</span> <span v-if="row.unitStatus === 2" style="color: red;">å®¡æ ¸ä¸éè¿</span> <span style="color: #2E68EC" v-if="row.unitStatus === 0">å¾ å®¡æ ¸</span> <span v-if="row.unitStatus === 1"> <span style="color:#2E68EC" v-if="row.worktypeStatus ==null || row.worktypeStatus === 0">å·¥ç§å¾ 审</span> <span style="color: green" v-else-if="row.worktypeStatus === 1">å®¡æ ¸éè¿</span> <span style="color: red" v-else-if="row.worktypeStatus === 2">å·¥ç§å®¡æ ¸ä¸éè¿</span> </span> <span style="color: red" v-if="row.unitStatus === 2">å®¡æ ¸ä¸éè¿</span> </template> </el-table-column> <el-table-column prop="createDate" label="æ·»å æ¥æ"></el-table-column> company/src/views/enterprise/myPolicy.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,186 @@ <template> <TableLayout :permissions="['business:insuranceapply:query']"> <!-- æç´¢è¡¨å --> <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> <el-form-item label="ä¿åå·" prop="code"> <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-option v-for="item in solutionList" :key="item.id" :label="item.name" :value="item.id"> </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-select> </el-form-item> <el-form-item label="ä¿é©çæèµ·æ" prop="time1"> <el-date-picker v-model="time1" @change="changeS" type="daterange" range-separator="è³" value-format="yyyy-MM-dd" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"> </el-date-picker> </el-form-item> <el-form-item label="ä¿é©çææ¢æ" prop="time2"> <el-date-picker v-model="time2" @change="changeE" type="daterange" range-separator="è³" value-format="yyyy-MM-dd" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"> </el-date-picker> </el-form-item> <section> <el-button type="primary" @click="search">æç´¢</el-button> <el-button @click="reset">éç½®</el-button> </section> </el-form> <!-- è¡¨æ ¼åå页 --> <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> </ul> <el-table v-loading="isWorking.search" :data="tableData.list" stripe > <el-table-column label="åºå·" width="80px"> <template slot-scope="scope"> <span>{{scope.$index + 1}}</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> <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="150" fixed="right" > <template slot-scope="{row}"> <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('æä¿è¯¦æ ', { id: row.id })" v-permissions="['business:insuranceapply:update']">æ¥ç详æ </el-button> <el-button type="text" @click="$refs.additionSubtractionApplication.open('å åä¿ç³è¯·', { id: row.id })">å åä¿ç³è¯·</el-button> </template> </el-table-column> </el-table> <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination" > </pagination> </template> <!-- æ°å¢æä¿ --> <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" /> <!-- æä¿è¯¦æ --> <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" /> <!-- å åä¿ç³è¯· --> <additionSubtractionApplication ref="additionSubtractionApplication" @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 { 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 }) } } } </script>