¶Ô±ÈÐÂÎļþ |
| | |
| | | <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=" " prop="unionApplyId" > |
| | | <div style=" display: flex; flex-direction: column;"> |
| | | <el-button type="primary" size="small" @click="selectBaoxiandan"> éæ©ä¿é©å</el-button> |
| | | <span style="color: #F95601; font-size: 14px;">ï¼1. è¯·éæ©ä¿é©ååè¿è¡æä½ï¼</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹åçæèµ·æï¼" prop="applyDate" style="margin-left: 40px"> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <el-date-picker |
| | | v-model="form.applyDate" |
| | | type="date" |
| | | format="yyyy å¹´ MM æ dd æ¥" |
| | | value-format="yyyy-MM-dd" /> |
| | | <span style="color: #F95601; font-size: 14px;">ï¼2. 次æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶
æ¶æäº¤ä»¥ä¿é©å为åï¼</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="è´¹ç¨" v-if="model"> |
| | | <span>{{model.price}}å
</span> |
| | | <span v-if="model.timeUnit === 0">/天</span> |
| | | <span v-if="model.timeUnit === 1">/åæ</span> |
| | | <span v-if="model.timeUnit === 2">/æ</span> |
| | | <span v-if="model.timeUnit === 3">/å¹´</span> |
| | | <span>/人</span> |
| | | </el-form-item> |
| | | <el-form-item label="æä¿å¹´é¾" v-if="item"> |
| | | <span>{{model.minAge}} è³ {{model.maxAge}}</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="display: block;margin:0 0 30px 30px " v-if="model"> |
| | | <div style="display: inline-block;width: 300px">ä¿é©æ¹æ¡ï¼{{model.solutionName}}</div> |
| | | <div style="display: inline-block">ä¿åå·ï¼{{model.code}}</div> |
| | | </div> |
| | | <el-table |
| | | :data="list" |
| | | border |
| | | ref="multipleTable" |
| | | @row-click="rowselect" |
| | | @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="companyName" |
| | | label="被ä¿é©äºº"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="applyStartTime" |
| | | label="ææä¿é©çæèµ·æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="addNum" |
| | | label="å ä¿äººæ°"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="delNum" |
| | | label="åä¿äººæ°"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="fee" |
| | | label="è´¹ç¨åæ´"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="checkDetial(row)">æ¥çåå</el-button> |
| | | <!-- <el-button type="text" style="color: #ff0000;">å é¤</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="color: #F95601; font-size: 14px;width: 100%;text-align: left">ï¼3. 请å
éæ©è³å°ä¸æ¡ç³è¯·åæäº¤æä¿ç³è¯·ï¼</div> |
| | | <div class="info" v-if="model"> |
| | | <span v-if="model.specialAgreement">{{model.specialAgreement}}</span> |
| | | <span v-if="model.specialInfo">{{model.specialInfo}}</span> |
| | | <span v-if="model.ortherInfo">{{model.ortherInfo}}</span> |
| | | </div> |
| | | <!-- éæ©ç³è¯·å --> |
| | | <ApplyChangeDetails ref="ApplyChangeDetails" @success="getValue" /> |
| | | <el-dialog |
| | | title="éæ©ä¿é©å" |
| | | :visible.sync="visibleSelect" |
| | | width="70%" |
| | | :modal="true" |
| | | :show-close="false" |
| | | append-to-body |
| | | center> |
| | | <div class="desc_item_from"> |
| | | <el-table |
| | | ref="multipleTable1" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | @row-click="rowselect1" |
| | | row-key="id" |
| | | @selection-change="handleSelectionChange1" |
| | | stripe |
| | | > |
| | | <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="statusInfo" label="ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span :class="'union-apply-status'+row.status" >{{ row.statusInfo}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="ä¿åå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="solutionName" label="ä¿é©æ¹æ¡" min-width="100px"></el-table-column> |
| | | <el-table-column prop="insureNum" label="æä¿äººæ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="fee" label="æ»è´¹ç¨ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æäº¤æ¶é´" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <div class="desc_item_from_page"> |
| | | <el-pagination |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-size="10" |
| | | layout="total, prev, pager, next, jumper" |
| | | :total="tableTotal"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectDo()">ç¡® å®</el-button> |
| | | <el-button @click="model=null;visibleSelect=false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import selectApplicationForm from '@/components/business/selectApplicationForm' |
| | | import { listAll } from '@/api/business/applyChange' |
| | | import { merge } from '@/api/business/unionChange' |
| | | import ApplyChangeDetails from '@/components/business/ApplyChangeDetails' |
| | | import { fetchList as pageUnionList } from '@/api/business/unionApply' |
| | | import {getDetail} from "@/api/business/insuranceApply"; |
| | | export default { |
| | | name: 'add_subtract_entrust', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, ApplyChangeDetails,selectApplicationForm }, |
| | | data () { |
| | | return { |
| | | form: { |
| | | unionApplyId: null, |
| | | applyIds: [], |
| | | applyDate: null, |
| | | businessType: 0 |
| | | }, |
| | | visibleSelect:false, |
| | | solutions: [], |
| | | currentPage:0, |
| | | list: [], |
| | | tableData:[], |
| | | tableTotal:0, |
| | | endTime: '', |
| | | item: null, |
| | | model: null, |
| | | time: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | unionApplyId: [ |
| | | { required: true, message: 'è¯·éæ©ä¿é©å' } |
| | | ], |
| | | applyDate: [ |
| | | { required: true, message: 'è¯·éæ©ä¿é©çæèµ·æ' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | rowselect(row){ |
| | | this.$refs.multipleTable.toggleRowSelection(row,true); |
| | | }, |
| | | rowselect1(row){ |
| | | this.$refs.multipleTable1.toggleRowSelection(row,true); |
| | | }, |
| | | checkDetial(row){ |
| | | getDetail(row.applyId).then(res => { |
| | | // this.apply = res |
| | | this.$refs.ApplyChangeDetails.open('å åä¿äººååå',res, row,2) |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | handleSelectionChange(rows){ |
| | | this.form.applyIds = [] |
| | | // å设ååº id åæ®µ |
| | | rows.forEach(item => { |
| | | const id = item.id |
| | | if ( this.form.applyIds.indexOf(id) === -1) { |
| | | this.form.applyIds.push(id) |
| | | } |
| | | }) |
| | | }, |
| | | handleSelectionChange1 (rows) { |
| | | console.log(rows) |
| | | if (rows.length > 1) { |
| | | // clearSelection ç¨äºå¤éè¡¨æ ¼ï¼æ¸
ç©ºç¨æ·çéæ© |
| | | this.$refs.multipleTable1.clearSelection(); |
| | | this.$refs.multipleTable1.toggleRowSelection(rows[rows.length-1]); |
| | | } |
| | | if (rows.length >= 1) { |
| | | // éä¸çè¡å¯¹åæ¾è¿æ°ç»ï¼æ¹ä¾¿åç»å¯¹æ°æ®è¿è¡æä½ |
| | | this.model =rows[rows.length-1] |
| | | } else if (rows.length === 0) { |
| | | this.model = null |
| | | } |
| | | }, |
| | | selectDo(){ |
| | | if(!this.model){ |
| | | this.$tip.apiFailed({ |
| | | type: 'error', |
| | | message: 'è¯·éæ©è³å°ä¸æ¡ç³è¯·è®°å½è¿è¡æä½' |
| | | }) |
| | | return |
| | | } |
| | | this.visibleSelect=false |
| | | this.form.unionApplyId = this.model.id |
| | | this.getList(); |
| | | }, |
| | | confirm () { |
| | | this.$refs.form.validate((valid) => { |
| | | // debugger |
| | | if (!valid) { |
| | | return |
| | | } |
| | | if(this.form.applyIds == null || this.form.applyIds.length ===0){ |
| | | this.$tip.apiFailed({ |
| | | type: 'error', |
| | | message: 'è¯·éæ©è³å°ä¸æ¡ç³è¯·è®°å½è¿è¡æä¿ç³è¯·ï¼!' |
| | | }) |
| | | return; |
| | | } |
| | | this.$confirm('确认æäº¤ï¼è¯·ä»ç»æ ¸å¯¹ä¿¡æ¯ã', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | merge(this.form) |
| | | .then(response => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }) |
| | | this.visible = false |
| | | this.$emit('success') |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: 'åæ¶' |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.model= null |
| | | this.list= [] |
| | | this.visibleSelect=false |
| | | this.tableData=[] |
| | | this.tableTotal=0 |
| | | this.item= null |
| | | if (target) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | }) |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | } |
| | | // this.getUnionApplyList() |
| | | this.visible = true |
| | | }, |
| | | getValue(){ |
| | | |
| | | }, |
| | | selectBaoxiandan(){ |
| | | this.currentPage = 1 |
| | | this.visibleSelect=true |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.getUnionApplyList() |
| | | }, |
| | | getUnionApplyList(){ |
| | | pageUnionList({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | status: 3, |
| | | } |
| | | }).then(res => { |
| | | this.tableData.list = res.records |
| | | this.tableTotal = res.total |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.multipleTable1) |
| | | if (this.$refs.multipleTable1 && this.$refs.multipleTable1.doLayout) { |
| | | this.$refs.multipleTable1.doLayout() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | getList () { |
| | | listAll({ |
| | | solutionType:1, |
| | | unionApplyId: this.model.id, |
| | | status: 7 |
| | | }).then(res => { |
| | | this.list = res |
| | | this.$nextTick(() => { |
| | | if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { |
| | | this.$refs.multipleTable.doLayout() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | handleCurrentChange (val) { |
| | | this.currentPage = val |
| | | this.getUnionApplyList() |
| | | } |
| | | } |
| | | } |
| | | </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_cate { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | .info { |
| | | margin-top: 30px; |
| | | width: 100%; |
| | | font-size: 14px; |
| | | color: black; |
| | | } |
| | | </style> |