浏览代码

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

csx 4 年前
父节点
当前提交
b36d410cb7

+ 80 - 82
src/xt_pages/outpatientCharges/components/registerDialog.vue 查看文件

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

+ 28 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

204
                                     <ul class="basicUl">
204
                                     <ul class="basicUl">
205
                                         <li style="width:50%;">姓名:{{patientInfo.name}}</li>
205
                                         <li style="width:50%;">姓名:{{patientInfo.name}}</li>
206
                                         <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
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
                                         <li style="width:50%;">电话:{{patientInfo.phone}}</li>
208
                                         <li style="width:50%;">电话:{{patientInfo.phone}}</li>
209
 
209
 
210
                                         <!--<span>过敏病史:</span>-->
210
                                         <!--<span>过敏病史:</span>-->
372
 
372
 
373
 <script>
373
 <script>
374
   import axios from 'axios'
374
   import axios from 'axios'
375
-
375
+  import { jsGetAge, uParseTime } from '@/utils/tools'
376
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
376
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
377
   import noCharge from './components/noCharge'
377
   import noCharge from './components/noCharge'
378
   import charged from './components/charged'
378
   import charged from './components/charged'
524
       this.getPatientList()
524
       this.getPatientList()
525
     },
525
     },
526
     methods: {
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
       query() {
553
       query() {
528
         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 ) {
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
           var that = this;
555
           var that = this;

+ 3 - 8
src/xt_pages/outpatientRegistration/index.vue 查看文件

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