Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
c016feaa18

+ 156 - 137
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

@@ -1,148 +1,167 @@
1 1
 <template>
2
-    <div class="prescriptionTable">
3
-        <el-table :data="preTableData" border style="width: 98%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
4
-            <el-table-column align="center" type="selection" width="40"></el-table-column>
5
-            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
6
-            <el-table-column align="center" prop="name" label="名称">
7
-                <template slot-scope="scope">{{ scope.row.name }}</template>
8
-            </el-table-column>
9
-            <el-table-column align="center" prop="name" width="50" label="组套">
10
-                <template slot-scope="scope">
11
-                    <!-- <el-select v-model="value" placeholder="">
12
-                        <el-option
13
-                        v-for="item in newoptions"
14
-                        :key="item.value"
15
-                        :label="item.label"
16
-                        :value="item.value">
17
-                        </el-option>
18
-                    </el-select> -->
19
-                    <el-input v-model="input" placeholder=""></el-input>
20
-                </template>
21
-            </el-table-column>
22
-            <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
23
-                <template slot-scope="scope">
24
-                    <el-input v-model="input" placeholder=""></el-input>
25
-                </template>
26
-            </el-table-column>
27
-            <el-table-column align="center" prop="name" width="50" label="用法">
28
-                <template slot-scope="scope">
29
-                    <!-- <el-select v-model="value" placeholder="">
30
-                        <el-option
31
-                        v-for="item in newoptions"
32
-                        :key="item.value"
33
-                        :label="item.label"
34
-                        :value="item.value">
35
-                        </el-option>
36
-                    </el-select> -->
37
-                    <el-input v-model="input" placeholder=""></el-input>
38
-                </template>
39
-            </el-table-column>
40
-            <el-table-column align="center" prop="name" width="50" label="频率">
41
-                <template slot-scope="scope">
42
-                    <!-- <el-select v-model="value" placeholder="">
43
-                        <el-option
44
-                        v-for="item in newoptions"
45
-                        :key="item.value"
46
-                        :label="item.label"
47
-                        :value="item.value">
48
-                        </el-option>
49
-                    </el-select> -->
50
-                    <el-input v-model="input" placeholder=""></el-input>
51
-                </template>
52
-            </el-table-column>
53
-            <el-table-column align="center" prop="name" width="50" label="天数">
54
-                <template slot-scope="scope">
55
-                    <!-- <el-select v-model="value" placeholder="">
56
-                        <el-option
57
-                        v-for="item in newoptions"
58
-                        :key="item.value"
59
-                        :label="item.label"
60
-                        :value="item.value">
61
-                        </el-option>
62
-                    </el-select> -->
63
-                    <el-input v-model="input" placeholder=""></el-input>
64
-                </template>
65
-            </el-table-column>
66
-            <el-table-column align="center" prop="name" width="100" label="总量">
67
-                <template slot-scope="scope">
68
-                    <div style="display:flex;">
69
-                        <el-input v-model="input" style="width:50%" placeholder=""></el-input>
70
-                        <!-- <el-select v-model="value" style="width:50%" placeholder="">
71
-                            <el-option
72
-                            v-for="item in newoptions"
73
-                            :key="item.value"
74
-                            :label="item.label"
75
-                            :value="item.value">
76
-                            </el-option>
77
-                        </el-select> -->
78
-                        <el-input v-model="input" style="width:50%" placeholder=""></el-input>
79
-                    </div>
80
-                </template>
81
-            </el-table-column>
82
-            <el-table-column align="center" prop="name" width="50" label="单价">
83
-                <template slot-scope="scope">
84
-                    <el-input v-model="scope.row.unitPrice" placeholder=""></el-input>
85
-                </template>
86
-            </el-table-column>
87
-            <el-table-column align="center" prop="name" width="50" label="备注">
88
-                <template slot-scope="scope">
89
-                    <!-- <el-autocomplete
90
-                    class="inline-input"
91
-                    v-model="state1"
92
-                    :fetch-suggestions="querySearch"
93
-                    placeholder=""
94
-                    @select="handleSelect"
95
-                    ></el-autocomplete> -->
96
-                </template>
97
-            </el-table-column>
98
-            <el-table-column align="center" width="40" prop="name" label="操作">
99
-                <template slot-scope="scope">
100
-                    <i class="el-icon-delete"></i>
101
-                </template>
102
-            </el-table-column>
103
-        </el-table>
104
-    </div>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 98%;"
4
+              :row-style="{ color: '#303133' }"
5
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
+      <el-table-column align="center" prop="name" label="名称">
7
+        <template slot-scope="scope">{{ scope.row.advice_name }}</template>
8
+      </el-table-column>
9
+
10
+      <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
11
+        <template slot-scope="scope">
12
+          <el-input v-model="scope.row.single_dose" readonly></el-input>
13
+          <div> {{scope.row.min_unit}}</div>
14
+        </template>
15
+      </el-table-column>
16
+      <el-table-column align="center" prop="name" width="50" label="用法">
17
+        <template slot-scope="scope">
18
+          <el-select v-model="scope.row.delivery_way" readonly placeholder="请选择">
19
+            <el-option
20
+              v-for="item,index in drugways"
21
+              :key="index"
22
+              :label="item.name"
23
+              :value="item.name">
24
+            </el-option>
25
+          </el-select>
26
+        </template>
27
+      </el-table-column>
28
+      <el-table-column align="center" prop="name" width="50" label="频率">
29
+        <template slot-scope="scope">
30
+          <el-select v-model="scope.row.execution_frequency" readonly placeholder="请选择">
31
+            <el-option
32
+              v-for="item in efs"
33
+              :key="index"
34
+              :label="item.name"
35
+              :value="item.name">
36
+            </el-option>
37
+          </el-select>
38
+        </template>
39
+      </el-table-column>
40
+
41
+      <el-table-column align="center" prop="name" width="100" label="总量">
42
+        <template slot-scope="scope">
43
+          <div style="display:flex;">
44
+            <el-input v-model="scope.row.prescribing_number" style="width:50%" readonly placeholder=""></el-input>
45
+            <div> {{scope.row.min_unit}}</div>
46
+          </div>
47
+        </template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="name" width="50" label="单价">
50
+        <template slot-scope="scope">
51
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
52
+        </template>
53
+      </el-table-column>
54
+      <el-table-column align="center" prop="name" width="50" label="备注">
55
+        <template slot-scope="scope">
56
+          <el-input v-model="scope.row.remark" style="width:50%" placeholder="" readonly></el-input>
57
+        </template>
58
+      </el-table-column>
59
+    </el-table>
60
+    <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 98%;"
61
+              :row-style="{ color: '#303133' }"
62
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
63
+
64
+      <el-table-column align="center" prop="project_name" label="名称">
65
+        <template slot-scope="scope">{{ scope.row.project.project_name }}</template>
66
+      </el-table-column>
67
+      <el-table-column align="center" prop="statistical_classification" width="50" label="组">
68
+        <template slot-scope="scope">
69
+          {{getGroup(scope.row.project.statistical_classification)}}
70
+        </template>
71
+      </el-table-column>
72
+      <el-table-column align="center" prop="single_dose" width="130" :label="'单次\n用量'">
73
+        <!--<template slot-scope="scope">-->
74
+          <!--&lt;!&ndash;<el-input v-model="scope.row.project.single_dose" placeholder="" readonly></el-input>&ndash;&gt;-->
75
+        <!--</template>-->
76
+      </el-table-column>
77
+      <el-table-column align="center" prop="delivery_way" width="130" label="用法">
78
+        <!--<template slot-scope="scope">-->
79
+          <!--<el-input v-model="scope.row.project.delivery_way" placeholder="" readonly></el-input>-->
80
+        <!--</template>-->
81
+      </el-table-column>
82
+      <el-table-column align="center" prop="execution_frequency" width="130" label="频率">
83
+        <!--<template slot-scope="scope">-->
84
+          <!--<el-input v-model="scope.row.project.execution_frequency" placeholder="" readonly></el-input>-->
85
+        <!--</template>-->
86
+      </el-table-column>
87
+      <el-table-column align="center" prop="number_days" width="130" label="天数">
88
+        <!--<template slot-scope="scope">-->
89
+          <!--<el-input v-model="scope.row.project.number_days" placeholder="" readonly></el-input>-->
90
+        <!--</template>-->
91
+      </el-table-column>
92
+      <el-table-column align="center" prop="total" width="100" label="总量">
93
+        <template slot-scope="scope">
94
+          <div style="display:flex;">
95
+            <el-input v-model="scope.row.project.total" style="width:50" placeholder="" readonly></el-input>
96
+          </div>
97
+        </template>
98
+      </el-table-column>
99
+      <el-table-column align="center" prop="name" width="50" label="单价">
100
+        <template slot-scope="scope">
101
+          <el-input v-model="scope.row.project.price" placeholder="" readonly></el-input>
102
+        </template>
103
+      </el-table-column>
104
+      <el-table-column align="center" prop="name" width="120" label="备注">
105
+        <!--<template slot-scope="scope">-->
106
+          <!--<el-input v-model="scope.row.project.remark" readonly></el-input>-->
107
+        <!--</template>-->
108
+      </el-table-column>
109
+    </el-table>
110
+  </div>
105 111
 </template>
106 112
 
107 113
 <script>
108
-export default {
109
-    props:{
110
-        preTableData:Array
114
+  import { getInitData } from '@/api/his/his'
115
+  import { getDictionaryDataConfig} from "@/utils/data";
116
+
117
+  export default {
118
+    props: {
119
+      prescription: Object
111 120
     },
112
-    data(){
113
-        return{
114
-            tableData: [],
115
-            newoptions: [{
116
-            value: '1',
117
-            label: '1'
118
-            }, {
119
-            value: '2',
120
-            label: '2'
121
-            }, {
122
-            value: '3',
123
-            label: '3'
124
-            }, {
125
-            value: '4',
126
-            label: '4'
127
-            }, {
128
-            value: '5',
129
-            label: '5'
130
-            }],
131
-            value:'1',
132
-            input:1
121
+    data() {
122
+      return {
123
+        drugways: [],
124
+        efs: []
125
+      }
126
+    }, mounted() {
127
+      getInitData().then(response => {
128
+        if (response.data.state == 0) {
129
+          this.$message.error(response.data.msg)
130
+          return false
131
+        } else {
132
+          this.drugways = response.data.data.drugways
133
+          this.efs = response.data.data.efs
134
+        }
135
+      })
136
+    }, methods:  {
137
+      getGroup(id){
138
+        var name = ""
139
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category')
140
+        console.log("2235",statistics_category)
141
+        for(let i=0;i<statistics_category.length;i++){
142
+          if(id == statistics_category[i].id){
143
+            name = statistics_category[i].name
144
+          }
133 145
         }
146
+        return name
147
+      },
148
+
149
+
134 150
     }
135
-}
151
+  }
136 152
 </script>
137 153
 
138 154
 <style lang="scss">
139
-.prescriptionTable{
140
-    .el-table th .cell, .el-table td .cell{
141
-        padding: 0 2px;
142
-        white-space: pre-line;
143
-    }
144
-    .el-icon-delete{
145
-        color:red;
146
-    }
147
-}
155
+  .prescriptionTable {
156
+
157
+  .el-table th .cell, .el-table td .cell {
158
+    padding: 0 2px;
159
+    white-space: pre-line;
160
+  }
161
+
162
+  .el-icon-delete {
163
+    color: red;
164
+  }
165
+
166
+  }
148 167
 </style>

+ 437 - 360
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -1,391 +1,468 @@
1 1
 <template>
2
-    <div class="main-contain outpatientChargesManagement">
3
-        <div class="position">
4
-            <bread-crumb :crumbs='crumbs'></bread-crumb>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7
+      <div class="mainLeft">
8
+        <!--<div class="mainCell" style="justify-content: space-between;">-->
9
+        <!--<p>未就诊:<span>1</span>人</p>-->
10
+        <!--<p>已就诊:<span>0</span>人</p>-->
11
+        <!--</div>-->
12
+        <!--<div class="mainCell">-->
13
+        <!--<el-radio-group v-model="radio" @change="changeRadio">-->
14
+        <!--<el-radio :label=1>未就诊</el-radio>-->
15
+        <!--<el-radio :label=2>已就诊</el-radio>-->
16
+        <!--<el-radio :label=3>全部</el-radio>-->
17
+        <!--</el-radio-group>-->
18
+        <!--</div>-->
19
+        <div class="mainCell" style="margin-bottom:10px;">
20
+          <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
21
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
22
+            搜索
23
+          </el-button>
5 24
         </div>
6
-        <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7
-            <div class="mainLeft">
8
-                <div class="mainCell" style="justify-content: space-between;">
9
-                    <p>未就诊:<span>1</span>人</p>
10
-                    <p>已就诊:<span>0</span>人</p>
11
-                </div>
12
-                <div class="mainCell">
13
-                    <el-radio-group v-model="radio" @change="changeRadio">
14
-                        <el-radio :label=1>未就诊</el-radio>
15
-                        <el-radio :label=2>已就诊</el-radio>
16
-                        <el-radio :label=3>全部</el-radio>
17
-                    </el-radio-group>
18
-                </div>
19
-                <div class="mainCell" style="margin-bottom:10px;">
20
-                    <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
21
-                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
22
-                </div>
23
-                <div style="flex:1;overflow-y:auto;">
24
-                    <el-table :data="tableData" border  style="width: 100%;" :row-style="{ color: '#303133' }" 
25
-                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
25
+        <div style="flex:1;overflow-y:auto;">
26
+          <el-table :data="patientTableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
27
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
26 28
                     highlight-current-row ref="tab"
27 29
                     @current-change="handleCurrentChange">
28
-                        <el-table-column align="center" prop="name" label="患者姓名">
29
-                            <template slot-scope="scope">{{ scope.row.name }}</template>
30
-                        </el-table-column>
31
-                        <el-table-column align="center" prop="name" label="就诊号" width="90">
32
-                            <template slot-scope="scope">3222</template>
33
-                        </el-table-column>
34
-                    </el-table>
35
-                </div>
30
+            <el-table-column align="center" prop="name" label="患者姓名">
31
+              <template slot-scope="scope">{{ scope.row.patients.name }}</template>
32
+            </el-table-column>
33
+            <el-table-column align="center" prop="name" label="就诊号" width="90">
34
+              <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
35
+            </el-table-column>
36
+          </el-table>
37
+        </div>
38
+      </div>
39
+      <div class="mainRight">
40
+        <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
41
+          <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
42
+          <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
43
+          <el-button size="small" @click="open(3)" type="primary">打印</el-button>
44
+          <el-button v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)" type="primary">挂号</el-button>
45
+          <el-button v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)" type="primary">收费</el-button>
46
+          <el-button size="small" v-if="state == '已收费'" @click="open(5)" type="primary">退费</el-button>
47
+        </div>
48
+        <div class="mainCenter">
49
+          <div class="centerLeft">
50
+            <div class="tabsBox">
51
+              <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
52
+              <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
53
+                <el-tab-pane
54
+                  v-for="(item, index) in prescriptions"
55
+                  :key="index"
56
+                  :label="item.name"
57
+                  :name="item.name"
58
+                >
59
+                </el-tab-pane>
60
+                <div class="RP">Rp</div>
61
+                <prescription-table ref="prescription_tables" :prescription="curPrescriptions"></prescription-table>
62
+              </el-tabs>
63
+
64
+            </div>
65
+            <div class="costBox">
66
+              <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
67
+              <span>{{ state }}</span>
68
+            </div>
69
+          </div>
70
+          <div class="centerRight">
71
+            <p class="centerRightTitle">人员信息</p>
72
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
73
+              <span style="font-size:14px;">人员编码:</span>
74
+              <span style="font-size:14px;">日期:{{record_date}}</span>
36 75
             </div>
37
-            <div class="mainRight">
38
-                <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
39
-                    <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
40
-                    <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
41
-                    <el-button size="small" @click="open(3)" type="primary">打印</el-button>
42
-                    <el-button size="small" @click="open(4)" type="primary">收费</el-button>
43
-                    <el-button size="small" v-if="state == '已收费'" @click="open(5)" type="primary">退费</el-button>
44
-                </div>
45
-                <div class="mainCenter">
46
-                    <div class="centerLeft">
47
-                        <div class="tabsBox">
48
-                            <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
49
-                            <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" :before-leave="moreState">
50
-                                <el-tab-pane
51
-                                    v-for="(item, index) in editableTabs"
52
-                                    :key="index"
53
-                                    :label="item.title"
54
-                                    :name="item.name"
55
-                                >
56
-                                    <div class="RP">Rp</div>
57
-                                    <prescription-table :preTableData='preTableData'></prescription-table>
58
-                                </el-tab-pane>
59
-                                <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span></el-tab-pane>
60
-                            </el-tabs>
61
-                            
62
-                        </div>
63
-                        <div class="costBox">
64
-                            <span>处方编号:2134348971237883</span>
65
-                            <span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>
66
-                            <span>{{ state }}</span>
67
-                        </div>
68
-                    </div>
69
-                    <div class="centerRight">
70
-                        <p class="centerRightTitle">人员信息</p>
71
-                        <div style="display:flex;justify-content: space-between;line-height:30px;">
72
-                            <span style="font-size:14px;">人员编码:</span>
73
-                            <span style="font-size:14px;">日期:{{start_time}}</span>
74
-                        </div>
75
-                        <ul class="basicUl">
76
-                            <li style="width:50%;">姓名:{{ patientInfo.name }}</li>
77
-                            <li style="width:50%;">性别:{{ patientInfo && patientInfo.gend == 1 ? '男' : "女" }}</li>
78
-                            <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
79
-                            <li style="width:50%;">身高:</li>
80
-                            <li style="width:50%;">体重:</li>
81
-                            <li style="width:50%;">电话:</li>
82
-                            <li style="width:100%;">地址:</li>
83
-                            <li style="width:100%;">过敏史:</li>
84
-                        </ul>
85
-                        <p class="centerRightTitle">诊断信息</p>
86
-                        <div style="display:flex;justify-content: space-between;line-height:30px;">
87
-                            <span style="font-size:14px;">门诊编号:676273816287361</span>
88
-                        </div>
89
-                        <ul class="basicUl">
90
-                            <li style="width:50%;">医生:{{ doctor.name }}</li>
91
-                            <li style="width:50%;">科室:{{ doctor.department }}</li>
92
-                            <li style="width:100%;">费用:{{ doctor.total }}元</li>
93
-                            <li style="width:100%;">判断结果:</li>
94
-                            <li style="width:100%;">是否有传染病:</li>
95
-                            <li style="width:100%;">血压:</li>
96
-                        </ul>
97
-                    </div>
98
-                </div>
76
+            <ul class="basicUl">
77
+              <li style="width:50%;">姓名:{{patientInfo.name}}</li>
78
+              <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
79
+              <li style="width:50%;">年龄:{{patientInfo.age }}</li>
80
+              <li style="width:50%;">身高:{{patientInfo.height}}</li>
81
+              <li style="width:50%;">体重:{{patientInfo.weight}}</li>
82
+              <li style="width:50%;">电话:{{patientInfo.phone}}</li>
83
+              <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
84
+            </ul>
85
+            <p class="centerRightTitle">诊断信息</p>
86
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
87
+              <span style="font-size:14px;">门诊编号:676273816287361</span>
99 88
             </div>
89
+            <ul class="basicUl">
90
+              <li style="width:50%;">医生:{{ }}</li>
91
+              <li style="width:50%;">科室:{{ }}</li>
92
+              <li style="width:100%;">费用:{{ }}元</li>
93
+              <li style="width:100%;">判断结果:</li>
94
+              <li style="width:100%;">是否有传染病:</li>
95
+              <li style="width:100%;">血压:</li>
96
+            </ul>
97
+          </div>
100 98
         </div>
101
-        <additionalCharges ref='additionalCharges'></additionalCharges>
99
+      </div>
102 100
     </div>
101
+    <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
102
+  </div>
103 103
 </template>
104 104
 
105 105
 
106 106
 <script>
107
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
108
-import noCharge from './components/noCharge'
109
-import charged from './components/charged'
110
-import medicalInsuranceRefund from './components/medicalInsuranceRefund'
111
-import prescriptionTable from './components/prescriptionTable'
112
-import additionalCharges from './components/additionalCharges'
113
-import { getPatientList,getPatientInformation } from "@/api/project/project"
114
-const moment = require('moment')
115
-export default {
116
-    components:{
117
-        BreadCrumb,
118
-        noCharge,
119
-        charged,
120
-        medicalInsuranceRefund,
121
-        prescriptionTable,
122
-        additionalCharges
107
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
108
+  import noCharge from './components/noCharge'
109
+  import charged from './components/charged'
110
+  import medicalInsuranceRefund from './components/medicalInsuranceRefund'
111
+  import prescriptionTable from './components/prescriptionTable'
112
+  import additionalCharges from './components/additionalCharges'
113
+  import { getPatientInformation, getPatientList } from '@/api/project/project'
114
+  import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
115
+
116
+  const moment = require('moment')
117
+  export default {
118
+    components: {
119
+      BreadCrumb,
120
+      noCharge,
121
+      charged,
122
+      medicalInsuranceRefund,
123
+      prescriptionTable,
124
+      additionalCharges
123 125
     },
124
-    data(){
125
-        return{
126
-            crumbs: [
127
-                { path: false, name: '门诊收费' },
128
-                { path: false, name: '门诊收费管理' }
129
-            ],
130
-            tableData: [],
131
-            editableTabsValue: '1',
132
-            editableTabs: [{
133
-            title: '处方1',
134
-            name: '1',
135
-            }],
136
-            tabIndex: 1,
137
-
138
-            patientTableData:[{
139
-                name:'杨美英',
140
-                mdtrt_id:"1709946",
141
-            }],
142
-            patientInfo:{},
143
-            doctor:{},
144
-            total:0,
145
-            state:'未收费',
146
-            radio:1,
147
-            radioStatus:1,
148
-            search_input:"",
149
-            start_time:moment().locale('zh-cn').format('YYYY-MM-DD')
150
-        }
126
+    data() {
127
+      return {
128
+        crumbs: [
129
+          { path: false, name: '门诊收费' },
130
+          { path: false, name: '门诊收费管理' }
131
+        ],
132
+        curPrescriptions: {},
133
+        prescriptions: [],
134
+        record_date: '',
135
+        tableData: [],
136
+        editableTabsValue: '1',
137
+        editableTabs: [{
138
+          title: '处方1',
139
+          name: '1'
140
+        }],
141
+        tabIndex: 1,
142
+        hisPatientInfo: {},
143
+
144
+        patientTableData: [{
145
+          name: '杨美英',
146
+          mdtrt_id: '1709946'
147
+        }],
148
+        patientInfo: {},
149
+        doctor: {},
150
+        total: 0,
151
+        state: '未收费',
152
+        radio: 1,
153
+        radioStatus: 1,
154
+        search_input: '',
155
+        start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
156
+      }
151 157
     },
152
-    created(){
153
-       
154
-       //获取患者信息
155
-       this.getPatientList()
158
+    created() {
159
+      var nowDate = new Date()
160
+      var nowYear = nowDate.getFullYear()
161
+      var nowMonth = nowDate.getMonth() + 1
162
+      var nowDay = nowDate.getDate()
163
+      this.record_date =
164
+        nowYear +
165
+        '-' +
166
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
167
+        '-' +
168
+        (nowDay < 10 ? '0' + nowDay : nowDay)
169
+
170
+      //获取患者信息
171
+      this.getPatientList()
156 172
     },
157
-    methods:{
158
-        moreState(tab, event){
159
-          if(tab == 'more'){
160
-            return false;
173
+    methods: {
174
+      tabclickEvent(val){
175
+        for (let i= 0; i<this.prescriptions.length; i++){
176
+          if(this.prescriptions[i].name == val.name){
177
+            this.curPrescriptions = {}
178
+             var temp = this.deepClone(this.prescriptions[i])
179
+            this.curPrescriptions = temp
180
+            console.log(this.curPrescriptions)
181
+          }
182
+        }
183
+      },deepClone(source) {
184
+        if (!source && typeof source !== 'object') {
185
+          throw new Error('error arguments', 'shallowClone')
186
+        }
187
+        const targetObj = source.constructor === Array ? [] : {}
188
+        Object.keys(source).forEach((keys) => {
189
+          if (source[keys] && typeof source[keys] === 'object') {
190
+            targetObj[keys] = this.deepClone(source[keys])
191
+          } else {
192
+            targetObj[keys] = source[keys]
161 193
           }
162
-        },
163
-        open(index){
164
-            if(index == 1){
165
-            }else if(index == 2){
166
-                
167
-            }else if(index == 4){
168
-                this.state = '已收费'
169
-                this.$message({message: '收费成功',type: 'success'});
170
-            }else if(index == 5){
171
-                this.$message({message: '退费成功',type: 'success'});
194
+        })
195
+        return targetObj
196
+      },
197
+      getTotal() {
198
+        var total = 0
199
+        console.log(this.prescriptions)
200
+        for (let i = 0; i < this.prescriptions.length; i++) {
201
+          if (this.prescriptions[i].advices != null) {
202
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
203
+              total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
172 204
             }
173
-            
174
-        },
175
-        addTab(targetName) {
176
-            let newTabName = ++this.tabIndex + '';
177
-            this.editableTabs.push({
178
-                title: '处方' + this.tabIndex,
179
-                name: newTabName,
180
-            });
181
-            this.editableTabsValue = newTabName;
182
-        },
183
-        removeTab(targetName) {
184
-            let tabs = this.editableTabs;
185
-            let activeName = this.editableTabsValue;
186
-            if (activeName === targetName) {
187
-            tabs.forEach((tab, index) => {
188
-                if (tab.name === targetName) {
189
-                let nextTab = tabs[index + 1] || tabs[index - 1];
190
-                if (nextTab) {
191
-                    activeName = nextTab.name;
192
-                }
193
-                }
194
-            });
205
+          }
206
+          if(this.prescriptions[i].project != null) {
207
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
208
+              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
195 209
             }
196
-            
197
-            this.editableTabsValue = activeName;
198
-            this.editableTabs = tabs.filter(tab => tab.name !== targetName);
199
-        },
200
-        addCharges(){
201
-            this.$refs.additionalCharges.show()
202
-        },
203
-        choosePatient(){
204
-            let a = JSON.parse(localStorage.getItem("drugs"))
205
-            this.preTableData = a
206
-            this.preTableData.map(item => {
207
-                this.total += item.unitPrice
208
-            })
209
-            // this.patientInfo = {
210
-            //     certno:"440221195903290027",
211
-            //     psn_no:"0221201972",
212
-            //     gend:"2",
213
-            //     brdy:"1960-03-29",
214
-            //     naty:"01",
215
-            //     psn_cert_type:"01",
216
-            //     psn_name:"杨美英",
217
-            //     age:60.7
218
-            // }
219
-            // this.doctor = {
220
-            //     name:'刘志刚',
221
-            //     department:'血透中心',
222
-            //     total:20,
223
-            // }
224
-        },
225
-       changeRadio(id){ 
226
-         console.log(id)
227
-         this.radioStatus = id
228
-         this.getPatientList()
229
-       },
230
-
231
-        //患者列表
232
-        getPatientList(){
233
-           getPatientList().then(response=>{
234
-               if(response.data.state == 1){
235
-                 var hisPatient = response.data.data.hisPatient
236
-                 console.log("his",hisPatient)
237
-                 var scheduleList = response.data.data.scheduleList
238
-                 hisPatient.push(...scheduleList)
239
-                 console.log("arrr",hisPatient)
240
-                 var tabArr = this.unique(hisPatient)
241
-                 console.log("22222",tabArr)
242
-                 if(this.radioStatus == 1){
243
-                    this.tableData = tabArr
244
-                    this.$refs.tab.setCurrentRow(this.tableData[0])
245
-                 }
246
-                 if(this.radioStatus == 2){
247
-                    var prescription = response.data.data.prescription
248
-                    this.tableData = prescription
249
-                    this.$refs.tab.setCurrentRow(this.tableData[0])
250
-                 }
251
-                
252
-               }  
253
-           })
254
-        },
255
-
256
-        unique(arr) {
257
-            const res = new Map();
258
-            return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
259
-        },
260
-        handleCurrentChange(val){
261
-          console.log("val",val)
262
-          this.getPatientInformation(val.id)
263
-        },
264
-        
265
-        //获取患者的基本信息
266
-        getPatientInformation(id){
267
-            console.log(id)
268
-            getPatientInformation(id).then(response=>{
269
-               if(response.data.state == 1){
270
-                  var information = response.data.data.information
271
-                  console.log("information",information)
272
-                  this.patientInfo = information
273
-               }
274
-            })
210
+          }
211
+        }
212
+        return total
213
+      },
214
+      moreState(tab, event) {
215
+        if (tab == 'more') {
216
+          return false
275 217
         }
218
+      },
219
+      open(index) {
220
+        if (index == 1) {
221
+        } else if (index == 2) {
222
+
223
+        } else if (index == 4) {
224
+          this.state = '已收费'
225
+          this.$message({ message: '收费成功', type: 'success' })
226
+        } else if (index == 5) {
227
+          this.$message({ message: '退费成功', type: 'success' })
228
+        }
229
+
230
+      },
231
+      addTab(targetName) {
232
+        let newTabName = ++this.tabIndex + ''
233
+        this.editableTabs.push({
234
+          title: '处方' + this.tabIndex,
235
+          name: newTabName
236
+        })
237
+        this.editableTabsValue = newTabName
238
+      },
239
+      removeTab(targetName) {
240
+        let tabs = this.editableTabs
241
+        let activeName = this.editableTabsValue
242
+        if (activeName === targetName) {
243
+          tabs.forEach((tab, index) => {
244
+            if (tab.name === targetName) {
245
+              let nextTab = tabs[index + 1] || tabs[index - 1]
246
+              if (nextTab) {
247
+                activeName = nextTab.name
248
+              }
249
+            }
250
+          })
251
+        }
252
+
253
+        this.editableTabsValue = activeName
254
+        this.editableTabs = tabs.filter(tab => tab.name !== targetName)
255
+      },
256
+      addCharges() {
257
+        this.$refs.additionalCharges.show()
258
+      },
259
+      choosePatient() {
260
+
261
+      },
262
+      changeRadio(id) {
263
+        console.log(id)
264
+        this.radioStatus = id
265
+        this.getPatientList()
266
+      },
267
+
268
+      //患者列表
269
+      getPatientList() {
270
+        let params = {
271
+          'record_date': this.record_date
272
+        }
273
+        getSchedulePatientList(params).then(response => {
274
+          if (response.data.state == 0) {
275
+            this.$message.error(response.data.msg)
276
+            return false
277
+          } else {
278
+            this.patientTableData = []
279
+            // let cal_one = 0
280
+            // let cal_two = 0
281
+            for (let i = 0; i < response.data.data.list.length; i++) {
282
+              // if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
283
+              //   // cal_one = cal_one + 1
284
+              // }
285
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
286
+                // cal_two = cal_two + 1
287
+                this.patientTableData.push(response.data.data.list[i])
288
+              }
289
+            }
290
+
291
+            // this.cal_one = cal_one
292
+            // this.cal_two = cal_two
293
+          }
294
+        })
295
+      },
296
+
297
+      unique(arr) {
298
+        const res = new Map()
299
+        return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
300
+      },
301
+      handleCurrentChange(val) {
302
+        this.getPatientInformation(val.patients.id)
303
+      }, //获取患者的基本信息
304
+      getPatientInformation(id) {
305
+        let params = {
306
+          'record_date': this.record_date,
307
+          'patient_id': id
308
+        }
309
+        getPatientInfo(params).then(response => {
310
+          if (response.data.state == 0) {
311
+            this.$message.error(response.data.msg)
312
+            return false
313
+          } else {
314
+            this.patientInfo = response.data.data.xt_info
315
+            this.hisPatientInfo = response.data.data.his_info
316
+            this.prescriptions = []
317
+            for (let i = 0; i < response.data.data.prescription.length; i++) {
318
+              var prescription = response.data.data.prescription[i]
319
+              let index = i + 1
320
+              let obj = {
321
+                name: '处方' + index,
322
+                advices: prescription.advices,
323
+                project: prescription.project,
324
+                type: response.data.data.prescription[i].type
325
+              }
326
+              this.prescriptions.push(obj)
327
+              this.curPrescriptions = this.prescriptions[0]
328
+
329
+            }
330
+            // this.$refs.prescriptions.setData(this.prescriptions)
331
+          }
332
+        })
333
+      }
276 334
     }
277
-}
335
+  }
278 336
 </script>
279 337
 
280 338
 <style lang="scss" scoped>
281
-.app-container{
282
-    height:100%;
283
-}
284
-.outpatientChargesManagement{
339
+  .app-container {
340
+    height: 100%;
341
+  }
342
+
343
+  .outpatientChargesManagement {
285 344
     height: 100%;
286 345
     display: flex;
287 346
     flex-direction: column;
288
-    .mainLeft{
289
-        width:200px;
290
-        height: 100%;
291
-        display: flex;
292
-        flex-direction: column;
293
-        .el-radio{
294
-            margin-right:5px;
295
-        }
296
-        
297
-    }
298
-    .mainCell{
299
-        height:36px;
300
-        display: flex;
301
-        align-items: center;
302
-    }
303
-    .mainRight{
304
-        margin-left:20px;
305
-        flex:1;
306
-        height: 100%;
307
-        display: flex;
308
-        flex-direction: column;
309
-        overflow-y: auto;
310
-        .cellSpan{
311
-            min-width: 80px;
312
-            display: inline-block;
313
-            margin-right: 10px;
314
-        }
315
-    }
316
-    .tabsBox{
317
-        position: relative;
318
-        height: 90%;
319
-        overflow-y: auto;
320
-        margin-bottom: 60px;
321
-        .el-tabs__item{
322
-            padding: 0 10px;
323
-        }
324
-    }
325
-    .addTab{
326
-        position: absolute;
327
-        right: 0;
328
-        top: 6px;
329
-        z-index: 20;
330
-    }
331
-    .mainCenter{
332
-        display: flex;
333
-        flex:1;
334
-    }
335
-    .costBox{
336
-        width:100%;
337
-        height:60px;
338
-        background:#fff;
339
-        position: absolute;
340
-        bottom:0;
341
-        display: flex;
342
-        align-items: center;
343
-        justify-content: space-between;
344
-    }
345
-    .centerLeft{
346
-        flex: 1;
347
-        display: flex;
348
-        flex-direction: column;
349
-        position: relative;
350
-    }
351
-    .centerRight{
352
-        width: 300px;
353
-        margin-left: 5px;
354
-        display: flex;
355
-        flex-direction: column;
356
-    }
357
-    .RP{
358
-        color:#409EFF;
359
-        font-size: 20px;
360
-        margin-bottom: 5px;
361
-    }
362
-    .centerRightTitle{
363
-        color:#409EFF;
364
-        padding-top: 10px;;
365
-    }
366
-    .basicUl{
367
-        border-top: 1px solid #e5e5e5;
368
-        border-left: 1px solid #e5e5e5;
369
-        display: flex;
370
-        flex-wrap: wrap;
371
-        li{
372
-            border-bottom: 1px solid #e5e5e5;
373
-            border-right: 1px solid #e5e5e5;
374
-            width: 100%;
375
-            height: 38px;
376
-            line-height: 38px;
377
-            text-indent: 5px;
378
-            font-size: 14px;
379
-        }
380
-    }
381
-}
347
+
348
+  .mainLeft {
349
+    width: 200px;
350
+    height: 100%;
351
+    display: flex;
352
+    flex-direction: column;
353
+
354
+  .el-radio {
355
+    margin-right: 5px;
356
+  }
357
+
358
+  }
359
+  .mainCell {
360
+    height: 36px;
361
+    display: flex;
362
+    align-items: center;
363
+  }
364
+
365
+  .mainRight {
366
+    margin-left: 20px;
367
+    flex: 1;
368
+    height: 100%;
369
+    display: flex;
370
+    flex-direction: column;
371
+    overflow-y: auto;
372
+
373
+  .cellSpan {
374
+    min-width: 80px;
375
+    display: inline-block;
376
+    margin-right: 10px;
377
+  }
378
+
379
+  }
380
+  .tabsBox {
381
+    position: relative;
382
+    height: 90%;
383
+    overflow-y: auto;
384
+    margin-bottom: 60px;
385
+
386
+  .el-tabs__item {
387
+    padding: 0 10px;
388
+  }
389
+
390
+  }
391
+  .addTab {
392
+    position: absolute;
393
+    right: 0;
394
+    top: 6px;
395
+    z-index: 20;
396
+  }
397
+
398
+  .mainCenter {
399
+    display: flex;
400
+    flex: 1;
401
+  }
402
+
403
+  .costBox {
404
+    width: 100%;
405
+    height: 60px;
406
+    background: #fff;
407
+    position: absolute;
408
+    bottom: 0;
409
+    display: flex;
410
+    align-items: center;
411
+    justify-content: space-between;
412
+  }
413
+
414
+  .centerLeft {
415
+    flex: 1;
416
+    display: flex;
417
+    flex-direction: column;
418
+    position: relative;
419
+  }
420
+
421
+  .centerRight {
422
+    width: 300px;
423
+    margin-left: 5px;
424
+    display: flex;
425
+    flex-direction: column;
426
+  }
427
+
428
+  .RP {
429
+    color: #409EFF;
430
+    font-size: 20px;
431
+    margin-bottom: 5px;
432
+  }
433
+
434
+  .centerRightTitle {
435
+    color: #409EFF;
436
+    padding-top: 10px;;
437
+  }
438
+
439
+  .basicUl {
440
+    border-top: 1px solid #e5e5e5;
441
+    border-left: 1px solid #e5e5e5;
442
+    display: flex;
443
+    flex-wrap: wrap;
444
+
445
+  li {
446
+    border-bottom: 1px solid #e5e5e5;
447
+    border-right: 1px solid #e5e5e5;
448
+    width: 100%;
449
+    height: 38px;
450
+    line-height: 38px;
451
+    text-indent: 5px;
452
+    font-size: 14px;
453
+  }
454
+
455
+  }
456
+  }
382 457
 </style>
383 458
 
384 459
 <style lang="scss">
385
-#tab-more{
386
-    .el-icon-close{
387
-        display: none;
388
-    }
389
-}
460
+  #tab-more {
461
+
462
+  .el-icon-close {
463
+    display: none;
464
+  }
465
+
466
+  }
390 467
 </style>
391 468
 

+ 2 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -211,7 +211,6 @@
211 211
   import saveTemplate from './saveTemplate'
212 212
   import additionalCharges from './additionalCharges'
213 213
   import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
214
-  // import { getPatientInfo, getSchedulePatientList,createHisPrescription } from '@/api/his/his'
215 214
 
216 215
   export default {
217 216
     props: {
@@ -326,7 +325,7 @@
326 325
             this.advices_template = response.data.data.advices_template
327 326
             this.doctors = response.data.data.doctors
328 327
             this.departMent =  response.data.data.department
329
-           
328
+
330 329
           }
331 330
         })
332 331
 
@@ -378,7 +377,7 @@
378 377
             record_date: this.record_date,
379 378
             his_patient_id: this.hisPatientInfo.id
380 379
           }
381
-         
380
+
382 381
           for (let i = 0; i < this.prescriptions.length; i++){
383 382
             if(this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0){
384 383
               this.prescriptions[i]['type'] = 1

+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -201,7 +201,7 @@
201 201
               }
202 202
               this.prescriptions.push(obj)
203 203
             }
204
-           
204
+
205 205
             this.$refs.prescriptions.setData(this.prescriptions)
206 206
           }
207 207
         })