Commit 5afb9c6e authored by 刘怀志's avatar 刘怀志

导出功能

parent 9f9d401a
......@@ -55,6 +55,14 @@ export function buyingOnCredit(data) {
data: data
})
}
// 押金充值提交
export function addDeposit(data) {
return request({
url: '/business/hospital/addDeposit',
method: 'post',
data: data
})
}
// 获取押金信息列表页
export function selectFinListById(query) {
return request({
......
......@@ -1258,7 +1258,7 @@ export default {
this.rowData['refundWay'] = this.getRefundWay(this.rowData.payType)
this.rowData['blank'] = '-' // 空占位
this.rowData['petOwnerBo'] = {}
this.rowData['entryAmount'] = this.rowData.refundType === '1' ? '0' : this.rowData.paymentAmount // 入账金额 会员卡:退过费就是 0 没退过费是支付金额
this.rowData['entryAmount'] = this.rowData.paymentAmount // 入账金额直接是支付金额记得全局搜改
if (this.rowData.payType === '7') {
// 住院押金显示列表 且 应退金额为列表最后一条数据的amountAfterTrade
// 押金列表
......
......@@ -37,7 +37,7 @@
<script>
import { paySettleBatch, treadHis } from '@/api/financial/payment'
import { addDeposit } from '@/api/financial/payment'
export default {
name: 'DepositModle',
......@@ -110,60 +110,33 @@ export default {
beforeSubmit() {
console.log('this.depositForm', this.depositForm)
this.$refs['depositForm'].validate(valid => {
// const temp = {
// id: this.depositForm.id,
// payType: this.depositForm.payType,
// tradeType: '0', // 缴费列表结算固定填0--现场门诊缴费
// membershipCard: this.ownerData.membershipCard,
// linkId: this.depositForm.registerId,
// registerId: this.depositForm.registerId,
// paymentAmount: this.depositForm.paymentAmount,
// standardAmount: this.depositForm.standardAmount
// }
console.log(valid)
})
},
// 结算提交
submit() {
if (this.settlementData.settlementType === 'single') {
const temp = {
id: this.depositForm.id,
payType: this.depositForm.payType,
tradeType: '0', // 缴费列表结算固定填0--现场门诊缴费
membershipCard: this.ownerData.membershipCard,
linkId: this.depositForm.registerId,
registerId: this.depositForm.registerId,
paymentAmount: this.depositForm.paymentAmount,
standardAmount: this.depositForm.standardAmount
}
console.log('treadHis列表页结算提交', temp)
treadHis(temp).then(res => {
console.log(res)
this.$message.success('结算成功')
this.cancle('success')
}).catch(err => {
console.log(err)
})
} else {
const temp = {
mapIds: this.depositForm.mapIds,
payType: this.depositForm.payType,
paymentAmount: this.depositForm.paymentAmount || this.depositForm.standardAmount,
membershipCard: this.ownerData.membershipCard,
medicalRecordId: this.depositForm.medicalRecordId // 病历id ,必传
'medicalRecordId': this.depositData.medicalRecordId,
'linkId': this.depositData.medicalRecordId,
'tradeType': '7',
'hospitalId': this.depositData.hospitalId,
'payType': 0,
'paymentAmount': this.depositForm.paymentAmount,
'detail': this.depositData.medicalRecordNo,
'number': '1',
'hospitalName': this.depositData.hospitalName,
'petOwnerId': this.ownerData.ownerId, // 宠主主键
'petOwnerName': this.ownerData.petOwnersName,
'petOwnerPhone': this.ownerData.petOwnersPhone,
'petInsurance': this.depositData.insure, // 宠物保险
'refundType': 0 // 写死
}
paySettleBatch(temp).then(res => {
console.log('paySettleBatch', res)
addDeposit(temp).then(() => {
this.$message.success('结算成功')
this.cancle('success')
}).catch(err => {
console.log('paySettleBatchErr', err)
console.log('addDeposit', err)
})
}
})
},
cancle(flag) {
this.$refs.depositForm.resetFields()
this.$emit('settlement-close', flag)
this.$emit('deposit-close', flag)
}
}
......
......@@ -554,6 +554,7 @@ color: #333333;"
</div>
</div>
<el-button
:disabled = "!canAddDeposit"
class="fourWordsBtn"
icon="el-icon-circle-plus-outline"
size="mini"
......@@ -589,7 +590,7 @@ color: #333333;"
</div>
</div>
<settlement-modle :is-show="settlementModal" :settlement-data="settlementData" @settlement-close="settlementClose" />
<deposit-modle :is-show="depositModal" :deposit-data="depositData" @deposit-close="settlementClose" />
<deposit-modle :is-show="depositModal" :deposit-data="depositData" @deposit-close="depositClose" />
</div>
</template>
<script>
......@@ -684,6 +685,15 @@ export default {
}
}
},
computed: {
// 若仅有药物处理、辅助检查、辅助治疗数据,无住院治疗数据,则【押金充值】按钮置灰
canAddDeposit() {
const temp = this.prescriptionList.filter(item => {
return item.feeItems.indexOf('住院') > -1
})
return temp.length > 0
}
},
created() {
// 数据初始化
this.initData()
......@@ -805,6 +815,18 @@ export default {
this.getInfo()
}
},
/**
* @Description: 充值弹窗关闭回调
* @Author: 刘
* @Date: 2023-07-12 10:42:59
*/
depositClose(data) {
console.log('depositClose', data)
this.depositModal = false
if (data === 'success') {
this.getInfo()
}
},
/**
* @Description: 结算弹出框
* @Author: 刘
......
......@@ -166,7 +166,7 @@
</el-table-column>
<el-table-column align="left" label="缴费时间" min-width="80" prop="paymentTime" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.paymentTime, '{y}/{m}/{d}') }}</span>
<span>{{ scope.row.paymentTime }}</span>
</template>
</el-table-column>
<el-table-column align="left" class-name="small-padding fixed-width" label="操作" min-width="180">
......
......@@ -431,7 +431,7 @@ color: #333333;"
</div>
</div>
<settlement-modle :is-show="settlementModal" :settlement-data="settlementData" @settlement-close="settlementClose" />
<deposit-modle :is-show="depositModal" :deposit-data="depositData" @deposit-close="settlementClose" />
<deposit-modle :is-show="depositModal" :deposit-data="depositData" @deposit-close="depositClose" />
</div>
</template>
<script>
......@@ -441,7 +441,7 @@ import { checkPetOwner } from '@/api/business/registration'
import settlementModle from '@/views/financial-management/payment-management/components/settlement-modle.vue'
import { buyingOnCredit, hospitalGetInfoById } from '@/api/financial/payment'
import depositModle from '@/views/financial-management/payment-management/components/deposit-modle.vue'
import { tradeTypeMap } from '../constant'
export default {
name: 'PaymentSingleDetail',
// 数据字典
......@@ -452,6 +452,8 @@ export default {
},
data() {
return {
// 收入类目
tradeTypeMap: tradeTypeMap,
depositList: [],
treatType: '',
depositData: {},
......@@ -598,6 +600,18 @@ export default {
this.goBack()
}
},
/**
* @Description: 充值弹窗关闭回调
* @Author: 刘
* @Date: 2023-07-12 10:42:59
*/
depositClose(data) {
console.log('depositClose', data)
this.depositModal = false
if (data === 'success') {
this.goBack()
}
},
/**
* @Description: 结算弹出框
* @Author: 刘
......@@ -699,7 +713,7 @@ export default {
initData() {
this.detailInfo = { ...this.$route.params.detailInfo }
this.singleData = { ...this.$route.params.singleData }
this.depositList = { ...this.$route.params.depositList }
this.depositList = [...this.$route.params.depositList]
console.log('initData', this.detailInfo, this.singleData)
this.singleData['payStatusName'] = this.showStatus(this.singleData.payStatus)
if (this.singleData.feeItems.indexOf('药物') > -1) {
......
......@@ -1263,7 +1263,7 @@ export default {
this.rowData['refundWay'] = this.getRefundWay(this.rowData.payType)
this.rowData['blank'] = '-' // 空占位
this.rowData['petOwnerBo'] = {}
this.rowData['entryAmount'] = this.rowData.refundType === '1' ? '0' : this.rowData.paymentAmount // 入账金额 会员卡:退过费就是 0 没退过费是支付金额
this.rowData['entryAmount'] = this.rowData.paymentAmount // 入账金额直接是支付金额记得全局搜改
if (this.rowData.payType === '7') {
// 住院押金显示列表 且 应退金额为列表最后一条数据的amountAfterTrade
// 押金列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment