Commit 276dcb5b authored by 任鸿志's avatar 任鸿志

充值

parent 4b9317f8
...@@ -9,6 +9,7 @@ VUE_APP_BASE_API = '' ...@@ -9,6 +9,7 @@ VUE_APP_BASE_API = ''
# VUE_APP_BASE_URL = 'http://192.169.24.231:8002' # VUE_APP_BASE_URL = 'http://192.169.24.231:8002'
# VUE_APP_BASE_URL = 'http://10.10.9.219:9902' # VUE_APP_BASE_URL = 'http://10.10.9.219:9902'
# VUE_APP_BASE_URL = 'http://10.10.40.69:9903' # VUE_APP_BASE_URL = 'http://10.10.40.69:9903'
VUE_APP_BASE_URL_change = 'http://10.10.8.230:6200/fancy'
VUE_APP_BASE_URL = 'http://127.0.0.1:9902' VUE_APP_BASE_URL = 'http://127.0.0.1:9902'
# VUE_APP_BASE_URL = 'http://10.10.9.219:9902' # VUE_APP_BASE_URL = 'http://10.10.9.219:9902'
VUE_APP_BASE_URL_SFC = 'http://10.10.9.219:8802' VUE_APP_BASE_URL_SFC = 'http://10.10.9.219:8802'
......
...@@ -9,5 +9,6 @@ VUE_APP_BASE_API = '' ...@@ -9,5 +9,6 @@ VUE_APP_BASE_API = ''
# VUE_APP_BASE_URL = 'http://newfinance-system.fancyinfo.net' # VUE_APP_BASE_URL = 'http://newfinance-system.fancyinfo.net'
VUE_APP_BASE_URL = 'http://10.10.9.219:9902' VUE_APP_BASE_URL = 'http://10.10.9.219:9902'
VUE_APP_BASE_URL_SFC = 'http://10.10.9.219:9902' VUE_APP_BASE_URL_SFC = 'http://10.10.9.219:9902'
VUE_APP_BASE_URL_change = 'http://10.10.8.230:6200/fancy'
# VUE_APP_BASE_URL = 'http://med-api.fancyinfo.net' # VUE_APP_BASE_URL = 'http://med-api.fancyinfo.net'
# VUE_APP_BASE_URL = 'http://10.10.40.10:9902' # VUE_APP_BASE_URL = 'http://10.10.40.10:9902'
...@@ -168,6 +168,7 @@ export const api = { ...@@ -168,6 +168,7 @@ export const api = {
jiesuan:{ jiesuan:{
updates:'/api/settlement/update_cost', updates:'/api/settlement/update_cost',
preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信 preSettlementGetPatientInfo:'/api/patient/zy',//出院获取患者信
recharge:'/outpatient-fees/pay/recharge',//出院获取患者信
zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信 zyByIdCard:'/api/patient/zyByIdCard',//出院获取患者信
zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信 zyByInpatientNo:'/api/patient/zyByInpatientNo',//出院获取患者信
preSettlement:'/api/settlement',//出院获取患者信 preSettlement:'/api/settlement',//出院获取患者信
......
import request2 from '@/utils/request2'
import requestChange from '@/utils/requestChange'
import Vue from 'vue'
// 出院获取患者信息
export function recharge (data) {
return requestChange({
url: Vue.prototype.$api.jiesuan.recharge,
method: 'post',
data
})
}
import store from '@/store'
import { getToken, removeToken } from '@/utils/auth'
import Cookies from 'js-cookie'
import errorCode from '@/utils/errorCode'
import axios from 'axios'
import { Message, MessageBox, Notification } from 'element-ui'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
mutations: {
SET_TOKEN: (state, Authorization) => {
state.Authorization = Authorization
},
},
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.NODE_ENV === 'development' ? 'http://10.10.9.219:9902' : process.env.VUE_APP_BASE_URL,
baseURL: process.env.VUE_APP_BASE_URL_change,
// 超时
timeout: 400000,
})
// request拦截器
service.interceptors.request.use(
config => {
// 是否需要设置 token请根据实际情况自行修改
config.headers['ksbm']=location.search.slice(1).split('=')[3]==undefined?"0":location.search.slice(1).split('=')[3]==''?'0':location.search.slice(1).split('=')[3]
const isToken = (config.headers || {}).isToken === false
config.headers['job_number'] = localStorage.getItem('jobNumber')
config.headers['token'] = 'outside'
config.headers['dept_code'] = localStorage.getItem('deptCode')
console.log(localStorage.getItem('deptCode'),'pppppppppppppp')
if (localStorage.getItem('deptCode')=='') {
let urlParams = new URLSearchParams(window.location.search)
config.headers['dept_code'] = urlParams.get('dept')
console.log( urlParams.get('dept'),'kkkkkkkkkkkkkkkkkkk')
}
// if (getToken() && !isToken) {
// config.headers['Authorization'] = getToken()
// // config.headers['ksbm']=location.search.slice(1).split('=')[3]==undefined?"0":location.search.slice(1).split('=')[3]==''?'0':location.search.slice(1).split('=')[3]
// // config.headers['token'] = getToken()
// }
// Warning:插件市场官方用户token,禁止修改
if (config.url.includes('/qaapi/')) {
config.headers['apitoken'] = Cookies.get('Api-Token')
}
// if (localStorage.getItem('SET_TOKEN')) {
// config.headers['Authorization'] = 'Bearer ' + localStorage.getItem('SET_TOKEN')
// // config.headers['ksbm']=location.search.slice(1).split('=')[3]==undefined?"0":location.search.slice(1).split('=')[3]==''?'0':location.search.slice(1).split('=')[3]
// }
return config
},
error => {
console.log(error)
Promise.reject(error)
}
)
// 响应拦截器
service.interceptors.response.use(
res => {
if (res.status == 204) {
Message({ message: '操作成功!', type: 'success',duration: 5 * 1000 })
}
else {
return res.data
}
},
error => {
let { message } = error
if (error.response.status == 422) {
var title='请求参数异常'
} else if (error.response.status == 429) {
var title='请求过于频繁'
}else if (error.response.status == 404) {
var title='未找到资源'
}else if (error.response.status == 403) {
var title='权限不足'
}else if (error.response.data.code == '401') {
MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return new Promise(resolve => {
localStorage.removeItem('SET_TOKEN')
const key = 'Admin-Token'
Cookies.remove(key)
location.reload()
})
})
.catch(() => { })
return Promise.reject('令牌验证失败')
}
else if (error.response.status >= 500) {
var title='服务异常'
// Notification.error({
// title: '内部错误',
// message: error.response.data.message,
// duration: 0
// });
}
else if (error.response.status >=400) {
var title='请求异常'
// Notification.warning({
// title: '请求异常',
// message: error.response.data.message,
// duration: 0
// });
}
Notification.error({
title: title,
dangerouslyUseHTMLString: true,
message: error.response.data.message +'<p>'+error.response.data.u_id+'</p>',
duration: 0
});
// Message({ message: error.response.data.message, type: 'error', duration: 5 * 1000 })
return Promise.reject(error)
}
)
export default service
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<div style="display: flex"> <div style="display: flex">
<el-checkbox v-model="gz_name" style="margin-right: 10px;">转为个账账单</el-checkbox> <el-checkbox v-model="gz_name" style="margin-right: 10px;">转为个账账单</el-checkbox>
<el-checkbox v-model="man_name">转为自费账单</el-checkbox> <el-checkbox v-model="man_name">转为自费账单</el-checkbox>
<el-checkbox v-model="insurance_payment">智慧医保支付</el-checkbox>
</div> </div>
<!-- <div style="display: flex" v-if="patientInfo.yblx != '01'"> <!-- <div style="display: flex" v-if="patientInfo.yblx != '01'">
<div style="line-height: 28px; width: 75px">结算类型:</div> <div style="line-height: 28px; width: 75px">结算类型:</div>
...@@ -585,6 +586,7 @@ import Readcards from '@/components/ReadcardsSFC' ...@@ -585,6 +586,7 @@ import Readcards from '@/components/ReadcardsSFC'
import editProp1 from './components/editProp' //修改自付比例 import editProp1 from './components/editProp' //修改自付比例
import { pdxx, mzxx, mzxxs, mzxxs_ewm, pdxq, info, bxxx,prescription,serviceInvoke, jsxx, hiscard, printmis, queryReadRard, verifyFeeStatus } from '@/api/mzSFC' import { pdxx, mzxx, mzxxs, mzxxs_ewm, pdxq, info, bxxx,prescription,serviceInvoke, jsxx, hiscard, printmis, queryReadRard, verifyFeeStatus } from '@/api/mzSFC'
import { get_serial_number, editProp, zfbl, freemoney, settlementPre, familybalanceinfor, patient, settleSelfPre, selfPre, yundaMis, familyBalance, get_zfbl } from '@/api/jiesuanSFC' import { get_serial_number, editProp, zfbl, freemoney, settlementPre, familybalanceinfor, patient, settleSelfPre, selfPre, yundaMis, familyBalance, get_zfbl } from '@/api/jiesuanSFC'
import { recharge } from '@/api/changeFree'
import printProof from '../../utils/print_proof' import printProof from '../../utils/print_proof'
import getLodop from '../../assets/js/LodopFuncs' import getLodop from '../../assets/js/LodopFuncs'
import SelectCard from '@/components/SelectCardSFC' import SelectCard from '@/components/SelectCardSFC'
...@@ -649,6 +651,7 @@ export default { ...@@ -649,6 +651,7 @@ export default {
], ],
channels: '', channels: '',
man_name: false, man_name: false,
insurance_payment: false,
card_typeinfor: '', card_typeinfor: '',
sdsdzjkk: '', sdsdzjkk: '',
infor: [], infor: [],
...@@ -796,12 +799,16 @@ export default { ...@@ -796,12 +799,16 @@ export default {
cardNoShow: false, cardNoShow: false,
visitNo: '', visitNo: '',
visitDate: '', visitDate: '',
jobNumber:'',
dept:''
} }
}, },
mounted() { mounted() {
this.socketInit() this.socketInit()
}, },
created() { created() {
this.jobNumber = this.$route.query?.jobNumber || ''
this.dept = this.$route.query?.dept || ''
this.channel = this.$route.query?.channel || '' this.channel = this.$route.query?.channel || ''
this.titleshow = this.$route.query?.layoutShow || '' this.titleshow = this.$route.query?.layoutShow || ''
this.cardNo = this.$route.query?.cardNo || '' this.cardNo = this.$route.query?.cardNo || ''
...@@ -1078,6 +1085,7 @@ export default { ...@@ -1078,6 +1085,7 @@ export default {
//首次进页面第一次刷卡返回的信息 //首次进页面第一次刷卡返回的信息
getyibaoinfo(e, x) { getyibaoinfo(e, x) {
this.man_name = false this.man_name = false
this.insurance_payment=false
this.only_qq = 0 this.only_qq = 0
//第一次读二维码不需要from_web //第一次读二维码不需要from_web
if (x) { if (x) {
...@@ -1115,22 +1123,35 @@ export default { ...@@ -1115,22 +1123,35 @@ export default {
feesure(e) { feesure(e) {
this.cash_disable = true this.cash_disable = true
this.fullscreenLoading = true this.fullscreenLoading = true
if (e == '1') { if (e == '1' || e == '5') {
// return false // return false
freemoney({ recharge({
amount: this.form.djf, amount: this.form.djf,
auth_code: this.fee.weixin, authCode: this.fee.weixin,
patient_id: this.patientData.patient_id, operatorNo: this.jobNumber,
settlement_no: this.bxxxinfo.settlement_no, payType: e=='1'?'cumsNative':e=='5'?'cash':'', // 支付类型 cumsNative 聚合支付 cash 现金
rechargeType: 1, // 是否预交金充值 1是 0否,
patientId: this.patientData.patient_id,
deptCode: this.dept
// amount: this.form.djf,
// auth_code: this.fee.weixin,
// patient_id: this.patientData.patient_id,
// settlement_no: this.bxxxinfo.settlement_no,
}) })
.then(response => { .then(response => {
this.$message({ if (response.code==200) {
this.$message({
message: response.message, message: response.message,
type: 'success', type: 'success',
}) })
this.payData = response.data this.payData = response.data
this.xj_amount = 0 if (e=='1') {
this.source_pay_amount = this.form.djf this.xj_amount = 0
this.source_pay_amount = this.form.djf
}else{
this.xj_amount = this.form.djf
this.source_pay_amount =0
}
this.form.djf = 0 this.form.djf = 0
//接口返回新的院内账户余额 //接口返回新的院内账户余额
// this.bxxxinfo.his_balance = response.data.his_balance * 1 // this.bxxxinfo.his_balance = response.data.his_balance * 1
...@@ -1146,6 +1167,14 @@ export default { ...@@ -1146,6 +1167,14 @@ export default {
//结算 //结算
// this.qrjs() // this.qrjs()
this.qrjsmiss('1') this.qrjsmiss('1')
}else{
this.$message({
message: response.message,
type: 'error',
})
}
console.log(response,'充值成功++++++++++++++++')
}) })
.finally(() => { .finally(() => {
this.cash_disable = false this.cash_disable = false
...@@ -1157,23 +1186,23 @@ export default { ...@@ -1157,23 +1186,23 @@ export default {
}) })
} }
if (e == '5') { // if (e == '5') {
this.source_pay_amount = 0 // this.source_pay_amount = 0
this.xj_amount = this.form.djf // this.xj_amount = this.form.djf
let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1 // let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1
// this.bxxxinfo.his_balance = response.data.his_balance * 1 // // this.bxxxinfo.his_balance = response.data.his_balance * 1
let djsold = this.round(this.bxxxinfo.brfdje - this.bxxxinfo.grzhzf, 2) // let djsold = this.round(this.bxxxinfo.brfdje - this.bxxxinfo.grzhzf, 2)
this.form.djf = this.round(this.round(this.round(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2) - chongzhi, 2) // this.form.djf = this.round(this.round(this.round(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2) - chongzhi, 2)
// this.qrjs() // // this.qrjs()
this.qrjsmiss('1') // this.qrjsmiss('1')
//微信支付宝弹窗 // //微信支付宝弹窗
this.uploadfeeshow = false // this.uploadfeeshow = false
// 总的大弹窗 // // 总的大弹窗
this.fullscreenLoading = false // this.fullscreenLoading = false
} // }
if (this.feelist.channel == '3') { // if (this.feelist.channel == '3') {
this.get_serial_number('3') // this.get_serial_number('3')
} // }
}, },
//银行卡mis交易、获取参考号 //银行卡mis交易、获取参考号
get_serial_number(e) { get_serial_number(e) {
...@@ -1231,7 +1260,7 @@ export default { ...@@ -1231,7 +1260,7 @@ export default {
}) })
this.misdata = ret this.misdata = ret
this.ckh = ret.TradeRef this.ckh = ret.TradeRef
freemoney({ recharge({
bank_card: ret.BankNo, bank_card: ret.BankNo,
payment_type: 'MIS_BANK', payment_type: 'MIS_BANK',
amount: this.form.djf, amount: this.form.djf,
...@@ -1774,6 +1803,7 @@ export default { ...@@ -1774,6 +1803,7 @@ export default {
p_ewm: this.adminpingzhengma, p_ewm: this.adminpingzhengma,
}) })
.then(response => { .then(response => {
this.dialogVisible = true this.dialogVisible = true
this.yujiesuanload = false this.yujiesuanload = false
this.bxxxinfo = response.data this.bxxxinfo = response.data
...@@ -1958,6 +1988,9 @@ export default { ...@@ -1958,6 +1988,9 @@ export default {
}, 1000) }, 1000)
this.sureshow = true this.sureshow = true
let y = { let y = {
source_type: this.payData.targetSys,
source_trade_no: this.payData.sourceTradeNo,
is_gz: this.gz_name, is_gz: this.gz_name,
channel: this.channel, channel: this.channel,
xj_amount: this.xj_amount, xj_amount: this.xj_amount,
...@@ -2316,19 +2349,23 @@ export default { ...@@ -2316,19 +2349,23 @@ export default {
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '', settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
}) })
.then(res => { .then(res => {
this.bxxxinfo = res.data
this.bxxxinfo.his_deduct_amount = 0
if (res.data.mzxets != '') { if (res.data.mzxets != '') {
this.dataText = res.data.mzxets this.dataText = res.data.mzxets
this.GSshow = true this.GSshow = true
} }
this.yujiesuanLoading = false this.yujiesuanLoading = false
this.moreLoading = false this.moreLoading = false
this.bxxxinfo = res.data
console.log(res.data.his_deduct_amount,'*********************')
familybalanceinfor({ familybalanceinfor({
patient_id: this.patientData.patient_id, patient_id: this.patientData.patient_id,
pre_key: res.data.pre_key, pre_key: res.data.pre_key,
cache_key: this.form.cache_key, cache_key: this.form.cache_key,
}).then(async res2 => { }).then(async res2 => {
this.familyType = res2.data.family_type this.familyType = res2.data.family_type
if (res2.data.family_type == '1') { if (res2.data.family_type == '1') {
this.bxxxinfo.gjzhzf = res2.data.gjzhxfje this.bxxxinfo.gjzhzf = res2.data.gjzhxfje
this.bxxxinfo.grzhzf = this.round(res2.data.grzhzf - res2.data.gjzhxfje, 2) this.bxxxinfo.grzhzf = this.round(res2.data.grzhzf - res2.data.gjzhxfje, 2)
...@@ -2339,27 +2376,10 @@ export default { ...@@ -2339,27 +2376,10 @@ export default {
else { else {
this.bxxxinfo.gjzhzf = 0 this.bxxxinfo.gjzhzf = 0
} }
// 验证违规 this.bxxxinfo.family_balance = res2.data.gjzhye
await prescription({
patient_id: this.patientData.patient_id,
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
prescription_nos: this.cost_id,
js_type:"1",
p_jbbm:zhenduan
})
.then(response => {
if (response.data.result.length>0) {
this.weiguiList=response.data.result
this.weiguiData=response.data.result
this.ViolationShow=true
}else{
this.dialogVisible = true
}
})
this.bxxxinfo.family_balance = res2.data.gjzhye
// this.dialogVisible = true // this.dialogVisible = true
this.bxxxinfo.his_deduct_amount = 0
console.log( this.bxxxinfo.his_deduct_amount,'oooooooooooooooooo')
this.bxxxinfo.grzhzf = 0 this.bxxxinfo.grzhzf = 0
let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
if (this.bxxxinfo.personal_balance >= djf) { if (this.bxxxinfo.personal_balance >= djf) {
...@@ -2387,7 +2407,27 @@ export default { ...@@ -2387,7 +2407,27 @@ export default {
} }
} }
} }
console.log( this.bxxxinfo.his_deduct_amount,'++++++++++++')
this.form.djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) this.form.djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
// 验证违规
await prescription({
patient_id: this.patientData.patient_id,
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
prescription_nos: this.cost_id,
js_type:"1",
p_jbbm:zhenduan
})
.then(response => {
if (response.data.result.length>0) {
this.weiguiList=response.data.result
this.weiguiData=response.data.result
this.ViolationShow=true
}else{
this.dialogVisible = true
}
})
}) })
}) })
.catch(err => { .catch(err => {
...@@ -2589,6 +2629,8 @@ export default { ...@@ -2589,6 +2629,8 @@ export default {
return false return false
} }
let y = { let y = {
source_type: this.payData.targetSys,
source_trade_no: this.payData.sourceTradeNo,
channel: this.channel, channel: this.channel,
xj_amount: this.xj_amount, xj_amount: this.xj_amount,
source_pay_amount: this.source_pay_amount, source_pay_amount: this.source_pay_amount,
......
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