Kaynağa Gözat

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

csx 4 yıl önce
ebeveyn
işleme
fb79409f5a

+ 1 - 1
src/router/index.js Dosyayı Görüntüle

@@ -122,8 +122,8 @@ var _asy_router_map = [
122 122
   dialysisRecord,
123 123
   dialysis,
124 124
   stock,
125
-  selfPreparedMedicine,
126 125
   drugs,
126
+  selfPreparedMedicine,
127 127
   otherManagement,
128 128
   qcd,
129 129
   device,

+ 3 - 3
src/views/layout/Layout.vue Dosyayı Görüntüle

@@ -16,9 +16,9 @@
16 16
           <i class="iconfont icon-computer_fill navIcon"></i>
17 17
           <p>透析管理</p>
18 18
         </div>
19
-        <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库管理')">
19
+        <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库管理')">
20 20
           <i class="iconfont icon-kccx navIcon"></i>
21
-          <p>库管理</p>
21
+          <p>库管理</p>
22 22
         </div>
23 23
         <div v-if="kuyishoppingShow" :class="index == 4 ? 'navOne navActive' : 'navOne'" @click="clickActive(4,'酷医商城')">
24 24
           <i class="iconfont icon-shangcheng-1 navIcon"></i>
@@ -126,7 +126,7 @@ export default {
126 126
     let menzhen = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy']
127 127
     let bingli = ['User','createPatient']
128 128
     let touxi = ['workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
129
-    let kucun = ['stockManage','selfPreparedMedicine','stockDrugs','otherManagement']
129
+    let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
130 130
     let peizhi = ['system','roleManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config']
131 131
     let kuyishopping = ['kuyiShopping']
132 132
     let menzhenArr = []

+ 2 - 2
src/views/layout/components/Sidebar/index.vue Dosyayı Görüntüle

@@ -120,8 +120,8 @@ export default {
120 120
             let a = false
121 121
             this.$emit('func',a)
122 122
           }
123
-        }else if(newVal == '库管理'){
124
-          let nameArr = ['stockManage','selfPreparedMedicine','stockDrugs','otherManagement']
123
+        }else if(newVal == '库管理'){
124
+          let nameArr = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
125 125
           // console.log('permission_routers',this.permission_routers)
126 126
           let routerArr = []
127 127
           this.permission_routers.map(item => {

+ 4 - 2
src/xt_pages/stock/selfPreparedMedicine/index.vue Dosyayı Görüntüle

@@ -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.drug_name,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>
99 99
                             </template>
100 100
                         </el-table-column>
101 101
                     </el-table>
@@ -256,7 +256,7 @@ export default {
256 256
               }
257 257
           })  
258 258
         },
259
-        DeleteDrugName(name,patientid){
259
+        DeleteDrugName(id,name,patientid,index){
260 260
             this.$confirm('确认删除吗?', '删除', {
261 261
             confirmButtonText: '确 定',
262 262
             cancelButtonText: '取 消',
@@ -264,9 +264,11 @@ export default {
264 264
          })
265 265
           .then(() => {
266 266
               const params = {
267
+                id:id,
267 268
                 drugname:name,
268 269
                 patientid:patientid
269 270
               }
271
+            console.log("params ====",params)
270 272
             DeleteDrugName(params).then(response => {
271 273
               if (response.data.state == 1) {
272 274
                   var msg = response.data.data.msg

+ 8 - 3
src/xt_pages/stock/selfPreparedMedicine/info.vue Dosyayı Görüntüle

@@ -29,7 +29,7 @@
29 29
                         </el-table-column>
30 30
                         <el-table-column align="center" prop="name" label="操作" width="90">
31 31
                             <template slot-scope="scope">
32
-                                <el-button size="mini" type="danger" @click="DeleteDrugById(scope.row.id,scope.row.drug_name)">删除</el-button>
32
+                                <el-button size="mini" type="danger" @click="DeleteDrugById(scope.row.id,scope.row.drug_name,scope.$index)">删除</el-button>
33 33
                             </template>
34 34
                         </el-table-column>
35 35
                     </el-table>
@@ -333,6 +333,7 @@ export default {
333 333
           getAllDrugName().then(response=>{
334 334
              if(response.data.state == 1){
335 335
                var drugName  = response.data.data.drugName
336
+               console.log("drugName====",drugName)
336 337
                this.drugName = drugName
337 338
 
338 339
              }
@@ -356,7 +357,7 @@ export default {
356 357
          this.editRuleDialogVisible = false
357 358
        },
358 359
        saveDrugName(){
359
-           var name = ""
360
+           var name = "";
360 361
            for(let i=0;i<this.drugName.length;i++){
361 362
              if(this.drugName[i].id == this.drug_name){
362 363
                 name = this.drugName[i].drug_name
@@ -364,6 +365,7 @@ export default {
364 365
            }
365 366
            const params = {
366 367
               drug_name:name,
368
+              id:this.drug_name,
367 369
            }
368 370
          saveDrugName(params).then(response=>{
369 371
             if(response.data.state == 1){
@@ -381,10 +383,12 @@ export default {
381 383
            for(let i=0;i<this.drugName.length;i++){
382 384
              if(this.drugName[i].id == this.drug_name){
383 385
                 name = this.drugName[i].drug_name
386
+                
384 387
              }
385 388
            }
386 389
            const params = {
387 390
               drug_name:name,
391
+               id:this.drug_name
388 392
            }
389 393
          saveDrugName(params).then(response=>{
390 394
             if(response.data.state == 1){
@@ -540,7 +544,7 @@ export default {
540 544
          })
541 545
        },
542 546
 
543
-       DeleteDrugById(id,drugname){
547
+       DeleteDrugById(id,drugname,index){
544 548
          this.$confirm('确认删除吗?', '删除', {
545 549
           confirmButtonText: '确 定',
546 550
           cancelButtonText: '取 消',
@@ -554,6 +558,7 @@ export default {
554 558
             DeleteDrugById(params).then(response => {
555 559
               if (response.data.state == 1) {
556 560
                   var msg = response.data.data.msg
561
+                  this.tableData.splice(index,1)
557 562
                   this.$message.success("删除成功",msg)
558 563
               } else {
559 564
                   this.$message.error("该药品名称下有药品规格,不能删除")