settleDetail.vue 30KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055
  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. <el-button size="small" type="primary"
  48. @click="login">短信登录税局
  49. </el-button>
  50. <el-button size="small" type="primary"
  51. @click="auth">认证
  52. </el-button>
  53. </div>
  54. <el-table
  55. :data="tableData"
  56. border
  57. style="width: 100%"
  58. :row-style="{ color: '#303133' }"
  59. :header-cell-style="{
  60. backgroundColor: 'rgb(245, 247, 250)',
  61. color: '#606266',
  62. }"
  63. highlight-current-row
  64. >
  65. <el-table-column
  66. prop="date"
  67. label="序号"
  68. width="60"
  69. align="center"
  70. type="index"
  71. >
  72. </el-table-column>
  73. <el-table-column align="center" width="90" prop="name" label="患者名字">
  74. <template slot-scope="scope">{{ scope.row.patient.name }}</template>
  75. </el-table-column>
  76. <el-table-column align="center" width="90" prop="name" label="患者性别">
  77. <template slot-scope="scope">{{ scope.row.patient.gender == 1 ? '男':'女' }}</template>
  78. </el-table-column>
  79. <el-table-column align="center" width="90" prop="name" label="处方类型">
  80. <template slot-scope="scope">
  81. <div>{{ getMedType(scope.row.med_type) }}</div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column align="center" width="90" prop="name" label="结算类型">
  85. <template slot-scope="scope">
  86. <div v-if="scope.row.his_patient.balance_accounts_type != 2">
  87. 医保
  88. </div>
  89. <div v-if="scope.row.his_patient.balance_accounts_type == 2">
  90. 自费
  91. </div>
  92. </template>
  93. </el-table-column>
  94. <el-table-column align="center" width="90" prop="name" label="就诊凭证类型">
  95. <template slot-scope="scope">
  96. <div v-if="scope.row.his_patient.id_card_type == 1">
  97. 社会保障卡
  98. </div>
  99. <div v-if="scope.row.his_patient.id_card_type == 2">
  100. 居民身份证
  101. </div>
  102. <div v-if="scope.row.his_patient.id_card_type == 4">
  103. 医保电子凭证
  104. </div>
  105. </template>
  106. </el-table-column>
  107. <el-table-column
  108. align="center"
  109. width="100"
  110. prop="name"
  111. label="处方日期"
  112. >
  113. <template slot-scope="scope">
  114. {{getTimes(scope.row.settle_accounts_date) }}
  115. </template>
  116. </el-table-column>
  117. <el-table-column
  118. align="center"
  119. width="100"
  120. prop="name"
  121. label="收费时间"
  122. >
  123. <template slot-scope="scope">
  124. {{
  125. scope.row.setl_time
  126. ? scope.row.setl_time
  127. : getTimes(scope.row.settle_accounts_date)
  128. }}
  129. </template>
  130. </el-table-column>
  131. <el-table-column align="center" width="90" prop="name" label="收费员">
  132. <template slot-scope="scope">
  133. {{getName(scope.row.creator)}}
  134. </template>
  135. </el-table-column>
  136. <el-table-column align="center" prop="name" label="操作">
  137. <template slot-scope="scope">
  138. <el-button v-if="scope.row.result.id == 0" size="mini" type="primary"
  139. @click="blue(scope.row)">
  140. 开票
  141. </el-button>
  142. <el-button v-if="scope.row.result.id > 0 && scope.row.result.fapiao_status == 1" disabled="true" size="mini" type="primary"
  143. @click="blue(scope.row)">
  144. 开票审核中
  145. </el-button>
  146. <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2" size="mini" type="primary"
  147. @click="hongchong(scope.row)">
  148. 红冲
  149. </el-button>
  150. <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2"
  151. @click="yulan(scope.row)">
  152. 下载
  153. </el-button>
  154. <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2 && scope.row.fapiao_number == ''"
  155. @click="chaxun(scope.row)">
  156. 查询并同步发票号码
  157. </el-button>
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. <el-pagination
  162. @size-change="handleSizeChange"
  163. @current-change="handleCurrentChange"
  164. :page-sizes="[10, 50, 100]"
  165. :page-size="10"
  166. :current-page.sync="page"
  167. background
  168. style="margin-top: 20px; float: right"
  169. layout="total, sizes, prev, pager, next, jumper"
  170. :total="total"
  171. >
  172. </el-pagination>
  173. </div>
  174. <el-dialog
  175. title="登录"
  176. :visible.sync="login_dialogVisible"
  177. width="40%"
  178. >
  179. <div>
  180. <el-form :rules="rules" :label-position="labelPosition" label-width="100px" :model="formLabelAlign">
  181. <!-- <el-form-item label="税局账号">-->
  182. <!-- <el-input v-model="formLabelAlign.name"></el-input>-->
  183. <!-- </el-form-item>-->
  184. <!-- <el-form-item label="税局密码">-->
  185. <!-- <el-input v-model="formLabelAlign.region"></el-input>-->
  186. <!-- </el-form-item>-->
  187. <!-- <el-form-item label="手机号码">-->
  188. <!-- <el-input v-model="formLabelAlign.type"></el-input>-->
  189. <!-- </el-form-item>-->
  190. <el-form-item label="短信验证码" prop="verify">
  191. <div style="display: inline-block;width: 50%;">
  192. <el-input v-model="formLabelAlign.verify"></el-input>
  193. </div>
  194. <div style="display: inline-block;">
  195. <el-button :disabled="countdown > 0" @click="verify_click">{{countdown > 0?countdown:'获取短信验证码'}}</el-button>
  196. </div>
  197. </el-form-item>
  198. </el-form>
  199. </div>
  200. <span slot="footer" class="dialog-footer">
  201. <el-button @click="login_dialogVisible = false">取 消</el-button>
  202. <el-button type="primary" @click="loginSJ()">确 定</el-button>
  203. </span>
  204. </el-dialog>
  205. <!-- 二维码 -->
  206. <el-dialog
  207. title="提示"
  208. :visible.sync="qr_dialogVisible"
  209. width="30%"
  210. center
  211. >
  212. <div style="margin: auto;width: 120px;">
  213. <div class="qrcode" ref="qrCodeUrl"></div>
  214. </div>
  215. <span slot="footer" class="dialog-footer">
  216. <el-button @click="qr_dialogVisible = false">取 消</el-button>
  217. <el-button type="primary" @click="qr_dialogVisible = false">确 定</el-button>
  218. </span>
  219. </el-dialog>
  220. <el-dialog
  221. class="centerDialog"
  222. width="1200px"
  223. :visible.sync="settlementVisible">
  224. <div>
  225. <new-print-one :paramsObj="paramsObj"></new-print-one>
  226. </div>
  227. <span slot="footer" class="dialog-footer">
  228. <el-button @click="settlementVisible = false">取 消</el-button>
  229. <el-button type="primary" @click="blueRequest">开票</el-button>
  230. </span>
  231. </el-dialog>
  232. <el-dialog
  233. class="centerDialog"
  234. width="1200px"
  235. :visible.sync="settlementVisibletwo">
  236. <div>
  237. <pdf :src="pdfSrc"></pdf>
  238. </div>
  239. <span slot="footer" class="dialog-footer">
  240. <el-button @click="settlementVisibletwo = false">取 消</el-button>
  241. <el-button type="primary" @click="settlementVisibletwo = false">确定</el-button>
  242. </span>
  243. </el-dialog>
  244. </div>
  245. </template>
  246. <script>
  247. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  248. import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
  249. import { ModifyFapiaoCode } from '@/api/his/his_tools'
  250. import pdf from 'vue-pdf'
  251. // import NewStatementPrint from './newStatementPrint'
  252. import { adminMainView} from "@/api/role/admin";
  253. import { fetchAllAdminUsers } from '@/api/doctor'
  254. import axios from 'axios'
  255. import { jsGetAge, uParseTime } from '@/utils/tools'
  256. import {
  257. getOrderFapiaoList,
  258. } from '../../api/fapiao'
  259. import { getDialysisRecordInitData } from '@/api/dialysis_record'
  260. import QRCode from 'qrcodejs2'
  261. import NewInvoicePrint from './newInvoicePrint.vue'
  262. import NewPrintOne from './newPrintOne.vue'
  263. const moment = require('moment')
  264. export default {
  265. name: 'OutpatientChargesSummary',
  266. components: {
  267. NewPrintOne,
  268. NewInvoicePrint,
  269. BreadCrumb,
  270. },
  271. data() {
  272. return {
  273. pdfSrc:"",
  274. staff:"",
  275. admins:[],
  276. orderObj: {},
  277. batchOrderObj: {},
  278. fapiao_number:"",
  279. invoiceVisible: false,
  280. settlementVisibletwo:false,
  281. med_options: [
  282. { id: 0, text: '全部' },
  283. { id: 11, text: '普通门诊' },
  284. { id: 14, text: '门诊特殊病' }
  285. ],
  286. zone_options: [
  287. { id: 0, text: '全部分区' }
  288. ],
  289. statementListVisible: false,
  290. statementVisible: false,
  291. batchStatementVisible: false,
  292. statementVisible9504: false,
  293. orderObj9504: {},
  294. crumbs: [
  295. { path: false, name: '门诊收费' },
  296. { path: false, name: '项目消费明细汇总' }
  297. ],
  298. tableData: [],
  299. tableData2:[],
  300. selecting_schs: [],
  301. dialogfapiaoVisible:false,
  302. targeOrderId:0,
  303. targeObj:{},
  304. limit: 10,
  305. page: 1,
  306. keywords: '',
  307. sch_type: '0',//班次
  308. zoneVal: 0,//分区
  309. medTypeVal: 0,
  310. start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  311. end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  312. pay_time:"",
  313. total: '',
  314. doctors: [],
  315. sort_type: 1,
  316. sort_types: [
  317. { value: 1, label: '处方时间' },
  318. { value: 2, label: '结算时间' }
  319. ],
  320. admin_user_id: '',
  321. listVisible: false,
  322. allListVisible: false,
  323. adminUserOptions: [],
  324. paramsObj: {},
  325. invoiceParams: {},
  326. settlementVisible: false,
  327. settlementObj: {},
  328. accounts_click_vi:false,
  329. cur_ids:0,
  330. patient_id:0,
  331. login_dialogVisible:false,
  332. qr_dialogVisible:false,
  333. formLabelAlign: {
  334. name: '',
  335. region: '',
  336. type: '',
  337. verify:'',
  338. },
  339. rules:{
  340. verify:[{ required: true, message: '请输入活动名称', trigger: 'blur' },]
  341. },
  342. time:null,
  343. countdown: 0,
  344. }
  345. },
  346. created() {
  347. this.getInitData()
  348. this.fetchAllAdminUsers()
  349. // this.getDoctorList()
  350. this.getHisOrderList()
  351. // this.getAllstaff()
  352. },
  353. methods: {
  354. chaxun(row){
  355. let params = {
  356. "id": row.result.id,
  357. "admin_user_id":this.$store.getters.xt_user.user.id,
  358. }
  359. var that = this;
  360. axios.get('http://127.0.0.1:9532/api/fapiao/query',{params:params}).then(function(response) {
  361. if (response.data.state == 0) {
  362. that.$message.error(response.data.data.msg);
  363. return false
  364. } else {
  365. if(response.data.data.failed_code == -10){
  366. that.settlementVisible = false
  367. that.$confirm(response.data.data.msg, '错误信息', {
  368. confirmButtonText: '确 定',
  369. type: 'warning'
  370. }).then(() => {
  371. }).catch(() => {
  372. })
  373. }else{
  374. this.getHisOrderList()
  375. that.$confirm(response.data.data.msg, '信息', {
  376. confirmButtonText: '确 定',
  377. type: 'warning'
  378. }).then(() => {
  379. }).catch(() => {
  380. })
  381. }
  382. }
  383. }).catch(function(error) {
  384. })
  385. },
  386. loginSJ(){
  387. // let params = {
  388. // "code":this.formLabelAlign.verify,
  389. // }
  390. // SMSLogin(params).then((response) => {
  391. // if (response.data.state == 0) {
  392. // this.login_dialogVisible = false
  393. // this.$message.error(response.data.msg)
  394. // return false
  395. // } else {
  396. // this.login_dialogVisible = false
  397. // // this.$message.success(response.data.msg)
  398. // // this.$message.success(response.data.data.msg)
  399. // this
  400. // .$confirm(response.data.data.msg, '信息', {
  401. // confirmButtonText: '确 定',
  402. // type: 'warning'
  403. // })
  404. // .then(() => {
  405. // })
  406. // .catch(() => {
  407. // })
  408. //
  409. // }
  410. // })
  411. var that = this;
  412. let params = {
  413. "code":this.formLabelAlign.verify,
  414. }
  415. axios.get('http://127.0.0.1:9532/api/fapiao/sms/login',{params:params}).then(function(response) {
  416. if (response.data.state == 0) {
  417. that.$message.error(response.data.data.msg);
  418. return false
  419. } else {
  420. if(response.data.data.failed_code == -10){
  421. that.$confirm(response.data.data.msg, '错误信息', {
  422. confirmButtonText: '确 定',
  423. type: 'warning'
  424. }).then(() => {
  425. }).catch(() => {
  426. })
  427. }else{
  428. that.login_dialogVisible = false
  429. // this.$message.success(response.data.msg)
  430. // this.$message.success(response.data.data.msg)
  431. that
  432. .$confirm(response.data.data.msg, '信息', {
  433. confirmButtonText: '确 定',
  434. type: 'warning'
  435. })
  436. .then(() => {
  437. })
  438. .catch(() => {
  439. })
  440. }
  441. }
  442. }).catch(function(error) {
  443. })
  444. },
  445. login(){
  446. this.login_dialogVisible = true
  447. },
  448. verify_click(){
  449. var that = this;
  450. let params = {
  451. "admin_user_id":this.$store.getters.xt_user.user.id,
  452. }
  453. axios.get('http://127.0.0.1:9532/api/fapiao/sms/code',{params:params}).then(function(response) {
  454. if (response.data.state == 0) {
  455. that.$message.error(response.data.data.msg);
  456. return false
  457. } else {
  458. if(response.data.data.failed_code == -10){
  459. that.$confirm(response.data.data.msg, '错误信息', {
  460. confirmButtonText: '确 定',
  461. type: 'warning'
  462. }).then(() => {
  463. }).catch(() => {
  464. })
  465. }else{
  466. that.$message.success(response.data.data.msg)
  467. }
  468. }
  469. }).catch(function(error) {
  470. })
  471. this.countdown = 60
  472. this.time = setInterval(() => {
  473. if (this.countdown > 0) {
  474. this.countdown--
  475. } else {
  476. clearInterval(this.time)
  477. }
  478. }, 1000)
  479. },
  480. auth(){
  481. // let params = {
  482. // }
  483. // GetQRCode(params).then((response) => {
  484. // if (response.data.state == 0) {
  485. // this.$message.error(response.data.msg)
  486. // return false
  487. // } else {
  488. // if(response.data.data.cus_status == 1){
  489. // this.$nextTick(() =>{
  490. // var qrcode = new QRCode(this.$refs.qrCodeUrl, {
  491. // text: response.data.data.qr_code, // 需要转换为二维码的内容
  492. // width: 120,
  493. // height: 120,
  494. // colorDark: '#000000',
  495. // colorLight: '#ffffff',
  496. // correctLevel: QRCode.CorrectLevel.H
  497. // })
  498. // })
  499. // this.qr_dialogVisible =true
  500. // }else if(response.data.data.cus_status == -1){
  501. // // this.$message.error(response.data.msg)/* */
  502. // this
  503. // .$confirm(response.data.data.msg, '信息', {
  504. // confirmButtonText: '确 定',
  505. // type: 'warning'
  506. // })
  507. // .then(() => {
  508. // })
  509. // .catch(() => {
  510. // })
  511. // }else if(response.data.data.cus_status == 2){
  512. // // this.$message.error(response.data.data.msg)
  513. // this
  514. // .$confirm(response.data.data.msg, '信息', {
  515. // confirmButtonText: '确 定',
  516. // type: 'warning'
  517. // })
  518. // .then(() => {
  519. // })
  520. // .catch(() => {
  521. // })
  522. //
  523. // }else if(response.data.data.cus_status == -3){
  524. // // this.$message.error(response.data.data.msg)
  525. // this
  526. // .$confirm(response.data.data.msg, '信息', {
  527. // confirmButtonText: '确 定',
  528. // type: 'warning'
  529. // })
  530. // .then(() => {
  531. // })
  532. // .catch(() => {
  533. // })
  534. //
  535. // }else if(response.data.data.cus_status == -4){
  536. // // this.$message.error(response.data.data.msg)
  537. // this
  538. // .$confirm(response.data.data.msg, '信息', {
  539. // confirmButtonText: '确 定',
  540. // type: 'warning'
  541. // })
  542. // .then(() => {
  543. // })
  544. // .catch(() => {
  545. // })
  546. //
  547. // }
  548. // // this.$message.success(response.data.msg)
  549. // }
  550. // })
  551. var that = this;
  552. let params = {
  553. "admin_user_id":this.$store.getters.xt_user.user.id,
  554. }
  555. axios.get('http://127.0.0.1:9532/api/fapiao/qrcode/get',{params:params}).then(function(response) {
  556. if (response.data.state == 0) {
  557. that.$message.error(response.data.data.msg);
  558. return false
  559. } else {
  560. if(response.data.data.failed_code == -10){
  561. that.$confirm(response.data.data.msg, '错误信息', {
  562. confirmButtonText: '确 定',
  563. type: 'warning'
  564. }).then(() => {
  565. }).catch(() => {
  566. })
  567. }else{
  568. if(response.data.data.cus_status == 1){
  569. Vue.nextTick(() => {
  570. // 确保二维码数据存在
  571. if (response.data.data.qr_code) {
  572. // 生成新的二维码
  573. var qrcode = new QRCode(that.$refs.qrCodeUrl, {
  574. text: response.data.data.qr_code,
  575. width: 120,
  576. height: 120,
  577. colorDark: '#000000',
  578. colorLight: '#ffffff',
  579. correctLevel: QRCode.CorrectLevel.H
  580. });
  581. that.qr_dialogVisible = true;
  582. } else {
  583. that.$message.error('二维码数据为空。');
  584. }
  585. });
  586. }else if(response.data.data.cus_status == -1){
  587. // this.$message.error(response.data.msg)/* */
  588. that
  589. .$confirm(response.data.data.msg, '信息', {
  590. confirmButtonText: '确 定',
  591. type: 'warning'
  592. })
  593. .then(() => {
  594. })
  595. .catch(() => {
  596. })
  597. }else if(response.data.data.cus_status == 2){
  598. // this.$message.error(response.data.data.msg)
  599. that
  600. .$confirm(response.data.data.msg, '信息', {
  601. confirmButtonText: '确 定',
  602. type: 'warning'
  603. })
  604. .then(() => {
  605. })
  606. .catch(() => {
  607. })
  608. }else if(response.data.data.cus_status == -3){
  609. // this.$message.error(response.data.data.msg)
  610. that
  611. .$confirm(response.data.data.msg, '信息', {
  612. confirmButtonText: '确 定',
  613. type: 'warning'
  614. })
  615. .then(() => {
  616. })
  617. .catch(() => {
  618. })
  619. }else if(response.data.data.cus_status == -4){
  620. // this.$message.error(response.data.data.msg)
  621. that
  622. .$confirm(response.data.data.msg, '信息', {
  623. confirmButtonText: '确 定',
  624. type: 'warning'
  625. })
  626. .then(() => {
  627. })
  628. .catch(() => {
  629. })
  630. }
  631. }
  632. }
  633. }).catch(function(error) {
  634. })
  635. },
  636. query(){
  637. this.getHisOrderList()
  638. },download(){
  639. },blueRequest(){
  640. let params = {
  641. "order_ids": this.cur_ids,
  642. "admin_user_id":this.$store.getters.xt_user.user.id,
  643. }
  644. var that = this;
  645. axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
  646. if (response.data.state == 0) {
  647. that.$message.error(response.data.data.msg);
  648. return false
  649. } else {
  650. if(response.data.data.failed_code == -10){
  651. that.settlementVisible = false
  652. that.$confirm(response.data.data.msg, '错误信息', {
  653. confirmButtonText: '确 定',
  654. type: 'warning'
  655. }).then(() => {
  656. }).catch(() => {
  657. })
  658. }else{
  659. that.settlementVisible = false
  660. that.$message.success(response.data.data.msg)
  661. that.getHisOrderList()
  662. }
  663. }
  664. }).catch(function(error) {
  665. })
  666. },
  667. blue(row){
  668. var ids = row.id
  669. this.cur_ids =ids
  670. this.patient_id = row.patient_id
  671. console.log(row)
  672. let paramsObj = {
  673. order_ids: ids,
  674. patient_id: row.patient_id,
  675. }
  676. this.settlementVisible = true
  677. this.paramsObj = paramsObj
  678. console.log(this.paramsObj)
  679. // this.invoiceVisible = true
  680. // OpenBlueFapiao(params).then((response) => {
  681. // if (response.data.state == 0) {
  682. // this.$message.error(response.data.msg)
  683. // return false
  684. // } else {
  685. // this.$message.success(response.data.msg)
  686. // this.getHisOrderList()
  687. // }
  688. // })
  689. }, yulan(row){
  690. window.open( row.result.pdf_url, "_blank");
  691. // this.settlementVisibletwo = true
  692. // this.pdfSrc = row.result.pdf_url
  693. // console.log(this.pdfSrc)
  694. },hongchong(row){
  695. var id = row.result.id
  696. let params = {
  697. "id":id,
  698. "admin_user_id":this.$store.getters.xt_user.user.id,
  699. }
  700. var that = this;
  701. axios.get('http://127.0.0.1:9532/api/fapiao/red',{params:params}).then(function(response) {
  702. if (response.data.state == 0) {
  703. that.$message.error(response.data.data.msg);
  704. return false
  705. } else {
  706. if(response.data.data.failed_code == -10){
  707. that.$confirm(response.data.data.msg, '错误信息', {
  708. confirmButtonText: '确 定',
  709. type: 'warning'
  710. }).then(() => {
  711. }).catch(() => {
  712. })
  713. }else{
  714. that.$message.success(response.data.data.msg)
  715. that.getHisOrderList()
  716. }
  717. }
  718. }).catch(function(error) {
  719. })
  720. },
  721. getAllstaff(){
  722. adminMainView()
  723. .then(rs => {
  724. var resp = rs.data;
  725. if (resp.state === 1) {
  726. var adminData = resp.data.admins
  727. this.admins.push(...adminData);
  728. } else {
  729. this.$message.error(resp.msg);
  730. }
  731. })
  732. .catch(err => {
  733. this.$message.error(err);
  734. });
  735. },
  736. handleSelectionChange(val) {
  737. this.selecting_schs = val
  738. },
  739. handleSchType(val) {
  740. this.sch_type = val
  741. this.getHisOrderList()
  742. }, handleMedChange() {
  743. this.getHisOrderList()
  744. },
  745. handleZoneChange(val) {
  746. this.zoneVal = val
  747. this.getHisOrderList()
  748. },
  749. getInitData: function() {
  750. getDialysisRecordInitData().then((rs) => {
  751. var resp = rs.data
  752. if (resp.state == 1) {
  753. var zones = resp.data.zones
  754. var zone_options = [{ id: 0, text: '全部' }]
  755. for (let z_i = 0; z_i < zones.length; z_i++) {
  756. const zone = zones[z_i]
  757. zone_options.push({ id: zone.id, text: zone.name })
  758. }
  759. this.zone_options = zone_options
  760. } else {
  761. this.$message.error(resp.msg)
  762. }
  763. })
  764. },
  765. getMedType(med_type) {
  766. var med_type = parseInt(med_type)
  767. switch (med_type) {
  768. case 11:
  769. return '普通门诊'
  770. break
  771. case 12:
  772. return '门诊挂号'
  773. break
  774. case 13:
  775. return '急诊'
  776. break
  777. case 14:
  778. return '门诊特殊病'
  779. break
  780. case 15:
  781. return '门诊统筹'
  782. break
  783. case 16:
  784. return '门诊慢性病'
  785. break
  786. case 21:
  787. return '普通住院'
  788. break
  789. case 140104:
  790. return '城乡门诊特殊病(140104)'
  791. break
  792. case 992102:
  793. return '单病种(992102)'
  794. break
  795. }
  796. },
  797. fetchAllAdminUsers() {
  798. fetchAllAdminUsers().then((response) => {
  799. if (response.data.state == 1) {
  800. this.adminUserOptions = response.data.data.users
  801. }
  802. })
  803. },
  804. getName(admin_user_id) {
  805. for (let i = 0; i < this.adminUserOptions.length; i++) {
  806. if (this.adminUserOptions[i].id == admin_user_id) {
  807. return this.adminUserOptions[i].name
  808. }
  809. }
  810. },
  811. handleSizeChange(limit) {
  812. this.limit = limit
  813. this.getHisOrderList()
  814. },
  815. handleCurrentChange(page) {
  816. this.page = page
  817. this.getHisOrderList()
  818. },
  819. handleStartTimeChange() {
  820. this.page = 1
  821. this.keywords = ''
  822. this.getHisOrderList()
  823. },
  824. handleEndTimeChange() {
  825. this.page = 1
  826. this.keywords = ''
  827. this.getHisOrderList()
  828. },
  829. getTimes(time) {
  830. return uParseTime(time, '{y}-{m}-{d}')
  831. },
  832. getTime(value, temp) {
  833. if (value != undefined) {
  834. return uParseTime(value, temp)
  835. }
  836. return ''
  837. },
  838. getHisOrderList() {
  839. let params = {
  840. page: this.page,
  841. limit: this.limit,
  842. keywords: this.keywords,
  843. start_time: this.start_time,
  844. end_time: this.end_time,
  845. sort_type: this.sort_type,
  846. }
  847. getOrderFapiaoList(params).then((response) => {
  848. if (response.data.state == 0) {
  849. this.$message.error(response.data.msg)
  850. return false
  851. } else {
  852. this.tableData = response.data.data.order
  853. this.total = response.data.data.total
  854. }
  855. })
  856. },
  857. getDoctorList() {
  858. getDoctorList().then((response) => {
  859. if (response.data.state == 0) {
  860. this.$message.error(response.data.msg)
  861. return false
  862. } else {
  863. this.doctors = response.data.data.doctors
  864. }
  865. })
  866. },
  867. open(index) {
  868. if (index == 1) {
  869. this.listVisible = true
  870. } else if (index == 2) {
  871. this.allListVisible = true
  872. }
  873. }, unique(array) {
  874. // res用来存储结果
  875. var res = []
  876. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  877. for (var j = 0, resLen = res.length; j < resLen; j++) {
  878. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  879. break
  880. }
  881. }
  882. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  883. if (j === resLen) {
  884. res.push(array[i])
  885. }
  886. }
  887. return res
  888. },camcleModifyFaPiaoCode(){
  889. this.dialogfapiaoVisible = false
  890. this.invoiceVisible = true
  891. var obj = this.targeObj
  892. let paramsObj = {
  893. order_ids: obj.id,
  894. patient_id: obj.patient_id,
  895. number: obj.mdtrt_id,
  896. name: obj.patient.name,
  897. age: obj.age,
  898. gend: obj.patient.gender,
  899. setl_time: obj.setl_time,
  900. chargeName: this.getName(obj.creator)
  901. }
  902. this.dialogfapiaoVisible = false
  903. this.invoiceParams = paramsObj
  904. this.invoiceVisible = true
  905. },modifyFaPiaoCode(){
  906. let params = {
  907. id:this.targeOrderId,
  908. fapiao_number: this.fapiao_number
  909. }
  910. modifyFapiaoCodetwo(params).then((response) => {
  911. if (response.data.state == 0) {
  912. this.$message.error(response.data.msg)
  913. return false
  914. } else {
  915. var obj = this.targeObj
  916. let paramsObj = {
  917. order_id: obj.id,
  918. patient_id: obj.patient_id,
  919. number: obj.mdtrt_id,
  920. name: obj.patient.name,
  921. age: obj.age,
  922. gend: obj.patient.gender,
  923. setl_time: obj.setl_time,
  924. chargeName: this.getName(obj.creator)
  925. }
  926. this.dialogfapiaoVisible = false
  927. this.invoiceParams = paramsObj
  928. this.invoiceVisible = true
  929. this.getHisOrderList()
  930. }
  931. })
  932. },
  933. invoicePrint(obj) {
  934. if(this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0){
  935. this.fapiao_number = obj.fa_piao_number
  936. this.dialogfapiaoVisible = true
  937. this.targeOrderId = obj.id
  938. this.targeObj = obj
  939. }else{
  940. let paramsObj = {
  941. order_id: obj.id,
  942. patient_id: obj.patient_id,
  943. number: obj.mdtrt_id,
  944. name: obj.patient.name,
  945. age: obj.age,
  946. gend: obj.patient.gender,
  947. setl_time: obj.setl_time,
  948. chargeName: this.getName(obj.creator)
  949. }
  950. this.dialogfapiaoVisible = false
  951. this.invoiceParams = paramsObj
  952. this.invoiceVisible = true
  953. }
  954. }
  955. },
  956. watch:{
  957. countdown(news,old){
  958. if(this.countdown ==0){
  959. clearInterval(this.time)
  960. }
  961. }
  962. }
  963. }
  964. </script>
  965. <style lang="scss">
  966. .table{
  967. tr td{
  968. padding:5px 0;
  969. }
  970. }
  971. </style>