Browse Source

parsIcCardtoLocal

master
pengjun 5 months ago
parent
commit
cea96cd124
  1. 52
      src/components/webBooking/WebBooking.vue
  2. 87
      src/components/webBooking/WebBookingMzak.vue

52
src/components/webBooking/WebBooking.vue

@ -60,11 +60,11 @@
</el-table>
<el-table :data="tableDataDetails" border style="width: 100%" row-key="id" height="300" highlight-current-row
:summary-method="getSummaries" show-summary size="small" ref="webBookingDetaills">
<el-table-column label="序号" width="40" type="index"/>
:summary-method="getSummaries" show-summary size="small" ref="webBookingDetaills">
<el-table-column label="序号" width="40" type="index" />
<el-table-column label="已选组合项目" min-width="150" prop="asbitemName">
<template slot-scope="scope">
<div>
<div>
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="top">
<i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on"
style="padding: 3px; font-size: 14px;color: purple;" />
@ -76,17 +76,17 @@
<el-table-column label="标准价格" prop="standardPrice" min-width="70" align="center" />
<el-table-column label="折扣" prop="discount" min-width="60">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.discount" size="small" disabled/>
<el-input type="number" v-model="scope.row.discount" size="small" disabled />
</template>
</el-table-column>
<el-table-column label="数量" prop="amount" min-width="50">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.amount" size="small" disabled/>
<el-input type="number" v-model="scope.row.amount" size="small" disabled />
</template>
</el-table-column>
<el-table-column label="实收价格" prop="chargePrice" min-width="70">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.chargePrice" size="small" disabled/>
<el-input type="number" v-model="scope.row.chargePrice" size="small" disabled />
<!--立即触发保存 @blur="onSubmit('')" -->
</template>
</el-table-column>
@ -99,13 +99,13 @@
</el-select>
</template>
</el-table-column>
</el-table>
</el-table>
</div>
<div style="margin-top: 10px; display: flex;justify-content: space-between;">
<div style="margin: -8px 0 0 0; font-size: 12px;">
{{ asbDesc }}
</div>
<div>
<div>
<el-button v-if="false" @click="btnTest">测试</el-button>
</div>
<div>
@ -118,7 +118,7 @@
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, deepCopy } from "../../utlis/proFunc";
import { dddw, deepCopy, parsIcCardtoLocal } from "../../utlis/proFunc";
import moment from "moment";
@ -204,7 +204,7 @@ export default {
},
//
dictInit() {
dictInit() {
return new Promise((resolve, reject) => {
let curDate = moment(new Date()).format('YYYY-MM-DD')
@ -303,14 +303,14 @@ export default {
async rowClick(row) {
// chargeFlag string 0- 1- 2-退
this.currRowData = Object.assign({},row)
this.currRowData = Object.assign({}, row)
this.tableDataDetails = []
let sysParmId = "small_program_individual_appointment_mandatory_fee"
let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
//
if (sysParam.data == '1'){
if(row.chargeFlag != '1'){
if (sysParam.data == '1') {
if (row.chargeFlag != '1') {
this.$message.warning({ showClose: true, message: "该预约未缴费,不可进行登记" })
this.currRowData = {}
return
@ -322,20 +322,20 @@ export default {
thirdInterFaceId: this.query.thirdInterfaceId,
appointPatientRegisterId: row.appointPatientRegisterId
}).then(res => {
if (res.code > -1) {
if (res.code > -1) {
res.data.forEach(e => {
e.discount = e.standardPrice == 0 ? 100: Math.floor(e.chargePrice * 10000/e.standardPrice)/100
if(!e.isBelongGroupPackage){
e.isBelongGroupPackage = e.isInMedicalPackage
}
// e.standTotal = e.amount * e.standardPrice
if(this.currRowData.chargeFlag == '1'){
e.isCharge = 'Y'
e.chargeSourceFlag = '1' // 0-1-2-HIS
}
e.total = e.amount * e.chargePrice
});
e.discount = e.standardPrice == 0 ? 100 : Math.floor(e.chargePrice * 10000 / e.standardPrice) / 100
if (!e.isBelongGroupPackage) {
e.isBelongGroupPackage = e.isInMedicalPackage
}
// e.standTotal = e.amount * e.standardPrice
if (this.currRowData.chargeFlag == '1') {
e.isCharge = 'Y'
e.chargeSourceFlag = '1' // 0-1-2-HIS
}
e.total = e.amount * e.chargePrice
});
this.tableDataDetails = res.data
}
})

87
src/components/webBooking/WebBookingMzak.vue

@ -9,12 +9,12 @@
<el-option v-for="item in thirdInterfaces" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small"
style="width:90px;" value-format="yyyy-MM-dd" :picker-options="{disabledDate:false,shortcuts:pickerOptions.shortcuts}" />
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width:90px;"
value-format="yyyy-MM-dd" :picker-options="{ disabledDate: false, shortcuts: pickerOptions.shortcuts }" />
<span class="spanClass"></span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"
style="width:90px;" value-format="yyyy-MM-dd" :picker-options="{disabledDate:false,shortcuts:pickerOptions.shortcuts}"/>
</div>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;"
value-format="yyyy-MM-dd" :picker-options="{ disabledDate: false, shortcuts: pickerOptions.shortcuts }" />
</div>
<div class="query">
<span class="spanClass">检索关键字</span>
<el-input placeholder="姓名、电话、身份证号" v-model="query.keyWord" size="small" clearable style="width: 200px" />
@ -22,59 +22,61 @@
<div class="query">
<span class="spanClass">状态</span>
<el-select v-model="query.medicalStatus" placeholder="请选择" clearable style="width: 80px" size="small">
<el-option v-for="item in localDict.medicalStatus" :key="item.value" :label="item.label" :value="item.value">
<el-option v-for="item in localDict.medicalStatus" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
<div style="margin-top: -38px;width: 160px;">
<div>
<el-button @click="peopleIcCard" size="small" class="commonbutton" style="width:160px;font-size: 14px;">读身份证</el-button>
<el-button @click="peopleIcCard" size="small" class="commonbutton"
style="width:160px;font-size: 14px;">读身份证</el-button>
</div>
<div style="display: flex;">
<el-button size="small" class="commonbutton" @click="btnQuery" style="margin-top: 6px; width:60px;">查询</el-button>
<el-button @click="handleExport" size="small" class="commonbutton" style="margin-top: 6px; width:100px;"
>导出excel</el-button
>
</div>
<el-button size="small" class="commonbutton" @click="btnQuery"
style="margin-top: 6px; width:60px;">查询</el-button>
<el-button @click="handleExport" size="small" class="commonbutton"
style="margin-top: 6px; width:100px;">导出excel</el-button>
</div>
</div>
</div>
<div>
<el-table :data="tableData" border style="width: 100%" row-key="id" height="430" highlight-current-row
size="small" @row-click="rowClick" ref="webBooking" id="webBookingMzak">
size="small" @row-click="rowClick" ref="webBooking" id="webBookingMzak">
<el-table-column label="序号" type="index" width="40" align="center" />
<el-table-column label="部门名称" width="150" prop="departmentName" align="center" />
<el-table-column label="子部门" width="150" prop="childCompanyName" align="center" />
<el-table-column label="岗位" width="100" prop="positionName" align="center" />
<el-table-column label="子部门" width="150" prop="childCompanyName" align="center" />
<el-table-column label="岗位" width="100" prop="positionName" align="center" />
<el-table-column label="姓名" width="80" prop="patientName" align="center" />
<el-table-column label="身份证号" width="150" prop="idNo" align="center" />
<el-table-column label="预约时间" width="150" prop="bookingDate" align="center" />
<el-table-column label="手机号" width="130" prop="phone" align="center" />
<el-table-column label="性别" width="40" prop="sexId" align="center" />
<el-table-column label="年龄" width="40" prop="age" align="center" />
<el-table-column label="单位" width="150" prop="customerOrgId" align="center" />
<el-table-column label="单位" width="150" prop="customerOrgId" align="center" />
<el-table-column label="单位体检次数" width="150" prop="customerOrgRegisterId" align="center" />
<el-table-column label="分组/套餐" width="120" prop="customerOrgGroupId" align="center">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgGroupId ? scope.row.customerOrgGroupId : scope.row.medicalPackageName }}
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="预约编号" width="120" prop="thirdBookingId" align="center" />
<el-table-column label="状态" width="50" prop="medicalStatus" align="center" >
<el-table-column label="状态" width="50" prop="medicalStatus" align="center">
<template slot-scope="scope">
{{ dddw(localDict.medicalStatus,'value',scope.row.medicalStatus,'label') }}
{{ dddw(localDict.medicalStatus, 'value', scope.row.medicalStatus, 'label') }}
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 10px; display: flex;justify-content: space-between;">
<div style="margin: -8px 0 0 0; font-size: 12px;">
{{ asbDesc }}
</div>
<div>
<div>
<el-button v-if="false" @click="btnTest">测试</el-button>
</div>
<div>
@ -87,10 +89,11 @@
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, deepCopy } from "../../utlis/proFunc";
import { dddw, deepCopy, parsIcCardtoLocal } from "../../utlis/proFunc";
import moment from "moment";
import { exportToExcel } from "../../utlis/Export2Excel";
export default {
components: {
@ -108,17 +111,17 @@ export default {
appointStartDate: "",
appointStopDate: "",
completeFlag: "0",
keyWord:'',
startDate:'',
endDate:'',
medicalStatus:'0'
keyWord: '',
startDate: '',
endDate: '',
medicalStatus: '0'
},
asbDesc: '', //
localDict:{
medicalStatus:[
{label:'未开始',value:'0'}, // 0 1 2
{label:'已登记',value:'1'},
{label:'已完成',value:'2'},
localDict: {
medicalStatus: [
{ label: '未开始', value: '0' }, // 0 1 2
{ label: '已登记', value: '1' },
{ label: '已完成', value: '2' },
]
}
};
@ -157,13 +160,13 @@ export default {
dddw,
funMounted() {
this.dictInit()
// .then(res => {
// //this.btnQuery()
// })
// .then(res => {
// //this.btnQuery()
// })
},
//
dictInit() {
dictInit() {
// return new Promise((resolve, reject) => {
// let curDate = moment(new Date()).format('YYYY-MM-DD')
@ -288,7 +291,7 @@ export default {
// // e.standTotal = e.amount * e.standardPrice
// e.total = e.amount * e.chargePrice
// });
// this.tableDataDetails = res.data
// }
// })
@ -304,14 +307,14 @@ export default {
if (!this.currRowData.thirdBookingId) {
this.$message.warning({ showClose: true, message: "请选择预约的记录" })
return
}
}
this.dataTransOpts.tableS.appoint_patient_register = this.dataTrans(this.currRowData)
// this.dataTransOpts.tableM.appoint_register_asbitem = deepCopy(this.tableDataDetails)
this.dialogWin.WebBookingMzak = false
},
dataTrans(curRow){
dataTrans(curRow) {
// { //
// "appointPatientRegisterId": "string",
// "personId": "string",
@ -353,9 +356,9 @@ export default {
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
let ret = Object.assign({},curRow,{
mobileTelephone:curRow.phone,
personName:curRow.patientName
let ret = Object.assign({}, curRow, {
mobileTelephone: curRow.phone,
personName: curRow.patientName
})
return ret

Loading…
Cancel
Save