XMLWAN 4 gadus atpakaļ
vecāks
revīzija
7966858ec0

+ 2 - 2
src/api/data.js Parādīt failu

@@ -118,9 +118,9 @@ export function createBaseDrugLib(params) {
118 118
 }
119 119
 
120 120
 
121
-export function editBaseDrugLib(params) {
121
+export function editBaseDrugLib(params,unit) {
122 122
   return request({
123
-    url: '/api/basedruglib/edit',
123
+    url: '/api/basedruglib/edit?unit='+unit,
124 124
     method: 'post',
125 125
     params: params
126 126
   })

+ 11 - 0
src/api/drug/drug.js Parādīt failu

@@ -176,6 +176,7 @@ export function DeleteDrugName(params){
176 176
    })
177 177
 }
178 178
 
179
+
179 180
 export function getDrugDetail(params){
180 181
    return request({
181 182
       url:"/api/drug/getdrugdetail",
@@ -254,4 +255,14 @@ export function getRullerList(params){
254 255
       methods:"get",
255 256
       params:params
256 257
    })
258
+}
259
+
260
+
261
+export function DeleteDrugNameById(params){
262
+   
263
+   return request({
264
+      url:"/api/drug/deleteDrugNamebyid",
265
+      methods:"get",
266
+      params:params
267
+   })
257 268
 }

+ 17 - 4
src/xt_pages/data/components/drugs.vue Parādīt failu

@@ -115,7 +115,7 @@
115 115
   import maintain from './maintain'
116 116
   import addDrugs from './addDrugs'
117 117
   import { GetAllManufacturer } from '@/api/stock'
118
-
118
+  import { getDataConfig } from "@/utils/data";
119 119
   import {
120 120
     createBaseDrugLib,
121 121
     createDrugUnitSafeguard,
@@ -306,11 +306,20 @@
306 306
         return ''
307 307
       },
308 308
       goodInfoDialogComfirm: function(val) {
309
-
309
+        
310
+        //修改自备药
311
+        var untit = ""
312
+        var untis = getDataConfig('hemodialysis','units')
313
+        console.log("999999",untis)
314
+        for(let i=0;i<untis.length;i++){
315
+           if(val.min_unit == untis[i].id){
316
+              untit = untis[i].name
317
+           }
318
+        }
310 319
         if (val.id > 0) {
311 320
           //修改
312 321
           val['id'] = this.current_id
313
-          editBaseDrugLib(val).then(response => {
322
+          editBaseDrugLib(val,untit).then(response => {
314 323
             if (response.data.state == 0) {
315 324
               this.$message.error(response.data.msg)
316 325
               return false
@@ -362,6 +371,7 @@
362 371
         // this.$refs.maintain.show();
363 372
       },
364 373
       openForm(id) {
374
+        
365 375
         this.getAllManufacturer()
366 376
         if (id > 0) {
367 377
           this.current_id = id
@@ -480,7 +490,10 @@
480 490
             }
481 491
           }
482 492
         })
483
-      }
493
+      },
494
+     getDataConfig(module, filed_name){
495
+        return getDataConfig(module, filed_name)
496
+      },
484 497
 
485 498
     }, created() {
486 499
       this.getList()

+ 10 - 7
src/xt_pages/stock/selfPreparedMedicine/index.vue Parādīt failu

@@ -95,7 +95,7 @@
95 95
                         <el-table-column align="center" prop="name" label="操作" width="180">
96 96
                             <template slot-scope="scope">
97 97
                                 <el-button size="mini" type="primary" @click="toDetail(scope.row.drug_name,scope.row.drug_spec,scope.row.patient_id)">明细</el-button>
98
-                                <el-button size="mini" type="danger" @click="DeleteDrugName(scope.row.id,scope.row.drug_name,scope.row.patient_id,scope.$index)">删除</el-button>
98
+                                <el-button size="mini" type="danger" @click="DeleteDrugNameById(scope.row.id,scope.row.drug_name,scope.row.patient_id,scope.$index)">删除</el-button>
99 99
                             </template>
100 100
                         </el-table-column>
101 101
                     </el-table>
@@ -131,7 +131,7 @@ import medicineDetail from "./components/medicineDetail"
131 131
 import warehousing from "./components/warehousing"
132 132
 import warehouseOut from "./components/warehouseOut"
133 133
 const moment = require('moment')
134
-import { getCurrentPatient,saveRadio,getStockList,DeleteDrugName,getDrugSet } from "@/api/drug/drug"
134
+import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet } from "@/api/drug/drug"
135 135
 export default {
136 136
     components:{
137 137
         BreadCrumb,
@@ -244,7 +244,8 @@ export default {
244 244
           getStockList(params).then(response=>{
245 245
              if(response.data.state == 1){
246 246
                 var medicalList = response.data.data.medicalList
247
-                console.log("medicalist",medicalList)
247
+                console.log("medicalist2222",medicalList)
248
+
248 249
                 this.tableData = medicalList
249 250
                 var stocklist =  response.data.data.stocklist
250 251
                 console.log("stocklist",stocklist)
@@ -256,20 +257,22 @@ export default {
256 257
               }
257 258
           })  
258 259
         },
259
-        DeleteDrugName(id,name,patientid,index){
260
+        DeleteDrugNameById(id,name,patientid,index){
261
+            console.log("id",id)
262
+            console.log("name",name)
263
+            console.log("patientid",patientid)
260 264
             this.$confirm('确认删除吗?', '删除', {
261 265
             confirmButtonText: '确 定',
262 266
             cancelButtonText: '取 消',
263 267
             type: 'warning'
264
-         })
265
-          .then(() => {
268
+         }).then(() => {
266 269
               const params = {
267 270
                 id:id,
268 271
                 drugname:name,
269 272
                 patientid:patientid
270 273
               }
271 274
            
272
-            DeleteDrugName(params).then(response => {
275
+            DeleteDrugNameById(params).then(response => {
273 276
               if (response.data.state == 1) {
274 277
                   var msg = response.data.data.msg
275 278
                   this.tableData.splice(index, 1);