qinxianzhangyao
2023-10-17 ba9dbeee7c139c67d770afe0053f06f1f235e565
src/views/system/examcharge/index.vue
@@ -80,9 +80,9 @@
        </el-table>
    </div> -->
    <div class="app-container">
        <el-row :gutter="24">
        <el-row :gutter="20">
            <!--部门数据-->
            <el-col :span="4" :xs="24">
            <el-col :span="5" :xs="24">
                <el-form :inline="true" ref="form" :model="form" class="demo-form-inline" label-width="78px" :rules="rules">
                    <el-form-item label="姓名" prop="name">
                        <el-input v-model="form.name" placeholder="请输入姓名" />
@@ -148,14 +148,14 @@
                </div>
                <el-table v-loading="loading" :data="tableList" @selection-change="handleSelect" border max-height="740px"
                <el-table v-loading="loading" :data="tableList" @selection-change="handleSelect" border max-height="720px"
                    :row-style="changRed" style="margin-left: 30px;">
                    <el-table-column type="selection" width="55" align="center" />
                    <el-table-column label="姓名" align="center" prop="customer.cusName" width="90px" />
                    <el-table-column label="手机号" align="center" prop="customer.cusPhone" width="120px"
                    <el-table-column label="手机号" align="center" prop="customer.cusPhone" width="110px"
                        :show-overflow-tooltip="true"></el-table-column>
                    <el-table-column label="订单流水号" align="center" prop="waterId" width="210px" />
                    <el-table-column label="体检项目" align="center" prop="proname" />
                    <el-table-column label="订单流水号" align="center" prop="waterId" width="180px" />
                    <el-table-column label="体检项目" align="center" prop="proname" width="90px"/>
                    <el-table-column label="应收金额" align="center" prop="copeWith" width="90px" />
                    <el-table-column label="实收金额" align="center" prop="paidIn" width="90px" />
                    <el-table-column label="付款类型" align="center" prop="payType" width="90px">
@@ -163,7 +163,7 @@
                            <dict-tag :options="dict.type.dict_pay_type" :value="scope.row.payType" />
                        </template>
                    </el-table-column>
                    <el-table-column label="收费员" align="center" prop="updateBy" width="110px" />
                    <el-table-column label="收费员" align="center" prop="updateBy" width="100px" />
                    <el-table-column label="收退时间" align="center" prop="updateTime" />
                    <el-table-column fixed="right" label="操作" align="center" class-name="small-padding " width="120px"
                        v-if="queryParams.type == '1'">
@@ -191,7 +191,7 @@
                    <div style="text-align: center;">
                        <h3>{{ hospName }}小票</h3>
                    </div>
                    <div style="margin-top: 4px;">
                        <div>
                            姓名:{{ formIn.name }}
@@ -219,7 +219,7 @@
</template>
    
<script>
import { getTjPrice, addOrderAndDetail, tjRefund, getFlowingWaterList } from "@/api/system/examcharge";
import { getTjPrice, addOrderAndDetail, tjRefund, getFlowingWaterList, getPrintSetUp } from "@/api/system/examcharge";
import { getInfo } from "@/api/login";
import printJS from "print-js";
export default {
@@ -228,7 +228,7 @@
    data() {
        return {
            tjNumbers:"",
            // 遮罩层
            loading: false,
            disabled: "",
@@ -258,7 +258,7 @@
                zk: 10,
            },
            hospName:"",
            hospName: "",
            currentDate: "",
            currentTime: "",
            // 表单参数
@@ -442,12 +442,36 @@
                this.formIn = this.form
                addOrderAndDetail(this.form).then(res => {
                    if (res.code == 200) {
                        this.tjNumbers = res.msg
                        this.$modal.msgSuccess("收费成功");
                        getPrintSetUp().then(res => {
                            if (res.msg == "0") {
                                this.$nextTick(() => {
                                    const style =
                                        "@media print { @page{margin:0 10mm,size:4mm 6mm;}};"; //打印时去掉眉页眉尾
                                    printJS({
                                        printable: "printBill", // 标签元素id
                                        noPrint: ".noPrint",
                                        type: 'html',
                                        header: "",
                                        targetStyles: ["*"],
                                        maxWidth: "800",
                                        scanStyles: true, //打印必须加上,不然页面上的css样式无效
                                        style,
                                    });
                                });
                        this.receipt()
                        this.resetQuery()
                        this.handleUpdate()
                        this.getList()
                            } else {
                                const tjnumber = this.tjNumbers;
                                const viewNum = "809623418249637888";
                                const params = { viewNum, tjnumber };
                                this.$tab.openPage("个人发票", "/report/charge", params);
                            }
                            this.resetQuery()
                            this.handleUpdate()
                            this.getList()
                        })
                    }
                })
            } else {