XMLWAN 4 år sedan
förälder
incheckning
5bc54c9cee

+ 44 - 5
src/xt_pages/data/components/addDrugs.vue Visa fil

@@ -208,11 +208,39 @@
208 208
                 </el-option>
209 209
               </el-select>
210 210
             </el-form-item>
211
+
212
+            <el-form-item label="处方药标志" >
213
+                <el-select v-model="form.prescription_mark" style="width:160px;" placeholder="请选择">
214
+                <el-option
215
+                  v-for="item,index in options"
216
+                  :key="index"
217
+                  :label="item.label"
218
+                  :value="item.value">
219
+                </el-option>
220
+               </el-select>  
221
+            </el-form-item>
222
+
223
+           <el-form-item label="社保目录编码" >
224
+              <el-input v-model="form.social_security_directory_code" style="width:180px"></el-input>
225
+           </el-form-item>
226
+
227
+           <el-form-item label="备案日期:" >
228
+               <el-date-picker
229
+                  value-format="yyyy-MM-dd"
230
+                  v-model="form.record_date"
231
+                  type="date"
232
+                  placeholder="选择日期时间">
233
+              </el-date-picker>
234
+           </el-form-item>
235
+
236
+           <el-form-item label="药品备注:">
237
+               <el-input v-model="form.drug_remark" style="width:180px"></el-input>
238
+           </el-form-item>
211 239
             <!-- <el-form-item label="代理商 : " prop="agent">
212 240
               <el-input v-model="form.agent" style="width:160px;" placeholder="" maxlength="30"></el-input>
213 241
             </el-form-item> -->
214 242
 
215
-          <el-form-item label="经销商 : " prop="dealer" style="width:100%">
243
+          <el-form-item label="经销商: " prop="dealer" style="width:100%">
216 244
              
217 245
                <el-select v-model="form.dealer" style="width:100%;" filterable placeholder="请选择">
218 246
                   <el-option
@@ -428,6 +456,10 @@
428 456
           is_charge_use: '',//是否收费常用项
429 457
           drug_code:'',
430 458
           dealer:'',
459
+          prescription_mark:"",//处方药标志
460
+          social_security_directory_code:"",//社保目录编码
461
+          record_date:"",//备案日期
462
+          drug_remark:"",//药品备注
431 463
         },
432 464
 
433 465
         rules: {
@@ -447,7 +479,11 @@
447 479
           drug_classify: [{ required: true, message: '请选择药物分类',trigger: 'change'  }],
448 480
           drug_dose: [{ required: true, message: '请填写剂量',trigger: 'blur'  }],
449 481
           manufacturer: [{ required: true, message: '请选择生产产商',trigger: 'change'  }],
450
-          dealer:[{required:true,message:'请选择经销商',trigger:'change'}]
482
+          dealer:[{required:true,message:'请选择经销商',trigger:'change'}],
483
+          prescription_mark:[{required:true,message:"请选择处方药标志"}],
484
+          social_security_directory_code:[{required:true,message:"请填写社保目录编码"}],
485
+          record_date:[{required:true,message:"请选择备案日期"}],
486
+          drug_remark:[{required:true,message:"请填写药品备注"}]
451 487
         },
452 488
         page:1,
453 489
         limit:500,
@@ -502,6 +538,7 @@
502 538
         this.form.intro = ''
503 539
       },
504 540
       show(id,obj) {
541
+        console.log("obj222",obj)
505 542
         // this.clear()
506 543
         this.visible = true
507 544
         if (id == 0) {
@@ -600,8 +637,10 @@
600 637
         form['drug_code'] = this.form.drug_code
601 638
         form['drug_classify'] = this.form.drug_classify
602 639
         form['dealer'] = this.form.dealer
603
-
604
-
640
+        form['prescription_mark'] = this.form.prescription_mark
641
+        form['social_security_directory_code'] = this.form.social_security_directory_code
642
+        form['record_date'] = this.form.record_date
643
+        form['drug_remark'] = this.form.drug_remark
605 644
         return form
606 645
       },
607 646
       getlist(){
@@ -609,7 +648,7 @@
609 648
              page:this.page,
610 649
              limit:this.limit
611 650
           }
612
-          console.log("params2222222",params)
651
+         
613 652
         getManufacturerList(params).then(response=>{
614 653
            var manufacturerList =   response.data.data.manufacturer
615 654
            console.log("列表2222222",manufacturerList)

+ 18 - 2
src/xt_pages/data/components/addProject.vue Visa fil

@@ -119,12 +119,22 @@
119 119
                           <el-form-item label="总量 : " prop="medical_code">
120 120
                             <el-input v-model="form.total" style="width:160px;" placeholder="" maxlength="30"></el-input>
121 121
                         </el-form-item>
122
-                        <el-form-item label="状态 : " prop="medical_status" style="width:100%;">
122
+                        <el-form-item label="状态 : " prop="medical_status">
123 123
                             <el-radio-group v-model="form.medical_status">
124 124
                                 <el-radio :label="1">停用</el-radio>
125 125
                                 <el-radio :label="2">收费</el-radio>
126 126
                             </el-radio-group>
127 127
                         </el-form-item>
128
+                        <el-form-item label="类别:" prop="">
129
+                           <el-select v-model="form.category" style="width:160px;" placeholder="请选择">
130
+                              <el-option
131
+                                v-for="(item,index) in categoryList"
132
+                                :key="index"
133
+                                :label="item.name"
134
+                                :value="item.id">
135
+                                </el-option>
136
+                            </el-select>
137
+                        </el-form-item>
128 138
                         <el-form-item label="备注 : " prop="remark" style="width:100%;">
129 139
                             <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
130 140
                         </el-form-item>
@@ -261,7 +271,12 @@ export default {
261 271
                 cost_classify: [{ required: true, message: '请填写费用类别',trigger: 'blur' }],
262 272
                 executive_section: [{ required: true, message: '请填写执行科室',trigger: 'blur'  }],
263 273
                 medical_coverage: [{ required: true, message: '请填写医保等级',trigger: 'blur' }],
264
-           }
274
+           },
275
+           categoryList:[
276
+             {id:1,name:"常规诊疗项目"},
277
+             {id:4,name:"辅助器具项目"},
278
+             {id:5,name:"加收项目"}
279
+           ]
265 280
         }
266 281
     },
267 282
     methods:{
@@ -324,6 +339,7 @@ export default {
324 339
                     execution_frequency:this.form.execution_frequency,
325 340
                     number_days:this.form.number_days,
326 341
                     total:this.form.total,
342
+                    category:this.form.category,
327 343
                }
328 344
            
329 345
               saveProject(params).then(response=>{

+ 158 - 12
src/xt_pages/data/components/consumables.vue Visa fil

@@ -16,7 +16,25 @@
16 16
             :value="item.value">
17 17
           </el-option>
18 18
         </el-select>
19
-        <label class="title"><span class="name">是否收费</span> : </label>
19
+        <label class="title"><span class="name">生产厂商</span> : </label>
20
+        <el-select v-model="manufacturer" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeManufacture">
21
+          <el-option
22
+            v-for="item in manufacturers"
23
+            :key="item.id"
24
+            :label="item.manufacturer_name"
25
+            :value="item.id">
26
+          </el-option>
27
+        </el-select>
28
+        <span style="color: #909399;font-size:14px;">备案 : &nbsp;</span>
29
+        <el-select v-model="is_record" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeRecord">
30
+          <el-option
31
+            v-for="item in optionOne"
32
+            :key="item.value"
33
+            :label="item.label"
34
+            :value="item.value">
35
+          </el-option>
36
+        </el-select>
37
+        <!-- <label class="title"><span class="name">是否收费</span> : </label>
20 38
         <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
21 39
           <el-option
22 40
             v-for="item in options"
@@ -37,16 +55,25 @@
37 55
             :label="item.name"
38 56
             :value="item.id">
39 57
           </el-option>
40
-        </el-select>
58
+        </el-select> -->
41 59
       </div>
42 60
       <el-button type="primary" @click="openForm()">新增</el-button>
61
+      <!-- <el-button type="primary" @click="toRecord()">备案</el-button> -->
62
+       <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
43 63
     </div>
64
+
44 65
     <el-table
45 66
       border style="width: 100%" :row-style="{ color: '#303133' }"
46 67
       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
47 68
       :data="goodInfo.goodInfoData"
48 69
       v-loading="goodInfo.loading"
70
+      @selection-change="handleSelectionChange"
49 71
     >
72
+      <el-table-column
73
+          align="center"
74
+          type="selection"
75
+          width="55">
76
+      </el-table-column>    
50 77
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
51 78
       <el-table-column label="耗材名称" align="center">
52 79
         <template slot-scope="scope">
@@ -94,6 +121,11 @@
94 121
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
95 122
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
96 123
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
124
+
125
+          <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
126
+             <span v-if="scope.row.is_mark == 0">备案</span>
127
+             <span v-if="scope.row.is_mark == 1">撤销</span>
128
+          </el-button>
97 129
         </template>
98 130
       </el-table-column>
99 131
     </el-table>
@@ -127,7 +159,7 @@
127 159
   import GoodInfoDailog from '../../stock/Dialog/goodInfoDailog'
128 160
   import { getDictionaryDataConfig } from "@/utils/data";
129 161
   import selfPayment from './selfPayment'
130
-
162
+  import axios from 'axios'
131 163
   import {
132 164
     createGoodInfo,
133 165
     deleteGoodInfo,
@@ -215,12 +247,29 @@
215 247
               sort:'',
216 248
               is_doctor_use:'',
217 249
               good_number:'',
218
-
250
+              social_security_directory_code:"",
251
+              special_medical:"",
252
+              production_type:""
219 253
             },
220 254
 
221 255
             isVisibility: false
222 256
           }
223
-        }
257
+        },
258
+        selectDrug:[],
259
+        manufacturers:[],
260
+        optionOne: [
261
+          {
262
+            value: '0',
263
+            label: '全部'
264
+          }, {
265
+            value: '1',
266
+            label: '已备案'
267
+          }, {
268
+            value: '2',
269
+            label: '未备案'
270
+        }],
271
+        is_record:"",
272
+        manufacturer:""
224 273
       }
225 274
     },
226 275
     methods: {
@@ -454,14 +503,24 @@
454 503
                 response.data.data.goodInfo.is_doctor_use.toString()
455 504
             }
456 505
 
457
-            this.goodInfo.goodInfoDialog.formValue.agent =
458
-              response.data.data.goodInfo.agent
459
-
460
-            this.goodInfo.goodInfoDialog.formValue.good_number =
461
-              response.data.data.goodInfo.good_number
462
-
506
+            this.goodInfo.goodInfoDialog.formValue.agent =response.data.data.goodInfo.agent
463 507
 
508
+            this.goodInfo.goodInfoDialog.formValue.good_number = response.data.data.goodInfo.good_number
509
+            
510
+            this.goodInfo.goodInfoDialog.formValue.social_security_directory_code = response.data.data.goodInfo.social_security_directory_code
511
+            
512
+            if(response.data.data.production_type<=0){
513
+               this.goodInfo.goodInfoDialog.production_type = ''
514
+            }else{
515
+              this.goodInfo.goodInfoDialog.formValue.production_type = response.data.data.goodInfo.production_type.toString()
516
+            }
464 517
 
518
+            if(response.data.data.special_medical<=0){
519
+               this.goodInfo.goodInfoDialog.special_medical = ''
520
+            }else{
521
+              this.goodInfo.goodInfoDialog.formValue.special_medical = response.data.data.goodInfo.special_medical.toString()
522
+            }
523
+        
465 524
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
466 525
           }
467 526
         })
@@ -499,6 +558,8 @@
499 558
           is_use:this.is_use,
500 559
           good_kind:this.good_kind,
501 560
           is_charge: this.is_charge,
561
+          is_mark:this.is_record,
562
+          manufacturer:this.manufacturer,
502 563
         }
503 564
         console.log("222222",params)
504 565
         getGoodInfoList(params).then(response => {
@@ -649,11 +710,15 @@
649 710
             this.$message.error(response.data.msg)
650 711
             return false
651 712
           } else {
713
+            var obj = {id:0,manufacturer_name:"全部"}
714
+            this.manufacturers.push(obj)
652 715
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
653 716
               this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
654 717
                 response.data.data.manufacturer[i]
655 718
               )
719
+              this.manufacturers.push(response.data.data.manufacturer[i])
656 720
             }
721
+            console.log("生产厂商888222",this.manufacturers)
657 722
           }
658 723
         })
659 724
       },
@@ -752,7 +817,88 @@
752 817
         this.goodInfo.goodInfoDialog.formValue.good_number = ''
753 818
 
754 819
         this.$refs.addConsumable.show(0)
755
-      }
820
+      },
821
+     handleSelectionChange(val) {
822
+      this.selectDrug = val;
823
+     },
824
+      // toRecord(){
825
+
826
+      //    var that = this
827
+      //    axios.get('http://127.0.0.1:9532/sz/api/goods/get').then(function(response) {
828
+      //     if (response.data.state == 0) {
829
+      //          that.$message.error(response.data.msg)
830
+      //          return false
831
+      //       } else {
832
+      //         that.$message({ message: '备案成功', type: 'success' })
833
+      //        }
834
+      //      }).catch(function(error) {
835
+      //   })
836
+      // },
837
+       BatchDelete() {
838
+          if (this.selectDrug.length == 0) {
839
+            this.$message.error("请选择要备案的信息");
840
+            return false;
841
+          }
842
+          this.$confirm(
843
+            "确认要备案所选记录吗? <br>",
844
+            "备案提示",
845
+            {
846
+              dangerouslyUseHTMLString: true,
847
+              confirmButtonText: "确定",
848
+              cancelButtonText: "取消",
849
+              type: "warning"
850
+            }
851
+          ).then(() => {
852
+            var ids = [];
853
+            var idMap = {};
854
+            for (const index in this.selectDrug) {
855
+              ids.push(this.selectDrug[index].id);
856
+              idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
857
+            }
858
+            console.log('ids222222222',ids)
859
+            var idss = ids.join(',')
860
+            let params = {
861
+              ids:idss
862
+            }
863
+        
864
+            var that = this
865
+            axios.get('http://127.0.0.1:9532/sz/api/goods/get',{ params: params }).then(function(response) {
866
+            if (response.data.state == 0) {
867
+                  that.$message.error(response.data.msg)
868
+                  return false
869
+                } else {
870
+                  that.$message({ message: '备案成功', type: 'success' })
871
+                  that.getList()
872
+                }
873
+              }).catch(function(error) {
874
+            })
875
+          });
876
+     },
877
+      toReturn(id,isMark){
878
+        
879
+         var that = this
880
+         let params = {
881
+             'id':id,
882
+             'type_id':3,
883
+             'is_mark':isMark
884
+          }
885
+         axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
886
+          if (response.data.state == 0) {
887
+               that.$message.error(response.data.msg)
888
+               return false
889
+            } else {
890
+              that.$message({ message: '操作成功', type: 'success' })
891
+              that.getList()
892
+             }
893
+           }).catch(function(error) {
894
+        })
895
+      },
896
+      changeManufacture(){
897
+        this.getList()
898
+      },
899
+      changeRecord(){
900
+         this.getList()
901
+      },
756 902
     }, created() {
757 903
       this.getList()
758 904
       this.getAllDealer()

+ 215 - 42
src/xt_pages/data/components/drugs.vue Visa fil

@@ -7,7 +7,7 @@
7 7
         <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
8 8
                    @click="searchAction">搜索
9 9
         </el-button>
10
-        <label class="title"><span class="name">是否启用</span> : </label>
10
+        <!-- <label class="title"><span class="name">是否启用</span> : </label>
11 11
         <el-select v-model="is_use" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeUser">
12 12
           <el-option
13 13
             v-for="item in options"
@@ -15,6 +15,15 @@
15 15
             :label="item.label"
16 16
             :value="item.value">
17 17
           </el-option>
18
+        </el-select> -->
19
+       <label class="title"><span class="name">生产厂商</span> : </label>
20
+        <el-select v-model="manufacturer" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeManufacture">
21
+          <el-option
22
+            v-for="item in manufacturers"
23
+            :key="item.id"
24
+            :label="item.manufacturer_name"
25
+            :value="item.id">
26
+          </el-option>
18 27
         </el-select>
19 28
         <label class="title"><span class="name">是否收费</span> : </label>
20 29
         <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
@@ -25,7 +34,7 @@
25 34
             :value="item.value">
26 35
           </el-option>
27 36
         </el-select>
28
-        <span style="color: #909399;font-size:14px;">是否注射类别 : &nbsp;</span>
37
+        <!-- <span style="color: #909399;font-size:14px;">是否注射类别 : &nbsp;</span>
29 38
         <el-select v-model="is_inject" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeInject">
30 39
           <el-option
31 40
             v-for="item in options"
@@ -33,52 +42,105 @@
33 42
             :label="item.label"
34 43
             :value="item.value">
35 44
           </el-option>
45
+        </el-select> -->
46
+
47
+        <span style="color: #909399;font-size:14px;">备案 : &nbsp;</span>
48
+        <el-select v-model="is_record" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeRecord">
49
+          <el-option
50
+            v-for="item in options"
51
+            :key="item.value"
52
+            :label="item.label"
53
+            :value="item.value">
54
+          </el-option>
36 55
         </el-select>
37 56
       </div>
38 57
       <el-button type="primary" @click="openForm(0)">新增</el-button>
58
+       <!-- <el-button type="primary" @click="toRecord()">备案</el-button> -->
59
+      <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
39 60
     </div>
40 61
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
41
-              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}">
62
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
63
+             @selection-change="handleSelectionChange">
64
+       <el-table-column
65
+          align="center"
66
+          type="selection"
67
+          width="55"
68
+       ></el-table-column>        
42 69
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
43 70
 
44
-      <el-table-column prop="date" label="药品名称" align="center">
71
+      <el-table-column prop="date" label="药品名称" align="center" width="100">
45 72
         <template slot-scope="scope">
46 73
           <div>{{scope.row.drug_name}}</div>
47 74
         </template>
48
-
49 75
       </el-table-column>
50
-      <el-table-column prop="date" label="生产厂商" align="center">
76
+      <el-table-column prop="date" label="规格" width="60" align="center">
51 77
         <template slot-scope="scope">
52
-          <div>{{getName(scope.row.manufacturer)}}</div>
78
+          <div>{{scope.row.drug_spec}}</div>
53 79
         </template>
54 80
       </el-table-column>
55
-      <el-table-column prop="date" label="规格" width="140" align="center">
81
+      <el-table-column prop="date" label="最大单位" width="60" align="center">
56 82
         <template slot-scope="scope">
57
-          <div>{{scope.row.drug_spec}}</div>
83
+          <div>{{scope.row.max_unit}}</div>
58 84
         </template>
59 85
       </el-table-column>
60 86
       <el-table-column label="最小单位" width="60" align="center">
61 87
         <template slot-scope="scope">
62 88
           <div>{{scope.row.min_unit}}</div>
63 89
         </template>
64
-
90
+      </el-table-column>
91
+      <el-table-column prop="date" label="进货价" width="60" align="center">
92
+        <template slot-scope="scope">
93
+          <div>{{scope.row.last_price}}</div>
94
+        </template>
65 95
       </el-table-column>
66 96
       <el-table-column label="零售价" width="60" align="center">
67 97
         <template slot-scope="scope">
68 98
           <div>{{scope.row.retail_price}}</div>
69 99
         </template>
100
+      </el-table-column>
101
+       <el-table-column prop="date" label="医保编码" width="100" align="center">
102
+        <template slot-scope="scope">
103
+          <div>{{scope.row.medical_insurance_number}}</div>
104
+        </template>
105
+      </el-table-column>
106
+      <el-table-column prop="date" label="药品本位码" width="100" align="center">
107
+        <template slot-scope="scope">
108
+          <div>{{scope.row.code}}</div>
109
+        </template>
110
+      </el-table-column>
111
+      <el-table-column prop="date" label="生产厂商" align="center" width="100">
112
+        <template slot-scope="scope">
113
+          <div>{{getName(scope.row.manufacturer)}}</div>
114
+        </template>
115
+      </el-table-column>
116
+      <el-table-column prop="date" label="经销商" align="center" width="100">
117
+        <template slot-scope="scope">
118
+          <div>{{getDealer(scope.row.dealer)}}</div>
119
+        </template>
120
+      </el-table-column>
121
+      <el-table-column prop="date" label="备案日期" align="center" width="100">
122
+        <template slot-scope="scope">
123
+          <span>{{getTime(scope.row.record_date)}}</span>
124
+        </template>
125
+      </el-table-column>
126
+      <el-table-column prop="date" label="药品备注" align="center" width="100">
127
+        <template slot-scope="scope">
128
+          <div>{{scope.row.drug_remark}}</div>
129
+        </template>
70 130
       </el-table-column>
71 131
       <el-table-column label="状态" width="60" align="center">
72 132
         <template slot-scope="scope">
73 133
           <div>{{scope.row.drug_status.indexOf('停用') == -1 ? '启用':'停用' }}</div>
74 134
         </template>
75 135
       </el-table-column>
76
-      <el-table-column prop="date" label="操作" width="400" align="center">
136
+      <el-table-column prop="date" label="操作" width="250" align="center" fixed="right">
77 137
         <template slot-scope="scope">
78 138
           <el-button @click="openForm(scope.row.id)" type="primary" size="small">编辑</el-button>
79
-          <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
80
-          <!--<el-button type="primary" size="small" @click="clickMainTain">单位维护</el-button>-->
81 139
           <el-button type="danger" size="small" @click="deleteDurg(scope.row.id,scope.$index)">删除</el-button>
140
+        <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
141
+          <span v-if="scope.row.is_mark == 0">备案</span>
142
+          <span v-if="scope.row.is_mark == 1">撤消</span>
143
+        </el-button>
82 144
         </template>
83 145
       </el-table-column>
84 146
     </el-table>
@@ -110,11 +172,13 @@
110 172
 </template>
111 173
 
112 174
 <script>
175
+  import axios from 'axios'
113 176
   import selfPayment from './selfPayment'
114 177
   import maintain from './maintain'
115 178
   import addDrugs from './addDrugs'
116 179
   import { GetAllManufacturer } from '@/api/stock'
117 180
   import { getDataConfig } from "@/utils/data";
181
+  import { uParseTime } from '@/utils/tools'
118 182
   import {
119 183
     createBaseDrugLib,
120 184
     createDrugUnitSafeguard,
@@ -124,7 +188,7 @@
124 188
     getBaseDrugLibList,
125 189
     deleteDurg
126 190
   } from '@/api/data'
127
-
191
+ import {GetAllConfig } from "@/api/stock";
128 192
   export default {
129 193
     components: {
130 194
       selfPayment,
@@ -138,9 +202,11 @@
138 202
         keywords: '',
139 203
         is_use: '',
140 204
         is_charge: '',
205
+        manufacturer:'',
206
+        is_record:"",
141 207
         is_inject: '',
142 208
         list: [],
143
-
209
+    
144 210
         isCreated: 1,
145 211
         manufacturers: [],
146 212
         title: '',
@@ -251,30 +317,15 @@
251 317
             label: '全部'
252 318
           }, {
253 319
             value: '1',
254
-            label: ''
320
+            label: '已备案'
255 321
           }, {
256 322
             value: '2',
257
-            label: ''
323
+            label: '未备案'
258 324
           }],
259 325
         value: '',
260
-        tableData: [{
261
-          date: '2016-05-02',
262
-          name: '王小虎',
263
-          address: '上海市普陀区金沙江路 1518 弄'
264
-        }, {
265
-          date: '2016-05-04',
266
-          name: '王小虎',
267
-          address: '上海市普陀区金沙江路 1517 弄'
268
-        }, {
269
-          date: '2016-05-01',
270
-          name: '王小虎',
271
-          address: '上海市普陀区金沙江路 1519 弄'
272
-        }, {
273
-          date: '2016-05-03',
274
-          name: '王小虎',
275
-          address: '上海市普陀区金沙江路 1516 弄'
276
-        }]
277
-
326
+       
327
+        dealer:[],
328
+        selectDrug:[],
278 329
       }
279 330
     },
280 331
     methods: {
@@ -292,11 +343,15 @@
292 343
       },
293 344
       changeCharge(val) {
294 345
         this.getList()
295
-
296 346
       },
297 347
       changeUser(val) {
298 348
         this.getList()
299
-
349
+      },
350
+      changeManufacture(){
351
+        this.getList()
352
+      },
353
+      changeRecord(){
354
+         this.getList()
300 355
       },
301 356
       getName(id) {
302 357
         for (let i = 0; i < this.manufacturers.length; i++) {
@@ -306,6 +361,15 @@
306 361
         }
307 362
         return ''
308 363
       },
364
+      getDealer(id){
365
+        var name = ""
366
+        for(let i=0;i<this.dealer.length;i++){
367
+          if(this.dealer[i].id == id){
368
+             name = this.dealer[i].dealer_name
369
+          }
370
+        }
371
+        return name
372
+      },
309 373
       goodInfoDialogComfirm: function(val) {
310 374
 
311 375
         //修改自备药
@@ -356,11 +420,13 @@
356 420
             this.$message.error(response.data.msg)
357 421
             return false
358 422
           } else {
423
+              var obj = {id:0,manufacturer_name:"全部"}
424
+              this.manufacturers.push(obj)
425
+          
359 426
             for (let i = 0; i < response.data.data.manufacturer.length; i++) {
360
-              this.manufacturers.push(
361
-                response.data.data.manufacturer[i]
362
-              )
427
+              this.manufacturers.push(response.data.data.manufacturer[i])
363 428
             }
429
+          
364 430
           }
365 431
         })
366 432
       },
@@ -453,6 +519,14 @@
453 519
 
454 520
               }
455 521
 
522
+              if(this.formValue.prescription_mark<=0){
523
+                  this.formValue.prescription_mark = ''
524
+              }else{
525
+                this.formValue.prescription_mark = this.formValue.prescription_mark.toString()
526
+              }
527
+
528
+              this.formValue.record_date = this.getTime(this.formValue.record_date)
529
+
456 530
               this.$refs.addDrugs.show(id, this.formValue)
457 531
 
458 532
             }
@@ -495,7 +569,9 @@
495 569
           keyword: this.keywords,
496 570
           is_use: this.is_use,
497 571
           is_charge: this.is_charge,
498
-          is_inject: this.is_inject
572
+          is_inject: this.is_inject,
573
+          manufacturer:this.manufacturer,
574
+          is_record:this.is_record
499 575
         }
500 576
         getBaseDrugLibList(params).then(response => {
501 577
           if (response.data.state == 0) {
@@ -504,6 +580,7 @@
504 580
           } else {
505 581
             this.total = response.data.data.total
506 582
             this.list = []
583
+            console.log("333333333",response.data.data.list)
507 584
             for (let i = 0; i < response.data.data.list.length; i++) {
508 585
               this.list.push(response.data.data.list[i])
509 586
             }
@@ -513,10 +590,106 @@
513 590
      getDataConfig(module, filed_name){
514 591
         return getDataConfig(module, filed_name)
515 592
       },
593
+      toRecord(){
594
+         var that = this
595
+         axios.get('http://127.0.0.1:9532/sz/api/drug/get').then(function(response) {
596
+          if (response.data.state == 0) {
597
+               that.$message.error(response.data.msg)
598
+               return false
599
+            } else {
600
+              that.$message({ message: '备案成功', type: 'success' })
601
+               that.getList()
602
+             }
603
+           }).catch(function(error) {
604
+        })
605
+      },
606
+      toReturn(id,isMark){
607
+        console.log("id2222",id)
608
+         var that = this
609
+         let params = {
610
+             'id':id,
611
+             'type_id':1,
612
+             'is_mark':isMark,
613
+          }
614
+         axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
615
+          if (response.data.state == 0) {
616
+               that.$message.error(response.data.msg)
617
+               return false
618
+            } else {
619
+              that.$message({ message: '操作成功', type: 'success' })
620
+              that.getList()
621
+             }
622
+           }).catch(function(error) {
623
+        })
624
+      },
625
+     GetAllConfig(){
626
+        GetAllConfig().then(response => {
627
+        if (response.data.state == 0) {
628
+          this.$message.error(response.data.msg);
629
+          return false;
630
+        } else {
631
+          this.dealer = response.data.data.dealer;
632
+         
633
+        }
634
+       });
635
+      },
636
+      getTime(val) {
637
+         if(val == ""){
638
+          return ""
639
+         }else {
640
+          return uParseTime(val, '{y}-{m}-{d}')
641
+         }
642
+      },
643
+
644
+      handleSelectionChange(val){
645
+        this.selectDrug = val
646
+      },
516 647
 
517
-    }, created() {
648
+      BatchDelete() {
649
+      if (this.selectDrug.length == 0) {
650
+        this.$message.error("请选择要备案的信息");
651
+        return false;
652
+      }
653
+      this.$confirm(
654
+        "确认要备案所选记录吗? <br>",
655
+        "备案提示",
656
+        {
657
+          dangerouslyUseHTMLString: true,
658
+          confirmButtonText: "确定",
659
+          cancelButtonText: "取消",
660
+          type: "warning"
661
+        }
662
+      ).then(() => {
663
+        var ids = [];
664
+        var idMap = {};
665
+        for (const index in this.selectDrug) {
666
+          ids.push(this.selectDrug[index].id);
667
+          idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
668
+        }
669
+        console.log('ids222222222',ids)
670
+        var idss = ids.join(',')
671
+        let params = {
672
+          ids:idss
673
+        }
674
+     
675
+        var that = this
676
+        axios.get('http://127.0.0.1:9532/sz/api/drug/get',{ params: params }).then(function(response) {
677
+         if (response.data.state == 0) {
678
+               that.$message.error(response.data.msg)
679
+               return false
680
+            } else {
681
+              that.$message({ message: '备案成功', type: 'success' })
682
+              this.getList()
683
+             }
684
+           }).catch(function(error) {
685
+        })
686
+       });
687
+     },
688
+    }, 
689
+    created() {
518 690
       this.getList()
519 691
       this.getAllManufacturer()
692
+      this.GetAllConfig()
520 693
     }
521 694
   }
522 695
 </script>

+ 21 - 3
src/xt_pages/data/components/editProject.vue Visa fil

@@ -119,12 +119,22 @@
119 119
                           <el-form-item label="总量 : " prop="medical_code">
120 120
                             <el-input v-model="form.total" style="width:160px;" placeholder="" maxlength="30"></el-input>
121 121
                         </el-form-item>
122
-                        <el-form-item label="状态 : " prop="medical_status" style="width:100%;">
122
+                        <el-form-item label="状态 : " prop="medical_status">
123 123
                             <el-radio-group v-model="form.medical_status">
124 124
                                 <el-radio :label="1">停用</el-radio>
125 125
                                 <el-radio :label="2">收费</el-radio>
126 126
                             </el-radio-group>
127 127
                         </el-form-item>
128
+                        <el-form-item label="类别:" prop="">
129
+                           <el-select v-model="form.category" style="width:160px;" placeholder="请选择">
130
+                              <el-option
131
+                                v-for="(item,index) in categoryList"
132
+                                :key="index"
133
+                                :label="item.name"
134
+                                :value="item.id">
135
+                                </el-option>
136
+                            </el-select>
137
+                        </el-form-item>
128 138
                         <el-form-item label="备注 : " prop="remark" style="width:100%;">
129 139
                             <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
130 140
                         </el-form-item>
@@ -256,7 +266,8 @@ export default {
256 266
               delivery_way:"",
257 267
               execution_frequency:"",
258 268
               number_days:"",
259
-              total:""
269
+              total:"",
270
+              category:""
260 271
             },
261 272
             rules: {
262 273
                 project_name: [{ required: true, message: '请填写项目名称', trigger: 'blur'  }],
@@ -267,7 +278,12 @@ export default {
267 278
                 cost_classify: [{ required: true, message: '请填写费用类别',trigger: 'blur' }],
268 279
                 executive_section: [{ required: true, message: '请填写执行科室',trigger: 'blur'  }],
269 280
                 medical_coverage: [{ required: true, message: '请填写医保等级',trigger: 'blur' }],
270
-           }
281
+           },
282
+          categoryList:[
283
+             {id:1,name:"常规诊疗项目"},
284
+             {id:4,name:"辅助器具项目"},
285
+             {id:5,name:"加收项目"}
286
+           ]
271 287
         }
272 288
     },
273 289
     methods:{
@@ -329,6 +345,7 @@ export default {
329 345
               this.form.execution_frequency = projecDetail.execution_frequency
330 346
               this.form.number_days = projecDetail.number_days
331 347
               this.form.total = projecDetail.total
348
+              this.form.category = projecDetail.category
332 349
             }
333 350
          })
334 351
        },
@@ -367,6 +384,7 @@ export default {
367 384
                     execution_frequency:this.form.execution_frequency,
368 385
                     number_days:this.form.number_days,
369 386
                     total:this.form.total,
387
+                    category:this.form.category
370 388
                }
371 389
               
372 390
               updatedProject(params).then(response=>{

+ 125 - 4
src/xt_pages/data/components/project.vue Visa fil

@@ -22,10 +22,30 @@
22 22
                     :value="item.value">
23 23
                     </el-option>
24 24
                 </el-select>
25
+                <label class="title"><span class="name">备案:</span> : </label>
26
+                <el-select v-model="is_mark" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeRecord">
27
+                  <el-option
28
+                    v-for="item in optionOne"
29
+                    :key="item.value"
30
+                    :label="item.label"
31
+                    :value="item.value">
32
+                  </el-option>
33
+                </el-select>
34
+            </div>
35
+            <div style="margin-left:200px">
36
+              <el-button type="primary" @click="openForm(0)">新增</el-button>
37
+            </div>
38
+            <div>
39
+             <!-- <el-button type="primary" @click="toRecord()">备案</el-button> -->
40
+             <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
25 41
             </div>
26
-            <el-button type="primary" @click="openForm(0)">新增</el-button>
27 42
         </div>
28
-        <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}">
43
+        <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"  @selection-change="handleSelectionChange">
44
+            <el-table-column
45
+              align="center"
46
+              type="selection"
47
+              width="55">
48
+            </el-table-column>  
29 49
             <el-table-column prop="date" label="序号" width="80" align="center">
30 50
                  <template  slot-scope="scope">
31 51
                       {{scope.$index+1}}
@@ -62,6 +82,10 @@
62 82
                 <template slot-scope="scope">
63 83
                     <el-button @click="editHisProject(scope.row.id)" type="primary" size="small">编辑</el-button>
64 84
                     <el-button type="danger" size="small" @click="deleteProject(scope.row.id,scope.$index)">删除</el-button>
85
+                    <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
86
+                      <span v-if="scope.row.is_mark ==0">备案</span>
87
+                      <span v-if="scope.row.is_mark ==1">撤销</span>
88
+                    </el-button>
65 89
                 </template>
66 90
             </el-table-column>
67 91
         </el-table>
@@ -88,6 +112,7 @@ import addProject from './addProject'
88 112
 import editProject from './editProject'
89 113
 import { getProjectList,deleteHisProject } from "@/api/project/project"
90 114
 import { getDictionaryDataConfig } from "@/utils/data";
115
+import axios from 'axios'
91 116
 export default {
92 117
     components:{
93 118
         addProject,
@@ -112,7 +137,20 @@ export default {
112 137
             total:0,
113 138
             tableData: [],
114 139
             is_start:0,
115
-            is_charge:0
140
+            is_charge:0,
141
+            selectDrug:[],
142
+            optionOne: [
143
+            {
144
+              value: '0',
145
+              label: '全部'
146
+            }, {
147
+              value: '1',
148
+              label: '已备案'
149
+            }, {
150
+              value: '2',
151
+              label: '未备案'
152
+          }],
153
+         is_mark:""
116 154
         }
117 155
     },
118 156
     methods:{
@@ -169,6 +207,7 @@ export default {
169 207
                is_start:this.is_start,
170 208
                limit:this.limit,
171 209
                page:this.page,
210
+               is_mark:this.is_mark,
172 211
             }
173 212
            console.log("222",params)
174 213
           getProjectList(params).then(response=>{
@@ -200,8 +239,90 @@ export default {
200 239
         },
201 240
         changeOption(){
202 241
           this.getlist()
242
+        },
243
+
244
+        toRecord(){
245
+         var that = this
246
+         axios.get('http://127.0.0.1:9532/sz/api/treatment/get').then(function(response) {
247
+          if (response.data.state == 0) {
248
+               that.$message.error(response.data.msg)
249
+               return false
250
+            } else {
251
+              that.$message({ message: '备案成功', type: 'success' })
252
+              that.getlist()
253
+             }
254
+           }).catch(function(error) {
255
+        })
256
+      },
257
+
258
+     toReturn(id,isMark){
259
+        console.log("id2222",id)
260
+         var that = this
261
+         let params = {
262
+             'id':id,
263
+             'type_id':2,
264
+             'is_mark':isMark,
265
+          }
266
+          console.log("params22222222",params)
267
+         
268
+         axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
269
+          if (response.data.state == 0) {
270
+               that.$message.error(response.data.msg)
271
+               return false
272
+            } else {
273
+              that.$message({ message: '操作成功', type: 'success' })
274
+              that.getlist()
275
+             }
276
+           }).catch(function(error) {
277
+        })
278
+      },
279
+      handleSelectionChange(val) {
280
+        this.selectDrug = val;
281
+      }, 
282
+    changeRecord(){
283
+      this.getlist()
284
+    },
285
+      
286
+    BatchDelete() {
287
+      if (this.selectDrug.length == 0) {
288
+        this.$message.error("请选择要备案的信息");
289
+        return false;
290
+      }
291
+      this.$confirm(
292
+        "确认要备案所选记录吗? <br>",
293
+        "备案提示",
294
+        {
295
+          dangerouslyUseHTMLString: true,
296
+          confirmButtonText: "确定",
297
+          cancelButtonText: "取消",
298
+          type: "warning"
299
+        }
300
+      ).then(() => {
301
+        var ids = [];
302
+        var idMap = {};
303
+        for (const index in this.selectDrug) {
304
+          ids.push(this.selectDrug[index].id);
305
+          idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
306
+        }
307
+        console.log('ids222222222',ids)
308
+        var idss = ids.join(',')
309
+        let params = {
310
+          ids:idss
203 311
         }
204
-        
312
+     
313
+        var that = this
314
+        axios.get('http://127.0.0.1:9532/sz/api/treatment/get',{ params: params }).then(function(response) {
315
+         if (response.data.state == 0) {
316
+               that.$message.error(response.data.msg)
317
+               return false
318
+            } else {
319
+              that.$message({ message: '备案成功', type: 'success' })
320
+              this.getList()
321
+             }
322
+           }).catch(function(error) {
323
+        })
324
+       });
325
+     },
205 326
     },
206 327
     created(){
207 328
       this.getlist()

+ 7 - 13
src/xt_pages/outpatientCharges/components/registerDialog.vue Visa fil

@@ -79,7 +79,7 @@
79 79
 
80 80
       <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81 81
         <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
-                   >
82
+        >
83 83
           <el-option
84 84
             v-for="(item,index) in registers"
85 85
             :key="index"
@@ -166,10 +166,10 @@
166 166
         </el-select>
167 167
       </el-form-item>
168 168
       <el-form-item label="挂号费:">
169
-        <el-input v-model.number="form.registration_fee"></el-input>
169
+        <el-input v-model="form.registration_fee"></el-input>
170 170
       </el-form-item>
171 171
       <el-form-item label="诊疗费:">
172
-        <el-input v-model.number="form.medical_expenses"></el-input>
172
+        <el-input v-model="form.medical_expenses"></el-input>
173 173
       </el-form-item>
174 174
     </el-form>
175 175
 
@@ -203,7 +203,6 @@
203 203
           {value: 15, label: "门诊统筹"},
204 204
           {value: 16, label: "门诊慢性病"},
205 205
           {value: 21, label: "普通住院"},
206
-
207 206
         ],
208 207
         form: {
209 208
           id: '',
@@ -291,11 +290,10 @@
291 290
         }, {
292 291
           value: 6,
293 292
           label: "城乡居民大病医疗保险"
294
-        },
295
-          {
296
-            value: 7,
297
-            label: "生育保险"
298
-          }],
293
+        }, {
294
+          value: 7,
295
+          label: "生育保险"
296
+        }],
299 297
         register: [{
300 298
           value: 1,
301 299
           label: '普通'
@@ -323,17 +321,13 @@
323 321
           birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
324 322
           certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
325 323
           id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
326
-
327 324
           p_type: [{required: true, message: "处方类型不能为空", trigger: 'change'}],
328 325
           sick_type: [{required: true, message: "大病类别不能为空", trigger: 'change'}],
329 326
           diagnosis: [{required: true, message: "诊断不能为空", trigger: 'change'}],
330
-
331 327
         },
332
-
333 328
         visibility: false,
334 329
         labelPosition: 'right',
335 330
         isClose: false,
336
-
337 331
         resetForm: {
338 332
           settlement_value: '',
339 333
           medical_insurance_card: '',

+ 359 - 21
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Visa fil

@@ -22,15 +22,17 @@
22 22
             <el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人
23 23
             </el-radio>
24 24
             <!--<el-radio :label=3>已退费<span-->
25
-              <!--style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人-->
25
+            <!--style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人-->
26 26
             <!--</el-radio>-->
27 27
             <el-radio :label=4>全部</el-radio>
28 28
 
29 29
           </el-radio-group>
30 30
         </div>
31 31
         <div class="mainCell" style="margin-bottom:10px;">
32
-          <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
33
-          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
32
+          <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input"
33
+                    class="filter-item"/>
34
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
35
+                     @click="searchAction">
34 36
             搜索
35 37
           </el-button>
36 38
         </div>
@@ -45,14 +47,61 @@
45 47
               <template slot-scope="scope">{{scope.row.name}}</template>
46 48
             </el-table-column>
47 49
             <el-table-column align="center" prop="name" label="就诊号" width="110">
48
-              <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
50
+              <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}
51
+              </template>
49 52
             </el-table-column>
50 53
           </el-table>
51 54
         </div>
52 55
       </div>
56
+
53 57
       <div class="mainRight">
54 58
 
55 59
         <div class="mainCell fixedCell" style="margin-bottom:10px;">
60
+          <el-button v-loading="loadingone" size="small"
61
+                     @click="sz_open(1)"
62
+
63
+                     type="primary">深圳挂号
64
+          </el-button>
65
+
66
+          <el-button v-loading="loadingtwo"
67
+                     v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0)"
68
+                     size="small"
69
+                     @click="sz_open(2)"
70
+                     type="primary">深圳预结算
71
+          </el-button>
72
+
73
+
74
+          <el-button v-loading="loadingtwo"
75
+                     v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
76
+                     size="small"
77
+                     @click="sz_open(3)"
78
+                     type="primary">深圳收费
79
+          </el-button>
80
+
81
+          <el-button size="small" @click="sz_open(5)" type="primary"
82
+                     v-if="this.order.order_status == 2"
83
+          >
84
+            深圳退费
85
+          </el-button>
86
+
87
+          <!--<el-button size="small" @click="sz_open(8)" type="primary"-->
88
+          <!--&gt;-->
89
+          <!--跨月退费-->
90
+          <!--</el-button>-->
91
+
92
+          <el-button  size="small" @click="sz_open(6)" type="primary"
93
+                      v-if="this.order.order_status == 2"
94
+          >深圳结算单
95
+          </el-button>
96
+
97
+          <el-button
98
+            v-if="$store.getters.xt_user.org_id == 4  ||  this.$store.getters.xt_user.org_id == 3877"
99
+            size="small" @click="sz_open(7)" type="primary"
100
+          >深圳撤销明细
101
+          </el-button>
102
+
103
+
104
+
56 105
           <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
57 106
           <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
58 107
           <el-button size="small" @click="open(3)" type="primary">打印</el-button>
@@ -69,23 +118,26 @@
69 118
 
70 119
 
71 120
           <!--<el-button v-loading="loadingtwo" v-if="this.hisPatientInfo.id > 0 && this.order.id == 0" size="small"-->
72
-                     <!--@click="open(20)"-->
73
-                     <!--type="primary">预结算!-->
121
+          <!--@click="open(20)"-->
122
+          <!--type="primary">预结算!-->
74 123
           <!--</el-button>-->
75 124
 
76 125
           <!--<el-button v-loading="loadingtwo" v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1 ||  this.order.order_status == 3" size="small"-->
77
-                     <!--@click="open(21)"-->
78
-                     <!--type="primary">收费!-->
126
+          <!--@click="open(21)"-->
127
+          <!--type="primary">收费!-->
79 128
           <!--</el-button>-->
80 129
 
81 130
 
82
-          <el-button v-loading="loadingtwo" v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1 ||  this.order.order_status == 3" size="small"
131
+          <el-button v-loading="loadingtwo"
132
+                     v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1 ||  this.order.order_status == 3"
133
+                     size="small"
83 134
                      @click="open(4)"
84 135
                      type="primary">收费
85 136
           </el-button>
86 137
 
87 138
           <el-button size="small" @click="open(5)" type="primary"
88
-                     v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">退费
139
+                     v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">
140
+            退费
89 141
           </el-button>
90 142
 
91 143
           <!--<el-button size="small" @click="open(5)" type="primary"-->
@@ -105,8 +157,9 @@
105 157
           >结算单
106 158
           </el-button>
107 159
 
108
-          <el-button v-if="this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877"
109
-                     size="small" @click="open(10)" type="primary"
160
+          <el-button
161
+            v-if="this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877"
162
+            size="small" @click="open(10)" type="primary"
110 163
           >退号
111 164
           </el-button>
112 165
 
@@ -126,13 +179,16 @@
126 179
           <!--&gt;查待遇-->
127 180
           <!--</el-button>-->
128 181
 
129
-          <el-button  size="small" @click="query" type="primary"
182
+          <el-button size="small" @click="query" type="primary"
130 183
           >查询
131 184
           </el-button>
132 185
 
133 186
 
134 187
         </div>
135 188
 
189
+
190
+
191
+
136 192
         <div class="mainCenter" v-loading="loading">
137 193
           <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
138 194
             <el-tab-pane label="日结" name="first">
@@ -140,7 +196,8 @@
140 196
                 <div class="centerLeft">
141 197
                   <div class="tabsBox">
142 198
                     <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
143
-                    <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
199
+                    <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
200
+                             @tab-click="tabclickEvent">
144 201
                       <el-tab-pane
145 202
                         v-for="(item, index) in prescriptions"
146 203
                         :key="index"
@@ -294,7 +351,8 @@
294 351
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
295 352
                     <li style="width:50%;">科室:{{ getDepartment(info.departments) }}</li>
296 353
                     <li style="width:100%;" v-if="activeName == 'first'">总费用:{{ getTotal() }}</li>
297
-                    <li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}</li>
354
+                    <li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}
355
+                    </li>
298 356
 
299 357
                     <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
300 358
                     <!--<li style="width:100%;">是否有传染病:</li>-->
@@ -568,7 +626,48 @@
568 626
         }
569 627
 
570 628
         this.loadingtwo = true
571
-        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877) {
629
+        if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538){
630
+
631
+          var that = this
632
+          axios.get('http://127.0.0.1:9532/sz/api/settle/get', {
633
+            params: form
634
+          })
635
+            .then(function(response) {
636
+              if (response.data.state == 0) {
637
+                that.$message.error(response.data.msg)
638
+                that.loadingtwo = false
639
+                that.$refs.charge.hide()
640
+                return false
641
+              } else {
642
+                if (response.data.data.failed_code == -10){
643
+
644
+                  that.$message.error(response.data.data.msg)
645
+
646
+                }else{
647
+                  that.changeRadio(2)
648
+                  that.radio = 2
649
+
650
+                  that.$refs.charge.hide()
651
+                  that.loadingtwo = false
652
+                  that.state = '已收费'
653
+                  that.$message({ message: '收费成功', type: 'success' })
654
+                  that.loadingtwo = false
655
+                  that.cal_one = this.cal_one - 1
656
+                  that.cal_two = this.cal_two + 1
657
+                  that.patientTableData.splice(this.current_index, 1)
658
+
659
+
660
+                }
661
+
662
+
663
+              }
664
+            })
665
+            .catch(function(error) {
666
+
667
+            })
668
+
669
+
670
+        }else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877) {
572 671
           var that = this
573 672
           axios.get('http://127.0.0.1:9532/api/upload/get', {
574 673
             params: form
@@ -620,14 +719,88 @@
620 719
         this.$refs.charge.hide()
621 720
       },
622 721
       confirm(forms) {
722
+        console.log(forms)
723
+
623 724
         forms['record_time'] = this.record_date
624 725
         forms['admin_user_id'] = this.$store.getters.xt_user.user.id
625 726
         forms['org_id'] = this.$store.getters.xt_user.org_id
626 727
 
627 728
         this.loadingone = true
628 729
 
629
-        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877) {
630
-          var that = this
730
+        var that = this
731
+
732
+
733
+        if(this.$store.getters.xt_user.org_id == 9538 ||this.$store.getters.xt_user.org_id == 4 ){
734
+
735
+          axios.get('http://127.0.0.1:9532/sz/api/register/get', {
736
+            params: forms
737
+          })
738
+            .then(function(response) {
739
+              if (response.data.state == 0) {
740
+                that.$message.error(response.data.msg)
741
+                that.loadingone = false
742
+                that.$refs.register.hide()
743
+                return false
744
+              } else {
745
+                if (response.data.data.failed_code == -10){
746
+                  that.$message.error(response.data.data.msg)
747
+                  return
748
+                }else {
749
+                  that.$refs.register.hide()
750
+                  let params = {
751
+                    'record_date': that.record_date
752
+                  }
753
+                  getChargeHisPatientList(params).then(response => {
754
+                    if (response.data.state == 0) {
755
+                      that.$message.error(response.data.msg)
756
+                      return false
757
+                    } else {
758
+                      that.loadingone = false
759
+
760
+                      that.patientTableData = []
761
+                      that.all_table_data = []
762
+                      that.hisPatientDatas = []
763
+
764
+                      let one_count = 0
765
+                      let two_count = 0
766
+                      let three_count = 0
767
+                      for (let i = 0; i < response.data.data.list.length; i++) {
768
+                        that.all_table_data.push(response.data.data.list[i])
769
+                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
770
+                          one_count = one_count + 1
771
+                          that.patientTableData.push(response.data.data.list[i])
772
+                        }
773
+                        if (response.data.data.list[i].order.order_status == 2) {
774
+                          two_count = two_count + 1
775
+                          that.patientTableData.push(response.data.data.list[i])
776
+                        }
777
+                      }
778
+                      that.hisPatientDatas = response.data.data.list_two
779
+                      that.cal_one = one_count
780
+                      that.cal_two = two_count
781
+                      that.cal_three = three_count
782
+                      that.current_index = 0
783
+
784
+                      for (let i = 0; i < that.patientTableData.length; i++) {
785
+                        if (this.patientTableData[i].id == this.patientInfo.id) {
786
+                          that.$refs.tab.setCurrentRow(that.patientTableData[i])
787
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
788
+                        }
789
+                      }
790
+                      that.$message({ message: '挂号成功', type: 'success' })
791
+                      that.loadingone = false
792
+                      var his_info = response.data.data.his_info
793
+                      that.hisPatientInfo = his_info
794
+                    }
795
+                  })
796
+                }
797
+              }
798
+            })
799
+            .catch(function(error) {
800
+
801
+            })
802
+
803
+        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 3877 ) {
631 804
 
632 805
           axios.get('http://127.0.0.1:9532/api/register/get', {
633 806
             params: forms
@@ -1344,10 +1517,11 @@
1344 1517
               .then(function(response) {
1345 1518
                 if (response.data.state == 0) {
1346 1519
                   that.$message.error(response.data.msg)
1347
-                  that.loadingtwo = false
1520
+                  // that.loadingtwo = false
1348 1521
                   return false
1349 1522
                 } else {
1350 1523
 
1524
+
1351 1525
                 }
1352 1526
               })
1353 1527
               .catch(function(error) {
@@ -1391,7 +1565,7 @@
1391 1565
 
1392 1566
             'patient_id': this.patientInfo.id,
1393 1567
             'record_time': this.record_date,
1394
-            "org_id": this.$store.getters.xt_user.org_id
1568
+            'org_id': this.$store.getters.xt_user.org_id
1395 1569
           }
1396 1570
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1397 1571
             params: params
@@ -1414,7 +1588,7 @@
1414 1588
             'number': this.order.number,
1415 1589
             'patient_id': this.patientInfo.id,
1416 1590
             'record_time': this.record_date,
1417
-            "org_id": this.$store.getters.xt_user.org_id
1591
+            'org_id': this.$store.getters.xt_user.org_id
1418 1592
           }
1419 1593
           axios.get('http://127.0.0.1:9532/api/refunddetail/post', {
1420 1594
             params: params
@@ -2256,6 +2430,170 @@
2256 2430
 
2257 2431
           }
2258 2432
         })
2433
+      },
2434
+      sz_open(index) {
2435
+        switch (index) {
2436
+          case 1:
2437
+            this.$refs.register.show()
2438
+            break
2439
+          case 2:
2440
+            var that = this
2441
+            if (this.activeName == 'first') {
2442
+              this.settle_accounts_type = 1
2443
+
2444
+            } else {
2445
+              this.settle_accounts_type = 2
2446
+              this.start_time = this.other_start_time
2447
+              this.end_time = this.other_end_time
2448
+              this.settle_accounts_type = 2
2449
+
2450
+            }
2451
+            let params = {
2452
+              'patient_id': this.patientInfo.id,
2453
+              'record_time': this.record_date,
2454
+              'settle_accounts_type':this.settle_accounts_type,
2455
+              'admin_user_id': this.$store.getters.xt_user.user.id,
2456
+            }
2457
+            axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2458
+              params: params
2459
+            })
2460
+              .then(function(response) {
2461
+                if (response.data.state == 0) {
2462
+                  that.$message.error(response.data.msg)
2463
+                  return false
2464
+                } else {
2465
+
2466
+                  if (response.data.data.failed_code == -10){
2467
+                    that.$message.error(response.data.data.msg)
2468
+
2469
+                  }else {
2470
+                    that.changeRadio(1)
2471
+                    that.$message({ message: '预结算成功', type: 'success' })
2472
+                  }
2473
+
2474
+                }
2475
+              })
2476
+              .catch(function(error) {
2477
+              })
2478
+            break
2479
+          case 3:
2480
+            if (this.activeName == 'first') {
2481
+              this.$refs.charge.show(this.getTotal())
2482
+            } else {
2483
+              this.$refs.charge.show(this.getTotalTwo())
2484
+            }
2485
+            break
2486
+          case 4:
2487
+            break
2488
+          case 5:
2489
+            var that = this
2490
+            this.$confirm('是否退费', '退费', {
2491
+              confirmButtonText: '确 定',
2492
+              cancelButtonText: '取 消',
2493
+              type: 'warning'
2494
+            }).then(() => {
2495
+              axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
2496
+                params: {
2497
+                  order_id:this.order.id,
2498
+                  record_time: this.record_date,
2499
+                  admin_user_id:this.$store.getters.xt_user.user.id,
2500
+                  patient_id:this.patientInfo.id
2501
+                }
2502
+              })
2503
+                .then(function(response) {
2504
+                  if (response.data.state == 0) {
2505
+                    that.$message.error(response.data.msg)
2506
+                    return false
2507
+                  } else {
2508
+                    if (response.data.data.failed_code == -10){
2509
+                      that.$message.error(response.data.data.msg)
2510
+
2511
+                    }else {
2512
+                      that.changeRadio(1)
2513
+                      that.$message({ message: '退费成功', type: 'success' })
2514
+                    }
2515
+                  }
2516
+                })
2517
+                .catch(function(error) {
2518
+                })
2519
+            }).catch(() => {
2520
+            })
2521
+            break
2522
+          case 6:
2523
+            var that = this
2524
+            axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
2525
+              params: {
2526
+                order_id:this.order.id,
2527
+                record_time: this.record_date,
2528
+                admin_user_id:this.$store.getters.xt_user.user.id,
2529
+                patient_id:this.patientInfo.id
2530
+
2531
+              }
2532
+            })
2533
+              .then(function(response) {
2534
+                if (response.data.state == 0) {
2535
+                  that.$message.error(response.data.msg)
2536
+                  return false
2537
+                } else {
2538
+                  if (response.data.data.failed_code == -10){
2539
+
2540
+                    that.$message.error(response.data.data.msg)
2541
+
2542
+                  }else{
2543
+                    if (response.data.data.failed_code == -10){
2544
+                      that.$message.error(response.data.data.msg)
2545
+
2546
+                    }else {
2547
+                      that.$message({ message: '查询成功', type: 'success' })
2548
+
2549
+                    }
2550
+
2551
+
2552
+                  }
2553
+                }
2554
+              })
2555
+              .catch(function(error) {
2556
+              })
2557
+            break
2558
+          case 7:
2559
+            var that = this
2560
+            axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
2561
+              params: {
2562
+                order_id:this.order.id,
2563
+                record_time: this.record_date,
2564
+                admin_user_id:this.$store.getters.xt_user.user.id,
2565
+                patient_id:this.patientInfo.id
2566
+
2567
+              }
2568
+            })
2569
+              .then(function(response) {
2570
+                if (response.data.state == 0) {
2571
+                  that.$message.error(response.data.msg)
2572
+                  return false
2573
+                } else {
2574
+                  if (response.data.data.failed_code == -10){
2575
+
2576
+                    that.$message.error(response.data.data.msg)
2577
+
2578
+                  }else{
2579
+                    if (response.data.data.failed_code == -10){
2580
+                      that.$message.error(response.data.data.msg)
2581
+
2582
+                    }else {
2583
+                      that.$message({ message: '明细撤销成功', type: 'success' })
2584
+
2585
+                    }
2586
+
2587
+
2588
+                  }
2589
+                }
2590
+              })
2591
+              .catch(function(error) {
2592
+              })
2593
+            break
2594
+
2595
+        }
2596
+
2259 2597
       }
2260 2598
     },
2261 2599
     mounted() {

+ 3 - 2
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue Visa fil

@@ -12,8 +12,9 @@
12 12
         </div>
13 13
         <div class="infoTitle">
14 14
             <div>婚姻状况:
15
-              <span v-if="patient.marital_status == 1">已婚 </span>
16
-              <span v-if="patient.marital_status == 2">未婚 </span>
15
+              <span v-if="patient.marital_status == 1">未婚</span>
16
+              <span v-if="patient.marital_status == 2">已婚</span>
17
+              <span v-if="patient.marital_status == 3">离异</span>
17 18
             </div>
18 19
             <div>职业:{{getProfession(patient.profession)?getProfession(patient.profession):''}}</div>
19 20
         </div>

+ 111 - 14
src/xt_pages/role/admin.vue Visa fil

@@ -2,16 +2,25 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-      <!-- <router-link to="/role/admin/create"> -->
6
-      <el-button
5
+     
6
+       <div style="position: fixed;margin-left:950px">
7
+        <el-button
8
+          type="primary"
9
+          size="small"
10
+          icon="el-icon-circle-plus-outline"
11
+          style="float:left"
12
+          @click="openForm(0)">新增</el-button>
13
+     </div>
14
+      <!-- <el-button
7 15
         type="primary"
8 16
         size="small"
9
-        icon="el-icon-circle-plus-outline"
10
-        style="float:right;"
11
-        @click="openForm(0)"
12
-        >新增</el-button
13
-      >
14
-      <!-- </router-link> -->
17
+        @click="toLogin"
18
+        >医药师登记</el-button> -->
19
+        <el-button
20
+        type="primary"
21
+        size="small"
22
+        @click="BatchDelete"
23
+        >医药师登记</el-button>
15 24
     </div>
16 25
     <div class="app-container">
17 26
       <el-table
@@ -25,7 +34,13 @@
25 34
         border
26 35
         :data="admins"
27 36
         v-loading="is_loading_admins"
28
-      >
37
+        @selection-change="handleSelectionChange"
38
+      > 
39
+        <el-table-column
40
+              align="center"
41
+              type="selection"
42
+              width="55">
43
+        </el-table-column>  
29 44
         <el-table-column
30 45
           label="用户名"
31 46
           prop="user_name"
@@ -71,7 +86,7 @@
71 86
             </div>
72 87
           </template>
73 88
         </el-table-column>
74
-        <el-table-column label="操作" width="120" align="center">
89
+        <el-table-column label="操作" width="240" align="center">
75 90
           <template slot-scope="scope">
76 91
             <!-- <router-link :to="{ path:'/role/admin/edit', query:{ id:scope.row.user_id }}"> -->
77 92
             <el-tooltip
@@ -124,6 +139,12 @@
124 139
                 @click="recoverAdminAction(scope.row)"
125 140
               ></el-button>
126 141
             </el-tooltip>
142
+            <span v-if="scope.row.user_type == 2">
143
+              <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
144
+                    <span v-if="scope.row.is_mark ==0">已登记</span>
145
+                    <span v-if="scope.row.is_mark ==1">撤销</span>
146
+              </el-button>
147
+            </span>
127 148
           </template>
128 149
         </el-table-column>
129 150
       </el-table>
@@ -151,7 +172,7 @@ import { getRoles } from "@/api/role/role";
151 172
 import { parseTime } from "@/utils";
152 173
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
153 174
 import AdminInfoForm from "./components/AdminInfoForm";
154
-
175
+import axios from 'axios'
155 176
 export default {
156 177
   name: "adminManage",
157 178
   data() {
@@ -168,8 +189,8 @@ export default {
168 189
       is_exist_role: false,
169 190
       org: null,
170 191
       isSubSuperAdmin: false,
171
-
172
-      local_user_id: 0
192
+      local_user_id: 0,
193
+      selectDrug:[]
173 194
     };
174 195
   },
175 196
   components: {
@@ -265,6 +286,7 @@ export default {
265 286
           console.log(resp);
266 287
           if (resp.state === 1) {
267 288
              var admindata = resp.data.admins
289
+          
268 290
             this.admins.push(...admindata);
269 291
             this.admin_total_count = resp.data.total_count;
270 292
           } else {
@@ -341,7 +363,82 @@ export default {
341 363
     },
342 364
     pageChange: function(nextPage) {
343 365
       this.requestAdminsWithPage(nextPage);
344
-    }
366
+    },
367
+  //  toLogin(){
368
+  //     var that = this
369
+  //     axios.get('http://127.0.0.1:9532/sz/api/doctor/get').then(function(response) {
370
+  //     if (response.data.state == 0) {
371
+  //         that.$message.error(response.data.msg)
372
+  //         return false
373
+  //       } else {
374
+  //         that.$message({ message: '登记成功', type: 'success' })
375
+  //         }
376
+  //        }).catch(function(error) {
377
+  //     })
378
+  //   },
379
+
380
+   BatchDelete() {
381
+      if (this.selectDrug.length == 0) {
382
+        this.$message.error("请选择要登记的信息");
383
+        return false;
384
+      }
385
+      this.$confirm(
386
+        "确认要登记所选记录吗? <br>",
387
+        "备案提示",
388
+        {
389
+          dangerouslyUseHTMLString: true,
390
+          confirmButtonText: "确定",
391
+          cancelButtonText: "取消",
392
+          type: "warning"
393
+        }
394
+      ).then(() => {
395
+        var ids = [];
396
+        var idMap = {};
397
+        console.log("3333333",this.selectDrug)
398
+        for (const index in this.selectDrug) {
399
+          ids.push(this.selectDrug[index].user_id);
400
+          idMap[this.selectDrug[index].user_id] = this.selectDrug[index].user_id;
401
+        }
402
+        console.log('ids222222222',ids)
403
+        var idss = ids.join(',')
404
+        let params = {
405
+          ids:idss
406
+        }
407
+     
408
+        var that = this
409
+        axios.get('http://127.0.0.1:9532/sz/api/doctor/get',{ params: params }).then(function(response) {
410
+         if (response.data.state == 0) {
411
+               that.$message.error(response.data.msg)
412
+               return false
413
+            } else {
414
+              that.$message({ message: '操作成功', type: 'success' })
415
+              that.adminMainView()
416
+             }
417
+           }).catch(function(error) {
418
+        })
419
+       });
420
+     },
421
+     toReturn(id,is_mark){
422
+       var that = this
423
+         let params = {
424
+           'id':id,
425
+           "is_mark":is_mark,
426
+        }
427
+         axios.get('http://127.0.0.1:9532/sz/api/medical/get',{params:params}).then(function(response) {
428
+          if (response.data.state == 0) {
429
+               that.$message.error(response.data.msg)
430
+               return false
431
+            } else {
432
+              that.$message({ message: '操作成功', type: 'success' })
433
+              that.adminMainView()
434
+             }
435
+           }).catch(function(error) {
436
+        })
437
+     },
438
+
439
+   handleSelectionChange(val) {
440
+      this.selectDrug = val;
441
+    },
345 442
   },
346 443
   watch: {
347 444
     should_update_admins(should_change) {

+ 34 - 13
src/xt_pages/role/components/AdminInfoForm.vue Visa fil

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible"  width="60%">
2
+  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible"  width="63%">
3 3
     <el-form :model="form" ref="form" :rules="rules" label-width="130px">
4 4
      <el-row :gutter="24">
5 5
         <el-col :span="24">
@@ -158,7 +158,7 @@
158 158
   <el-row :gutter="24">
159 159
     <el-col :span="8">
160 160
        <el-form-item label="人员类别:">
161
-           <el-select v-model="form.role_type" placeholder="人员类别" @change="changeRoleType" style="width:180px;">
161
+           <el-select v-model="form.role_type" placeholder="人员类别" @change="changeRoleType" style="width:150px;">
162 162
               <el-option
163 163
                 v-for="item in roleList"
164 164
                 :label="item.name"
@@ -171,12 +171,12 @@
171 171
     </el-col>
172 172
      <el-col :span="8">
173 173
        <el-form-item label="医药师资格证编码:">
174
-           <el-input v-model="form.medical_code" style="width:180px;"></el-input>
174
+           <el-input v-model="form.medical_code" style="width:170px;"></el-input>
175 175
        </el-form-item>
176 176
     </el-col>
177 177
     <el-col :span="8">
178 178
        <el-form-item label="医药师职业证编码:">
179
-          <el-input v-model="form.doctor_code" style="width:180px;"></el-input>
179
+          <el-input v-model="form.doctor_code" style="width:170px;"></el-input>
180 180
        </el-form-item>
181 181
     </el-col>
182 182
   </el-row>
@@ -406,6 +406,7 @@
406 406
 </template>
407 407
 
408 408
 <script>
409
+  import axios from 'axios'
409 410
   import { uParseTime } from '@/utils/tools'
410 411
   import Tinymce from '@/components/Tinymce'
411 412
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
@@ -803,7 +804,7 @@
803 804
         this.dialogFormVisible = true
804 805
       },
805 806
       submitAction: function() {   
806
-       console.log("第是",this.form.department_id)  
807
+        
807 808
         var department = ""
808 809
         for(let i=0;i<this.departMent.length;i++){
809 810
           if(this.form.department_id == this.departMent[i].id){
@@ -958,6 +959,22 @@
958 959
                   this.loading = false
959 960
                   var resp = rs.data
960 961
                   if (resp.state === 1) {
962
+                   if(resp.data.approle.active_status == 2){
963
+                      let params = {
964
+                       'id':resp.data.approle.id,
965
+                       'is_mark':1, 
966
+                       }
967
+                     var that = this
968
+                      axios.get('http://127.0.0.1:9532/sz/api/medical/get',{params:params}).then(function(response) {
969
+                      if (response.data.state == 0) {
970
+                          that.$message.error(response.data.msg)
971
+                          return false
972
+                        } else {
973
+                          that.$message({ message: '撤销成功', type: 'success' })
974
+                          }
975
+                        }).catch(function(error) {
976
+                      })
977
+                    }
961 978
                     this.$store.dispatch('DidChangeAdmins')
962 979
                     var _this = this
963 980
                     setTimeout(() => {
@@ -991,17 +1008,21 @@
991 1008
         })
992 1009
       },
993 1010
       changeRole(arr){
1011
+        console.log("arr",arr)
994 1012
         console.log("roles",this.roles)
995
-        // var id = 0
996
-        // for(let i=0;i<this.roles.length;i++){
997
-        //    if(this.roles[i].name="医生"){
998
-        //       id = this.roles[i].id
999
-        //    }
1000
-        // }
1013
+        var varName = []
1014
+        for(let i=0;i<this.roles.length;i++){
1015
+          for(let j=0;j<arr.length;j++){
1016
+             if(this.roles[i].id == arr[j]){
1017
+                 varName.push(this.roles[i].name)
1018
+             }
1019
+          }
1020
+        }
1021
+        console.log("33333",varName)
1001 1022
         this.form.role_type = 1
1002
-        var ids = arr.join(";")
1023
+        var ids = varName.join(";")
1003 1024
         console.log("valee22222",ids)
1004
-        if(ids.indexOf("1349")!=-1){
1025
+        if(ids.indexOf("医生")!=-1){
1005 1026
            this.show = true
1006 1027
         }else{
1007 1028
            this.show = false

+ 1 - 0
src/xt_pages/role/components/EditAdminInfo.vue Visa fil

@@ -217,6 +217,7 @@ export default {
217 217
                         modifyAdmin(this.form.id, this.form.name, this.form.user_type, this.form.user_title, this.form.role, this.form.intro).then(rs => {
218 218
                             this.loading = false
219 219
                             var resp = rs.data
220
+                            
220 221
                             if (resp.state === 1) {
221 222
                                 this.$store.dispatch('DidChangeAdmins')
222 223
                                 var _this = this

+ 52 - 5
src/xt_pages/stock/Dialog/goodInfoDailog.vue Visa fil

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-dialog width="854px"
2
+  <el-dialog width="870px"
3 3
              :title="titles"
4 4
              :visible.sync="visible"
5 5
              :close-on-click-modal="isClose"
@@ -131,6 +131,36 @@
131 131
               </el-checkbox-group>
132 132
             </el-form-item>
133 133
 
134
+            <el-form-item label="社保目录编码:" >
135
+               <el-input v-model="form.social_security_directory_code" style="width:180px"></el-input>
136
+            </el-form-item>
137
+
138
+            <el-form-item label="生产地类别:">
139
+              <el-select v-model="form.production_type" style="width:160px;" placeholder="请选择">
140
+                <el-option
141
+                  v-for="item in options"
142
+                  :key="item.value"
143
+                  :label="item.label"
144
+                  :value="item.value">
145
+                </el-option>
146
+              </el-select>
147
+            </el-form-item>
148
+
149
+          
150
+
151
+            <el-form-item label="特殊医用材料标志:">
152
+              <el-select v-model="form.special_medical " style="width:160px;" placeholder="请选择">
153
+                <el-option
154
+                  v-for="item in options"
155
+                  :key="item.value"
156
+                  :label="item.label"
157
+                  :value="item.value">
158
+                </el-option>
159
+              </el-select>
160
+            </el-form-item>
161
+
162
+            
163
+
134 164
            <el-form-item label="经销商 : " prop="manufacturer" style="width:100%">
135 165
              
136 166
                <el-select v-model="form.dealer" style="width:100%;" filterable placeholder="请选择">
@@ -259,6 +289,13 @@
259 289
           value: '2',
260 290
           label: '否'
261 291
         }],
292
+        optionsOne: [{
293
+          value: '1',
294
+          label: '国内'
295
+        }, {
296
+          value: '2',
297
+          label: '国外'
298
+        }],
262 299
         good_unit: '',
263 300
         isClose: false,
264 301
         good_status: [],
@@ -297,7 +334,10 @@
297 334
           is_statistics_work: '',
298 335
           sort: '',
299 336
           is_doctor_use: '',
300
-          good_number: ''
337
+          good_number: '',
338
+          social_security_directory_code:"",
339
+          production_type:"",
340
+          special_medical:"",
301 341
         },
302 342
 
303 343
         rules: {
@@ -324,8 +364,13 @@
324 364
             { required: true, message: '请输入零价', trigger: 'blur' }
325 365
           ], stock_warn_count: [
326 366
             { required: true, message: '请输入库存警戒', trigger: 'blur' }
367
+          ],social_security_directory_code:[
368
+            {required:true,message:"请填写社保目录编码",trigger:'blur'}
369
+          ],production_type:[
370
+            {required:true,message:"请填写生产地类别",trigger:"blur"}
371
+          ],special_medical:[
372
+            {required:true,message:"请填写特殊医院材料标志",trigger:"blur"}
327 373
           ]
328
-
329 374
         },
330 375
         dealer:[]
331 376
       }
@@ -422,7 +467,7 @@
422 467
         })
423 468
       },
424 469
       getValue: function() {
425
-        console.log("生产吃",this.form.manufacturer)
470
+        
426 471
         const form = {}
427 472
         form['specification_name'] = this.form.specification_name
428 473
         form['good_unit'] = this.form.good_unit
@@ -459,7 +504,9 @@
459 504
         form['agent'] = this.form.agent
460 505
         form['good_number'] = this.form.good_number
461 506
         form['good_status'] = this.good_status.join(',')
462
-
507
+        form['social_security_directory_code'] = this.form.social_security_directory_code
508
+        form['production_type'] = this.form.production_type
509
+        form['special_medical'] = this.form.special_medical
463 510
         return form
464 511
       }, changeSelected: function(val) {
465 512
         console.log(val)