Parcourir la source

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

28169 il y a 9 mois
Parent
révision
8f6e320c24

+ 18 - 0
src/api/new_stock/stock.js Voir le fichier

@@ -0,0 +1,18 @@
1
+import request from '@/utils/request'
2
+import { sort } from 'semver'
3
+
4
+export function GetDrugStock(params) {
5
+  return request({
6
+    url: '/api/drug/stock',
7
+    method: 'get',
8
+    params:params
9
+  })
10
+}
11
+export function GetDrugChangeStock(params) {
12
+  return request({
13
+    url: '/api/drug/change',
14
+    method: 'get',
15
+    params:params
16
+
17
+  })
18
+}

+ 29 - 1
src/router/modules/hisTool.js Voir le fichier

@@ -162,6 +162,34 @@ export default {
162 162
       component: () => import('@/xt_pages/outpatientTool/org_export_data'),
163 163
       name: 'orgExportData',
164 164
       meta: { title: 'orgExportData', noCache: true }
165
-    }
165
+    },
166
+
167
+        { //药品盘存
168
+          path: '/outpatientTool/drugStock',
169
+          component: () => import('@/xt_pages/outpatientTool/drugStock'),
170
+          name: 'drugStock',
171
+          meta: {
172
+            title: '药品盘存',
173
+            noCache: true
174
+          }
175
+        },
176
+        {//药品变更
177
+          path: '/outpatientTool/drugChange',
178
+          component: () => import('@/xt_pages/outpatientTool/drugChange'),
179
+          name: 'drugChange',
180
+          meta: {
181
+            title: '药品变更',
182
+            noCache: true
183
+          }
184
+        },
185
+        {//药品查询
186
+          path: '/outpatientTool/drugQuery',
187
+          component: () => import('@/xt_pages/outpatientTool/drugQuery'),
188
+          name: 'drugQuery',
189
+          meta: {
190
+            title: '药品查询',
191
+            noCache: true
192
+          },
193
+        },
166 194
   ]
167 195
 }

+ 25 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue Voir le fichier

@@ -940,6 +940,18 @@
940 940
         >
941 941
         </div>
942 942
       </template>
943
+      <template v-if="org_template_info.template_id == 76">
944
+        <div>
945
+          <el-button
946
+          :loading="loading"
947
+          size="small"
948
+          icon="el-icon-printer"
949
+          @click="printThisPage"
950
+          type="primary"
951
+          >打印</el-button
952
+        >
953
+        </div>
954
+      </template>
943 955
     </div>
944 956
     <div class="app-container" style="min-height: 0">
945 957
       <!--<div class="order-print-btn"-->
@@ -1445,6 +1457,10 @@
1445 1457
             v-if="org_template_info.template_id == 75">
1446 1458
 
1447 1459
           </DialysisPrintOrderseventyfive>
1460
+          <DialysisPrintOrderSeventysix v-bind:childResponse="childResponse"
1461
+          v-if="org_template_info.template_id == 76">
1462
+
1463
+          </DialysisPrintOrderSeventysix>
1448 1464
         </div>
1449 1465
       </el-container>
1450 1466
     </div>
@@ -1538,6 +1554,7 @@ import DialysisPrintOrderSeventyTwo from './template/DialysisPrintOrderSeventyTw
1538 1554
 import DialysisPrintOrderSeventythree from './template/DialysisPrintOrderSeventythree'
1539 1555
 import DialysisPrintOrderSop from './template/DialysisPrintOrderSop'
1540 1556
 import DialysisPrintOrderseventyfive from './template/DialysisPrintOrderseventyfive'
1557
+import DialysisPrintOrderSeventysix from './template/DialysisPrintOrderSeventysix'
1541 1558
 import DialysisPrintOrderZero from './template/DialysisPrintOrderZero'
1542 1559
 export default {
1543 1560
   name: "dialysisPrintOrder",
@@ -1617,6 +1634,7 @@ export default {
1617 1634
     DialysisPrintOrderSeventythree,
1618 1635
     DialysisPrintOrderSop,
1619 1636
     DialysisPrintOrderseventyfive,
1637
+    DialysisPrintOrderSeventysix,
1620 1638
     DialysisPrintOrderZero,
1621 1639
     LabelBox,
1622 1640
     BreadCrumb,
@@ -2299,6 +2317,13 @@ export default {
2299 2317
           style: style2,
2300 2318
           scanStyles: false,
2301 2319
         });
2320
+      }else if (this.org_template_info.template_id == 76) {
2321
+        printJS({
2322
+          printable: "dialysis-print-box-1",
2323
+          type: "html",
2324
+          style: style2,
2325
+          scanStyles: false,
2326
+        });
2302 2327
       }
2303 2328
        else if (this.org_template_info.template_id == 199 ) {
2304 2329
         printJS({

+ 16 - 9
src/xt_pages/dialysis/template/DialysisPrintOrderEight.vue Voir le fichier

@@ -724,39 +724,42 @@
724 724
 
725 725
         <table class="print-table" border="1" style="line-height:30px;">
726 726
           <tr style="line-height:20px;">
727
-            <td style="min-width:60px">时间</td>
728
-            <td style="min-width:60px">
727
+            <td style="width:60px">时间</td>
728
+            <td style="width:60px">
729 729
               血压
730 730
               <br />(mmHg)
731 731
             </td>
732
-            <td style="min-width:60px">
732
+            <td style="width:60px">
733 733
               心率
734 734
               <br />次/分
735 735
             </td>
736
-            <td style="min-width:60px">
736
+            <td style="width:60px">
737 737
               血流量
738 738
               <br />ml/min
739 739
             </td>
740
-            <td style="min-width:60px">
740
+            <td style="width:60px">
741 741
               静脉压
742 742
               <br />(mmHg)
743 743
             </td>
744
-            <td style="min-width:60px">
744
+            <td style="width:60px">
745 745
               跨膜压
746 746
               <br />(mmHg)
747 747
             </td>
748
-            <td style="min-width:60px">
748
+            <td style="width:60px">
749 749
               超滤率
750 750
               <br />L/h
751 751
             </td>
752
-            <td style="min-width:60px">
752
+            <td style="width:60px">
753 753
               超滤量
754 754
               <br />L
755 755
             </td>
756
-            <td style="min-width:60px">
756
+            <td style="width:60px">
757 757
               NA⁺
758 758
               <br />
759 759
             </td>
760
+            <td style="width:60px">透析液温度<br/>℃</td>
761
+            <td style="width:60px">血容量<br/>L</td>
762
+            <td style="width:60px">kt/v</td>
760 763
             <td style="min-width:60px">病情变化及处理</td>
761 764
             <td style="min-width:110px">护士签名核对者</td>
762 765
           </tr>
@@ -780,6 +783,10 @@
780 783
             <td>{{ monitor.ultrafiltration_rate }}</td>
781 784
             <td>{{ monitor.ultrafiltration_volume }}</td>
782 785
             <td>{{ monitor.sodium_concentration }}</td>
786
+            <td>{{monitor.dialysate_temperature ? monitor.dialysate_temperature : ""}}</td>
787
+            <td>{{ monitor.accumulated_blood_volume ? monitor.accumulated_blood_volume : '' }}</td>
788
+            <td>{{ monitor.ktv ? monitor.ktv : "" }}</td>
789
+            <!-- 病情变化及处理 -->
783 790
             <td>
784 791
               <span style="line-height:18px;display:block;">
785 792
                 {{ monitor.symptom }}&nbsp;{{ monitor.dispose }}&nbsp;{{

Fichier diff supprimé car celui-ci est trop grand
+ 3522 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSeventysix.vue


+ 8 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderseventyfive.vue Voir le fichier

@@ -188,18 +188,21 @@
188 188
                 <span v-if="prescription.anticoagulant_name == '那屈肝素钙'"> 
189 189
                   {{  prescription.anticoagulant_zongliang ? prescription.anticoagulant_zongliang : "/" }} IU
190 190
                 </span>
191
-                <span v-if="prescription.anticoagulant_name == '肝素钠'">
191
+                <span >
192 192
                     
193 193
                 </span>
194 194
             </div>
195 195
           </div>
196 196
           <div class="inline_block" style="flex: 1;">
197
-            首剂:
197
+            肝素钠首剂:
198 198
             <div class="under_line"
199 199
               style=" width: 60%;
200 200
                 text-align: left; white-space: normal;
201 201
               ">
202
+              <span v-if="prescription.anticoagulant_name == '肝素钠'">
202 203
                 {{prescription.anticoagulant_shouji ? prescription.anticoagulant_shouji : "0" }} &nbsp;
204
+              </span>
205
+              <span v-else>/</span>
203 206
             </div>
204 207
            
205 208
             <span v-if="prescription.anticoagulant == '枸橼酸钠'">mg</span>
@@ -217,7 +220,10 @@
217 220
               style=" width: 60%;
218 221
                 text-align: left; white-space: normal;
219 222
               ">
223
+              <span v-if="prescription.anticoagulant_name == '肝素钠'">
220 224
                 {{prescription.anticoagulant_weichi ? prescription.anticoagulant_weichi : "0" }} &nbsp;
225
+              </span>
226
+              <span>/</span>
221 227
             </div>
222 228
             <span v-if="prescription.anticoagulant == '枸橼酸钠'">ml/h</span>
223 229
             <span v-if="prescription.anticoagulant == '阿加曲班'">mg/h</span>

+ 5 - 4
src/xt_pages/hospitalStation/invoicePrint.vue Voir le fichier

@@ -18,21 +18,22 @@
18 18
             org_id != 10215 &&
19 19
             org_id != 10265 &&
20 20
             org_id != 4 &&
21
-            org_id != 0 &&
22 21
             org_id != 9675 &&
23
-            org_id != 10489
22
+            org_id != 10489 &&
23
+            org_id != 0
24
+
24 25
           "
25 26
           :paramsObj="invoiceParams"
26 27
         ></printOne>
27 28
         <printTwo
28
-          v-if="org_id == 10215"
29
+          v-if="org_id == 10215 || org_id == 0"
29 30
           :paramsObj="invoiceParams"
30 31
         ></printTwo>
31 32
         <printThree
32 33
           v-if="org_id == 10265 || org_id == 4 || org_id == 9675"
33 34
           :paramsObj="invoiceParams"
34 35
         ></printThree>
35
-        <Printfour v-if="org_id == 10489 || org_id == 0" :paramsObj="invoiceParams">
36
+        <Printfour v-if="org_id == 10489 " :paramsObj="invoiceParams">
36 37
         </Printfour>
37 38
 <!--        <print-night v-if="org_id == 10210 || org_id == 0"-->
38 39
 <!--                  :paramsObj="invoiceParams"></print-night>-->

+ 2 - 2
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue Voir le fichier

@@ -125,8 +125,8 @@
125 125
       <div style="display: flex; justify-content: space-between">
126 126
         <div style="position: absolute; top: 190px; left: 50px"></div>
127 127
         <div style="position: absolute; top: 190px; left: 130px"></div>
128
-        <div style="position: absolute; top: 190px; left: 180px"></div>
129
-        <div style="position: absolute; top: 190px; left: 260px"></div>
128
+        <div style="position: absolute; top: 190px; left: 180px">护理费</div>
129
+        <div style="position: absolute; top: 190px; left: 260px">        {{ list.hiliCostTotal ? list.hiliCostTotal.toFixed(2) : "" }}</div>
130 130
         <div style="position: absolute; top: 190px; left: 340px">材料费</div>
131 131
         <div style="position: absolute; top: 190px; left: 420px">
132 132
           {{ list.materialCostTotal ? list.materialCostTotal.toFixed(2) : "" }}

+ 2 - 2
src/xt_pages/outpatientCharges/invoicePrint.vue Voir le fichier

@@ -10,7 +10,7 @@
10 10
         type="primary"
11 11
       >打印</el-button>
12 12
       <el-button
13
-      v-if="org_id==10088 || org_id == 0"
13
+      v-if="org_id==10088"
14 14
       style="position:fixed;right:115px;z-index:999"
15 15
       size="small" type="success"
16 16
       @click="showclick = !showclick">{{ showclick==false ? '白纸' : '发票' }}</el-button>
@@ -23,7 +23,7 @@
23 23
             <printfifteen v-if="org_id == 10510  " :paramsObj="invoiceParams"></printfifteen>
24 24
           </div>
25 25
           <printTwo v-if="org_id == 10106" :paramsObj="invoiceParams"></printTwo>
26
-          <printFour v-if="org_id == 10215 || org_id == 4 " :paramsObj="invoiceParams"></printFour>
26
+          <printFour v-if="org_id == 10215 || org_id == 0 " :paramsObj="invoiceParams"></printFour>
27 27
           <!-- <printFive v-if="org_id == 10188 " :paramsObj="invoiceParams"></printFive> -->
28 28
           <!-- <printthirteen v-if="org_id == 10188 || org_id == 0 " :paramsObj="invoiceParams"></printthirteen> -->
29 29
 <!--         <printEight v-if="org_id == 10387 || org_id == 0" :paramsObj="invoiceParams"></printEight>-->

+ 2 - 2
src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue Voir le fichier

@@ -67,8 +67,8 @@
67 67
             <div style="position: absolute;top:190px;left:260px">{{ list.zhenChaCostTotal ? list.zhenChaCostTotal.toFixed(2) : '' }}</div>
68 68
             <div style="position: absolute;top:190px;left:340px">材料费</div>
69 69
             <div style="position: absolute;top:190px;left:420px">{{ list.materialCostTotal ? list.materialCostTotal.toFixed(2) : '' }}</div>
70
-            <div style="position: absolute;top:190px;left:480px"></div>
71
-            <div style="position: absolute;top:190px;left:540px"></div>
70
+            <div style="position: absolute;top:190px;left:480px">护理费</div>
71
+            <div style="position: absolute;top:190px;left:540px">{{list.hiliCostTotal?list.hiliCostTotal.toFixed(2):''}}</div>
72 72
         </div>
73 73
         <div style="display:flex;justify-content: space-between;">
74 74
             <div style="position: absolute;top:210px;left:50px"></div>

+ 2 - 1
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue Voir le fichier

@@ -6,8 +6,9 @@
6 6
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10191">福建省社会医疗保险医疗费用结算单</div>
7 7
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
8 8
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10510 || this.$store.getters.xt_user.org_id == 0">湖北省基本医疗保险门诊费用结算单</div>
9
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10694">江西省社会医疗保险医疗费用结算单</div>
9 10
 
10
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10375 && this.$store.getters.xt_user.org_id != 10387 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088 &&this.$store.getters.xt_user.org_id != 10510  &&this.$store.getters.xt_user.org_id != 10633">广东省社会医疗保险医疗费用结算单</div>
11
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10375 && this.$store.getters.xt_user.org_id != 10387 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088 &&this.$store.getters.xt_user.org_id != 10510  && this.$store.getters.xt_user.org_id != 10633 && this.$store.getters.xt_user.org_id != 10694">广东省社会医疗保险医疗费用结算单</div>
11 12
 
12 13
     <table class="statementTable" border="1">
13 14
       <tr>

+ 1 - 1
src/xt_pages/outpatientCharges/statementTemplate/printThree.vue Voir le fichier

@@ -166,7 +166,7 @@
166 166
 
167 167
           <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
168 168
           <div style="display:flex;">
169
-              <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span>
169
+              <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.order ? balanceAccounts.order.mdtrt_id : ''}}</span>
170 170
               </div>
171 171
               <div>透析号:<span style="display:inline-block;width:200px;">{{balanceAccounts.patient ? balanceAccounts.patient.dialysis_no : ''}}</span>
172 172
               </div>

+ 3 - 1
src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue Voir le fichier

@@ -6,8 +6,10 @@
6 6
 
7 7
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10375">广西省社会医疗保险医疗费用结算单</div>
8 8
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10515">湖南省社会医疗保险医疗费用结算单</div>
9
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10694">江西省社会医疗保险医疗费用结算单</div>
9 10
 
10
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10515 && this.$store.getters.xt_user.org_id != 10375 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088 &&this.$store.getters.xt_user.org_id != 10510 && this.$store.getters.xt_user.org_id != 10633">广东省社会医疗保险医疗费用结算单</div>
11
+
12
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10515 && this.$store.getters.xt_user.org_id != 10375 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088 &&this.$store.getters.xt_user.org_id != 10510 && this.$store.getters.xt_user.org_id != 10633  && this.$store.getters.xt_user.org_id != 10694">广东省社会医疗保险医疗费用结算单</div>
11 13
 
12 14
     <table class="statementTable" border="1">
13 15
       <tr>

+ 15 - 12
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Voir le fichier

@@ -744,16 +744,16 @@
744 744
       },
745 745
 
746 746
       searchProjectAction() {
747
-
747
+        const tabProject1 = this.allProject
748 748
         if (this.search_project_keyword.length == 0) {
749 749
           this.tabProject = this.allProject
750 750
 
751 751
         } else {
752 752
           let arr = []
753
-          for (let i = 0; i < this.tabProject.length; i++) {
754
-            if (this.tabProject[i].project_name.indexOf(this.search_project_keyword) != -1 ||
755
-            this.tabProject[i].first_letter.indexOf(this.search_project_keyword) !=-1) {
756
-              arr = arr.concat(this.tabProject[i])
753
+          for (let i = 0; i < tabProject1.length; i++) {
754
+            if (tabProject1[i].project_name.indexOf(this.search_project_keyword) != -1 ||
755
+            tabProject1[i].first_letter.indexOf(this.search_project_keyword) !=-1) {
756
+              arr = arr.concat(tabProject1[i])
757 757
             }
758 758
           }
759 759
           this.tabProject = arr
@@ -761,20 +761,20 @@
761 761
         }
762 762
       },
763 763
       searchAction() {
764
+        const drugs1 = this.allDrugs
764 765
         if (this.search_keyword.length == 0) {
765 766
           this.drugs = this.allDrugs
766 767
         } else {
767 768
           let arr = []
768
-          for (let i = 0; i < this.drugs.length; i++) {
769
-            if (this.drugs[i].drug_name.indexOf(this.search_keyword) != -1 ||
770
-            this.drugs[i].wubi.indexOf(this.search_keyword) != -1 ||
771
-            this.drugs[i].pinyin.indexOf(this.search_keyword) != -1 ||
772
-            this.drugs[i].first_letter.indexOf(this.search_keyword) != -1) {
773
-              arr = arr.concat(this.drugs[i])
769
+          for (let i = 0; i < drugs1.length; i++) {
770
+            if (drugs1[i].drug_name.indexOf(this.search_keyword) != -1 ||
771
+            drugs1[i].wubi.indexOf(this.search_keyword) != -1 ||
772
+            drugs1[i].pinyin.indexOf(this.search_keyword) != -1 ||
773
+            drugs1[i].first_letter.indexOf(this.search_keyword) != -1) {
774
+              arr = arr.concat(drugs1[i])
774 775
             }
775 776
           }
776 777
           this.drugs = arr
777
-
778 778
         }
779 779
 
780 780
       },
@@ -810,6 +810,7 @@
810 810
         return getDictionaryDataConfig(module, filed_name)
811 811
 
812 812
       },
813
+      // 药品数据源
813 814
       getInitData() {
814 815
         getInitData().then(response => {
815 816
           if (response.data.state == 0) {
@@ -829,6 +830,7 @@
829 830
             }
830 831
 
831 832
             this.allDrugs = response.data.data.drugs
833
+            console.log('111111',response.data.data.drugs);
832 834
             this.advices_template = response.data.data.advices_template
833 835
             this.doctors = response.data.data.doctors
834 836
             for (let i = 0; i < this.doctors.length; i++) {
@@ -2583,6 +2585,7 @@
2583 2585
       this.getZuobiaoDrugStock()
2584 2586
       this.getZuobiaoGoodStock()
2585 2587
       this.getPrescriptionTemplateInfo()
2588
+      // 获取所有药品
2586 2589
       this.getInitData()
2587 2590
       //获取所有项目
2588 2591
       this.getlist()

+ 455 - 0
src/xt_pages/outpatientTool/drugChange.vue Voir le fichier

@@ -0,0 +1,455 @@
1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div class="cell clearfix">
5
+        <span>入库时间:</span>
6
+        <el-date-picker
7
+          size="small"
8
+          v-model="start_time"
9
+          prefix-icon="el-icon-date"
10
+          :editable="false"
11
+          style="width: 196px;"
12
+          type="date"
13
+          placeholder="选择日期时间"
14
+          align="right"
15
+          format="yyyy-MM-dd"
16
+          value-format="yyyy-MM-dd"
17
+          @change="startTimeChange"
18
+        ></el-date-picker>-
19
+        <el-date-picker
20
+          size="small"
21
+          v-model="end_time"
22
+          prefix-icon="el-icon-date"
23
+          :editable="false"
24
+          style="width: 196px;margin-right:10px;"
25
+          type="date"
26
+          placeholder="选择日期时间"
27
+          align="right"
28
+          format="yyyy-MM-dd"
29
+          value-format="yyyy-MM-dd"
30
+          @change="endTimeChange"
31
+        ></el-date-picker>
32
+      </div>
33
+
34
+
35
+      <div>
36
+        <div>销售状态:</div>
37
+        <el-select size="small" v-model="is_sale" placeholder="请选择"
38
+                   style="width:100px;margin-left:10px;" @change="changeStock">
39
+          <el-option
40
+            label="不限"
41
+            value="0">
42
+          </el-option>
43
+          <el-option
44
+            v-for="item,index in items"
45
+            :key="index"
46
+            :label="item.name"
47
+            :value="item.id">
48
+          </el-option>
49
+        </el-select>
50
+      </div>
51
+
52
+      <div>
53
+        <div>变更状态:</div>
54
+        <el-select size="small" v-model="change_type" placeholder="请选择"
55
+                   style="width:100px;margin-left:10px;" @change="change">
56
+          <el-option
57
+            label="不限"
58
+            value="0">
59
+          </el-option>
60
+          <el-option
61
+            v-for="item,index in changes"
62
+            :key="index"
63
+            :label="item.name"
64
+            :value="item.id">
65
+          </el-option>
66
+        </el-select>
67
+      </div>
68
+      <div>
69
+        <el-button type="primary" @click="query()">查询</el-button>
70
+        <el-button type="primary" @click="change_stock()">变更</el-button>
71
+        <el-button type="primary" @click="exportdata()">导出</el-button>
72
+
73
+        <!--        <el-button type="primary" @click="change()">变更</el-button>-->
74
+      </div>
75
+    </div>
76
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table2"
77
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
78
+              max-height="600"
79
+              @select="selectCostInfo"
80
+              @selection-change="changeCostInfoTableData"
81
+              @select-all="changeAllCostInfoTableData"
82
+              highlight-current-row>
83
+      <el-table-column
84
+        align="center"
85
+        type="selection"
86
+        width="55"
87
+      ></el-table-column>
88
+      <el-table-column align="center" prop="name" label="药品名称">
89
+        <template slot-scope="scope">{{scope.row.drug_name}}</template>
90
+      </el-table-column>
91
+      <el-table-column align="center" prop="name" label="药品类型">
92
+        <template slot-scope="scope">{{scope.row.drug_type}}</template>
93
+      </el-table-column>
94
+      <el-table-column align="center" prop="name" label="规格单位">
95
+        <template slot-scope="scope">{{scope.row.spec}}</template>
96
+      </el-table-column>
97
+      <el-table-column align="center" prop="name" label="国家编码">
98
+        <template slot-scope="scope">{{scope.row.code}}</template>
99
+      </el-table-column>
100
+      <el-table-column align="center" prop="name" label="批号">
101
+        <template slot-scope="scope">{{scope.row.batch_number}}</template>
102
+      </el-table-column>
103
+      <el-table-column align="center" prop="name" label="数量">
104
+        <template slot-scope="scope">
105
+          <div>{{scope.row.count}}{{scope.row.unit}}</div>
106
+        </template>
107
+      </el-table-column>
108
+
109
+      <el-table-column align="center" prop="total" label="开方日期">
110
+        <template slot-scope="scope">
111
+          <div>{{scope.row.p_date}}</div>
112
+        </template>
113
+      </el-table-column>
114
+
115
+
116
+      <el-table-column align="center" prop="total" label="结算日期">
117
+        <template slot-scope="scope">
118
+          <div>{{scope.row.e_date}}</div>
119
+        </template>
120
+      </el-table-column>
121
+
122
+
123
+      <el-table-column align="center" prop="total" label="销售状态">
124
+        <template slot-scope="scope">
125
+          <div>{{scope.row.is_sale?'已销售':'未销售'}}</div>
126
+        </template>
127
+      </el-table-column>
128
+
129
+      <el-table-column align="center" prop="total" label="变更状态">
130
+        <template slot-scope="scope">
131
+          <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
132
+        </template>
133
+      </el-table-column>
134
+
135
+      <el-table-column align="center" prop="total" label="盘存日期">
136
+        <template slot-scope="scope">
137
+          <div>{{scope.row.pc_date}}</div>
138
+        </template>
139
+      </el-table-column>
140
+
141
+      <el-table-column label="操作" width="200">
142
+        <template slot-scope="scope">
143
+          <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0" type="primary" @click="sigle_stock(scope.row)">盘存</el-button>
144
+          <el-button type="primary" @click="deleteStock(scope.row)">删除</el-button>
145
+        </template>
146
+      </el-table-column>
147
+    </el-table>
148
+    <el-pagination
149
+      @size-change="handleSizeChange"
150
+      @current-change="handleCurrentChange"
151
+      :page-size="5"
152
+      :page-sizes="[10, 20, 50, 100,500,1000,2000]"
153
+      background
154
+      style="margin-top:20px;float: right"
155
+      :total="value"
156
+    ></el-pagination>
157
+
158
+    <el-table v-show="false" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
159
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
160
+              max-height="600"
161
+              @select="selectCostInfo"
162
+              @selection-change="changeCostInfoTableData"
163
+              @select-all="changeAllCostInfoTableData"
164
+              highlight-current-row>
165
+      <el-table-column
166
+        align="center"
167
+        type="selection"
168
+        width="55"
169
+      ></el-table-column>
170
+      <el-table-column align="center" prop="name" label="药品名称">
171
+        <template slot-scope="scope">{{scope.row.drug_name}}</template>
172
+      </el-table-column>
173
+      <el-table-column align="center" prop="name" label="药品类型">
174
+        <template slot-scope="scope">{{scope.row.drug_type}}</template>
175
+      </el-table-column>
176
+      <el-table-column align="center" prop="name" label="规格单位">
177
+        <template slot-scope="scope">{{scope.row.spec}}</template>
178
+      </el-table-column>
179
+      <el-table-column align="center" prop="name" label="国家编码">
180
+        <template slot-scope="scope">{{scope.row.code}}</template>
181
+      </el-table-column>
182
+      <el-table-column align="center" prop="name" label="批号">
183
+        <template slot-scope="scope">{{scope.row.batch_number}}</template>
184
+      </el-table-column>
185
+      <el-table-column align="center" prop="name" label="数量">
186
+        <template slot-scope="scope">
187
+          <div>{{scope.row.count}}{{scope.row.unit}}</div>
188
+        </template>
189
+      </el-table-column>
190
+
191
+      <el-table-column align="center" prop="total" label="开方日期">
192
+        <template slot-scope="scope">
193
+          <div>{{scope.row.p_date}}</div>
194
+        </template>
195
+      </el-table-column>
196
+
197
+
198
+      <el-table-column align="center" prop="total" label="结算日期">
199
+        <template slot-scope="scope">
200
+          <div>{{scope.row.e_date}}</div>
201
+        </template>
202
+      </el-table-column>
203
+
204
+
205
+      <el-table-column align="center" prop="total" label="盘存状态">
206
+        <template slot-scope="scope">
207
+          <div>{{scope.row.is_pc?'已盘存':'未盘存'}}</div>
208
+        </template>
209
+      </el-table-column>
210
+
211
+      <el-table-column align="center" prop="total" label="变更状态">
212
+        <template slot-scope="scope">
213
+          <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
214
+        </template>
215
+      </el-table-column>
216
+
217
+      <el-table-column align="center" prop="total" label="盘存日期">
218
+        <template slot-scope="scope">
219
+          <div>{{scope.row.pc_date}}</div>
220
+        </template>
221
+      </el-table-column>
222
+
223
+    </el-table>
224
+
225
+  </div>
226
+
227
+  <!-- </div> -->
228
+</template>
229
+
230
+
231
+<script>
232
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
233
+import { GetDrugChangeStock } from '../../api/new_stock/stock'
234
+import { getDictionaryDataConfig } from "@/utils/data";
235
+import { uParseTime } from '@/utils/tools'
236
+import axios from 'axios'
237
+const moment = require('moment')
238
+export default {
239
+  components: {
240
+    BreadCrumb
241
+  },
242
+  data() {
243
+    return {
244
+      drugTypeList: [{ id: 0, name: "全部" }],
245
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
246
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
247
+      tableData: [],
248
+      change_type:"0",
249
+      selection:[],
250
+      page:1,
251
+      limit:10,
252
+      value:0,
253
+      is_sale:"0",
254
+      items: [
255
+        { id: 1, name: '已盘存' },
256
+        { id: 2, name: '未盘存' },
257
+      ],
258
+      changes: [
259
+        { id: 1, name: '已变更' },
260
+        { id: 2, name: '未变更' },
261
+      ]
262
+    }
263
+  },
264
+  methods: {
265
+    deleteStock(row){
266
+
267
+
268
+
269
+    },
270
+    sigle_stock(row){
271
+      var that = this;
272
+      let params = {
273
+        ids:row.id,
274
+        admin_user_id:this.$store.getters.xt_user.user.id
275
+      };
276
+      axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
277
+        if (response.data.state == 0) {
278
+          that.$message.error(response.data.data.msg);
279
+          return false
280
+        } else {
281
+          if(response.data.data.failed_code == -10){
282
+            that.$confirm(response.data.data.msg, '医保错误信息', {
283
+              confirmButtonText: '确 定',
284
+              type: 'warning'
285
+            }).then(() => {
286
+            }).catch(() => {
287
+            })
288
+          }else{
289
+
290
+          }
291
+        }
292
+      }).catch(function(error) {
293
+      })
294
+    },
295
+    handleSizeChange(val) {
296
+      this.limit = val
297
+      this.GetDrugStock()
298
+    },
299
+    handleCurrentChange(val) {
300
+      this.page = val
301
+      this.GetDrugStock()
302
+    },
303
+    selectCostInfo(selection, row) {
304
+      this.selection = selection
305
+    }, changeCostInfoTableData(val) {
306
+      this.selection = val
307
+    }, changeAllCostInfoTableData(selection) {
308
+      this.selection = selection
309
+    },
310
+    delete(){
311
+
312
+
313
+    },
314
+    exportdata(){
315
+      let list = []
316
+      // for (let i = 0; i < this.tableData.length; i++) {
317
+      //   let order = this.tableData[i]
318
+      //   let name = order.name
319
+      //   let item_name = order.item_name
320
+      //   let count = order.count
321
+      //   let price = order.price.toFixed(2)
322
+      //   let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
323
+      //   let total = order.total.toFixed(2)
324
+      //
325
+      //   let obj = {
326
+      //     '患者姓名': name,
327
+      //     '项目名称': item_name,
328
+      //     '数量': count,
329
+      //     '单价': price,
330
+      //     '费用': pay_sumamt,
331
+      //     '费用总额': total
332
+      //   }
333
+      //   list.push(obj)
334
+      // }
335
+      import('@/vendor/Export2Excel').then(excel => {
336
+        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
337
+        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
338
+        const data = this.formatJson(filterVal, list)
339
+        excel.export_json_to_excel1({
340
+          header: tHeader,
341
+          data,
342
+          filename: '明细',
343
+          ref: this.$refs['table'].$el
344
+        })
345
+      })
346
+
347
+    },formatJson(filterVal, jsonData) {
348
+      return jsonData.map(v => filterVal.map(j => v[j]))
349
+    },
350
+    change_stock(){
351
+      let ids  = ""
352
+      for (var i = 0; i < this.selection.length; i++){
353
+        if (ids.length == 0){
354
+          ids = this.selection[i].id
355
+        }else{
356
+          ids = ids + "," + this.selection[i].id
357
+        }
358
+      }
359
+      var that = this;
360
+      let params = {
361
+        ids:ids,
362
+        admin_user_id:this.$store.getters.xt_user.user.id
363
+      };
364
+      axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
365
+        if (response.data.state == 0) {
366
+          that.$message.error(response.data.data.msg);
367
+          return false
368
+        } else {
369
+          if(response.data.data.failed_code == -10){
370
+            that.$confirm(response.data.data.msg, '医保错误信息', {
371
+              confirmButtonText: '确 定',
372
+              type: 'warning'
373
+            }).then(() => {
374
+            }).catch(() => {
375
+            })
376
+          }else{
377
+
378
+          }
379
+        }
380
+      }).catch(function(error) {
381
+      })
382
+
383
+    },
384
+    query(){
385
+      this.GetDrugStock()
386
+
387
+    },
388
+    change(){
389
+
390
+
391
+    },getDrugType(id) {
392
+      var name = "";
393
+      for (let i = 0; i < this.drugTypeList.length; i++) {
394
+        if (this.drugTypeList[i].id == id) {
395
+          name = this.drugTypeList[i].name;
396
+        }
397
+      }
398
+
399
+      return name;
400
+    },  getTime(val) {
401
+      if(val == "" || val == undefined){
402
+        return ""
403
+      }else {
404
+        return uParseTime(val, '{y}-{m}-{d}')
405
+      }
406
+    },GetDrugStock(){
407
+      this.tableData = []
408
+      let params = {
409
+        start_time: this.start_time,
410
+        end_time: this.end_time,
411
+        page:this.page,
412
+        limit:this.limit,
413
+        is_sale:this.is_sale,
414
+        is_bg:this.change_type
415
+      }
416
+      GetDrugChangeStock(params).then(response => {
417
+        if (response.data.state == 0) {
418
+          this.$message.error(response.data.msg)
419
+          return false
420
+        } else {
421
+          this.value = response.data.data.total
422
+          for(let i =0; i < response.data.data.info.length; i++){
423
+            let obj = {
424
+              id:response.data.data.info[i].id,
425
+              drug_name:response.data.data.info[i].BaseDrugLib.drug_name,
426
+              drug_type:this.getDrugType(response.data.data.info[i].BaseDrugLib.drug_type),
427
+              spec: response.data.data.info[i].BaseDrugLib.dose + response.data.data.info[i].BaseDrugLib.dose_unit + "*" + response.data.data.info[i].BaseDrugLib.min_number + response.data.data.info[i].BaseDrugLib.min_unit+"/" +response.data.data.info[i].BaseDrugLib.max_unit,
428
+              code:response.data.data.info[i].BaseDrugLib.medical_insurance_number,
429
+              batch_number:response.data.data.info[i].batch_number,
430
+              count: response.data.data.info[i].PCount,
431
+              p_date:this.getTime(response.data.data.info[i].PDate),
432
+              e_date:(response.data.data.info[i].SDate),
433
+              is_sale:response.data.data.info[i].is_sale,
434
+              pc_date:response.data.data.info[i].pc_date,
435
+              is_bg:response.data.data.info[i].is_change,
436
+              unit:response.data.data.info[i].Unit
437
+            }
438
+            this.tableData.push(obj)
439
+          }
440
+        }
441
+      })
442
+    },
443
+    changeStock(){
444
+
445
+
446
+    },
447
+  },
448
+  created() {
449
+    var drugTypeList = getDictionaryDataConfig("system", "drug_type");
450
+    this.drugTypeList.push(...drugTypeList);
451
+  this.GetDrugStock()
452
+  }
453
+}
454
+</script>
455
+

+ 200 - 0
src/xt_pages/outpatientTool/drugQuery.vue Voir le fichier

@@ -0,0 +1,200 @@
1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div class="cell clearfix">
5
+        <span>入库时间:</span>
6
+        <el-date-picker
7
+          size="small"
8
+          v-model="start_time"
9
+          prefix-icon="el-icon-date"
10
+          :editable="false"
11
+          style="width: 196px;"
12
+          type="date"
13
+          placeholder="选择日期时间"
14
+          align="right"
15
+          format="yyyy-MM-dd"
16
+          value-format="yyyy-MM-dd"
17
+          @change="startTimeChange"
18
+        ></el-date-picker>-
19
+        <el-date-picker
20
+          size="small"
21
+          v-model="end_time"
22
+          prefix-icon="el-icon-date"
23
+          :editable="false"
24
+          style="width: 196px;margin-right:10px;"
25
+          type="date"
26
+          placeholder="选择日期时间"
27
+          align="right"
28
+          format="yyyy-MM-dd"
29
+          value-format="yyyy-MM-dd"
30
+          @change="endTimeChange"
31
+        ></el-date-picker>
32
+      </div>
33
+
34
+
35
+      <div>
36
+        <div>查询类型:</div>
37
+        <el-select size="small" v-model="sale_type" placeholder="请选择"
38
+                   style="width:100px;margin-left:10px;" @change="changeStock">
39
+          <el-option
40
+            v-for="item,index in items"
41
+            :key="index"
42
+            :label="item.name"
43
+            :value="item.id">
44
+          </el-option>
45
+        </el-select>
46
+      </div>
47
+
48
+      <div>
49
+        <div>药品:</div>
50
+        <el-select size="small" v-model="change_type" placeholder="请选择"
51
+                   style="width:100px;margin-left:10px;" @change="change">
52
+          <el-option
53
+            v-for="item,index in changes"
54
+            :key="index"
55
+            :label="item.name"
56
+            :value="item.id">
57
+          </el-option>
58
+        </el-select>
59
+      </div>
60
+      <div>
61
+        <el-button type="primary" @click="query()">查询</el-button>
62
+        <el-button type="primary" @click="stock()">变更</el-button>
63
+        <el-button type="primary" @click="exportdata()">导出</el-button>
64
+
65
+        <!--        <el-button type="primary" @click="change()">变更</el-button>-->
66
+      </div>
67
+    </div>
68
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
69
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
70
+              max-height="600"
71
+              highlight-current-row>
72
+      <el-table-column align="center" prop="name" label="药品名称">
73
+        <template slot-scope="scope"></template>
74
+      </el-table-column>
75
+      <el-table-column align="center" prop="name" label="药品类型">
76
+        <template slot-scope="scope"></template>
77
+      </el-table-column>
78
+      <el-table-column align="center" prop="name" label="规格单位">
79
+        <template slot-scope="scope"></template>
80
+      </el-table-column>
81
+      <el-table-column align="center" prop="name" label="国家编码">
82
+        <template slot-scope="scope"></template>
83
+      </el-table-column>
84
+      <el-table-column align="center" prop="name" label="批号">
85
+        <template slot-scope="scope"></template>
86
+      </el-table-column>
87
+      <el-table-column align="center" prop="name" label="入库数量">
88
+        <template slot-scope="scope">
89
+          <div></div>
90
+        </template>
91
+      </el-table-column>
92
+
93
+      <el-table-column align="center" prop="total" label="生产日期">
94
+        <template slot-scope="scope">
95
+          <div></div>
96
+        </template>
97
+      </el-table-column>
98
+
99
+
100
+      <el-table-column align="center" prop="total" label="有效日期">
101
+        <template slot-scope="scope">
102
+          <div></div>
103
+        </template>
104
+      </el-table-column>
105
+
106
+
107
+      <el-table-column align="center" prop="total" label="盘存状态">
108
+        <template slot-scope="scope">
109
+          <div></div>
110
+        </template>
111
+      </el-table-column>
112
+
113
+      <el-table-column align="center" prop="total" label="盘存日期">
114
+        <template slot-scope="scope">
115
+          <div></div>
116
+        </template>
117
+      </el-table-column>
118
+
119
+      <el-table-column label="操作" width="200">
120
+        <template slot-scope="scope">
121
+          <el-button type="text" @click="stock(scope.row)">盘存</el-button>
122
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
123
+        </template>
124
+      </el-table-column>
125
+    </el-table>
126
+  </div>
127
+
128
+  <!-- </div> -->
129
+</template>
130
+
131
+
132
+<script>
133
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
134
+const moment = require('moment')
135
+export default {
136
+  components: {
137
+    BreadCrumb
138
+  },
139
+  data() {
140
+    return {
141
+      start_time: '',
142
+      end_time: '',
143
+      tableData: [],
144
+      stock_type:"0",
145
+      change_type:"0",
146
+      items: [
147
+        { id: 1, name: '药品库存信息查询' },
148
+        { id: 2, name: '药品库存变更信息查询' },
149
+        { id: 3, name: '药品销售信息查询' },
150
+        { id: 4, name: '入库药品追溯信息查询' },
151
+        { id: 5, name: '药品销售追溯信息查询' },
152
+        { id: 6, name: '实时药品库存查询' },
153
+        { id: 7, name: '药品库存明细查询' },
154
+      ],
155
+      drugs: [
156
+        { id: 1, name: '已变更' },
157
+        { id: 2, name: '未变更' },
158
+      ]
159
+    }
160
+  },
161
+  methods: {
162
+    delete(){
163
+
164
+
165
+    },
166
+    exportdata(){
167
+
168
+
169
+    },
170
+    stock(){
171
+
172
+
173
+    },
174
+    query(){
175
+
176
+
177
+    },
178
+    change(){
179
+
180
+
181
+    },
182
+    changeStock(){
183
+
184
+
185
+    },
186
+    endTimeChange(){
187
+
188
+
189
+    },
190
+    startTimeChange(){
191
+
192
+
193
+    },
194
+  },
195
+  created() {
196
+
197
+  }
198
+}
199
+</script>
200
+

+ 440 - 0
src/xt_pages/outpatientTool/drugStock.vue Voir le fichier

@@ -0,0 +1,440 @@
1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div class="cell clearfix">
5
+        <span>入库时间:</span>
6
+        <el-date-picker
7
+          size="small"
8
+          v-model="start_time"
9
+          prefix-icon="el-icon-date"
10
+          :editable="false"
11
+          style="width: 196px;"
12
+          type="date"
13
+          placeholder="选择日期时间"
14
+          align="right"
15
+          format="yyyy-MM-dd"
16
+          value-format="yyyy-MM-dd"
17
+          @change="startTimeChange"
18
+        ></el-date-picker>-
19
+        <el-date-picker
20
+          size="small"
21
+          v-model="end_time"
22
+          prefix-icon="el-icon-date"
23
+          :editable="false"
24
+          style="width: 196px;margin-right:10px;"
25
+          type="date"
26
+          placeholder="选择日期时间"
27
+          align="right"
28
+          format="yyyy-MM-dd"
29
+          value-format="yyyy-MM-dd"
30
+          @change="endTimeChange"
31
+        ></el-date-picker>
32
+      </div>
33
+
34
+
35
+      <div>
36
+        <div>盘存状态:</div>
37
+        <el-select size="small" v-model="stock_type" placeholder="请选择"
38
+                   style="width:100px;margin-left:10px;" @change="changeStock">
39
+          <el-option
40
+            label="不限"
41
+            value="0">
42
+          </el-option>
43
+          <el-option
44
+            v-for="item,index in items"
45
+            :key="index"
46
+            :label="item.name"
47
+            :value="item.id">
48
+          </el-option>
49
+        </el-select>
50
+      </div>
51
+
52
+      <div>
53
+        <div>变更状态:</div>
54
+        <el-select size="small" v-model="change_type" placeholder="请选择"
55
+                   style="width:100px;margin-left:10px;" @change="change">
56
+          <el-option
57
+            label="不限"
58
+            value="0">
59
+          </el-option>
60
+          <el-option
61
+            v-for="item,index in changes"
62
+            :key="index"
63
+            :label="item.name"
64
+            :value="item.id">
65
+          </el-option>
66
+        </el-select>
67
+      </div>
68
+      <div>
69
+        <el-button type="primary" @click="query()">查询</el-button>
70
+        <el-button type="primary" @click="stock()">盘存</el-button>
71
+        <el-button type="primary" @click="exportdata()">导出</el-button>
72
+
73
+        <!--        <el-button type="primary" @click="change()">变更</el-button>-->
74
+      </div>
75
+    </div>
76
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table2"
77
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
78
+              max-height="600"
79
+              @select="selectCostInfo"
80
+              @selection-change="changeCostInfoTableData"
81
+              @select-all="changeAllCostInfoTableData"
82
+              highlight-current-row>
83
+      <el-table-column
84
+        align="center"
85
+        type="selection"
86
+        width="55"
87
+      ></el-table-column>
88
+      <el-table-column align="center" prop="name" label="药品名称">
89
+        <template slot-scope="scope">{{scope.row.drug_name}}</template>
90
+      </el-table-column>
91
+      <el-table-column align="center" prop="name" label="药品类型">
92
+        <template slot-scope="scope">{{scope.row.drug_type}}</template>
93
+      </el-table-column>
94
+      <el-table-column align="center" prop="name" label="规格单位">
95
+        <template slot-scope="scope">{{scope.row.spec}}</template>
96
+      </el-table-column>
97
+      <el-table-column align="center" prop="name" label="国家编码">
98
+        <template slot-scope="scope">{{scope.row.code}}</template>
99
+      </el-table-column>
100
+      <el-table-column align="center" prop="name" label="批号">
101
+        <template slot-scope="scope">{{scope.row.batch_number}}</template>
102
+      </el-table-column>
103
+      <el-table-column align="center" prop="name" label="入库数量">
104
+        <template slot-scope="scope">
105
+          <div>{{scope.row.count}}{{scope.row.unit}}</div>
106
+        </template>
107
+      </el-table-column>
108
+
109
+      <el-table-column align="center" prop="total" label="开方日期">
110
+        <template slot-scope="scope">
111
+          <div>{{scope.row.p_date}}</div>
112
+        </template>
113
+      </el-table-column>
114
+
115
+
116
+      <el-table-column align="center" prop="total" label="结算日期">
117
+        <template slot-scope="scope">
118
+          <div>{{scope.row.e_date}}</div>
119
+        </template>
120
+      </el-table-column>
121
+
122
+
123
+      <el-table-column align="center" prop="total" label="盘存状态">
124
+        <template slot-scope="scope">
125
+          <div>{{scope.row.is_pc?'已盘存':'未盘存'}}</div>
126
+        </template>
127
+      </el-table-column>
128
+
129
+      <el-table-column align="center" prop="total" label="变更状态">
130
+        <template slot-scope="scope">
131
+          <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
132
+        </template>
133
+      </el-table-column>
134
+
135
+      <el-table-column align="center" prop="total" label="盘存日期">
136
+        <template slot-scope="scope">
137
+          <div>{{scope.row.pc_date}}</div>
138
+        </template>
139
+      </el-table-column>
140
+
141
+      <el-table-column label="操作" width="200">
142
+        <template slot-scope="scope">
143
+          <el-button v-if="!scope.row.is_pc || scope.row.is_pc == 0" type="primary" @click="sigle_stock(scope.row)">盘存</el-button>
144
+          <el-button type="primary" @click="deleteStock(scope.row)">删除</el-button>
145
+        </template>
146
+      </el-table-column>
147
+    </el-table>
148
+
149
+
150
+    <el-table v-show="false" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
151
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
152
+              max-height="600"
153
+              @select="selectCostInfo"
154
+              @selection-change="changeCostInfoTableData"
155
+              @select-all="changeAllCostInfoTableData"
156
+              highlight-current-row>
157
+      <el-table-column
158
+        align="center"
159
+        type="selection"
160
+        width="55"
161
+      ></el-table-column>
162
+      <el-table-column align="center" prop="name" label="药品名称">
163
+        <template slot-scope="scope">{{scope.row.drug_name}}</template>
164
+      </el-table-column>
165
+      <el-table-column align="center" prop="name" label="药品类型">
166
+        <template slot-scope="scope">{{scope.row.drug_type}}</template>
167
+      </el-table-column>
168
+      <el-table-column align="center" prop="name" label="规格单位">
169
+        <template slot-scope="scope">{{scope.row.spec}}</template>
170
+      </el-table-column>
171
+      <el-table-column align="center" prop="name" label="国家编码">
172
+        <template slot-scope="scope">{{scope.row.code}}</template>
173
+      </el-table-column>
174
+      <el-table-column align="center" prop="name" label="批号">
175
+        <template slot-scope="scope">{{scope.row.batch_number}}</template>
176
+      </el-table-column>
177
+      <el-table-column align="center" prop="name" label="入库数量">
178
+        <template slot-scope="scope">
179
+          <div>{{scope.row.count}}{{scope.row.unit}}</div>
180
+        </template>
181
+      </el-table-column>
182
+
183
+      <el-table-column align="center" prop="total" label="生产日期">
184
+        <template slot-scope="scope">
185
+          <div>{{scope.row.p_date}}</div>
186
+        </template>
187
+      </el-table-column>
188
+
189
+
190
+      <el-table-column align="center" prop="total" label="有效日期">
191
+        <template slot-scope="scope">
192
+          <div>{{scope.row.e_date}}</div>
193
+        </template>
194
+      </el-table-column>
195
+
196
+
197
+      <el-table-column align="center" prop="total" label="盘存状态">
198
+        <template slot-scope="scope">
199
+          <div>{{scope.row.is_pc?'已盘存':'未盘存'}}</div>
200
+        </template>
201
+      </el-table-column>
202
+
203
+      <el-table-column align="center" prop="total" label="变更状态">
204
+        <template slot-scope="scope">
205
+          <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
206
+        </template>
207
+      </el-table-column>
208
+
209
+      <el-table-column align="center" prop="total" label="盘存日期">
210
+        <template slot-scope="scope">
211
+          <div>{{scope.row.pc_date}}</div>
212
+        </template>
213
+      </el-table-column>
214
+
215
+    </el-table>
216
+
217
+  </div>
218
+
219
+  <!-- </div> -->
220
+</template>
221
+
222
+
223
+<script>
224
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
225
+import { GetDrugStock } from '../../api/new_stock/stock'
226
+const moment = require('moment')
227
+import { getDictionaryDataConfig } from "@/utils/data";
228
+import { uParseTime } from '@/utils/tools'
229
+import axios from 'axios'
230
+
231
+export default {
232
+  components: {
233
+    BreadCrumb
234
+  },
235
+  data() {
236
+    return {
237
+      drugTypeList: [{ id: 0, name: "全部" }],
238
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
239
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
240
+      tableData: [],
241
+      stock_type:"0",
242
+      change_type:"0",
243
+      selection:[],
244
+      items: [
245
+        { id: 1, name: '已盘存' },
246
+        { id: 2, name: '未盘存' },
247
+      ],
248
+      changes: [
249
+        { id: 1, name: '已变更' },
250
+        { id: 2, name: '未变更' },
251
+      ]
252
+    }
253
+  },
254
+  methods: {
255
+    sigle_stock(row){
256
+      let ids  = row.id
257
+      var that = this;
258
+      let params = {
259
+        ids:ids,
260
+        admin_user_id:this.$store.getters.xt_user.user.id
261
+      };
262
+      axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
263
+        if (response.data.state == 0) {
264
+          that.$message.error(response.data.data.msg);
265
+          return false
266
+        } else {
267
+          if(response.data.data.failed_code == -10){
268
+            that.$confirm(response.data.data.msg, '医保错误信息', {
269
+              confirmButtonText: '确 定',
270
+              type: 'warning'
271
+            }).then(() => {
272
+            }).catch(() => {
273
+            })
274
+          }else{
275
+
276
+          }
277
+        }
278
+      }).catch(function(error) {
279
+      })
280
+
281
+    },
282
+    selectCostInfo(selection, row) {
283
+      this.selection = selection
284
+    }, changeCostInfoTableData(val) {
285
+      this.selection = val
286
+    }, changeAllCostInfoTableData(selection) {
287
+      this.selection = selection
288
+    },
289
+    deleteStock(){
290
+
291
+
292
+    },
293
+    exportdata(){
294
+      let list = []
295
+      // for (let i = 0; i < this.tableData.length; i++) {
296
+      //   let order = this.tableData[i]
297
+      //   let name = order.name
298
+      //   let item_name = order.item_name
299
+      //   let count = order.count
300
+      //   let price = order.price.toFixed(2)
301
+      //   let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
302
+      //   let total = order.total.toFixed(2)
303
+      //
304
+      //   let obj = {
305
+      //     '患者姓名': name,
306
+      //     '项目名称': item_name,
307
+      //     '数量': count,
308
+      //     '单价': price,
309
+      //     '费用': pay_sumamt,
310
+      //     '费用总额': total
311
+      //   }
312
+      //   list.push(obj)
313
+      // }
314
+      import('@/vendor/Export2Excel').then(excel => {
315
+        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
316
+        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
317
+        const data = this.formatJson(filterVal, list)
318
+        excel.export_json_to_excel1({
319
+          header: tHeader,
320
+          data,
321
+          filename: '明细',
322
+          ref: this.$refs['table'].$el
323
+        })
324
+      })
325
+
326
+    },formatJson(filterVal, jsonData) {
327
+      return jsonData.map(v => filterVal.map(j => v[j]))
328
+    },
329
+    stock(){
330
+      console.log(this.selection)
331
+      let ids  = ""
332
+      for (var i = 0; i < this.selection.length; i++){
333
+        if (ids.length == 0){
334
+          ids = this.selection[i].id
335
+        }else{
336
+          ids = ids + "," + this.selection[i].id
337
+        }
338
+      }
339
+      var that = this;
340
+      let params = {
341
+        ids:ids,
342
+        admin_user_id:this.$store.getters.xt_user.user.id
343
+      };
344
+      axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
345
+        if (response.data.state == 0) {
346
+          that.$message.error(response.data.data.msg);
347
+          return false
348
+        } else {
349
+          if(response.data.data.failed_code == -10){
350
+            that.$confirm(response.data.data.msg, '医保错误信息', {
351
+              confirmButtonText: '确 定',
352
+              type: 'warning'
353
+            }).then(() => {
354
+            }).catch(() => {
355
+            })
356
+          }else{
357
+
358
+          }
359
+        }
360
+      }).catch(function(error) {
361
+      })
362
+    },
363
+    query(){
364
+      this.GetDrugStock()
365
+
366
+
367
+    },
368
+    change(){
369
+
370
+
371
+    },
372
+    changeStock(){
373
+
374
+
375
+    },
376
+    endTimeChange(){
377
+
378
+
379
+    }, getDrugType(id) {
380
+      var name = "";
381
+      for (let i = 0; i < this.drugTypeList.length; i++) {
382
+        if (this.drugTypeList[i].id == id) {
383
+          name = this.drugTypeList[i].name;
384
+        }
385
+      }
386
+
387
+      return name;
388
+    },  getTime(val) {
389
+      if(val == "" || val == undefined){
390
+        return ""
391
+      }else {
392
+        return uParseTime(val, '{y}-{m}-{d}')
393
+      }
394
+    },
395
+    startTimeChange(){
396
+
397
+
398
+    },GetDrugStock(){
399
+      this.tableData = []
400
+      let params = {
401
+        start_time: this.start_time,
402
+        end_time: this.end_time,
403
+        is_pc:this.stock_type,
404
+        is_bg:this.change_type
405
+      }
406
+      GetDrugStock(params).then(response => {
407
+        if (response.data.state == 0) {
408
+          this.$message.error(response.data.msg)
409
+          return false
410
+        } else {
411
+          for(let i =0; i < response.data.data.info.length; i++){
412
+            let obj = {
413
+              id:response.data.data.info[i].id,
414
+              drug_name:response.data.data.info[i].drug.drug_name,
415
+              drug_type:this.getDrugType(response.data.data.info[i].drug.drug_type),
416
+              spec: response.data.data.info[i].drug.dose + response.data.data.info[i].drug.dose_unit + "*" + response.data.data.info[i].drug.min_number + response.data.data.info[i].drug.min_unit+"/" +response.data.data.info[i].drug.max_unit,
417
+              code:response.data.data.info[i].drug.medical_insurance_number,
418
+              batch_number:response.data.data.info[i].batch_number,
419
+              count: response.data.data.info[i].warehousing_count,
420
+              p_date:this.getTime(response.data.data.info[i].product_date),
421
+              e_date:this.getTime(response.data.data.info[i].expiry_date),
422
+              is_pc:response.data.data.info[i].is_pc,
423
+              pc_date:response.data.data.info[i].pc_date,
424
+              is_bg:response.data.data.info[i].is_bg,
425
+              unit: response.data.data.info[i].max_unit,
426
+            }
427
+            this.tableData.push(obj)
428
+          }
429
+        }
430
+      })
431
+    }
432
+  },
433
+  created() {
434
+    var drugTypeList = getDictionaryDataConfig("system", "drug_type");
435
+    this.drugTypeList.push(...drugTypeList);
436
+    this.GetDrugStock()
437
+  }
438
+}
439
+</script>
440
+

+ 2 - 2
src/xt_pages/outpatientTool/org_export_data.vue Voir le fichier

@@ -671,7 +671,7 @@ export default {
671 671
                   maf = maf + order.orders[b].maf_pay
672 672
                   acct = 0.00
673 673
                   gongwuyuan = gongwuyuan + order.orders[b].cvlserv_pay
674
-                  danweibuchong = danweibuchong + order.orders[b].hifes_pay
674
+                  // danweibuchong = danweibuchong + order.orders[b].
675 675
                   daeyiliao = daeyiliao + order.orders[b].hifob_pay
676 676
 
677 677
                 }
@@ -683,7 +683,7 @@ export default {
683 683
                 obj["小计I+II"] = qifuxian_1 + bili_2
684 684
                 obj["基本统筹基金"] = hifp
685 685
                 obj["公务员补助"] = gongwuyuan
686
-                obj["单位补充保险"] = danweibuchong
686
+                obj["单位补充保险"] = hifm
687 687
                 obj["煤矿补充保险"] = ""
688 688
                 obj["超封顶线费用"] = chaofengding
689 689
                 obj["大额医疗保险应付"] = daeyiliao

+ 6 - 1
src/xt_pages/user/ktv.vue Voir le fichier

@@ -694,7 +694,12 @@ export default {
694 694
         this.$message.error("透后体重不能为空")
695 695
         return
696 696
       }
697
-      value = ((-Math.log((valueTwo /valueOne - (0.008 * valueThree)))) +  (4-3.5*(valueTwo/valueOne)) * valueFour/valueSix).toFixed(5)
697
+      console.log((-Math.log((valueTwo / valueOne - (0.008 * valueThree)))) )
698
+      console.log((4-3.5*(valueTwo/valueOne)))
699
+
700
+      console.log((4-3.5*(valueTwo/valueOne)) * valueFour/valueSix)
701
+
702
+      value = ((-Math.log((valueTwo / valueOne - (0.008 * valueThree)))) +  (4-3.5*(valueTwo/valueOne)) * valueFour/valueSix).toFixed(5)
698 703
 
699 704
       for(let i = 0; i < items.length; i++){
700 705
         if(items[i].item_name == "KT/V"){