浏览代码

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

XMLWAN 4 年前
父节点
当前提交
76f363efba

+ 3 - 3
config/index.js 查看文件

29
 
29
 
30
     //  host: 'xt.test.sgjyun.com',
30
     //  host: 'xt.test.sgjyun.com',
31
     //  host: 'xt.kuyicloud.com',
31
     //  host: 'xt.kuyicloud.com',
32
-    host: 'xt.test.sgjyun.com',
33
-    // host: 'localhost',
32
+    // host: 'xt.test.sgjyun.com',
33
+    host: 'localhost',
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35
     autoOpenBrowser: true,
35
     autoOpenBrowser: true,
36
     errorOverlay: true,
36
     errorOverlay: true,
104
     // Set to `true` or `false` to always turn it on or off
104
     // Set to `true` or `false` to always turn it on or off
105
     bundleAnalyzerReport: process.env.npm_config_report
105
     bundleAnalyzerReport: process.env.npm_config_report
106
   },
106
   },
107
-  
107
+
108
 }
108
 }

+ 44 - 0
src/api/data.js 查看文件

219
 
219
 
220
 
220
 
221
 
221
 
222
+export function createAddition(params) {
223
+  return request({
224
+    url: '/api/addition/create',
225
+    method: 'post',
226
+    params: params
227
+  })
228
+}
229
+
230
+export function modifyAddition(params) {
231
+  return request({
232
+    url: '/api/addition/modify',
233
+    method: 'post',
234
+    params: params
235
+  })
236
+}
237
+
238
+export function getAdditionList(params) {
239
+  return request({
240
+    url: '/api/addition/list',
241
+    method: 'get',
242
+    params: params
243
+  })
244
+}
245
+
246
+export function deleteAddition(params) {
247
+  return request({
248
+    url: '/api/addition/delete',
249
+    method: 'post',
250
+    params: params
251
+  })
252
+}
253
+
254
+export function GetAddition(params) {
255
+  return request({
256
+    url: '/api/addition/get',
257
+    method: 'get',
258
+    params: params
259
+  })
260
+}
261
+
262
+
263
+
264
+
265
+
222
 
266
 
223
 
267
 
224
 
268
 

+ 7 - 4
src/api/his/his.js 查看文件

143
 
143
 
144
 
144
 
145
 
145
 
146
-
147
-
148
-
149
-
146
+export function Refund(params) {
147
+  return request({
148
+    url: "/api/refund/post",
149
+    method: "post",
150
+    params:params,
151
+  });
152
+}
150
 
153
 
151
 
154
 
152
 
155
 

+ 133 - 0
src/xt_pages/data/components/additionDialog.vue 查看文件

1
+<template>
2
+  <el-dialog width="854px" :title="titles" :visible.sync="visibility" :close-on-click-modal="isClose"
3
+             :close-on-press-escape="isClose">
4
+
5
+    <el-form :model="formValue" :rules="rules" ref="formValue" class="demo-form-inline"
6
+             :label-position="labelPosition"
7
+             label-width="100px">
8
+
9
+      <el-row>
10
+        <el-col :span="8">
11
+          <el-form-item label="费用名称" prop="name">
12
+            <el-input v-model="formValue.name"></el-input>
13
+          </el-form-item>
14
+        </el-col>
15
+
16
+
17
+        <el-col :span="8">
18
+          <el-form-item label="国家编码" prop="code">
19
+            <el-input v-model="formValue.code"></el-input>
20
+          </el-form-item>
21
+        </el-col>
22
+
23
+
24
+        <el-col :span="8">
25
+          <el-form-item label="费用" >
26
+            <el-input type="number" v-model="formValue.price"></el-input>
27
+          </el-form-item>
28
+        </el-col>
29
+
30
+      </el-row>
31
+
32
+    </el-form>
33
+
34
+    <span slot="footer" class="dialog-footer">
35
+    <el-button v-if="isCreated == 3" @click="cancle('formValue')">取 消</el-button>
36
+    <el-button v-if="isCreated != 3 " @click="cancle('formValue')">取 消</el-button>
37
+    <el-button v-if="isCreated != 3" type="primary" @click="comfirm('formValue')">保 存</el-button>
38
+  </span>
39
+  </el-dialog>
40
+
41
+</template>
42
+
43
+<script>
44
+  export default {
45
+    name: 'diagnosisDialog',
46
+
47
+    data() {
48
+
49
+      return {
50
+        visibility: false,
51
+        labelPosition: 'right',
52
+        isClose: false,
53
+        form: {
54
+          name: '',
55
+          code: '',
56
+          price: '',
57
+
58
+        },
59
+        resetForm: {
60
+          name: '',
61
+          code: '',
62
+          price: '',
63
+          wubi: ''
64
+        },
65
+        rules: {
66
+          name: [
67
+            { required: true, message: '请输入费用名称', trigger: 'blur' }
68
+          ],
69
+          code: [
70
+            { required: true, message: '请输入国家编码', trigger: 'blur' }
71
+          ]
72
+
73
+        }
74
+      }
75
+    },
76
+    props: {
77
+
78
+      titles: {
79
+        type: String,
80
+        default: ''
81
+      },
82
+      formValue: {
83
+        type: Object
84
+      },
85
+      type: {
86
+        type: Number,
87
+        default: 1
88
+
89
+      },
90
+      isCreated: {
91
+        type: Number,
92
+        default: 1
93
+
94
+      }
95
+    },
96
+    methods: {
97
+      show: function() {
98
+        this.visibility = true
99
+
100
+      }, hide: function() {
101
+        this.visibility = false
102
+      },
103
+      cancle: function(formName) {
104
+        this.$emit('dialog-cancle', this.getValue())
105
+        this.$refs['formValue'].resetFields()
106
+      },
107
+      comfirm: function(formName) {
108
+        this.$refs['formValue'].validate((valid) => {
109
+          if (valid) {
110
+            let value = {}
111
+            value = this.getValue()
112
+            this.$emit('dialog-comfirm', value)
113
+            this.form = Object.assign({}, this.resetForm)
114
+
115
+          }
116
+        })
117
+      },
118
+      getValue: function() {
119
+        let form = {}
120
+        form = this.formValue
121
+        form['title'] = this.titles
122
+        form['type'] = this.type
123
+        form['isCreated'] = this.isCreated
124
+        return form
125
+      }
126
+    }
127
+
128
+  }
129
+</script>
130
+
131
+<style scoped>
132
+
133
+</style>

+ 345 - 0
src/xt_pages/data/components/addtion.vue 查看文件

1
+<template>
2
+  <div class="main-contain">
3
+    <div class=" sign-and-weigh-box" style="background: white">
4
+      <!--<manufacturer-or-dealer-dialog-->
5
+      <!--ref="dialog"-->
6
+      <!--:titles="manufacturerDialog.titles"-->
7
+      <!--:formValue="manufacturerDialog.formValue"-->
8
+      <!--:visibility="manufacturerDialog.isVisibility"-->
9
+      <!--:type="manufacturerDialog.type"-->
10
+      <!--:isCreated="manufacturerDialog.isCreated"-->
11
+      <!--v-on:dialog-comfirm="manufacturerDialogComfirm"-->
12
+      <!--v-on:dialog-cancle="manufacturerDialogCancle"-->
13
+      <!--&gt;</manufacturer-or-dealer-dialog>-->
14
+      <addition-dialog
15
+        ref="dialog"
16
+        :titles="Dialog.titles"
17
+        :formValue="Dialog.formValue"
18
+        :visibility="Dialog.isVisibility"
19
+        :type="Dialog.type"
20
+        :isCreated="Dialog.isCreated"
21
+        v-on:dialog-comfirm="dialogComfirm"
22
+        v-on:dialog-cancle="dialogCancle"
23
+
24
+      ></addition-dialog>
25
+
26
+
27
+      <el-row :gutter="15">
28
+        <el-col>
29
+          <div>
30
+            <el-button
31
+              size="small"
32
+              icon="el-icon-circle-plus-outline"
33
+              style="float: right;margin-bottom: 15px"
34
+              type="primary"
35
+              @click="showDialog"
36
+            >新增
37
+            </el-button>
38
+          </div>
39
+
40
+          <el-table
41
+            :row-style="{ color: '#303133' }"
42
+            :header-cell-style="{
43
+              backgroundColor: 'rgb(245, 247, 250)',
44
+              color: '#606266'
45
+            }"
46
+            :data="manufacturerData"
47
+            style="width: 100%"
48
+            border
49
+            v-loading="loading"
50
+          >
51
+            <el-table-column label="国家编码" align="center">
52
+              <template slot-scope="scope">
53
+                {{ scope.row.code }}
54
+              </template>
55
+            </el-table-column>
56
+
57
+
58
+
59
+            <el-table-column label="费用名称" align="center">
60
+              <template slot-scope="scope">
61
+                {{ scope.row.name }}
62
+              </template>
63
+            </el-table-column>
64
+
65
+
66
+            <el-table-column label="金额" align="center">
67
+              <template slot-scope="scope">
68
+                {{ scope.row.price }}元
69
+              </template>
70
+            </el-table-column>
71
+
72
+
73
+
74
+            <el-table-column label="操作" align="center">
75
+              <template slot-scope="scope">
76
+                <el-tooltip
77
+                  class="item"
78
+                  effect="dark"
79
+                  content="编辑"
80
+                  placement="top"
81
+                >
82
+                  <el-button
83
+                    size="small"
84
+                    type="primary"
85
+                    icon="el-icon-edit-outline"
86
+                    @click="handleEdit(scope.$index, scope.row)"
87
+                  >
88
+                  </el-button>
89
+                </el-tooltip>
90
+                <el-tooltip
91
+                  class="item"
92
+                  effect="dark"
93
+                  content="删除"
94
+                  placement="top"
95
+                >
96
+                  <el-button
97
+                    size="small"
98
+                    type="danger"
99
+                    icon="el-icon-delete"
100
+                    @click="handleDelete(scope.$index, scope.row)"
101
+                  >
102
+                  </el-button>
103
+                </el-tooltip>
104
+
105
+              </template>
106
+            </el-table-column>
107
+          </el-table>
108
+
109
+          <el-pagination
110
+            @size-change="handleSizeChange"
111
+            @current-change="handleCurrentChange"
112
+            :page-sizes="[10, 50, 100]"
113
+            :page-size="10"
114
+            background
115
+            align="right"
116
+            style="margin-top:20px;"
117
+            layout="total, sizes, prev, pager, next, jumper"
118
+            :total="total"
119
+          >
120
+          </el-pagination>
121
+        </el-col>
122
+      </el-row>
123
+    </div>
124
+  </div>
125
+</template>
126
+
127
+<script>
128
+  import {
129
+    createAddition,
130
+    modifyAddition,
131
+    getAdditionList,
132
+    deleteAddition,
133
+    GetAddition
134
+  } from '@/api/data'
135
+  import AdditionDialog from './additionDialog'
136
+
137
+  export default {
138
+    components: {
139
+      AdditionDialog,
140
+    },
141
+    name: 'addtion',
142
+    data() {
143
+      return {
144
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
145
+        manufacturerData: [],
146
+        total: 0,
147
+        pageTotal: 0,
148
+        pageSelect: 0,
149
+
150
+        page: 1,
151
+        limit: 10,
152
+        loading: false,
153
+
154
+        manufacturer_code: '',
155
+        editId: '',
156
+        editIndex: '',
157
+        Dialog: {
158
+          titles: '新增',
159
+          isVisibility: false,
160
+          isCreated: 1, //1.创建 2.编辑 3.查看详情
161
+          formValue: {
162
+            name: '',
163
+            code: '',
164
+            price: '',
165
+
166
+          },
167
+          resetForm: {
168
+            name: '',
169
+            code: '',
170
+            price: '',
171
+          }
172
+        }
173
+      }
174
+    },
175
+    methods: {
176
+      handleEdit: function(index, row) {
177
+        this.editId = row.id
178
+        this.editIndex = index
179
+        let params = {
180
+          id: row.id
181
+        }
182
+        GetAddition(params).then(response => {
183
+          if (response.data.state == 0) {
184
+            this.$message.error(response.data.msg)
185
+            return false
186
+          } else {
187
+            this.Dialog.formValue.class_name =
188
+              response.data.data.addition.name
189
+            this.Dialog.formValue.content_code =
190
+              response.data.data.addition.code
191
+            this.Dialog.formValue.price =
192
+              response.data.data.addition.price
193
+
194
+            this.Dialog.isCreated = 2
195
+            this.$refs.dialog.show()
196
+
197
+          }
198
+        })
199
+      },
200
+      handleDelete: function(index, row) {
201
+        this.$confirm('确认删除这条记录?', '删除记录', {
202
+          confirmButtonText: '确定',
203
+          cancelButtonText: '取消',
204
+          type: 'warning'
205
+        })
206
+          .then(() => {
207
+            let params = {
208
+              id: row.id
209
+            }
210
+            deleteAddition(params).then(response => {
211
+              if (response.data.state == 0) {
212
+                this.$message.error(response.data.msg)
213
+                return false
214
+              } else {
215
+                this.manufacturerData.splice(index, 1)
216
+                this.$message.success('厂家已经删除')
217
+              }
218
+            })
219
+          })
220
+          .catch(() => {
221
+          })
222
+      },
223
+      showDetails: function(index, row) {
224
+        let params = {
225
+          id: row.id
226
+        }
227
+        GetAddition(params).then(response => {
228
+          if (response.data.state == 0) {
229
+            this.$message.error(response.data.msg)
230
+            return false
231
+          } else {
232
+            this.Dialog.formValue.name =
233
+              response.data.data.addition.name
234
+            this.Dialog.formValue.code =
235
+              response.data.data.addition.code
236
+            this.Dialog.formValue.price =
237
+              response.data.data.addition.price
238
+
239
+
240
+            this.Dialog.isCreated = 3
241
+            this.Dialog.isVisibility = true
242
+          }
243
+        })
244
+      },
245
+      dialogComfirm: function(val) {
246
+        // this.manufacturerDialog.isVisibility = false
247
+        this.$refs.dialog.hide()
248
+        if (val.isCreated == 2) {
249
+          //修改
250
+          let params = {
251
+            name: val.name,
252
+            code: val.code,
253
+            price: val.price,
254
+            id: this.editId,
255
+
256
+          }
257
+          modifyAddition(params).then(response => {
258
+            if (response.data.state == 0) {
259
+              this.$message.error(response.data.msg)
260
+              return false
261
+            } else {
262
+              this.manufacturerData[this.editIndex].name =
263
+                response.data.data.addition.name
264
+              this.manufacturerData[this.editIndex].code =
265
+                response.data.data.addition.code
266
+              this.manufacturerData[this.editIndex].price =
267
+                response.data.data.addition.price
268
+              this.$message.success('修改成功')
269
+            }
270
+          })
271
+        } else if (val.isCreated == 1) {
272
+          //新增
273
+          createAddition(val).then(response => {
274
+            if (response.data.state == 0) {
275
+              this.$message.error(response.data.msg)
276
+              return false
277
+            } else {
278
+              this.manufacturerData.unshift(response.data.data.addition)
279
+
280
+              this.$message.success('新增成功')
281
+            }
282
+          })
283
+        }
284
+      },
285
+      dialogCancle: function() {
286
+        this.$refs.dialog.hide()
287
+      },
288
+      showDialog: function() {
289
+        this.Dialog.formValue = Object.assign(
290
+          {},
291
+          this.Dialog.resetForm
292
+        )
293
+        this.$refs.dialog.show()
294
+        this.Dialog.isCreated = 1
295
+      },
296
+      handleSizeChange(val) {
297
+        this.limit = val
298
+        this.getList()
299
+      },
300
+      handleCurrentChange(val) {
301
+        this.page = val
302
+        this.getList()
303
+      },
304
+      getList() {
305
+        let params = {
306
+          page: this.page,
307
+          limit: this.limit
308
+        }
309
+        this.loading = true
310
+        getAdditionList(params).then(response => {
311
+          if (response.data.state == 0) {
312
+            this.loading = false
313
+            this.$message.error(response.data.msg)
314
+            return false
315
+          } else {
316
+            this.loading = false
317
+            this.total = response.data.data.total
318
+            this.manufacturerData = []
319
+            for (let i = 0; i < response.data.data.addition.length; i++) {
320
+              this.manufacturerData.push(response.data.data.addition[i])
321
+            }
322
+          }
323
+        })
324
+      }
325
+    },
326
+    created() {
327
+      this.getList()
328
+    }
329
+  }
330
+</script>
331
+
332
+<style lang="scss">
333
+  .el-table td,
334
+  .el-table th.is-leaf,
335
+  .el-table--border,
336
+  .el-table--group {
337
+    border-color: #d0d3da;
338
+  }
339
+
340
+  .el-table--border::after,
341
+  .el-table--group::after,
342
+  .el-table::before {
343
+    background-color: #d0d3da;
344
+  }
345
+</style>

+ 13 - 2
src/xt_pages/data/specialDictionary.vue 查看文件

26
           <dealer></dealer>
26
           <dealer></dealer>
27
         </el-tab-pane>
27
         </el-tab-pane>
28
 
28
 
29
-        <el-tab-pane label="门诊大病" name="7">
29
+        <el-tab-pane label="疾病类型" name="7">
30
           <!--<manufacturer></manufacturer>-->
30
           <!--<manufacturer></manufacturer>-->
31
           <diagnosis></diagnosis>
31
           <diagnosis></diagnosis>
32
         </el-tab-pane>
32
         </el-tab-pane>
33
-        <el-tab-pane label="配置项字典" name="8">
33
+
34
+        <!--<el-tab-pane label="医疗类别" name="8">-->
35
+          <!--&lt;!&ndash;<manufacturer></manufacturer>&ndash;&gt;-->
36
+          <!--<diagnosis></diagnosis>-->
37
+        <!--</el-tab-pane>-->
38
+        <el-tab-pane label="附加收费配置" name="8">
39
+          <addtion></addtion>
40
+        </el-tab-pane>
41
+
42
+        <el-tab-pane label="配置项字典" name="9">
34
           <configure></configure>
43
           <configure></configure>
35
         </el-tab-pane>
44
         </el-tab-pane>
36
       </el-tabs>
45
       </el-tabs>
49
   import configure from './components/configure'
58
   import configure from './components/configure'
50
   import Dealer from '../stock/config/dealer'
59
   import Dealer from '../stock/config/dealer'
51
   import Diagnosis from './components/diagnosis'
60
   import Diagnosis from './components/diagnosis'
61
+  import Addtion from './components/addtion'
52
 
62
 
53
   export default {
63
   export default {
54
     name: 'specialDictionary',
64
     name: 'specialDictionary',
55
     components: {
65
     components: {
66
+      Addtion,
56
       Diagnosis,
67
       Diagnosis,
57
       Dealer,
68
       Dealer,
58
       BreadCrumb,
69
       BreadCrumb,

+ 515 - 0
src/xt_pages/outpatientCharges/11.vue 查看文件

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

+ 15 - 35
src/xt_pages/outpatientCharges/components/additionalCharges.vue 查看文件

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

+ 2 - 2
src/xt_pages/outpatientCharges/components/prescriptionTable.vue 查看文件

11
         <template slot-scope="scope">
11
         <template slot-scope="scope">
12
           <div style="display:flex;align-items:center;">
12
           <div style="display:flex;align-items:center;">
13
             <el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>
13
             <el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>
14
-            <div> {{scope.row.min_unit}}</div>
14
+            <div> {{scope.row.single_dose_unit}}</div>
15
           </div>
15
           </div>
16
         </template>
16
         </template>
17
       </el-table-column>
17
       </el-table-column>
31
         <template slot-scope="scope">
31
         <template slot-scope="scope">
32
           <div style="display:flex;align-items:center;">
32
           <div style="display:flex;align-items:center;">
33
             <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
33
             <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
34
-            <div>{{scope.row.min_unit}}</div>
34
+            <div>{{scope.row.prescribing_number_unit}}</div>
35
           </div>
35
           </div>
36
         </template>
36
         </template>
37
       </el-table-column>
37
       </el-table-column>

+ 190 - 81
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

6
     <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
6
     <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7
       <div class="mainLeft">
7
       <div class="mainLeft">
8
         <div class="mainCell" style="justify-content: space-between;">
8
         <div class="mainCell" style="justify-content: space-between;">
9
-        <p style="font-size:14px;">未就诊:<span>1</span>人</p>
10
-        <p style="font-size:14px;">已就诊:<span>0</span>人</p>
9
+          <p style="color: red">未收费:<span>{{cal_one}}</span>人</p>
10
+          <p style="color: red">已收费:<span>{{cal_two}}</span>人</p>
11
+          <p style="color: red">已退费:<span>{{cal_three}}</span>人</p>
12
+
11
         </div>
13
         </div>
12
         <div class="mainCell">
14
         <div class="mainCell">
13
-        <el-radio-group v-model="radio" @change="changeRadio">
14
-        <el-radio :label=1>未就诊</el-radio>
15
-        <el-radio :label=2>已就诊</el-radio>
16
-        <el-radio :label=3>全部</el-radio>
17
-        </el-radio-group>
15
+          <el-radio-group v-model="radio" @change="changeRadio">
16
+            <el-radio :label=1>未收费</el-radio>
17
+            <el-radio :label=2>已收费</el-radio>
18
+            <el-radio :label=3>已退费</el-radio>
19
+            <el-radio :label=4>全部</el-radio>
20
+
21
+          </el-radio-group>
18
         </div>
22
         </div>
19
         <div class="mainCell" style="margin-bottom:10px;">
23
         <div class="mainCell" style="margin-bottom:10px;">
20
           <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
24
           <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
23
           </el-button>
27
           </el-button>
24
         </div>
28
         </div>
25
         <div>
29
         <div>
26
-          <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;" :row-style="{ color: '#303133' }"
30
+          <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
31
+                    :row-style="{ color: '#303133' }"
27
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
32
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
28
                     highlight-current-row ref="tab"
33
                     highlight-current-row ref="tab"
29
                     @current-change="handleCurrentChange">
34
                     @current-change="handleCurrentChange">
42
           <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
47
           <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
43
           <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
48
           <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
44
           <el-button size="small" @click="open(3)" type="primary">打印</el-button>
49
           <el-button size="small" @click="open(3)" type="primary">打印</el-button>
45
-          <el-button v-loading="loadingone"  size="small"
50
+          <el-button v-loading="loadingone" size="small"
46
                      @click="open(6)"
51
                      @click="open(6)"
52
+                     v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
47
                      type="primary">挂号
53
                      type="primary">挂号
48
           </el-button>
54
           </el-button>
49
           <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
55
           <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
50
                      @click="open(4)"
56
                      @click="open(4)"
51
                      type="primary">收费
57
                      type="primary">收费
52
           </el-button>
58
           </el-button>
53
-          <el-button size="small" @click="open(5)" type="primary" v-if="this.info && this.info.prescription_status == 3">退费</el-button>
59
+          <el-button size="small" @click="open(5)" type="primary"
60
+                     v-if="this.info && this.info.prescription_status == 3">退费
61
+          </el-button>
54
         </div>
62
         </div>
55
 
63
 
56
         <div class="mainCenter">
64
         <div class="mainCenter">
59
               <div style="display:flex;height:100%;">
67
               <div style="display:flex;height:100%;">
60
                 <div class="centerLeft">
68
                 <div class="centerLeft">
61
                   <div class="tabsBox">
69
                   <div class="tabsBox">
62
-                    <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
70
+                    <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
63
                     <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
71
                     <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
64
                       <el-tab-pane
72
                       <el-tab-pane
65
                         v-for="(item, index) in prescriptions"
73
                         v-for="(item, index) in prescriptions"
117
                   <ul class="basicUl">
125
                   <ul class="basicUl">
118
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
126
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
119
                     <li style="width:50%;">科室:{{ info.departments }}</li>
127
                     <li style="width:50%;">科室:{{ info.departments }}</li>
120
-                    <li style="width:100%;">总费用:{{ getTotal() }}</li>
128
+                    <li style="width:50%;">总费用:{{ getTotal() }}</li>
121
 
129
 
122
                     <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
130
                     <li style="width:100%;">判断结果:{{info.diagnosis}}</li>
123
                     <li style="width:100%;">是否有传染病:</li>
131
                     <li style="width:100%;">是否有传染病:</li>
198
         </div>
206
         </div>
199
       </div>
207
       </div>
200
     </div>
208
     </div>
201
-    <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
209
+    <additionalCharges ref='additionalCharges' @click="addCharges" :addtions_charge="addtions_charge"></additionalCharges>
202
   </div>
210
   </div>
203
 </template>
211
 </template>
204
 
212
 
211
   import prescriptionTable from './components/prescriptionTable'
219
   import prescriptionTable from './components/prescriptionTable'
212
   import additionalCharges from './components/additionalCharges'
220
   import additionalCharges from './components/additionalCharges'
213
   import { getPatientInformation, getPatientList } from '@/api/project/project'
221
   import { getPatientInformation, getPatientList } from '@/api/project/project'
214
-  import { getPatientInfo, getSchedulePatientList, register, upload } from '@/api/his/his'
222
+  import { getPatientInfo, getSchedulePatientList, register, upload,Refund } from '@/api/his/his'
215
 
223
 
216
   const moment = require('moment')
224
   const moment = require('moment')
217
   export default {
225
   export default {
229
           { path: false, name: '门诊收费' },
237
           { path: false, name: '门诊收费' },
230
           { path: false, name: '门诊收费管理' }
238
           { path: false, name: '门诊收费管理' }
231
         ],
239
         ],
232
-        tableHeight:'',
240
+        current_index:0,
241
+        cal_one:'',
242
+        cal_two:'',
243
+        cal_three:'',
244
+        tableHeight: '',
233
         fullHeight: document.documentElement.clientHeight,
245
         fullHeight: document.documentElement.clientHeight,
234
         activeName: 'first',
246
         activeName: 'first',
235
         info: {},
247
         info: {},
258
         radioStatus: 1,
270
         radioStatus: 1,
259
         search_input: '',
271
         search_input: '',
260
         start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
272
         start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
261
-        patient_id:0,
262
-        prescription_id:0
273
+        patient_id: 0,
274
+        prescription_id: 0,
275
+        all_table_data:[],
276
+        order:{},
277
+        addtions_charge:[],
263
       }
278
       }
264
     },
279
     },
265
     created() {
280
     created() {
280
       this.getPatientList()
295
       this.getPatientList()
281
     },
296
     },
282
     methods: {
297
     methods: {
298
+      addCharges() {
299
+        this.$refs.additionalCharges.show()
300
+      },
283
       changeDate(val) {
301
       changeDate(val) {
284
         if (this.patientInfo.id == 0) {
302
         if (this.patientInfo.id == 0) {
285
           this.$message.error('请先选择患者')
303
           this.$message.error('请先选择患者')
297
             this.patientInfo = response.data.data.xt_info
315
             this.patientInfo = response.data.data.xt_info
298
             this.hisPatientInfo = response.data.data.his_info
316
             this.hisPatientInfo = response.data.data.his_info
299
             this.info = response.data.data.info
317
             this.info = response.data.data.info
318
+            this.addtions_charge = response.data.data.addtions_charge
319
+
300
             this.prescriptions = []
320
             this.prescriptions = []
301
             for (let i = 0; i < response.data.data.prescription.length; i++) {
321
             for (let i = 0; i < response.data.data.prescription.length; i++) {
302
               var prescription = response.data.data.prescription[i]
322
               var prescription = response.data.data.prescription[i]
316
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
336
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
317
                   single_dose_unit: prescription.advices[b].single_dose_unit,
337
                   single_dose_unit: prescription.advices[b].single_dose_unit,
318
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
338
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
319
-                  min_unit: prescription.advices[b].single_dose_unit,
320
                   medical_insurance_number: prescription.advices[b].med_list_codg
339
                   medical_insurance_number: prescription.advices[b].med_list_codg
321
 
340
 
322
                 }
341
                 }
329
                   id: prescription.project[b].id,
348
                   id: prescription.project[b].id,
330
                   project_id: prescription.project[b].project.id,
349
                   project_id: prescription.project[b].project.id,
331
                   project_name: prescription.project[b].project.project_name,
350
                   project_name: prescription.project[b].project.project_name,
332
-                  statistical_classification: prescription.project[b].statistical_classification,
351
+                  statistical_classification: prescription.project[b].project.statistical_classification,
333
                   single_dose: prescription.project[b].single_dose,
352
                   single_dose: prescription.project[b].single_dose,
334
                   delivery_way: prescription.project[b].delivery_way,
353
                   delivery_way: prescription.project[b].delivery_way,
335
                   execution_frequency: prescription.project[b].execution_frequency,
354
                   execution_frequency: prescription.project[b].execution_frequency,
365
 
384
 
366
       },
385
       },
367
       tabclickEvent(val) {
386
       tabclickEvent(val) {
368
-        console.log("val",val.name)
387
+        console.log('val', val.name)
369
         for (let i = 0; i < this.prescriptions.length; i++) {
388
         for (let i = 0; i < this.prescriptions.length; i++) {
370
           if (this.prescriptions[i].name == val.name) {
389
           if (this.prescriptions[i].name == val.name) {
371
 
390
 
374
             this.curPrescriptions = temp
393
             this.curPrescriptions = temp
375
           }
394
           }
376
         }
395
         }
377
-        console.log("9999",this.curPrescriptions)
396
+        console.log('9999', this.curPrescriptions)
378
         this.prescription_id = this.curPrescriptions.id
397
         this.prescription_id = this.curPrescriptions.id
379
         this.total = 0
398
         this.total = 0
380
         this.total = this.getTotalOne()
399
         this.total = this.getTotalOne()
381
-       
382
-
383
-
384
 
400
 
385
       }, deepClone(source) {
401
       }, deepClone(source) {
386
         if (!source && typeof source !== 'object') {
402
         if (!source && typeof source !== 'object') {
395
           }
411
           }
396
         })
412
         })
397
         return targetObj
413
         return targetObj
398
-      },getTotalOne(){
414
+      }, getTotalOne() {
399
         var total = 0
415
         var total = 0
400
-          if(this.curPrescriptions.type == 1) {
401
-            if (this.curPrescriptions.advices != null) {
402
-              for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
403
-                console.log(this.curPrescriptions.advices[a].retail_price)
404
-                console.log(this.curPrescriptions.advices[a].prescribing_number)
416
+        if (this.curPrescriptions.type == 1) {
417
+          if (this.curPrescriptions.advices != null) {
418
+            for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
419
+              console.log(this.curPrescriptions.advices[a].retail_price)
420
+              console.log(this.curPrescriptions.advices[a].prescribing_number)
405
 
421
 
406
-                total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
407
-              }
422
+              total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
408
             }
423
             }
409
-            return total
410
-
411
-          }else{
412
-            var total = 0
413
-            if (this.curPrescriptions.project != null) {
414
-              for (let b = 0; b < this.curPrescriptions.project.length; b++) {
415
-                console.log(this.curPrescriptions.project[b].price )
416
-                console.log(this.curPrescriptions.project[b].total )
417
-                total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
418
-              }
424
+          }
425
+          return total
426
+
427
+        } else {
428
+          var total = 0
429
+          if (this.curPrescriptions.project != null) {
430
+            for (let b = 0; b < this.curPrescriptions.project.length; b++) {
431
+              console.log(this.curPrescriptions.project[b].price)
432
+              console.log(this.curPrescriptions.project[b].total)
433
+              total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
419
             }
434
             }
420
-            return total
421
-
422
           }
435
           }
436
+          return total
423
 
437
 
424
-
438
+        }
425
 
439
 
426
       },
440
       },
427
       getTotal() {
441
       getTotal() {
437
               total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
451
               total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
438
             }
452
             }
439
           }
453
           }
454
+
455
+        }
456
+        for (let i = 0; i < this.addtions_charge.length; i++){
457
+          total = total +  this.addtions_charge[i].price
440
         }
458
         }
441
-        return total
459
+        return Math.floor(total * 100) / 100
460
+
442
       },
461
       },
443
       moreState(tab, event) {
462
       moreState(tab, event) {
444
         if (tab == 'more') {
463
         if (tab == 'more') {
446
         }
465
         }
447
       },
466
       },
448
       open(index) {
467
       open(index) {
449
-        console.log("index",index)
468
+        console.log('index', index)
450
         if (index == 1) {
469
         if (index == 1) {
451
 
470
 
452
         } else if (index == 2) {
471
         } else if (index == 2) {
453
-           
454
-           this.$router.push("/outpatientDoctorStation/printtwo?record="+this.record_date+"&patient_id="+this.patient_id+"&prescription_id="+this.prescription_id)
455
-        
456
-        } else if(index == 3){
457
-            this.$router.push("/outpatientCharges/treatPrint?record_date="+this.record_date+"&patient_id="+this.patient_id+"&prescription_id="+this.prescription_id)
472
+
473
+          this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
474
+
475
+        } else if (index == 3) {
476
+          this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
458
         } else if (index == 4) {
477
         } else if (index == 4) {
459
 
478
 
479
+          if(this.hisPatientInfo.id == 0){
480
+            this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
481
+            return
482
+          }
483
+
460
           let params = {
484
           let params = {
461
             'id': this.patientInfo.id,
485
             'id': this.patientInfo.id,
462
             'record_time': this.record_date
486
             'record_time': this.record_date
466
             if (response.data.state == 0) {
490
             if (response.data.state == 0) {
467
               this.$message.error(response.data.msg)
491
               this.$message.error(response.data.msg)
468
               this.loadingtwo = false
492
               this.loadingtwo = false
469
-
470
               return false
493
               return false
471
-
472
             } else {
494
             } else {
495
+              this.state = '已收费'
496
+              this.$message({ message: '收费成功', type: 'success' })
473
               this.loadingtwo = false
497
               this.loadingtwo = false
474
-
498
+              this.cal_one  =  this.cal_one-1
499
+              this.cal_two = this.cal_two + 1
500
+              this.patientTableData.splice(this.current_index,1)
475
             }
501
             }
476
           })
502
           })
477
 
503
 
478
-          this.state = '已收费'
479
-          this.$message({ message: '收费成功', type: 'success' })
480
         } else if (index == 5) {
504
         } else if (index == 5) {
481
           let params = {
505
           let params = {
482
-            'id': this.patientInfo.id,
483
-            'record_time': this.record_date
506
+            'order_id': this.order.id,
507
+            'number': this.order.number,
484
           }
508
           }
485
           Refund(params).then(response => {
509
           Refund(params).then(response => {
486
             if (response.data.state == 0) {
510
             if (response.data.state == 0) {
487
               this.$message.error(response.data.msg)
511
               this.$message.error(response.data.msg)
488
               this.loadingtwo = false
512
               this.loadingtwo = false
489
-
490
               return false
513
               return false
491
-
492
             } else {
514
             } else {
515
+              this.$message({ message: '退费成功', type: 'success' })
493
               this.loadingtwo = false
516
               this.loadingtwo = false
494
 
517
 
495
             }
518
             }
496
           })
519
           })
497
 
520
 
498
-
499
-
500
-
501
-          this.$message({ message: '退费成功', type: 'success' })
502
         } else if (index == 6) {
521
         } else if (index == 6) {
503
 
522
 
504
           if (this.patientInfo.id == 0) {
523
           if (this.patientInfo.id == 0) {
518
               return false
537
               return false
519
 
538
 
520
             } else {
539
             } else {
540
+              this.$message({ message: '挂号成功', type: 'success' })
541
+
521
               this.loadingone = false
542
               this.loadingone = false
522
               var his_info = response.data.data.his_info
543
               var his_info = response.data.data.his_info
523
               this.hisPatientInfo = his_info
544
               this.hisPatientInfo = his_info
532
         this.getPatientList()
553
         this.getPatientList()
533
       },
554
       },
534
       changeRadio(id) {
555
       changeRadio(id) {
535
-        console.log(id)
536
-        this.radioStatus = id
537
-        this.getPatientList()
556
+        // console.log(id)
557
+        // this.radioStatus = id
558
+        // this.getPatientList()
559
+
560
+        switch (id) {
561
+          case 1:
562
+                this.patientTableData = []
563
+
564
+            for (let i = 0; i < this.all_table_data.length; i++){
565
+              if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
566
+                this.patientTableData.push(this.all_table_data[i])
567
+              }
568
+
569
+            }
570
+            break
571
+          case 2:
572
+            this.patientTableData = []
573
+            for (let i = 0; i < this.all_table_data.length; i++){
574
+              if(this.all_table_data[i].info.prescription_status == 3){
575
+                this.patientTableData.push(this.all_table_data[i])
576
+              }
577
+
578
+
579
+            }
580
+            break
581
+          case 3:
582
+            this.patientTableData = []
583
+
584
+            for (let i = 0; i < this.all_table_data.length; i++){
585
+
586
+              if(this.all_table_data[i].info.prescription_status == 4){
587
+                this.patientTableData.push(this.all_table_data[i])
588
+              }
589
+
590
+            }
591
+            break
592
+          case 4:
593
+            this.patientTableData = []
594
+            this.patientTableData = this.all_table_data
595
+            break
596
+
597
+        }
598
+
599
+
600
+
601
+
538
       },
602
       },
539
 
603
 
540
       //患者列表
604
       //患者列表
548
             return false
612
             return false
549
           } else {
613
           } else {
550
             this.patientTableData = []
614
             this.patientTableData = []
615
+            this.all_table_data = []
616
+            let one_count = 0
617
+            let two_count = 0
618
+            let three_count = 0
551
             for (let i = 0; i < response.data.data.list.length; i++) {
619
             for (let i = 0; i < response.data.data.list.length; i++) {
620
+              // console.log('99999999', response.data.data.list)
621
+
622
+              if(response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 ||response.data.data.list[i].info.prescription_status == 2 ){
623
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
624
+                  one_count = one_count + 1
625
+                  this.patientTableData.push(response.data.data.list[i])
626
+                }
627
+              }
628
+
629
+              if(response.data.data.list[i].info.prescription_status == 3){
630
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
631
+
632
+                  two_count = two_count + 1
633
+                }
634
+              }
635
+
636
+              if(response.data.data.list[i].info.prescription_status == 4){
637
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
638
+                  three_count = three_count + 1
639
+                }
640
+              }
641
+
552
               if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
642
               if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
553
-                this.patientTableData.push(response.data.data.list[i])
643
+                this.all_table_data.push(response.data.data.list[i])
554
               }
644
               }
555
             }
645
             }
646
+
647
+            this.cal_one = one_count
648
+            this.cal_two = two_count
649
+            this.cal_three = three_count
650
+
651
+            this.current_index = 0
652
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
653
+            this.getPatientInformation(this.patientTableData[0].patients.id,"")
654
+
556
           }
655
           }
557
         })
656
         })
558
       },
657
       },
563
       },
662
       },
564
       handleCurrentChange(val) {
663
       handleCurrentChange(val) {
565
         console.log('val', val)
664
         console.log('val', val)
566
-        this.getPatientInformation(val.patients.id)
665
+        this.getPatientInformation(val.patients.id, val.info.batch_number)
567
         this.patient_id = val.patients.id
666
         this.patient_id = val.patients.id
667
+
668
+        for (let i =0; i < this.patientTableData.length; i++){
669
+          if(this.patientTableData[i].patients.id == val.patients.id){
670
+            this.current_index = i
671
+          }
672
+
673
+        }
674
+
568
       },
675
       },
569
 
676
 
570
       //获取患者的基本信息
677
       //获取患者的基本信息
571
-      getPatientInformation(id) {
678
+      getPatientInformation(id,batch_number) {
572
         let params = {
679
         let params = {
573
           'record_date': this.record_date,
680
           'record_date': this.record_date,
574
-          'patient_id': id
681
+          'patient_id': id,
682
+          'number':batch_number,
575
         }
683
         }
576
         getPatientInfo(params).then(response => {
684
         getPatientInfo(params).then(response => {
577
           if (response.data.state == 0) {
685
           if (response.data.state == 0) {
581
             this.patientInfo = response.data.data.xt_info
689
             this.patientInfo = response.data.data.xt_info
582
             this.hisPatientInfo = response.data.data.his_info
690
             this.hisPatientInfo = response.data.data.his_info
583
             this.info = response.data.data.info
691
             this.info = response.data.data.info
692
+            this.order = response.data.data.order
693
+            this.addtions_charge = response.data.data.addtions_charge
694
+
584
             this.prescriptions = []
695
             this.prescriptions = []
585
             console.log("9991323242r5253535",response.data.data.prescription)
696
             console.log("9991323242r5253535",response.data.data.prescription)
586
             this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
697
             this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
603
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
714
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
604
                   single_dose_unit: prescription.advices[b].single_dose_unit,
715
                   single_dose_unit: prescription.advices[b].single_dose_unit,
605
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
716
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
606
-                  min_unit: prescription.advices[b].single_dose_unit,
607
                   medical_insurance_number: prescription.advices[b].med_list_codg
717
                   medical_insurance_number: prescription.advices[b].med_list_codg
608
 
718
 
609
                 }
719
                 }
616
                   id: prescription.project[b].id,
726
                   id: prescription.project[b].id,
617
                   project_id: prescription.project[b].project.id,
727
                   project_id: prescription.project[b].project.id,
618
                   project_name: prescription.project[b].project.project_name,
728
                   project_name: prescription.project[b].project.project_name,
619
-                  statistical_classification: prescription.project[b].statistical_classification,
729
+                  statistical_classification: prescription.project[b].project.statistical_classification,
620
                   single_dose: prescription.project[b].single_dose,
730
                   single_dose: prescription.project[b].single_dose,
621
                   delivery_way: prescription.project[b].delivery_way,
731
                   delivery_way: prescription.project[b].delivery_way,
622
                   execution_frequency: prescription.project[b].execution_frequency,
732
                   execution_frequency: prescription.project[b].execution_frequency,
634
                 name: '处方' + index,
744
                 name: '处方' + index,
635
                 advices: tempAdvice,
745
                 advices: tempAdvice,
636
                 project: tempProject,
746
                 project: tempProject,
637
-                order_status:response.data.data.prescription[i].order_status,
747
+                order_status: response.data.data.prescription[i].order_status,
638
                 type: response.data.data.prescription[i].type
748
                 type: response.data.data.prescription[i].type
639
               }
749
               }
640
               this.prescriptions.push(obj)
750
               this.prescriptions.push(obj)
643
               this.total = this.getTotalOne()
753
               this.total = this.getTotalOne()
644
               console.log(this.total)
754
               console.log(this.total)
645
 
755
 
646
-
647
             }
756
             }
648
           }
757
           }
649
         })
758
         })
650
       }
759
       }
651
     },
760
     },
652
-    mounted(){
761
+    mounted() {
653
       const that = this
762
       const that = this
654
       window.onresize = () => {
763
       window.onresize = () => {
655
         return (() => {
764
         return (() => {
659
       }
768
       }
660
     },
769
     },
661
     watch: {
770
     watch: {
662
-      fullHeight (val) {
663
-        if(!this.timer) {
771
+      fullHeight(val) {
772
+        if (!this.timer) {
664
           this.fullHeight = val
773
           this.fullHeight = val
665
           let tableHeight = val - 263
774
           let tableHeight = val - 263
666
           this.tableHeight = tableHeight
775
           this.tableHeight = tableHeight
667
           this.timer = true
776
           this.timer = true
668
           let that = this
777
           let that = this
669
-          setTimeout(function (){
778
+          setTimeout(function() {
670
             that.timer = false
779
             that.timer = false
671
-          },400)
780
+          }, 400)
672
         }
781
         }
673
       }
782
       }
674
     }
783
     }

+ 7 - 9
src/xt_pages/outpatientCharges/summary.vue 查看文件

44
         <el-table-column align="center" prop="name" label="患者名字">
44
         <el-table-column align="center" prop="name" label="患者名字">
45
           <template slot-scope="scope">{{ scope.row.patient.name }}</template>
45
           <template slot-scope="scope">{{ scope.row.patient.name }}</template>
46
         </el-table-column>
46
         </el-table-column>
47
-        <el-table-column align="center" prop="name" label="患者类型">
48
-          <template slot-scope="scope">{{'医保'}}</template>
49
-        </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="应收金额">
50
         <el-table-column align="center" prop="name" label="应收金额">
51
-          <template slot-scope="scope"></template>
51
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
52
         </el-table-column>
52
         </el-table-column>
53
         <el-table-column align="center" prop="name" label="实收金额">
53
         <el-table-column align="center" prop="name" label="实收金额">
54
-          <template slot-scope="scope"></template>
54
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
55
         </el-table-column>
55
         </el-table-column>
56
         <el-table-column align="center" prop="name" label="舍入金额">
56
         <el-table-column align="center" prop="name" label="舍入金额">
57
-          <template slot-scope="scope"></template>
57
+          <template slot-scope="scope">{{scope.row.medfee_sumamt - scope.row.medfee_sumamt}}</template>
58
         </el-table-column>
58
         </el-table-column>
59
         <el-table-column align="center" prop="name" label="收费日期">
59
         <el-table-column align="center" prop="name" label="收费日期">
60
           <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
60
           <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
66
           <template slot-scope="scope">
66
           <template slot-scope="scope">
67
             <div v-if="scope.row.order_status == 1">待结算</div>
67
             <div v-if="scope.row.order_status == 1">待结算</div>
68
             <div v-if="scope.row.order_status == 2">已结算</div>
68
             <div v-if="scope.row.order_status == 2">已结算</div>
69
-            <div v-if="scope.row.order_status == 3">结算失败</div>
70
-            <div v-if="scope.row.order_status == 4">已退费</div>
71
-
69
+            <div v-if="scope.row.order_status == 3">已退费</div>
72
           </template>
70
           </template>
73
         </el-table-column>
71
         </el-table-column>
74
         <el-table-column align="center" prop="name" label="操作">
72
         <el-table-column align="center" prop="name" label="操作">

+ 18 - 11
src/xt_pages/outpatientCharges/summaryDetail.vue 查看文件

26
 
26
 
27
                     </div>
27
                     </div>
28
                     <div class="costBox">
28
                     <div class="costBox">
29
-                      <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
30
-                      <span>{{ state }}</span>
29
+                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt }}元</span></span>
30
+                      <span v-if="order.order_status == 1">待结算</span>
31
+                      <span v-if="order.order_status == 2">已结算</span>
32
+                      <span v-if="order.order_status == 3">已退费</span>
33
+
34
+
31
                     </div>
35
                     </div>
32
                 </div>
36
                 </div>
33
                 <div class="centerRight">
37
                 <div class="centerRight">
42
                     </ul>
46
                     </ul>
43
                     <p class="centerRightTitle">收费信息</p>
47
                     <p class="centerRightTitle">收费信息</p>
44
                     <ul class="basicUl">
48
                     <ul class="basicUl">
45
-                        <li style="width:50%;">应收金额:0.00元</li>
46
-                        <li style="width:50%;">实收金额:0.00元</li>
47
-                        <li style="width:50%;">舍入金额:0.00元</li>
49
+                        <li style="width:50%;">应收金额:{{order.medfee_sumamt }}元</li>
50
+                        <li style="width:50%;">实收金额:{{order.medfee_sumamt}}元</li>
51
+                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt - order.medfee_sumamt}}元</li>
48
                         <li style="width:50%;">优惠金额:0.00元</li>
52
                         <li style="width:50%;">优惠金额:0.00元</li>
49
                         <li style="width:50%;">总金额</li>
53
                         <li style="width:50%;">总金额</li>
50
-                        <li style="width:50%;">0.00元</li>
51
-                    </ul>
52
-                    <p class="centerRightTitle">发票费用</p>
53
-                    <ul class="basicUl">
54
-                        <li style="width:100%;">西药费:0.00元</li>
54
+                        <li style="width:50%;">{{order.medfee_sumamt}}元</li>
55
                     </ul>
55
                     </ul>
56
+                    <!--<p class="centerRightTitle">发票费用</p>-->
57
+                    <!--<ul class="basicUl">-->
58
+                        <!--<li style="width:100%;">西药费:0.00元</li>-->
59
+                    <!--</ul>-->
56
                 </div>
60
                 </div>
57
             </div>
61
             </div>
58
         </div>
62
         </div>
102
           radio: 1,
106
           radio: 1,
103
           radioStatus: 1,
107
           radioStatus: 1,
104
           search_input: '',
108
           search_input: '',
109
+          order:{},
105
         }
110
         }
106
     },created(){
111
     },created(){
107
       this.GetOrderDetail()
112
       this.GetOrderDetail()
164
           this.patientInfo = response.data.data.order.patient
169
           this.patientInfo = response.data.data.order.patient
165
           this.hisPatientInfo = response.data.data.order.his_patient
170
           this.hisPatientInfo = response.data.data.order.his_patient
166
           this.info = response.data.data.p_info
171
           this.info = response.data.data.p_info
172
+          this.order = response.data.data.order
173
+
167
           this.prescriptions = []
174
           this.prescriptions = []
168
           for (let i = 0; i < response.data.data.prescription.length; i++) {
175
           for (let i = 0; i < response.data.data.prescription.length; i++) {
169
             var prescription = response.data.data.prescription[i]
176
             var prescription = response.data.data.prescription[i]
196
                 id: prescription.project[b].id,
203
                 id: prescription.project[b].id,
197
                 project_id: prescription.project[b].project.id,
204
                 project_id: prescription.project[b].project.id,
198
                 project_name: prescription.project[b].project.project_name,
205
                 project_name: prescription.project[b].project.project_name,
199
-                statistical_classification: prescription.project[b].statistical_classification,
206
+                statistical_classification: prescription.project[b].project.statistical_classification,
200
                 single_dose: prescription.project[b].single_dose,
207
                 single_dose: prescription.project[b].single_dose,
201
                 delivery_way: prescription.project[b].delivery_way,
208
                 delivery_way: prescription.project[b].delivery_way,
202
                 execution_frequency: prescription.project[b].execution_frequency,
209
                 execution_frequency: prescription.project[b].execution_frequency,

+ 104 - 83
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue 查看文件

1
 <template>
1
 <template>
2
-    <el-dialog
3
-        title="附加收费"
4
-        width="300px"
5
-        :visible.sync="visible"
6
-        :before-close="_close"
7
-    >
8
-        <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }"
9
-        :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
10
-          @selection-change="handleSelectionChange">
11
-            <el-table-column align="center" type="selection" width="40"></el-table-column>
12
-            <el-table-column align="center" prop="name" label="名称" width="100">
13
-                <template slot-scope="scope">{{ scope.row.name }}</template>
14
-            </el-table-column>
15
-            <el-table-column align="center" prop="name" label="金额(元)">
16
-                <template slot-scope="scope">
17
-                    <el-input v-model="scope.row.money" placeholder=""></el-input>
18
-                </template>
19
-            </el-table-column>
20
-        </el-table>
21
-        <div slot="footer" class="dialog-footer">
22
-            <el-button @click="hide">取 消</el-button>
23
-            <el-button type="primary"  @click="submitAction()">保 存</el-button>
24
-        </div>
25
-    </el-dialog>
2
+  <el-dialog
3
+    title="附加收费"
4
+    width="300px"
5
+    :visible.sync="visible"
6
+    :before-close="_close"
7
+  >
8
+    <el-table :data="chargeTable" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }"
9
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
10
+              @select-all="handleSelectionChange"
11
+              @select='selectDrugs'>
12
+      <el-table-column align="center" type="selection" width="40"></el-table-column>
13
+      <el-table-column align="center" prop="name" label="名称" width="100">
14
+        <template slot-scope="scope">{{ scope.row.name }}</template>
15
+      </el-table-column>
16
+      <el-table-column align="center" prop="name" label="金额(元)">
17
+        <template slot-scope="scope">
18
+          <el-input type="number" v-model="scope.row.price" placeholder="请输入金额"></el-input>
19
+        </template>
20
+      </el-table-column>
21
+    </el-table>
22
+    <div slot="footer" class="dialog-footer">
23
+      <el-button @click="hide">取 消</el-button>
24
+      <el-button type="primary" @click="submitAction()">保 存</el-button>
25
+    </div>
26
+  </el-dialog>
26
 </template>
27
 </template>
27
 
28
 
28
 <script>
29
 <script>
29
- import { saveCharges } from "@/api/project/project"
30
-export default {
31
-   props: {
30
+  import { saveCharges } from '@/api/project/project'
31
+
32
+  export default {
33
+    props: {
32
       hisPatientInfo: Object,
34
       hisPatientInfo: Object,
33
-      patientInfo:Object,
35
+      patientInfo: Object,
36
+      additions: Array,
37
+      addtions_charge: Array
38
+
34
     },
39
     },
35
-    data(){
36
-        return{
37
-            visible:false,
38
-            form:{
39
-                name:''
40
-            },
41
-            tableData:[
42
-              {id:1,name:"工本费",money:""},
43
-              {id:2,name:"挂号费",money:""},
44
-              {id:3,name:"诊疗费",money:""}
45
-            ],
46
-            chargeTable:[]
47
-        }
40
+    data() {
41
+      return {
42
+        visible: false,
43
+        chargeTable: [],
44
+        charges: []
45
+      }
48
     },
46
     },
49
-    methods:{
50
-        _close: function(done) {
51
-            // this.clear()
52
-            done()
53
-        },
54
-        clear: function() {
55
-            this.form.id = 0;
56
-            this.form.name = "";
57
-            this.form.intro = "";
58
-        },
59
-        show() {
60
-            // this.clear()
61
-            this.visible = true
62
-        },
63
-        hide() {
64
-            // this.clear()
65
-            this.visible = false
66
-        },
67
-        handleSelectionChange(val){
68
-          console.log("val",val)
69
-          this.chargeTable = val
70
-        },
71
-        submitAction(){
72
-          var params = {
73
-             his_patient_id:this.hisPatientInfo.id,
74
-             patient_id:this.patientInfo.id,
75
-             medicineData:this.chargeTable
76
-           }
77
-        //    console.log("params",params)
78
-          saveCharges(params).then(response=>{
79
-             if(response.data.state == 1){
80
-               var additionalCharge =  response.data.data.additionalCharge
81
-               console.log("additionalchar",additionalCharge)
82
-               this.visible = false
83
-               this.$message.success("保存成功")
84
-             }
85
-          })
47
+    methods: {
48
+      selectDrugs(selection, row) {
49
+        this.charges = selection
50
+      },
51
+      _close: function(done) {
52
+        // this.clear()
53
+        done()
54
+      },
55
+      clear: function() {
56
+        this.form.id = 0
57
+        this.form.name = ''
58
+        this.form.intro = ''
59
+      },
60
+      show() {
61
+        this.chargeTable = []
62
+        this.visible = true
63
+        if (this.addtions_charge == null || this.addtions_charge.length == 0) {
64
+          for (let i = 0; i < this.additions.length; i++) {
65
+            let obj = {
66
+              id: '0',
67
+              item_id: this.additions[i].id.toString(),
68
+              name: this.additions[i].name,
69
+              price: this.additions[i].price.toString()
70
+            }
71
+            this.chargeTable.push(obj)
72
+          }
73
+        } else {
74
+
75
+          for (let i = 0; i < this.addtions_charge.length; i++) {
76
+            let obj = {
77
+              id: this.addtions_charge[i].id.toString(),
78
+              item_id: this.addtions_charge[i].item_id.toString(),
79
+              name: this.addtions_charge[i].item_name,
80
+              price: this.addtions_charge[i].price.toString()
81
+            }
82
+            this.chargeTable.push(obj)
83
+          }
84
+        }
85
+      },
86
+      hide() {
87
+        this.visible = false
88
+      },
89
+      handleSelectionChange(val) {
90
+        this.charges = val
91
+      },
92
+      submitAction() {
93
+        var params = {
94
+          his_patient_id: this.hisPatientInfo.id,
95
+          patient_id: this.patientInfo.id,
96
+          medicineData: this.charges
86
         }
97
         }
98
+        saveCharges(params).then(response => {
99
+          if (response.data.state == 1) {
100
+            var data = response.data.data.additional_charges
101
+            this.$emit('setData', data)
102
+            this.$message.success('保存成功')
103
+            this.visible = false
104
+
105
+          }
106
+        })
107
+      }
87
     },
108
     },
88
-    watch:{
89
-       hisPatientInfo:function(val){
90
-         console.log("患者ID",this)
91
-       }
109
+    watch: {
110
+      hisPatientInfo: function(val) {
111
+        console.log('患者ID', this)
112
+      }
92
     }
113
     }
93
-}
114
+  }
94
 </script>
115
 </script>
95
 
116
 

+ 112 - 40
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

22
           <!--<el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>-->
22
           <!--<el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>-->
23
           <!--</el-form-item>-->
23
           <!--</el-form-item>-->
24
           <el-form-item label="挂号类型: " prop="name">
24
           <el-form-item label="挂号类型: " prop="name">
25
-            <el-select style="width:100%;" v-model="register_type" placeholder="">
26
-              <el-option
27
-                v-for="(item,index) in this.register_types"
28
-                :key="index"
29
-                :label="item.name"
30
-                :value="item.name">
31
-              </el-option>
32
-            </el-select>
33
-          </el-form-item>
34
-          <el-form-item label="医疗类型: " prop="name">
35
             <el-select style="width:100%;" v-model="register_type" placeholder="">
25
             <el-select style="width:100%;" v-model="register_type" placeholder="">
36
               <el-option
26
               <el-option
37
                 v-for="(item,index) in getDictionaryDataConfig('system','register_type')"
27
                 v-for="(item,index) in getDictionaryDataConfig('system','register_type')"
41
               </el-option>
31
               </el-option>
42
             </el-select>
32
             </el-select>
43
           </el-form-item>
33
           </el-form-item>
44
-          <el-form-item label="诊断:" prop="name">
34
+          <el-form-item label="疾病类型:" prop="name">
45
 
35
 
46
             <el-select style="width:100%;" v-model="state1" placeholder="">
36
             <el-select style="width:100%;" v-model="state1" placeholder="">
47
               <el-option
37
               <el-option
65
         </el-form>
55
         </el-form>
66
         <div class="tabsBox">
56
         <div class="tabsBox">
67
 
57
 
68
-          <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
69
-          <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" closable @tab-remove="removeTab"
58
+          <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
59
+          <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
70
                    :before-leave="moreState" @tab-click="tabclickEvent">
60
                    :before-leave="moreState" @tab-click="tabclickEvent">
71
             <el-tab-pane
61
             <el-tab-pane
72
               v-for="(item, index) in prescriptions"
62
               v-for="(item, index) in prescriptions"
104
             </el-option>
94
             </el-option>
105
           </el-select>
95
           </el-select>
106
           <span>当前处方总价:</span>
96
           <span>当前处方总价:</span>
107
-          <span style="color:red;"></span>元
97
+          <span style="color:red;">{{getTotalOne()?getTotalOne():''}}</span>元
108
           <span style="margin-left:10px;">总价:</span>
98
           <span style="margin-left:10px;">总价:</span>
109
-          <span style="color:red;">{{ getTotal() }}</span>元
99
+          <span style="color:red;">{{ getTotal()?getTotal():''}}</span>元
110
           <span>{{order_status}}</span>
100
           <span>{{order_status}}</span>
111
 
101
 
112
         </div>
102
         </div>
118
         </div> -->
108
         </div> -->
119
         <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab">
109
         <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab">
120
               <el-tab-pane label="药品" :name="1">
110
               <el-tab-pane label="药品" :name="1">
121
-                
111
+
122
               </el-tab-pane>
112
               </el-tab-pane>
123
               <el-tab-pane label="项目" :name="2">
113
               <el-tab-pane label="项目" :name="2">
124
-                
114
+
125
               </el-tab-pane>
115
               </el-tab-pane>
126
               <div style="height:100%;" v-show="showOne">
116
               <div style="height:100%;" v-show="showOne">
127
                   <el-tabs class="rightTabs" v-model="activeName">
117
                   <el-tabs class="rightTabs" v-model="activeName">
237
               </div>
227
               </div>
238
         </el-tabs>
228
         </el-tabs>
239
         <template>
229
         <template>
240
-          
241
 
230
 
242
-          
231
+
232
+
243
 
233
 
244
           <div class="comfirmBox">
234
           <div class="comfirmBox">
245
             <!-- <div>
235
             <!-- <div>
262
         </template>
252
         </template>
263
       </div>
253
       </div>
264
     </div>
254
     </div>
265
-    <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
266
-                       :patientInfo="patientInfo"></additionalCharges>
255
+    <additionalCharges   v-on:setData="setCharge" ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
256
+                       :patientInfo="patientInfo" :additions="additions" :addtions_charge="addtions_charge"></additionalCharges>
267
     <select-template ref='selectTemplate'></select-template>
257
     <select-template ref='selectTemplate'></select-template>
268
     <save-template ref='saveTemplate'></save-template>
258
     <save-template ref='saveTemplate'></save-template>
269
   </div>
259
   </div>
292
       prescriptions: Array,
282
       prescriptions: Array,
293
       record_date: String,
283
       record_date: String,
294
       search_keyword: '',
284
       search_keyword: '',
285
+      addtions_charge:Array,
295
 
286
 
296
       other_sick: {
287
       other_sick: {
297
         type: Array,
288
         type: Array,
318
         drugs: [],
309
         drugs: [],
319
         allDrugs: [],
310
         allDrugs: [],
320
         advices_template: [],
311
         advices_template: [],
321
-
312
+        additions:[],
322
         editableTabsValue: '处方1',
313
         editableTabsValue: '处方1',
323
         editableTabs: [{
314
         editableTabs: [{
324
           title: '处方1',
315
           title: '处方1',
357
           { id: 2, name: '自费' }
348
           { id: 2, name: '自费' }
358
 
349
 
359
         ],
350
         ],
360
-        department:[],
361
-        sick:[],
362
-        prescription_id:0,
351
+        department: [],
352
+        sick: [],
353
+        curTotal: 0,
354
+        prescription_id: 0
363
       }
355
       }
364
     },
356
     },
365
     methods: {
357
     methods: {
358
+      setCharge(additional_charges){
359
+        console.log("111122222")
360
+        this.addtions_charge = additional_charges
361
+        console.log(this.addtions_charge )
362
+
363
+
364
+      },
366
       searchAction() {
365
       searchAction() {
367
-        if(this.search_keyword.length == 0){
366
+        if (this.search_keyword.length == 0) {
368
           this.drugs = this.allDrugs
367
           this.drugs = this.allDrugs
369
-        }else{
368
+        } else {
370
           let arr = []
369
           let arr = []
371
-          for (let i = 0; i < this.drugs.length; i++){
372
-            if(this.drugs[i].drug_name.indexOf(this.search_keyword) != -1){
370
+          for (let i = 0; i < this.drugs.length; i++) {
371
+            if (this.drugs[i].drug_name.indexOf(this.search_keyword) != -1) {
373
               arr = arr.concat(this.drugs[i])
372
               arr = arr.concat(this.drugs[i])
374
             }
373
             }
375
           }
374
           }
377
 
376
 
378
         }
377
         }
379
 
378
 
379
+      }, getTotalOne() {
380
+        var total = 0
381
+        console.log(this.prescriptions)
382
+        for (let i = 0; i < this.prescriptions.length; i++) {
383
+
384
+          if(this.prescriptions[i].name == this.editableTabsValue) {
385
+
386
+            if (this.prescriptions[i].advices != null) {
387
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
388
+                total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
389
+              }
390
+            }
391
+            if (this.prescriptions[i].project != null) {
392
+              for (let b = 0; b < this.prescriptions[i].project.length; b++) {
393
+                total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
394
+              }
395
+            }
396
+            total =  Math.floor(total * 100) / 100
397
+          }
398
+        }
399
+        return total
400
+
401
+      }, getCurTotal() {
402
+        var total = 0
403
+        console.log(this.editableTabsValue)
404
+
405
+        if(this.curPrescriptions.type == 1) {
406
+          for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
407
+            total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
408
+          }
409
+          return Math.floor(total * 100) / 100
410
+        }else{
411
+          for (let a = 0; a < this.curPrescriptions.project.length; a++) {
412
+            total = total + this.curPrescriptions.project[a].price * this.curPrescriptions.project[a].total
413
+          }
414
+          return Math.floor(total * 100) / 100
415
+        }
380
 
416
 
381
       },
417
       },
382
       getTotal() {
418
       getTotal() {
393
             }
429
             }
394
           }
430
           }
395
         }
431
         }
432
+        if(this.addtions_charge != null) {
433
+          for (let i = 0; i < this.addtions_charge.length; i++) {
434
+            total = total + this.addtions_charge[i].price
435
+          }
436
+        }
396
         return Math.floor(total * 100) / 100
437
         return Math.floor(total * 100) / 100
397
       },
438
       },
398
       createFilter(queryString) {
439
       createFilter(queryString) {
450
             this.doctors = response.data.data.doctors
491
             this.doctors = response.data.data.doctors
451
             this.department = response.data.data.department
492
             this.department = response.data.data.department
452
             this.sick = response.data.data.sick
493
             this.sick = response.data.data.sick
494
+            this.additions = response.data.data.additions
495
+
496
+            var info = response.data.data.info
497
+
498
+            if (this.$store.getters.xt_user.user.user_type == 2 || this.$store.getters.xt_user.user.user_type == 1) {
499
+              console.log('11111')
500
+              this.doctorValue = this.$store.getters.xt_user.user.id
501
+            } else {
502
+              console.log('222222')
503
+
504
+              this.doctorValue = this.doctors[0].admin_user_id
505
+            }
506
+
507
+            if (info.user_type == 2 || info.user_type == 1) {
508
+
509
+
510
+              this.doctorValue = info.admin_user_id
453
 
511
 
454
 
512
 
513
+              if (info.department_id == 0) {
514
+
515
+                if (this.department.length > 0) {
516
+                  this.departmentValue = this.department[0].id
517
+                } else {
518
+                  this.departmentValue = ''
519
+                }
520
+              } else {
521
+                this.departmentValue = info.department_id
522
+              }
523
+            }else{
524
+              this.doctorValue = this.doctors[0].admin_user_id
525
+
526
+            }
455
 
527
 
456
           }
528
           }
457
         })
529
         })
496
           }
568
           }
497
 
569
 
498
         }
570
         }
571
+
499
       },
572
       },
500
       clearData() {
573
       clearData() {
501
         this.curPrescriptions = []
574
         this.curPrescriptions = []
505
         this.teamList = []
578
         this.teamList = []
506
 
579
 
507
       },
580
       },
508
-      setData(data, info) {
581
+      setData(data, info,addition_charge) {
582
+        this.addition_charge = addition_charge
509
         this.prescription_id = data[0].id
583
         this.prescription_id = data[0].id
510
-        console.log("99999999",data[0].id)
584
+
585
+        console.log('99999999', data[0].id)
511
         this.$emit('event1', this.prescription_id)
586
         this.$emit('event1', this.prescription_id)
512
         this.curStatus = 0
587
         this.curStatus = 0
513
         this.prescriptions = data
588
         this.prescriptions = data
514
         this.curPrescriptions = this.prescriptions[0]
589
         this.curPrescriptions = this.prescriptions[0]
515
-       
590
+
516
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
591
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
517
           this.curStatus = 1
592
           this.curStatus = 1
518
           this.customTabIndex = 1
593
           this.customTabIndex = 1
879
                   remark: '',
954
                   remark: '',
880
                   prescribing_number: temp[b].prescribing_number,
955
                   prescribing_number: temp[b].prescribing_number,
881
                   single_dose_unit: temp[b].min_unit,
956
                   single_dose_unit: temp[b].min_unit,
882
-                  prescribing_number_unit: temp[b].min_unit,
883
-                  min_unit: temp[b].min_unit,
957
+                  prescribing_number_unit: temp[b].max_unit,
884
                   medical_insurance_number: temp[b].medical_insurance_number
958
                   medical_insurance_number: temp[b].medical_insurance_number
885
 
959
 
886
                 }
960
                 }
994
             this.teamList = project
1068
             this.teamList = project
995
           }
1069
           }
996
         })
1070
         })
997
-      },changeDoctor(val){
1071
+      }, changeDoctor(val) {
998
         console.log(val)
1072
         console.log(val)
999
         console.log(this.doctors)
1073
         console.log(this.doctors)
1000
-        for (let i = 0; i < this.doctors.length;i++){
1001
-          if(this.doctors[i].admin_user_id == this.doctorValue){
1074
+        for (let i = 0; i < this.doctors.length; i++) {
1075
+          if (this.doctors[i].admin_user_id == this.doctorValue) {
1002
             this.departmentValue = this.doctors[i].department_id
1076
             this.departmentValue = this.doctors[i].department_id
1003
           }
1077
           }
1004
         }
1078
         }
1010
       this.getlist()
1084
       this.getlist()
1011
       //获取所以项目组套
1085
       //获取所以项目组套
1012
       this.getAllProjectTeam()
1086
       this.getAllProjectTeam()
1013
-      
1014
-   
1015
-      
1016
 
1087
 
1017
     }
1088
     }
1089
+
1018
   }
1090
   }
1019
 </script>
1091
 </script>
1020
 
1092
 

+ 4 - 2
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue 查看文件

106
 
106
 
107
 
107
 
108
 <script>
108
 <script>
109
+  import { getDictionaryDataConfig} from "@/utils/data";
109
   import { getHisPrescriptionInfo } from '@/api/his/his'
110
   import { getHisPrescriptionInfo } from '@/api/his/his'
110
   import NewPrescriptionTable from './newPrescriptionTable'
111
   import NewPrescriptionTable from './newPrescriptionTable'
111
   import { uParseTime } from '@/utils/tools'
112
   import { uParseTime } from '@/utils/tools'
218
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
219
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
219
                   single_dose_unit: prescription.advices[b].single_dose_unit,
220
                   single_dose_unit: prescription.advices[b].single_dose_unit,
220
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
221
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
221
-                  min_unit: prescription.advices[b].single_dose_unit,
222
                   medical_insurance_number: prescription.advices[b].med_list_codg
222
                   medical_insurance_number: prescription.advices[b].med_list_codg
223
 
223
 
224
                 }
224
                 }
230
                   id: prescription.project[b].id,
230
                   id: prescription.project[b].id,
231
                   project_id: prescription.project[b].project.id,
231
                   project_id: prescription.project[b].project.id,
232
                   project_name: prescription.project[b].project.project_name,
232
                   project_name: prescription.project[b].project.project_name,
233
-                  statistical_classification: prescription.project[b].statistical_classification,
233
+                  statistical_classification: prescription.project[b].project.statistical_classification,
234
                   single_dose: prescription.project[b].single_dose,
234
                   single_dose: prescription.project[b].single_dose,
235
                   delivery_way: prescription.project[b].delivery_way,
235
                   delivery_way: prescription.project[b].delivery_way,
236
                   execution_frequency: prescription.project[b].execution_frequency,
236
                   execution_frequency: prescription.project[b].execution_frequency,
251
                 type: response.data.data.prescription[i].type
251
                 type: response.data.data.prescription[i].type
252
               }
252
               }
253
               this.prescriptions.push(obj)
253
               this.prescriptions.push(obj)
254
+              console.log(this.prescriptions)
255
+
254
               this.curPrescriptions = this.prescriptions[0]
256
               this.curPrescriptions = this.prescriptions[0]
255
             }
257
             }
256
           }
258
           }

+ 2 - 2
src/xt_pages/outpatientDoctorStation/components/newPrescriptionTable.vue 查看文件

10
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
10
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
11
         <template slot-scope="scope">
11
         <template slot-scope="scope">
12
           <el-input v-model="scope.row.single_dose" readonly></el-input>
12
           <el-input v-model="scope.row.single_dose" readonly></el-input>
13
-          <div> {{scope.row.min_unit}}</div>
13
+          <div> {{scope.row.single_dose_unit}}</div>
14
         </template>
14
         </template>
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="用法">
29
         <template slot-scope="scope">
29
         <template slot-scope="scope">
30
           <div style="display:flex;">
30
           <div style="display:flex;">
31
             <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>
32
-            <div>{{scope.row.min_unit}}</div>
32
+            <div>{{scope.row.prescribing_number_unit}}</div>
33
           </div>
33
           </div>
34
         </template>
34
         </template>
35
       </el-table-column>
35
       </el-table-column>

+ 2 - 2
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue 查看文件

10
         <template slot-scope="scope">
10
         <template slot-scope="scope">
11
           <div style="display:flex;align-items:center;">
11
           <div style="display:flex;align-items:center;">
12
             <el-input v-model="scope.row.single_dose" style="width:65%;"></el-input>
12
             <el-input v-model="scope.row.single_dose" style="width:65%;"></el-input>
13
-            <div>{{scope.row.min_unit}}</div>
13
+            <div>{{scope.row.single_dose_unit}}</div>
14
           </div>
14
           </div>
15
         </template>
15
         </template>
16
       </el-table-column>
16
       </el-table-column>
43
         <template slot-scope="scope">
43
         <template slot-scope="scope">
44
           <div style="display:flex;align-items:center;">
44
           <div style="display:flex;align-items:center;">
45
             <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
45
             <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
46
-            <div> {{scope.row.min_unit}}</div>
46
+            <div> {{scope.row.prescribing_number_unit}}</div>
47
           </div>
47
           </div>
48
         </template>
48
         </template>
49
       </el-table-column>
49
       </el-table-column>

+ 31 - 31
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

66
         </div>
66
         </div>
67
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
67
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
68
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
68
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
69
-        <desk-prescription  :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
69
+        <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
70
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71
                            :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
71
                            :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72
                            v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
72
                            v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
78
       </div>
78
       </div>
79
 
79
 
80
     </div>
80
     </div>
81
-    
81
+
82
      <el-dialog
82
      <el-dialog
83
       title="处方打印"
83
       title="处方打印"
84
       :visible.sync="centerDialogVisible"
84
       :visible.sync="centerDialogVisible"
89
       :data="tableData"
89
       :data="tableData"
90
       tooltip-effect="dark"
90
       tooltip-effect="dark"
91
       style="width: 600px"
91
       style="width: 600px"
92
-      
92
+
93
       @selection-change="handleSelectionChange">
93
       @selection-change="handleSelectionChange">
94
       <el-table-column
94
       <el-table-column
95
         type="selection"
95
         type="selection"
101
         <template  slot-scope="scope">
101
         <template  slot-scope="scope">
102
           <span>处方编号</span>
102
           <span>处方编号</span>
103
         </template>
103
         </template>
104
-      </el-table-column> 
104
+      </el-table-column>
105
       <el-table-column
105
       <el-table-column
106
         label="处方号"
106
         label="处方号"
107
         width="200">
107
         width="200">
110
            <el-input v-model="scope.row.id"></el-input>
110
            <el-input v-model="scope.row.id"></el-input>
111
           </span>
111
           </span>
112
         </template>
112
         </template>
113
-      </el-table-column> 
113
+      </el-table-column>
114
     </el-table>
114
     </el-table>
115
       <span slot="footer" class="dialog-footer">
115
       <span slot="footer" class="dialog-footer">
116
         <el-button @click="centerDialogVisible = false">取 消</el-button>
116
         <el-button @click="centerDialogVisible = false">取 消</el-button>
172
         templatedetail:{},
172
         templatedetail:{},
173
         detalid:0,
173
         detalid:0,
174
         prescription_id:0,
174
         prescription_id:0,
175
+        addtions_charge:[],
176
+
175
         patientid:0,
177
         patientid:0,
176
         prescriptionList:[],
178
         prescriptionList:[],
177
         centerDialogVisible:false,
179
         centerDialogVisible:false,
208
       change(val) {
210
       change(val) {
209
         this.getList()
211
         this.getList()
210
 
212
 
213
+
211
       },
214
       },
212
       getList() {
215
       getList() {
213
         let params = {
216
         let params = {
214
           'record_date': this.record_date,
217
           'record_date': this.record_date,
215
           'type': this.radio
218
           'type': this.radio
216
         }
219
         }
220
+        this.patientTableData = []
217
         getSchedulePatientList(params).then(response => {
221
         getSchedulePatientList(params).then(response => {
218
           if (response.data.state == 0) {
222
           if (response.data.state == 0) {
219
             this.$message.error(response.data.msg)
223
             this.$message.error(response.data.msg)
221
           } else {
225
           } else {
222
             this.patientTableData = response.data.data.list
226
             this.patientTableData = response.data.data.list
223
             this.patientTableDataTwo = response.data.data.list
227
             this.patientTableDataTwo = response.data.data.list
224
-
225
-            console.log('222', this.patientTableData)
228
+            this.cal_one = response.data.data.total_one
229
+            this.cal_two =  response.data.data.total_two
226
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
230
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
227
-            let cal_one = 0
228
-            let cal_two = 0
229
-            for (let i = 0; i < response.data.data.list.length; i++) {
230
-              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
231
-                cal_one = cal_one + 1
232
-              }
233
-              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
234
-                cal_two = cal_two + 1
235
-              }
231
+
232
+            if(this.patientTableData.length > 0) {
233
+              this.$refs.tab.setCurrentRow(this.patientTableData[0])
234
+              this.choosePatient(this.patientTableData[0])
236
             }
235
             }
237
-            this.$refs.tab.setCurrentRow(this.patientTableData[0])
238
-            console.log(this.patientTableData[0])
239
-            this.choosePatient(this.patientTableData[0])
240
-            console.log("9999099999",this.patientTableData[0])
236
+
241
             this.prescriptionList = response.data.data.list.prescription
237
             this.prescriptionList = response.data.data.list.prescription
242
             this.patientid = this.patientTableData[0].patient_id
238
             this.patientid = this.patientTableData[0].patient_id
243
-            this.cal_one = cal_one
244
-            this.cal_two = cal_two
239
+
245
           }
240
           }
246
         })
241
         })
247
       },
242
       },
264
 
259
 
265
             this.info = response.data.data.info
260
             this.info = response.data.data.info
266
 
261
 
262
+            this.addtions_charge = response.data.data.addtions_charge
263
+
264
+
267
 
265
 
268
 
266
 
269
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
267
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
316
                     prescribing_number:prescription.advices[b].prescribing_number.toString(),
314
                     prescribing_number:prescription.advices[b].prescribing_number.toString(),
317
                     single_dose_unit:prescription.advices[b].single_dose_unit,
315
                     single_dose_unit:prescription.advices[b].single_dose_unit,
318
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
316
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
319
-                    min_unit:prescription.advices[b].single_dose_unit,
320
                     medical_insurance_number:prescription.advices[b].med_list_codg,
317
                     medical_insurance_number:prescription.advices[b].med_list_codg,
321
                     id:prescription.advices[b].drug_id
318
                     id:prescription.advices[b].drug_id
322
                   }
319
                   }
329
                   console.log(prescription.project[b].project)
326
                   console.log(prescription.project[b].project)
330
                   let obj = {
327
                   let obj = {
331
                     id: prescription.project[b].id,
328
                     id: prescription.project[b].id,
332
-                    project_id: prescription.project[b].project.id,
329
+                    project_id: prescription.project[b].project_id,
333
                     project_name: prescription.project[b].project.project_name,
330
                     project_name: prescription.project[b].project.project_name,
334
                     statistical_classification: prescription.project[b].project.statistical_classification,
331
                     statistical_classification: prescription.project[b].project.statistical_classification,
335
                     single_dose: prescription.project[b].single_dose,
332
                     single_dose: prescription.project[b].single_dose,
366
               }
363
               }
367
               this.prescriptions.push(obj)
364
               this.prescriptions.push(obj)
368
             }
365
             }
369
-            console.log(this.prescriptions)
370
 
366
 
371
-            this.$refs.prescriptions.setData(this.prescriptions,this.info)
367
+
368
+
369
+            this.$refs.prescriptions.setData(this.prescriptions,this.info,this.addition_charge)
372
           }
370
           }
373
         })
371
         })
374
       },
372
       },
381
         if (index == 1) {
379
         if (index == 1) {
382
           this.$refs.prescriptions.open(1)
380
           this.$refs.prescriptions.open(1)
383
         } else if (index == 2) {
381
         } else if (index == 2) {
384
-         
382
+
385
           this.getPrescriptionList(this.patientid)
383
           this.getPrescriptionList(this.patientid)
386
           // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
384
           // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
387
         } else if (index == 3) {
385
         } else if (index == 3) {
389
         } else if (index == 4) {
387
         } else if (index == 4) {
390
           this.$refs.prescriptions.open(4)
388
           this.$refs.prescriptions.open(4)
391
         }else if(index == 6){
389
         }else if(index == 6){
390
+          // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
391
+
392
           this.getPrescriptionList(this.patientid)
392
           this.getPrescriptionList(this.patientid)
393
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
393
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
394
-          
394
+
395
         }
395
         }
396
-        
396
+
397
       },
397
       },
398
 
398
 
399
       opentwo(index) {
399
       opentwo(index) {
420
       // }
420
       // }
421
 
421
 
422
       getMsgFormSon(id){
422
       getMsgFormSon(id){
423
-       
423
+
424
         this.detalid = id
424
         this.detalid = id
425
       },
425
       },
426
       changetwo(data){
426
       changetwo(data){
438
       //         }
438
       //         }
439
       //     })
439
       //     })
440
       //   },
440
       //   },
441
-      getPrescriptionList(id){   
441
+      getPrescriptionList(id){
442
         getPrescriptionList(id).then(response=>{
442
         getPrescriptionList(id).then(response=>{
443
            if(response.data.state == 1){
443
            if(response.data.state == 1){
444
              this.centerDialogVisible = true
444
              this.centerDialogVisible = true

+ 19 - 19
src/xt_pages/outpatientRegistration/index.vue 查看文件

33
                     <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
33
                     <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
34
                         <el-input v-model="form.age"></el-input>
34
                         <el-input v-model="form.age"></el-input>
35
                     </el-form-item>
35
                     </el-form-item>
36
-                    
36
+
37
 
37
 
38
                     <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
38
                     <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
39
                         <el-date-picker v-model="form.birthday" type="date" @change="getBirthday" placeholder="选择日期"></el-date-picker>
39
                         <el-date-picker v-model="form.birthday" type="date" @change="getBirthday" placeholder="选择日期"></el-date-picker>
54
                             </el-option>
54
                             </el-option>
55
                         </el-select>
55
                         </el-select>
56
                     </el-form-item>
56
                     </el-form-item>
57
-                    
57
+
58
 
58
 
59
                   <el-form-item label="证件类型:">
59
                   <el-form-item label="证件类型:">
60
                         <el-select v-model="form.certificates" placeholder="请选择">
60
                         <el-select v-model="form.certificates" placeholder="请选择">
100
                             <!-- <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button> -->
100
                             <!-- <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button> -->
101
                         </div>
101
                         </div>
102
                     </el-form-item>
102
                     </el-form-item>
103
-                
103
+
104
                 </el-form>
104
                 </el-form>
105
             </div>
105
             </div>
106
             <div class="nameTitle">患者挂号信息:</div>
106
             <div class="nameTitle">患者挂号信息:</div>
157
                 </el-form>
157
                 </el-form>
158
                 <el-button style="float:right" @click="saveHisPatient('form')" type="primary">挂号</el-button>
158
                 <el-button style="float:right" @click="saveHisPatient('form')" type="primary">挂号</el-button>
159
             </div>
159
             </div>
160
-            
160
+
161
         </div>
161
         </div>
162
     </div>
162
     </div>
163
 </template>
163
 </template>
196
                 medicalExpenses:'',
196
                 medicalExpenses:'',
197
                 cost:'',
197
                 cost:'',
198
                 total: '',
198
                 total: '',
199
-                phone:'', 
199
+                phone:'',
200
                 social_type:'',
200
                 social_type:'',
201
             },
201
             },
202
             settlement: [{
202
             settlement: [{
303
     computed:{
303
     computed:{
304
         total(){
304
         total(){
305
             if(this.form.registrationFee || this.form.medicalExpenses || this.form.cost){
305
             if(this.form.registrationFee || this.form.medicalExpenses || this.form.cost){
306
-                return parseFloat(this.form.registrationFee ? this.form.registrationFee : 0) + parseFloat(this.form.medicalExpenses ? this.form.medicalExpenses : 0) + parseFloat(this.form.cost ? this.form.cost : 0) 
306
+                return parseFloat(this.form.registrationFee ? this.form.registrationFee : 0) + parseFloat(this.form.medicalExpenses ? this.form.medicalExpenses : 0) + parseFloat(this.form.cost ? this.form.cost : 0)
307
             }
307
             }
308
         }
308
         }
309
     },
309
     },
321
             console.log(date)
321
             console.log(date)
322
             let curTime = moment(new Date(date)).format('YYYY-MM-DD')
322
             let curTime = moment(new Date(date)).format('YYYY-MM-DD')
323
             console.log("curTime22222",curTime)
323
             console.log("curTime22222",curTime)
324
-           
324
+
325
             console.log(this.jsGetAge(curTime))
325
             console.log(this.jsGetAge(curTime))
326
 
326
 
327
             this.form.age = this.jsGetAge(curTime)
327
             this.form.age = this.jsGetAge(curTime)
389
                 this.$message({message: '添加成功',type: 'success'});
389
                 this.$message({message: '添加成功',type: 'success'});
390
             }
390
             }
391
         },
391
         },
392
-        
392
+
393
         getAllDoctorList(){
393
         getAllDoctorList(){
394
            getAllDoctorList().then(response=>{
394
            getAllDoctorList().then(response=>{
395
              if(response.data.state == 1){
395
              if(response.data.state == 1){
399
                console.log("department",department)
399
                console.log("department",department)
400
                this.departmentList = department
400
                this.departmentList = department
401
              }
401
              }
402
-           })   
402
+           })
403
         },
403
         },
404
-        saveHisPatient(formName){   
404
+        saveHisPatient(formName){
405
            if(this.form.name == ""){
405
            if(this.form.name == ""){
406
              this.$message.error("患者姓名不能为空")
406
              this.$message.error("患者姓名不能为空")
407
              this.is_Name = true
407
              this.is_Name = true
408
              return
408
              return
409
            }
409
            }
410
-          
410
+
411
 
411
 
412
            if(this.form.sex == ""){
412
            if(this.form.sex == ""){
413
              this.$message.error("患者性别不能为空")
413
              this.$message.error("患者性别不能为空")
453
                 }
453
                 }
454
                 if(this.form.costChecked == false){
454
                 if(this.form.costChecked == false){
455
                 this.check = 2
455
                 this.check = 2
456
-                } 
456
+                }
457
                 if(this.form.idCard == ""){
457
                 if(this.form.idCard == ""){
458
                    this.show = true
458
                    this.show = true
459
                 }
459
                 }
462
                     medicalInsuranceCard:this.form.medicalInsuranceCard,
462
                     medicalInsuranceCard:this.form.medicalInsuranceCard,
463
                     name:this.form.name,
463
                     name:this.form.name,
464
                     sex:this.form.sex,
464
                     sex:this.form.sex,
465
-                    certificates:this.form.certificates, 
465
+                    certificates:this.form.certificates,
466
                     medicalCare:this.form.medicalCare,
466
                     medicalCare:this.form.medicalCare,
467
                     birthDay:moment(new Date(this.form.birthday)).format('YYYY-MM-DD'),
467
                     birthDay:moment(new Date(this.form.birthday)).format('YYYY-MM-DD'),
468
                     age:parseInt(this.form.age),
468
                     age:parseInt(this.form.age),
479
                     social_type:this.form.social_type
479
                     social_type:this.form.social_type
480
                 }
480
                 }
481
                 console.log("params",params)
481
                 console.log("params",params)
482
-              
482
+
483
                 saveHisPatient(params).then(response=>{
483
                 saveHisPatient(params).then(response=>{
484
                    if(response.data.state == 1){
484
                    if(response.data.state == 1){
485
                      var patient =  response.data.data.patient
485
                      var patient =  response.data.data.patient
504
                      this.form.total= "" ,
504
                      this.form.total= "" ,
505
                      this.form.phone = "",
505
                      this.form.phone = "",
506
                      this.form.social_type = ""
506
                      this.form.social_type = ""
507
-                   } 
507
+                   }
508
                 })
508
                 })
509
-             } 
509
+             }
510
           })
510
           })
511
         },
511
         },
512
        getTodaySchedulePatient(){
512
        getTodaySchedulePatient(){
516
                console.log("今日排班",patient)
516
                console.log("今日排班",patient)
517
                this.patient = patient
517
                this.patient = patient
518
              }
518
              }
519
-          }) 
519
+          })
520
        },
520
        },
521
        getDictionaryDataConfig(module, filed_name) {
521
        getDictionaryDataConfig(module, filed_name) {
522
         return getDictionaryDataConfig(module, filed_name)
522
         return getDictionaryDataConfig(module, filed_name)
525
     },
525
     },
526
     created(){
526
     created(){
527
       //获取当前机构有人员信息
527
       //获取当前机构有人员信息
528
-      this.getAllDoctorList()   
528
+      this.getAllDoctorList()
529
       //获取今日排班的患者
529
       //获取今日排班的患者
530
       this.getTodaySchedulePatient()
530
       this.getTodaySchedulePatient()
531
     }
531
     }
543
     margin: 0 auto;
543
     margin: 0 auto;
544
 }
544
 }
545
 .basicForm{
545
 .basicForm{
546
-    
546
+
547
     display: flex;
547
     display: flex;
548
     flex-wrap: wrap;
548
     flex-wrap: wrap;
549
     justify-content: space-between;
549
     justify-content: space-between;