|
@@ -43,21 +43,28 @@
|
43
|
43
|
<div>
|
44
|
44
|
</div>
|
45
|
45
|
</div>
|
46
|
|
- <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
|
|
46
|
+ <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
|
47
|
47
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
48
|
48
|
show-summary
|
49
|
49
|
max-height="600"
|
50
|
50
|
v-loading="detail_loading"
|
51
|
51
|
highlight-current-row>
|
52
|
|
- <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
|
|
52
|
+ <el-table-column type="index" label="序号" width="60px" align="center">
|
|
53
|
+ <template slot-scope="scope">{{scope.row.index}}</template>
|
|
54
|
+ </el-table-column>
|
53
|
55
|
<el-table-column align="center" prop="name" label="处方日期">
|
54
|
56
|
<template slot-scope="scope"></template>
|
55
|
57
|
</el-table-column>
|
56
|
58
|
<el-table-column align="center" prop="name" label="费用分类">
|
57
|
|
- <template slot-scope="scope"></template>
|
|
59
|
+ <template slot-scope="scope">
|
|
60
|
+
|
|
61
|
+ </template>
|
58
|
62
|
</el-table-column>
|
59
|
63
|
<el-table-column align="center" prop="name" label="项目名称">
|
60
|
|
- <template slot-scope="scope"></template>
|
|
64
|
+ <template slot-scope="scope">
|
|
65
|
+ <span v-if="scope.row.advice_id > 0 ">{{getAdviceName(scope.row.advice_id)}}</span>
|
|
66
|
+ <span v-if="scope.row.project_id > 0 ">{{getProjectName(scope.row.project_id)}}</span>
|
|
67
|
+ </template>
|
61
|
68
|
</el-table-column>
|
62
|
69
|
<el-table-column align="center" prop="name" label="规格型号">
|
63
|
70
|
<template slot-scope="scope"></template>
|
|
@@ -109,6 +116,7 @@ export default {
|
109
|
116
|
sameRowArr: [],
|
110
|
117
|
keywords: '',
|
111
|
118
|
tableData: [],
|
|
119
|
+ tableList:[],
|
112
|
120
|
chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
|
113
|
121
|
item_type: '0',
|
114
|
122
|
items: [
|
|
@@ -117,7 +125,7 @@ export default {
|
117
|
125
|
{ id: 2, name: '项目' }
|
118
|
126
|
|
119
|
127
|
]
|
120
|
|
-
|
|
128
|
+
|
121
|
129
|
}
|
122
|
130
|
},
|
123
|
131
|
methods: {
|
|
@@ -143,15 +151,60 @@ export default {
|
143
|
151
|
}
|
144
|
152
|
getGatherDetailList(params).then(response=>{
|
145
|
153
|
if(response.data.state == 1){
|
146
|
|
- var detailList = response.data.data.detailList
|
147
|
|
- console.log("detailist232323322332",detailList)
|
|
154
|
+ var projectlist = response.data.data.projectlist
|
|
155
|
+ for(let i=0;i<projectlist.length;i++){
|
|
156
|
+ this.tableList.push(projectlist[i])
|
|
157
|
+ }
|
|
158
|
+ console.log("detailist232323322332",projectlist)
|
|
159
|
+ var advicelist = response.data.data.advicelist
|
|
160
|
+ for(let i=0;i<advicelist.length;i++){
|
|
161
|
+ this.tableList.push(advicelist[i])
|
|
162
|
+ }
|
|
163
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
164
|
+ this.tableList[i].index = i +1
|
|
165
|
+ }
|
|
166
|
+ console.log("advicelist332233323232323232",this.tableList)
|
|
167
|
+
|
148
|
168
|
var list = response.data.data.list
|
149
|
169
|
console.log("list233223232323",list)
|
|
170
|
+ for(let i=0;i<list.length;i++){
|
|
171
|
+ for(let j=0;j<list[i].orders.length;j++){
|
|
172
|
+ for(let z=0;z<list[i].orders[j].order_info.length;z++){
|
|
173
|
+ list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
|
|
174
|
+ list[i].orders[j].order_info[z].number = list[i].orders[j].number
|
|
175
|
+ this.tableData.push(list[i].orders[j].order_info[z])
|
|
176
|
+ }
|
|
177
|
+ }
|
|
178
|
+ }
|
|
179
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
180
|
+ this.tableData[i].index = i+1
|
|
181
|
+ this.tableData[i].total_price = 0
|
|
182
|
+ this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
|
|
183
|
+ }
|
|
184
|
+ console.log("322323232323322323",this.tableData)
|
150
|
185
|
}
|
151
|
186
|
})
|
152
|
187
|
|
153
|
188
|
|
154
|
189
|
},
|
|
190
|
+ getAdviceName(id){
|
|
191
|
+ var drug_name = ""
|
|
192
|
+ for(let i= 0;i<this.tableData.length;i++){
|
|
193
|
+ if(id == this.tableData[i].advice_id){
|
|
194
|
+ drug_name = this.tableData[i].advice.advice_name
|
|
195
|
+ }
|
|
196
|
+ }
|
|
197
|
+ return drug_name
|
|
198
|
+ },
|
|
199
|
+ getProjectName(id){
|
|
200
|
+ var project_name = ""
|
|
201
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
202
|
+ if(id == this.tableData[i].project_id){
|
|
203
|
+ project_name = this.tableData[i].project.project.project_name
|
|
204
|
+ }
|
|
205
|
+ }
|
|
206
|
+ return project_name
|
|
207
|
+ }
|
155
|
208
|
},
|
156
|
209
|
created() {
|
157
|
210
|
this.getGatherDetailList()
|