diff --git a/src/api/apis_moudles/verification.js b/src/api/apis_moudles/verification.js index 1c590648fe0f7988694d5110eaaed895dd7bd127..d3a5b8cd25116e5154b6cdd7f483d0ef33127799 100644 --- a/src/api/apis_moudles/verification.js +++ b/src/api/apis_moudles/verification.js @@ -15,5 +15,7 @@ export default { queryBackReceiptList: "/backstage/auth/queryBackReceiptList", //回销关è”è´¦å•列表查询 queryReceiptInfoList: "/backstage/auth/queryReceiptInfoList", //回销账å•列表查询 deleteReceiptRecord: "/backstage/auth/deleteBackReceipt", // åˆ é™¤å·²å…³è”è´¦å• + exportBackMoneyReport: "/backstage/auth/backMoneyListExport", // 回款列表导出 + exportBackReceiptList: "/backstage/auth/exportBackReceiptList", // å…³è”è´¦å•列表导出 }; diff --git a/src/api/funcs_modules/verification.js b/src/api/funcs_modules/verification.js index f0ee1136c42fccc6a3e15356fcebdddf5605d880..dfdba08a6bbd2108ff374dd9df765bf4ee53d811 100644 --- a/src/api/funcs_modules/verification.js +++ b/src/api/funcs_modules/verification.js @@ -67,6 +67,16 @@ const DELETERECEIPTRECORD = (data) => { return req.post(apis.deleteReceiptRecord, data); }; +// 回款列表导出 +const EXPORTBACKMONEYREPORT = (data) => { + return req.post(apis.exportBackMoneyReport, data, { responseType: "blob" }); +}; + +// å…³è”è´¦å•导出 +const EXPORTBACKRECEIPTLIST = (data) => { + return req.post(apis.exportBackReceiptList, data, { responseType: "blob" }); +}; + // 对象数组 export default { QUERYEOBLIST, @@ -82,5 +92,7 @@ export default { EOBRECEIPLISTEXPORT, QUERYBACKRECEIPTLIST, QUERYBACKRECEIPTINFOLIST, - DELETERECEIPTRECORD + DELETERECEIPTRECORD, + EXPORTBACKMONEYREPORT, + EXPORTBACKRECEIPTLIST }; \ No newline at end of file diff --git a/src/utils/utilsdictOptions.js b/src/utils/utilsdictOptions.js index 31f12220d20117c1c26c6b71217534a5e9d2a153..56fbb843412f81b75cb9e4f611addf9b97c8d549 100644 --- a/src/utils/utilsdictOptions.js +++ b/src/utils/utilsdictOptions.js @@ -1,65 +1,71 @@ - -//性别 -const sexOptions = [{ - name: 'ç”·', - value: 'M' -}, { - name: '女', - value: 'F' -}]; - -//寄é€çŠ¶æ€ -const SendStatusOptions = [ - { name: '未寄é€', value: '1'}, - { name: '寄é€', value: '2'}, - { name: '待寄é€', value: '3'}, -]; - -//ç†èµ”çŠ¶æ€ -const ClaimsStatusOptions = [ - { name: '赔付', value: '01'}, - { name: '部分赔付', value: '02'}, - { name: 'æ‹’èµ”', value: '03'}, - { name: 'è¡¥å……ææ–™', value: '04'}, -]; - -//EOBçŠ¶æ€ -const EOBStatusOptions = [ - { name: '待回款', value: '1'}, - { name: '已回款', value: '2'}, - { name: '未回款', value: '3'} -]; - -//ç”³è¯·çŠ¶æ€ -const ApplyStatusOptions = [ - { name: '申请ä¸', value: '01'}, - { name: 'é¢„æŽˆæƒæ‰¹å‡†', value: '02'}, - { name: 'é¢„æŽˆæƒæ‹’ç»', value: '03'}, - { name: '预授æƒè°ƒæŸ¥', value: '04'}, -]; - -//审批结果 -const ApproveStatusOptions = [ - { name: '未通过', value: '1'}, - { name: '已通过', value: '2'} -]; - -//monetUnit -const MoneyUnitOptions = [ - { name: 'å…ƒ', value: '01'}, - { name: '美元', value: '02'}, - { name: '英镑', value: '03'}, - { name: '欧元', value: '04'}, -]; - - - -module.exports = { - sexOptions, - SendStatusOptions, - ClaimsStatusOptions, - EOBStatusOptions, - ApplyStatusOptions, - ApproveStatusOptions, - MoneyUnitOptions, + +//性别 +const sexOptions = [{ + name: 'ç”·', + value: 'M' +}, { + name: '女', + value: 'F' +}]; + +//寄é€çŠ¶æ€ +const SendStatusOptions = [ + { name: '未寄é€', value: '1'}, + { name: '寄é€', value: '2'}, + { name: '待寄é€', value: '3'}, +]; + +//ç†èµ”çŠ¶æ€ +const ClaimsStatusOptions = [ + { name: '赔付', value: '01'}, + { name: '部分赔付', value: '02'}, + { name: 'æ‹’èµ”', value: '03'}, + { name: 'è¡¥å……ææ–™', value: '04'}, +]; + +//EOBçŠ¶æ€ +const EOBStatusOptions = [ + { name: '待回款', value: '1'}, + { name: '已回款', value: '2'}, + { name: '未回款', value: '3'} +]; + +//ç”³è¯·çŠ¶æ€ +const ApplyStatusOptions = [ + { name: '申请ä¸', value: '01'}, + { name: 'é¢„æŽˆæƒæ‰¹å‡†', value: '02'}, + { name: 'é¢„æŽˆæƒæ‹’ç»', value: '03'}, + { name: '预授æƒè°ƒæŸ¥', value: '04'}, +]; + +//审批结果 +const ApproveStatusOptions = [ + { name: '未通过', value: '1'}, + { name: '已通过', value: '2'} +]; + +//monetUnit +const MoneyUnitOptions = [ + { name: 'å…ƒ', value: '01'}, + { name: '美元', value: '02'}, + { name: '英镑', value: '03'}, + { name: '欧元', value: '04'}, +]; + +// è´¦å•类型 +const receiptTypeOptions = [ + { name: 'æ”¶è´¹', value: '1'}, + { name: '退费', value: '2'}, +]; + + +module.exports = { + sexOptions, + SendStatusOptions, + ClaimsStatusOptions, + EOBStatusOptions, + ApplyStatusOptions, + ApproveStatusOptions, + MoneyUnitOptions, + receiptTypeOptions } \ No newline at end of file diff --git a/src/views/charge-query/detail.vue b/src/views/charge-query/detail.vue index 881c2d2f581facfb2463ebd61d777eef17316643..d03405c81fd7ee7db8ccd6550f82e6a10f5a4d7e 100644 --- a/src/views/charge-query/detail.vue +++ b/src/views/charge-query/detail.vue @@ -1,391 +1,395 @@ -<template> - <!-- -è´¦å•æ˜Žç»† --> - <div class="white_bg burt-container custom-info"> - <Goback title="è´¦å•详情" /> - <a-form-model ref="form" layout="vertical" :model="form"> - <a-row :gutter="30"> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="病历å·"> - <a-input v-model="form.mrnNo" placeholder="请输入病历å·" allow-clear /> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="客户姓å"> - <a-input v-model="form.patientName" placeholder="请输入客户姓å" allow-clear /> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="客户类型"> - <a-select v-model="form.patientType" placeholder="请选择客户类型" allowClear> - <a-select-option v-for="item in patientTypeOptions" :key="item.code" :value="item.code"> - {{ item.name }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="ä¿é™©å…¬å¸"> - <a-select v-model="form.payorId" placeholder="请选择ä¿é™©å…¬å¸" allowClear> - <a-select-option v-for="item in companyOptions" :key="item.corpCode" :value="item.id"> - {{ item.longName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="看诊医生"> - <a-select v-model="form.doctorCode" placeholder="请选择看诊医生" allowClear> - <a-select-option v-for="item in doctorOptions" :key="item.doctorCode" :value="item.doctorCode"> - {{ item.doctorDesc }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="5" :lg="6" :sm="12"> - <a-form-model-item label="就诊时间"> - <a-date-picker value-format="YYYY-MM-DD 00:00:00" v-model="form.receiptDate" placeholder="就诊时间" /> - </a-form-model-item> - </a-col> - <a-col :xl="3" :lg="6" :sm="12"> - <a-form-model-item label="支付方å¼"> - <a-select v-model="form.paymentCode" placeholder="请选择支付方å¼" allowClear> - <a-select-option v-for="item in paymentOptions" :key="item.code" :value="item.code" allow-clear> - {{ item.name }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="16" :lg="12" :sm="12" class="none-label"> - <a-form-model-item label="button"> - <!-- <a-button>æ›´æ–°æ•°æ®</a-button> - <a-button class="mar-left10" type="primary" @click="addNewCharge"> - <Icon name="ssiadd" :size="14" />新建预授æƒ</a-button> --> - <a-button class="mar-left10" type="primary" @click="handlerReset"> - <Icon name="ssireset" :size="14" />é‡ç½® - </a-button> - <a-button class="mar-left10" type="primary" @click="handlerSearch"> - <Icon name="ssisearch_active" :size="14" />查询 - </a-button> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - - <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"> - <template slot="operation" slot-scope="record"> - <a-button type="link" @click.stop="editEvt(record)">修改</a-button> - <a-popconfirm title="ä½ ç¡®å®šè¦å…³é—å—?" ok-text="确定" cancel-text="å–æ¶ˆ" @confirm="deleteData" > - <a-button type="link" class="danger">åˆ é™¤</a-button> - </a-popconfirm> - </template> - <template slot="footer"> - <div class="total">总计: <span>{{form.chargeAmount||0}}</span></div> - </template> - </a-table> - <!--分页--> - <BurtPagination :pagination="pagination" @pageChange="_getChargeListDetail" /> - - <div class="title-div">费用支付明细</div> - <a-table :columns="payColumns" :data-source="payDataList" :scroll="{ x: true }" :pagination="false" class="payTable"> - <template slot="paymentType" slot-scope="text"> - <a-button class="danger">{{ text | payStyleFilters }}</a-button> - </template> - </a-table> - <a-row :gutter="30"> - <a-col :sm="24"> - <div class="btn-div flex"> - <a-button type="primary" @click="receiptEvt"> - <Icon name="ssibaocun" :size="14" />结算</a-button> - <a-button type="primary" class="mar-left10" @click="printEvt"> - <Icon name="ssidayinji_o" :size="14" />打å°</a-button> - </div> - </a-col> - </a-row> - - <a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false" - okText="确定" cancelText="å–æ¶ˆ" - @ok="handleEditOK" @cancel="dialogShow = false"> - <a-form-model ref="editForm" :model="editFormObj" :rules="editRules"> - <a-row :gutter="30"> - <a-col :lg="12" :xs="24"> - - </a-col> - </a-row> - </a-form-model> - </a-modal> - </div> -</template> - -<script> -import Goback from "@/components/CUSTOMER/goback"; -import BurtPagination from "@/components/CUSTOMER/pagation"; -import { mapState } from "vuex" -export default { - data() { - const columns = [ - { title: "项目", dataIndex: "itemcatDesc", width: 180 }, - { title: "项目明细", dataIndex: "itemDesc", width: 180}, - { title: "å•ä»·", dataIndex: "itemPrice", width: 120}, - { title: "æ•°é‡", dataIndex: "itemQty", width: 180 }, - { title: "å•ä½", dataIndex: "itemUnitDesc", width: 180 }, - { title: "金é¢", dataIndex: "chargeAmount", width: 180 }, - { title: "折扣(%)", dataIndex: "discountAmount", width: 180 }, - { title: "折åŽé‡‘é¢", dataIndex: "actualAmount", width: 180 }, - { title: "å‡å…金é¢", dataIndex: "reduceAmount", width: 180 }, - { title: "实际金é¢", dataIndex: "paidAmount", width: 180 }, - // { title: "å…èµ”é¢", dataIndex: "deductible", width: 180 }, - // { title: "自付é¢", dataIndex: "selfPaid", width: 180 }, - // { title: "其他费用", dataIndex: "otherPaid", width: 180 }, - // { title: "ç†èµ”金é¢", dataIndex: "actualPaid", width: 180 }, - // { title: "æ“作", key: "operation", width: "175px", fixed: "right", scopedSlots: { customRender: "operation" },align: "center"}, - ]; - const payColumns = [ - { title: "å…èµ”é¢", dataIndex: "deductible", width: 180 }, - { title: "自付é¢", dataIndex: "selfPaid", width: 180 }, - { title: "其他费用", dataIndex: "otherPaid", width: 180 }, - { title: "个人支付", dataIndex: "personalPaid", width: 180 }, - { title: "ç†èµ”金é¢", dataIndex: "ciPaid", width: 180 }, - { title: "支付方å¼", dataIndex: "paymentType", width: 180, scopedSlots: { customRender: "paymentType" }}, - ]; - return { - dialogShow: false, - receiptNo: "", - columns, - payColumns, - form: {}, - pageForm: { - doctorCode: "", - patientName: "", - mrnNo: "", - paymentCode: "", - payorId: 0, - receiptDate: "" - }, - patientTypeOptions: [ - { - name: "商ä¿", - code: 1, - }, - ], //客户类型 - companyOptions: [], //ä¿é™©å…¬å¸ - doctorOptions: [], //就诊医生 - paymentOptions: [ - { - name: "商ä¿", - code: 1, - }, - ], //æ”¯ä»˜æ–¹å¼ - dataList: [], - pager: { - pageNum: 1, - pageSize: 10, - }, - payDataList: [], - pagination: { - pageNum: 1, - pageSize: 10, - total: 0, - }, - editFormObj: { - id: "", - mrnNo: '', - patientName: '', - }, - editRules: { - mrnNo: [{ required: true, message: "病历å·", trigger: "blur" }], - patientName: [{ required: true, message: "客户姓å", trigger: "blur" }], - }, - }; - }, - components: { - Goback, - BurtPagination, - }, - computed: { - ...mapState({ - userInfo: (state) => state.common.userInfo - }) - }, - filters: { - payStyleFilters(value) { - const styleMap = { - 1: "支付å®", - 2: "微信", - 3: "现金", - }; - return styleMap[value]; - }, - }, - created() { - const { receiptNo } = this.$route.query; - this.receiptNo = receiptNo || ""; - let chargeQueryDetail = localStorage.getItem('chargeQueryDetail'); - this.form = chargeQueryDetail? JSON.parse(chargeQueryDetail): {}; - - this._getChargeListDetail(); - this._getCompanyOptions();//获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ - this._getDoctorListNoPage();//获å–看诊医生下拉选项 - this._getReceiptPaymentDetail(); //费用支付明细 - }, - methods: { - // 获å–åˆ—è¡¨æ•°æ® - _getChargeListDetail() { - const data = { - receiptNo: this.receiptNo, - ...this.pager, - }; - this.$apis.GETCHARGELISTDETAIL(data).then((res) => { - console.log("11111111111获å–tableä¿¡æ¯=", res); - if (res.returnCode == "0000") { - this.dataList = (res.content && res.content.list) || []; - // this.pager.total = (res.content && res.content.total) || 0; - } else { - this.$message.error(res.returnMsg); - } - }); - }, - // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ - _getCompanyOptions() { - this.$apis.GETCOMPANYOPTIONS().then((res) => { - console.log("获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹", res); - if (res.returnCode == "0000") { - this.companyOptions = res.content || []; - } else { - this.$message.error(res.returnMsg); - } - }); - }, - // 获å–看诊医生下拉选项 - _getDoctorListNoPage(){ - this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { - if (res.returnCode === "0000") { - this.doctorOptions = res.content || []; - }else{ - this.$message.success(res.returnMsg); - } - - }); - }, - // 获å–费用支付明细 - _getReceiptPaymentDetail() { - const params = { - receiptNo: this.receiptNo, - ...this.payPager, - }; - this.$apis.GETRECEIPTPAYMENTDETAIL(params).then((res) => { - console.log("获å–费用支付明细", res); - if (res.returnCode == "0000") { - let content = res.content || {}; - this.payDataList = content; - } else { - this.$message.error(res.returnMsg); - } - }); - }, - //è´¦å•结算 - receiptEvt(){ - this.$modal.confirm({ - title: "结算", - content: "确定结算该账å•?", - okText: "确定", - cancelText: "å–æ¶ˆ", - onOk: () => { - this.$apis.RECEIPTSETTLEMENT({ - id: this.form.id - }).then((res) => { - if (res.returnCode === "0000") { - this.$message.success('结算æˆåŠŸ'); - this.pagination.pageNum = 1; - this._getChargeListDetail(); - }else{ - this.$message.error(res.returnMsg); - } - }); - }, - }); - }, - //æ‰“å° - printEvt(){ - this.$apis.RECEIPTPRINT({ - id: this.form.id - }).then(res => { - if(res.returnCode == '0000'){ - let url = res.content; - let link = document.createElement('a'); - link.setAttribute('href', url); - link.setAttribute('target', "_blank"); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - }else{ - this.$message.error(res.returnMsg); - } - }) - }, - // é‡ç½® - handlerReset() { - const { mrnNo, patientName } = this.form; - this.form = {mrnNo, patientName}; - }, - editEvt(record) { - this.editFormObj = { - id: record.id || "", - }; - this.dialogShow = true; - }, - //编辑ä¿å˜ - handleEditOK() { - this.$refs.editForm.validate((valid) => { - if (valid) { - console.log(11) - } - }); - }, - handlerSearch() { - this.pagination.pageNum = 1; - this.pageForm = this.$lodash.cloneDeep(this.form); - this._getChargeListDetail(); - }, - deleteData() { - this.$message.success("åˆ é™¤æˆåŠŸ"); - }, - // 新建账å•ä¿¡æ¯ - addNewCharge() { - // this.$router.push("/customer/edit"); - }, - }, -}; -</script> -<style lang="less" scoped> -.none-label { - text-align: right; - .ant-form-item-label { - opacity: 0; - } -} -.ant-btn .icon-class { - .mg-r(10); -} -.title-div { - line-height: 56px; - color: #252631; - font-weight: bold; - border-bottom: 1px solid #eee; -} -.payTable{ - .ant-btn{ - border-color: #1890ff; - color: #1890ff; - } -} -.btn-div{ - margin-top: 10px; - justify-content: flex-end; -} -.total{ - font-weight: 600; - span{ - color: red; - } -} -</style> +<template> + <!-- -è´¦å•æ˜Žç»† --> + <div class="white_bg burt-container custom-info"> + <Goback title="è´¦å•详情" /> + <a-form-model ref="form" layout="vertical" :model="form"> + <a-row :gutter="30"> + <a-col :xl="5" :lg="6" :sm="12"> + <a-form-model-item label="病历å·"> + <a-input v-model="form.mrnNo" placeholder="请输入病历å·" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :xl="5" :lg="6" :sm="12"> + <a-form-model-item label="客户姓å"> + <a-input v-model="form.patientName" placeholder="请输入客户姓å" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :xl="5" :lg="6" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸"> + <a-select v-model="form.payorId" placeholder="请选择ä¿é™©å…¬å¸" allowClear> + <a-select-option v-for="item in companyOptions" :key="item.corpCode" :value="item.id"> + {{ item.longName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="5" :lg="6" :sm="12"> + <a-form-model-item label="看诊医生"> + <a-select v-model="form.doctorCode" placeholder="请选择看诊医生" allowClear> + <a-select-option v-for="item in doctorOptions" :key="item.doctorCode" :value="item.doctorCode"> + {{ item.doctorDesc }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="5" :lg="6" :sm="12"> + <a-form-model-item label="收费时间"> + <a-date-picker value-format="YYYY-MM-DD 00:00:00" v-model="form.receiptDate" placeholder="就诊时间" /> + </a-form-model-item> + </a-col> + <a-col :xl="16" :lg="12" :sm="12" class="none-label"> + <a-form-model-item label="button"> + <!-- <a-button>æ›´æ–°æ•°æ®</a-button> + <a-button class="mar-left10" type="primary" @click="addNewCharge"> + <Icon name="ssiadd" :size="14" />新建预授æƒ</a-button> --> + <a-button class="mar-left10" type="primary" @click="handlerReset"> + <Icon name="ssireset" :size="14" />é‡ç½® + </a-button> + <a-button class="mar-left10" type="primary" @click="handlerSearch"> + <Icon name="ssisearch_active" :size="14" />查询 + </a-button> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + + <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"> + <template slot="operation" slot-scope="record"> + <a-button type="link" @click.stop="editEvt(record)">修改</a-button> + <a-popconfirm title="ä½ ç¡®å®šè¦å…³é—å—?" ok-text="确定" cancel-text="å–æ¶ˆ" @confirm="deleteData" > + <a-button type="link" class="danger">åˆ é™¤</a-button> + </a-popconfirm> + </template> + <template slot="footer"> + <div class="total">总计: <span>{{sumAmount||0}}</span></div> + </template> + </a-table> + <!--分页--> + <BurtPagination :pagination="pagination" @pageChange="_getChargeListDetail" /> + + <div class="title-div">费用支付明细</div> + <a-table :columns="payColumns" :data-source="payDataList" :scroll="{ x: true }" :pagination="false" class="payTable"> + <template slot="paymentType" slot-scope="text"> + <a-button class="danger">{{ text | payStyleFilters }}</a-button> + </template> + </a-table> + <a-row :gutter="30"> + <a-col :sm="24"> + <div class="btn-div flex"> + <a-button type="primary" @click="receiptEvt"> + <Icon name="ssibaocun" :size="14" />结算</a-button> + <a-button type="primary" class="mar-left10" @click="printEvt"> + <Icon name="ssidayinji_o" :size="14" />打å°</a-button> + </div> + </a-col> + </a-row> + + <a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false" + okText="确定" cancelText="å–æ¶ˆ" + @ok="handleEditOK" @cancel="dialogShow = false"> + <a-form-model ref="editForm" :model="editFormObj" :rules="editRules"> + <a-row :gutter="30"> + <a-col :lg="12" :xs="24"> + + </a-col> + </a-row> + </a-form-model> + </a-modal> + </div> +</template> + +<script> +import Goback from "@/components/CUSTOMER/goback"; +import BurtPagination from "@/components/CUSTOMER/pagation"; +import { mapState } from "vuex" +export default { + data() { + const columns = [ + { title: "项目", dataIndex: "itemcatDesc", width: 180 }, + { title: "项目明细", dataIndex: "itemDesc", width: 180}, + { title: "å•ä»·", dataIndex: "itemPrice", width: 120}, + { title: "æ•°é‡", dataIndex: "itemQty", width: 180 }, + { title: "å•ä½", dataIndex: "itemUnitDesc", width: 180 }, + { title: "金é¢", dataIndex: "chargeAmount", width: 180 }, + { title: "折扣(%)", dataIndex: "discountAmount", width: 180 }, + // { title: "折åŽé‡‘é¢", dataIndex: "actualAmount", width: 180 }, + { title: "å‡å…金é¢", dataIndex: "reduceAmount", width: 180 }, + { title: "实际金é¢", dataIndex: "paidAmount", width: 180 }, + // { title: "å…èµ”é¢", dataIndex: "deductible", width: 180 }, + // { title: "自付é¢", dataIndex: "selfPaid", width: 180 }, + // { title: "其他费用", dataIndex: "otherPaid", width: 180 }, + // { title: "ç†èµ”金é¢", dataIndex: "actualPaid", width: 180 }, + // { title: "æ“作", key: "operation", width: "175px", fixed: "right", scopedSlots: { customRender: "operation" },align: "center"}, + ]; + const payColumns = [ + { title: "å…èµ”é¢", dataIndex: "deductible", width: 180 }, + { title: "自付é¢", dataIndex: "selfPaid", width: 180 }, + { title: "其他费用", dataIndex: "otherPaid", width: 180 }, + { title: "个人支付", dataIndex: "personalPaid", width: 180 }, + { title: "ç†èµ”金é¢", dataIndex: "ciPaid", width: 180 }, + { title: "支付方å¼", dataIndex: "paymentType", width: 180, scopedSlots: { customRender: "paymentType" }}, + ]; + return { + dialogShow: false, + receiptNo: "", + columns, + payColumns, + form: {}, + pageForm: { + doctorCode: "", + patientName: "", + mrnNo: "", + paymentCode: "", + payorId: 0, + receiptDate: "" + }, + patientTypeOptions: [ + { + name: "商ä¿", + code: 1, + }, + ], //客户类型 + companyOptions: [], //ä¿é™©å…¬å¸ + doctorOptions: [], //就诊医生 + paymentOptions: [ + { + name: "商ä¿", + code: 1, + }, + ], //æ”¯ä»˜æ–¹å¼ + dataList: [], + pager: { + pageNum: 1, + pageSize: 10, + }, + payDataList: [], + pagination: { + pageNum: 1, + pageSize: 10, + total: 0, + }, + editFormObj: { + id: "", + mrnNo: '', + patientName: '', + }, + editRules: { + mrnNo: [{ required: true, message: "病历å·", trigger: "blur" }], + patientName: [{ required: true, message: "客户姓å", trigger: "blur" }], + }, + }; + }, + components: { + Goback, + BurtPagination, + }, + computed: { + ...mapState({ + userInfo: (state) => state.common.userInfo + }), + sumAmount() { + let total = 0 + this.dataList.forEach(item => { + total += Number(item.paidAmount || 0) + }) + return Number(total.toFixed(2)) + } + }, + filters: { + payStyleFilters(value) { + const styleMap = { + 1: "支付å®", + 2: "微信", + 3: "现金", + }; + return styleMap[value]; + }, + }, + created() { + const { receiptNo } = this.$route.query; + this.receiptNo = receiptNo || ""; + let chargeQueryDetail = localStorage.getItem('chargeQueryDetail'); + this.form = chargeQueryDetail? JSON.parse(chargeQueryDetail): {}; + console.log(this.form) + + this._getChargeListDetail(); + this._getCompanyOptions();//获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ + this._getDoctorListNoPage();//获å–看诊医生下拉选项 + this._getReceiptPaymentDetail(); //费用支付明细 + }, + methods: { + // 获å–åˆ—è¡¨æ•°æ® + _getChargeListDetail() { + const data = { + receiptNo: this.receiptNo, + basereceiptId: this.form.externalId, + ...this.pager, + }; + this.$apis.GETCHARGELISTDETAIL(data).then((res) => { + console.log("11111111111获å–tableä¿¡æ¯=", res); + if (res.returnCode == "0000") { + this.dataList = (res.content && res.content.list) || []; + // this.pager.total = (res.content && res.content.total) || 0; + } else { + this.$message.error(res.returnMsg); + } + }); + }, + // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ + _getCompanyOptions() { + this.$apis.GETCOMPANYOPTIONS().then((res) => { + console.log("获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹", res); + if (res.returnCode == "0000") { + let existPayor = false + this.companyOptions = res.content.map(item => { + item.id = Number(item.id) + if(item.id === this.form.payorId) { + existPayor = true + } + return item + }) || []; + if(!existPayor) { + this.companyOptions.push({ + id: this.form.payorId, + longName: this.form.payorName + }) + } + } else { + this.$message.error(res.returnMsg); + } + }); + }, + // 获å–看诊医生下拉选项 + _getDoctorListNoPage(){ + this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { + if (res.returnCode === "0000") { + this.doctorOptions = res.content || []; + }else{ + this.$message.success(res.returnMsg); + } + + }); + }, + // 获å–费用支付明细 + _getReceiptPaymentDetail() { + const params = { + receiptNo: this.receiptNo, + ...this.payPager, + }; + this.$apis.GETRECEIPTPAYMENTDETAIL(params).then((res) => { + console.log("获å–费用支付明细", res); + if (res.returnCode == "0000") { + let content = res.content || {}; + this.payDataList = content; + } else { + this.$message.error(res.returnMsg); + } + }); + }, + //è´¦å•结算 + receiptEvt(){ + this.$modal.confirm({ + title: "结算", + content: "确定结算该账å•?", + okText: "确定", + cancelText: "å–æ¶ˆ", + onOk: () => { + this.$apis.RECEIPTSETTLEMENT({ + id: this.form.id + }).then((res) => { + if (res.returnCode === "0000") { + this.$message.success('结算æˆåŠŸ'); + this.pagination.pageNum = 1; + this._getChargeListDetail(); + }else{ + this.$message.error(res.returnMsg); + } + }); + }, + }); + }, + //æ‰“å° + printEvt(){ + this.$apis.RECEIPTPRINT({ + id: this.form.id + }).then(res => { + if(res.returnCode == '0000'){ + let url = res.content; + let link = document.createElement('a'); + link.setAttribute('href', url); + link.setAttribute('target', "_blank"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }else{ + this.$message.error(res.returnMsg); + } + }) + }, + // é‡ç½® + handlerReset() { + const { mrnNo, patientName } = this.form; + this.form = {mrnNo, patientName}; + }, + editEvt(record) { + this.editFormObj = { + id: record.id || "", + }; + this.dialogShow = true; + }, + //编辑ä¿å˜ + handleEditOK() { + this.$refs.editForm.validate((valid) => { + if (valid) { + console.log(11) + } + }); + }, + handlerSearch() { + this.pagination.pageNum = 1; + this.pageForm = this.$lodash.cloneDeep(this.form); + this._getChargeListDetail(); + }, + deleteData() { + this.$message.success("åˆ é™¤æˆåŠŸ"); + }, + // 新建账å•ä¿¡æ¯ + addNewCharge() { + // this.$router.push("/customer/edit"); + }, + }, +}; +</script> +<style lang="less" scoped> +.none-label { + text-align: right; + .ant-form-item-label { + opacity: 0; + } +} +.ant-btn .icon-class { + .mg-r(10); +} +.title-div { + line-height: 56px; + color: #252631; + font-weight: bold; + border-bottom: 1px solid #eee; +} +.payTable{ + .ant-btn{ + border-color: #1890ff; + color: #1890ff; + } +} +.btn-div{ + margin-top: 10px; + justify-content: flex-end; +} +.total{ + font-weight: 600; + span{ + color: red; + } +} +</style> diff --git a/src/views/charge-query/index.vue b/src/views/charge-query/index.vue index 751fed111a246150ec81afeccd0421c5643dfd1c..98b5e168dd2042c17d89ed48e6ce137ef47c27fc 100644 --- a/src/views/charge-query/index.vue +++ b/src/views/charge-query/index.vue @@ -1,323 +1,317 @@ -<template> - <!-- 收费查询-è´¦å•æŸ¥è¯¢ --> - <div class="white_bg burt-container custom-info"> - <!-- form --> - <a-form-model ref="form" layout="vertical" :model="form"> - <a-row :gutter="30"> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="病历å·"> - <a-input v-model="form.mrnNo" placeholder="请输入病历å·" allow-clear /> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="客户姓å"> - <a-input v-model="form.patientName" placeholder="请输入客户姓å" allow-clear /> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="客户类型"> - <a-select v-model="form.patientType" placeholder="请选择客户类型" allowClear> - <a-select-option v-for="item in patientTypeOptions" :key="item.code" :value="item.code"> - {{ item.name }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="ä¿é™©å…¬å¸"> - <a-select v-model="form.payorId" placeholder="请选择ä¿é™©å…¬å¸" allowClear> - <a-select-option v-for="item in companyOptions" :key="item.corpCode" :value="item.id"> - {{ item.longName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="4" :lg="6" :sm="12"> - <a-form-model-item label="看诊医生"> - <a-select v-model="form.doctorCode" placeholder="请选择看诊医生" allowClear> - <a-select-option v-for="item in doctorOptions" :key="item.doctorCode" :value="item.doctorCode"> - {{ item.doctorDesc }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="5" :lg="6" :sm="12"> - <a-form-model-item label="就诊时间"> - <a-range-picker format="YYYY-MM-DD" v-model="form.dateRange" :placeholder="['开始时间','ç»“æŸæ—¶é—´']" @change="onSelectVisitTime" /> - </a-form-model-item> - </a-col> - <a-col :xl="3" :lg="6" :sm="12"> - <a-form-model-item label="支付方å¼"> - <a-select v-model="form.paymentCode" placeholder="请选择支付方å¼" allowClear> - <a-select-option v-for="item in paymentOptions" :key="item.code" :value="item.code" allow-clear> - {{ item.name }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="3" :lg="6" :sm="12"> - <a-form-model-item label="是å¦å·²å…³è”寄é€å•"> - <a-select v-model="form.isSend" placeholder="请选择是å¦å·²å…³è”寄é€å•" allowClear> - <a-select-option value="Y" allow-clear> - 是 - </a-select-option> - <a-select-option value="N" allow-clear> - å¦ - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="3" :lg="6" :sm="12"> - <a-form-model-item label="是å¦å·²å…³è”EOB"> - <a-select v-model="form.isEob" placeholder="请选择是å¦å·²å…³è”EOB" allowClear> - <a-select-option value="Y" allow-clear> - 是 - </a-select-option> - <a-select-option value="N" allow-clear> - å¦ - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="3" :lg="6" :sm="12"> - <a-form-model-item label="是å¦å·²å›žæ¬¾"> - <a-select v-model="form.isEobBack" placeholder="请选择是å¦å·²å›žæ¬¾" allowClear> - <a-select-option value="Y" allow-clear> - 是 - </a-select-option> - <a-select-option value="N" allow-clear> - å¦ - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :xl="6" :lg="3" :sm="3" class="none-label"> - <a-form-model-item label="button"> - <!-- <a-button>æ›´æ–°æ•°æ®</a-button> --> - <!-- <a-button class="mar-left10" type="primary" @click="addNewCharge"> - <Icon name="ssiadd" :size="14" />新建预授æƒ</a-button> --> - <a-button class="mar-left10" type="primary" @click="handlerReset"> - <Icon name="ssireset" :size="14" />é‡ç½® - </a-button> - <a-button class="mar-left10" type="primary" @click="handlerSearch"> - <Icon name="ssisearch_active" :size="14" />查询 - </a-button> - <a-button class="mar-left10" type="primary" @click="exportExcel"> - <Icon name="ssidaochu" :size="14" />导出 - </a-button> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - - <!-- table --> - <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"> - <template slot="index" slot-scope="text, record, index"> - {{ index + 1 }} - </template> - <template slot="operation" slot-scope="record"> - <!-- <a-button type="link" @click.stop="receiptEvt(record)">结算</a-button> --> - <a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button> - <!-- <a-popconfirm title="ä½ ç¡®å®šè¦å…³é—å—?" ok-text="确定" cancel-text="å–æ¶ˆ" @confirm="deleteData" > - <a-button type="link" class="danger">åˆ é™¤</a-button> - </a-popconfirm> --> - </template> - <template slot="isSend" slot-scope="text"> - {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} - </template> - <template slot="isEob" slot-scope="text"> - {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} - </template> - <template slot="isEobBack" slot-scope="text"> - {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} - </template> - </a-table> - <!--分页--> - <BurtPagination :pagination="pagination" @pageChange="_getChargeList" /> - </div> -</template> - -<script> -import BurtPagination from "@/components/CUSTOMER/pagation"; -import { mapState } from "vuex" -import moment from "moment"; -import { exportFile } from '@/utils/index'; -export default { - data() { - const columns = [ - { title: "åºå·", dataIndex: "index", key:"index",align:'center', width: 80,scopedSlots: { customRender: "index" }}, - { title: "就诊时间", dataIndex: "receiptDate", width: 180 }, - { title: "病历å·", dataIndex: "mrnNo",width: 180}, - { title: "客户姓å",dataIndex: "patientName",width: 120,}, - { title: "客户类型", dataIndex: "patientType", width: 180 }, - { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", width: 200 }, - { title: "就诊医生", dataIndex: "doctorName", width: 150 }, - { title: "是å¦å·²å…³è”寄é€å•", dataIndex: "isSend", width: 180,scopedSlots: { customRender: "isSend" } }, - { title: "是å¦å·²å…³è”EOB", dataIndex: "isEob", width: 180,scopedSlots: { customRender: "isEob" } }, - { title: "是å¦å·²å›žæ¬¾", dataIndex: "isEobBack", width: 180,scopedSlots: { customRender: "isEobBack" } }, - { title: "è´¦å•金é¢", dataIndex: "chargeAmount", width: 180 }, - { title: "折扣(%)", dataIndex: "discountAmount", width: 180 }, - { title: "折åŽé‡‘é¢", dataIndex: "actualAmount", width: 180 }, - { title: "客户自付", dataIndex: "selfpaidAmount", width: 180 }, - { title: "å‡å…金é¢", dataIndex: "reduceAmount1", width: 180 }, - { title: "ç†èµ”金é¢", dataIndex: "claimsAmount", width: 180 }, - { title: "ä¿é™©å·²æ”¯ä»˜", dataIndex: "insurancePaidAmount", width: 180 }, - { title: "未清余é¢", dataIndex: "outstandAmount", width: 180 }, - { title: "ä¿é™©æ¬ è´¹", dataIndex: "insuranceArrearsAmount", width: 180 }, - { title: "ä¸ªäººæ¬ è´¹", dataIndex: "personalArrearsAmount", width: 180 }, - { title: "å‘票å·ç ", dataIndex: "receiptNo", width: 180 }, - { title: "æ“作", key: "operation", width: "175px",fixed: "right",scopedSlots: { customRender: "operation" }, align: "center"}, - ]; - return { - columns, - form: {}, - pageForm: { - doctorCode: "", - patientName: "", - mrnNo: "", - paymentCode: "", - payorId: 0, - visitTimeEnd: "", - visitTimeStart: "", - }, - patientTypeOptions: [ - { - name: "商ä¿", - code: 1, - }, - ], //客户类型 - companyOptions: [], //ä¿é™©å…¬å¸ - doctorOptions: [], //就诊医生 - paymentOptions: [ - { - name: "商ä¿", - code: 1, - }, - ], //æ”¯ä»˜æ–¹å¼ - dataList: [], - pagination: { - pageNum: 1, - pageSize: 10, - total: 0, - }, - }; - }, - components: { - BurtPagination, - }, - computed: { - ...mapState({ - userInfo: (state) => state.common.userInfo - }) - }, - created() { - this._getCompanyOptions(); - this._getDoctorListNoPage();//获å–医生下拉选项 - }, - methods: { - moment, - // 获å–åˆ—è¡¨æ•°æ® - _getChargeList() { - const data = { - ...this.pageForm, - ...this.pagination, - }; - this.$apis.GETCHARGELIST(data).then((res) => { - let content = res.content || {}; - this.dataList = content.list || []; - this.pagination.total = content.total || 0; - }); - }, - // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ - _getCompanyOptions() { - this.$apis.GETCOMPANYOPTIONS().then((res) => { - this.companyOptions = res.content || []; - }); - }, - // 获å–看诊医生下拉选项 - _getDoctorListNoPage(){ - this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { - if (res.returnCode === "0000") { - this.doctorOptions = res.content || []; - }else{ - this.$message.success(res.returnMsg); - } - }); - }, - // 选ä¸å°±è¯Šæ—¶é—´ - onSelectVisitTime(date, dateString) { - this.form.visitTimeStart = dateString[0] + ' 00:00:00' - this.form.visitTimeEnd = dateString[1] + ' 23:59:59' - console.log(date, dateString); - }, - // é‡ç½® - handlerReset() { - this.form = {} - }, - //查看 - detailEvt(record) { - localStorage.setItem('chargeQueryDetail', JSON.stringify(record)); - const { receiptNo } = record; - this.$router.push({ - name: "chargeQueryDetail", - query: { receiptNo }, - }); - }, - //è´¦å•结算 - receiptEvt(record){ - this.$modal.confirm({ - title: "结算", - content: "确定结算该账å•?", - okText: "确定", - cancelText: "å–æ¶ˆ", - onOk: () => { - this.$apis.RECEIPTSETTLEMENT({ - id: record.id - }).then((res) => { - if (res.returnCode === "0000") { - this.$message.success('结算æˆåŠŸ'); - this._getChargeList(); - }else{ - this.$message.error(res.returnMsg); - } - }); - }, - }); - }, - handlerSearch() { - this.$refs.form.validate((valid) => { - if (!valid) { - return false; - } - this.pagination.pageNum = 1; - this.pageForm = this.$lodash.cloneDeep({...this.form, dateRange: undefined}); - this._getChargeList(); - }); - }, - // 新建账å•ä¿¡æ¯ - addNewCharge() { - // this.$router.push("/customer/edit"); - }, - //导出报表 - exportExcel(){ - let filter = { - ...this.form, - } - this.$apis.RceiptListReport(filter).then(res => { - exportFile(res, 'è´¦å•æŠ¥è¡¨.xls'); - }) - } - }, -}; -</script> -<style lang="less" scoped> -.none-label { - text-align: right; - .ant-form-item-label { - opacity: 0; - } -} -.ant-btn .icon-class { - .mg-r(10); -} -</style> +<template> + <!-- 收费查询-è´¦å•æŸ¥è¯¢ --> + <div class="white_bg burt-container custom-info"> + <!-- form --> + <a-form-model ref="form" layout="vertical" :model="form"> + <a-row :gutter="30"> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="病历å·"> + <a-input v-model="form.mrnNo" placeholder="请输入病历å·" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="客户姓å"> + <a-input v-model="form.patientName" placeholder="请输入客户姓å" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸"> + <a-select v-model="form.payorId" placeholder="请选择ä¿é™©å…¬å¸" allowClear> + <a-select-option v-for="item in companyOptions" :key="item.corpCode" :value="item.id"> + {{ item.longName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="看诊医生"> + <a-select v-model="form.doctorCode" placeholder="请选择看诊医生" allowClear> + <a-select-option v-for="item in doctorOptions" :key="item.doctorCode" :value="item.doctorCode"> + {{ item.doctorDesc }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="收费时间"> + <a-range-picker format="YYYY-MM-DD" v-model="form.dateRange" :placeholder="['开始时间','ç»“æŸæ—¶é—´']" @change="onSelectVisitTime" /> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="是å¦å·²å…³è”寄é€å•"> + <a-select v-model="form.isSend" placeholder="请选择是å¦å·²å…³è”寄é€å•" allowClear> + <a-select-option value="Y" allow-clear> + 是 + </a-select-option> + <a-select-option value="N" allow-clear> + å¦ + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="是å¦å·²å›žæ¬¾"> + <a-select v-model="form.isEobBack" placeholder="请选择是å¦å·²å›žæ¬¾" allowClear> + <a-select-option value="Y" allow-clear> + 是 + </a-select-option> + <a-select-option value="N" allow-clear> + å¦ + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="è´¦å•类型"> + <a-select v-model="form.receiptType" placeholder="请选择账å•类型" allowClear> + <a-select-option v-for="item in receiptTypeOptions" :key="item.value" :value="item.value"> + {{ item.name }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :xl="6" :lg="6" :sm="12"> + <a-form-model-item label="è´¦å•ç¼–å·"> + <a-input v-model="form.receiptNo" placeholder="请输入账å•ç¼–å·" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :xl="8" :lg="3" :sm="3" class="none-label"> + <a-form-model-item label="button"> + <!-- <a-button>æ›´æ–°æ•°æ®</a-button> --> + <!-- <a-button class="mar-left10" type="primary" @click="addNewCharge"> + <Icon name="ssiadd" :size="14" />新建预授æƒ</a-button> --> + <a-button class="mar-left10" type="primary" @click="handlerReset"> + <Icon name="ssireset" :size="14" />é‡ç½® + </a-button> + <a-button class="mar-left10" type="primary" @click="handlerSearch"> + <Icon name="ssisearch_active" :size="14" />查询 + </a-button> + <a-button class="mar-left10" type="primary" @click="exportExcel"> + <Icon name="ssidaochu" :size="14" />导出 + </a-button> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + + <!-- table --> + <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"> + <template slot="index" slot-scope="text, record, index"> + {{ index + 1 }} + </template> + <template slot="operation" slot-scope="record"> + <!-- <a-button type="link" @click.stop="receiptEvt(record)">结算</a-button> --> + <a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button> + <!-- <a-popconfirm title="ä½ ç¡®å®šè¦å…³é—å—?" ok-text="确定" cancel-text="å–æ¶ˆ" @confirm="deleteData" > + <a-button type="link" class="danger">åˆ é™¤</a-button> + </a-popconfirm> --> + </template> + <template slot="isSend" slot-scope="text"> + {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} + </template> + <template slot="isEob" slot-scope="text"> + {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} + </template> + <template slot="isEobBack" slot-scope="text"> + {{text == 'Y' ? '是' : text == 'N' ? 'å¦' : ''}} + </template> + </a-table> + <!--分页--> + <BurtPagination :pagination="pagination" @pageChange="_getChargeList" /> + </div> +</template> + +<script> +import BurtPagination from "@/components/CUSTOMER/pagation"; +import { mapState } from "vuex" +import moment from "moment"; +import { receiptTypeOptions } from '@/utils/utilsdictOptions.js'; +import { exportFile } from '@/utils/index'; +export default { + data() { + const columns = [ + { title: "åºå·", dataIndex: "index", key:"index",align:'center', width: 80,scopedSlots: { customRender: "index" }}, + { title: "收费时间", dataIndex: "receiptDate", width: 180 }, + { title: "è´¦å•ç¼–å·", dataIndex: "receiptNo", width: 180 }, + { title: "è´¦å•类型", dataIndex: "receiptTypeStr", width: 130 }, + { title: "病历å·", dataIndex: "mrnNo",width: 180}, + { title: "客户姓å",dataIndex: "patientName",width: 120,}, + { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", width: 200 }, + { title: "就诊医生", dataIndex: "doctorName", width: 150 }, + { title: "是å¦å·²å…³è”寄é€å•", dataIndex: "isSend", width: 180,scopedSlots: { customRender: "isSend" } }, + { title: "是å¦å·²å›žæ¬¾", dataIndex: "isEobBack", width: 180,scopedSlots: { customRender: "isEobBack" } }, + { title: "应收金é¢", dataIndex: "chargeAmount", width: 180 }, + { title: "折扣(%)", dataIndex: "discountAmount", width: 180 }, + { title: "å‡å…金é¢", dataIndex: "reduceAmount", width: 180 }, + { title: "应付金é¢", dataIndex: "payableAmount", width: 180 }, + { title: "客户自付", dataIndex: "selfpaidAmount", width: 180 }, + { title: "ç†èµ”金é¢", dataIndex: "actualAmount", width: 180 }, + { title: "ä¿é™©å·²æ”¯ä»˜", dataIndex: "backAmount", width: 180 }, + { title: "ä¿é™©æ¬ è´¹", dataIndex: "insuranceArrearsAmount", width: 180 }, + { title: "ä¸ªäººæ¬ è´¹", dataIndex: "arrearsAmount", width: 180 }, + { title: "未清余é¢", dataIndex: "residueBackAmount", width: 180 }, + { title: "æ“作", key: "operation", width: "175px",fixed: "right",scopedSlots: { customRender: "operation" }, align: "center"}, + ]; + return { + columns, + receiptTypeOptions, + form: {}, + pageForm: { + doctorCode: "", + patientName: "", + mrnNo: "", + paymentCode: "", + payorId: 0, + visitTimeEnd: "", + visitTimeStart: "", + receiptType: "", + receiptNo: "" + }, + patientTypeOptions: [ + { + name: "商ä¿", + code: 1, + }, + ], //客户类型 + companyOptions: [], //ä¿é™©å…¬å¸ + doctorOptions: [], //就诊医生 + paymentOptions: [ + { + name: "商ä¿", + code: 1, + }, + ], //æ”¯ä»˜æ–¹å¼ + dataList: [], + pagination: { + pageNum: 1, + pageSize: 10, + total: 0, + }, + receiptTypeDict: { + '1': 'æ”¶è´¹', + '2': '退费' + } + }; + }, + components: { + BurtPagination, + }, + computed: { + ...mapState({ + userInfo: (state) => state.common.userInfo + }) + }, + created() { + this._getCompanyOptions(); + this._getDoctorListNoPage();//获å–医生下拉选项 + }, + methods: { + moment, + // 获å–åˆ—è¡¨æ•°æ® + _getChargeList() { + const data = { + ...this.pageForm, + ...this.pagination, + }; + this.$apis.GETCHARGELIST(data).then((res) => { + let content = res.content || {}; + this.dataList = content.list.map(item => { + item.receiptTypeStr = this.receiptTypeDict[item.receiptType] || '' + return item + }) || []; + this.pagination.total = content.total || 0; + }); + }, + // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ + _getCompanyOptions() { + this.$apis.GETCOMPANYOPTIONS().then((res) => { + this.companyOptions = res.content || []; + }); + }, + // 获å–看诊医生下拉选项 + _getDoctorListNoPage(){ + this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { + if (res.returnCode === "0000") { + this.doctorOptions = res.content || []; + }else{ + this.$message.success(res.returnMsg); + } + }); + }, + // 选ä¸å°±è¯Šæ—¶é—´ + onSelectVisitTime(date, dateString) { + this.form.visitTimeStart = dateString[0] + ' 00:00:00' + this.form.visitTimeEnd = dateString[1] + ' 23:59:59' + console.log(date, dateString); + }, + // é‡ç½® + handlerReset() { + this.form = {} + }, + //查看 + detailEvt(record) { + localStorage.setItem('chargeQueryDetail', JSON.stringify(record)); + const { receiptNo } = record; + this.$router.push({ + name: "chargeQueryDetail", + query: { receiptNo }, + }); + }, + //è´¦å•结算 + receiptEvt(record){ + this.$modal.confirm({ + title: "结算", + content: "确定结算该账å•?", + okText: "确定", + cancelText: "å–æ¶ˆ", + onOk: () => { + this.$apis.RECEIPTSETTLEMENT({ + id: record.id + }).then((res) => { + if (res.returnCode === "0000") { + this.$message.success('结算æˆåŠŸ'); + this._getChargeList(); + }else{ + this.$message.error(res.returnMsg); + } + }); + }, + }); + }, + handlerSearch() { + this.$refs.form.validate((valid) => { + if (!valid) { + return false; + } + this.pagination.pageNum = 1; + this.pageForm = this.$lodash.cloneDeep({...this.form, dateRange: undefined}); + this._getChargeList(); + }); + }, + // 新建账å•ä¿¡æ¯ + addNewCharge() { + // this.$router.push("/customer/edit"); + }, + //导出报表 + exportExcel(){ + let filter = { + ...this.form, + } + this.$apis.RceiptListReport(filter).then(res => { + exportFile(res, 'è´¦å•æŠ¥è¡¨.xls'); + }) + } + }, +}; +</script> +<style lang="less" scoped> +.none-label { + text-align: right; + .ant-form-item-label { + opacity: 0; + } +} +.ant-btn .icon-class { + .mg-r(10); +} +</style> diff --git a/src/views/charge-query/lpjManageDetail.vue b/src/views/charge-query/lpjManageDetail.vue index ded7f955801297277d588ed0585d0065a2c61257..e8259172a12618ad12a976d5748dc957be538790 100644 --- a/src/views/charge-query/lpjManageDetail.vue +++ b/src/views/charge-query/lpjManageDetail.vue @@ -1,559 +1,557 @@ -<template> - <!-- 收费查询-è´¦å•æŸ¥è¯¢ --> - <div class="white_bg burt-container custom-info"> - <Goback title="ç†èµ”件详情" /> - <!-- form --> - <a-form-model ref="form" layout="vertical" :model="form"> - <a-row :gutter="30"> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="ä¿é™©å…¬å¸"> - <a-select v-model="form.payorCode" placeholder="请选择ä¿é™©å…¬å¸" allow-clear :disabled="!isEdit"> - <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> - {{ item.longName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="寄é€çжæ€"> - <a-select v-model="form.sendSts" placeholder="请选择寄é€çжæ€" allow-clear :disabled="!isEdit"> - <a-select-option value="1">已寄é€</a-select-option> - <a-select-option value="2">未寄é€</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="快递公å¸"> - <a-select v-model="form.sendCompany" placeholder="请选择快递公å¸" showSearch allow-clear :disabled="!isEdit"> - <a-select-option v-for="(item) in expressList" :key="item.id" :value="item.descCh">{{item.descCh}}</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="快递å•å·"> - <a-input v-model="form.trackingNo" placeholder="请输入快递å•å·" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="坄逿–¹å¼"> - <a-select v-model="form.sendMode" placeholder="è¯·é€‰æ‹©å¯„é€æ–¹å¼" allow-clear :disabled="!isEdit"> - <a-select-option value="快递">快递</a-select-option> - <a-select-option value="邮件">邮件</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="坄逿—¥æœŸ"> - <a-date-picker format="YYYYå¹´MM月DDæ—¥" v-model="form.sendDate" placeholder="选择日期" /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="寄é€åœ°å€"> - <a-input v-model="form.sendAddress" placeholder="请输入寄é€åœ°å€" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="寄é€é‚®ç®±"> - <a-input v-model="form.sendEmail" placeholder="请输入寄é€é‚®ç®±" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="寄é€å¤‡æ³¨"> - <a-textarea v-model="form.sendRemark" placeholder="请输入寄é€å¤‡æ³¨" :auto-size="{ minRows: 2, maxRows: 5 }" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :sm="24" class="none-label" v-if="isEdit"> - <div class="btn-div flex"> - <span></span> - <a-form-model-item label="button"> - <a-button class="mar-left10" type="primary" @click="addNewCharge"> - <Icon :name="sendBatchNo?'ssibaocun':'ssiadd'" :size="14" />{{sendBatchNo?'ä¿å˜å¯„é€':'新建寄é€'}}</a-button> - </a-form-model-item> - </div> - </a-col> - </a-row> - </a-form-model> - <a-form-model ref="form" layout="vertical" :model="searchForm"> - <a-row :gutter="30"> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="就诊日期"> - <a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.visitTimeStart" :placeholder="['选择就诊开始日期', 'é€‰æ‹©å°±è¯Šç»“æŸæ—¥æœŸ']" /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="病历å·"> - <a-input v-model="searchForm.mrnNo" placeholder="请输入病历å·" allow-clear /> - </a-form-model-item> - </a-col> - <a-col :lg="8" :sm="12"> - <a-form-model-item label="客户åç§°"> - <a-input v-model="searchForm.patientName" placeholder="请输入客户åç§°" allow-clear /> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="30"> - <a-col :sm="24" class="none-label"> - <div class="btn-div flex"> - <span></span> - <a-form-model-item label="button"> - <a-button type="primary" @click="handlerSearch"> - <Icon name="ssisearch_active" :size="14" />查询 - </a-button> - <a-button class="mar-left10" type="primary" @click="exportEvt"> - <Icon name="ssidaochu" :size="14" />导出 - </a-button> - <a-button class="mar-left10" type="primary" @click="addNewBill" v-if="isEdit"> - <Icon :name="isEditNewBill?'ssibaocun':'ssiadd'" :size="14" />{{isEditNewBill? 'ä¿å˜è´¦å•': 'æ·»åŠ è´¦å•'}}</a-button> - </a-form-model-item> - </div> - </a-col> - </a-row> - </a-form-model> - - <!-- table --> - <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" - :row-selection="isEditNewBill? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }: null"> - <template slot="sendDate" slot-scope="text"> - {{ text? moment(text).format('YYYY-MM-DD'): '' }} - </template> - <template slot="sendSts" slot-scope="text"> - {{ text==1?'已寄é€':'未寄é€' }} - </template> - <template slot="operation" slot-scope="text, record"> - <!-- <a-button type="link" @click.stop="editEvt(record)">修改</a-button> --> - <a-button type="link" class="danger" @click.stop="delRecord(record)">åˆ é™¤</a-button> - </template> - </a-table> - <!--分页--> - <BurtPagination :pagination="pagination" @pageChange="getPageData" /> - - <a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false" - okText="确定" cancelText="å–æ¶ˆ" - @ok="handleEditOK" @cancel="dialogShow = false"> - <a-form-model ref="editForm" :model="editFormObj" :rules="editRules"> - <a-row :gutter="30"> - <a-col :lg="12" :xs="24"> - <a-form-model-item label="ä¿é™©å…¬å¸" prop="payorCode"> - <a-select v-model="editFormObj.payorCode" placeholder="请选择ä¿é™©å…¬å¸" allowClear> - <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> - {{ item.longName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="12" :sm="24"> - <a-form-model-item label="寄é€çжæ€" prop="sendSts"> - <a-select v-model="editFormObj.sendSts" placeholder="请选择寄é€çжæ€" allowClear> - <a-select-option :value="1">已寄é€</a-select-option> - <a-select-option :value="2">未寄é€</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="12" :sm="24"> - <a-form-model-item label="坄逿—¥æœŸ" prop="sendDate"> - <a-date-picker format="YYYYå¹´MM月DDæ—¥" v-model="editFormObj.sendDate" placeholder="选择日期" /> - </a-form-model-item> - </a-col> - <a-col :lg="12" :xs="24"> - <a-form-model-item label="快递å•å·" prop="trackingNo"> - <a-input v-model.trim="editFormObj.trackingNo" placeholder="快递å•å·" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="30"> - <a-col :lg="12" :xs="24"> - <a-form-model-item label="寄é€å¤‡æ³¨" prop="sendRemark"> - <a-textarea v-model.trim="editFormObj.sendRemark" placeholder="寄é€å¤‡æ³¨" /> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-modal> - </div> -</template> - -<script> -import Goback from "@/components/CUSTOMER/goback"; -import BurtPagination from "@/components/CUSTOMER/pagation"; -import moment from 'moment' -import { numValid } from "@/utils/index" - -export default { - data() { - return { - loading: false, - dialogShow: false, - isEdit: false, - sendBatchNo: '', //坄逿‰¹å· - form: { - payorCode: '', - sendSts: '', - sendMode: '', - sendDate: '', - sendCompany: '', - trackingNo: '', - sendAddress: '', - sendEmail: '', - sendRemark: '' - }, - searchForm: {}, - searchData: {}, - companyOptions: [], //ä¿é™©å…¬å¸ - expressList: [], //快递列表 - selectedRowKeys: [], // Check here to configure the default column - dataList: [], - cacheDataList: {}, - isEditNewBill: false, //是å¦åœ¨æ–°å»ºè´¦å• - pagination: { - pageNum: 1, - pageSize: 100, - total: 0, - }, - editFormObj: { - payorCode: '', - sendSts: '', - sendDate: '', - trackingNo: '', - sendRemark: '', - }, - editRules: { - sendDate: [{ required: true, message: "è¯·é€‰æ‹©å¯„é€æ—¥æœŸ", trigger: "change" }], - trackingNo: [{ required: true, message: "请输入寄é€å•å·", trigger: "blur" }], - }, - }; - }, - components: { - Goback, - BurtPagination, - }, - computed: { - columns() { - const base = [ - { title: "就诊日期", dataIndex: "receiptDate", width: 160,scopedSlots: { customRender: "receiptDate" } }, - { title: "病历å·", dataIndex: "mrnNo", key:"mrnNo",align:'center', width: 136}, - { title: "客户姓å", dataIndex: "patientName", width: 160 }, - { title: "ä¿é™©å¡å·", dataIndex: "memberCardNo", width: 180 }, - { title: "客户生日", dataIndex: "birthday", width: 160 }, - { title: "è´¦å•ç¼–å·", dataIndex: "receiptNo", key:"receiptNo",align:'center', width: 136}, - { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", ellipsis: true, width: 250 }, - { title: "应收金é¢", dataIndex: "chargeAmount", width: 100, align: 'center' }, - { title: "折扣金é¢", dataIndex: "discountAmount", width: 100, align: 'center' }, - { title: "å‡å…金é¢", dataIndex: "discountAmount2", width: 100, align: 'center' }, - { title: "客户自付", dataIndex: "selfpaidAmount", width: 100, align: 'center', customRender: (val, row) => { - return <a-input v-model={row.selfpaidAmount} allow-clear /> - } }, - { title: "ç†èµ”金é¢", dataIndex: "paidAmount", width: 100, align: 'center' }, - ]; - if(this.sendBatchNo && ! this.isEditNewBill && this.isEdit){ // 编辑状æ€ä¸‹å·²ç»ä¿å˜çš„æ•°æ®æ‰å¯è¿›è¡Œæ“作 - return base.concat([ - { title: "æ“作", key: "operation", width: "100px",fixed: "right",scopedSlots: { customRender: "operation" }}, - ]); - } - return base - - } - }, - created() { - const { sendBatchNo, isEdit } = this.$route.query; - this.sendBatchNo = sendBatchNo; - this.isEdit = isEdit; - this._getCompanyOptions(); - this.getRefcdByRefgrp(); - if(this.sendBatchNo){ - let jisongDataDetail = localStorage.getItem('jisongDataDetail'); - this.form = jisongDataDetail? JSON.parse(jisongDataDetail): {}; - this.getData(); - } - }, - methods: { - moment, - onSelectChange(selectedRowKeys) { - let arr = []; - for(let i=0; i<selectedRowKeys.length; i++){ - let idx = selectedRowKeys[i]; - if(this.dataList[idx].sendBatchNo){ - this.$msg.destroy(); - this.$message.warning('坄逿‰¹å·å·²å˜åœ¨') - }else{ - arr.push(idx); - } - } - this.selectedRowKeys = arr; - }, - // 分页回调 - getPageData(pager) { - if(pager){ - this.pagination = { - ...this.pagination, - ...pager - } - } - if(this.isEditNewBill) { // æ–°å¢žæ—¶æ·»åŠ äº†è´¦å•ä¿¡æ¯ é‚£åˆ†é¡µä¹Ÿåº”è¯¥æ˜¯è°ƒè´¦å•ä¿¡æ¯æŽ¥å£ - this._getNewBillList() - } else { - this.getData() - } - }, - // 获å–åˆ—è¡¨æ•°æ® - getData() { - this.selectedRowKeys = []; - let filter = { - pageNum: this.pagination.pageNum, - pageSize: this.pagination.pageSize, - sendBatchNo: this.sendBatchNo || undefined, - ...this.searchData - } - this.$apis.QUERYSENDRECEIPLIST(filter) - .then((res) => { - if (res.returnCode == "0000") { - let content = res.content || {}; - this.pagination.total = content.total || 0; - this.dataList = content.list || []; - this.cacheDataList[filter.pageNum] = this.dataList - } else { - this.$message.error(res.returnMsg); - } - }); - }, - // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ - _getCompanyOptions() { - this.$apis.GETCOMPANYOPTIONS().then((res) => { - this.companyOptions = res.content || []; - }); - }, - // 获å–快递列表 - getRefcdByRefgrp() { - this.$apis.GETREFCDBYREFGRP({ - modid: "CI", - refgrp: "SEND_COMPANY" - }).then((res) => { - this.expressList = res.content || []; - }); - }, - //查看 - detailEvt(record) { - const { receiptNo } = record; - this.$router.push({ - name: "chargeQueryDetail", - query: { receiptNo }, - }); - }, - editEvt(record) { - this.editFormObj = { - ciReceiptSendVos: [ - { - id: record.id, - receiptNo: record.receiptNo, - } - ], - payorCode: record.payorCode || "", - sendSts: Number(record.sendSts) || "", - sendDate: record.sendDate || "", - trackingNo: record.trackingNo || "", - sendRemark: record.sendRemark || "", - }; - this.dialogShow = true; - }, - //编辑ä¿å˜ - handleEditOK() { - this.$refs.editForm.validate((valid) => { - if (valid) { - this.$apis.SAVERECEIPSENDINFO({ - ...this.editFormObj, - sendDate: moment(this.editFormObj.sendDate).format('YYYY-MM-DD 00:00:00') - }) - .then((res) => { - if (res.returnCode == "0000") { - this.$message.success("编辑æˆåŠŸ"); - this.dialogShow = false; - this.getData(); - } else { - this.$message.error(res.returnMsg); - } - }); - } - }); - }, - handlerSearch() { - this.pagination.pageNum = 1; - let visitTimeStart = this.searchForm.visitTimeStart || [] - this.searchData = this.$lodash.cloneDeep({ - ...this.searchForm, - visitTimeEnd: visitTimeStart[1] ? visitTimeStart[1] + ' 23:59:59' : undefined, - visitTimeStart: visitTimeStart[0] ? visitTimeStart[0] + ' 00:00:00' : undefined, - }); - if(this.isEditNewBill) { // æ–°å¢žæ—¶æ·»åŠ äº†è´¦å•ä¿¡æ¯ é‚£åˆ†é¡µä¹Ÿåº”è¯¥æ˜¯è°ƒè´¦å•ä¿¡æ¯æŽ¥å£ - this._getNewBillList() - } else { - this.getData() - } - }, - //åˆ é™¤ - delRecord(data) { - this.$modal.confirm({ - title: "åˆ é™¤", - content: "ç¡®å®šåˆ é™¤è¯¥æ¡è®°å½•?", - okText: "确定", - cancelText: "å–æ¶ˆ", - onOk: () => { - this.$apis.DELETESENDRECEIPT({ - ciReceiptSendVos: [ - {receiptNo: data.receiptNo} - ], - sendBatchNo: this.sendBatchNo, - }) - .then((res) => { - if (res.returnCode == "0000") { - this.$message.success("åˆ é™¤æˆåŠŸ"); - this.getData() - // this.dataList.splice(index, 1); - } else { - this.$message.error(res.returnMsg); - } - }); - }, - }); - }, - //导出 - exportEvt(){ - this.$apis.SENDRECEIPTLISTEXPORT({ - sendBatchNo: this.sendBatchNo || undefined - }) - .then(res => { - let blob = new Blob([res.data], { - type:"application/vnd.ms-excel;charset=utf-8" - }); - let url=window.URL.createObjectURL(blob); - let aLink=document.createElement("a"); - aLink.style.display="none"; - aLink.href=url; - aLink.setAttribute("download","寄é€è´¦å•.xls"); - document.body.appendChild(aLink); - aLink.click(); - document.body.removeChild(aLink); - window.URL.revokeObjectURL(url); - }) - }, - //æ·»åŠ è´¦å• - addNewBill(){ - // this.isEditNewBill = !this.isEditNewBill; - if(this.isEditNewBill){ //ä¿å˜ - this.addNewCharge() - .then(()=>{ - this.isEditNewBill = false; - }) - }else{ //æŸ¥è¯¢æ‰€æœ‰æœªåŠ å…¥çš„è´¦å• - this.pagination.pageNum = 1; - this.isEditNewBill = true; - this.cacheDataList = {} - this._getNewBillList() - } - }, - _getNewBillList() { - this.$apis.QUERYNOSENDRECEIPLIST({ - pageNum: this.pagination.pageNum, - pageSize: this.pagination.pageSize, - payorCode: this.form.payorCode, - ...this.searchData - }) - .then((res) => { - if (res.returnCode == "0000") { - this.selectedRowKeys = []; - let content = res.content || {}; - this.pagination.total = content.total || 0; - this.dataList = content.list || []; - this.cacheDataList[this.pagination.pageNum] = this.dataList - } else { - this.$message.error(res.returnMsg); - } - }); - }, - checkBeforeSave() { - if(!this.form.trackingNo){ - this.$message.warning("请输入快递å•å·"); - return false; - } - if(!this.form.sendDate){ - this.$message.warning("è¯·é€‰æ‹©å¯„é€æ—¥æœŸ"); - return false; - } - let allData = [] - for(let i in this.cacheDataList){ - allData = allData.concat(this.cacheDataList[i]) - } - let ciReceiptSendVos = []; - if(this.isEditNewBill){ - ciReceiptSendVos = []; - allData.forEach((item,index)=>{ - if(this.selectedRowKeys.indexOf(index)!=-1){ - ciReceiptSendVos.push({ - id: item.id, - receiptNo: item.receiptNo, - selfpaidAmount: item.selfpaidAmount - }) - } - }) - } else { - ciReceiptSendVos = allData.map(item => { - return { - id: item.id, - receiptNo: item.receiptNo, - selfpaidAmount: item.selfpaidAmount - } - }) - } - for(let i = 0; i < ciReceiptSendVos.length; i ++) { - const selfpaidAmount = ciReceiptSendVos[i].selfpaidAmount - if(selfpaidAmount && !numValid.test(selfpaidAmount)){ - this.$message.warning("请输入æ£ç¡®çš„客户自付金é¢"); - return false; - } - } - return { - ...this.form, - ciReceiptSendVos: ciReceiptSendVos, - sendDate: moment(this.form.sendDate).format('YYYY-MM-DD 00:00:00'), - sendBatchNo: this.sendBatchNo || undefined - } - }, - //新建/ä¿å˜å¯„é€ - addNewCharge(){ - return new Promise((resolve,reject)=>{ - let formData = this.checkBeforeSave() - if(!formData){ - reject() - return false; - } - this.$apis.SAVERECEIPSENDINFO(formData) - .then((res) => { - if (res.returnCode == "0000") { - this.sendBatchNo = res.content; - this.$message.success("æˆåŠŸ"); - this.selectedRowKeys = []; - this.cacheDataList = {} - this.getData(); - resolve(); - } else { - this.$message.error(res.returnMsg); - reject(); - } - }); - }) - } - }, -}; -</script> -<style lang="less" scoped> -.none-label { - text-align: right; - .ant-form-item-label { - opacity: 0; - } -} -.ant-btn .icon-class { - .mg-r(10); -} -.btn-div{ - justify-content: space-between; -} -</style> +<template> + <!-- 收费查询-è´¦å•æŸ¥è¯¢ --> + <div class="white_bg burt-container custom-info"> + <Goback title="ç†èµ”件详情" /> + <!-- form --> + <a-form-model ref="form" layout="vertical" :model="form"> + <a-row :gutter="30"> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸"> + <a-select v-model="form.payorCode" placeholder="请选择ä¿é™©å…¬å¸" allow-clear :disabled="!isEdit"> + <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> + {{ item.longName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="寄é€çжæ€"> + <a-select v-model="form.sendSts" placeholder="请选择寄é€çжæ€" allow-clear :disabled="!isEdit"> + <a-select-option value="1">已寄é€</a-select-option> + <a-select-option value="2">未寄é€</a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="快递公å¸"> + <a-select v-model="form.sendCompany" placeholder="请选择快递公å¸" showSearch allow-clear :disabled="!isEdit"> + <a-select-option v-for="(item) in expressList" :key="item.id" :value="item.descCh">{{item.descCh}}</a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="快递å•å·"> + <a-input v-model="form.trackingNo" placeholder="请输入快递å•å·" allow-clear :disabled="!isEdit" /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="坄逿–¹å¼"> + <a-select v-model="form.sendMode" placeholder="è¯·é€‰æ‹©å¯„é€æ–¹å¼" allow-clear :disabled="!isEdit"> + <a-select-option value="快递">快递</a-select-option> + <a-select-option value="邮件">邮件</a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="坄逿—¥æœŸ"> + <a-date-picker format="YYYYå¹´MM月DDæ—¥" v-model="form.sendDate" placeholder="选择日期" /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="寄é€åœ°å€"> + <a-input v-model="form.sendAddress" placeholder="请输入寄é€åœ°å€" allow-clear :disabled="!isEdit" /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="寄é€é‚®ç®±"> + <a-input v-model="form.sendEmail" placeholder="请输入寄é€é‚®ç®±" allow-clear :disabled="!isEdit" /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="寄é€å¤‡æ³¨"> + <a-textarea v-model="form.sendRemark" placeholder="请输入寄é€å¤‡æ³¨" :auto-size="{ minRows: 2, maxRows: 5 }" allow-clear :disabled="!isEdit" /> + </a-form-model-item> + </a-col> + <a-col :sm="24" class="none-label" v-if="isEdit"> + <div class="btn-div flex"> + <span></span> + <a-form-model-item label="button"> + <a-button class="mar-left10" type="primary" @click="addNewCharge"> + <Icon :name="sendBatchNo?'ssibaocun':'ssiadd'" :size="14" />{{sendBatchNo?'ä¿å˜å¯„é€':'新建寄é€'}}</a-button> + </a-form-model-item> + </div> + </a-col> + </a-row> + </a-form-model> + <a-form-model ref="form" layout="vertical" :model="searchForm"> + <a-row :gutter="30"> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="è´¦å•æ—¥æœŸ"> + <a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.visitTimeStart" :placeholder="['选择账å•开始日期', '选择账å•ç»“æŸæ—¥æœŸ']" /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="病历å·"> + <a-input v-model="searchForm.mrnNo" placeholder="请输入病历å·" allow-clear /> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="客户åç§°"> + <a-input v-model="searchForm.patientName" placeholder="请输入客户åç§°" allow-clear /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="30"> + <a-col :sm="24" class="none-label"> + <div class="btn-div flex"> + <span></span> + <a-form-model-item label="button"> + <a-button type="primary" @click="handlerSearch"> + <Icon name="ssisearch_active" :size="14" />查询 + </a-button> + <a-button class="mar-left10" type="primary" @click="exportEvt"> + <Icon name="ssidaochu" :size="14" />导出 + </a-button> + <a-button class="mar-left10" type="primary" @click="addNewBill" v-if="isEdit"> + <Icon :name="isEditNewBill?'ssibaocun':'ssiadd'" :size="14" />{{isEditNewBill? 'ä¿å˜è´¦å•': 'æ·»åŠ è´¦å•'}}</a-button> + </a-form-model-item> + </div> + </a-col> + </a-row> + </a-form-model> + + <!-- table --> + <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" + :row-selection="isEditNewBill? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }: null"> + <template slot="sendDate" slot-scope="text"> + {{ text? moment(text).format('YYYY-MM-DD'): '' }} + </template> + <template slot="sendSts" slot-scope="text"> + {{ text==1?'已寄é€':'未寄é€' }} + </template> + <template slot="operation" slot-scope="text, record"> + <!-- <a-button type="link" @click.stop="editEvt(record)">修改</a-button> --> + <a-button type="link" class="danger" @click.stop="delRecord(record)">åˆ é™¤</a-button> + </template> + </a-table> + <!--分页--> + <BurtPagination :pagination="pagination" @pageChange="getPageData" /> + + <a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false" + okText="确定" cancelText="å–æ¶ˆ" + @ok="handleEditOK" @cancel="dialogShow = false"> + <a-form-model ref="editForm" :model="editFormObj" :rules="editRules"> + <a-row :gutter="30"> + <a-col :lg="12" :xs="24"> + <a-form-model-item label="ä¿é™©å…¬å¸" prop="payorCode"> + <a-select v-model="editFormObj.payorCode" placeholder="请选择ä¿é™©å…¬å¸" allowClear> + <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> + {{ item.longName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="12" :sm="24"> + <a-form-model-item label="寄é€çжæ€" prop="sendSts"> + <a-select v-model="editFormObj.sendSts" placeholder="请选择寄é€çжæ€" allowClear> + <a-select-option :value="1">已寄é€</a-select-option> + <a-select-option :value="2">未寄é€</a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="12" :sm="24"> + <a-form-model-item label="坄逿—¥æœŸ" prop="sendDate"> + <a-date-picker format="YYYYå¹´MM月DDæ—¥" v-model="editFormObj.sendDate" placeholder="选择日期" /> + </a-form-model-item> + </a-col> + <a-col :lg="12" :xs="24"> + <a-form-model-item label="快递å•å·" prop="trackingNo"> + <a-input v-model.trim="editFormObj.trackingNo" placeholder="快递å•å·" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="30"> + <a-col :lg="12" :xs="24"> + <a-form-model-item label="寄é€å¤‡æ³¨" prop="sendRemark"> + <a-textarea v-model.trim="editFormObj.sendRemark" placeholder="寄é€å¤‡æ³¨" /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-modal> + </div> +</template> + +<script> +import Goback from "@/components/CUSTOMER/goback"; +import BurtPagination from "@/components/CUSTOMER/pagation"; +import moment from 'moment' +import { numValid } from "@/utils/index" + +export default { + data() { + return { + loading: false, + dialogShow: false, + isEdit: false, + sendBatchNo: '', //坄逿‰¹å· + form: { + payorCode: '', + sendSts: '', + sendMode: '', + sendDate: '', + sendCompany: '', + trackingNo: '', + sendAddress: '', + sendEmail: '', + sendRemark: '' + }, + searchForm: {}, + searchData: {}, + companyOptions: [], //ä¿é™©å…¬å¸ + expressList: [], //快递列表 + selectedRowKeys: [], // Check here to configure the default column + dataList: [], + cacheDataList: {}, + isEditNewBill: false, //是å¦åœ¨æ–°å»ºè´¦å• + pagination: { + pageNum: 1, + pageSize: 100, + total: 0, + }, + editFormObj: { + payorCode: '', + sendSts: '', + sendDate: '', + trackingNo: '', + sendRemark: '', + }, + editRules: { + sendDate: [{ required: true, message: "è¯·é€‰æ‹©å¯„é€æ—¥æœŸ", trigger: "change" }], + trackingNo: [{ required: true, message: "请输入寄é€å•å·", trigger: "blur" }], + }, + }; + }, + components: { + Goback, + BurtPagination, + }, + computed: { + columns() { + const base = [ + { title: "è´¦å•æ—¥æœŸ", dataIndex: "receiptDate", width: 160,scopedSlots: { customRender: "receiptDate" } }, + { title: "病历å·", dataIndex: "mrnNo", key:"mrnNo",align:'center', width: 136}, + { title: "客户姓å", dataIndex: "patientName", width: 160 }, + { title: "ä¿é™©å¡å·", dataIndex: "memberCardNo", width: 180 }, + { title: "客户生日", dataIndex: "birthday", width: 160 }, + { title: "è´¦å•ç¼–å·", dataIndex: "receiptNo", key:"receiptNo",align:'center', width: 136}, + { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", ellipsis: true, width: 250 }, + { title: "应收金é¢", dataIndex: "chargeAmount", width: 100, align: 'center' }, + { title: "折扣金é¢", dataIndex: "discountAmount", width: 100, align: 'center' }, + { title: "å‡å…金é¢", dataIndex: "reduceAmount", width: 100, align: 'center' }, + { title: "客户自付", dataIndex: "selfpaidAmount", width: 100, align: 'center' }, + { title: "ç†èµ”金é¢", dataIndex: "actualAmount", width: 100, align: 'center' }, + ]; + if(this.sendBatchNo && ! this.isEditNewBill && this.isEdit){ // 编辑状æ€ä¸‹å·²ç»ä¿å˜çš„æ•°æ®æ‰å¯è¿›è¡Œæ“作 + return base.concat([ + { title: "æ“作", key: "operation", width: "100px",fixed: "right",scopedSlots: { customRender: "operation" }}, + ]); + } + return base + + } + }, + created() { + const { sendBatchNo, isEdit } = this.$route.query; + this.sendBatchNo = sendBatchNo; + this.isEdit = isEdit; + this._getCompanyOptions(); + this.getRefcdByRefgrp(); + if(this.sendBatchNo){ + let jisongDataDetail = localStorage.getItem('jisongDataDetail'); + this.form = jisongDataDetail? JSON.parse(jisongDataDetail): {}; + this.getData(); + } + }, + methods: { + moment, + onSelectChange(selectedRowKeys) { + let arr = []; + for(let i=0; i<selectedRowKeys.length; i++){ + let idx = selectedRowKeys[i]; + if(this.dataList[idx].sendBatchNo){ + this.$msg.destroy(); + this.$message.warning('坄逿‰¹å·å·²å˜åœ¨') + }else{ + arr.push(idx); + } + } + this.selectedRowKeys = arr; + }, + // 分页回调 + getPageData(pager) { + if(pager){ + this.pagination = { + ...this.pagination, + ...pager + } + } + if(this.isEditNewBill) { // æ–°å¢žæ—¶æ·»åŠ äº†è´¦å•ä¿¡æ¯ é‚£åˆ†é¡µä¹Ÿåº”è¯¥æ˜¯è°ƒè´¦å•ä¿¡æ¯æŽ¥å£ + this._getNewBillList() + } else { + this.getData() + } + }, + // 获å–åˆ—è¡¨æ•°æ® + getData() { + this.selectedRowKeys = []; + let filter = { + pageNum: this.pagination.pageNum, + pageSize: this.pagination.pageSize, + sendBatchNo: this.sendBatchNo || undefined, + ...this.searchData + } + this.$apis.QUERYSENDRECEIPLIST(filter) + .then((res) => { + if (res.returnCode == "0000") { + let content = res.content || {}; + this.pagination.total = content.total || 0; + this.dataList = content.list || []; + this.cacheDataList[filter.pageNum] = this.dataList + } else { + this.$message.error(res.returnMsg); + } + }); + }, + // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ + _getCompanyOptions() { + this.$apis.GETCOMPANYOPTIONS().then((res) => { + this.companyOptions = res.content || []; + }); + }, + // 获å–快递列表 + getRefcdByRefgrp() { + this.$apis.GETREFCDBYREFGRP({ + modid: "CI", + refgrp: "SEND_COMPANY" + }).then((res) => { + this.expressList = res.content || []; + }); + }, + //查看 + detailEvt(record) { + const { receiptNo } = record; + this.$router.push({ + name: "chargeQueryDetail", + query: { receiptNo }, + }); + }, + editEvt(record) { + this.editFormObj = { + ciReceiptSendVos: [ + { + id: record.id, + receiptNo: record.receiptNo, + } + ], + payorCode: record.payorCode || "", + sendSts: Number(record.sendSts) || "", + sendDate: record.sendDate || "", + trackingNo: record.trackingNo || "", + sendRemark: record.sendRemark || "", + }; + this.dialogShow = true; + }, + //编辑ä¿å˜ + handleEditOK() { + this.$refs.editForm.validate((valid) => { + if (valid) { + this.$apis.SAVERECEIPSENDINFO({ + ...this.editFormObj, + sendDate: moment(this.editFormObj.sendDate).format('YYYY-MM-DD 00:00:00') + }) + .then((res) => { + if (res.returnCode == "0000") { + this.$message.success("编辑æˆåŠŸ"); + this.dialogShow = false; + this.getData(); + } else { + this.$message.error(res.returnMsg); + } + }); + } + }); + }, + handlerSearch() { + this.pagination.pageNum = 1; + let visitTimeStart = this.searchForm.visitTimeStart || [] + this.searchData = this.$lodash.cloneDeep({ + ...this.searchForm, + visitTimeEnd: visitTimeStart[1] ? visitTimeStart[1] + ' 23:59:59' : undefined, + visitTimeStart: visitTimeStart[0] ? visitTimeStart[0] + ' 00:00:00' : undefined, + }); + if(this.isEditNewBill) { // æ–°å¢žæ—¶æ·»åŠ äº†è´¦å•ä¿¡æ¯ é‚£åˆ†é¡µä¹Ÿåº”è¯¥æ˜¯è°ƒè´¦å•ä¿¡æ¯æŽ¥å£ + this._getNewBillList() + } else { + this.getData() + } + }, + //åˆ é™¤ + delRecord(data) { + this.$modal.confirm({ + title: "åˆ é™¤", + content: "ç¡®å®šåˆ é™¤è¯¥æ¡è®°å½•?", + okText: "确定", + cancelText: "å–æ¶ˆ", + onOk: () => { + this.$apis.DELETESENDRECEIPT({ + ciReceiptSendVos: [ + {receiptNo: data.receiptNo} + ], + sendBatchNo: this.sendBatchNo, + }) + .then((res) => { + if (res.returnCode == "0000") { + this.$message.success("åˆ é™¤æˆåŠŸ"); + this.getData() + // this.dataList.splice(index, 1); + } else { + this.$message.error(res.returnMsg); + } + }); + }, + }); + }, + //导出 + exportEvt(){ + this.$apis.SENDRECEIPTLISTEXPORT({ + sendBatchNo: this.sendBatchNo || undefined + }) + .then(res => { + let blob = new Blob([res.data], { + type:"application/vnd.ms-excel;charset=utf-8" + }); + let url=window.URL.createObjectURL(blob); + let aLink=document.createElement("a"); + aLink.style.display="none"; + aLink.href=url; + aLink.setAttribute("download","寄é€è´¦å•.xls"); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); + window.URL.revokeObjectURL(url); + }) + }, + //æ·»åŠ è´¦å• + addNewBill(){ + // this.isEditNewBill = !this.isEditNewBill; + if(this.isEditNewBill){ //ä¿å˜ + this.addNewCharge() + .then(()=>{ + this.isEditNewBill = false; + }) + }else{ //æŸ¥è¯¢æ‰€æœ‰æœªåŠ å…¥çš„è´¦å• + this.pagination.pageNum = 1; + this.isEditNewBill = true; + this.cacheDataList = {} + this._getNewBillList() + } + }, + _getNewBillList() { + this.$apis.QUERYNOSENDRECEIPLIST({ + pageNum: this.pagination.pageNum, + pageSize: this.pagination.pageSize, + payorCode: this.form.payorCode, + ...this.searchData + }) + .then((res) => { + if (res.returnCode == "0000") { + this.selectedRowKeys = []; + let content = res.content || {}; + this.pagination.total = content.total || 0; + this.dataList = content.list || []; + this.cacheDataList[this.pagination.pageNum] = this.dataList + } else { + this.$message.error(res.returnMsg); + } + }); + }, + checkBeforeSave() { + if(!this.form.trackingNo){ + this.$message.warning("请输入快递å•å·"); + return false; + } + if(!this.form.sendDate){ + this.$message.warning("è¯·é€‰æ‹©å¯„é€æ—¥æœŸ"); + return false; + } + let allData = [] + for(let i in this.cacheDataList){ + allData = allData.concat(this.cacheDataList[i]) + } + let ciReceiptSendVos = []; + if(this.isEditNewBill){ + ciReceiptSendVos = []; + allData.forEach((item,index)=>{ + if(this.selectedRowKeys.indexOf(index)!=-1){ + ciReceiptSendVos.push({ + id: item.id, + receiptNo: item.receiptNo, + selfpaidAmount: item.selfpaidAmount + }) + } + }) + } else { + ciReceiptSendVos = allData.map(item => { + return { + id: item.id, + receiptNo: item.receiptNo, + selfpaidAmount: item.selfpaidAmount + } + }) + } + for(let i = 0; i < ciReceiptSendVos.length; i ++) { + const selfpaidAmount = ciReceiptSendVos[i].selfpaidAmount + if(selfpaidAmount && !numValid.test(selfpaidAmount)){ + this.$message.warning("请输入æ£ç¡®çš„客户自付金é¢"); + return false; + } + } + return { + ...this.form, + ciReceiptSendVos: ciReceiptSendVos, + sendDate: moment(this.form.sendDate).format('YYYY-MM-DD 00:00:00'), + sendBatchNo: this.sendBatchNo || undefined + } + }, + //新建/ä¿å˜å¯„é€ + addNewCharge(){ + return new Promise((resolve,reject)=>{ + let formData = this.checkBeforeSave() + if(!formData){ + reject() + return false; + } + this.$apis.SAVERECEIPSENDINFO(formData) + .then((res) => { + if (res.returnCode == "0000") { + this.sendBatchNo = res.content; + this.$message.success("æˆåŠŸ"); + this.selectedRowKeys = []; + this.cacheDataList = {} + this.getData(); + resolve(); + } else { + this.$message.error(res.returnMsg); + reject(); + } + }); + }) + } + }, +}; +</script> +<style lang="less" scoped> +.none-label { + text-align: right; + .ant-form-item-label { + opacity: 0; + } +} +.ant-btn .icon-class { + .mg-r(10); +} +.btn-div{ + justify-content: space-between; +} +</style> diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 02317ce175b389708f756a82182037d1047209ca..0a53ad9998d2ccc6ecce2540883c344ebb154e5c 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,27 +1,27 @@ -<template> - <div class="white_bg burt-container"> - <img src="../../assets/image/home_bg.jpg" alt=""> - </div> -</template> - -<script> -export default{ - data(){ - return{ - - } - } -} -</script> - -<style lang="less" scoped> -.burt-container{ - height: calc(100vh - 116px); - padding: 0; - img{ - width: 100%; - height: 100%; - object-fit: contain; - } -} +<template> + <div class="white_bg burt-container"> + <img src="../../assets/image/home_bg.jpg" alt=""> + </div> +</template> + +<script> +export default{ + data(){ + return{ + + } + } +} +</script> + +<style lang="less" scoped> +.burt-container{ + height: calc(100vh - 86px); + padding: 0; + img{ + width: 100%; + height: 100%; + object-fit: contain; + } +} </style> \ No newline at end of file diff --git a/src/views/layout/components/menu/subMenu.vue b/src/views/layout/components/menu/subMenu.vue deleted file mode 100644 index 32ed6f914e03af9745ac937828b39fae81236f7a..0000000000000000000000000000000000000000 --- a/src/views/layout/components/menu/subMenu.vue +++ /dev/null @@ -1,73 +0,0 @@ -<template> - <div class="sub-menu"> - <router-link - tag="button" - :class="{ btn: true, 'btn-active': isVisit(item.path) }" - v-for="(item, index) in menuStack" - :key="item.path" - :to="item.path" - > - {{ item.title }} - <Icon v-if="menuStack.length>1" - @click="(e)=>closeMenu(e, index)" - :name="isVisit(item.path) ? 'ssiclose_active' : 'ssiclose'" - :size="16" - /> - </router-link> - <slot name="tips" /> - </div> -</template> - -<script> -import { mapState } from "vuex"; -export default { - computed: { - ...mapState({ - menuStack: (state) => state.common.menuStack, - }), - }, - methods: { - isVisit(val) { - const path = this.$route.path; - return path === val; - }, - closeMenu(e, index) { - e.stopPropagation(); - const menuStack = JSON.parse(JSON.stringify(this.menuStack)); - const isVisit = this.isVisit(menuStack[index].path); - menuStack.splice(index, 1); - this.$store.commit("common/setMenuStack", menuStack); - if (isVisit) { - // å…³é—çš„æ˜¯å½“å‰æ£åœ¨æŸ¥çœ‹çš„ - const i = Math.max(0, index - 1); - this.$router.push(menuStack[i].path || "/"); - } - }, - }, -}; -</script> - -<style lang="less" scoped> -.sub-menu { - width: 100%; - overflow-x: auto; - white-space: nowrap; - .mg-b(16); - .btn { - .fs(14); - .lh(20); - .pa(8, 13, 8, 13); - .mg-r(40); - color: #252631; - font-weight: bold; - border: none; - background-color: #fff; - border-radius: 5px; - cursor: pointer; - } - .btn-active { - color: #fff; - background-color: #2b63ff; - } -} -</style> diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 7c16383d8cc43cf14065b5504b3fb85d98e63ec0..338011dfb04ea93b89d097fa7064cd077b735b30 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -1,75 +1,72 @@ -<template> - <div class="menu-layout"> - <Header></Header> - <div class="container"> - <Menu></Menu> - <Loading /> - <div class="content"> - <SubMenu></SubMenu> - <router-view /> - </div> - </div> - </div> -</template> - -<script> -import Header from "./components/Header.vue"; -import Menu from "./components/menu"; -import SubMenu from "./components/menu/subMenu.vue"; -import Loading from "@/components/Loading/Loading.vue"; - -export default { - components: { - Header, - Menu, - SubMenu, - Loading - }, - data() { - return {}; - }, - - created() {}, - mounted() {}, - methods: {}, -}; -</script> - -<style> - .icon-class.arrow{ - position: absolute; - right: 0; - top: 50%; - transform: translateY(-50%); -} -</style> -<style lang="less" scoped> -.menu-layout { - background-color: #f8fafb; - font-family: "Helvetica" "Microsoft YaHei" "微软雅黑"; - .container { - display: flex; - position: relative; - .pt(68); - // min-height: calc(100vh - 50px); - .content { - position: relative; - flex: 1; - .mg-l(242); - .pa(14, 40, 0, 40); - min-height: calc(100vh - 68px); - overflow-x: hidden; - } - } - .menu { - position: fixed; - .w(242); - height: calc(100vh - 68px); - overflow: auto; - background-color: #fff; - li{ - position: relative; - } - } -} -</style> +<template> + <div class="menu-layout"> + <Header></Header> + <div class="container"> + <Menu></Menu> + <Loading /> + <div class="content"> + <router-view /> + </div> + </div> + </div> +</template> + +<script> +import Header from "./components/Header.vue"; +import Menu from "./components/menu"; +import Loading from "@/components/Loading/Loading.vue"; + +export default { + components: { + Header, + Menu, + Loading + }, + data() { + return {}; + }, + + created() {}, + mounted() {}, + methods: {}, +}; +</script> + +<style> + .icon-class.arrow{ + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +</style> +<style lang="less" scoped> +.menu-layout { + background-color: #f8fafb; + font-family: "Helvetica" "Microsoft YaHei" "微软雅黑"; + .container { + display: flex; + position: relative; + .pt(68); + // min-height: calc(100vh - 50px); + .content { + position: relative; + flex: 1; + .mg-l(242); + .pa(14, 40, 0, 40); + min-height: calc(100vh - 68px); + overflow-x: hidden; + } + } + .menu { + position: fixed; + .w(242); + height: calc(100vh - 68px); + overflow: auto; + background-color: #fff; + li{ + position: relative; + } + } +} +</style> diff --git a/src/views/verification/collection.vue b/src/views/verification/collection.vue index eb2789d55429105adaab6e87fc5afd565e55b083..8ccff19caa8c048e4e73b61367fe2d5a8c0e5385 100644 --- a/src/views/verification/collection.vue +++ b/src/views/verification/collection.vue @@ -57,6 +57,11 @@ <a-input v-model="form.backAmountCny" placeholder="回款金é¢" /> </a-form-model-item> </a-col> + <a-col :lg="6" :sm="12"> + <a-form-model-item label="回款编å·"> + <a-input v-model="form.backMoneyNo" placeholder="回款编å·" /> + </a-form-model-item> + </a-col> <a-col :md="24" class="none-label"> <a-form-model-item label="button"> <a-button class="mar-left10" type="primary" @click="handlerSearch"> @@ -72,6 +77,9 @@ <a-button class="mar-left10" type="primary" @click="addNewEvt"> <Icon name="ssiadd" :size="14" />新建回款 </a-button> + <a-button class="mar-left10" type="primary" @click="exportExcel"> + <Icon name="ssidaochu" :size="14" />导出 + </a-button> </a-form-model-item> </a-col> </a-row> @@ -109,6 +117,7 @@ <script> import BurtPagination from "@/components/CUSTOMER/pagation"; import moment from "moment"; +import { exportFile } from '@/utils/index'; const columns = [ { title: "回款编å·", dataIndex: "backMoneyNo", ellipsis: true, width: 150 }, { title: "EOBç¼–å·", dataIndex: "eobNos", ellipsis: true, width: 140 }, @@ -149,6 +158,7 @@ export default { endDate: "", backStatus: "", backAmountCny: "", // å›žæ¬¾é‡‘é¢ + backMoneyNo: "", // å›žæ¬¾ç¼–å· }, dataList: [], companyOptions: [], //ä¿é™©å…¬å¸ @@ -295,6 +305,16 @@ export default { onCancel: () => {}, }); }, + //导出报表 + exportExcel(){ + let filter = { + ...this.form, + dateRange: undefined, + } + this.$apis.EXPORTBACKMONEYREPORT(filter).then(res => { + exportFile(res, '回款列表.xls'); + }) + } }, }; </script> diff --git a/src/views/verification/collectionDetail.vue b/src/views/verification/collectionDetail.vue index f0a575e088810645f9dbe066cf305c8d5433d738..70b1fe8925fda7de455bb8847713d37525765b97 100644 --- a/src/views/verification/collectionDetail.vue +++ b/src/views/verification/collectionDetail.vue @@ -1,130 +1,273 @@ <template> <div class="white_bg burt-container"> <Goback title="回款详情" /> - <!-- form --> - <a-form-model ref="form" layout="vertical" :model="form"> - <a-row :gutter="30"> - <a-col :lg="6" :sm="12"> - <a-form-model-item label="ä¿é™©å…¬å¸"> - <a-select v-model="form.payorCode" placeholder="请选择ä¿é™©å…¬å¸" allow-clear :disabled="!isEdit" @change="changePayor"> - <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> - {{ item.longName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="回款日期"> - <a-date-picker format="YYYY-MM-DD" format-value="YYYY-MM-DD 00:00:00" v-model="form.backDate" placeholder="选择日期" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="回款金é¢(人民å¸)"> - <a-input type="number" v-model="form.backAmountCny" placeholder="请输入金é¢" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="坿 ¸é”€ä½™é¢"> - <a-input v-model="residueBackAmount" disabled /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="回款金é¢(美元)"> - <a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金é¢" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="6" :sm="12"> - <a-form-model-item label="汇率差"> - <a-input v-model="form.backExchangeRate" placeholder="请输入金é¢" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="EOBç¼–å·"> - <a-input v-model="form.eobNos" placeholder="请输入EOBç¼–å·" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="EOB备注"> - <a-input v-model="form.eobRemark" placeholder="请输入EOB备注" allow-clear :disabled="!isEdit" /> - </a-form-model-item> - </a-col> - <a-col :lg="5" :sm="12"> - <a-form-model-item label="ä¸Šä¼ é™„ä»¶"> - <a-upload name="file" :multiple="false" :showUploadList="true" :disabled="!isEdit" - :fileList="fileList" - :customRequest="(file)=>uploadFile(file)" - :beforeUpload="()=>beforeUpload()" - :remove="(file)=>removeFile(file)"> - <a-button type="primary"> <Icon name="ssiupload" :size="18" />ä¸Šä¼ æ–‡ä»¶ </a-button> - </a-upload> - </a-form-model-item> - </a-col> - <a-col :md="24" :lg="24" class="none-label" v-if="isEdit"> - <a-form-model-item label="button"> - <a-button class="mar-left10" type="primary" @click="addNewEvt(0)"> - <Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />æš‚å˜ - </a-button> - <a-button class="mar-left10" type="primary" @click="addNewEvt(1)"> - <Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />结案 - </a-button> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - <div class="bill-content"> - <!-- 已关è”è´¦å• --> - <template v-if="selectedRows.length > 0"> - <div class="table-title">已关è”è´¦å•</div> - <a-table class="table-content" :columns="selectedColumns" :data-source="selectedRows" :scroll="{ x: true, y: 200 }" :pagination="false"> - <template slot="operation" slot-scope="text, record, index"> - <a-button type="link" class="danger" @click.stop="delRecord(record, index)">åˆ é™¤</a-button> - </template> - </a-table> - </template> - <!-- table --> - <template v-if="isEdit"> - <a-row class="search-form"> - <a-form-model ref="searchForm" layout="vertical" :model="searchForm"> + <a-tabs v-model="activeKey" @change="paneChange"> + <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title"> + <template v-if="activeKey === '0'"> + <!-- form --> + <a-form-model ref="form" layout="vertical" :model="form"> <a-row :gutter="30"> <a-col :lg="6" :sm="12"> - <a-form-model-item label="è´¦å•æ—¥æœŸ"> - <a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.billDate" :placeholder="['开始时间','ç»“æŸæ—¶é—´']"/> + <a-form-model-item label="ä¿é™©å…¬å¸"> + <a-select + v-model="form.payorCode" + placeholder="请选择ä¿é™©å…¬å¸" + allow-clear + :disabled="!isEdit" + @change="changePayor" + > + <a-select-option + v-for="item in companyOptions" + :key="item.id" + :value="item.payorCode" + > + {{ item.longName }} + </a-select-option> + </a-select> </a-form-model-item> </a-col> <a-col :lg="5" :sm="12"> - <a-form-model-item label="病历å·"> - <a-input v-model="searchForm.mrnNo" placeholder="请输入病历å·" allow-clear :disabled="!isEdit"/> + <a-form-model-item label="回款日期"> + <a-date-picker + format="YYYY-MM-DD" + format-value="YYYY-MM-DD 00:00:00" + v-model="form.backDate" + placeholder="选择日期" + allow-clear + :disabled="!isEdit" + /> </a-form-model-item> </a-col> <a-col :lg="5" :sm="12"> - <a-form-model-item label="客户åç§°"> - <a-input v-model="searchForm.patientName" placeholder="请输入客户åç§°" allow-clear :disabled="!isEdit"/> + <a-form-model-item label="回款金é¢(人民å¸)"> + <a-input + type="number" + v-model="form.backAmountCny" + placeholder="请输入金é¢" + allow-clear + :disabled="!isEdit" + /> </a-form-model-item> </a-col> <a-col :lg="5" :sm="12"> - <div class="btn-div mar-bottom10 none-label"> - <a-button type="primary" @click="_getNewEOBList"> - <Icon name="ssisearch_active" :size="14" />查询 - </a-button> - </div> + <a-form-model-item label="坿 ¸é”€ä½™é¢"> + <a-input v-model="residueBackAmount" disabled /> + </a-form-model-item> + </a-col> + <a-col :lg="5" :sm="12"> + <a-form-model-item label="回款金é¢(美元)"> + <a-input + type="number" + v-model="form.backAmountUsd" + placeholder="请输入金é¢" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="6" :sm="12"> + <a-form-model-item label="汇率差"> + <a-input + v-model="form.backExchangeRate" + placeholder="请输入金é¢" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="5" :sm="12"> + <a-form-model-item label="EOBç¼–å·"> + <a-input + v-model="form.eobNos" + placeholder="请输入EOBç¼–å·" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="5" :sm="12"> + <a-form-model-item label="EOB备注"> + <a-input + v-model="form.eobRemark" + placeholder="请输入EOB备注" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="5" :sm="12"> + <a-form-model-item label="ä¸Šä¼ é™„ä»¶"> + <a-upload + name="file" + :multiple="false" + :showUploadList="true" + :disabled="!isEdit" + :fileList="fileList" + :customRequest="(file) => uploadFile(file)" + :beforeUpload="() => beforeUpload()" + :remove="(file) => removeFile(file)" + > + <a-button type="primary"> + <Icon name="ssiupload" :size="18" />ä¸Šä¼ æ–‡ä»¶ + </a-button> + </a-upload> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </template> + <template v-else> + <!-- form --> + <a-form-model + ref="form" + :labelCol="{ span: 5 }" + :wrapperCol="{ span: 16 }" + :model="form" + class="bill-form" + > + <a-row :gutter="30"> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸"> + <a-select + v-model="form.payorCode" + placeholder="请选择ä¿é™©å…¬å¸" + allow-clear + :disabled="!isEdit" + @change="changePayor" + > + <a-select-option + v-for="item in companyOptions" + :key="item.id" + :value="item.payorCode" + > + {{ item.longName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="8" :sm="12"> + <a-form-model-item label="坿 ¸é”€ä½™é¢"> + <a-input v-model="residueBackAmount" disabled /> + </a-form-model-item> </a-col> </a-row> </a-form-model> - </a-row> - <div class="table-title">è´¦å•列表</div> - <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true, y: 200 }" :pagination="false" :rowKey="'id'" - :row-selection="{ selectedRowKeys: selectedRowKeys, onSelect: onSelectChange, onSelectAll: onSelectAll }"> - </a-table> - <BurtPagination :pagination="pagination" @pageChange="pageChange" /> - </template> - </div> + <div class="bill-content"> + <!-- 已关è”è´¦å• --> + <template v-if="selectedRows.length > 0"> + <div class="table-title"> + <span>已关è”è´¦å•</span> + <a-button class="mar-left10" type="primary" @click="exportExcel"> + <Icon name="ssidaochu" :size="14" />导出 + </a-button> + </div> + <a-table + class="table-content" + :columns="selectedColumns" + :data-source="selectedRows" + :scroll="{ x: true, y: 450 }" + :pagination="false" + > + <template slot="operation" slot-scope="text, record, index"> + <a-button + type="link" + class="danger" + @click.stop="delRecord(record, index)" + >åˆ é™¤</a-button + > + </template> + </a-table> + </template> + <!-- table --> + <template v-if="isEdit"> + <a-row class="search-form"> + <a-form-model + ref="searchForm" + layout="inline" + :labelCol="{ span: 8 }" + :wrapperCol="{ span: 16 }" + :model="searchForm" + > + <a-row :gutter="30"> + <a-col :lg="6" :sm="10"> + <a-form-model-item label="è´¦å•æ—¥æœŸ"> + <a-range-picker + format="YYYY-MM-DD" + value-format="YYYY-MM-DD" + v-model="searchForm.billDate" + :placeholder="['开始时间', 'ç»“æŸæ—¶é—´']" + /> + </a-form-model-item> + </a-col> + <a-col :lg="6" :sm="10"> + <a-form-model-item label="病历å·"> + <a-input + v-model="searchForm.mrnNo" + placeholder="请输入病历å·" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="6" :sm="12"> + <a-form-model-item label="客户åç§°"> + <a-input + v-model="searchForm.patientName" + placeholder="请输入客户åç§°" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="4" :sm="12"> + <div class="btn-div mar-bottom10 none-label"> + <a-button type="primary" @click="_getNewEOBList"> + <Icon name="ssisearch_active" :size="14" />查询 + </a-button> + </div> + </a-col> + </a-row> + </a-form-model> + </a-row> + <div class="table-title">è´¦å•列表</div> + <a-table + :columns="columns" + :data-source="dataList" + :scroll="{ x: true, y: 300 }" + :pagination="false" + :rowKey="'id'" + :row-selection="{ + selectedRowKeys: selectedRowKeys, + onSelect: onSelectChange, + onSelectAll: onSelectAll, + }" + > + </a-table> + <BurtPagination + :pagination="pagination" + @pageChange="pageChange" + /> + </template> + </div> + </template> + </a-tab-pane> + <div v-if="isEdit" slot="tabBarExtraContent"> + <a-button class="mar-left10" type="primary" @click="addNewEvt(0)"> + <Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />æš‚å˜ + </a-button> + <a-button class="mar-left10" type="primary" @click="addNewEvt(1)"> + <Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />结案 + </a-button> + </div> + </a-tabs> </div> </template> <script> import Goback from "@/components/CUSTOMER/goback"; import BurtPagination from "@/components/CUSTOMER/pagation"; -import {EOBStatusOptions} from '@/utils/utilsdictOptions.js' +import { EOBStatusOptions } from "@/utils/utilsdictOptions.js"; +import { exportFile } from '@/utils/index'; import moment from "moment"; import mixins from "@/mixins"; export default { @@ -134,13 +277,13 @@ export default { EOBStatusOptions, dialogShow: false, form: { - payorCode: '', + payorCode: "", backDate: null, - backAmountCny: '', - backAmountUsd: '', - backExchangeRate: '', - eobNos: '', // EOBç¼–å· - eobRemark: '' // EOB备注 + backAmountCny: "", + backAmountUsd: "", + backExchangeRate: "", + eobNos: "", // EOBç¼–å· + eobRemark: "", // EOB备注 }, fileList: [], // ä¸Šä¼ æ–‡ä»¶åˆ—è¡¨ dataList: [], @@ -153,7 +296,7 @@ export default { }, selectedRowKeys: [], // Check here to configure the default column selectedRows: [], // Check here to configure the default column - backMoneyNo: '', + backMoneyNo: "", editRules: { backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }], backAmount: [{ required: true, message: "请输入", trigger: "blur" }], @@ -161,11 +304,17 @@ export default { searchForm: { billDate: [], - mrnNo: '', // ç—…åŽ†å· - patientName: '', // 客户åå— + mrnNo: "", // ç—…åŽ†å· + patientName: "", // 客户åå— }, savedStatus: false, //是å¦å·²ä¿å˜ - relatedList: [] + relatedList: [], + + panes: [ + { title: "基础信æ¯", key: "0", show: true, content: "PaymentClaims" }, + { title: "è´¦å•列表", key: "1", show: false, content: "Insurance" }, + ], + activeKey: "0", }; }, mixins: [mixins], @@ -175,66 +324,167 @@ export default { }, computed: { columns() { - const base = [ - { title: "è´¦å•ç¼–å·", dataIndex: "receiptNo", ellipsis: true, width: 150 }, - { title: "病历å·", dataIndex: "mrnNo", ellipsis: true, width: 195 }, - { title: "客户姓å",dataIndex: "patientName", ellipsis: true, width: 160 }, - // { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", ellipsis: true, width: 160 }, - { title: "è´¦å•æ—¥æœŸ", dataIndex: "receiptDate", ellipsis: true, width: 150 }, - { title: "æ”¶é“¶", dataIndex: "receiptTellerName", ellipsis: true, width: 120,}, - { title: "è´¦å•金é¢", dataIndex: "actualAmount", ellipsis: true, width: 150,}, - { title: "回款金é¢", dataIndex: "writeOffAmount", ellipsis: true, width: 150}, - { title: "未清余é¢", dataIndex: "residueBackAmount", ellipsis: true, width: 150,}, - ]; - return base + const base = [ + { + title: "è´¦å•ç¼–å·", + dataIndex: "receiptNo", + ellipsis: true, + width: 150, + }, + { title: "病历å·", dataIndex: "mrnNo", ellipsis: true, width: 195 }, + { + title: "客户姓å", + dataIndex: "patientName", + ellipsis: true, + width: 160, + }, + // { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", ellipsis: true, width: 160 }, + { + title: "è´¦å•æ—¥æœŸ", + dataIndex: "receiptDate", + ellipsis: true, + width: 180, + }, + { + title: "æ”¶é“¶", + dataIndex: "receiptTellerName", + ellipsis: true, + width: 120, + }, + { + title: "ç†èµ”è´¦å•金é¢", + dataIndex: "actualAmount", + ellipsis: true, + width: 150, + }, + { + title: "回款金é¢", + dataIndex: "writeOffAmount", + ellipsis: true, + width: 150, + }, + { + title: "ä¸ªäººæ¬ è´¹", + dataIndex: "arrearsAmountShow", + ellipsis: true, + width: 150, + }, + { + title: "未清余é¢", + dataIndex: "residueBackAmount", + ellipsis: true, + width: 150, + }, + ]; + return base; }, selectedColumns() { - const base = JSON.parse(JSON.stringify(this.columns)) - const changeAmount = this.changeAmount - base[6] = { title: "回款金é¢", dataIndex: "backAmount", ellipsis: true, width: 150, customRender: (val, row) => { - return <a-input-number v-model={row.backAmount} allow-clear disabled={!this.isEdit} onBlur={() => {changeAmount(row)}} /> - } } - base[7] = { title: "未清余é¢", dataIndex: "residueBackAmount", ellipsis: true, width: 150, customRender: (val, row) => { - const residueBackAmount = Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - return Number(residueBackAmount.toFixed(2)) - } } - base.splice(6, 0, { title: "余末金é¢", dataIndex: "currentReceiptAmount", ellipsis: true, width: 150,}) - base.push({ title: "回款日期", dataIndex: "backDate", ellipsis: true, width: 150,}) - if(this.isEdit) { - base.push({ title: "æ“作", dataIndex: "operation", fixed: 'right', width: 100, scopedSlots: { customRender: "operation" }}) + const base = JSON.parse(JSON.stringify(this.columns)); + const changeAmount = this.changeAmount; + base[6] = { + title: "回款金é¢", + dataIndex: "backAmount", + ellipsis: true, + width: 150, + customRender: (val, row) => { + return ( + <a-input-number + v-model={row.backAmount} + allow-clear + disabled={!this.isEdit} + onBlur={() => { + changeAmount(row); + }} + /> + ); + }, + }; + base[8] = { + title: "未清余é¢", + dataIndex: "residueBackAmount", + ellipsis: true, + width: 150, + customRender: (val, row) => { + const residueBackAmount = + Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - Number(row.arrearsAmount || 0); + return Number(residueBackAmount.toFixed(2)); + }, + }; + base[7] = { + title: "ä¸ªäººæ¬ è´¹", + dataIndex: "arrearsAmount", + ellipsis: true, + width: 150, + customRender: (val, row) => { + return ( + <a-input-number + v-model={row.arrearsAmount} + allow-clear + disabled={!this.isEdit} + onBlur={() => { + changeAmount(row); + }} + /> + ); + }, + }; + base.splice(6, 0, { + title: "余末金é¢", + dataIndex: "currentReceiptAmount", + ellipsis: true, + width: 150, + }); + base.push({ + title: "回款日期", + dataIndex: "backDate", + ellipsis: true, + width: 150, + }); + if (this.isEdit) { + base.push({ + title: "æ“作", + dataIndex: "operation", + fixed: "right", + width: 100, + scopedSlots: { customRender: "operation" }, + }); } - return base + return base; }, // 坿 ¸é”€ä½™é¢ residueBackAmount() { - let totalMoney = Number(this.form.backAmountCny || 0) - this.selectedRows.forEach(item => { - totalMoney -= Number(item.backAmount) - }) - return Number(totalMoney.toFixed(2)) - } + let totalMoney = Number(this.form.backAmountCny || 0); + this.selectedRows.forEach((item) => { + totalMoney -= Number(item.backAmount); + }); + return Number(totalMoney.toFixed(2)); + }, }, - created(){ - const { backMoneyNo, isEdit } = this.$route.query + created() { + const { backMoneyNo, isEdit } = this.$route.query; this.backMoneyNo = backMoneyNo; this.isEdit = isEdit; this._getCompanyOptions(); - if(backMoneyNo){ - const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}'); - this.form = backMoneyDataDetail - this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null - + if (backMoneyNo) { + const backMoneyDataDetail = JSON.parse( + localStorage.getItem("backMoneyDataDetail") || "{}" + ); + this.form = backMoneyDataDetail; + this.form.backDate = this.form.backDate + ? moment(this.form.backDate).format("YYYY-MM-DD 00:00:00") + : null; + // å¦‚æžœæœ‰ä¸Šä¼ é™„ä»¶åˆ™æ˜¾ç¤ºåˆ—è¡¨ - if(backMoneyDataDetail.fileList) { - this.fileList = backMoneyDataDetail.fileList.map(d => { + if (backMoneyDataDetail.fileList) { + this.fileList = backMoneyDataDetail.fileList.map((d) => { const file = { - uid: Math.random()*10000, + uid: Math.random() * 10000, name: d.fileName, - status: 'done', + status: "done", url: d.fileUrl, - } - return file - }) + }; + return file; + }); } this.getData(); } @@ -242,92 +492,112 @@ export default { }, methods: { moment, + paneChange() { + this.panes.forEach((item) => { + item.show = false; + }); + this.panes[Number(this.activeKey)].show = true; + }, changeAmount(row) { - if((Number(row.actualAmount || 0) - Number(row.backAmount || 0)) < 0) { + if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) { this.$message.warning("录入账å•回款金é¢å¤§äºŽè´¦å•金é¢"); } }, onSelectChange(selectedRow, selected) { - if(selected) { - this.selectedRowKeys.push(selectedRow.id) - this.selectedRows.push(selectedRow) + if (selected) { + this.selectedRowKeys.push(selectedRow.id); + this.selectedRows.push(selectedRow); } else { - const index = this.selectedRowKeys.findIndex(item => item === selectedRow.id) - this.selectedRowKeys.splice(index, 1) - this.selectedRows.splice(index, 1) - this._confirmDelReceipt([selectedRow]) + const index = this.selectedRowKeys.findIndex( + (item) => item === selectedRow.id + ); + this.selectedRowKeys.splice(index, 1); + this.selectedRows.splice(index, 1); + this._confirmDelReceipt([selectedRow]); } }, onSelectAll(selected, selectedRows, changeRows) { - console.log(selected, selectedRows, changeRows) - if(selected) { - this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map(item => item.id)) - this.selectedRows = this.selectedRows.concat(changeRows) + console.log(selected, selectedRows, changeRows); + if (selected) { + this.selectedRowKeys = this.selectedRowKeys.concat( + changeRows.map((item) => item.id) + ); + this.selectedRows = this.selectedRows.concat(changeRows); } else { - changeRows.forEach(item => { - const findIndex = this.selectedRowKeys.findIndex(rowId => rowId === item.id) - this.selectedRowKeys.splice(findIndex, 1) - this.selectedRows.splice(findIndex, 1) - }) - this._confirmDelReceipt(changeRows) + changeRows.forEach((item) => { + const findIndex = this.selectedRowKeys.findIndex( + (rowId) => rowId === item.id + ); + this.selectedRowKeys.splice(findIndex, 1); + this.selectedRows.splice(findIndex, 1); + }); + this._confirmDelReceipt(changeRows); } }, delRecord(record, index) { - this.selectedRowKeys.splice(index, 1) - this.selectedRows.splice(index, 1) - if(record.relationed) { + this.selectedRowKeys.splice(index, 1); + this.selectedRows.splice(index, 1); + if (record.relationed) { // å·²ç»å…³è”的调用接å£åˆ 除 - this._confirmDelReceipt([record]) + this._confirmDelReceipt([record]); } }, _confirmDelReceipt(records) { - console.log(records) - if(!this.backMoneyNo) return; - const receiptVoList = records.filter(item => { - const findIndex = this.relatedList.findIndex(rowId => rowId === item.id) - return (findIndex > -1) - }).map(item => { - return { - id: item.id - } - }) - console.log(receiptVoList) - if(receiptVoList.length === 0) return; - this.$apis.DELETERECEIPTRECORD({ - backMoneyNo: this.backMoneyNo, - receiptVoList - }) - .then((res) => { - if (res.returnCode == "0000") { - this._getNewEOBList() - } else { - this.$message.error(res.returnMsg); - } - }); + console.log(records); + if (!this.backMoneyNo) return; + const receiptVoList = records + .filter((item) => { + const findIndex = this.relatedList.findIndex( + (rowId) => rowId === item.id + ); + return findIndex > -1; + }) + .map((item) => { + return { + id: item.id, + }; + }); + console.log(receiptVoList); + if (receiptVoList.length === 0) return; + this.$apis + .DELETERECEIPTRECORD({ + backMoneyNo: this.backMoneyNo, + receiptVoList, + }) + .then((res) => { + if (res.returnCode == "0000") { + this._getNewEOBList(); + } else { + this.$message.error(res.returnMsg); + } + }); }, // 修改ä¿é™©å…¬å¸ changePayor() { - if(this.selectedRowKeys.length > 0 && (this.form.id || this.savedStatus)) { + if ( + this.selectedRowKeys.length > 0 && + (this.form.id || this.savedStatus) + ) { this.$modal.confirm({ title: "æç¤º", content: "是å¦è§£é™¤å·²å…³è”è´¦å•", okText: "确认", cancelText: "å–æ¶ˆ", onOk: () => { - this.selectedRowKeys = [] - this.selectedRows = [] + this.selectedRowKeys = []; + this.selectedRows = []; }, onCancel: () => {}, }); } - this._getNewEOBList() + this._getNewEOBList(); }, pageChange(pager) { this.pagination = { ...this.pagination, ...pager, - } - this._getNewEOBList() + }; + this._getNewEOBList(); }, // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ _getCompanyOptions() { @@ -337,101 +607,110 @@ export default { }, // 获å–已关è”çš„è´¦å• getData() { - this.$apis.QUERYBACKRECEIPTLIST({ - pageNum: 1, - pageSize: 999, - backMoneyNo: this.backMoneyNo, - payorCode: this.form.payorCode - }) - .then((res) => { - if (res.returnCode == "0000") { - const list = res.content.list || []; - this.selectedRowKeys = list.map(d => d.id) - this.selectedRows = list.map(item => { - item.relationed = true - return item - }) - this.relatedList = list.map(d => d.id) - } else { - this.$message.error(res.returnMsg); - } - }); + this.$apis + .QUERYBACKRECEIPTLIST({ + pageNum: 1, + pageSize: 999, + backMoneyNo: this.backMoneyNo, + payorCode: this.form.payorCode, + }) + .then((res) => { + if (res.returnCode == "0000") { + const list = res.content.list || []; + this.selectedRowKeys = list.map((d) => d.id); + this.selectedRows = list.map((item) => { + item.relationed = true; + return item; + }); + this.relatedList = list.map((d) => d.id); + } else { + this.$message.error(res.returnMsg); + } + }); }, // èŽ·å–æ‰€æœ‰è´¦å• - _getNewEOBList(){ - let billDate = this.searchForm.billDate || [] - this.$apis.QUERYBACKRECEIPTINFOLIST({ + _getNewEOBList() { + let billDate = this.searchForm.billDate || []; + this.$apis + .QUERYBACKRECEIPTINFOLIST({ pageNum: this.pagination.pageNum, pageSize: this.pagination.pageSize, backMoneyNo: this.backMoneyNo, payorCode: this.form.payorCode, ...this.searchForm, - receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined, - receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined, + receiptEndDate: billDate[1] ? billDate[1] + " 23:59:59" : undefined, + receiptStartDate: billDate[0] ? billDate[0] + " 00:00:00" : undefined, }) .then((res) => { if (res.returnCode == "0000") { let content = res.content || {}; this.pagination.total = content.total || 0; - this.dataList = content.list || []; + this.dataList = content.list.map(item => { + item.arrearsAmountShow = item.arrearsAmount + item.arrearsAmount = '' + return item + }) || []; } else { this.$message.error(res.returnMsg); } }); }, - //新建/ä¿å˜å›žæ¬¾ - addNewEvt(backStatus){ - return new Promise((resolve,reject)=>{ - console.log(this.selectedRows) - if(!this.form.payorCode){ - this.$message.warning("请选择ä¿é™©å…¬å¸"); - reject(); - return; + //新建/ä¿å˜å›žæ¬¾ + addNewEvt(backStatus) { + return new Promise((resolve, reject) => { + console.log(this.selectedRows); + if (!this.form.payorCode) { + this.$message.warning("请选择ä¿é™©å…¬å¸"); + reject(); + return; } - if(!this.form.backDate){ - this.$message.warning("请选择回款日期"); - reject(); - return; + if (!this.form.backDate) { + this.$message.warning("请选择回款日期"); + reject(); + return; } - if(!this.form.backAmountCny){ - this.$message.warning("请输入回款金é¢"); - reject(); - return; + if (!this.form.backAmountCny) { + this.$message.warning("请输入回款金é¢"); + reject(); + return; } - let receiptVoList = this.selectedRows.map(item => { + let receiptVoList = this.selectedRows.map((item) => { return { id: item.id, backAmount: item.backAmount, - } - }) - const valid = receiptVoList.some(item => { - return !item.backAmount - }) - if(valid) { + arrearsAmount: item.arrearsAmount, + }; + }); + const valid = receiptVoList.some((item) => { + const exist = !item.backAmount && item.backAmount !== 0 + return exist; + }); + if (valid) { this.$message.warning("å˜åœ¨å…³è”è´¦å•æœªè¾“入回款金é¢"); - reject(); - return; + reject(); + return; } - + const formData = { - ...this.form, - receiptVoList, - backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss'):'', - backMoneyNo: this.backMoneyNo, //å›žæ¬¾ç¼–å· - backStatus // 0æš‚å˜ 1结案 - } + ...this.form, + receiptVoList, + backDate: this.form.backDate + ? moment(this.form.backDate).format("YYYY-MM-DD HH:mm:ss") + : "", + backMoneyNo: this.backMoneyNo, //å›žæ¬¾ç¼–å· + backStatus, // 0æš‚å˜ 1结案 + }; // ä¸Šä¼ é™„ä»¶æ ¼å¼è½¬æ¢ - formData.fileList = this.fileList.map(d => { + formData.fileList = this.fileList.map((d) => { const file = { fileName: d.name, - fileUrl: d.url - } - return file - }) + fileUrl: d.url, + }; + return file; + }); - this.$apis.SAVEBACKMONEY(formData) - .then((res) => { + this.$apis.SAVEBACKMONEY(formData).then((res) => { if (res.returnCode == "0000") { this.backMoneyNo = res.content; this.savedStatus = true; @@ -439,7 +718,7 @@ export default { this.selectedRowKeys = []; this.getData(); this._getNewEOBList(); - + // this.$router.go(-1); resolve(); } else { @@ -447,21 +726,21 @@ export default { reject(); } }); - }) + }); }, /* ======== ä¸Šä¼ åŒºåŸŸ ======== */ // ä¸Šä¼ ä¹‹å‰ - beforeUpload(){ + beforeUpload() { const len = this.fileList.length; - if(len >= 5){ - this.$message.warning('ä¸èƒ½è¶…过5个文件'); + if (len >= 5) { + this.$message.warning("ä¸èƒ½è¶…过5个文件"); return false; } return true; }, // åˆ é™¤æ–‡ä»¶ - removeFile(file){ + removeFile(file) { let index; this.fileList.forEach((item, i) => { if (item.uid == file.uid) { @@ -472,25 +751,32 @@ export default { return true; }, // ä¸Šä¼ æ–‡ä»¶ - uploadFile(fileData){ + uploadFile(fileData) { let formData = new FormData(); formData.append("file", fileData.file); - this.$apis.UPLOADIMG(formData) - .then((res)=>{ + this.$apis.UPLOADIMG(formData).then((res) => { fileData.onSuccess(); - let tmp = { - uid: Math.random()*10000, + let tmp = { + uid: Math.random() * 10000, name: res.original, - status: 'done', + status: "done", url: res.url, - } + }; this.fileList.push(tmp); this.$forceUpdate(); - }) + }); }, - // 导出账å•列表 - exportEvt() {} + //导出报表 + exportExcel(){ + let filter = { + backMoneyNo: this.backMoneyNo, + payorCode: this.form.payorCode, + } + this.$apis.EXPORTBACKRECEIPTLIST(filter).then(res => { + exportFile(res, '已关è”è´¦å•.xls'); + }) + } }, }; </script> @@ -505,6 +791,9 @@ export default { .table-title { font-size: 15px; margin: 6px 0; + display: flex; + align-items: center; + justify-content: space-between; } .table-content { margin-bottom: 8px; @@ -525,15 +814,25 @@ export default { color: #ff3b30; } .burt-container { + height: calc(100vh - 86px); display: flex; flex-direction: column; - height: calc(100vh - 110px); - .bill-content { - flex: 1; - min-height: 0; - overflow-y: auto; - overflow-x: hidden; - padding-right: 12px; + ::v-deep { + .ant-tabs { + flex: 1; + min-height: 0; + } + } +} +.bill-content { + height: calc(100vh - 338px); + overflow-y: auto; + overflow-x: hidden; + padding-right: 12px; +} +::v-deep .bill-form { + .ant-form .ant-form-item { + margin-bottom: 4px !important; } } </style>