company/src/api/business/dispatchUnit.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/api/business/insuranceApply.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/api/business/member.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/common/GlobalWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/enterprise/OperaInsuranceApplyWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/enterprise/addEmployee.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/enterprise/confirmJobType.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/enterprise/importEmployees.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/enterprise/selectEmployees.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/utils/util.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/views/enterprise/insuranceApply.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
company/src/api/business/dispatchUnit.js
@@ -31,3 +31,8 @@ export function editDispatchUnit (data) { return request.post('/business/dispatchUnit/editDispatchUnit', data) } // æ°æ®å表 export function findListByDTO (data) { return request.post('/business/dispatchUnit/findListByDTO', data) } company/src/api/business/insuranceApply.js
@@ -11,10 +11,21 @@ export function updateById (data) { return request.post('/business/insuranceApply/updateById', data) } // æ°å»º export function create (data) { return request.post('/business/insuranceApply/create', data) } export function check (data) { return request.post('/business/insuranceApply/check', data) } // è·åä¿åæ¢æä¸åå§éé¢ export function getCountCyclePriceVO (data) { return request.post('/business/insuranceApply/getCountCyclePriceVO', data) } export function exportDetailExcel (data) { return request.post('/business/insuranceApply/exportDetailExcel', data, { trim: true, company/src/api/business/member.js
@@ -16,3 +16,8 @@ export function findListByDTO (data) { return request.post('/business/member/findListByDTO', data) } // å¯¼å ¥æ¨¡æ¿ export function importExcel (data) { return request.post('/business/member/importExcel', data) } company/src/components/common/GlobalWindow.vue
@@ -20,7 +20,7 @@ </div> <div v-if="withFooter" class="window__footer"> <slot name="footer"> <el-button @click="confirm" :loading="confirmWorking" type="primary">ç¡®å®</el-button> <el-button @click="confirm" :loading="confirmWorking" type="primary">{{text}}</el-button> <el-button @click="close">è¿å</el-button> </slot> </div> @@ -40,6 +40,11 @@ type: Boolean, default: true }, // æäº¤æé®æå text: { type: String, default: 'ç¡®å®' }, // 确认æé®loadingç¶æ confirmWorking: { type: Boolean, company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -2,24 +2,33 @@ <GlobalWindow :title="title" width="100%" :withFooter="false" text="æä¿ç³è¯·" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <div class="list"> <el-form :inline="true" :model="form" :rules="rules" class="demo-form-inline"> <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> <el-form-item label="ä¿é©æ¹æ¡" prop="solutionId"> <el-select v-model="form.solutionId" placeholder="è¯·éæ©"> <el-option label="åºåä¸" value="shanghai"></el-option> <el-option label="åºåäº" value="beijing"></el-option> <el-select v-model="form.solutionId" @change="changeSolution" placeholder="è¯·éæ©"> <el-option v-for="item in company" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="ææä¿é©çæèµ·æ" prop="applyStartTime"> <div style="display: flex; flex-direction: column;"> <el-date-picker @change="getTimeVal" v-model="form.applyStartTime" type="date" :disabled="!form.solutionId" :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> @@ -27,77 +36,101 @@ </el-form-item> <el-form-item label="ä¿é©çææ¢æ" prop="applyEndTime"> <el-date-picker disabled v-model="form.applyEndTime" type="date" value-format="yyyy-MM-dd" format="yyyy å¹´ MM æ dd æ¥" placeholder="éæ©æ¥æ"> </el-date-picker> </el-form-item> <el-form-item label="æä¿å¹´é¾"> <span>25è³65</span> <el-form-item label="æä¿å¹´é¾" v-if="item"> <span>{{item.minAge}} è³ {{item.maxAge}}</span> </el-form-item> <el-form-item label="è´¹ç¨"> <span>200å /å¹´/人</span> <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="btns"> <div class="btns_item"> <el-button type="primary" @click="$refs.selectEmployees.open('éååå·¥')">éååå·¥</el-button> <el-button type="primary">å¯¼å ¥åå·¥</el-button> <el-button type="primary" @click="$refs.addEmployee.open('æ·»å åå·¥', tableData)">æ·»å åå·¥</el-button> <el-button type="primary" @click="seleUser">éååå·¥</el-button> <el-button type="primary" @click="uploadUser">å¯¼å ¥åå·¥</el-button> <el-button type="primary" @click="addUser">æ·»å åå·¥</el-button> <el-button type="danger" @click="deleItem">å é¤</el-button> </div> <div class="btns_item"> <el-button type="primary">éåæ´¾é£åä½</el-button> <el-button type="primary" @click="sele">éåæ´¾é£åä½</el-button> </div> </div> <el-table :data="tableData" 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="name" prop="memberName" label="å§å"> </el-table-column> <el-table-column prop="idcardNo" prop="idCard" label="身份è¯å·"> </el-table-column> <el-table-column prop="address" label="å¹´é¾"> <template slot-scope="{row}"> <span v-if="row.idCard">{{ getAgeByIdCard(row.idCard) }}</span> </template> </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="fee" label="è´¹ç¨"> </el-table-column> <el-table-column prop="address" 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="submit"> <el-button type="primary">æä¿ç³è¯·</el-button> </div> <div class="info"> å¯ææ¬ <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" /> <selectEmployees ref="selectEmployees" @result="getValue" /> <!-- æ·»å åå·¥ --> <addEmployee ref="addEmployee" @result="getValue" /> <!-- å¯¼å ¥åå --> <importEmployees ref="importEmployees" @result="getValue" /> <!-- ç¡®è®¤å·¥ç§ --> <confirmJobType ref="confirmJobType" @result="getUser" /> </GlobalWindow> </template> @@ -106,10 +139,14 @@ 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 { create, getCountCyclePriceVO } from '@/api/business/insuranceApply' export default { name: 'OperaInsuranceApplyWindow', extends: BaseOpera, components: { GlobalWindow, selectEmployees, addEmployee }, components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType }, data () { return { form: { @@ -118,6 +155,11 @@ applyStartTime: '', applyEndTime: '' }, pickerOptions: {}, // åæ¾picker optionsçåé price: '', company: [], seleData: [], item: null, // éªè¯è§å rules: { solutionId: [ @@ -137,6 +179,229 @@ }) }, methods: { open (title, target) { this.title = title this.tableData = [] this.form.id = null this.item = null 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 this.getCompany() this.updatePickerOptions() }, 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 this.tableData.forEach(item => { total += item.fee }) sums[index] = total return } }) return sums }, deleItem() { if (this.seleData.length === 0) { this.$message.warning('è³å°éæ©ä¸é¡¹å 容') return } this.seleData.forEach(item => { this.tableData.forEach((row, index) => { if (item === row.name) { this.tableData.splice(index, 1) } }) }) }, confirm() { this.$refs.form.validate((valid) => { if (valid) { if (this.tableData.length === 0) { this.$message.warning('è³å°æ·»å ä¸é¡¹åå·¥') return } for (let i = 0; i < this.tableData.length; i++) { console.log(this.tableData[i].worktypeId, this.tableData[i].duId) if (!this.tableData[i].worktypeId || !this.tableData[i].duId) { this.$message.warning('请å®åæ´¾é£åä½åå·¥ç§ä¿¡æ¯') return } } let arr = JSON.parse(JSON.stringify(this.tableData)) arr.forEach(item => { 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 }) } }) }, // è·åç»ææ¶é´åä»·æ ¼ getTimeVal(time) { getCountCyclePriceVO({ solutionsId: this.form.solutionId, startDate: time }).then(res => { this.price = res.cyclePrice this.form.applyEndTime = res.endDate.substring(0, 10) this.tableData.forEach(item => { item.fee = res.cyclePrice }) console.log(this.tableData) this.$forceUpdate() }) }, getDate(n) { // n为å¤å°å¤©ï¼-代表å¾åï¼+代表å¾å let date1 = new Date(), time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示å½åæ¶é´ let date2 = new Date(date1); date2.setDate(date1.getDate() + n); let time2 = date2.getFullYear() + "-" + ("0" + (date2.getMonth() + 1)).slice(-2) + "-" + ("0" + date2.getDate()).slice(-2); return time2 }, updatePickerOptions() { var that = this; this.pickerOptions = { disabledDate(time) { if (!that.item) return if (that.item.validType === 1) { // 次æ const currentDate = new Date(); currentDate.setMonth(currentDate.getMonth() + 1); currentDate.setDate(1); return time.getTime() <= new Date(currentDate.toLocaleString()).getTime() - 8.64e7; } else if (that.item.validType === 0) { // å¤å°æ¥åçæ return time.getTime() <= new Date(that.getDate(that.item.validTypeNum)).getTime(); } } }; }, seleUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.selectEmployees.open('éååå·¥', { arr: this.tableData, price: this.price }) }, addUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.tableData, price: this.price }) }, uploadUser() { if (!this.form.solutionId) { this.$message.warning('请å éæ©ä¿é©æ¹æ¡') return } this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.tableData, price: this.price }) }, // åæ¢æ¹æ¡ changeSolution(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) }, getUser(obj) { this.seleData.forEach(item => { this.tableData.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) { this.tableData.push(...list) } @@ -168,5 +433,7 @@ } .info { width: 100%; font-size: 14px; color: black; } </style> company/src/components/enterprise/addEmployee.vue
@@ -9,10 +9,10 @@ <el-form :inline="true" class="demo-form-inline"> <div v-for="(item, index) in list" :key="index"> <el-form-item label="å§å" required> <el-input v-model="item.name" placeholder="请è¾å ¥"></el-input> <el-input v-model="item.memberName" placeholder="请è¾å ¥"></el-input> </el-form-item> <el-form-item label="身份è¯å·" required> <el-input v-model="item.idcardNo" maxlength="18" placeholder="请è¾å ¥"></el-input> <el-input v-model="item.idCard" maxlength="18" placeholder="请è¾å ¥"></el-input> </el-form-item> <el-form-item> <el-button type="primary" v-if="index === 0" @click="add">æ·»å </el-button> @@ -34,29 +34,46 @@ return { list: [ { name: '', idcardNo: '' memberName: '', idCard: '', workTypeName: '', worktypeId: '', duName: '', duId: '', fee: '' } ], price: 0, arr: [] } }, methods: { open (title, arr) { open (title, obj) { this.title = title this.visible = true this.list = [ { name: '', idcardNo: '' memberName: '', idCard: '', workTypeName: '', worktypeId: '', duName: '', duId: '', fee: '' } ] this.arr = arr this.arr = obj.arr this.price = obj.price }, add() { this.list.push({ name: '', idCard: '' memberName: '', idCard: '', workTypeName: '', worktypeId: '', duName: '', duId: '', fee: '' }) }, dele(index) { @@ -67,28 +84,39 @@ }, confirm() { // 夿åè¡¨å¦æ¯æç©ºå¼ for (let i = 0; this.list.length; i++) { if (!this.list[i].name || !this.list[i].idcardNo) { this.$message.warning('请å å®åä¿¡æ¯ååæäº¤') return } } // for (let i = 0; this.list.length; i++) { // if (!this.list[i].memberName || !this.list[i].idCard) { // this.$message.warning('请å å®åä¿¡æ¯ååæäº¤') // return // } // } // 夿æ°å½å ¥æ°æ®èº«ä»½è¯æ¯å¦æéå¤ let idcardList = this.list.map(item => item.idcardNo) let idcardList = this.list.map(item => item.idCard) if (this.hasDuplicates(idcardList)) { this.$message.warning('èº«ä»½è¯æéå¤') return } // å¤æèº«ä»½è¯æ¯å¦ææ for (let i = 0; i < this.list.length; i++) { const regExp = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (!regExp.test(this.list[i].idCard)) { this.$message.warning(`第${i + 1}项å工身份è¯ä¸åæ³`) return } } // å¤æè¯¦æ åè¡¨æ°æ®èº«ä»½è¯æ¯å¦æéå¤ let next = true this.list.forEach(item => { this.arr.forEach(child => { if (item.idcardNo === child.idcardNo) { if (item.idCard === child.idCard) { next = false } }) }) if (next) { this.list.forEach(item => { item.fee = this.price }) this.$emit('result', this.list) this.visible = false } else { company/src/components/enterprise/confirmJobType.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,112 @@ <template> <GlobalWindow :title="title" width="30%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <el-form class="demo-form-inline"> <el-form-item label="æ´¾é£åä½" required> <el-select v-model="dw" @change="selectChange" placeholder="è¯·éæ©"> <el-option v-for="item in dispatching" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="æå±å·¥ç§" required> <el-select v-model="gz" placeholder="è¯·éæ©"> <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> </el-form> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { findListByDTO } from '@/api/business/dispatchUnit' import { findListByDTO as worktype } from '@/api/business/worktype' export default { name: 'confirmJobType', extends: BaseOpera, components: { GlobalWindow }, data () { return { form: { solutionId: '' }, data: [], dw: [], gz: [], dispatching: [], options: [] } }, methods: { open (title, arr) { this.title = title this.form.solutionId = arr.solutionId this.data = arr.seleData this.visible = true this.getFindListByDTO() }, getFindListByDTO () { findListByDTO({ solutionId: this.form.solutionId, dataType: 2 }).then(res => { this.dispatching = res }) }, selectChange(id) { this.gz = '' let duSolutionId = '' this.dispatching.forEach(item => { if (item.id === id) { duSolutionId = item.duSolutionId } }) worktype({ id: duSolutionId, queryType: 1 }) .then(res => { this.options = res }) }, confirm() { let obj = { workTypeName: '', worktypeId: '', duName: '', duId: '' } this.dispatching.forEach(item => { if (item.id === this.dw) { obj.duName = item.name obj.duId = item.id } }) this.options.forEach(item => { if (item.id === this.gz) { obj.workTypeName = item.name obj.worktypeId = item.id } }) this.$emit('result', obj) this.visible = false } } } </script> <style lang="scss" scoped> </style> company/src/components/enterprise/importEmployees.vue
@@ -1,43 +1,86 @@ <template> <GlobalWindow :title="title" width="100%" width="30%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <el-form class="demo-form-inline"> <el-form-item label="ä¸ä¼ åå" required> <div style="width: 100%;display: flex;align-items: center;"> <el-button type="primary" @click="clickRef">ç¹å»ä¸ä¼ </el-button> <el-button type="text">å忍¡æ¿.EXCEL</el-button> </div> <div style="font-size: 14px; color: black;" v-if="fileName">{{fileName}}</div> </el-form-item> </el-form> <input type="file" accept=".excel" ref="fileExcel" @change="result" /> <input type="file" style="position: fixed; left: 0; top: -50px;" accept=".xlsx" ref="fileExcel" @change="result" /> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { importExcel } from '@/api/business/member' export default { name: 'importEmployees', extends: BaseOpera, components: { GlobalWindow }, data () { return { list: [] list: [], price: 0, addList: [], fileName: '' } }, methods: { open (title, arr) { open (title, obj) { this.title = title this.addList = [] this.fileName = '' this.visible = true this.list = obj.arr this.price = obj.price }, clickRef () { this.$refs.fileExcel.click() }, result (e) { console.log(e) const data = new FormData() data.append('file', e.target.files[0]) importExcel(data) .then(res => { res.forEach(item => { item.memberName = item.name item.fee = '' }) this.addList = res this.fileName = e.target.files[0].name }) .catch(err => { this.$message.error(err) this.fileName = '' }) .finally(() => { this.$refs.fileExcel.value = null }) }, confirm () { for (let i = 0; i < this.addList.length; i++) { for (let a = 0; a < this.list.length; a++) { if (this.addList[i].name === this.list[a].memberName || this.addList[i].idCard === this.list[a].idcardNo) { this.$message.warning(`[${this.addList[i].name}]åå·¥éå¤`) return } } } this.addList.forEach(item => { item.fee = this.price || '' }) this.$emit('result', this.addList) this.visible = false } } } company/src/components/enterprise/selectEmployees.vue
@@ -10,26 +10,31 @@ <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="date" prop="name" label="å§å"> </el-table-column> <el-table-column prop="name" 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> @@ -47,7 +52,10 @@ data () { return { val: '', list: [] list: [], price: '', seleData: [], oldList: [] } }, created () { @@ -57,16 +65,49 @@ }) }, methods: { open (title) { open (title, obj) { this.price = obj.price this.oldList = obj.arr 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.workTypeName = '' item.worktypeId = '' item.duId = '' item.duName = '' item.fee = this.price }) this.$emit('result', this.seleData) this.visible = false }, handleSelectionChange (e) { this.seleData = e }, getList() { findListByDTO({ name: this.val }).then(res => { this.list = [] res.forEach(item => { item.fee = '' }) this.list = res }) } } company/src/utils/util.js
@@ -18,3 +18,52 @@ } return data } // æ ¹æ®èº«ä»½è¯è·åå¹´é¾ export function GetAge (identityCard) { let len = (identityCard + "").length; let strBirthday = ""; if (len === 18) { //å¤ç18ä½ç身份è¯å·ç ä»å·ç ä¸å¾å°çæ¥åæ§å«ä»£ç strBirthday = identityCard.substr(6, 4) + "/" + identityCard.substr(10, 2) + "/" + identityCard.substr(12, 2); } if (len === 15) { let birthdayValue = ""; birthdayValue = identityCard.charAt(6) + identityCard.charAt(7); if (parseInt(birthdayValue) < 10) { strBirthday = "20" + identityCard.substr(6, 2) + "/" + identityCard.substr(8, 2) + "/" + identityCard.substr(10, 2); } else { strBirthday = "19" + identityCard.substr(6, 2) + "/" + identityCard.substr(8, 2) + "/" + identityCard.substr(10, 2); } } let birthDate = new Date(strBirthday); let nowDateTime = new Date(); let age = nowDateTime.getFullYear() - birthDate.getFullYear(); //åèèæã天çå ç´ ;.getMonth()è·åçæ¯ä»0å¼å§çï¼è¿éè¿è¡æ¯è¾ï¼ä¸éè¦å 1 if ( nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate()) ) { age--; } return age; } company/src/views/enterprise/insuranceApply.vue
@@ -3,7 +3,7 @@ <!-- æç´¢è¡¨å --> <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="è¯·éæ©" @keypress.enter.native="search"> <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> @@ -51,14 +51,21 @@ <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="status" label="ç¶æ"></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="createTimeS" label="æäº¤æ¥æ"></el-table-column> <el-table-column prop="endTimeE" label="æä¿çææ¥æ"></el-table-column> <el-table-column prop="endTimeS" 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="æä½"