Преглед изворни кода

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

See999 пре 4 година
родитељ
комит
22d5f4f44c

+ 16 - 2
src/xt_pages/data/components/addDrugs.vue Прегледај датотеку

43
               <el-input v-model="form.drug_spec" style="width:160px;" placeholder="" maxlength="30"></el-input>
43
               <el-input v-model="form.drug_spec" style="width:160px;" placeholder="" maxlength="30"></el-input>
44
             </el-form-item>
44
             </el-form-item>
45
             <el-form-item label="药品类型 : " prop="drug_type">
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
             </el-form-item>
54
             </el-form-item>
48
             <el-form-item label="库存警戒:" prop="drug_stock_limit" >
55
             <el-form-item label="库存警戒:" prop="drug_stock_limit" >
49
               <el-input v-model="form.drug_stock_limit" style="width:160px;" placeholder="" maxlength="30"></el-input>
56
               <el-input v-model="form.drug_stock_limit" style="width:160px;" placeholder="" maxlength="30"></el-input>
52
               <el-input v-model="form.drug_origin_place" style="width:160px;" placeholder="" maxlength="30"></el-input>
59
               <el-input v-model="form.drug_origin_place" style="width:160px;" placeholder="" maxlength="30"></el-input>
53
             </el-form-item>
60
             </el-form-item>
54
             <el-form-item label="药品剂型 : " prop="drug_dosage_form" >
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
             </el-form-item>
70
             </el-form-item>
57
             <el-form-item label="医保等级 : " prop="medical_insurance_level" >
71
             <el-form-item label="医保等级 : " prop="medical_insurance_level" >
58
               <el-select v-model="form.medical_insurance_level" style="width:160px;" placeholder="请选择">
72
               <el-select v-model="form.medical_insurance_level" style="width:160px;" placeholder="请选择">

+ 1 - 1
src/xt_pages/data/components/consumables.vue Прегледај датотеку

86
       <el-table-column prop="date" label="操作" width="300" align="center">
86
       <el-table-column prop="date" label="操作" width="300" align="center">
87
         <template slot-scope="scope">
87
         <template slot-scope="scope">
88
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
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
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
90
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
91
         </template>
91
         </template>
92
       </el-table-column>
92
       </el-table-column>

+ 2 - 2
src/xt_pages/data/components/drugs.vue Прегледај датотеку

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

+ 7 - 29
src/xt_pages/stock/drugs/query.vue Прегледај датотеку

262
         }
262
         }
263
         return name;
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
       handleBack: function() {
267
       handleBack: function() {
290
         this.$router.go(-1);
268
         this.$router.go(-1);
291
       },
269
       },
292
       handleSizeChange(val) {
270
       handleSizeChange(val) {
293
         this.limit = val;
271
         this.limit = val;
294
-        this.GetAllStockQuery();
272
+        this.GetAllDrugStockQueryList();
295
       },
273
       },
296
       handleCurrentChange(val) {
274
       handleCurrentChange(val) {
297
         this.page = val;
275
         this.page = val;
298
-        this.GetAllStockQuery();
276
+        this.GetAllDrugStockQueryList();
299
       },
277
       },
300
       calculate: function(val) {
278
       calculate: function(val) {
301
         return Math.round(parseFloat(val) * 100) / 100;
279
         return Math.round(parseFloat(val) * 100) / 100;
302
       },
280
       },
303
       startTimeChange: function() {
281
       startTimeChange: function() {
304
-        this.GetAllStockQuery();
282
+        this.GetAllDrugStockQueryList();
305
       },
283
       },
306
       endTimeChange: function() {
284
       endTimeChange: function() {
307
-        this.GetAllStockQuery();
285
+        this.GetAllDrugStockQueryList();
308
       },
286
       },
309
       stockInCount: function(row) {
287
       stockInCount: function(row) {
310
         let total = 0;
288
         let total = 0;
339
       showStockOutDetailDialog: function() {},
317
       showStockOutDetailDialog: function() {},
340
       showCancelStockDetailDialog: function() {},
318
       showCancelStockDetailDialog: function() {},
341
       search: function() {
319
       search: function() {
342
-        this.GetAllStockQuery();
320
+        this.GetAllDrugStockQueryList();
343
       },setting:function() {
321
       },setting:function() {
344
         this.$refs.dialog.show()
322
         this.$refs.dialog.show()
345
       }
323
       }

+ 7 - 3
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue Прегледај датотеку

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

+ 1 - 12
src/xt_pages/stock/selfPreparedMedicine/components/warehouseOut.vue Прегледај датотеку

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
         saveOutStock(){
102
         saveOutStock(){
114
            var arr=[]
103
            var arr=[]

+ 1 - 12
src/xt_pages/stock/selfPreparedMedicine/components/warehousing.vue Прегледај датотеку

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
         saveStock(){
101
         saveStock(){
113
             var arr=[]
102
             var arr=[]
114
             for(let i=0;i<this.tableData.length;i++){
103
             for(let i=0;i<this.tableData.length;i++){

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

+ 21 - 5
src/xt_pages/stock/selfPreparedMedicine/info.vue Прегледај датотеку

29
                         </el-table-column>
29
                         </el-table-column>
30
                         <el-table-column align="center" prop="name" label="操作" width="90">
30
                         <el-table-column align="center" prop="name" label="操作" width="90">
31
                             <template slot-scope="scope">
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
                             </template>
33
                             </template>
34
                         </el-table-column>
34
                         </el-table-column>
35
                     </el-table>
35
                     </el-table>
285
               drug_name_id:"",
285
               drug_name_id:"",
286
               unit:"", 
286
               unit:"", 
287
               price:"",
287
               price:"",
288
-              drug_stock_limit:""
288
+              drug_stock_limit:"",
289
+              drug_id:"",
289
             },
290
             },
290
             editform:{
291
             editform:{
291
               drug_name_id:"",
292
               drug_name_id:"",
333
           getAllDrugName().then(response=>{
334
           getAllDrugName().then(response=>{
334
              if(response.data.state == 1){
335
              if(response.data.state == 1){
335
                var drugName  = response.data.data.drugName
336
                var drugName  = response.data.data.drugName
337
+              
336
                this.drugName = drugName
338
                this.drugName = drugName
337
 
339
 
338
              }
340
              }
339
           })  
341
           })  
340
         },
342
         },
341
         handleCurrentChange(val){
343
         handleCurrentChange(val){
344
+          this.form.drug_id = val.id
342
           //获取药品规格名称
345
           //获取药品规格名称
343
           this.getRulleName(val.drug_name)
346
           this.getRulleName(val.drug_name)
344
 
347
 
356
          this.editRuleDialogVisible = false
359
          this.editRuleDialogVisible = false
357
        },
360
        },
358
        saveDrugName(){
361
        saveDrugName(){
359
-           var name = ""
362
+           var name = "";
360
            for(let i=0;i<this.drugName.length;i++){
363
            for(let i=0;i<this.drugName.length;i++){
361
              if(this.drugName[i].id == this.drug_name){
364
              if(this.drugName[i].id == this.drug_name){
362
                 name = this.drugName[i].drug_name
365
                 name = this.drugName[i].drug_name
364
            }
367
            }
365
            const params = {
368
            const params = {
366
               drug_name:name,
369
               drug_name:name,
370
+              id:this.drug_name,
367
            }
371
            }
368
          saveDrugName(params).then(response=>{
372
          saveDrugName(params).then(response=>{
369
             if(response.data.state == 1){
373
             if(response.data.state == 1){
381
            for(let i=0;i<this.drugName.length;i++){
385
            for(let i=0;i<this.drugName.length;i++){
382
              if(this.drugName[i].id == this.drug_name){
386
              if(this.drugName[i].id == this.drug_name){
383
                 name = this.drugName[i].drug_name
387
                 name = this.drugName[i].drug_name
388
+                
384
              }
389
              }
385
            }
390
            }
386
            const params = {
391
            const params = {
387
               drug_name:name,
392
               drug_name:name,
393
+               id:this.drug_name
388
            }
394
            }
389
          saveDrugName(params).then(response=>{
395
          saveDrugName(params).then(response=>{
390
             if(response.data.state == 1){
396
             if(response.data.state == 1){
465
            const params = {
471
            const params = {
466
              drug_spec:drug_spec,
472
              drug_spec:drug_spec,
467
              drug_name_id:this.form.drug_name_id,
473
              drug_name_id:this.form.drug_name_id,
474
+             drug_id:this.form.drug_id,
468
              unit:this.form.unit,
475
              unit:this.form.unit,
469
              price:this.form.price,
476
              price:this.form.price,
470
              drug_stock_limit:this.form.drug_stock_limit, 
477
              drug_stock_limit:this.form.drug_stock_limit, 
471
              drug_name:drug_name
478
              drug_name:drug_name
472
            }
479
            }
480
+      
473
          saveRulleName(params).then(response=>{
481
          saveRulleName(params).then(response=>{
474
             if(response.data.state == 1){
482
             if(response.data.state == 1){
475
               var standName =  response.data.data.RullerName
483
               var standName =  response.data.data.RullerName
476
               this.$message.success("保存成功")
484
               this.$message.success("保存成功")
477
               this.getRulleName(standName.drug_name)
485
               this.getRulleName(standName.drug_name)
478
               this.ruleDialogVisible = false
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
              unit:this.form.unit,
510
              unit:this.form.unit,
500
              price:this.form.price,
511
              price:this.form.price,
501
              drug_stock_limit:this.form.drug_stock_limit, 
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
          saveRulleName(params).then(response=>{
516
          saveRulleName(params).then(response=>{
505
             if(response.data.state == 1){
517
             if(response.data.state == 1){
506
               var RullerName =  response.data.data.RullerName
518
               var RullerName =  response.data.data.RullerName
507
               this.getRulleName(RullerName.drug_name)
519
               this.getRulleName(RullerName.drug_name)
508
               this.$message.success("保存成功")
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
          })
555
          })
541
        },
556
        },
542
 
557
 
543
-       DeleteDrugById(id,drugname){
558
+       DeleteDrugById(id,drugname,index){
544
          this.$confirm('确认删除吗?', '删除', {
559
          this.$confirm('确认删除吗?', '删除', {
545
           confirmButtonText: '确 定',
560
           confirmButtonText: '确 定',
546
           cancelButtonText: '取 消',
561
           cancelButtonText: '取 消',
554
             DeleteDrugById(params).then(response => {
569
             DeleteDrugById(params).then(response => {
555
               if (response.data.state == 1) {
570
               if (response.data.state == 1) {
556
                   var msg = response.data.data.msg
571
                   var msg = response.data.data.msg
572
+                  this.tableData.splice(index,1)
557
                   this.$message.success("删除成功",msg)
573
                   this.$message.success("删除成功",msg)
558
               } else {
574
               } else {
559
                   this.$message.error("该药品名称下有药品规格,不能删除")
575
                   this.$message.error("该药品名称下有药品规格,不能删除")

+ 18 - 6
src/xt_pages/stock/selfPreparedMedicine/query.vue Прегледај датотеку

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