Browse Source

HIS 系统提交

XMLWAN 4 years ago
parent
commit
eba32ef0c3

+ 91 - 6
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

11
         <div class="backColor"></div>
11
         <div class="backColor"></div>
12
         <div class="mainCenter">
12
         <div class="mainCenter">
13
             <div class="centerLeft">
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
                     <el-form-item label="姓名:" prop="name">
15
                     <el-form-item label="姓名:" prop="name">
16
                         <el-input v-model="patientInfo.name" placeholder=""></el-input>
16
                         <el-input v-model="patientInfo.name" placeholder=""></el-input>
17
                     </el-form-item>
17
                     </el-form-item>
104
                     <div style="height:84%;overflow-y: auto;margin-bottom: 60px;">
104
                     <div style="height:84%;overflow-y: auto;margin-bottom: 60px;">
105
                         <el-tabs class="rightTabs" v-model="activeName">
105
                         <el-tabs class="rightTabs" v-model="activeName">
106
                             <el-tab-pane label="药品列表" name="1">
106
                             <el-tab-pane label="药品列表" name="1">
107
-                                <el-table :data="drugTableData" border @select='selectDrugs' style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
107
+                                <el-table :data="drugTableData" border @select='selectDrugs' style="width: 100%;" :row-style="{ color: '#303133' }" 
108
+                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
109
+                                v-show="showOne"
110
+                                >
108
                                     <el-table-column align="center" type="selection" width="40"></el-table-column>
111
                                     <el-table-column align="center" type="selection" width="40"></el-table-column>
109
                                     <el-table-column align="center" prop="name" label="名称">
112
                                     <el-table-column align="center" prop="name" label="名称">
110
                                         <template slot-scope="scope">{{ scope.row.name }}</template>
113
                                         <template slot-scope="scope">{{ scope.row.name }}</template>
119
                                         <template slot-scope="scope">{{ scope.row.unitPrice }}</template>
122
                                         <template slot-scope="scope">{{ scope.row.unitPrice }}</template>
120
                                     </el-table-column>
123
                                     </el-table-column>
121
                                 </el-table>
124
                                 </el-table>
125
+
126
+
127
+                                <el-table :data="tabProject" border @select='selectDrugs' style="width: 100%;" :row-style="{ color: '#303133' }" 
128
+                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
129
+                                 v-show="showTwo"
130
+                                 @select-all="changeTableProjectData"
131
+                                 @selection-change="selectChange">
132
+                                    <el-table-column align="center" type="selection" width="40"></el-table-column>
133
+                                    <el-table-column align="center" prop="name" label="名称">
134
+                                        <template slot-scope="scope">{{ scope.row.project_name }}</template>
135
+                                    </el-table-column>     
136
+                                    <el-table-column align="center" label="单价" width="40">
137
+                                        <template slot-scope="scope">{{ scope.row.price }}</template>
138
+                                    </el-table-column>
139
+                                    <el-table-column align="center" label="备注" width="60">
140
+                                        <template slot-scope="scope">{{ scope.row.remark }}</template>
141
+                                    </el-table-column>
142
+                                </el-table>
122
                             </el-tab-pane>
143
                             </el-tab-pane>
123
                             <el-tab-pane label="医嘱模板" name="2">
144
                             <el-tab-pane label="医嘱模板" name="2">
124
                                 <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>
145
                                 <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>
151
                                 </el-option>
172
                                 </el-option>
152
                             </el-select>
173
                             </el-select>
153
                         </div>
174
                         </div>
154
-                        <el-button type="primary" size="small" @click="comfirm">确定添加</el-button>
175
+                        <el-button type="primary" size="small" @click="comfirm" v-show="showOne">确定添加</el-button>
176
+                        <el-button type="primary" size="small" @click="addProjectTeam" v-show="showTwo">确定添加22</el-button>
155
                     </div>
177
                     </div>
156
                 </template>
178
                 </template>
157
             </div>
179
             </div>
168
 import selectTemplate from './selectTemplate'
190
 import selectTemplate from './selectTemplate'
169
 import saveTemplate from './saveTemplate'
191
 import saveTemplate from './saveTemplate'
170
 import additionalCharges from './additionalCharges'
192
 import additionalCharges from './additionalCharges'
193
+import { getHisProject,addProjectTeam } from '@/api/project/project'
171
 import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
194
 import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
172
 
195
 
173
 export default {
196
 export default {
187
             form:{
210
             form:{
188
                 name:''
211
                 name:''
189
             },
212
             },
213
+            tableData: [],
190
             editableTabsValue: '1',
214
             editableTabsValue: '1',
191
             editableTabs: [{
215
             editableTabs: [{
192
             title: '处方1',
216
             title: '处方1',
204
             doctorValue:'',
228
             doctorValue:'',
205
             departmentOptions:[],
229
             departmentOptions:[],
206
             departmentValue:'',
230
             departmentValue:'',
207
-            total:0
231
+            total:0,
232
+            showOne:true,
233
+            showTwo:false,
234
+            state1:"",
235
+            value:"",
236
+            options:[],
237
+            tabProject:[],
238
+            strids:""
208
         }
239
         }
209
     },
240
     },
210
     methods:{
241
     methods:{
254
             this.prescriptions = tabs.filter(tab => tab.name !== targetName);
285
             this.prescriptions = tabs.filter(tab => tab.name !== targetName);
255
         },
286
         },
256
         clickTab(index){
287
         clickTab(index){
257
-            this.rightTab = index
288
+          if(index == 1){
289
+             this.showOne = true
290
+             this.showTwo = false
291
+          }
292
+          if(index == 2){
293
+            this.showTwo = true
294
+            this.showOne = false
295
+          }
296
+          this.rightTab = index
258
         },
297
         },
259
         addCharges(){
298
         addCharges(){
260
             this.$refs.additionalCharges.show()
299
             this.$refs.additionalCharges.show()
261
         },
300
         },
262
         selectDrugs(selection, row){
301
         selectDrugs(selection, row){
302
+            console.log("row",row)
263
             this.curDrugs = selection
303
             this.curDrugs = selection
264
         },
304
         },
265
         comfirm(){
305
         comfirm(){
267
             this.preDrugs.map(item => {
307
             this.preDrugs.map(item => {
268
                 this.total += item.unitPrice
308
                 this.total += item.unitPrice
269
             })
309
             })
310
+            
311
+        },
312
+       getlist(){
313
+         getHisProject().then(response=>{
314
+            if(response.data.state == 1){
315
+              var project = response.data.data.project
316
+              console.log("project",project)
317
+              this.tabProject = project
318
+            }
319
+         })  
320
+       },
321
+       querySearch(){
322
+
323
+       },
324
+       handleSelect(){
325
+
326
+       },
327
+       changeTableProjectData(row){
328
+         console.log("row",row)
329
+       },
330
+       selectChange(row){
331
+         console.log("row222",row)
332
+         var ids = []
333
+         for(let i=0;i<row.length;i++){
334
+           ids.push(row[i].id)
335
+         }
336
+         console.log("ids",ids)
337
+         var strids = ids.join(",")
338
+         this.strids = strids
339
+       },
340
+       addProjectTeam(){
341
+           var params = {
342
+              strids:this.strids
343
+           }
344
+         addProjectTeam(params).then(response=>{
345
+           if(response.data.state == 1){
346
+             var team = response.data.data.team
347
+             console.log("team",team)
348
+           }
349
+         })  
350
+       }
351
+    },
352
+    created(){
353
+      //获取所有项目
354
+      this.getlist()  
270
 
355
 
271
         }
356
         }
272
     }
357
     }
273
-}
358
+
274
 </script>
359
 </script>
275
 
360
 
276
 <style lang="scss" scoped>
361
 <style lang="scss" scoped>