|
@@ -1040,105 +1040,109 @@
|
1040
|
1040
|
})
|
1041
|
1041
|
|
1042
|
1042
|
} else {
|
1043
|
|
- that.radio = 1
|
1044
|
|
- that.$refs.register.hide();
|
1045
|
|
- let params = {
|
1046
|
|
- 'record_date': that.record_date
|
1047
|
|
- };
|
1048
|
|
- getChargeHisPatientList(params).then(response => {
|
1049
|
|
- if (response.data.state == 0) {
|
1050
|
|
- that.$message.error(response.data.msg);
|
1051
|
|
- return false
|
1052
|
|
- } else {
|
1053
|
|
-
|
1054
|
|
- that.loadingone = false;
|
1055
|
|
- that.$message({ message: '挂号成功', type: 'success' });
|
1056
|
|
-
|
1057
|
|
- that.patientTableData = []
|
1058
|
|
- that.all_table_data = []
|
1059
|
|
- that.hisPatientDatas = []
|
1060
|
|
- let one_count = 0
|
1061
|
|
- let two_count = 0
|
1062
|
|
- let three_count = 0
|
1063
|
|
- for (let i = 0; i < response.data.data.list.length; i++) {
|
1064
|
|
- if (response.data.data.list[i].his_patient.length == 0) { //没挂号
|
1065
|
|
- if (response.data.data.list[i].prescription.length > 0) {
|
1066
|
|
- let obj = {
|
1067
|
|
- id: response.data.data.list[i].id,
|
1068
|
|
- name: response.data.data.list[i].name,
|
1069
|
|
- number: '',
|
1070
|
|
- order_status: 0,
|
1071
|
|
- order_number: '',
|
1072
|
|
- his_patient_id: 0
|
1073
|
|
- }
|
1074
|
|
-
|
1075
|
|
- that.all_table_data.push(obj)
|
1076
|
|
- }
|
1077
|
|
-
|
1078
|
|
- } else { //挂号
|
1079
|
|
- if (response.data.data.list[i].his_patient.length == 1) {
|
1080
|
|
- let obj = {
|
1081
|
|
- id: response.data.data.list[i].id,
|
1082
|
|
- name: response.data.data.list[i].name,
|
1083
|
|
- number: response.data.data.list[i].his_patient[0].number,
|
1084
|
|
- order_status: response.data.data.list[i].his_patient[0].order.order_status,
|
1085
|
|
- his_patient_id: response.data.data.list[i].his_patient[0].id,
|
1086
|
|
- order_number: response.data.data.list[i].his_patient[0].order.number,
|
1087
|
|
- order_id: response.data.data.list[i].his_patient[0].order.id
|
1088
|
|
- }
|
1089
|
|
- that.all_table_data.push(obj)
|
1090
|
|
-
|
1091
|
|
- }
|
1092
|
|
-
|
1093
|
|
- if (response.data.data.list[i].his_patient.length > 1) {
|
1094
|
|
- for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
|
1095
|
|
- let obj = {
|
1096
|
|
- id: response.data.data.list[i].id,
|
1097
|
|
- name: response.data.data.list[i].name,
|
1098
|
|
- number: response.data.data.list[i].his_patient[b].number,
|
1099
|
|
- order_status: response.data.data.list[i].his_patient[b].order.order_status,
|
1100
|
|
- his_patient_id: response.data.data.list[i].his_patient[b].id,
|
1101
|
|
- order_number: response.data.data.list[i].his_patient[b].order.number,
|
1102
|
|
- order_id: response.data.data.list[i].his_patient[b].order.id
|
1103
|
|
- }
|
1104
|
|
- that.all_table_data.push(obj)
|
1105
|
|
-
|
1106
|
|
- }
|
1107
|
|
- }
|
1108
|
|
- }
|
1109
|
|
-
|
1110
|
|
- }
|
1111
|
|
-
|
1112
|
|
- for (let i = 0; i < that.all_table_data.length; i++) {
|
1113
|
|
- if (that.all_table_data[i].his_patient_id > 0) {
|
1114
|
|
- that.hisPatientDatas.push(this.all_table_data[i])
|
1115
|
|
- }
|
1116
|
|
- }
|
1117
|
|
-
|
1118
|
|
- for (let i = 0; i < that.all_table_data.length; i++) {
|
1119
|
|
- if (that.all_table_data[i].order_status == 0 || that.all_table_data[i].order_status == 1 || that.all_table_data[i].order_status == 3) {
|
1120
|
|
- one_count = one_count + 1
|
1121
|
|
- that.patientTableData.push(that.all_table_data[i])
|
1122
|
|
- }
|
1123
|
|
- if (that.all_table_data[i].order_status == 2) {
|
1124
|
|
- two_count = two_count + 1
|
1125
|
|
- that.patientTableData.push(that.all_table_data[i])
|
1126
|
|
- }
|
1127
|
|
- }
|
1128
|
|
- that.cal_one = one_count
|
1129
|
|
- that.cal_two = two_count
|
1130
|
|
- that.cal_three = three_count
|
1131
|
|
- that.current_index = 0
|
1132
|
|
- for (let i = 0; i < that.patientTableData.length; i++) {
|
1133
|
|
- if (that.patientTableData[i].his_patient_id == that.hisPatientInfo.id) {
|
1134
|
|
- that.$refs.tab.setCurrentRow(that.patientTableData[i])
|
1135
|
|
- that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order_number, that.patientTableData[i].his_patient_id)
|
1136
|
|
- }
|
1137
|
|
- }
|
1138
|
|
- var his_info = response.data.data.his_info
|
1139
|
|
- that.hisPatientInfo = his_info
|
1140
|
|
- }
|
1141
|
|
- })
|
|
1043
|
+ this.changeRadio(1)
|
|
1044
|
+ this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
|
|
1045
|
+ this.$refs.register.hide()
|
|
1046
|
+ this.loadingone = false
|
|
1047
|
+ // that.radio = 1
|
|
1048
|
+ // that.$refs.register.hide();
|
|
1049
|
+ // let params = {
|
|
1050
|
+ // 'record_date': that.record_date
|
|
1051
|
+ // };
|
|
1052
|
+ // getChargeHisPatientList(params).then(response => {
|
|
1053
|
+ // if (response.data.state == 0) {
|
|
1054
|
+ // that.$message.error(response.data.msg);
|
|
1055
|
+ // return false
|
|
1056
|
+ // } else {
|
|
1057
|
+ //
|
|
1058
|
+ // that.loadingone = false;
|
|
1059
|
+ // that.$message({ message: '挂号成功', type: 'success' });
|
|
1060
|
+ //
|
|
1061
|
+ // that.patientTableData = []
|
|
1062
|
+ // that.all_table_data = []
|
|
1063
|
+ // that.hisPatientDatas = []
|
|
1064
|
+ // let one_count = 0
|
|
1065
|
+ // let two_count = 0
|
|
1066
|
+ // let three_count = 0
|
|
1067
|
+ // for (let i = 0; i < response.data.data.list.length; i++) {
|
|
1068
|
+ // if (response.data.data.list[i].his_patient.length == 0) { //没挂号
|
|
1069
|
+ // if (response.data.data.list[i].prescription.length > 0) {
|
|
1070
|
+ // let obj = {
|
|
1071
|
+ // id: response.data.data.list[i].id,
|
|
1072
|
+ // name: response.data.data.list[i].name,
|
|
1073
|
+ // number: '',
|
|
1074
|
+ // order_status: 0,
|
|
1075
|
+ // order_number: '',
|
|
1076
|
+ // his_patient_id: 0
|
|
1077
|
+ // }
|
|
1078
|
+ //
|
|
1079
|
+ // that.all_table_data.push(obj)
|
|
1080
|
+ // }
|
|
1081
|
+ //
|
|
1082
|
+ // } else { //挂号
|
|
1083
|
+ // if (response.data.data.list[i].his_patient.length == 1) {
|
|
1084
|
+ // let obj = {
|
|
1085
|
+ // id: response.data.data.list[i].id,
|
|
1086
|
+ // name: response.data.data.list[i].name,
|
|
1087
|
+ // number: response.data.data.list[i].his_patient[0].number,
|
|
1088
|
+ // order_status: response.data.data.list[i].his_patient[0].order.order_status,
|
|
1089
|
+ // his_patient_id: response.data.data.list[i].his_patient[0].id,
|
|
1090
|
+ // order_number: response.data.data.list[i].his_patient[0].order.number,
|
|
1091
|
+ // order_id: response.data.data.list[i].his_patient[0].order.id
|
|
1092
|
+ // }
|
|
1093
|
+ // that.all_table_data.push(obj)
|
|
1094
|
+ //
|
|
1095
|
+ // }
|
|
1096
|
+ //
|
|
1097
|
+ // if (response.data.data.list[i].his_patient.length > 1) {
|
|
1098
|
+ // for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
|
|
1099
|
+ // let obj = {
|
|
1100
|
+ // id: response.data.data.list[i].id,
|
|
1101
|
+ // name: response.data.data.list[i].name,
|
|
1102
|
+ // number: response.data.data.list[i].his_patient[b].number,
|
|
1103
|
+ // order_status: response.data.data.list[i].his_patient[b].order.order_status,
|
|
1104
|
+ // his_patient_id: response.data.data.list[i].his_patient[b].id,
|
|
1105
|
+ // order_number: response.data.data.list[i].his_patient[b].order.number,
|
|
1106
|
+ // order_id: response.data.data.list[i].his_patient[b].order.id
|
|
1107
|
+ // }
|
|
1108
|
+ // that.all_table_data.push(obj)
|
|
1109
|
+ //
|
|
1110
|
+ // }
|
|
1111
|
+ // }
|
|
1112
|
+ // }
|
|
1113
|
+ //
|
|
1114
|
+ // }
|
|
1115
|
+ //
|
|
1116
|
+ // for (let i = 0; i < that.all_table_data.length; i++) {
|
|
1117
|
+ // if (that.all_table_data[i].his_patient_id > 0) {
|
|
1118
|
+ // that.hisPatientDatas.push(this.all_table_data[i])
|
|
1119
|
+ // }
|
|
1120
|
+ // }
|
|
1121
|
+ //
|
|
1122
|
+ // for (let i = 0; i < that.all_table_data.length; i++) {
|
|
1123
|
+ // if (that.all_table_data[i].order_status == 0 || that.all_table_data[i].order_status == 1 || that.all_table_data[i].order_status == 3) {
|
|
1124
|
+ // one_count = one_count + 1
|
|
1125
|
+ // that.patientTableData.push(that.all_table_data[i])
|
|
1126
|
+ // }
|
|
1127
|
+ // if (that.all_table_data[i].order_status == 2) {
|
|
1128
|
+ // two_count = two_count + 1
|
|
1129
|
+ // that.patientTableData.push(that.all_table_data[i])
|
|
1130
|
+ // }
|
|
1131
|
+ // }
|
|
1132
|
+ // that.cal_one = one_count
|
|
1133
|
+ // that.cal_two = two_count
|
|
1134
|
+ // that.cal_three = three_count
|
|
1135
|
+ // that.current_index = 0
|
|
1136
|
+ // for (let i = 0; i < that.patientTableData.length; i++) {
|
|
1137
|
+ // if (that.patientTableData[i].his_patient_id == that.hisPatientInfo.id) {
|
|
1138
|
+ // that.$refs.tab.setCurrentRow(that.patientTableData[i])
|
|
1139
|
+ // that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order_number, that.patientTableData[i].his_patient_id)
|
|
1140
|
+ // }
|
|
1141
|
+ // }
|
|
1142
|
+ // var his_info = response.data.data.his_info
|
|
1143
|
+ // that.hisPatientInfo = his_info
|
|
1144
|
+ // }
|
|
1145
|
+ // })
|
1142
|
1146
|
}
|
1143
|
1147
|
}
|
1144
|
1148
|
})
|
|
@@ -1158,8 +1162,6 @@
|
1158
|
1162
|
this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
|
1159
|
1163
|
this.$refs.register.hide()
|
1160
|
1164
|
this.loadingone = false
|
1161
|
|
- var his_info = response.data.data.his_info
|
1162
|
|
- this.hisPatientInfo = his_info
|
1163
|
1165
|
}
|
1164
|
1166
|
})
|
1165
|
1167
|
}
|