Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

outpatientChargesManagement.vue 39KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103
  1. <template>
  2. <div class="main-contain outpatientChargesManagement">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
  7. <div class="mainLeft">
  8. <!-- <div class="mainCell" style="justify-content: space-between;font-size:14px;">
  9. <p >未收费:<span style="color: red">{{cal_one}}</span>人</p>
  10. <p>已收费:<span style="color: red">{{cal_two}}</span>人</p>
  11. <p>已退费:<span style="color: red">{{cal_three}}</span>人</p>
  12. </div> -->
  13. <div class="mainCell">
  14. <el-radio-group v-model="radio" @change="changeRadio">
  15. <!-- <el-radio :label=1>未收费</el-radio>
  16. <el-radio :label=2>已收费</el-radio>
  17. <el-radio :label=3>已退费</el-radio>
  18. <el-radio :label=4>全部</el-radio> -->
  19. <el-radio :label=1>未收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_one}}</span>人</el-radio>
  20. <el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人</el-radio>
  21. <el-radio :label=3>已退费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人</el-radio>
  22. <el-radio :label=4>全部</el-radio>
  23. </el-radio-group>
  24. </div>
  25. <div class="mainCell" style="margin-bottom:10px;">
  26. <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  27. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
  28. 搜索
  29. </el-button>
  30. </div>
  31. <div>
  32. <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
  33. :row-style="{ color: '#303133' }"
  34. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  35. highlight-current-row ref="tab"
  36. @current-change="handleCurrentChange">
  37. <el-table-column align="center" prop="name" label="姓名" wdith='89'>
  38. <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
  39. </el-table-column>
  40. <el-table-column align="center" prop="name" label="就诊号" width="110">
  41. <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
  42. </el-table-column>
  43. </el-table>
  44. </div>
  45. </div>
  46. <div class="mainRight">
  47. <div class="mainCell fixedCell" style="margin-bottom:10px;">
  48. <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
  49. <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
  50. <el-button size="small" @click="open(3)" type="primary">打印</el-button>
  51. <el-button v-loading="loadingone" size="small"
  52. @click="open(6)"
  53. v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
  54. type="primary">挂号
  55. </el-button>
  56. <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
  57. @click="open(4)"
  58. type="primary">收费
  59. </el-button>
  60. <el-button size="small" @click="open(5)" type="primary"
  61. v-if="this.info && this.info.prescription_status == 3">退费
  62. </el-button>
  63. </div>
  64. <div class="mainCenter">
  65. <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
  66. <el-tab-pane label="日结" name="first">
  67. <div style="display:flex;height:100%;">
  68. <div class="centerLeft">
  69. <div class="tabsBox">
  70. <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
  71. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
  72. <el-tab-pane
  73. v-for="(item, index) in prescriptions"
  74. :key="index"
  75. :label="item.name"
  76. :name="item.name"
  77. >
  78. </el-tab-pane>
  79. <div class="RP">
  80. Rp
  81. <el-date-picker
  82. v-model="record_date"
  83. type="date"
  84. :clearable="false"
  85. @change="changeDate"
  86. format="yyyy-MM-dd"
  87. value-format="yyyy-MM-dd"
  88. placeholder="选择日期">
  89. </el-date-picker>
  90. </div>
  91. <prescription-table ref="prescription_tables"
  92. :prescription="curPrescriptions"></prescription-table>
  93. </el-tabs>
  94. </div>
  95. <div class="costBox">
  96. <span>当前处方总费用:<span style="color:red;">{{ total}}元</span></span>
  97. <span v-if="this.curPrescriptions.order_status == 1">待结算</span>
  98. <span v-if="this.curPrescriptions.order_status == 2">已结算</span>
  99. <span v-if="this.curPrescriptions.order_status == 3">已退费</span>
  100. </div>
  101. </div>
  102. <div class="centerRight">
  103. <p class="centerRightTitle">人员信息</p>
  104. <div style="display:flex;justify-content: space-between;line-height:30px;">
  105. <span style="font-size:14px;">人员编码:{{patientInfo.dialysis_no}}</span>
  106. <span style="font-size:14px;">日期:{{record_date}}</span>
  107. </div>
  108. <ul class="basicUl">
  109. <li style="width:50%;">姓名:{{patientInfo.name}}</li>
  110. <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
  111. <li style="width:50%;">年龄:{{patientInfo.age }}</li>
  112. <li style="width:50%;">身高:{{patientInfo.height?patientInfo.height:''}}</li>
  113. <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
  114. <li style="width:50%;">电话:{{patientInfo.phone}}</li>
  115. <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
  116. <li style="width:100%;">过敏史及其他病史:{{info.sick_history}}</li>
  117. </ul>
  118. <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
  119. <div style="display:flex;justify-content: space-between;line-height:30px;">
  120. <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number}}</span>
  121. </div>
  122. <ul class="basicUl">
  123. <li style="width:50%;">医生:{{ info.doctor }}</li>
  124. <li style="width:50%;">科室:{{ info.departments }}</li>
  125. <li style="width:100%;">总费用:{{ getTotal() }}</li>
  126. <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
  127. <li style="width:100%;">是否有传染病:</li>
  128. <li style="width:100%;">血压:</li>
  129. </ul>
  130. </div>
  131. </div>
  132. </el-tab-pane>
  133. <!--<el-tab-pane label="月结" name="second">-->
  134. <!--<div style="display:flex;height:100%;">-->
  135. <!--<div class="centerLeft">-->
  136. <!--<div class="tabsBox">-->
  137. <!--&lt;!&ndash;<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>&ndash;&gt;-->
  138. <!--<el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable>-->
  139. <!--<el-tab-pane-->
  140. <!--v-for="(item, index) in editableTabs"-->
  141. <!--:key="index"-->
  142. <!--:label="item.title"-->
  143. <!--:name="item.name"-->
  144. <!--&gt;-->
  145. <!--<div class="RP">-->
  146. <!--Rp-->
  147. <!--<el-date-picker-->
  148. <!--style="width:420px;"-->
  149. <!--v-model="value1"-->
  150. <!--type="daterange"-->
  151. <!--range-separator="至"-->
  152. <!--start-placeholder="开始日期"-->
  153. <!--end-placeholder="结束日期">-->
  154. <!--</el-date-picker>-->
  155. <!--</div>-->
  156. <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
  157. <!--</el-tab-pane>-->
  158. <!--&lt;!&ndash;<el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>&ndash;&gt;-->
  159. <!--</el-tabs>-->
  160. <!--</div>-->
  161. <!--<div class="costBox">-->
  162. <!--<span>处方编号:2134348971237883</span>-->
  163. <!--<span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>-->
  164. <!--<span>{{ state }}</span>-->
  165. <!--</div>-->
  166. <!--</div>-->
  167. <!--<div class="centerRight">-->
  168. <!--<p class="centerRightTitle">人员信息</p>-->
  169. <!--<div style="display:flex;justify-content: space-between;line-height:30px;">-->
  170. <!--<span style="font-size:14px;">人员编码:</span>-->
  171. <!--<span style="font-size:14px;">日期:{{start_time}}</span>-->
  172. <!--</div>-->
  173. <!--<ul class="basicUl">-->
  174. <!--<li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
  175. <!--<li style="width:50%;">性别:{{ patientInfo && patientInfo.gend == 1 ? '男' : "女" }}</li>-->
  176. <!--<li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
  177. <!--<li style="width:50%;">身高:</li>-->
  178. <!--<li style="width:50%;">体重:</li>-->
  179. <!--<li style="width:50%;">电话:</li>-->
  180. <!--<li style="width:100%;">地址:</li>-->
  181. <!--<li style="width:100%;">过敏史:</li>-->
  182. <!--</ul>-->
  183. <!--<p class="centerRightTitle">诊断信息</p>-->
  184. <!--<div style="display:flex;justify-content: space-between;line-height:30px;">-->
  185. <!--<span style="font-size:14px;">门诊编号:676273816287361</span>-->
  186. <!--</div>-->
  187. <!--<ul class="basicUl">-->
  188. <!--<li style="width:50%;">医生:{{ doctor.name }}</li>-->
  189. <!--<li style="width:50%;">科室:{{ doctor.department }}</li>-->
  190. <!--<li style="width:100%;">费用:{{ doctor.total }}元</li>-->
  191. <!--<li style="width:100%;">判断结果:</li>-->
  192. <!--<li style="width:100%;">是否有传染病:</li>-->
  193. <!--<li style="width:100%;">血压:</li>-->
  194. <!--</ul>-->
  195. <!--</div>-->
  196. <!--</div>-->
  197. <!--</el-tab-pane>-->
  198. </el-tabs>
  199. </div>
  200. </div>
  201. </div>
  202. <additionalCharges ref='additionalCharges' @click="addCharges"
  203. :addtions_charge="addtions_charge"></additionalCharges>
  204. <register-dialog ref='register' v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
  205. <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
  206. <el-dialog
  207. class="centerDialog"
  208. width="900px"
  209. title="打印"
  210. :visible.sync="treatVisible">
  211. <treatPrint :paramsObj='paramsObj'></treatPrint>
  212. </el-dialog>
  213. </div>
  214. </template>
  215. <script>
  216. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  217. import noCharge from './components/noCharge'
  218. import charged from './components/charged'
  219. import medicalInsuranceRefund from './components/medicalInsuranceRefund'
  220. import prescriptionTable from './components/prescriptionTable'
  221. import additionalCharges from './components/additionalCharges'
  222. import {getPatientInformation, getPatientList} from '@/api/project/project'
  223. import {getPatientInfo, getSchedulePatientList, Refund, register, upload} from '@/api/his/his'
  224. import RegisterDialog from "./components/registerDialog";
  225. import treatPrint from './treatPrint'
  226. import ChargeDialog from "./components/chargeDialog";
  227. const moment = require('moment')
  228. export default {
  229. components: {
  230. ChargeDialog,
  231. RegisterDialog,
  232. BreadCrumb,
  233. noCharge,
  234. charged,
  235. medicalInsuranceRefund,
  236. prescriptionTable,
  237. additionalCharges,
  238. treatPrint,
  239. },
  240. data() {
  241. return {
  242. crumbs: [
  243. {path: false, name: '门诊收费'},
  244. {path: false, name: '门诊收费管理'}
  245. ],
  246. current_index: 0,
  247. cal_one: '',
  248. cal_two: '',
  249. cal_three: '',
  250. tableHeight: '',
  251. fullHeight: document.documentElement.clientHeight,
  252. activeName: 'first',
  253. info: {},
  254. curPrescriptions: {},
  255. prescriptions: [],
  256. record_date: '',
  257. tableData: [],
  258. editableTabsValue: '处方1',
  259. loadingone: false,
  260. editableTabs: [{
  261. title: '处方1',
  262. name: '1'
  263. }],
  264. tabIndex: 1,
  265. hisPatientInfo: {},
  266. loadingtwo: false,
  267. patientTableData: [{
  268. name: '杨美英',
  269. mdtrt_id: '1709946'
  270. }],
  271. patientInfo: {id: 0},
  272. doctor: {},
  273. total: 0,
  274. state: '未收费',
  275. radio: 1,
  276. radioStatus: 1,
  277. search_input: '',
  278. start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
  279. patient_id: 0,
  280. prescription_id: 0,
  281. all_table_data: [],
  282. order: {},
  283. addtions_charge: [],
  284. treatVisible: false,
  285. paramsObj: {}
  286. }
  287. },
  288. created() {
  289. let tableHeight = document.body.clientHeight - 243
  290. this.tableHeight = tableHeight
  291. var nowDate = new Date()
  292. var nowYear = nowDate.getFullYear()
  293. var nowMonth = nowDate.getMonth() + 1
  294. var nowDay = nowDate.getDate()
  295. this.record_date =
  296. nowYear +
  297. '-' +
  298. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  299. '-' +
  300. (nowDay < 10 ? '0' + nowDay : nowDay)
  301. //获取患者信息
  302. this.getPatientList()
  303. },
  304. methods: {
  305. chargeConfirm(form){
  306. form['id'] = this.patientInfo.id
  307. form['record_time'] = this.record_date
  308. this.loadingtwo = true
  309. upload(form).then(response => {
  310. if (response.data.state == 0) {
  311. this.$message.error(response.data.msg)
  312. this.loadingtwo = false
  313. this.$refs.charge.hide()
  314. return false
  315. } else {
  316. this.state = '已收费'
  317. this.$message({message: '收费成功', type: 'success'})
  318. this.$refs.charge.hide()
  319. this.loadingtwo = false
  320. this.cal_one = this.cal_one - 1
  321. this.cal_two = this.cal_two + 1
  322. this.patientTableData.splice(this.current_index, 1)
  323. }
  324. })
  325. },chargeCancel(){
  326. this.$refs.charge.hide()
  327. },
  328. confirm(forms) {
  329. forms['id'] = this.patientInfo.id,
  330. forms['record_time'] = this.record_date,
  331. this.loadingone = true
  332. register(forms).then(response => {
  333. if (response.data.state == 0) {
  334. this.$message.error(response.data.msg)
  335. this.loadingone = false
  336. this.$refs.register.hide()
  337. return false
  338. } else {
  339. this.getPatientList()
  340. this.$message({message: '挂号成功', type: 'success'})
  341. this.$refs.register.hide()
  342. this.loadingone = false
  343. var his_info = response.data.data.his_info
  344. this.hisPatientInfo = his_info
  345. }
  346. })
  347. }, cancel() {
  348. this.$refs.register.hide()
  349. },
  350. addCharges() {
  351. this.$refs.additionalCharges.show()
  352. },
  353. changeDate(val) {
  354. if (this.patientInfo.id == 0) {
  355. this.$message.error('请先选择患者')
  356. return
  357. }
  358. let params = {
  359. 'record_date': val,
  360. 'patient_id': this.patientInfo.id
  361. }
  362. getPatientInfo(params).then(response => {
  363. if (response.data.state == 0) {
  364. this.$message.error(response.data.msg)
  365. return false
  366. } else {
  367. this.patientInfo = response.data.data.xt_info
  368. this.hisPatientInfo = response.data.data.his_info
  369. this.info = response.data.data.info
  370. this.addtions_charge = response.data.data.addtions_charge
  371. this.prescriptions = []
  372. for (let i = 0; i < response.data.data.prescription.length; i++) {
  373. var prescription = response.data.data.prescription[i]
  374. let tempAdvice = []
  375. let tempProject = []
  376. for (let b = 0; b < prescription.advices.length; b++) {
  377. let obj = {
  378. advice_id: prescription.advices[b].id,
  379. drug_name: prescription.advices[b].advice_name,
  380. single_dose: prescription.advices[b].single_dose,
  381. delivery_way: prescription.advices[b].delivery_way,
  382. execution_frequency: prescription.advices[b].execution_frequency,
  383. retail_price: prescription.advices[b].price.toString(),
  384. remark: prescription.advices[b].remark,
  385. day: prescription.advices[b].day,
  386. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  387. single_dose_unit: prescription.advices[b].single_dose_unit,
  388. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  389. medical_insurance_number: prescription.advices[b].med_list_codg
  390. }
  391. tempAdvice.push(obj)
  392. }
  393. for (let b = 0; b < prescription.project.length; b++) {
  394. console.log(prescription.project[b].project.project_name)
  395. let obj = {
  396. id: prescription.project[b].id,
  397. project_id: prescription.project[b].project.id,
  398. project_name: prescription.project[b].project.project_name,
  399. statistical_classification: prescription.project[b].project.statistical_classification,
  400. single_dose: prescription.project[b].single_dose,
  401. delivery_way: prescription.project[b].delivery_way,
  402. execution_frequency: prescription.project[b].execution_frequency,
  403. number_days: prescription.project[b].day,
  404. total: prescription.project[b].count.toString(),
  405. price: prescription.project[b].price,
  406. remark: prescription.project[b].remark,
  407. medical_code: prescription.project[b].project.medical_code,
  408. unit: prescription.project[b].unit,
  409. }
  410. tempProject.push(obj)
  411. }
  412. let index = i + 1
  413. let obj = {
  414. id: prescription.id,
  415. name: '处方' + index,
  416. advices: tempAdvice,
  417. project: tempProject,
  418. type: response.data.data.prescription[i].type,
  419. order_status: response.data.data.prescription[i].order_status
  420. }
  421. this.prescriptions.push(obj)
  422. this.curPrescriptions = this.prescriptions[0]
  423. this.total = 0
  424. this.total = this.getTotalOne()
  425. }
  426. }
  427. })
  428. },
  429. handleClick() {
  430. },
  431. searchAction() {
  432. },
  433. tabclickEvent(val) {
  434. console.log('val', val.name)
  435. for (let i = 0; i < this.prescriptions.length; i++) {
  436. if (this.prescriptions[i].name == val.name) {
  437. this.curPrescriptions = {}
  438. var temp = this.deepClone(this.prescriptions[i])
  439. this.curPrescriptions = temp
  440. }
  441. }
  442. console.log('9999', this.curPrescriptions)
  443. this.prescription_id = this.curPrescriptions.id
  444. this.total = 0
  445. this.total = this.getTotalOne()
  446. }, deepClone(source) {
  447. if (!source && typeof source !== 'object') {
  448. throw new Error('error arguments', 'shallowClone')
  449. }
  450. const targetObj = source.constructor === Array ? [] : {}
  451. Object.keys(source).forEach((keys) => {
  452. if (source[keys] && typeof source[keys] === 'object') {
  453. targetObj[keys] = this.deepClone(source[keys])
  454. } else {
  455. targetObj[keys] = source[keys]
  456. }
  457. })
  458. return targetObj
  459. }, getTotalOne() {
  460. var total = 0
  461. if (this.curPrescriptions.type == 1) {
  462. if (this.curPrescriptions.advices != null) {
  463. for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
  464. total = total + Math.floor((this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number) * 100) / 100
  465. }
  466. }
  467. } else {
  468. if (this.curPrescriptions.project != null) {
  469. for (let b = 0; b < this.curPrescriptions.project.length; b++) {
  470. total = total + Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
  471. }
  472. }
  473. }
  474. if (this.curPrescriptions.addition != null) {
  475. for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
  476. total = total + Math.floor((this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count) * 100) / 100
  477. }
  478. }
  479. return Math.floor(total * 100) / 100
  480. },
  481. getTotal() {
  482. var total = 0
  483. for (let i = 0; i < this.prescriptions.length; i++) {
  484. if (this.prescriptions[i].advices != null) {
  485. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  486. total = total + Math.floor((this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number) * 100) / 100
  487. }
  488. }
  489. if (this.prescriptions[i].project != null) {
  490. for (let b = 0; b < this.prescriptions[i].project.length; b++) {
  491. total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
  492. }
  493. }
  494. if (this.prescriptions[i].addition != null) {
  495. for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
  496. total = total + Math.floor((this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count) * 100) / 100
  497. }
  498. }
  499. }
  500. return Math.floor(total * 100) / 100
  501. },
  502. moreState(tab, event) {
  503. if (tab == 'more') {
  504. return false
  505. }
  506. },
  507. open(index) {
  508. if (index == 1) {
  509. } else if (index == 2) {
  510. this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
  511. } else if (index == 3) {
  512. let obj = {
  513. record_date: this.record_date,
  514. patient_id: this.patient_id,
  515. prescription_id: this.prescription_id
  516. }
  517. this.paramsObj = obj
  518. this.treatVisible = true
  519. // this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
  520. } else if (index == 4) {
  521. if (this.hisPatientInfo.id == 0) {
  522. this.$message({message: '该患者尚未挂号,请先挂号', type: 'error'})
  523. return
  524. }
  525. this.$refs.charge.show(this.getTotal())
  526. } else if (index == 5) {
  527. this.$confirm('是否退费', '退费', {
  528. confirmButtonText: '确 定',
  529. cancelButtonText: '取 消',
  530. type: 'warning'
  531. }).then(() => {
  532. let params = {
  533. 'order_id': this.order.id,
  534. 'number': this.order.number,
  535. }
  536. Refund(params).then(response => {
  537. if (response.data.state == 0) {
  538. this.$message.error(response.data.msg)
  539. this.loadingtwo = false
  540. return false
  541. } else {
  542. this.$message({message: '退费成功', type: 'success'})
  543. this.loadingtwo = false
  544. }
  545. })
  546. }).catch(() => {
  547. })
  548. } else if (index == 6) {
  549. if (this.patientInfo.id == 0) {
  550. this.$message.error('请先选择要挂号的病人')
  551. return
  552. }
  553. this.$refs.register.show(this.patientInfo)
  554. }
  555. },
  556. choosePatient() {
  557. console.log(id)
  558. this.radioStatus = id
  559. this.getPatientList()
  560. },
  561. changeRadio(id) {
  562. // console.log(id)
  563. // this.radioStatus = id
  564. // this.getPatientList()
  565. let temp_id = id
  566. let params = {
  567. 'record_date': this.record_date
  568. }
  569. getSchedulePatientList(params).then(response => {
  570. if (response.data.state == 0) {
  571. this.$message.error(response.data.msg)
  572. return false
  573. } else {
  574. this.patientTableData = []
  575. this.all_table_data = []
  576. let one_count = 0
  577. let two_count = 0
  578. let three_count = 0
  579. for (let i = 0; i < response.data.data.list.length; i++) {
  580. console.log('99999999', response.data.data.list)
  581. if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
  582. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  583. one_count = one_count + 1
  584. this.patientTableData.push(response.data.data.list[i])
  585. }
  586. }
  587. if (response.data.data.list[i].info.prescription_status == 3) {
  588. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  589. two_count = two_count + 1
  590. }
  591. }
  592. if (response.data.data.list[i].info.prescription_status == 4) {
  593. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  594. three_count = three_count + 1
  595. }
  596. }
  597. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  598. this.all_table_data.push(response.data.data.list[i])
  599. }
  600. }
  601. this.cal_one = one_count
  602. this.cal_two = two_count
  603. this.cal_three = three_count
  604. switch (temp_id) {
  605. case 1:
  606. this.patientTableData = []
  607. for (let i = 0; i < this.all_table_data.length; i++) {
  608. if (this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2) {
  609. this.patientTableData.push(this.all_table_data[i])
  610. }
  611. }
  612. break
  613. case 2:
  614. this.patientTableData = []
  615. for (let i = 0; i < this.all_table_data.length; i++) {
  616. if (this.all_table_data[i].info.prescription_status == 3) {
  617. this.patientTableData.push(this.all_table_data[i])
  618. }
  619. }
  620. break
  621. case 3:
  622. this.patientTableData = []
  623. for (let i = 0; i < this.all_table_data.length; i++) {
  624. if (this.all_table_data[i].info.prescription_status == 4) {
  625. this.patientTableData.push(this.all_table_data[i])
  626. }
  627. }
  628. break
  629. case 4:
  630. this.patientTableData = []
  631. this.patientTableData = this.all_table_data
  632. break
  633. }
  634. this.current_index = 0
  635. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  636. this.getPatientInformation(this.patientTableData[0].patients.id, "")
  637. }
  638. })
  639. },
  640. //患者列表
  641. getPatientList() {
  642. let params = {
  643. 'record_date': this.record_date
  644. }
  645. getSchedulePatientList(params).then(response => {
  646. if (response.data.state == 0) {
  647. this.$message.error(response.data.msg)
  648. return false
  649. } else {
  650. this.patientTableData = []
  651. this.all_table_data = []
  652. let one_count = 0
  653. let two_count = 0
  654. let three_count = 0
  655. for (let i = 0; i < response.data.data.list.length; i++) {
  656. // console.log('99999999', response.data.data.list)
  657. if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
  658. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  659. one_count = one_count + 1
  660. this.patientTableData.push(response.data.data.list[i])
  661. }
  662. }
  663. if (response.data.data.list[i].info.prescription_status == 3) {
  664. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  665. two_count = two_count + 1
  666. }
  667. }
  668. if (response.data.data.list[i].info.prescription_status == 4) {
  669. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  670. three_count = three_count + 1
  671. }
  672. }
  673. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  674. this.all_table_data.push(response.data.data.list[i])
  675. }
  676. }
  677. this.cal_one = one_count
  678. this.cal_two = two_count
  679. this.cal_three = three_count
  680. this.current_index = 0
  681. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  682. this.getPatientInformation(this.patientTableData[0].patients.id, "")
  683. }
  684. })
  685. },
  686. unique(arr) {
  687. const res = new Map()
  688. return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
  689. },
  690. handleCurrentChange(val) {
  691. console.log('val', val)
  692. this.getPatientInformation(val.patients.id, val.info.batch_number)
  693. this.patient_id = val.patients.id
  694. for (let i = 0; i < this.patientTableData.length; i++) {
  695. if (this.patientTableData[i].patients.id == val.patients.id) {
  696. this.current_index = i
  697. }
  698. }
  699. },
  700. //获取患者的基本信息
  701. getPatientInformation(id, batch_number) {
  702. let params = {
  703. 'record_date': this.record_date,
  704. 'patient_id': id,
  705. 'number': batch_number,
  706. }
  707. getPatientInfo(params).then(response => {
  708. if (response.data.state == 0) {
  709. this.$message.error(response.data.msg)
  710. return false
  711. } else {
  712. this.patientInfo = response.data.data.xt_info
  713. this.hisPatientInfo = response.data.data.his_info
  714. this.info = response.data.data.info
  715. this.order = response.data.data.order
  716. this.addtions_charge = response.data.data.addtions_charge
  717. this.prescriptions = []
  718. console.log("9991323242r5253535", response.data.data.prescription)
  719. this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
  720. console.log("222222", this.prescription_id)
  721. for (let i = 0; i < response.data.data.prescription.length; i++) {
  722. var prescription = response.data.data.prescription[i]
  723. let tempAdvice = []
  724. let tempProject = []
  725. let tempAddition = []
  726. for (let b = 0; b < prescription.advices.length; b++) {
  727. let obj = {
  728. advice_id: prescription.advices[b].id,
  729. drug_name: prescription.advices[b].advice_name,
  730. single_dose: prescription.advices[b].single_dose,
  731. delivery_way: prescription.advices[b].delivery_way,
  732. execution_frequency: prescription.advices[b].execution_frequency,
  733. retail_price: prescription.advices[b].price.toString(),
  734. remark: prescription.advices[b].remark,
  735. day: prescription.advices[b].day,
  736. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  737. single_dose_unit: prescription.advices[b].single_dose_unit,
  738. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  739. medical_insurance_number: prescription.advices[b].med_list_codg
  740. }
  741. tempAdvice.push(obj)
  742. }
  743. for (let b = 0; b < prescription.project.length; b++) {
  744. console.log(prescription.project[b].project.project_name)
  745. let obj = {
  746. id: prescription.project[b].id,
  747. project_id: prescription.project[b].project.id,
  748. project_name: prescription.project[b].project.project_name,
  749. statistical_classification: prescription.project[b].project.statistical_classification,
  750. single_dose: prescription.project[b].single_dose,
  751. delivery_way: prescription.project[b].delivery_way,
  752. execution_frequency: prescription.project[b].execution_frequency,
  753. number_days: prescription.project[b].day,
  754. total: prescription.project[b].count.toString(),
  755. price: prescription.project[b].price,
  756. remark: prescription.project[b].remark,
  757. medical_code: prescription.project[b].project.medical_code
  758. }
  759. tempProject.push(obj)
  760. }
  761. for (let b = 0; b < prescription.addition.length; b++) {
  762. let obj = {
  763. id: prescription.addition[b].id,
  764. item_name: prescription.addition[b].item_name,
  765. price: prescription.addition[b].price,
  766. count: prescription.addition[b].count,
  767. item_id: prescription.addition[b].item_id,
  768. }
  769. tempAddition.push(obj)
  770. }
  771. let index = i + 1
  772. let obj = {
  773. id: prescription.id,
  774. name: '处方' + index,
  775. advices: tempAdvice,
  776. project: tempProject,
  777. addition: tempAddition,
  778. order_status: response.data.data.prescription[i].order_status,
  779. type: response.data.data.prescription[i].type
  780. }
  781. this.prescriptions.push(obj)
  782. this.curPrescriptions = this.prescriptions[0]
  783. this.total = 0
  784. this.total = this.getTotalOne()
  785. console.log(this.total)
  786. }
  787. }
  788. })
  789. }
  790. },
  791. mounted() {
  792. const that = this
  793. window.onresize = () => {
  794. return (() => {
  795. window.fullHeight = document.documentElement.clientHeight
  796. that.fullHeight = window.fullHeight
  797. })()
  798. }
  799. },
  800. watch: {
  801. fullHeight(val) {
  802. if (!this.timer) {
  803. this.fullHeight = val
  804. let tableHeight = val - 243
  805. this.tableHeight = tableHeight
  806. this.timer = true
  807. let that = this
  808. setTimeout(function () {
  809. that.timer = false
  810. }, 400)
  811. }
  812. }
  813. }
  814. }
  815. </script>
  816. <style lang="scss" scoped>
  817. .app-container {
  818. height: 100%;
  819. }
  820. .outpatientChargesManagement {
  821. height: 100%;
  822. display: flex;
  823. flex-direction: column;
  824. .mainLeft {
  825. width: 200px;
  826. height: 100%;
  827. display: flex;
  828. flex-direction: column;
  829. padding-top: 20px;
  830. .el-radio {
  831. margin-right: 5px;
  832. }
  833. }
  834. .mainCell {
  835. height: 36px;
  836. display: flex;
  837. align-items: center;
  838. }
  839. .fixedCell {
  840. position: fixed;
  841. z-index: 99;
  842. right: 42px;
  843. background: #fff;
  844. display: flex;
  845. justify-content: space-between;
  846. }
  847. .mainRight {
  848. margin-left: 10px;
  849. flex: 1;
  850. height: 100%;
  851. display: flex;
  852. flex-direction: column;
  853. overflow-y: auto;
  854. .cellSpan {
  855. min-width: 80px;
  856. display: inline-block;
  857. margin-right: 10px;
  858. }
  859. }
  860. .tabsBox {
  861. position: relative;
  862. height: 90%;
  863. overflow-y: auto;
  864. margin-bottom: 60px;
  865. .el-tabs__item {
  866. padding: 0 10px;
  867. }
  868. }
  869. .addTab {
  870. position: absolute;
  871. right: 6px;
  872. top: 3px;
  873. z-index: 20;
  874. }
  875. .mainCenter {
  876. display: flex;
  877. flex: 1;
  878. height:100%;
  879. }
  880. .costBox {
  881. width: 100%;
  882. height: 60px;
  883. background: #fff;
  884. position: absolute;
  885. bottom: 0;
  886. display: flex;
  887. align-items: center;
  888. justify-content: space-between;
  889. }
  890. .centerLeft {
  891. flex: 1;
  892. display: flex;
  893. flex-direction: column;
  894. position: relative;
  895. }
  896. .preTabs {
  897. height: 100%;
  898. display: flex;
  899. flex-direction: column;
  900. .el-tab-pane {
  901. height: auto !important;
  902. }
  903. }
  904. .settlementTabs {
  905. flex: 1;
  906. .el-tab-pane {
  907. height: 100%;
  908. }
  909. .el-tabs__content {
  910. height: 100%;
  911. }
  912. }
  913. .centerRight {
  914. width: 300px;
  915. margin-left: 10px;
  916. display: flex;
  917. flex-direction: column;
  918. overflow-y: auto;
  919. }
  920. .RP {
  921. color: #409EFF;
  922. font-size: 20px;
  923. margin-bottom: 5px;
  924. }
  925. .centerRightTitle {
  926. color: #409EFF;
  927. }
  928. .basicUl {
  929. border-top: 1px solid #e5e5e5;
  930. border-left: 1px solid #e5e5e5;
  931. display: flex;
  932. flex-wrap: wrap;
  933. li {
  934. border-bottom: 1px solid #e5e5e5;
  935. border-right: 1px solid #e5e5e5;
  936. width: 100%;
  937. height: 38px;
  938. line-height: 38px;
  939. text-indent: 5px;
  940. font-size: 14px;
  941. }
  942. }
  943. }
  944. </style>
  945. <style lang="scss">
  946. #tab-more {
  947. .el-icon-close {
  948. display: none;
  949. }
  950. }
  951. .settlementTabs {
  952. .el-tabs__content {
  953. height: 90%;
  954. }
  955. }
  956. .preTabs {
  957. .el-tabs__content {
  958. flex: 1;
  959. overflow-y: auto;
  960. padding: 5px 0 5px 5px;
  961. }
  962. }
  963. </style>