Commit e6058ba4 authored by 任鸿志's avatar 任鸿志

refactor(components): 重构 ReadcardsNewSFC 组件

- 优化了组件的样式和布局
- 调整了部分变量和方法的命名
- 移除了冗余的注释和空行
- 统一了代码格式和风格
parent 44dddb11
...@@ -11,18 +11,18 @@ ...@@ -11,18 +11,18 @@
> >
<div class="my-card-body"> <div class="my-card-body">
<!-- <div style="position: absolute; right: 24px; top: 15px; width: 19px" @click="handleCloseModal">X</div> --> <!-- <div style="position: absolute; right: 24px; top: 15px; width: 19px" @click="handleCloseModal">X</div> -->
<img :src="logo" style="display: block;" alt="logo" /> <img :src="logo" style="display: block" alt="logo" />
<!-- 目前因为开发阶段没有很多扫码设备,需要先设置输入框和下拉框满足当下情况 --> <!-- 目前因为开发阶段没有很多扫码设备,需要先设置输入框和下拉框满足当下情况 -->
<div style="text-align: center;line-height: 50px;"> <div style="text-align: center; line-height: 50px">
<el-checkbox v-model="isYDpatint">是否异地(<span style="color: red;">患者有多个参保信息时选择</span>)</el-checkbox> <el-checkbox v-model="isYDpatint">是否异地(<span style="color: red">患者有多个参保信息时选择</span>)</el-checkbox>
</div> </div>
<div class="swipe_user_select_content" style="margin: 10px auto"> <div class="swipe_user_select_content" style="margin: 10px auto">
<!-- <el-select ref="physicalCardType" v-model="form.physicalCardType" style="width: 30%;" placeholder="请选择卡类型" <!-- <el-select ref="physicalCardType" v-model="form.physicalCardType" style="width: 30%;" placeholder="请选择卡类型"
@change="handleSelect"> @change="handleSelect">
<el-option v-for="(item, i) in DiagnosisCardOptions" :key="i" :label="item.name" :value="item.code" /> <el-option v-for="(item, i) in DiagnosisCardOptions" :key="i" :label="item.name" :value="item.code" />
</el-select> --> </el-select> -->
<el-form element-loading-text="刷卡中,请稍后" v-loading="jiezhiLoading" element-loading-spinner="el-icon-loading" @submit.native.prevent> <el-form element-loading-text="刷卡中,请稍后" v-loading="jiezhiLoading" element-loading-spinner="el-icon-loading" @submit.native.prevent>
<el-form-item> <el-form-item>
<el-input <el-input
...@@ -34,10 +34,9 @@ ...@@ -34,10 +34,9 @@
@keyup.enter.native="handleEnterModal()" @keyup.enter.native="handleEnterModal()"
/> />
</el-form-item> </el-form-item>
<!-- <!--
<el-button @click="getmzxx('2')" <el-button @click="getmzxx('2')"
style="color: #3d7ff5; width: 97px; font-size: 17px; font-weight: 600; border-radius: 8px">读卡</el-button> --> style="color: #3d7ff5; width: 97px; font-size: 17px; font-weight: 600; border-radius: 8px">读卡</el-button> -->
</el-form> </el-form>
<!-- <el-input ref="cardInput" v-model.trim="form.physicalCard" style="width: 282px;margin-left: 10px; " <!-- <el-input ref="cardInput" v-model.trim="form.physicalCard" style="width: 282px;margin-left: 10px; "
placeholder="请输入卡号" @blur="handleSetFocus()" @keyup.enter.native="handleEnterModal()" /> --> placeholder="请输入卡号" @blur="handleSetFocus()" @keyup.enter.native="handleEnterModal()" /> -->
...@@ -47,7 +46,7 @@ ...@@ -47,7 +46,7 @@
</template> </template>
<script> <script>
// import dictApi from '@/api/sys/dictionary' // import dictApi from '@/api/sys/dictionary'
import { mzxx, mzxxs,queryBasicInfo,queryReadRard,getInfoByQrCode } from '@/api/mzSFC' import { mzxx, mzxxs, queryBasicInfo, queryReadRard, getInfoByQrCode } from '@/api/mzSFC'
export default { export default {
components: {}, components: {},
props: { props: {
...@@ -58,17 +57,17 @@ export default { ...@@ -58,17 +57,17 @@ export default {
return '' return ''
}, },
}, },
patientcard:Object, patientcard: Object,
visible: Boolean, visible: Boolean,
flag: String, flag: String,
xzbz: String, xzbz: String,
patientData:Object, patientData: Object,
selectTableArr:Array selectTableArr: Array,
}, },
data() { data() {
return { return {
isYDpatint:false, isYDpatint: false,
jiezhiLoading:false, jiezhiLoading: false,
listinfo: { listinfo: {
type: '', type: '',
}, },
...@@ -83,9 +82,8 @@ export default { ...@@ -83,9 +82,8 @@ export default {
physicalCard: '', // 卡号 physicalCard: '', // 卡号
}, },
DiagnosisCardOptions: [], // 患者卡类型 DiagnosisCardOptions: [], // 患者卡类型
shenfenzhenghao:'', shenfenzhenghao: '',
insurance:'', insurance: '',
} }
}, },
watch: { watch: {
...@@ -93,6 +91,7 @@ export default { ...@@ -93,6 +91,7 @@ export default {
handler(v) { handler(v) {
this.isOpenCardeds = v this.isOpenCardeds = v
if (v === true) { if (v === true) {
this.jiezhiLoading=false
this.$nextTick(() => { this.$nextTick(() => {
this.form.physicalCard = '' this.form.physicalCard = ''
// this.form = {} // this.form = {}
...@@ -107,16 +106,16 @@ export default { ...@@ -107,16 +106,16 @@ export default {
} }
}, },
}, },
patientData:{ patientData: {
handler:function(nv,ov){ handler: function (nv, ov) {
if(nv){ if (nv) {
this.shenfenzhenghao = nv.id_card this.shenfenzhenghao = nv.id_card
this.insurance = nv.insurance_type?.value || '' this.insurance = nv.insurance_type?.value || ''
} }
}, },
immediate:true, immediate: true,
deep:true, deep: true,
} },
}, },
created() { created() {
// 就诊卡类型 // 就诊卡类型
...@@ -149,7 +148,7 @@ export default { ...@@ -149,7 +148,7 @@ export default {
}, },
// 输入框回车事件 // 输入框回车事件
handleEnterModal() { handleEnterModal() {
this.jiezhiLoading=true this.jiezhiLoading = true
if (this.form.physicalCard.toString().length === 28) { if (this.form.physicalCard.toString().length === 28) {
this.loadingapplyList = true this.loadingapplyList = true
// 电子医保码 // 电子医保码
...@@ -165,44 +164,42 @@ export default { ...@@ -165,44 +164,42 @@ export default {
// 就诊卡 // 就诊卡
this.form.physicalCardType = 'HOSPITAL_CARD' this.form.physicalCardType = 'HOSPITAL_CARD'
// this.$emit('getyibaoinfo', this.form) // this.$emit('getyibaoinfo', this.form)
this.jiezhiLoading=false this.jiezhiLoading = false
this.$message({ this.$message({
message: '不支持此方式结算', message: '不支持此方式结算',
type: 'error', type: 'error',
}) })
} else if (this.form.physicalCard.toString().length === 8) { } else if (this.form.physicalCard.toString().length === 8) {
// 输入患者id // 输入患者id
this.form.physicalCardType = 'PATIENT_ID' this.form.physicalCardType = 'PATIENT_ID'
// this.$emit('getyibaoinfo', this.form) // this.$emit('getyibaoinfo', this.form)
this.jiezhiLoading=false this.jiezhiLoading = false
this.$message({ this.$message({
message: '不支持此方式结算', message: '不支持此方式结算',
type: 'error', type: 'error',
}) })
} else if (this.form.physicalCard.toString().length > 64) { } else if (this.form.physicalCard.toString().length > 64) {
// 截取前64位获取电子健康卡编码 // 截取前64位获取电子健康卡编码
this.form.physicalCard = this.form.physicalCard //.toString().substring(0, 64) this.form.physicalCard = this.form.physicalCard //.toString().substring(0, 64)
// this.form.physicalCardType = 'ELECTRONIC_HEALTH_CARD' // this.form.physicalCardType = 'ELECTRONIC_HEALTH_CARD'
// this.$emit('getyibaoinfo', this.form) // this.$emit('getyibaoinfo', this.form)
this.param = { this.param = {
qr_code: this.form.physicalCard qr_code: this.form.physicalCard,
} }
getInfoByQrCode(this.param) getInfoByQrCode(this.param)
.then(response => { .then(response => {
this.form.physicalCard=response.data.data.cardNo this.form.physicalCard = response.data.data.cardNo
this.form.physicalCardType = 'ID_CARD' this.form.physicalCardType = 'ID_CARD'
this.getmzxx('1') this.getmzxx('1')
})
.finally((err) => {
}) })
.finally(err => {})
this.jiezhiLoading=false // this.jiezhiLoading=false
// this.$message({ // this.$message({
// message: '不支持此方式结算', // message: '不支持此方式结算',
// type: 'error', // type: 'error',
...@@ -212,12 +209,12 @@ export default { ...@@ -212,12 +209,12 @@ export default {
this.form.physicalCardType = 'ID_CARD' this.form.physicalCardType = 'ID_CARD'
this.getmzxx('1') this.getmzxx('1')
// this.$emit('getyibaoinfo', this.form) // this.$emit('getyibaoinfo', this.form)
}else{ } else {
this.jiezhiLoading=false this.jiezhiLoading = false
this.$message({ this.$message({
message: '不支持此方式结算', message: '不支持此方式结算',
type: 'error', type: 'error',
}) })
} }
const val = { const val = {
...@@ -293,7 +290,7 @@ export default { ...@@ -293,7 +290,7 @@ export default {
// 接收websocket返回的数据值 // 接收websocket返回的数据值
// 卡类型:就诊卡1,身份证4,社保卡3,山东省健康码8,医保电子凭证2 // 卡类型:就诊卡1,身份证4,社保卡3,山东省健康码8,医保电子凭证2
setOnmessageMessage(evt) { setOnmessageMessage(evt) {
console.log(evt,'.............................') console.log(evt, '.............................')
let data = '' let data = ''
if (this.isJSON(evt.data) && evt?.data) { if (this.isJSON(evt.data) && evt?.data) {
data = JSON.parse(evt.data) data = JSON.parse(evt.data)
...@@ -372,27 +369,27 @@ export default { ...@@ -372,27 +369,27 @@ export default {
} }
}, },
getmzxx(e) { getmzxx(e) {
// 身份证 // 身份证
if (e == '1') { if (e == '1') {
this.param = { this.param = {
is_yd:this.isYDpatint==true?'1':'0', is_yd: this.isYDpatint == true ? '1' : '0',
id_card:this.form.physicalCard, id_card: this.form.physicalCard,
insurance:this.insurance, insurance: this.insurance,
cache:'1', cache: '1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6', yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C', xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_type:'02' card_type: '02',
} }
queryBasicInfo(this.param) queryBasicInfo(this.param)
.then(response => { .then(response => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.dialogFormVisible = false // this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'02') this.$emit('getyibaoinfo', response.data, '02')
this.form.physicalCard='' this.form.physicalCard = ''
}) })
.finally((err) => { .finally(err => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.dialogFormVisible = false // this.dialogFormVisible = false
}) })
} }
// 2=社保卡 // 2=社保卡
...@@ -410,57 +407,57 @@ export default { ...@@ -410,57 +407,57 @@ export default {
// card_no:'A83459572', //,'A73079277' // card_no:'A83459572', //,'A73079277'
// sbm:'370100D1560000050022A5F32E307E9E' , //,'370100D156000005006ACF514551621F' // sbm:'370100D1560000050022A5F32E307E9E' , //,'370100D156000005006ACF514551621F'
// name: '王敏',//'刘楚潇' // name: '王敏',//'刘楚潇'
is_yd:this.isYDpatint==true?'1':'0', is_yd: this.isYDpatint == true ? '1' : '0',
insurance:this.insurance,//this.insurance insurance: this.insurance, //this.insurance
cache:'1', cache: '1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6', yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
card_type:'03', card_type: '03',
qr_code:'', qr_code: '',
id_card:this.form.physicalCard,//,'370104202109020049' id_card: this.form.physicalCard, //,'370104202109020049'
dzpzywm:'301', dzpzywm: '301',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C', xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_no: this.form.idcard, //,'A73079277' card_no: this.form.idcard, //,'A73079277'
sbm:this.form.p_sbm , //,'370100D156000005006ACF514551621F' sbm: this.form.p_sbm, //,'370100D156000005006ACF514551621F'
name: this.form.xm,//'刘楚潇' name: this.form.xm, //'刘楚潇'
} }
queryReadRard(this.param) queryReadRard(this.param)
.then(response => { .then(response => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.dialogFormVisible = false // this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'03') this.$emit('getyibaoinfo', response.data, '03')
this.form.physicalCard='' this.form.physicalCard = ''
}) })
.finally(() => { .finally(() => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.$emit('close') this.$emit('close')
this.dialogFormVisible = false // this.dialogFormVisible = false
}) })
} }
// 医保电子凭证 // 医保电子凭证
if (e == '3') { if (e == '3') {
this.param = { this.param = {
is_yd:this.isYDpatint==true?'1':'0', is_yd: this.isYDpatint == true ? '1' : '0',
insurance:this.insurance,//this.insurance insurance: this.insurance, //this.insurance
cache:'1', cache: '1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6', yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
card_type:'01', card_type: '01',
id_card:this.patientData.id_card, id_card: this.patientData.id_card,
qr_code:this.form.physicalCard, qr_code: this.form.physicalCard,
dzpzywm:'301', dzpzywm: '301',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C', xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_no:this.patientData.patient_id, card_no: this.patientData.patient_id,
sbm:this.patientData.p_sbm, sbm: this.patientData.p_sbm,
name:this.patientData.name, name: this.patientData.name,
} }
queryReadRard(this.param) queryReadRard(this.param)
.then(response => { .then(response => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.dialogFormVisible = false // this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'01',this.adminpingzhengma) this.$emit('getyibaoinfo', response.data, '01', this.adminpingzhengma)
this.form.physicalCard='' this.form.physicalCard = ''
}) })
.finally(() => { .finally(() => {
this.jiezhiLoading=false // this.jiezhiLoading = false
this.loading = false this.loading = false
}) })
} }
...@@ -527,7 +524,7 @@ export default { ...@@ -527,7 +524,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0 !important; margin: 0 !important;
// position: absolute; // position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
......
...@@ -550,7 +550,7 @@ ...@@ -550,7 +550,7 @@
<!-- 读卡 --> <!-- 读卡 -->
<Readcards :isOpenCarded="carddialogFormVisible" @getyibaoinfo="getyibaoinfo" @closeReadcard="closeReadcard" /> <Readcards :isOpenCarded="carddialogFormVisible" @getyibaoinfo="getyibaoinfo" @closeReadcard="closeReadcard" />
<!-- 确认结算-新-不选择卡类型 --> <!-- 确认结算-新-不选择卡类型 -->
<ReadcardsNew :isOpenCarded="yibaoshowNew" :patientcard="form" :patientData="patientData" :selectTableArr="selectTableArr" @getyibaoinfo="selectCardYiboPreselect" @close="closeSelectCard" /> <ReadcardsNew :isOpenCarded="yibaoshowNew" :patientcard="form" :patientData="patientData" :selectTableArr="selectTableArr" @getyibaoinfo="selectCardYiboPreselect" @close="closeSelectCard" />
<invoicepost :isOpenCarded="invoicepostVisible" :patientData="invoicepostData" @success="invoicepostSuccess"></invoicepost> <invoicepost :isOpenCarded="invoicepostVisible" :patientData="invoicepostData" @success="invoicepostSuccess"></invoicepost>
<!-- loaidng 动画 --> <!-- loaidng 动画 -->
<div v-if="false" class="grey-cloth" id="loading"> <div v-if="false" class="grey-cloth" id="loading">
...@@ -1815,7 +1815,7 @@ export default { ...@@ -1815,7 +1815,7 @@ export default {
// }, // },
cardtype(type) { cardtype(type) {
this.invoicepostVisible=true // this.invoicepostVisible=true
this.patientInfo = {} this.patientInfo = {}
this.typeList = [] this.typeList = []
this.costlist = [] this.costlist = []
...@@ -2501,6 +2501,7 @@ export default { ...@@ -2501,6 +2501,7 @@ 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.yibaoshowNew=false
this.bxxxinfo = res.data this.bxxxinfo = res.data
this.bxxxinfo.his_deduct_amount = 0 this.bxxxinfo.his_deduct_amount = 0
this.bxxxinfo.settle_type = this.bxxxinfo.settle_type =
...@@ -2589,16 +2590,18 @@ export default { ...@@ -2589,16 +2590,18 @@ export default {
}) })
}) })
.catch(err => { .catch(err => {
// this.yibaoshowNew=false
this.moreLoading = false this.moreLoading = false
this.yujiesuanLoading = false this.yujiesuanLoading = false
}) })
.finally(() => { .finally(() => {
this.yibaoshowNew=false
this.yujiesuanLoading = false this.yujiesuanLoading = false
this.closeSelectCard() this.closeSelectCard()
}) })
}, },
closeSelectCard() { closeSelectCard() {
this.yibaoshowNew = false // this.yibaoshowNew = false
}, },
// 自费预结算 // 自费预结算
zfBeforePre() { zfBeforePre() {
......
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