See999 4 years ago
parent
commit
c01d123ee5

+ 8 - 0
src/router/modules/integration.js View File

31
     meta: {
31
     meta: {
32
       title: '质控集成'
32
       title: '质控集成'
33
     }
33
     }
34
+  },
35
+  {
36
+    path: '/data/medicalInsurance',
37
+    component: () => import('@/xt_pages/integration/medicalInsurance'),
38
+    name: '医保绑定',
39
+    meta: {
40
+      title: '医保绑定'
41
+    }
34
   }
42
   }
35
 
43
 
36
   ]
44
   ]

+ 81 - 0
src/xt_pages/integration/medicalInsurance.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container medicalInsurance">
7
+        <p class="medicalTitle">绑定医疗机构编码</p>
8
+        <p>绑定医疗机构编码后,如系统能正常使用医保扣费,则代表医疗机构编码正确</p>
9
+        <p>此后请勿修改该编码,否则导致系统异常</p>
10
+        <p>此版本医保系统只能在</p>
11
+        <el-form ref="form" :model="form" label-width="120px" label-position="left" style="margin-top:40px;">
12
+            <el-form-item label="医疗机构编码:">
13
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
14
+            </el-form-item>
15
+            <el-form-item label="医疗机构名称:">
16
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
17
+            </el-form-item>
18
+            <el-form-item label="医疗机构VPN:">
19
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
20
+                <span style="margin-left:5px;">提示:如果没有VPN,则使用<span class="defaultVPN">系统默认VPN</span></span>
21
+            </el-form-item>
22
+        </el-form>
23
+        <el-button type="primary">绑定</el-button>
24
+        <el-form ref="form" :model="form" label-width="120px" label-position="left" style="margin-top:40px;">
25
+            <el-form-item label="电子医保卡ID:">
26
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
27
+            </el-form-item>
28
+            <el-form-item label="电子医保卡KEY:">
29
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
30
+            </el-form-item>
31
+            <el-form-item label="渠道号:">
32
+                <el-input v-model.trim="form.dbhost" maxlength="200" style="width :200px;"></el-input>
33
+            </el-form-item>
34
+        </el-form>
35
+        <el-button type="primary">绑定电子卡</el-button>
36
+        <p class="medicalTitle" style="margin-top:20px;">医疗绑定步骤</p>
37
+        <p>1.目前诊所云医保系统只支持广东深圳市区域</p>
38
+        <p>2.绑定医疗机构编码(该编码从深圳医保局申请所得)</p>
39
+        <p>3.系统设置-医师信息;为对应的员工填写成员编码(该编码则是医保局下发的操作员编码)</p>
40
+        <p>4.药品管理-药品信息维护;为需要医保报销的药品设置医保编码</p>
41
+        <p>5.系统设置-检测项目设置;为需要医保报销的检查项目设置医保编码</p>
42
+        <p>6.患者使用医保挂号;挂号成功后到开处方界面从挂号人员列表选择挂号患者,开处方收费即可</p>
43
+    </div>
44
+  </div>
45
+</template>
46
+
47
+
48
+<script>
49
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
50
+export default {
51
+    components:{
52
+        BreadCrumb
53
+    },
54
+    data(){
55
+        return{
56
+            crumbs: [
57
+                { path: false, name: '集成配置' },
58
+                { path: false, name: '医保绑定' }
59
+            ],
60
+            form:{}
61
+        }
62
+    }
63
+}
64
+</script>
65
+
66
+<style lang="scss" scoped>
67
+.medicalInsurance p{
68
+    line-height: 24px;
69
+}
70
+.medicalTitle{
71
+    font-size: 18px;
72
+    color:#409EFF;
73
+}
74
+.defaultVPN{
75
+    background: #409EFF;
76
+    padding: 2px 5px;
77
+    border-radius: 2px;
78
+    color:#fff;
79
+    margin-left:5px;
80
+}
81
+</style>

+ 170 - 176
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" 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="" readonly></el-input>
16
             <el-input v-model="patientInfo.name" placeholder="" readonly></el-input>
17
           </el-form-item>
17
           </el-form-item>
18
           <el-form-item label="证件号: " prop="name">
18
           <el-form-item label="证件号: " prop="name">
19
             <el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
19
             <el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
20
           </el-form-item>
20
           </el-form-item>
21
+          <el-form-item label="挂号类型: " prop="name">
22
+            <el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>
23
+          </el-form-item>
21
           <el-form-item label="挂号类型: " prop="name">
24
           <el-form-item label="挂号类型: " prop="name">
22
             <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
25
             <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
23
               <el-option
26
               <el-option
49
         </el-form>
52
         </el-form>
50
         <div class="tabsBox">
53
         <div class="tabsBox">
51
 
54
 
52
-          <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
55
+          <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
53
           <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
56
           <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
54
                    :before-leave="moreState" @tab-click="tabclickEvent">
57
                    :before-leave="moreState" @tab-click="tabclickEvent">
55
             <el-tab-pane
58
             <el-tab-pane
63
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
66
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
64
             </el-tab-pane>
67
             </el-tab-pane>
65
             <div class="RP">Rp</div>
68
             <div class="RP">Rp</div>
66
-            <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
67
-                                :activeType="customTabIndex"></prescription-table>
69
+            <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs" :activeType="customTabIndex"></prescription-table>
68
           </el-tabs>
70
           </el-tabs>
69
 
71
 
70
         </div>
72
         </div>
97
           <p :class="rightTab == 2 ? 'activeP' : ''" @click="clickTab(2)">项目</p>
99
           <p :class="rightTab == 2 ? 'activeP' : ''" @click="clickTab(2)">项目</p>
98
         </div>
100
         </div>
99
         <template>
101
         <template>
100
-          <!--<div style="margin-top:5px;">-->
101
-          <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
102
-          <!--<el-select style="float: right;width: 49%;" v-model="value" placeholder="">-->
103
-          <!--<el-option-->
104
-          <!--v-for="item in options"-->
105
-          <!--:key="item.value"-->
106
-          <!--:label="item.label"-->
107
-          <!--:value="item.value">-->
108
-          <!--</el-option>-->
109
-          <!--</el-select>-->
110
-          <!--</div>-->
102
+          <div style="margin-top:5px;">
103
+            <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
104
+            <el-select style="float: right;width: 49%;" v-model="value" placeholder="">
105
+              <el-option
106
+                v-for="item in options"
107
+                :key="item.value"
108
+                :label="item.label"
109
+                :value="item.value">
110
+              </el-option>
111
+            </el-select>
112
+          </div>
111
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
113
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
112
             <el-tabs class="rightTabs" v-model="activeName">
114
             <el-tabs class="rightTabs" v-model="activeName">
113
               <el-tab-pane label="药品列表" name="1">
115
               <el-tab-pane label="药品列表" name="1">
114
-                <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;"
116
+                <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
115
                           :row-style="{ color: '#303133' }"
117
                           :row-style="{ color: '#303133' }"
116
-                          @select-all="changeAllGoodInfoTableData"
117
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
118
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
118
                           highlight-current-row>
119
                           highlight-current-row>
119
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
120
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
130
 
131
 
131
               </el-tab-pane>
132
               </el-tab-pane>
132
               <el-tab-pane label="医嘱模板" name="2">
133
               <el-tab-pane label="医嘱模板" name="2">
133
-                <el-table ref="multipleTableTwo" :data="advices_template" border style="width: 100%;"
134
-                          :row-style="{ color: '#303133' }"
134
+                <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
135
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
135
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
136
                           highlight-current-row>
136
                           highlight-current-row>
137
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
137
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
152
             </el-tabs>
152
             </el-tabs>
153
           </div>
153
           </div>
154
 
154
 
155
-          <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
155
+         <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
156
             <el-tabs class="rightTabs" v-model="activeName">
156
             <el-tabs class="rightTabs" v-model="activeName">
157
               <el-tab-pane label="项目列表" name="1">
157
               <el-tab-pane label="项目列表" name="1">
158
-                <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
158
+                 <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
159
                           :row-style="{ color: '#303133' }"
159
                           :row-style="{ color: '#303133' }"
160
-                          @select-all="changeAllGoodInfoTableDataTwo"
161
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
160
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
162
-                          highlight-current-row>
161
+                          highlight-current-row >
163
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
162
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
164
                   <el-table-column align="center" prop="name" label="名称">
163
                   <el-table-column align="center" prop="name" label="名称">
165
                     <template slot-scope="scope">{{ scope.row.project_name }}</template>
164
                     <template slot-scope="scope">{{ scope.row.project_name }}</template>
176
                 <el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
175
                 <el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
177
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
176
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
178
                           highlight-current-row
177
                           highlight-current-row
179
-                          @select='selectTeam'>
178
+                         @select='selectTeam'>
180
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
179
                   <el-table-column align="center" type="selection" width="40"></el-table-column>
181
                   <el-table-column align="center" prop="name" label="名称">
180
                   <el-table-column align="center" prop="name" label="名称">
182
                     <template slot-scope="scope">{{scope.row.project_team}}</template>
181
                     <template slot-scope="scope">{{scope.row.project_team}}</template>
207
         </template>
206
         </template>
208
       </div>
207
       </div>
209
     </div>
208
     </div>
210
-    <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
211
-                       :patientInfo="patientInfo"></additionalCharges>
209
+    <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo" :patientInfo="patientInfo"></additionalCharges>
212
     <select-template ref='selectTemplate'></select-template>
210
     <select-template ref='selectTemplate'></select-template>
213
     <save-template ref='saveTemplate'></save-template>
211
     <save-template ref='saveTemplate'></save-template>
214
   </div>
212
   </div>
216
 
214
 
217
 
215
 
218
 <script>
216
 <script>
219
-  import { createHisPrescription, getInitData, getPatientInfo, getSchedulePatientList } from '@/api/his/his'
220
-  import { getDictionaryDataConfig } from '@/utils/data'
217
+  import { getPatientInfo, getSchedulePatientList, getInitData,createHisPrescription } from '@/api/his/his'
218
+  import { getDictionaryDataConfig} from "@/utils/data";
221
   import prescriptionTable from './prescriptionTable'
219
   import prescriptionTable from './prescriptionTable'
222
   import selectTemplate from './selectTemplate'
220
   import selectTemplate from './selectTemplate'
223
   import saveTemplate from './saveTemplate'
221
   import saveTemplate from './saveTemplate'
224
   import additionalCharges from './additionalCharges'
222
   import additionalCharges from './additionalCharges'
225
-  import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
223
+  import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
224
+  // import { getPatientInfo, getSchedulePatientList,createHisPrescription } from '@/api/his/his'
226
 
225
 
227
   export default {
226
   export default {
228
     props: {
227
     props: {
229
       patientInfo: Object,
228
       patientInfo: Object,
230
       hisPatientInfo: Object,
229
       hisPatientInfo: Object,
231
       prescriptions: Array,
230
       prescriptions: Array,
232
-      record_date: String,
233
-      other_sick:Array,
234
-      diagnoses:Array,
231
+      record_date:String,
235
     },
232
     },
236
     components: {
233
     components: {
237
       selectTemplate,
234
       selectTemplate,
241
     },
238
     },
242
     data() {
239
     data() {
243
       return {
240
       return {
244
-        value: '',
241
+        value:"",
245
         form: {
242
         form: {
246
           name: ''
243
           name: ''
247
         },
244
         },
248
-        drugs: [],
249
-        allDrugs: [],
250
-        advices_template: [],
245
+        drugs:[],
246
+        allDrugs:[],
247
+        advices_template:[],
251
 
248
 
252
         editableTabsValue: '处方1',
249
         editableTabsValue: '处方1',
253
         editableTabs: [{
250
         editableTabs: [{
255
           name: '1'
252
           name: '1'
256
         }],
253
         }],
257
         tabIndex: 1,
254
         tabIndex: 1,
258
-        currenet_inedx: 0,
255
+        currenet_inedx:0,
259
         rightTab: 1,
256
         rightTab: 1,
260
         activeName: '1',
257
         activeName: '1',
261
         curPrescriptions: this.prescriptions[0],
258
         curPrescriptions: this.prescriptions[0],
266
         doctorValue: '',
263
         doctorValue: '',
267
         departmentOptions: [],
264
         departmentOptions: [],
268
         departmentValue: '',
265
         departmentValue: '',
266
+        diagnoses: this.getDictionaryDataConfig('system','diagnose'),
267
+        other_sick:this.getDictionaryDataConfig('system','other_sick_history'),
269
         total: 0,
268
         total: 0,
270
-        state1: '',
271
-        state2: '',
272
-        customTabIndex: 1,
273
-        options: [],
274
-        tabProject: [],
275
-        strids: '',
276
-        showOne: true,
277
-        showTwo: false,
278
-        tableData: [],
279
-        tabPrjectTeam: [],
280
-        teamList: [],
281
-        doctors: [],
282
-        departMent: []
269
+        state1:"",
270
+        state2:"",
271
+        customTabIndex:1,
272
+        options:[],
273
+        tabProject:[],
274
+        strids:"",
275
+        showOne:true,
276
+        showTwo:false,
277
+        tableData:[],
278
+        tabPrjectTeam:[],
279
+        teamList:[],
280
+        doctors:[],
281
+        departMent:[]
283
       }
282
       }
284
-    }, mounted() {
285
-
286
     },
283
     },
287
     methods: {
284
     methods: {
288
-      createFilter(queryString) {
285
+      createFilter (queryString) {
289
         return (restaurant) => {
286
         return (restaurant) => {
290
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
287
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
291
         }
288
         }
292
       },
289
       },
293
 
290
 
294
-      querySearch(queryString, cb) {
291
+      querySearch (queryString, cb) {
295
         var restaurants = this.diagnoses
292
         var restaurants = this.diagnoses
296
         console.log(restaurants)
293
         console.log(restaurants)
297
         restaurants.map(item => {
294
         restaurants.map(item => {
301
         // 调用 callback 返回建议列表的数据
298
         // 调用 callback 返回建议列表的数据
302
         cb(results)
299
         cb(results)
303
       },
300
       },
304
-      querySearch2(queryString, cb) {
301
+      querySearch2 (queryString, cb) {
305
         var restaurants = this.other_sick
302
         var restaurants = this.other_sick
306
         restaurants.map(item => {
303
         restaurants.map(item => {
307
           item.value = item.name
304
           item.value = item.name
310
         // 调用 callback 返回建议列表的数据
307
         // 调用 callback 返回建议列表的数据
311
         cb(results)
308
         cb(results)
312
       },
309
       },
313
-      changeKind(val) {
310
+      changeKind(val){
314
         this.drugs = []
311
         this.drugs = []
315
 
312
 
316
-        if (val == 0) {
313
+        if(val == 0){
317
           this.drugs = this.allDrugs
314
           this.drugs = this.allDrugs
318
-        } else {
319
-          for (let i = 0; i < this.allDrugs.length; i++) {
320
-            if (this.allDrugs[i].drug_type == val) {
315
+        }else{
316
+          for (let i = 0; i < this.allDrugs.length; i++){
317
+            if (this.allDrugs[i].drug_type == val){
321
               this.drugs.push(this.allDrugs[i])
318
               this.drugs.push(this.allDrugs[i])
322
             }
319
             }
323
           }
320
           }
328
         return getDictionaryDataConfig(module, filed_name)
325
         return getDictionaryDataConfig(module, filed_name)
329
 
326
 
330
       },
327
       },
331
-      getInitData() {
328
+      getInitData(){
332
         getInitData().then(response => {
329
         getInitData().then(response => {
333
           if (response.data.state == 0) {
330
           if (response.data.state == 0) {
334
             this.$message.error(response.data.msg)
331
             this.$message.error(response.data.msg)
338
             this.allDrugs = response.data.data.drugs
335
             this.allDrugs = response.data.data.drugs
339
             this.advices_template = response.data.data.advices_template
336
             this.advices_template = response.data.data.advices_template
340
             this.doctors = response.data.data.doctors
337
             this.doctors = response.data.data.doctors
341
-            this.departMent = response.data.data.department
342
-
338
+            this.departMent =  response.data.data.department
339
+           
343
           }
340
           }
344
         })
341
         })
345
 
342
 
346
       },
343
       },
347
-      tabclickEvent(val) {
348
-        for (let i = 0; i < this.prescriptions.length; i++) {
344
+      tabclickEvent(val){
345
+        for (let i= 0; i<this.prescriptions.length; i++){
349
           console.log(this.prescriptions[i].name)
346
           console.log(this.prescriptions[i].name)
350
-          if (this.prescriptions[i].name == val.name) {
351
-            this.curPrescriptions = this.prescriptions[i]
347
+            if(this.prescriptions[i].name == val.name){
348
+              this.curPrescriptions = this.prescriptions[i]
352
 
349
 
353
-            //用来区分处方属于项目还是药品
354
-            if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
355
-              this.customTabIndex = 1
356
-            }
357
-            if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
350
+              //用来区分处方属于项目还是药品
351
+              if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
352
+                this.customTabIndex = 1
353
+              }
354
+              if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
358
 
355
 
359
-              this.customTabIndex = 2
360
-            }
356
+                this.customTabIndex = 2
357
+              }
358
+
359
+              if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
360
+                this.customTabIndex = this.rightTab
361
+              }
361
 
362
 
362
-            if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
363
-              this.customTabIndex = this.rightTab
364
             }
363
             }
365
 
364
 
366
-          }
367
 
365
 
368
         }
366
         }
369
       },
367
       },
370
-      setData(data) {
368
+      setData(data){
371
         this.prescriptions = data
369
         this.prescriptions = data
372
         console.log(this.$refs)
370
         console.log(this.$refs)
373
         this.$nextTick(() => {
371
         this.$nextTick(() => {
374
-          this.$refs.prescription_tables.setNewData(this.prescriptions[0])
375
-        })
372
+         this.$refs.prescription_tables.setNewData(this.prescriptions[0])
373
+        });
376
       },
374
       },
377
       moreState(tab, event) {
375
       moreState(tab, event) {
378
         if (tab == 'more') {
376
         if (tab == 'more') {
381
       },
379
       },
382
       open(index) {
380
       open(index) {
383
         if (index == 1) {
381
         if (index == 1) {
384
-          let params = {
382
+          let params ={
385
             patient_id: this.patientInfo.id,
383
             patient_id: this.patientInfo.id,
386
             diagnose: this.state1,
384
             diagnose: this.state1,
387
             sick_history: this.state2,
385
             sick_history: this.state2,
390
             record_date: this.record_date,
388
             record_date: this.record_date,
391
             his_patient_id: this.hisPatientInfo.id
389
             his_patient_id: this.hisPatientInfo.id
392
           }
390
           }
393
-
394
-          for (let i = 0; i < this.prescriptions.length; i++) {
395
-            if (this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0) {
391
+         
392
+          for (let i = 0; i < this.prescriptions.length; i++){
393
+            if(this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0){
396
               this.prescriptions[i]['type'] = 1
394
               this.prescriptions[i]['type'] = 1
397
             }
395
             }
398
-            if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
396
+            if(this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0){
399
               this.prescriptions[i]['type'] = 2
397
               this.prescriptions[i]['type'] = 2
400
             }
398
             }
401
-            for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
399
+            for (let b = 0; b < this.prescriptions[i].advices.length; b++){
402
               this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
400
               this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
403
               this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
401
               this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
404
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
402
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
405
 
403
 
406
             }
404
             }
407
           }
405
           }
408
-          let data = {
409
-            'prescriptions': this.prescriptions
406
+          let data={
407
+            "prescriptions":this.prescriptions
410
           }
408
           }
411
-          console.log('data', data)
412
-          console.log('params', params)
413
-          createHisPrescription(data, params).then(response => {
414
-            if (response.data.state == 1) {
409
+           console.log("data",data)
410
+           console.log("params",params)
411
+          createHisPrescription(data,params).then(response=>{
412
+            if(response.data.state == 1){
415
               this.prescriptions = []
413
               this.prescriptions = []
416
-              this.$message.success('保存成功')
414
+              this.$message.success("保存成功")
417
             }
415
             }
418
           })
416
           })
419
           localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
417
           localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
433
         this.prescriptions.push({
431
         this.prescriptions.push({
434
           name: newTabName,
432
           name: newTabName,
435
           advices: [],
433
           advices: [],
436
-          project: []
434
+          project:[],
435
+          projects:[]
437
 
436
 
438
         })
437
         })
439
         this.editableTabsValue = newTabName
438
         this.editableTabsValue = newTabName
440
-        this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
439
+        this.curPrescriptions = this.prescriptions[this.prescriptions.length-1]
441
       },
440
       },
442
       removeTab(targetName) {
441
       removeTab(targetName) {
443
 
442
 
459
         console.log(this.prescriptions)
458
         console.log(this.prescriptions)
460
       },
459
       },
461
       clickTab(index) {
460
       clickTab(index) {
462
-        if (index == 1) {
461
+        if(index == 1){
463
           this.showOne = true
462
           this.showOne = true
464
           this.showTwo = false
463
           this.showTwo = false
465
           this.$nextTick(() => {
464
           this.$nextTick(() => {
466
-            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
467
-          })
468
-          this.customTabIndex = 1
465
+            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
466
+          });
467
+         this.customTabIndex = 1
469
         }
468
         }
470
-        if (index == 2) {
469
+        if(index == 2){
471
           this.showTwo = true
470
           this.showTwo = true
472
           this.showOne = false
471
           this.showOne = false
473
-          this.$nextTick(() => {
474
-            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
475
-          })
476
-          this.customTabIndex = 2
472
+           this.$nextTick(() => {
473
+            this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
474
+          });
475
+         this.customTabIndex = 2
477
         }
476
         }
478
         this.rightTab = index
477
         this.rightTab = index
479
 
478
 
479
+
480
         //用来区分处方属于项目还是药品
480
         //用来区分处方属于项目还是药品
481
-        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
481
+        if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
482
 
482
 
483
           this.customTabIndex = 1
483
           this.customTabIndex = 1
484
         }
484
         }
485
-        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
485
+        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
486
 
486
 
487
           this.customTabIndex = 2
487
           this.customTabIndex = 2
488
         }
488
         }
489
-        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
489
+        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
490
           // this.customTabIndex = this.rightTab
490
           // this.customTabIndex = this.rightTab
491
           this.customTabIndex = index
491
           this.customTabIndex = index
492
         }
492
         }
493
-      }, changeAllGoodInfoTableData: function(selection) {
494
-        this.curDrugs = selection
495
-      }, addCharges() {
493
+
494
+
495
+
496
+
497
+      },
498
+      addCharges() {
496
         this.$refs.additionalCharges.show()
499
         this.$refs.additionalCharges.show()
497
       },
500
       },
498
       selectDrugs(selection, row) {
501
       selectDrugs(selection, row) {
500
       },
503
       },
501
       comfirm() {
504
       comfirm() {
502
         this.preDrugs = this.curDrugs
505
         this.preDrugs = this.curDrugs
503
-        console.log(this.prescriptions)
504
-        for (let i = 0; i < this.prescriptions.length; i++) {
505
-          if (this.prescriptions[i].name == this.editableTabsValue) {
506
-            var temp = this.deepClone(this.preDrugs)
507
-            var temp2 = this.deepClone(this.teamList)
508
-            console.log(this.prescriptions[i].advices)
509
-            console.log(this.prescriptions[i].project)
510
-
511
-            console.log(temp)
512
-            console.log(temp2)
513
-
514
-            if (temp.length > 0) {
515
-              for (let b = 0; b < temp.length; b++) {
516
-                this.prescriptions[i].advices.push(temp[b])
517
-              }
518
-            }
519
-            if (temp2.length > 0) {
520
-              for (let b = 0; b < temp2.length; b++) {
521
-                this.prescriptions[i].project.concat(temp2[b])
522
-              }
523
-            }
506
+
507
+        for (let i = 0; i < this.prescriptions.length; i++){
508
+          console.log("名称",this.prescriptions[i].name)
509
+          console.log("名称2",this.editableTabsValue)
510
+          if(this.prescriptions[i].name == this.editableTabsValue){
511
+           var temp =  this.deepClone(this.preDrugs)
512
+            var temp2 =  this.deepClone(this.teamList)
513
+
514
+            this.prescriptions[i].advices = temp
515
+            this.prescriptions[i].project = temp2
524
             this.curPrescriptions = this.prescriptions[i]
516
             this.curPrescriptions = this.prescriptions[i]
525
-            this.$refs.multipleTable.clearSelection()
526
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
517
             // this.$refs.prescription_tables.setNewData(this.prescriptions[i])
527
           }
518
           }
528
         }
519
         }
529
-      }, changeAllGoodInfoTableDataTwo(row) {
530
-        this.teamList = row
520
+        console.log("222222",this.prescriptions)
531
       },
521
       },
532
-      selectChange(row) {
522
+      selectChange(row){
533
         this.teamList = row
523
         this.teamList = row
534
       },
524
       },
535
-      getlist() {
536
-        getHisProject().then(response => {
537
-          if (response.data.state == 1) {
525
+      getlist(){
526
+        getHisProject().then(response=>{
527
+          if(response.data.state == 1){
538
             var project = response.data.data.project
528
             var project = response.data.data.project
539
-            console.log('project', project)
529
+            console.log("project",project)
540
             this.tabProject = project
530
             this.tabProject = project
541
           }
531
           }
542
         })
532
         })
543
       },
533
       },
544
-      querySearch() {
534
+      querySearch(){
545
 
535
 
546
-      }, deepClone(source) {
536
+      },deepClone(source) {
547
         if (!source && typeof source !== 'object') {
537
         if (!source && typeof source !== 'object') {
548
           throw new Error('error arguments', 'shallowClone')
538
           throw new Error('error arguments', 'shallowClone')
549
         }
539
         }
557
         })
547
         })
558
         return targetObj
548
         return targetObj
559
       },
549
       },
560
-      getAllProjectTeam() {
561
-        getAllProjectTeam().then(response => {
562
-          if (response.data.state == 1) {
563
-            var team = response.data.data.team
564
-            console.log('team', team)
550
+      getAllProjectTeam(){
551
+        getAllProjectTeam().then(response=>{
552
+          if(response.data.state == 1){
553
+            var team =  response.data.data.team
554
+            console.log("team",team)
565
             this.tabPrjectTeam = team
555
             this.tabPrjectTeam = team
566
           }
556
           }
567
         })
557
         })
568
       },
558
       },
569
-      selectTeam(row) {
570
-        var arr = []
571
-        for (let i = 0; i < row.length; i++) {
572
-          arr.push(row[i].project_id)
573
-        }
574
-        var ids = arr.join(',')
575
-        var strArr = ids.split(',')
576
-        var res = []//接收不重复的数据
577
-
578
-        for (var i = 0; i < strArr.length; i++) {
579
-          var flag = true
580
-
581
-          for (var j = 0; j < i; j++) {
582
-            if (strArr[i] === strArr[j]) {
583
-              flag = false
584
-              break
585
-            }
586
-          }
587
-          if (flag) {
588
-            res.push(strArr[i])
559
+      selectTeam(row){
560
+          var arr = []
561
+          for(let i=0;i<row.length;i++){
562
+             arr.push(row[i].project_id)
589
           }
563
           }
564
+        var ids =  arr.join(",")
565
+        console.log("ids",ids)
566
+        var strArr = ids.split(",")
567
+        var res = [];//接收不重复的数据
568
+
569
+        for (var i = 0; i<strArr.length; i++){
570
+        var flag = true;
571
+
572
+        for (var j = 0; j<i; j++){
573
+          if(strArr[i]===strArr[j]){
574
+            flag = false;
575
+            break;
576
+           }
577
+         }
578
+        if(flag){
579
+          res.push(strArr[i])
580
+         }
590
         }
581
         }
591
-        var idstr = res.join(',')
582
+        console.log("res",res)
583
+
584
+        var idstr =  res.join(",")
585
+        console.log("idstr",idstr)
592
         const params = {
586
         const params = {
593
-          project_id: idstr
587
+           project_id:idstr
594
         }
588
         }
595
-        getPojectListById(params).then(response => {
596
-          if (response.data.state == 1) {
597
-            var project = response.data.data.project
598
-            console.log('project222', project)
599
-            this.teamList = []
600
-            this.teamList = project
601
-          }
589
+        getPojectListById(params).then(response=>{
590
+           if(response.data.state == 1){
591
+             var project =  response.data.data.project
592
+             console.log("project222",project)
593
+             this.teamList = []
594
+             this.teamList = project
595
+           }
602
         })
596
         })
603
       }
597
       }
604
     },
598
     },
605
-    created() {
599
+    created(){
606
       this.getInitData()
600
       this.getInitData()
607
       //获取所有项目
601
       //获取所有项目
608
       this.getlist()
602
       this.getlist()

+ 8 - 6
src/xt_pages/outpatientRegistration/index.vue View File

18
                         </el-select>
18
                         </el-select>
19
                     </el-form-item>
19
                     </el-form-item>
20
                     <el-form-item class="specialFormItem" label="医保卡号:">
20
                     <el-form-item class="specialFormItem" label="医保卡号:">
21
-                        <el-input v-model="form.medicalInsuranceCard"></el-input>
22
-                        <el-button type="primary" @click="reading">读卡</el-button>
21
+                        <div style="display:flex;">
22
+                            <el-input v-model="form.medicalInsuranceCard"></el-input>
23
+                            <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
24
+                        </div>
23
                     </el-form-item>
25
                     </el-form-item>
24
                     <el-form-item label="患者姓名:">
26
                     <el-form-item label="患者姓名:">
25
                         <el-input v-model="form.name"></el-input>
27
                         <el-input v-model="form.name"></el-input>
435
     flex-wrap: wrap;
437
     flex-wrap: wrap;
436
     justify-content: space-between;
438
     justify-content: space-between;
437
     .el-form-item{
439
     .el-form-item{
438
-        width: 260px;
440
+        width: 33%;
439
     }
441
     }
440
     .specialFormItem{
442
     .specialFormItem{
441
-        width:625px;
443
+        width:67%;
442
         .el-input{
444
         .el-input{
443
             min-width: 150px;
445
             min-width: 150px;
444
         }
446
         }
445
     }
447
     }
446
     .el-select{
448
     .el-select{
447
-        width: 180px;
449
+        width: 100%;
448
     }
450
     }
449
     .el-input{
451
     .el-input{
450
-        width: 180px;
452
+        width: 100%;
451
     }
453
     }
452
 }
454
 }
453
 </style>
455
 </style>