|
@@ -73,9 +73,13 @@
|
73
|
73
|
@click="open(4)"
|
74
|
74
|
type="primary">收费
|
75
|
75
|
</el-button>
|
|
76
|
+
|
76
|
77
|
<el-button size="small" @click="open(5)" type="primary"
|
77
|
|
- v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 && this.order.order_status == 2" >退费
|
|
78
|
+ v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 && this.order.order_status == 2" >退费
|
78
|
79
|
</el-button>
|
|
80
|
+ <!-- <el-button size="small" @click="open(5)" type="primary"
|
|
81
|
+ >退费
|
|
82
|
+ </el-button> -->
|
79
|
83
|
|
80
|
84
|
|
81
|
85
|
<!--<el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(7)" type="primary"-->
|
|
@@ -90,10 +94,10 @@
|
90
|
94
|
>结算单
|
91
|
95
|
</el-button>
|
92
|
96
|
|
93
|
|
- <el-button v-if="this.$store.getters.xt_user.org_id == 9919"
|
94
|
|
- size="small" @click="open(10)" type="primary"
|
95
|
|
- >退号
|
96
|
|
- </el-button>
|
|
97
|
+ <!--<el-button v-if="this.$store.getters.xt_user.org_id == 9919"-->
|
|
98
|
+ <!--size="small" @click="open(10)" type="primary"-->
|
|
99
|
+ <!-->退号-->
|
|
100
|
+ <!--</el-button>-->
|
97
|
101
|
|
98
|
102
|
<!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
|
99
|
103
|
<!--size="small" @click="open(11)" type="primary"-->
|
|
@@ -686,8 +690,7 @@
|
686
|
690
|
|
687
|
691
|
let params = {
|
688
|
692
|
'record_date': val,
|
689
|
|
- 'patient_id': this.patientInfo.id,
|
690
|
|
- 'type': this.radio,
|
|
693
|
+ 'patient_id': this.patientInfo.id
|
691
|
694
|
}
|
692
|
695
|
getChargeHisPatientInfo(params).then(response => {
|
693
|
696
|
if (response.data.state == 0) {
|
|
@@ -1345,6 +1348,7 @@
|
1345
|
1348
|
order_id: this.order.id
|
1346
|
1349
|
}
|
1347
|
1350
|
this.orderObj = obj
|
|
1351
|
+ // this.$refs.print.getInfo(this.order.id)
|
1348
|
1352
|
|
1349
|
1353
|
} else if (index == 10) {
|
1350
|
1354
|
let params = {
|
|
@@ -1745,34 +1749,19 @@
|
1745
|
1749
|
for (let i = 0; i < month_prescriptions.length; i++) {
|
1746
|
1750
|
if (month_prescriptions[i].type == 1) { //药品
|
1747
|
1751
|
for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
|
1748
|
|
- let obj = {
|
1749
|
|
- id: month_prescriptions[i].advices[a].drug_id,
|
1750
|
|
- price:month_prescriptions[i].advices[a].price,
|
1751
|
|
-
|
1752
|
|
- }
|
1753
|
|
- drug_ids.push(obj)
|
|
1752
|
+ drug_ids.push(month_prescriptions[i].advices[a].drug_id)
|
1754
|
1753
|
drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
|
1755
|
1754
|
}
|
1756
|
1755
|
|
1757
|
1756
|
} else if (month_prescriptions[i].type == 2) { //项目
|
1758
|
1757
|
for (let a = 0; a < month_prescriptions[i].project.length; a++) {
|
1759
|
|
- let obj = {
|
1760
|
|
- id: month_prescriptions[i].project[a].project_id,
|
1761
|
|
- price:month_prescriptions[i].project[a].price,
|
1762
|
|
-
|
1763
|
|
- }
|
1764
|
|
- project_ids.push(obj)
|
|
1758
|
+ project_ids.push(month_prescriptions[i].project[a].project_id)
|
1765
|
1759
|
project_month_prescriptions.project.push(month_prescriptions[i].project[a])
|
1766
|
1760
|
}
|
1767
|
1761
|
}
|
1768
|
1762
|
//附加收费
|
1769
|
1763
|
for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
|
1770
|
|
- let obj = {
|
1771
|
|
- id: month_prescriptions[i].addition[a].item_id,
|
1772
|
|
- price:month_prescriptions[i].addition[a].price,
|
1773
|
|
-
|
1774
|
|
- }
|
1775
|
|
- additions_ids.push(obj)
|
|
1764
|
+ additions_ids.push(month_prescriptions[i].addition[a].item_id)
|
1776
|
1765
|
addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
|
1777
|
1766
|
|
1778
|
1767
|
}
|
|
@@ -1784,15 +1773,15 @@
|
1784
|
1773
|
const obj2 = {}
|
1785
|
1774
|
|
1786
|
1775
|
drug_ids = drug_ids.reduce((cur, next) => {
|
1787
|
|
- obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
|
1776
|
+ obj[next] ? '' : obj[next] = true && cur.push(next)
|
1788
|
1777
|
return cur
|
1789
|
1778
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1790
|
1779
|
project_ids = project_ids.reduce((cur, next) => {
|
1791
|
|
- obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
|
1780
|
+ obj1[next] ? '' : obj1[next] = true && cur.push(next)
|
1792
|
1781
|
return cur
|
1793
|
1782
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1794
|
1783
|
additions_ids = additions_ids.reduce((cur, next) => {
|
1795
|
|
- obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
|
1784
|
+ obj2[next] ? '' : obj2[next] = true && cur.push(next)
|
1796
|
1785
|
return cur
|
1797
|
1786
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1798
|
1787
|
|
|
@@ -1810,7 +1799,7 @@
|
1810
|
1799
|
let obj = {}
|
1811
|
1800
|
let count = 0
|
1812
|
1801
|
for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
|
1813
|
|
- if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
|
|
1802
|
+ if (drug_ids[i] == drug_month_prescriptions.advices[a].drug_id) {
|
1814
|
1803
|
obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
|
1815
|
1804
|
obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
|
1816
|
1805
|
obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
|
|
@@ -1834,7 +1823,7 @@
|
1834
|
1823
|
let obj = {}
|
1835
|
1824
|
let count = 0
|
1836
|
1825
|
for (let a = 0; a < project_month_prescriptions.project.length; a++) {
|
1837
|
|
- if ( project_ids[i].price == project_month_prescriptions.project[a].price) {
|
|
1826
|
+ if (project_ids[i] == project_month_prescriptions.project[a].project_id) {
|
1838
|
1827
|
obj['project_name'] = project_month_prescriptions.project[a].project.project_name
|
1839
|
1828
|
obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
|
1840
|
1829
|
obj['single_dose'] = project_month_prescriptions.project[a].single_dose
|
|
@@ -1860,7 +1849,7 @@
|
1860
|
1849
|
console.log(addition_month_prescriptions.addition)
|
1861
|
1850
|
if (addition_month_prescriptions.addition) {
|
1862
|
1851
|
for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
|
1863
|
|
- if ( additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
|
|
1852
|
+ if (project_ids[i] == addition_month_prescriptions.addition[a].item_id) {
|
1864
|
1853
|
obj['item_name'] = addition_month_prescriptions.addition[a].item_name
|
1865
|
1854
|
obj['id'] = addition_month_prescriptions.addition[a].id
|
1866
|
1855
|
obj['item_id'] = addition_month_prescriptions.addition[a].item_id
|
|
@@ -1902,185 +1891,6 @@
|
1902
|
1891
|
|
1903
|
1892
|
},
|
1904
|
1893
|
|
1905
|
|
- // setMonthPrescription(month_prescriptions) {
|
1906
|
|
- // this.month_prescriptions = []
|
1907
|
|
- //
|
1908
|
|
- // let drug_month_prescriptions = {
|
1909
|
|
- // advices: []
|
1910
|
|
- // }
|
1911
|
|
- // let drug_ids = []
|
1912
|
|
- // let project_month_prescriptions = {
|
1913
|
|
- // project: []
|
1914
|
|
- //
|
1915
|
|
- // }
|
1916
|
|
- // let project_ids = []
|
1917
|
|
- //
|
1918
|
|
- // let addition_month_prescriptions = {
|
1919
|
|
- // addition: []
|
1920
|
|
- //
|
1921
|
|
- // }
|
1922
|
|
- // let additions_ids = []
|
1923
|
|
- //
|
1924
|
|
- // for (let i = 0; i < month_prescriptions.length; i++) {
|
1925
|
|
- // if (month_prescriptions[i].type == 1) { //药品
|
1926
|
|
- // for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
|
1927
|
|
- // let obj = {
|
1928
|
|
- // id: month_prescriptions[i].advices[a].drug_id,
|
1929
|
|
- // price:month_prescriptions[i].advices[a].price,
|
1930
|
|
- //
|
1931
|
|
- // }
|
1932
|
|
- // drug_ids.push(obj)
|
1933
|
|
- // drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
|
1934
|
|
- // }
|
1935
|
|
- //
|
1936
|
|
- // } else if (month_prescriptions[i].type == 2) { //项目
|
1937
|
|
- // for (let a = 0; a < month_prescriptions[i].project.length; a++) {
|
1938
|
|
- // let obj = {
|
1939
|
|
- // id: month_prescriptions[i].project[a].project_id,
|
1940
|
|
- // price:month_prescriptions[i].project[a].price,
|
1941
|
|
- //
|
1942
|
|
- // }
|
1943
|
|
- // project_ids.push(obj)
|
1944
|
|
- // project_month_prescriptions.project.push(month_prescriptions[i].project[a])
|
1945
|
|
- // }
|
1946
|
|
- // }
|
1947
|
|
- // //附加收费
|
1948
|
|
- // for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
|
1949
|
|
- // let obj = {
|
1950
|
|
- // id: month_prescriptions[i].addition[a].item_id,
|
1951
|
|
- // price:month_prescriptions[i].addition[a].price,
|
1952
|
|
- //
|
1953
|
|
- // }
|
1954
|
|
- // additions_ids.push(obj)
|
1955
|
|
- // addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
|
1956
|
|
- //
|
1957
|
|
- // }
|
1958
|
|
- //
|
1959
|
|
- // }
|
1960
|
|
- //
|
1961
|
|
- // const obj = {}
|
1962
|
|
- // const obj1 = {}
|
1963
|
|
- // const obj2 = {}
|
1964
|
|
- //
|
1965
|
|
- // drug_ids = drug_ids.reduce((cur, next) => {
|
1966
|
|
- // obj[next.id] ? '' : obj[next.id] = true && obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
1967
|
|
- // return cur
|
1968
|
|
- // }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1969
|
|
- // project_ids = project_ids.reduce((cur, next) => {
|
1970
|
|
- // obj1[next] ? '' : obj1[next] = true && obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
1971
|
|
- // return cur
|
1972
|
|
- // }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1973
|
|
- // additions_ids = additions_ids.reduce((cur, next) => {
|
1974
|
|
- // obj2[next] ? '' : obj2[next] = true && obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
|
1975
|
|
- // return cur
|
1976
|
|
- // }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
1977
|
|
- //
|
1978
|
|
- // console.log(drug_ids)
|
1979
|
|
- // console.log(project_ids)
|
1980
|
|
- // console.log(additions_ids)
|
1981
|
|
- //
|
1982
|
|
- // console.log(additions_ids)
|
1983
|
|
- //
|
1984
|
|
- // let drugs = []
|
1985
|
|
- // let projects = []
|
1986
|
|
- // let additions = []
|
1987
|
|
- //
|
1988
|
|
- // for (let i = 0; i < drug_ids.length; i++) {
|
1989
|
|
- // let obj = {}
|
1990
|
|
- // let count = 0
|
1991
|
|
- // for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
|
1992
|
|
- // if (drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id && drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
|
1993
|
|
- // obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
|
1994
|
|
- // obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
|
1995
|
|
- // obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
|
1996
|
|
- // obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
|
1997
|
|
- // obj['day'] = drug_month_prescriptions.advices[a].day
|
1998
|
|
- // // obj['prescribing_number'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
|
1999
|
|
- // obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
|
2000
|
|
- // obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
|
2001
|
|
- // obj['id'] = drug_month_prescriptions.advices[a].drug_id
|
2002
|
|
- // // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
|
2003
|
|
- // obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
|
2004
|
|
- // count = count + drug_month_prescriptions.advices[a].prescribing_number
|
2005
|
|
- //
|
2006
|
|
- // }
|
2007
|
|
- // }
|
2008
|
|
- // obj['prescribing_number'] = count
|
2009
|
|
- // drugs.push(obj)
|
2010
|
|
- // }
|
2011
|
|
- //
|
2012
|
|
- // for (let i = 0; i < project_ids.length; i++) {
|
2013
|
|
- // let obj = {}
|
2014
|
|
- // let count = 0
|
2015
|
|
- // for (let a = 0; a < project_month_prescriptions.project.length; a++) {
|
2016
|
|
- // if (project_ids[i].id == project_month_prescriptions.project[a].project_id && project_ids[i].price == drug_month_prescriptions.project[a].price) {
|
2017
|
|
- // obj['project_name'] = project_month_prescriptions.project[a].project.project_name
|
2018
|
|
- // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
|
2019
|
|
- // obj['single_dose'] = project_month_prescriptions.project[a].single_dose
|
2020
|
|
- // obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
|
2021
|
|
- // obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
|
2022
|
|
- // obj['number_days'] = project_month_prescriptions.project[a].day
|
2023
|
|
- // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
|
2024
|
|
- // obj['unit'] = project_month_prescriptions.project[a].unit
|
2025
|
|
- // obj['project_id'] = project_month_prescriptions.project[a].project_id
|
2026
|
|
- // count = count + project_month_prescriptions.project[a].count
|
2027
|
|
- // // price = price + project_month_prescriptions.project[a].price
|
2028
|
|
- // obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
|
2029
|
|
- //
|
2030
|
|
- // }
|
2031
|
|
- // }
|
2032
|
|
- // obj['total'] = count
|
2033
|
|
- // projects.push(obj)
|
2034
|
|
- // }
|
2035
|
|
- //
|
2036
|
|
- // for (let i = 0; i < additions_ids.length; i++) {
|
2037
|
|
- // let obj = {}
|
2038
|
|
- // let count = 0
|
2039
|
|
- // console.log(addition_month_prescriptions.addition)
|
2040
|
|
- // if (addition_month_prescriptions.addition) {
|
2041
|
|
- // for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
|
2042
|
|
- // if (project_ids[i].id == addition_month_prescriptions.addition[a].item_id && project_ids[i].price == drug_month_prescriptions.addition[a].price) {
|
2043
|
|
- // obj['item_name'] = addition_month_prescriptions.addition[a].item_name
|
2044
|
|
- // obj['id'] = addition_month_prescriptions.addition[a].id
|
2045
|
|
- // obj['item_id'] = addition_month_prescriptions.addition[a].item_id
|
2046
|
|
- // count = count + addition_month_prescriptions.addition[a].count
|
2047
|
|
- // obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
|
2048
|
|
- // }
|
2049
|
|
- // }
|
2050
|
|
- // obj['count'] = count
|
2051
|
|
- // additions.push(obj)
|
2052
|
|
- // }
|
2053
|
|
- // }
|
2054
|
|
- //
|
2055
|
|
- // console.log(drugs)
|
2056
|
|
- // console.log(projects)
|
2057
|
|
- // console.log(additions)
|
2058
|
|
- //
|
2059
|
|
- // let p1 = {
|
2060
|
|
- // name: '处方' + 1,
|
2061
|
|
- // advices: drugs,
|
2062
|
|
- // project: [],
|
2063
|
|
- // type: 1,
|
2064
|
|
- // addition: additions
|
2065
|
|
- // }
|
2066
|
|
- // let p2 = {
|
2067
|
|
- // name: '处方' + 2,
|
2068
|
|
- // type: 2,
|
2069
|
|
- // project: projects,
|
2070
|
|
- // advices: [],
|
2071
|
|
- // addition: []
|
2072
|
|
- //
|
2073
|
|
- // }
|
2074
|
|
- // console.log(this.month_prescriptions)
|
2075
|
|
- // console.log(this.curMonthPrescriptions)
|
2076
|
|
- //
|
2077
|
|
- // this.month_prescriptions.push(p1)
|
2078
|
|
- // this.month_prescriptions.push(p2)
|
2079
|
|
- //
|
2080
|
|
- // this.curMonthPrescriptions = this.month_prescriptions[0]
|
2081
|
|
- //
|
2082
|
|
- // },
|
2083
|
|
-
|
2084
|
1894
|
unique(arr) {
|
2085
|
1895
|
const res = new Map()
|
2086
|
1896
|
return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
|
|
@@ -2111,9 +1921,7 @@
|
2111
|
1921
|
'patient_id': id,
|
2112
|
1922
|
'number': batch_number,
|
2113
|
1923
|
'start_time': this.other_start_time,
|
2114
|
|
- 'end_time': this.other_end_time,
|
2115
|
|
- 'type': this.radio,
|
2116
|
|
-
|
|
1924
|
+ 'end_time': this.other_end_time
|
2117
|
1925
|
}
|
2118
|
1926
|
this.loading = true
|
2119
|
1927
|
|