XMLWAN 4 anos atrás
pai
commit
7966858ec0

+ 2 - 2
src/api/data.js Ver arquivo

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

+ 11 - 0
src/api/drug/drug.js Ver arquivo

176
    })
176
    })
177
 }
177
 }
178
 
178
 
179
+
179
 export function getDrugDetail(params){
180
 export function getDrugDetail(params){
180
    return request({
181
    return request({
181
       url:"/api/drug/getdrugdetail",
182
       url:"/api/drug/getdrugdetail",
254
       methods:"get",
255
       methods:"get",
255
       params:params
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 Ver arquivo

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

+ 10 - 7
src/xt_pages/stock/selfPreparedMedicine/index.vue Ver arquivo

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