소스 검색

合并带嘛

csx 2 년 전
부모
커밋
2983b8efa5

+ 20 - 0
src/api/his/his.js 파일 보기

@@ -660,3 +660,23 @@ export function getPresciptionTemplateDetail(params) {
660 660
     params: params
661 661
   })
662 662
 }
663
+
664
+
665
+
666
+export function getHisData(params) {
667
+  return request({
668
+    url: '/data',
669
+    method: 'get',
670
+    params: params
671
+  })
672
+}
673
+
674
+export function getHisDataTwo(params) {
675
+  return request({
676
+    url: '/handleOrder10215two',
677
+    method: 'get',
678
+    params: params
679
+  })
680
+}
681
+
682
+

+ 1 - 1
src/utils/request.js 파일 보기

@@ -6,7 +6,7 @@ import store from '@/store'
6 6
 // create an axios instance
7 7
 const service = axios.create({
8 8
   baseURL: process.env.BASE_API, // api的base_url
9
-  timeout: 30000, // request timeout
9
+  timeout: 3000000, // request timeout
10 10
   withCredentials: true
11 11
 })
12 12
 

+ 1 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue 파일 보기

@@ -714,7 +714,7 @@
714 714
         this.form.p_type = 14
715 715
         this.form.sick_type = this.sick[0].id
716 716
         this.form.diagnosis = this.diagnoses[0].id
717
-        this.form.id_card_type = 2
717
+        this.form.id_card_type = 1
718 718
         this.form.certificates = 1
719 719
 
720 720
         if (this.$store.getters.xt_user.org_id == 10188  || this.$store.getters.xt_user.org_id == 10217){

+ 29 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 파일 보기

@@ -118,6 +118,11 @@
118 118
 <!--                       type="primary">撤销记账-->
119 119
 <!--            </el-button>-->
120 120
 
121
+            <el-button v-loading="loadingone" size="small"
122
+                       @click="open(40)"
123
+                       v-if="org_id == 10191"
124
+                       type="primary">登陆
125
+            </el-button>
121 126
 
122 127
             <el-button v-loading="loadingone" size="small"
123 128
                        @click="open(6)"
@@ -2853,6 +2858,10 @@ export default {
2853 2858
       }
2854 2859
     },
2855 2860
     open(index, med_type, order, prescriptions) {
2861
+
2862
+
2863
+
2864
+
2856 2865
       this.other_prescriptions = prescriptions
2857 2866
 
2858 2867
       if (index == 1) {
@@ -2869,8 +2878,7 @@ export default {
2869 2878
         this.paramsObj = obj
2870 2879
         this.treatVisible = true
2871 2880
         // this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
2872
-      }
2873
-      else if (index == 4) {//收费
2881
+      } else if (index == 4) {//收费
2874 2882
         var ids = []
2875 2883
         for (let i = 0; i < prescriptions.length; i++) {
2876 2884
           ids.push(prescriptions[i].id)
@@ -3225,7 +3233,6 @@ export default {
3225 3233
                   confirmButtonText: '确 定',
3226 3234
                   type: 'warning'
3227 3235
                 }).then(() => {
3228
-
3229 3236
                 }).catch(() => {
3230 3237
                 })
3231 3238
               }
@@ -3248,6 +3255,25 @@ export default {
3248 3255
         this.invoiceParams = paramsObj
3249 3256
         this.invoiceVisible = true
3250 3257
 
3258
+      } else if(index == 40){
3259
+        var that = this
3260
+        let params = {
3261
+        }
3262
+        axios.get('http://127.0.0.1:9532/9001', {
3263
+          params: params
3264
+        })
3265
+            .then(function(response) {
3266
+              if (response.data.state == 0) {
3267
+                that.$message.error(response.data.msg)
3268
+                return false
3269
+              } else {
3270
+                that.$message({ message: '登陆成功', type: 'success', duration: 5000 })
3271
+              }
3272
+            })
3273
+            .catch(function(error) {
3274
+            })
3275
+
3276
+
3251 3277
       }
3252 3278
     }, getName(admin_user_id) {
3253 3279
       for (let i = 0; i < this.adminUserOptions.length; i++) {

+ 423 - 252
src/xt_pages/outpatientCharges/summary.vue 파일 보기

@@ -5,7 +5,7 @@
5 5
     </div>
6 6
     <div class="app-container">
7 7
       <div
8
-        style="
8
+          style="
9 9
           display: flex;
10 10
           justify-content: space-between;
11 11
           margin-bottom: 10px;
@@ -17,19 +17,19 @@
17 17
           <!--导出-->
18 18
           <!--</el-button>-->
19 19
           <el-input
20
-            size="small"
21
-            style="width: 150px"
22
-            v-model="keywords"
23
-            @input="searchAction"
24
-            @keyup.enter.native="searchAction"
25
-            class="filter-item"
20
+              size="small"
21
+              style="width: 150px"
22
+              v-model="keywords"
23
+              @input="searchAction"
24
+              @keyup.enter.native="searchAction"
25
+              class="filter-item"
26 26
           />
27 27
           <el-button
28
-            size="small"
29
-            style="margin-left: 10px"
30
-            class="filter-item"
31
-            type="primary"
32
-            @click="searchAction"
28
+              size="small"
29
+              style="margin-left: 10px"
30
+              class="filter-item"
31
+              type="primary"
32
+              @click="searchAction"
33 33
           >
34 34
             搜索
35 35
           </el-button>
@@ -48,48 +48,48 @@
48 48
           <!--                    </el-select>-->
49 49
 
50 50
           <el-select
51
-            size="small"
52
-            v-model="sort_type"
53
-            placeholder="请选择"
54
-            style="width: 150px; margin-left: 10px"
55
-            @change="changeSortType"
51
+              size="small"
52
+              v-model="sort_type"
53
+              placeholder="请选择"
54
+              style="width: 150px; margin-left: 10px"
55
+              @change="changeSortType"
56 56
           >
57 57
             <el-option
58
-              v-for="(item, index) in sort_types"
59
-              :key="index"
60
-              :label="item.label"
61
-              :value="item.value"
58
+                v-for="(item, index) in sort_types"
59
+                :key="index"
60
+                :label="item.label"
61
+                :value="item.value"
62 62
             >
63 63
             </el-option>
64 64
           </el-select>
65 65
           <el-date-picker
66
-            size="small"
67
-            v-model="start_time"
68
-            prefix-icon="el-icon-date"
69
-            @change="handleStartTimeChange"
70
-            :editable="false"
71
-            :clearable="false"
72
-            style="width: 196px; margin-right: 10px"
73
-            type="date"
74
-            placeholder="选择开始日期"
75
-            format="yyyy-MM-dd"
76
-            value-format="yyyy-MM-dd"
77
-            align="right"
66
+              size="small"
67
+              v-model="start_time"
68
+              prefix-icon="el-icon-date"
69
+              @change="handleStartTimeChange"
70
+              :editable="false"
71
+              :clearable="false"
72
+              style="width: 196px; margin-right: 10px"
73
+              type="date"
74
+              placeholder="选择开始日期"
75
+              format="yyyy-MM-dd"
76
+              value-format="yyyy-MM-dd"
77
+              align="right"
78 78
           ></el-date-picker>
79 79
 
80 80
           <el-date-picker
81
-            size="small"
82
-            v-model="end_time"
83
-            prefix-icon="el-icon-date"
84
-            @change="handleEndTimeChange"
85
-            :editable="false"
86
-            :clearable="false"
87
-            style="width: 196px; margin-right: 10px"
88
-            type="date"
89
-            placeholder="选择结束日期"
90
-            format="yyyy-MM-dd"
91
-            value-format="yyyy-MM-dd"
92
-            align="right"
81
+              size="small"
82
+              v-model="end_time"
83
+              prefix-icon="el-icon-date"
84
+              @change="handleEndTimeChange"
85
+              :editable="false"
86
+              :clearable="false"
87
+              style="width: 196px; margin-right: 10px"
88
+              type="date"
89
+              placeholder="选择结束日期"
90
+              format="yyyy-MM-dd"
91
+              value-format="yyyy-MM-dd"
92
+              align="right"
93 93
           ></el-date-picker>
94 94
           <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
95 95
           <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
@@ -105,27 +105,32 @@
105 105
 
106 106
                     </el-popover> -->
107 107
           <el-button size="small" type="primary" @click="export_detail"
108
-            >报表下载</el-button
108
+          >报表下载
109
+          </el-button
109 110
           >
111
+<!--          <el-button size="small" type="primary" @click="export_detail_two"-->
112
+<!--          >报表下载2-->
113
+<!--          </el-button-->
114
+<!--          >-->
110 115
         </div>
111 116
       </div>
112 117
       <el-table
113
-        :data="tableData"
114
-        border
115
-        style="width: 100%"
116
-        :row-style="{ color: '#303133' }"
117
-        :header-cell-style="{
118
+          :data="tableData"
119
+          border
120
+          style="width: 100%"
121
+          :row-style="{ color: '#303133' }"
122
+          :header-cell-style="{
118 123
           backgroundColor: 'rgb(245, 247, 250)',
119 124
           color: '#606266',
120 125
         }"
121
-        highlight-current-row
126
+          highlight-current-row
122 127
       >
123 128
         <el-table-column
124
-          prop="date"
125
-          label="序号"
126
-          width="60"
127
-          align="center"
128
-          type="index"
129
+            prop="date"
130
+            label="序号"
131
+            width="60"
132
+            align="center"
133
+            type="index"
129 134
         >
130 135
         </el-table-column>
131 136
         <el-table-column align="center" width="100" prop="name" label="就诊号">
@@ -140,18 +145,21 @@
140 145
 
141 146
         <el-table-column align="center" width="90" prop="name" label="应收金额">
142 147
           <template slot-scope="scope">{{
143
-            scope.row.medfee_sumamt.toFixed(2)
144
-          }}</template>
148
+              scope.row.medfee_sumamt.toFixed(2)
149
+            }}
150
+          </template>
145 151
         </el-table-column>
146 152
         <el-table-column align="center" width="90" prop="name" label="实收金额">
147 153
           <template slot-scope="scope">{{
148
-            scope.row.reality_price.toFixed(2)
149
-          }}</template>
154
+              scope.row.reality_price.toFixed(2)
155
+            }}
156
+          </template>
150 157
         </el-table-column>
151 158
         <el-table-column align="center" width="90" prop="name" label="科室">
152 159
           <template slot-scope="scope">{{
153
-            scope.row.department_name
154
-          }}</template>
160
+              scope.row.department_name
161
+            }}
162
+          </template>
155 163
         </el-table-column>
156 164
         <el-table-column align="center" width="90" prop="name" label="医疗类型">
157 165
           <template slot-scope="scope">
@@ -171,23 +179,24 @@
171 179
         </el-table-column>
172 180
 
173 181
         <el-table-column
174
-          align="center"
175
-          width="100"
176
-          prop="name"
177
-          label="收费日期"
182
+            align="center"
183
+            width="100"
184
+            prop="name"
185
+            label="收费日期"
178 186
         >
179 187
           <template slot-scope="scope">
180 188
             {{
181 189
               scope.row.setl_time
182
-                ? scope.row.setl_time
183
-                : getTimes(scope.row.settle_accounts_date)
190
+                  ? scope.row.setl_time
191
+                  : getTimes(scope.row.settle_accounts_date)
184 192
             }}
185 193
           </template>
186 194
         </el-table-column>
187 195
         <el-table-column align="center" width="90" prop="name" label="收费员">
188 196
           <template slot-scope="scope">{{
189
-            getName(scope.row.creator)
190
-          }}</template>
197
+              getName(scope.row.creator)
198
+            }}
199
+          </template>
191 200
         </el-table-column>
192 201
         <el-table-column align="center" width="80" prop="name" label="状态">
193 202
           <template slot-scope="scope">
@@ -199,88 +208,90 @@
199 208
         <el-table-column align="center" prop="name" label="操作">
200 209
           <template slot-scope="scope">
201 210
             <el-button size="mini" type="primary" @click="toDetail(scope.row)"
202
-              >详情</el-button
211
+            >详情
212
+            </el-button
203 213
             >
204 214
             <el-button size="mini" type="primary" @click="toPrint(scope.row)">
205 215
               结算单
206 216
             </el-button>
207 217
             <el-button
208
-              size="mini"
209
-              type="primary"
210
-              @click="uploadInfo(scope.row)"
211
-              v-if="scope.row.order_status == 2 && scope.row.result.id == 0"
218
+                size="mini"
219
+                type="primary"
220
+                @click="uploadInfo(scope.row)"
221
+                v-if="scope.row.order_status == 2 && scope.row.result.id == 0"
212 222
             >
213 223
               上传结算清单
214 224
             </el-button>
215 225
             <el-button
216
-              size="mini"
217
-              type="primary"
218
-              @click="cancelUpload(scope.row)"
219
-              v-if="scope.row.order_status == 2 && scope.row.result.id > 0"
226
+                size="mini"
227
+                type="primary"
228
+                @click="cancelUpload(scope.row)"
229
+                v-if="scope.row.order_status == 2 && scope.row.result.id > 0"
220 230
             >
221 231
               撤销结算清单
222 232
             </el-button>
223 233
             <el-button
224
-              size="mini"
225
-              type="primary"
226
-              v-if="
234
+                size="mini"
235
+                type="primary"
236
+                v-if="
227 237
                 scope.row.order_status == 2 &&
228 238
                 $store.getters.xt_user.org_id == 10106
229 239
               "
230
-              @click="settlementPrint(scope.row)"
231
-              >结算单
240
+                @click="settlementPrint(scope.row)"
241
+            >结算单
232 242
             </el-button>
233 243
             <el-button size="mini" type="primary" @click="toRefund(scope.row)">
234 244
               退费
235 245
             </el-button>
236 246
             <el-button
237
-              size="mini"
238
-              type="primary"
239
-              @click="invoicePrint(scope.row)"
240
-              >打印发票</el-button
247
+                size="mini"
248
+                type="primary"
249
+                @click="invoicePrint(scope.row)"
250
+            >打印发票
251
+            </el-button
241 252
             >
242 253
           </template>
243 254
         </el-table-column>
244 255
       </el-table>
245 256
       <el-pagination
246
-        @size-change="handleSizeChange"
247
-        @current-change="handleCurrentChange"
248
-        :page-sizes="[10, 50, 100]"
249
-        :page-size="10"
250
-        :current-page.sync="page"
251
-        background
252
-        style="margin-top: 20px; float: right"
253
-        layout="total, sizes, prev, pager, next, jumper"
254
-        :total="total"
257
+          @size-change="handleSizeChange"
258
+          @current-change="handleCurrentChange"
259
+          :page-sizes="[10, 50, 100]"
260
+          :page-size="10"
261
+          :current-page.sync="page"
262
+          background
263
+          style="margin-top: 20px; float: right"
264
+          layout="total, sizes, prev, pager, next, jumper"
265
+          :total="total"
255 266
       >
256 267
       </el-pagination>
257 268
     </div>
258 269
 
259 270
     <el-dialog
260
-      class="centerDialog"
261
-      width="1200px"
262
-      title="打印"
263
-      :visible.sync="statementVisible"
271
+        class="centerDialog"
272
+        width="1200px"
273
+        title="打印"
274
+        :visible.sync="statementVisible"
264 275
     >
265 276
       <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
266 277
       <new-statement-print
267
-        ref="print"
268
-        :paramsObj="orderObj"
278
+          ref="print"
279
+          :paramsObj="orderObj"
269 280
       ></new-statement-print>
270 281
     </el-dialog>
271 282
     <el-dialog
272
-      class="centerDialog"
273
-      width="900px"
274
-      title="打印"
275
-      :visible.sync="listVisible"
283
+        class="centerDialog"
284
+        width="900px"
285
+        title="打印"
286
+        :visible.sync="listVisible"
276 287
     >
277 288
       <listPrint></listPrint>
278 289
     </el-dialog>
279 290
     <el-dialog
280
-      class="centerDialog"
281
-      width="900px"
282
-      title="打印"
283
-      :visible.sync="allListVisible"
291
+        class="centerDialog"
292
+        width="900px"
293
+        title="打印"
294
+        :visible.sync="allListVisible"
284 295
     >
285 296
       <allListPrint :paramsObj="paramsObj"></allListPrint>
286 297
     </el-dialog>
@@ -296,22 +307,22 @@
296 307
     <!--</el-dialog>-->
297 308
 
298 309
     <el-dialog
299
-      class="centerDialog"
300
-      width="1200px"
301
-      title="打印"
302
-      :visible.sync="invoiceVisible"
310
+        class="centerDialog"
311
+        width="1200px"
312
+        title="打印"
313
+        :visible.sync="invoiceVisible"
303 314
     >
304 315
       <invoice-print ref="print" :invoiceParams="invoiceParams"></invoice-print>
305 316
     </el-dialog>
306 317
     <el-dialog
307
-      class="centerDialog"
308
-      width="1200px"
309
-      title="打印"
310
-      :visible.sync="settlementVisible"
318
+        class="centerDialog"
319
+        width="1200px"
320
+        title="打印"
321
+        :visible.sync="settlementVisible"
311 322
     >
312 323
       <settlement-print
313
-        ref="print"
314
-        :paramsObj="settlementObj"
324
+          ref="print"
325
+          :paramsObj="settlementObj"
315 326
       ></settlement-print>
316 327
     </el-dialog>
317 328
   </div>
@@ -320,22 +331,18 @@
320 331
 
321 332
 <script>
322 333
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
323
-import {
324
-  getDoctorList,
325
-  getExportConsumeDetailList,
326
-  getHisOrderList,
327
-  Refund,
328
-} from "@/api/his/his";
329
-import { uParseTime } from "@/utils/tools";
334
+import {getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund,} from "@/api/his/his";
335
+import {uParseTime} from "@/utils/tools";
330 336
 // import NewStatementPrint from './newStatementPrint'
331 337
 import NewStatementPrint from "./statementPrint.vue";
332 338
 import listPrint from "./listPrint";
333 339
 import allListPrint from "./allListPrint";
334 340
 import NewStatementPrintTwo from "./newStatementPrintTwo";
335
-import { fetchAllAdminUsers } from "@/api/doctor";
341
+import {fetchAllAdminUsers} from "@/api/doctor";
336 342
 import axios from "axios";
337 343
 import invoicePrint from "./invoicePrint";
338 344
 import settlementPrint from "./settlementPrint";
345
+import {getHisDataTwo} from "../../api/his/his";
339 346
 
340 347
 export default {
341 348
   name: "OutpatientChargesSummary",
@@ -355,8 +362,8 @@ export default {
355 362
       statementVisible9504: false,
356 363
       orderObj9504: {},
357 364
       crumbs: [
358
-        { path: false, name: "门诊收费" },
359
-        { path: false, name: "项目消费明细汇总" },
365
+        {path: false, name: "门诊收费"},
366
+        {path: false, name: "项目消费明细汇总"},
360 367
       ],
361 368
       tableData: [],
362 369
       limit: 10,
@@ -368,8 +375,8 @@ export default {
368 375
       doctors: [],
369 376
       sort_type: 1,
370 377
       sort_types: [
371
-        { value: 1, label: "处方时间" },
372
-        { value: 2, label: "结算时间" },
378
+        {value: 1, label: "处方时间"},
379
+        {value: 2, label: "结算时间"},
373 380
       ],
374 381
       admin_user_id: "",
375 382
       listVisible: false,
@@ -398,8 +405,8 @@ export default {
398 405
         vm.sort_type = vm.$store.getters.pagedata.list.sort_type;
399 406
         setTimeout(() => {
400 407
           vm.getHisOrderList();
401
-        },300)
402
-        
408
+        }, 300)
409
+
403 410
       });
404 411
     } else {
405 412
       next();
@@ -422,7 +429,6 @@ export default {
422 429
     this.getHisOrderList();
423 430
   },
424 431
 
425
- 
426 432
   methods: {
427 433
     setStorage() {
428 434
       this.$store.commit("SET_PAGEDATA", {
@@ -466,64 +472,70 @@ export default {
466 472
     cancelUpload(row) {
467 473
       var that = this;
468 474
       axios
469
-        .get("http://127.0.0.1:9532/zh/api/clearsettle", {
470
-          params: {
471
-            order_id: row.id,
472
-            admin_user_id: this.$store.getters.xt_user.user.id,
473
-          },
474
-        })
475
-        .then(function (response) {
476
-          if (response.data.state == 0) {
477
-            that.$message.error(response.data.msg);
478
-            return false;
479
-          } else {
480
-            if (response.data.data.failed_code == -10) {
481
-              // that.$message.error(response.data.data.msg)
482
-              that
483
-                .$confirm(response.data.data.msg, "医保错误信息", {
484
-                  confirmButtonText: "确 定",
485
-                  type: "warning",
486
-                })
487
-                .then(() => {})
488
-                .catch(() => {});
475
+          .get("http://127.0.0.1:9532/zh/api/clearsettle", {
476
+            params: {
477
+              order_id: row.id,
478
+              admin_user_id: this.$store.getters.xt_user.user.id,
479
+            },
480
+          })
481
+          .then(function (response) {
482
+            if (response.data.state == 0) {
483
+              that.$message.error(response.data.msg);
484
+              return false;
489 485
             } else {
490
-              that.$message.success("撤销成功");
491
-              row.result.id = 0;
486
+              if (response.data.data.failed_code == -10) {
487
+                // that.$message.error(response.data.data.msg)
488
+                that
489
+                    .$confirm(response.data.data.msg, "医保错误信息", {
490
+                      confirmButtonText: "确 定",
491
+                      type: "warning",
492
+                    })
493
+                    .then(() => {
494
+                    })
495
+                    .catch(() => {
496
+                    });
497
+              } else {
498
+                that.$message.success("撤销成功");
499
+                row.result.id = 0;
500
+              }
492 501
             }
493
-          }
494
-        })
495
-        .catch(function (error) {});
502
+          })
503
+          .catch(function (error) {
504
+          });
496 505
     },
497 506
     uploadInfo(row) {
498 507
       var that = this;
499 508
       axios
500
-        .get("http://127.0.0.1:9532/api/settlelist/get", {
501
-          params: {
502
-            order_id: row.id,
503
-            admin_user_id: this.$store.getters.xt_user.user.id,
504
-          },
505
-        })
506
-        .then(function (response) {
507
-          if (response.data.state == 0) {
508
-            that.$message.error(response.data.msg);
509
-            return false;
510
-          } else {
511
-            if (response.data.data.failed_code == -10) {
512
-              // that.$message.error(response.data.data.msg)
513
-              that
514
-                .$confirm(response.data.data.msg, "医保错误信息", {
515
-                  confirmButtonText: "确 定",
516
-                  type: "warning",
517
-                })
518
-                .then(() => {})
519
-                .catch(() => {});
509
+          .get("http://127.0.0.1:9532/api/settlelist/get", {
510
+            params: {
511
+              order_id: row.id,
512
+              admin_user_id: this.$store.getters.xt_user.user.id,
513
+            },
514
+          })
515
+          .then(function (response) {
516
+            if (response.data.state == 0) {
517
+              that.$message.error(response.data.msg);
518
+              return false;
520 519
             } else {
521
-              that.$message.success("上传成功");
522
-              row.result.id = response.data.data.result.id;
520
+              if (response.data.data.failed_code == -10) {
521
+                // that.$message.error(response.data.data.msg)
522
+                that
523
+                    .$confirm(response.data.data.msg, "医保错误信息", {
524
+                      confirmButtonText: "确 定",
525
+                      type: "warning",
526
+                    })
527
+                    .then(() => {
528
+                    })
529
+                    .catch(() => {
530
+                    });
531
+              } else {
532
+                that.$message.success("上传成功");
533
+                row.result.id = response.data.data.result.id;
534
+              }
523 535
             }
524
-          }
525
-        })
526
-        .catch(function (error) {});
536
+          })
537
+          .catch(function (error) {
538
+          });
527 539
     },
528 540
 
529 541
     fetchAllAdminUsers() {
@@ -547,23 +559,24 @@ export default {
547 559
           cancelButtonText: "取 消",
548 560
           type: "warning",
549 561
         })
550
-          .then(() => {
551
-            let params = {
552
-              order_id: row.id,
553
-              patient_id: row.patient_id,
554
-              record_time: this.getTimes(row.settle_accounts_date),
555
-            };
556
-            Refund(params).then((response) => {
557
-              if (response.data.state == 0) {
558
-                this.$message.error(response.data.msg);
559
-                return false;
560
-              } else {
561
-                this.$message({ message: "退费成功", type: "success" });
562
-                this.getHisOrderList();
563
-              }
562
+            .then(() => {
563
+              let params = {
564
+                order_id: row.id,
565
+                patient_id: row.patient_id,
566
+                record_time: this.getTimes(row.settle_accounts_date),
567
+              };
568
+              Refund(params).then((response) => {
569
+                if (response.data.state == 0) {
570
+                  this.$message.error(response.data.msg);
571
+                  return false;
572
+                } else {
573
+                  this.$message({message: "退费成功", type: "success"});
574
+                  this.getHisOrderList();
575
+                }
576
+              });
577
+            })
578
+            .catch(() => {
564 579
             });
565
-          })
566
-          .catch(() => {});
567 580
       } else {
568 581
         var that = this;
569 582
         this.$confirm("是否退费", "退费", {
@@ -571,44 +584,48 @@ export default {
571 584
           cancelButtonText: "取 消",
572 585
           type: "warning",
573 586
         })
574
-          .then(() => {
575
-            let params = {
576
-              order_id: row.id,
577
-              patient_id: row.patient_id,
578
-              record_time: that.getTimes(row.settle_accounts_date),
579
-              admin_user_id: that.$store.getters.xt_user.user.id,
580
-            };
581
-            axios
582
-              .get("http://127.0.0.1:9532/api/refund/post", {
583
-                params: params,
584
-              })
585
-              .then(function (response) {
586
-                if (response.data.state == 0) {
587
-                  that.$message.error(response.data.msg);
588
-                  return false;
589
-                } else {
590
-                  if (response.data.data.failed_code == -10) {
591
-                    // that.$message.error(response.data.data.msg)
592
-                    that
593
-                      .$confirm(response.data.data.msg, "医保错误信息", {
594
-                        confirmButtonText: "确 定",
595
-                        type: "warning",
596
-                      })
597
-                      .then(() => {})
598
-                      .catch(() => {});
599
-                  } else {
600
-                    that.$message({
601
-                      message: "退费成功",
602
-                      type: "success",
603
-                      duration: 5000,
604
-                    });
605
-                    that.getHisOrderList();
606
-                  }
607
-                }
608
-              })
609
-              .catch(function (error) {});
610
-          })
611
-          .catch(() => {});
587
+            .then(() => {
588
+              let params = {
589
+                order_id: row.id,
590
+                patient_id: row.patient_id,
591
+                record_time: that.getTimes(row.settle_accounts_date),
592
+                admin_user_id: that.$store.getters.xt_user.user.id,
593
+              };
594
+              axios
595
+                  .get("http://127.0.0.1:9532/api/refund/post", {
596
+                    params: params,
597
+                  })
598
+                  .then(function (response) {
599
+                    if (response.data.state == 0) {
600
+                      that.$message.error(response.data.msg);
601
+                      return false;
602
+                    } else {
603
+                      if (response.data.data.failed_code == -10) {
604
+                        // that.$message.error(response.data.data.msg)
605
+                        that
606
+                            .$confirm(response.data.data.msg, "医保错误信息", {
607
+                              confirmButtonText: "确 定",
608
+                              type: "warning",
609
+                            })
610
+                            .then(() => {
611
+                            })
612
+                            .catch(() => {
613
+                            });
614
+                      } else {
615
+                        that.$message({
616
+                          message: "退费成功",
617
+                          type: "success",
618
+                          duration: 5000,
619
+                        });
620
+                        that.getHisOrderList();
621
+                      }
622
+                    }
623
+                  })
624
+                  .catch(function (error) {
625
+                  });
626
+            })
627
+            .catch(() => {
628
+            });
612 629
       }
613 630
     },
614 631
     toPrint(row) {
@@ -652,7 +669,161 @@ export default {
652 669
         order_id: row.id,
653 670
       };
654 671
       this.settlementObj = obj;
672
+    }, export_detail_two() {
673
+      let params = {};
674
+      getHisDataTwo(params).then((response) => {
675
+        if (response.data.state == 0) {
676
+          this.$message.error(response.data.msg);
677
+          return false;
678
+        } else {
679
+          let list = [];
680
+          console.log(response.data.data.order)
681
+          for (let i = 0; i < response.data.data.order.length; i++) {
682
+            let order = response.data.data.order[i];
683
+            for (let b = 0; b < order.info.length; b++) {
684
+              let obj = {
685
+                index: b + 1,
686
+                org_name: "肇庆三鹤血液透析中心",
687
+                name: order.psn_name,
688
+                id_card_no: order.certno,
689
+                level: "未定级",
690
+                psn_type: order.psn_type,
691
+                date: "2022年3月",
692
+                start_time: order.his.in_hosptial_time,
693
+                end_time: order.his.out_hosptial_time,
694
+                total: order.info[b].det_item_fee_sumamt,
695
+                fund_total: order.info[b].inscp_scp_amt,
696
+                patient_id: order.info[b].patient_id,
697
+                dialysis_time:this.getTimes(order.info[b].upload_date)
698
+
699
+              }
700
+              // if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
701
+              //   obj["dialysis_time"] = this.getTimes(order.info[b].advice_date)
702
+              // } else if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
703
+              //   obj["dialysis_time"] = this.getTimes(order.info[b].record_date)
704
+              // }
705
+              if (order.psn_type == "11") {
706
+
707
+                obj["psn_type"] = "职工在职"
708
+              } else if (order.psn_type == "12") {
709
+                obj["psn_type"] = "职工退休"
710
+
711
+              } else if (order.psn_type == "13") {
712
+                obj["psn_type"] = "离休"
713
+
714
+              } else if (order.psn_type == "14") {
715
+                obj["psn_type"] = "居民医保"
716
+
717
+              } else if (order.psn_type == "15") {
718
+
719
+                obj["psn_type"] = "居民医保"
720
+
721
+              } else if (order.psn_type == "16") {
722
+                obj["psn_type"] = "居民医保"
723
+
724
+              }
725
+
726
+              list.push(obj)
727
+            }
728
+          }
729
+          console.log(list)
730
+
731
+          var new_list = this.unique_two(list)
732
+
733
+          for (let i = 0; i < new_list.length; i++) {
734
+            let total = 0
735
+            let fund_total = 0
736
+            for (let b = 0; b < list.length; b++) {
737
+              if (new_list[i].patient_id == list[b].patient_id && new_list[i].dialysis_time == list[b].dialysis_time) {
738
+                total = total + list[b].total
739
+                fund_total = fund_total + list[b].fund_total
740
+              }
741
+            }
742
+            new_list[i].total = total.toFixed(2)
743
+            new_list[i].fund_total = fund_total.toFixed(2)
744
+
745
+          }
746
+
747
+          console.log(new_list)
748
+
749
+          var tarList = [];
750
+          for (let i = 0; i < new_list.length; i++) {
751
+            let obj = {
752
+              "序号": i + 1,
753
+              "医疗机构名称": new_list[i].org_name,
754
+              "姓名": new_list[i].name,
755
+              "身份证号": new_list[i].id_card_no,
756
+              "医院等级": new_list[i].level,
757
+              "参保类型": new_list[i].psn_type,
758
+              "费用所属期": new_list[i].date,
759
+              "开始就医时间": new_list[i].start_time,
760
+              "结束就医时间": new_list[i].end_time,
761
+              "透析日期": new_list[i].dialysis_time,
762
+              "本次透析医疗总金额": new_list[i].total,
763
+              "本次透析医保结算费用金额": new_list[i].fund_total,
764
+
765
+            }
766
+            tarList.push(obj)
767
+
768
+          }
769
+
770
+          import("@/vendor/Export2Excel").then((excel) => {
771
+            const tHeader = [
772
+              "序号",
773
+              "医疗机构名称",
774
+              "姓名",
775
+              "身份证号",
776
+              "医院等级",
777
+              "参保类型",
778
+              "费用所属期",
779
+              "开始就医时间",
780
+              "结束就医时间",
781
+              "透析日期",
782
+              "本次透析医疗总金额",
783
+              "本次透析医保结算费用金额",
784
+
785
+            ];
786
+            const filterVal = [
787
+              "序号",
788
+              "医疗机构名称",
789
+              "姓名",
790
+              "身份证号",
791
+              "医院等级",
792
+              "参保类型",
793
+              "费用所属期",
794
+              "开始就医时间",
795
+              "结束就医时间",
796
+              "透析日期",
797
+              "本次透析医疗总金额",
798
+              "本次透析医保结算费用金额",
799
+
800
+            ];
801
+            const data = this.formatJson(filterVal, tarList);
802
+            excel.export_json_to_excel({
803
+              header: tHeader,
804
+              data,
805
+              filename: "消费明细",
806
+            });
807
+          });
808
+        }
809
+      });
810
+    }, unique_two(array) {
811
+      // res用来存储结果
812
+      var res = []
813
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
814
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
815
+          if (array[i].patient_id === res[j].patient_id && array[i].dialysis_time === res[j].dialysis_time) {
816
+            break
817
+          }
818
+        }
819
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
820
+        if (j === resLen) {
821
+          res.push(array[i])
822
+        }
823
+      }
824
+      return res
655 825
     },
826
+
656 827
     export_detail() {
657 828
       let params = {
658 829
         start_time: this.start_time,
@@ -679,8 +850,8 @@ export default {
679 850
 
680 851
             let time = "";
681 852
             if (
682
-              order.his_patient != null &&
683
-              order.his_patient.number.length > 0
853
+                order.his_patient != null &&
854
+                order.his_patient.number.length > 0
684 855
             ) {
685 856
               number = order.his_patient.number;
686 857
             }
@@ -700,9 +871,9 @@ export default {
700 871
             }
701 872
 
702 873
             if (
703
-              order.p_info != null &&
704
-              order.p_info.department != null &&
705
-              order.p_info.department.name.length > 0
874
+                order.p_info != null &&
875
+                order.p_info.department != null &&
876
+                order.p_info.department.name.length > 0
706 877
             ) {
707 878
               department = order.p_info.department.name;
708 879
             }
@@ -927,20 +1098,20 @@ export default {
927 1098
               let name = "";
928 1099
               let selfpay_prop = "";
929 1100
               if (
930
-                order.order_info[b].advice.id == 0 &&
931
-                order.order_info[b].project.id > 0
1101
+                  order.order_info[b].advice.id == 0 &&
1102
+                  order.order_info[b].project.id > 0
932 1103
               ) {
933 1104
                 item_name = order.order_info[b].project.project.project_name;
934 1105
                 item_code = order.order_info[b].project.project.medical_code;
935 1106
                 price = order.order_info[b].pric;
936 1107
                 unit = order.order_info[b].project.project.unit;
937 1108
               } else if (
938
-                order.order_info[b].advice.id > 0 &&
939
-                order.order_info[b].project.id == 0
1109
+                  order.order_info[b].advice.id > 0 &&
1110
+                  order.order_info[b].project.id == 0
940 1111
               ) {
941 1112
                 item_name = order.order_info[b].advice.advice_name;
942 1113
                 item_code =
943
-                  order.order_info[b].advice.drug.medical_insurance_number;
1114
+                    order.order_info[b].advice.drug.medical_insurance_number;
944 1115
                 price = order.order_info[b].pric;
945 1116
                 unit = order.order_info[b].advice.prescribing_number_unit;
946 1117
               }
@@ -1003,7 +1174,7 @@ export default {
1003 1174
     },
1004 1175
     toDetail(row) {
1005 1176
       this.$router.push(
1006
-        "/outpatientCharges/summaryDetail?patient_id=" +
1177
+          "/outpatientCharges/summaryDetail?patient_id=" +
1007 1178
           row.patient.id +
1008 1179
           "&number=" +
1009 1180
           row.number +