jiangping
2024-02-04 3c2e49d7bcc91268a75689db400d1f1698c0f8b7
Merge remote-tracking branch 'origin/master'
已添加1个文件
已修改9个文件
453 ■■■■■ 文件已修改
company/src/api/business/taxes.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/commissionDetails.vue 325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/directInvoicingApplication.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/entrustedInvoicingApplication.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/entrustmentHistory.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/entrustedInvoicing.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/Taxes.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/taxes.js
@@ -39,3 +39,10 @@
        trim: true
    })
}
// æäº¤å§”托投报开票
export function entrustInvoicing(data) {
    return request.post('/business/taxes/entrustInvoicing', data, {
        trim: true
    })
}
company/src/components/enterprise/commissionDetails.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,325 @@
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div class="info">
            <div class="info_list">
                <div class="info_list_item">
                    <div class="info_list_item_label">开票名称:</div>
                    <div class="info_list_item_val">{{userInfo.company.name}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">纳税人识别号:</div>
                    <div class="info_list_item_val">{{userInfo.company.code}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">开户行:</div>
                    <div class="info_list_item_val">{{userInfo.company.taxBank}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">账号:</div>
                    <div class="info_list_item_val">
                        {{userInfo.company.taxAccount}}
                    </div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">地址、电话:</div>
                    <div class="info_list_item_val">{{userInfo.company.invoiceAddr}} {{userInfo.company.phone}}</div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">开票金额:</div>
                    <div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{totalPrice}}</div>
                </div>
                <div class="list" style="width: 100%;" v-if="form.type === 0">
                    <div class="list_label">
                        æŽ¥æ”¶æ–¹å¼ï¼šç”µå­å‘票
                    </div>
                    <div class="list_val">
                        <div class="list_val_label">接收地址:</div>
                        <div class="list_val_info">{{form.addr}}</div>
                    </div>
                </div>
                <div class="list" style="width: 100%;" v-else>
                    <div class="list_label">
                        æŽ¥æ”¶æ–¹å¼ï¼šçº¸è´¨å‘票
                    </div>
                    <div class="list_val">
                        <div class="list_val_label">接收地址:</div>
                        <div class="list_val_info">{{form.addr}}</div>
                    </div>
                </div>
            </div>
            <!--      åŠ å‡ä¿      -->
            <el-table
                :data="list1"
                border
                show-summary
                :summary-method="getSummaries1"
                style="width: 100%; margin-bottom: 20px;">
                <el-table-column
                    label="序号"
                    align="center"
                    width="80">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="solutionName"
                    label="保险方案">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="applyCode"
                    label="保单号">
                </el-table-column>
                <el-table-column
                    align="center"
                    label="金额">
                    <template slot-scope="{row}">
                        <span style="color:rgba(249, 86, 1, 0.996078431372549);">{{row.totalFee}}</span>
                    </template>
                </el-table-column>
            </el-table>
        </div>
        <template v-slot:footer>
            <el-button @click="close">返回</el-button>
        </template>
    </GlobalWindow>
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { getDetail } from '@/api/business/taxes'
    import { mapState } from 'vuex'
    export default {
        name: 'commissionDetails',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                list1: [],
                list2: [],
                totalPrice: 0,
                form: {
                    id: null,
                    type: '',
                    addr: ''
                }
            }
        },
        created () {
            this.config({
                api: '/business/taxes',
                'field.id': 'id'
            })
        },
        computed: {
            ...mapState(['userInfo'])
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
                this.list1 = []
                this.list2 = []
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                    this.getData()
                })
            },
            close () {
                this.visible = false
            },
            getData() {
                getDetail(this.form.id)
                    .then(res => {
                        let price = 0
                        this.list1 = res.applyList
                        this.list2 = res.delTaxList
                        if (this.list1 && this.list1.length > 0) {
                            this.list1.forEach(item => {
                                price += item.totalFee
                            })
                        }
                        if (this.list2 && this.list2.length > 0) {
                            this.list2.forEach(row => {
                                price += row.totalFee
                            })
                        }
                        this.totalPrice = price
                    })
            },
            getSummaries1 (param) {
                const { columns, data } = param
                const sums = []
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '合计'
                    } else if (index == 3) {
                        let price = 0
                        data.forEach(item => {
                            price += item.totalFee
                        })
                        sums[index] = price
                    }
                })
                return sums;
            },
            getSummaries2 (param) {
                const { columns, data } = param
                const sums = []
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '合计'
                    } else if (index == 5) {
                        let price = 0
                        data.forEach(item => {
                            price += item.totalFee
                        })
                        sums[index] = price
                    }
                })
                return sums;
            }
        }
    }
</script>
<style lang="scss" scoped>
    ::v-deep .el-table__footer-wrapper tbody td {
        cursor: pointer;
        text-align: center;
        &:nth-child(5) {
            color:rgba(249, 86, 1, 0.996078431372549);
        }
    }
    .red {
        color: red;
    }
    .info {
        width: 100%;
        .info_label {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            span {
                font-size: 14px;
                font-weight: 500;
                color: #000000;
            }
        }
        .info_list {
            width: 100%;
            display: flex;
            align-items: left;
            flex-wrap: wrap;
            .list::v-deep {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 15px;
                .el-radio__label {
                    color: black;
                    font-size: 14px;
                }
                .list_label {
                    color: black;
                    font-size: 14px;
                    margin-right: 20px;
                }
                .list_val {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    .list_val_label {
                        font-size: 14px;
                        color: black;
                        flex-shrink: 0;
                        margin-right: 15px;
                    }
                    .list_val_info {
                        flex: 1;
                        font-size: 14px;
                        color: black;
                    }
                }
            }
            .info_list_item {
                width: 50%;
                display: flex;
                align-items: start;
                font-size: 14px;
                margin-bottom: 20px;
                .info_list_item_label {
                    width: 150px;
                    flex-shrink: 0;
                }
                .info_list_item_val {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    .image {
                        width: 100px;
                        height: 100px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        overflow: hidden;
                        img {
                            width: 100%;
                        }
                    }
                }
            }
        }
    }
    .form {
        width: 100%;
        display: flex;
        flex-direction: column;
        .form_item {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            &:last-child {
                margin-bottom: 0 !important;
            }
            .form_item_label {
                width: 100px;
                flex-shrink: 0;
                font-size: 14px;
                color: black;
            }
            .form_item_val {
                flex: 1;
                min-height: 35px;
                display: flex;
                align-items: center;
                input {
                    width: 100%;
                    height: 100%;
                    font-size: 14px;
                    color: black;
                    padding: 5px 10px;
                    outline: none;
                    box-sizing: border-box;
                    border: 1px solid #ececec;
                }
            }
        }
    }
</style>
company/src/components/enterprise/directInvoicingApplication.vue
@@ -188,6 +188,9 @@
            open (title, target) {
                this.title = title
                this.visible = true
                this.type = '0'
                this.val = ''
                this.val1 = ''
                this.list1 = []
                this.list2 = []
                this.$nextTick(() => {
company/src/components/enterprise/entrustedInvoicingApplication.vue
@@ -34,10 +34,19 @@
                    <div class="info_list_item_label">开票金额:</div>
                    <div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{total}}</div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">接收方式:</div>
                    <div class="info_list_item_val">电子发票</div>
<!--                    <div v-if="model.type === 1" class="info_list_item_val">纸质发票</div>-->
                <div class="list" style="width: 100%;">
                    <el-radio v-model="type" label="0">电子发票</el-radio>
                    <div class="list_val">
                        <div class="list_val_label">接收地址:</div>
                        <el-input v-model="val" :disabled="type === '1'" placeholder="111222333@qq.com"></el-input>
                    </div>
                </div>
                <div class="list" style="width: 100%;">
                    <el-radio v-model="type" label="1">纸质发票</el-radio>
                    <div class="list_val">
                        <div class="list_val_label">接收地址:</div>
                        <el-input v-model="val1" :disabled="type === '0'" placeholder="安徽省合肥市经济技术开发区莲花路以东、石门路以南莲花路1#     0551-63450845"></el-input>
                    </div>
                </div>
            </div>
            <el-table
@@ -79,6 +88,7 @@
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { entrustInvoicing } from '@/api/business/taxes'
    import { mapState } from 'vuex'
    export default {
        name: 'entrustedInvoicingApplication',
@@ -91,6 +101,9 @@
                    backInfo:'',
                    list: []
                },
                val: '',
                val1: '',
                type: '0',
                rules: {
                    backInfo: [
                        { required: true, message: '请输入退回说明' }
@@ -99,11 +112,18 @@
            }
        },
        created () {
            console.log(this.userInfo)
            this.config({
                api: '/business/taxes',
                'field.id': 'id'
            })
        },
        watch: {
            type: {
                handler(news) {
                    this.val = ''
                    this.val1 = ''
                }
            }
        },
        computed: {
            ...mapState(['userInfo']),
@@ -118,11 +138,41 @@
        methods: {
            open (title, target) {
                this.title = title
                this.type = '0'
                this.val = ''
                this.val1 = ''
                this.visible = true
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                })
            },
            confirm () {
                if (!this.val && !this.val1) {
                    this.$message.warning('请输入接收地址')
                    return
                }
                this.isWorking = true
                entrustInvoicing({
                    address: this.val || this.val1,
                    invoicingMoney: this.total,
                    taxDetialList: this.form.list.map(item => {
                        return {
                            insuranceApplyId: item.id,
                            fee: item.totalPrice,
                            applyCode: item.code
                        }
                    }),
                    type: this.type
                }).then(res => {
                    this.visible = false
                    this.$tip.apiSuccess('操作成功')
                    this.$emit('success')
                }).catch(e => {
                    this.$tip.apiFailed(e)
                }).finally(() => {
                    this.isWorking = false
                })
            },
            getSummaries (param) {
@@ -131,7 +181,8 @@
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '合计'
                    } else if (index == 4) {
                        return
                    } else if (index == 3) {
                        let price = 0
                        data.forEach(item => {
                            price += item.totalPrice
@@ -139,6 +190,7 @@
                        sums[index] = price
                    }
                })
                return sums;
            }
        }
    }
@@ -184,6 +236,28 @@
            display: flex;
            align-items: left;
            flex-wrap: wrap;
            .list::v-deep {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 15px;
                .el-radio__label {
                    color: black;
                    font-size: 14px;
                }
                .list_val {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    .list_val_label {
                        font-size: 14px;
                        color: black;
                        flex-shrink: 0;
                        margin-right: 15px;
                    }
                }
            }
            .info_list_item {
                width: 50%;
                display: flex;
company/src/components/enterprise/entrustmentHistory.vue
@@ -64,6 +64,7 @@
            <el-button @click="close">返回</el-button>
        </template>
        <directInsuranceDetails ref="directInsuranceDetails" />
        <commissionDetails ref="commissionDetails" />
    </GlobalWindow>
</template>
@@ -72,16 +73,18 @@
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { list } from '@/api/business/taxes'
    import directInsuranceDetails from '@/components/enterprise/directInsuranceDetails'
    import commissionDetails from '@/components/enterprise/commissionDetails'
    export default {
        name: 'entrustmentHistory',
        extends: BaseOpera,
        components: { GlobalWindow, directInsuranceDetails },
        components: { GlobalWindow, directInsuranceDetails, commissionDetails },
        data () {
            return {
                form: {
                    id: null,
                    solutionsName: '',
                    code: ''
                    code: '',
                    determine: ''
                },
                list: []
            }
@@ -116,10 +119,14 @@
                } else {
                    info = '待处理'
                }
                if (this.form.determine === 1) {
                    this.$refs.commissionDetails.open(`开票详情(${info})`, row)
                } else {
                this.$refs.directInsuranceDetails.open(`开票详情(${info})`, row)
                }
            },
            getList() {
                list({ insuranceApplyId: this.form.id })
                list({ applyId: this.form.id })
                    .then(res => {
                        this.list = res
                    })
company/src/views/enterprise/entrustedInvoicing.vue
@@ -41,7 +41,7 @@
                <el-table-column prop="endTime" label="投保失效日期"></el-table-column>
                <el-table-column label="操作" min-width="180px">
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.entrustmentHistory.open('开票历史', row)">开票历史</el-button>
                        <el-button type="text" @click="$refs.entrustmentHistory.open('开票历史', {...row, determine: 1})">开票历史</el-button>
                    </template>
                </el-table-column>
            </el-table>
server/service/src/main/java/com/doumee/dao/business/model/Taxes.java
@@ -176,6 +176,9 @@
    @TableField(exist = false)
    List<TaxDetial> delTaxList ;//
    @ApiModelProperty(value = "保单主键 - æŸ¥è¯¢ä¿å•的开票历史记录")
    @TableField(exist = false)
    private Integer applyId;
    public TaxesInvoicingVO getTaxesInvoicingVO(){
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -640,7 +640,7 @@
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_COMPANY_COMMIT;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        info = info.replace("${param}", "");
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
        
@@ -721,7 +721,7 @@
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_UPLOAD_AGAIN;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        info = info.replace("${param}", "");
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -485,8 +485,9 @@
        }
        //删除其他待办
        noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId()));
        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),model.getSolutionsName(),
        Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),
                model.getCompanyId(), Constants.NoticeType.TWO);
        notices.setParam1(model.getApplyId().toString());
        noticesMapper.insert(notices);
        Multifile f = new Multifile();
@@ -566,6 +567,7 @@
                .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                .selectAs(Company::getName,InsuranceApply::getCompanyName)
                .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId)
                .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
@@ -624,6 +626,7 @@
                            .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                            .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                            .selectAs(Company::getName,InsuranceApply::getCompanyName)
                            .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId)
                            .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                            .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                            .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -393,6 +393,7 @@
            queryWrapper.le(queryModel.getEndDate() != null,Taxes::getCreateDate,  (queryModel.getEndDate()));
            queryWrapper.eq(!Objects.isNull(queryModel.getInsuranceApplyId()),Taxes::getInsuranceApplyId,queryModel.getInsuranceApplyId());
            queryWrapper.eq(!Objects.isNull(queryModel.getStatus()),Taxes::getStatus,queryModel.getStatus());
            queryWrapper.exists(!Objects.isNull(queryModel.getApplyId())," select 1 from tax_detial td where td.insurance_apply_id = "+queryModel.getApplyId()+" and t.id = td.tax_id ");
        }
        queryWrapper.orderByAsc(Taxes::getCreateDate);
@@ -417,7 +418,7 @@
            || Objects.isNull(entrustInvoicingDTO.getInvoicingMoney())
            || Objects.isNull(entrustInvoicingDTO.getType())
            || Objects.isNull(entrustInvoicingDTO.getTaxDetialList())
            || StringUtils.isNotBlank(entrustInvoicingDTO.getAddress())
            || StringUtils.isBlank(entrustInvoicingDTO.getAddress())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -455,7 +456,7 @@
            //查询每个保单下可以投保的金额
            InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,new MPJLambdaWrapper<InsuranceApply>()
                    .selectAll(InsuranceApply.class)
                    .select(" ( select sum(td.fee) from taxes ts inner join tax_detial td on ts.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ) as taxesMoney ")
                    .select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney ")
                    .eq(InsuranceApply::getId,taxDetial.getInsuranceApplyId())
            );
            if(Objects.isNull(insuranceApply)){