chargeDetailManagement.vue 60KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693
  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. <!-- <el-date-picker-->
  9. <!-- v-model="record_date"-->
  10. <!-- prefix-icon="el-icon-date"-->
  11. <!-- @change="changeTimeTwo"-->
  12. <!-- :editable="false"-->
  13. <!-- style="width: 100%;"-->
  14. <!-- type="date"-->
  15. <!-- :picker-options="pickerOptions"-->
  16. <!-- placeholder="选择开始时间"-->
  17. <!-- align="right"-->
  18. <!-- format="yyyy-MM-dd"-->
  19. <!-- value-format="yyyy-MM-dd">-->
  20. <!-- </el-date-picker>-->
  21. <div class="mainCell">
  22. <el-radio-group v-model="radio" @change="changeRadio">
  23. <el-radio :label=1>未上传<span
  24. style="color: red;margin-bottom:10px;display: inline-block;">{{ un_upload_num }}</span>人
  25. </el-radio>
  26. <el-radio :label=2>已上传<span
  27. style="color: red;margin-bottom:10px;display: inline-block;">{{ upload_num }}</span>人
  28. </el-radio>
  29. </el-radio-group>
  30. </div>
  31. <div class="mainCell" style="margin-bottom:10px;">
  32. <el-input size="small" v-model.trim="search_input"
  33. class="filter-item"/>
  34. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
  35. @click="searchAction">
  36. 搜索
  37. </el-button>
  38. </div>
  39. <div>
  40. <el-table :data="patientTableData" :height="tableHeight" border
  41. style="width: 100%;"
  42. :row-style="{ color: '#303133' }"
  43. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  44. highlight-current-row ref="tab"
  45. @current-change="handleCurrentChange">
  46. <el-table-column align="center" prop="name" label="姓名" wdith='89'>
  47. <template slot-scope="scope">{{ scope.row.name }}</template>
  48. </el-table-column>
  49. <el-table-column align="center" prop="name" label="就诊号" width="110">
  50. <template slot-scope="scope">{{ scope.row ? scope.row.number : '' }}
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. </div>
  55. </div>
  56. <div class="mainRight">
  57. <div class="mainCell fixedCell" style="margin-bottom:10px;">
  58. <div v-if="activeName == 'first'">
  59. <el-button
  60. v-if="(this.radio == 1 && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
  61. size="small"
  62. @click="open(1)"
  63. type="primary">上传费用明细
  64. </el-button>
  65. <el-button
  66. v-if="( this.radio == 2 &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
  67. size="small" @click="open(2)" type="primary"
  68. >撤销明细
  69. </el-button>
  70. </div>
  71. <div v-if="activeName == 'second'">
  72. <el-button
  73. v-if="( this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
  74. size="small"
  75. @click="open(1)"
  76. type="primary">上传费用明细
  77. </el-button>
  78. <el-button
  79. v-if="( this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
  80. size="small" @click="open(2)" type="primary"
  81. >撤销明细
  82. </el-button>
  83. </div>
  84. </div>
  85. <div class="mainCenter" v-loading="loading">
  86. <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
  87. <el-tab-pane label="日结" name="first">
  88. <div style="display:flex;height:100%;">
  89. <div class="centerLeft">
  90. <div class="tabsBox">
  91. <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
  92. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  93. @tab-click="tabclickEvent">
  94. <el-tab-pane
  95. v-for="(item, index) in prescriptions"
  96. :key="index"
  97. :label="item.name"
  98. :name="item.name"
  99. >
  100. </el-tab-pane>
  101. <!--<div class="RP">-->
  102. <!--Rp-->
  103. <!--<el-date-picker-->
  104. <!--v-model="record_date"-->
  105. <!--type="date"-->
  106. <!--:clearable="false"-->
  107. <!--@change="changeDate"-->
  108. <!--format="yyyy-MM-dd"-->
  109. <!--value-format="yyyy-MM-dd"-->
  110. <!--placeholder="选择日期">-->
  111. <!--</el-date-picker>-->
  112. <!--</div>-->
  113. <!--<charge-prescription-table ref="prescription_tables"-->
  114. <!--:prescription="curPrescriptions"></charge-prescription-table>-->
  115. <!--<charge-prescription-table ref="prescription_tables" :prescription="curPrescriptions"></charge-prescription-table>-->
  116. <charge-prescription-table ref="prescription_tables"
  117. :manufacturers="manufacturers"
  118. :prescription="curPrescriptions"></charge-prescription-table>
  119. </el-tabs>
  120. </div>
  121. <div class="costBox">
  122. <span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>
  123. <!-- <span v-if="this.curPrescriptions.order_status == 1">待结算</span>-->
  124. <!-- <span v-if="this.curPrescriptions.order_status == 2">已结算</span>-->
  125. <!-- <span v-if="this.curPrescriptions.order_status == 3">已退费</span>-->
  126. </div>
  127. </div>
  128. <!-- <div class="centerRight">-->
  129. <!-- <p class="centerRightTitle">人员信息</p>-->
  130. <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
  131. <!-- <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>-->
  132. <!-- <span style="font-size:14px;">日期:{{ record_date }}</span>-->
  133. <!-- </div>-->
  134. <!-- <ul class="basicUl">-->
  135. <!-- <li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
  136. <!-- <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>-->
  137. <!-- <li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
  138. <!-- <li style="width:50%;">电话:{{ patientInfo.phone }}</li>-->
  139. <!-- &lt;!&ndash;<span>过敏病史:</span>&ndash;&gt;-->
  140. <!-- &lt;!&ndash;<el-autocomplete&ndash;&gt;-->
  141. <!-- &lt;!&ndash;style="width:100%;"&ndash;&gt;-->
  142. <!-- &lt;!&ndash;class="inline-input"&ndash;&gt;-->
  143. <!-- &lt;!&ndash;v-model="sick_history"&ndash;&gt;-->
  144. <!-- &lt;!&ndash;:fetch-suggestions="querySearch2"&ndash;&gt;-->
  145. <!-- &lt;!&ndash;placeholder="请输入内容"&ndash;&gt;-->
  146. <!-- &lt;!&ndash;&gt;</el-autocomplete>&ndash;&gt;-->
  147. <!-- &lt;!&ndash;<li style="width:100%;">地址:{{patientInfo.home_address}}</li>&ndash;&gt;-->
  148. <!-- &lt;!&ndash;<li style="width:100%;">过敏史及其他病史:{{info.sick_history}}</li>&ndash;&gt;-->
  149. <!-- </ul>-->
  150. <!-- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>-->
  151. <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
  152. <!-- <span style="font-size:14px;">住院编号:{{ hisPatientInfo.number }}</span>-->
  153. <!-- </div>-->
  154. <!-- <ul class="basicUl">-->
  155. <!-- <li style="width:50%;">医生:{{ info.doctor }}</li>-->
  156. <!-- <li style="width:50%;">科室:{{ info.departments }}</li>-->
  157. <!-- <li style="width:100%;">总费用:{{ getTotal() }}</li>-->
  158. <!-- <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>-->
  159. <!-- <li style="width:100%;">是否有传染病:</li>-->
  160. <!-- <li style="width:100%;">血压:</li>-->
  161. <!-- </ul>-->
  162. <!-- </div>-->
  163. </div>
  164. </el-tab-pane>
  165. <el-tab-pane label="月结" name="second">
  166. <div style="display:flex;height:100%;">
  167. <div class="centerLeft">
  168. <div class="tabsBox">
  169. <!-- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button> -->
  170. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  171. @tab-click="tabclickEventTwo">
  172. <el-tab-pane
  173. v-for="(item, index) in month_prescriptions"
  174. :key="index"
  175. :label="item.name"
  176. :name="item.name">
  177. </el-tab-pane>
  178. <div class="RP">
  179. Rp
  180. <el-date-picker
  181. v-model="other_start_time"
  182. prefix-icon="el-icon-date"
  183. @change="changeTime"
  184. :editable="false"
  185. style="width: 150px;"
  186. type="date"
  187. placeholder="选择开始时间"
  188. align="right"
  189. format="yyyy-MM-dd"
  190. value-format="yyyy-MM-dd">
  191. </el-date-picker>
  192. <span class>-</span>
  193. <el-date-picker
  194. v-model="other_end_time"
  195. prefix-icon="el-icon-date"
  196. @change="changeEndTime"
  197. :editable="false"
  198. style="width: 150px;"
  199. type="date"
  200. placeholder="选择结束时间"
  201. align="right"
  202. format="yyyy-MM-dd"
  203. value-format="yyyy-MM-dd">
  204. </el-date-picker>
  205. <el-select v-model="month_is_upload" @change="changeMonthData"
  206. placeholder="请选择">
  207. <el-option
  208. v-for="item in upload_options"
  209. :key="item.value"
  210. :label="item.label"
  211. :value="item.value">
  212. </el-option>
  213. </el-select>
  214. </div>
  215. <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
  216. <!--<month-prescription-table ref="prescription_tables"-->
  217. <!--:activeType="activeType" :prescription="curMonthPrescriptions"></month-prescription-table>-->
  218. <charge-month-prescription-table
  219. :prescription="curMonthPrescriptions"></charge-month-prescription-table>
  220. </el-tabs>
  221. </div>
  222. <div class="costBox">
  223. <span>当前处方总费用:<span style="color:red;">{{ month_total }}元</span></span>
  224. <!--<span>{{ state }}</span>-->
  225. </div>
  226. </div>
  227. <!-- <div class="centerRight">-->
  228. <!-- <p class="centerRightTitle">人员信息</p>-->
  229. <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
  230. <!-- <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>-->
  231. <!-- <span style="font-size:14px;">日期:{{ record_date }}</span>-->
  232. <!-- </div>-->
  233. <!-- <ul class="basicUl">-->
  234. <!-- <li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
  235. <!-- <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>-->
  236. <!-- <li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
  237. <!-- <li style="width:50%;">电话:{{ patientInfo.phone }}</li>-->
  238. <!-- <li style="width:100%;">过敏史及其他病史:{{ info.sick_history }}</li>-->
  239. <!-- </ul>-->
  240. <!-- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>-->
  241. <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
  242. <!-- <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number }}</span>-->
  243. <!-- </div>-->
  244. <!-- <ul class="basicUl">-->
  245. <!-- <li style="width:50%;">医生:{{ info.doctor }}</li>-->
  246. <!-- <li style="width:50%;">科室:{{ getDepartment(info.departments) }}</li>-->
  247. <!-- <li style="width:100%;" v-if="activeName == 'first'">总费用:{{ getTotal() }}</li>-->
  248. <!-- <li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}-->
  249. <!-- </li>-->
  250. <!-- <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>-->
  251. <!-- &lt;!&ndash;<li style="width:100%;">是否有传染病:</li>&ndash;&gt;-->
  252. <!-- &lt;!&ndash;<li style="width:100%;">血压:</li>&ndash;&gt;-->
  253. <!-- </ul>-->
  254. <!-- </div>-->
  255. </div>
  256. </el-tab-pane>
  257. </el-tabs>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. </template>
  263. <script>
  264. import axios from 'axios'
  265. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  266. import noCharge from './components/noCharge'
  267. import charged from './components/charged'
  268. import medicalInsuranceRefund from './components/medicalInsuranceRefund'
  269. import additionalCharges from './components/additionalCharges'
  270. import { getHisHospitalDetailInfo, getHisHospitalDetailList, getMonthHisHospitalDetailInfo } from '@/api/his/his'
  271. import { uParseTime } from '@/utils/tools'
  272. import RegisterDialog from './components/registerDialog'
  273. import treatPrint from './treatPrint'
  274. import statementPrint from './statementPrint'
  275. import ChargeDialog from './components/chargeDialog'
  276. import MonthPrescriptionTable from './components/monthPrescriptionTable'
  277. import ChargeMonthPrescriptionTable from './components/chargeMonthPrescriptionTable'
  278. import NewStatementPrintTwo from './newStatementPrintTwo'
  279. import RegisterDialog9504 from './components/registerDialog9504'
  280. import ChargePrescriptionTable from './components/ChargePrescriptionTable'
  281. import invoicePrint from './invoicePrint'
  282. import SettlePrescriptionTable from './components/settlePrescriptionTable'
  283. const moment = require('moment')
  284. export default {
  285. components: {
  286. SettlePrescriptionTable,
  287. ChargePrescriptionTable,
  288. RegisterDialog9504,
  289. NewStatementPrintTwo,
  290. ChargeMonthPrescriptionTable,
  291. MonthPrescriptionTable,
  292. ChargeDialog,
  293. RegisterDialog,
  294. BreadCrumb,
  295. noCharge,
  296. charged,
  297. medicalInsuranceRefund,
  298. additionalCharges,
  299. treatPrint,
  300. statementPrint,
  301. invoicePrint
  302. },
  303. data() {
  304. return {
  305. register: [
  306. { value: 11, label: '普通门诊' },
  307. // { value: 12, label: '门诊挂号' },
  308. // { value: 13, label: '急诊' },
  309. { value: 14, label: '门诊慢性病' }
  310. // { value: 15, label: '门诊统筹' },
  311. // { value: 16, label: '门诊慢性病' },
  312. // { value: 21, label: '普通住院' }
  313. ],
  314. upload_options: [
  315. { value: 0, label: '全部' },
  316. { value: 2, label: '已上传' },
  317. { value: 1, label: '未上传' }
  318. ],
  319. loading: false,
  320. dise_loading: false,
  321. month_is_upload: 0,
  322. sick_history: '',
  323. p_type: '',
  324. sick_type: '',
  325. diagnosis: '',
  326. isShowUpload: 1,
  327. isShowWithdrawUpload: 1,
  328. month_p_type: '',
  329. month_sick_type: '',
  330. month_diagnosis: '',
  331. key: '',
  332. other_start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
  333. other_end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  334. curMonthPrescriptions: null,
  335. curSettlePrescriptions: null,
  336. month_total: 0,
  337. crumbs: [
  338. { path: false, name: '住院工作站' },
  339. { path: false, name: '住院收费管理' }
  340. ],
  341. current_index: 0,
  342. un_upload_num: '',
  343. upload_num: '',
  344. tableHeight: '',
  345. fullHeight: document.documentElement.clientHeight,
  346. activeName: 'first',
  347. info: {},
  348. curPrescriptions: {},
  349. prescriptions: [],
  350. month_prescriptions: [],
  351. settle_prescriptions: [],
  352. settle_total: 0,
  353. record_date: '',
  354. tableData: [],
  355. editableTabsValue: '处方1',
  356. editSettletableTabsValue: '处方1',
  357. loadingone: false,
  358. editableTabs: [{
  359. title: '处方1',
  360. name: '1'
  361. }],
  362. tabIndex: 1,
  363. hisPatientInfo: {},
  364. loadingtwo: false,
  365. patientTableData: [{
  366. name: '杨美英',
  367. mdtrt_id: '1709946'
  368. }],
  369. patientInfo: { id: 0 },
  370. doctor: {},
  371. total: 0,
  372. state: '未收费',
  373. radio: 1,
  374. radioStatus: 1,
  375. search_input: '',
  376. start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
  377. patient_id: 0,
  378. prescription_id: 0,
  379. all_table_data: [],
  380. all_charge_table_data: [],
  381. manufacturers: [],
  382. hisPatientDatas: [],
  383. order: {},
  384. addtions_charge: [],
  385. treatVisible: false,
  386. orderObj: {},
  387. paramsObj: {},
  388. newOrderObj: {},
  389. statementVisible: false,
  390. newStatementVisible: false,
  391. chargePatientTableData: [],
  392. sick: [],
  393. diagnoses: [],
  394. department: [],
  395. invoiceVisible: false,
  396. invoiceParams: {}
  397. }
  398. },
  399. created() {
  400. let tableHeight = document.body.clientHeight - 243
  401. this.tableHeight = tableHeight
  402. var nowDate = new Date()
  403. var nowYear = nowDate.getFullYear()
  404. var nowMonth = nowDate.getMonth() + 1
  405. var nowDay = nowDate.getDate()
  406. this.record_date =
  407. nowYear +
  408. '-' +
  409. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  410. '-' +
  411. (nowDay < 10 ? '0' + nowDay : nowDay)
  412. // this.getInitData()
  413. //获取患者信息
  414. this.getPatientList()
  415. },
  416. methods: {
  417. getMonthData() {
  418. this.loading = true
  419. let params = {
  420. 'id': this.hisPatientInfo.id,
  421. 'patient_id': this.hisPatientInfo.patient_id,
  422. 'start_time': this.other_start_time,
  423. 'end_time': this.other_end_time,
  424. 'is_upload': this.month_is_upload
  425. }
  426. getMonthHisHospitalDetailInfo(params).then(response => {
  427. if (response.data.state == 0) {
  428. this.loading = false
  429. this.$message.error(response.data.msg)
  430. return false
  431. } else {
  432. this.month_prescriptions = []
  433. this.curMonthPrescriptions = {}
  434. this.loading = false
  435. this.hisPatientInfo = response.data.data.his_info
  436. this.setMonthPrescription(response.data.data.month_prescriptions)
  437. this.month_total = this.getMonthTotalOne()
  438. }
  439. })
  440. },
  441. changeMonthData() {
  442. this.getMonthData()
  443. },
  444. getTimes(time) {
  445. return uParseTime(time, '{y}-{m}-{d}')
  446. },
  447. changeTimeTwo() {
  448. this.getPatientList()
  449. },
  450. changeTime(val) {
  451. this.getPatientInformation(this.hisPatientInfo.id, this.hisPatientInfo.patient_id)
  452. }, changeEndTime(val) {
  453. this.getPatientInformation(this.hisPatientInfo.id, this.hisPatientInfo.patient_id)
  454. },
  455. handleClick() {
  456. // this.getPatientList()
  457. if (this.activeName == 'first') {
  458. // this.patientTableData = this.all_table_data
  459. this.getDayPatientList()
  460. } else if (this.activeName == 'second') {
  461. this.getMonthPatientList()
  462. // this.getPatientList()
  463. // if (this.patientTableData.length > 0) {
  464. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  465. // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
  466. // }
  467. } else {
  468. console.log(this.settle_prescriptions)
  469. }
  470. },
  471. searchAction() {
  472. if (this.search_input.length == 0) {
  473. switch (this.radio) {
  474. case 1:
  475. this.patientTableData = this.all_table_data
  476. break
  477. case 2:
  478. this.chargePatientTableData = this.all_charge_table_data
  479. break
  480. }
  481. } else {
  482. switch (this.radio) {
  483. case 1:
  484. let arr3 = []
  485. for (let i = 0; i < this.all_table_data.length; i++) {
  486. if (this.all_table_data[i].name.indexOf(this.search_input) != -1 || this.all_table_data[i].his_patient.number.indexOf(this.search_input) != -1) {
  487. arr3 = arr3.concat(this.all_table_data[i])
  488. }
  489. }
  490. this.patientTableData = arr3
  491. break
  492. case 2:
  493. let arr2 = []
  494. for (let i = 0; i < this.all_charge_table_data.length; i++) {
  495. if (this.all_charge_table_data[i].name.indexOf(this.search_input) != -1 || this.all_charge_table_data[i].his_number.indexOf(this.search_input) != -1) {
  496. arr2 = arr2.concat(this.all_charge_table_data[i])
  497. }
  498. }
  499. this.chargePatientTableData = arr2
  500. break
  501. }
  502. }
  503. },
  504. tabclickEventTwo(val) {
  505. for (let i = 0; i < this.month_prescriptions.length; i++) {
  506. if (this.month_prescriptions[i].name == val.name) {
  507. this.curMonthPrescriptions = {}
  508. var temp = this.deepClone(this.month_prescriptions[i])
  509. this.curMonthPrescriptions = temp
  510. }
  511. }
  512. this.prescription_id = this.month_prescriptions.id
  513. this.month_total = 0
  514. this.month_total = this.getMonthTotalOne()
  515. },
  516. tabclickEventThree(val) {
  517. for (let i = 0; i < this.settle_prescriptions.length; i++) {
  518. if (this.settle_prescriptions[i].name == val.name) {
  519. this.curSettlePrescriptions = {}
  520. var temp = this.deepClone(this.settle_prescriptions[i])
  521. this.curSettlePrescriptions = temp
  522. }
  523. }
  524. this.prescription_id = this.settle_prescriptions.id
  525. this.settle_total = 0
  526. this.settle_total = this.getSettleTotalOne()
  527. },
  528. tabclickEvent(val) {
  529. console.log('val', val.name)
  530. for (let i = 0; i < this.prescriptions.length; i++) {
  531. if (this.prescriptions[i].name == val.name) {
  532. this.curPrescriptions = {}
  533. var temp = this.deepClone(this.prescriptions[i])
  534. this.curPrescriptions = temp
  535. }
  536. }
  537. console.log('9999', this.curPrescriptions)
  538. this.prescription_id = this.curPrescriptions.id
  539. this.total = 0
  540. this.total = this.getTotalOne()
  541. },
  542. deepClone(source) {
  543. if (!source && typeof source !== 'object') {
  544. throw new Error('error arguments', 'shallowClone')
  545. }
  546. const targetObj = source.constructor === Array ? [] : {}
  547. Object.keys(source).forEach((keys) => {
  548. if (source[keys] && typeof source[keys] === 'object') {
  549. targetObj[keys] = this.deepClone(source[keys])
  550. } else {
  551. targetObj[keys] = source[keys]
  552. }
  553. })
  554. return targetObj
  555. },
  556. getTotalOne() {
  557. var total = 0
  558. if (this.curPrescriptions.type == 1) {
  559. if (this.curPrescriptions.advices != null) {
  560. for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
  561. total = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
  562. }
  563. }
  564. } else {
  565. if (this.curPrescriptions.project != null) {
  566. for (let b = 0; b < this.curPrescriptions.project.length; b++) {
  567. total = parseFloat(total) + parseFloat(this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
  568. }
  569. }
  570. }
  571. return total.toFixed(2)
  572. },
  573. getMonthTotalOne() {
  574. var total = 0
  575. if (this.curMonthPrescriptions.type == 1) {
  576. if (this.curMonthPrescriptions.advices != null) {
  577. for (let a = 0; a < this.curMonthPrescriptions.advices.length; a++) {
  578. total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price * this.curMonthPrescriptions.advices[a].prescribing_number)
  579. }
  580. }
  581. } else {
  582. if (this.curMonthPrescriptions.project != null) {
  583. for (let b = 0; b < this.curMonthPrescriptions.project.length; b++) {
  584. total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price * this.curMonthPrescriptions.project[b].total)
  585. }
  586. }
  587. }
  588. return total.toFixed(2)
  589. },
  590. getTotal() {
  591. var total = 0
  592. for (let i = 0; i < this.prescriptions.length; i++) {
  593. if (this.prescriptions[i].advices != null) {
  594. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  595. total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number)
  596. }
  597. }
  598. if (this.prescriptions[i].project != null) {
  599. for (let b = 0; b < this.prescriptions[i].project.length; b++) {
  600. total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
  601. }
  602. }
  603. }
  604. return total.toFixed(2)
  605. },
  606. getTotalTwo() {
  607. var total = 0
  608. for (let i = 0; i < this.month_prescriptions.length; i++) {
  609. if (this.month_prescriptions[i].advices != null) {
  610. for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
  611. total = parseFloat(total) + parseFloat(this.month_prescriptions[i].advices[a].retail_price * this.month_prescriptions[i].advices[a].prescribing_number)
  612. }
  613. }
  614. if (this.month_prescriptions[i].project != null) {
  615. for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
  616. total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price * this.month_prescriptions[i].project[a].total)
  617. }
  618. }
  619. }
  620. return total.toFixed(2)
  621. },
  622. moreState(tab, event) {
  623. if (tab == 'more') {
  624. return false
  625. }
  626. }, formatJson(filterVal, jsonData) {
  627. return jsonData.map(v => filterVal.map(j => v[j]))
  628. },
  629. open(index) {
  630. if (index == 2) {
  631. let settle_accounts_type = ''
  632. if (this.activeName == 'first') {
  633. settle_accounts_type = 1
  634. var that = this
  635. this.$confirm('是否撤销明细', '撤销明细', {
  636. confirmButtonText: '确 定',
  637. cancelButtonText: '取 消',
  638. type: 'warning'
  639. }).then(() => {
  640. let params = {
  641. 'settle_accounts_type': settle_accounts_type,
  642. 'patient_id': that.hisPatientInfo.patient_id,
  643. 'his_patient_id': that.hisPatientInfo.id,
  644. 'record_time': that.record_date,
  645. 'admin_user_id': that.$store.getters.xt_user.user.id
  646. }
  647. axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
  648. params: params
  649. })
  650. .then(function(response) {
  651. if (response.data.state == 0) {
  652. that.$message.error(response.data.msg)
  653. that.loadingtwo = false
  654. return false
  655. } else {
  656. if (response.data.data.failed_code == -10) {
  657. // that.$message.error(response.data.data.msg)
  658. that.$confirm(response.data.data.msg, '医保错误信息', {
  659. confirmButtonText: '确 定',
  660. type: 'warning'
  661. }).then(() => {
  662. }).catch(() => {
  663. })
  664. } else {
  665. that.$message.success('撤销明细成功')
  666. that.radio = 1
  667. that.getPatientList()
  668. }
  669. }
  670. })
  671. .catch(function(error) {
  672. })
  673. }).catch(() => {
  674. })
  675. } else {
  676. settle_accounts_type = 2
  677. var that = this
  678. this.$confirm('该操作会撤销此次入院后所有处方明细,是否继续操作?', '撤销明细', {
  679. confirmButtonText: '确 定',
  680. cancelButtonText: '取 消',
  681. type: 'warning'
  682. }).then(() => {
  683. let params = {
  684. 'settle_accounts_type': settle_accounts_type,
  685. 'patient_id': that.hisPatientInfo.patient_id,
  686. 'his_patient_id': that.hisPatientInfo.id,
  687. 'record_time': that.record_date,
  688. 'order_id': that.order.id,
  689. 'admin_user_id': that.$store.getters.xt_user.user.id
  690. }
  691. axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
  692. params: params
  693. })
  694. .then(function(response) {
  695. if (response.data.state == 0) {
  696. that.$message.error(response.data.msg)
  697. that.loadingtwo = false
  698. return false
  699. } else {
  700. if (response.data.data.failed_code == -10) {
  701. // that.$message.error(response.data.data.msg)
  702. that.$confirm(response.data.data.msg, '医保错误信息', {
  703. confirmButtonText: '确 定',
  704. type: 'warning'
  705. }).then(() => {
  706. }).catch(() => {
  707. })
  708. } else {
  709. that.$message.success('撤销明细成功')
  710. that.radio = 1
  711. that.getPatientList()
  712. }
  713. }
  714. })
  715. .catch(function(error) {
  716. })
  717. }).catch(() => {
  718. })
  719. }
  720. } else if (index == 1) {
  721. var that = this
  722. let params = {
  723. 'in_hospital_id': that.hisPatientInfo.id,
  724. 'id': that.hisPatientInfo.patient_id,
  725. 'admin_user_id': that.$store.getters.xt_user.user.id,
  726. 'record_time': that.record_date
  727. }
  728. if (this.activeName == 'first') {
  729. params['settle_accounts_type'] = 1
  730. } else {
  731. params['start_time'] = that.other_start_time
  732. params['end_time'] = that.other_end_time
  733. params['settle_accounts_type'] = 2
  734. }
  735. axios.get('http://127.0.0.1:9532/zh/api/uploadinfo/get', {
  736. params: params
  737. })
  738. .then(function(response) {
  739. if (response.data.state == 0) {
  740. that.$message.error(response.data.msg)
  741. return false
  742. } else {
  743. if (response.data.data.failed_code == -10) {
  744. // that.$message.error(response.data.data.msg)
  745. that.$confirm(response.data.data.msg, '医保错误信息', {
  746. confirmButtonText: '确 定',
  747. type: 'warning'
  748. }).then(() => {
  749. }).catch(() => {
  750. })
  751. } else {
  752. that.$message.success('上传明细成功')
  753. that.radio = 2
  754. that.getPatientList()
  755. }
  756. }
  757. })
  758. .catch(function(error) {
  759. })
  760. }
  761. },
  762. changeRadio(id) {
  763. // this.hisPatientInfo = null
  764. this.getPatientList()
  765. },
  766. formatDecimal(num, decimal) {
  767. num = num.toString()
  768. let index = num.indexOf('.')
  769. if (index !== -1) {
  770. num = num.substring(0, decimal + index + 1)
  771. } else {
  772. num = num.substring(0)
  773. }
  774. return parseFloat(num).toFixed(decimal)
  775. },
  776. //患者列表
  777. getPatientList() {
  778. let params = {
  779. 'record_date': this.record_date
  780. }
  781. getHisHospitalDetailList(params).then(response => {
  782. if (response.data.state == 0) {
  783. this.$message.error(response.data.msg)
  784. return false
  785. } else {
  786. if (response.data.data.list == null) {
  787. response.data.data.list = []
  788. }
  789. if (response.data.data.list_two == null) {
  790. response.data.data.list_two = []
  791. }
  792. this.hisPatientInfo = {}
  793. this.curPrescriptions = {}
  794. this.curMonthPrescriptions = {}
  795. this.month_prescriptions = []
  796. this.prescriptions = []
  797. this.patientTableData = []
  798. this.upload_num = response.data.data.upload_num
  799. this.un_upload_num = response.data.data.un_upload_num
  800. switch (this.radio) {
  801. case 1:
  802. this.patientTableData = response.data.data.list
  803. if (this.hisPatientInfo.id > 0){
  804. for (let i = 0; i < this.patientTableData.length; i++) {
  805. if (this.hisPatientInfo.patient_id == this.patientTableData[i].patient_id) {
  806. this.current_index = i
  807. this.$refs.tab.setCurrentRow(this.patientTableData[i])
  808. this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].id)
  809. }
  810. }
  811. }else{
  812. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  813. this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].id)
  814. }
  815. break
  816. case 2:
  817. this.patientTableData = response.data.data.list_two
  818. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  819. this.getPatientInformation(this.chargePatientTableData[0].patient_id, this.patientTableData[0].id)
  820. break
  821. }
  822. }
  823. })
  824. },
  825. setMonthPrescription(month_prescriptions) {
  826. this.month_prescriptions = []
  827. let drug_month_prescriptions = {
  828. advices: []
  829. }
  830. let drug_ids = []
  831. let project_month_prescriptions = {
  832. project: []
  833. }
  834. let project_ids = []
  835. let addition_month_prescriptions = {
  836. addition: []
  837. }
  838. let additions_ids = []
  839. for (let i = 0; i < month_prescriptions.length; i++) {
  840. if (month_prescriptions[i].type == 1) { //药品
  841. for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
  842. let obj = {
  843. id: month_prescriptions[i].advices[a].drug_id,
  844. price: month_prescriptions[i].advices[a].price
  845. }
  846. drug_ids.push(obj)
  847. // drug_ids.push(month_prescriptions[i].advices[a].drug_id)
  848. drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
  849. }
  850. } else if (month_prescriptions[i].type == 2) { //项目
  851. for (let a = 0; a < month_prescriptions[i].project.length; a++) {
  852. let obj = {
  853. id: month_prescriptions[i].project[a].project_id,
  854. price: month_prescriptions[i].project[a].price
  855. }
  856. project_ids.push(obj)
  857. project_month_prescriptions.project.push(month_prescriptions[i].project[a])
  858. }
  859. }
  860. }
  861. drug_ids = this.unique_two(drug_ids)
  862. project_ids = this.unique_two(project_ids)
  863. additions_ids = this.unique_two(additions_ids)
  864. let drugs = []
  865. let projects = []
  866. let additions = []
  867. for (let i = 0; i < drug_ids.length; i++) {
  868. let obj = {}
  869. let count = 0
  870. for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
  871. if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
  872. obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
  873. obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
  874. obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
  875. obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
  876. obj['day'] = drug_month_prescriptions.advices[a].day
  877. // obj['prescribing_number'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
  878. obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
  879. obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
  880. obj['id'] = drug_month_prescriptions.advices[a].drug_id
  881. // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
  882. obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
  883. count = count + drug_month_prescriptions.advices[a].prescribing_number
  884. }
  885. }
  886. obj['prescribing_number'] = count
  887. drugs.push(obj)
  888. }
  889. for (let i = 0; i < project_ids.length; i++) {
  890. let obj = {}
  891. let count = 0
  892. for (let a = 0; a < project_month_prescriptions.project.length; a++) {
  893. if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
  894. if (project_month_prescriptions.project[a].type == 2) {
  895. obj['statistical_classification'] = ''
  896. obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
  897. obj['project_name'] = project_month_prescriptions.project[a].project.project_name
  898. obj['type'] = 2
  899. } else if (project_month_prescriptions.project[a].type == 3) {
  900. obj['statistical_classification'] = ''
  901. obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
  902. obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
  903. obj['type'] = 3
  904. }
  905. // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
  906. // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
  907. obj['single_dose'] = project_month_prescriptions.project[a].single_dose
  908. obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
  909. obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
  910. obj['number_days'] = project_month_prescriptions.project[a].day
  911. // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
  912. obj['unit'] = project_month_prescriptions.project[a].unit
  913. obj['project_id'] = project_month_prescriptions.project[a].project_id
  914. count = count + parseFloat(project_month_prescriptions.project[a].count)
  915. // price = price + project_month_prescriptions.project[a].price
  916. obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
  917. }
  918. }
  919. obj['total'] = count
  920. projects.push(obj)
  921. }
  922. let p1 = {
  923. name: '处方' + 1,
  924. advices: drugs,
  925. project: [],
  926. type: 1,
  927. addition: additions
  928. }
  929. let p2 = {
  930. name: '处方' + 2,
  931. type: 2,
  932. project: projects,
  933. advices: [],
  934. addition: []
  935. }
  936. this.month_prescriptions.push(p1)
  937. this.month_prescriptions.push(p2)
  938. this.curMonthPrescriptions = this.month_prescriptions[0]
  939. },
  940. unique_two(array) {
  941. // res用来存储结果
  942. var res = []
  943. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  944. for (var j = 0, resLen = res.length; j < resLen; j++) {
  945. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  946. break
  947. }
  948. }
  949. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  950. if (j === resLen) {
  951. res.push(array[i])
  952. }
  953. }
  954. return res
  955. },
  956. unique(arr) {
  957. const res = new Map()
  958. return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
  959. },
  960. handleCurrentChange(val) {
  961. this.getPatientInformation(val.id, val.patient_id)
  962. },
  963. //获取患者的基本信息
  964. getPatientInformation(id, patient_id) {
  965. let params = {
  966. 'id': id,
  967. 'record_date': this.record_date,
  968. 'patient_id': patient_id,
  969. 'start_time': this.other_start_time,
  970. 'end_time': this.other_end_time,
  971. 'is_upload': this.radio
  972. }
  973. this.loading = true
  974. getHisHospitalDetailInfo(params).then(response => {
  975. if (response.data.state == 0) {
  976. this.loading = false
  977. this.$message.error(response.data.msg)
  978. return false
  979. } else {
  980. this.prescriptions = []
  981. this.month_prescriptions = []
  982. this.curPrescriptions = {}
  983. this.curMonthPrescriptions = {}
  984. this.loading = false
  985. this.hisPatientInfo = response.data.data.his_info
  986. this.setMonthPrescription(response.data.data.month_prescriptions)
  987. for (let i = 0; i < response.data.data.prescription.length; i++) {
  988. var prescription = response.data.data.prescription[i]
  989. let tempAdvice = []
  990. let tempProject = []
  991. let tempAddition = []
  992. for (let b = 0; b < prescription.advices.length; b++) {
  993. let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
  994. let obj = {
  995. advice_id: prescription.advices[b].id,
  996. drug_name: prescription.advices[b].advice_name,
  997. single_dose: prescription.advices[b].single_dose,
  998. delivery_way: prescription.advices[b].delivery_way,
  999. execution_frequency: prescription.advices[b].execution_frequency,
  1000. retail_price: prescription.advices[b].price.toString(),
  1001. remark: prescription.advices[b].remark,
  1002. day: prescription.advices[b].day,
  1003. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  1004. single_dose_unit: prescription.advices[b].single_dose_unit,
  1005. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  1006. medical_insurance_number: prescription.advices[b].med_list_codg,
  1007. code: prescription.advices[b].drug.medical_insurance_number,
  1008. spec: spec,
  1009. det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
  1010. name_id: prescription.advices[b].drug.manufacturer,
  1011. fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
  1012. overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
  1013. preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
  1014. inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
  1015. execution_state: prescription.advices[b].execution_state,
  1016. }
  1017. tempAdvice.push(obj)
  1018. }
  1019. for (let b = 0; b < prescription.project.length; b++) {
  1020. let obj = {
  1021. id: prescription.project[b].id,
  1022. project_id: prescription.project[b].project.id,
  1023. // project_name: prescription.project[b].project.project_name,
  1024. // statistical_classification: prescription.project[b].project.statistical_classification,
  1025. single_dose: prescription.project[b].single_dose,
  1026. delivery_way: prescription.project[b].delivery_way,
  1027. execution_frequency: prescription.project[b].execution_frequency,
  1028. number_days: prescription.project[b].day,
  1029. total: prescription.project[b].count.toString(),
  1030. price: prescription.project[b].price,
  1031. remark: prescription.project[b].remark,
  1032. // medical_code: prescription.project[b].project.medical_code,
  1033. unit: prescription.project[b].project.unit,
  1034. type: prescription.project[b].type,
  1035. det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
  1036. fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
  1037. overlmt_amt: prescription.project[b].order_info.overlmt_amt,
  1038. preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
  1039. inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt,
  1040. execution_state: prescription.project[b].execution_state,
  1041. }
  1042. if (prescription.project[b].type == 2) {
  1043. obj['statistical_classification'] = prescription.project[b].team.project_team
  1044. obj['medical_code'] = prescription.project[b].project.medical_code
  1045. obj['project_name'] = prescription.project[b].project.project_name
  1046. obj['spec'] = ''
  1047. obj['name_id'] = 0
  1048. } else if (prescription.project[b].type == 3) {
  1049. obj['statistical_classification'] = prescription.project[b].team.project_team
  1050. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  1051. obj['project_name'] = prescription.project[b].good_info.good_name
  1052. obj['spec'] = prescription.project[b].good_info.specification_name
  1053. obj['name_id'] = prescription.project[b].good_info.manufacturer
  1054. }
  1055. tempProject.push(obj)
  1056. }
  1057. let index = i + 1
  1058. let obj = {
  1059. id: prescription.id,
  1060. name: '处方' + index,
  1061. advices: tempAdvice,
  1062. project: tempProject,
  1063. addition: tempAddition,
  1064. order_status: prescription.order_status,
  1065. type: prescription.type
  1066. }
  1067. this.prescriptions.push(obj)
  1068. for (let i = 0; i < this.prescriptions.length; i++) {
  1069. if (this.prescriptions[i].order_status != 4) {
  1070. this.isShowUpload = 2
  1071. }
  1072. }
  1073. }
  1074. if (this.prescriptions.length > 0) {
  1075. this.curPrescriptions = this.prescriptions[0]
  1076. } else {
  1077. this.curPrescriptions = {}
  1078. }
  1079. if (this.month_prescriptions.length > 0) {
  1080. this.curMonthPrescriptions = this.month_prescriptions[0]
  1081. } else {
  1082. this.curMonthPrescriptions = {}
  1083. }
  1084. this.total = 0
  1085. this.total = this.getTotalOne()
  1086. this.month_total = this.getMonthTotalOne()
  1087. }
  1088. })
  1089. },
  1090. sz_open(index) {
  1091. switch (index) {
  1092. case 1:
  1093. this.$refs.register9504.show()
  1094. break
  1095. case 2:
  1096. var that = this
  1097. if (this.activeName == 'first') {
  1098. this.settle_accounts_type = 1
  1099. } else {
  1100. this.settle_accounts_type = 2
  1101. this.start_time = this.other_start_time
  1102. this.end_time = this.other_end_time
  1103. this.settle_accounts_type = 2
  1104. }
  1105. let params = {
  1106. 'patient_id': this.patientInfo.id,
  1107. 'record_time': this.record_date,
  1108. 'settle_accounts_type': this.settle_accounts_type,
  1109. 'admin_user_id': this.$store.getters.xt_user.user.id
  1110. }
  1111. axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
  1112. params: params,
  1113. headers: {
  1114. 'Permission': 5
  1115. }
  1116. })
  1117. .then(function(response) {
  1118. if (response.data.state == 0) {
  1119. that.$message.error(response.data.msg)
  1120. return false
  1121. } else {
  1122. if (response.data.data.failed_code == -10) {
  1123. // that.$message.error(response.data.data.msg)
  1124. that.$confirm(response.data.data.msg, '医保错误信息', {
  1125. confirmButtonText: '确 定',
  1126. type: 'warning'
  1127. }).then(() => {
  1128. }).catch(() => {
  1129. })
  1130. } else {
  1131. that.changeRadioAndPatient(1)
  1132. that.$message({ message: '预结算成功', type: 'success' })
  1133. }
  1134. }
  1135. })
  1136. .catch(function(error) {
  1137. })
  1138. break
  1139. case 3:
  1140. if (this.activeName == 'first') {
  1141. this.$refs.charge.show(this.getTotal())
  1142. } else {
  1143. this.$refs.charge.show(this.getTotalTwo())
  1144. }
  1145. break
  1146. case 4:
  1147. break
  1148. case 5:
  1149. var that = this
  1150. this.$confirm('是否退费', '退费', {
  1151. confirmButtonText: '确 定',
  1152. cancelButtonText: '取 消',
  1153. type: 'warning'
  1154. }).then(() => {
  1155. axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
  1156. params: {
  1157. order_id: this.order.id,
  1158. record_time: this.record_date,
  1159. admin_user_id: this.$store.getters.xt_user.user.id,
  1160. patient_id: this.patientInfo.id
  1161. }
  1162. })
  1163. .then(function(response) {
  1164. if (response.data.state == 0) {
  1165. that.$message.error(response.data.msg)
  1166. return false
  1167. } else {
  1168. if (response.data.data.failed_code == -10) {
  1169. // that.$message.error(response.data.data.msg)
  1170. that.$confirm(response.data.data.msg, '医保错误信息', {
  1171. confirmButtonText: '确 定',
  1172. type: 'warning'
  1173. }).then(() => {
  1174. }).catch(() => {
  1175. })
  1176. } else {
  1177. that.changeRadioAndPatient(1)
  1178. that.$message({ message: '退费成功', type: 'success' })
  1179. }
  1180. }
  1181. })
  1182. .catch(function(error) {
  1183. })
  1184. }).catch(() => {
  1185. })
  1186. break
  1187. case 6:
  1188. var that = this
  1189. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  1190. params: {
  1191. order_id: this.order.id,
  1192. record_time: this.record_date,
  1193. admin_user_id: this.$store.getters.xt_user.user.id,
  1194. patient_id: this.patientInfo.id
  1195. }
  1196. })
  1197. .then(function(response) {
  1198. if (response.data.state == 0) {
  1199. // that.$message.error(response.data.msg);
  1200. return false
  1201. } else {
  1202. if (response.data.data.failed_code == -10) {
  1203. // that.$message.error(response.data.data.msg)
  1204. that.$confirm(response.data.data.msg, '医保错误信息', {
  1205. confirmButtonText: '确 定',
  1206. type: 'warning'
  1207. }).then(() => {
  1208. }).catch(() => {
  1209. })
  1210. } else {
  1211. that.$message({ message: '查询成功', type: 'success' })
  1212. }
  1213. }
  1214. })
  1215. .catch(function(error) {
  1216. })
  1217. break
  1218. case 7:
  1219. var that = this
  1220. axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
  1221. params: {
  1222. order_id: this.order.id,
  1223. record_time: this.record_date,
  1224. admin_user_id: this.$store.getters.xt_user.user.id,
  1225. patient_id: this.patientInfo.id
  1226. }
  1227. })
  1228. .then(function(response) {
  1229. if (response.data.state == 0) {
  1230. that.$message.error(response.data.msg)
  1231. return false
  1232. } else {
  1233. if (response.data.data.failed_code == -10) {
  1234. // that.$message.error(response.data.data.msg)
  1235. that.$confirm(response.data.data.msg, '医保错误信息', {
  1236. confirmButtonText: '确 定',
  1237. type: 'warning'
  1238. }).then(() => {
  1239. }).catch(() => {
  1240. })
  1241. } else {
  1242. that.$message({ message: '明细撤销成功', type: 'success' })
  1243. }
  1244. }
  1245. })
  1246. .catch(function(error) {
  1247. })
  1248. break
  1249. case 10:
  1250. this.newStatementVisible = true
  1251. let obj = {
  1252. record_time: this.record_date,
  1253. patient_id: this.patient_id,
  1254. prescription_id: this.prescription_id,
  1255. order_id: this.order.id,
  1256. admin_user_id: this.$store.getters.xt_user.user.id
  1257. }
  1258. this.newOrderObj = obj
  1259. // this.$refs.print.getInfo(this.order.id)
  1260. break
  1261. case 11:
  1262. var that = this
  1263. this.$confirm('是否退号', '退号', {
  1264. confirmButtonText: '确 定',
  1265. cancelButtonText: '取 消',
  1266. type: 'warning'
  1267. }).then(() => {
  1268. axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
  1269. params: {
  1270. order_id: this.order.id,
  1271. record_time: this.record_date,
  1272. admin_user_id: this.$store.getters.xt_user.user.id,
  1273. patient_id: this.patientInfo.id
  1274. }
  1275. })
  1276. .then(function(response) {
  1277. if (response.data.state == 0) {
  1278. that.$message.error(response.data.msg)
  1279. return false
  1280. } else {
  1281. if (response.data.data.failed_code == -10) {
  1282. // that.$message.error(response.data.data.msg)
  1283. that.$confirm(response.data.data.msg, '医保错误信息', {
  1284. confirmButtonText: '确 定',
  1285. type: 'warning'
  1286. }).then(() => {
  1287. }).catch(() => {
  1288. })
  1289. } else {
  1290. that.changeRadioAndPatient(1)
  1291. that.$message({ message: '退号成功', type: 'success' })
  1292. }
  1293. }
  1294. })
  1295. .catch(function(error) {
  1296. })
  1297. }).catch(() => {
  1298. })
  1299. break
  1300. }
  1301. }
  1302. },
  1303. mounted() {
  1304. const that = this
  1305. window.onresize = () => {
  1306. return (() => {
  1307. window.fullHeight = document.documentElement.clientHeight
  1308. that.fullHeight = window.fullHeight
  1309. })()
  1310. }
  1311. },
  1312. watch: {
  1313. fullHeight(val) {
  1314. if (!this.timer) {
  1315. this.fullHeight = val
  1316. let tableHeight = val - 243
  1317. this.tableHeight = tableHeight
  1318. this.timer = true
  1319. let that = this
  1320. setTimeout(function() {
  1321. that.timer = false
  1322. }, 400)
  1323. }
  1324. }
  1325. }
  1326. }
  1327. </script>
  1328. <style lang="scss" scoped>
  1329. .app-container {
  1330. height: 100%;
  1331. }
  1332. .outpatientChargesManagement {
  1333. height: 100%;
  1334. display: flex;
  1335. flex-direction: column;
  1336. .mainLeft {
  1337. width: 200px;
  1338. height: 100%;
  1339. display: flex;
  1340. flex-direction: column;
  1341. padding-top: 20px;
  1342. .el-radio {
  1343. margin-right: 5px;
  1344. }
  1345. }
  1346. .mainCell {
  1347. height: 36px;
  1348. display: flex;
  1349. align-items: center;
  1350. }
  1351. .fixedCell {
  1352. position: fixed;
  1353. z-index: 99;
  1354. right: 42px;
  1355. background: #fff;
  1356. display: flex;
  1357. justify-content: space-between;
  1358. }
  1359. .mainRight {
  1360. margin-left: 10px;
  1361. flex: 1;
  1362. height: 100%;
  1363. display: flex;
  1364. flex-direction: column;
  1365. overflow-y: auto;
  1366. .cellSpan {
  1367. min-width: 80px;
  1368. display: inline-block;
  1369. margin-right: 10px;
  1370. }
  1371. }
  1372. .tabsBox {
  1373. position: relative;
  1374. height: 90%;
  1375. overflow-y: auto;
  1376. margin-bottom: 60px;
  1377. .el-tabs__item {
  1378. padding: 0 10px;
  1379. }
  1380. }
  1381. .addTab {
  1382. position: absolute;
  1383. right: 6px;
  1384. top: 3px;
  1385. z-index: 20;
  1386. }
  1387. .mainCenter {
  1388. display: flex;
  1389. flex: 1;
  1390. height: 100%;
  1391. }
  1392. .costBox {
  1393. width: 100%;
  1394. height: 60px;
  1395. background: #fff;
  1396. position: absolute;
  1397. bottom: 0;
  1398. display: flex;
  1399. align-items: center;
  1400. justify-content: space-between;
  1401. }
  1402. .centerLeft {
  1403. flex: 1;
  1404. display: flex;
  1405. flex-direction: column;
  1406. position: relative;
  1407. }
  1408. .preTabs {
  1409. height: 100%;
  1410. display: flex;
  1411. flex-direction: column;
  1412. .el-tab-pane {
  1413. height: auto !important;
  1414. }
  1415. }
  1416. .settlementTabs {
  1417. flex: 1;
  1418. .el-tab-pane {
  1419. height: 100%;
  1420. }
  1421. .el-tabs__content {
  1422. height: 100%;
  1423. }
  1424. }
  1425. .centerRight {
  1426. width: 300px;
  1427. margin-left: 10px;
  1428. display: flex;
  1429. flex-direction: column;
  1430. overflow-y: auto;
  1431. }
  1432. .RP {
  1433. color: #409EFF;
  1434. font-size: 20px;
  1435. margin-bottom: 5px;
  1436. }
  1437. .centerRightTitle {
  1438. color: #409EFF;
  1439. }
  1440. .basicUl {
  1441. border-top: 1px solid #e5e5e5;
  1442. border-left: 1px solid #e5e5e5;
  1443. display: flex;
  1444. flex-wrap: wrap;
  1445. li {
  1446. border-bottom: 1px solid #e5e5e5;
  1447. border-right: 1px solid #e5e5e5;
  1448. width: 100%;
  1449. min-height: 38px;
  1450. /* line-height: 38px;
  1451. text-indent: 5px; */
  1452. font-size: 14px;
  1453. display: flex;
  1454. align-items: center;
  1455. padding: 5px;
  1456. box-sizing: border-box;
  1457. }
  1458. }
  1459. }
  1460. </style>
  1461. <style lang="scss">
  1462. #tab-more {
  1463. .el-icon-close {
  1464. display: none;
  1465. }
  1466. }
  1467. .settlementTabs {
  1468. .el-tabs__content {
  1469. height: 90%;
  1470. }
  1471. }
  1472. .preTabs {
  1473. .el-tabs__content {
  1474. flex: 1;
  1475. overflow-y: auto;
  1476. padding: 5px 0 5px 5px;
  1477. }
  1478. }
  1479. .centerDialog {
  1480. .el-dialog__body {
  1481. max-height: calc(100vh - 100px) !important;
  1482. padding: 0 20px;
  1483. }
  1484. }
  1485. </style>