陈少旭 6 月之前
父節點
當前提交
a2f0de819a
共有 2 個文件被更改,包括 134 次插入19 次删除
  1. 121 19
      src/xt_pages/Pharmacy/drugCode.vue
  2. 13 0
      src/xt_pages/eleFaPiao/settleDetail.vue

+ 121 - 19
src/xt_pages/Pharmacy/drugCode.vue 查看文件

@@ -94,8 +94,11 @@
94 94
         <el-table-column align="center" prop="name" label="操作" width="200">
95 95
           <template slot-scope="scope">
96 96
             <div>
97
-             <el-button v-if="scope.row.is_upload == 1" type="primary" @click="sigle_stock(scope.row)">未上传</el-button>
98
-            <el-button type="primary" v-if="scope.row.is_upload == 0 || scope.row.is_upload == 2" @click="toUpload(scope.row)">上传</el-button>
97
+<!--             <el-button v-if="scope.row.is_upload == 1" type="primary" @click="sigle_stock(scope.row)">未上传</el-button>-->
98
+<!--            <el-button type="primary" v-if="scope.row.is_upload == 0 || scope.row.is_upload == 2" @click="toUpload(scope.row)">上传</el-button>-->
99
+
100
+              <el-button v-if="scope.row.is_upload == 1" type="primary" @click="revokeDrugCode(scope.row)">撤销</el-button>
101
+              <el-button type="primary" v-if="scope.row.is_upload == 0" @click="toUpload(scope.row)">上传</el-button>
99 102
             <el-button v-if="faShow == true" type="primary" @click="toFaYao(scope.row)">发药</el-button>
100 103
             </div>
101 104
           </template>
@@ -189,6 +192,122 @@
189 192
       }
190 193
     },
191 194
     methods: {
195
+      toUpload(row){
196
+        if(row.drug_code.length == 0){
197
+          this.$message.error("追溯码不能为空");
198
+          return
199
+        }
200
+        let ids  = row.id
201
+        var that = this;
202
+        let params = {
203
+          id:ids,
204
+          admin_user_id:this.$store.getters.xt_user.user.id
205
+        };
206
+
207
+        axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
208
+          if (response.data.state == 0) {
209
+            // that.$message.error(response.data.data.msg);
210
+            that.$confirm("请检查医保程序是否有打开", "提示", {
211
+              confirmButtonText: "确 定",
212
+              cancelButtonText: "取 消",
213
+              type: "warning",
214
+            }).then(() => {
215
+
216
+
217
+            })
218
+              .catch(() => {});
219
+            return false
220
+          } else {
221
+
222
+            //有打开则调用接口
223
+            axios.get('http://127.0.0.1:9532/api/delete_xs_bg_three',{params:params}).then(function(response) {
224
+              if (response.data.state == 0) {
225
+                that.$message.error(response.data.data.msg);
226
+                return false
227
+              } else {
228
+                if(response.data.data.failed_code == -10){
229
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
230
+                    confirmButtonText: '确 定',
231
+                    type: 'warning'
232
+                  }).then(() => {
233
+
234
+                  }).catch(() => {
235
+                  })
236
+                }else{
237
+                  that.getlist()
238
+                }
239
+              }
240
+            }).catch(function(error) {
241
+            })
242
+          }
243
+        }).catch(function(error) {
244
+          that.$confirm("请检查医保程序是否有打开", "提示", {
245
+            confirmButtonText: "确 定",
246
+            cancelButtonText: "取 消",
247
+            type: "warning",
248
+          }).then(() => {
249
+          })
250
+            .catch(() => {});
251
+        })
252
+
253
+
254
+      },
255
+
256
+      revokeDrugCode(row){
257
+        let ids  = row.id
258
+        var that = this;
259
+        let params = {
260
+          id:ids,
261
+          admin_user_id:this.$store.getters.xt_user.user.id
262
+        };
263
+        axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
264
+          if (response.data.state == 0) {
265
+            // that.$message.error(response.data.data.msg);
266
+            that.$confirm("请检查医保程序是否有打开", "提示", {
267
+              confirmButtonText: "确 定",
268
+              cancelButtonText: "取 消",
269
+              type: "warning",
270
+            }).then(() => {
271
+
272
+            })
273
+              .catch(() => {});
274
+            return false
275
+          } else {
276
+            axios.get('http://127.0.0.1:9532/api/delete_xs_bg_three',{params:params}).then(function(response) {
277
+              if (response.data.state == 0) {
278
+
279
+                that.$message.error(response.data.data.msg);
280
+                return false
281
+              } else {
282
+                if(response.data.data.failed_code == -10){
283
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
284
+                    confirmButtonText: '确 定',
285
+                    type: 'warning'
286
+                  }).then(() => {
287
+
288
+                  }).catch(() => {
289
+                  })
290
+                }else{
291
+                  that.getlist()
292
+                }
293
+              }
294
+            }).catch(function(error) {
295
+            })
296
+          }
297
+        }).catch(function(error) {
298
+          that.$confirm("请检查医保程序是否有打开", "提示", {
299
+            confirmButtonText: "确 定",
300
+            cancelButtonText: "取 消",
301
+            type: "warning",
302
+          }).then(() => {
303
+          })
304
+            .catch(() => {});
305
+        })
306
+
307
+
308
+
309
+      },
310
+
192 311
         changeText(event){
193 312
         // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
194 313
         if (event.key === 'Enter') {
@@ -372,23 +491,6 @@
372 491
       changeEndTime(val){
373 492
         this.end_time = val
374 493
       },
375
-      toUpload(row){
376
-        if(row.is_medicine == 0 || row.is_is_medicine == 2){
377
-          this.$message.error("该药品未发药,请先发药")
378
-          this.faShow = true
379
-          return
380
-        }
381
-        var params = {
382
-          drug_id:row.drug_id,
383
-          patient_id:row.patient_id,
384
-         advice_date:row.advice_date,
385
-        }
386
-        createUploadDrugCode(params).then(response=>{
387
-          if(response.data.state == 1){
388
-            this.$message.success("上传成功!")
389
-          }
390
-        })
391
-      },
392 494
       toFaYao(row){
393 495
 
394 496
         if(this.is_open == 1){

+ 13 - 0
src/xt_pages/eleFaPiao/settleDetail.vue 查看文件

@@ -124,6 +124,19 @@
124 124
           </template>
125 125
         </el-table-column>
126 126
 
127
+
128
+        <el-table-column
129
+          align="center"
130
+          width="100"
131
+          prop="name"
132
+          label="医疗费总额"
133
+        >
134
+          <template slot-scope="scope">
135
+            {{scope.row.medfee_sumamt}}
136
+          </template>
137
+        </el-table-column>
138
+
139
+
127 140
         <el-table-column
128 141
           align="center"
129 142
           width="100"