see999 3 years ago
parent
commit
4fe5164757

+ 8 - 0
src/api/project/project.js View File

533
     method:"post",
533
     method:"post",
534
     data:params
534
     data:params
535
   })
535
   })
536
+}
537
+
538
+export function getInvoice(params){
539
+  return request({
540
+    url:"/api/fapiao/get",
541
+    method:"get",
542
+    data:params
543
+  })
536
 }
544
 }

+ 10 - 2
src/xt_pages/data/components/addDrugs.vue View File

589
         this.$refs[formName].validate((valid) => {
589
         this.$refs[formName].validate((valid) => {
590
           console.log(valid)
590
           console.log(valid)
591
           if (valid) {
591
           if (valid) {
592
-            console.log(this.getValue())
592
+            console.log(1111,this.getValue())
593
             this.$emit('dialog-comfirm', this.getValue())
593
             this.$emit('dialog-comfirm', this.getValue())
594
           }
594
           }
595
         })
595
         })
603
       },
603
       },
604
       _close: function(done) {
604
       _close: function(done) {
605
         // this.clear()
605
         // this.clear()
606
-        done()
606
+        // done()
607
+        this.$confirm('是否保存')
608
+          .then(_ => {
609
+            this.comfirm('form')
610
+            // done();
611
+          })
612
+          .catch(_ => {
613
+            done()
614
+          });
607
       },
615
       },
608
       clear: function() {
616
       clear: function() {
609
         this.form.id = 0
617
         this.form.id = 0

+ 9 - 1
src/xt_pages/data/components/addProject.vue View File

315
     methods:{
315
     methods:{
316
         _close: function(done) {
316
         _close: function(done) {
317
             // this.clear()
317
             // this.clear()
318
-            done()
318
+            // done()
319
+            this.$confirm('是否保存')
320
+            .then(_ => {
321
+                this.submitAction('form')
322
+                // done();
323
+            })
324
+            .catch(_ => {
325
+                done()
326
+            });
319
         },
327
         },
320
         clear: function() {
328
         clear: function() {
321
             this.form.id = 0;
329
             this.form.id = 0;

+ 27 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

533
           >打印</el-button
533
           >打印</el-button
534
         >
534
         >
535
       </template>
535
       </template>
536
+      <template v-if="org_template_info.template_id == 38">
537
+        <el-button
538
+          :loading="loading"
539
+          size="small"
540
+          icon="el-icon-printer"
541
+          @click="printThisPage"
542
+          type="primary"
543
+          >打印</el-button
544
+        >
545
+      </template>
536
     </div>
546
     </div>
537
     <div class="app-container" style="min-height:0;">
547
     <div class="app-container" style="min-height:0;">
538
       <!--<div class="order-print-btn"-->
548
       <!--<div class="order-print-btn"-->
798
             v-if="org_template_info.template_id == 37"
808
             v-if="org_template_info.template_id == 37"
799
           >
809
           >
800
           </DialysisPrintOrderThirtySeven>
810
           </DialysisPrintOrderThirtySeven>
811
+          <DialysisPrintOrderThirtyEight
812
+            v-bind:childResponse="childResponse"
813
+            v-if="org_template_info.template_id == 38"
814
+          >
815
+          </DialysisPrintOrderThirtyEight>
801
         </div>
816
         </div>
802
       </el-container>
817
       </el-container>
803
     </div>
818
     </div>
854
 import DialysisPrintOrderThirtyFive from "./template/DialysisPrintOrderThirtyFive";
869
 import DialysisPrintOrderThirtyFive from "./template/DialysisPrintOrderThirtyFive";
855
 import DialysisPrintOrderThirtySix from "./template/DialysisPrintOrderThirtySix";
870
 import DialysisPrintOrderThirtySix from "./template/DialysisPrintOrderThirtySix";
856
 import DialysisPrintOrderThirtySeven from "./template/DialysisPrintOrderThirtySeven";
871
 import DialysisPrintOrderThirtySeven from "./template/DialysisPrintOrderThirtySeven";
872
+import DialysisPrintOrderThirtyEight from "./template/DialysisPrintOrderThirtyEight";
857
 export default {
873
 export default {
858
   name: "dialysisPrintOrder",
874
   name: "dialysisPrintOrder",
859
   components: {
875
   components: {
876
+    DialysisPrintOrderThirtyEight,
860
     DialysisPrintOrderThirtySeven,
877
     DialysisPrintOrderThirtySeven,
861
     DialysisPrintOrderThirtySix,
878
     DialysisPrintOrderThirtySix,
862
     DialysisPrintOrderThirtyFive,
879
     DialysisPrintOrderThirtyFive,
1069
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:16px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:16px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1086
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:16px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:16px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1070
       const style7 =
1087
       const style7 =
1071
         '@media print {.dialysis-print-order {width: 960px; margin: 0 auto;}.dialysis-print-order .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.dialysis-print-order .order-title {  margin: auto;  font-weight: 600;  text-align: center;  font-size: 22px;  padding: 10px 20px 0px 20px;}.dialysis-print-order .table-box {  width: 100%;  line-height: 18px;  font-size: 18px;}.dialysis-print-order .print-table {  width: 100%;  text-align: center;  border-collapse: collapse;  line-height: 28px;  font-size: 18px;}.dialysis-print-order .print-table-no {  width: 100%;  text-align: center;  border-collapse: collapse;  font-size: 14px;}.dialysis-print-order .under-line {  border-bottom: 1px solid #999;  width: 95%;  text-align: center;  margin-left: 2px;}.dialysis-print-order .title-box {  text-align: center;  font-size: 16px;}.dialysis-print-order .radio-lebel-box {  font-weight: 400;  cursor: pointer;}.dialysis-print-order .radio-no {  opacity: 0;  outline: none;  position: absolute;  margin: 0;  width: 0;  height: 0;  z-index: -1;}.dialysis-print-order .radio-inner {  white-space: nowrap;  cursor: pointer;  outline: none;  display: inline-block;  line-height: 1;  position: relative;  vertical-align: middle;}.dialysis-print-order .radio-fang {  display: inline-block;  position: relative;  border: 1px solid #000;  box-sizing: border-box;  width: 18px;  height: 18px;  background-color: #fff;  z-index: 1;  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);}.dialysis-print-order .is-checked-radio::after {  content: "√";  font-size: 19px;}.dialysis-print-order .print-table-no tr td {  padding: 8px 5px;  line-height: 25px;}.dialysis-print-order .print-table tr td {  padding: 1px 1px;  /*line-height: 25px;*/}.es-img {  height: 25px;}.advice-name {  text-align: left;}.advice-children {  display: flex;}.title-box-pro {  border: 0 #fff;  line-height: 25px;  height: 25px;  text-align: left;  padding-left: 10px !important;}.title-box-pro-tr {  border: 0 #fff;}.text-align-left {  text-align: left !important;  padding-left: 10px !important;  font-size: 14px !important;  line-height: 25px;}.print-table-tr-new td {line-height: 20px !important;}.border-top-solid {border: solid 1px #000;}.print-template-two tr {line-height: 30px;}}';
1088
         '@media print {.dialysis-print-order {width: 960px; margin: 0 auto;}.dialysis-print-order .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.dialysis-print-order .order-title {  margin: auto;  font-weight: 600;  text-align: center;  font-size: 22px;  padding: 10px 20px 0px 20px;}.dialysis-print-order .table-box {  width: 100%;  line-height: 18px;  font-size: 18px;}.dialysis-print-order .print-table {  width: 100%;  text-align: center;  border-collapse: collapse;  line-height: 28px;  font-size: 18px;}.dialysis-print-order .print-table-no {  width: 100%;  text-align: center;  border-collapse: collapse;  font-size: 14px;}.dialysis-print-order .under-line {  border-bottom: 1px solid #999;  width: 95%;  text-align: center;  margin-left: 2px;}.dialysis-print-order .title-box {  text-align: center;  font-size: 16px;}.dialysis-print-order .radio-lebel-box {  font-weight: 400;  cursor: pointer;}.dialysis-print-order .radio-no {  opacity: 0;  outline: none;  position: absolute;  margin: 0;  width: 0;  height: 0;  z-index: -1;}.dialysis-print-order .radio-inner {  white-space: nowrap;  cursor: pointer;  outline: none;  display: inline-block;  line-height: 1;  position: relative;  vertical-align: middle;}.dialysis-print-order .radio-fang {  display: inline-block;  position: relative;  border: 1px solid #000;  box-sizing: border-box;  width: 18px;  height: 18px;  background-color: #fff;  z-index: 1;  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);}.dialysis-print-order .is-checked-radio::after {  content: "√";  font-size: 19px;}.dialysis-print-order .print-table-no tr td {  padding: 8px 5px;  line-height: 25px;}.dialysis-print-order .print-table tr td {  padding: 1px 1px;  /*line-height: 25px;*/}.es-img {  height: 25px;}.advice-name {  text-align: left;}.advice-children {  display: flex;}.title-box-pro {  border: 0 #fff;  line-height: 25px;  height: 25px;  text-align: left;  padding-left: 10px !important;}.title-box-pro-tr {  border: 0 #fff;}.text-align-left {  text-align: left !important;  padding-left: 10px !important;  font-size: 14px !important;  line-height: 25px;}.print-table-tr-new td {line-height: 20px !important;}.border-top-solid {border: solid 1px #000;}.print-template-two tr {line-height: 30px;}}';
1089
+      const style8 =
1090
+        '@media print {.dialysis-print-order{width:960px;margin:0 auto;font-size:10px;}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:10px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.widthLength25{width: 25%;}.lineHeight{line-height: 20px;display: flex;justify-content: space-between;}';
1091
+
1072
 
1092
 
1073
       if (this.org_template_info.template_id == 1) {
1093
       if (this.org_template_info.template_id == 1) {
1074
         printJS({
1094
         printJS({
1315
           style: style,
1335
           style: style,
1316
           scanStyles: false
1336
           scanStyles: false
1317
         });
1337
         });
1338
+      } else if (this.org_template_info.template_id == 38) {
1339
+        printJS({
1340
+          printable: "dialysis-print-box",
1341
+          type: "html",
1342
+          style: style8,
1343
+          scanStyles: false
1344
+        });
1318
       }
1345
       }
1319
     },
1346
     },
1320
     printThisOnePage() {
1347
     printThisOnePage() {

File diff suppressed because it is too large
+ 1379 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyEight.vue


+ 4 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderThirtySeven.vue View File

187
                     <span style="display:inline-block;width:30%">
187
                     <span style="display:inline-block;width:30%">
188
                         医生签名:
188
                         医生签名:
189
                         <span>
189
                         <span>
190
-                            <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
191
-                            <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
190
+                            <span v-if="setAdminUserES(tableAdvice[0].advice_doctor) == ''">{{ getAdminUser(tableAdvice[0].advice_doctor) }}</span>
191
+                            <img class="es-img" style="height:30px;" :src="setAdminUserES(tableAdvice[0].advice_doctor)" alt="" srcset="" v-else />
192
                         </span>
192
                         </span>
193
                     </span>
193
                     </span>
194
                 </span>
194
                 </span>
415
             <div style="text-align:right;">
415
             <div style="text-align:right;">
416
                 医生签名:
416
                 医生签名:
417
                 <span style="display:inline-block;width:100px;text-align:left;">
417
                 <span style="display:inline-block;width:100px;text-align:left;">
418
-                    <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
419
-                    <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
418
+                    <span v-if="setAdminUserES(tableAdvice[0].advice_doctor) == ''">{{ getAdminUser(tableAdvice[0].advice_doctor) }}</span>
419
+                    <img class="es-img" style="height:30px;" :src="setAdminUserES(tableAdvice[0].advice_doctor)" alt="" srcset="" v-else />
420
                 </span>
420
                 </span>
421
                 护士签名:
421
                 护士签名:
422
                 <span style="display:inline-block;width:100px;text-align:left;">
422
                 <span style="display:inline-block;width:100px;text-align:left;">

+ 1 - 1
src/xt_pages/outpatientCharges/costComparison.vue View File

435
             clr_type: '11'
435
             clr_type: '11'
436
           }
436
           }
437
           var that = this
437
           var that = this
438
-          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) {
438
+          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 || this.$store.getters.xt_user.org_id == 9990 ) {
439
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
439
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
440
               params: params
440
               params: params
441
             })
441
             })

+ 152 - 0
src/xt_pages/outpatientCharges/invoicePrint.vue View File

1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+        >打印</el-button
12
+      >
13
+    </template>
14
+    <div class="app-container" style="padding-top:40px;">
15
+        <div class='dialysisPage'>
16
+            <printOne :paramsObj="invoiceParams"></printOne>
17
+        </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import printOne from './invoiceTemplate/printOne'
24
+export default {
25
+  name: "invoicePrint",
26
+  components: {
27
+    printOne
28
+  },
29
+  props:{
30
+    invoiceParams:Object
31
+  },
32
+  data() {
33
+    return {
34
+      childResponse: {},
35
+    //   invoiceParams:{}
36
+      
37
+
38
+    };
39
+  },
40
+  methods: {
41
+    getAdminUser(id) {
42
+      if (id == 0) {
43
+        return "";
44
+      }
45
+      if (id == undefined) {
46
+        return "";
47
+      }
48
+      for (let i = 0; i < this.adminUser.length; i++) {
49
+        if (this.adminUser[i].id == id) {
50
+          return this.adminUser[i].name;
51
+        }
52
+      }
53
+    },
54
+    getTime(value, temp) {
55
+      if (value == 0) {
56
+        return "";
57
+      }
58
+      if (value != undefined) {
59
+        return uParseTime(value, temp);
60
+      }
61
+      return "";
62
+    },
63
+    printThisPage() {
64
+
65
+      const style =
66
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
67
+        printJS({
68
+            printable: "invoice-print",
69
+            type: "html",
70
+            style: style,
71
+            scanStyles: false
72
+        });
73
+
74
+      // if (this.org_template_info.template_id == 1) {
75
+      //   printJS({
76
+      //     printable: "dialysis-print-box",
77
+      //     type: "html",
78
+      //     style: style,
79
+      //     scanStyles: false
80
+      //   });
81
+      // }
82
+    },
83
+  },
84
+  created() {
85
+      console.log('this.invoiceParams',this.invoiceParams)
86
+  },
87
+  watch:{
88
+    paramsObj:{//深度监听,可监听到对象、数组的变化
89
+      handler(val, oldVal){
90
+        this.invoiceParams = val
91
+        
92
+      },
93
+      deep:true
94
+    }
95
+  }
96
+};
97
+</script>
98
+
99
+<style lang="scss" scoped>
100
+.printTitle{
101
+    font-size: 22px;
102
+    text-align: center;
103
+    font-weight: bold;
104
+}
105
+.infoMain{
106
+    display: flex;
107
+    flex-wrap: wrap;
108
+    border-bottom: 2px solid #000;
109
+    padding:0 10px;
110
+}
111
+.infoMain .infoP{
112
+    width: 33%;
113
+    line-height: 24px;
114
+}
115
+.prescriptionBox{
116
+    padding:0 10px;
117
+    height:600px;
118
+}
119
+.Rp{
120
+    font-size: 22px;
121
+    font-weight: bold;
122
+}
123
+.drugsBox{
124
+    padding-left: 40px;
125
+    margin-bottom: 10px;
126
+}
127
+.drugsBox p{
128
+    line-height: 30px;
129
+}
130
+.drugsOne{
131
+    line-height: 24px;
132
+}
133
+.drugsOne span{
134
+    margin-right: 20px;
135
+}
136
+.doctorBox{
137
+    display: flex;
138
+    justify-content: space-between;
139
+    padding:0 10px;
140
+    line-height: 24px;
141
+    border-bottom: 2px solid #000;
142
+}
143
+.actionBar{
144
+    display: flex;
145
+    justify-content: space-between; 
146
+    line-height: 24px;
147
+    padding:0 10px;
148
+}
149
+.actionBar p{
150
+    width:150px;
151
+}
152
+</style>

+ 172 - 0
src/xt_pages/outpatientCharges/invoiceTemplate/printOne.vue View File

1
+<template>
2
+    <div id='invoice-print'>
3
+        <div style="display:flex;">
4
+            <div>业务流水号:{{ list.order_number }}</div>
5
+            <div>社会保障号:{{ list.id_card_no }}</div>
6
+        </div>
7
+        <div style="display:flex;justify-content: space-between;">
8
+            <div>科室:{{ list.department_name }}</div>
9
+            <div>门诊号:{{ list.number }}</div>
10
+            <div>医院类型:</div>
11
+            <div>
12
+                <span>{{ printDate.slice(0,4) }}</span>年
13
+                <span>{{ printDate.slice(5,7) }}</span>月
14
+                <span>{{ printDate.slice(8,11) }}</span>日
15
+            </div>
16
+        </div>
17
+        <div style="display:flex;justify-content: space-between;">
18
+            <div>姓名: {{ paramsObj.name }}</div>
19
+            <div>{{ list.pay_way }}</div>
20
+            <div>住院日期: {{ paramsObj.setl_time.split(' ')[0] }}</div>
21
+            <div>出院日期: {{ paramsObj.setl_time.split(' ')[0] }}</div>
22
+        </div>
23
+        <div style="display:flex;justify-content: space-between;">
24
+            <div>性别: {{ paramsObj.gend == 1 ? '男' : '女' }}</div>
25
+            <div>医保/公医记账:{{ totalPrice - list.psn_cash_money }}</div>
26
+            <div>个人缴费: {{ list.psn_cash_money }}</div>
27
+            <div>结算方式: {{ list.pay_way }}</div>
28
+        </div>
29
+        <div style="display:flex;justify-content: space-between;">
30
+            <div style="width:12.5%">西药</div>
31
+            <div style="width:12.5%">{{ list.westernMedicineCostTotal }}</div>
32
+            <div style="width:12.5%">检查费</div>
33
+            <div style="width:12.5%">{{ list.checkCostTotal }}</div>
34
+            <div style="width:12.5%">治疗费</div>
35
+            <div style="width:12.5%">{{ list.treatCostTotal }}</div>
36
+            <div style="width:12.5%">床位费</div>
37
+            <div style="width:12.5%">{{ list.bedCostTotal }}</div>
38
+        </div>
39
+        <div style="display:flex;justify-content: space-between;">
40
+            <div style="width:12.5%">中成药</div>
41
+            <div style="width:12.5%">{{ list.chineseTraditionalMedicineCostTotal }}</div>
42
+            <div style="width:12.5%">化验费</div>
43
+            <div style="width:12.5%">{{ list.laboratoryCostTotal }}</div>
44
+            <div style="width:12.5%">手术费</div>
45
+            <div style="width:12.5%">{{ list.operationCostTotal }}</div>
46
+            <div style="width:12.5%">其他费</div>
47
+            <div style="width:12.5%">{{ list.otherCostTotal }}</div>
48
+        </div>
49
+        <div style="display:flex;justify-content: space-between;">
50
+            <div style="width:12.5%"></div>
51
+            <div style="width:12.5%"></div>
52
+            <div style="width:12.5%"></div>
53
+            <div style="width:12.5%"></div>
54
+            <div style="width:12.5%">材料费</div>
55
+            <div style="width:12.5%">{{ list.materialCostTotal }}</div>
56
+            <div style="width:12.5%"></div>
57
+            <div style="width:12.5%"></div>
58
+        </div>
59
+        <div>
60
+            <span>
61
+                <span v-if="zhongwen.indexOf('万') > -1">
62
+                    {{ zhongwen.substring(zhongwen.indexOf('万'),-1) }}
63
+                </span>
64
+                <span v-else>零</span>
65
+            </span>
66
+            <span>
67
+                <span v-if="zhongwen.indexOf('仟') > -1">
68
+                    {{ zhongwen.substring(zhongwen.indexOf('仟'),-1) }}
69
+                </span>
70
+                <span v-else>零</span>
71
+            </span>
72
+            <span>
73
+                <span v-if="zhongwen.indexOf('佰') > -1">
74
+                    {{ zhongwen.substring(zhongwen.indexOf('佰') - 1,zhongwen.indexOf('佰')) }}
75
+                </span>
76
+                <span v-else>零</span>
77
+            </span>
78
+            <span>
79
+                <span v-if="zhongwen.indexOf('拾') > -1">
80
+                    {{ zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾')) }}
81
+                </span>
82
+                <span v-else>零</span>
83
+            </span>
84
+            <span>
85
+                <span v-if="zhongwen.indexOf('元') > -1">
86
+                    {{ zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) }}
87
+                </span>
88
+                <span v-else>零</span>
89
+            </span>
90
+            <span>
91
+                <span v-if="zhongwen.indexOf('角') > -1">
92
+                    {{ zhongwen.substring(zhongwen.indexOf('角') - 1,zhongwen.indexOf('角')) }}
93
+                </span>
94
+                <span v-else>零</span>
95
+            </span>
96
+            <span>
97
+                <span v-if="zhongwen.indexOf('分') > -1">
98
+                    {{ zhongwen.substring(zhongwen.indexOf('分') - 1,zhongwen.indexOf('分')) }}
99
+                </span>
100
+                <span v-else>零</span>
101
+            </span>
102
+            <span>{{ totalPrice }}</span>
103
+        </div>
104
+    </div>
105
+</template>
106
+
107
+
108
+<script>
109
+import { getInvoice } from '@/api/project/project'
110
+export default {
111
+    props:{
112
+        paramsObj:Object
113
+    },
114
+    data(){
115
+        return{
116
+            list:{},
117
+            printDate:'',
118
+            zhongwen:'',
119
+            totalPrice:0.0
120
+        }
121
+    },
122
+    created(){
123
+        console.log('paramsObj',this.paramsObj)
124
+        let params = {
125
+            order_id: this.paramsObj.order_id,
126
+            patient_id: this.paramsObj.patient_id,
127
+        }
128
+        this.getInvoice(params)
129
+        var data = new Date();
130
+        var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
131
+        var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
132
+        this.printDate = data.getFullYear() + "-" + month + "-" + date;
133
+        
134
+    },
135
+    methods:{
136
+        getInvoice(params){
137
+            getInvoice(params).then((res) => {
138
+                console.log('res',res)
139
+                this.list = res.data.data
140
+                this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
141
+                                    this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
142
+                this.smalltoBIG(this.totalPrice)
143
+            })
144
+        },
145
+        smalltoBIG(price) {
146
+            let fraction = ['角', '分'];
147
+            let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
148
+            let unit = [['元.', '万,', '亿,'], ['元', '拾', '佰', '仟']];
149
+            let head = price < 0 ? '欠' : '';
150
+            price = Math.abs(price);
151
+            let upper = '';
152
+            for (let i = 0; i < fraction.length; i++) {
153
+            upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
154
+            }
155
+            upper = upper || '整';
156
+            price = Math.floor(price);
157
+            for (let i = 0; i < unit[0].length && price > 0; i++) {
158
+            let p = '';
159
+            for (let j = 0; j < unit[1].length && price > 0; j++) {
160
+                p = digit[price % 10] + unit[1][j] + p;
161
+                price = Math.floor(price / 10);
162
+            }
163
+            upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
164
+            }
165
+            this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
166
+            console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
167
+    
168
+        },
169
+
170
+    }
171
+}
172
+</script>

+ 1 - 1
src/xt_pages/outpatientCharges/newStatementPrint.vue View File

152
 
152
 
153
       },
153
       },
154
       getInfo(order_id) {
154
       getInfo(order_id) {
155
-        if (this.$store.getters.xt_user.org_id == 3877 || 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 == 9671 ||  this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106) {
155
+        if (this.$store.getters.xt_user.org_id == 3877 || 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 == 9671 ||  this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
156
 
156
 
157
           var that = this
157
           var that = this
158
 
158
 

+ 9 - 9
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

133
                         </el-button>
133
                         </el-button>
134
 
134
 
135
                         <el-button
135
                         <el-button
136
-                                v-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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106"
136
+                                v-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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990"
137
                                 size="small" @click="open(10)" type="primary"
137
                                 size="small" @click="open(10)" type="primary"
138
                         >退号
138
                         >退号
139
                         </el-button>
139
                         </el-button>
140
 
140
 
141
                         <el-button
141
                         <el-button
142
-                        v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674   || this.$store.getters.xt_user.org_id == 10106"
142
+                        v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674   || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990"
143
                         size="small" @click="open(11)" type="primary"
143
                         size="small" @click="open(11)" type="primary"
144
                         >撤销明细
144
                         >撤销明细
145
                         </el-button>
145
                         </el-button>
525
     },
525
     },
526
     methods: {
526
     methods: {
527
       query() {
527
       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) {
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 ) {
529
           var that = this
529
           var that = this
530
           axios.get('http://127.0.0.1:9532/api/org/info', {
530
           axios.get('http://127.0.0.1:9532/api/org/info', {
531
             params: {}
531
             params: {}
643
 
643
 
644
             })
644
             })
645
 
645
 
646
-        } else 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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106) {
646
+        } else 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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990  ) {
647
           var that = this
647
           var that = this
648
           axios.get('http://127.0.0.1:9532/api/upload/get', {
648
           axios.get('http://127.0.0.1:9532/api/upload/get', {
649
             params: form,
649
             params: form,
870
 
870
 
871
             })
871
             })
872
 
872
 
873
-        } else 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 == 9671  || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106) {
873
+        } else 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 == 9671  || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
874
 
874
 
875
           axios.get('http://127.0.0.1:9532/api/register/get', {
875
           axios.get('http://127.0.0.1:9532/api/register/get', {
876
             params: forms,
876
             params: forms,
1495
           }
1495
           }
1496
 
1496
 
1497
         } else if (index == 5) {
1497
         } else if (index == 5) {
1498
-          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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106) {
1498
+          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 == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
1499
 
1499
 
1500
             var that = this
1500
             var that = this
1501
             this.$confirm('是否退费', '退费', {
1501
             this.$confirm('是否退费', '退费', {
1594
 
1594
 
1595
           var that = this
1595
           var that = this
1596
 
1596
 
1597
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1597
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1598
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
1598
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
1599
               params: params
1599
               params: params
1600
             })
1600
             })
1745
             })
1745
             })
1746
         } else if (index == 15) {
1746
         } else if (index == 15) {
1747
           var that = this
1747
           var that = this
1748
-          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) {
1748
+          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) {
1749
 
1749
 
1750
             if (this.diagnosis.length || this.diagnosis == 0) {
1750
             if (this.diagnosis.length || this.diagnosis == 0) {
1751
               that.$message.error('诊断不能为空,请选择诊断内容')
1751
               that.$message.error('诊断不能为空,请选择诊断内容')
1854
 
1854
 
1855
           }
1855
           }
1856
           this.loadingtwo = true
1856
           this.loadingtwo = true
1857
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1857
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
1858
             var that = this
1858
             var that = this
1859
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1859
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1860
               params: form
1860
               params: form

+ 8 - 3
src/xt_pages/outpatientCharges/statementPrint.vue View File

13
       </template>
13
       </template>
14
 
14
 
15
       <div class='dialysisPage' style="padding-top:40px;">
15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne :info="info"></printOne>
16
+        <printOne :info="info" v-if="org_id != 0"></printOne>
17
+        <printTwo  v-if="org_id == 0"></printTwo>
17
       </div>
18
       </div>
18
   </div>
19
   </div>
19
 </template>
20
 </template>
30
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
 import print from "print-js";
32
 import print from "print-js";
32
 import printOne from "./statementTemplate/printOne"
33
 import printOne from "./statementTemplate/printOne"
34
+import printTwo from "./statementTemplate/printTwo"
33
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
35
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
34
 export default {
36
 export default {
35
   name: "dialysisPrintOrder",
37
   name: "dialysisPrintOrder",
36
   components: {
38
   components: {
37
     BreadCrumb,
39
     BreadCrumb,
38
-    printOne
40
+    printOne,
41
+    printTwo
39
   },
42
   },
40
   props:{
43
   props:{
41
     paramsObj:Object
44
     paramsObj:Object
57
       prescription_id:0,
60
       prescription_id:0,
58
       ids:'',
61
       ids:'',
59
       info:null,
62
       info:null,
63
+      org_id:""
60
     };
64
     };
61
   },
65
   },
62
   methods:{
66
   methods:{
150
 
154
 
151
     },
155
     },
152
     getInfo(order_id) {
156
     getInfo(order_id) {
153
-      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4) {
157
+      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9990) {
154
 
158
 
155
         var that = this
159
         var that = this
156
 
160
 
222
 
226
 
223
   created() {
227
   created() {
224
     this.getInfo(this.paramsObj.order_id)
228
     this.getInfo(this.paramsObj.order_id)
229
+    this.org_id = this.$store.getters.xt_user.org_id
225
   },
230
   },
226
   watch:{
231
   watch:{
227
     paramsObj:{//深度监听,可监听到对象、数组的变化
232
     paramsObj:{//深度监听,可监听到对象、数组的变化

+ 129 - 0
src/xt_pages/outpatientCharges/statementTemplate/printTwo.vue View File

1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle">珠海市职工基本医疗保险门慢就医结算单</div>
4
+    <div style="display:flex">
5
+        <div style="width:70%">医疗机构名称:</div>
6
+        <div style="width:30%">医院等级:</div>
7
+    </div>
8
+    <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;padding-bottom:10px;">
9
+        <div style="flex:1;">单据编码:</div>
10
+        <div style="width:33%">就诊时间:</div>
11
+        <div>金额单位:</div>
12
+    </div>
13
+    <div style="display:flex">
14
+        <div style="width:50%">姓名:</div>
15
+        <div style="width:50%">个人电脑号: </div>
16
+    </div>
17
+    <div style="display:flex">
18
+        <div style="width:50%">社保卡号</div>
19
+        <div style="width:50%">诊断: </div>
20
+    </div>
21
+    <div style="display:flex">
22
+        <div style="width:50%">人员类别:</div>
23
+        <div style="width:50%">待遇类别: </div>
24
+    </div>
25
+    <div style="display:flex;padding:10px 0;border-top:1px solid #000;border-bottom:1px solid #000;">
26
+        <div style="width:50%;text-align:center;">项目名称</div>
27
+        <div style="width:10%;text-align:center;">单价</div>
28
+        <div style="width:10%;text-align:center;">数量</div>
29
+        <div style="width:10%;text-align:center;">金额</div>
30
+        <div style="width:10%;text-align:center;">门诊目录</div>
31
+        <div style="width:10%;text-align:center;">医保目录</div>
32
+    </div>
33
+    <div style="border-bottom:1px solid #000;padding:10px 0;display:flex;">
34
+        <div style="width:50%;text-align:center;">1</div>
35
+        <div style="width:10%;text-align:center;">2</div>
36
+        <div style="width:10%;text-align:center;">3</div>
37
+        <div style="width:10%;text-align:center;">4</div>
38
+        <div style="width:10%;text-align:center;">5</div>
39
+        <div style="width:10%;text-align:center;">6</div>
40
+    </div>
41
+    <div style="display:flex;border-bottom:1px solid #000;padding:20px 0 10px;">
42
+        <div style="width:70%;">合计:</div>
43
+        <div style="width:10%;text-align:center;">4</div>
44
+        <div style="width:20%;"></div>
45
+    </div>
46
+    <div>医保基金支付金额:</div>
47
+    <div>个人现金支付金额:</div>
48
+    <div>其中</div>
49
+    <div style="display:flex;border-bottom:1px solid #000;padding-bottom:10px;">
50
+        <div>个人自付:</div>
51
+        <div>其中:1.乙类自付    </div>
52
+        <div>2.自费    </div>
53
+    </div>
54
+    <div style="display:flex;padding-top:10px;">
55
+        <div style="width:33%">参保人签名:</div>
56
+        <div style="width:33%">审核人: </div>
57
+        <div style="width:33%">医院盖章: </div>
58
+    </div>
59
+    
60
+  </div>
61
+</template>
62
+<script>
63
+  export default {
64
+    props: {
65
+      info: {
66
+        type: Object,
67
+        default: function() {
68
+          return {}
69
+        }
70
+      }, p_admin: {
71
+        type: Object,
72
+        default: function() {
73
+          return {}
74
+        }
75
+      }, charge_admin: {
76
+        type: Object,
77
+        default: function() {
78
+          return {}
79
+        }
80
+      }
81
+    },methods:{
82
+      getNowTime: function () {
83
+        let dateTime
84
+        let yy = new Date().getFullYear()
85
+        let mm = new Date().getMonth() + 1
86
+        let dd = new Date().getDate()
87
+        let hh = new Date().getHours()
88
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
89
+          :
90
+          new Date().getMinutes()
91
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
92
+          :
93
+          new Date().getSeconds()
94
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
95
+        return dateTime
96
+      },
97
+
98
+    }
99
+  }
100
+
101
+
102
+</script>
103
+
104
+
105
+<style lang="scss" scoped>
106
+  .statement-print {
107
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
108
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
109
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
110
+    margin-bottom: 20px;
111
+    padding: 20px 10px;
112
+  }
113
+
114
+  .statementTitle {
115
+    font-size: 28px;
116
+    text-align: center;
117
+    font-weight: bold;
118
+    margin-bottom: 10px;
119
+  }
120
+
121
+  .statementTable {
122
+    width: 100%;
123
+    text-align: center;
124
+    border-collapse: collapse;
125
+    line-height: 40px;
126
+    font-size: 14px;
127
+    border-color: #000;
128
+  }
129
+</style>

+ 3 - 25
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

360
                 </div>
360
                 </div>
361
               </el-tab-pane>
361
               </el-tab-pane>
362
               <el-tab-pane label="项目组套" name="2">
362
               <el-tab-pane label="项目组套" name="2">
363
-                <el-input style="width:100%;" @input="searchProjectList" @keyup.enter.native='searchProjectList'
364
-                            v-model.trim="project_item_keyword"
365
-                            placeholder="请输入项目组套名称"></el-input>
366
                 <div style="width: 100%;flex:1;overflow-y: auto;">
363
                 <div style="width: 100%;flex:1;overflow-y: auto;">
367
                   <el-table :data="tabPrjectTeam" border
364
                   <el-table :data="tabPrjectTeam" border
368
                             :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
365
                             :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
576
             }
573
             }
577
           }
574
           }
578
         },
575
         },
579
-        hisList:[],
580
-        project_item_keyword:"",
581
-        projectList:[] 
576
+        hisList:[]
577
+
582
       }
578
       }
583
     },
579
     },
584
     methods: {
580
     methods: {
1397
         }
1393
         }
1398
         this.$refs.additionalCharges.hide()
1394
         this.$refs.additionalCharges.hide()
1399
 
1395
 
1400
-      }, 
1401
-      searchProjectAction() {
1396
+      }, searchProjectAction() {
1402
 
1397
 
1403
         if (this.search_project_keyword.length == 0) {
1398
         if (this.search_project_keyword.length == 0) {
1404
           this.tabProject = this.allProject
1399
           this.tabProject = this.allProject
1415
         }
1410
         }
1416
 
1411
 
1417
       },
1412
       },
1418
-      searchProjectList(){
1419
-         if(this.project_item_keyword.length == 0){
1420
-             this.tabPrjectTeam = this.projectList
1421
-         }else{
1422
-           let arr = []
1423
-           for(let i=0;i<this.projectList.length;i++){
1424
-              if(this.projectList[i].project_team.indexOf(this.project_item_keyword)!=-1){
1425
-                 arr = arr.concat(this.projectList[i])
1426
-              }
1427
-           }
1428
-           this.tabPrjectTeam = arr
1429
-         }
1430
-      },
1431
-
1432
       searchAction() {
1413
       searchAction() {
1433
         if (this.search_keyword.length == 0) {
1414
         if (this.search_keyword.length == 0) {
1434
           this.drugs = this.allDrugs
1415
           this.drugs = this.allDrugs
1951
               'prescriptions': this.prescriptions
1932
               'prescriptions': this.prescriptions
1952
             }
1933
             }
1953
             isLoading = true
1934
             isLoading = true
1954
-           
1955
-            
1956
             createHisPrescription(data, params).then(response => {
1935
             createHisPrescription(data, params).then(response => {
1957
               if (response.data.state == 1) {
1936
               if (response.data.state == 1) {
1958
                 this.$emit('change')
1937
                 this.$emit('change')
2485
             var team = response.data.data.team
2464
             var team = response.data.data.team
2486
             console.log("team2222",team)
2465
             console.log("team2222",team)
2487
             this.tabPrjectTeam = team
2466
             this.tabPrjectTeam = team
2488
-            this.projectList = team
2489
           }
2467
           }
2490
         })
2468
         })
2491
       },
2469
       },

+ 26 - 17
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

316
         allergic_history:"",
316
         allergic_history:"",
317
         form:{
317
         form:{
318
           id:0,
318
           id:0,
319
-        }
319
+        },
320
+        watchSign:0
320
       }
321
       }
321
     },
322
     },
322
     methods: {
323
     methods: {
330
 
331
 
331
 
332
 
332
       // },
333
       // },
333
-      createCaseHistory() {
334
+      createCaseHistory(id) {
334
           if(this.patientInfo.id == undefined){
335
           if(this.patientInfo.id == undefined){
335
             this.$message.error("请先选择病人")
336
             this.$message.error("请先选择病人")
336
             return
337
             return
344
           let params = {
345
           let params = {
345
             "his_patient_id":this.hisPatientInfo.id,
346
             "his_patient_id":this.hisPatientInfo.id,
346
             "delivery_way":this.delivery_way?"":0,
347
             "delivery_way":this.delivery_way?"":0,
347
-            "patient_id":this.patientInfo.id,
348
+            "patient_id":id ? id : this.patientInfo.id,
348
             "temperature":this.case_history.temperature,
349
             "temperature":this.case_history.temperature,
349
             "blood_sugar":this.case_history.blood_sugar,
350
             "blood_sugar":this.case_history.blood_sugar,
350
             "pulse":this.case_history.pulse,
351
             "pulse":this.case_history.pulse,
375
           createCaseHistory(params).then(response => {
376
           createCaseHistory(params).then(response => {
376
             if (response.data.state == 0) {
377
             if (response.data.state == 0) {
377
               this.$message.error("患者病历已存在")
378
               this.$message.error("患者病历已存在")
379
+              this.watchSign = 0
378
               return false
380
               return false
379
             } else {
381
             } else {
380
               var caseHistory = response.data.data.caseHistory
382
               var caseHistory = response.data.data.caseHistory
382
               this.$message.success("保存成功")
384
               this.$message.success("保存成功")
383
               this.doctor_advice = ""
385
               this.doctor_advice = ""
384
               this.remark = ""
386
               this.remark = ""
387
+              this.watchSign = 0
385
             }
388
             }
386
           })
389
           })
387
 
390
 
562
         immediate: true,
565
         immediate: true,
563
         deep: true
566
         deep: true
564
       },
567
       },
565
-      case_history:function(val){
566
-        console.log("南京人明",this.case_history)
567
-        if(this.case_history.breathing == 0){
568
-           this.case_history.breathing = ""
569
-        }
570
-        if(this.case_history.sick == 0){
571
-          this.case_history.sick = ""
572
-        }
573
-        if(this.case_history.diagnose == 0){
574
-           this.case_history.diagnose = ""
575
-        }
576
-        this.form.id = this.case_history.id
577
-        this.allergic_history = this.case_history.allergic_history
578
-        
568
+      case_history:{
569
+        handler(val){
570
+          console.log("南京人明",this.case_history)
571
+          if(this.case_history.breathing == 0){
572
+            this.case_history.breathing = ""
573
+          }
574
+          if(this.case_history.sick == 0){
575
+            this.case_history.sick = ""
576
+          }
577
+          if(this.case_history.diagnose == 0){
578
+            this.case_history.diagnose = ""
579
+          }
580
+          this.form.id = this.case_history.id
581
+          this.allergic_history = this.case_history.allergic_history
582
+          this.watchSign++
583
+        },
584
+        deep:true
585
+      },
586
+      allergic_history:function(){
587
+        this.watchSign++
579
       }
588
       }
580
     }
589
     }
581
   }
590
   }

+ 19 - 0
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

204
         input: 1,
204
         input: 1,
205
       }
205
       }
206
     },
206
     },
207
+    
207
    methods:{
208
    methods:{
208
      createFilter(queryString) {
209
      createFilter(queryString) {
209
        return (restaurant) => {
210
        return (restaurant) => {
380
       this.getInitData()
381
       this.getInitData()
381
      
382
      
382
     },
383
     },
384
+    watch:{
385
+      "prescription.advices":{
386
+        handler(newVal,oldVal){
387
+          newVal.map(item => {
388
+            item.prescribing_number = item.single_dose * item.day
389
+          })
390
+        },
391
+        deep:true
392
+      },
393
+      "prescription.project":{
394
+        handler(newVal,oldVal){
395
+          newVal.map(item => {
396
+            item.total = item.single_dose * item.number_days
397
+          })
398
+        },
399
+        deep:true
400
+      }
401
+    }
383
     
402
     
384
   }
403
   }
385
 </script>
404
 </script>

+ 521 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

903
       },
903
       },
904
 
904
 
905
       choosePatient(val) {
905
       choosePatient(val) {
906
+        console.log(val)
907
+        if(this.titleType == '电子病历'){
908
+          console.log('this.$refs.child.watchSign',this.$refs.child.watchSign)
909
+          if(this.$refs.child.watchSign > 2){
910
+            this.$confirm('是否保存当前病例', '保存', {
911
+              confirmButtonText: '确 定',
912
+              cancelButtonText: '取 消',
913
+              type: 'warning'
914
+            }).then(() => {
915
+              
916
+              this.$refs.child.createCaseHistory(this.newPatientId)
917
+              this.patientid = val.id
918
+              
919
+              let params = {
920
+                'record_date': this.record_date,
921
+                'patient_id': val.id,
922
+                'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
923
+                'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
924
+              }
925
+              getPatientInfo(params).then(response => {
926
+                if (response.data.state == 0) {
927
+                  this.$message.error(response.data.msg)
928
+                  return false
929
+                } else {
930
+                  this.prescriptions = []
931
+
932
+                  this.month_prescriptions = []
933
+
934
+                  var month_prescriptions = response.data.data.month_prescriptions
935
+                  this.setMonthPrescription(month_prescriptions)
936
+
937
+
938
+                  this.patientInfo = response.data.data.xt_info
939
+                  this.hisPatientInfo = response.data.data.his_info
940
+                  this.case_history = response.data.data.case_history
941
+                  console.log("数据是22222多少",this.case_history)
942
+                  this.info = response.data.data.info
943
+                  this.doctors = response.data.data.doctors
944
+                  this.department = response.data.data.department
945
+
946
+                  for (let i = 0; i < this.doctors.length; i++){
947
+                    if(this.doctors[i].user_type == 1){
948
+                      this.doctors.splice(i,1)
949
+                    }
950
+                  }
951
+                  this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
952
+                  if (this.case_history.breathing <= 0) {
953
+                    this.case_history.breathing = ""
954
+                  }
955
+                  if (this.case_history.sick <= 0) {
956
+                    this.case_history.sick = ""
957
+                  }
958
+                  if (this.case_history.diagnose <= 0) {
959
+                    this.case_history.diagnose = ""
960
+                  }
961
+
962
+                  if (this.case_history.temperature <= 0) {
963
+                    this.case_history.temperature = ''
964
+                  }
965
+                  if (this.case_history.blood_sugar <= 0) {
966
+                    this.case_history.blood_sugar = ''
967
+                  }
968
+                  if (this.case_history.pulse <= 0) {
969
+                    this.case_history.pulse = ''
970
+                  }
971
+                  if (this.case_history.sbp <= 0) {
972
+                    this.case_history.sbp = ''
973
+                  }
974
+                  if (this.case_history.dbp <= 0) {
975
+                    this.case_history.dbp = ''
976
+                  }
977
+                  if (this.case_history.height <= 0) {
978
+                    this.case_history.height = ''
979
+                  }
980
+                  if (this.case_history.blood_fat <= 0) {
981
+                    this.case_history.blood_fat = ''
982
+                  }
983
+                  if (this.case_history.sick_type <= 0) {
984
+                    this.case_history.sick_type = ''
985
+                  }
986
+                  this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
987
+                  if (this.case_history.is_infect == 1) {
988
+                    this.case_history.is_infect = true
989
+                  } else {
990
+                    this.case_history.is_infect = false
991
+                  }
992
+                  this.prescriptionList = response.data.data.prescription
993
+                  if (response.data.data.prescription.length > 0) {
994
+                    for (let i = 0; i < response.data.data.prescription.length; i++) {
995
+                      var prescription = response.data.data.prescription[i]
996
+                      let tempAdvice = []
997
+                      let tempProject = []
998
+                      let tempAddition = []
999
+                      for (let b = 0; b < prescription.advices.length; b++) {
1000
+                        let obj = {
1001
+                          advice_id: prescription.advices[b].id,
1002
+                          drug_name: prescription.advices[b].advice_name,
1003
+                          single_dose: prescription.advices[b].single_dose,
1004
+                          delivery_way: prescription.advices[b].delivery_way,
1005
+                          execution_frequency: prescription.advices[b].execution_frequency,
1006
+                          retail_price: prescription.advices[b].price.toString(),
1007
+                          remark: prescription.advices[b].remark,
1008
+                          day: prescription.advices[b].day,
1009
+                          prescribing_number: prescription.advices[b].prescribing_number.toString(),
1010
+                          single_dose_unit: prescription.advices[b].single_dose_unit,
1011
+                          prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1012
+                          medical_insurance_number: prescription.advices[b].med_list_codg,
1013
+                          id: prescription.advices[b].drug_id
1014
+                        }
1015
+                        tempAdvice.push(obj)
1016
+                      }
1017
+                      for (let b = 0; b < prescription.project.length; b++) {
1018
+                        let obj = {
1019
+                          id: prescription.project[b].id,
1020
+                          project_id: prescription.project[b].project_id,
1021
+                          project_name: prescription.project[b].project.project_name,
1022
+                          statistical_classification: prescription.project[b].project.statistical_classification,
1023
+                          single_dose: prescription.project[b].single_dose,
1024
+                          delivery_way: prescription.project[b].delivery_way,
1025
+                          execution_frequency: prescription.project[b].execution_frequency,
1026
+                          number_days: prescription.project[b].day,
1027
+                          total: prescription.project[b].count.toString(),
1028
+                          price: prescription.project[b].price,
1029
+                          remark: prescription.project[b].remark,
1030
+                          medical_code: prescription.project[b].project.medical_code,
1031
+                          unit: prescription.project[b].unit
1032
+                        }
1033
+                        tempProject.push(obj)
1034
+                      }
1035
+                      for (let b = 0; b < prescription.addition.length; b++) {
1036
+                        let obj = {
1037
+                          id: prescription.addition[b].id,
1038
+                          item_name: prescription.addition[b].item_name,
1039
+                          price: prescription.addition[b].price,
1040
+                          count: prescription.addition[b].count,
1041
+                          item_id: prescription.addition[b].item_id,
1042
+                        }
1043
+                        tempAddition.push(obj)
1044
+                      }
1045
+
1046
+                      var preTime = ""
1047
+
1048
+                      if (prescription.pre_time == 0) {
1049
+                        preTime = nowTime
1050
+                      } else {
1051
+                        preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1052
+                      }
1053
+
1054
+                      let index = i + 1
1055
+                      let obj = {
1056
+                        id: prescription.id,
1057
+                        name: '处方' + index,
1058
+                        advices: tempAdvice,
1059
+                        project: tempProject,
1060
+                        addition: tempAddition,
1061
+                        order_status: prescription.order_status,
1062
+                        pre_time: preTime
1063
+                      }
1064
+                      this.prescriptions.push(obj)
1065
+                    }
1066
+                  } else {
1067
+                    let obj = {
1068
+                      id: 0,
1069
+                      name: '处方' + 1,
1070
+                      advices: [],
1071
+                      project: [],
1072
+                      addition: [],
1073
+                      orderStatus: 0,
1074
+                      pre_time: nowTime,
1075
+                    }
1076
+                    this.prescriptions.push(obj)
1077
+                  }
1078
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
1079
+                  this.$refs.child.watchSign = 0
1080
+                }
1081
+              })
1082
+              this.$refs.child.watchSign = 0
1083
+            }).catch(() => {
1084
+              
1085
+              this.patientid = val.id
1086
+              let params = {
1087
+                'record_date': this.record_date,
1088
+                'patient_id': val.id,
1089
+                'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
1090
+                'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
1091
+              }
1092
+              getPatientInfo(params).then(response => {
1093
+                if (response.data.state == 0) {
1094
+                  this.$message.error(response.data.msg)
1095
+                  return false
1096
+                } else {
1097
+                  this.prescriptions = []
1098
+
1099
+                  this.month_prescriptions = []
1100
+
1101
+                  var month_prescriptions = response.data.data.month_prescriptions
1102
+                  this.setMonthPrescription(month_prescriptions)
1103
+
1104
+
1105
+                  this.patientInfo = response.data.data.xt_info
1106
+                  this.hisPatientInfo = response.data.data.his_info
1107
+                  this.case_history = response.data.data.case_history
1108
+                  console.log("数据是22222多少",this.case_history)
1109
+                  this.info = response.data.data.info
1110
+                  this.doctors = response.data.data.doctors
1111
+                  this.department = response.data.data.department
1112
+
1113
+                  for (let i = 0; i < this.doctors.length; i++){
1114
+                    if(this.doctors[i].user_type == 1){
1115
+                      this.doctors.splice(i,1)
1116
+                    }
1117
+                  }
1118
+                  this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1119
+                  if (this.case_history.breathing <= 0) {
1120
+                    this.case_history.breathing = ""
1121
+                  }
1122
+                  if (this.case_history.sick <= 0) {
1123
+                    this.case_history.sick = ""
1124
+                  }
1125
+                  if (this.case_history.diagnose <= 0) {
1126
+                    this.case_history.diagnose = ""
1127
+                  }
1128
+
1129
+                  if (this.case_history.temperature <= 0) {
1130
+                    this.case_history.temperature = ''
1131
+                  }
1132
+                  if (this.case_history.blood_sugar <= 0) {
1133
+                    this.case_history.blood_sugar = ''
1134
+                  }
1135
+                  if (this.case_history.pulse <= 0) {
1136
+                    this.case_history.pulse = ''
1137
+                  }
1138
+                  if (this.case_history.sbp <= 0) {
1139
+                    this.case_history.sbp = ''
1140
+                  }
1141
+                  if (this.case_history.dbp <= 0) {
1142
+                    this.case_history.dbp = ''
1143
+                  }
1144
+                  if (this.case_history.height <= 0) {
1145
+                    this.case_history.height = ''
1146
+                  }
1147
+                  if (this.case_history.blood_fat <= 0) {
1148
+                    this.case_history.blood_fat = ''
1149
+                  }
1150
+                  if (this.case_history.sick_type <= 0) {
1151
+                    this.case_history.sick_type = ''
1152
+                  }
1153
+                  this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
1154
+                  if (this.case_history.is_infect == 1) {
1155
+                    this.case_history.is_infect = true
1156
+                  } else {
1157
+                    this.case_history.is_infect = false
1158
+                  }
1159
+                  this.prescriptionList = response.data.data.prescription
1160
+                  if (response.data.data.prescription.length > 0) {
1161
+                    for (let i = 0; i < response.data.data.prescription.length; i++) {
1162
+                      var prescription = response.data.data.prescription[i]
1163
+                      let tempAdvice = []
1164
+                      let tempProject = []
1165
+                      let tempAddition = []
1166
+                      for (let b = 0; b < prescription.advices.length; b++) {
1167
+                        let obj = {
1168
+                          advice_id: prescription.advices[b].id,
1169
+                          drug_name: prescription.advices[b].advice_name,
1170
+                          single_dose: prescription.advices[b].single_dose,
1171
+                          delivery_way: prescription.advices[b].delivery_way,
1172
+                          execution_frequency: prescription.advices[b].execution_frequency,
1173
+                          retail_price: prescription.advices[b].price.toString(),
1174
+                          remark: prescription.advices[b].remark,
1175
+                          day: prescription.advices[b].day,
1176
+                          prescribing_number: prescription.advices[b].prescribing_number.toString(),
1177
+                          single_dose_unit: prescription.advices[b].single_dose_unit,
1178
+                          prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1179
+                          medical_insurance_number: prescription.advices[b].med_list_codg,
1180
+                          id: prescription.advices[b].drug_id
1181
+                        }
1182
+                        tempAdvice.push(obj)
1183
+                      }
1184
+                      for (let b = 0; b < prescription.project.length; b++) {
1185
+                        let obj = {
1186
+                          id: prescription.project[b].id,
1187
+                          project_id: prescription.project[b].project_id,
1188
+                          project_name: prescription.project[b].project.project_name,
1189
+                          statistical_classification: prescription.project[b].project.statistical_classification,
1190
+                          single_dose: prescription.project[b].single_dose,
1191
+                          delivery_way: prescription.project[b].delivery_way,
1192
+                          execution_frequency: prescription.project[b].execution_frequency,
1193
+                          number_days: prescription.project[b].day,
1194
+                          total: prescription.project[b].count.toString(),
1195
+                          price: prescription.project[b].price,
1196
+                          remark: prescription.project[b].remark,
1197
+                          medical_code: prescription.project[b].project.medical_code,
1198
+                          unit: prescription.project[b].unit
1199
+                        }
1200
+                        tempProject.push(obj)
1201
+                      }
1202
+                      for (let b = 0; b < prescription.addition.length; b++) {
1203
+                        let obj = {
1204
+                          id: prescription.addition[b].id,
1205
+                          item_name: prescription.addition[b].item_name,
1206
+                          price: prescription.addition[b].price,
1207
+                          count: prescription.addition[b].count,
1208
+                          item_id: prescription.addition[b].item_id,
1209
+                        }
1210
+                        tempAddition.push(obj)
1211
+                      }
1212
+
1213
+                      var preTime = ""
1214
+
1215
+                      if (prescription.pre_time == 0) {
1216
+                        preTime = nowTime
1217
+                      } else {
1218
+                        preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1219
+                      }
1220
+
1221
+                      let index = i + 1
1222
+                      let obj = {
1223
+                        id: prescription.id,
1224
+                        name: '处方' + index,
1225
+                        advices: tempAdvice,
1226
+                        project: tempProject,
1227
+                        addition: tempAddition,
1228
+                        order_status: prescription.order_status,
1229
+                        pre_time: preTime
1230
+                      }
1231
+                      this.prescriptions.push(obj)
1232
+                    }
1233
+                  } else {
1234
+                    let obj = {
1235
+                      id: 0,
1236
+                      name: '处方' + 1,
1237
+                      advices: [],
1238
+                      project: [],
1239
+                      addition: [],
1240
+                      orderStatus: 0,
1241
+                      pre_time: nowTime,
1242
+                    }
1243
+                    this.prescriptions.push(obj)
1244
+                  }
1245
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
1246
+                  this.$refs.child.watchSign = 0
1247
+                }
1248
+              })
1249
+              
1250
+            })
1251
+            this.$refs.child.watchSign = 0
1252
+          }else{
1253
+            this.patientid = val.id
1254
+            let params = {
1255
+              'record_date': this.record_date,
1256
+              'patient_id': val.id,
1257
+              'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
1258
+              'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
1259
+            }
1260
+            getPatientInfo(params).then(response => {
1261
+                if (response.data.state == 0) {
1262
+                  this.$message.error(response.data.msg)
1263
+                  return false
1264
+                } else {
1265
+                  this.prescriptions = []
1266
+
1267
+                  this.month_prescriptions = []
1268
+
1269
+                  var month_prescriptions = response.data.data.month_prescriptions
1270
+                  this.setMonthPrescription(month_prescriptions)
1271
+
1272
+
1273
+                  this.patientInfo = response.data.data.xt_info
1274
+                  this.hisPatientInfo = response.data.data.his_info
1275
+                  this.case_history = response.data.data.case_history
1276
+                  console.log("数据是22222多少",this.case_history)
1277
+                  this.info = response.data.data.info
1278
+                  this.doctors = response.data.data.doctors
1279
+                  this.department = response.data.data.department
1280
+
1281
+                  for (let i = 0; i < this.doctors.length; i++){
1282
+                    if(this.doctors[i].user_type == 1){
1283
+                      this.doctors.splice(i,1)
1284
+                    }
1285
+                  }
1286
+                  this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1287
+                  if (this.case_history.breathing <= 0) {
1288
+                    this.case_history.breathing = ""
1289
+                  }
1290
+                  if (this.case_history.sick <= 0) {
1291
+                    this.case_history.sick = ""
1292
+                  }
1293
+                  if (this.case_history.diagnose <= 0) {
1294
+                    this.case_history.diagnose = ""
1295
+                  }
1296
+
1297
+                  if (this.case_history.temperature <= 0) {
1298
+                    this.case_history.temperature = ''
1299
+                  }
1300
+                  if (this.case_history.blood_sugar <= 0) {
1301
+                    this.case_history.blood_sugar = ''
1302
+                  }
1303
+                  if (this.case_history.pulse <= 0) {
1304
+                    this.case_history.pulse = ''
1305
+                  }
1306
+                  if (this.case_history.sbp <= 0) {
1307
+                    this.case_history.sbp = ''
1308
+                  }
1309
+                  if (this.case_history.dbp <= 0) {
1310
+                    this.case_history.dbp = ''
1311
+                  }
1312
+                  if (this.case_history.height <= 0) {
1313
+                    this.case_history.height = ''
1314
+                  }
1315
+                  if (this.case_history.blood_fat <= 0) {
1316
+                    this.case_history.blood_fat = ''
1317
+                  }
1318
+                  if (this.case_history.sick_type <= 0) {
1319
+                    this.case_history.sick_type = ''
1320
+                  }
1321
+                  this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
1322
+                  if (this.case_history.is_infect == 1) {
1323
+                    this.case_history.is_infect = true
1324
+                  } else {
1325
+                    this.case_history.is_infect = false
1326
+                  }
1327
+                  this.prescriptionList = response.data.data.prescription
1328
+                  if (response.data.data.prescription.length > 0) {
1329
+                    for (let i = 0; i < response.data.data.prescription.length; i++) {
1330
+                      var prescription = response.data.data.prescription[i]
1331
+                      let tempAdvice = []
1332
+                      let tempProject = []
1333
+                      let tempAddition = []
1334
+                      for (let b = 0; b < prescription.advices.length; b++) {
1335
+                        let obj = {
1336
+                          advice_id: prescription.advices[b].id,
1337
+                          drug_name: prescription.advices[b].advice_name,
1338
+                          single_dose: prescription.advices[b].single_dose,
1339
+                          delivery_way: prescription.advices[b].delivery_way,
1340
+                          execution_frequency: prescription.advices[b].execution_frequency,
1341
+                          retail_price: prescription.advices[b].price.toString(),
1342
+                          remark: prescription.advices[b].remark,
1343
+                          day: prescription.advices[b].day,
1344
+                          prescribing_number: prescription.advices[b].prescribing_number.toString(),
1345
+                          single_dose_unit: prescription.advices[b].single_dose_unit,
1346
+                          prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1347
+                          medical_insurance_number: prescription.advices[b].med_list_codg,
1348
+                          id: prescription.advices[b].drug_id
1349
+                        }
1350
+                        tempAdvice.push(obj)
1351
+                      }
1352
+                      for (let b = 0; b < prescription.project.length; b++) {
1353
+                        let obj = {
1354
+                          id: prescription.project[b].id,
1355
+                          project_id: prescription.project[b].project_id,
1356
+                          project_name: prescription.project[b].project.project_name,
1357
+                          statistical_classification: prescription.project[b].project.statistical_classification,
1358
+                          single_dose: prescription.project[b].single_dose,
1359
+                          delivery_way: prescription.project[b].delivery_way,
1360
+                          execution_frequency: prescription.project[b].execution_frequency,
1361
+                          number_days: prescription.project[b].day,
1362
+                          total: prescription.project[b].count.toString(),
1363
+                          price: prescription.project[b].price,
1364
+                          remark: prescription.project[b].remark,
1365
+                          medical_code: prescription.project[b].project.medical_code,
1366
+                          unit: prescription.project[b].unit
1367
+                        }
1368
+                        tempProject.push(obj)
1369
+                      }
1370
+                      for (let b = 0; b < prescription.addition.length; b++) {
1371
+                        let obj = {
1372
+                          id: prescription.addition[b].id,
1373
+                          item_name: prescription.addition[b].item_name,
1374
+                          price: prescription.addition[b].price,
1375
+                          count: prescription.addition[b].count,
1376
+                          item_id: prescription.addition[b].item_id,
1377
+                        }
1378
+                        tempAddition.push(obj)
1379
+                      }
906
 
1380
 
1381
+                      var preTime = ""
1382
+
1383
+                      if (prescription.pre_time == 0) {
1384
+                        preTime = nowTime
1385
+                      } else {
1386
+                        preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1387
+                      }
1388
+
1389
+                      let index = i + 1
1390
+                      let obj = {
1391
+                        id: prescription.id,
1392
+                        name: '处方' + index,
1393
+                        advices: tempAdvice,
1394
+                        project: tempProject,
1395
+                        addition: tempAddition,
1396
+                        order_status: prescription.order_status,
1397
+                        pre_time: preTime
1398
+                      }
1399
+                      this.prescriptions.push(obj)
1400
+                    }
1401
+                  } else {
1402
+                    let obj = {
1403
+                      id: 0,
1404
+                      name: '处方' + 1,
1405
+                      advices: [],
1406
+                      project: [],
1407
+                      addition: [],
1408
+                      orderStatus: 0,
1409
+                      pre_time: nowTime,
1410
+                    }
1411
+                    this.prescriptions.push(obj)
1412
+                  }
1413
+                  this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
1414
+                  this.$refs.child.watchSign = 0
1415
+                }
1416
+              })
1417
+            this.$refs.child.watchSign = 0
1418
+          }
1419
+        }else{
907
         var nowDate = new Date()
1420
         var nowDate = new Date()
908
         var nowYear = nowDate.getFullYear()
1421
         var nowYear = nowDate.getFullYear()
909
         var nowMonth = nowDate.getMonth() + 1
1422
         var nowMonth = nowDate.getMonth() + 1
1296
 
1809
 
1297
 
1810
 
1298
         }
1811
         }
1812
+        }
1813
+        
1299
 
1814
 
1300
 
1815
 
1816
+      
1817
+      
1301
       },
1818
       },
1302
       currentChange(currentRow, oldCurrentRow) {
1819
       currentChange(currentRow, oldCurrentRow) {
1303
-
1820
+        this.newPatientId = oldCurrentRow.id
1821
+        console.log('执行',this.newPatientId)
1304
         let isShowDailog = false
1822
         let isShowDailog = false
1305
         for (let i = 0; i < this.prescriptions.length; i++) {
1823
         for (let i = 0; i < this.prescriptions.length; i++) {
1306
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
1824
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
1311
           this.oldCurrentRow = currentRow
1829
           this.oldCurrentRow = currentRow
1312
           return
1830
           return
1313
         }
1831
         }
1314
-
1832
+        
1833
+        
1315
 
1834
 
1316
       }, open_two() {
1835
       }, open_two() {
1317
         this.$refs.prescriptions.open_two()
1836
         this.$refs.prescriptions.open_two()

+ 2 - 2
src/xt_pages/outpatientRegistration/index.vue View File

1000
                 .catch(function(error) {
1000
                 .catch(function(error) {
1001
 
1001
 
1002
                 })
1002
                 })
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) {
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 || this.$store.getters.xt_user.org_id == 9990) {
1004
               var that = this
1004
               var that = this
1005
 
1005
 
1006
               axios.get('http://127.0.0.1:9532/api/register/get', {
1006
               axios.get('http://127.0.0.1:9532/api/register/get', {
1259
                 .catch(function(error) {
1259
                 .catch(function(error) {
1260
 
1260
 
1261
                 })
1261
                 })
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) {
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 || this.$store.getters.xt_user.org_id == 9990) {
1263
               var that = this
1263
               var that = this
1264
 
1264
 
1265
               axios.get('http://127.0.0.1:9532/api/register/get', {
1265
               axios.get('http://127.0.0.1:9532/api/register/get', {

+ 56 - 51
src/xt_pages/qcd/basicInformationAnalysis.vue View File

63
           :picker-options="pickerOptions"
63
           :picker-options="pickerOptions"
64
         ></el-date-picker>
64
         ></el-date-picker>
65
       </div>
65
       </div>
66
-       <div class="cell clearfix">
66
+       <!-- <div class="cell clearfix">
67
         <label class="title"><span class="name">转归情况</span> : </label>
67
         <label class="title"><span class="name">转归情况</span> : </label>
68
         <div class="time ">
68
         <div class="time ">
69
           <ul class="">
69
           <ul class="">
70
             <li
70
             <li
71
               :class="item.lapseto == lapsetoType ? 'active' : ''"
71
               :class="item.lapseto == lapsetoType ? 'active' : ''"
72
-              @click="selectLapseOne(item.lapseto)"
72
+              @click="selectLapseTo(item.lapseto)"
73
               v-for="item in lapsetoArr"
73
               v-for="item in lapsetoArr"
74
               :key="item.value"
74
               :key="item.value"
75
             >
75
             >
77
             </li>
77
             </li>
78
           </ul>
78
           </ul>
79
         </div>
79
         </div>
80
-      </div>
81
-      <div class="cell clearfix">
80
+      </div> -->
81
+      <!-- <div class="cell clearfix">
82
         <label class="title"><span class="name">病人来源</span> : </label>
82
         <label class="title"><span class="name">病人来源</span> : </label>
83
         <div class="time ">
83
         <div class="time ">
84
           <ul class="">
84
           <ul class="">
92
             </li>
92
             </li>
93
           </ul>
93
           </ul>
94
         </div>
94
         </div>
95
-      </div>
95
+      </div> -->
96
 
96
 
97
        <div class="cell clearfix" v-show="treatShow">
97
        <div class="cell clearfix" v-show="treatShow">
98
         <label class="title">
98
         <label class="title">
243
                 <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
243
                 <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
244
               </div>
244
               </div>
245
               <div class="borderBox1">
245
               <div class="borderBox1">
246
-                 <span v-if="lapsetoType == 0 || lapsetoType == 1"><p>留治:{{rollOutTotal}}人({{(rollOutTotal/patientCount*100).toFixed(1)}}%)</p>
247
-                  <el-progress :percentage="(rollOutTotal/patientCount*100).toFixed(1)"></el-progress>
248
-                </span>
249
-                <span v-if="lapsetoType == 0 || lapsetoType == 2"><p>转出:{{outTotal}}人({{(outTotal/patientCount*100).toFixed(1)}}%)</p>
250
-                 <el-progress :percentage="(outTotal/patientCount*100).toFixed(1)"></el-progress>
251
-                </span> 
246
+                <p>留治:{{rollOutTotal}}人({{(rollOutTotal/patientCount*100).toFixed(1)}}%)</p>
247
+                <el-progress :percentage="(rollOutTotal/patientCount*100).toFixed(1)"></el-progress>
248
+                <p>转出:{{outTotal}}人({{(outTotal/patientCount*100).toFixed(1)}}%)</p>
249
+                <el-progress :percentage="(outTotal/patientCount*100).toFixed(1)"></el-progress>
252
               </div>
250
               </div>
253
             </div>
251
             </div>
254
             <div class="infoOne">
252
             <div class="infoOne">
329
         </div>
327
         </div>
330
         <div>
328
         <div>
331
 
329
 
332
-        <!-- <div class="cell clearfix" v-show="treatShow">
330
+        <div class="cell clearfix" v-show="treatShow">
333
         <label class="title">
331
         <label class="title">
334
           <span class="name">转归状态</span> :
332
           <span class="name">转归状态</span> :
335
         </label>
333
         </label>
343
             >{{ item.label }}</li>
341
             >{{ item.label }}</li>
344
           </ul>
342
           </ul>
345
         </div>
343
         </div>
346
-       </div> -->
344
+       </div>
347
 
345
 
348
           <p style="font-size: 16px;font-weight: bold;color: #000;">转归统计</p>
346
           <p style="font-size: 16px;font-weight: bold;color: #000;">转归统计</p>
349
           <line-chart :options="bar"></line-chart>
347
           <line-chart :options="bar"></line-chart>
423
         { value: 0, label: '全部', source: 0, lapseto: 0 },
421
         { value: 0, label: '全部', source: 0, lapseto: 0 },
424
         { value: 1, label: '转出', source: 0, lapseto: 2 },
422
         { value: 1, label: '转出', source: 0, lapseto: 2 },
425
         { value: 2, label: '留治', source: 0, lapseto: 1 },
423
         { value: 2, label: '留治', source: 0, lapseto: 1 },
426
-        // { value: 3, label: '死亡', source:0,  lapseto: 3 },
424
+        { value: 3, label: '死亡', source:0,  lapseto: 3 },
427
       ],
425
       ],
428
       sourceType: 0,
426
       sourceType: 0,
429
       sourceArr: [
427
       sourceArr: [
654
         //统计转归状态
652
         //统计转归状态
655
         this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
653
         this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
656
         //统计男女比例
654
         //统计男女比例
657
-        this.getTotalSexCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
655
+        this.getTotalSexCount(timeStar,timeEnd)
658
         //统计传染病
656
         //统计传染病
659
         this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
657
         this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
660
         //统计年龄
658
         //统计年龄
664
         this.start = timeStar
662
         this.start = timeStar
665
         this.end =timeEnd
663
         this.end =timeEnd
666
         this.getCountModeId()
664
         this.getCountModeId()
667
-        this.getRolloutCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
665
+        this.getRolloutCount(timeStar,timeEnd)
668
       }
666
       }
669
     },
667
     },
670
     changeEndTime(val) {
668
     changeEndTime(val) {
692
         this.start = timeStar
690
         this.start = timeStar
693
         this.end =timeEnd
691
         this.end =timeEnd
694
         this.getCountModeId()
692
         this.getCountModeId()
695
-        this.getRolloutCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
693
+        this.getRolloutCount(timeStar,timeEnd)
696
       }
694
       }
697
     },
695
     },
698
     selectLapseTo(state) {
696
     selectLapseTo(state) {
701
       //获取本月当前机构的透析模式
699
       //获取本月当前机构的透析模式
702
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
700
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
703
       const endDate = moment(new Date()).format('YYYY-MM-DD')
701
       const endDate = moment(new Date()).format('YYYY-MM-DD')
704
-     
702
+
705
       var now = new Date()
703
       var now = new Date()
706
       var nowMonth = now.getMonth(); //当前月
704
       var nowMonth = now.getMonth(); //当前月
707
       var nowYear = now.getFullYear(); //当前年
705
       var nowYear = now.getFullYear(); //当前年
730
         this.start = timeStar
728
         this.start = timeStar
731
         this.end = timeEnd
729
         this.end = timeEnd
732
         this.getCountModeId()
730
         this.getCountModeId()
733
-        this.getRolloutCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
731
+        this.getRolloutCount(timeStar,timeEnd)
734
       }
732
       }
735
       //近三月
733
       //近三月
736
       if(state == 1){
734
       if(state == 1){
737
         this.listQuery.start_time = ""
735
         this.listQuery.start_time = ""
738
         this.listQuery.end_time = ""
736
         this.listQuery.end_time = ""
739
         const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
737
         const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
740
-       
738
+
741
         var startunitx = Date.parse(startDate)/1000
739
         var startunitx = Date.parse(startDate)/1000
742
         // console.log("开始时间搓",startunitx)
740
         // console.log("开始时间搓",startunitx)
743
         const endDate = moment(new Date()).format('YYYY-MM-DD')
741
         const endDate = moment(new Date()).format('YYYY-MM-DD')
759
         this.start = startunitx
757
         this.start = startunitx
760
         this.end = endunitx
758
         this.end = endunitx
761
         this.getCountModeId()
759
         this.getCountModeId()
762
-        this.getRolloutCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
760
+        this.getRolloutCount(startunitx,endunitx)
763
       }
761
       }
764
 
762
 
765
      //近半年
763
      //近半年
790
         this.start = startunitx
788
         this.start = startunitx
791
         this.end = endunitx
789
         this.end = endunitx
792
         this.getCountModeId()
790
         this.getCountModeId()
793
-        this.getRolloutCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
791
+        this.getRolloutCount(startunitx,endunitx)
794
      }
792
      }
795
 
793
 
796
      //近一年
794
      //近一年
817
         this.getTotalAgeCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
815
         this.getTotalAgeCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
818
         //统计透析年龄
816
         //统计透析年龄
819
         this.getTotalDialysisCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
817
         this.getTotalDialysisCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
818
+
820
         this.start = startunitx
819
         this.start = startunitx
821
         this.end = endunitx
820
         this.end = endunitx
822
         this.getCountModeId()
821
         this.getCountModeId()
823
-        this.getRolloutCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
822
+        this.getRolloutCount(startunitx,endunitx)
824
      }
823
      }
825
 
824
 
826
 
825
 
843
          if(response.data.state == 1){
842
          if(response.data.state == 1){
844
 
843
 
845
           var modetype =  response.data.data.modetype
844
           var modetype =  response.data.data.modetype
846
-         
845
+
847
           this.modetype = modetype
846
           this.modetype = modetype
848
           var total =  response.data.data.total
847
           var total =  response.data.data.total
849
-          
850
-          this.total = total.count
851
-          // this.total = total
848
+
849
+          // this.total = total.count
850
+          this.total = total
852
           // console.log("数据",this.modetype)
851
           // console.log("数据",this.modetype)
853
           var modedate = response.data.data.modetype
852
           var modedate = response.data.data.modetype
854
           for(let i=0;i<modedate.length;i++){
853
           for(let i=0;i<modedate.length;i++){
920
       })
919
       })
921
     },
920
     },
922
     //统计转归
921
     //统计转归
923
-    getTotalLapseCount(startDate,endDate,lapsetoType,sourceType ){
924
-   
922
+    getTotalLapseCount(startDate,endDate){
925
        this.modesDataTwo.series = []
923
        this.modesDataTwo.series = []
926
        this.modesDataTwo.xAxis = []
924
        this.modesDataTwo.xAxis = []
927
-      getTotalLapseCount(startDate,endDate,lapsetoType,sourceType).then(response=>{
925
+      getTotalLapseCount(startDate,endDate).then(response=>{
928
          if(response.data.state == 1){
926
          if(response.data.state == 1){
929
            var arr = [
927
            var arr = [
930
              {name:"留治",count:0},
928
              {name:"留治",count:0},
931
              {name:"转出",count:0}
929
              {name:"转出",count:0}
932
            ]
930
            ]
933
           var patients =  response.data.data.patients
931
           var patients =  response.data.data.patients
934
-      
935
-          this.rollOutTotal = patients.length
936
 
932
 
933
+          this.rollOutTotal = patients.length
937
           var patienttwo = response.data.data.patienttwo
934
           var patienttwo = response.data.data.patienttwo
935
+
938
           this.outTotal = patienttwo.length
936
           this.outTotal = patienttwo.length
939
           var count = response.data.data.count
937
           var count = response.data.data.count
940
           this.patientCount = count
938
           this.patientCount = count
941
 
939
 
942
           var rollout = response.data.data.rollout
940
           var rollout = response.data.data.rollout
943
-        
941
+          console.log("rollout",rollout)
944
 
942
 
945
           for(let i=0;i<arr.length;i++){
943
           for(let i=0;i<arr.length;i++){
946
             arr[0].count = this.rollOutTotal
944
             arr[0].count = this.rollOutTotal
947
             arr[1].count = this.outTotal
945
             arr[1].count = this.outTotal
948
           }
946
           }
947
+
948
+          // for(let j=0;j<arr.length;j++){
949
+          //   this.modesDataTwo.xAxis.push(arr[j].name)
950
+          //   this.modesDataTwo.series.push(((arr[j].count/count)*100).toFixed(1))
951
+          // }
952
+          // this.bar.series[0].data = this.modesDataTwo.series
953
+          // this.bar.xAxis.data = this.modesDataTwo.xAxis
954
+          // this.getArrLength(this.bar.xAxis.data)
955
+
949
          }
956
          }
950
       })
957
       })
951
     },
958
     },
952
     //统计男女比例
959
     //统计男女比例
953
-    getTotalSexCount(timeStar,timeEnd,lapsetoType,sourceType){
954
-      getTotalSexCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
960
+    getTotalSexCount(timeStar,timeEnd){
961
+      getTotalSexCount(timeStar,timeEnd).then(response=>{
955
         if(response.data.state === 1){
962
         if(response.data.state === 1){
956
-          console.log("resp2222",response.data.data.totalWoman)
957
           var total = response.data.data.total
963
           var total = response.data.data.total
964
+        //  console.log("总人数",total)
958
           this.totalGender = total
965
           this.totalGender = total
959
           var totalMan = response.data.data.totalSex
966
           var totalMan = response.data.data.totalSex
967
+       //  console.log("男人",totalMan)
960
           this.totalMan = totalMan
968
           this.totalMan = totalMan
961
-          var totalWoman = response.data.data.totalWoman
969
+          var totalWoman = total - totalMan
962
           this.totalWoman = totalWoman
970
           this.totalWoman = totalWoman
963
         }
971
         }
964
       })
972
       })
965
     },
973
     },
966
     //统计传染病
974
     //统计传染病
967
-    getTotalInfectiousCount(timeStar,timeEnd,lapsetoType,sourceType){
968
-       getTotalInfectiousCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
975
+    getTotalInfectiousCount(timeStar,timeEnd){
976
+       getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
969
            if(response.data.state === 1){
977
            if(response.data.state === 1){
970
              this.InfectiousTotal = response.data.data.total
978
              this.InfectiousTotal = response.data.data.total
971
              var infectious = response.data.data.count
979
              var infectious = response.data.data.count
988
            }
996
            }
989
        })
997
        })
990
     },
998
     },
991
-    getTotalAgeCount(timeStar,timeEnd,lapsetoType,sourceType){
992
-      getTotalAgeCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
999
+    getTotalAgeCount(timeStar,timeEnd){
1000
+      getTotalAgeCount(timeStar,timeEnd).then(response=>{
993
          if(response.data.state == 1){
1001
          if(response.data.state == 1){
994
           var ageCount =  response.data.data.ageCount
1002
           var ageCount =  response.data.data.ageCount
1003
+          // console.log("ageCount",ageCount)
995
           var arr = []
1004
           var arr = []
996
           arr =  ageCount.sort(this.compare('age'))
1005
           arr =  ageCount.sort(this.compare('age'))
997
           this.ageCount = arr
1006
           this.ageCount = arr
1009
           }
1018
           }
1010
       },
1019
       },
1011
     //统计透析年龄
1020
     //统计透析年龄
1012
-    getTotalDialysisCount(timeStar,timeEnd,lapsetoType,sourceType){
1013
-      getTotalDialysisCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
1021
+    getTotalDialysisCount(timeStar,timeEnd){
1022
+      getTotalDialysisCount(timeStar,timeEnd).then(response=>{
1014
          if(response.data.state == 1){
1023
          if(response.data.state == 1){
1015
            var dataage =  response.data.data.dataage
1024
            var dataage =  response.data.data.dataage
1016
           //  console.log("dataage",dataage)
1025
           //  console.log("dataage",dataage)
1167
        this.modesDataTwo.xAxis = []
1176
        this.modesDataTwo.xAxis = []
1168
         const params = {
1177
         const params = {
1169
           start_time:this.start,
1178
           start_time:this.start,
1170
-          end_time:this.end,
1171
-          lapsetotype:this.lapsetoType,
1172
-          sourcetype:this.sourceType,
1179
+          end_time:this.end
1173
         }
1180
         }
1174
       getRolloutCount(params).then(response=>{
1181
       getRolloutCount(params).then(response=>{
1175
          if(response.data.state == 1){
1182
          if(response.data.state == 1){
1218
       this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1225
       this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1219
       this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1226
       this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1220
       this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1227
       this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1221
-      this.getRolloutCount(this.lapsetoType,this.sourceType)
1222
     },
1228
     },
1223
-    selectLapseOne(lapseto) {
1224
-      console.log("lapseto22222",lapseto)
1229
+    selectLapseTo(lapseto) {
1225
       this.lapsetoType = lapseto
1230
       this.lapsetoType = lapseto
1226
       this.getDialysisModeType(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1231
       this.getDialysisModeType(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1227
       this.getTotalLapseCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1232
       this.getTotalLapseCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1229
       this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1234
       this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1230
       this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1235
       this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1231
       this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1236
       this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
1232
-      this.getRolloutCount(this.lapsetoType,this.sourceType)
1233
     },
1237
     },
1234
   },
1238
   },
1235
   created() {
1239
   created() {
1266
       this.start = timeStar
1270
       this.start = timeStar
1267
       this.end = timeEnd
1271
       this.end = timeEnd
1268
 
1272
 
1269
-     this.getRolloutCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
1273
+     this.getRolloutCount(timeStar,timeEnd)
1270
 
1274
 
1271
 
1275
 
1272
   },
1276
   },
1417
 </style>
1421
 </style>
1418
 
1422
 
1419
 
1423
 
1424
+

+ 14 - 1
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

3
              :title="titles"
3
              :title="titles"
4
              :visible.sync="visible"
4
              :visible.sync="visible"
5
              :close-on-click-modal="isClose"
5
              :close-on-click-modal="isClose"
6
-             :close-on-press-escape="isClose">
6
+             :close-on-press-escape="isClose"
7
+             :before-close="_close">
7
 
8
 
8
     <el-tabs v-model="activeName">
9
     <el-tabs v-model="activeName">
9
       <el-tab-pane label="基础数据" name="first">
10
       <el-tab-pane label="基础数据" name="first">
471
           }
472
           }
472
         })
473
         })
473
       },
474
       },
475
+      _close: function(done) {
476
+        // this.clear()
477
+        // done()
478
+        this.$confirm('是否保存')
479
+          .then(_ => {
480
+            this.comfirm('form')
481
+            // done();
482
+          })
483
+          .catch(_ => {
484
+            done()
485
+          });
486
+      },
474
       getValue: function() {
487
       getValue: function() {
475
         
488
         
476
         const form = {}
489
         const form = {}

+ 1 - 1
src/xt_pages/upload/fast/One.vue View File

5
       <div class="information">
5
       <div class="information">
6
         <div class="row">
6
         <div class="row">
7
           <div class="rowOne">
7
           <div class="rowOne">
8
-            <p class="rowName">首次诊治时间:</p>
8
+            <p class="rowName">首次透析时间:</p>
9
             <el-input
9
             <el-input
10
               placeholder="请输入内容"
10
               placeholder="请输入内容"
11
               v-model="form.first_treatment_date"
11
               v-model="form.first_treatment_date"

+ 1 - 1
src/xt_pages/user/components/PatientForm.vue View File

785
             </el-col>
785
             </el-col>
786
 
786
 
787
             <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
787
             <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
788
-              <el-form-item label="首次诊治时间 : ">
788
+              <el-form-item label="首次透析时间 : ">
789
                 <el-date-picker
789
                 <el-date-picker
790
                   v-model="form.first_treatment_date"
790
                   v-model="form.first_treatment_date"
791
                   type="date"
791
                   type="date"

+ 18 - 2
src/xt_pages/user/components/PatientSidebar.vue View File

188
     },
188
     },
189
     changePatient(value) {
189
     changePatient(value) {
190
       console.log(value)
190
       console.log(value)
191
-
192
-      this.$router.push('/patients/patient/' + value)
191
+      if(this.$route.path.indexOf('edit') > -1){
192
+        this.$confirm('是否保存当前病历', '保存', {
193
+          confirmButtonText: '确 定',
194
+          cancelButtonText: '取 消',
195
+          type: 'warning'
196
+        }).then(() => {
197
+            this.$emit('updateInfo')
198
+            setTimeout(() => {
199
+              this.$router.push('/patients/patient/' + value)
200
+            },1000)
201
+        }).catch(() => {
202
+          this.$router.push('/patients/patient/' + value)
203
+        })
204
+      }else{
205
+        this.$router.push('/patients/patient/' + value)
206
+      }
207
+      
208
+      
193
     },
209
     },
194
     getList() {
210
     getList() {
195
       fetchAllList().then(response => {
211
       fetchAllList().then(response => {

+ 8 - 2
src/xt_pages/user/editPatient.vue View File

1
 
1
 
2
 <template>
2
 <template>
3
   <div class="patient-container">
3
   <div class="patient-container">
4
-  <patient-sidebar :id="patientID"></patient-sidebar>
5
-  <patient-form :is-edit='true' :class='panelClass' v-on:tran-patient-info="patientInfo=$event"></patient-form>
4
+  <patient-sidebar :id="patientID" @updateInfo="submit"></patient-sidebar>
5
+  <patient-form :is-edit='true' :class='panelClass' ref="patientForm" v-on:tran-patient-info="patientInfo=$event"></patient-form>
6
   </div>
6
   </div>
7
 </template>
7
 </template>
8
 
8
 
33
           });
33
           });
34
           this.$router.push('/patients/patients');
34
           this.$router.push('/patients/patients');
35
       }
35
       }
36
+  },
37
+  methods:{
38
+    submit(){
39
+      this.$refs.patientForm.onSubmit('form')
40
+    }
41
+    
36
   }
42
   }
37
 
43
 
38
 }
44
 }