瀏覽代碼

Merge branch '20201014_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201014_pc_vue_new_branch

csx 4 年之前
父節點
當前提交
23595119b7

+ 2 - 2
src/api/data.js 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

+ 10 - 7
src/xt_pages/stock/selfPreparedMedicine/index.vue 查看文件

@@ -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);

+ 4 - 1
src/xt_pages/user/components/EditGroupAdvice.vue 查看文件

@@ -2408,7 +2408,7 @@ export default {
2408 2408
     //
2409 2409
     getSelfMedicalList(){
2410 2410
         const params = {
2411
-          patient_id:this.$route.query.patient_id
2411
+          patient_id:this.patientID
2412 2412
         }
2413 2413
       getSelfMedicalList(params).then(response=>{
2414 2414
          if (response.data.state == 1) {
@@ -2453,6 +2453,7 @@ export default {
2453 2453
                 obj.custom_id = this.rand(10000000, 99999999)
2454 2454
                 obj.drug_specs = medicalList[i].drug_specs
2455 2455
                 this.all_drug.push(obj)
2456
+
2456 2457
               }
2457 2458
             }
2458 2459
 
@@ -2488,6 +2489,7 @@ export default {
2488 2489
                 obj.custom_id = this.rand(10000000, 99999999)
2489 2490
                 obj.drug_specs = base_drug_list[i].drug_specs
2490 2491
                 this.all_drug.push(obj)
2492
+                console.log("中2222222222222222222",this.all_drug)
2491 2493
               }
2492 2494
             }   
2493 2495
         })
@@ -2529,6 +2531,7 @@ export default {
2529 2531
     }
2530 2532
   },
2531 2533
   created(){
2534
+
2532 2535
     //获取自备药
2533 2536
      this.getSelfMedicalList()
2534 2537
   }