Przeglądaj źródła

生命之源打印单

XMLWAN 4 lat temu
rodzic
commit
9d30d3bf0d

+ 12 - 1
src/api/manage.js Wyświetl plik

@@ -719,10 +719,21 @@ export function getUserMachTotalCount(params) {
719 719
 }
720 720
 
721 721
 export function GetUserTotalCount(id, params) {
722
-  console.log('id====', id)
723 722
   return request({
724 723
     url: '/api/manage/getusertotalcount?id=' + id,
725 724
     method: 'Get',
726 725
     params: params
727 726
   })
728 727
 }
728
+
729
+export function deleteManageMent(id) {
730
+  const params = {
731
+    id: id
732
+  }
733
+  console.log('params', params)
734
+  return request({
735
+    url: '/api/manage/deletemanagement',
736
+    method: 'get',
737
+    params: params
738
+  })
739
+}

+ 3 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSeventeen.vue Wyświetl plik

@@ -97,14 +97,15 @@
97 97
           </td>
98 98
           <td style="text-align:left;" colspan="2">
99 99
             <span style="display:inline-block;margin-left:15px;">
100
-              透后净体重:{{
100
+              <!-- 透后净体重:{{
101 101
               afterdialysis.weight_after
102 102
               ? parseFloat(
103 103
               afterdialysis.weight_after -
104 104
               afterdialysis.additional_weight
105 105
               ).toFixed(1)
106 106
               : "/"
107
-              }}kg
107
+              }}kg -->
108
+              kt/v:{{ monitors[0].ktv ? monitors[0].ktv : '' }}
108 109
             </span>
109 110
           </td>
110 111
           <td style="text-align:left;" colspan="3">

+ 66 - 7
src/xt_pages/management/index.vue Wyświetl plik

@@ -129,15 +129,21 @@
129 129
           <template slot-scope="scope">{{getTotal(scope.row.bed_id,scope.row.user_total) }}</template>
130 130
         </el-table-column>
131 131
 
132
-        <el-table-column label="操作" width="120" align="center">
132
+        <el-table-column label="操作" width="200" align="center">
133 133
           <template slot-scope="scope">
134 134
             <el-button
135 135
               @click="handleClick(scope.row.id, scope.$index, scope.row.bed_id)"
136 136
               type="primary"
137 137
               size="small"
138
-              >查看</el-button
139
-            >
138
+              >查看</el-button>
139
+             <el-button
140
+              @click="deleManageMent(scope.row.id,scope.row.equiment_id,scope.$index)"
141
+                size="small"
142
+                type="danger"
143
+                icon="el-icon-delete"
144
+              >删除</el-button>
140 145
           </template>
146
+        
141 147
         </el-table-column>
142 148
       </el-table>
143 149
 
@@ -162,7 +168,7 @@
162 168
 
163 169
 <script>
164 170
 import BreadCrumb from "../components/bread-crumb";
165
-import { getAllMachineInfo, getAllSubregion,getUserMachTotalCount } from "@/api/manage";
171
+import { getAllMachineInfo, getAllSubregion,getUserMachTotalCount,deleteManageMent } from "@/api/manage";
166 172
 import ManageForm from "./components/ManageForm";
167 173
 
168 174
 export default {
@@ -256,7 +262,7 @@ export default {
256 262
       ).then(response => {
257 263
         if (response.data.state === 1) {
258 264
           var addmahcer = response.data.data.addmahcer;
259
-          console.log("addmacher", addmahcer);
265
+          // console.log("addmacher", addmahcer);
260 266
           for (let index = 0; index < addmahcer.length; index++) {
261 267
             if (addmahcer[index].device_type === 1) {
262 268
               addmahcer[index].device_type = "透析机";
@@ -286,7 +292,7 @@ export default {
286 292
             }
287 293
           }
288 294
           this.tableData = addmahcer;
289
-          // console.log('addmacher', addmahcer)
295
+          console.log('addmacher', addmahcer)
290 296
           var total = response.data.data.total;
291 297
           // console.log('total', total)
292 298
           this.total = total;
@@ -319,7 +325,7 @@ export default {
319 325
         getUserMachTotalCount().then(response=>{
320 326
            if(response.data.state == 1){
321 327
              var count = response.data.data.count
322
-             console.log("count",count)
328
+            //  console.log("count",count)
323 329
              this.count = count
324 330
            }
325 331
         })
@@ -336,6 +342,59 @@ export default {
336 342
        }
337 343
       //  console.log("count",count)
338 344
        return count
345
+    },
346
+    deleManageMent(id,equimentid){
347
+        if(equimentid != 0){
348
+          this.$confirm(
349
+          '该设备已有使用记录,确认要删除吗? <br>删除后,信息将无法恢复',
350
+          '删除提示',
351
+          {
352
+            dangerouslyUseHTMLString: true,
353
+            confirmButtonText: '确定',
354
+            cancelButtonText: '取消',
355
+            type: 'warning'
356
+          }
357
+        ).then(() => {
358
+            deleteManageMent(id).then(response => {
359
+              // eslint-disable-next-line eqeqeq
360
+              if (response.data.state == 1) {
361
+                var msg =  response.data.data.msg
362
+                 this.getAllMachineInfo()
363
+                 this.$message.success("删除成功")
364
+              } else {
365
+                this.$message.error('删除失败')
366
+              }
367
+            }).catch(e => {})
368
+          }).catch(() => {
369
+            return false
370
+          })
371
+        }
372
+        if(equimentid ==0){
373
+           this.$confirm(
374
+          '确认要删除所选设备吗? <br>删除后,信息将无法恢复',
375
+          '删除提示',
376
+          {
377
+            dangerouslyUseHTMLString: true,
378
+            confirmButtonText: '确定',
379
+            cancelButtonText: '取消',
380
+            type: 'warning'
381
+          }
382
+        ).then(() => {
383
+            deleteManageMent(id).then(response => {
384
+              // eslint-disable-next-line eqeqeq
385
+              if (response.data.state == 1) {
386
+                var msg =  response.data.data.msg
387
+                this.getAllMachineInfo()
388
+                this.$message.success('删除成功')
389
+              } else {
390
+                 this.$message.error('删除失败')
391
+              }
392
+            }).catch(e => {})
393
+          }).catch(() => {
394
+            return false
395
+          })
396
+        }
397
+      
339 398
     }
340 399
   },
341 400
   created() {