diff --git a/src/components/Antd/index.js b/src/components/Antd/index.js index f4daa42ce61c789f633fc7ebdbf875a3918a322e..76b2aa67da5d147e1a3d3bd2e6ac6e56fe7f052f 100644 --- a/src/components/Antd/index.js +++ b/src/components/Antd/index.js @@ -1,62 +1,66 @@ -import Vue from "vue"; -import { - Row, - Col, - menu, - dropdown, - Table, - message, - pagination, - FormModel, - Select, - DatePicker, - Input, - InputNumber, - Radio, - upload, - Button, - notification, - popconfirm, - Modal, - modal, - Spin, - Collapse, - Tabs, - Tooltip -} from "ant-design-vue"; - -export default () => { - let els = [ - Row, - Col, - menu, - dropdown, - Table, - message, - pagination, - FormModel, - Select, - DatePicker, - Input, - InputNumber, - Radio, - upload, - Button, - notification, - popconfirm, - Modal, - modal, - Spin, - Collapse, - Tabs, - Tooltip - ]; - // 注册 - els.forEach((item) => { - Vue.use(item); - }); - // 全局æç¤º - Vue.prototype.$msg = notification; - Vue.prototype.$message = message; - Vue.prototype.$modal = Modal; -}; +import Vue from "vue"; +import { + Row, + Col, + menu, + dropdown, + Table, + message, + pagination, + FormModel, + Select, + DatePicker, + Input, + InputNumber, + Radio, + upload, + Button, + notification, + popconfirm, + Modal, + modal, + Spin, + Collapse, + Tabs, + Tooltip, + Popover, + Empty +} from "ant-design-vue"; + +export default () => { + let els = [ + Row, + Col, + menu, + dropdown, + Table, + message, + pagination, + FormModel, + Select, + DatePicker, + Input, + InputNumber, + Radio, + upload, + Button, + notification, + popconfirm, + Modal, + modal, + Spin, + Collapse, + Tabs, + Tooltip, + Popover, + Empty + ]; + // 注册 + els.forEach((item) => { + Vue.use(item); + }); + // 全局æç¤º + Vue.prototype.$msg = notification; + Vue.prototype.$message = message; + Vue.prototype.$modal = Modal; +}; diff --git a/src/components/CUSTOMER/pagation/index.vue b/src/components/CUSTOMER/pagation/index.vue index b4b2c6f01a161b69b839c8c963b89b330a27e7f2..d0367ca77964f96904cda514781ad8ab3f074638 100644 --- a/src/components/CUSTOMER/pagation/index.vue +++ b/src/components/CUSTOMER/pagation/index.vue @@ -1,114 +1,114 @@ -<template> - <!--分页--> - <div class="flex my-pagination" v-if="pagination.total > pagination.pageSize"> - <a-pagination - v-model="pagination.pageNum" - :total="pagination.total" - :page-size="pagination.pageSize" - :item-render="itemRender" - @change="pageChange" - /> - <a-input - v-model.trim="jumpPage" - class="jump-page" - type="number" - :min="0" - @blur="inputPageChange" - /> - </div> -</template> - -<script> -export default { - props: { - //分页器 - pagination: { - default: {}, - }, - }, - data() { - return { - //è·³è½¬åˆ°ç¬¬å‡ é¡µ - jumpPage: "", - }; - }, - methods: { - //自定义分页 - itemRender(current, type, originalElement) { - if (type === "prev") { - return <li class="page pre">上一页</li>; - } else if (type === "next") { - return <li class="page next">下一页</li>; - } else if (type === "page") { - //当å‰é¡µé¢ - if (current == this.pagination.pageNum) { - return ( - <div class="cur-page page"> - <span class="cur">{current}</span>/ - <span class="total"> - {Math.ceil(this.pagination.total / this.pagination.pageSize)} - </span> - </div> - ); - } else { - return null; - } - } else if (type == "jump-prev") { - return null; - } else if (type == "jump-next") { - return null; - } - return originalElement; - }, - //è·³è½¬é¡µé¢ - inputPageChange() { - this.jumpPage = parseInt(this.jumpPage); - let pages = Math.ceil(this.pagination.total / this.pagination.pageSize); - this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage; - this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage; - this.pagination.pageNum = this.jumpPage; - this.$emit("pageChange", { pageNum: this.jumpPage }); - }, - //改å˜åˆ†é¡µ - pageChange(pager) { - this.pagination.pageNum = pager; - this.$emit("pageChange", { pageNum: pager }); - }, - }, -}; -</script> - -<style lang="less" scoped> -.my-pagination { - justify-content: flex-end; - margin-top: 33px; - .page { - width: 80px; - height: 36px; - line-height: 36px; - background: #f8fafb; - font-weight: 400; - color: #252631; - &.cur-page { - background: transparent; - } - span { - font-size: 16px; - font-weight: 400; - &.cur { - color: #4d7cfe; - } - } - } - .jump-page { - width: 80px; - margin-left: 30px; - height: 36px; - text-align: center; - } -} -::v-deep .ant-pagination-jump-prev, -::v-deep .ant-pagination-jump-next { - display: none !important; -} -</style> +<template> + <!--分页--> + <div class="flex my-pagination" v-if="pagination.total > pagination.pageSize"> + <a-pagination + v-model="pagination.pageNum" + :total="pagination.total" + :page-size="pagination.pageSize" + :item-render="itemRender" + @change="pageChange" + /> + <a-input + v-model.trim="jumpPage" + class="jump-page" + type="number" + :min="0" + @blur="inputPageChange" + /> + </div> +</template> + +<script> +export default { + props: { + //分页器 + pagination: { + default: {}, + }, + }, + data() { + return { + //è·³è½¬åˆ°ç¬¬å‡ é¡µ + jumpPage: "", + }; + }, + methods: { + //自定义分页 + itemRender(current, type, originalElement) { + if (type === "prev") { + return <li class="page pre">上一页</li>; + } else if (type === "next") { + return <li class="page next">下一页</li>; + } else if (type === "page") { + //当å‰é¡µé¢ + if (current == this.pagination.pageNum) { + return ( + <div class="cur-page page"> + <span class="cur">{current}</span>/ + <span class="total"> + {Math.ceil(this.pagination.total / this.pagination.pageSize)} + </span> + </div> + ); + } else { + return null; + } + } else if (type == "jump-prev") { + return null; + } else if (type == "jump-next") { + return null; + } + return originalElement; + }, + //è·³è½¬é¡µé¢ + inputPageChange() { + this.jumpPage = parseInt(this.jumpPage); + let pages = Math.ceil(this.pagination.total / this.pagination.pageSize); + this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage; + this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage; + this.pagination.pageNum = this.jumpPage; + this.$emit("pageChange", { pageNum: this.jumpPage }); + }, + //改å˜åˆ†é¡µ + pageChange(pager) { + this.pagination.pageNum = pager; + this.$emit("pageChange", { pageNum: pager }); + }, + }, +}; +</script> + +<style lang="less" scoped> +.my-pagination { + justify-content: flex-end; + margin-top: 33px; + .page { + width: 80px; + height: 36px; + line-height: 36px; + background: #f8fafb; + font-weight: 400; + color: #252631; + &.cur-page { + background: transparent; + } + span { + font-size: 16px; + font-weight: 400; + &.cur { + color: #4d7cfe; + } + } + } + .jump-page { + width: 80px; + margin-left: 30px; + height: 36px; + text-align: center; + } +} +::v-deep .ant-pagination-jump-prev, +::v-deep .ant-pagination-jump-next { + display: none !important; +} +</style> diff --git a/src/views/charge-query/index.vue b/src/views/charge-query/index.vue index bca9c04b3d835adff0dad2a61d248500dce32b32..6a7aa0d47b2fefb8efbd0dc989f22b0abaabde15 100644 --- a/src/views/charge-query/index.vue +++ b/src/views/charge-query/index.vue @@ -90,263 +90,280 @@ <!-- <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> + <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" > + <!-- 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> - <template slot="status" slot-scope="text"> - <span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'æ— æ•ˆ':'' }}</span> - </template> - </a-table> - <!--分页--> - <BurtPagination :pagination="pagination" @pageChange="_getChargeList" /> - </div> + </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> + <template slot="status" slot-scope="text"> + <span :style="{ color: text == 2 ? 'red' : '' }">{{ text == 1 ? '有效' : text == 2 ? 'æ— æ•ˆ' : '' }}</span> + </template> + <template slot="redText" slot-scope="text"> + <span style="color: red">{{ text }}</span> + </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 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: "status", width: 130,scopedSlots: { customRender: "status" } }, - { title: "病历å·", dataIndex: "mrnNo",width: 180}, - { title: "客户姓å",dataIndex: "patientName",width: 120,}, - { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", width: 200 }, - { title: "ä¿é™©å¡", dataIndex: "cardNo", width: 200 }, - { title: "客户生日", dataIndex: "birthday", 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: "账龄", dataIndex: "diffDay", width: 180 }, - { title: "æ“作", key: "operation", width: "175px",fixed: "right",scopedSlots: { customRender: "operation" }, align: "center"}, - ]; - return { - columns, - receiptTypeOptions, - form: {}, - pageForm: { - doctorCode: "", - patientName: "", - mrnNo: "", - paymentCode: "", - payorIds: [], - 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': '退费' - }, - statusOptions: [ - { - name: 'æ— æ•ˆ', - code:2 - }, - { - name: '有效', - code: 1 - } - ] - }; - }, - components: { - BurtPagination, - }, - computed: { - ...mapState({ - userInfo: (state) => state.common.userInfo - }) - }, - created() { - this._getCompanyOptions(); - this._getDoctorListNoPage();//获å–医生下拉选项 - }, - methods: { - moment, - // 选择框ç›é€‰ - filterCode(input, option) { - return ( - option.componentOptions.children[0].text - .toLowerCase() - .indexOf(input.toLowerCase()) >= 0 - ); + 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: 'status', width: 130, scopedSlots: { customRender: 'status' } }, + { title: '病历å·', dataIndex: 'mrnNo', width: 180 }, + { title: '客户姓å', dataIndex: 'patientName', width: 120 }, + { title: 'ä¿é™©å…¬å¸', dataIndex: 'payorName', width: 200 }, + { title: 'ä¿é™©å¡', dataIndex: 'cardNo', width: 200 }, + { title: '客户生日', dataIndex: 'birthday', 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, scopedSlots: { customRender: 'redText' } }, + { title: '备注', dataIndex: 'remark', width: 200, scopedSlots: { customRender: 'redText' } }, + { title: '未清余é¢', dataIndex: 'residueBackAmount', width: 180 }, + { title: '账龄', dataIndex: 'diffDay', width: 180 }, + { + title: 'æ“作', + key: 'operation', + width: '175px', + fixed: 'right', + scopedSlots: { customRender: 'operation' }, + align: 'center' + } + ]; + return { + columns, + receiptTypeOptions, + form: {}, + pageForm: { + doctorCode: '', + patientName: '', + mrnNo: '', + paymentCode: '', + payorIds: [], + 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: '退费' + }, + statusOptions: [ + { + name: 'æ— æ•ˆ', + code: 2 + }, + { + name: '有效', + code: 1 + } + ] + }; + }, + components: { + BurtPagination }, - // 获å–åˆ—è¡¨æ•°æ® - _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"); - }, + computed: { + ...mapState({ + userInfo: (state) => state.common.userInfo + }) + }, + created() { + this._getCompanyOptions(); + this._getDoctorListNoPage(); //获å–医生下拉选项 + }, + methods: { + moment, + // 选择框ç›é€‰ + filterCode(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + // 获å–åˆ—è¡¨æ•°æ® + _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(){ + exportExcel() { let filter = { - ...this.form, - } - this.$apis.RceiptListReport(filter).then(res => { - exportFile(res, 'è´¦å•æŠ¥è¡¨.xls'); - }) - } - }, + ...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; - } + text-align: right; + .ant-form-item-label { + opacity: 0; + } } .ant-btn .icon-class { - .mg-r(10); + .mg-r(10); } </style> diff --git a/src/views/report/returnedMoney.vue b/src/views/report/returnedMoney.vue index 48479658a24550a073484fdba6361f274cf3f368..efddaf673da20e8c5ac87e16feb8f956bef8ef5d 100644 --- a/src/views/report/returnedMoney.vue +++ b/src/views/report/returnedMoney.vue @@ -1,215 +1,238 @@ <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-select v-model="form.payorCode" placeholder="请选择" show-search allowClear :filterOption="filterCode"> - <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode"> - {{ 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-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="6" :lg="6" :sm="12"> - <a-form-model-item label="è´¦å•èµ·æ¢æ—¥æœŸ"> - <a-range-picker - format="YYYY-MM-DD" - format-value="YYYY-MM-DD" - v-model="billRange" - :placeholder="['开始时间','ç»“æŸæ—¶é—´']" - @change="onSelectBillTime" - /> - </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" - format-value="YYYY-MM-DD" - v-model="returnRange" - :placeholder="['开始时间','ç»“æŸæ—¶é—´']" - @change="onSelectReturnTime" - /> - </a-form-model-item> - </a-col> - <a-col :xl="10" :lg="10" :sm="12" class="none-label"> - <a-form-model-item label="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> + <!-- 收费查询-è´¦å•æŸ¥è¯¢ --> + <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-select v-model="form.payorCode" placeholder="请选择" show-search allowClear :filterOption="filterCode"> + <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode"> + {{ 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-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="6" :lg="6" :sm="12"> + <a-form-model-item label="è´¦å•èµ·æ¢æ—¥æœŸ"> + <a-range-picker + format="YYYY-MM-DD" + format-value="YYYY-MM-DD" + v-model="billRange" + :placeholder="['开始时间', 'ç»“æŸæ—¶é—´']" + @change="onSelectBillTime" + /> + </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" + format-value="YYYY-MM-DD" + v-model="returnRange" + :placeholder="['开始时间', 'ç»“æŸæ—¶é—´']" + @change="onSelectReturnTime" + /> + </a-form-model-item> + </a-col> + <a-col :xl="10" :lg="10" :sm="12" class="none-label"> + <a-form-model-item label="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" - :rowKey="record => {record.id+record.backMoneyNo}" - > - <template slot="index" slot-scope="text, record, index"> - {{ index + 1 }} - </template> - </a-table> - <!--分页--> - <BurtPagination :pagination="pagination" @pageChange="getList" /> - </div> + <!-- table --> + <a-table + :columns="columns" + :data-source="dataList" + :scroll="{ x: true }" + :pagination="false" + :rowKey=" + (record) => { + record.id + record.backMoneyNo; + } + " + > + <template slot="index" slot-scope="text, record, index"> + {{ index + 1 }} + </template> + </a-table> + <!--分页--> + <BurtPagination :pagination="pagination" @pageChange="getList" /> + </div> </template> <script> -import BurtPagination from "@/components/CUSTOMER/pagation"; +import BurtPagination from '@/components/CUSTOMER/pagation'; import { exportFile } from '@/utils/index'; export default { - data() { - const columns = [ - { title: "åºå·", dataIndex: "index", key:"index",align:'center', width: 80,scopedSlots: { customRender: "index" }}, - { title: "病历å·", dataIndex: "mrnNo",width: 120}, - { title: "客户姓å",dataIndex: "patientName",width: 120,}, - { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", width: 120 }, - { title: "客户生日", dataIndex: "birthday", width: 120 }, - { title: "ä¿é™©å¡å·", dataIndex: "cardNo", width: 120 }, - { title: "è´¦å•ç¼–å·", dataIndex: "receiptNo", width: 120 }, - { title: "è´¦å•æ—¥æœŸ", dataIndex: "receiptDate", width: 120 }, - { title: "æ”¶é“¶", dataIndex: "receiptTellerName", width: 120 }, - { title: "è´¦å•金é¢", dataIndex: "actualAmount", width: 120 }, - { title: "回款金é¢", dataIndex: "paidAmountEob", width: 120 }, - { title: "回款日期", dataIndex: "eobBackDate", width: 120 }, - { title: "回款编å·", dataIndex: "backMoneyNo", width: 120 }, - { title: "EOBå·", dataIndex: "eobNo", width: 120 }, - { title: "EOB备注", dataIndex: "eobName", width: 120 }, - { title: "账龄", dataIndex: "diffDay", width: 120 }, - ]; - return { - columns, - billRange: null, - returnRange: null, - form: { - payorCode: '', - mrnNo: '', - patientName: '', - receiptDateStart: '', - receiptDateEnd: '', - eobBackDateStart: '', - eobBackDateEnd: '' - }, - pageForm: {}, // æœç´¢form + data() { + const columns = [ + { + title: 'åºå·', + dataIndex: 'index', + key: 'index', + align: 'center', + width: 80, + scopedSlots: { customRender: 'index' } + }, + { title: '病历å·', dataIndex: 'mrnNo', width: 120 }, + { title: '客户姓å', dataIndex: 'patientName', width: 120 }, + { title: 'ä¿é™©å…¬å¸', dataIndex: 'payorName', width: 120 }, + { title: '客户生日', dataIndex: 'birthday', width: 120 }, + { title: 'ä¿é™©å¡å·', dataIndex: 'cardNo', width: 120 }, + { title: 'è´¦å•ç¼–å·', dataIndex: 'receiptNo', width: 120 }, + { title: 'è´¦å•æ—¥æœŸ', dataIndex: 'receiptDate', width: 120 }, + { title: 'æ”¶é“¶', dataIndex: 'receiptTellerName', width: 120 }, + { title: 'è´¦å•金é¢', dataIndex: 'actualAmount', width: 120 }, + { title: '回款金é¢', dataIndex: 'paidAmountEob', width: 120 }, + { + title: 'ä¸ªäººæ¬ è´¹', + dataIndex: 'arrearsAmount', + width: 120, + customRender: (val) => { + return <span style="color: red;">{val}</span>; + } + }, + { + title: '备注', + dataIndex: 'remark', + width: 180, + customRender: (val) => { + return <span style="color: red;">{val}</span>; + } + }, + { title: '回款日期', dataIndex: 'eobBackDate', width: 120 }, + { title: '回款编å·', dataIndex: 'backMoneyNo', width: 120 }, + { title: 'EOBå·', dataIndex: 'eobNo', width: 120 }, + { title: 'EOB备注', dataIndex: 'eobName', width: 120 }, + { title: '账龄', dataIndex: 'diffDay', width: 120 } + ]; + return { + columns, + billRange: null, + returnRange: null, + form: { + payorCode: '', + mrnNo: '', + patientName: '', + receiptDateStart: '', + receiptDateEnd: '', + eobBackDateStart: '', + eobBackDateEnd: '' + }, + pageForm: {}, // æœç´¢form - companyOptions: [], //ä¿é™©å…¬å¸ - dataList: [], - pagination: { - pageNum: 1, - pageSize: 10, - total: 0 - }, - }; - }, - components: { - BurtPagination, - }, - created() { - this.getList(); - this._getCompanyOptions(); - }, - methods: { - // 选择框ç›é€‰ - filterCode(input, option) { - return ( - option.componentOptions.children[0].text - .toLowerCase() - .indexOf(input.toLowerCase()) >= 0 - ); + companyOptions: [], //ä¿é™©å…¬å¸ + dataList: [], + pagination: { + pageNum: 1, + pageSize: 10, + total: 0 + } + }; }, - // 获å–åˆ—è¡¨æ•°æ® - getList() { - const data = { - ...this.pageForm, - ...this.pagination, - }; - this.$apis.backMoneyReport(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 || []; - }); - }, + components: { + BurtPagination + }, + created() { + this.getList(); + this._getCompanyOptions(); + }, + methods: { + // 选择框ç›é€‰ + filterCode(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + // 获å–åˆ—è¡¨æ•°æ® + getList() { + const data = { + ...this.pageForm, + ...this.pagination + }; + this.$apis.backMoneyReport(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 || []; + }); + }, - onSelectBillTime(date, dateString) { - this.form.receiptDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '' - this.form.receiptDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '' - }, - onSelectReturnTime(date, dateString) { - this.form.eobBackDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '' - this.form.eobBackDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '' - }, + onSelectBillTime(date, dateString) { + this.form.receiptDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : ''; + this.form.receiptDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : ''; + }, + onSelectReturnTime(date, dateString) { + this.form.eobBackDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : ''; + this.form.eobBackDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : ''; + }, - // é‡ç½® - handlerReset() { - this.form = {} - this.returnRange = null; - this.billRange = null; - }, + // é‡ç½® + handlerReset() { + this.form = {}; + this.returnRange = null; + this.billRange = null; + }, - // æœç´¢ - handlerSearch() { - this.$refs.form.validate((valid) => { - if (!valid) { - return false; - } - this.pagination.pageNum = 1; - this.pageForm = this.$lodash.cloneDeep(this.form); - this.getList(); - }); - }, + // æœç´¢ + handlerSearch() { + this.$refs.form.validate((valid) => { + if (!valid) { + return false; + } + this.pagination.pageNum = 1; + this.pageForm = this.$lodash.cloneDeep(this.form); + this.getList(); + }); + }, - //导出报表 - exportExcel(){ - let filter = { - ...this.form, - } - this.$apis.exportBackMoneyReport(filter).then(res => { - exportFile(res, 'è´¦å•回款报表.xls'); - }) - } - }, + //导出报表 + exportExcel() { + let filter = { + ...this.form + }; + this.$apis.exportBackMoneyReport(filter).then((res) => { + exportFile(res, 'è´¦å•回款报表.xls'); + }); + } + } }; </script> <style lang="less" scoped> .none-label { - text-align: left; - .ant-form-item-label { - opacity: 0; - } + text-align: left; + .ant-form-item-label { + opacity: 0; + } } .ant-btn .icon-class { - .mg-r(10); + .mg-r(10); } </style> diff --git a/src/views/verification/collectionDetail.vue b/src/views/verification/collectionDetail.vue index 90aa432e8e2198ec5d649ed5388d294797439c86..35974105243614c78c20c6fc49688d31fc26e716 100644 --- a/src/views/verification/collectionDetail.vue +++ b/src/views/verification/collectionDetail.vue @@ -1,907 +1,1037 @@ <template> - <div class="white_bg burt-container"> - <Goback title="回款详情" /> - <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-select - v-model="form.payorCode" - placeholder="请选择ä¿é™©å…¬å¸" - allow-clear - show-search - :disabled="!isEdit" - @change="changePayor" - :filterOption="filterCode" - > - <a-select-option - v-for="item in companyOptions" - :key="item.payorCode" - :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-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 - show-search - :filter-option="filterOption" - :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> - <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: '100%', y: 450 }" - :pagination="false" - > - <template slot="status" slot-scope="text"> - <span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'æ— æ•ˆ':'' }}</span> - </template> - <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="5" :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="4" :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="4" :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"> - <a-form-model-item label="状æ€"> - <a-select style="width: 160px;" v-model="searchForm.rStatus" placeholder="请选择状æ€" allowClear> - <a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code"> - {{ item.name }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="4" :sm="12"> - <a-form-model-item label="è´¦å•ç¼–å·"> - <a-input - v-model="searchForm.receiptNo" - placeholder="请输入账å•ç¼–å·" - allow-clear - :disabled="!isEdit" - /> - </a-form-model-item> - </a-col> - <a-col :lg="2" :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: '100%', y: 300 }" - :pagination="false" - :rowKey="'id'" - :row-selection="{ - selectedRowKeys: selectedRowKeys, - onSelect: onSelectChange, - onSelectAll: onSelectAll, - }" - > - <template slot="status" slot-scope="text"> - <span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'æ— æ•ˆ':'' }}</span> - </template> - </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> + <div ref="burt" class="white_bg burt-container"> + <Goback ref="goback" title="回款详情" /> + <a-tabs v-model="activeKey" @change="paneChange"> + <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title"> + <a-form-model ref="ruleForm" :model="form" :rules="rules"> + <a-row :gutter="30"> + <template v-if="activeKey === '0'"> + <a-col :lg="7" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸" prop="payorCode"> + <a-select + v-model="form.payorCode" + placeholder="请选择ä¿é™©å…¬å¸" + allow-clear + show-search + :disabled="!isEdit" + style="min-width: 200px; max-width: 250px" + @change="changePayor" + :filterOption="filterCode" + > + <a-select-option v-for="item in companyOptions" :key="item.payorCode" :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="回款日期" prop="backDate"> + <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="6" :sm="12"> + <a-form-model-item label="回款金é¢(人民å¸)" prop="backAmountCny"> + <a-input + class="fixed_width" + 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 class="fixed_width" v-model="residueBackAmount" disabled /> + </a-form-model-item> + </a-col> + <a-col :lg="7" :sm="12"> + <a-form-model-item label="回款金é¢(美元)"> + <a-input + class="fixed_width" + type="number" + v-model="form.backAmountUsd" + 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="form.backExchangeRate" placeholder="请输入金é¢" allow-clear :disabled="!isEdit" /> + </a-form-model-item> + </a-col> + <a-col :lg="6" :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> + </template> + <template v-else> + <a-col :lg="9" :sm="12"> + <a-form-model-item label="ä¿é™©å…¬å¸" prop="payorCode"> + <a-select + v-model="form.payorCode" + placeholder="请选择ä¿é™©å…¬å¸" + allow-clear + show-search + :disabled="!isEdit" + style="min-width: 200px" + @change="changePayor" + :filterOption="filterCode" + > + <a-select-option v-for="item in companyOptions" :key="item.payorCode" :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="回款金é¢(人民å¸)" prop="backAmountCny"> + <a-input + class="fixed_width" + type="number" + v-model="form.backAmountCny" + placeholder="请输入金é¢" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col :lg="7" :sm="12"> + <a-form-model-item label="坿 ¸é”€ä½™é¢"> + <a-input class="fixed_width" v-model="residueBackAmount" disabled /> + </a-form-model-item> + </a-col> + </template> + </a-row> + </a-form-model> + <template v-if="activeKey === '1'"> + <div class="bill-content"> + <a-tabs type="card" v-model="activeKey1"> + <a-tab-pane v-for="pane in panes1" :key="pane.key" :tab="pane.title"> + <div> + <a-row type="flex" align="middle" class="search-form"> + <a-form-model + ref="searchForm" + layout="inline" + :labelCol="{ span: 8 }" + :wrapperCol="{ span: 16 }" + :model="searchForm" + > + <a-row> + <a-col :lg="4" :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> + </a-col> + <a-col :lg="4" :sm="12"> + <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="4" :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"> + <a-form-model-item label="状æ€" :labelCol="{ span: 7 }" :wrapperCol="{ span: 14 }"> + <a-select v-model="searchForm.rStatus" placeholder="请选择状æ€" allowClear> + <a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code"> + {{ item.name }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + <a-col :lg="4" :sm="12"> + <a-form-model-item label="è´¦å•ç¼–å·"> + <a-input + v-model="searchForm.receiptNo" + placeholder="请输入账å•ç¼–å·" + allow-clear + :disabled="!isEdit" + /> + </a-form-model-item> + </a-col> + <a-col class="flex-col" :lg="4" :sm="12"> + <div> + <a-button type="primary" @click="searchData"> + <Icon name="ssisearch_active" :size="14" />查询 + </a-button> + </div> + <div v-if="activeKey1 === '0' && selectedRows.length > 0"> + <a-button type="primary" @click="exportExcel"> + <Icon name="ssidaochu" :size="14" />导出 + </a-button> + </div> + </a-col> + </a-row> + </a-form-model> + </a-row> + </div> + <!-- 已关è”è´¦å• --> + <template v-if="activeKey1 === '0'"> + <template v-if="selectedRows.length > 0"> + <div class="all-list_box"> + <a-table + class="table-content" + :rowClassName="rowClassName" + :columns="selectedColumns" + :data-source="selectedRows" + :rowKey="'id'" + :scroll="{ x: '100%', y: tableHeight }" + :pagination="false" + > + <template slot="status" slot-scope="text"> + <span :style="{ color: text == 2 ? 'red' : '' }">{{ + text == 1 ? '有效' : text == 2 ? 'æ— æ•ˆ' : '' + }}</span> + </template> + <template slot="operation" slot-scope="text, record, index"> + <a-button type="link" class="danger" @click.stop="delRecord(record, index)">åˆ é™¤</a-button> + </template> + </a-table> + </div> + </template> + <div class="all-list_box no-data" v-else><a-empty :image="simpleImage" /></div> + </template> + <template v-else> + <!-- table --> + <template v-if="isEdit"> + <div class="all-list_box"> + <a-table + class="table-content all-list" + :columns="columns" + :data-source="dataList" + :scroll="{ x: '100%', y: tableHeight1 }" + :pagination="false" + :rowKey="'id'" + :row-selection="{ + selectedRowKeys: selectedRowKeys, + onSelect: onSelectChange, + onSelectAll: onSelectAll + }" + > + <template slot="status" slot-scope="text"> + <span :style="{ color: text == 2 ? 'red' : '' }">{{ + text == 1 ? '有效' : text == 2 ? 'æ— æ•ˆ' : '' + }}</span> + </template> + </a-table> + <BurtPagination class="pagination" :pagination="pagination" @pageChange="pageChange" /> + </div> + </template> + </template> + </a-tab-pane> + </a-tabs> + </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 { Empty } from 'ant-design-vue'; +import Goback from '@/components/CUSTOMER/goback'; +import BurtPagination from '@/components/CUSTOMER/pagation'; +import { EOBStatusOptions } from '@/utils/utilsdictOptions.js'; import { exportFile } from '@/utils/index'; -import moment from "moment"; -import mixins from "@/mixins"; +import moment from 'moment'; +import mixins from '@/mixins'; +const panes = [ + { title: '基础信æ¯', key: '0', show: true, content: 'PaymentClaims' }, + { title: 'è´¦å•列表', key: '1', show: false, content: 'Insurance' } +]; export default { - data() { - return { - isEdit: false, - EOBStatusOptions, - dialogShow: false, - form: { - payorCode: "", - backDate: null, - backAmountCny: "", - backAmountUsd: "", - backExchangeRate: "", - eobNos: "", // EOBç¼–å· - eobRemark: "", // EOB备注 - }, - fileList: [], // ä¸Šä¼ æ–‡ä»¶åˆ—è¡¨ - dataList: [], - isEditNewEOB: false, //是å¦åœ¨æ–°å»ºå›žæ¬¾ - companyOptions: [], //ä¿é™©å…¬å¸ - pagination: { - pageNum: 1, - pageSize: 5, - total: 0, - }, - selectedRowKeys: [], // Check here to configure the default column - selectedRows: [], // Check here to configure the default column - backMoneyNo: "", - editRules: { - backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }], - backAmount: [{ required: true, message: "请输入", trigger: "blur" }], - }, + data() { + return { + isEdit: false, + EOBStatusOptions, + dialogShow: false, + form: { + payorCode: undefined, + backDate: null, + backAmountCny: '', + backAmountUsd: '', + backExchangeRate: '', + eobNos: '', // EOBç¼–å· + eobRemark: '' // EOB备注 + }, + fileList: [], // ä¸Šä¼ æ–‡ä»¶åˆ—è¡¨ + dataList: [], + isEditNewEOB: false, //是å¦åœ¨æ–°å»ºå›žæ¬¾ + companyOptions: [], //ä¿é™©å…¬å¸ + pagination: { + pageNum: 1, + pageSize: 5, + total: 0 + }, + selectedRowKeys: [], // Check here to configure the default column + selectedRows: [], // Check here to configure the default column + backMoneyNo: '', + rules: { + payorCode: [{ required: true, message: '请选择ä¿é™©å…¬å¸', trigger: 'change' }], + backDate: [{ required: true, message: '请选择回款日期', trigger: 'change' }], + backAmountCny: [{ required: true, message: '请输入回款金é¢(人民å¸)', trigger: ['change', 'blur'] }] + }, - searchForm: { - billDate: [], - mrnNo: "", // ç—…åŽ†å· - patientName: "", // 客户åå— - }, - savedStatus: false, //是å¦å·²ä¿å˜ - relatedList: [], + searchForm: { + billDate: [], + mrnNo: '', // ç—…åŽ†å· + patientName: '' // 客户åå— + }, + savedStatus: false, //是å¦å·²ä¿å˜ + relatedList: [], - panes: [ - { title: "基础信æ¯", key: "0", show: true, content: "PaymentClaims" }, - { title: "è´¦å•列表", key: "1", show: false, content: "Insurance" }, - ], - activeKey: "0", - statusOptions: [ - { - name: 'æ— æ•ˆ', - code:2 - }, - { - name: '有效', - code: 1 - } - ] - }; - }, - mixins: [mixins], - components: { - Goback, - BurtPagination, - }, - computed: { - columns() { - const base = [ - { - title: "è´¦å•ç¼–å·", - dataIndex: "receiptNo", - ellipsis: true, - width: 150, - }, - { - title: "è´¦å•状æ€", - dataIndex: "status", - ellipsis: true, - width: 150 - ,scopedSlots: { customRender: "status" } - }, - { title: "病历å·", dataIndex: "mrnNo", ellipsis: true, width: 195 }, - { - title: "客户姓å", - dataIndex: "patientName", - ellipsis: true, - width: 160, - }, - { title: "ä¿é™©å…¬å¸", dataIndex: "payorName", ellipsis: true, width: 195 }, - { - 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[8] = { - title: "回款金é¢", - dataIndex: "backAmount", - ellipsis: true, - width: 150, - customRender: (val, row) => { - return ( - <a-input-number - v-model={row.backAmount} - allow-clear - disabled={!this.isEdit} - style={{"color": row.backAmount == row.currentReceiptAmount ? '' : 'red'}} - onBlur={() => { - changeAmount(row); - }} - /> - - ); - }, - }; - base[10] = { - 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[9] = { - 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(8, 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; - }, - // 坿 ¸é”€ä½™é¢ - residueBackAmount() { - 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; - 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; + panes: Object.seal(panes), + activeKey: '0', + activeKey1: '0', + statusOptions: [ + { + name: 'æ— æ•ˆ', + code: 2 + }, + { + name: '有效', + code: 1 + } + ], + tableHeight: 200, // 已关è”è´¦å•è¡¨æ ¼é«˜åº¦ + tableHeight1: 200 // 全部账å•è¡¨æ ¼é«˜åº¦ + }; + }, + mixins: [mixins], + components: { + Goback, + BurtPagination + }, + computed: { + panes1() { + const panes = [{ title: '已关è”è´¦å•', key: '0', show: true, content: 'Associated' }]; + if (this.isEdit) { + panes.push({ title: '全部账å•', key: '1', show: false, content: 'Insurance' }); + } + return panes; + }, + columns() { + const base = [ + { + title: 'è´¦å•æ—¥æœŸ', + dataIndex: 'receiptDate', + ellipsis: true, + width: 160, + fixed: 'left' + }, + { + title: 'è´¦å•状æ€', + dataIndex: 'status', + ellipsis: true, + width: 100, + fixed: 'left', + scopedSlots: { customRender: 'status' } + }, + { + title: '客户姓å', + dataIndex: 'patientName', + ellipsis: true, + fixed: 'left', + width: 180 + }, + { title: '病历å·', dataIndex: 'mrnNo', ellipsis: true, width: 195 }, + { title: 'ä¿é™©å…¬å¸', dataIndex: 'payorName', ellipsis: true, width: 195 }, + { + title: 'è´¦å•ç¼–å·', + dataIndex: 'receiptNo', + ellipsis: true, + width: 150 + }, + { + title: 'ç†èµ”è´¦å•金é¢', + dataIndex: 'actualAmount', + ellipsis: true, + width: 150 + }, + { + title: 'æ”¶é“¶', + dataIndex: 'receiptTellerName', + ellipsis: true, + width: 120 + }, + { + title: '回款金é¢', + dataIndex: 'writeOffAmount', + ellipsis: true, + width: 150 + }, + { + title: 'ä¸ªäººæ¬ è´¹', + dataIndex: 'arrearsAmountShow', + ellipsis: true, + width: 150, + customRender: (val) => { + return <span style="color: red;">{val}</span>; + } + }, + { + title: '备注', + dataIndex: 'remark', + ellipsis: true, + width: 200, + customRender: (val) => { + return <span style="color: red;">{val}</span>; + } + }, + { + title: '未清余é¢', + dataIndex: 'residueBackAmount', + ellipsis: true, + width: 150 + } + ]; + return base; + }, + selectedColumns() { + const base = JSON.parse(JSON.stringify(this.columns)); + const changeAmount = this.changeAmount; + base[8] = { + title: '回款金é¢', + dataIndex: 'backAmount', + ellipsis: true, + width: 150, + customRender: (val, row) => { + return ( + <a-input-number + v-model={row.backAmount} + allow-clear + disabled={!this.isEdit} + style={{ color: row.backAmount == row.currentReceiptAmount ? '' : 'red' }} + onBlur={() => { + changeAmount(row, 'backAmount'); + }} + /> + ); + } + }; + base[10].customRender = (val, row) => { + return ( + <div> + {this.isEdit ? ( + <a-popover title="备注" trigger="click"> + <template slot="content"> + <a-textarea + class="remark_inp red_inp" + v-model={row.remark} + auto-size={{ minRows: 3, maxRows: 5 }} + allow-clear + disabled={!this.isEdit} + ></a-textarea> + </template> + <a-tooltip> + <template slot="title">{row.remark}</template> + <a-input class="red_inp" v-model={row.remark} allow-clear disabled={!this.isEdit} /> + </a-tooltip> + </a-popover> + ) : ( + <a-tooltip> + <template slot="title">{row.remark}</template> + <a-input v-model={row.remark} disabled /> + </a-tooltip> + )} + </div> + ); + }; + base[11] = { + 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[9] = { + title: 'ä¸ªäººæ¬ è´¹', + dataIndex: 'arrearsAmount', + ellipsis: true, + width: 150, + customRender: (val, row) => { + return ( + <a-input-number + class="red_inp" + v-model={row.arrearsAmount} + allow-clear + disabled={!this.isEdit} + onBlur={() => { + changeAmount(row, 'arrearsAmount'); + }} + /> + ); + } + }; + base.splice(8, 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; + }, + // 坿 ¸é”€ä½™é¢ + residueBackAmount() { + let totalMoney = Number(this.form.backAmountCny || 0); + this.selectedRows.forEach((item) => { + totalMoney -= Number(item.backAmount); + }); + return Number(totalMoney.toFixed(2)); + } + }, + created() { + this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE; + 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 (backMoneyDataDetail.fileList) { - this.fileList = backMoneyDataDetail.fileList.map((d) => { - const file = { - uid: Math.random() * 10000, - name: d.fileName, - status: "done", - url: d.fileUrl, - }; - return file; - }); - } - this.getData(); - } - this._getNewEOBList(); - }, - methods: { - moment, - // 选择框ç›é€‰ - filterCode(input, option) { - return ( - option.componentOptions.children[0].text - .toLowerCase() - .indexOf(input.toLowerCase()) >= 0 - ); + // å¦‚æžœæœ‰ä¸Šä¼ é™„ä»¶åˆ™æ˜¾ç¤ºåˆ—è¡¨ + if (backMoneyDataDetail.fileList) { + this.fileList = backMoneyDataDetail.fileList.map((d) => { + const file = { + uid: Math.random() * 10000, + name: d.fileName, + status: 'done', + url: d.fileUrl + }; + return file; + }); + } + this.getData(); + } + }, + mounted() { + this.calcTableHeight(); + this._getNewEOBList(); }, - paneChange() { - this.panes.forEach((item) => { - item.show = false; - }); - this.panes[Number(this.activeKey)].show = true; - }, - changeAmount(row) { - let totalMoney = Number(this.form.backAmountCny || 0); - this.selectedRows.forEach((item) => { - totalMoney -= Number(item.backAmount); - }); - if(totalMoney < 0){ - this.$message.error('坿 ¸é”€ä½™é¢ä¸è¶³') - } - if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) { - this.$message.warning("录入账å•回款金é¢å¤§äºŽè´¦å•金é¢"); - } - }, - onSelectChange(selectedRow, selected) { - selectedRow['backAmount'] = this.residueBackAmount > selectedRow.currentReceiptAmount ? selectedRow.currentReceiptAmount: this.residueBackAmount; - 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]); - } - this.addNewEvt(0) - }, - 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); - } 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); - } - }, - delRecord(record, index) { - this.selectedRowKeys.splice(index, 1); - this.selectedRows.splice(index, 1); - if (record.relationed) { - // å·²ç»å…³è”的调用接å£åˆ 除 - 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); - } - }); - }, - // 修改ä¿é™©å…¬å¸ - changePayor() { - if ( - this.selectedRowKeys.length > 0 && - (this.form.id || this.savedStatus) - ) { - this.$modal.confirm({ - title: "æç¤º", - content: "是å¦è§£é™¤å·²å…³è”è´¦å•", - okText: "确认", - cancelText: "å–æ¶ˆ", - onOk: () => { - this.selectedRowKeys = []; - this.selectedRows = []; - }, - onCancel: () => {}, - }); - } - this._getNewEOBList(); - }, - pageChange(pager) { - this.pagination = { - ...this.pagination, - ...pager, - }; - this._getNewEOBList(); - }, - // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ - _getCompanyOptions() { - this.$apis.GETCOMPANYOPTIONS().then((res) => { - this.companyOptions = res.content || []; - }); - }, - // 获å–已关è”çš„è´¦å• - 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); - } - }); - }, - // èŽ·å–æ‰€æœ‰è´¦å• - _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, - }) - .then((res) => { - if (res.returnCode == "0000") { - let content = res.content || {}; - this.pagination.total = content.total || 0; - 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; - } - if (!this.form.backDate) { - this.$message.warning("请选择回款日期"); - reject(); - return; - } - if (!this.form.backAmountCny) { - this.$message.warning("请输入回款金é¢"); - reject(); - return; - } - let receiptVoList = this.selectedRows.map((item) => { - return { - id: item.id, - backAmount: item.backAmount, - arrearsAmount: item.arrearsAmount, - }; - }); - const valid = receiptVoList.some((item) => { - const exist = !item.backAmount && item.backAmount !== 0 - return exist; - }); - if (valid) { - this.$message.warning("å˜åœ¨å…³è”è´¦å•æœªè¾“入回款金é¢"); - reject(); - return; - } + methods: { + moment, + // è®¡ç®—è¡¨æ ¼æœ€å¤§é«˜åº¦ + calcTableHeight() { + const dom = this.$refs.burt; + const containterH = dom.clientHeight; + const gobackH = document.querySelector('.back-container').clientHeight; + const style = window.getComputedStyle(dom, null); + const paddingT = parseFloat(style.getPropertyValue('padding-top')); + const paddingB = parseFloat(style.getPropertyValue('padding-bottom')); + const paddingSum = paddingT + paddingB; + this.tableHeight = containterH - 300 - gobackH - paddingSum; + this.tableHeight1 = containterH - 340 - gobackH - paddingSum; + // 设置æ¯é¡µå±•ç¤ºæ¡æ•° + const pageSize = Math.floor((this.tableHeight1 - 10) / 32); + this.$set(this.pagination, 'pageSize', pageSize); + }, + // 已关è”è´¦å•è¡¨æ ¼è¡Œç±»å + rowClassName(record) { + return record.hidden ? 'hide_' : ''; + }, + // è´¦å•æŸ¥è¯¢ + searchData() { + this._getNewEOBList(); + this.getData(); + }, + // 选择框ç›é€‰ + filterCode(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + paneChange() { + this.$refs.ruleForm[0].clearValidate(); + this.panes.forEach((item) => { + item.show = false; + }); + this.panes[Number(this.activeKey)].show = true; + }, + changeAmount(row) { + let totalMoney = Number(this.form.backAmountCny || 0); + this.selectedRows.forEach((item) => { + totalMoney -= Number(item.backAmount); + }); + if (totalMoney < 0) { + this.$message.error('坿 ¸é”€ä½™é¢ä¸è¶³'); + } + if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) { + this.$message.warning('录入账å•回款金é¢å¤§äºŽè´¦å•金é¢'); + } + }, + onSelectChange(selectedRow, selected) { + selectedRow['backAmount'] = + this.residueBackAmount > selectedRow.currentReceiptAmount + ? selectedRow.currentReceiptAmount + : this.residueBackAmount; + 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]); + } + this.addNewEvt(0); + }, + onSelectAll(selected, selectedRows, changeRows) { + if (selected) { + this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map((item) => item.id)); + changeRows.forEach((item) => { + const obj = { + ...item, + backAmount: + this.residueBackAmount > item.currentReceiptAmount ? item.currentReceiptAmount : this.residueBackAmount + }; + this.selectedRows.push(obj); + }); + // this.selectedRows = this.selectedRows.concat(chgRows); + } 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); + } + this.addNewEvt(0); + }, + delRecord(record, index) { + this.selectedRowKeys.splice(index, 1); + this.selectedRows.splice(index, 1); + if (record.relationed) { + // å·²ç»å…³è”的调用接å£åˆ 除 + this._confirmDelReceipt([record]); + } + }, + _confirmDelReceipt(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 + }; + }); + 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)) { + this.$modal.confirm({ + title: 'æç¤º', + content: '是å¦è§£é™¤å·²å…³è”è´¦å•', + okText: '确认', + cancelText: 'å–æ¶ˆ', + onOk: () => { + this.selectedRowKeys = []; + this.selectedRows = []; + }, + onCancel: () => {} + }); + } + this._getNewEOBList(); + }, + pageChange(pager) { + this.pagination = { + ...this.pagination, + ...pager + }; + this._getNewEOBList(); + }, + // 获å–ä¿é™©å…¬å¸ä¸‹æ‹‰é€‰é¡¹ + _getCompanyOptions() { + this.$apis.GETCOMPANYOPTIONS().then((res) => { + this.companyOptions = res.content || []; + }); + }, + // 获å–已关è”çš„è´¦å• + getData() { + if (!this.backMoneyNo) { + if (this.activeKey1 === '0') { + this.$message.error('暂未关è”è´¦å•,请在全部账å•䏿·»åŠ è´¦å•'); + } + return; + } + let billDate = this.searchForm.billDate || []; + this.$apis + .QUERYBACKRECEIPTLIST({ + pageNum: 1, + pageSize: 999, + backMoneyNo: this.backMoneyNo, + ...this.searchForm, + receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined, + receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined + }) + .then((res) => { + if (res.returnCode == '0000') { + const list = res.content.list || []; + let ids = []; + this.selectedRows = list.map((item) => { + item.relationed = true; + ids.push(item.id); + return item; + }); + this.selectedRowKeys = this.$lodash.cloneDeep(ids); + this.relatedList = this.$lodash.cloneDeep(ids); + } else { + this.$message.error(res.returnMsg); + } + }); + }, + // èŽ·å–æ‰€æœ‰è´¦å• + _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 + }) + .then((res) => { + if (res.returnCode == '0000') { + let content = res.content || {}; + this.pagination.total = content.total || 0; + this.dataList = + content.list.map((item) => { + item.arrearsAmountShow = item.arrearsAmount; + item.arrearsAmount = ''; + return item; + }) || []; + } else { + this.$message.error(res.returnMsg); + } + }); + }, + //新建/ä¿å˜å›žæ¬¾ + addNewEvt(backStatus) { + if (!this.form.payorCode) { + this.$message.warning('请选择ä¿é™©å…¬å¸'); + return; + } + if (!this.form.backDate) { + this.$message.warning('请选择回款日期'); + return; + } + if (!this.form.backAmountCny && this.form.backAmountCny !== 0) { + this.$message.warning('请输入回款金é¢(人民å¸)'); + return; + } + let receiptVoList = this.selectedRows.map((item) => { + return { + id: item.id, + backAmount: item.backAmount, + arrearsAmount: item.arrearsAmount, + remark: item.remark + }; + }); + const flag = receiptVoList.some((item) => { + const exist = !item.backAmount && item.backAmount !== 0; + return exist; + }); + if (flag) { + this.$message.warning('å˜åœ¨å…³è”è´¦å•æœªè¾“入回款金é¢'); + 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结案 - }; + 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结案 + }; - // ä¸Šä¼ é™„ä»¶æ ¼å¼è½¬æ¢ - formData.fileList = this.fileList.map((d) => { - const file = { - fileName: d.name, - fileUrl: d.url, - }; - return file; - }); + // ä¸Šä¼ é™„ä»¶æ ¼å¼è½¬æ¢ + formData.fileList = this.fileList.map((d) => { + const file = { + fileName: d.name, + fileUrl: d.url + }; + return file; + }); - this.$apis.SAVEBACKMONEY(formData).then((res) => { - if (res.returnCode == "0000") { - this.backMoneyNo = res.content; - this.savedStatus = true; - this.$message.success("æˆåŠŸ"); - this.selectedRowKeys = []; - this.getData(); - this._getNewEOBList(); + this.$apis.SAVEBACKMONEY(formData).then((res) => { + const msg = backStatus === 1 ? '结案' : 'æš‚å˜'; + if (res.returnCode == '0000') { + this.backMoneyNo = res.content; + this.savedStatus = true; + this.$message.success(`${msg}æˆåŠŸ`); + this.selectedRowKeys = []; + this.getData(); + this._getNewEOBList(); - // this.$router.go(-1); - resolve(); - } else { - this.$message.error(res.returnMsg); - reject(); - } - }); - }); - }, + // this.$router.go(-1); + } else { + this.$message.error(res.returnMsg); + } + }); + }, - /* ======== ä¸Šä¼ åŒºåŸŸ ======== */ - // ä¸Šä¼ ä¹‹å‰ - beforeUpload() { - const len = this.fileList.length; - if (len >= 5) { - this.$message.warning("ä¸èƒ½è¶…过5个文件"); - return false; - } - return true; - }, - // åˆ é™¤æ–‡ä»¶ - removeFile(file) { - let index; - this.fileList.forEach((item, i) => { - if (item.uid == file.uid) { - index = i; - } - }); - this.fileList.splice(index, 1); - return true; - }, - // ä¸Šä¼ æ–‡ä»¶ - uploadFile(fileData) { - let formData = new FormData(); - formData.append("file", fileData.file); - this.$apis.UPLOADIMG(formData).then((res) => { - fileData.onSuccess(); - let tmp = { - uid: Math.random() * 10000, - name: res.original, - status: "done", - url: res.url, - }; - this.fileList.push(tmp); + /* ======== ä¸Šä¼ åŒºåŸŸ ======== */ + // ä¸Šä¼ ä¹‹å‰ + beforeUpload() { + const len = this.fileList.length; + if (len >= 5) { + this.$message.warning('ä¸èƒ½è¶…过5个文件'); + return false; + } + return true; + }, + // åˆ é™¤æ–‡ä»¶ + removeFile(file) { + let index; + this.fileList.forEach((item, i) => { + if (item.uid == file.uid) { + index = i; + } + }); + this.fileList.splice(index, 1); + return true; + }, + // ä¸Šä¼ æ–‡ä»¶ + uploadFile(fileData) { + let formData = new FormData(); + formData.append('file', fileData.file); + this.$apis.UPLOADIMG(formData).then((res) => { + fileData.onSuccess(); + let tmp = { + uid: Math.random() * 10000, + name: res.original, + status: 'done', + url: res.url + }; + this.fileList.push(tmp); - this.$forceUpdate(); - }); - }, - //导出报表 - exportExcel(){ + this.$forceUpdate(); + }); + }, + //导出报表 + exportExcel() { let filter = { - backMoneyNo: this.backMoneyNo, - payorCode: this.form.payorCode, - } - this.$apis.EXPORTBACKRECEIPTLIST(filter).then(res => { - exportFile(res, '已关è”è´¦å•.xls'); - }) - }, - // ä¿é™©å…¬å¸æ”¯æŒè¾“å…¥æœç´¢ - filterOption(input,option ) { - return option.componentOptions.children[0].text.indexOf(input) >= 0 - } - }, + backMoneyNo: this.backMoneyNo, + payorCode: this.form.payorCode + }; + this.$apis.EXPORTBACKRECEIPTLIST(filter).then((res) => { + exportFile(res, '已关è”è´¦å•.xls'); + }); + }, + // ä¿é™©å…¬å¸æ”¯æŒè¾“å…¥æœç´¢ + filterOption(input, option) { + return option.componentOptions.children[0].text.indexOf(input) >= 0; + } + } }; </script> <style lang="less" scoped> .none-label { - text-align: right; - .ant-form-item-label { - opacity: 0; - } + text-align: right; + .ant-form-item-label { + opacity: 0; + } } -.table-title { - font-size: 15px; - margin: 6px 0; - display: flex; - align-items: center; - justify-content: space-between; +.all-list_box { + height: calc(100vh - 400px); + overflow-y: auto; + &.no-data { + display: flex; + justify-content: center; + align-items: center; + color: red; + } } .table-content { - margin-bottom: 8px; + ::v-deep { + tr.hide_ { + display: none; + } + td { + padding: 5px 16px !important; + } + } } .search-form { - margin-top: 24px; - .ant-form .ant-form-item { - margin-bottom: 4px; - } + .ant-form .ant-form-item { + margin-bottom: 4px; + } + .flex-col { + display: flex; + justify-content: space-around; + align-items: center; + height: 44px; + } } .ant-btn .icon-class { - .mg-r(10); + .mg-r(10); } .success.ant-btn-link { - color: #4cd964; + color: #4cd964; } .danger.ant-btn-link { - color: #ff3b30; + color: #ff3b30; } .burt-container { - height: calc(100vh - 86px); - display: flex; - flex-direction: column; - ::v-deep { - .ant-tabs { - flex: 1; - min-height: 0; - } - } + height: calc(100vh - 86px); + display: flex; + flex-direction: column; + padding-bottom: 10px; + ::v-deep { + .ant-form-item { + display: flex; + &.ant-form-item-with-help { + margin-bottom: 0; + } + } + .ant-tabs { + flex: 1; + min-height: 0; + } + } + .fixed_width { + max-width: 150px; + } } .bill-content { - height: calc(100vh - 400px); - overflow-y: auto; - overflow-x: hidden; - padding-right: 12px; + overflow-y: auto; + overflow-x: hidden; + padding-right: 12px; + ::v-deep { + .ant-form-item { + margin-right: 0; + } + } + .pagination { + margin-top: 10px; + ::v-deep .jump-page { + height: 30px; + } + } } ::v-deep .bill-form { - .ant-form .ant-form-item { - margin-bottom: 4px !important; - } + .ant-form .ant-form-item { + margin-bottom: 4px !important; + } +} +.remark_inp { + width: 300px; +} +.red_inp { + ::v-deep .ant-input { + color: red; + } +} + +@media screen and (min-width: 1920px) { + .all-list_box { + height: calc(100vh - 420px); + } +} +@media screen and (min-width: 1920px) { + .all-list_box { + height: calc(100vh - 420px); + } +} +@media screen and (min-width: 1440px) { + .all-list_box { + height: calc(100vh - 400px); + } } </style>