Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 3 years ago
parent
commit
16ba76f3d5
1 changed files with 148 additions and 0 deletions
  1. 148 0
      src/xt_pages/hospitalStation/summary.vue

+ 148 - 0
src/xt_pages/hospitalStation/summary.vue View File

@@ -113,6 +113,17 @@
113 113
             </el-button>
114 114
             <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
115 115
 
116
+            <el-button size="mini" type="primary" @click="refundOne(scope.row)">
117
+              撤销出院
118
+            </el-button>
119
+
120
+            <el-button size="mini" type="primary" @click="refundTwo(scope.row)">
121
+              撤销明细
122
+            </el-button>
123
+
124
+            <el-button size="mini" type="primary" @click="refundThee(scope.row)">
125
+              撤销入院
126
+            </el-button>
116 127
           </template>
117 128
         </el-table-column>
118 129
       </el-table>
@@ -236,6 +247,143 @@
236 247
       }
237 248
     },
238 249
     methods: {
250
+      refundOne(row){
251
+        var that = this;
252
+        this.$confirm('是否撤销出院', '撤销出院', {
253
+          confirmButtonText: '确 定',
254
+          cancelButtonText: '取 消',
255
+          type: 'warning'
256
+        }).then(() => {
257
+          let params = {
258
+            'id': row.his_hospital_patient.id,
259
+            'admin_user_id': this.$store.getters.xt_user.user.id,
260
+
261
+          };
262
+          axios.get('http://127.0.0.1:9532/zh/api/outhopitaluncheck/get', {
263
+            params: params
264
+          })
265
+            .then(function(response) {
266
+              if (response.data.state == 0) {
267
+                that.$message.error(response.data.msg);
268
+                return false
269
+              } else {
270
+                if (response.data.data.failed_code == -10) {
271
+                  // that.$message.error(response.data.data.msg)
272
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
273
+                    confirmButtonText: '确 定',
274
+                    type: 'warning'
275
+                  }).then(() => {
276
+
277
+                  }).catch(() => {
278
+                  })
279
+                } else {
280
+                  that.$message({ message: '撤销出院成功', type: 'success', duration: 5000 })
281
+                }
282
+
283
+              }
284
+            })
285
+            .catch(function(error) {
286
+
287
+            })
288
+
289
+        }).catch(() => {
290
+
291
+        })
292
+
293
+
294
+
295
+      },refundThee(row){
296
+
297
+        var that = this;
298
+        this.$confirm('是否撤销入院', '撤销入院', {
299
+          confirmButtonText: '确 定',
300
+          cancelButtonText: '取 消',
301
+          type: 'warning'
302
+        }).then(() => {
303
+          let params = {
304
+            'id': row.his_hospital_patient.id,
305
+            'admin_user_id': this.$store.getters.xt_user.user.id,
306
+
307
+          };
308
+          axios.get('http://127.0.0.1:9532/zh/api/inthopitaluncheck/get', {
309
+            params: params
310
+          })
311
+            .then(function(response) {
312
+              if (response.data.state == 0) {
313
+                that.$message.error(response.data.msg);
314
+                return false
315
+              } else {
316
+                if (response.data.data.failed_code == -10) {
317
+                  // that.$message.error(response.data.data.msg)
318
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
319
+                    confirmButtonText: '确 定',
320
+                    type: 'warning'
321
+                  }).then(() => {
322
+
323
+                  }).catch(() => {
324
+                  })
325
+                } else {
326
+                  that.changeRadioAndPatient(1);
327
+
328
+                  that.$message({ message: '撤销入院成功', type: 'success', duration: 5000 })
329
+                }
330
+
331
+              }
332
+            })
333
+            .catch(function(error) {
334
+
335
+            })
336
+
337
+        }).catch(() => {
338
+
339
+        })
340
+
341
+
342
+      },refundTwo(row){
343
+        var that = this;
344
+        this.$confirm('是否撤销明细', '撤销明细', {
345
+          confirmButtonText: '确 定',
346
+          cancelButtonText: '取 消',
347
+          type: 'warning'
348
+        }).then(() => {
349
+          let params = {
350
+            'order_id': row.id,
351
+            'admin_user_id': this.$store.getters.xt_user.user.id,
352
+          };
353
+          axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
354
+            params: params
355
+          })
356
+            .then(function(response) {
357
+              if (response.data.state == 0) {
358
+                that.$message.error(response.data.msg);
359
+                that.loadingtwo = false;
360
+                return false
361
+              } else {
362
+                if (response.data.data.failed_code == -10) {
363
+                  // that.$message.error(response.data.data.msg)
364
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
365
+                    confirmButtonText: '确 定',
366
+                    type: 'warning'
367
+                  }).then(() => {
368
+
369
+                  }).catch(() => {
370
+                  })
371
+                } else {
372
+                  that.$message.success("撤销明细成功");
373
+
374
+                  that.changeRadioAndPatient(1);
375
+                }
376
+
377
+              }
378
+            })
379
+            .catch(function(error) {
380
+            })
381
+
382
+        }).catch(() => {
383
+        })
384
+
385
+
386
+      },
239 387
       uploadInfo(row) {
240 388
         var that = this;
241 389
         axios.get('http://127.0.0.1:9532/api/settlelist/get', {