소스 검색

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 4 년 전
부모
커밋
bfcafa8e93

+ 10 - 0
src/api/his/his.js 파일 보기

365
 
365
 
366
 
366
 
367
 
367
 
368
+export function getCheckAccountFormData (params) {
369
+  return request({
370
+    url: '/api/comparedata/get',
371
+    method: 'get',
372
+    params:params,
373
+  })
374
+}
375
+
376
+
377
+
368
 
378
 
369
 
379
 
370
 
380
 

+ 2 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue 파일 보기

484
         this.form.p_type = 14
484
         this.form.p_type = 14
485
         this.form.sick_type = this.sick[0].id
485
         this.form.sick_type = this.sick[0].id
486
         this.form.diagnosis = this.diagnoses[0].id
486
         this.form.diagnosis = this.diagnoses[0].id
487
+        this.form.id_card_type = 2
488
+        this.form.certificates = 1
487
 
489
 
488
         // this.form.name = patientInfo.name
490
         // this.form.name = patientInfo.name
489
         // this.form.gender = patientInfo.gender
491
         // this.form.gender = patientInfo.gender
493
         // this.form.birthday = patientInfo.birthday
495
         // this.form.birthday = patientInfo.birthday
494
         // this.form.id_card = patientInfo.id_card_no
496
         // this.form.id_card = patientInfo.id_card_no
495
         // this.form.social_type = patientInfo.health_care_type
497
         // this.form.social_type = patientInfo.health_care_type
496
-        // this.form.id_card_type = 1
497
         // if( this.form.social_type == 0){
498
         // if( this.form.social_type == 0){
498
         //   this.form.social_type = ""
499
         //   this.form.social_type = ""
499
         // }
500
         // }

+ 202 - 35
src/xt_pages/outpatientCharges/costComparison.vue 파일 보기

11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
             搜索
12
             搜索
13
           </el-button>
13
           </el-button>
14
+          <el-date-picker v-model="query_start_time" prefix-icon="el-icon-date"
15
+                          @change="handleStartTimeChange" :editable="false" :clearable="false"
16
+                          style="width: 200px;" type="date" placeholder="选择开始日期"
17
+                          format="yyyy-MM-dd"
18
+                          value-format="yyyy-MM-dd"
19
+                          align="right"></el-date-picker>
20
+          -
21
+
22
+          <el-date-picker v-model="query_end_time" prefix-icon="el-icon-date"
23
+                          @change="handleEndTimeChange" :editable="false" :clearable="false"
24
+                          style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
25
+                          format="yyyy-MM-dd"
26
+                          value-format="yyyy-MM-dd"
27
+                          align="right"></el-date-picker>
28
+
29
+
30
+          <label class="title">险种<span class="name"></span> : </label>
31
+          <el-select v-model="query_insutype" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
32
+            <el-option
33
+                    v-for="item in insutypes"
34
+                    :key="item.value"
35
+                    :label="item.label"
36
+                    :value="item.value">
37
+            </el-option>
38
+          </el-select>
39
+
40
+
41
+          <label class="title">清算类别<span class="name"></span> : </label>
42
+          <el-select v-model="query_clr_type" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
43
+            <el-option
44
+                    v-for="item in clrOptions"
45
+                    :key="item.value"
46
+                    :label="item.label"
47
+                    :value="item.value">
48
+            </el-option>
49
+          </el-select>
50
+
14
         </div>
51
         </div>
15
         <el-button size="small" type="primary" @click="dialogFormVisible = true" >医保对账</el-button>
52
         <el-button size="small" type="primary" @click="dialogFormVisible = true" >医保对账</el-button>
53
+        <el-button size="small" type="primary" @click="getFormData" >下载对账报表</el-button>
54
+
16
       </div>
55
       </div>
17
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
56
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
18
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
57
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
24
           type="index"
63
           type="index"
25
         >
64
         >
26
         </el-table-column>
65
         </el-table-column>
66
+        <el-table-column align="center" prop="name" label="对账结果">
67
+          <template slot-scope="scope">{{"平"}}</template>
68
+        </el-table-column>
69
+
70
+        <el-table-column align="center" prop="name" label="操作机构">
71
+          <template slot-scope="scope">{{this.$store.getters.xt_user.org.org_name}}</template>
72
+        </el-table-column>
27
         <el-table-column align="center" prop="name" label="对账申请人">
73
         <el-table-column align="center" prop="name" label="对账申请人">
28
           <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
74
           <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
29
         </el-table-column>
75
         </el-table-column>
30
-        <el-table-column align="center" prop="name" label="开始日期">
76
+        <el-table-column align="center" prop="name" label="开始时间">
31
           <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
77
           <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
32
         </el-table-column>
78
         </el-table-column>
33
-        <el-table-column align="center" prop="name" label="结束日期">
79
+        <el-table-column align="center" prop="name" label="结束时间">
34
           <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
80
           <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
35
         </el-table-column>
81
         </el-table-column>
36
         <el-table-column align="center" prop="name" label="险种类型">
82
         <el-table-column align="center" prop="name" label="险种类型">
50
             <div  v-if="scope.row.check_type == 2">明细</div>
96
             <div  v-if="scope.row.check_type == 2">明细</div>
51
           </template>
97
           </template>
52
         </el-table-column>
98
         </el-table-column>
53
-        <el-table-column align="center" prop="name" label="结算笔数">
54
-          <template slot-scope="scope">{{scope.row.num}}</template>
99
+        <el-table-column align="center" prop="name" label="清算经办机构">
100
+          <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
55
         </el-table-column>
101
         </el-table-column>
56
-        <el-table-column align="center" prop="name" label="医疗费用总数">
57
-          <template slot-scope="scope">
58
-            {{scope.row.cost_total}}元
59
-          </template>
102
+        <el-table-column align="center" prop="name" label="定点医药机构医疗费总额(元)">
103
+          <template slot-scope="scope">{{scope.row.setl_optins}}</template>
60
         </el-table-column>
104
         </el-table-column>
61
-        <el-table-column align="center" prop="name" width="160" label="基本医疗基金总费用">
62
-          <template slot-scope="scope">
63
-            {{scope.row.func_total}}元
64
-          </template>
105
+        <el-table-column align="center" prop="name" label="医保中心医疗费总额(元)">
106
+          <template slot-scope="scope">{{scope.row.cost_total}}</template>
65
         </el-table-column>
107
         </el-table-column>
66
-        <el-table-column align="center" prop="name" label="个人支付总费用">
67
-          <template slot-scope="scope">
68
-            {{scope.row.psn_pay}}元
69
-          </template>
108
+        <el-table-column align="center" prop="name" label="定点医药机构基金总额(元)">
109
+          <template slot-scope="scope">{{scope.row.cost_total}}</template>
70
         </el-table-column>
110
         </el-table-column>
111
+        <el-table-column align="center" prop="name" label="医保中心基金总额(元)">
112
+          <template slot-scope="scope">{{scope.row.func_total}}</template>
113
+        </el-table-column>
114
+        <el-table-column align="center" prop="name" label="定点医药机构个人账号总额(元)">
115
+          <template slot-scope="scope">{{scope.row.func_total}}</template>
116
+        </el-table-column>
117
+        <el-table-column align="center" prop="name" label="医保中心个人账号总额(元)">
118
+          <template slot-scope="scope">{{scope.row.psn_pay}}</template>
119
+        </el-table-column>
120
+        <el-table-column align="center" prop="name" label="定点医药机构结算笔数">
121
+          <template slot-scope="scope">{{scope.row.psn_pay}}</template>
122
+        </el-table-column>
123
+        <el-table-column align="center" prop="name" label="医保中心结算笔数">
124
+          <template slot-scope="scope">{{scope.row.num}}</template>
125
+        </el-table-column>
126
+
71
       </el-table>
127
       </el-table>
72
       <el-pagination
128
       <el-pagination
73
         @size-change="handleSizeChange"
129
         @size-change="handleSizeChange"
78
         style="margin-top:20px;float: right"
134
         style="margin-top:20px;float: right"
79
         layout="total, sizes, prev, pager, next, jumper"
135
         layout="total, sizes, prev, pager, next, jumper"
80
         :total="total"
136
         :total="total"
81
-
82
       >
137
       >
83
       </el-pagination>
138
       </el-pagination>
84
       <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
139
       <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
100
                             align="right"></el-date-picker>
155
                             align="right"></el-date-picker>
101
           </el-form-item>
156
           </el-form-item>
102
           <el-form-item label="险种类型" :label-width="formLabelWidth">
157
           <el-form-item label="险种类型" :label-width="formLabelWidth">
103
-            <el-select v-model=" insutype" placeholder="请选择" style="width: 200px;">
158
+            <el-select v-model="insutype" placeholder="请选择" style="width: 200px;">
104
               <el-option
159
               <el-option
105
                 v-for="item in insutypes"
160
                 v-for="item in insutypes"
106
                 :key="item.value"
161
                 :key="item.value"
134
 
189
 
135
 <script>
190
 <script>
136
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
191
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
137
-  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, getList } from '@/api/his/his'
192
+  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, getList,getCheckAccountFormData } from '@/api/his/his'
138
   import { uParseTime } from '@/utils/tools'
193
   import { uParseTime } from '@/utils/tools'
139
   import { fetchAllAdminUsers } from '@/api/doctor'
194
   import { fetchAllAdminUsers } from '@/api/doctor'
140
   import axios from 'axios'
195
   import axios from 'axios'
159
         end_time:"",
214
         end_time:"",
160
         insutype:"",
215
         insutype:"",
161
         check_type:"",
216
         check_type:"",
217
+        keywords:"",
218
+        query_start_time:"",
219
+        query_end_time:"",
162
 
220
 
221
+        query_insutype:"",
222
+        query_clr_type:"",
223
+        fromData:[],
163
         options:[
224
         options:[
164
           {
225
           {
165
             value:1,
226
             value:1,
169
             label:"明细",
230
             label:"明细",
170
           },
231
           },
171
         ],
232
         ],
172
-
233
+        clrOptions:[
234
+          {
235
+            value:"11",
236
+            label:"门诊",
237
+          },  {
238
+            value:"21",
239
+            label:"住院",
240
+          },  {
241
+            value:"41",
242
+            label:"药店购药",
243
+          }, {
244
+            value:"99",
245
+            label:"其他",
246
+          }
247
+        ],
173
         insutypes:[
248
         insutypes:[
174
           {
249
           {
175
             value:"310",
250
             value:"310",
195
             label:"生育保险",
270
             label:"生育保险",
196
           }
271
           }
197
 
272
 
198
-
273
+          // 1617724800
199
 
274
 
200
         ]
275
         ]
201
 
276
 
210
             insutype: this.insutype,
285
             insutype: this.insutype,
211
             clr_type: '11'
286
             clr_type: '11'
212
           }
287
           }
213
-
214
           var that = this
288
           var that = this
215
-
216
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
289
+          if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
217
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
290
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
218
               params: params
291
               params: params
219
             })
292
             })
222
                   that.$message.error(response.data.msg)
295
                   that.$message.error(response.data.msg)
223
                   return false
296
                   return false
224
                 } else {
297
                 } else {
225
-                  this.page =1
226
-                  this.limit = 10
227
-                  this.keywords = ""
228
-                  this.getList()
298
+                  var result_desc = ""
229
 
299
 
300
+                  if(response.data.data.stmt_rslt == 0){
301
+                    result_desc = "对账平"
302
+                  }else if (response.data.data.stmt_rslt == 1){
303
+                    result_desc = "中心多" +"\n" + response.data.data.stmt_rslt_dscr
304
+
305
+
306
+                  }else if (response.data.data.stmt_rslt == 2){
307
+                    result_desc = "机构多" +"\n" + response.data.data.stmt_rslt_dscr
308
+                  }
309
+
310
+                  that.$alert(result_desc, '对账结果', {
311
+                    confirmButtonText: '确定',
312
+                    callback: action => {
313
+                     this.dialogFormVisible = false
314
+                    }
315
+                  });
316
+
317
+                  that.page =1
318
+                  that.limit = 10
319
+                  that.keywords = ""
320
+                  that.query_start_time = ""
321
+                  that.query_end_time = ""
322
+                  that.query_insutype = ""
323
+                  that.query_clr_type = ""
324
+                  that.getList()
230
                 }
325
                 }
231
               })
326
               })
232
               .catch(function(error) {
327
               .catch(function(error) {
258
             .catch(function(error) {
353
             .catch(function(error) {
259
 
354
 
260
             })
355
             })
261
-
262
-
263
         }
356
         }
264
-
265
-
266
       },
357
       },
267
       getInsutype(type) {
358
       getInsutype(type) {
268
 
359
 
290
         let params = {
381
         let params = {
291
           'page': this.page,
382
           'page': this.page,
292
           'limit': this.limit,
383
           'limit': this.limit,
293
-          'keywords': this.keywords
294
-
384
+          'keywords': this.keywords,
385
+          'insutype':this.query_insutype,
386
+          'clr_type':this.query_clr_type,
387
+          'start_time':this.query_start_time,
388
+          'end_time':this.query_end_time,
295
         }
389
         }
296
         this.tableData = []
390
         this.tableData = []
297
         getList(params).then(response => {
391
         getList(params).then(response => {
313
         this.page = page
407
         this.page = page
314
         this.getList()
408
         this.getList()
315
 
409
 
316
-      }
410
+      },getFormData(){
411
+        if(this.query_start_time.length == 0){
412
+          this.$message.error("请选择开始时间")
413
+          return
414
+        }
415
+
416
+        if(this.query_end_time.length == 0){
417
+          this.$message.error("请选择结束时间")
418
+          return
419
+
420
+        }
421
+
422
+
423
+        if(this.query_insutype.length == 0){
424
+          this.$message.error("请选择险种类型")
425
+          return
426
+        }
427
+
428
+        let params = {
429
+          'start_time':this.query_start_time,
430
+          'end_time':this.query_end_time,
431
+          'insutype':this.query_insutype,
432
+        }
433
+
434
+        getCheckAccountFormData(params).then(response => {
435
+          if (response.data.state == 0) {
436
+            this.$message.error(response.data.msg)
437
+            return false
438
+          } else {
439
+            this.fromData = response.data.data.list
440
+            var list = []
441
+
442
+            for (let i =0; i < this.fromData.length; i++){
443
+              let obj = {
444
+                "结算金额":this.fromData[i].medfee_sumamt,
445
+                "姓名":this.fromData[i].psn_name,
446
+                "身份证":this.fromData[i].id_card_no,
447
+                "个人编号":this.fromData[i].psn_no,
448
+                "门诊流水号":this.fromData[i].mdtrt_id,
449
+                "挂号日期": this.getTimes(this.fromData[i].settle_accounts_date),
450
+                "起付线":this.fromData[i].act_pay_dedc,
451
+                "统筹基金":this.fromData[i].fund_pay_sumamt,
452
+                "个人支付":this.fromData[i].psn_cash_pay,
453
+                "个账支付":this.fromData[i].acct_pay,
454
+                "现金支付":this.fromData[i].cash_pay,
455
+                "总费用":this.fromData[i].sumamt,
456
+                "冲销标志":"已结算",
457
+              }
458
+              list.push(obj)
459
+            }
460
+            var insutype_name = ""
461
+            if(this.query_insutype =="310"){
462
+              insutype_name = "职工基本医疗保险"
463
+            }else if(this.query_insutype == "390"){
464
+              insutype_name = "城乡居民基本医疗保险"
465
+            }
466
+
467
+            import('@/vendor/Export2Excel').then(excel => {
468
+              const tHeader = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号',"挂号日期","起付线","统筹基金","个人支付","个账支付","现金支付","总费用","冲销标志"]
469
+              const filterVal = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号',"挂号日期","起付线","统筹基金","个人支付","个账支付","现金支付","总费用","冲销标志"]
470
+              const data = this.formatJson(filterVal, list)
471
+              excel.export_json_to_excel({
472
+                header: tHeader,
473
+                data,
474
+                filename: this.query_start_time +"~" + this.query_end_time+ insutype_name + "对账报表"
475
+              })
476
+            })
477
+          }
478
+        })
479
+
480
+
481
+      }, formatJson(filterVal, jsonData) {
482
+        return jsonData.map(v => filterVal.map(j => v[j]))
483
+      },
317
     },
484
     },
318
     created() {
485
     created() {
319
       this.getList()
486
       this.getList()

+ 13 - 4
src/xt_pages/outpatientCharges/incomeStatistics.vue 파일 보기

51
           type="index"
51
           type="index"
52
         >
52
         >
53
         </el-table-column>
53
         </el-table-column>
54
-        <el-table-column align="center" prop="name" label="就诊号">
55
-          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
54
+        <el-table-column align="center" prop="name" label="收费日期">
55
+          <template slot-scope="scope">{{ scope.row.selt_time }}</template>
56
         </el-table-column>
56
         </el-table-column>
57
+
58
+
57
         <el-table-column align="center" prop="name" label="患者名字">
59
         <el-table-column align="center" prop="name" label="患者名字">
58
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
60
+          <template slot-scope="scope">{{ scope.row.psn_name }}</template>
59
         </el-table-column>
61
         </el-table-column>
60
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
62
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
61
           <!--<template slot-scope="scope"></template>-->
63
           <!--<template slot-scope="scope"></template>-->
62
         <!--</el-table-column>-->
64
         <!--</el-table-column>-->
63
-        <el-table-column align="center" prop="name" label="应收金额">
65
+        <el-table-column align="center" prop="name" label="金额">
64
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
66
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
65
         </el-table-column>
67
         </el-table-column>
68
+
69
+        <el-table-column align="center" prop="name" label="总金额">
70
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
71
+        </el-table-column>
72
+
73
+
74
+
66
         <el-table-column align="center" prop="name" label="实收金额">
75
         <el-table-column align="center" prop="name" label="实收金额">
67
           <template slot-scope="scope">{{scope.row.reality_price}}</template>
76
           <template slot-scope="scope">{{scope.row.reality_price}}</template>
68
         </el-table-column>
77
         </el-table-column>

+ 0 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 파일 보기

2251
       comfirm() {
2251
       comfirm() {
2252
         console.log("222222222222",this.curPrescriptions)
2252
         console.log("222222222222",this.curPrescriptions)
2253
 
2253
 
2254
-        if (this.dayorMonth == 'month') {
2255
-          this.$message.error('月结状态下,无法添加药品或者项目')
2256
-          return
2257
-        }
2258
 
2254
 
2259
         if (this.curPrescriptions.order_status == 2) {
2255
         if (this.curPrescriptions.order_status == 2) {
2260
           this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2256
           this.$message.error('该处方已经结算,无法继续添加药品或者项目')

+ 10 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 파일 보기

982
                 this.doctors = response.data.data.doctors
982
                 this.doctors = response.data.data.doctors
983
                 this.department = response.data.data.department
983
                 this.department = response.data.data.department
984
 
984
 
985
-
985
+                for (let i = 0; i < this.doctors.length; i++){
986
+                  if(this.doctors[i].user_type == 1){
987
+                    this.doctors.splice(i,1)
988
+                  }
989
+                }
986
 
990
 
987
                 this.case_history = case_history
991
                 this.case_history = case_history
988
                 this.info = response.data.data.info
992
                 this.info = response.data.data.info
1154
               this.doctors = response.data.data.doctors
1158
               this.doctors = response.data.data.doctors
1155
               this.department = response.data.data.department
1159
               this.department = response.data.data.department
1156
 
1160
 
1157
-
1161
+              for (let i = 0; i < this.doctors.length; i++){
1162
+                if(this.doctors[i].user_type == 1){
1163
+                  this.doctors.splice(i,1)
1164
+                }
1165
+              }
1158
               this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1166
               this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1159
               if (this.case_history.breathing <= 0) {
1167
               if (this.case_history.breathing <= 0) {
1160
                 this.case_history.breathing = ""
1168
                 this.case_history.breathing = ""

+ 170 - 70
src/xt_pages/outpatientRegistration/index.vue 파일 보기

178
                         <el-input v-model.number="total" readonly></el-input>
178
                         <el-input v-model.number="total" readonly></el-input>
179
                     </el-form-item>
179
                     </el-form-item>
180
                 </el-form>
180
                 </el-form>
181
-                <el-button style="float:right" v-loading="loadingone" @click="saveHisPatient9504('form')" type="primary">挂号</el-button>
181
+                <el-button style="float:right" v-loading="loadingone" @click="saveHisPatient9504('form')"
182
+                           type="primary">挂号
183
+                </el-button>
182
             </div>
184
             </div>
183
 
185
 
184
         </div>
186
         </div>
408
                         <!-- <el-input v-model="form.name"></el-input> -->
410
                         <!-- <el-input v-model="form.name"></el-input> -->
409
                     </el-form-item>
411
                     </el-form-item>
410
                 </el-form>
412
                 </el-form>
411
-                <el-button style="float:right" @click="saveHisPatient('form')" type="primary">挂号</el-button>
413
+                <el-button style="float:right" @click="saveHisPatient('form')" v-loading="loadingone" type="primary">挂号</el-button>
412
             </div>
414
             </div>
413
 
415
 
414
         </div>
416
         </div>
427
     saveHisPatient
429
     saveHisPatient
428
   } from '@/api/project/project'
430
   } from '@/api/project/project'
429
   import { getDictionaryDataConfig } from '@/utils/data'
431
   import { getDictionaryDataConfig } from '@/utils/data'
430
-  import { uParseTime,jsGetAge } from '@/utils/tools'
432
+  import { jsGetAge, uParseTime } from '@/utils/tools'
431
   import { getInitData } from '@/api/his/his'
433
   import { getInitData } from '@/api/his/his'
432
   import axios from 'axios'
434
   import axios from 'axios'
433
 
435
 
438
     },
440
     },
439
     data() {
441
     data() {
440
       return {
442
       return {
443
+        loadingone: false,
441
         read_loading: false,
444
         read_loading: false,
442
         registers: [
445
         registers: [
443
           { value: 11, label: '普通门诊' },
446
           { value: 11, label: '普通门诊' },
479
           total: '',
482
           total: '',
480
           phone: '',
483
           phone: '',
481
           social_type: '',
484
           social_type: '',
482
-          id_card_type: 1
485
+          id_card_type: 2
483
 
486
 
484
         },
487
         },
485
         medical_care: [
488
         medical_care: [
656
         this.form.phone = val.phone
659
         this.form.phone = val.phone
657
         this.form.idCard = val.id_card_no
660
         this.form.idCard = val.id_card_no
658
 
661
 
659
-        var thisLen =  this.form.idCard.length;
660
-        var birth = "";
662
+        var thisLen = this.form.idCard.length
663
+        var birth = ''
661
         if (thisLen == 15) {
664
         if (thisLen == 15) {
662
-          birth = "19" + this.form.idCard.substr(6, 6);
665
+          birth = '19' + this.form.idCard.substr(6, 6)
663
         } else {
666
         } else {
664
-          birth = this.form.idCard.substr(6, 8);
667
+          birth = this.form.idCard.substr(6, 8)
665
         }
668
         }
666
         var births =
669
         var births =
667
           birth.substr(0, 4) +
670
           birth.substr(0, 4) +
668
-          "-" +
671
+          '-' +
669
           birth.substr(4, 2) +
672
           birth.substr(4, 2) +
670
-          "-" +
671
-          birth.substr(6, 2);
672
-        this.form.age = jsGetAge(births, "-");
673
+          '-' +
674
+          birth.substr(6, 2)
675
+        this.form.age = jsGetAge(births, '-')
673
       },
676
       },
674
       querySearchAsync(keyword, cb) {
677
       querySearchAsync(keyword, cb) {
675
         let key = ''
678
         let key = ''
915
           return
918
           return
916
         }
919
         }
917
 
920
 
918
-
919
         this.$refs[formName].validate((valid) => {
921
         this.$refs[formName].validate((valid) => {
920
           if (valid) {
922
           if (valid) {
921
             var params = {
923
             var params = {
966
                       that.$message.error(response.data.data.msg)
968
                       that.$message.error(response.data.data.msg)
967
                     } else {
969
                     } else {
968
                       that.$message({ message: '挂号成功', type: 'success' })
970
                       that.$message({ message: '挂号成功', type: 'success' })
969
-                      that.getPatientList()
971
+                      that.form.settlementValue = ''
972
+                      that.form.medicalInsuranceCard = ''
973
+                      that.form.name = ''
974
+                      that.form.sex = ''
975
+                      that.form.certificates = ''
976
+                      that.form.medicalCare = ''
977
+                      that.form.birthday = ''
978
+                      that.form.age = ''
979
+                      that.form.idCard = ''
980
+                      that.form.register = ''
981
+                      that.form.doctor = ''
982
+                      that.form.department = ''
983
+                      that.form.costChecked = false
984
+                      that.form.registrationFee = ''
985
+                      that.form.medicalExpenses = ''
986
+                      that.form.cost = ''
987
+                      that.form.total = ''
988
+                      that.form.phone = ''
989
+                      that.form.social_type = ''
970
                       that.loadingone = false
990
                       that.loadingone = false
971
 
991
 
992
+
993
+                      that.form.p_type = 14
994
+                      that.form.sick_type = that.sick[0].id
995
+                      that.form.diagnosis = that.diagnoses[0].id
996
+
972
                     }
997
                     }
973
                   }
998
                   }
974
                 })
999
                 })
975
                 .catch(function(error) {
1000
                 .catch(function(error) {
976
 
1001
 
977
                 })
1002
                 })
978
-            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1003
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538) {
979
               var that = this
1004
               var that = this
980
 
1005
 
981
               axios.get('http://127.0.0.1:9532/api/register/get', {
1006
               axios.get('http://127.0.0.1:9532/api/register/get', {
991
                     that.$refs.register.hide()
1016
                     that.$refs.register.hide()
992
                     return false
1017
                     return false
993
                   } else {
1018
                   } else {
1019
+                    that.loadingone = false
1020
+
994
                     if (response.data.data.failed_code == -10) {
1021
                     if (response.data.data.failed_code == -10) {
995
                       that.$message.error(response.data.data.msg)
1022
                       that.$message.error(response.data.data.msg)
996
                       return
1023
                       return
997
                     } else {
1024
                     } else {
998
-                      that.$refs.register.hide()
999
-                      that.getPatientList()
1000
                       that.$message({ message: '挂号成功', type: 'success' })
1025
                       that.$message({ message: '挂号成功', type: 'success' })
1001
-                      that.loadingone = false
1026
+                      that.form.settlementValue = ''
1027
+                      that.form.medicalInsuranceCard = ''
1028
+                      that.form.name = ''
1029
+                      that.form.sex = ''
1030
+                      that.form.certificates = ''
1031
+                      that.form.medicalCare = ''
1032
+                      that.form.birthday = ''
1033
+                      that.form.age = ''
1034
+                      that.form.idCard = ''
1035
+                      that.form.register = ''
1036
+                      that.form.doctor = ''
1037
+                      that.form.department = ''
1038
+                      that.form.costChecked = false
1039
+                      that.form.registrationFee = ''
1040
+                      that.form.medicalExpenses = ''
1041
+                      that.form.cost = ''
1042
+                      that.form.total = ''
1043
+                      that.form.phone = ''
1044
+                      that.form.social_type = ''
1045
+
1046
+                      that.form.p_type = 14
1047
+                      that.form.sick_type = that.sick[0].id
1048
+                      that.form.diagnosis = that.diagnoses[0].id
1002
                     }
1049
                     }
1003
                     // var his_info = response.data.data.his_info
1050
                     // var his_info = response.data.data.his_info
1004
                     // that.hisPatientInfo = his_info
1051
                     // that.hisPatientInfo = his_info
1012
                 if (response.data.state == 1) {
1059
                 if (response.data.state == 1) {
1013
                   var patient = response.data.data.patient
1060
                   var patient = response.data.data.patient
1014
                   this.getTodaySchedulePatient()
1061
                   this.getTodaySchedulePatient()
1015
-                  this.$message.success('保存成功')
1016
-                  this.form.settlementValue = '',
1017
-                    this.form.medicalInsuranceCard = '',
1018
-                    this.form.name = '',
1019
-                    this.form.sex = '',
1020
-                    this.form.certificates = '',
1021
-                    this.form.medicalCare = '',
1022
-                    this.form.birthday = '',
1023
-                    this.form.age = '',
1024
-                    this.form.idCard = '',
1025
-                    this.form.register = '',
1026
-                    this.form.doctor = '',
1027
-                    this.form.department = '',
1028
-                    this.form.costChecked = false,
1029
-                    this.form.registrationFee = '',
1030
-                    this.form.medicalExpenses = '',
1031
-                    this.form.cost = '',
1032
-                    this.form.total = '' ,
1033
-                    this.form.phone = '',
1034
-                    this.form.social_type = ''
1062
+                  that.$message({ message: '挂号成功', type: 'success' })
1063
+                  that.form.settlementValue = ''
1064
+                  that.form.medicalInsuranceCard = ''
1065
+                  that.form.name = ''
1066
+                  that.form.sex = ''
1067
+                  that.form.certificates = ''
1068
+                  that.form.medicalCare = ''
1069
+                  that.form.birthday = ''
1070
+                  that.form.age = ''
1071
+                  that.form.idCard = ''
1072
+                  that.form.register = ''
1073
+                  that.form.doctor = ''
1074
+                  that.form.department = ''
1075
+                  that.form.costChecked = false
1076
+                  that.form.registrationFee = ''
1077
+                  that.form.medicalExpenses = ''
1078
+                  that.form.cost = ''
1079
+                  that.form.total = ''
1080
+                  that.form.phone = ''
1081
+                  that.form.social_type = ''
1082
+                  that.loadingone = false
1083
+
1084
+                  that.form.p_type = 14
1085
+                  that.form.sick_type = that.sick[0].id
1086
+                  that.form.diagnosis = that.diagnoses[0].id
1087
+
1035
                 } else {
1088
                 } else {
1036
                   this.$message.error('今日患者已挂号!')
1089
                   this.$message.error('今日患者已挂号!')
1037
                 }
1090
                 }
1169
                     that.$refs.register.hide()
1222
                     that.$refs.register.hide()
1170
                     return false
1223
                     return false
1171
                   } else {
1224
                   } else {
1225
+                    that.loadingone = false
1226
+
1172
                     if (response.data.data.failed_code == -10) {
1227
                     if (response.data.data.failed_code == -10) {
1173
                       that.$message.error(response.data.data.msg)
1228
                       that.$message.error(response.data.data.msg)
1174
                     } else {
1229
                     } else {
1175
-                      that.$refs.register.hide()
1176
-                      that.getPatientList()
1177
                       that.$message({ message: '挂号成功', type: 'success' })
1230
                       that.$message({ message: '挂号成功', type: 'success' })
1178
-                      that.loadingone = false
1179
-                      var his_info = response.data.data.his_info
1180
-                      that.hisPatientInfo = his_info
1231
+                      that.form.settlementValue = ''
1232
+                      that.form.medicalInsuranceCard = ''
1233
+                      that.form.name = ''
1234
+                      that.form.sex = ''
1235
+                      that.form.certificates = ''
1236
+                      that.form.medicalCare = ''
1237
+                      that.form.birthday = ''
1238
+                      that.form.age = ''
1239
+                      that.form.idCard = ''
1240
+                      that.form.register = ''
1241
+                      that.form.doctor = ''
1242
+                      that.form.department = ''
1243
+                      that.form.costChecked = false
1244
+                      that.form.registrationFee = ''
1245
+                      that.form.medicalExpenses = ''
1246
+                      that.form.cost = ''
1247
+                      that.form.total = ''
1248
+                      that.form.phone = ''
1249
+                      that.form.social_type = ''
1250
+
1251
+                      that.form.p_type = 14
1252
+                      that.form.sick_type = that.sick[0].id
1253
+                      that.form.diagnosis = that.diagnoses[0].id
1181
 
1254
 
1182
                     }
1255
                     }
1183
 
1256
 
1186
                 .catch(function(error) {
1259
                 .catch(function(error) {
1187
 
1260
 
1188
                 })
1261
                 })
1189
-            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1262
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538) {
1190
               var that = this
1263
               var that = this
1191
 
1264
 
1192
               axios.get('http://127.0.0.1:9532/api/register/get', {
1265
               axios.get('http://127.0.0.1:9532/api/register/get', {
1199
                   if (response.data.state == 0) {
1272
                   if (response.data.state == 0) {
1200
                     that.$message.error(response.data.msg)
1273
                     that.$message.error(response.data.msg)
1201
                     that.loadingone = false
1274
                     that.loadingone = false
1202
-                    that.$refs.register.hide()
1203
                     return false
1275
                     return false
1204
                   } else {
1276
                   } else {
1205
-                    that.$refs.register.hide()
1206
-                    that.getPatientList()
1207
-                    that.$message({ message: '挂号成功', type: 'success' })
1208
                     that.loadingone = false
1277
                     that.loadingone = false
1209
-                    var his_info = response.data.data.his_info
1210
-                    that.hisPatientInfo = his_info
1278
+                    if (response.data.data.failed_code == -10) {
1279
+                      that.$message.error(response.data.data.msg)
1280
+                    } else {
1281
+                      that.$message({ message: '挂号成功', type: 'success' })
1282
+                      that.form.settlementValue = ''
1283
+                      that.form.medicalInsuranceCard = ''
1284
+                      that.form.name = ''
1285
+                      that.form.sex = ''
1286
+                      that.form.certificates = ''
1287
+                      that.form.medicalCare = ''
1288
+                      that.form.birthday = ''
1289
+                      that.form.age = ''
1290
+                      that.form.idCard = ''
1291
+                      that.form.register = ''
1292
+                      that.form.doctor = ''
1293
+                      that.form.department = ''
1294
+                      that.form.costChecked = false
1295
+                      that.form.registrationFee = ''
1296
+                      that.form.medicalExpenses = ''
1297
+                      that.form.cost = ''
1298
+                      that.form.total = ''
1299
+                      that.form.phone = ''
1300
+                      that.form.social_type = ''
1301
+
1302
+                      that.form.p_type = 14
1303
+                      that.form.sick_type = that.sick[0].id
1304
+                      that.form.diagnosis = that.diagnoses[0].id
1305
+                    }
1211
                   }
1306
                   }
1212
                 })
1307
                 })
1213
                 .catch(function(error) {
1308
                 .catch(function(error) {
1218
                 if (response.data.state == 1) {
1313
                 if (response.data.state == 1) {
1219
                   var patient = response.data.data.patient
1314
                   var patient = response.data.data.patient
1220
                   this.getTodaySchedulePatient()
1315
                   this.getTodaySchedulePatient()
1221
-                  this.$message.success('保存成功')
1222
-                  this.form.settlementValue = '',
1223
-                    this.form.medicalInsuranceCard = '',
1224
-                    this.form.name = '',
1225
-                    this.form.sex = '',
1226
-                    this.form.certificates = '',
1227
-                    this.form.medicalCare = '',
1228
-                    this.form.birthday = '',
1229
-                    this.form.age = '',
1230
-                    this.form.idCard = '',
1231
-                    this.form.register = '',
1232
-                    this.form.doctor = '',
1233
-                    this.form.department = '',
1234
-                    this.form.costChecked = false,
1235
-                    this.form.registrationFee = '',
1236
-                    this.form.medicalExpenses = '',
1237
-                    this.form.cost = '',
1238
-                    this.form.total = '' ,
1239
-                    this.form.phone = '',
1240
-                    this.form.social_type = ''
1316
+                  that.$message({ message: '挂号成功', type: 'success' })
1317
+                  that.form.settlementValue = ''
1318
+                  that.form.medicalInsuranceCard = ''
1319
+                  that.form.name = ''
1320
+                  that.form.sex = ''
1321
+                  that.form.certificates = ''
1322
+                  that.form.medicalCare = ''
1323
+                  that.form.birthday = ''
1324
+                  that.form.age = ''
1325
+                  that.form.idCard = ''
1326
+                  that.form.register = ''
1327
+                  that.form.doctor = ''
1328
+                  that.form.department = ''
1329
+                  that.form.costChecked = false
1330
+                  that.form.registrationFee = ''
1331
+                  that.form.medicalExpenses = ''
1332
+                  that.form.cost = ''
1333
+                  that.form.total = ''
1334
+                  that.form.phone = ''
1335
+                  that.form.social_type = ''
1336
+                  that.loadingone = false
1337
+
1338
+                  that.form.p_type = 14
1339
+                  that.form.sick_type = that.sick[0].id
1340
+                  that.form.diagnosis = that.diagnoses[0].id
1241
                 } else {
1341
                 } else {
1242
                   this.$message.error('今日患者已挂号!')
1342
                   this.$message.error('今日患者已挂号!')
1243
                 }
1343
                 }