소스 검색

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
 }
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 파일 보기

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 파일 보기

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

+ 10 - 7
src/xt_pages/stock/selfPreparedMedicine/index.vue 파일 보기

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

+ 4 - 1
src/xt_pages/user/components/EditGroupAdvice.vue 파일 보기

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