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

outpatientChargesManagement.vue 43KB

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