Browse Source

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

See999 4 years ago
parent
commit
22d5f4f44c

+ 16 - 2
src/xt_pages/data/components/addDrugs.vue View File

@@ -43,7 +43,14 @@
43 43
               <el-input v-model="form.drug_spec" style="width:160px;" placeholder="" maxlength="30"></el-input>
44 44
             </el-form-item>
45 45
             <el-form-item label="药品类型 : " prop="drug_type">
46
-              <el-input v-model="form.drug_type" style="width:160px;" placeholder="" maxlength="30"></el-input>
46
+              <el-select v-model="form.drug_type" style="width:160px;" placeholder="请选择">
47
+                <el-option
48
+                  v-for="item,index in getDictionaryDataConfig('system','drug_type')"
49
+                  :key="index"
50
+                  :label="item.name"
51
+                  :value="item.id">
52
+                </el-option>
53
+              </el-select>
47 54
             </el-form-item>
48 55
             <el-form-item label="库存警戒:" prop="drug_stock_limit" >
49 56
               <el-input v-model="form.drug_stock_limit" style="width:160px;" placeholder="" maxlength="30"></el-input>
@@ -52,7 +59,14 @@
52 59
               <el-input v-model="form.drug_origin_place" style="width:160px;" placeholder="" maxlength="30"></el-input>
53 60
             </el-form-item>
54 61
             <el-form-item label="药品剂型 : " prop="drug_dosage_form" >
55
-              <el-input v-model="form.drug_dosage_form" style="width:160px;" placeholder="" maxlength="30"></el-input>
62
+              <el-select v-model="form.drug_dosage_form" style="width:160px;" placeholder="请选择">
63
+                <el-option
64
+                  v-for="item,index in getDictionaryDataConfig('system','drug_dosage_form')"
65
+                  :key="index"
66
+                  :label="item.name"
67
+                  :value="item.id">
68
+                </el-option>
69
+              </el-select>
56 70
             </el-form-item>
57 71
             <el-form-item label="医保等级 : " prop="medical_insurance_level" >
58 72
               <el-select v-model="form.medical_insurance_level" style="width:160px;" placeholder="请选择">

+ 1 - 1
src/xt_pages/data/components/consumables.vue View File

@@ -86,7 +86,7 @@
86 86
       <el-table-column prop="date" label="操作" width="300" align="center">
87 87
         <template slot-scope="scope">
88 88
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
89
-          <el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>
89
+          <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
90 90
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
91 91
         </template>
92 92
       </el-table-column>

+ 2 - 2
src/xt_pages/data/components/drugs.vue View File

@@ -71,13 +71,13 @@
71 71
       </el-table-column>
72 72
       <el-table-column label="状态" width="60" align="center">
73 73
         <template slot-scope="scope">
74
-          <div>{{scope.row.drug_status}}</div>
74
+          <div>{{scope.row.drug_status.indexOf('停用') == -1 ? '启用':'停用' }}</div>
75 75
         </template>
76 76
       </el-table-column>
77 77
       <el-table-column prop="date" label="操作" width="400" align="center">
78 78
         <template slot-scope="scope">
79 79
           <el-button @click="openForm(scope.row.id)" type="primary" size="small">编辑</el-button>
80
-          <el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>
80
+          <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
81 81
           <!--<el-button type="primary" size="small" @click="clickMainTain">单位维护</el-button>-->
82 82
           <!--<el-button type="danger" size="small">删除</el-button>-->
83 83
         </template>

+ 7 - 29
src/xt_pages/stock/drugs/query.vue View File

@@ -262,49 +262,27 @@
262 262
         }
263 263
         return name;
264 264
       },
265
-      GetAllGoodType: function() {
266
-        GetAllGoodType().then(response => {
267
-          if (response.data.state == 0) {
268
-            this.$message.error(response.data.msg);
269
-            return false;
270
-          } else {
271
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
272
-              this.goodType.push(response.data.data.goodType[i]);
273
-            }
274
-          }
275
-        });
276
-      },
277
-      GetAllGoodInfo: function() {
278
-        GetAllGoodInfo().then(response => {
279
-          if (response.data.state == 0) {
280
-            this.$message.error(response.data.msg);
281
-            return false;
282
-          } else {
283
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
284
-              this.goodInfo.push(response.data.data.goodInfo[i]);
285
-            }
286
-          }
287
-        });
288
-      },
265
+
266
+
289 267
       handleBack: function() {
290 268
         this.$router.go(-1);
291 269
       },
292 270
       handleSizeChange(val) {
293 271
         this.limit = val;
294
-        this.GetAllStockQuery();
272
+        this.GetAllDrugStockQueryList();
295 273
       },
296 274
       handleCurrentChange(val) {
297 275
         this.page = val;
298
-        this.GetAllStockQuery();
276
+        this.GetAllDrugStockQueryList();
299 277
       },
300 278
       calculate: function(val) {
301 279
         return Math.round(parseFloat(val) * 100) / 100;
302 280
       },
303 281
       startTimeChange: function() {
304
-        this.GetAllStockQuery();
282
+        this.GetAllDrugStockQueryList();
305 283
       },
306 284
       endTimeChange: function() {
307
-        this.GetAllStockQuery();
285
+        this.GetAllDrugStockQueryList();
308 286
       },
309 287
       stockInCount: function(row) {
310 288
         let total = 0;
@@ -339,7 +317,7 @@
339 317
       showStockOutDetailDialog: function() {},
340 318
       showCancelStockDetailDialog: function() {},
341 319
       search: function() {
342
-        this.GetAllStockQuery();
320
+        this.GetAllDrugStockQueryList();
343 321
       },setting:function() {
344 322
         this.$refs.dialog.show()
345 323
       }

+ 7 - 3
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue View File

@@ -84,11 +84,11 @@ export default {
84 84
         },
85 85
         handleCurrentChange(val){
86 86
            this.currentRow = val
87
-           this.getRullListByDrugName(val.drug_name)
87
+           this.getRullListByDrugName(val.id)
88 88
         },
89
-        getRullListByDrugName(drugname){
89
+        getRullListByDrugName(id){
90 90
             const params = {
91
-              drug_name:drugname,
91
+              id:id,
92 92
             }
93 93
            getRullListByDrugName(params).then(response=>{
94 94
               if(response.data.state ==  1){
@@ -102,6 +102,10 @@ export default {
102 102
         },
103 103
 
104 104
         SaveSelfMedicines(){
105
+          if(this.medicineData.length == 0){
106
+             this.$message.error("请添加药品规格")
107
+             return
108
+          }
105 109
           const params = {
106 110
              patient_id:this.patient_id,
107 111
              medicineData:this.medicineData

+ 1 - 12
src/xt_pages/stock/selfPreparedMedicine/components/warehouseOut.vue View File

@@ -97,18 +97,7 @@ export default {
97 97
            })  
98 98
         },
99 99
 
100
-        //  getAllDrugNameList(){
101
-        //   getAllDrugNameList().then(response=>{
102
-        //      if(response.data.state == 1){
103
-        //        var rullername =  response.data.data.rullerName
104
-        //        for(let i=0;i<rullername.length;i++){
105
-        //           rullername[i].outstore_number = ""
106
-        //           rullername[i].remarks = ""
107
-        //        }
108
-        //        this.tableData = rullername
109
-        //      }
110
-        //   })
111
-        // },
100
+      
112 101
        
113 102
         saveOutStock(){
114 103
            var arr=[]

+ 1 - 12
src/xt_pages/stock/selfPreparedMedicine/components/warehousing.vue View File

@@ -97,18 +97,7 @@ export default {
97 97
              }
98 98
           })   
99 99
         },
100
-        // getAllDrugNameList(){
101
-        //   getAllDrugNameList().then(response=>{
102
-        //      if(response.data.state == 1){
103
-        //        var rullername =  response.data.data.rullerName
104
-        //        for(let i=0;i<rullername.length;i++){
105
-        //           rullername[i].store_number = ""
106
-        //           rullername[i].remarks = ""
107
-        //        }
108
-        //        this.tableData = rullername
109
-        //      }
110
-        //   })
111
-        // },
100
+    
112 101
         saveStock(){
113 102
             var arr=[]
114 103
             for(let i=0;i<this.tableData.length;i++){

+ 4 - 2
src/xt_pages/stock/selfPreparedMedicine/index.vue View File

@@ -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
+           
270 272
             DeleteDrugName(params).then(response => {
271 273
               if (response.data.state == 1) {
272 274
                   var msg = response.data.data.msg

+ 21 - 5
src/xt_pages/stock/selfPreparedMedicine/info.vue View File

@@ -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>
@@ -285,7 +285,8 @@ export default {
285 285
               drug_name_id:"",
286 286
               unit:"", 
287 287
               price:"",
288
-              drug_stock_limit:""
288
+              drug_stock_limit:"",
289
+              drug_id:"",
289 290
             },
290 291
             editform:{
291 292
               drug_name_id:"",
@@ -333,12 +334,14 @@ export default {
333 334
           getAllDrugName().then(response=>{
334 335
              if(response.data.state == 1){
335 336
                var drugName  = response.data.data.drugName
337
+              
336 338
                this.drugName = drugName
337 339
 
338 340
              }
339 341
           })  
340 342
         },
341 343
         handleCurrentChange(val){
344
+          this.form.drug_id = val.id
342 345
           //获取药品规格名称
343 346
           this.getRulleName(val.drug_name)
344 347
 
@@ -356,7 +359,7 @@ export default {
356 359
          this.editRuleDialogVisible = false
357 360
        },
358 361
        saveDrugName(){
359
-           var name = ""
362
+           var name = "";
360 363
            for(let i=0;i<this.drugName.length;i++){
361 364
              if(this.drugName[i].id == this.drug_name){
362 365
                 name = this.drugName[i].drug_name
@@ -364,6 +367,7 @@ export default {
364 367
            }
365 368
            const params = {
366 369
               drug_name:name,
370
+              id:this.drug_name,
367 371
            }
368 372
          saveDrugName(params).then(response=>{
369 373
             if(response.data.state == 1){
@@ -381,10 +385,12 @@ export default {
381 385
            for(let i=0;i<this.drugName.length;i++){
382 386
              if(this.drugName[i].id == this.drug_name){
383 387
                 name = this.drugName[i].drug_name
388
+                
384 389
              }
385 390
            }
386 391
            const params = {
387 392
               drug_name:name,
393
+               id:this.drug_name
388 394
            }
389 395
          saveDrugName(params).then(response=>{
390 396
             if(response.data.state == 1){
@@ -465,17 +471,22 @@ export default {
465 471
            const params = {
466 472
              drug_spec:drug_spec,
467 473
              drug_name_id:this.form.drug_name_id,
474
+             drug_id:this.form.drug_id,
468 475
              unit:this.form.unit,
469 476
              price:this.form.price,
470 477
              drug_stock_limit:this.form.drug_stock_limit, 
471 478
              drug_name:drug_name
472 479
            }
480
+      
473 481
          saveRulleName(params).then(response=>{
474 482
             if(response.data.state == 1){
475 483
               var standName =  response.data.data.RullerName
476 484
               this.$message.success("保存成功")
477 485
               this.getRulleName(standName.drug_name)
478 486
               this.ruleDialogVisible = false
487
+              this.form.drug_name_id = ""
488
+              this.form.unit = ""
489
+              this.form.price = ""            
479 490
             }
480 491
          })  
481 492
        },
@@ -499,13 +510,17 @@ export default {
499 510
              unit:this.form.unit,
500 511
              price:this.form.price,
501 512
              drug_stock_limit:this.form.drug_stock_limit, 
502
-             drug_name:drug_name
513
+             drug_name:drug_name,
514
+             drug_id:this.form.drug_id,
503 515
            }
504 516
          saveRulleName(params).then(response=>{
505 517
             if(response.data.state == 1){
506 518
               var RullerName =  response.data.data.RullerName
507 519
               this.getRulleName(RullerName.drug_name)
508 520
               this.$message.success("保存成功")
521
+              this.form.drug_name_id = ""
522
+              this.form.unit = ""
523
+              this.form.price = ""   
509 524
             }
510 525
          })    
511 526
        },
@@ -540,7 +555,7 @@ export default {
540 555
          })
541 556
        },
542 557
 
543
-       DeleteDrugById(id,drugname){
558
+       DeleteDrugById(id,drugname,index){
544 559
          this.$confirm('确认删除吗?', '删除', {
545 560
           confirmButtonText: '确 定',
546 561
           cancelButtonText: '取 消',
@@ -554,6 +569,7 @@ export default {
554 569
             DeleteDrugById(params).then(response => {
555 570
               if (response.data.state == 1) {
556 571
                   var msg = response.data.data.msg
572
+                  this.tableData.splice(index,1)
557 573
                   this.$message.success("删除成功",msg)
558 574
               } else {
559 575
                   this.$message.error("该药品名称下有药品规格,不能删除")

+ 18 - 6
src/xt_pages/stock/selfPreparedMedicine/query.vue View File

@@ -46,7 +46,7 @@
46 46
                 value-format="yyyy-MM-dd"
47 47
                 @change="changeEndtime"
48 48
                 ></el-date-picker>
49
-                <el-select v-model="drug_name" placeholder="请选择" style="margin-right:10px;"
49
+                <el-select v-model="drug_name" placeholder="药品名称" style="margin-right:10px;"
50 50
                  @change="changeDrugName">
51 51
                     <el-option
52 52
                     v-for="item in drugName"
@@ -55,7 +55,7 @@
55 55
                     :value="item.id">
56 56
                     </el-option>
57 57
                 </el-select>
58
-                <el-select v-model="drug_spec" placeholder="请选择"
58
+                <el-select v-model="drug_spec" placeholder="规格名称"
59 59
                 @change="changeRullName">
60 60
                     <el-option
61 61
                     v-for="item in rulleName"
@@ -125,7 +125,7 @@ export default {
125 125
             // end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
126 126
             start_time:"",
127 127
             end_time:"",
128
-            drug_name:"",
128
+            drug_name:"全部",
129 129
             drug_spec:"",
130 130
             drugName:[],
131 131
             rulleName:[]
@@ -165,9 +165,17 @@ export default {
165 165
       getAllDrugName(){
166 166
         getAllDrugName().then(response=>{
167 167
           if(response.data.state == 1){
168
-             var drugName =  response.data.data.drugName
169
-             this.drugName = drugName
170
-
168
+             var drugName =  response.data.data.drugName  
169
+             var obj = {
170
+               id:0,
171
+               drug_name:"全部"
172
+             }
173
+             var arr = []
174
+             arr.push(obj)
175
+             arr.push(...drugName)
176
+             console.log("arrr",arr)
177
+             this.drugName = arr
178
+     
171 179
              this.getlist()
172 180
           }
173 181
         })
@@ -208,6 +216,9 @@ export default {
208 216
         this.getlist()
209 217
       },
210 218
       getlist(){
219
+          if(this.drug_name == "全部"){
220
+            this.drug_name = ""
221
+          }
211 222
           const params = {
212 223
             start_time:this.start_time,
213 224
             end_time:this.end_time,
@@ -218,6 +229,7 @@ export default {
218 229
         getAllPatientStockList(params).then(response=>{
219 230
             if(response.data.state == 1){
220 231
               var stocklist = response.data.data.stocklist
232
+              console.log("stocklist3333",stocklist)
221 233
               for(let i=0;i<stocklist.length;i++){
222 234
                  stocklist[i].index = i+1
223 235
                  stocklist[i].Count = 0