Przeglądaj źródła

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 6 miesięcy temu
rodzic
commit
ff39a45ff2

+ 28 - 0
src/api/new_stock/stock.js Wyświetl plik

@@ -16,3 +16,31 @@ export function GetDrugChangeStock(params) {
16 16
 
17 17
   })
18 18
 }
19
+
20
+
21
+export function getHisDrugCodeQueryList(params){
22
+
23
+  return request({
24
+    url:"/api/drug/gethisdrugcodequery",
25
+    method:"get",
26
+    params:params
27
+  })
28
+}
29
+
30
+export function createUploadDrugCode(params){
31
+ 
32
+  return request({
33
+    url:"/api/drug/createuploaddrugcode",
34
+    method:"get",
35
+    params:params,
36
+  })
37
+}
38
+
39
+export function getPatientDrugCode(params){
40
+ 
41
+  return request({
42
+    url:"/api/drug/getpatientdrugcode",
43
+    method:"Get",
44
+    params:params,
45
+  })
46
+}

+ 1 - 0
src/lang/en.js Wyświetl plik

@@ -130,6 +130,7 @@ export default {
130 130
     objectRegistration:'objectRegistration',
131 131
     Dialysisanalysis:'Dialysisanalysis',
132 132
     eleFaPiao:'eleFaPiao',
133
+
133 134
   },
134 135
   navbar: {
135 136
     logOut: 'Log Out',

+ 5 - 0
src/lang/zh.js Wyświetl plik

@@ -313,6 +313,11 @@ export default {
313 313
     patientSettleDetail:"患者结算列表",
314 314
     fapiao:"电子发票列表",
315 315
 
316
+    drugStock:"药品盘存",
317
+    drugChange:"药品变更",
318
+    drugQuery:"药品查询",
319
+    drugCodeQuery:"药品追溯",
320
+    drugSourceCode:"药品追溯"
316 321
   },
317 322
   navbar: {
318 323
     logOut: '退出登录',

+ 3 - 0
src/router/index.js Wyświetl plik

@@ -38,6 +38,8 @@ import hospitalCharges from './modules/hospitalCharges'
38 38
 import DepositManagement from './modules/DepositManagement'
39 39
 import hisTool from './modules/hisTool'
40 40
 import eleFaPiao from './modules/eleFaPiao'
41
+import drugSourceCode from './modules/drugSourceCode'
42
+
41 43
 
42 44
 import supply from './modules/supply'
43 45
 
@@ -210,6 +212,7 @@ var _asy_router_map = [
210 212
   Dialysisanalysis,// 新菜单6.1
211 213
   DialysisIndex,
212 214
   DialysisLogIndex,
215
+  drugSourceCode
213 216
 ]
214 217
 
215 218
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 43 - 0
src/router/modules/drugSourceCode.js Wyświetl plik

@@ -0,0 +1,43 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+
4
+export default {
5
+  path: '/drugSourceCode',
6
+  component: Layout,
7
+  redirect: 'noredirect',
8
+  name: 'drugSourceCode',
9
+  alwaysShow: true,
10
+  meta: {
11
+    title: 'drugSourceCode',
12
+    icon: 'drugSourceCode',
13
+    isChild: true
14
+  },
15
+  children: [
16
+    {
17
+      path: '/drugSourceCode/drugStock',
18
+      component: () => import('@/xt_pages/drugSourceCode/drugStock'),
19
+      name: 'drugStock',
20
+      meta: { title: 'drugStock', noCache: true }
21
+    },
22
+    {
23
+      path: '/drugSourceCode/drugChange',
24
+      component: () => import('@/xt_pages/drugSourceCode/drugChange'),
25
+      name: 'drugChange',
26
+      meta: { title: 'drugChange', noCache: true },
27
+    },
28
+    {
29
+      path: '/drugSourceCode/drugQuery',
30
+      component: () => import('@/xt_pages/drugSourceCode/drugQuery'),
31
+      name: 'drugQuery',
32
+      meta: { title: 'drugQuery', noCache: true },
33
+    },
34
+    {
35
+      path: '/drugSourceCode/drugCodeQuery',
36
+      component: () => import('@/xt_pages/drugSourceCode/drugCodeQuery'),
37
+      name: 'drugCodeQuery',
38
+      meta: { title: 'drugCodeQuery', noCache: true },
39
+    },
40
+
41
+
42
+  ]
43
+}

+ 1 - 28
src/router/modules/hisTool.js Wyświetl plik

@@ -101,7 +101,7 @@ export default {
101 101
     //   component: () => import('@/xt_pages/outpatientTool/fapiao'),
102 102
     //   name: 'faPiao',
103 103
     //   meta: { title: 'faPiao', noCache: true }
104
-    // }, 
104
+    // },
105 105
     {
106 106
       path: '/hisTool/yidiClear',
107 107
       component: () => import('@/xt_pages/outpatientTool/yidiClear'),
@@ -176,33 +176,6 @@ export default {
176 176
       meta: { title: 'orgExportData', noCache: true }
177 177
     },
178 178
 
179
-        { //药品盘存
180
-          path: '/outpatientTool/drugStock',
181
-          component: () => import('@/xt_pages/outpatientTool/drugStock'),
182
-          name: 'drugStock',
183
-          meta: {
184
-            title: '药品盘存',
185
-            noCache: true
186
-          }
187
-        },
188
-        {//药品变更
189
-          path: '/outpatientTool/drugChange',
190
-          component: () => import('@/xt_pages/outpatientTool/drugChange'),
191
-          name: 'drugChange',
192
-          meta: {
193
-            title: '药品变更',
194
-            noCache: true
195
-          }
196
-        },
197
-        {//药品查询
198
-          path: '/outpatientTool/drugQuery',
199
-          component: () => import('@/xt_pages/outpatientTool/drugQuery'),
200
-          name: 'drugQuery',
201
-          meta: {
202
-            title: '药品查询',
203
-            noCache: true
204
-          },
205
-        },
206 179
     // {
207 180
     //   path: '/fapiao/settle',
208 181
     //   component: () => import('@/xt_pages/fapiao/settleDetail'),

+ 1 - 1
src/views/layout/components/Sidebar/index.vue Wyświetl plik

@@ -69,7 +69,7 @@ export default {
69 69
     navTitle:{
70 70
       handler(newVal,oldVal){
71 71
         if(newVal == 'HIS管理'){
72
-          let nameArr = ['hospitalStation','hospitalRecord','hospitalCharges','DepositManagement','hisTool','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','eleFaPiao'];
72
+          let nameArr = ['hospitalStation','hospitalRecord','hospitalCharges','DepositManagement','hisTool','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','eleFaPiao','drugSourceCode'];
73 73
           // console.log('permission_routers',this.permission_routers)
74 74
           let routerArr = [];
75 75
           this.permission_routers.map(item => {

+ 222 - 36
src/xt_pages/Pharmacy/PatientDispensing.vue Wyświetl plik

@@ -142,7 +142,7 @@
142 142
               </el-option>
143 143
             </el-select>
144 144
           </div>
145
-          
145
+
146 146
 
147 147
           <div>
148 148
             <el-button type="primary" @click="toExport" v-if="state == 2"
@@ -228,7 +228,7 @@
228 228
             </el-table-column>
229 229
             <el-table-column label="药品追溯码" width="162" align="center">
230 230
               <template slot-scope="scope">
231
-                <div @click="getDrugCode(scope.row.ID,scope.row.DataSources,scope.row.DrugCode,scope.$index)"><el-input style="width: 100;" v-model="scope.row.DrugCode"></el-input></div> 
231
+                <div @click="getDrugCode(scope.row.ID,scope.row.DataSources,scope.row.DrugCode,scope.$index)"><el-input style="width: 100;" v-model="scope.row.DrugCode"></el-input></div>
232 232
               </template>
233 233
             </el-table-column>
234 234
             <el-table-column label="开立医生" width="150" align="center">
@@ -249,7 +249,7 @@
249 249
               </template>
250 250
             </el-table-column>
251 251
 
252
-        
252
+
253 253
             <el-table-column label="备注" width="170" align="center">
254 254
               <template slot-scope="scope">
255 255
                 <span>{{ scope.row.Remarks ? scope.row.Remarks : "" }}</span>
@@ -265,6 +265,11 @@
265 265
           <el-radio v-model="is_open" label="1">是</el-radio>
266 266
           <el-radio v-model="is_open" label="2">否</el-radio>
267 267
         </span>
268
+        <span style="font-size: 17px">请选择是否发药时上传追溯码</span>
269
+        <span style="display: block; padding: 18px 25px">
270
+          <el-radio v-model="is_drug_open" label="1">是</el-radio>
271
+          <el-radio v-model="is_drug_open" label="2">否</el-radio>
272
+        </span>
268 273
         <div
269 274
           style="
270 275
             height: 50px;
@@ -301,13 +306,15 @@
301 306
         <el-button type="primary" @click="saveTextArea()">确 定</el-button>
302 307
       </span>
303 308
       </el-dialog>
309
+
310
+
304 311
     </div>
305 312
 
306 313
     <patient-print
307 314
       ref="patientprint"
308 315
       :visibility="isVisibility"
309 316
       :propsTable="propsTable"
310
-      
317
+
311 318
     >
312 319
     </patient-print>
313 320
     <patientPrintTwo ref="patientprintTwo"
@@ -334,6 +341,7 @@ import {
334 341
   changeDrugCode
335 342
 } from "@/api/pharmacy";
336 343
 import dataDruguse from "../../router/modules/dataDruguse";
344
+import axios from 'axios'
337 345
 const moment = require("moment");
338 346
 export default {
339 347
   components: {
@@ -388,6 +396,11 @@ export default {
388 396
       drug_code:0,
389 397
       currentRow:{},
390 398
       currentIndex:0,
399
+      is_drug_open:"2",
400
+      textarea:"",
401
+
402
+
403
+      drug_code_open:0,
391 404
 
392 405
     };
393 406
   },
@@ -524,6 +537,7 @@ export default {
524 537
           this.waitmount = res.data.data.itotal;
525 538
           this.alreadmount = res.data.data.wtotal;
526 539
           this.drugList = res.data.data.drug
540
+          this.drug_code_open = response.data.data.config.is_open
527 541
         }
528 542
       });
529 543
       // console.log("2222222")
@@ -610,7 +624,7 @@ export default {
610 624
             age:res.data.data.patients.age,
611 625
             gender: res.data.data.patients.gender,
612 626
             diagnose:res.data.data.patients.diagnose,
613
-            zhixing:res.data.data.patients.created_time      
627
+            zhixing:res.data.data.patients.created_time
614 628
           }
615 629
           this.patients =obj
616 630
           if(this.$store.getters.xt_user.org.id == 10188 || this.$store.getters.xt_user.org.id == 10217 || this.$store.getters.xt_user.org.id == 10387 ||  this.$store.getters.xt_user.org.id == 0  ||  this.$store.getters.xt_user.org.id == 10480  ){
@@ -662,8 +676,8 @@ export default {
662 676
         }
663 677
       }
664 678
 
665
-      
666
-      
679
+
680
+
667 681
     },
668 682
     toExport() {
669 683
       import("@/vendor/Export2Excel").then((excel) => {
@@ -727,16 +741,93 @@ export default {
727 741
 
728 742
     // 药品发药
729 743
     dispense() {
730
-      var tmp = this.currentRow.PatientID;
731
-      var params = {
732
-        patient_id: this.currentRow.PatientID,
733
-        time: this.start_time,
734
-      };
735
-      this.$confirm("确定是否对该患者进行发药?", "患者发药", {
736
-        confirmButtonText: "确 定",
737
-        cancelButtonText: "取 消",
738
-        type: "warning",
739
-      }).then(() => {
744
+      if (this.is_drug_open == 1){
745
+       var  that= this
746
+        axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
747
+          if (response.data.state == 0) {
748
+            // that.$message.error(response.data.data.msg);
749
+            that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
750
+              confirmButtonText: "确 定",
751
+              cancelButtonText: "取 消",
752
+              type: "warning",
753
+            }).then(() => {
754
+              var tmp = that.currentRow.PatientID;
755
+              var params = {
756
+                patient_id: that.currentRow.PatientID,
757
+                time: that.start_time,
758
+              };
759
+              that.$confirm("确定是否对该患者进行发药?", "患者发药", {
760
+                confirmButtonText: "确 定",
761
+                cancelButtonText: "取 消",
762
+                type: "warning",
763
+              }).then(() => {
764
+                dispensingmedicine(params).then((res) => {
765
+                  if (res.data.state == 1) {
766
+                    that.$message.success("操作成功");
767
+                    that.gettodaynumber();
768
+                    that.searchAction();
769
+                    that.tableData = null;
770
+                    that.fun4(tmp);
771
+                    that.state = 2;
772
+
773
+                    //进行追溯码上传
774
+                    axios.get('http://127.0.0.1:9532/api/changedrug/four', {
775
+                      params:params
776
+                    })
777
+                      .then(function(response) {
778
+                        if (response.data.state == 0) {
779
+                          that.$message.error(response.data.msg)
780
+                          return false
781
+                        } else {
782
+                          if (response.data.data.failed_code == -10) {
783
+                            that.$confirm(response.data.data.msg, '医保错误信息', {
784
+                              confirmButtonText: '确 定',
785
+                              type: 'warning'
786
+                            }).then(() => {
787
+
788
+                            }).catch(() => {
789
+                            })
790
+
791
+                          } else {
792
+
793
+                          }
794
+                        }
795
+                      })
796
+                      .catch(function(error) {
797
+                      })
798
+                  } else {
799
+                    that.$message.error(res.data.msg);
800
+                  }
801
+                });
802
+              })
803
+                .catch(() => {});
804
+            })
805
+              .catch(() => {});
806
+            return false
807
+          } else {
808
+
809
+          }
810
+        }).catch(function(error) {
811
+          that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
812
+            confirmButtonText: "确 定",
813
+            cancelButtonText: "取 消",
814
+            type: "warning",
815
+          }).then(() => {
816
+          })
817
+            .catch(() => {});
818
+        })
819
+
820
+      }else{
821
+        var tmp = this.currentRow.PatientID;
822
+        var params = {
823
+          patient_id: this.currentRow.PatientID,
824
+          time: this.start_time,
825
+        };
826
+        this.$confirm("确定是否对该患者进行发药?", "患者发药", {
827
+          confirmButtonText: "确 定",
828
+          cancelButtonText: "取 消",
829
+          type: "warning",
830
+        }).then(() => {
740 831
           dispensingmedicine(params).then((res) => {
741 832
             if (res.data.state == 1) {
742 833
               this.$message.success("操作成功");
@@ -745,13 +836,18 @@ export default {
745 836
               this.tableData = null;
746 837
               this.fun4(tmp);
747 838
               this.state = 2;
748
-           
839
+
840
+
749 841
             } else {
750 842
               this.$message.error(res.data.msg);
751 843
             }
752 844
           });
753 845
         })
754
-        .catch(() => {});
846
+          .catch(() => {});
847
+      }
848
+
849
+
850
+
755 851
     },
756 852
 
757 853
     toSetting() {
@@ -760,34 +856,117 @@ export default {
760 856
           this.dialogVisible = true;
761 857
           var config = response.data.data.config;
762 858
           this.is_open = config.is_open.toString();
859
+          var codeConfig = response.data.data.codeConfig
860
+          this.is_drug_open = codeConfig.is_open.toString()
763 861
         }
764 862
       });
765 863
     },
766 864
     SaveSetting() {
767 865
       var params = {
768 866
         is_open: parseInt(this.is_open),
867
+        is_drug_open:parseInt(this.is_drug_open)
769 868
       };
770 869
       SaveSetting(params).then((response) => {
771 870
         if (response.data.state == 1) {
772 871
           var config = response.data.data.config;
773 872
           this.$message.success("保存成功!");
774
-         
873
+
775 874
           this.dialogVisible = false;
776 875
         }
777 876
       });
778 877
     },
779 878
     // 药品退药
780 879
     endispense() {
781
-      var tmp = this.currentRow.PatientID;
782
-      var params = {
783
-        patient_id: this.currentRow.PatientID,
784
-        time: this.start_time,
785
-      };
786
-      this.$confirm("确定是否对该患者进行退药?", "患者退药", {
787
-        confirmButtonText: "确 定",
788
-        cancelButtonText: "取 消",
789
-        type: "warning",
790
-      }).then(() => {
880
+      if (this.is_drug_open == 1){
881
+        var  that= this
882
+        axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
883
+          if (response.data.state == 0) {
884
+            // that.$message.error(response.data.data.msg);
885
+            that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
886
+              confirmButtonText: "确 定",
887
+              cancelButtonText: "取 消",
888
+              type: "warning",
889
+            }).then(() => {
890
+
891
+            })
892
+              .catch(() => {
893
+
894
+              });
895
+            return false
896
+          } else {
897
+            var tmp = that.currentRow.PatientID;
898
+            var params = {
899
+              patient_id: that.currentRow.PatientID,
900
+              time: that.start_time,
901
+            };
902
+            that.$confirm("确定是否对该患者进行退药?", "患者退药", {
903
+              confirmButtonText: "确 定",
904
+              cancelButtonText: "取 消",
905
+              type: "warning",
906
+            }).then(() => {
907
+              drugwithdrawal(params).then((res) => {
908
+                if (res.data.state == 1) {
909
+                  that.$message.success("操作成功");
910
+                  that.gettodaynumber();
911
+                  that.searchAction();
912
+                  that.tableData = null;
913
+                  that.fun5(tmp);
914
+                  that.state = 1;
915
+
916
+                  //进行追溯码上传
917
+                  axios.get('http://127.0.0.1:9532/api/delete_xs_bg_two', {
918
+                    params:params
919
+                  })
920
+                    .then(function(response) {
921
+                      if (response.data.state == 0) {
922
+                        that.$message.error(response.data.msg)
923
+                        return false
924
+                      } else {
925
+                        if (response.data.data.failed_code == -10) {
926
+                          that.$confirm(response.data.data.msg, '医保错误信息', {
927
+                            confirmButtonText: '确 定',
928
+                            type: 'warning'
929
+                          }).then(() => {
930
+
931
+                          }).catch(() => {
932
+                          })
933
+
934
+                        } else {
935
+
936
+                        }
937
+                      }
938
+                    })
939
+                    .catch(function(error) {
940
+                    })
941
+
942
+                } else {
943
+                  that.$message.error(res.data.msg);
944
+                }
945
+              });
946
+            })
947
+              .catch(() => {});
948
+
949
+          }
950
+        }).catch(function(error) {
951
+          that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
952
+            confirmButtonText: "确 定",
953
+            cancelButtonText: "取 消",
954
+            type: "warning",
955
+          }).then(() => {
956
+          })
957
+            .catch(() => {});
958
+        })
959
+      }else{
960
+        var tmp = this.currentRow.PatientID;
961
+        var params = {
962
+          patient_id: this.currentRow.PatientID,
963
+          time: this.start_time,
964
+        };
965
+        this.$confirm("确定是否对该患者进行退药?", "患者退药", {
966
+          confirmButtonText: "确 定",
967
+          cancelButtonText: "取 消",
968
+          type: "warning",
969
+        }).then(() => {
791 970
           drugwithdrawal(params).then((res) => {
792 971
             if (res.data.state == 1) {
793 972
               this.$message.success("操作成功");
@@ -796,15 +975,20 @@ export default {
796 975
               this.tableData = null;
797 976
               this.fun5(tmp);
798 977
               this.state = 1;
978
+
979
+
799 980
             } else {
800 981
               this.$message.error(res.data.msg);
801 982
             }
802 983
           });
803 984
         })
804
-        .catch(() => {});
985
+          .catch(() => {});
986
+
987
+      }
988
+
805 989
     },
806 990
     getDrugName(drug_id){
807
-    
991
+
808 992
       var  medical_insurance_number = ""
809 993
       for(let i=0;i<this.drugList.length;i++){
810 994
        if(drug_id == this.drugList[i].id){
@@ -832,7 +1016,7 @@ export default {
832 1016
        return spc
833 1017
     },
834 1018
     getDrugCode(id,DataSources,DrugCode,index){
835
-      this.id = id 
1019
+      this.id = id
836 1020
       var is_source =0
837 1021
        if (DataSources == "his处方"){
838 1022
         is_source = 1
@@ -870,12 +1054,14 @@ export default {
870 1054
       if (event.key === 'Enter') {
871 1055
         var textarea = ""
872 1056
         textarea += this.textarea + ","
873
-        console.log("textarea-=----------------------",textarea)
1057
+
874 1058
         this.textarea = textarea
875 1059
       }
876
-   
877 1060
 
878
-    }
1061
+
1062
+    },
1063
+
1064
+
879 1065
   },
880 1066
 };
881 1067
 </script>

+ 34 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_eighty.vue Wyświetl plik

@@ -839,6 +839,40 @@
839 839
                             </td>
840 840
                           </tr>
841 841
                         </template>
842
+
843
+                        <tr v-for="(advice, advice_index) in record.his_project" :key="advice_index" v-if="org_id == 0 || org_id ==10206">
844
+                        <td height="32px;padding:1px 1px">
845
+                            <span v-if="advice.start_time">
846
+                                {{ getTime(advice.start_time, "{h}:{i}") }}
847
+                            </span>
848
+                        </td>
849
+                        <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
850
+                            <span style="padding-left:5px;display:inline-block;">
851
+                              <span v-if="advice.type ==2">{{ advice && advice.project ? advice.project.project_name : '' }} {{ advice.count }} {{ advice.unit }}</span>
852
+                              <span v-if="advice.type ==3">{{ advice && advice.good_info ? advice.good_info.good_name : '' }}  {{ advice && advice.good_info ? advice.good_info.specification_name : '' }} {{ advice.count }} {{ advice.unit }}</span>
853
+                            </span>
854
+                        </td>
855
+
856
+                        <td height="32px">
857
+                            <span v-if="setAdminUserES(advice, 'doctor') == ''">
858
+                                {{getAdminUser(advice, 'doctor')}}
859
+                            </span>
860
+                            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
861
+                                <img style="height:30px;" :src="setAdminUserES(advice, 'doctor')" alt srcset />
862
+                            </span>
863
+                        </td>
864
+                        <td height="32px">
865
+                            <span v-if="setAdminUserES(advice, 'execution_staff') == ''">
866
+                                {{getAdminUser(advice, 'execution_staff')}}
867
+                            </span>
868
+                            <span v-else>
869
+                                <img style="height:30px;" :src="setAdminUserES(advice, 'execution_staff')" alt srcset />
870
+                            </span>
871
+                        </td>
872
+                        <td height="32px">
873
+                            <span v-if="advice.execution_time">{{ getTime(advice.execution_time, "{h}:{i}") }}</span>
874
+                        </td>
875
+                        </tr>
842 876
                       </tbody>
843 877
                     </table>
844 878
                   </td>

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Wyświetl plik

@@ -941,7 +941,7 @@
941 941
                             record.prescription &&
942 942
                             record.prescription.displace_liqui_value
943 943
                               ? record.prescription.displace_liqui_value
944
-                              : "/"
944
+                              : "0"
945 945
                           }}
946 946
                           </span>
947 947
                         </div>

+ 43 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyFive.vue Wyświetl plik

@@ -1147,6 +1147,42 @@
1147 1147
                             <span v-if="record.prescription.anticoagulant == 7"
1148 1148
                               >&nbsp;低分子肝素钠</span
1149 1149
                             >
1150
+                            <span v-if="record.prescription.anticoagulant == 8"
1151
+                              >&nbsp;依诺肝素</span
1152
+                            >
1153
+                            <span v-if="record.prescription.anticoagulant == 9"
1154
+                              >&nbsp;达肝素</span
1155
+                            >
1156
+                            <span v-if="record.prescription.anticoagulant == 10"
1157
+                              >&nbsp;体外抗凝</span
1158
+                            >
1159
+                            <span v-if="record.prescription.anticoagulant == 11"
1160
+                              >&nbsp;那屈肝素</span
1161
+                            >
1162
+                            <span v-if="record.prescription.anticoagulant == 12"
1163
+                              >&nbsp;无抗凝剂</span
1164
+                            >
1165
+                            <span v-if="record.prescription.anticoagulant == 13"
1166
+                              >&nbsp;那屈肝素钙</span
1167
+                            >
1168
+                            <span v-if="record.prescription.anticoagulant == 14"
1169
+                              >&nbsp;肝素钙注射液</span
1170
+                            >
1171
+                            <span v-if="record.prescription.anticoagulant == 15"
1172
+                              >&nbsp;甲磺酸萘莫司他</span
1173
+                            >
1174
+                            <span v-if="record.prescription.anticoagulant == 16"
1175
+                              >&nbsp;低分子量肝素钙</span
1176
+                            >
1177
+                            <span v-if="record.prescription.anticoagulant == 17"
1178
+                              >&nbsp;肝素钠</span
1179
+                            >
1180
+                            <span v-if="record.prescription.anticoagulant == 18"
1181
+                              >&nbsp;贝米肝素钠注射液</span
1182
+                            >
1183
+                            <span v-if="record.prescription.anticoagulant == 19"
1184
+                              >&nbsp;低分子量肝素钠</span
1185
+                            >
1150 1186
                           </div>
1151 1187
                         </div>
1152 1188
                         <div class="inline_block" style="margin-left: 20px">
@@ -1162,7 +1198,7 @@
1162 1198
                                 : "/"
1163 1199
                             }}
1164 1200
                           </div>
1165
-                          <span v-if="record.prescription.anticoagulant == 4"
1201
+                          <span v-if="record.prescription.anticoagulant == 4 || record.prescription.anticoagulant == 15"
1166 1202
                             >mg</span
1167 1203
                           >
1168 1204
                           <span v-if="record.prescription.anticoagulant == 3"
@@ -1207,6 +1243,9 @@
1207 1243
                                 : 0
1208 1244
                             }}
1209 1245
                           </div>
1246
+                          <span v-if="record.prescription.anticoagulant == 15"
1247
+                            >mg/h</span
1248
+                          >
1210 1249
                           <span v-if="record.prescription.anticoagulant == 5"
1211 1250
                             >ml/h</span
1212 1251
                           >
@@ -1236,6 +1275,9 @@
1236 1275
                                 : "/"
1237 1276
                             }}
1238 1277
                           </div>
1278
+                          <span v-if="record.prescription.anticoagulant == 15"
1279
+                            >mg</span
1280
+                          >
1239 1281
                           <span v-if="record.prescription.anticoagulant == 4"
1240 1282
                             >mg</span
1241 1283
                           >

+ 1 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue Wyświetl plik

@@ -1921,7 +1921,7 @@ export default {
1921 1921
           this.$message.error(response.data.msg);
1922 1922
           return false;
1923 1923
         } else {
1924
-          if(this.org_id ==10206){
1924
+          if(this.org_id ==10206 || this.org_id == 0){
1925 1925
             this.template_id = 80
1926 1926
             // this.template_id = 81
1927 1927
             console.log("templage-i233232323232322323233232323223",this.template_id)

+ 9 - 8
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Wyświetl plik

@@ -387,7 +387,7 @@
387 387
                 org_id == 10599 || 
388 388
                 org_id == 10612 ||
389 389
                 org_id == 10617 ||
390
-                org_id ==10580 || org_id ==10629 || org_id==10677 || org_id ==10667 || org_id ==10697 || org_id ==10635 || org_id ==10702 || org_id ==10090) &&
390
+                org_id ==10580 || org_id ==10629 || org_id==10677 || org_id ==10667 || org_id ==10697 || org_id ==10635 || org_id ==10702 || org_id ==10090 || org_id ==10723) &&
391 391
                 org_id!=10387
392 392
             "
393 393
           >
@@ -458,7 +458,7 @@
458 458
               && org_id!=10432 && org_id!=10445
459 459
               && org_id!=10410 && org_id!=10495 &&
460 460
                org_id!=10485 && org_id!=10395 && org_id!=10375
461
-               && org_id!=10480  && org_id!=10551 && org_id!=10597 && org_id!=10599 && org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10629 && org_id!=10677 && org_id!=10667 && org_id!=10697 && org_id!=10635  && org_id!=10702  && org_id!=10090)
461
+               && org_id!=10480  && org_id!=10551 && org_id!=10597 && org_id!=10599 && org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10629 && org_id!=10677 && org_id!=10667 && org_id!=10697 && org_id!=10635  && org_id!=10702  && org_id!=10090 && org_id!=10723)
462 462
               || org_id == 10387
463 463
             "
464 464
           >
@@ -529,7 +529,7 @@
529 529
                 org_id == 10410 ||
530 530
                 org_id == 10495  ||
531 531
                 org_id == 10395
532
-                || org_id == 10485 || org_id == 10375 || org_id ==10480 || org_id ==10551 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id==10617 || org_id ==10580 || org_id ==10629 || org_id ==10677 || org_id == 10667 || org_id == 10693 || org_id == 10697 || org_id ==10635 || org_id ==10702 || org_id == 10090)
532
+                || org_id == 10485 || org_id == 10375 || org_id ==10480 || org_id ==10551 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id==10617 || org_id ==10580 || org_id ==10629 || org_id ==10677 || org_id == 10667 || org_id == 10693 || org_id == 10697 || org_id ==10635 || org_id ==10702 || org_id == 10090 || org_id == 10723)
533 533
                 && org_id!=10387
534 534
             "
535 535
           >
@@ -584,7 +584,7 @@
584 584
               org_id!=10432 &&
585 585
               org_id!=10445 &&
586 586
               org_id!=10410 && org_id!=10495
587
-              && org_id!=10485 && org_id!=10395 && org_id!=10375 && org_id!=10480 && org_id!=10551 && org_id!=10597 && org_id!=10599&& org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10629 && org_id!=10677 && org_id!=10667 && org_id!=10693  && org_id!=10697  && org_id!=10635  && org_id!=10702 && org_id!=10090) ||
587
+              && org_id!=10485 && org_id!=10395 && org_id!=10375 && org_id!=10480 && org_id!=10551 && org_id!=10597 && org_id!=10599&& org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10629 && org_id!=10677 && org_id!=10667 && org_id!=10693  && org_id!=10697  && org_id!=10635  && org_id!=10702 && org_id!=10090 && org_id!=10723) ||
588 588
               org_id == 10387
589 589
             "
590 590
           >
@@ -1681,7 +1681,7 @@
1681 1681
                 org_id== 10432 ||
1682 1682
                 org_id== 10445 ||
1683 1683
                 org_id== 10410 ||
1684
-                org_id == 10485 || org_id == 10375 || org_id == 10480 || org_id == 10551 || org_id ==10612 || org_id ==10580 || org_id ==10617 || org_id ==10667 || org_id == 10693 || org_id ==10697 || org_id ==10635 || org_id ==10702 || org_id == 10090) &&
1684
+                org_id == 10485 || org_id == 10375 || org_id == 10480 || org_id == 10551 || org_id ==10612 || org_id ==10580 || org_id ==10617 || org_id ==10667 || org_id == 10693 || org_id ==10697 || org_id ==10635 || org_id ==10702 || org_id == 10090 || org_id == 10723) &&
1685 1685
                 org_id!=10387
1686 1686
             "
1687 1687
           >
@@ -1729,7 +1729,7 @@
1729 1729
               org_id!=10445 &&
1730 1730
               org_id!=10410 &&
1731 1731
               org_id!=10485 &&
1732
-              org_id!=10375 &&  org_id!=10480 &&  org_id!=10551 && org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10667 && org_id!=10693 && org_id!=10697 && org_id!=10635 && org_id!=10702 && org_id!=10090)
1732
+              org_id!=10375 &&  org_id!=10480 &&  org_id!=10551 && org_id!=10612 && org_id!=10617 && org_id!=10580 && org_id!=10667 && org_id!=10693 && org_id!=10697 && org_id!=10635 && org_id!=10702 && org_id!=10090 && org_id!=10723)
1733 1733
               || org_id == 10387
1734 1734
             "
1735 1735
           >
@@ -1802,7 +1802,7 @@
1802 1802
                 org_id == 10599 ||
1803 1803
                 org_id ==10612 || 
1804 1804
                 org_id ==10617 || 
1805
-                org_id==10580 || org_id ==10629 || org_id == 10677 || org_id == 10667 || org_id == 10693 || org_id == 10697 || org_id == 10635 || org_id == 10702 || org_id == 10090)
1805
+                org_id==10580 || org_id ==10629 || org_id == 10677 || org_id == 10667 || org_id == 10693 || org_id == 10697 || org_id == 10635 || org_id == 10702 || org_id == 10090 || org_id ==10723)
1806 1806
                 && org_id!=10387 && org_id!=10694
1807 1807
             "
1808 1808
           >
@@ -1876,7 +1876,8 @@
1876 1876
               org_id!=10697 &&
1877 1877
               org_id!=10635 &&
1878 1878
               org_id!=10702 &&
1879
-              org_id!=10090
1879
+              org_id!=10090 && 
1880
+              org_id!=10723
1880 1881
               )
1881 1882
               || org_id == 10387 || org_id == 10694
1882 1883
             "

+ 21 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue Wyświetl plik

@@ -998,6 +998,14 @@
998 998
           type="primary"
999 999
           >打印</el-button
1000 1000
         >
1001
+        <el-button
1002
+            :loading="loading"
1003
+            size="small"
1004
+            icon="el-icon-printer"
1005
+            @click="printThisTwoPage"
1006
+            type="primary"
1007
+            >打印医嘱单</el-button
1008
+         >
1001 1009
         </div>
1002 1010
       </template>
1003 1011
       <template v-if="org_template_info.template_id == 81">
@@ -2606,6 +2614,15 @@ export default {
2606 2614
 
2607 2615
 
2608 2616
       }
2617
+
2618
+      if(this.org_id == 0 || this.org_id == 10206){
2619
+        printJS({
2620
+          printable: "dialysis-print-box-1-2",
2621
+          type: "html",
2622
+          style: style2,
2623
+          scanStyles: false,
2624
+        });
2625
+      }
2609 2626
     },
2610 2627
 
2611 2628
     getNumber() {
@@ -2676,6 +2693,10 @@ export default {
2676 2693
             this.org_template_info = response.data.data.org_template_info;
2677 2694
             this.org_template_info.template_id= 80
2678 2695
           }
2696
+
2697
+          if(this.org_id == 0){
2698
+            this.org_template_info.template_id= 80
2699
+          }
2679 2700
           console.log('kkkkkkk222222',this.org_template_info);
2680 2701
           this.loading = false;
2681 2702
           //   this.adminUser = response.data.data.users

+ 3 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Wyświetl plik

@@ -996,7 +996,7 @@
996 996
                         <span v-if="org_id!=10206&& org_id!=10510 && org_id!=0"> {{
997 997
                           prescription.displace_liqui_value
998 998
                             ? prescription.displace_liqui_value
999
-                            : "/"
999
+                            : "0"
1000 1000
                         }}
1001 1001
                         </span>
1002 1002
                       </div>
@@ -2232,12 +2232,11 @@
2232 2232
                             advice.execution_frequency
2233 2233
                           }}</span>
2234 2234
                           <span
2235
-                            v-if="
2236
-                              advice.parent_id == 0 && advice.remark.length > 0
2235
+                            v-if="advice.parent_id == 0 && advice.remark.length > 0 && org_id!=10644
2237 2236
                             "
2238 2237
                             >({{ advice.remark }})</span
2239 2238
                           >
2240
-                          <span v-if="org_id == 0 || org_id == 10644">({{ advice.remark }})</span>
2239
+                          <span v-if="(org_id == 0 || org_id == 10644) && advice.remark.length>0" >({{ advice.remark }})</span>
2241 2240
                         </td>
2242 2241
 
2243 2242
                         <td height="32px">

+ 4 - 4
src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue Wyświetl plik

@@ -754,7 +754,7 @@
754 754
                         </td>
755 755
                       </tr>
756 756
 
757
-                      <!-- <tr
757
+                     <tr
758 758
                         v-for="(advice, advice_index) in projectsOne"
759 759
                         :key="advice_index"
760 760
                       >
@@ -813,7 +813,7 @@
813 813
                             getTime(advice.execution_time, "{h}:{i}")
814 814
                           }}</span>
815 815
                         </td>
816
-                      </tr> -->
816
+                      </tr> 
817 817
 
818 818
                     </tbody>
819 819
                   </table>
@@ -1377,9 +1377,9 @@
1377 1377
         </div>
1378 1378
       </div>
1379 1379
       <div class="row" style="margin-top: 15px">
1380
-        <div class="inline_block" style="">
1380
+        <div  style="">
1381 1381
           诊断:
1382
-          <div class="under_line" style="width:180px;text-align: left;white-space: normal;">
1382
+          <div class="under_line" style="width: 95%;text-align: left;white-space: normal;">
1383 1383
             {{ patientInfo.diagnose }}
1384 1384
           </div>
1385 1385
         </div>

src/xt_pages/outpatientTool/drugChange.vue → src/xt_pages/drugSourceCode/drugChange.vue Wyświetl plik

@@ -86,15 +86,19 @@
86 86
       <el-table-column align="center" prop="name" label="药品名称">
87 87
         <template slot-scope="scope">{{scope.row.drug_name}}</template>
88 88
       </el-table-column>
89
-      <el-table-column align="center" prop="name" label="药品类型">
90
-        <template slot-scope="scope">{{scope.row.drug_type}}</template>
91
-      </el-table-column>
89
+
92 90
       <el-table-column align="center" prop="name" label="规格单位">
93 91
         <template slot-scope="scope">{{scope.row.spec}}</template>
94 92
       </el-table-column>
95
-      <el-table-column align="center" prop="name" label="国家编码">
96
-        <template slot-scope="scope">{{scope.row.code}}</template>
93
+
94
+      <el-table-column  align="center" prop="name" label="追溯码">
95
+        <template slot-scope="scope">{{scope.row.drug_code}}</template>
96
+      </el-table-column>
97
+
98
+      <el-table-column align="center" prop="name" label="患者姓名">
99
+        <template slot-scope="scope">{{scope.row.p.name}}</template>
97 100
       </el-table-column>
101
+
98 102
       <el-table-column align="center" prop="name" label="批号">
99 103
         <template slot-scope="scope">{{scope.row.batch_number}}</template>
100 104
       </el-table-column>
@@ -111,13 +115,6 @@
111 115
       </el-table-column>
112 116
 
113 117
 
114
-      <el-table-column align="center" prop="total" label="结算日期">
115
-        <template slot-scope="scope">
116
-          <div>{{scope.row.e_date}}</div>
117
-        </template>
118
-      </el-table-column>
119
-
120
-
121 118
       <el-table-column align="center" prop="total" label="销售状态">
122 119
         <template slot-scope="scope">
123 120
           <div>{{scope.row.is_sale?'已销售':'未销售'}}</div>
@@ -139,7 +136,7 @@
139 136
       <el-table-column label="操作" width="200">
140 137
         <template slot-scope="scope">
141 138
           <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0 || scope.row.is_bg == 0" type="primary" @click="sigle_stock(scope.row)">销售变更</el-button>
142
-          <el-button type="primary" @click="deleteStock(scope.row)">删除</el-button>
139
+          <el-button v-if="scope.row.is_sale == 1 || scope.row.is_bg == 1" type="warning" @click="deleteStock(scope.row)">撤销</el-button>
143 140
         </template>
144 141
       </el-table-column>
145 142
     </el-table>

+ 419 - 0
src/xt_pages/drugSourceCode/drugCodeQuery.vue Wyświetl plik

@@ -0,0 +1,419 @@
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="changeStartTime"
18
+          ></el-date-picker>-
19
+          <el-date-picker
20
+           @change="changeEndTime"
21
+            size="small"
22
+            v-model="end_time"
23
+            prefix-icon="el-icon-date"
24
+            :editable="false"
25
+            style="width: 196px;margin-right:10px;"
26
+            type="date"
27
+            placeholder="选择日期时间"
28
+            align="right"
29
+            format="yyyy-MM-dd"
30
+            value-format="yyyy-MM-dd"
31
+          ></el-date-picker>
32
+        </div>
33
+  
34
+  
35
+        <div>
36
+          <div>上传状态:
37
+            <el-select size="small" v-model="is_sale" placeholder="请选择" style="width:100px;" @change="changeStock">
38
+                <el-option
39
+                  v-for="item,index in items"
40
+                  :key="index"
41
+                  :label="item.name"
42
+                  :value="item.id">
43
+                </el-option>
44
+            </el-select>
45
+         </div>
46
+        </div>
47
+  
48
+        <div>
49
+          <el-button type="primary" @click="query()">查询</el-button>
50
+          <el-button type="primary" @click="exportdata()">导出</el-button>
51
+        </div>
52
+      </div>
53
+      <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table2"
54
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
55
+                max-height="800"
56
+                @select="selectCostInfo"
57
+                @selection-change="changeCostInfoTableData"
58
+                @select-all="changeAllCostInfoTableData"
59
+                highlight-current-row>
60
+        <el-table-column align="center" prop="name" label="患者姓名">
61
+          <template slot-scope="scope">{{getPatientName(scope.row.patient_id) }}</template>
62
+        </el-table-column>
63
+        <el-table-column align="center" prop="name" label="处方日期">
64
+          <template slot-scope="scope">{{getTime(scope.row.advice_date)}}</template>
65
+        </el-table-column>
66
+        <el-table-column align="center" prop="name" label="药品名称">
67
+          <template slot-scope="scope">{{ scope.row.advice_name }}</template>
68
+        </el-table-column>
69
+        <el-table-column align="center" prop="name" label="规格">
70
+          <template slot-scope="scope">{{getDrugSpec(scope.row.drug_id)}}</template>
71
+        </el-table-column>
72
+        <el-table-column align="center" prop="name" label="开药总量">
73
+          <template slot-scope="scope">{{scope.row.prescribing_number}}{{ scope.row.prescribing_number_unit }}</template>
74
+        </el-table-column>
75
+        <el-table-column align="center" prop="name" label="药品追溯码">
76
+          <template slot-scope="scope">
77
+            <div @click="getDrugCode(scope.row.id,scope.row.DataSources,scope.row.drug_code,scope.$index)"><el-input style="width: 100;" v-model="scope.row.drug_code"></el-input></div> 
78
+          </template>
79
+        </el-table-column>
80
+        <el-table-column align="center" prop="name" label="上传状态">
81
+          <template slot-scope="scope">
82
+            <div v-if="scope.row.is_upload == 1">已上传</div>
83
+            <div v-if="scope.row.is_upload == 2 || scope.row.is_upload == 0">未上传</div>
84
+          </template>
85
+        </el-table-column>
86
+
87
+        <el-table-column align="center" prop="name" label="发药状态">
88
+          <template slot-scope="scope">
89
+            <div v-if="scope.row.is_medicine == 1">已发药</div>
90
+            <div v-if="scope.row.is_medicine == 2 || scope.row.is_medicine == 0">未发药</div>
91
+          </template>
92
+        </el-table-column>
93
+
94
+        <el-table-column align="center" prop="name" label="操作" width="200">
95
+          <template slot-scope="scope">
96
+            <div>
97
+             <el-button v-if="scope.row.is_upload == 1" type="primary" @click="sigle_stock(scope.row)">未上传</el-button>   
98
+            <el-button type="primary" v-if="scope.row.is_upload == 0 || scope.row.is_upload == 2" @click="toUpload(scope.row)">上传</el-button>
99
+            <el-button v-if="faShow == true" type="primary" @click="toFaYao(scope.row)">发药</el-button>   
100
+            </div>
101
+          </template>
102
+        </el-table-column>
103
+  
104
+       
105
+      </el-table>
106
+      <el-pagination
107
+        @size-change="handleSizeChange"
108
+        @current-change="handleCurrentChange"
109
+        :page-size="5"
110
+        :page-sizes="[10, 20, 50, 100,500,1000,2000]"
111
+        background
112
+        style="margin-top:20px;float: right"
113
+        :total="value"
114
+      ></el-pagination>
115
+  
116
+    
117
+ 
118
+  
119
+
120
+      <el-dialog
121
+        title="药品追溯码"
122
+        :visible.sync="dialogVisibleOne"
123
+         width="40%">
124
+       <span>
125
+        <el-input
126
+          @keyup.native="changeText"
127
+          type="textarea"
128
+          placeholder="请输入内容"
129
+          v-model="textarea"
130
+          :rows="10"
131
+        >
132
+        </el-input>
133
+      </span>
134
+      <span slot="footer" class="dialog-footer">
135
+        <el-button @click="dialogVisibleOne = false">取 消</el-button>
136
+        <el-button type="primary" @click="saveTextArea()">确 定</el-button>
137
+      </span>
138
+      </el-dialog>
139
+    </div>
140
+  
141
+   
142
+  </template>
143
+  
144
+  
145
+  <script>
146
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
147
+  import { getHisDrugCodeQueryList,createUploadDrugCode,getPatientDrugCode } from '../../api/new_stock/stock'
148
+  import { getDictionaryDataConfig } from "@/utils/data";
149
+  import { uParseTime } from '@/utils/tools'
150
+  import { changeDrugCode } from "@/api/pharmacy";
151
+  import axios from 'axios'
152
+  const moment = require('moment')
153
+  export default {
154
+    components: {
155
+      BreadCrumb
156
+    },
157
+    data() {
158
+      return {
159
+        drugTypeList: [{ id: 0, name: "全部" }],
160
+        start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
161
+        end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
162
+  
163
+        tableData: [],
164
+        change_type:"3",
165
+        selection:[],
166
+        page:1,
167
+        limit:10,
168
+        value:0,
169
+        is_sale:"0",
170
+        items: [
171
+          { id: "0", name: '全部' },
172
+          { id: "1", name: '已上传' },
173
+          { id: "2", name: '未上传' },
174
+        ],
175
+        patientList:[],
176
+        drugList:[],
177
+        dialogVisibleOne:false,
178
+        id:0,
179
+        is_source:0,
180
+        drug_code:0,
181
+        currentRow:{},
182
+        currentIndex:0,
183
+        is_drug_open:"2",
184
+        textarea:'',
185
+        total:0,
186
+        faShow:false,
187
+        is_open:false,
188
+      }
189
+    },
190
+    methods: {
191
+        changeText(event){
192
+        // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
193
+        if (event.key === 'Enter') {
194
+            var textarea = ""
195
+            textarea += this.textarea + ","
196
+            this.textarea = textarea
197
+        }
198
+       },
199
+       getDrugCode(id,DataSources,DrugCode,index){
200
+            this.id = id 
201
+            this.textarea = DrugCode
202
+            this.currentIndex = index
203
+            this.dialogVisibleOne = true
204
+      },
205
+      saveTextArea(){
206
+       var params = {
207
+        id:this.id,
208
+        data_source:1,
209
+        drug_code:this.textarea,
210
+       }
211
+       console.log("paramss",params)
212
+      changeDrugCode(params).then(response=>{
213
+         if(response.data.state == 1){
214
+            this.$message.success("保存成功!")
215
+            for(let i=0;i<this.tableData.length;i++){
216
+             if(this.currentIndex == i){
217
+                this.tableData[i].drug_code = this.textarea
218
+             }
219
+            }
220
+            this.dialogVisibleOne = false
221
+         }
222
+      })
223
+    },
224
+    getPatientName(id){
225
+       var name = ""
226
+       for(let i=0;i<this.patientList.length;i++){
227
+          if(id == this.patientList[i].id){
228
+             name = this.patientList[i].name
229
+          }
230
+       }
231
+       return name
232
+      },
233
+      getTime(val) {
234
+         if(val < 0){
235
+           return ""
236
+         }
237
+         if(val == ""){
238
+          return ""
239
+         }else {
240
+          return uParseTime(val, '{y}-{m}-{d}')
241
+         }
242
+      },
243
+      getDrugName(drug_id){
244
+        var drug_name = ""
245
+        for(let i=0;i<this.drugList.length;i++){
246
+           if(drug_id == this.drugList[i].id){
247
+              drug_name = this.drugList[i].drug_name
248
+           }
249
+        }
250
+        return drug_name
251
+      },
252
+      getDrugSpec(drug_id){
253
+        var specification_name = ""
254
+        for(let i=0;i<this.drugList.length;i++){
255
+          if(drug_id == this.drugList[i].id){
256
+            specification_name = this.drugList[i].specification_name
257
+          }
258
+        }
259
+        return specification_name
260
+      },
261
+      handleSizeChange(val) {
262
+        this.limit = val
263
+        this.getlist()
264
+      },
265
+      handleCurrentChange(val) {
266
+        this.page = val
267
+        this.getlist()
268
+      },
269
+      selectCostInfo(selection, row) {
270
+        this.selection = selection
271
+      },
272
+       changeCostInfoTableData(val) {
273
+        this.selection = val
274
+      }, changeAllCostInfoTableData(selection) {
275
+        this.selection = selection
276
+      },
277
+      delete(){
278
+  
279
+  
280
+      },
281
+      exportdata(){
282
+        console.log("hahahahh",this.tableData)
283
+        if(this.tableData!=null && this.tableData.length>0){
284
+           for(let i=0;i<this.tableData.length;i++){
285
+             this.tableData[i].patient_name = this.getPatientName(this.tableData[i].patient_id)
286
+             this.tableData[i].advice_date_str = this.getTime(this.tableData[i].advice_date)
287
+             if(this.tableData[i].is_upload == 1){
288
+                this.tableData[i].is_upload_name = "已上传"
289
+             }
290
+             if(this.tableData[i].is_upload == 2 || this.tableData[i].is_upload == 0){
291
+                this.tableData[i].is_upload_name = "未上传"
292
+             }
293
+
294
+             if(this.tableData[i].is_medicine == 1){
295
+                this.tableData[i].is_medicine_name = "已发药"
296
+             }
297
+             if(this.tableData[i].is_medicine == 2 || this.tableData[i].is_medicine == 0){
298
+                this.tableData[i].is_medicine_name = "未发药"
299
+             }
300
+             this.tableData[i].specification_name = this.getDrugSpec(this.tableData[i].drug_id)
301
+           }
302
+        }
303
+       
304
+        import('@/vendor/Export2Excel').then(excel => {
305
+          const tHeader = ['患者姓名', '处方日期', '药品名称', '规格', '开药总量', '药品追溯码','上传状态','发药状态']
306
+          const filterVal = ['patient_name', 'advice_date_str', 'advice_name', 'specification_name', 'prescribing_numbers', 'drug_code','is_upload_name','is_medicine_name']
307
+
308
+          const data = this.formatJson(filterVal, this.tableData)
309
+           excel.export_json_to_excel({
310
+           header: tHeader,
311
+           data,
312
+           filename: '药品追溯'
313
+         })
314
+        })
315
+  
316
+      },formatJson(filterVal, jsonData) {
317
+        return jsonData.map(v => filterVal.map(j => v[j]))
318
+      },
319
+    
320
+      query(){
321
+        this.getlist()
322
+      },
323
+      getDrugType(id) {
324
+        var name = "";
325
+        for (let i = 0; i < this.drugTypeList.length; i++) {
326
+          if (this.drugTypeList[i].id == id) {
327
+            name = this.drugTypeList[i].name;
328
+          }
329
+        }
330
+  
331
+        return name;
332
+      },  
333
+      getTime(val) {
334
+        if(val == "" || val == undefined){
335
+          return ""
336
+        }else {
337
+          return uParseTime(val, '{y}-{m}-{d}')
338
+        }
339
+      },
340
+      getlist(){
341
+        this.tableData = []
342
+        let params = {
343
+          start_time: this.start_time,
344
+          end_time: this.end_time,
345
+          page:this.page,
346
+          limit:this.limit,
347
+          is_sale:this.is_sale,
348
+        
349
+        }
350
+        getHisDrugCodeQueryList(params).then(response => {
351
+          if (response.data.state == 0) {
352
+            this.$message.error(response.data.msg)
353
+            return false
354
+          } else {
355
+             this.tableData = response.data.data.list
356
+             this.total = response.data.data.total
357
+             this.drugList = response.data.data.drug
358
+             this.patientList = response.data.data.patients
359
+             this.is_open = response.data.data.codeConfig.is_open
360
+          }
361
+        })
362
+      },
363
+      changeStock(val){
364
+        this.is_sale = val
365
+        this.getlist()
366
+      },
367
+      changeStartTime(val){
368
+        this.start_time = val
369
+      },
370
+      changeEndTime(val){
371
+        this.end_time = val
372
+      },
373
+      toUpload(row){
374
+        if(row.is_medicine == 0 || row.is_is_medicine == 2){
375
+          this.$message.error("该药品未发药,请先发药")
376
+          this.faShow = true
377
+          return
378
+        }
379
+        var params = {
380
+          drug_id:row.drug_id,
381
+          patient_id:row.patient_id,
382
+         advice_date:row.advice_date,
383
+        }
384
+        createUploadDrugCode(params).then(response=>{
385
+          if(response.data.state == 1){
386
+            this.$message.success("上传成功!")
387
+          }
388
+        })
389
+      },
390
+      toFaYao(row){
391
+        
392
+        if(this.is_open == 1){
393
+          if(row.drug_code==''){
394
+             this.$message.error("药品追溯码不能为空!")
395
+             return
396
+          }
397
+        }
398
+          var params= {
399
+            drug_id:row.drug_id,
400
+            patient_id:row.patient_id,
401
+            advice_date:row.advice_date,
402
+          }
403
+        getPatientDrugCode(params).then(response=>{
404
+          if(response.data.state == 1){
405
+             this.$message.success("发药成功!")
406
+             this.getlist()
407
+          } 
408
+        })
409
+      }
410
+    },
411
+    created() {
412
+      var drugTypeList = getDictionaryDataConfig("system", "drug_type");
413
+      this.drugTypeList.push(...drugTypeList);
414
+      this.getlist()
415
+    }
416
+  }
417
+  </script>
418
+  
419
+  

src/xt_pages/outpatientTool/drugQuery.vue → src/xt_pages/drugSourceCode/drugQuery.vue Wyświetl plik

@@ -49,6 +49,10 @@
49 49
         <div>药品:</div>
50 50
         <el-select size="small" v-model="drug_id" placeholder="请选择"
51 51
                    style="width:100px;margin-left:10px;" @change="change">
52
+          <el-option
53
+            label="全部"
54
+            value="0">
55
+          </el-option>
52 56
           <el-option
53 57
             v-for="item,index in drugs"
54 58
             :key="index"
@@ -586,7 +590,7 @@ export default {
586 590
           return false
587 591
         } else {
588 592
           this.drugs = response.data.data.drugs
589
-          this.drug_id = this.drugs[0].id
593
+          this.drug_id = "0"
590 594
         }
591 595
       })
592 596
 

src/xt_pages/outpatientTool/drugStock.vue → src/xt_pages/drugSourceCode/drugStock.vue Wyświetl plik

@@ -88,15 +88,19 @@
88 88
       <el-table-column align="center" prop="name" label="药品名称">
89 89
         <template slot-scope="scope">{{scope.row.drug_name}}</template>
90 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>
91
+
94 92
       <el-table-column align="center" prop="name" label="规格单位">
95 93
         <template slot-scope="scope">{{scope.row.spec}}</template>
96 94
       </el-table-column>
97
-      <el-table-column align="center" prop="name" label="国家编码">
98
-        <template slot-scope="scope">{{scope.row.code}}</template>
95
+
96
+      <el-table-column align="center" prop="name" label="追溯码">
97
+        <template slot-scope="scope">{{scope.row.drug_code}}</template>
99 98
       </el-table-column>
99
+
100
+      <el-table-column align="center" prop="name" label="批号">
101
+        <template slot-scope="scope">{{scope.row.drug_code}}</template>
102
+      </el-table-column>
103
+
100 104
       <el-table-column align="center" prop="name" label="批号">
101 105
         <template slot-scope="scope">{{scope.row.batch_number}}</template>
102 106
       </el-table-column>
@@ -113,11 +117,7 @@
113 117
       </el-table-column>
114 118
 
115 119
 
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>
120
+
121 121
 
122 122
 
123 123
       <el-table-column align="center" prop="total" label="盘存状态">
@@ -141,7 +141,7 @@
141 141
       <el-table-column label="操作" width="200">
142 142
         <template slot-scope="scope">
143 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>
144
+          <el-button v-if="scope.row.is_pc == 1 || scope.row.is_pc == 1"  type="primary" @click="deleteStock(scope.row)">撤销</el-button>
145 145
         </template>
146 146
       </el-table-column>
147 147
     </el-table>