Browse Source

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

csx 3 years ago
parent
commit
2645de6d96

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

@@ -381,6 +381,13 @@ export function getCheckAccountFormData (params) {
381 381
 
382 382
 
383 383
 
384
+export function getIncomeStatisticsDataList(params) {
385
+  return request({
386
+    url: "/api/incomestatistics/get",
387
+    method: "get",
388
+    params:params,
389
+  });
390
+}
384 391
 
385 392
 
386 393
 

+ 294 - 280
src/xt_pages/outpatientCharges/components/registerDialog.vue View File

@@ -1,192 +1,192 @@
1 1
 <template>
2
-  <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
-             :close-on-click-modal="isClose"
4
-             :close-on-press-escape="isClose">
5
-
6
-    <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
-      <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
8
-        <el-autocomplete
9
-          class="checkSearch"
10
-          popper-class="my-autocomplete"
11
-          v-model="form.name"
12
-          :fetch-suggestions="querySearchAsync"
13
-          :trigger-on-focus="false"
14
-          placeholder="请输入病人名字"
15
-          @select="handleSelect"
16
-          style="width:160px;"
17
-        >
18
-          <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
-          <template slot-scope="{ item }">
20
-            <div class="name">{{ item.name }}</div>
21
-          </template>
22
-        </el-autocomplete>
23
-      </el-form-item>
24
-
25
-      <el-form-item label="性别:" prop="gender" :validate-event="is_Name">
26
-        <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
-          <el-option
28
-            v-for="item in sex"
29
-            :key="item.value"
30
-            :label="item.label"
31
-            :value="item.value">
32
-          </el-option>
33
-        </el-select>
34
-
35
-
36
-      </el-form-item>
37
-
38
-      <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
39
-        <el-input v-model="form.age"></el-input>
40
-      </el-form-item>
41
-
42
-
43
-      <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
44
-        <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
-                        value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
-      </el-form-item>
47
-
48
-      <el-form-item label="手机号码:" prop="phone">
49
-        <el-input v-model="form.phone"></el-input>
50
-      </el-form-item>
51
-
52
-
53
-      <el-form-item label="医疗类别:">
54
-        <el-select v-model="form.medical_care" placeholder="请选择" style="width:100%;">
55
-          <el-option
56
-            v-for="(item,index) in medical_care"
57
-            :key="index"
58
-            :label="item.label"
59
-            :value="item.value">
60
-          </el-option>
61
-        </el-select>
62
-      </el-form-item>
63
-
64
-
65
-      <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
66
-        <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
-          <el-option
68
-            v-for="item in certificates"
69
-            :key="item.value"
70
-            :label="item.label"
71
-            :value="item.value">
72
-          </el-option>
73
-        </el-select>
74
-      </el-form-item>
75
-
76
-      <el-form-item label="证件号码:" prop="id_card" :validate-event="is_Name">
77
-        <el-input v-model="form.id_card"></el-input>
78
-      </el-form-item>
79
-
80
-      <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81
-        <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
-                   >
83
-          <el-option
84
-            v-for="(item,index) in registers"
85
-            :key="index"
86
-            :label="item.label"
87
-            :value="item.value">
88
-          </el-option>
89
-        </el-select>
90
-      </el-form-item>
91
-      <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
92
-        <el-select style="margin-right:5px;width:100px;" v-model="form.sick_type" placeholder="">
93
-          <el-option
94
-            v-for="(item,index) in sick"
95
-            :key="index"
96
-            :label="item.class_name"
97
-            :value="item.id">
98
-          </el-option>
99
-        </el-select>
100
-      </el-form-item>
101
-
102
-      <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
103
-        <el-select style="margin-right:5px;width:100px;" v-model="form.diagnosis" placeholder="">
104
-          <el-option
105
-            v-for="(item,index) in diagnoses"
106
-            :key="index"
107
-            :label="item.class_name"
108
-            :value="item.id">
109
-          </el-option>
110
-        </el-select>
111
-      </el-form-item>
112
-
113
-
114
-      <el-form-item label="结算类型:">
115
-        <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
116
-          <el-option
117
-            v-for="item in settlement"
118
-            :key="item.value"
119
-            :label="item.label"
120
-            :value="item.value">
121
-          </el-option>
122
-        </el-select>
123
-      </el-form-item>
124
-
125
-
126
-      <el-form-item label="社保类型:">
127
-        <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
128
-          <el-option
129
-            v-for="item in medicalCare"
130
-            :key="item.value"
131
-            :label="item.label"
132
-            :value="item.value">
133
-          </el-option>
134
-        </el-select>
135
-      </el-form-item>
136
-
137
-
138
-      <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
139
-        <el-select v-model="form.id_card_type" placeholder="请选择">
140
-          <el-option
141
-            v-for="item in IDCardTypes"
142
-            :key="item.value"
143
-            :label="item.label"
144
-            :value="item.value">
145
-          </el-option>
146
-        </el-select>
147
-      </el-form-item>
148
-
149
-
150
-      <el-form-item class="specialFormItem" label="医保卡号:">
151
-        <div style="display:flex;">
152
-          <el-input v-model="form.medical_insurance_card"></el-input>
153
-          <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
154
-
155
-        </div>
156
-      </el-form-item>
157
-
158
-      <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
159
-        <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160
-          <el-option
161
-            v-for="item in register"
162
-            :key="item.value"
163
-            :label="item.label"
164
-            :value="item.value">
165
-          </el-option>
166
-        </el-select>
167
-      </el-form-item>
168
-      <el-form-item label="挂号费:">
169
-        <el-input  v-model="form.registration_fee"></el-input>
170
-      </el-form-item>
171
-      <el-form-item label="诊疗费:">
172
-        <el-input v-model="form.medical_expenses"></el-input>
173
-      </el-form-item>
174
-    </el-form>
175
-
176
-    <span slot="footer" class="dialog-footer">
2
+    <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
+               :close-on-click-modal="isClose"
4
+               :close-on-press-escape="isClose">
5
+
6
+        <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
+            <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
8
+                <el-autocomplete
9
+                        class="checkSearch"
10
+                        popper-class="my-autocomplete"
11
+                        v-model="form.name"
12
+                        :fetch-suggestions="querySearchAsync"
13
+                        :trigger-on-focus="false"
14
+                        placeholder="请输入病人名字"
15
+                        @select="handleSelect"
16
+                        style="width:160px;"
17
+                >
18
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
+                    <template slot-scope="{ item }">
20
+                        <div class="name">{{ item.name }}</div>
21
+                    </template>
22
+                </el-autocomplete>
23
+            </el-form-item>
24
+
25
+            <el-form-item label="性别:" prop="gender" :validate-event="is_Name">
26
+                <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
+                    <el-option
28
+                            v-for="item in sex"
29
+                            :key="item.value"
30
+                            :label="item.label"
31
+                            :value="item.value">
32
+                    </el-option>
33
+                </el-select>
34
+
35
+
36
+            </el-form-item>
37
+
38
+            <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
39
+                <el-input v-model="form.age"></el-input>
40
+            </el-form-item>
41
+
42
+
43
+            <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
44
+                <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
+                                value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
+            </el-form-item>
47
+
48
+            <el-form-item label="手机号码:" prop="phone">
49
+                <el-input v-model="form.phone"></el-input>
50
+            </el-form-item>
51
+
52
+
53
+            <el-form-item label="医疗类别:">
54
+                <el-select v-model="form.medical_care" placeholder="请选择" style="width:100%;">
55
+                    <el-option
56
+                            v-for="(item,index) in medical_care"
57
+                            :key="index"
58
+                            :label="item.label"
59
+                            :value="item.value">
60
+                    </el-option>
61
+                </el-select>
62
+            </el-form-item>
63
+
64
+
65
+            <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
66
+                <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
+                    <el-option
68
+                            v-for="item in certificates"
69
+                            :key="item.value"
70
+                            :label="item.label"
71
+                            :value="item.value">
72
+                    </el-option>
73
+                </el-select>
74
+            </el-form-item>
75
+
76
+            <el-form-item label="证件号码:" prop="id_card" :validate-event="is_Name">
77
+                <el-input v-model="form.id_card"></el-input>
78
+            </el-form-item>
79
+
80
+            <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81
+                <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
+                >
83
+                    <el-option
84
+                            v-for="(item,index) in registers"
85
+                            :key="index"
86
+                            :label="item.label"
87
+                            :value="item.value">
88
+                    </el-option>
89
+                </el-select>
90
+            </el-form-item>
91
+            <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
92
+                <el-select style="margin-right:5px;width:100px;" v-model="form.sick_type" placeholder="">
93
+                    <el-option
94
+                            v-for="(item,index) in sick"
95
+                            :key="index"
96
+                            :label="item.class_name"
97
+                            :value="item.id">
98
+                    </el-option>
99
+                </el-select>
100
+            </el-form-item>
101
+
102
+            <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
103
+                <el-select style="margin-right:5px;width:100px;" v-model="form.diagnosis" placeholder="">
104
+                    <el-option
105
+                            v-for="(item,index) in diagnoses"
106
+                            :key="index"
107
+                            :label="item.class_name"
108
+                            :value="item.id">
109
+                    </el-option>
110
+                </el-select>
111
+            </el-form-item>
112
+
113
+
114
+            <el-form-item label="结算类型:">
115
+                <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
116
+                    <el-option
117
+                            v-for="item in settlement"
118
+                            :key="item.value"
119
+                            :label="item.label"
120
+                            :value="item.value">
121
+                    </el-option>
122
+                </el-select>
123
+            </el-form-item>
124
+
125
+
126
+            <el-form-item label="社保类型:">
127
+                <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
128
+                    <el-option
129
+                            v-for="item in medicalCare"
130
+                            :key="item.value"
131
+                            :label="item.label"
132
+                            :value="item.value">
133
+                    </el-option>
134
+                </el-select>
135
+            </el-form-item>
136
+
137
+
138
+            <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
139
+                <el-select v-model="form.id_card_type" placeholder="请选择">
140
+                    <el-option
141
+                            v-for="item in IDCardTypes"
142
+                            :key="item.value"
143
+                            :label="item.label"
144
+                            :value="item.value">
145
+                    </el-option>
146
+                </el-select>
147
+            </el-form-item>
148
+
149
+
150
+            <el-form-item class="specialFormItem" label="医保卡号:">
151
+                <div style="display:flex;">
152
+                    <el-input v-model="form.medical_insurance_card"></el-input>
153
+                    <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
154
+
155
+                </div>
156
+            </el-form-item>
157
+
158
+            <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
159
+                <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160
+                    <el-option
161
+                            v-for="item in register"
162
+                            :key="item.value"
163
+                            :label="item.label"
164
+                            :value="item.value">
165
+                    </el-option>
166
+                </el-select>
167
+            </el-form-item>
168
+            <el-form-item label="挂号费:">
169
+                <el-input v-model="form.registration_fee"></el-input>
170
+            </el-form-item>
171
+            <el-form-item label="诊疗费:">
172
+                <el-input v-model="form.medical_expenses"></el-input>
173
+            </el-form-item>
174
+        </el-form>
175
+
176
+        <span slot="footer" class="dialog-footer">
177 177
     <el-button @click="cancel('formValue')">取 消</el-button>
178 178
     <el-button type="primary" @click="confirm('formValue')">挂 号</el-button>
179 179
   </span>
180
-  </el-dialog>
180
+    </el-dialog>
181 181
 
182 182
 </template>
183 183
 
184 184
 <script>
185
-  import {uParseTime,jsGetAge} from "@/utils/tools";
185
+  import { jsGetAge, uParseTime } from '@/utils/tools'
186 186
   import axios from 'axios'
187
-  import {PostSearch} from '@/api/patient'
187
+  import { PostSearch } from '@/api/patient'
188 188
 
189
-  import {getDictionaryDataConfig} from '@/utils/data'
189
+  import { getDictionaryDataConfig } from '@/utils/data'
190 190
 
191 191
   export default {
192 192
 
@@ -196,30 +196,27 @@
196 196
 
197 197
       return {
198 198
         registers: [
199
-          {value: 11, label: "普通门诊"},
200
-          {value: 12, label: '门诊挂号'},
201
-          {value: 13, label: "急诊"},
202
-          {value: 14, label: "门诊特殊病"},
203
-          {value: 15, label: "门诊统筹"},
204
-          {value: 16, label: "门诊慢性病"},
205
-          {value: 21, label: "普通住院"},
199
+          { value: 11, label: '普通门诊' },
200
+          { value: 12, label: '门诊挂号' },
201
+          { value: 13, label: '急诊' },
202
+          { value: 14, label: '门诊特殊病' },
203
+          { value: 15, label: '门诊统筹' },
204
+          { value: 16, label: '门诊慢性病' },
205
+          { value: 21, label: '普通住院' }
206 206
         ],
207
-        medical_care:[
208
-          {value: 11, label: "普通门诊"},
209
-          {value: 12, label: '家庭通道'},
210
-          {value: 13, label: "门诊大病"},
211
-          {value: 14, label: "重疾特药"},
212
-          {value: 15, label: "门诊慢病"},
213
-          {value: 16, label: "门诊特检"},
214
-          {value: 17, label: "健康体检"},
215
-          {value: 18, label: "预防接种"},
216
-          {value: 19, label: "门诊输血"},
217
-          {value: 91, label: "新冠肺炎门诊"},
207
+        medical_care: [
208
+          { value: 11, label: '普通门诊' },
209
+          { value: 12, label: '家庭通道' },
210
+          { value: 13, label: '门诊大病' },
211
+          { value: 14, label: '重疾特药' },
212
+          { value: 15, label: '门诊慢病' },
213
+          { value: 16, label: '门诊特检' },
214
+          { value: 17, label: '健康体检' },
215
+          { value: 18, label: '预防接种' },
216
+          { value: 19, label: '门诊输血' },
217
+          { value: 91, label: '新冠肺炎门诊' }
218 218
         ],
219 219
 
220
-
221
-
222
-
223 220
         form: {
224 221
           id: '',
225 222
           settlement_value: '',
@@ -227,9 +224,9 @@
227 224
           name: '',
228 225
           gender: '',
229 226
           certificates: 1,
230
-          p_type:'',
231
-          sick_type:'',
232
-          diagnosis:'',
227
+          p_type: '',
228
+          sick_type: '',
229
+          diagnosis: '',
233 230
           medical_care: '',
234 231
           birthday: '',
235 232
           age: '',
@@ -242,25 +239,25 @@
242 239
           medical_expenses: '',
243 240
           cost: '',
244 241
           phone: '',
245
-          social_type: '',
242
+          social_type: ''
246 243
         }, IDCardTypes: [{
247 244
           value: 1,
248 245
           label: '社保卡'
249 246
         }, {
250 247
           value: 2,
251
-          label: "身份证"
248
+          label: '身份证'
252 249
         }, {
253 250
           value: 3,
254
-          label: "电子凭证"
255
-        },],
251
+          label: '电子凭证'
252
+        }],
256 253
         settlement: [
257
-          {value: 1, label: '医保'},
258
-          {value: 2, label: '自费'},
259
-          {value: 3, label: '公费'},
260
-          {value: 4, label: '农保'},
261
-          {value: 5, label: '会员'},
262
-          {value: 6, label: '职工'},
263
-          {value: 7, label: '合同'}
254
+          { value: 1, label: '医保' },
255
+          { value: 2, label: '自费' },
256
+          { value: 3, label: '公费' },
257
+          { value: 4, label: '农保' },
258
+          { value: 5, label: '会员' },
259
+          { value: 6, label: '职工' },
260
+          { value: 7, label: '合同' }
264 261
         ],
265 262
         sex: [{
266 263
           value: 1,
@@ -274,72 +271,72 @@
274 271
           label: '内地身份证'
275 272
         }, {
276 273
           value: 2,
277
-          label: "社保卡"
274
+          label: '社保卡'
278 275
         }, {
279 276
           value: 3,
280
-          label: "护照"
277
+          label: '护照'
281 278
         }, {
282 279
           value: 4,
283
-          label: "军官证"
280
+          label: '军官证'
284 281
         }, {
285 282
           value: 5,
286
-          label: "台胞证"
283
+          label: '台胞证'
287 284
         }, {
288 285
           value: 6,
289
-          label: "港澳地区身份证"
286
+          label: '港澳地区身份证'
290 287
         }],
291 288
         medicalCare: [{
292 289
           value: 1,
293 290
           label: '职工基本医疗保险'
294 291
         }, {
295 292
           value: 2,
296
-          label: "公务员医疗补助"
293
+          label: '公务员医疗补助'
297 294
         }, {
298 295
           value: 3,
299
-          label: "大额医疗费用补助"
296
+          label: '大额医疗费用补助'
300 297
         }, {
301 298
           value: 4,
302
-          label: "离休人员医疗"
299
+          label: '离休人员医疗'
303 300
         }, {
304 301
           value: 5,
305
-          label: "城乡居民基本医疗保险"
302
+          label: '城乡居民基本医疗保险'
306 303
         }, {
307 304
           value: 6,
308
-          label: "城乡居民大病医疗保险"
305
+          label: '城乡居民大病医疗保险'
309 306
         }, {
310
-            value: 7,
311
-            label: "生育保险"
312
-          }],
307
+          value: 7,
308
+          label: '生育保险'
309
+        }],
313 310
         register: [{
314 311
           value: 1,
315 312
           label: '普通'
316 313
         }, {
317 314
           value: 2,
318
-          label: "主治"
315
+          label: '主治'
319 316
         }, {
320 317
           value: 3,
321
-          label: "主任"
318
+          label: '主任'
322 319
         }, {
323 320
           value: 4,
324
-          label: "免收诊金"
321
+          label: '免收诊金'
325 322
         }, {
326 323
           value: 5,
327
-          label: "专家"
324
+          label: '专家'
328 325
         }],
329 326
         rules: {
330
-          name: [{required: true, message: "患者姓名不能为空", trigger: 'blur'}],
331
-          gender: [{required: true, message: "患者性别不能为空", trigger: 'blur'}],
332
-          id_card: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
333
-          register: [{required: true, message: '请选择挂号类型', trigger: 'blur'}],
334
-          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
335
-          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
336
-          age: [{required: true, message: "患者年龄不能为空", trigger: 'blur'}],
337
-          birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
338
-          certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
339
-          id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
340
-          p_type: [{required: true, message: "处方类型不能为空", trigger: 'change'}],
341
-          sick_type: [{required: true, message: "大病类别不能为空", trigger: 'change'}],
342
-          diagnosis: [{required: true, message: "诊断不能为空", trigger: 'change'}],
327
+          name: [{ required: true, message: '患者姓名不能为空', trigger: 'blur' }],
328
+          gender: [{ required: true, message: '患者性别不能为空', trigger: 'blur' }],
329
+          id_card: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
330
+          register: [{ required: true, message: '请选择挂号类型', trigger: 'blur' }],
331
+          doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
332
+          department: [{ required: true, message: '请填写科室', trigger: 'blur' }],
333
+          age: [{ required: true, message: '患者年龄不能为空', trigger: 'blur' }],
334
+          birthday: [{ required: true, message: '患者出生日期不能为空', trigger: 'blur' }],
335
+          certificates: [{ required: true, message: '证件类型不能为空', trigger: 'change' }],
336
+          id_card_type: [{ required: true, message: '读卡类型不能为空', trigger: 'change' }],
337
+          p_type: [{ required: true, message: '处方类型不能为空', trigger: 'change' }],
338
+          sick_type: [{ required: true, message: '大病类别不能为空', trigger: 'change' }],
339
+          diagnosis: [{ required: true, message: '诊断不能为空', trigger: 'change' }]
343 340
         },
344 341
         visibility: false,
345 342
         labelPosition: 'right',
@@ -362,8 +359,8 @@
362 359
           medical_expenses: '',
363 360
           cost: '',
364 361
           phone: '',
365
-          social_type: '',
366
-        },
362
+          social_type: ''
363
+        }
367 364
 
368 365
       }
369 366
     },
@@ -387,7 +384,7 @@
387 384
 
388 385
       },
389 386
       sick: Array,
390
-      diagnoses: Array,
387
+      diagnoses: Array
391 388
     },
392 389
     methods: {
393 390
       handleSelect(val) {
@@ -397,20 +394,20 @@
397 394
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
398 395
         this.form.phone = val.phone
399 396
         this.form.id_card = val.id_card_no
400
-        var thisLen =  this.form.id_card.length;
401
-        var birth = "";
397
+        var thisLen = this.form.id_card.length
398
+        var birth = ''
402 399
         if (thisLen == 15) {
403
-          birth = "19" + this.form.id_card.substr(6, 6);
400
+          birth = '19' + this.form.id_card.substr(6, 6)
404 401
         } else {
405
-          birth = this.form.id_card.substr(6, 8);
402
+          birth = this.form.id_card.substr(6, 8)
406 403
         }
407 404
         var births =
408
-                birth.substr(0, 4) +
409
-                "-" +
410
-                birth.substr(4, 2) +
411
-                "-" +
412
-                birth.substr(6, 2);
413
-        this.form.age = jsGetAge(births, "-");
405
+          birth.substr(0, 4) +
406
+          '-' +
407
+          birth.substr(4, 2) +
408
+          '-' +
409
+          birth.substr(6, 2)
410
+        this.form.age = jsGetAge(births, '-')
414 411
       },
415 412
       querySearchAsync(keyword, cb) {
416 413
         let key = ''
@@ -430,18 +427,18 @@
430 427
       reading(medicalInsuranceCard) {
431 428
         var that = this
432 429
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
433
-          this.$message.error("请先选择读卡类型")
430
+          this.$message.error('请先选择读卡类型')
434 431
           return
435 432
         }
436 433
         let params = {
437 434
           'id_card_type': this.form.id_card_type,
438
-          'admin_user_id':this.$store.getters.xt_user.user.id,
435
+          'admin_user_id': this.$store.getters.xt_user.user.id
439 436
 
440 437
         }
441 438
         axios.get('http://127.0.0.1:9532/api/sscard', {
442 439
           params: params
443 440
         })
444
-          .then(function (response) {
441
+          .then(function(response) {
445 442
             if (response.data.state == 0) {
446 443
               that.$message.error(response.data.msg)
447 444
               return false
@@ -467,20 +464,38 @@
467 464
                 that.form.phone = patient.phone
468 465
                 that.form.idCard = patient.id_card_no
469 466
               }
470
-              that.$message({message: '读卡成功', type: 'success'})
467
+              that.$message({ message: '读卡成功', type: 'success' })
471 468
             }
472 469
           })
473
-          .catch(function (error) {
474
-
475
-          });
470
+          .catch(function(error) {
476 471
 
472
+          })
477 473
 
478 474
       },
479 475
       getDictionaryDataConfig(module, filed_name) {
480 476
         return getDictionaryDataConfig(module, filed_name)
481 477
       },
482
-      show: function () {
483
-        this.form = Object.assign({}, this.resetForm)
478
+      show: function() {
479
+        this.visibility = true
480
+        // this.form = Object.assign({}, this.resetForm)
481
+        this.form.id = 0
482
+        this.form.settlement_value = ''
483
+        this.form.medical_insurance_card = ''
484
+        this.form.name = ''
485
+        this.form.gender = ''
486
+        this.form.medical_care = ''
487
+        this.form.birthda = ''
488
+        this.form.age = ''
489
+        this.form.id_card = ''
490
+        this.form.register = ''
491
+        this.form.doctor = ''
492
+        this.form.department = ''
493
+        this.form.registration_fee = ''
494
+        this.form.medical_expenses = ''
495
+        this.form.cost = ''
496
+        this.form.phone = ''
497
+        this.form.social_type = ''
498
+
484 499
         this.form.p_type = 14
485 500
         this.form.sick_type = this.sick[0].id
486 501
         this.form.diagnosis = this.diagnoses[0].id
@@ -498,16 +513,15 @@
498 513
         // if( this.form.social_type == 0){
499 514
         //   this.form.social_type = ""
500 515
         // }
501
-        this.visibility = true
502 516
 
503
-      }, hide: function () {
517
+      }, hide: function() {
504 518
         this.visibility = false
505 519
         this.$refs['formValue'].resetFields()
506
-      }, cancel: function (formName) {
520
+      }, cancel: function(formName) {
507 521
         this.$emit('cancel', this.getValue())
508 522
         this.$refs['formValue'].resetFields()
509 523
       },
510
-      confirm: function (formName) {
524
+      confirm: function(formName) {
511 525
         this.$refs['formValue'].validate((valid) => {
512 526
           if (valid) {
513 527
             let value = {}
@@ -516,7 +530,7 @@
516 530
           }
517 531
         })
518 532
       },
519
-      getValue: function () {
533
+      getValue: function() {
520 534
         let form = {}
521 535
         form = this.form
522 536
         return form
@@ -527,16 +541,16 @@
527 541
 </script>
528 542
 
529 543
 <style lang="scss" scoped>
530
-  .registerDialog {
544
+    .registerDialog {
531 545
 
532
-  .el-form {
533
-    display: flex;
534
-    flex-wrap: wrap;
535
-  }
546
+    .el-form {
547
+        display: flex;
548
+        flex-wrap: wrap;
549
+    }
536 550
 
537
-  .el-form-item {
538
-    width: 50%;
539
-  }
551
+    .el-form-item {
552
+        width: 50%;
553
+    }
540 554
 
541
-  }
555
+    }
542 556
 </style>

+ 3 - 3
src/xt_pages/outpatientCharges/costComparison.vue View File

@@ -158,7 +158,7 @@
158 158
                 <el-form :model="form" label-width="100px">
159 159
                     <el-form-item label="时间" label-width="100px">
160 160
                         <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
161
-                                        @change="handleStartTimeChange" :editable="false" :clearable="false"
161
+                                        :editable="false" :clearable="false"
162 162
                                         style="width: 200px;" type="date" placeholder="选择开始日期"
163 163
                                         format="yyyy-MM-dd"
164 164
                                         value-format="yyyy-MM-dd"
@@ -166,7 +166,7 @@
166 166
                         -
167 167
 
168 168
                         <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
169
-                                        @change="handleEndTimeChange" :editable="false" :clearable="false"
169
+                                       :editable="false" :clearable="false"
170 170
                                         style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
171 171
                                         format="yyyy-MM-dd"
172 172
                                         value-format="yyyy-MM-dd"
@@ -458,7 +458,7 @@
458 458
                   that.$alert(result_desc, '对账结果', {
459 459
                     confirmButtonText: '确定',
460 460
                     callback: action => {
461
-                      this.dialogFormVisible = false
461
+                      that.dialogFormVisible = false
462 462
                     }
463 463
                   })
464 464
 

+ 185 - 57
src/xt_pages/outpatientCharges/incomeStatistics.vue View File

@@ -11,18 +11,7 @@
11 11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12 12
             搜索
13 13
           </el-button>
14
-          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15
-            <el-option
16
-              label="全部"
17
-              value="0">
18
-            </el-option>
19
-            <el-option
20
-              v-for="(item,index) in type"
21
-              :key="index"
22
-              :label="item.user_name"
23
-              :value="item.admin_user_id">
24
-            </el-option>
25
-          </el-select>
14
+
26 15
           <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27 16
                           @change="handleStartTimeChange" :editable="false" :clearable="false"
28 17
                           style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
@@ -36,13 +25,13 @@
36 25
                           format="yyyy-MM-dd"
37 26
                           value-format="yyyy-MM-dd"
38 27
                           align="right"></el-date-picker>
39
-          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
-          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
28
+          <el-radio v-model="radio" label="1" @change="changeType">汇总</el-radio>
29
+          <el-radio v-model="radio" label="2"  @change="changeType">明细</el-radio>
41 30
         </div>
42 31
         <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
43 32
       </div>
44 33
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
45
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
34
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row  v-if="radio == '1'">
46 35
         <el-table-column
47 36
           prop="date"
48 37
           label="序号"
@@ -52,51 +41,164 @@
52 41
         >
53 42
         </el-table-column>
54 43
         <el-table-column align="center" prop="name" label="收费日期">
55
-          <template slot-scope="scope">{{ scope.row.selt_time }}</template>
44
+          <template slot-scope="scope" >{{ scope.row.settle_accounts_date }}</template>
45
+        </el-table-column>
46
+        <el-table-column align="center" prop="name" label="总金额">
47
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
48
+        </el-table-column>
49
+        <el-table-column align="center" prop="name" label="医保统筹金额">
50
+          <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
51
+        </el-table-column>
52
+        <el-table-column align="center" prop="name" label="大额基金金额">
53
+          <template slot-scope="scope">{{scope.row.hifob_pay}}</template>
54
+        </el-table-column>
55
+        <el-table-column align="center" prop="name" label="大病基金金额">
56
+          <template slot-scope="scope">{{scope.row.hifmi_pay}}</template>
57
+        </el-table-column>
58
+        <el-table-column align="center" prop="name" label="补充保险基金金额">
59
+          <template slot-scope="scope">{{scope.row.hifes_pay}}</template>
60
+        </el-table-column>
61
+        <el-table-column align="center" prop="name" label="医疗救助基金金额">
62
+          <template slot-scope="scope">{{scope.row.maf_pay}}</template>
63
+        </el-table-column>
64
+        <el-table-column align="center" prop="name" label="公务员基金">
65
+          <template slot-scope="scope">{{scope.row.cvlserv_pay}}</template>
66
+        </el-table-column>
67
+        <el-table-column align="center" prop="name" label="个人支付基金">
68
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
56 69
         </el-table-column>
70
+        <el-table-column align="center" prop="name" label="折扣金额">
71
+          <template slot-scope="scope">{{scope.row.discount_price}}</template>
72
+        </el-table-column>
73
+        <el-table-column align="center" prop="name" label="优惠金额">
74
+          <template slot-scope="scope">{{scope.row.preferential_price}}</template>
75
+        </el-table-column>
76
+        <el-table-column align="center" prop="name" label="个人账户支付金额">
77
+          <template slot-scope="scope">{{scope.row.acct_pay}}</template>
78
+        </el-table-column>
79
+        <!--<el-table-column align="center" prop="name" label="预交金">-->
80
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
81
+        <!--</el-table-column>-->
57 82
 
83
+        <!--<el-table-column align="center" prop="name" label="现金">-->
84
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
85
+        <!--</el-table-column>-->
58 86
 
59
-        <el-table-column align="center" prop="name" label="患者名字">
60
-          <template slot-scope="scope">{{ scope.row.psn_name }}</template>
61
-        </el-table-column>
62
-        <!--<el-table-column align="center" prop="name" label="患者类型">-->
63
-          <!--<template slot-scope="scope"></template>-->
87
+        <!--<el-table-column align="center" prop="name" label="微信">-->
88
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
64 89
         <!--</el-table-column>-->
65
-        <el-table-column align="center" prop="name" label="总金额">
66
-          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
90
+
91
+        <!--<el-table-column align="center" prop="name" label="操作">-->
92
+          <!--<template slot-scope="scope">-->
93
+            <!--<el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>-->
94
+          <!--</template>-->
95
+        <!--</el-table-column>-->
96
+      </el-table>
97
+
98
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"  v-if="radio == '2'"
99
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
100
+        <el-table-column
101
+                prop="date"
102
+                label="序号"
103
+                width="60"
104
+                align="center"
105
+                type="index"
106
+        >
67 107
         </el-table-column>
68 108
 
109
+        <el-table-column align="center" prop="name" label="收费日期">
110
+          <template slot-scope="scope" >{{ scope.row.setl_time }}</template>
111
+        </el-table-column>
112
+        <el-table-column align="center" prop="name" label="姓名">
113
+          <template slot-scope="scope" >{{ scope.row.psn_name }}</template>
114
+        </el-table-column>
69 115
         <el-table-column align="center" prop="name" label="总金额">
70 116
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
71 117
         </el-table-column>
118
+        <el-table-column align="center" prop="name" label="基金支付">
119
+          <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
120
+        </el-table-column>
121
+        <el-table-column align="center" prop="name" label="个人支付基金">
122
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
123
+        </el-table-column>
72 124
 
125
+        <el-table-column align="center" prop="name" label="床位费">
126
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'01')}}</template>
127
+        </el-table-column>
128
+
129
+        <el-table-column align="center" prop="name" label="诊察费">
130
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'02')}}</template>
131
+        </el-table-column>
73 132
 
74 133
 
75
-        <el-table-column align="center" prop="name" label="实收金额">
76
-          <template slot-scope="scope">{{scope.row.reality_price}}</template>
134
+        <el-table-column align="center" prop="name" label="检查费">
135
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'03')}}</template>
77 136
         </el-table-column>
78
-        <el-table-column align="center" prop="name" label="科室">
79
-          <template slot-scope="scope">{{scope.row.p_info.department.name}}</template>
137
+
138
+        <el-table-column align="center" prop="name" label="化验费">
139
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'04')}}</template>
80 140
         </el-table-column>
81
-        <el-table-column align="center" prop="name" label="收费日期">
82
-          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
141
+
142
+        <el-table-column align="center" prop="name" label="治疗费">
143
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'05')}}</template>
83 144
         </el-table-column>
84
-        <el-table-column align="center" prop="name" label="收费员">
85
-          <template slot-scope="scope">{{ scope.row.p_info.doctor }}</template>
145
+
146
+
147
+        <el-table-column align="center" prop="name" label="手术费">
148
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'06')}}</template>
86 149
         </el-table-column>
87
-        <el-table-column align="center" prop="name" label="状态">
88
-          <template slot-scope="scope">
89
-            <div v-if="scope.row.order_status == 1">待结算</div>
90
-            <div v-if="scope.row.order_status == 2">已结算</div>
91
-            <div v-if="scope.row.order_status == 3">已退费</div>
92
-          </template>
150
+
151
+        <el-table-column align="center" prop="name" label="护理费">
152
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'07')}}</template>
93 153
         </el-table-column>
94
-        <el-table-column align="center" prop="name" label="操作">
95
-          <template slot-scope="scope">
96
-            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
97
-          </template>
154
+
155
+
156
+        <el-table-column align="center" prop="name" label="卫生材料费">
157
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'08')}}</template>
98 158
         </el-table-column>
159
+
160
+        <el-table-column align="center" prop="name" label="西药费">
161
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'09')}}</template>
162
+        </el-table-column>
163
+
164
+        <el-table-column align="center" prop="name" label="中药饮片费">
165
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'10')}}</template>
166
+        </el-table-column>
167
+
168
+
169
+        <el-table-column align="center" prop="name" label="中成药费">
170
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'11')}}</template>
171
+        </el-table-column>
172
+
173
+        <el-table-column align="center" prop="name" label="一般诊疗费">
174
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'12')}}</template>
175
+        </el-table-column>
176
+
177
+        <el-table-column align="center" prop="name" label="挂号费">
178
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'13')}}</template>
179
+        </el-table-column>
180
+
181
+        <el-table-column align="center" prop="name" label="其他费">
182
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'14')}}</template>
183
+        </el-table-column>
184
+        <el-table-column align="center" prop="name" label="医保支付">
185
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
186
+        </el-table-column>
187
+        <el-table-column align="center" prop="name" label="现金">
188
+        <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
189
+        </el-table-column>
190
+        <el-table-column align="center" prop="name" label="微信">
191
+        <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
192
+        </el-table-column>
193
+        <el-table-column align="center" prop="name" label="支付宝">
194
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
195
+        </el-table-column>
196
+        <el-table-column align="center" prop="name" label="银行卡">
197
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
198
+        </el-table-column>
199
+
99 200
       </el-table>
201
+
100 202
       <el-pagination
101 203
         @size-change="handleSizeChange"
102 204
         @current-change="handleCurrentChange"
@@ -118,7 +220,7 @@
118 220
 
119 221
 <script>
120 222
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
121
-  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
223
+  import { getIncomeStatisticsDataList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
122 224
   import { uParseTime } from '@/utils/tools'
123 225
 
124 226
   export default {
@@ -132,6 +234,7 @@
132 234
           { path: false, name: '项目消费明细汇总' }
133 235
         ],
134 236
         tableData: [],
237
+        radio:'1',
135 238
         limit:10,
136 239
         page:1,
137 240
         keywords:"",
@@ -144,6 +247,35 @@
144 247
       }
145 248
     },
146 249
     methods: {
250
+      getPrice(order_info, number){
251
+
252
+
253
+
254
+
255
+
256
+      },
257
+      changeType(val){
258
+
259
+        let params= {
260
+          page : this.page,
261
+          limit: this.limit,
262
+          keywords:this.keywords,
263
+          start_time:this.start_time,
264
+          end_time: this.end_time,
265
+          statistics_type: this.radio
266
+        }
267
+        getIncomeStatisticsDataList(params).then(response => {
268
+          if (response.data.state == 0) {
269
+            this.$message.error(response.data.msg)
270
+            return false
271
+          } else {
272
+            this.tableData = response.data.data.list
273
+            this.total = response.data.data.total
274
+          }
275
+        })
276
+
277
+
278
+      },
147 279
       export_detail(){
148 280
         let params= {
149 281
           start_time:this.start_time,
@@ -248,33 +380,29 @@
248 380
       },  formatJson(filterVal, jsonData) {
249 381
         return jsonData.map(v => filterVal.map(j => v[j]))
250 382
       },
251
-      changeDoctor(){
252
-        this.page = 1
253
-        this.keywords=""
254
-        this.getHisOrderList()
255
-      },
383
+
256 384
       handleSizeChange(limit){
257 385
         this.limit = limit;
258
-        this.getHisOrderList()
386
+        this.getIncomeStatisticsDataList()
259 387
 
260 388
       },handleCurrentChange(page){
261 389
         this.page = page;
262
-        this.getHisOrderList()
390
+        this.getIncomeStatisticsDataList()
263 391
 
264 392
 
265 393
       },
266 394
       handleStartTimeChange(){
267 395
         this.page = 1
268 396
         this.keywords=""
269
-        this.getHisOrderList()
397
+        this.getIncomeStatisticsDataList()
270 398
       },handleEndTimeChange(){
271 399
         this.page = 1
272 400
         this.keywords=""
273
-        this.getHisOrderList()
401
+        this.getIncomeStatisticsDataList()
274 402
       },
275 403
       searchAction(){
276 404
         this.page = 1
277
-        this.getHisOrderList()
405
+        this.getIncomeStatisticsDataList()
278 406
 
279 407
 
280 408
       },
@@ -288,21 +416,21 @@
288 416
           return uParseTime(value, temp)
289 417
         }
290 418
         return ''
291
-      },getHisOrderList(){
419
+      },getIncomeStatisticsDataList(){
292 420
         let params= {
293 421
           page : this.page,
294 422
           limit: this.limit,
295 423
           keywords:this.keywords,
296 424
           start_time:this.start_time,
297 425
           end_time: this.end_time,
298
-          type: this.admin_user_id
426
+          statistics_type: this.radio
299 427
         }
300
-        getHisOrderList(params).then(response => {
428
+        getIncomeStatisticsDataList(params).then(response => {
301 429
           if (response.data.state == 0) {
302 430
             this.$message.error(response.data.msg)
303 431
             return false
304 432
           } else {
305
-            this.tableData = response.data.data.order
433
+            this.tableData = response.data.data.list
306 434
             this.total = response.data.data.total
307 435
           }
308 436
         })
@@ -321,7 +449,7 @@
321 449
       }
322 450
     }, created() {
323 451
      this.getDoctorList()
324
-     this.getHisOrderList()
452
+     this.getIncomeStatisticsDataList()
325 453
 
326 454
 
327 455
     }

+ 467 - 122
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -47,7 +47,7 @@
47 47
                             <template slot-scope="scope">{{scope.row.name}}</template>
48 48
                         </el-table-column>
49 49
                         <el-table-column align="center" prop="name" label="就诊号" width="110">
50
-                            <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}
50
+                            <template slot-scope="scope">{{ scope.row.number?scope.row.number:''}}
51 51
                             </template>
52 52
                         </el-table-column>
53 53
                     </el-table>
@@ -139,8 +139,8 @@
139 139
                         </el-button>
140 140
 
141 141
                         <el-button
142
-                        v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"
143
-                        size="small" @click="open(11)" type="primary"
142
+                                v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"
143
+                                size="small" @click="open(11)" type="primary"
144 144
                         >撤销明细
145 145
                         </el-button>
146 146
 
@@ -596,6 +596,7 @@
596 596
       }, chargeConfirm(form) {
597 597
 
598 598
         form['id'] = this.patientInfo.id
599
+        form['his_patient_id'] = this.hisPatientInfo.id
599 600
         form['record_time'] = this.record_date
600 601
         form['admin_user_id'] = this.$store.getters.xt_user.user.id
601 602
         form['order_id'] = this.order.id
@@ -749,27 +750,82 @@
749 750
                       let one_count = 0
750 751
                       let two_count = 0
751 752
                       let three_count = 0
753
+
752 754
                       for (let i = 0; i < response.data.data.list.length; i++) {
753
-                        that.all_table_data.push(response.data.data.list[i])
754
-                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
755
+                        if (response.data.data.list[i].his_patient.length == 0) { //没挂号
756
+                          if (response.data.data.list[i].prescription.length > 0) {
757
+                            let obj = {
758
+                              id: response.data.data.list[i].id,
759
+                              name: response.data.data.list[i].name,
760
+                              number: '',
761
+                              order_status: 0,
762
+                              order_number: '',
763
+                              his_patient_id: 0
764
+                            }
765
+
766
+                            that.all_table_data.push(obj)
767
+                          }
768
+
769
+                        } else { //挂号
770
+                          if (response.data.data.list[i].his_patient.length == 1) {
771
+                            let obj = {
772
+                              id: response.data.data.list[i].id,
773
+                              name: response.data.data.list[i].name,
774
+                              number: response.data.data.list[i].his_patient[0].number,
775
+                              order_status: response.data.data.list[i].his_patient[0].order.order_status,
776
+                              his_patient_id: response.data.data.list[i].his_patient[0].id,
777
+                              order_number: response.data.data.list[i].his_patient[0].order.number,
778
+                              order_id: response.data.data.list[i].his_patient[0].order.id
779
+                            }
780
+                            that.all_table_data.push(obj)
781
+
782
+                          }
783
+
784
+                          if (response.data.data.list[i].his_patient.length > 1) {
785
+                            for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
786
+                              let obj = {
787
+                                id: response.data.data.list[i].id,
788
+                                name: response.data.data.list[i].name,
789
+                                number: response.data.data.list[i].his_patient[b].number,
790
+                                order_status: response.data.data.list[i].his_patient[b].order.order_status,
791
+                                his_patient_id: response.data.data.list[i].his_patient[b].id,
792
+                                order_number: response.data.data.list[i].his_patient[b].order.number,
793
+                                order_id: response.data.data.list[i].his_patient[b].order.id
794
+                              }
795
+                              that.all_table_data.push(obj)
796
+
797
+                            }
798
+                          }
799
+                        }
800
+
801
+                      }
802
+
803
+                      for (let i = 0; i < that.all_table_data.length; i++) {
804
+                        if (that.all_table_data[i].his_patient_id > 0) {
805
+                          that.hisPatientDatas.push(that.all_table_data[i])
806
+                        }
807
+                      }
808
+
809
+                      for (let i = 0; i < that.all_table_data.length; i++) {
810
+
811
+                        if (that.all_table_data[i].order_status == 0 || that.all_table_data[i].order_status == 1 || that.all_table_data[i].order_status == 3) {
755 812
                           one_count = one_count + 1
756
-                          that.patientTableData.push(response.data.data.list[i])
813
+                          that.patientTableData.push(that.all_table_data[i])
757 814
                         }
758
-                        if (response.data.data.list[i].order.order_status == 2) {
815
+                        if (that.all_table_data[i].order_status == 2) {
759 816
                           two_count = two_count + 1
760
-                          that.patientTableData.push(response.data.data.list[i])
817
+                          that.patientTableData.push(that.all_table_data[i])
761 818
                         }
762 819
                       }
763
-                      that.hisPatientDatas = response.data.data.list_two
764 820
                       that.cal_one = one_count
765 821
                       that.cal_two = two_count
766 822
                       that.cal_three = three_count
767 823
                       that.current_index = 0
768 824
 
769 825
                       for (let i = 0; i < that.patientTableData.length; i++) {
770
-                        if (this.patientTableData[i].id == this.patientInfo.id) {
826
+                        if (that.patientTableData[i].his_patient_id == that.hisPatientInfo.id) {
771 827
                           that.$refs.tab.setCurrentRow(that.patientTableData[i])
772
-                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
828
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number, that.patientTableData[i].his_patient_id)
773 829
                         }
774 830
                       }
775 831
                       that.loadingone = false
@@ -834,27 +890,82 @@
834 890
                       let one_count = 0
835 891
                       let two_count = 0
836 892
                       let three_count = 0
893
+
837 894
                       for (let i = 0; i < response.data.data.list.length; i++) {
838
-                        that.all_table_data.push(response.data.data.list[i])
839
-                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
895
+                        if (response.data.data.list[i].his_patient.length == 0) { //没挂号
896
+                          if (response.data.data.list[i].prescription.length > 0) {
897
+                            let obj = {
898
+                              id: response.data.data.list[i].id,
899
+                              name: response.data.data.list[i].name,
900
+                              number: '',
901
+                              order_status: 0,
902
+                              order_number: '',
903
+                              his_patient_id: 0
904
+                            }
905
+
906
+                            that.all_table_data.push(obj)
907
+                          }
908
+
909
+                        } else { //挂号
910
+                          if (response.data.data.list[i].his_patient.length == 1) {
911
+                            let obj = {
912
+                              id: response.data.data.list[i].id,
913
+                              name: response.data.data.list[i].name,
914
+                              number: response.data.data.list[i].his_patient[0].number,
915
+                              order_status: response.data.data.list[i].his_patient[0].order.order_status,
916
+                              his_patient_id: response.data.data.list[i].his_patient[0].id,
917
+                              order_number: response.data.data.list[i].his_patient[0].order.number,
918
+                              order_id: response.data.data.list[i].his_patient[0].order.id
919
+                            }
920
+                            that.all_table_data.push(obj)
921
+
922
+                          }
923
+
924
+                          if (response.data.data.list[i].his_patient.length > 1) {
925
+                            for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
926
+                              let obj = {
927
+                                id: response.data.data.list[i].id,
928
+                                name: response.data.data.list[i].name,
929
+                                number: response.data.data.list[i].his_patient[b].number,
930
+                                order_status: response.data.data.list[i].his_patient[b].order.order_status,
931
+                                his_patient_id: response.data.data.list[i].his_patient[b].id,
932
+                                order_number: response.data.data.list[i].his_patient[b].order.number,
933
+                                order_id: response.data.data.list[i].his_patient[b].order.id
934
+                              }
935
+                              that.all_table_data.push(obj)
936
+
937
+                            }
938
+                          }
939
+                        }
940
+
941
+                      }
942
+
943
+                      for (let i = 0; i < that.all_table_data.length; i++) {
944
+                        if (that.all_table_data[i].his_patient_id > 0) {
945
+                          that.hisPatientDatas.push(that.all_table_data[i])
946
+                        }
947
+                      }
948
+
949
+                      for (let i = 0; i < that.all_table_data.length; i++) {
950
+                        if (that.all_table_data[i].order_status == 0 || that.all_table_data[i].order_status == 1 || that.all_table_data[i].order_status == 3) {
840 951
                           one_count = one_count + 1
841
-                          that.patientTableData.push(response.data.data.list[i])
952
+                          that.patientTableData.push(that.all_table_data[i])
842 953
                         }
843
-                        if (response.data.data.list[i].order.order_status == 2) {
954
+                        if (that.all_table_data[i].order_status == 2) {
844 955
                           two_count = two_count + 1
845
-                          that.patientTableData.push(response.data.data.list[i])
956
+                          that.patientTableData.push(that.all_table_data[i])
846 957
                         }
847 958
                       }
848
-                      that.hisPatientDatas = response.data.data.list_two
959
+
849 960
                       that.cal_one = one_count
850 961
                       that.cal_two = two_count
851 962
                       that.cal_three = three_count
852 963
                       that.current_index = 0
853 964
 
854 965
                       for (let i = 0; i < that.patientTableData.length; i++) {
855
-                        if (this.patientTableData[i].id == this.patientInfo.id) {
966
+                        if (that.patientTableData[i].his_patient_id == that.hisPatientInfo.id) {
856 967
                           that.$refs.tab.setCurrentRow(that.patientTableData[i])
857
-                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
968
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order_number, that.patientTableData[i].his_patient_id)
858 969
                         }
859 970
                       }
860 971
                       that.$message({ message: '挂号成功', type: 'success' })
@@ -908,33 +1019,85 @@
908 1019
                       let one_count = 0
909 1020
                       let two_count = 0
910 1021
                       let three_count = 0
1022
+
911 1023
                       for (let i = 0; i < response.data.data.list.length; i++) {
912
-                        that.all_table_data.push(response.data.data.list[i])
913
-                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
1024
+                        if (response.data.data.list[i].his_patient.length == 0) { //没挂号
1025
+                          if (response.data.data.list[i].prescription.length > 0) {
1026
+                            let obj = {
1027
+                              id: response.data.data.list[i].id,
1028
+                              name: response.data.data.list[i].name,
1029
+                              number: '',
1030
+                              order_status: 0,
1031
+                              order_number: '',
1032
+                              his_patient_id: 0
1033
+                            }
1034
+
1035
+                            that.all_table_data.push(obj)
1036
+                          }
1037
+
1038
+                        } else { //挂号
1039
+                          if (response.data.data.list[i].his_patient.length == 1) {
1040
+                            let obj = {
1041
+                              id: response.data.data.list[i].id,
1042
+                              name: response.data.data.list[i].name,
1043
+                              number: response.data.data.list[i].his_patient[0].number,
1044
+                              order_status: response.data.data.list[i].his_patient[0].order.order_status,
1045
+                              his_patient_id: response.data.data.list[i].his_patient[0].id,
1046
+                              order_number: response.data.data.list[i].his_patient[0].order.number,
1047
+                              order_id: response.data.data.list[i].his_patient[0].order.id
1048
+                            }
1049
+                            that.all_table_data.push(obj)
1050
+
1051
+                          }
1052
+
1053
+                          if (response.data.data.list[i].his_patient.length > 1) {
1054
+                            for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
1055
+                              let obj = {
1056
+                                id: response.data.data.list[i].id,
1057
+                                name: response.data.data.list[i].name,
1058
+                                number: response.data.data.list[i].his_patient[b].number,
1059
+                                order_status: response.data.data.list[i].his_patient[b].order.order_status,
1060
+                                his_patient_id: response.data.data.list[i].his_patient[b].id,
1061
+                                order_number: response.data.data.list[i].his_patient[b].order.number,
1062
+                                order_id: response.data.data.list[i].his_patient[b].order.id
1063
+                              }
1064
+                              that.all_table_data.push(obj)
1065
+
1066
+                            }
1067
+                          }
1068
+                        }
1069
+
1070
+                      }
1071
+
1072
+                      for (let i = 0; i < that.all_table_data.length; i++) {
1073
+                        if (that.all_table_data[i].his_patient_id > 0) {
1074
+                          that.hisPatientDatas.push(this.all_table_data[i])
1075
+                        }
1076
+                      }
1077
+
1078
+                      for (let i = 0; i < that.all_table_data.length; i++) {
1079
+                        if (that.all_table_data[i].order_status == 0 || that.all_table_data[i].order_status == 1 || that.all_table_data[i].order_status == 3) {
914 1080
                           one_count = one_count + 1
915
-                          that.patientTableData.push(response.data.data.list[i])
1081
+                          that.patientTableData.push(that.all_table_data[i])
916 1082
                         }
917
-                        if (response.data.data.list[i].order.order_status == 2) {
1083
+                        if (that.all_table_data[i].order_status == 2) {
918 1084
                           two_count = two_count + 1
919
-                          that.patientTableData.push(response.data.data.list[i])
1085
+                          that.patientTableData.push(that.all_table_data[i])
920 1086
                         }
921 1087
                       }
922
-                      that.hisPatientDatas = response.data.data.list_two
923 1088
                       that.cal_one = one_count
924 1089
                       that.cal_two = two_count
925 1090
                       that.cal_three = three_count
926 1091
                       that.current_index = 0
927 1092
                       for (let i = 0; i < that.patientTableData.length; i++) {
928
-                        if (this.patientTableData[i].id == this.patientInfo.id) {
1093
+                        if (that.patientTableData[i].his_patient_id == that.hisPatientInfo.id) {
929 1094
                           that.$refs.tab.setCurrentRow(that.patientTableData[i])
930
-                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
1095
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order_number, that.patientTableData[i].his_patient_id)
931 1096
                         }
932 1097
                       }
933 1098
                       var his_info = response.data.data.his_info
934 1099
                       that.hisPatientInfo = his_info
935
-
936 1100
                     }
937
-
938 1101
                   })
939 1102
                 }
940 1103
               }
@@ -1092,19 +1255,69 @@
1092 1255
             let one_count = 0
1093 1256
             let two_count = 0
1094 1257
             let three_count = 0
1258
+
1095 1259
             for (let i = 0; i < response.data.data.list.length; i++) {
1096
-              this.all_table_data.push(response.data.data.list[i])
1097
-              if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
1098
-                one_count = one_count + 1
1260
+              if (response.data.data.list[i].his_patient.length == 0) { //没挂号
1261
+                if (response.data.data.list[i].prescription.length > 0) {
1262
+                  let obj = {
1263
+                    id: response.data.data.list[i].id,
1264
+                    name: response.data.data.list[i].name,
1265
+                    number: '',
1266
+                    order_status: 0,
1267
+                    order_number: '',
1268
+                    his_patient_id: 0
1269
+                  }
1270
+
1271
+                  this.all_table_data.push(obj)
1272
+                }
1273
+
1274
+              } else { //挂号
1275
+                if (response.data.data.list[i].his_patient.length == 1) {
1276
+                  let obj = {
1277
+                    id: response.data.data.list[i].id,
1278
+                    name: response.data.data.list[i].name,
1279
+                    number: response.data.data.list[i].his_patient[0].number,
1280
+                    order_status: response.data.data.list[i].his_patient[0].order.order_status,
1281
+                    his_patient_id: response.data.data.list[i].his_patient[0].id,
1282
+                    order_number: response.data.data.list[i].his_patient[0].order.number,
1283
+                    order_id: response.data.data.list[i].his_patient[0].order.id
1284
+                  }
1285
+                  this.all_table_data.push(obj)
1286
+
1287
+                }
1288
+
1289
+                if (response.data.data.list[i].his_patient.length > 1) {
1290
+                  for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
1291
+                    let obj = {
1292
+                      id: response.data.data.list[i].id,
1293
+                      name: response.data.data.list[i].name,
1294
+                      number: response.data.data.list[i].his_patient[b].number,
1295
+                      order_status: response.data.data.list[i].his_patient[b].order.order_status,
1296
+                      his_patient_id: response.data.data.list[i].his_patient[b].id,
1297
+                      order_number: response.data.data.list[i].his_patient[b].order.number,
1298
+                      order_id: response.data.data.list[i].his_patient[b].order.id
1299
+                    }
1300
+                    this.all_table_data.push(obj)
1301
+
1302
+                  }
1303
+                }
1099 1304
               }
1100 1305
 
1101
-              if (response.data.data.list[i].order.order_status == 2) {
1102
-                two_count = two_count + 1
1306
+            }
1307
+
1308
+            for (let i = 0; i < this.all_table_data.length; i++) {
1309
+              if (this.all_table_data[i].his_patient_id > 0) {
1310
+                this.hisPatientDatas.push(this.all_table_data[i])
1103 1311
               }
1312
+            }
1104 1313
 
1105
-              // if (response.data.data.list[i].order.order_status == 3) {
1106
-              //   three_count = three_count + 1
1107
-              // }
1314
+            for (let i = 0; i < this.all_table_data.length; i++) {
1315
+              if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
1316
+                one_count = one_count + 1
1317
+              }
1318
+              if (this.all_table_data[i].order_status == 2) {
1319
+                two_count = two_count + 1
1320
+              }
1108 1321
             }
1109 1322
 
1110 1323
             switch (this.radio) {
@@ -1113,7 +1326,7 @@
1113 1326
                 this.patientTableData = []
1114 1327
 
1115 1328
                 for (let i = 0; i < this.all_table_data.length; i++) {
1116
-                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
1329
+                  if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1) {
1117 1330
                     this.patientTableData.push(this.all_table_data[i])
1118 1331
                   }
1119 1332
 
@@ -1122,7 +1335,7 @@
1122 1335
               case 2:
1123 1336
                 this.patientTableData = []
1124 1337
                 for (let i = 0; i < this.all_table_data.length; i++) {
1125
-                  if (this.all_table_data[i].order.order_status == 2) {
1338
+                  if (this.all_table_data[i].order_status == 2) {
1126 1339
                     this.patientTableData.push(this.all_table_data[i])
1127 1340
                   }
1128 1341
 
@@ -1133,7 +1346,7 @@
1133 1346
 
1134 1347
                 for (let i = 0; i < this.all_table_data.length; i++) {
1135 1348
 
1136
-                  if (this.all_table_data[i].order.order_status == 3) {
1349
+                  if (this.all_table_data[i].order_status == 3) {
1137 1350
                     this.patientTableData.push(this.all_table_data[i])
1138 1351
                   }
1139 1352
 
@@ -1146,7 +1359,6 @@
1146 1359
 
1147 1360
             }
1148 1361
 
1149
-            this.hisPatientDatas = response.data.data.list_two
1150 1362
             this.cal_one = one_count
1151 1363
             this.cal_two = two_count
1152 1364
             this.cal_three = three_count
@@ -1154,9 +1366,9 @@
1154 1366
 
1155 1367
             if (this.patientTableData.length > 0) {
1156 1368
               for (let i = 0; i < this.patientTableData.length; i++) {
1157
-                if (this.patientTableData[i].id == this.patientInfo.id) {
1369
+                if (this.patientTableData[i].his_patient_id == this.hisPatientInfo.id) {
1158 1370
                   this.$refs.tab.setCurrentRow(this.patientTableData[i])
1159
-                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number)
1371
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order_number, this.patientTableData[i].his_patient_id)
1160 1372
                 }
1161 1373
               }
1162 1374
             }
@@ -1183,26 +1395,76 @@
1183 1395
             let two_count = 0
1184 1396
             let three_count = 0
1185 1397
 
1186
-            for (let i = 0; i < response.data.data.list_two.length; i++) {
1187
-              this.hisPatientDatas.push(response.data.data.list_two[i])
1188
-              if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1 || response.data.data.list_two[i].order.order_status == 3) {
1189
-                one_count = one_count + 1
1398
+            for (let i = 0; i < response.data.data.list.length; i++) {
1399
+              if (response.data.data.list[i].his_patient.length == 0) { //没挂号
1400
+                if (response.data.data.list[i].prescription.length > 0) {
1401
+                  let obj = {
1402
+                    id: response.data.data.list[i].id,
1403
+                    name: response.data.data.list[i].name,
1404
+                    number: '',
1405
+                    order_status: 0,
1406
+                    order_number: '',
1407
+                    his_patient_id: 0
1408
+                  }
1409
+
1410
+                  this.all_table_data.push(obj)
1411
+                }
1412
+
1413
+              } else { //挂号
1414
+                if (response.data.data.list[i].his_patient.length == 1) {
1415
+                  let obj = {
1416
+                    id: response.data.data.list[i].id,
1417
+                    name: response.data.data.list[i].name,
1418
+                    number: response.data.data.list[i].his_patient[0].number,
1419
+                    order_status: response.data.data.list[i].his_patient[0].order.order_status,
1420
+                    his_patient_id: response.data.data.list[i].his_patient[0].id,
1421
+                    order_number: response.data.data.list[i].his_patient[0].order.number,
1422
+                    order_id: response.data.data.list[i].his_patient[0].order.id
1423
+                  }
1424
+                  this.all_table_data.push(obj)
1425
+
1426
+                }
1427
+
1428
+                if (response.data.data.list[i].his_patient.length > 1) {
1429
+                  for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
1430
+                    let obj = {
1431
+                      id: response.data.data.list[i].id,
1432
+                      name: response.data.data.list[i].name,
1433
+                      number: response.data.data.list[i].his_patient[b].number,
1434
+                      order_status: response.data.data.list[i].his_patient[b].order.order_status,
1435
+                      his_patient_id: response.data.data.list[i].his_patient[b].id,
1436
+                      order_number: response.data.data.list[i].his_patient[b].order.number,
1437
+                      order_id: response.data.data.list[i].his_patient[b].order.id
1438
+                    }
1439
+                    this.all_table_data.push(obj)
1440
+
1441
+                  }
1442
+                }
1190 1443
               }
1191 1444
 
1192
-              if (response.data.data.list_two[i].order.order_status == 2) {
1193
-                two_count = two_count + 1
1445
+            }
1446
+
1447
+            for (let i = 0; i < this.all_table_data.length; i++) {
1448
+              if (this.all_table_data[i].his_patient_id > 0) {
1449
+                this.hisPatientDatas.push(this.all_table_data[i])
1194 1450
               }
1451
+            }
1195 1452
 
1196
-              // if (response.data.data.list_two[i].order.order_status == 3) {
1197
-              //   three_count = three_count + 1
1198
-              // }
1453
+            for (let i = 0; i < this.all_table_data.length; i++) {
1454
+              if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
1455
+                one_count = one_count + 1
1456
+              }
1457
+              if (this.all_table_data[i].order_status == 2) {
1458
+                two_count = two_count + 1
1459
+              }
1199 1460
             }
1461
+
1200 1462
             switch (this.radio) {
1201 1463
               case 1:
1202 1464
                 this.patientTableData = []
1203 1465
 
1204 1466
                 for (let i = 0; i < this.hisPatientDatas.length; i++) {
1205
-                  if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1 || this.hisPatientDatas[i].order.order_status == 3) {
1467
+                  if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1 || this.hisPatientDatas[i].order_status == 3) {
1206 1468
                     this.patientTableData.push(this.hisPatientDatas[i])
1207 1469
                   }
1208 1470
 
@@ -1211,7 +1473,7 @@
1211 1473
               case 2:
1212 1474
                 this.patientTableData = []
1213 1475
                 for (let i = 0; i < this.hisPatientDatas.length; i++) {
1214
-                  if (this.hisPatientDatas[i].order.order_status == 2) {
1476
+                  if (this.hisPatientDatas[i].order_status == 2) {
1215 1477
                     this.patientTableData.push(this.hisPatientDatas[i])
1216 1478
                   }
1217 1479
 
@@ -1239,9 +1501,9 @@
1239 1501
 
1240 1502
             if (this.patientTableData.length > 0) {
1241 1503
               for (let i = 0; i < this.patientTableData.length; i++) {
1242
-                if (this.patientTableData[i].id == this.patientInfo.id) {
1504
+                if (this.patientTableData[i].his_patient_id == this.hisPatientInfo.id) {
1243 1505
                   this.$refs.tab.setCurrentRow(this.patientTableData[i])
1244
-                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number)
1506
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order_number, this.patientTableData[i].his_patient_id)
1245 1507
                 }
1246 1508
               }
1247 1509
             }
@@ -1651,6 +1913,7 @@
1651 1913
             type: 'warning'
1652 1914
           }).then(() => {
1653 1915
             let params = {
1916
+              'id': this.hisPatientInfo.id,
1654 1917
               'patient_id': this.patientInfo.id,
1655 1918
               'record_time': this.record_date,
1656 1919
               'org_id': this.$store.getters.xt_user.org_id,
@@ -1962,38 +2225,89 @@
1962 2225
             let two_count = 0
1963 2226
             let three_count = 0
1964 2227
 
2228
+            for (let i = 0; i < response.data.data.list.length; i++) {
2229
+              if (response.data.data.list[i].his_patient.length == 0) { //没挂号
2230
+                if (response.data.data.list[i].prescription.length > 0) {
2231
+                  let obj = {
2232
+                    id: response.data.data.list[i].id,
2233
+                    name: response.data.data.list[i].name,
2234
+                    number: '',
2235
+                    order_status: 0,
2236
+                    his_patient_id: 0
2237
+                  }
2238
+
2239
+                  this.all_table_data.push(obj)
2240
+                }
2241
+
2242
+              } else { //挂号
2243
+                if (response.data.data.list[i].his_patient.length == 1) {
2244
+                  let obj = {
2245
+                    id: response.data.data.list[i].id,
2246
+                    name: response.data.data.list[i].name,
2247
+                    number: response.data.data.list[i].his_patient[0].number,
2248
+                    order_status: response.data.data.list[i].his_patient[0].order.order_status,
2249
+                    his_patient_id: response.data.data.list[i].his_patient[0].id
2250
+                  }
2251
+                  this.all_table_data.push(obj)
2252
+
2253
+                }
2254
+
2255
+                if (response.data.data.list[i].his_patient.length > 1) {
2256
+                  for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
2257
+                    let obj = {
2258
+                      id: response.data.data.list[i].id,
2259
+                      name: response.data.data.list[i].name,
2260
+                      number: response.data.data.list[i].his_patient[b].number,
2261
+                      order_status: response.data.data.list[i].his_patient[b].order.order_status,
2262
+                      his_patient_id: response.data.data.list[i].his_patient[b].id
2263
+                    }
2264
+                    this.all_table_data.push(obj)
2265
+
2266
+                  }
2267
+                }
2268
+              }
2269
+
2270
+            }
2271
+
2272
+            for (let i = 0; i < this.all_table_data.length; i++) {
2273
+              if (this.all_table_data[i].his_patient_id > 0) {
2274
+                this.hisPatientDatas.push(this.all_table_data[i])
2275
+              }
2276
+            }
2277
+
2278
+            console.log(this.hisPatientDatas)
2279
+            console.log(this.all_table_data)
2280
+
1965 2281
             if (this.activeName == 'first') { //日结
1966 2282
 
1967
-              for (let i = 0; i < response.data.data.list.length; i++) {
1968
-                this.all_table_data.push(response.data.data.list[i])
1969
-                if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2283
+              for (let i = 0; i < this.all_table_data.length; i++) {
2284
+                if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
1970 2285
                   one_count = one_count + 1
1971 2286
                 }
1972
-
1973
-                if (response.data.data.list[i].order.order_status == 2) {
2287
+                if (this.all_table_data[i].order_status == 2) {
1974 2288
                   two_count = two_count + 1
1975 2289
                 }
1976
-
1977
-                // if (response.data.data.list[i].order.order_status == 3) {
1978
-                //   three_count = three_count + 1
1979
-                // }
1980 2290
               }
1981 2291
 
2292
+              console.log(one_count)
2293
+              console.log(two_count)
2294
+
1982 2295
             } else { //月结
1983 2296
 
1984
-              for (let i = 0; i < response.data.data.list_two.length; i++) {
1985
-                this.hisPatientDatas.push(response.data.data.list_two[i])
1986
-                if (response.data.data.list_two[i].order.order_status == 0 || response.data.data.list_two[i].order.order_status == 1) {
2297
+              for (let i = 0; i < this.hisPatientDatas.length; i++) {
2298
+                if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
1987 2299
                   one_count = one_count + 1
1988 2300
                 }
1989 2301
 
1990
-                if (response.data.data.list_two[i].order.order_status == 2) {
2302
+                if (this.hisPatientDatas[i].order_status == 2) {
1991 2303
                   two_count = two_count + 1
1992 2304
                 }
1993 2305
 
1994
-                if (response.data.data.list_two[i].order.order_status == 3) {
1995
-                  three_count = three_count + 1
1996
-                }
2306
+                console.log(one_count)
2307
+                console.log(two_count)
2308
+                // if (this.hisPatientDatas[i].order_status == 3) {
2309
+                //   three_count = three_count + 1
2310
+                // }
1997 2311
               }
1998 2312
 
1999 2313
             }
@@ -2001,7 +2315,8 @@
2001 2315
             this.cal_one = one_count
2002 2316
             this.cal_two = two_count
2003 2317
             this.cal_three = three_count
2004
-
2318
+            console.log(this.cal_one)
2319
+            console.log(this.cal_two)
2005 2320
             switch (temp_id) {
2006 2321
 
2007 2322
               case 1:
@@ -2009,7 +2324,7 @@
2009 2324
                 if (this.activeName == 'first') {
2010 2325
 
2011 2326
                   for (let i = 0; i < this.all_table_data.length; i++) {
2012
-                    if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1) {
2327
+                    if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1) {
2013 2328
                       this.patientTableData.push(this.all_table_data[i])
2014 2329
                     }
2015 2330
 
@@ -2017,28 +2332,24 @@
2017 2332
 
2018 2333
                 } else {
2019 2334
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2020
-                    if (this.hisPatientDatas[i].order.order_status == 0 || this.hisPatientDatas[i].order.order_status == 1) {
2335
+                    if (this.hisPatientDatas[i].order_status == 0 || this.hisPatientDatas[i].order_status == 1) {
2021 2336
                       this.patientTableData.push(this.hisPatientDatas[i])
2022 2337
                     }
2023
-
2024 2338
                   }
2025
-
2026 2339
                 }
2027 2340
 
2028 2341
                 break
2029 2342
               case 2:
2030 2343
                 this.patientTableData = []
2031 2344
                 if (this.activeName == 'first') {
2032
-
2033 2345
                   for (let i = 0; i < this.all_table_data.length; i++) {
2034
-                    if (this.all_table_data[i].order.order_status == 2) {
2346
+                    if (this.all_table_data[i].order_status == 2) {
2035 2347
                       this.patientTableData.push(this.all_table_data[i])
2036 2348
                     }
2037
-
2038 2349
                   }
2039 2350
                 } else {
2040 2351
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2041
-                    if (this.hisPatientDatas[i].order.order_status == 2) {
2352
+                    if (this.hisPatientDatas[i].order_status == 2) {
2042 2353
                       this.patientTableData.push(this.hisPatientDatas[i])
2043 2354
                     }
2044 2355
                   }
@@ -2047,35 +2358,25 @@
2047 2358
                 break
2048 2359
               case 3:
2049 2360
                 this.patientTableData = []
2050
-
2051 2361
                 if (this.activeName == 'first') {
2052
-
2053 2362
                   for (let i = 0; i < this.all_table_data.length; i++) {
2054
-
2055
-                    if (this.all_table_data[i].order.order_status == 3) {
2363
+                    if (this.all_table_data[i].order_status == 3) {
2056 2364
                       this.patientTableData.push(this.all_table_data[i])
2057 2365
                     }
2058
-
2059 2366
                   }
2060 2367
                 } else {
2061
-
2062 2368
                   for (let i = 0; i < this.hisPatientDatas.length; i++) {
2063
-
2064
-                    if (this.hisPatientDatas[i].order.order_status == 3) {
2369
+                    if (this.hisPatientDatas[i].order_status == 3) {
2065 2370
                       this.patientTableData.push(this.hisPatientDatas[i])
2066 2371
                     }
2067
-
2068 2372
                   }
2069
-
2070 2373
                 }
2071 2374
                 break
2072 2375
               case 4:
2073 2376
                 this.patientTableData = []
2074 2377
                 if (this.activeName == 'first') {
2075
-
2076 2378
                   this.patientTableData = this.all_table_data
2077 2379
                 } else {
2078
-
2079 2380
                   this.patientTableData = this.hisPatientDatas
2080 2381
                 }
2081 2382
                 break
@@ -2084,7 +2385,7 @@
2084 2385
 
2085 2386
             this.current_index = 0
2086 2387
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
2087
-            this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
2388
+            this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id)
2088 2389
 
2089 2390
           }
2090 2391
         })
@@ -2116,28 +2417,80 @@
2116 2417
             let one_count = 0
2117 2418
             let two_count = 0
2118 2419
             let three_count = 0
2420
+
2119 2421
             for (let i = 0; i < response.data.data.list.length; i++) {
2120
-              this.all_table_data.push(response.data.data.list[i])
2121
-              if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
2122
-                one_count = one_count + 1
2422
+              if (response.data.data.list[i].his_patient.length == 0) { //没挂号
2423
+                if (response.data.data.list[i].prescription.length > 0) {
2424
+                  let obj = {
2425
+                    id: response.data.data.list[i].id,
2426
+                    name: response.data.data.list[i].name,
2427
+                    number: '',
2428
+                    order_status: 0,
2429
+                    order_number: '',
2430
+                    his_patient_id: 0
2431
+                  }
2432
+
2433
+                  this.all_table_data.push(obj)
2434
+                }
2435
+
2436
+              } else { //挂号
2437
+                if (response.data.data.list[i].his_patient.length == 1) {
2438
+                  let obj = {
2439
+                    id: response.data.data.list[i].id,
2440
+                    name: response.data.data.list[i].name,
2441
+                    number: response.data.data.list[i].his_patient[0].number,
2442
+                    order_status: response.data.data.list[i].his_patient[0].order.order_status,
2443
+                    his_patient_id: response.data.data.list[i].his_patient[0].id,
2444
+                    order_number: response.data.data.list[i].his_patient[0].order.number,
2445
+                    order_id: response.data.data.list[i].his_patient[0].order.id
2446
+                  }
2447
+                  this.all_table_data.push(obj)
2448
+
2449
+                }
2450
+
2451
+                if (response.data.data.list[i].his_patient.length > 1) {
2452
+                  for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
2453
+                    let obj = {
2454
+                      id: response.data.data.list[i].id,
2455
+                      name: response.data.data.list[i].name,
2456
+                      number: response.data.data.list[i].his_patient[b].number,
2457
+                      order_status: response.data.data.list[i].his_patient[b].order.order_status,
2458
+                      his_patient_id: response.data.data.list[i].his_patient[b].id,
2459
+                      order_number: response.data.data.list[i].his_patient[b].order.number,
2460
+                      order_id: response.data.data.list[i].his_patient[b].order.id
2461
+                    }
2462
+                    this.all_table_data.push(obj)
2463
+
2464
+                  }
2465
+                }
2123 2466
               }
2124 2467
 
2125
-              if (response.data.data.list[i].order.order_status == 2) {
2126
-                two_count = two_count + 1
2468
+            }
2469
+
2470
+            for (let i = 0; i < this.all_table_data.length; i++) {
2471
+              if (this.all_table_data[i].his_patient_id > 0) {
2472
+                this.hisPatientDatas.push(this.all_table_data[i])
2127 2473
               }
2474
+            }
2475
+
2476
+            console.log(this.all_table_data)
2477
+            console.log(this.hisPatientDatas)
2128 2478
 
2129
-              // if (response.data.data.list[i].order.order_status == 3) {
2130
-              //   three_count = three_count + 1
2131
-              // }
2479
+            for (let i = 0; i < this.all_table_data.length; i++) {
2480
+              if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
2481
+                one_count = one_count + 1
2482
+              }
2483
+              if (this.all_table_data[i].order_status == 2) {
2484
+                two_count = two_count + 1
2485
+              }
2132 2486
             }
2133 2487
 
2134 2488
             switch (this.radio) {
2135
-
2136 2489
               case 1:
2137 2490
                 this.patientTableData = []
2138 2491
 
2139 2492
                 for (let i = 0; i < this.all_table_data.length; i++) {
2140
-                  if (this.all_table_data[i].order.order_status == 0 || this.all_table_data[i].order.order_status == 1 || this.all_table_data[i].order.order_status == 3) {
2493
+                  if (this.all_table_data[i].order_status == 0 || this.all_table_data[i].order_status == 1 || this.all_table_data[i].order_status == 3) {
2141 2494
                     this.patientTableData.push(this.all_table_data[i])
2142 2495
                   }
2143 2496
 
@@ -2146,7 +2499,7 @@
2146 2499
               case 2:
2147 2500
                 this.patientTableData = []
2148 2501
                 for (let i = 0; i < this.all_table_data.length; i++) {
2149
-                  if (this.all_table_data[i].order.order_status == 2) {
2502
+                  if (this.all_table_data[i].order_status == 2) {
2150 2503
                     this.patientTableData.push(this.all_table_data[i])
2151 2504
                   }
2152 2505
 
@@ -2157,7 +2510,7 @@
2157 2510
 
2158 2511
                 for (let i = 0; i < this.all_table_data.length; i++) {
2159 2512
 
2160
-                  if (this.all_table_data[i].order.order_status == 3) {
2513
+                  if (this.all_table_data[i].order_status == 3) {
2161 2514
                     this.patientTableData.push(this.all_table_data[i])
2162 2515
                   }
2163 2516
 
@@ -2167,16 +2520,14 @@
2167 2520
                 this.patientTableData = []
2168 2521
                 this.patientTableData = this.all_table_data
2169 2522
                 break
2170
-
2171 2523
             }
2172 2524
 
2173
-            this.hisPatientDatas = response.data.data.list_two
2174 2525
             this.cal_one = one_count
2175 2526
             this.cal_two = two_count
2176 2527
             this.cal_three = three_count
2177 2528
             this.current_index = 0
2178 2529
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
2179
-            this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
2530
+            this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id)
2180 2531
 
2181 2532
           }
2182 2533
         })
@@ -2361,24 +2712,23 @@
2361 2712
         this.prescriptions = []
2362 2713
         this.month_prescriptions = []
2363 2714
 
2364
-        this.getPatientInformation(val.id, val.order.number)
2715
+        this.getPatientInformation(val.id, val.order_number, val.his_patient_id)
2365 2716
         this.patient_id = val.id
2366 2717
 
2367 2718
         for (let i = 0; i < this.patientTableData.length; i++) {
2368
-          if (this.patientTableData[i].id == val.id) {
2719
+          if (this.patientTableData[i].his_patient_id == val.his_patient_id) {
2369 2720
             this.current_index = i
2370 2721
           }
2371 2722
 
2372 2723
         }
2373 2724
 
2374 2725
       },
2375
-
2376 2726
       //获取患者的基本信息
2377
-      getPatientInformation(id, batch_number) {
2378
-
2727
+      getPatientInformation(id, batch_number, his_patient_id) {
2379 2728
         let params = {
2380 2729
           'record_date': this.record_date,
2381 2730
           'patient_id': id,
2731
+          'his_patient_id': his_patient_id,
2382 2732
           'number': batch_number,
2383 2733
           'start_time': this.other_start_time,
2384 2734
           'end_time': this.other_end_time,
@@ -2386,7 +2736,6 @@
2386 2736
 
2387 2737
         }
2388 2738
         this.loading = true
2389
-
2390 2739
         getChargeHisPatientInfo(params).then(response => {
2391 2740
           if (response.data.state == 0) {
2392 2741
             this.loading = false
@@ -2398,18 +2747,15 @@
2398 2747
             this.month_prescriptions = []
2399 2748
             this.curPrescriptions = {}
2400 2749
             this.curMonthPrescriptions = {}
2401
-
2402 2750
             this.loading = false
2403 2751
             this.patientInfo = response.data.data.xt_info
2404 2752
             this.hisPatientInfo = response.data.data.his_info
2405 2753
             this.info = response.data.data.info
2406 2754
             this.order = response.data.data.order
2407
-
2408 2755
             this.p_type = ''
2409 2756
             this.sick_type = ''
2410 2757
             this.diagnosis = ''
2411 2758
             this.sick_history = ''
2412
-
2413 2759
             if (this.info.id > 0) {
2414 2760
               this.p_type = this.info.register_type
2415 2761
               this.sick_type = this.info.sick_type
@@ -2427,13 +2773,11 @@
2427 2773
               if (this.info.diagnosis == 0) {
2428 2774
                 this.diagnosis = ''
2429 2775
               }
2430
-
2431 2776
             } else {
2432 2777
               this.p_type = ''
2433 2778
               this.sick_type = ''
2434 2779
               this.diagnosis = ''
2435 2780
               this.sick_history = ''
2436
-
2437 2781
             }
2438 2782
             this.addtions_charge = response.data.data.addtions_charge
2439 2783
             this.setMonthPrescription(response.data.data.month_prescriptions)
@@ -2442,7 +2786,6 @@
2442 2786
             } else {
2443 2787
               this.prescription_id = 0
2444 2788
             }
2445
-
2446 2789
             for (let i = 0; i < response.data.data.prescription.length; i++) {
2447 2790
               var prescription = response.data.data.prescription[i]
2448 2791
               let tempAdvice = []
@@ -2549,7 +2892,8 @@
2549 2892
               'patient_id': this.patientInfo.id,
2550 2893
               'record_time': this.record_date,
2551 2894
               'settle_accounts_type': this.settle_accounts_type,
2552
-              'admin_user_id': this.$store.getters.xt_user.user.id
2895
+              'admin_user_id': this.$store.getters.xt_user.user.id,
2896
+              'his_patient_id': this.hisPatientInfo.id
2553 2897
             }
2554 2898
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2555 2899
               params: params,
@@ -2596,6 +2940,7 @@
2596 2940
                 params: {
2597 2941
                   order_id: this.order.id,
2598 2942
                   record_time: this.record_date,
2943
+                  his_patient_id: this.hisPatientInfo.id,
2599 2944
                   admin_user_id: this.$store.getters.xt_user.user.id,
2600 2945
                   patient_id: this.patientInfo.id
2601 2946
                 }

+ 1 - 1
src/xt_pages/outpatientCharges/summary.vue View File

@@ -100,7 +100,7 @@
100 100
                     <template slot-scope="scope">
101 101
                         <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
102 102
                         <el-button size="mini" type="primary" @click="toPrint(scope.row)"
103
-                                   v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">
103
+                                   v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || ($store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">
104 104
                             结算单
105 105
                         </el-button>
106 106
                         <el-button size="mini" type="primary" @click="toRefund(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106)">

+ 72 - 38
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -1279,10 +1279,10 @@
1279 1279
 
1280 1280
       },
1281 1281
       openLast(val) {
1282
-        if (this.curPrescriptions.order_status == 2) {
1283
-          this.$message.error('处方已经结算,无法添加')
1284
-          return
1285
-        }
1282
+        // if (this.curPrescriptions.order_status == 2) {
1283
+        //   this.$message.error('处方已经结算,无法添加')
1284
+        //   return
1285
+        // }
1286 1286
         if (this.patientInfo.id == 0) {
1287 1287
           this.$message.error('请选择患者')
1288 1288
           return
@@ -1311,10 +1311,10 @@
1311 1311
         }
1312 1312
       },
1313 1313
       openNext(val) {
1314
-        if (this.curPrescriptions.order_status == 2) {
1315
-          this.$message.error('处方已经结算,无法添加')
1316
-          return
1317
-        }
1314
+        // if (this.curPrescriptions.order_status == 2) {
1315
+        //   this.$message.error('处方已经结算,无法添加')
1316
+        //   return
1317
+        // }
1318 1318
         if (this.patientInfo.id == 0) {
1319 1319
           this.$message.error('请选择患者')
1320 1320
           return
@@ -1662,6 +1662,8 @@
1662 1662
             this.$emit('event1', this.prescription_id)
1663 1663
             this.curPrescriptions = this.prescriptions[i]
1664 1664
 
1665
+
1666
+
1665 1667
             this.teamList = []
1666 1668
             this.curDrugs = []
1667 1669
             this.$refs.multipleTable.clearSelection()
@@ -1693,6 +1695,23 @@
1693 1695
           }
1694 1696
 
1695 1697
         }
1698
+        if (this.curPrescriptions.order_status == 0) {
1699
+          this.order_status = ''
1700
+        }
1701
+
1702
+        if (this.curPrescriptions.order_status == 1) {
1703
+          this.order_status = '未收费'
1704
+        }
1705
+        if (this.curPrescriptions.order_status == 2) {
1706
+          this.order_status = '已结算'
1707
+        }
1708
+
1709
+        if (this.curPrescriptions.order_status == 3) {
1710
+          this.order_status = '已退费'
1711
+        }
1712
+
1713
+
1714
+
1696 1715
 
1697 1716
       },
1698 1717
       clearData() {
@@ -1765,18 +1784,20 @@
1765 1784
           this.state2 = ''
1766 1785
         }
1767 1786
 
1768
-        if (info.prescription_status == 0) {
1787
+        console.log(this.curPrescriptions)
1788
+
1789
+        if (this.curPrescriptions.order_status == 0) {
1769 1790
           this.order_status = ''
1770 1791
         }
1771 1792
 
1772
-        if (info.prescription_status == 1 || info.prescription_status == 2) {
1793
+        if (this.curPrescriptions.order_status == 1) {
1773 1794
           this.order_status = '未收费'
1774 1795
         }
1775
-        if (info.prescription_status == 3) {
1796
+        if (this.curPrescriptions.order_status == 2) {
1776 1797
           this.order_status = '已结算'
1777 1798
         }
1778 1799
 
1779
-        if (info.prescription_status == 4) {
1800
+        if (this.curPrescriptions.order_status == 3) {
1780 1801
           this.order_status = '已退费'
1781 1802
         }
1782 1803
 
@@ -1826,10 +1847,6 @@
1826 1847
         }
1827 1848
       }, open_two() {
1828 1849
         if (this.dayorMonth == 'day') {
1829
-          if (this.curPrescriptions.order_status == 2) {
1830
-            this.$message.error('处方已经结算,无法添加')
1831
-            return
1832
-          }
1833 1850
           if (this.patientInfo == null || this.patientInfo.id == 0) {
1834 1851
             this.$message.error('请选择患者')
1835 1852
             return
@@ -1863,10 +1880,7 @@
1863 1880
         }
1864 1881
 
1865 1882
         if (this.dayorMonth == 'day') {
1866
-          if (this.curPrescriptions.order_status == 2) {
1867
-            this.$message.error('当前处方已经结算,无法保存')
1868
-            return
1869
-          }
1883
+
1870 1884
           if (this.doctorValue.length <= 0) {
1871 1885
             this.$message.error('医生不能为空')
1872 1886
             return
@@ -1947,10 +1961,10 @@
1947 1961
           }
1948 1962
         } else if (this.dayorMonth == 'month') {
1949 1963
           if (this.isShowDayPrescription) {
1950
-            if (this.curDayPrescriptions.order_status == 2) {
1951
-              this.$message.error('当前处方已经结算,无法保存')
1952
-              return
1953
-            }
1964
+            // if (this.curDayPrescriptions.order_status == 2) {
1965
+            //   this.$message.error('当前处方已经结算,无法保存')
1966
+            //   return
1967
+            // }
1954 1968
             if (this.doctorValue.length <= 0) {
1955 1969
               this.$message.error('医生不能为空')
1956 1970
               return
@@ -2023,10 +2037,10 @@
2023 2037
         }
2024 2038
       },
2025 2039
       addTab(targetName) {
2026
-        if (this.curPrescriptions.order_status == 2) {
2027
-          this.$message.error('该处方已经结算或者退费,无法继续添加处方')
2028
-          return
2029
-        }
2040
+        // if (this.curPrescriptions.order_status == 2) {
2041
+        //   this.$message.error('该处方已经结算或者退费,无法继续添加处方')
2042
+        //   return
2043
+        // }
2030 2044
         if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2031 2045
           this.$message.error('当前处方无数据,新增数据后才能新增处方')
2032 2046
           return
@@ -2066,6 +2080,26 @@
2066 2080
         this.editableTabsValue = newTabName
2067 2081
         this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
2068 2082
         this.curStatus = 0
2083
+
2084
+
2085
+
2086
+        if (this.curPrescriptions.order_status == 0) {
2087
+          this.order_status = '未收费'
2088
+        }
2089
+
2090
+        if (this.curPrescriptions.order_status == 1 ) {
2091
+          this.order_status = '未收费'
2092
+        }
2093
+        if (this.curPrescriptions.order_status == 2) {
2094
+          this.order_status = '已结算'
2095
+        }
2096
+
2097
+        if (this.curPrescriptions.order_status == 3) {
2098
+          this.order_status = '已退费'
2099
+        }
2100
+
2101
+
2102
+
2069 2103
       },
2070 2104
       removeTab(targetName) {
2071 2105
         if (this.curPrescriptions.order_status == 2) {
@@ -2252,16 +2286,16 @@
2252 2286
         console.log("222222222222",this.curPrescriptions)
2253 2287
 
2254 2288
 
2255
-        if (this.curPrescriptions.order_status == 2) {
2256
-          this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2257
-          this.teamList = []
2258
-          this.curDrugs = []
2259
-          this.tempDrugs = []
2260
-          this.$refs.tables.clearSelection()
2261
-          this.$refs.multipleTableTwo.clearSelection()
2262
-          this.$refs.multipleTable.clearSelection()
2263
-          return
2264
-        }
2289
+        // if (this.curPrescriptions.order_status == 2) {
2290
+        //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2291
+        //   this.teamList = []
2292
+        //   this.curDrugs = []
2293
+        //   this.tempDrugs = []
2294
+        //   this.$refs.tables.clearSelection()
2295
+        //   this.$refs.multipleTableTwo.clearSelection()
2296
+        //   this.$refs.multipleTable.clearSelection()
2297
+        //   return
2298
+        // }
2265 2299
 
2266 2300
         if (this.curStatus == 1 && this.rightTab == 2) {
2267 2301
           this.$message.error('改处方是药品,无法添加项目')

File diff suppressed because it is too large
+ 637 - 497
src/xt_pages/outpatientDoctorStation/doctorDesk.vue


+ 4 - 1
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -461,6 +461,7 @@
461 461
   import { getDictionaryDataConfig } from '@/utils/data'
462 462
   import axios from 'axios'
463 463
 
464
+
464 465
   export default {
465 466
     components: {
466 467
       BreadCrumb
@@ -758,7 +759,7 @@
758 759
           let params = {
759 760
             'id':row.id,
760 761
             'patient_id': row.patient_id,
761
-            'record_time': row.record_date,
762
+            'record_time': that.getTimes(row.record_date),
762 763
             'admin_user_id': this.$store.getters.xt_user.user.id
763 764
           }
764 765
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
@@ -792,6 +793,8 @@
792 793
         })
793 794
           .catch(() => {
794 795
           })
796
+      }, getTimes(time) {
797
+        return uParseTime(time, '{y}-{m}-{d}')
795 798
       },
796 799
 
797 800
       querySearchAsync(keyword, cb) {