diff --git a/src/api/apis_moudles/charge-query.js b/src/api/apis_moudles/charge-query.js index 6e3d7d3e9d1fcb8127725a5a2d8a239baf048ec0..a413124fc9e57ffd84eed3ade6b0a1d68342fbbb 100644 --- a/src/api/apis_moudles/charge-query.js +++ b/src/api/apis_moudles/charge-query.js @@ -3,4 +3,5 @@ export default { getChargeList: "/backstage/auth/receiptList", getCompanyOptions: "/backstage/auth/payorListNopage", getChargeListDetail:"/backstage/auth/receiptDetailList",//è´¦å•æ˜Žç»† + getReceiptPaymentDetail:"/backstage/auth/receiptPaymentDetail",//è´¦å•æ˜Žç»† }; diff --git a/src/api/funcs_modules/charge-query.js b/src/api/funcs_modules/charge-query.js index f95f3c283730e2f288b9846d71e2fc1a4c095226..77fe343b6f1e907c86483b6f4271eb22f964ea8f 100644 --- a/src/api/funcs_modules/charge-query.js +++ b/src/api/funcs_modules/charge-query.js @@ -13,9 +13,14 @@ const GETCOMPANYOPTIONS = function (data) { const GETCHARGELISTDETAIL = function (data) { return req.post(apis.getChargeListDetail, data); }; +// 获å–费用支付明细 +const GETRECEIPTPAYMENTDETAIL= function (data) { + return req.post(apis.getReceiptPaymentDetail, data); +}; // 对象数组 export default { GETCHARGELIST, GETCOMPANYOPTIONS, - GETCHARGELISTDETAIL + GETCHARGELISTDETAIL, + GETRECEIPTPAYMENTDETAIL }; diff --git a/src/views/charge-query/detail.vue b/src/views/charge-query/detail.vue index 8a9f38c2e2278368a78c9e1c0f27d1c7dbe8d9a9..706a9b8ad479cc8c1d17e1ac7fbfd81134d12a02 100644 --- a/src/views/charge-query/detail.vue +++ b/src/views/charge-query/detail.vue @@ -18,13 +18,17 @@ <a-input v-model="form.patientName" placeholder="请输入客户姓å" - allow-clear + allow-clear ></a-input> </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 + v-model="form.patientType" + placeholder="请选择客户类型" + allowClear + > <a-select-option v-for="item in patientTypeOptions" :key="item.code" @@ -37,7 +41,11 @@ </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 + v-model="form.payorId" + placeholder="请选择ä¿é™©å…¬å¸" + allowClear + > <a-select-option v-for="item in companyOptions" :key="item.corpCode" @@ -50,7 +58,11 @@ </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 + v-model="form.doctorCode" + placeholder="请选择看诊医生" + allowClear + > <a-select-option v-for="item in doctorOptions" :key="item.code" @@ -63,17 +75,26 @@ </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-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 + v-model="form.paymentCode" + placeholder="请选择支付方å¼" + allowClear + > <a-select-option v-for="item in paymentOptions" :key="item.code" :value="item.code" - allow-clear + allow-clear > {{ item.name }} </a-select-option> @@ -137,7 +158,11 @@ row-key="id" :scroll="{ x: true }" :pagination="false" + class="payTable" > + <template slot="paymentType" slot-scope="text"> + <a-button class="danger">{{ text | payStyleFilters }}</a-button> + </template> </a-table> </div> </template> @@ -179,15 +204,20 @@ export default { }, ]; const payColumns = [ - { title: "å…èµ”é¢", dataIndex: "", width: 180 }, - { title: "自付é¢", dataIndex: "", width: 180 }, - { title: "其他费用", dataIndex: "", width: 180 }, - { title: "个人支付", dataIndex: "", width: 180 }, - { title: "商报支付", dataIndex: "", width: 180 }, - { title: "支付方å¼", dataIndex: "", width: 180 }, - ] + { 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 { - receiptNo:'', + receiptNo: "", columns, payColumns, form: {}, @@ -206,9 +236,7 @@ export default { code: 1, }, ], //客户类型 - companyOptions: [ - - ], //ä¿é™©å…¬å¸ + companyOptions: [], //ä¿é™©å…¬å¸ doctorOptions: [ { name: "医生1", @@ -226,37 +254,78 @@ export default { pageNum: 1, pageSize: 10, }, - payDataList:[] + payDataList: [], + payPager: [ + { + pageNum: 1, + pageSize: 10, + }, + ], }; }, components: { BurtPagination, }, + filters: { + payStyleFilters(value) { + const styleMap = { + 1: "支付å®", + 2: "微信", + 3: "现金", + }; + return styleMap[value]; + }, + }, created() { - const { receiptNo } = this.$route.query - this.receiptNo = receiptNo || '' + const { receiptNo } = this.$route.query; + this.receiptNo = receiptNo || ""; this._getChargeListDetail(); this._getCompanyOptions(); + this._getReceiptPaymentDetail(); //费用支付明细 }, methods: { // 获å–åˆ—è¡¨æ•°æ® _getChargeListDetail() { const data = { - "receiptNo": this.receiptNo, - ...this.pager + receiptNo: this.receiptNo, + ...this.pager, }; this.$apis.GETCHARGELISTDETAIL(data).then((res) => { console.log("11111111111获å–tableä¿¡æ¯=", res); - this.dataList = (res.content && res.content.list) || []; - // this.pager.total = (res.content && res.content.total) || 0; + 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); - this.companyOptions = res.content || []; + if (res.returnCode == "0000") { + this.companyOptions = res.content || []; + } else { + this.$message.error(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); + } }); }, @@ -266,19 +335,19 @@ export default { }, // é‡ç½® handlerReset() { - this.form = {} + this.form = {}; }, - - //设置行属性 + + //设置行属性 handlerRowClick(record) { const { receiptNo } = record; - console.log('receiptNo=',receiptNo); + console.log("receiptNo=", receiptNo); return { style: { color: record.isEdit ? "#2B63FF" : "#252631", }, on: { - // 点击行 + // 点击行 click: () => { if (record.isEdit) { return true; @@ -335,4 +404,10 @@ export default { font-weight: bold; border-bottom: 1px solid #eee; } +.payTable{ + .ant-btn{ + border-color: #1890ff; + color: #1890ff; + } +} </style>