Procházet zdrojové kódy

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

csx před 4 roky
rodič
revize
226edcc838

+ 18 - 0
src/api/project/project.js Zobrazit soubor

@@ -242,4 +242,22 @@ export function getAllProjectTeam(params){
242 242
      methods:"get",
243 243
      params:params
244 244
   })
245
+}
246
+
247
+export function getPojectListById(params){
248
+  
249
+  return request({
250
+    url:"/api/his/getprojectlistbyid",
251
+    methods:"get",
252
+    params:params 
253
+  })
254
+}
255
+
256
+export function getHisPatientHistory(params){
257
+  
258
+    return request({
259
+        url:"/api/his/gethispatienthistory",
260
+        methods:"get",
261
+        params:params
262
+    })
245 263
 }

+ 3 - 2
src/xt_pages/outpatientCharges/components/additionalCharges.vue Zobrazit soubor

@@ -39,8 +39,9 @@ export default {
39 39
                 name:''
40 40
             },
41 41
             tableData:[
42
-              {id:1,name:"zs",money:50},
43
-              {id:2,name:"ls",money:60}  
42
+              {id:1,name:"工本费",money:""},
43
+              {id:2,name:"挂号费",money:""},
44
+              {id:3,name:"诊疗费",money:""}  
44 45
             ],
45 46
             patient_id:0,
46 47
             chargeTable:[]

+ 32 - 4
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue Zobrazit soubor

@@ -5,25 +5,28 @@
5 5
         :visible.sync="visible"
6 6
         :before-close="_close"
7 7
     >
8
-        <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
8
+        <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" 
9
+        :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
10
+          @selection-change="handleSelectionChange">
9 11
             <el-table-column align="center" type="selection" width="40"></el-table-column>
10 12
             <el-table-column align="center" prop="name" label="名称" width="100">
11
-                <template slot-scope="scope">{{ scope.row.date }}</template>
13
+                <template slot-scope="scope">{{ scope.row.name }}</template>
12 14
             </el-table-column>
13 15
             <el-table-column align="center" prop="name" label="金额(元)">
14 16
                 <template slot-scope="scope">
15
-                    <el-input v-model="input" placeholder=""></el-input>
17
+                    <el-input v-model="scope.row.money" placeholder=""></el-input>
16 18
                 </template>
17 19
             </el-table-column>
18 20
         </el-table>
19 21
         <div slot="footer" class="dialog-footer">
20 22
             <el-button @click="hide">取 消</el-button>
21
-            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
23
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
22 24
         </div>
23 25
     </el-dialog>         
24 26
 </template>
25 27
 
26 28
 <script>
29
+ import { saveCharges } from "@/api/project/project"
27 30
 export default {
28 31
     data(){
29 32
         return{
@@ -31,6 +34,12 @@ export default {
31 34
             form:{
32 35
                 name:''
33 36
             },
37
+            tableData:[
38
+              {id:1,name:"工本费",money:""},
39
+              {id:2,name:"挂号费",money:""},
40
+              {id:3,name:"诊疗费",money:""}  
41
+            ],
42
+            chargeTable:[]
34 43
         }
35 44
     },
36 45
     methods:{
@@ -51,6 +60,25 @@ export default {
51 60
             // this.clear()
52 61
             this.visible = false
53 62
         },
63
+        handleSelectionChange(val){
64
+          console.log("val",val)
65
+          this.chargeTable = val
66
+        },
67
+        submitAction(){
68
+          var params = {
69
+             patient_id:this.patient_id,
70
+             medicineData:this.chargeTable
71
+           }
72
+           console.log("params",params)
73
+          saveCharges(params).then(response=>{
74
+             if(response.data.state == 1){
75
+               var additionalCharge =  response.data.data.additionalCharge
76
+               console.log("additionalchar",additionalCharge)
77
+               this.visible = false
78
+               this.$message.success("保存成功")
79
+             }
80
+          })      
81
+        }
54 82
     }
55 83
 }
56 84
 </script>

+ 128 - 41
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Zobrazit soubor

@@ -11,7 +11,7 @@
11 11
     <div class="backColor"></div>
12 12
     <div class="mainCenter">
13 13
       <div class="centerLeft">
14
-        <el-form :model="form" :rules="rules" ref="form" label-width="80px">
14
+        <el-form :model="form"  ref="form" label-width="80px">
15 15
           <el-form-item label="姓名:" prop="name">
16 16
             <el-input v-model="patientInfo.name" placeholder=""></el-input>
17 17
           </el-form-item>
@@ -28,7 +28,6 @@
28 28
               v-model="state1"
29 29
               :fetch-suggestions="querySearch"
30 30
               placeholder="请输入内容"
31
-              @select="handleSelect"
32 31
             ></el-autocomplete>
33 32
           </el-form-item>
34 33
           <el-form-item label="大病类别: " prop="name">
@@ -105,7 +104,7 @@
105 104
               </el-option>
106 105
             </el-select>
107 106
           </div>
108
-          <div style="height:84%;overflow-y: auto;margin-bottom: 60px;">
107
+          <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
109 108
             <el-tabs class="rightTabs" v-model="activeName">
110 109
               <el-tab-pane label="药品列表" name="1">
111 110
                 <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
@@ -117,12 +116,13 @@
117 116
                     <template slot-scope="scope">{{ scope.row.drug_name }}</template>
118 117
                   </el-table-column>
119 118
                   <el-table-column align="center" label="规格" width="60">
120
-                    <template slot-scope="scope">{{ scope.row.drug_spec }}{{scope.row.min_unit}}</template>
119
+                    <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
121 120
                   </el-table-column>
122 121
                   <el-table-column align="center" label="单价" width="40">
123 122
                     <template slot-scope="scope">{{ scope.row.retail_price }}</template>
124 123
                   </el-table-column>
125 124
                 </el-table>
125
+
126 126
               </el-tab-pane>
127 127
               <el-tab-pane label="医嘱模板" name="2">
128 128
                 <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
@@ -132,10 +132,53 @@
132 132
                   <el-table-column align="center" prop="name" label="名称">
133 133
                     <template slot-scope="scope">{{}}</template>
134 134
                   </el-table-column>
135
+                  <el-table-column align="center" label="规格" width="60">
136
+                    <template slot-scope="scope">33</template>
137
+                  </el-table-column>
138
+                  <el-table-column align="center" label="库存" width="60">
139
+                    <template slot-scope="scope">22</template>
140
+                  </el-table-column>
141
+                  <el-table-column align="center" label="单价" width="40">
142
+                    <template slot-scope="scope">12</template>
143
+                  </el-table-column>
144
+                </el-table>
145
+              </el-tab-pane>
146
+            </el-tabs>
147
+          </div>
148
+
149
+         <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
150
+            <el-tabs class="rightTabs" v-model="activeName">
151
+              <el-tab-pane label="项目列表" name="1">
152
+                 <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
153
+                          :row-style="{ color: '#303133' }"
154
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
155
+                          highlight-current-row >
156
+                  <el-table-column align="center" type="selection" width="40"></el-table-column>
157
+                  <el-table-column align="center" prop="name" label="名称">
158
+                    <template slot-scope="scope">{{ scope.row.project_name }}</template>
159
+                  </el-table-column>
160
+                  <el-table-column align="center" label="规格" width="60">
161
+                    <template slot-scope="scope">{{ scope.row.single_dose }}</template>
162
+                  </el-table-column>
163
+                  <el-table-column align="center" label="单价" width="40">
164
+                    <template slot-scope="scope">{{ scope.row.price }}</template>
165
+                  </el-table-column>
166
+                </el-table>
167
+              </el-tab-pane>
168
+              <el-tab-pane label="项目组套" name="2">
169
+                <el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
170
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
171
+                          highlight-current-row
172
+                         @select='selectTeam'>
173
+                  <el-table-column align="center" type="selection" width="40"></el-table-column>
174
+                  <el-table-column align="center" prop="name" label="名称">
175
+                    <template slot-scope="scope">{{scope.row.project_team}}</template>
176
+                  </el-table-column>
135 177
                 </el-table>
136 178
               </el-tab-pane>
137 179
             </el-tabs>
138 180
           </div>
181
+
139 182
           <div class="comfirmBox">
140 183
             <div>
141 184
               <span>药品类型:</span>
@@ -145,7 +188,7 @@
145 188
                   value="0">
146 189
                 </el-option>
147 190
                 <el-option
148
-                  v-for="item,index in getDictionaryDataConfig('system','drug_type')"
191
+                  v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
149 192
                   :key="index"
150 193
                   :label="item.name"
151 194
                   :value="item.id">
@@ -171,16 +214,14 @@
171 214
   import selectTemplate from './selectTemplate'
172 215
   import saveTemplate from './saveTemplate'
173 216
   import additionalCharges from './additionalCharges'
174
-  import { getHisProject,addProjectTeam } from '@/api/project/project'
217
+  import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
175 218
   // import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
176 219
 
177 220
   export default {
178 221
     props: {
179 222
       patientInfo: Object,
180 223
       hisPatientInfo: Object,
181
-      prescriptions: Array,
182
-      drugways:Array,
183
-      efs:Array,
224
+      prescriptions: Array
184 225
     },
185 226
     components: {
186 227
       selectTemplate,
@@ -223,7 +264,11 @@
223 264
         options:[],
224 265
         tabProject:[],
225 266
         strids:"",
226
-
267
+        showOne:true,
268
+        showTwo:false,
269
+        tableData:[],
270
+        tabPrjectTeam:[],
271
+        teamList:[],
227 272
       }
228 273
     },
229 274
     methods: {
@@ -268,6 +313,7 @@
268 313
                 this.customTabIndex = 1
269 314
               }
270 315
               if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
316
+               
271 317
                 this.customTabIndex = 2
272 318
               }
273 319
 
@@ -294,10 +340,7 @@
294 340
       },
295 341
       open(index) {
296 342
         if (index == 1) {
297
-          console.log(this.prescriptions)
298
-
299
-
300
-          // localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
343
+          localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
301 344
           this.$message({ message: '保存成功', type: 'success' })
302 345
         } else if (index == 2) {
303 346
           this.$router.push('/outpatientDoctorStation/print')
@@ -346,19 +389,26 @@
346 389
           this.$nextTick(() => {
347 390
             this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
348 391
           });
392
+         this.customTabIndex = 1
349 393
         }
350 394
         if(index == 2){
351 395
           this.showTwo = true
352 396
           this.showOne = false
397
+           this.$nextTick(() => {
398
+            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
399
+          });
400
+         this.customTabIndex = 2
353 401
         }
354 402
         this.rightTab = index
355 403
 
356 404
 
357 405
         //用来区分处方属于项目还是药品
358 406
         if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
407
+        
359 408
           this.customTabIndex = 1
360 409
         }
361 410
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
411
+         
362 412
           this.customTabIndex = 2
363 413
         }
364 414
         if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
@@ -378,42 +428,23 @@
378 428
       },
379 429
       comfirm() {
380 430
         this.preDrugs = this.curDrugs
381
-        console.log(this.editableTabsValue)
431
+        
382 432
         for (let i = 0; i < this.prescriptions.length; i++){
433
+          console.log("名称",this.prescriptions[i].name)
434
+          console.log("名称2",this.editableTabsValue)
383 435
           if(this.prescriptions[i].name == this.editableTabsValue){
384 436
             this.prescriptions[i].advices = this.preDrugs
437
+            this.prescriptions[i].project = this.teamList
385 438
             this.curPrescriptions = this.prescriptions[i]
386 439
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
387 440
           }
388 441
         }
389
-
390
-        for (let i = 0; i < this.curPrescriptions.advices.length; i++){
391
-          this.curPrescriptions.advices[i]['remark'] = ""
392
-
393
-        }
394
-        // console.log(this.prescriptions)
442
+        console.log("222222",this.prescriptions)
395 443
       },
396 444
       selectChange(row){
397
-        // console.log("row222",row)
398
-        var ids = []
399
-        for(let i=0;i<row.length;i++){
400
-          ids.push(row[i].id)
401
-        }
402
-        console.log("ids",ids)
403
-        var strids = ids.join(",")
404
-        this.strids = strids
445
+        this.teamList = row
405 446
       },
406
-      addProjectTeam(){
407
-        var params = {
408
-          strids:this.strids
409
-        }
410
-        addProjectTeam(params).then(response=>{
411
-          if(response.data.state == 1){
412
-            var team = response.data.data.team
413
-            console.log("team",team)
414
-          }
415
-        })
416
-      }, getlist(){
447
+      getlist(){
417 448
         getHisProject().then(response=>{
418 449
           if(response.data.state == 1){
419 450
             var project = response.data.data.project
@@ -422,10 +453,66 @@
422 453
           }
423 454
         })
424 455
       },
425
-    },created(){
456
+      querySearch(){
457
+
458
+      },
459
+      getAllProjectTeam(){
460
+        getAllProjectTeam().then(response=>{
461
+          if(response.data.state == 1){
462
+            var team =  response.data.data.team
463
+            console.log("team",team)
464
+            this.tabPrjectTeam = team
465
+          }
466
+        })  
467
+      },
468
+      selectTeam(row){
469
+          var arr = []
470
+          for(let i=0;i<row.length;i++){
471
+             arr.push(row[i].project_id)
472
+          }
473
+        var ids =  arr.join(",")
474
+        console.log("ids",ids)
475
+        var strArr = ids.split(",")
476
+        var res = [];//接收不重复的数据
477
+      
478
+        for (var i = 0; i<strArr.length; i++){
479
+        var flag = true;
480
+       
481
+        for (var j = 0; j<i; j++){
482
+          if(strArr[i]===strArr[j]){
483
+            flag = false;
484
+            break;
485
+           }
486
+         }
487
+        if(flag){
488
+          res.push(strArr[i])
489
+         }
490
+        }
491
+        console.log("res",res)
492
+      
493
+        var idstr =  res.join(",")
494
+        console.log("idstr",idstr)
495
+        const params = {
496
+           project_id:idstr
497
+        }
498
+        getPojectListById(params).then(response=>{
499
+           if(response.data.state == 1){
500
+             var project =  response.data.data.project
501
+             console.log("project222",project)
502
+             this.teamList = []
503
+             this.teamList = project
504
+           }
505
+        })
506
+      }
507
+    },
508
+    created(){
426 509
       this.getInitData()
427 510
       //获取所有项目
428 511
       this.getlist()
512
+      //获取所以项目组套
513
+      this.getAllProjectTeam()
514
+
515
+   
429 516
     }
430 517
   }
431 518
 </script>

+ 47 - 70
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Zobrazit soubor

@@ -62,100 +62,58 @@
62 62
         </template>
63 63
       </el-table-column>
64 64
     </el-table>
65
-    <el-table v-if="activeType  == 2" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
65
+
66
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
66 67
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
67 68
       <el-table-column align="center" type="selection" width="40"></el-table-column>
68
-      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
69
-      <el-table-column align="center" prop="name" label="名称">
70
-        <template slot-scope="scope">{{ scope.row.name }}</template>
69
+      <el-table-column align="center" type="index" width="40" label="序号">
70
+         <template slot-scope="scope">
71
+            {{scope.$index + 1}}
72
+         </template>
71 73
       </el-table-column>
72
-      <el-table-column align="center" prop="name" width="50" label="组套">
74
+      <el-table-column align="center" prop="project_name" label="名称">
75
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
76
+      </el-table-column>
77
+      <el-table-column align="center" prop="statistical_classification" width="50" label="组">
73 78
         <template slot-scope="scope">
74
-          <!-- <el-select v-model="value" placeholder="">
75
-              <el-option
76
-              v-for="item in newoptions"
77
-              :key="item.value"
78
-              :label="item.label"
79
-              :value="item.value">
80
-              </el-option>
81
-          </el-select> -->
82
-          <el-input v-model="input" placeholder=""></el-input>
79
+          {{getGroup(scope.row.statistical_classification)}}
83 80
         </template>
84 81
       </el-table-column>
85
-      <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
82
+      <el-table-column align="center" prop="single_dose" width="130" :label="'单次\n用量'">
86 83
         <template slot-scope="scope">
87
-          <el-input v-model="input" placeholder=""></el-input>
84
+          <el-input v-model="scope.row.single_dose" placeholder=""></el-input>
88 85
         </template>
89 86
       </el-table-column>
90
-      <el-table-column align="center" prop="name" width="50" label="用法">
87
+      <el-table-column align="center" prop="delivery_way" width="130" label="用法">
91 88
         <template slot-scope="scope">
92
-          <!-- <el-select v-model="value" placeholder="">
93
-              <el-option
94
-              v-for="item in newoptions"
95
-              :key="item.value"
96
-              :label="item.label"
97
-              :value="item.value">
98
-              </el-option>
99
-          </el-select> -->
100
-          <el-input v-model="input" placeholder=""></el-input>
89
+          <el-input v-model="scope.row.delivery_way" placeholder=""></el-input>
101 90
         </template>
102 91
       </el-table-column>
103
-      <el-table-column align="center" prop="name" width="50" label="频率">
92
+      <el-table-column align="center" prop="execution_frequency" width="130" label="频率">
104 93
         <template slot-scope="scope">
105
-          <!-- <el-select v-model="value" placeholder="">
106
-              <el-option
107
-              v-for="item in newoptions"
108
-              :key="item.value"
109
-              :label="item.label"
110
-              :value="item.value">
111
-              </el-option>
112
-          </el-select> -->
113
-          <el-input v-model="input" placeholder=""></el-input>
94
+          <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
114 95
         </template>
115 96
       </el-table-column>
116
-      <el-table-column align="center" prop="name" width="50" label="天数">
97
+      <el-table-column align="center" prop="number_days" width="130" label="天数">
117 98
         <template slot-scope="scope">
118
-          <!-- <el-select v-model="value" placeholder="">
119
-              <el-option
120
-              v-for="item in newoptions"
121
-              :key="item.value"
122
-              :label="item.label"
123
-              :value="item.value">
124
-              </el-option>
125
-          </el-select> -->
126
-          <el-input v-model="input" placeholder=""></el-input>
99
+          <el-input v-model="scope.row.number_days" placeholder=""></el-input>
127 100
         </template>
128 101
       </el-table-column>
129
-      <el-table-column align="center" prop="name" width="100" label="总量">
102
+      <el-table-column align="center" prop="total" width="100" label="总量">
130 103
         <template slot-scope="scope">
131 104
           <div style="display:flex;">
132
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
133
-            <!-- <el-select v-model="value" style="width:50%" placeholder="">
134
-                <el-option
135
-                v-for="item in newoptions"
136
-                :key="item.value"
137
-                :label="item.label"
138
-                :value="item.value">
139
-                </el-option>
140
-            </el-select> -->
141
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
105
+            <el-input v-model="scope.row.total" style="width:50" placeholder=""></el-input>
142 106
           </div>
143 107
         </template>
144 108
       </el-table-column>
145 109
       <el-table-column align="center" prop="name" width="50" label="单价">
146 110
         <template slot-scope="scope">
147
-          <el-input v-model="scope.row.unitPrice" placeholder=""></el-input>
111
+          <el-input v-model="scope.row.price" placeholder=""></el-input>
148 112
         </template>
149 113
       </el-table-column>
150
-      <el-table-column align="center" prop="name" width="50" label="备注">
114
+      <el-table-column align="center" prop="name" width="120" label="备注">
151 115
         <template slot-scope="scope">
152
-          <!-- <el-autocomplete
153
-          class="inline-input"
154
-          v-model="state1"
155
-          :fetch-suggestions="querySearch"
156
-          placeholder=""
157
-          @select="handleSelect"
158
-          ></el-autocomplete> -->
116
+           <el-input v-model="scope.row.remark"></el-input>
159 117
         </template>
160 118
       </el-table-column>
161 119
       <el-table-column align="center" width="40" prop="name" label="操作">
@@ -165,28 +123,32 @@
165 123
       </el-table-column>
166 124
     </el-table>
167 125
 
126
+
127
+
128
+
168 129
   </div>
169 130
 </template>
170 131
 
171 132
 <script>
133
+  import { getDictionaryDataConfig} from "@/utils/data";
172 134
   import { getInitData } from '@/api/his/his'
173 135
 
174 136
   export default {
175 137
     props: {
176 138
       preDrugs: Array,
177
-      activeType: String,
139
+      activeType: Number,
178 140
       prescription:{
179 141
         type:Object,
180 142
         default: function () {
181 143
           return {
182 144
             name:"",
183 145
             advices:[],
146
+            project:[],
184 147
             projects:[],
185 148
             drugways:[],
186 149
             efs:[],
187 150
           };
188 151
         }
189
-
190 152
       },
191 153
     },
192 154
     data() {
@@ -210,9 +172,10 @@
210 172
           label: '5'
211 173
         }],
212 174
         value: '1',
213
-        input: 1
175
+        input: 1,
214 176
       }
215
-    },methods:{
177
+    },
178
+   methods:{
216 179
       getInitData(){
217 180
         getInitData().then(response => {
218 181
           if (response.data.state == 0) {
@@ -234,6 +197,20 @@
234 197
       setNewData:function(data){
235 198
 
236 199
         // this.prescription.advices = data.advices
200
+      },
201
+      getDictionaryDataConfig(module, filed_name) {
202
+        return getDictionaryDataConfig(module, filed_name)
203
+      },
204
+      getGroup(id){
205
+         var name = ""
206
+          var statistics_category =  getDictionaryDataConfig('system','statistics_category')
207
+          console.log("2235",statistics_category)
208
+          for(let i=0;i<statistics_category.length;i++){
209
+             if(id == statistics_category[i].id){
210
+                 name = statistics_category[i].name
211
+             }
212
+          }
213
+         return name
237 214
       }
238 215
     },mounted(){
239 216
       this.getInitData()

+ 3 - 1
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue Zobrazit soubor

@@ -6,7 +6,7 @@
6 6
         :before-close="_close"
7 7
     >
8 8
         <div>
9
-            <el-form :model="form" :rules="rules" class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form"  class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10 10
                 <el-form-item label="创建人 : " style="width: 100%;margin-bottom:0;">
11 11
                     医生
12 12
                 </el-form-item>
@@ -59,6 +59,8 @@ export default {
59 59
             form:{
60 60
                 name:''
61 61
             },
62
+            radio:"1",
63
+            options:[]
62 64
         }
63 65
     },
64 66
     methods:{

+ 12 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Zobrazit soubor

@@ -25,7 +25,10 @@
25 25
         <div style="flex:1;overflow-y:auto;">
26 26
           <el-table :data="patientTableData" @row-click='choosePatient' border style="width: 100%;"
27 27
                     :row-style="{ color: '#303133' }"
28
-                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
28
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
29
+                     highlight-current-row
30
+                    ref="tab"
31
+                    @current-change="changePatient">
29 32
             <el-table-column align="center" prop="name" label="患者姓名">
30 33
               <template slot-scope="scope">{{ scope.row.patients.name }}</template>
31 34
             </el-table-column>
@@ -88,7 +91,8 @@
88 91
         patientTableData: [{}],
89 92
         patientInfo: {},
90 93
         hisPatientInfo: {},
91
-        case_history: {}
94
+        case_history: {},
95
+        patient_id:0,
92 96
       }
93 97
     },
94 98
     methods: {
@@ -113,7 +117,7 @@
113 117
             return false
114 118
           } else {
115 119
             this.patientTableData = response.data.data.list
116
-
120
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
117 121
             let cal_one = 0
118 122
             let cal_two = 0
119 123
             for (let i = 0; i < response.data.data.list.length; i++) {
@@ -194,7 +198,7 @@
194 198
               }
195 199
               this.prescriptions.push(obj)
196 200
             }
197
-            console.log()
201
+            console.log("中国22222222",this.prescriptions)
198 202
             this.$refs.prescriptions.setData(this.prescriptions)
199 203
           }
200 204
         })
@@ -209,6 +213,10 @@
209 213
         //     psn_name:"杨美英",
210 214
         //     age:60.7
211 215
         // }
216
+      },
217
+      changePatient(val){
218
+        console.log("患者val",val)
219
+        this.patient_id = val.id
212 220
       }
213 221
     }, created() {
214 222
       var nowDate = new Date()

+ 96 - 45
src/xt_pages/outpatientRegistration/registrationHistory.vue Zobrazit soubor

@@ -5,9 +5,9 @@
5 5
         </div>
6 6
         <div class="app-container">
7 7
             <div class="cell clearfix">
8
-                <el-input style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
8
+                <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/>
9 9
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
10
-                <el-date-picker
10
+                <!-- <el-date-picker
11 11
                 v-model="value1"
12 12
                 @change="changeTime"
13 13
                 style="margin-right:10px;"
@@ -15,16 +15,26 @@
15 15
                 range-separator="-"
16 16
                 start-placeholder="开始日期"
17 17
                 end-placeholder="结束日期">
18
+                </el-date-picker> -->
19
+                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
20
+                    placeholder="选择时间" v-model="start_time" style="width:200px"
21
+                    @change="changeStart"
22
+                 >
23
+                </el-date-picker> -
24
+                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
25
+                    placeholder="选择时间" v-model="end_time" style="width:200px"
26
+                    @change="changeEnd"
27
+                 >
18 28
                 </el-date-picker>
19
-                <!-- <label class="title"><span class="name">挂号类型</span> : </label>
20
-                <el-select v-model="value" placeholder="请选择" style="width:150px;">
29
+                <label class="title"><span class="name">挂号类型</span> : </label>
30
+                <el-select v-model="register_type" placeholder="请选择" style="width:150px;" @change="changeRegister">
21 31
                     <el-option
22
-                    v-for="item in options"
32
+                    v-for="item in register"
23 33
                     :key="item.value"
24 34
                     :label="item.label"
25 35
                     :value="item.value">
26 36
                     </el-option>
27
-                </el-select> -->
37
+                </el-select>
28 38
             </div>
29 39
             <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
30 40
                 <el-table-column align="center" type="index" label="序号" width="60">
@@ -97,6 +107,7 @@
97 107
 <script>
98 108
 const moment = require('moment')
99 109
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
110
+import { getHisPatientHistory } from "@/api/project/project"
100 111
 export default {
101 112
     components:{
102 113
         BreadCrumb
@@ -107,56 +118,96 @@ export default {
107 118
                 { path: false, name: '门诊挂号' },
108 119
                 { path: false, name: '挂号历史' }
109 120
             ],
121
+            register_type:0,
110 122
             search_input:'',
111 123
             value1:'',
112
-            tableData: []
124
+            tableData: [],
125
+            register: [
126
+                {value: 0,label:"全部"},
127
+                {value: 1,label: '普通'},
128
+                {value: 2,label: "主治"},
129
+                {value: 3,label: "主任"},
130
+                {value: 4,label: "免收诊金"},
131
+                {value: 5,label: "专家"}
132
+            ],
133
+            start_time:"",
134
+            end_time:"",
135
+            limit:20,
136
+            page:1,
113 137
         }
114 138
     },
115 139
     created(){
116
-        let a = JSON.parse(localStorage.getItem("temp"))
117
-        let arr = []
118
-        a.map(item => {
119
-            if(item.org_id == this.$store.getters.xt_user.org_id){
120
-                item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
121
-                arr.push(item)
122
-            }
140
+        // let a = JSON.parse(localStorage.getItem("temp"))
141
+        // let arr = []
142
+        // a.map(item => {
143
+        //     if(item.org_id == this.$store.getters.xt_user.org_id){
144
+        //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
145
+        //         arr.push(item)
146
+        //     }
123 147
             
124
-        })
125
-        console.log('aaaaaaaaaaaaaa',a)
126
-        this.tableData = arr
148
+        // })
149
+        // this.tableData = arr
150
+       this.getlist()
127 151
     },
128 152
     methods:{
129
-        searchAction(){
130
-            let arr = this.tableData
131
-            let a = []
132
-            arr.map(item => {
133
-                if(item.name.indexOf(this.search_input) > -1 && item.org_id == this.$store.getters.xt_user.org_id){
134
-                    a.push(item)
135
-                }
136
-            })
137
-            this.tableData = a
153
+        // searchAction(){
154
+        //     let arr = this.tableData
155
+        //     let a = []
156
+        //     arr.map(item => {
157
+        //         if(item.name.indexOf(this.search_input) > -1 && item.org_id == this.$store.getters.xt_user.org_id){
158
+        //             a.push(item)
159
+        //         }
160
+        //     })
161
+        //     this.tableData = a
162
+        // },
163
+        // changeTime(val){
164
+        //     let arr = JSON.parse(localStorage.getItem("temp"))
165
+        //     arr.map(item => {
166
+        //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
167
+        //     })
168
+        //     this.tableData = arr
169
+        //     console.log(new Date(val[0]).getTime() / 1000)
170
+        //     console.log(new Date(val[1]).getTime() / 1000)
171
+        //     let arr1 = this.tableData
172
+        //     let a = []
173
+        //     arr1.map(item => {
174
+        //      if(new Date(item.create_time).getTime() / 1000 > new Date(val[0]).getTime() / 1000 && new Date(item.create_time).getTime() / 1000 < new Date(val[1]).getTime() / 1000 && item.org_id == this.$store.getters.xt_user.org_id){
175
+        //         a.push(item)
176
+        //       }
177
+        //     })
178
+        //     this.tableData = a
179
+        // },
180
+        changeStart(val){
181
+          this.start_time = val
138 182
         },
139
-        changeTime(val){
140
-            let arr = JSON.parse(localStorage.getItem("temp"))
141
-            arr.map(item => {
142
-                item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
143
-            })
144
-            this.tableData = arr
145
-            console.log(new Date(val[0]).getTime() / 1000)
146
-            console.log(new Date(val[1]).getTime() / 1000)
147
-            let arr1 = this.tableData
148
-            let a = []
149
-            arr1.map(item => {
150
-                // if(new Date(val[0]).getTime() / 1000){
151
-                //     a.push(item)
152
-                // }
153
-                if(new Date(item.create_time).getTime() / 1000 > new Date(val[0]).getTime() / 1000 && new Date(item.create_time).getTime() / 1000 < new Date(val[1]).getTime() / 1000 && item.org_id == this.$store.getters.xt_user.org_id){
154
-                    a.push(item)
155
-                }
156
-            })
157
-            this.tableData = a
183
+        changeEnd(val){
184
+           this.end_time = val
185
+        },
186
+        changeRegister(val){
187
+
188
+        },
189
+        getlist(){
190
+            var params = {
191
+               keyword:this.search_input,
192
+               start_time:this.start_time,
193
+               end_time:this.end_time,
194
+               register_type:this.register_type,
195
+               limit:this.limit,
196
+               page:this.page,
197
+            }
198
+           console.log("params",params)
199
+          getHisPatientHistory(params).then(response=>{
200
+             if(response.data.state == 1){
201
+                var history = response.data.data.history
202
+                console.log("history",history)
203
+                var total =  response.data.data.total
204
+                console.log("total",total)
205
+             }
206
+          })
207
+ 
158 208
         }
159 209
 
210
+
160 211
     }
161 212
 }
162 213
 </script>