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

11.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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: 20px 20px 0px 20px;">
  7. <div class="mainLeft">
  8. <!--<div class="mainCell" style="justify-content: space-between;">-->
  9. <!--<p>未就诊:<span>1</span>人</p>-->
  10. <!--<p>已就诊:<span>0</span>人</p>-->
  11. <!--</div>-->
  12. <!--<div class="mainCell">-->
  13. <!--<el-radio-group v-model="radio" @change="changeRadio">-->
  14. <!--<el-radio :label=1>未就诊</el-radio>-->
  15. <!--<el-radio :label=2>已就诊</el-radio>-->
  16. <!--<el-radio :label=3>全部</el-radio>-->
  17. <!--</el-radio-group>-->
  18. <!--</div>-->
  19. <div class="mainCell" style="margin-bottom:10px;">
  20. <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  21. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
  22. 搜索
  23. </el-button>
  24. </div>
  25. <div style="flex:1;overflow-y:auto;">
  26. <el-table :data="patientTableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
  27. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  28. highlight-current-row ref="tab"
  29. @current-change="handleCurrentChange">
  30. <el-table-column align="center" prop="name" label="患者姓名">
  31. <template slot-scope="scope">{{ scope.row.patients.name }}</template>
  32. </el-table-column>
  33. <el-table-column align="center" prop="name" label="就诊号" width="90">
  34. <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
  35. </el-table-column>
  36. </el-table>
  37. </div>
  38. </div>
  39. <div class="mainRight">
  40. <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
  41. <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
  42. <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
  43. <el-button size="small" @click="open(3)" type="primary">打印</el-button>
  44. <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)"
  45. type="primary">挂号
  46. </el-button>
  47. <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)"
  48. type="primary">收费
  49. </el-button>
  50. <el-button size="small" @click="open(5)" type="primary">退费</el-button>
  51. </div>
  52. <div class="mainCenter">
  53. <div class="centerLeft">
  54. <div class="tabsBox">
  55. <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
  56. <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
  57. <el-tab-pane
  58. v-for="(item, index) in prescriptions"
  59. :key="index"
  60. :label="item.name"
  61. :name="item.name"
  62. >
  63. </el-tab-pane>
  64. <div class="RP">Rp</div>
  65. <prescription-table ref="prescription_tables" :prescription="curPrescriptions"></prescription-table>
  66. </el-tabs>
  67. </div>
  68. <div class="costBox">
  69. <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
  70. <span>{{ state }}</span>
  71. </div>
  72. </div>
  73. <div class="centerRight">
  74. <p class="centerRightTitle">人员信息</p>
  75. <div style="display:flex;justify-content: space-between;line-height:30px;">
  76. <span style="font-size:14px;">人员编码:</span>
  77. <span style="font-size:14px;">日期:{{record_date}}</span>
  78. </div>
  79. <ul class="basicUl">
  80. <li style="width:50%;">姓名:{{patientInfo.name}}</li>
  81. <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
  82. <li style="width:50%;">年龄:{{patientInfo.age }}</li>
  83. <li style="width:50%;">身高:{{patientInfo.height}}</li>
  84. <li style="width:50%;">体重:{{patientInfo.weight}}</li>
  85. <li style="width:50%;">电话:{{patientInfo.phone}}</li>
  86. <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
  87. </ul>
  88. <p class="centerRightTitle">诊断信息</p>
  89. <div style="display:flex;justify-content: space-between;line-height:30px;">
  90. <span style="font-size:14px;">门诊编号:676273816287361</span>
  91. </div>
  92. <ul class="basicUl">
  93. <li style="width:50%;">医生:{{ }}</li>
  94. <li style="width:50%;">科室:{{ }}</li>
  95. <li style="width:100%;">费用:{{ }}元</li>
  96. <li style="width:100%;">判断结果:</li>
  97. <li style="width:100%;">是否有传染病:</li>
  98. <li style="width:100%;">血压:</li>
  99. </ul>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
  105. </div>
  106. </template>
  107. <script>
  108. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  109. import noCharge from './components/noCharge'
  110. import charged from './components/charged'
  111. import medicalInsuranceRefund from './components/medicalInsuranceRefund'
  112. import prescriptionTable from './components/prescriptionTable'
  113. import additionalCharges from './components/additionalCharges'
  114. import { getPatientInformation, getPatientList } from '@/api/project/project'
  115. import { getPatientInfo, getSchedulePatientList, register,upload } from '@/api/his/his'
  116. const moment = require('moment');
  117. export default {
  118. components: {
  119. BreadCrumb,
  120. noCharge,
  121. charged,
  122. medicalInsuranceRefund,
  123. prescriptionTable,
  124. additionalCharges
  125. },
  126. data() {
  127. return {
  128. crumbs: [
  129. { path: false, name: '门诊收费' },
  130. { path: false, name: '门诊收费管理' }
  131. ],
  132. curPrescriptions: {},
  133. prescriptions: [],
  134. record_date: '',
  135. tableData: [],
  136. editableTabsValue: '1',
  137. loadingone:false,
  138. editableTabs: [{
  139. title: '处方1',
  140. name: '1'
  141. }],
  142. tabIndex: 1,
  143. hisPatientInfo: {},
  144. loadingtwo:false,
  145. patientTableData: [{
  146. name: '杨美英',
  147. mdtrt_id: '1709946'
  148. }],
  149. patientInfo: { id: 0 },
  150. doctor: {},
  151. total: 0,
  152. state: '未收费',
  153. radio: 1,
  154. radioStatus: 1,
  155. search_input: '',
  156. start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
  157. }
  158. },
  159. created() {
  160. var nowDate = new Date();
  161. var nowYear = nowDate.getFullYear();
  162. var nowMonth = nowDate.getMonth() + 1;
  163. var nowDay = nowDate.getDate();
  164. this.record_date =
  165. nowYear +
  166. '-' +
  167. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  168. '-' +
  169. (nowDay < 10 ? '0' + nowDay : nowDay);
  170. //获取患者信息
  171. this.getPatientList()
  172. },
  173. methods: {
  174. tabclickEvent(val) {
  175. for (let i = 0; i < this.prescriptions.length; i++) {
  176. if (this.prescriptions[i].name == val.name) {
  177. this.curPrescriptions = {};
  178. var temp = this.deepClone(this.prescriptions[i]);
  179. this.curPrescriptions = temp;
  180. console.log(this.curPrescriptions)
  181. }
  182. }
  183. }, deepClone(source) {
  184. if (!source && typeof source !== 'object') {
  185. throw new Error('error arguments', 'shallowClone')
  186. }
  187. const targetObj = source.constructor === Array ? [] : {};
  188. Object.keys(source).forEach((keys) => {
  189. if (source[keys] && typeof source[keys] === 'object') {
  190. targetObj[keys] = this.deepClone(source[keys])
  191. } else {
  192. targetObj[keys] = source[keys]
  193. }
  194. });
  195. return targetObj
  196. },
  197. getTotal() {
  198. var total = 0;
  199. console.log(this.prescriptions);
  200. for (let i = 0; i < this.prescriptions.length; i++) {
  201. if (this.prescriptions[i].advices != null) {
  202. for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
  203. total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
  204. }
  205. }
  206. if (this.prescriptions[i].project != null) {
  207. for (let b = 0; b < this.prescriptions[i].project.length; b++) {
  208. total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
  209. }
  210. }
  211. }
  212. return total
  213. },
  214. moreState(tab, event) {
  215. if (tab == 'more') {
  216. return false
  217. }
  218. },
  219. open(index) {
  220. if (index == 1) {
  221. } else if (index == 2) {
  222. } else if (index == 4) {
  223. let params = {
  224. 'id': this.patientInfo.id,
  225. 'record_time': this.record_date
  226. };
  227. this.loadingtwo = true;
  228. upload(params).then(response => {
  229. if (response.data.state == 0) {
  230. this.$message.error(response.data.msg);
  231. this.loadingtwo = false;
  232. return false
  233. } else {
  234. this.loadingtwo = false
  235. }
  236. });
  237. this.state = '已收费';
  238. this.$message({ message: '收费成功', type: 'success' })
  239. } else if (index == 5) {
  240. this.$message({ message: '退费成功', type: 'success' })
  241. } else if (index == 6) {
  242. if (this.patientInfo.id == 0) {
  243. this.$message.error('请先选择要挂号的病人');
  244. return
  245. }
  246. let params = {
  247. 'id': this.patientInfo.id,
  248. 'record_time': this.record_date
  249. };
  250. this.loadingone = true;
  251. register(params).then(response => {
  252. if (response.data.state == 0) {
  253. this.$message.error(response.data.msg);
  254. this.loadingone = false;
  255. return false
  256. } else {
  257. this.loadingone = false;
  258. var his_info = response.data.data.his_info;
  259. this.hisPatientInfo = his_info
  260. }
  261. })
  262. }
  263. },
  264. addTab(targetName) {
  265. let newTabName = ++this.tabIndex + '';
  266. this.editableTabs.push({
  267. title: '处方' + this.tabIndex,
  268. name: newTabName
  269. });
  270. this.editableTabsValue = newTabName
  271. },
  272. removeTab(targetName) {
  273. let tabs = this.editableTabs;
  274. let activeName = this.editableTabsValue;
  275. if (activeName === targetName) {
  276. tabs.forEach((tab, index) => {
  277. if (tab.name === targetName) {
  278. let nextTab = tabs[index + 1] || tabs[index - 1];
  279. if (nextTab) {
  280. activeName = nextTab.name
  281. }
  282. }
  283. })
  284. }
  285. this.editableTabsValue = activeName;
  286. this.editableTabs = tabs.filter(tab => tab.name !== targetName)
  287. },
  288. addCharges() {
  289. this.$refs.additionalCharges.show()
  290. },
  291. choosePatient() {
  292. },
  293. changeRadio(id) {
  294. console.log(id);
  295. this.radioStatus = id;
  296. this.getPatientList()
  297. },
  298. //患者列表
  299. getPatientList() {
  300. let params = {
  301. 'record_date': this.record_date
  302. };
  303. getSchedulePatientList(params).then(response => {
  304. if (response.data.state == 0) {
  305. this.$message.error(response.data.msg);
  306. return false
  307. } else {
  308. this.patientTableData = [];
  309. // let cal_one = 0
  310. // let cal_two = 0
  311. for (let i = 0; i < response.data.data.list.length; i++) {
  312. // if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  313. // // cal_one = cal_one + 1
  314. // }
  315. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  316. // cal_two = cal_two + 1
  317. this.patientTableData.push(response.data.data.list[i])
  318. }
  319. }
  320. // this.cal_one = cal_one
  321. // this.cal_two = cal_two
  322. }
  323. })
  324. },
  325. unique(arr) {
  326. const res = new Map();
  327. return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
  328. },
  329. handleCurrentChange(val) {
  330. this.getPatientInformation(val.patients.id)
  331. }, //获取患者的基本信息
  332. getPatientInformation(id) {
  333. let params = {
  334. 'record_date': this.record_date,
  335. 'patient_id': id
  336. };
  337. getPatientInfo(params).then(response => {
  338. if (response.data.state == 0) {
  339. this.$message.error(response.data.msg);
  340. return false
  341. } else {
  342. this.patientInfo = response.data.data.xt_info;
  343. this.hisPatientInfo = response.data.data.his_info;
  344. this.prescriptions = [];
  345. for (let i = 0; i < response.data.data.prescription.length; i++) {
  346. var prescription = response.data.data.prescription[i];
  347. let index = i + 1;
  348. let obj = {
  349. name: '处方' + index,
  350. advices: prescription.advices,
  351. project: prescription.project,
  352. type: response.data.data.prescription[i].type
  353. };
  354. this.prescriptions.push(obj);
  355. this.curPrescriptions = this.prescriptions[0]
  356. }
  357. // this.$refs.prescriptions.setData(this.prescriptions)
  358. }
  359. })
  360. }
  361. }
  362. }
  363. </script>
  364. <style lang="scss" scoped>
  365. .app-container {
  366. height: 100%;
  367. }
  368. .outpatientChargesManagement {
  369. height: 100%;
  370. display: flex;
  371. flex-direction: column;
  372. .mainLeft {
  373. width: 200px;
  374. height: 100%;
  375. display: flex;
  376. flex-direction: column;
  377. .el-radio {
  378. margin-right: 5px;
  379. }
  380. }
  381. .mainCell {
  382. height: 36px;
  383. display: flex;
  384. align-items: center;
  385. }
  386. .mainRight {
  387. margin-left: 20px;
  388. flex: 1;
  389. height: 100%;
  390. display: flex;
  391. flex-direction: column;
  392. overflow-y: auto;
  393. .cellSpan {
  394. min-width: 80px;
  395. display: inline-block;
  396. margin-right: 10px;
  397. }
  398. }
  399. .tabsBox {
  400. position: relative;
  401. height: 90%;
  402. overflow-y: auto;
  403. margin-bottom: 60px;
  404. .el-tabs__item {
  405. padding: 0 10px;
  406. }
  407. }
  408. .addTab {
  409. position: absolute;
  410. right: 0;
  411. top: 6px;
  412. z-index: 20;
  413. }
  414. .mainCenter {
  415. display: flex;
  416. flex: 1;
  417. }
  418. .costBox {
  419. width: 100%;
  420. height: 60px;
  421. background: #fff;
  422. position: absolute;
  423. bottom: 0;
  424. display: flex;
  425. align-items: center;
  426. justify-content: space-between;
  427. }
  428. .centerLeft {
  429. flex: 1;
  430. display: flex;
  431. flex-direction: column;
  432. position: relative;
  433. }
  434. .centerRight {
  435. width: 300px;
  436. margin-left: 5px;
  437. display: flex;
  438. flex-direction: column;
  439. }
  440. .RP {
  441. color: #409EFF;
  442. font-size: 20px;
  443. margin-bottom: 5px;
  444. }
  445. .centerRightTitle {
  446. color: #409EFF;
  447. padding-top: 10px;;
  448. }
  449. .basicUl {
  450. border-top: 1px solid #e5e5e5;
  451. border-left: 1px solid #e5e5e5;
  452. display: flex;
  453. flex-wrap: wrap;
  454. li {
  455. border-bottom: 1px solid #e5e5e5;
  456. border-right: 1px solid #e5e5e5;
  457. width: 100%;
  458. height: 38px;
  459. line-height: 38px;
  460. text-indent: 5px;
  461. font-size: 14px;
  462. }
  463. }
  464. }
  465. </style>
  466. <style lang="scss">
  467. #tab-more {
  468. .el-icon-close {
  469. display: none;
  470. }
  471. }
  472. </style>