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

refactor(components): 重构 ReadcardsNewSFC 组件

- 优化了组件的样式和布局
- 调整了部分变量和方法的命名
- 移除了冗余的注释和空行
- 统一了代码格式和风格
parent 44dddb11
......@@ -11,10 +11,10 @@
>
<div class="my-card-body">
<!-- <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;">
<el-checkbox v-model="isYDpatint">是否异地(<span style="color: red;">患者有多个参保信息时选择</span>)</el-checkbox>
<div style="text-align: center; line-height: 50px">
<el-checkbox v-model="isYDpatint">是否异地(<span style="color: red">患者有多个参保信息时选择</span>)</el-checkbox>
</div>
<div class="swipe_user_select_content" style="margin: 10px auto">
......@@ -34,10 +34,9 @@
@keyup.enter.native="handleEnterModal()"
/>
</el-form-item>
<!--
<!--
<el-button @click="getmzxx('2')"
style="color: #3d7ff5; width: 97px; font-size: 17px; font-weight: 600; border-radius: 8px">读卡</el-button> -->
</el-form>
<!-- <el-input ref="cardInput" v-model.trim="form.physicalCard" style="width: 282px;margin-left: 10px; "
placeholder="请输入卡号" @blur="handleSetFocus()" @keyup.enter.native="handleEnterModal()" /> -->
......@@ -47,7 +46,7 @@
</template>
<script>
// 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 {
components: {},
props: {
......@@ -58,17 +57,17 @@ export default {
return ''
},
},
patientcard:Object,
patientcard: Object,
visible: Boolean,
flag: String,
xzbz: String,
patientData:Object,
selectTableArr:Array
patientData: Object,
selectTableArr: Array,
},
data() {
return {
isYDpatint:false,
jiezhiLoading:false,
isYDpatint: false,
jiezhiLoading: false,
listinfo: {
type: '',
},
......@@ -83,9 +82,8 @@ export default {
physicalCard: '', // 卡号
},
DiagnosisCardOptions: [], // 患者卡类型
shenfenzhenghao:'',
insurance:'',
shenfenzhenghao: '',
insurance: '',
}
},
watch: {
......@@ -93,6 +91,7 @@ export default {
handler(v) {
this.isOpenCardeds = v
if (v === true) {
this.jiezhiLoading=false
this.$nextTick(() => {
this.form.physicalCard = ''
// this.form = {}
......@@ -107,16 +106,16 @@ export default {
}
},
},
patientData:{
handler:function(nv,ov){
if(nv){
patientData: {
handler: function (nv, ov) {
if (nv) {
this.shenfenzhenghao = nv.id_card
this.insurance = nv.insurance_type?.value || ''
}
},
immediate:true,
deep:true,
}
immediate: true,
deep: true,
},
},
created() {
// 就诊卡类型
......@@ -149,7 +148,7 @@ export default {
},
// 输入框回车事件
handleEnterModal() {
this.jiezhiLoading=true
this.jiezhiLoading = true
if (this.form.physicalCard.toString().length === 28) {
this.loadingapplyList = true
// 电子医保码
......@@ -165,7 +164,7 @@ export default {
// 就诊卡
this.form.physicalCardType = 'HOSPITAL_CARD'
// this.$emit('getyibaoinfo', this.form)
this.jiezhiLoading=false
this.jiezhiLoading = false
this.$message({
message: '不支持此方式结算',
......@@ -175,7 +174,7 @@ export default {
// 输入患者id
this.form.physicalCardType = 'PATIENT_ID'
// this.$emit('getyibaoinfo', this.form)
this.jiezhiLoading=false
this.jiezhiLoading = false
this.$message({
message: '不支持此方式结算',
......@@ -189,20 +188,18 @@ export default {
// this.$emit('getyibaoinfo', this.form)
this.param = {
qr_code: this.form.physicalCard
qr_code: this.form.physicalCard,
}
getInfoByQrCode(this.param)
.then(response => {
this.form.physicalCard=response.data.data.cardNo
this.form.physicalCard = response.data.data.cardNo
this.form.physicalCardType = 'ID_CARD'
this.getmzxx('1')
})
.finally((err) => {
})
.finally(err => {})
this.jiezhiLoading=false
// this.jiezhiLoading=false
// this.$message({
// message: '不支持此方式结算',
// type: 'error',
......@@ -212,8 +209,8 @@ export default {
this.form.physicalCardType = 'ID_CARD'
this.getmzxx('1')
// this.$emit('getyibaoinfo', this.form)
}else{
this.jiezhiLoading=false
} else {
this.jiezhiLoading = false
this.$message({
message: '不支持此方式结算',
type: 'error',
......@@ -293,7 +290,7 @@ export default {
// 接收websocket返回的数据值
// 卡类型:就诊卡1,身份证4,社保卡3,山东省健康码8,医保电子凭证2
setOnmessageMessage(evt) {
console.log(evt,'.............................')
console.log(evt, '.............................')
let data = ''
if (this.isJSON(evt.data) && evt?.data) {
data = JSON.parse(evt.data)
......@@ -375,24 +372,24 @@ export default {
// 身份证
if (e == '1') {
this.param = {
is_yd:this.isYDpatint==true?'1':'0',
id_card:this.form.physicalCard,
insurance:this.insurance,
cache:'1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C',
card_type:'02'
is_yd: this.isYDpatint == true ? '1' : '0',
id_card: this.form.physicalCard,
insurance: this.insurance,
cache: '1',
yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_type: '02',
}
queryBasicInfo(this.param)
.then(response => {
this.jiezhiLoading=false
this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'02')
this.form.physicalCard=''
// this.jiezhiLoading = false
// this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data, '02')
this.form.physicalCard = ''
})
.finally((err) => {
this.jiezhiLoading=false
this.dialogFormVisible = false
.finally(err => {
// this.jiezhiLoading = false
// this.dialogFormVisible = false
})
}
// 2=社保卡
......@@ -410,57 +407,57 @@ export default {
// card_no:'A83459572', //,'A73079277'
// sbm:'370100D1560000050022A5F32E307E9E' , //,'370100D156000005006ACF514551621F'
// name: '王敏',//'刘楚潇'
is_yd:this.isYDpatint==true?'1':'0',
insurance:this.insurance,//this.insurance
cache:'1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6',
card_type:'03',
qr_code:'',
id_card:this.form.physicalCard,//,'370104202109020049'
dzpzywm:'301',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C',
is_yd: this.isYDpatint == true ? '1' : '0',
insurance: this.insurance, //this.insurance
cache: '1',
yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
card_type: '03',
qr_code: '',
id_card: this.form.physicalCard, //,'370104202109020049'
dzpzywm: '301',
xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_no: this.form.idcard, //,'A73079277'
sbm:this.form.p_sbm , //,'370100D156000005006ACF514551621F'
name: this.form.xm,//'刘楚潇'
sbm: this.form.p_sbm, //,'370100D156000005006ACF514551621F'
name: this.form.xm, //'刘楚潇'
}
queryReadRard(this.param)
.then(response => {
this.jiezhiLoading=false
this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'03')
this.form.physicalCard=''
// this.jiezhiLoading = false
// this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data, '03')
this.form.physicalCard = ''
})
.finally(() => {
this.jiezhiLoading=false
// this.jiezhiLoading = false
this.$emit('close')
this.dialogFormVisible = false
// this.dialogFormVisible = false
})
}
// 医保电子凭证
if (e == '3') {
this.param = {
is_yd:this.isYDpatint==true?'1':'0',
insurance:this.insurance,//this.insurance
cache:'1',
yltclb:this.selectTableArr[0].settle_type.is_mb?'4':'6',
card_type:'01',
id_card:this.patientData.id_card,
qr_code:this.form.physicalCard,
dzpzywm:'301',
xzbz:this.selectTableArr[0].settle_type.is_gs?'D':'C',
card_no:this.patientData.patient_id,
sbm:this.patientData.p_sbm,
name:this.patientData.name,
is_yd: this.isYDpatint == true ? '1' : '0',
insurance: this.insurance, //this.insurance
cache: '1',
yltclb: this.selectTableArr[0].settle_type.is_mb ? '4' : '6',
card_type: '01',
id_card: this.patientData.id_card,
qr_code: this.form.physicalCard,
dzpzywm: '301',
xzbz: this.selectTableArr[0].settle_type.is_gs ? 'D' : 'C',
card_no: this.patientData.patient_id,
sbm: this.patientData.p_sbm,
name: this.patientData.name,
}
queryReadRard(this.param)
.then(response => {
this.jiezhiLoading=false
this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data,'01',this.adminpingzhengma)
this.form.physicalCard=''
// this.jiezhiLoading = false
// this.dialogFormVisible = false
this.$emit('getyibaoinfo', response.data, '01', this.adminpingzhengma)
this.form.physicalCard = ''
})
.finally(() => {
this.jiezhiLoading=false
// this.jiezhiLoading = false
this.loading = false
})
}
......
......@@ -1815,7 +1815,7 @@ export default {
// },
cardtype(type) {
this.invoicepostVisible=true
// this.invoicepostVisible=true
this.patientInfo = {}
this.typeList = []
this.costlist = []
......@@ -2501,6 +2501,7 @@ export default {
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
})
.then(res => {
// this.yibaoshowNew=false
this.bxxxinfo = res.data
this.bxxxinfo.his_deduct_amount = 0
this.bxxxinfo.settle_type =
......@@ -2589,16 +2590,18 @@ export default {
})
})
.catch(err => {
// this.yibaoshowNew=false
this.moreLoading = false
this.yujiesuanLoading = false
})
.finally(() => {
this.yibaoshowNew=false
this.yujiesuanLoading = false
this.closeSelectCard()
})
},
closeSelectCard() {
this.yibaoshowNew = false
// this.yibaoshowNew = false
},
// 自费预结算
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