fapiao.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  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">
  7. <div
  8. style="
  9. display: flex;
  10. justify-content: space-between;
  11. margin-bottom: 10px;
  12. ">
  13. </div>
  14. <div style="margin-bottom: 10px;">
  15. <el-date-picker
  16. size="small"
  17. v-model="start_time"
  18. prefix-icon="el-icon-date"
  19. @change="handleStartTimeChange"
  20. :editable="false"
  21. :clearable="false"
  22. style="width: 196px; "
  23. type="date"
  24. placeholder="选择开始日期"
  25. format="yyyy-MM-dd"
  26. value-format="yyyy-MM-dd"
  27. align="right"
  28. ></el-date-picker>
  29. <span style="text-align: center;">-</span>
  30. <el-date-picker
  31. size="small"
  32. v-model="end_time"
  33. prefix-icon="el-icon-date"
  34. @change="handleEndTimeChange"
  35. :editable="false"
  36. :clearable="false"
  37. style="width: 196px; "
  38. type="date"
  39. placeholder="选择结束日期"
  40. format="yyyy-MM-dd"
  41. value-format="yyyy-MM-dd"
  42. align="right"
  43. ></el-date-picker>
  44. <el-button size="small" type="primary"
  45. @click="query">查询
  46. </el-button>
  47. </div>
  48. <el-table
  49. :data="tableData"
  50. border
  51. style="width: 100%"
  52. :row-style="{ color: '#303133' }"
  53. @selection-change="handleSelectionChange"
  54. :header-cell-style="{
  55. backgroundColor: 'rgb(245, 247, 250)',
  56. color: '#606266',
  57. }"
  58. highlight-current-row
  59. >
  60. <el-table-column align="center" type="selection" width="55"></el-table-column>
  61. <el-table-column
  62. prop="date"
  63. label="序号"
  64. width="60"
  65. align="center"
  66. type="index"
  67. >
  68. </el-table-column>
  69. <el-table-column align="center" width="90" prop="name" label="患者名字">
  70. <template slot-scope="scope">{{ scope.row.patient.name }}</template>
  71. </el-table-column>
  72. <el-table-column align="center" width="90" prop="name" label="患者性别">
  73. <template slot-scope="scope">{{ scope.row.patient.gender == 1 ? '男':'女' }}</template>
  74. </el-table-column>
  75. <el-table-column
  76. align="center"
  77. width="100"
  78. prop="name"
  79. label="开票日期"
  80. >
  81. <template slot-scope="scope">
  82. {{getTimes(scope.row.ctime) }}
  83. </template>
  84. </el-table-column>
  85. <el-table-column align="center" width="90" prop="name" label="开票员">
  86. <template slot-scope="scope">
  87. {{scope.row.creator}}
  88. </template>
  89. </el-table-column>
  90. <el-table-column align="center" width="90" prop="name" label="医疗费总额">
  91. <template slot-scope="scope">
  92. {{scope.row.medfee_sumamt}}
  93. </template>
  94. </el-table-column>
  95. <el-table-column align="center" width="90" prop="name" label="基金支付">
  96. <template slot-scope="scope">
  97. {{scope.row.fund_pay_sumamt}}
  98. </template>
  99. </el-table-column>
  100. <el-table-column align="center" width="90" prop="name" label="个人支付">
  101. <template slot-scope="scope">
  102. {{scope.row.psn_cash_pay}}
  103. </template>
  104. </el-table-column>
  105. <el-table-column align="center" prop="name" label="操作">
  106. <template slot-scope="scope">
  107. <el-button v-if="scope.row.id > 0 && scope.row.is_red_washed == 1" size="mini" type="primary"
  108. @click="hongchong(scope.row)">
  109. 红冲
  110. </el-button>
  111. <el-button size="mini" type="primary" v-if="scope.row.id > 0 && scope.row.is_red_washed == 0"
  112. @click="yulan(scope.row)">
  113. 下载
  114. </el-button>
  115. <!-- <el-button size="mini" type="primary" @click="download(scope.row)" v-if="scope.row.id > 0 && scope.row.is_red_washed == 0">-->
  116. <!-- 下载-->
  117. <!-- </el-button>-->
  118. </template>
  119. </el-table-column>
  120. </el-table>
  121. <el-pagination
  122. @size-change="handleSizeChange"
  123. @current-change="handleCurrentChange"
  124. :page-sizes="[10, 50, 100]"
  125. :page-size="10"
  126. :current-page.sync="page"
  127. background
  128. style="margin-top: 20px; float: right"
  129. layout="total, sizes, prev, pager, next, jumper"
  130. :total="total"
  131. >
  132. </el-pagination>
  133. </div>
  134. </div>
  135. </template>
  136. <script>
  137. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  138. import { getDoctorList } from '@/api/his/his'
  139. // import NewStatementPrint from './newStatementPrint'
  140. import { adminMainView} from "@/api/role/admin";
  141. import { fetchAllAdminUsers } from '@/api/doctor'
  142. import axios from 'axios'
  143. import { jsGetAge, uParseTime } from '@/utils/tools'
  144. import {
  145. getFapiaoList,
  146. } from '../../api/fapiao'
  147. import { getDialysisRecordInitData } from '@/api/dialysis_record'
  148. import { number } from 'echarts/lib/export'
  149. const moment = require('moment')
  150. export default {
  151. name: 'newSettleDetail',
  152. components: {
  153. BreadCrumb,
  154. },
  155. props: {
  156. patient_id: number
  157. },
  158. data() {
  159. return {
  160. staff:"",
  161. admins:[],
  162. orderObj: {},
  163. batchOrderObj: {},
  164. fapiao_number:"",
  165. med_options: [
  166. { id: 0, text: '全部' },
  167. { id: 11, text: '普通门诊' },
  168. { id: 14, text: '门诊特殊病' }
  169. ],
  170. zone_options: [
  171. { id: 0, text: '全部分区' }
  172. ],
  173. statementListVisible: false,
  174. statementVisible: false,
  175. batchStatementVisible: false,
  176. statementVisible9504: false,
  177. orderObj9504: {},
  178. crumbs: [
  179. { path: false, name: '门诊收费' },
  180. { path: false, name: '项目消费明细汇总' }
  181. ],
  182. tableData: [],
  183. tableData2:[],
  184. selecting_schs: [],
  185. dialogfapiaoVisible:false,
  186. targeOrderId:0,
  187. targeObj:{},
  188. limit: 10,
  189. page: 1,
  190. keywords: '',
  191. sch_type: '0',//班次
  192. zoneVal: 0,//分区
  193. medTypeVal: 0,
  194. start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  195. end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  196. pay_time:"",
  197. total: '',
  198. doctors: [],
  199. sort_type: 1,
  200. sort_types: [
  201. { value: 1, label: '处方时间' },
  202. { value: 2, label: '结算时间' }
  203. ],
  204. admin_user_id: '',
  205. listVisible: false,
  206. allListVisible: false,
  207. adminUserOptions: [],
  208. invoiceVisible: false,
  209. paramsObj: {},
  210. invoiceParams: {},
  211. settlementVisible: false,
  212. settlementObj: {},
  213. accounts_click_vi:false,
  214. }
  215. },
  216. created() {
  217. // this.getInitData()
  218. // this.fetchAllAdminUsers()
  219. // this.getDoctorList()
  220. this.getHisOrderList()
  221. // this.getAllstaff()
  222. },
  223. methods: {
  224. getData(patient_id){
  225. this.patient_id = patient_id
  226. this.getHisOrderList()
  227. },
  228. auth(){
  229. },
  230. query(){
  231. },download(){
  232. },
  233. blue(row){
  234. }, yulan(row){
  235. },hongchong(row){
  236. },
  237. getAllstaff(){
  238. adminMainView()
  239. .then(rs => {
  240. var resp = rs.data;
  241. if (resp.state === 1) {
  242. var adminData = resp.data.admins
  243. this.admins.push(...adminData);
  244. } else {
  245. this.$message.error(resp.msg);
  246. }
  247. })
  248. .catch(err => {
  249. this.$message.error(err);
  250. });
  251. },
  252. handleSelectionChange(val) {
  253. this.selecting_schs = val
  254. },
  255. handleSchType(val) {
  256. this.sch_type = val
  257. this.getHisOrderList()
  258. }, handleMedChange() {
  259. this.getHisOrderList()
  260. },
  261. handleZoneChange(val) {
  262. this.zoneVal = val
  263. this.getHisOrderList()
  264. },
  265. getInitData: function() {
  266. getDialysisRecordInitData().then((rs) => {
  267. var resp = rs.data
  268. if (resp.state == 1) {
  269. var zones = resp.data.zones
  270. var zone_options = [{ id: 0, text: '全部' }]
  271. for (let z_i = 0; z_i < zones.length; z_i++) {
  272. const zone = zones[z_i]
  273. zone_options.push({ id: zone.id, text: zone.name })
  274. }
  275. this.zone_options = zone_options
  276. } else {
  277. this.$message.error(resp.msg)
  278. }
  279. })
  280. },
  281. getMedType(med_type) {
  282. var med_type = parseInt(med_type)
  283. switch (med_type) {
  284. case 11:
  285. return '普通门诊'
  286. break
  287. case 12:
  288. return '门诊挂号'
  289. break
  290. case 13:
  291. return '急诊'
  292. break
  293. case 14:
  294. return '门诊特殊病'
  295. break
  296. case 15:
  297. return '门诊统筹'
  298. break
  299. case 16:
  300. return '门诊慢性病'
  301. break
  302. case 21:
  303. return '普通住院'
  304. break
  305. case 140104:
  306. return '城乡门诊特殊病(140104)'
  307. break
  308. case 992102:
  309. return '单病种(992102)'
  310. break
  311. }
  312. },
  313. fetchAllAdminUsers() {
  314. fetchAllAdminUsers().then((response) => {
  315. if (response.data.state == 1) {
  316. this.adminUserOptions = response.data.data.users
  317. }
  318. })
  319. },
  320. getName(admin_user_id) {
  321. for (let i = 0; i < this.adminUserOptions.length; i++) {
  322. if (this.adminUserOptions[i].id == admin_user_id) {
  323. return this.adminUserOptions[i].name
  324. }
  325. }
  326. },
  327. handleSizeChange(limit) {
  328. this.limit = limit
  329. this.getHisOrderList()
  330. },
  331. handleCurrentChange(page) {
  332. this.page = page
  333. this.getHisOrderList()
  334. },
  335. handleStartTimeChange() {
  336. this.page = 1
  337. this.keywords = ''
  338. this.getHisOrderList()
  339. },
  340. handleEndTimeChange() {
  341. this.page = 1
  342. this.keywords = ''
  343. this.getHisOrderList()
  344. },
  345. getTimes(time) {
  346. return uParseTime(time, '{y}-{m}-{d}')
  347. },
  348. getTime(value, temp) {
  349. if (value != undefined) {
  350. return uParseTime(value, temp)
  351. }
  352. return ''
  353. },
  354. getHisOrderList() {
  355. let params = {
  356. page: this.page,
  357. limit: this.limit,
  358. keywords: this.keywords,
  359. start_time: this.start_time,
  360. end_time: this.end_time,
  361. }
  362. getFapiaoList(params).then((response) => {
  363. if (response.data.state == 0) {
  364. this.$message.error(response.data.msg)
  365. return false
  366. } else {
  367. this.tableData = response.data.data.fapiao_record
  368. this.total = response.data.data.total
  369. }
  370. })
  371. },
  372. getDoctorList() {
  373. getDoctorList().then((response) => {
  374. if (response.data.state == 0) {
  375. this.$message.error(response.data.msg)
  376. return false
  377. } else {
  378. this.doctors = response.data.data.doctors
  379. }
  380. })
  381. },
  382. open(index) {
  383. if (index == 1) {
  384. this.listVisible = true
  385. } else if (index == 2) {
  386. this.allListVisible = true
  387. }
  388. }, unique(array) {
  389. // res用来存储结果
  390. var res = []
  391. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  392. for (var j = 0, resLen = res.length; j < resLen; j++) {
  393. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  394. break
  395. }
  396. }
  397. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  398. if (j === resLen) {
  399. res.push(array[i])
  400. }
  401. }
  402. return res
  403. },camcleModifyFaPiaoCode(){
  404. this.dialogfapiaoVisible = false
  405. this.invoiceVisible = true
  406. var obj = this.targeObj
  407. let paramsObj = {
  408. order_id: obj.id,
  409. patient_id: obj.patient_id,
  410. number: obj.mdtrt_id,
  411. name: obj.patient.name,
  412. age: obj.age,
  413. gend: obj.patient.gender,
  414. setl_time: obj.setl_time,
  415. chargeName: this.getName(obj.creator)
  416. }
  417. this.dialogfapiaoVisible = false
  418. this.invoiceParams = paramsObj
  419. this.invoiceVisible = true
  420. },modifyFaPiaoCode(){
  421. let params = {
  422. id:this.targeOrderId,
  423. fapiao_number: this.fapiao_number
  424. }
  425. modifyFapiaoCodetwo(params).then((response) => {
  426. if (response.data.state == 0) {
  427. this.$message.error(response.data.msg)
  428. return false
  429. } else {
  430. var obj = this.targeObj
  431. let paramsObj = {
  432. order_id: obj.id,
  433. patient_id: obj.patient_id,
  434. number: obj.mdtrt_id,
  435. name: obj.patient.name,
  436. age: obj.age,
  437. gend: obj.patient.gender,
  438. setl_time: obj.setl_time,
  439. chargeName: this.getName(obj.creator)
  440. }
  441. this.dialogfapiaoVisible = false
  442. this.invoiceParams = paramsObj
  443. this.invoiceVisible = true
  444. this.getHisOrderList()
  445. }
  446. })
  447. },
  448. invoicePrint(obj) {
  449. if(this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0){
  450. this.fapiao_number = obj.fa_piao_number
  451. this.dialogfapiaoVisible = true
  452. this.targeOrderId = obj.id
  453. this.targeObj = obj
  454. }else{
  455. let paramsObj = {
  456. order_id: obj.id,
  457. patient_id: obj.patient_id,
  458. number: obj.mdtrt_id,
  459. name: obj.patient.name,
  460. age: obj.age,
  461. gend: obj.patient.gender,
  462. setl_time: obj.setl_time,
  463. chargeName: this.getName(obj.creator)
  464. }
  465. this.dialogfapiaoVisible = false
  466. this.invoiceParams = paramsObj
  467. this.invoiceVisible = true
  468. }
  469. }
  470. }
  471. }
  472. </script>
  473. <style lang="scss">
  474. .table{
  475. tr td{
  476. padding:5px 0;
  477. }
  478. }
  479. </style>