Browse Source

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

XMLWAN 4 years ago
parent
commit
7b7b4c23b0

+ 26 - 0
src/api/his/his.js View File

106
 }
106
 }
107
 
107
 
108
 
108
 
109
+export function getHisOrderList() {
110
+  return request({
111
+    url: "/api/hisorder/list",
112
+    method: "get",
113
+  });
114
+}
115
+
116
+
117
+export function getHisOrder(params) {
118
+  return request({
119
+    url: "/api/hisorder/get",
120
+    method: "get",
121
+    params:params,
122
+  });
123
+}
124
+
125
+
126
+export function getHisPrescriptionList() {
127
+  return request({
128
+    url: "/api/hisprescription/list",
129
+    method: "get",
130
+  });
131
+}
132
+
133
+
134
+
109
 
135
 
110
 
136
 
111
 
137
 

+ 1 - 3
src/xt_pages/management/components/MultipleForm.vue View File

137
             align="center"
137
             align="center"
138
             type="index"
138
             type="index"
139
           >
139
           >
140
-            <!-- <template slot-scope="scope">
141
-                {{ scope.row.id }}
142
-              </template>-->
140
+
143
           </el-table-column>
141
           </el-table-column>
144
           <el-table-column prop="name" label="分区" width="60" align="center">
142
           <el-table-column prop="name" label="分区" width="60" align="center">
145
             <template slot-scope="scope">{{ scope.row.name }}</template>
143
             <template slot-scope="scope">{{ scope.row.name }}</template>

+ 27 - 95
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

4
               :row-style="{ color: '#303133' }"
4
               :row-style="{ color: '#303133' }"
5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
       <el-table-column align="center" prop="name" label="名称">
6
       <el-table-column align="center" prop="name" label="名称">
7
-        <template slot-scope="scope">{{ scope.row.advice_name }}</template>
7
+        <template slot-scope="scope">{{ scope.row.drug_name }}</template>
8
       </el-table-column>
8
       </el-table-column>
9
 
9
 
10
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
10
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
15
       </el-table-column>
15
       </el-table-column>
16
       <el-table-column align="center" prop="name" width="50" label="用法">
16
       <el-table-column align="center" prop="name" width="50" label="用法">
17
         <template slot-scope="scope">
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>
18
+          <el-input v-model="scope.row.delivery_way" readonly></el-input>
19
+
26
         </template>
20
         </template>
27
       </el-table-column>
21
       </el-table-column>
28
       <el-table-column align="center" prop="name" width="50" label="频率">
22
       <el-table-column align="center" prop="name" width="50" label="频率">
29
         <template slot-scope="scope">
23
         <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>
24
+          <el-input v-model="scope.row.execution_frequency" readonly></el-input>
38
         </template>
25
         </template>
39
       </el-table-column>
26
       </el-table-column>
40
 
27
 
42
         <template slot-scope="scope">
29
         <template slot-scope="scope">
43
           <div style="display:flex;">
30
           <div style="display:flex;">
44
             <el-input v-model="scope.row.prescribing_number" style="width:50%" readonly placeholder=""></el-input>
31
             <el-input v-model="scope.row.prescribing_number" style="width:50%" readonly placeholder=""></el-input>
45
-            <div> {{scope.row.min_unit}}</div>
32
+            <div>{{scope.row.min_unit}}</div>
46
           </div>
33
           </div>
47
         </template>
34
         </template>
48
       </el-table-column>
35
       </el-table-column>
49
       <el-table-column align="center" prop="name" width="50" label="单价">
36
       <el-table-column align="center" prop="name" width="50" label="单价">
50
         <template slot-scope="scope">
37
         <template slot-scope="scope">
51
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
38
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
52
         </template>
39
         </template>
53
       </el-table-column>
40
       </el-table-column>
54
       <el-table-column align="center" prop="name" width="50" label="备注">
41
       <el-table-column align="center" prop="name" width="50" label="备注">
62
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
49
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
63
 
50
 
64
       <el-table-column align="center" prop="project_name" label="名称">
51
       <el-table-column align="center" prop="project_name" label="名称">
65
-        <template slot-scope="scope">{{ scope.row.project.project_name }}</template>
52
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
66
       </el-table-column>
53
       </el-table-column>
67
       <el-table-column align="center" prop="statistical_classification" width="50" label="组">
54
       <el-table-column align="center" prop="statistical_classification" width="50" label="组">
68
         <template slot-scope="scope">
55
         <template slot-scope="scope">
69
-          {{getGroup(scope.row.project.statistical_classification)}}
56
+          {{getGroup(scope.row.statistical_classification)}}
70
         </template>
57
         </template>
71
       </el-table-column>
58
       </el-table-column>
72
       <el-table-column align="center" prop="single_dose" width="130" :label="'单次\n用量'">
59
       <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>-->
60
+        <template slot-scope="scope">
61
+          <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
62
+        </template>
76
       </el-table-column>
63
       </el-table-column>
77
       <el-table-column align="center" prop="delivery_way" width="130" label="用法">
64
       <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>-->
65
+        <template slot-scope="scope">
66
+          <el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>
67
+        </template>
81
       </el-table-column>
68
       </el-table-column>
82
       <el-table-column align="center" prop="execution_frequency" width="130" label="频率">
69
       <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>-->
70
+        <template slot-scope="scope">
71
+          <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
72
+        </template>
86
       </el-table-column>
73
       </el-table-column>
87
       <el-table-column align="center" prop="number_days" width="130" label="天数">
74
       <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>-->
75
+        <template slot-scope="scope">
76
+          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
77
+        </template>
91
       </el-table-column>
78
       </el-table-column>
92
       <el-table-column align="center" prop="total" width="100" label="总量">
79
       <el-table-column align="center" prop="total" width="100" label="总量">
93
         <template slot-scope="scope">
80
         <template slot-scope="scope">
94
           <div style="display:flex;">
81
           <div style="display:flex;">
95
-            <el-input v-model="scope.row.project.total" style="width:50" placeholder="" readonly></el-input>
82
+            <el-input v-model="scope.row.total" style="width:50" placeholder="" readonly></el-input>
96
           </div>
83
           </div>
97
         </template>
84
         </template>
98
       </el-table-column>
85
       </el-table-column>
99
       <el-table-column align="center" prop="name" width="50" label="单价">
86
       <el-table-column align="center" prop="name" width="50" label="单价">
100
         <template slot-scope="scope">
87
         <template slot-scope="scope">
101
-          <el-input v-model="scope.row.project.price" placeholder="" readonly></el-input>
88
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
102
         </template>
89
         </template>
103
       </el-table-column>
90
       </el-table-column>
104
       <el-table-column align="center" prop="name" width="120" label="备注">
91
       <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>-->
92
+        <template slot-scope="scope">
93
+          <el-input v-model="scope.row.remark" readonly></el-input>
94
+        </template>
108
       </el-table-column>
95
       </el-table-column>
109
     </el-table>
96
     </el-table>
110
   </div>
97
   </div>
136
         } else {
123
         } else {
137
           this.drugways = response.data.data.drugways
124
           this.drugways = response.data.data.drugways
138
           this.efs = response.data.data.efs
125
           this.efs = response.data.data.efs
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
         }
126
         }
197
       })
127
       })
198
     }, methods:  {
128
     }, methods:  {
129
+
130
+
199
       getGroup(id){
131
       getGroup(id){
200
         var name = ""
132
         var name = ""
201
         var statistics_category =  getDictionaryDataConfig('system','statistics_category')
133
         var statistics_category =  getDictionaryDataConfig('system','statistics_category')

File diff suppressed because it is too large
+ 560 - 408
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue


+ 114 - 81
src/xt_pages/outpatientCharges/summary.vue View File

1
 <template>
1
 <template>
2
-    <div class="main-contain outpatientChargesManagement">
3
-        <div class="position">
4
-            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-        </div>
6
-        <div class="app-container">
7
-            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
-                <div>
9
-                    <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
10
-                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
11
-                    <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
12
-                        <el-option
13
-                        v-for="item in options"
14
-                        :key="item.value"
15
-                        :label="item.label"
16
-                        :value="item.value">
17
-                        </el-option>
18
-                    </el-select>
19
-                    <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
20
-                    <el-radio v-model="radio" label="1">明细</el-radio>
21
-                    <el-radio v-model="radio" label="2">汇总</el-radio>
22
-                </div>
23
-                <el-button size="small" type="primary">报表下载</el-button>
24
-            </div>
25
-            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
26
-                <el-table-column type="selection" width="55" align="center"></el-table-column>
27
-                <el-table-column align="center" prop="name" label="患者名字">
28
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
29
-                </el-table-column>
30
-                <el-table-column align="center" prop="name" label="处方号">
31
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
32
-                </el-table-column>
33
-                <el-table-column align="center" prop="name" label="创建时间">
34
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
35
-                </el-table-column>
36
-                <el-table-column align="center" prop="name" label="创建医生">
37
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
38
-                </el-table-column>
39
-                <el-table-column align="center" prop="name" label="项目名称">
40
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
41
-                </el-table-column>
42
-                <el-table-column align="center" prop="name" label="试管颜色">
43
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
44
-                </el-table-column>
45
-                <el-table-column align="center" prop="name" label="操作">
46
-                    <template slot-scope="scope">
47
-                        <el-button size="mini" type="primary" @click="toDetail">详情</el-button>
48
-                    </template>
49
-                </el-table-column>
50
-            </el-table>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+        <div>
9
+          <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
10
+                    class="filter-item"/>
11
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
+            搜索
13
+          </el-button>
14
+          <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
15
+            <el-option
16
+              v-for="item in options"
17
+              :key="item.value"
18
+              :label="item.label"
19
+              :value="item.value">
20
+            </el-option>
21
+          </el-select>
22
+          <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date"
23
+                          @change="handleScheduleDateChange" :editable="false" :clearable="false"
24
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间"
25
+                          align="right"></el-date-picker>
26
+          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
27
+          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
51
         </div>
28
         </div>
29
+        <!--<el-button size="small" type="primary">报表下载</el-button>-->
30
+      </div>
31
+      <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }"
32
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
33
+        <el-table-column
34
+          prop="date"
35
+          label="序号"
36
+          width="60"
37
+          align="center"
38
+          type="index"
39
+        >
40
+        </el-table-column>
41
+        <el-table-column align="center" prop="name" label="门诊/销售编号">
42
+          <template slot-scope="scope">{{ scope.row.number }}</template>
43
+        </el-table-column>
44
+        <el-table-column align="center" prop="name" label="患者名字">
45
+          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
46
+        </el-table-column>
47
+        <el-table-column align="center" prop="name" label="患者类型">
48
+          <template slot-scope="scope">{{'医保'}}</template>
49
+        </el-table-column>
50
+        <el-table-column align="center" prop="name" label="应收金额">
51
+          <template slot-scope="scope"></template>
52
+        </el-table-column>
53
+        <el-table-column align="center" prop="name" label="实收金额">
54
+          <template slot-scope="scope"></template>
55
+        </el-table-column>
56
+        <el-table-column align="center" prop="name" label="舍入金额">
57
+          <template slot-scope="scope"></template>
58
+        </el-table-column>
59
+        <el-table-column align="center" prop="name" label="收费日期">
60
+          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
61
+        </el-table-column>
62
+        <el-table-column align="center" prop="name" label="收费员">
63
+          <template slot-scope="scope">{{ scope.row.p_info.doctor }}</template>
64
+        </el-table-column>
65
+        <el-table-column align="center" prop="name" label="状态">
66
+          <template slot-scope="scope">
67
+            <div v-if="scope.row.order_status == 1">待结算</div>
68
+            <div v-if="scope.row.order_status == 2">已结算</div>
69
+            <div v-if="scope.row.order_status == 3">结算失败</div>
70
+          </template>
71
+        </el-table-column>
72
+        <el-table-column align="center" prop="name" label="操作">
73
+          <template slot-scope="scope">
74
+            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
75
+          </template>
76
+        </el-table-column>
77
+      </el-table>
52
     </div>
78
     </div>
79
+  </div>
53
 </template>
80
 </template>
54
 
81
 
55
 
82
 
56
 <script>
83
 <script>
57
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
-export default {
59
-    components:{
60
-        BreadCrumb,
84
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
+  import { getHisOrderList } from '@/api/his/his'
86
+  import { uParseTime } from '@/utils/tools'
87
+
88
+  export default {
89
+    components: {
90
+      BreadCrumb
61
     },
91
     },
62
-    data(){
63
-        return{
64
-            crumbs: [
65
-                { path: false, name: '门诊收费' },
66
-                { path: false, name: '项目消费明细汇总' }
67
-            ],
68
-            tableData: [{
69
-            date: '2016-05-02',
70
-            name: '王小虎',
71
-            address: '上海市普陀区金沙江路 1518 弄'
72
-            }, {
73
-            date: '2016-05-04',
74
-            name: '王小虎',
75
-            address: '上海市普陀区金沙江路 1517 弄'
76
-            }, {
77
-            date: '2016-05-01',
78
-            name: '王小虎',
79
-            address: '上海市普陀区金沙江路 1519 弄'
80
-            }, {
81
-            date: '2016-05-03',
82
-            name: '王小虎',
83
-            address: '上海市普陀区金沙江路 1516 弄'
84
-            }]
85
-        }
92
+    data() {
93
+      return {
94
+        crumbs: [
95
+          { path: false, name: '门诊收费' },
96
+          { path: false, name: '项目消费明细汇总' }
97
+        ],
98
+        tableData: []
99
+      }
86
     },
100
     },
87
-    methods:{
88
-        toDetail(){
89
-            this.$router.push('/outpatientCharges/summaryDetail')
101
+    methods: {
102
+      getTimes(time) {
103
+        return uParseTime(time, "{y}-{m}-{d}");
104
+      },
105
+      toDetail(row) {
106
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number)
107
+      }, getTime(value, temp) {
108
+        if (value != undefined) {
109
+          return uParseTime(value, temp)
90
         }
110
         }
111
+        return ''
112
+      }
113
+    }, created() {
114
+      getHisOrderList().then(response => {
115
+        if (response.data.state == 0) {
116
+          this.$message.error(response.data.msg)
117
+          return false
118
+        } else {
119
+          this.tableData = response.data.data.order
120
+
121
+        }
122
+      })
123
+
91
     }
124
     }
92
-}
125
+  }
93
 </script>
126
 </script>

+ 174 - 88
src/xt_pages/outpatientCharges/summaryDetail.vue View File

7
             <div class="mainCenter">
7
             <div class="mainCenter">
8
                 <div class="centerLeft">
8
                 <div class="centerLeft">
9
                     <div class="tabsBox">
9
                     <div class="tabsBox">
10
-                        <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
11
-                        <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" :before-leave="moreState">
12
-                            <el-tab-pane
13
-                                v-for="(item, index) in editableTabs"
14
-                                :key="index"
15
-                                :label="item.title"
16
-                                :name="item.name"
17
-                            >
18
-                                <div class="RP">Rp</div>
19
-                                <el-table :data="tableData" border style="width: 99%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
20
-                                    <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
21
-                                    <el-table-column align="center" prop="name" label="名称">
22
-                                        <template slot-scope="scope">{{ scope.row.date }}</template>
23
-                                    </el-table-column>
24
-                                    <el-table-column align="center" prop="name" width="50" label="组套">
25
-                                        <template slot-scope="scope">
26
-
27
-                                        </template>
28
-                                    </el-table-column>
29
-                                    <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
30
-                                        <template slot-scope="scope">
31
-
32
-                                        </template>
33
-                                    </el-table-column>
34
-                                    <el-table-column align="center" prop="name" width="50" label="用法">
35
-                                        <template slot-scope="scope">
36
-
37
-                                        </template>
38
-                                    </el-table-column>
39
-                                    <el-table-column align="center" prop="name" width="50" label="频率">
40
-                                        <template slot-scope="scope">
41
-
42
-                                        </template>
43
-                                    </el-table-column>
44
-                                    <el-table-column align="center" prop="name" width="50" label="天数">
45
-                                        <template slot-scope="scope">
46
-
47
-                                        </template>
48
-                                    </el-table-column>
49
-                                    <el-table-column align="center" prop="name" width="100" label="总量">
50
-                                        <template slot-scope="scope">
51
-
52
-                                        </template>
53
-                                    </el-table-column>
54
-                                    <el-table-column align="center" prop="name" width="50" label="单价">
55
-                                        <template slot-scope="scope">
56
-
57
-                                        </template>
58
-                                    </el-table-column>
59
-                                    <el-table-column align="center" prop="name" width="50" label="备注">
60
-                                        <template slot-scope="scope">
61
-
62
-                                        </template>
63
-                                    </el-table-column>
64
-                                </el-table>
65
-                            </el-tab-pane>
66
-                        </el-tabs>
10
+                      <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
11
+                        <el-tab-pane
12
+                          v-for="(item, index) in prescriptions"
13
+                          :key="index"
14
+                          :label="item.name"
15
+                          :name="item.name"
16
+                        >
17
+                        </el-tab-pane>
18
+
19
+                        <div class="RP">
20
+                          Rp
21
+                        </div>
22
+                        <prescription-table ref="prescription_tables"
23
+                                            :prescription="curPrescriptions"></prescription-table>
24
+
25
+                      </el-tabs>
67
 
26
 
68
                     </div>
27
                     </div>
69
                     <div class="costBox">
28
                     <div class="costBox">
70
-                        <span>处方编号:2134348971237883</span>
71
-                        <span>当前处方总费用:<span style="color:red;">0.00元</span></span>
72
-                        <span>已收费</span>
29
+                      <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
30
+                      <span>{{ state }}</span>
73
                     </div>
31
                     </div>
74
                 </div>
32
                 </div>
75
                 <div class="centerRight">
33
                 <div class="centerRight">
76
                     <p class="centerRightTitle">人员信息</p>
34
                     <p class="centerRightTitle">人员信息</p>
77
                     <ul class="basicUl">
35
                     <ul class="basicUl">
78
-                        <li style="width:50%;">姓名:张三</li>
79
-                        <li style="width:50%;">性别:男</li>
80
-                        <li style="width:50%;">年龄:12</li>
81
-                        <li style="width:50%;">身高:123</li>
82
-                        <li style="width:50%;">体重:44kg</li>
83
-                        <li style="width:50%;">电话:348971237883</li>
36
+                        <li style="width:50%;">姓名:{{patientInfo.name}}</li>
37
+                        <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
38
+                        <li style="width:50%;">年龄:{{patientInfo.age }}</li>
39
+                        <li style="width:50%;">身高:{{patientInfo.height?patientInfo.height:''}}</li>
40
+                        <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
41
+                        <li style="width:50%;">电话:{{patientInfo.phone}}</li>
84
                     </ul>
42
                     </ul>
85
                     <p class="centerRightTitle">收费信息</p>
43
                     <p class="centerRightTitle">收费信息</p>
86
                     <ul class="basicUl">
44
                     <ul class="basicUl">
104
 
62
 
105
 <script>
63
 <script>
106
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
64
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
65
+import { getHisOrder } from '@/api/his/his'
66
+import prescriptionTable from './components/prescriptionTable'
67
+
107
 export default {
68
 export default {
108
     components:{
69
     components:{
109
         BreadCrumb,
70
         BreadCrumb,
71
+      prescriptionTable,
72
+
110
     },
73
     },
111
     data(){
74
     data(){
112
         return{
75
         return{
114
                 { path: false, name: '门诊收费' },
77
                 { path: false, name: '门诊收费' },
115
                 { path: false, name: '项目消费明细汇总详情' }
78
                 { path: false, name: '项目消费明细汇总详情' }
116
             ],
79
             ],
117
-            tableData: [{
118
-            date: '2016-05-02',
119
-            name: '王小虎',
120
-            address: '上海市普陀区金沙江路 1518 弄'
121
-            }, {
122
-            date: '2016-05-04',
123
-            name: '王小虎',
124
-            address: '上海市普陀区金沙江路 1517 弄'
125
-            }, {
126
-            date: '2016-05-01',
127
-            name: '王小虎',
128
-            address: '上海市普陀区金沙江路 1519 弄'
129
-            }, {
130
-            date: '2016-05-03',
131
-            name: '王小虎',
132
-            address: '上海市普陀区金沙江路 1516 弄'
133
-            }],
134
-            editableTabsValue: '1',
135
-            editableTabs: [{
80
+          info: {},
81
+          curPrescriptions: {},
82
+          prescriptions: [],
83
+          record_date: '',
84
+          tableData: [],
85
+          editableTabsValue: '1',
86
+          loadingone: false,
87
+          editableTabs: [{
136
             title: '处方1',
88
             title: '处方1',
137
-            name: '1',
138
-            }],
139
-            tabIndex: 1,
89
+            name: '1'
90
+          }],
91
+          tabIndex: 1,
92
+          hisPatientInfo: {},
93
+          loadingtwo: false,
94
+          patientTableData: [{
95
+            name: '杨美英',
96
+            mdtrt_id: '1709946'
97
+          }],
98
+          patientInfo: { id: 0 },
99
+          doctor: {},
100
+          total: 0,
101
+          state: '未收费',
102
+          radio: 1,
103
+          radioStatus: 1,
104
+          search_input: '',
105
+        }
106
+    },created(){
107
+      this.GetOrderDetail()
108
+  },methods:{
109
+
110
+    tabclickEvent(val) {
111
+      for (let i = 0; i < this.prescriptions.length; i++) {
112
+        if (this.prescriptions[i].name == val.name) {
113
+          this.curPrescriptions = {}
114
+          var temp = this.deepClone(this.prescriptions[i])
115
+          this.curPrescriptions = temp
116
+        }
117
+      }
118
+    }, deepClone(source) {
119
+      if (!source && typeof source !== 'object') {
120
+        throw new Error('error arguments', 'shallowClone')
121
+      }
122
+      const targetObj = source.constructor === Array ? [] : {}
123
+      Object.keys(source).forEach((keys) => {
124
+        if (source[keys] && typeof source[keys] === 'object') {
125
+          targetObj[keys] = this.deepClone(source[keys])
126
+        } else {
127
+          targetObj[keys] = source[keys]
128
+        }
129
+      })
130
+      return targetObj
131
+    },
132
+    getTotal() {
133
+      var total = 0
134
+      for (let i = 0; i < this.prescriptions.length; i++) {
135
+        if (this.prescriptions[i].advices != null) {
136
+          for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
137
+            total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
138
+          }
139
+        }
140
+        if (this.prescriptions[i].project != null) {
141
+          for (let b = 0; b < this.prescriptions[i].project.length; b++) {
142
+            total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
143
+          }
144
+        }
145
+      }
146
+      return total
147
+    },
148
+    moreState(tab, event) {
149
+      if (tab == 'more') {
150
+        return false
151
+      }
152
+    },
153
+    GetOrderDetail(){
154
+      let params={
155
+        number:this.$route.query.number,
156
+        patient_id:this.$route.query.patient_id,
157
+      }
158
+      getHisOrder(params).then(response => {
159
+        if (response.data.state == 0) {
160
+          this.$message.error(response.data.msg)
161
+          return false
162
+        } else {
163
+          this.patientInfo = response.data.data.order.patient
164
+          this.hisPatientInfo = response.data.data.order.his_patient
165
+          this.info = response.data.data.p_info
166
+          this.prescriptions = []
167
+          for (let i = 0; i < response.data.data.prescription.length; i++) {
168
+            var prescription = response.data.data.prescription[i]
169
+
170
+            let tempAdvice = []
171
+            let tempProject = []
172
+
173
+            for (let b = 0; b < prescription.advices.length; b++) {
174
+              let obj = {
175
+                advice_id: prescription.advices[b].id,
176
+                drug_name: prescription.advices[b].advice_name,
177
+                single_dose: prescription.advices[b].single_dose,
178
+                delivery_way: prescription.advices[b].delivery_way,
179
+                execution_frequency: prescription.advices[b].execution_frequency,
180
+                retail_price: prescription.advices[b].price.toString(),
181
+                remark: prescription.advices[b].remark,
182
+                prescribing_number: prescription.advices[b].prescribing_number.toString(),
183
+                single_dose_unit: prescription.advices[b].single_dose_unit,
184
+                prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
185
+                min_unit: prescription.advices[b].single_dose_unit,
186
+                medical_insurance_number: prescription.advices[b].med_list_codg
187
+
188
+              }
189
+              tempAdvice.push(obj)
190
+            }
191
+
192
+            for (let b = 0; b < prescription.project.length; b++) {
193
+              console.log(prescription.project[b].project.project_name)
194
+              let obj = {
195
+                id: prescription.project[b].id,
196
+                project_id: prescription.project[b].project.id,
197
+                project_name: prescription.project[b].project.project_name,
198
+                statistical_classification: prescription.project[b].statistical_classification,
199
+                single_dose: prescription.project[b].single_dose,
200
+                delivery_way: prescription.project[b].delivery_way,
201
+                execution_frequency: prescription.project[b].execution_frequency,
202
+                number_days: prescription.project[b].day,
203
+                total: prescription.project[b].count.toString(),
204
+                price: prescription.project[b].price,
205
+                remark: prescription.project[b].remark,
206
+                medical_code: prescription.project[b].project.medical_code
207
+              }
208
+              tempProject.push(obj)
209
+            }
210
+            let index = i + 1
211
+            let obj = {
212
+              id: prescription.id,
213
+              name: '处方' + index,
214
+              advices: tempAdvice,
215
+              project: tempProject,
216
+              type: response.data.data.prescription[i].type
217
+            }
218
+            this.prescriptions.push(obj)
219
+            this.curPrescriptions = this.prescriptions[0]
220
+
221
+          }
222
+          // this.tableData = response.data.data.order
223
+
140
         }
224
         }
225
+      })
141
     }
226
     }
227
+  }
142
 }
228
 }
143
 </script>
229
 </script>
144
 
230
 

+ 284 - 92
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

1
 <template>
1
 <template>
2
-  <div style="height: calc(100% - 36px);display: flex;flex-direction: column;">
3
-    <div style="border-top:1px solid #e5e5e5;margin-top:5px;">
2
+  <div style="height: calc(100% - 36px);display: flex;flex-direction: column;margin-top: 36px;">
3
+    <!-- <div style="border-top:1px solid #e5e5e5;margin-top:5px;">
4
       <div class="mainCell" style="margin-bottom:10px;float:right">
4
       <div class="mainCell" style="margin-bottom:10px;float:right">
5
         <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
5
         <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
6
         <el-button size="small" @click="open(2)" type="primary">打印</el-button>
6
         <el-button size="small" @click="open(2)" type="primary">打印</el-button>
7
         <el-button size="small" @click="open(4)" type="primary">选择模板</el-button>
7
         <el-button size="small" @click="open(4)" type="primary">选择模板</el-button>
8
         <el-button size="small" @click="open(5)" type="primary">存模板</el-button>
8
         <el-button size="small" @click="open(5)" type="primary">存模板</el-button>
9
       </div>
9
       </div>
10
-    </div>
10
+    </div> -->
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">
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-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>
23
-          </el-form-item>
24
-          <el-form-item label="挂号类型: " prop="name">
25
-            <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
25
+            <el-select style="margin-right:5px;" v-model="register_type" placeholder="">
26
               <el-option
26
               <el-option
27
-                v-for="(item,index) in doctors"
27
+                v-for="(item,index) in getDictionaryDataConfig('system','register_type')"
28
                 :key="index"
28
                 :key="index"
29
-                :label="item.user_name"
30
-                :value="item.id">
29
+                :label="item.name"
30
+                :value="item.name">
31
               </el-option>
31
               </el-option>
32
             </el-select>
32
             </el-select>
33
           </el-form-item>
33
           </el-form-item>
40
               placeholder="请输入内容"
40
               placeholder="请输入内容"
41
             ></el-autocomplete>
41
             ></el-autocomplete>
42
           </el-form-item>
42
           </el-form-item>
43
-          <el-form-item label="特殊病史: " prop="name">
43
+          <el-form-item label="过敏史及特殊病史: " prop="name">
44
             <el-autocomplete
44
             <el-autocomplete
45
               style="width:100%;"
45
               style="width:100%;"
46
               class="inline-input"
46
               class="inline-input"
78
               v-for="(item,index) in doctors"
78
               v-for="(item,index) in doctors"
79
               :key="index"
79
               :key="index"
80
               :label="item.user_name"
80
               :label="item.user_name"
81
-              :value="item.id">
81
+              :value="item.user_name">
82
             </el-option>
82
             </el-option>
83
           </el-select>
83
           </el-select>
84
           <span>科室:</span>
84
           <span>科室:</span>
85
           <el-select style="margin-right:5px;" v-model="departmentValue" placeholder="">
85
           <el-select style="margin-right:5px;" v-model="departmentValue" placeholder="">
86
             <el-option
86
             <el-option
87
-              v-for="(item,index) in departMent"
87
+              v-for="(item,index) in getDictionaryDataConfig('system','department')"
88
               :key="index"
88
               :key="index"
89
               :label="item.name"
89
               :label="item.name"
90
-              :value="item.id">
90
+              :value="item.name">
91
             </el-option>
91
             </el-option>
92
           </el-select>
92
           </el-select>
93
           <span>总计:</span>
93
           <span>总计:</span>
100
           <p :class="rightTab == 2 ? 'activeP' : ''" @click="clickTab(2)">项目</p>
100
           <p :class="rightTab == 2 ? 'activeP' : ''" @click="clickTab(2)">项目</p>
101
         </div>
101
         </div>
102
         <template>
102
         <template>
103
-          <!--<div style="margin-top:5px;">-->
104
-          <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
105
-          <!--<el-select style="float: right;width: 49%;" v-model="value" placeholder="">-->
106
-          <!--<el-option-->
107
-          <!--v-for="item in options"-->
108
-          <!--:key="item.value"-->
109
-          <!--:label="item.label"-->
110
-          <!--:value="item.value">-->
111
-          <!--</el-option>-->
112
-          <!--</el-select>-->
113
-          <!--</div>-->
114
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
103
           <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
115
             <el-tabs class="rightTabs" v-model="activeName">
104
             <el-tabs class="rightTabs" v-model="activeName">
116
               <el-tab-pane label="药品列表" name="1">
105
               <el-tab-pane label="药品列表" name="1">
106
+                <div style="margin-bottom:5px;">
107
+                  <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
108
+                  <el-select style="margin-right:5px;width:100px;" v-model="value" placeholder="" @change="changeKind">
109
+                    <el-option
110
+                      label="全部"
111
+                      value="0">
112
+                    </el-option>
113
+                    <el-option
114
+                      v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
115
+                      :key="index"
116
+                      :label="item.name"
117
+                      :value="item.id">
118
+                    </el-option>
119
+                  </el-select>
120
+                </div>
117
                 <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;"
121
                 <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;"
118
                           :row-style="{ color: '#303133' }"
122
                           :row-style="{ color: '#303133' }"
119
                           @select-all="changeAllGoodInfoTableData"
123
                           @select-all="changeAllGoodInfoTableData"
133
 
137
 
134
               </el-tab-pane>
138
               </el-tab-pane>
135
               <el-tab-pane label="医嘱模板" name="2">
139
               <el-tab-pane label="医嘱模板" name="2">
140
+                <div style="margin-bottom:5px;">
141
+                  <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
142
+                  <el-select style="float: right;width: 49%;" v-model="value" placeholder="">
143
+                      <el-option
144
+                      v-for="item in options"
145
+                      :key="item.value"
146
+                      :label="item.label"
147
+                      :value="item.value">
148
+                      </el-option>
149
+                  </el-select>
150
+                </div>
136
                 <el-table ref="multipleTableTwo" :data="advices_template" border style="width: 100%;"
151
                 <el-table ref="multipleTableTwo" :data="advices_template" border style="width: 100%;"
137
                           :row-style="{ color: '#303133' }"
152
                           :row-style="{ color: '#303133' }"
138
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
153
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
190
           </div>
205
           </div>
191
 
206
 
192
           <div class="comfirmBox">
207
           <div class="comfirmBox">
193
-            <div>
208
+            <!-- <div>
194
               <span>药品类型:</span>
209
               <span>药品类型:</span>
195
               <el-select style="margin-right:5px;width:100px;" v-model="value" placeholder="" @change="changeKind">
210
               <el-select style="margin-right:5px;width:100px;" v-model="value" placeholder="" @change="changeKind">
196
                 <el-option
211
                 <el-option
204
                   :value="item.id">
219
                   :value="item.id">
205
                 </el-option>
220
                 </el-option>
206
               </el-select>
221
               </el-select>
207
-            </div>
222
+            </div> -->
208
             <el-button type="primary" size="small" @click="comfirm">确定添加</el-button>
223
             <el-button type="primary" size="small" @click="comfirm">确定添加</el-button>
209
           </div>
224
           </div>
210
         </template>
225
         </template>
222
     createHisPrescription,
237
     createHisPrescription,
223
     delHisPrescription,
238
     delHisPrescription,
224
     getInitData,
239
     getInitData,
240
+    getPatientInfo,
241
+    getSchedulePatientList,
242
+
225
   } from '@/api/his/his'
243
   } from '@/api/his/his'
226
   import { getDictionaryDataConfig } from '@/utils/data'
244
   import { getDictionaryDataConfig } from '@/utils/data'
227
   import prescriptionTable from './prescriptionTable'
245
   import prescriptionTable from './prescriptionTable'
228
   import selectTemplate from './selectTemplate'
246
   import selectTemplate from './selectTemplate'
229
   import saveTemplate from './saveTemplate'
247
   import saveTemplate from './saveTemplate'
230
   import additionalCharges from './additionalCharges'
248
   import additionalCharges from './additionalCharges'
231
-  import { getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
249
+  import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
232
 
250
 
233
   export default {
251
   export default {
234
     props: {
252
     props: {
236
       hisPatientInfo: Object,
254
       hisPatientInfo: Object,
237
       prescriptions: Array,
255
       prescriptions: Array,
238
       record_date: String,
256
       record_date: String,
257
+
239
       other_sick: {
258
       other_sick: {
240
         type: Array,
259
         type: Array,
241
         default: []
260
         default: []
253
     },
272
     },
254
     data() {
273
     data() {
255
       return {
274
       return {
275
+        register_type:"",
256
         value: '',
276
         value: '',
257
         form: {
277
         form: {
258
           name: ''
278
           name: ''
301
         for (let i = 0; i < this.prescriptions.length; i++) {
321
         for (let i = 0; i < this.prescriptions.length; i++) {
302
           if (this.prescriptions[i].advices != null) {
322
           if (this.prescriptions[i].advices != null) {
303
             for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
323
             for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
304
-              total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
324
+              total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
305
             }
325
             }
306
           }
326
           }
307
           if (this.prescriptions[i].project != null) {
327
           if (this.prescriptions[i].project != null) {
308
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
328
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
309
-              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
329
+              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
310
             }
330
             }
311
           }
331
           }
312
         }
332
         }
313
-        return total
333
+        return Math.floor(total * 100) / 100
314
       },
334
       },
315
       createFilter(queryString) {
335
       createFilter(queryString) {
316
         return (restaurant) => {
336
         return (restaurant) => {
365
             this.allDrugs = response.data.data.drugs
385
             this.allDrugs = response.data.data.drugs
366
             this.advices_template = response.data.data.advices_template
386
             this.advices_template = response.data.data.advices_template
367
             this.doctors = response.data.data.doctors
387
             this.doctors = response.data.data.doctors
368
-            this.departMent = response.data.data.department
388
+
369
 
389
 
370
           }
390
           }
371
         })
391
         })
376
           console.log(this.prescriptions[i].name)
396
           console.log(this.prescriptions[i].name)
377
           if (this.prescriptions[i].name == val.name) {
397
           if (this.prescriptions[i].name == val.name) {
378
             this.curPrescriptions = this.prescriptions[i]
398
             this.curPrescriptions = this.prescriptions[i]
399
+            this.teamList = []
400
+            this.curDrugs = []
401
+            this.$refs.multipleTable.clearSelection()
402
+            this.$refs.tables.clearSelection()
379
 
403
 
380
             //用来区分处方属于项目还是药品
404
             //用来区分处方属于项目还是药品
381
             if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
405
             if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
382
               this.customTabIndex = 1
406
               this.customTabIndex = 1
383
               this.curStatus = 1
407
               this.curStatus = 1
408
+              this.rightTab = 1
409
+              this.showOne = true
410
+              this.showTwo = false
384
             }
411
             }
385
             if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
412
             if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
386
 
413
 
387
               this.customTabIndex = 2
414
               this.customTabIndex = 2
388
               this.curStatus = 2
415
               this.curStatus = 2
416
+              this.rightTab = 2
417
+
418
+              this.showTwo = true
419
+              this.showOne = false
389
             }
420
             }
390
 
421
 
391
             if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
422
             if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
392
               this.customTabIndex = this.rightTab
423
               this.customTabIndex = this.rightTab
424
+              this.curStatus = 0
425
+
393
             }
426
             }
394
 
427
 
395
           }
428
           }
396
 
429
 
397
         }
430
         }
398
-      }, clearData() {
399
-
431
+      },
432
+      clearData() {
433
+        console.log("111111")
400
         this.curPrescriptions = []
434
         this.curPrescriptions = []
435
+        this.curStatus = 0
436
+        this.curDrugs = []
437
+        this.preDrugs = []
438
+        this.teamList = []
439
+
440
+
401
       },
441
       },
402
-      setData(data) {
442
+      setData(data,info) {
443
+        this.curStatus = 0
403
         this.prescriptions = data
444
         this.prescriptions = data
404
-        console.log(this.$refs)
405
-        this.$nextTick(() => {
406
-          this.$refs.prescription_tables.setNewData(this.prescriptions[0])
407
-        })
445
+        this.curPrescriptions = this.prescriptions[0]
446
+        if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0 ){
447
+          this.curStatus = 1
448
+          this.customTabIndex= 1
449
+          this.rightTab = 1
450
+          this.showOne = true
451
+          this.showTwo = false
452
+
453
+        }
454
+
455
+        if(this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0 ){
456
+          this.curStatus = 2
457
+          this.customTabIndex= 2
458
+          this.rightTab = 2
459
+          this.showOne = false
460
+          this.showTwo = true
461
+        }
462
+
463
+
464
+        this.state1 = info.diagnosis
465
+        this.state2 = info.sick_history
466
+        this.doctorValue = info.doctor
467
+        this.departmentValue = info.departments
468
+
469
+
470
+        // console.log(this.$refs)
471
+        // this.$nextTick(() => {
472
+        //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
473
+        // })
408
       },
474
       },
409
       moreState(tab, event) {
475
       moreState(tab, event) {
410
         if (tab == 'more') {
476
         if (tab == 'more') {
412
         }
478
         }
413
       },
479
       },
414
       open(index) {
480
       open(index) {
481
+        if(this.doctorValue.length <= 0){
482
+          this.$message.error("医生不能为空")
483
+          return
484
+        }
485
+
486
+        if(this.departmentValue.length <= 0){
487
+          this.$message.error("科室不能为空")
488
+          return
489
+        }
490
+
415
         if (index == 1) {
491
         if (index == 1) {
416
           let params = {
492
           let params = {
417
             patient_id: this.patientInfo.id,
493
             patient_id: this.patientInfo.id,
418
             diagnose: this.state1,
494
             diagnose: this.state1,
419
             sick_history: this.state2,
495
             sick_history: this.state2,
420
             doctor: this.doctorValue,
496
             doctor: this.doctorValue,
421
-            department: this.departmentValue,
497
+               department: this.departmentValue,
422
             record_date: this.record_date,
498
             record_date: this.record_date,
423
             his_patient_id: this.hisPatientInfo.id
499
             his_patient_id: this.hisPatientInfo.id
424
           }
500
           }
436
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
512
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
437
 
513
 
438
             }
514
             }
515
+
516
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
517
+              this.prescriptions[i].project[b].price = parseFloat(this.prescriptions[i].project[b].price)
518
+
519
+            }
439
           }
520
           }
440
           let data = {
521
           let data = {
441
             'prescriptions': this.prescriptions
522
             'prescriptions': this.prescriptions
442
           }
523
           }
443
           createHisPrescription(data, params).then(response => {
524
           createHisPrescription(data, params).then(response => {
444
             if (response.data.state == 1) {
525
             if (response.data.state == 1) {
445
-              this.prescriptions = []
526
+              // this.prescriptions = []
446
               this.$message.success('保存成功')
527
               this.$message.success('保存成功')
447
             }
528
             }
448
           })
529
           })
470
         this.curStatus = 0
551
         this.curStatus = 0
471
       },
552
       },
472
       removeTab(targetName) {
553
       removeTab(targetName) {
473
-        let id = 0
474
-        for (let i = 0; i < this.prescriptions.length; i++) {
475
-          if (this.prescriptions[i].name == targetName) {
476
-            id = this.prescriptions[i].id
554
+        this.$confirm("处方删除后不可恢复,是否确认删除", "删除", {
555
+          confirmButtonText: "确 定",
556
+          cancelButtonText: "取 消",
557
+          type: "warning"
558
+        }).then(() => {
559
+          let id = 0
560
+          for (let i = 0; i < this.prescriptions.length; i++) {
561
+            if (this.prescriptions[i].name == targetName) {
562
+              id = this.prescriptions[i].id
563
+            }
477
           }
564
           }
478
-        }
479
-
480
-        if (id == 0) {
481
-          let tabs = this.prescriptions
482
-          let activeName = this.editableTabsValue
483
-          if (activeName === targetName) {
484
-            tabs.forEach((tab, index) => {
485
-              if (tab.name === targetName) {
486
-                let nextTab = tabs[index + 1] || tabs[index - 1]
487
-                if (nextTab) {
488
-                  activeName = nextTab.name
489
 
565
 
566
+          if (id == 0) {
567
+            let tabs = this.prescriptions
568
+            let activeName = this.editableTabsValue
569
+            if (activeName === targetName) {
570
+              tabs.forEach((tab, index) => {
571
+                if (tab.name === targetName) {
572
+                  let nextTab = tabs[index + 1] || tabs[index - 1]
573
+                  if (nextTab) {
574
+                    activeName = nextTab.name
575
+
576
+                  }
577
+                }
578
+              })
579
+            }
580
+            this.editableTabsValue = activeName
581
+            this.prescriptions = tabs.filter(tab => tab.name !== targetName)
582
+
583
+            for (let i = 0; i < this.prescriptions.length; i++) {
584
+              if (activeName == this.prescriptions[i].name) {
585
+                this.curPrescriptions = this.prescriptions[i]
586
+                if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
587
+                  this.curStatus = 1
588
+                }
589
+                if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
590
+                  this.curStatus = 2
490
                 }
591
                 }
491
               }
592
               }
492
-            })
593
+            }
594
+            if (this.prescriptions.length == 0) {
595
+              this.curPrescriptions = []
596
+              this.curStatus = 0
597
+            }
493
           }
598
           }
494
-          this.editableTabsValue = activeName
495
-          this.prescriptions = tabs.filter(tab => tab.name !== targetName)
496
-
497
-          for (let i = 0; i < this.prescriptions.length; i++) {
498
-            if (activeName == this.prescriptions[i].name) {
499
-              this.curPrescriptions = this.prescriptions[i]
500
-              if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
501
-                this.curStatus = 1
502
-              }
503
-              if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
504
-                this.curStatus = 2
505
-              }
599
+          else {
600
+            let params = {
601
+              'id': id
506
             }
602
             }
603
+            delHisPrescription(params).then(response => {
604
+              if (response.data.state == 1) {
605
+                this.$message.success('删除成功')
606
+                let tabs = this.prescriptions
607
+                let activeName = this.editableTabsValue
608
+                if (activeName === targetName) {
609
+                  tabs.forEach((tab, index) => {
610
+                    if (tab.name === targetName) {
611
+                      let nextTab = tabs[index + 1] || tabs[index - 1]
612
+                      if (nextTab) {
613
+                        activeName = nextTab.name
614
+
615
+                      }
616
+                    }
617
+                  })
618
+                }
619
+                this.editableTabsValue = activeName
620
+                this.prescriptions = tabs.filter(tab => tab.name !== targetName)
621
+
622
+                for (let i = 0; i < this.prescriptions.length; i++) {
623
+                  if (activeName == this.prescriptions[i].name) {
624
+                    this.curPrescriptions = this.prescriptions[i]
625
+                    if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
626
+                      this.curStatus = 1
627
+                    }
628
+                    if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
629
+                      this.curStatus = 2
630
+                    }
631
+                  }
632
+                }
633
+                if (this.prescriptions.length == 0) {
634
+                  this.curPrescriptions = []
635
+                  this.curStatus = 0
636
+                }
637
+              } else {
638
+                this.$message.success(response.data.msg)
639
+              }
640
+            })
507
           }
641
           }
508
-          if (this.prescriptions.length == 0) {
509
-            this.curPrescriptions = []
510
-            this.curStatus = 0
642
+
643
+        })
644
+          .catch(() => {});
645
+
646
+
647
+
648
+      },
649
+      clickTab(index) {
650
+        if (index == 1){
651
+          if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
652
+            this.$message.error("当前处方为项目,无法切换为药品,需要新开处方")
653
+            return
511
           }
654
           }
512
-        } else {
513
-          let params = {
514
-            'id': id
655
+        }else{
656
+          if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
657
+            this.$message.error("当前处方为药品,无法切换为项目,需要新开处方")
658
+            return
515
           }
659
           }
516
-          delHisPrescription(params).then(response => {
517
-            if (response.data.state == 1) {
518
-              this.$message.success('删除成功')
519
-            } else {
520
-              this.$message.success(response.data.msg)
521
-            }
522
-          })
660
+
661
+
523
         }
662
         }
524
-      },
525
-      clickTab(index) {
663
+
526
         if (index == 1) {
664
         if (index == 1) {
665
+
666
+            this.teamList = []
667
+          this.$refs.tables.clearSelection()
668
+
527
           this.showOne = true
669
           this.showOne = true
528
           this.showTwo = false
670
           this.showTwo = false
529
           this.$nextTick(() => {
671
           this.$nextTick(() => {
532
           this.customTabIndex = 1
674
           this.customTabIndex = 1
533
         }
675
         }
534
         if (index == 2) {
676
         if (index == 2) {
677
+          this.curDrugs = []
678
+          this.$refs.multipleTable.clearSelection()
679
+
535
           this.showTwo = true
680
           this.showTwo = true
536
           this.showOne = false
681
           this.showOne = false
537
           this.$nextTick(() => {
682
           this.$nextTick(() => {
543
 
688
 
544
         //用来区分处方属于项目还是药品
689
         //用来区分处方属于项目还是药品
545
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
690
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
546
-
547
           this.customTabIndex = 1
691
           this.customTabIndex = 1
692
+          this.curStatus =1
693
+
548
         }
694
         }
549
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
695
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
550
-
551
           this.customTabIndex = 2
696
           this.customTabIndex = 2
697
+          this.curStatus =2
552
         }
698
         }
553
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
699
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
554
           // this.customTabIndex = this.rightTab
700
           // this.customTabIndex = this.rightTab
555
           this.customTabIndex = index
701
           this.customTabIndex = index
702
+          this.curStatus =0
703
+
556
         }
704
         }
705
+
706
+
557
       }, changeAllGoodInfoTableData: function(selection) {
707
       }, changeAllGoodInfoTableData: function(selection) {
558
         this.curDrugs = selection
708
         this.curDrugs = selection
559
       }, addCharges() {
709
       }, addCharges() {
563
         this.curDrugs = selection
713
         this.curDrugs = selection
564
       },
714
       },
565
       comfirm() {
715
       comfirm() {
566
-        console.log(this.curStatus)
567
-        console.log(this.rightTab)
568
-        console.log(this.curPrescriptions)
569
-
570
 
716
 
571
         if (this.curStatus == 1  && this.rightTab == 2) {
717
         if (this.curStatus == 1  && this.rightTab == 2) {
572
           this.$message.error('改处方是药品,无法添加项目')
718
           this.$message.error('改处方是药品,无法添加项目')
582
           return
728
           return
583
         }
729
         }
584
 
730
 
731
+        for (let i = 0; i < this.teamList.length; i++){
732
+          for (let a = 0; a < this.curPrescriptions.project.length; a++){
733
+            if(this.teamList[i].id == this.curPrescriptions.project[a].project_id){
734
+              this.$message.error('改处方存在相同的项目,无法添加相同的项目')
735
+              return
736
+
737
+            }
738
+          }
739
+        }
740
+
741
+        console.log(this.curDrugs)
742
+        console.log(this.curPrescriptions.advices)
743
+
744
+
745
+        for (let i = 0; i < this.curDrugs.length; i++){
746
+          for (let a = 0; a < this.curPrescriptions.advices.length; a++){
747
+            if(this.curDrugs[i].id == this.curPrescriptions.advices[i].id){
748
+              this.$message.error('改处方存在相同的药品,无法添加相同的药品')
749
+              return
750
+
751
+            }
752
+          }
753
+        }
754
+
755
+
756
+
757
+
585
         for (let i = 0; i < this.prescriptions.length; i++) {
758
         for (let i = 0; i < this.prescriptions.length; i++) {
586
           if (this.prescriptions[i].name == this.editableTabsValue) {
759
           if (this.prescriptions[i].name == this.editableTabsValue) {
587
             var temp = this.deepClone(this.curDrugs)
760
             var temp = this.deepClone(this.curDrugs)
588
             var temp2 = this.deepClone(this.teamList)
761
             var temp2 = this.deepClone(this.teamList)
589
 
762
 
763
+            console.log(temp2)
590
             if (temp.length > 0) {
764
             if (temp.length > 0) {
591
               for (let b = 0; b < temp.length; b++) {
765
               for (let b = 0; b < temp.length; b++) {
592
                 let obj = {
766
                 let obj = {
593
                   advice_id: 0,
767
                   advice_id: 0,
768
+                  id:  temp[b].id,
594
                   drug_name: temp[b].drug_name,
769
                   drug_name: temp[b].drug_name,
595
                   single_dose: temp[b].single_dose,
770
                   single_dose: temp[b].single_dose,
596
                   delivery_way: temp[b].delivery_way,
771
                   delivery_way: temp[b].delivery_way,
600
                   prescribing_number: temp[b].prescribing_number,
775
                   prescribing_number: temp[b].prescribing_number,
601
                   single_dose_unit: temp[b].min_unit,
776
                   single_dose_unit: temp[b].min_unit,
602
                   prescribing_number_unit: temp[b].min_unit,
777
                   prescribing_number_unit: temp[b].min_unit,
603
-                  min_unit: temp[b].min_unit
778
+                  min_unit: temp[b].min_unit,
779
+                  medical_insurance_number:temp[b].medical_insurance_number,
604
 
780
 
605
                 }
781
                 }
606
                 this.prescriptions[i].advices.push(obj)
782
                 this.prescriptions[i].advices.push(obj)
610
 
786
 
611
             if (temp2.length > 0) {
787
             if (temp2.length > 0) {
612
               for (let b = 0; b < temp2.length; b++) {
788
               for (let b = 0; b < temp2.length; b++) {
613
-                this.prescriptions[i].project.push(temp2[b])
789
+                let obj = {
790
+                  id: 0,
791
+                  project_id: temp2[b].id,
792
+                  project_name: temp2[b].project_name,
793
+                  statistical_classification: temp2[b].statistical_classification,
794
+                  single_dose: temp2[b].single_dose,
795
+                  delivery_way: temp2[b].delivery_way,
796
+                  execution_frequency: temp2[b].execution_frequency,
797
+                  number_days: temp2[b].number_days,
798
+                  total:temp2[b].total,
799
+                  price:temp2[b].price,
800
+                  remark:"",
801
+                  medical_code:temp2[b].medical_code,
802
+                }
803
+                console.log(obj)
804
+                this.prescriptions[i].project.push(obj)
614
               }
805
               }
615
               this.curStatus = 2
806
               this.curStatus = 2
616
             }
807
             }
808
+
617
             this.curPrescriptions = this.prescriptions[i]
809
             this.curPrescriptions = this.prescriptions[i]
618
             this.$refs.multipleTable.clearSelection()
810
             this.$refs.multipleTable.clearSelection()
619
             this.$refs.tables.clearSelection()
811
             this.$refs.tables.clearSelection()

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

1
 <template>
1
 <template>
2
-  <div class="deskRecord">
3
-    <div style="overflow:hidden;border-top:1px solid #e5e5e5;margin-top:5px;">
2
+  <div class="deskRecord" style="margin-top:36px;">
3
+    <!-- <div style="overflow:hidden;border-top:1px solid #e5e5e5;margin-top:5px;">
4
       <div class="mainCell" style="margin-bottom:10px;float:right">
4
       <div class="mainCell" style="margin-bottom:10px;float:right">
5
         <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
5
         <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
6
         <el-button size="small" @click="open(2)" type="primary">打印</el-button>
6
         <el-button size="small" @click="open(2)" type="primary">打印</el-button>
7
         <el-button size="small" @click="open(3)" type="primary">病历调用</el-button>
7
         <el-button size="small" @click="open(3)" type="primary">病历调用</el-button>
8
         <el-button size="small" @click="open(4)" type="primary">存模板</el-button>
8
         <el-button size="small" @click="open(4)" type="primary">存模板</el-button>
9
       </div>
9
       </div>
10
-    </div>
10
+    </div> -->
11
     <div class="backColor"></div>
11
     <div class="backColor"></div>
12
     <div class="mainTitle">基本信息:</div>
12
     <div class="mainTitle">基本信息:</div>
13
     <el-form class="basicForm" :model="patientInfo" ref="form" label-width="120px">
13
     <el-form class="basicForm" :model="patientInfo" ref="form" label-width="120px">

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

51
                                 <el-button type="primary" size="mini" @click="toHistoryDetail">详情</el-button>
51
                                 <el-button type="primary" size="mini" @click="toHistoryDetail">详情</el-button>
52
                             </template>
52
                             </template>
53
                         </el-table-column>
53
                         </el-table-column>
54
-                    </el-table> 
54
+                    </el-table>
55
                 </el-tab-pane> -->
55
                 </el-tab-pane> -->
56
                 <el-tab-pane label="病历模板" name="first">
56
                 <el-tab-pane label="病历模板" name="first">
57
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
57
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
108
             <el-button @click="hide">取 消</el-button>
108
             <el-button @click="hide">取 消</el-button>
109
             <el-button type="primary"  @click="submitAction()">保 存</el-button>
109
             <el-button type="primary"  @click="submitAction()">保 存</el-button>
110
         </div>
110
         </div>
111
-    </el-dialog>         
111
+    </el-dialog>
112
 </template>
112
 </template>
113
 
113
 
114
 <script>
114
 <script>
168
             const params = {
168
             const params = {
169
                keyword:this.search_input,
169
                keyword:this.search_input,
170
                start_time:this.start_time,
170
                start_time:this.start_time,
171
-               end_time:this.end_time  
171
+               end_time:this.end_time
172
             }
172
             }
173
           getHistoryTemplate(params).then(response=>{
173
           getHistoryTemplate(params).then(response=>{
174
             if(response.data.state == 1){
174
             if(response.data.state == 1){

+ 66 - 47
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

2
   <div class="prescriptionTable">
2
   <div class="prescriptionTable">
3
     <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
3
     <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
-      <el-table-column align="center" prop="name" label="名称">
5
+      <el-table-column align="center" prop="drug_name" label="名称">
6
         <template slot-scope="scope">{{ scope.row.drug_name }}</template>
6
         <template slot-scope="scope">{{ scope.row.drug_name }}</template>
7
       </el-table-column>
7
       </el-table-column>
8
 
8
 
9
-      <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
9
+      <el-table-column align="center" prop="single_dose" width="50" :label="'单次\n用量'">
10
         <template slot-scope="scope">
10
         <template slot-scope="scope">
11
           <el-input  v-model="scope.row.single_dose"></el-input>
11
           <el-input  v-model="scope.row.single_dose"></el-input>
12
           <div> {{scope.row.min_unit}}</div>
12
           <div> {{scope.row.min_unit}}</div>
13
         </template>
13
         </template>
14
       </el-table-column>
14
       </el-table-column>
15
-      <el-table-column align="center" prop="name" width="50" label="用法">
15
+      <el-table-column align="center" prop="delivery_way" width="50" label="用法">
16
         <template slot-scope="scope">
16
         <template slot-scope="scope">
17
           <el-select v-model="scope.row.delivery_way" placeholder="请选择">
17
           <el-select v-model="scope.row.delivery_way" placeholder="请选择">
18
             <el-option
18
             <el-option
24
           </el-select>
24
           </el-select>
25
         </template>
25
         </template>
26
       </el-table-column>
26
       </el-table-column>
27
-      <el-table-column align="center" prop="name" width="50" label="频率">
27
+      <el-table-column align="center" prop="execution_frequency" width="50" label="频率">
28
         <template slot-scope="scope">
28
         <template slot-scope="scope">
29
           <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
29
           <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
30
             <el-option
30
             <el-option
37
         </template>
37
         </template>
38
       </el-table-column>
38
       </el-table-column>
39
 
39
 
40
-      <el-table-column align="center" prop="name" width="100" label="总量">
40
+      <el-table-column align="center" prop="prescribing_number" width="100" label="总量">
41
         <template slot-scope="scope">
41
         <template slot-scope="scope">
42
           <div style="display:flex;">
42
           <div style="display:flex;">
43
             <el-input v-model="scope.row.prescribing_number" style="width:50%" placeholder=""></el-input>
43
             <el-input v-model="scope.row.prescribing_number" style="width:50%" placeholder=""></el-input>
45
           </div>
45
           </div>
46
         </template>
46
         </template>
47
       </el-table-column>
47
       </el-table-column>
48
-      <el-table-column align="center" prop="name" width="50" label="单价">
48
+      <el-table-column align="center" prop="retail_price" width="50" label="单价">
49
         <template slot-scope="scope">
49
         <template slot-scope="scope">
50
           <el-input v-model="scope.row.retail_price" placeholder=""></el-input>
50
           <el-input v-model="scope.row.retail_price" placeholder=""></el-input>
51
         </template>
51
         </template>
52
       </el-table-column>
52
       </el-table-column>
53
-      <el-table-column align="center" prop="name" width="50" label="备注">
53
+      <el-table-column align="center" prop="remark" width="50" label="备注">
54
         <template slot-scope="scope">
54
         <template slot-scope="scope">
55
           <el-input v-model="scope.row.remark" style="width:50%" placeholder=""></el-input>
55
           <el-input v-model="scope.row.remark" style="width:50%" placeholder=""></el-input>
56
         </template>
56
         </template>
196
         })
196
         })
197
 
197
 
198
       },deleteDrug:function(index, row){
198
       },deleteDrug:function(index, row){
199
-        console.log(row)
200
-       console.log(index)
201
 
199
 
202
-       if(row.advice_id == 0){
203
-          this.prescription.advices.splice(index, 1)
204
-        }else{
205
-          let params = {
206
-            'id': row.advice_id,
207
-          }
208
-          delHisAdvice(params).then(response => {
209
-            if (response.data.state == 0) {
210
-              this.$message.error(response.data.msg)
211
-              return false
212
-            } else {
213
-              var temp2 = this.deepClone(this.prescription.advices)
214
-              temp2.splice(index, 1)
215
-              this.prescription.advices = temp2
216
-              this.$message.success(response.data.data.msg)
217
-            }
218
-          })
200
+       this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
201
+         confirmButtonText: "确 定",
202
+         cancelButtonText: "取 消",
203
+         type: "warning"
204
+       }).then(() => {
205
+         this.$nextTick(function(){
206
+           // this.prescription.advices.splice(index, 1)
207
+           if(row.advice_id == 0){
208
+           }else{
209
+             let params = {
210
+               'id': row.advice_id,
211
+             }
212
+             delHisAdvice(params).then(response => {
213
+               if (response.data.state == 0) {
214
+                 this.$message.error(response.data.msg)
215
+                 return false
216
+               } else {
217
+                 var temp2 = this.deepClone(this.prescription.advices)
218
+                 temp2.splice(index, 1)
219
+                 this.prescription.advices = temp2
220
+                 this.$message.success(response.data.data.msg)
221
+               }
222
+             })
223
+
224
+
225
+           }
226
+
227
+         });
228
+
229
+
230
+       })
231
+         .catch(() => {});
232
+
233
+
219
 
234
 
220
 
235
 
221
-        }
222
 
236
 
223
       },deepClone(source) {
237
       },deepClone(source) {
224
        if (!source && typeof source !== 'object') {
238
        if (!source && typeof source !== 'object') {
255
          return name
269
          return name
256
       },
270
       },
257
       deleteProject(row){
271
       deleteProject(row){
258
-        if(row.id == 0){
259
-          this.prescription.project.splice(i, 1)
272
+        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
273
+          confirmButtonText: "确 定",
274
+          cancelButtonText: "取 消",
275
+          type: "warning"
276
+        }).then(() => {
277
+          if(row.id == 0){
278
+            this.prescription.project.splice(i, 1)
260
 
279
 
261
-        }else{
262
-          let params = {
263
-            'id': row.id,
264
-          }
265
-          delHisProject(params).then(response => {
266
-            if (response.data.state == 0) {
267
-              this.$message.error(response.data.msg)
268
-              return false
269
-            } else {
270
-              for (let i = 0; i < this.prescription.project.length; i++){
271
-                if(this.prescription.project[i].id == row.id){
272
-                  this.prescription.project.splice(i, 1)
280
+          }else{
281
+            let params = {
282
+              'id': row.id,
283
+            }
284
+            delHisProject(params).then(response => {
285
+              if (response.data.state == 0) {
286
+                this.$message.error(response.data.msg)
287
+                return false
288
+              } else {
289
+                for (let i = 0; i < this.prescription.project.length; i++){
290
+                  if(this.prescription.project[i].id == row.id){
291
+                    this.prescription.project.splice(i, 1)
292
+                  }
273
                 }
293
                 }
294
+                this.$message.success(response.data.data.msg)
274
               }
295
               }
275
-              this.$message.error(response.data.data.msg)
276
-            }
277
-          })
278
-
279
-
280
-        }
296
+            })
297
+          }
298
+        })
299
+          .catch(() => {});
281
 
300
 
282
       },
301
       },
283
     },mounted(){
302
     },mounted(){

+ 101 - 11
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

22
             搜索
22
             搜索
23
           </el-button>
23
           </el-button>
24
         </div>
24
         </div>
25
-        <div style="flex:1;overflow-y:auto;">
26
-          <el-table :data="patientTableData" @row-click='choosePatient' border style="width: 100%;"
25
+        <div>
26
+          <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' border style="width: 100%;"
27
                     :row-style="{ color: '#303133' }"
27
                     :row-style="{ color: '#303133' }"
28
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
28
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
29
                     highlight-current-row
29
                     highlight-current-row
40
       </div>
40
       </div>
41
       <div class="mainRight">
41
       <div class="mainRight">
42
         <div class="mainHeader">
42
         <div class="mainHeader">
43
-          <el-radio-group v-model="titleType" @change="changeTab">
43
+          <el-radio-group class="titleBox" v-model="titleType" @change="changeTab">
44
             <el-radio-button label="处方"></el-radio-button>
44
             <el-radio-button label="处方"></el-radio-button>
45
             <el-radio-button label="病历"></el-radio-button>
45
             <el-radio-button label="病历"></el-radio-button>
46
           </el-radio-group>
46
           </el-radio-group>
47
+          <div class="mainCell fixedCell" style="float:right" v-if="titleType == '处方'">
48
+            <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
49
+            <el-button size="small" @click="open(2)" type="primary">打印</el-button>
50
+            <el-button size="small" @click="open(4)" type="primary">选择模板</el-button>
51
+            <el-button size="small" @click="open(5)" type="primary">存模板</el-button>
52
+          </div>
53
+          <div class="mainCell fixedCell" style="float:right" v-if="titleType == '病历'">
54
+            <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
55
+            <el-button size="small" @click="open(2)" type="primary">打印</el-button>
56
+            <el-button size="small" @click="open(3)" type="primary">病历调用</el-button>
57
+            <el-button size="small" @click="open(4)" type="primary">存模板</el-button>
58
+          </div>
47
         </div>
59
         </div>
48
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
60
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
49
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
61
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
50
-        <desk-prescription :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
62
+        <desk-prescription  :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
51
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
63
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
52
                            :hisPatientInfo="hisPatientInfo"
64
                            :hisPatientInfo="hisPatientInfo"
53
                            v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
65
                            v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
76
     },
88
     },
77
     data() {
89
     data() {
78
       return {
90
       return {
91
+        tableHeight:'',
92
+        fullHeight: document.documentElement.clientHeight,
79
         prescriptions: [
93
         prescriptions: [
80
           {
94
           {
81
             name: '处方1',
95
             name: '处方1',
99
         case_history: {},
113
         case_history: {},
100
         patient_id: 0,
114
         patient_id: 0,
101
         diagnoses: [],
115
         diagnoses: [],
102
-        other_sick: []
116
+        other_sick: [],
117
+        info:{},
103
 
118
 
104
       }
119
       }
105
     },
120
     },
167
             this.patientInfo = response.data.data.xt_info
182
             this.patientInfo = response.data.data.xt_info
168
             this.hisPatientInfo = response.data.data.his_info
183
             this.hisPatientInfo = response.data.data.his_info
169
             this.case_history = response.data.data.case_history
184
             this.case_history = response.data.data.case_history
185
+
186
+            this.info = response.data.data.info
187
+
188
+
189
+
170
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
190
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
171
             if (this.case_history.temperature <= 0) {
191
             if (this.case_history.temperature <= 0) {
172
               this.case_history.temperature = ''
192
               this.case_history.temperature = ''
202
               for (let i = 0; i < response.data.data.prescription.length; i++) {
222
               for (let i = 0; i < response.data.data.prescription.length; i++) {
203
                 var prescription = response.data.data.prescription[i]
223
                 var prescription = response.data.data.prescription[i]
204
                 let tempAdvice = []
224
                 let tempAdvice = []
225
+                let tempProject = []
226
+
205
                 for (let b = 0; b < prescription.advices.length; b++) {
227
                 for (let b = 0; b < prescription.advices.length; b++) {
206
                   let obj = {
228
                   let obj = {
207
                     advice_id: prescription.advices[b].id,
229
                     advice_id: prescription.advices[b].id,
211
                     execution_frequency: prescription.advices[b].execution_frequency,
233
                     execution_frequency: prescription.advices[b].execution_frequency,
212
                     retail_price: prescription.advices[b].price.toString(),
234
                     retail_price: prescription.advices[b].price.toString(),
213
                     remark: prescription.advices[b].remark,
235
                     remark: prescription.advices[b].remark,
214
-                    prescribing_number:prescription.advices[b].prescribing_number,
236
+                    prescribing_number:prescription.advices[b].prescribing_number.toString(),
215
                     single_dose_unit:prescription.advices[b].single_dose_unit,
237
                     single_dose_unit:prescription.advices[b].single_dose_unit,
216
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
238
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
217
-                    min_unit:prescription.advices[b].single_dose_unit
218
-
239
+                    min_unit:prescription.advices[b].single_dose_unit,
240
+                    medical_insurance_number:prescription.advices[b].med_list_codg,
241
+                    id:prescription.advices[b].drug_id
219
                   }
242
                   }
220
                   tempAdvice.push(obj)
243
                   tempAdvice.push(obj)
221
                 }
244
                 }
245
+
246
+
247
+                for (let b = 0; b < prescription.project.length; b++) {
248
+                  console.log(prescription.project[b])
249
+                  console.log(prescription.project[b].project)
250
+                  let obj = {
251
+                    id: prescription.project[b].id,
252
+                    project_id: prescription.project[b].project.id,
253
+                    project_name: prescription.project[b].project.project_name,
254
+                    statistical_classification: prescription.project[b].project.statistical_classification,
255
+                    single_dose: prescription.project[b].single_dose,
256
+                    delivery_way: prescription.project[b].delivery_way,
257
+                    execution_frequency: prescription.project[b].execution_frequency,
258
+                    number_days: prescription.project[b].day,
259
+                    total:prescription.project[b].count.toString(),
260
+                    price:prescription.project[b].price,
261
+                    remark:prescription.project[b].remark,
262
+                    medical_code:prescription.project[b].project.medical_code,
263
+                  }
264
+                  tempProject.push(obj)
265
+                }
266
+
267
+
268
+
222
                 let index = i + 1
269
                 let index = i + 1
223
                 let obj = {
270
                 let obj = {
224
                   id: prescription.id,
271
                   id: prescription.id,
225
                   name: '处方' + index,
272
                   name: '处方' + index,
226
                   advices: tempAdvice,
273
                   advices: tempAdvice,
227
-                  project: prescription.project
274
+                  project: tempProject
228
                 }
275
                 }
229
                 this.prescriptions.push(obj)
276
                 this.prescriptions.push(obj)
230
               }
277
               }
238
               this.prescriptions.push(obj)
285
               this.prescriptions.push(obj)
239
             }
286
             }
240
 
287
 
241
-            this.$refs.prescriptions.setData(this.prescriptions)
288
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
242
           }
289
           }
243
         })
290
         })
244
 
291
 
274
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
321
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
275
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
322
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
276
 
323
 
324
+      console.log('1222232434234',document.documentElement.clientHeight)
325
+      let tableHeight = document.body.clientHeight - 263
326
+      this.tableHeight = tableHeight
277
 
327
 
278
-
328
+    },
329
+    mounted(){
330
+      const that = this
331
+      window.onresize = () => {
332
+        return (() => {
333
+          window.fullHeight = document.documentElement.clientHeight
334
+          that.fullHeight = window.fullHeight
335
+        })()
336
+      }
337
+    },
338
+    watch: {
339
+      fullHeight (val) {
340
+        if(!this.timer) {
341
+          this.fullHeight = val
342
+          let tableHeight = val - 263
343
+          this.tableHeight = tableHeight
344
+          this.timer = true
345
+          let that = this
346
+          setTimeout(function (){
347
+            that.timer = false
348
+          },400)
349
+        }
350
+      }
279
     }
351
     }
280
   }
352
   }
281
 </script>
353
 </script>
427
     align-items: center;
499
     align-items: center;
428
     justify-content: space-between;
500
     justify-content: space-between;
429
   }
501
   }
502
+  .mainHeader{
503
+    width:100%;
504
+    background: #fff;
505
+    position: fixed;
506
+    z-index: 100;
507
+    height: 36px;
508
+  }
509
+  .titleBox{
510
+    position: fixed;
511
+    z-index: 99;
512
+    background: #fff;
513
+  }
514
+  .fixedCell{
515
+    position: fixed;
516
+    z-index: 99;
517
+    right: 30px;
518
+    background: #fff;
519
+  }
430
 </style>
520
 </style>
431
 
521
 
432
 <style lang="scss">
522
 <style lang="scss">

+ 112 - 91
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

1
 <template>
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">
7
-            <div class="cell clearfix">
8
-                <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
9
-                <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
10
-                <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
11
-            </div>
12
-            <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>
13
-                <el-table-column align="center" width="60" label="序号">
14
-                    <template slot-scope="scope">
15
-                        1
16
-                    </template>
17
-                </el-table-column>
18
-                <el-table-column align="center" prop="name" label="姓名" width="100">
19
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
20
-                </el-table-column>
21
-                <el-table-column align="center" prop="name" label="处方日期" width="110">
22
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
23
-                </el-table-column>
24
-                <el-table-column align="center" prop="name" label="患者类型">
25
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
26
-                </el-table-column>
27
-                <el-table-column align="center" prop="name" label="处方号">
28
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
29
-                </el-table-column>
30
-                <el-table-column align="center" prop="name" label="开立医生">
31
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
32
-                </el-table-column>
33
-                <el-table-column align="center" prop="name" label="诊断">
34
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
35
-                </el-table-column>
36
-                <el-table-column align="center" prop="name" label="状态">
37
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
38
-                </el-table-column>
39
-                <el-table-column align="center" prop="name" label="操作" width="100">
40
-                    <template slot-scope="scope">
41
-                        <el-button size="mini" type="primary" @click="handerDelete">详情</el-button>
42
-                    </template>
43
-                </el-table-column>
44
-            </el-table>
45
-            <el-pagination
46
-                @size-change="handleSizeChange"
47
-                @current-change="handleCurrentChange"
48
-                :page-sizes="[10, 50, 100]"
49
-                :page-size="10"
50
-                background
51
-                style="margin-top:20px;float: right"
52
-                layout="total, sizes, prev, pager, next, jumper"
53
-                :total="total"
54
-            >
55
-            </el-pagination>
56
-            <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
57
-        </div>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
58
     </div>
5
     </div>
6
+    <div class="app-container">
7
+      <div class="cell clearfix">
8
+        <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
9
+                  class="filter-item"/>
10
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
11
+        </el-button>
12
+        <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
+                        :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
+                        placeholder="选择日期时间" align="right"></el-date-picker>
15
+      </div>
16
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
17
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18
+        <el-table-column align="center" width="60" label="序号">
19
+          <template slot-scope="scope">
20
+            1
21
+          </template>
22
+        </el-table-column>
23
+        <el-table-column align="center" prop="name" label="姓名" width="100">
24
+          <template slot-scope="scope">{{ scope.row.date }}</template>
25
+        </el-table-column>
26
+        <el-table-column align="center" prop="name" label="处方日期" width="110">
27
+          <template slot-scope="scope">{{ scope.row.date }}</template>
28
+        </el-table-column>
29
+        <el-table-column align="center" prop="name" label="患者类型">
30
+          <template slot-scope="scope">{{ scope.row.date }}</template>
31
+        </el-table-column>
32
+        <el-table-column align="center" prop="name" label="处方号">
33
+          <template slot-scope="scope">{{ scope.row.date }}</template>
34
+        </el-table-column>
35
+        <el-table-column align="center" prop="name" label="开立医生">
36
+          <template slot-scope="scope">{{ scope.row.date }}</template>
37
+        </el-table-column>
38
+        <el-table-column align="center" prop="name" label="诊断">
39
+          <template slot-scope="scope">{{ scope.row.date }}</template>
40
+        </el-table-column>
41
+        <el-table-column align="center" prop="name" label="状态">
42
+          <template slot-scope="scope">{{ scope.row.date }}</template>
43
+        </el-table-column>
44
+        <el-table-column align="center" prop="name" label="操作" width="100">
45
+          <template slot-scope="scope">
46
+            <el-button size="mini" type="primary" @click="handerDelete">详情</el-button>
47
+          </template>
48
+        </el-table-column>
49
+      </el-table>
50
+      <el-pagination
51
+        @size-change="handleSizeChange"
52
+        @current-change="handleCurrentChange"
53
+        :page-sizes="[10, 50, 100]"
54
+        :page-size="10"
55
+        background
56
+        style="margin-top:20px;float: right"
57
+        layout="total, sizes, prev, pager, next, jumper"
58
+        :total="total"
59
+      >
60
+      </el-pagination>
61
+      <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
62
+    </div>
63
+  </div>
59
 </template>
64
 </template>
60
 
65
 
61
 <script>
66
 <script>
62
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
63
-import inquiriesDetail from './components/inquiriesDetail'
64
-export default {
65
-    components:{
66
-        BreadCrumb,
67
-        inquiriesDetail
67
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
68
+  import inquiriesDetail from './components/inquiriesDetail'
69
+  import { getHisPrescriptionList } from '@/api/his/his'
70
+
71
+  export default {
72
+    components: {
73
+      BreadCrumb,
74
+      inquiriesDetail
68
     },
75
     },
69
-    data(){
70
-        return{
71
-            crumbs: [
72
-                { path: false, name: '门诊医生站' },
73
-                { path: false, name: '既往查询' }
74
-            ],
75
-            tableData: [{
76
-            date: '2016-05-02',
77
-            name: '王小虎',
78
-            address: '上海市普陀区金沙江路 1518 弄'
79
-            }, {
80
-            date: '2016-05-04',
81
-            name: '王小虎',
82
-            address: '上海市普陀区金沙江路 1517 弄'
83
-            }, {
84
-            date: '2016-05-01',
85
-            name: '王小虎',
86
-            address: '上海市普陀区金沙江路 1519 弄'
87
-            }, {
88
-            date: '2016-05-03',
89
-            name: '王小虎',
90
-            address: '上海市普陀区金沙江路 1516 弄'
91
-            }]
92
-        }
76
+    data() {
77
+      return {
78
+        crumbs: [
79
+          { path: false, name: '门诊医生站' },
80
+          { path: false, name: '既往查询' }
81
+        ],
82
+        tableData: [{
83
+          date: '2016-05-02',
84
+          name: '王小虎',
85
+          address: '上海市普陀区金沙江路 1518 弄'
86
+        }, {
87
+          date: '2016-05-04',
88
+          name: '王小虎',
89
+          address: '上海市普陀区金沙江路 1517 弄'
90
+        }, {
91
+          date: '2016-05-01',
92
+          name: '王小虎',
93
+          address: '上海市普陀区金沙江路 1519 弄'
94
+        }, {
95
+          date: '2016-05-03',
96
+          name: '王小虎',
97
+          address: '上海市普陀区金沙江路 1516 弄'
98
+        }]
99
+      }
93
     },
100
     },
94
-    methods:{
95
-        handerDelete(){
96
-            this.$refs.inquiriesDetail.show()
97
-        }
101
+    methods: {
102
+      handerDelete() {
103
+        this.$refs.inquiriesDetail.show()
104
+      }, getHisPrescriptionList() {
105
+        getHisPrescriptionList().then(response => {
106
+          if (response.data.state == 0) {
107
+            this.$message.error(response.data.msg)
108
+            return false
109
+          } else {
110
+
111
+          }
112
+        })
113
+
114
+      }
115
+    }, created() {
116
+
117
+      this.getHisPrescriptionList()
118
+
98
     }
119
     }
99
-}
120
+  }
100
 </script>
121
 </script>