Kaynağa Gözat

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

csx 3 yıl önce
ebeveyn
işleme
b36d410cb7

+ 80 - 82
src/xt_pages/outpatientCharges/components/registerDialog.vue Dosyayı Görüntüle

@@ -79,7 +79,7 @@
79 79
 
80 80
       <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81 81
         <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
-                   >
82
+        >
83 83
           <el-option
84 84
             v-for="(item,index) in registers"
85 85
             :key="index"
@@ -155,7 +155,7 @@
155 155
         </div>
156 156
       </el-form-item>
157 157
 
158
-      <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
158
+      <el-form-item label="挂号类型:"  >
159 159
         <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160 160
           <el-option
161 161
             v-for="item in register"
@@ -166,7 +166,7 @@
166 166
         </el-select>
167 167
       </el-form-item>
168 168
       <el-form-item label="挂号费:">
169
-        <el-input  v-model="form.registration_fee"></el-input>
169
+        <el-input v-model="form.registration_fee"></el-input>
170 170
       </el-form-item>
171 171
       <el-form-item label="诊疗费:">
172 172
         <el-input v-model="form.medical_expenses"></el-input>
@@ -182,7 +182,7 @@
182 182
 </template>
183 183
 
184 184
 <script>
185
-  import {uParseTime,jsGetAge} from "@/utils/tools";
185
+  import {jsGetAge, uParseTime} from "@/utils/tools";
186 186
   import axios from 'axios'
187 187
   import {PostSearch} from '@/api/patient'
188 188
 
@@ -204,7 +204,7 @@
204 204
           {value: 16, label: "门诊慢性病"},
205 205
           {value: 21, label: "普通住院"},
206 206
         ],
207
-        medical_care:[
207
+        medical_care: [
208 208
           {value: 11, label: "普通门诊"},
209 209
           {value: 12, label: '家庭通道'},
210 210
           {value: 13, label: "门诊大病"},
@@ -218,8 +218,6 @@
218 218
         ],
219 219
 
220 220
 
221
-
222
-
223 221
         form: {
224 222
           id: '',
225 223
           settlement_value: '',
@@ -227,9 +225,9 @@
227 225
           name: '',
228 226
           gender: '',
229 227
           certificates: 1,
230
-          p_type:'',
231
-          sick_type:'',
232
-          diagnosis:'',
228
+          p_type: '',
229
+          sick_type: '',
230
+          diagnosis: '',
233 231
           medical_care: '',
234 232
           birthday: '',
235 233
           age: '',
@@ -238,8 +236,8 @@
238 236
           doctor: '',
239 237
           id_card_type: 1,
240 238
           department: '',
241
-          registration_fee: '',
242
-          medical_expenses: '',
239
+          registration_fee: 0,
240
+          medical_expenses: 0,
243 241
           cost: '',
244 242
           phone: '',
245 243
           social_type: '',
@@ -307,9 +305,9 @@
307 305
           value: 6,
308 306
           label: "城乡居民大病医疗保险"
309 307
         }, {
310
-            value: 7,
311
-            label: "生育保险"
312
-          }],
308
+          value: 7,
309
+          label: "生育保险"
310
+        }],
313 311
         register: [{
314 312
           value: 1,
315 313
           label: '普通'
@@ -391,13 +389,13 @@
391 389
     },
392 390
     methods: {
393 391
       handleSelect(val) {
394
-        this.form.id = val.id
395
-        this.form.name = val.name
396
-        this.form.gender = val.gender
397
-        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
398
-        this.form.phone = val.phone
399
-        this.form.id_card = val.id_card_no
400
-        var thisLen =  this.form.id_card.length;
392
+        this.form.id = val.id;
393
+        this.form.name = val.name;
394
+        this.form.gender = val.gender;
395
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
396
+        this.form.phone = val.phone;
397
+        this.form.id_card = val.id_card_no;
398
+        var thisLen = this.form.id_card.length;
401 399
         var birth = "";
402 400
         if (thisLen == 15) {
403 401
           birth = "19" + this.form.id_card.substr(6, 6);
@@ -405,22 +403,22 @@
405 403
           birth = this.form.id_card.substr(6, 8);
406 404
         }
407 405
         var births =
408
-                birth.substr(0, 4) +
409
-                "-" +
410
-                birth.substr(4, 2) +
411
-                "-" +
412
-                birth.substr(6, 2);
406
+          birth.substr(0, 4) +
407
+          "-" +
408
+          birth.substr(4, 2) +
409
+          "-" +
410
+          birth.substr(6, 2);
413 411
         this.form.age = jsGetAge(births, "-");
414 412
       },
415 413
       querySearchAsync(keyword, cb) {
416
-        let key = ''
414
+        let key = '';
417 415
         if (keyword != undefined) {
418 416
           key = keyword
419 417
         }
420
-        let searchArray = []
418
+        let searchArray = [];
421 419
         PostSearch(key).then(response => {
422 420
           if (response.data.state == 1) {
423
-            searchArray = response.data.data.patient
421
+            searchArray = response.data.data.patient;
424 422
             cb(searchArray)
425 423
           } else {
426 424
             cb([])
@@ -428,43 +426,43 @@
428 426
         })
429 427
       },
430 428
       reading(medicalInsuranceCard) {
431
-        var that = this
429
+        var that = this;
432 430
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
433
-          this.$message.error("请先选择读卡类型")
431
+          this.$message.error("请先选择读卡类型");
434 432
           return
435 433
         }
436 434
         let params = {
437 435
           'id_card_type': this.form.id_card_type,
438
-          'admin_user_id':this.$store.getters.xt_user.user.id,
436
+          'admin_user_id': this.$store.getters.xt_user.user.id,
439 437
 
440
-        }
438
+        };
441 439
         axios.get('http://127.0.0.1:9532/api/sscard', {
442 440
           params: params
443 441
         })
444 442
           .then(function (response) {
445 443
             if (response.data.state == 0) {
446
-              that.$message.error(response.data.msg)
444
+              that.$message.error(response.data.msg);
447 445
               return false
448 446
             } else {
449
-              var patient = response.data.data.patient
447
+              var patient = response.data.data.patient;
450 448
 
451 449
               if (that.form.id_card_type == 1) {
452
-                this.form.id = patient.id
453
-                that.form.name = patient.name
454
-                that.form.sex = patient.gender
455
-                that.form.age = patient.age
456
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
457
-                that.form.phone = patient.phone
458
-                that.form.idCard = patient.id_card_no
450
+                this.form.id = patient.id;
451
+                that.form.name = patient.name;
452
+                that.form.sex = patient.gender;
453
+                that.form.age = patient.age;
454
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
455
+                that.form.phone = patient.phone;
456
+                that.form.idCard = patient.id_card_no;
459 457
                 that.form.medicalInsuranceCard = response.data.data.number
460 458
 
461 459
               } else if (that.form.id_card_type == 2) {
462
-                this.form.id = patient.id
463
-                that.form.name = patient.name
464
-                that.form.sex = patient.gender
465
-                that.form.age = patient.age
466
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
467
-                that.form.phone = patient.phone
460
+                this.form.id = patient.id;
461
+                that.form.name = patient.name;
462
+                that.form.sex = patient.gender;
463
+                that.form.age = patient.age;
464
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
465
+                that.form.phone = patient.phone;
468 466
                 that.form.idCard = patient.id_card_no
469 467
               }
470 468
               that.$message({message: '读卡成功', type: 'success'})
@@ -479,33 +477,33 @@
479 477
       getDictionaryDataConfig(module, filed_name) {
480 478
         return getDictionaryDataConfig(module, filed_name)
481 479
       },
482
-    show: function() {
483
-        this.visibility = true
480
+      show: function () {
481
+        this.visibility = true;
484 482
         // this.form = Object.assign({}, this.resetForm)
485
-        this.form.id = 0
486
-        this.form.settlement_value = ''
487
-        this.form.medical_insurance_card = ''
488
-        this.form.name = ''
489
-        this.form.gender = ''
490
-        this.form.medical_care = ''
491
-        this.form.birthda = ''
492
-        this.form.age = ''
493
-        this.form.id_card = ''
494
-        this.form.register = ''
495
-        this.form.doctor = ''
496
-        this.form.department = ''
497
-        this.form.registration_fee = ''
498
-        this.form.medical_expenses = ''
499
-        this.form.cost = ''
500
-        this.form.phone = ''
501
-        this.form.social_type = ''
502
-
503
-        this.form.p_type = 14
504
-        this.form.sick_type = this.sick[0].id
505
-        this.form.diagnosis = this.diagnoses[0].id
506
-        this.form.id_card_type = 2
507
-        this.form.certificates = 1
508
-
483
+        this.form.id = 0;
484
+        this.form.settlement_value = '';
485
+        this.form.medical_insurance_card = '';
486
+        this.form.name = '';
487
+        this.form.gender = '';
488
+        this.form.medical_care = '';
489
+        this.form.birthda = '';
490
+        this.form.age = '';
491
+        this.form.id_card = '';
492
+        this.form.register = '';
493
+        this.form.doctor = '';
494
+        this.form.department = '';
495
+        this.form.registration_fee = 0;
496
+        this.form.medical_expenses = 0;
497
+        this.form.cost = '';
498
+        this.form.phone = '';
499
+        this.form.social_type = '';
500
+
501
+        this.form.p_type = 14;
502
+        this.form.sick_type = this.sick[0].id;
503
+        this.form.diagnosis = this.diagnoses[0].id;
504
+        this.form.id_card_type = 2;
505
+        this.form.certificates = 1;
506
+        this.form.settlement_value = 1
509 507
         // this.form.name = patientInfo.name
510 508
         // this.form.gender = patientInfo.gender
511 509
         // this.form.age = patientInfo.age
@@ -519,26 +517,26 @@
519 517
         // }
520 518
 
521 519
       },
522
-      
520
+
523 521
       hide: function () {
524
-        this.visibility = false
522
+        this.visibility = false;
525 523
         this.$refs['formValue'].resetFields()
526 524
       }, cancel: function (formName) {
527
-        this.$emit('cancel', this.getValue())
525
+        this.$emit('cancel', this.getValue());
528 526
         this.$refs['formValue'].resetFields()
529 527
       },
530 528
       confirm: function (formName) {
531 529
         this.$refs['formValue'].validate((valid) => {
532 530
           if (valid) {
533
-            let value = {}
534
-            value = this.getValue()
531
+            let value = {};
532
+            value = this.getValue();
535 533
             this.$emit('confirm', value)
536 534
           }
537 535
         })
538 536
       },
539 537
       getValue: function () {
540
-        let form = {}
541
-        form = this.form
538
+        let form = {};
539
+        form = this.form;
542 540
         return form
543 541
       }
544 542
     }

+ 28 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Dosyayı Görüntüle

@@ -204,7 +204,7 @@
204 204
                                     <ul class="basicUl">
205 205
                                         <li style="width:50%;">姓名:{{patientInfo.name}}</li>
206 206
                                         <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
207
-                                        <li style="width:50%;">年龄:{{patientInfo.age }}</li>
207
+                                        <li style="width:50%;">年龄:{{getAge(patientInfo.id_card_no)}}</li>
208 208
                                         <li style="width:50%;">电话:{{patientInfo.phone}}</li>
209 209
 
210 210
                                         <!--<span>过敏病史:</span>-->
@@ -372,7 +372,7 @@
372 372
 
373 373
 <script>
374 374
   import axios from 'axios'
375
-
375
+  import { jsGetAge, uParseTime } from '@/utils/tools'
376 376
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
377 377
   import noCharge from './components/noCharge'
378 378
   import charged from './components/charged'
@@ -524,6 +524,32 @@
524 524
       this.getPatientList()
525 525
     },
526 526
     methods: {
527
+      getAge(id_card_no){
528
+        if (id_card_no){
529
+
530
+          var thisLen = id_card_no.length;
531
+          var birth = '';
532
+          if (thisLen == 15) {
533
+            birth = '19' + id_card_no.substr(6, 6)
534
+          } else {
535
+            birth = id_card_no.substr(6, 8)
536
+          }
537
+          var births =
538
+            birth.substr(0, 4) +
539
+            '-' +
540
+            birth.substr(4, 2) +
541
+            '-' +
542
+            birth.substr(6, 2);
543
+          return jsGetAge(births, '-')
544
+
545
+        }else{
546
+
547
+          return 0
548
+
549
+        }
550
+
551
+
552
+      },
527 553
       query() {
528 554
         if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
529 555
           var that = this;

+ 3 - 8
src/xt_pages/outpatientRegistration/index.vue Dosyayı Görüntüle

@@ -315,7 +315,7 @@
315 315
             <div class="nameTitle">患者挂号信息:</div>
316 316
             <div class="formMain">
317 317
                 <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
318
-                    <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
318
+                    <el-form-item label="挂号类型:" >
319 319
                         <el-select v-model="form.register" placeholder="请选择">
320 320
                             <el-option
321 321
                                     v-for="item in his_registers"
@@ -611,7 +611,6 @@
611 611
           name: [{ required: true, message: '患者姓名不能为空', trigger: 'blur' }],
612 612
           sex: [{ required: true, message: '患者性别不能为空', trigger: 'blur' }],
613 613
           idCard: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
614
-          register: [{ required: true, message: '请选择挂号类型', trigger: 'blur' }],
615 614
           doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
616 615
           department: [{ required: true, message: '请填写科室', trigger: 'blur' }],
617 616
           age: [{ required: true, message: '患者年龄不能为空', trigger: 'blur' }],
@@ -1121,12 +1120,6 @@
1121 1120
           this.$message.error('患者性别不能为空')
1122 1121
         }
1123 1122
 
1124
-        if (this.form.register == '') {
1125
-          this.$message.error('挂号类型不能为空');
1126
-          this.is_Name = true;
1127
-          return
1128
-        }
1129
-
1130 1123
         if (this.form.doctor == '') {
1131 1124
           this.$message.error('医生不能为空');
1132 1125
           this.is_Name = true;
@@ -1461,7 +1454,9 @@
1461 1454
         this.form.certificates = 2;
1462 1455
         this.form.id_card_type = 1
1463 1456
       }else{
1457
+        this.form.settlementValue = 1;
1464 1458
         this.form.registrationFee = 0;
1459
+        this.form.medicalExpenses = 0;
1465 1460
         this.form.certificates = 1;
1466 1461
         this.form.id_card_type = 2
1467 1462
       }