|
@@ -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>
|
|
@@ -314,7 +314,7 @@
|
314
|
314
|
ref="patientprint"
|
315
|
315
|
:visibility="isVisibility"
|
316
|
316
|
:propsTable="propsTable"
|
317
|
|
-
|
|
317
|
+
|
318
|
318
|
>
|
319
|
319
|
</patient-print>
|
320
|
320
|
<patientPrintTwo ref="patientprintTwo"
|
|
@@ -341,6 +341,7 @@ import {
|
341
|
341
|
changeDrugCode
|
342
|
342
|
} from "@/api/pharmacy";
|
343
|
343
|
import dataDruguse from "../../router/modules/dataDruguse";
|
|
344
|
+import axios from 'axios'
|
344
|
345
|
const moment = require("moment");
|
345
|
346
|
export default {
|
346
|
347
|
components: {
|
|
@@ -397,8 +398,8 @@ export default {
|
397
|
398
|
currentIndex:0,
|
398
|
399
|
is_drug_open:"2",
|
399
|
400
|
textarea:"",
|
400
|
|
-
|
401
|
|
-
|
|
401
|
+
|
|
402
|
+
|
402
|
403
|
};
|
403
|
404
|
},
|
404
|
405
|
watch: {},
|
|
@@ -620,7 +621,7 @@ export default {
|
620
|
621
|
age:res.data.data.patients.age,
|
621
|
622
|
gender: res.data.data.patients.gender,
|
622
|
623
|
diagnose:res.data.data.patients.diagnose,
|
623
|
|
- zhixing:res.data.data.patients.created_time
|
|
624
|
+ zhixing:res.data.data.patients.created_time
|
624
|
625
|
}
|
625
|
626
|
this.patients =obj
|
626
|
627
|
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 ){
|
|
@@ -672,8 +673,8 @@ export default {
|
672
|
673
|
}
|
673
|
674
|
}
|
674
|
675
|
|
675
|
|
-
|
676
|
|
-
|
|
676
|
+
|
|
677
|
+
|
677
|
678
|
},
|
678
|
679
|
toExport() {
|
679
|
680
|
import("@/vendor/Export2Excel").then((excel) => {
|
|
@@ -737,16 +738,93 @@ export default {
|
737
|
738
|
|
738
|
739
|
// 药品发药
|
739
|
740
|
dispense() {
|
740
|
|
- var tmp = this.currentRow.PatientID;
|
741
|
|
- var params = {
|
742
|
|
- patient_id: this.currentRow.PatientID,
|
743
|
|
- time: this.start_time,
|
744
|
|
- };
|
745
|
|
- this.$confirm("确定是否对该患者进行发药?", "患者发药", {
|
746
|
|
- confirmButtonText: "确 定",
|
747
|
|
- cancelButtonText: "取 消",
|
748
|
|
- type: "warning",
|
749
|
|
- }).then(() => {
|
|
741
|
+ if (this.is_drug_open == 1){
|
|
742
|
+ var that= this
|
|
743
|
+ axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
|
|
744
|
+ if (response.data.state == 0) {
|
|
745
|
+ // that.$message.error(response.data.data.msg);
|
|
746
|
+ that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
|
|
747
|
+ confirmButtonText: "确 定",
|
|
748
|
+ cancelButtonText: "取 消",
|
|
749
|
+ type: "warning",
|
|
750
|
+ }).then(() => {
|
|
751
|
+ var tmp = that.currentRow.PatientID;
|
|
752
|
+ var params = {
|
|
753
|
+ patient_id: that.currentRow.PatientID,
|
|
754
|
+ time: that.start_time,
|
|
755
|
+ };
|
|
756
|
+ that.$confirm("确定是否对该患者进行发药?", "患者发药", {
|
|
757
|
+ confirmButtonText: "确 定",
|
|
758
|
+ cancelButtonText: "取 消",
|
|
759
|
+ type: "warning",
|
|
760
|
+ }).then(() => {
|
|
761
|
+ dispensingmedicine(params).then((res) => {
|
|
762
|
+ if (res.data.state == 1) {
|
|
763
|
+ that.$message.success("操作成功");
|
|
764
|
+ that.gettodaynumber();
|
|
765
|
+ that.searchAction();
|
|
766
|
+ that.tableData = null;
|
|
767
|
+ that.fun4(tmp);
|
|
768
|
+ that.state = 2;
|
|
769
|
+
|
|
770
|
+ //进行追溯码上传
|
|
771
|
+ axios.get('http://127.0.0.1:9532/api/changedrug/four', {
|
|
772
|
+ params:params
|
|
773
|
+ })
|
|
774
|
+ .then(function(response) {
|
|
775
|
+ if (response.data.state == 0) {
|
|
776
|
+ that.$message.error(response.data.msg)
|
|
777
|
+ return false
|
|
778
|
+ } else {
|
|
779
|
+ if (response.data.data.failed_code == -10) {
|
|
780
|
+ that.$confirm(response.data.data.msg, '医保错误信息', {
|
|
781
|
+ confirmButtonText: '确 定',
|
|
782
|
+ type: 'warning'
|
|
783
|
+ }).then(() => {
|
|
784
|
+
|
|
785
|
+ }).catch(() => {
|
|
786
|
+ })
|
|
787
|
+
|
|
788
|
+ } else {
|
|
789
|
+
|
|
790
|
+ }
|
|
791
|
+ }
|
|
792
|
+ })
|
|
793
|
+ .catch(function(error) {
|
|
794
|
+ })
|
|
795
|
+ } else {
|
|
796
|
+ that.$message.error(res.data.msg);
|
|
797
|
+ }
|
|
798
|
+ });
|
|
799
|
+ })
|
|
800
|
+ .catch(() => {});
|
|
801
|
+ })
|
|
802
|
+ .catch(() => {});
|
|
803
|
+ return false
|
|
804
|
+ } else {
|
|
805
|
+
|
|
806
|
+ }
|
|
807
|
+ }).catch(function(error) {
|
|
808
|
+ that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
|
|
809
|
+ confirmButtonText: "确 定",
|
|
810
|
+ cancelButtonText: "取 消",
|
|
811
|
+ type: "warning",
|
|
812
|
+ }).then(() => {
|
|
813
|
+ })
|
|
814
|
+ .catch(() => {});
|
|
815
|
+ })
|
|
816
|
+
|
|
817
|
+ }else{
|
|
818
|
+ var tmp = this.currentRow.PatientID;
|
|
819
|
+ var params = {
|
|
820
|
+ patient_id: this.currentRow.PatientID,
|
|
821
|
+ time: this.start_time,
|
|
822
|
+ };
|
|
823
|
+ this.$confirm("确定是否对该患者进行发药?", "患者发药", {
|
|
824
|
+ confirmButtonText: "确 定",
|
|
825
|
+ cancelButtonText: "取 消",
|
|
826
|
+ type: "warning",
|
|
827
|
+ }).then(() => {
|
750
|
828
|
dispensingmedicine(params).then((res) => {
|
751
|
829
|
if (res.data.state == 1) {
|
752
|
830
|
this.$message.success("操作成功");
|
|
@@ -755,13 +833,18 @@ export default {
|
755
|
833
|
this.tableData = null;
|
756
|
834
|
this.fun4(tmp);
|
757
|
835
|
this.state = 2;
|
758
|
|
-
|
|
836
|
+
|
|
837
|
+
|
759
|
838
|
} else {
|
760
|
839
|
this.$message.error(res.data.msg);
|
761
|
840
|
}
|
762
|
841
|
});
|
763
|
842
|
})
|
764
|
|
- .catch(() => {});
|
|
843
|
+ .catch(() => {});
|
|
844
|
+ }
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
765
|
848
|
},
|
766
|
849
|
|
767
|
850
|
toSetting() {
|
|
@@ -784,23 +867,103 @@ export default {
|
784
|
867
|
if (response.data.state == 1) {
|
785
|
868
|
var config = response.data.data.config;
|
786
|
869
|
this.$message.success("保存成功!");
|
787
|
|
-
|
|
870
|
+
|
788
|
871
|
this.dialogVisible = false;
|
789
|
872
|
}
|
790
|
873
|
});
|
791
|
874
|
},
|
792
|
875
|
// 药品退药
|
793
|
876
|
endispense() {
|
794
|
|
- var tmp = this.currentRow.PatientID;
|
795
|
|
- var params = {
|
796
|
|
- patient_id: this.currentRow.PatientID,
|
797
|
|
- time: this.start_time,
|
798
|
|
- };
|
799
|
|
- this.$confirm("确定是否对该患者进行退药?", "患者退药", {
|
800
|
|
- confirmButtonText: "确 定",
|
801
|
|
- cancelButtonText: "取 消",
|
802
|
|
- type: "warning",
|
803
|
|
- }).then(() => {
|
|
877
|
+ if (this.is_drug_open == 1){
|
|
878
|
+ var that= this
|
|
879
|
+ axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
|
|
880
|
+ if (response.data.state == 0) {
|
|
881
|
+ // that.$message.error(response.data.data.msg);
|
|
882
|
+ that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
|
|
883
|
+ confirmButtonText: "确 定",
|
|
884
|
+ cancelButtonText: "取 消",
|
|
885
|
+ type: "warning",
|
|
886
|
+ }).then(() => {
|
|
887
|
+
|
|
888
|
+ })
|
|
889
|
+ .catch(() => {
|
|
890
|
+
|
|
891
|
+ });
|
|
892
|
+ return false
|
|
893
|
+ } else {
|
|
894
|
+ var tmp = that.currentRow.PatientID;
|
|
895
|
+ var params = {
|
|
896
|
+ patient_id: that.currentRow.PatientID,
|
|
897
|
+ time: that.start_time,
|
|
898
|
+ };
|
|
899
|
+ that.$confirm("确定是否对该患者进行退药?", "患者退药", {
|
|
900
|
+ confirmButtonText: "确 定",
|
|
901
|
+ cancelButtonText: "取 消",
|
|
902
|
+ type: "warning",
|
|
903
|
+ }).then(() => {
|
|
904
|
+ drugwithdrawal(params).then((res) => {
|
|
905
|
+ if (res.data.state == 1) {
|
|
906
|
+ that.$message.success("操作成功");
|
|
907
|
+ that.gettodaynumber();
|
|
908
|
+ that.searchAction();
|
|
909
|
+ that.tableData = null;
|
|
910
|
+ that.fun5(tmp);
|
|
911
|
+ that.state = 1;
|
|
912
|
+
|
|
913
|
+ //进行追溯码上传
|
|
914
|
+ axios.get('http://127.0.0.1:9532/api/delete_xs_bg_two', {
|
|
915
|
+ params:params
|
|
916
|
+ })
|
|
917
|
+ .then(function(response) {
|
|
918
|
+ if (response.data.state == 0) {
|
|
919
|
+ that.$message.error(response.data.msg)
|
|
920
|
+ return false
|
|
921
|
+ } else {
|
|
922
|
+ if (response.data.data.failed_code == -10) {
|
|
923
|
+ that.$confirm(response.data.data.msg, '医保错误信息', {
|
|
924
|
+ confirmButtonText: '确 定',
|
|
925
|
+ type: 'warning'
|
|
926
|
+ }).then(() => {
|
|
927
|
+
|
|
928
|
+ }).catch(() => {
|
|
929
|
+ })
|
|
930
|
+
|
|
931
|
+ } else {
|
|
932
|
+
|
|
933
|
+ }
|
|
934
|
+ }
|
|
935
|
+ })
|
|
936
|
+ .catch(function(error) {
|
|
937
|
+ })
|
|
938
|
+
|
|
939
|
+ } else {
|
|
940
|
+ that.$message.error(res.data.msg);
|
|
941
|
+ }
|
|
942
|
+ });
|
|
943
|
+ })
|
|
944
|
+ .catch(() => {});
|
|
945
|
+
|
|
946
|
+ }
|
|
947
|
+ }).catch(function(error) {
|
|
948
|
+ that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
|
|
949
|
+ confirmButtonText: "确 定",
|
|
950
|
+ cancelButtonText: "取 消",
|
|
951
|
+ type: "warning",
|
|
952
|
+ }).then(() => {
|
|
953
|
+ })
|
|
954
|
+ .catch(() => {});
|
|
955
|
+ })
|
|
956
|
+ }else{
|
|
957
|
+ var tmp = this.currentRow.PatientID;
|
|
958
|
+ var params = {
|
|
959
|
+ patient_id: this.currentRow.PatientID,
|
|
960
|
+ time: this.start_time,
|
|
961
|
+ };
|
|
962
|
+ this.$confirm("确定是否对该患者进行退药?", "患者退药", {
|
|
963
|
+ confirmButtonText: "确 定",
|
|
964
|
+ cancelButtonText: "取 消",
|
|
965
|
+ type: "warning",
|
|
966
|
+ }).then(() => {
|
804
|
967
|
drugwithdrawal(params).then((res) => {
|
805
|
968
|
if (res.data.state == 1) {
|
806
|
969
|
this.$message.success("操作成功");
|
|
@@ -809,15 +972,20 @@ export default {
|
809
|
972
|
this.tableData = null;
|
810
|
973
|
this.fun5(tmp);
|
811
|
974
|
this.state = 1;
|
|
975
|
+
|
|
976
|
+
|
812
|
977
|
} else {
|
813
|
978
|
this.$message.error(res.data.msg);
|
814
|
979
|
}
|
815
|
980
|
});
|
816
|
981
|
})
|
817
|
|
- .catch(() => {});
|
|
982
|
+ .catch(() => {});
|
|
983
|
+
|
|
984
|
+ }
|
|
985
|
+
|
818
|
986
|
},
|
819
|
987
|
getDrugName(drug_id){
|
820
|
|
-
|
|
988
|
+
|
821
|
989
|
var medical_insurance_number = ""
|
822
|
990
|
for(let i=0;i<this.drugList.length;i++){
|
823
|
991
|
if(drug_id == this.drugList[i].id){
|
|
@@ -845,7 +1013,7 @@ export default {
|
845
|
1013
|
return spc
|
846
|
1014
|
},
|
847
|
1015
|
getDrugCode(id,DataSources,DrugCode,index){
|
848
|
|
- this.id = id
|
|
1016
|
+ this.id = id
|
849
|
1017
|
var is_source =0
|
850
|
1018
|
if (DataSources == "his处方"){
|
851
|
1019
|
is_source = 1
|
|
@@ -883,14 +1051,14 @@ export default {
|
883
|
1051
|
if (event.key === 'Enter') {
|
884
|
1052
|
var textarea = ""
|
885
|
1053
|
textarea += this.textarea + ","
|
886
|
|
-
|
|
1054
|
+
|
887
|
1055
|
this.textarea = textarea
|
888
|
1056
|
}
|
889
|
|
-
|
|
1057
|
+
|
890
|
1058
|
|
891
|
1059
|
},
|
892
|
|
-
|
893
|
|
-
|
|
1060
|
+
|
|
1061
|
+
|
894
|
1062
|
},
|
895
|
1063
|
};
|
896
|
1064
|
</script>
|