Parcourir la source

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

XMLWAN il y a 3 ans
Parent
révision
c303a90510

+ 3 - 2
config/dev.env.js Voir le fichier

@@ -7,11 +7,12 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  // BASE_API: '"http://localhost:9529"',
10
+  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  BASE_API: '"http://localhost:9531"',
12 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14 14
   XT_HOST: '"http://xt.test.sgjyun.com"',
15 15
   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
16 16
   CDM_HOST: '"http://cdm.test.sgjyun.com"'
17 17
 }
18
+

+ 2 - 2
config/index.js Voir le fichier

@@ -29,8 +29,8 @@ module.exports = {
29 29
 
30 30
     // host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32
-    host: 'xt.test.sgjyun.com',
33
-    // host: 'localhost',
32
+    // host: 'xt.test.sgjyun.com',
33
+    host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 2 - 0
src/xt_pages/hospitalStation/components/chargeDialog.vue Voir le fichier

@@ -120,6 +120,8 @@
120 120
           {value: 2, label: '银行卡'},
121 121
           {value: 3, label: '微信'},
122 122
           {value: 4, label: '支付宝'},
123
+          {value: 5, label: '医保卡'},
124
+
123 125
         ],
124 126
         total:"",
125 127
 

+ 20 - 21
src/xt_pages/hospitalStation/components/registerDialog.vue Voir le fichier

@@ -122,6 +122,26 @@
122 122
                 </el-select>
123 123
             </el-form-item>
124 124
 
125
+            <el-form-item label="医生:" prop="doctor">
126
+                <el-select v-model="form.doctor" placeholder="请选择">
127
+                    <el-option
128
+                            v-for="(item,index) in doctors"
129
+                            :key="index"
130
+                            :label="item.user_name"
131
+                            :value="item.admin_user_id">
132
+                    </el-option>
133
+                </el-select>
134
+            </el-form-item>
135
+            <el-form-item label="科室:" prop="department">
136
+                <el-select v-model="form.department" placeholder="请选择">
137
+                    <el-option
138
+                            v-for="(item,index) in departments"
139
+                            :key="index"
140
+                            :label="item.name"
141
+                            :value="item.id">
142
+                    </el-option>
143
+                </el-select>
144
+            </el-form-item>
125 145
 
126 146
             <el-form-item label="社保类型:">
127 147
                 <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
@@ -172,27 +192,6 @@
172 192
                 <el-input v-model="form.medical_expenses"></el-input>
173 193
             </el-form-item>
174 194
 
175
-            <el-form-item label="医生:" prop="doctor">
176
-                <el-select v-model="form.doctor" placeholder="请选择">
177
-                    <el-option
178
-                            v-for="(item,index) in doctors"
179
-                            :key="index"
180
-                            :label="item.user_name"
181
-                            :value="item.admin_user_id">
182
-                    </el-option>
183
-                </el-select>
184
-            </el-form-item>
185
-
186
-            <el-form-item label="科室:" prop="department">
187
-                <el-select v-model="form.department" placeholder="请选择">
188
-                    <el-option
189
-                            v-for="(item,index) in departments"
190
-                            :key="index"
191
-                            :label="item.name"
192
-                            :value="item.id">
193
-                    </el-option>
194
-                </el-select>
195
-            </el-form-item>
196 195
         </el-form>
197 196
 
198 197
 

+ 2 - 0
src/xt_pages/outpatientCharges/components/chargeDialog.vue Voir le fichier

@@ -121,6 +121,8 @@
121 121
           {value: 2, label: '银行卡'},
122 122
           {value: 3, label: '微信'},
123 123
           {value: 4, label: '支付宝'},
124
+          {value: 5, label: '医保卡'},
125
+
124 126
         ],
125 127
         total:"",
126 128
 

+ 257 - 122
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue Voir le fichier

@@ -1,20 +1,33 @@
1 1
 <template>
2
+
2 3
     <div class="prescriptionTable">
3
-        <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
+        <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border
5
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
4 6
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
-            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
+            <el-table-column align="center" width="70" label="序号">
8
+                <template slot-scope="scope">
9
+                    <div style="display:flex;align-items:center;">
10
+                        <el-input v-model="scope.row.groupno" placeholder=""></el-input>
11
+                    </div>
12
+                </template>
13
+            </el-table-column>
6 14
             <el-table-column align="center" prop="drug_name" label="名称">
7
-                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
15
+                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
16
+                </template>
8 17
             </el-table-column>
9 18
 
10 19
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
11 20
                 <template slot-scope="scope">
12 21
                     <div style="display:flex;align-items:center;">
13
-                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:50%;"></el-input>
22
+                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)"
23
+                                  style="width:50%;"></el-input>
14 24
                         <!-- <div>{{scope.row.single_dose_unit}}</div> -->
15
-                        <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
16
-                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
17
-                          <el-option :label="scope.row.drug.dose_unit" v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit" :value="scope.row.drug.dose_unit"></el-option>
25
+                        <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
26
+                                   @change="getAllChange(scope)">
27
+                            <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
28
+                            <el-option :label="scope.row.drug.dose_unit"
29
+                                       v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
30
+                                       :value="scope.row.drug.dose_unit"></el-option>
18 31
                         </el-select>
19 32
                     </div>
20 33
                 </template>
@@ -48,7 +61,8 @@
48 61
             <el-table-column align="center" prop="day" width="70" label="天数">
49 62
                 <template slot-scope="scope">
50 63
                     <div style="display:flex;align-items:center;">
51
-                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>{{'天'}}
64
+                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
65
+                        {{'天'}}
52 66
                     </div>
53 67
                 </template>
54 68
             </el-table-column>
@@ -56,11 +70,15 @@
56 70
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
57 71
                 <template slot-scope="scope">
58 72
                     <div style="display:flex;align-items:center;">
59
-                        <el-input v-model="scope.row.prescribing_number" style="width:50%" @input="changePrescribingNumber(scope)" placeholder=""></el-input>
73
+                        <el-input v-model="scope.row.prescribing_number" style="width:50%"
74
+                                  @input="changePrescribingNumber(scope)" placeholder=""></el-input>
60 75
                         <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
61
-                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
62
-                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
63
-                          <el-option :label="scope.row.drug.max_unit" v-if="scope.row.drug.min_unit != scope.row.drug.max_unit" :value="scope.row.drug.max_unit"></el-option>
76
+                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
77
+                                   @change="getAllChange(scope)">
78
+                            <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
79
+                            <el-option :label="scope.row.drug.max_unit"
80
+                                       v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
81
+                                       :value="scope.row.drug.max_unit"></el-option>
64 82
                         </el-select>
65 83
                     </div>
66 84
                 </template>
@@ -79,28 +97,46 @@
79 97
                     <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
80 98
                 </template>
81 99
             </el-table-column>
100
+
101
+            <el-table-column align="center" prop="remark" width="50" label="推送频率">
102
+                <template slot-scope="scope">
103
+                    <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
104
+                    <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
105
+                    <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
106
+
107
+                </template>
108
+            </el-table-column>
109
+
110
+
82 111
             <el-table-column align="center" width="40" prop="name" label="操作">
83 112
                 <template slot-scope="scope">
84
-                    <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
113
+                    <!--<i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>-->
114
+                    <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
115
+                    <el-button size="mini" type="danger" @click="deleteDrug(scope.row.id,scope.$index)">删除</el-button>
85 116
                 </template>
86 117
             </el-table-column>
87 118
         </el-table>
88 119
 
89
-        <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
120
+        <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border
121
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
90 122
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
91 123
             <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
92 124
             <el-table-column align="center" prop="project_name" label="名称">
93
-                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
125
+                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
126
+                </template>
94 127
             </el-table-column>
95 128
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
96
-                <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
129
+                <template slot-scope="scope">{{scope.row.type ==
130
+                    2?getGroup(scope.row.statistical_classification):'耗材'}}
131
+                </template>
97 132
             </el-table-column>
98 133
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
99 134
                 <template slot-scope="scope">
100
-                  <div style="display:flex;align-items:center;">
101
-                    <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
102
-                    <div>{{scope.row.unit}}</div>
103
-                  </div>
135
+                    <div style="display:flex;align-items:center;">
136
+                        <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
137
+                                  placeholder=""></el-input>
138
+                        <div>{{scope.row.unit}}</div>
139
+                    </div>
104 140
 
105 141
                 </template>
106 142
             </el-table-column>
@@ -123,7 +159,8 @@
123 159
             <el-table-column align="center" prop="number_days" width="70" label="天数">
124 160
                 <template slot-scope="scope">
125 161
                     <div style="display:flex;align-items:center;">
126
-                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
162
+                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)"
163
+                                  placeholder=""></el-input>
127 164
                         <div>{{'天'}}</div>
128 165
                     </div>
129 166
                 </template>
@@ -140,8 +177,8 @@
140 177
             <el-table-column align="center" prop="name" width="70" label="单价">
141 178
                 <template slot-scope="scope">
142 179
                     <div style="display:flex;align-items:center;">
143
-                      <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
144
-                      <div>{{'元'}}</div>
180
+                        <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
181
+                        <div>{{'元'}}</div>
145 182
                     </div>
146 183
 
147 184
                 </template>
@@ -151,9 +188,22 @@
151 188
                     <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
152 189
                 </template>
153 190
             </el-table-column>
191
+            <el-table-column align="center" prop="remark" width="50" label="推送频率">
192
+                <template slot-scope="scope">
193
+                    <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
194
+                    <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
195
+                    <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
196
+
197
+                </template>
198
+            </el-table-column>
154 199
             <el-table-column align="center" width="40" prop="name" label="操作">
155 200
                 <template slot-scope="scope">
156
-                    <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
201
+                    <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
202
+                    <el-button size="mini" type="danger" @click="deleteProject(scope.row.id,scope.$index)">删除
203
+                    </el-button>
204
+                    <!--<i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>-->
205
+                    <!--<button class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)">删除</>-->
206
+
157 207
                 </template>
158 208
             </el-table-column>
159 209
         </el-table>
@@ -170,36 +220,91 @@
170 220
         </div>
171 221
 
172 222
 
223
+        <div>
224
+            <el-dialog title="推送频率设置" :visible.sync="templateFormVisible" width="854px">
225
+                <el-form
226
+                        ref="templateForm"
227
+                        label-width="90px"
228
+                >
229
+                    <el-row>
230
+                        <el-col :span="24" >
231
+                            <el-form-item label="周期提醒 :">
232
+                                <el-radio-group v-model="frequency_type">
233
+                                    <el-radio :label="1">每次必推</el-radio>
234
+                                    <el-radio :label="2">天数频率</el-radio>
235
+                                    <el-radio :label="3">星期频率</el-radio>
236
+                                </el-radio-group>
237
+                            </el-form-item>
238
+                        </el-col>
239
+
240
+
241
+                        <el-col :span="12" v-if="frequency_type == 2">
242
+                            <el-form-item prop="day_count">
243
+                                <el-input style="width: 50px" v-model="day_count"></el-input>&nbsp;
244
+                                天/一次
245
+                            </el-form-item>
246
+                        </el-col>
247
+
248
+                        <el-col :span="24" v-if="frequency_type == 3">
249
+                            <el-form-item prop="weekday">
250
+                                <el-checkbox-group v-model="week_days">
251
+                                    <el-checkbox label="周一" name="周一" key="1">周一</el-checkbox>
252
+                                    <el-checkbox label="周二" name="周二" key="2">周二</el-checkbox>
253
+                                    <el-checkbox label="周三" name="周三" key="3">周三</el-checkbox>
254
+                                    <el-checkbox label="周四" name="周四" key="4">周四</el-checkbox>
255
+                                    <el-checkbox label="周五" name="周五" key="5">周五</el-checkbox>
256
+                                    <el-checkbox label="周六" name="周六" key="6">周六</el-checkbox>
257
+                                    <el-checkbox label="周日" name="周日" key="7">周日</el-checkbox>
258
+                                </el-checkbox-group>
259
+                            </el-form-item>
260
+                        </el-col>
261
+
262
+                    </el-row>
263
+                </el-form>
264
+                <div slot="footer" class="dialog-footer">
265
+                    <el-button @click="templateFormVisible = false">取消</el-button>
266
+                    <el-button type="primary" @click="submitTemplate()">保 存</el-button>
267
+                </div>
268
+            </el-dialog>
269
+        </div>
270
+
173 271
 
174 272
     </div>
175 273
 </template>
176 274
 
177 275
 <script>
178
-  import { getDictionaryDataConfig} from "@/utils/data";
179
-  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
180
-  import { delHisPrescriptionAdviceTemplate,delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
276
+  import { getDictionaryDataConfig } from '@/utils/data'
277
+  import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
278
+  import { delHisPrescriptionAdviceTemplate, delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
181 279
 
182 280
   export default {
183 281
     props: {
184 282
       preDrugs: Array,
185 283
       activeType: Number,
186
-      addtions_charge:Array,
187
-      prescription:{
188
-        type:Object,
189
-        default: function () {
284
+      addtions_charge: Array,
285
+      prescription: {
286
+        type: Object,
287
+        default: function() {
190 288
           return {
191
-            name:"",
192
-            advices:[],
193
-            project:[],
194
-            drugways:[],
195
-            efs:[],
196
-          };
289
+            name: '',
290
+            advices: [],
291
+            project: [],
292
+            drugways: [],
293
+            efs: []
294
+          }
197 295
         }
198
-      },
296
+      }
199 297
     },
200 298
     data() {
201 299
       return {
202
-        advices:[],
300
+        week_days: [],
301
+
302
+        current_row: null,
303
+        current_index: 0,
304
+        templateFormVisible: false,
305
+        frequency_type: 1,
306
+        day_count: 0,
307
+        advices: [],
203 308
         tableData: [],
204 309
         newoptions: [{
205 310
           value: '1',
@@ -218,18 +323,46 @@
218 323
           label: '5'
219 324
         }],
220 325
         value: '1',
221
-        input: 1,
326
+        input: 1
222 327
       }
223 328
     },
224 329
 
225
-    methods:{
330
+    methods: {
331
+      submitTemplate() {
332
+        console.log(this.current_index)
333
+
334
+        console.log( this.prescription.project[this.current_index])
335
+        if (this.prescription.advices && this.prescription.advices.length > 0 && this.prescription.project && this.prescription.project.length == 0) {
336
+          this.prescription.advices[this.current_index].frequency_type = this.frequency_type
337
+          this.prescription.advices[this.current_index].day_count = this.day_count
338
+          this.prescription.advices[this.current_index].week_day = this.week_days.join(",")
339
+
340
+        }
341
+
342
+        if (this.prescription.advices && this.prescription.advices.length == 0 && this.prescription.project && this.prescription.project.length > 0) {
343
+          this.prescription.project[this.current_index].frequency_type = this.frequency_type
344
+          this.prescription.project[this.current_index].day_count = this.day_count
345
+          this.prescription.project[this.current_index].week_day =this.week_days.join(",")
346
+        }
347
+        this.templateFormVisible = false
348
+      },
349
+      handleEdit(row, index) {
350
+        this.current_row = row
351
+        this.current_index = index
352
+        this.frequency_type = this.current_row.frequency_type
353
+        this.day_count = this.current_row.day_count
354
+        this.week_days = this.current_row.week_day.split(",")
355
+        this.templateFormVisible = true
356
+
357
+
358
+      },
226 359
       createFilter(queryString) {
227 360
         return (restaurant) => {
228 361
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
229 362
         }
230 363
       },
231 364
       querySearch2(queryString, cb) {
232
-        var restaurants = this.getDictionaryDataConfig("system","project_use")
365
+        var restaurants = this.getDictionaryDataConfig('system', 'project_use')
233 366
         restaurants.map(item => {
234 367
           item.value = item.name
235 368
         })
@@ -237,18 +370,18 @@
237 370
         // 调用 callback 返回建议列表的数据
238 371
         cb(results)
239 372
       },
240
-      delAddition(index, addition){
241
-        this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
242
-          confirmButtonText: "确 定",
243
-          cancelButtonText: "取 消",
244
-          type: "warning"
373
+      delAddition(index, addition) {
374
+        this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
375
+          confirmButtonText: '确 定',
376
+          cancelButtonText: '取 消',
377
+          type: 'warning'
245 378
         }).then(() => {
246
-          this.$nextTick(function(){
247
-            if(addition.id == 0){
379
+          this.$nextTick(function() {
380
+            if (addition.id == 0) {
248 381
               this.prescription.addition.splice(index, 1)
249
-            }else{
382
+            } else {
250 383
               let params = {
251
-                'id': addition.id,
384
+                'id': addition.id
252 385
               }
253 386
               delHisAddition(params).then(response => {
254 387
                 if (response.data.state == 0) {
@@ -262,13 +395,14 @@
262 395
                 }
263 396
               })
264 397
             }
265
-          });
398
+          })
266 399
 
267 400
         })
268
-          .catch(() => {});
401
+          .catch(() => {
402
+          })
269 403
 
270 404
       },
271
-      getInitData(){
405
+      getInitData() {
272 406
         getInitData().then(response => {
273 407
           if (response.data.state == 0) {
274 408
             this.$message.error(response.data.msg)
@@ -279,19 +413,19 @@
279 413
           }
280 414
         })
281 415
 
282
-      },deleteDrug:function(index, row){
416
+      }, deleteDrug: function(index, row) {
283 417
 
284
-        this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
285
-          confirmButtonText: "确 定",
286
-          cancelButtonText: "取 消",
287
-          type: "warning"
418
+        this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
419
+          confirmButtonText: '确 定',
420
+          cancelButtonText: '取 消',
421
+          type: 'warning'
288 422
         }).then(() => {
289
-          this.$nextTick(function(){
290
-            if(row.advice_id == 0){
423
+          this.$nextTick(function() {
424
+            if (row.advice_id == 0) {
291 425
               this.prescription.advices.splice(index, 1)
292
-            }else{
426
+            } else {
293 427
               let params = {
294
-                'id': row.advice_id,
428
+                'id': row.advice_id
295 429
               }
296 430
               delHisPrescriptionAdviceTemplate(params).then(response => {
297 431
                 if (response.data.state == 0) {
@@ -305,20 +439,15 @@
305 439
                 }
306 440
               })
307 441
 
308
-
309 442
             }
310 443
 
311
-          });
312
-
444
+          })
313 445
 
314 446
         })
315
-          .catch(() => {});
316
-
317
-
447
+          .catch(() => {
448
+          })
318 449
 
319
-
320
-
321
-      },deepClone(source) {
450
+      }, deepClone(source) {
322 451
         if (!source && typeof source !== 'object') {
323 452
           throw new Error('error arguments', 'shallowClone')
324 453
         }
@@ -333,7 +462,7 @@
333 462
         return targetObj
334 463
       },
335 464
 
336
-      setNewData:function(data){
465
+      setNewData: function(data) {
337 466
         this.prescription = data
338 467
 
339 468
         // this.prescription.advices = data.advices
@@ -341,41 +470,41 @@
341 470
       getDictionaryDataConfig(module, filed_name) {
342 471
         return getDictionaryDataConfig(module, filed_name)
343 472
       },
344
-      getGroup(id){
345
-        var name = ""
346
-        var statistics_category =  getDictionaryDataConfig('system','statistics_category')
347
-        console.log("2235",statistics_category)
348
-        for(let i=0;i<statistics_category.length;i++){
349
-          if(id == statistics_category[i].id){
473
+      getGroup(id) {
474
+        var name = ''
475
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
476
+        console.log('2235', statistics_category)
477
+        for (let i = 0; i < statistics_category.length; i++) {
478
+          if (id == statistics_category[i].id) {
350 479
             name = statistics_category[i].name
351 480
           }
352 481
         }
353 482
         return name
354 483
       },
355
-      deleteProject(row,i){
356
-        if(this.prescription.order_status == 2){
484
+      deleteProject(row, i) {
485
+        if (this.prescription.order_status == 2) {
357 486
           this.$message.error('该处方已经结算,无法删除')
358 487
           return
359 488
         }
360
-        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
361
-          confirmButtonText: "确 定",
362
-          cancelButtonText: "取 消",
363
-          type: "warning"
489
+        this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
490
+          confirmButtonText: '确 定',
491
+          cancelButtonText: '取 消',
492
+          type: 'warning'
364 493
         }).then(() => {
365
-          if(row.id == 0){
494
+          if (row.id == 0) {
366 495
             this.prescription.project.splice(i, 1)
367 496
 
368
-          }else{
497
+          } else {
369 498
             let params = {
370
-              'id': row.id,
499
+              'id': row.id
371 500
             }
372 501
             delHisPrescriptionProjectTemplate(params).then(response => {
373 502
               if (response.data.state == 0) {
374 503
                 this.$message.error(response.data.msg)
375 504
                 return false
376 505
               } else {
377
-                for (let i = 0; i < this.prescription.project.length; i++){
378
-                  if(this.prescription.project[i].id == row.id){
506
+                for (let i = 0; i < this.prescription.project.length; i++) {
507
+                  if (this.prescription.project[i].id == row.id) {
379 508
                     this.prescription.project.splice(i, 1)
380 509
                   }
381 510
                 }
@@ -384,28 +513,29 @@
384 513
             })
385 514
           }
386 515
         })
387
-          .catch(() => {});
516
+          .catch(() => {
517
+          })
388 518
 
389 519
       },
390
-      getAllChange(scope){
391
-        if(scope.row.drug.min_unit == scope.row.single_dose_unit){
392
-          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
520
+      getAllChange(scope) {
521
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
522
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
393 523
             console.log(1)
394 524
             scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
395
-          }else{
525
+          } else {
396 526
             console.log(12)
397
-            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number) 
527
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
398 528
           }
399
-        }else{
400
-          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
529
+        } else {
530
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
401 531
             console.log(123)
402
-            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose) 
403
-          }else{
532
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
533
+          } else {
404 534
             console.log(1234)
405 535
             scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
406 536
           }
407 537
         }
408
-        if(scope.row.prescribing_number == 0){
538
+        if (scope.row.prescribing_number == 0) {
409 539
           scope.row.prescribing_number = 1
410 540
         }
411 541
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
@@ -419,9 +549,9 @@
419 549
         //   }
420 550
         //   // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
421 551
         // }
422
-        
552
+
423 553
       },
424
-      changePrescribingNumber(scope){
554
+      changePrescribingNumber(scope) {
425 555
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
426 556
         //   if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
427 557
         //     this.$message.error(scope.row.drug_name + '库存不足')
@@ -432,29 +562,29 @@
432 562
         //   }
433 563
         // }
434 564
       },
435
-      getSingleDose(scope){
565
+      getSingleDose(scope) {
436 566
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
437 567
       },
438
-      getDay(scope){
568
+      getDay(scope) {
439 569
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
440 570
       },
441
-      getProjectSingleDose(scope){
571
+      getProjectSingleDose(scope) {
442 572
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
443
-        if(this.prescription.project[scope.$index].total == 0){
573
+        if (this.prescription.project[scope.$index].total == 0) {
444 574
           this.prescription.project[scope.$index].total = 1
445 575
         }
446 576
       },
447
-      getProjectDay(scope){
577
+      getProjectDay(scope) {
448 578
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
449
-        if(this.prescription.project[scope.$index].total == 0){
579
+        if (this.prescription.project[scope.$index].total == 0) {
450 580
           this.prescription.project[scope.$index].total = 1
451 581
         }
452 582
       }
453
-    },mounted(){
583
+    }, mounted() {
454 584
       this.getInitData()
455 585
 
456 586
     },
457
-    watch:{
587
+    watch: {
458 588
       // "prescription.advices":{
459 589
       //   handler(newVal,oldVal){
460 590
       //     newVal.map(item => {
@@ -463,7 +593,6 @@
463 593
       //         item.total = item.single_dose * item.number_days
464 594
       //       }
465 595
 
466
-
467 596
       //     })
468 597
       //   },
469 598
       //   deep:true
@@ -486,31 +615,37 @@
486 615
 
487 616
 <style lang="scss">
488 617
     .prescriptionTable {
489
-    .el-input__inner{
618
+
619
+    .el-input__inner {
490 620
         padding: 0 5px;
491 621
     }
492
-    .additionalBox{
622
+
623
+    .additionalBox {
493 624
         margin-top: 20px;
494 625
         display: flex;
495 626
         flex-wrap: wrap;
496
-    .additionalOne{
497
-        margin-right:20px;
498
-        margin-bottom:10px;
627
+
628
+    .additionalOne {
629
+        margin-right: 20px;
630
+        margin-bottom: 10px;
499 631
         display: flex;
500 632
         align-items: center;
501
-    >span{
633
+
634
+    > span {
502 635
         white-space: nowrap;
503 636
         overflow: hidden;
504 637
         text-overflow: ellipsis;
505
-        width:80px;
638
+        width: 80px;
506 639
         display: inline-block;
507 640
         font-size: 14px;
508 641
     }
642
+
509 643
     }
510
-    .deleteIcon{
511
-        color:red;
512
-        margin-left:5px;
644
+    .deleteIcon {
645
+        color: red;
646
+        margin-left: 5px;
513 647
     }
648
+
514 649
     }
515 650
     .el-table th .cell, .el-table td .cell {
516 651
         padding: 0 2px;

+ 83 - 9
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Voir le fichier

@@ -862,12 +862,10 @@
862 862
               let obj = {
863 863
                 id: month_prescriptions[i].advices[a].drug_id,
864 864
                 price: month_prescriptions[i].advices[a].price
865
-
866 865
               }
867 866
               drug_ids.push(obj)
868 867
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
869 868
             }
870
-
871 869
           } else if (month_prescriptions[i].type == 2) { //项目
872 870
             for (let a = 0; a < month_prescriptions[i].project.length; a++) {
873 871
               let obj = {
@@ -888,9 +886,7 @@
888 886
             }
889 887
             additions_ids.push(obj)
890 888
             addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
891
-
892 889
           }
893
-
894 890
         }
895 891
 
896 892
         const obj = {}
@@ -946,28 +942,23 @@
946 942
           let count = 0
947 943
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
948 944
             if (project_ids[i].price == project_month_prescriptions.project[a].price) {
949
-
950 945
               if (project_month_prescriptions.project[a].type == 2) {
951 946
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
952 947
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
953 948
                 obj['project_name'] = project_month_prescriptions.project[a].project.project_name
954 949
                 obj['project'] =  project_month_prescriptions.project[a].project
955 950
 
956
-
957 951
               } else if (project_month_prescriptions.project[a].type == 3) {
958 952
                 obj['statistical_classification'] = ''
959 953
                 obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
960 954
                 obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
961 955
                 obj['good_info'] =  project_month_prescriptions.project[a].good_info
962
-
963
-
964 956
               }
965 957
 
966 958
               // obj['project_name'] = project_month_prescriptions.project[a].project.project_name
967 959
               // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
968 960
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose
969 961
               obj['type'] = project_month_prescriptions.project[a].type
970
-
971 962
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
972 963
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
973 964
               obj['number_days'] = project_month_prescriptions.project[a].day
@@ -1317,6 +1308,19 @@
1317 1308
 
1318 1309
             return false
1319 1310
           } else {
1311
+            if(response.data.data.sch_prescriptions== null){
1312
+
1313
+              response.data.data.sch_prescriptions = []
1314
+            }
1315
+            for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
1316
+              if(response.data.data.sch_prescriptions[i].advices == null){
1317
+                response.data.data.sch_prescriptions[i].advices = []
1318
+              }
1319
+              if(response.data.data.sch_prescriptions[i].project == null){
1320
+                response.data.data.sch_prescriptions[i].project = []
1321
+              }
1322
+            }
1323
+
1320 1324
             this.patientid = val.id
1321 1325
             this.isloading = false
1322 1326
 
@@ -1705,6 +1709,20 @@
1705 1709
                   this.$message.error(response.data.msg)
1706 1710
                   return false
1707 1711
                 } else {
1712
+                  if(response.data.data.sch_prescriptions== null){
1713
+
1714
+                    response.data.data.sch_prescriptions = []
1715
+                  }
1716
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
1717
+                    if(response.data.data.sch_prescriptions[i].advices == null){
1718
+                      response.data.data.sch_prescriptions[i].advices = []
1719
+                    }
1720
+
1721
+                    if(response.data.data.sch_prescriptions[i].project == null){
1722
+                      response.data.data.sch_prescriptions[i].project = []
1723
+                    }
1724
+
1725
+                  }
1708 1726
                   this.prescriptions = []
1709 1727
 
1710 1728
                   this.month_prescriptions = []
@@ -2189,6 +2207,20 @@
2189 2207
                   this.$message.error(response.data.msg)
2190 2208
                   return false
2191 2209
                 } else {
2210
+                  if(response.data.data.sch_prescriptions== null){
2211
+
2212
+                    response.data.data.sch_prescriptions = []
2213
+                  }
2214
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
2215
+                    if(response.data.data.sch_prescriptions[i].advices == null){
2216
+                      response.data.data.sch_prescriptions[i].advices = []
2217
+                    }
2218
+
2219
+                    if(response.data.data.sch_prescriptions[i].project == null){
2220
+                      response.data.data.sch_prescriptions[i].project = []
2221
+                    }
2222
+
2223
+                  }
2192 2224
                   this.prescriptions = []
2193 2225
 
2194 2226
                   this.month_prescriptions = []
@@ -2652,6 +2684,20 @@
2652 2684
                 this.$message.error(response.data.msg)
2653 2685
                 return false
2654 2686
               } else {
2687
+                if(response.data.data.sch_prescriptions== null){
2688
+
2689
+                  response.data.data.sch_prescriptions = []
2690
+                }
2691
+                for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
2692
+                  if(response.data.data.sch_prescriptions[i].advices == null){
2693
+                    response.data.data.sch_prescriptions[i].advices = []
2694
+                  }
2695
+
2696
+                  if(response.data.data.sch_prescriptions[i].project == null){
2697
+                    response.data.data.sch_prescriptions[i].project = []
2698
+                  }
2699
+
2700
+                }
2655 2701
                 this.prescriptions = []
2656 2702
 
2657 2703
                 this.month_prescriptions = []
@@ -3173,6 +3219,20 @@
3173 3219
                   this.$message.error(response.data.msg)
3174 3220
                   return false
3175 3221
                 } else {
3222
+                  if(response.data.data.sch_prescriptions== null){
3223
+
3224
+                    response.data.data.sch_prescriptions = []
3225
+                  }
3226
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
3227
+                    if(response.data.data.sch_prescriptions[i].advices == null){
3228
+                      response.data.data.sch_prescriptions[i].advices = []
3229
+                    }
3230
+
3231
+                    if(response.data.data.sch_prescriptions[i].project == null){
3232
+                      response.data.data.sch_prescriptions[i].project = []
3233
+                    }
3234
+
3235
+                  }
3176 3236
                   for (let i = 0; i < this.all_data.length; i++) {
3177 3237
                     if (this.all_data[i].id == val.id) {
3178 3238
                       this.oldCurrentRow = this.all_data[i]
@@ -3731,6 +3791,20 @@
3731 3791
                   this.$message.error(response.data.msg)
3732 3792
                   return false
3733 3793
                 } else {
3794
+                  if(response.data.data.sch_prescriptions== null){
3795
+
3796
+                    response.data.data.sch_prescriptions = []
3797
+                  }
3798
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
3799
+                    if(response.data.data.sch_prescriptions[i].advices == null){
3800
+                      response.data.data.sch_prescriptions[i].advices = []
3801
+                    }
3802
+
3803
+                    if(response.data.data.sch_prescriptions[i].project == null){
3804
+                      response.data.data.sch_prescriptions[i].project = []
3805
+                    }
3806
+
3807
+                  }
3734 3808
                   this.prescriptions = []
3735 3809
 
3736 3810
                   this.month_prescriptions = []

+ 17 - 4
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Voir le fichier

@@ -92,10 +92,11 @@
92 92
         data: [],
93 93
         all_data:[],
94 94
         page: 1,
95
-        limit: 10,
95
+        limit: 20,
96 96
         patient_id: 0,
97 97
         total:0,
98
-        patient_name:''
98
+        patient_name:'',
99
+        mode_str:"",
99 100
       }
100 101
     },
101 102
     methods: {
@@ -133,7 +134,7 @@
133 134
         })
134 135
       },
135 136
       jumpDetail(row) {
136
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name)
137
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name +"&modes="+this.mode_str)
137 138
       },
138 139
       getMode(id) {
139 140
         let name = ''
@@ -162,6 +163,12 @@
162 163
         getPrescriptionTemplateList(params).then(response => {
163 164
           if (response.data.state == 1) {
164 165
             this.templates = response.data.data.list
166
+            let modes = []
167
+            for(let i =0; i< this.templates.length; i++){
168
+              modes.push(this.templates[i].mode)
169
+            }
170
+            this.mode_str = modes.join(",")
171
+
165 172
             this.total = response.data.data.total
166 173
           }
167 174
         })
@@ -180,6 +187,12 @@
180 187
         getPrescriptionTemplateList(params).then(response => {
181 188
           if (response.data.state == 1) {
182 189
             this.templates = response.data.data.list
190
+            let modes = []
191
+            for(let i =0; i< this.templates.length; i++){
192
+              modes.push(this.templates[i].mode)
193
+            }
194
+            this.mode_str = modes.join(",")
195
+
183 196
             this.total = response.data.data.total
184 197
           }
185 198
         })
@@ -210,7 +223,7 @@
210 223
           this.$message.error('请选择病人')
211 224
           return
212 225
         }
213
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + 0 + '&patient_id=' + this.patient_id+ '&patient_name=' + this.patient_name)
226
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + 0 + '&patient_id=' + this.patient_id+ '&patient_name=' + this.patient_name+"&modes="+this.mode_str)
214 227
 
215 228
       }
216 229
     },

+ 125 - 77
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Voir le fichier

@@ -16,7 +16,8 @@
16 16
                         </el-form-item>
17 17
 
18 18
                         <el-form-item label="透析模式: " prop="mode_id" label-position="right">
19
-                            <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
19
+                            <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
20
+                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0">
20 21
                                 <el-option
21 22
                                         v-for="item in modeOptions"
22 23
                                         :key="item.id"
@@ -24,6 +25,15 @@
24 25
                                         :value="item.id"
25 26
                                 ></el-option>
26 27
                             </el-select>
28
+                            <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
29
+                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id > 0">
30
+                                <el-option
31
+                                        v-for="item in modeOptionsTwo"
32
+                                        :key="item.id"
33
+                                        :label="item.name"
34
+                                        :value="item.id"
35
+                                ></el-option>
36
+                            </el-select>
27 37
                         </el-form-item>
28 38
                     </el-form>
29 39
                     <div class="tabsBox">
@@ -239,6 +249,7 @@
239 249
   import { uParseTime } from '@/utils/tools'
240 250
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
241 251
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
252
+
242 253
   const moment = require('moment')
243 254
   export default {
244 255
     props: {
@@ -281,7 +292,7 @@
281 292
           { value: 11, label: '普通门诊' },
282 293
           // { value: 12, label: '门诊挂号' },
283 294
           // { value: 13, label: '急诊' },
284
-          { value: 14, label: '门诊特殊病' },
295
+          { value: 14, label: '门诊特殊病' }
285 296
           // { value: 15, label: '门诊统筹' },
286 297
           // { value: 16, label: '门诊慢性病' },
287 298
           // { value: 21, label: '普通住院' }
@@ -296,7 +307,9 @@
296 307
           name: '',
297 308
           mode_id: ''
298 309
         },
299
-        modeOptions: this.$store.getters.treatment_mode,
310
+        modeOptions:{},
311
+        modeOptionsTwo: {},
312
+
300 313
         start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
301 314
         end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
302 315
         isLastOrNextVisible: false,
@@ -400,34 +413,28 @@
400 413
           }
401 414
         }
402 415
 
403
-
404 416
         for (let i = 0; i < this.prescriptions.length; i++) {
405
-          for(let b = 0; b < this.prescriptions[i].advices.length; b++){
417
+          for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
406 418
             if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
407
-              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,开非特病类型的药")
419
+              this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,开非特病类型的药')
408 420
               return
409 421
             }
410 422
 
411 423
           }
412 424
 
413
-          for(let c = 0; c < this.prescriptions[i].project.length; c++){
414
-            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2  && this.prescriptions[i].project[c].project.disease_directory != 1) {
415
-              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的项目")
425
+          for (let c = 0; c < this.prescriptions[i].project.length; c++) {
426
+            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2 && this.prescriptions[i].project[c].project.disease_directory != 1) {
427
+              this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的项目')
416 428
               return
417 429
             }
418 430
 
419
-            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3  && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
420
-              this.$message.error("处方" + (i+1).toString() +"属于特病类型处方,请开特病类型的耗材")
421
-              return 
431
+            if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3 && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
432
+              this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的耗材')
433
+              return
422 434
             }
423 435
           }
424 436
         }
425 437
 
426
-
427
-
428
-
429
-
430
-
431 438
         let params = {
432 439
           name: this.tempForm.name,
433 440
           mode_id: this.tempForm.mode_id,
@@ -452,6 +459,11 @@
452 459
             this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
453 460
             this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
454 461
             this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
462
+            this.prescriptions[i].advices[b].groupno = parseInt(this.prescriptions[i].advices[b].groupno)
463
+
464
+            this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
465
+            this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
466
+            this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
455 467
 
456 468
           }
457 469
 
@@ -459,6 +471,11 @@
459 471
             this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
460 472
             this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
461 473
             this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
474
+
475
+            this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
476
+            this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
477
+            this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
478
+
462 479
           }
463 480
         }
464 481
         let data = {
@@ -467,6 +484,11 @@
467 484
         createdTemplate(params, data).then(response => {
468 485
           if (response.data.state == 1) {
469 486
             this.$message.success('保存成功')
487
+            for (const mkey in this.modeOptions) {
488
+              if (mkey == this.tempForm.mode_id) {
489
+                delete this.modeOptions[mkey]
490
+              }
491
+            }
470 492
           } else {
471 493
             this.$message.error(response.data.msg)
472 494
           }
@@ -931,6 +953,10 @@
931 953
                 this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
932 954
                 this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
933 955
 
956
+                this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
957
+                this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
958
+                this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
959
+
934 960
               }
935 961
 
936 962
               for (let b = 0; b < this.prescriptions[i].project.length; b++) {
@@ -938,6 +964,10 @@
938 964
                 this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
939 965
                 this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
940 966
 
967
+                this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
968
+                this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
969
+                this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
970
+
941 971
               }
942 972
 
943 973
               for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
@@ -1087,11 +1117,7 @@
1087 1117
 
1088 1118
         }
1089 1119
 
1090
-
1091
-
1092
-          obj.med_type = 14
1093
-
1094
-
1120
+        obj.med_type = 14
1095 1121
 
1096 1122
         this.prescriptions.push(obj)
1097 1123
 
@@ -1305,30 +1331,30 @@
1305 1331
         //   this.$refs.multipleTable.clearSelection()
1306 1332
         //   return
1307 1333
         // }
1308
-      //  if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1309
-      //     if (this.$store.getters.xt_user.org_id == 10138) {
1310
-      //       for (let i = 0; i < this.curDrugs.length; i++) {
1311
-      //         if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1312
-      //           this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1313
-      //           return
1314
-      //         }
1315
-
1316
-      //       }
1317
-      //     }
1318
-      //   }
1319
-
1320
-      //   if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1321
-      //     if (this.$store.getters.xt_user.org_id == 10138) {
1322
-      //       for (let i = 0; i < this.curDrugs.length; i++) {
1323
-      //         if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1324
-      //           this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1325
-      //           return
1326
-      //         }
1327
-
1328
-      //       }
1329
-      //     }
1330
-      //   }
1331
-      if (this.curDrugs.length > 0) {
1334
+        //  if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1335
+        //     if (this.$store.getters.xt_user.org_id == 10138) {
1336
+        //       for (let i = 0; i < this.curDrugs.length; i++) {
1337
+        //         if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1338
+        //           this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1339
+        //           return
1340
+        //         }
1341
+
1342
+        //       }
1343
+        //     }
1344
+        //   }
1345
+
1346
+        //   if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1347
+        //     if (this.$store.getters.xt_user.org_id == 10138) {
1348
+        //       for (let i = 0; i < this.curDrugs.length; i++) {
1349
+        //         if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1350
+        //           this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1351
+        //           return
1352
+        //         }
1353
+
1354
+        //       }
1355
+        //     }
1356
+        //   }
1357
+        if (this.curDrugs.length > 0) {
1332 1358
           for (let i = 0; i < this.curDrugs.length; i++) {
1333 1359
             if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1334 1360
               this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -1351,18 +1377,16 @@
1351 1377
           let arr = this.teamList
1352 1378
           let newArr = []
1353 1379
           arr.map(item => {
1354
-            if(this.curPrescriptions.med_type != 14){
1380
+            if (this.curPrescriptions.med_type != 14) {
1355 1381
               newArr.push(item)
1356 1382
             }
1357
-            if(this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1){
1383
+            if (this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1) {
1358 1384
               newArr.push(item)
1359 1385
             }
1360 1386
           })
1361 1387
           this.teamList = newArr
1362 1388
         }
1363 1389
 
1364
-
1365
-
1366 1390
         if (this.curDrugs.length == 0) {
1367 1391
           for (let i = 0; i < this.curDrugs.length; i++) {
1368 1392
             if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
@@ -1399,7 +1423,6 @@
1399 1423
           }
1400 1424
         }
1401 1425
 
1402
-
1403 1426
         for (let i = 0; i < this.curDrugs.length; i++) {
1404 1427
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1405 1428
             if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
@@ -1461,8 +1484,15 @@
1461 1484
               this.curStatus = 1
1462 1485
             }
1463 1486
 
1487
+            let index = 0
1488
+
1489
+            if (this.prescriptions[i].advices.length > 0) {
1490
+              index = this.prescriptions[i].advices.length
1491
+            }
1492
+
1464 1493
             if (temp.length > 0) {
1465 1494
               for (let b = 0; b < temp.length; b++) {
1495
+                let temp_index = b + 1
1466 1496
                 let obj = {
1467 1497
                   advice_id: 0,
1468 1498
                   id: temp[b].id,
@@ -1477,7 +1507,11 @@
1477 1507
                   single_dose_unit: temp[b].dose_unit,
1478 1508
                   prescribing_number_unit: temp[b].prescribing_number_unit,
1479 1509
                   medical_insurance_number: temp[b].medical_insurance_number,
1480
-                  drug: temp[b]
1510
+                  drug: temp[b],
1511
+                  groupno: index + temp_index,
1512
+                  frequency_type: 1,
1513
+                  day_count: 0,
1514
+                  week_day: ''
1481 1515
                 }
1482 1516
 
1483 1517
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
@@ -1488,17 +1522,6 @@
1488 1522
               this.curStatus = 1
1489 1523
             }
1490 1524
 
1491
-            // if(this.activeName == 2){
1492
-            //
1493
-            //    for(let i = 0; i<temp2.length;i++){
1494
-            //     for(let j=0;j<this.hisList.length;j++){
1495
-            //         if(temp2[i].id == this.hisList[j].project_id){
1496
-            //            temp2[i].total =  this.hisList[j].number
1497
-            //         }
1498
-            //     }
1499
-            //    }
1500
-            //  }
1501
-
1502 1525
             if (temp2.length > 0) {
1503 1526
               for (let b = 0; b < temp2.length; b++) {
1504 1527
                 let obj = {
@@ -1516,11 +1539,14 @@
1516 1539
                   medical_code: temp2[b].medical_code,
1517 1540
                   unit: temp2[b].unit,
1518 1541
                   type: temp2[b].type,
1542
+                  frequency_type: 1,
1543
+                  day_count: 0,
1544
+                  week_day: ''
1519 1545
                 }
1520
-                if (temp2[b].type == 2){
1546
+                if (temp2[b].type == 2) {
1521 1547
                   obj['project'] = temp2[b].project
1522 1548
 
1523
-                }else if(temp2[b].type == 3){
1549
+                } else if (temp2[b].type == 3) {
1524 1550
 
1525 1551
                   obj['good_info'] = temp2[b].good_info
1526 1552
 
@@ -1591,7 +1617,12 @@
1591 1617
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1592 1618
                     medical_insurance_number: prescription.advices[b].med_list_codg,
1593 1619
                     id: prescription.advices[b].drug_id,
1594
-                    drug: prescription.advices[b].drug
1620
+                    drug: prescription.advices[b].drug,
1621
+                    groupno: prescription.advices[b].groupno,
1622
+                    frequency_type: prescription.advices[b].frequency_type,
1623
+                    day_count: prescription.advices[b].day_count,
1624
+                    week_day: prescription.advices[b].week_day
1625
+
1595 1626
                   }
1596 1627
                   tempAdvice.push(obj)
1597 1628
                 }
@@ -1613,6 +1644,10 @@
1613 1644
                     medical_code: prescription.project[b].project.medical_code,
1614 1645
                     unit: prescription.project[b].project.unit,
1615 1646
                     type: prescription.project[b].type,
1647
+                    frequency_type: prescription.project[b].frequency_type,
1648
+                    day_count: prescription.project[b].day_count,
1649
+                    week_day: prescription.project[b].week_day
1650
+
1616 1651
                   }
1617 1652
 
1618 1653
                   if (prescription.project[b].type == 2) {
@@ -1621,9 +1656,6 @@
1621 1656
                     obj['project_name'] = prescription.project[b].project.project_name
1622 1657
                     obj['project'] = prescription.project[b].project
1623 1658
 
1624
-
1625
-
1626
-
1627 1659
                   } else if (prescription.project[b].type == 3) {
1628 1660
                     obj['statistical_classification'] = ''
1629 1661
                     obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
@@ -1671,10 +1703,7 @@
1671 1703
                 med_type: ''
1672 1704
               }
1673 1705
 
1674
-
1675
-                obj.med_type = 14
1676
-
1677
-
1706
+              obj.med_type = 14
1678 1707
 
1679 1708
               this.prescriptions.push(obj)
1680 1709
               this.curPrescriptions = this.prescriptions[0]
@@ -1704,7 +1733,7 @@
1704 1733
                 unit: project[i].unit,
1705 1734
                 type: 2,
1706 1735
                 is_special_diseases: project[i].disease_directory,
1707
-                project: project[i],
1736
+                project: project[i]
1708 1737
               }
1709 1738
 
1710 1739
               this.tabProject.push(obj)
@@ -1726,7 +1755,7 @@
1726 1755
                 unit: this.getGoodUnit(good_info[i].good_unit),
1727 1756
                 type: 3,
1728 1757
                 is_special_diseases: good_info[i].is_special_diseases,
1729
-                good_info: good_info[i],
1758
+                good_info: good_info[i]
1730 1759
               }
1731 1760
               this.tabProject.push(obj)
1732 1761
             }
@@ -1820,7 +1849,7 @@
1820 1849
                   unit: project[i].project.unit,
1821 1850
                   type: project[i].type,
1822 1851
                   is_special_diseases: project[i].project.disease_directory,
1823
-                  project:project[i].project,
1852
+                  project: project[i].project
1824 1853
                 }
1825 1854
                 if (obj.total == 0 || obj.total == undefined) {
1826 1855
                   obj.total = 1
@@ -1843,7 +1872,7 @@
1843 1872
                   unit: project[i].good_info.unit,
1844 1873
                   type: project[i].type,
1845 1874
                   is_special_diseases: project[i].good_info.is_special_diseases,
1846
-                  good_info:project[i].good_info,
1875
+                  good_info: project[i].good_info
1847 1876
                 }
1848 1877
                 if (obj.total == 0 || obj.total == undefined) {
1849 1878
                   obj.total = 1
@@ -1889,6 +1918,25 @@
1889 1918
         this.$refs.tabProjectTeam.clearSelection()
1890 1919
       }
1891 1920
     }, created() {
1921
+      for(let key in this.$store.getters.treatment_mode){
1922
+        this.modeOptions[key] = this.$store.getters.treatment_mode[key]
1923
+        this.modeOptionsTwo[key]=  this.$store.getters.treatment_mode[key]
1924
+
1925
+      }
1926
+      var modes = this.$route.query.modes.split(',')
1927
+      console.log('~~~~~~~~~~')
1928
+
1929
+      console.log(modes)
1930
+
1931
+      for (const mkey in this.modeOptions) {
1932
+        console.log(mkey)
1933
+        for (let b = 0; b < modes.length; b++) {
1934
+          if (mkey == parseInt(modes[b])) {
1935
+            delete this.modeOptions[mkey]
1936
+          }
1937
+        }
1938
+      }
1939
+
1892 1940
       this.getPrescriptionTemplateInfo()
1893 1941
       this.getInitData()
1894 1942
       //获取所有项目

+ 25 - 7
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue Voir le fichier

@@ -8,7 +8,7 @@
8 8
                 <span v-if="patient.gender == 1">男</span>
9 9
                 <span v-if="patient.gender == 2">女</span>
10 10
             </div>
11
-            <div>年龄:{{patient.age?patient.age:''}}岁</div>
11
+            <div>年龄:{{getAge(patient)?getAge(patient):""}}岁</div>
12 12
         </div>
13 13
         <div class="infoTitle">
14 14
             <div>婚姻状况:
@@ -105,6 +105,7 @@
105 105
 </div>
106 106
 </template>
107 107
 <script>
108
+  import { jsGetAge, uParseTime } from '@/utils/tools'
108 109
 
109 110
 import { getDataConfig } from "@/utils/data";
110 111
 import { getAllDoctorList,getPatientCaseHistory } from "@/api/project/project"
@@ -122,11 +123,28 @@ export default {
122 123
             orgname:'',
123 124
             history:{},
124 125
             printDate:''
125
-        }                   
126
+        }
126 127
     },
127 128
     methods:{
129
+      getAge(patient){
130
+        var thisLen = patient.id_card_no.length
131
+        var birth = ''
132
+        if (thisLen == 15) {
133
+          birth = '19' + patient.id_card_no.substr(6, 6)
134
+        } else {
135
+          birth = patient.id_card_no.substr(6, 8)
136
+        }
137
+        var births =
138
+          birth.substr(0, 4) +
139
+          '-' +
140
+          birth.substr(4, 2) +
141
+          '-' +
142
+          birth.substr(6, 2)
143
+        return jsGetAge(births, '-')
144
+
145
+      },
128 146
       show(val){
129
-       
147
+
130 148
         this.patientid = val
131 149
         this.getAllDoctorList()
132 150
         this.getPatientCaseHistory()
@@ -150,7 +168,7 @@ export default {
150 168
                console.log("department",department)
151 169
                this.departmentList = department
152 170
              }
153
-           })   
171
+           })
154 172
        },
155 173
       getDoctor(id){
156 174
         var name = ""
@@ -182,7 +200,7 @@ export default {
182 200
       })
183 201
     },
184 202
     getDeparment(id){
185
-  
203
+
186 204
      var name = ''
187 205
      for(let i=0;i<this.departmentList.length;i++){
188 206
          if(id == this.departmentList[i].id){
@@ -191,7 +209,7 @@ export default {
191 209
       }
192 210
       return name
193 211
     },
194
-  
212
+
195 213
 
196 214
     },
197 215
     created(){
@@ -218,7 +236,7 @@ export default {
218 236
 <style lang="scss" scoped>
219 237
 .prescription-print{
220 238
     -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
221
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
239
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
222 240
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
223 241
     margin-bottom: 20px;
224 242
     padding:20px 10px;

+ 31 - 14
src/xt_pages/outpatientDoctorStation/template/printFour.vue Voir le fichier

@@ -9,7 +9,7 @@
9 9
                 <span v-if="item.patient.gender == 1">男</span>
10 10
                 <span v-if="item.patient.gender == 2">女</span>
11 11
               </p>
12
-              <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
12
+              <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
13 13
           </div>
14 14
           <div class="infoMain">
15 15
               <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
@@ -29,7 +29,7 @@
29 29
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
30 30
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
31 31
                </div>
32
-               
32
+
33 33
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
34 34
                   <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;<span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
35 35
                   <div style="margin-left:100px;"><span>{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</span></div>
@@ -60,10 +60,10 @@
60 60
           <div style="page-break-after:always"></div>
61 61
       </div>
62 62
     </div>
63
-    
63
+
64 64
   </div>
65 65
 
66
-    
66
+
67 67
 </template>
68 68
 <script>
69 69
 import { jsGetAge, uParseTime } from '@/utils/tools'
@@ -75,7 +75,7 @@ export default {
75 75
       record_date:String,
76 76
       prescription_id:Number,
77 77
       ids:String
78
-    }, 
78
+    },
79 79
     data(){
80 80
       return {
81 81
         doctorList:[],
@@ -92,15 +92,32 @@ export default {
92 92
       }
93 93
     },
94 94
    methods:{
95
-     
95
+     getAge(patient){
96
+       var thisLen = patient.id_card_no.length
97
+       var birth = ''
98
+       if (thisLen == 15) {
99
+         birth = '19' + patient.id_card_no.substr(6, 6)
100
+       } else {
101
+         birth = patient.id_card_no.substr(6, 8)
102
+       }
103
+       var births =
104
+         birth.substr(0, 4) +
105
+         '-' +
106
+         birth.substr(4, 2) +
107
+         '-' +
108
+         birth.substr(6, 2)
109
+        return jsGetAge(births, '-')
110
+
111
+     },
112
+
96 113
      getAllDoctorList(){
97 114
       getAllDoctorList().then(response=>{
98 115
         if(response.data.state == 1){
99 116
                var doctor =  response.data.data.doctor
100
-               
117
+
101 118
                this.doctorList = doctor
102 119
              }
103
-         })   
120
+         })
104 121
      },
105 122
 
106 123
       getDoctor(id){
@@ -194,7 +211,7 @@ export default {
194 211
             }
195 212
               addtotal =  Math.floor(addtotal * 100) / 100
196 213
         }
197
-       
214
+
198 215
        }
199 216
 
200 217
       for (let i = 0; i < this.prescriptions.length; i++) {
@@ -204,7 +221,7 @@ export default {
204 221
                 total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
205 222
               }
206 223
             }
207
-          
224
+
208 225
             if (this.prescriptions[i].additionalcharge != null) {
209 226
               for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
210 227
                 addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
@@ -216,7 +233,7 @@ export default {
216 233
 
217 234
         return total + addtotal
218 235
       },
219
-      
236
+
220 237
      getProjectName(id){
221 238
         var project_name = ""
222 239
         for(let i=0;i<this.projectList.length;i++){
@@ -245,7 +262,7 @@ export default {
245 262
       this.getHisPatientDetail()
246 263
       var xtuser = this.$store.getters.xt_user;
247 264
       this.orgname = xtuser.org.org_name;
248
-     
265
+
249 266
    },
250 267
    watch:{
251 268
      ids:function(val){
@@ -260,7 +277,7 @@ export default {
260 277
 <style lang="scss" scoped>
261 278
 .prescription-print{
262 279
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
263
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
280
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
264 281
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
265 282
     margin-bottom: 20px;
266 283
     padding:20px 10px;
@@ -320,7 +337,7 @@ export default {
320 337
 }
321 338
 .actionBar{
322 339
     display: flex;
323
-    justify-content: space-between; 
340
+    justify-content: space-between;
324 341
     line-height: 24px;
325 342
     padding:0 10px;
326 343
 }

+ 18 - 1
src/xt_pages/outpatientDoctorStation/template/printOne.vue Voir le fichier

@@ -9,7 +9,7 @@
9 9
                 <span v-if="item.patient.gender == 1">男</span>
10 10
                 <span v-if="item.patient.gender == 2">女</span>
11 11
               </p>
12
-              <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
12
+              <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
13 13
           </div>
14 14
           <div class="infoMain">
15 15
               <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
@@ -92,6 +92,23 @@ export default {
92 92
       }
93 93
     },
94 94
    methods:{
95
+     getAge(patient){
96
+       var thisLen = patient.id_card_no.length
97
+       var birth = ''
98
+       if (thisLen == 15) {
99
+         birth = '19' + patient.id_card_no.substr(6, 6)
100
+       } else {
101
+         birth = patient.id_card_no.substr(6, 8)
102
+       }
103
+       var births =
104
+         birth.substr(0, 4) +
105
+         '-' +
106
+         birth.substr(4, 2) +
107
+         '-' +
108
+         birth.substr(6, 2)
109
+       return jsGetAge(births, '-')
110
+
111
+     },
95 112
 
96 113
      getAllDoctorList(){
97 114
       getAllDoctorList().then(response=>{

+ 37 - 20
src/xt_pages/outpatientDoctorStation/template/printThree.vue Voir le fichier

@@ -22,7 +22,7 @@
22 22
                 <span v-if="item.patient.gender == 1">男</span>
23 23
                 <span v-if="item.patient.gender == 2">女</span>
24 24
               </div>
25
-              <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
25
+              <div>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</div>
26 26
           </div>
27 27
           <div class="infoMain">
28 28
               <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line" v-if="hisPatient.number">{{hisPatient.number?hisPatient.number:""}}</span></div>
@@ -45,7 +45,7 @@
45 45
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
46 46
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
47 47
               </div>
48
-              
48
+
49 49
               <!-- <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
50 50
                   <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
51 51
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
@@ -86,10 +86,10 @@
86 86
           <div style="page-break-after:always"></div>
87 87
       </div>
88 88
     </div>
89
-    
89
+
90 90
   </div>
91 91
 </div>
92
-    
92
+
93 93
 </template>
94 94
 <script>
95 95
 import { jsGetAge, uParseTime } from '@/utils/tools'
@@ -101,7 +101,7 @@ export default {
101 101
       record_date:String,
102 102
       prescription_id:Number,
103 103
       ids:String
104
-    }, 
104
+    },
105 105
     data(){
106 106
       return {
107 107
         doctorList:[],
@@ -120,15 +120,32 @@ export default {
120 120
       }
121 121
     },
122 122
    methods:{
123
-     
123
+     getAge(patient){
124
+       var thisLen = patient.id_card_no.length
125
+       var birth = ''
126
+       if (thisLen == 15) {
127
+         birth = '19' + patient.id_card_no.substr(6, 6)
128
+       } else {
129
+         birth = patient.id_card_no.substr(6, 8)
130
+       }
131
+       var births =
132
+         birth.substr(0, 4) +
133
+         '-' +
134
+         birth.substr(4, 2) +
135
+         '-' +
136
+         birth.substr(6, 2)
137
+       return jsGetAge(births, '-')
138
+
139
+     },
140
+
124 141
      getAllDoctorList(){
125 142
       getAllDoctorList().then(response=>{
126 143
         if(response.data.state == 1){
127 144
                var doctor =  response.data.data.doctor
128
-               
145
+
129 146
                this.doctorList = doctor
130 147
              }
131
-         })   
148
+         })
132 149
      },
133 150
 
134 151
       getDoctor(id){
@@ -171,11 +188,11 @@ export default {
171 188
             var projectlist =  response.data.data.projectlist
172 189
             console.log("所有项目列表",projectlist)
173 190
             this.projectList = projectlist
174
-            
191
+
175 192
             let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
176 193
             this.faber = outputlist1Name
177 194
 
178
-            
195
+
179 196
           }
180 197
        })
181 198
      },
@@ -228,7 +245,7 @@ export default {
228 245
             }
229 246
               addtotal =  Math.floor(addtotal * 100) / 100
230 247
         }
231
-       
248
+
232 249
        }
233 250
 
234 251
       for (let i = 0; i < this.prescriptions.length; i++) {
@@ -238,7 +255,7 @@ export default {
238 255
                 total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
239 256
               }
240 257
             }
241
-          
258
+
242 259
             if (this.prescriptions[i].additionalcharge != null) {
243 260
               for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
244 261
                 addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
@@ -250,7 +267,7 @@ export default {
250 267
 
251 268
         return total + addtotal
252 269
       },
253
-      
270
+
254 271
      getProjectName(id){
255 272
         var project_name = ""
256 273
         for(let i=0;i<this.projectList.length;i++){
@@ -271,7 +288,7 @@ export default {
271 288
           // if(id == this.diagnoses[i].id){
272 289
           //    name = this.diagnoses[i].class_name
273 290
           // }
274
-          
291
+
275 292
           if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
276 293
             // name += diagnoses[i].class_name + ' '
277 294
             nameArr.push(this.diagnoses[i].class_name)
@@ -281,7 +298,7 @@ export default {
281 298
         nameArr.map((item,index) => {
282 299
           if(item == '尿毒症'){
283 300
             newNameArr.push(item)
284
-            nameArr.splice(index,1,'') 
301
+            nameArr.splice(index,1,'')
285 302
           }
286 303
         })
287 304
         newNameArr.push(...nameArr)
@@ -305,7 +322,7 @@ export default {
305 322
             this.page = 1
306 323
             arr.push(item.advices.length)
307 324
             item.pageArr.push(arr)
308
-            
325
+
309 326
           }else if(item.advices.length > 5){
310 327
             this.page = parseInt(item.advices.length / 5)
311 328
             let num = item.advices.length % 5
@@ -398,11 +415,11 @@ export default {
398 415
       this.getPrescriptionPrint()
399 416
       this.getAllDoctorList()
400 417
       this.getInitData()
401
-      
418
+
402 419
       this.getHisPatientDetail()
403 420
       var xtuser = this.$store.getters.xt_user;
404 421
       this.orgname = xtuser.org.org_name;
405
-     
422
+
406 423
    },
407 424
    watch:{
408 425
      ids:function(val){
@@ -418,7 +435,7 @@ export default {
418 435
 <style lang="scss" scoped>
419 436
 .prescription-print{
420 437
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
421
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
438
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
422 439
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
423 440
     margin-bottom: 20px;
424 441
     padding:20px 10px;
@@ -476,7 +493,7 @@ export default {
476 493
 }
477 494
 .actionBar{
478 495
     display: flex;
479
-    justify-content: space-between; 
496
+    justify-content: space-between;
480 497
     line-height: 24px;
481 498
     padding:0 10px;
482 499
 }

+ 26 - 9
src/xt_pages/outpatientDoctorStation/template/printTwo.vue Voir le fichier

@@ -7,7 +7,7 @@
7 7
                <span v-if="patient.gender == 1">男</span>
8 8
                <span v-if="patient.gender == 2">女</span>
9 9
             </p>
10
-            <p>年龄:{{patient.age}}岁</p>
10
+            <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
11 11
         </div>
12 12
         <div class="infoMain">
13 13
             <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
@@ -24,7 +24,7 @@
24 24
                 <div style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></div>
25 25
             </div>
26 26
 
27
-            
27
+
28 28
         </div>
29 29
         <div class="doctorBox">
30 30
             <p>医师:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
@@ -48,7 +48,7 @@ export default {
48 48
       patient_id:Number,
49 49
       record_date:String,
50 50
       prescription_id:Number
51
-    }, 
51
+    },
52 52
     data(){
53 53
       return {
54 54
         doctorList:[],
@@ -62,15 +62,32 @@ export default {
62 62
       }
63 63
     },
64 64
    methods:{
65
-     
65
+     getAge(patient){
66
+       var thisLen = patient.id_card_no.length
67
+       var birth = ''
68
+       if (thisLen == 15) {
69
+         birth = '19' + patient.id_card_no.substr(6, 6)
70
+       } else {
71
+         birth = patient.id_card_no.substr(6, 8)
72
+       }
73
+       var births =
74
+         birth.substr(0, 4) +
75
+         '-' +
76
+         birth.substr(4, 2) +
77
+         '-' +
78
+         birth.substr(6, 2)
79
+       return jsGetAge(births, '-')
80
+
81
+     },
82
+
66 83
      getAllDoctorList(){
67 84
       getAllDoctorList().then(response=>{
68 85
         if(response.data.state == 1){
69 86
                var doctor =  response.data.data.doctor
70
-               
87
+
71 88
                this.doctorList = doctor
72 89
              }
73
-         })   
90
+         })
74 91
      },
75 92
 
76 93
       getDoctor(id){
@@ -104,7 +121,7 @@ export default {
104 121
             console.log("patient",patient)
105 122
             this.patient = patient
106 123
             var doctorPorject = response.data.data.doctorPorject
107
-          
124
+
108 125
             var arr = doctorPorject.project
109 126
               console.log("我的中谷歌",arr)
110 127
             for(let i=0;i<arr.length;i++){
@@ -134,7 +151,7 @@ export default {
134 151
        getInitData().then(response=>{
135 152
           if(response.data.state == 1){
136 153
             this.department = response.data.data.department
137
-           
154
+
138 155
           }
139 156
        })
140 157
      },
@@ -221,7 +238,7 @@ export default {
221 238
 }
222 239
 .actionBar{
223 240
     display: flex;
224
-    justify-content: space-between; 
241
+    justify-content: space-between;
225 242
     line-height: 24px;
226 243
     padding:0 10px;
227 244
 }

+ 18 - 1
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue Voir le fichier

@@ -28,7 +28,7 @@
28 28
                     <span v-if="item.patient.gender == 2">女</span>
29 29
                 </div>
30 30
                 <div style="margin-bottom: 10px;width:25%">年龄:
31
-                    <span>{{item.patient.age}}</span>
31
+                    <span>{{getAge(item.patient)?getAge(item.patient):""}}</span>
32 32
                 </div>
33 33
                 <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}
34 34
                 </div>
@@ -257,6 +257,23 @@
257 257
       }
258 258
     },
259 259
     methods: {
260
+      getAge(patient){
261
+        var thisLen = patient.id_card_no.length
262
+        var birth = ''
263
+        if (thisLen == 15) {
264
+          birth = '19' + patient.id_card_no.substr(6, 6)
265
+        } else {
266
+          birth = patient.id_card_no.substr(6, 8)
267
+        }
268
+        var births =
269
+          birth.substr(0, 4) +
270
+          '-' +
271
+          birth.substr(4, 2) +
272
+          '-' +
273
+          birth.substr(6, 2)
274
+        return jsGetAge(births, '-')
275
+
276
+      },
260 277
       printThisPage() {
261 278
         var ptime = Math.round(new Date().getTime() / 1000)
262 279
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')

+ 23 - 6
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue Voir le fichier

@@ -20,7 +20,7 @@
20 20
             <span v-if="item.patient.gender == 1">男</span>
21 21
             <span v-if="item.patient.gender == 2">女</span>
22 22
             </div>
23
-            <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
23
+            <div>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</div>
24 24
         </div>
25 25
         <div class="infoMain">
26 26
             <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
@@ -238,6 +238,23 @@ export default {
238 238
       }
239 239
     },
240 240
    methods:{
241
+     getAge(patient){
242
+       var thisLen = patient.id_card_no.length
243
+       var birth = ''
244
+       if (thisLen == 15) {
245
+         birth = '19' + patient.id_card_no.substr(6, 6)
246
+       } else {
247
+         birth = patient.id_card_no.substr(6, 8)
248
+       }
249
+       var births =
250
+         birth.substr(0, 4) +
251
+         '-' +
252
+         birth.substr(4, 2) +
253
+         '-' +
254
+         birth.substr(6, 2)
255
+       return jsGetAge(births, '-')
256
+
257
+     },
241 258
      printThisPage() {
242 259
       var ptime = Math.round(new Date().getTime() / 1000);
243 260
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
@@ -398,14 +415,14 @@ export default {
398 415
         let newIds = ids.split(',').sort(function(a,b){
399 416
           return a-b;
400 417
         })
401
-        
418
+
402 419
         var name = ""
403 420
         let nameArr = []
404 421
         for(let i=0;i<this.diagnoses.length;i++){
405 422
           // if(id == this.diagnoses[i].id){
406 423
           //    name = this.diagnoses[i].class_name
407 424
           // }
408
-          
425
+
409 426
           if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
410 427
             // name += diagnoses[i].class_name + ' '
411 428
             nameArr.push(this.diagnoses[i].class_name)
@@ -415,7 +432,7 @@ export default {
415 432
         nameArr.map((item,index) => {
416 433
           if(item == '尿毒症'){
417 434
             newNameArr.push(item)
418
-            nameArr.splice(index,1,'') 
435
+            nameArr.splice(index,1,'')
419 436
           }
420 437
         })
421 438
         newNameArr.push(...nameArr)
@@ -528,7 +545,7 @@ export default {
528 545
 <style lang="scss" scoped>
529 546
 .prescription-print{
530 547
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
531
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
548
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
532 549
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
533 550
     margin-bottom: 20px;
534 551
     padding:20px 10px;
@@ -586,7 +603,7 @@ export default {
586 603
 }
587 604
 .actionBar{
588 605
     display: flex;
589
-    justify-content: space-between; 
606
+    justify-content: space-between;
590 607
     line-height: 24px;
591 608
     padding:0 10px;
592 609
 }