| | |
| | | <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="选择日期"> |
| | | @change="changeApplyStartTime" |
| | | v-model="form.applyStartTime" |
| | | type="date" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择日期"> |
| | | </el-date-picker> |
| | | <span style="color: #F95601; font-size: 14px;">(次日生效投保请于17:30前提交,超时提交以保险单为准)</span> |
| | | </div> |
| | |
| | | </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;"> |
| | | v-if="activeName === '0'" |
| | | :data="form.addDetailList" |
| | | border |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | ref="multipleTable" |
| | | @selection-change="handleSelectionChange" |
| | | style="width: 100%;margin-bottom: 15px;"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="memberName" |
| | | label="姓名"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="idCard" |
| | | label="身份证号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | label="年龄"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="item"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="workTypeName" |
| | | label="所属工种"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="fee" |
| | | label="费用"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="activeName === '0'">{{row.fee}}</span> |
| | | <span v-else>-{{row.fee}}</span> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" style="color: red;" @click="dele(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table |
| | | v-if="activeName === '1'" |
| | | :data="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 |
| | | :key="Math.random()" |
| | | prop="memberName" |
| | | label="姓名"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="idCard" |
| | | label="身份证号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | label="年龄"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="item"> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="workTypeName" |
| | | label="所属工种"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="fee" |
| | | label="费用"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" style="color: red;" @click="dele(scope.$index)">删除</el-button> |
| | |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import { all } from '@/api/business/solutions' |
| | | import { getDetail } from '@/api/business/insuranceApply' |
| | | import { getDate, compareDates, getTomorrow } from '@/utils/util' |
| | | import { update, getChangeCountCyclePriceVO, applyChagneDetailList } from '@/api/business/applyChange' |
| | | export default { |
| | | name: 'reinsurance', |
| | |
| | | addDetailList: [], |
| | | delDetailList: [], |
| | | }, |
| | | newVersionSolutionId: '', |
| | | activeName: '0', |
| | | pickerOptions: {}, |
| | | price: '', |
| | |
| | | item.fee = res.cyclePrice |
| | | }) |
| | | this.form.delDetailList.forEach(item => { |
| | | item.fee = res.cyclePrice |
| | | item.fee = -res.cyclePrice |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | // 获取投保详情 |
| | | getDetails() { |
| | | applyChagneDetailList({ |
| | | applyChangId: this.form.applyChangId, |
| | | applyChangeId: this.form.applyChangId, |
| | | types: [0] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | |
| | | this.form.addDetailList = res |
| | | }) |
| | | applyChagneDetailList({ |
| | | applyChangId: this.form.applyChangId, |
| | | applyChangeId: this.form.applyChangId, |
| | | types: [1] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | | item.fee = '' |
| | | // item.fee = '' |
| | | item.idCard = item.memberIdcardNo |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | item.duName = '' |
| | | item.duId = '' |
| | | // item.workTypeName = '' |
| | | // item.worktypeId = '' |
| | | // item.duName = '' |
| | | // item.duId = '' |
| | | }) |
| | | this.form.delDetailList = res |
| | | }) |
| | | getDetail(this.form.id) |
| | | .then(res => { |
| | | console.log(res) |
| | | this.list.push(res) |
| | | this.item = res |
| | | this.endTime = res.endTime |
| | | this.form.solutionId = res.solutionId |
| | | this.newVersionSolutionId = res.newVersionSolutionId |
| | | this.form.solutionsName = res.solutionsName |
| | | this.pickerOptions = { |
| | | disabledDate(time) { |
| | | // 当前日期大于等于生效日期并且最后一次操作时间等于空 |
| | | if ([1,3].includes(compareDates(getDate(), res.startTime)) && !res.lastChangeDate) { |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime() |
| | | // 当前日期小于生效日期并且最后一次操作时间等于空 |
| | | } else if (compareDates(getDate(), res.startTime) === 2 && !res.lastChangeDate) { |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.startTime).getTime() |
| | | // 最后一次操作时间有值 |
| | | } else if (res.lastChangeDate) { |
| | | // 当前日期大于最后一次操作时间 |
| | | if ([1,3].includes(compareDates(getDate(), res.lastChangeDate))) { |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime() |
| | | // 当前时间小于最后一次操作时间 |
| | | } else if (compareDates(getDate(), res.lastChangeDate) === 2) { |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.lastChangeDate).getTime() |
| | | } |
| | | } |
| | | // - 8.64e7 |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() |
| | | // return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() |
| | | } |
| | | }; |
| | | this.changeSolution1(res.solutionId) |
| | | // this.changeSolution1(res.solutionId) |
| | | }) |
| | | }, |
| | | getSummaries(param) { |
| | |
| | | this.form.delDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = '-' + total |
| | | // if (total < 0) { |
| | | sums[index] = total |
| | | // } else { |
| | | // sums[index] = '-' + total |
| | | // } |
| | | return |
| | | } |
| | | sums[index] = '' |
| | |
| | | this.$message.warning('请选择员工') |
| | | return |
| | | } |
| | | this.$refs.confirmJobType.open('确认工种', { solutionId: this.form.solutionId }) |
| | | this.$refs.confirmJobType.open('确认工种', { solutionId: this.newVersionSolutionId }) |
| | | }, |
| | | // 查询全部方案 |
| | | getCompany() { |