Browse Source

合并带嘛

csx 3 years ago
parent
commit
cfac0b34f9
1 changed files with 29 additions and 3 deletions
  1. 29 3
      src/xt_pages/hospitalStation/components/chargeDialog.vue

+ 29 - 3
src/xt_pages/hospitalStation/components/chargeDialog.vue View File

77
         ></el-input>
77
         ></el-input>
78
       </el-form-item>
78
       </el-form-item>
79
 
79
 
80
-    <el-form-item label="支付方式:" style="width:100%;"> -->
80
+    <el-form-item label="支付方式:" style="width:100%;">
81
          <el-radio-group v-model="form.pay_way">
81
          <el-radio-group v-model="form.pay_way">
82
-          <el-radio :label="index" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
83
-        </el-radio-group>
82
+          <el-radio :label="item.value" :value="item.value" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
83
+           <el-button type="primary" v-if="form.pay_way == 5" @click="reading()">读卡</el-button>
84
+
85
+         </el-radio-group>
84
       </el-form-item>
86
       </el-form-item>
85
 
87
 
86
       <el-form-item label="个人现金支付方式:" style="width: 100%">
88
       <el-form-item label="个人现金支付方式:" style="width: 100%">
178
   import {
180
   import {
179
     idtobalance
181
     idtobalance
180
   }from "@/api/deposit";
182
   }from "@/api/deposit";
183
+  import axios from "axios";
181
   const moment = require('moment')
184
   const moment = require('moment')
182
   export default {
185
   export default {
183
     name: 'chargeDialog',
186
     name: 'chargeDialog',
261
       created() {
264
       created() {
262
       },
265
       },
263
       methods: {
266
       methods: {
267
+        reading() {
268
+          var that = this
269
+          let params = {
270
+            'id_card_type': 1,
271
+            'admin_user_id': this.$store.getters.xt_user.user.id,
272
+            'certificates':1,
273
+          }
274
+          axios.get('http://127.0.0.1:9532/zh/api/readcard', {
275
+            params: params
276
+          })
277
+              .then(function(response) {
278
+                if (response.data.state == 0) {
279
+                  that.$message.error(response.data.msg)
280
+                  return false
281
+                } else {
282
+                  that.$message({ message: '读卡成功', type: 'success' })
283
+                }
284
+              })
285
+              .catch(function(error) {
286
+
287
+              })
288
+        },
289
+
264
         init() {
290
         init() {
265
           console.log("====this.form.dec_way===", this.form.dec_way)
291
           console.log("====this.form.dec_way===", this.form.dec_way)
266
         },
292
         },