Browse Source

打印单

XMLWAN 4 years ago
parent
commit
8ddc2a4b2a

+ 1 - 0
src/api/advice.js View File

363
 }
363
 }
364
 
364
 
365
 export function CreateNewDoctorAdvice(id, advice, mode) {
365
 export function CreateNewDoctorAdvice(id, advice, mode) {
366
+
366
   return request({
367
   return request({
367
     url: "/api/patients/advice/create?id=" + id + "&mode=" + mode,
368
     url: "/api/patients/advice/create?id=" + id + "&mode=" + mode,
368
     method: "post",
369
     method: "post",

+ 4 - 2
src/api/dialysis_record.js View File

47
   })
47
   })
48
 }
48
 }
49
 
49
 
50
-export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode,washpipe_nurse,change_nurse) {
50
+export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode,washpipe_nurse,change_nurse,difficult_puncture_nurse,new_fistula_nurse) {
51
   var params = {
51
   var params = {
52
     patient_id: patient_id,
52
     patient_id: patient_id,
53
     date: schedule_date,
53
     date: schedule_date,
59
     schedual_type: schedual_type,
59
     schedual_type: schedual_type,
60
     mode: mode,
60
     mode: mode,
61
     washpipe_nurse:washpipe_nurse,
61
     washpipe_nurse:washpipe_nurse,
62
-    change_nurse:change_nurse
62
+    change_nurse:change_nurse,
63
+    difficult_puncture_nurse:difficult_puncture_nurse,
64
+    new_fistula_nurse:new_fistula_nurse
63
   }
65
   }
64
   console.log("params",params)
66
   console.log("params",params)
65
   return request({
67
   return request({

+ 44 - 44
src/router/modules/dialysis.js View File

67
         noCache: true
67
         noCache: true
68
       }
68
       }
69
     },
69
     },
70
-    // {
71
-    //   path: '/dialysis/consumableDrugs_print',
72
-    //   component: () => import('@/xt_pages/dialysis/consumableDrugs_print'),
73
-    //   hidden: true,
74
-    //   is_menu: false,
75
-    //   name: 'consumableDrugs_print',
76
-    //   meta: {
77
-    //     title: 'consumableDrugs_print',
78
-    //     noCache: true
79
-    //   }
80
-    // },
81
-    // {
82
-    //   path: '/dialysis/dialysisDrugs_print',
83
-    //   component: () => import('@/xt_pages/dialysis/dialysisDrugs_print'),
84
-    //   hidden: true,
85
-    //   is_menu: false,
86
-    //   name: 'dialysisDrugs_print',
87
-    //   meta: {
88
-    //     title: 'dialysisDrugs_print',
89
-    //     noCache: true
90
-    //   }
91
-    // },
92
-    // {
93
-    //   path: '/dialysis/dialysisParameters_print',
94
-    //   component: () => import('@/xt_pages/dialysis/dialysisParameters_print'),
95
-    //   hidden: true,
96
-    //   is_menu: false,
97
-    //   name: 'dialysisParameters_print',
98
-    //   meta: {
99
-    //     title: 'dialysisParameters_print',
100
-    //     noCache: true
101
-    //   }
102
-    // },
103
-    // {
104
-    //   path: '/dialysis/allSummary_print',
105
-    //   component: () => import('@/xt_pages/dialysis/allSummary_print'),
106
-    //   hidden: true,
107
-    //   is_menu: false,
108
-    //   name: 'allSummary_print',
109
-    //   meta: {
110
-    //     title: 'allSummary_print',
111
-    //     noCache: true
112
-    //   }
113
-    // },
70
+    {
71
+      path: '/dialysis/consumableDrugs_print',
72
+      component: () => import('@/xt_pages/dialysis/consumableDrugs_print'),
73
+      hidden: true,
74
+      is_menu: false,
75
+      name: 'consumableDrugs_print',
76
+      meta: {
77
+        title: 'consumableDrugs_print',
78
+        noCache: true
79
+      }
80
+    },
81
+    {
82
+      path: '/dialysis/dialysisDrugs_print',
83
+      component: () => import('@/xt_pages/dialysis/dialysisDrugs_print'),
84
+      hidden: true,
85
+      is_menu: false,
86
+      name: 'dialysisDrugs_print',
87
+      meta: {
88
+        title: 'dialysisDrugs_print',
89
+        noCache: true
90
+      }
91
+    },
92
+    {
93
+      path: '/dialysis/dialysisParameters_print',
94
+      component: () => import('@/xt_pages/dialysis/dialysisParameters_print'),
95
+      hidden: true,
96
+      is_menu: false,
97
+      name: 'dialysisParameters_print',
98
+      meta: {
99
+        title: 'dialysisParameters_print',
100
+        noCache: true
101
+      }
102
+    },
103
+    {
104
+      path: '/dialysis/allSummary_print',
105
+      component: () => import('@/xt_pages/dialysis/allSummary_print'),
106
+      hidden: true,
107
+      is_menu: false,
108
+      name: 'allSummary_print',
109
+      meta: {
110
+        title: 'allSummary_print',
111
+        noCache: true
112
+      }
113
+    },
114
     {
114
     {
115
       path: '/dialysis/record/:id',
115
       path: '/dialysis/record/:id',
116
       component: () => import('@/xt_pages/dialysis/dialysisPage'),
116
       component: () => import('@/xt_pages/dialysis/dialysisPage'),

+ 2 - 2
src/router/modules/qcd.js View File

233
       }
233
       }
234
     },
234
     },
235
     {
235
     {
236
-      path: '/qcd/workAnalysis/doctor',
237
-      component: () => import('@/xt_pages/qcd/workAnalysis/doctor'),
236
+      path: '/qcd/workAnalysis/index',
237
+      component: () => import('@/xt_pages/qcd/workAnalysis/index'),
238
       name: 'workAnalysisDoctor',
238
       name: 'workAnalysisDoctor',
239
       meta: {
239
       meta: {
240
         title: '工作量分析统计',
240
         title: '工作量分析统计',

+ 4 - 1
src/xt_pages/dialysis/PatientBox.vue View File

54
       </div>
54
       </div>
55
       <div class="dislysisInfo">
55
       <div class="dislysisInfo">
56
         <p>体重(前/后kg):{{ schedule.assessment_before_dislysis ? schedule.assessment_before_dislysis.weight_before : '' }}/{{ schedule.assessment_after_dislysis ? schedule.assessment_after_dislysis.weight_after : '' }}</p>
56
         <p>体重(前/后kg):{{ schedule.assessment_before_dislysis ? schedule.assessment_before_dislysis.weight_before : '' }}/{{ schedule.assessment_after_dislysis ? schedule.assessment_after_dislysis.weight_after : '' }}</p>
57
-        <p>目标超滤量:{{ schedule.prescription ? schedule.prescription.target_ultrafiltration : '' }}</p>
57
+        <p>目标超滤量:{{ schedule.prescription ? schedule.prescription.target_ultrafiltration : '' }}
58
+       
59
+        </p>
58
         <p :title="schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : ''">透析器/灌流器:{{ schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : '' }}</p>
60
         <p :title="schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : ''">透析器/灌流器:{{ schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : '' }}</p>
59
       </div>
61
       </div>
60
       <div class="function" :class="functionColor(schedule)" :id="modeColor(schedule.mode_id)">
62
       <div class="function" :class="functionColor(schedule)" :id="modeColor(schedule.mode_id)">
124
 </template>
126
 </template>
125
 
127
 
126
 <script>
128
 <script>
129
+
127
 import { parseTime } from "@/utils";
130
 import { parseTime } from "@/utils";
128
 import { jsGetAge } from "@/utils/tools";
131
 import { jsGetAge } from "@/utils/tools";
129
 import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
132
 import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";

+ 2 - 2
src/xt_pages/dialysis/consumableDrugs.vue View File

8
                 <el-tab-pane label="透析耗材" name="1">
8
                 <el-tab-pane label="透析耗材" name="1">
9
                     <consumables></consumables>
9
                     <consumables></consumables>
10
                 </el-tab-pane>
10
                 </el-tab-pane>
11
-                <el-tab-pane label="透析药品" name="second">
11
+                <!-- <el-tab-pane label="透析药品" name="second">
12
                     <dialysis-drugs></dialysis-drugs>
12
                     <dialysis-drugs></dialysis-drugs>
13
-                </el-tab-pane>
13
+                </el-tab-pane> -->
14
                 <el-tab-pane label="透析参数" name="2">
14
                 <el-tab-pane label="透析参数" name="2">
15
                     <dialysis-parameters></dialysis-parameters>
15
                     <dialysis-parameters></dialysis-parameters>
16
                 </el-tab-pane>
16
                 </el-tab-pane>

+ 2 - 2
src/xt_pages/dialysis/consumableDrugs_print.vue View File

8
                 <el-tab-pane label="透析耗材" name="first">
8
                 <el-tab-pane label="透析耗材" name="first">
9
                     <consumables></consumables>
9
                     <consumables></consumables>
10
                 </el-tab-pane>
10
                 </el-tab-pane>
11
-                <el-tab-pane label="透析药品" name="second">
11
+                <!-- <el-tab-pane label="透析药品" name="second">
12
                     <dialysis-drugs></dialysis-drugs>
12
                     <dialysis-drugs></dialysis-drugs>
13
-                </el-tab-pane>
13
+                </el-tab-pane> -->
14
                 <el-tab-pane label="透析参数" name="third">
14
                 <el-tab-pane label="透析参数" name="third">
15
                     <dialysis-parameters></dialysis-parameters>
15
                     <dialysis-parameters></dialysis-parameters>
16
                 </el-tab-pane>
16
                 </el-tab-pane>

+ 21 - 3
src/xt_pages/dialysis/details/dialog/computer_dialog.vue View File

39
           </el-select>
39
           </el-select>
40
         </el-form-item>
40
         </el-form-item>
41
 
41
 
42
+
43
+         <el-form-item label="疑难穿刺护士"  v-if="isShowFiled('疑难穿刺护士')">
44
+          <el-select v-model="form.difficult_puncture_nurse" placeholder="请选择疑难穿刺护士">
45
+            <el-option v-for="(admin, index) in adminRoles" :key="index" :value="admin.id" :label="admin.name"></el-option>
46
+          </el-select>
47
+        </el-form-item>
48
+
49
+        <el-form-item label="新开瘘护士"  v-if="isShowFiled('新开瘘护士')">
50
+            <el-select v-model="form.new_fistula_nurse" placeholder="请选择新开瘘护士">
51
+              <el-option v-for="(admin, index) in adminRoles" :key="index" :value="admin.id" :label="admin.name"></el-option>
52
+            </el-select>
53
+        </el-form-item>
54
+
42
      
55
      
43
         <el-form-item label="引血(ml/min)" v-if="template_id == 6">
56
         <el-form-item label="引血(ml/min)" v-if="template_id == 6">
44
           <el-input type="number" v-model="form.blood_drawing" style="width:200px;"></el-input>
57
           <el-input type="number" v-model="form.blood_drawing" style="width:200px;"></el-input>
98
           start_time: '',
111
           start_time: '',
99
           puncture_nurse_id: '',
112
           puncture_nurse_id: '',
100
           blood_drawing: 100,
113
           blood_drawing: 100,
101
-          change_nurse:""
114
+          change_nurse:"",
115
+          difficult_puncture_nurse:"",
116
+          new_fistula_nurse:"",
102
         },
117
         },
103
         schedual_type: 0,
118
         schedual_type: 0,
104
         schedules_type: [
119
         schedules_type: [
154
         this.form.puncture_nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.puncture_nurse
169
         this.form.puncture_nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.puncture_nurse
155
         this.form.washpipe_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.washpipe_nurse
170
         this.form.washpipe_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.washpipe_nurse
156
         this.form.change_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.change_nurse
171
         this.form.change_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.change_nurse
172
+        this.form.difficult_puncture_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id:this.dialysis_order.difficult_puncture_nurse
173
+        this.form.new_fistula_nurse = this.dialysis_order.id ==0?this.$store.getters.xt_user.user.id:this.dialysis_order.new_fistula_nurse
157
         var nowDate = new Date()
174
         var nowDate = new Date()
158
         var nowYear = nowDate.getFullYear()
175
         var nowYear = nowDate.getFullYear()
159
         var nowMonth = nowDate.getMonth() + 1
176
         var nowMonth = nowDate.getMonth() + 1
325
         this.loading = true
342
         this.loading = true
326
         let mode = '1'
343
         let mode = '1'
327
 
344
 
328
-        startDialysis(this.patient_id, parseTime(this.schedule_date, '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time, this.schedual_type, mode,this.form.washpipe_nurse,this.form.change_nurse).then(rs => {
345
+        startDialysis(this.patient_id, parseTime(this.schedule_date, '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time, this.schedual_type, mode,this.form.washpipe_nurse,this.form.change_nurse,this.form.difficult_puncture_nurse,this.form.new_fistula_nurse).then(rs => {
329
           this.loading = false
346
           this.loading = false
330
           var resp = rs.data
347
           var resp = rs.data
331
           if (resp.state == 1) {
348
           if (resp.state == 1) {
356
         ParamsQuery['puncture_nurse'] = this.form.puncture_nurse_id
373
         ParamsQuery['puncture_nurse'] = this.form.puncture_nurse_id
357
         ParamsQuery['washpipe_nurse'] = this.form.washpipe_nurse
374
         ParamsQuery['washpipe_nurse'] = this.form.washpipe_nurse
358
         ParamsQuery['change_nurse'] = this.form.change_nurse
375
         ParamsQuery['change_nurse'] = this.form.change_nurse
359
-
376
+        ParamsQuery['difficult_puncture_nurse'] = this.form.difficult_puncture_nurse
377
+        ParamsQuery['new_fistula_nurse'] = this.form.new_fistula_nurse
360
         ParamsQuery['mode'] = "2"
378
         ParamsQuery['mode'] = "2"
361
         if (this.dialysis_order.creator != this.$store.getters.xt_user.user.id) {
379
         if (this.dialysis_order.creator != this.$store.getters.xt_user.user.id) {
362
           ParamsQuery['mode'] = "3"
380
           ParamsQuery['mode'] = "3"

+ 0 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

1347
             this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
1347
             this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
1348
 
1348
 
1349
 
1349
 
1350
-            this.InnerDialogProps.selected = this.dialysisPrescription.dialyzer_perfusion_apparatus
1351
             this.InnerDialogProps.selected = this.dialysisPrescription.dialyzer_perfusion_apparatus
1350
             this.InnerDialogProps.selected = this.dialysisPrescription.dialyzer_perfusion_apparatus
1352
             this.InnerDialogProps.isShowTextArea = false
1351
             this.InnerDialogProps.isShowTextArea = false
1353
             break
1352
             break

+ 21 - 0
src/xt_pages/dialysis/details/dialysisComputer.vue View File

30
           <label>换药护士 : </label>
30
           <label>换药护士 : </label>
31
           <span class="content">{{ change_nurse }}</span>
31
           <span class="content">{{ change_nurse }}</span>
32
         </li>
32
         </li>
33
+
34
+       <li v-if="isShow('疑难穿刺护士')">
35
+          <label>疑难穿刺护士 : </label>
36
+          <span class="content">{{ difficult_puncture_nurse }}</span>
37
+        </li>
38
+        <li v-if="isShow('新开瘘护士')">
39
+          <label>新开瘘护士 : </label>
40
+          <span class="content">{{ new_fistula_nurse }}</span>
41
+        </li>
33
         <li>
42
         <li>
34
           <label>状态 : </label>
43
           <label>状态 : </label>
35
           <span class="content">{{ stage }}</span>
44
           <span class="content">{{ stage }}</span>
141
           return '-'
150
           return '-'
142
         }
151
         }
143
         return this.admin_map[this.record.change_nurse] == null ? '' : this.admin_map[this.record.change_nurse].name
152
         return this.admin_map[this.record.change_nurse] == null ? '' : this.admin_map[this.record.change_nurse].name
153
+      },
154
+      difficult_puncture_nurse:function(){
155
+        if (this.record.id == 0) {
156
+          return '-'
157
+        }
158
+        return this.admin_map[this.record.difficult_puncture_nurse] == null ? '' : this.admin_map[this.record.difficult_puncture_nurse].name
159
+      },
160
+      new_fistula_nurse:function(){
161
+         if (this.record.id == 0) {
162
+          return '-'
163
+        }
164
+        return this.admin_map[this.record.new_fistula_nurse] == null ? '' : this.admin_map[this.record.new_fistula_nurse].name
144
       }
165
       }
145
     },
166
     },
146
     methods: {
167
     methods: {

+ 163 - 8
src/xt_pages/qcd/workAnalysis/nurse.vue View File

135
               </template>
135
               </template>
136
             </el-table-column>
136
             </el-table-column>
137
 
137
 
138
+            <el-table-column label="换药" align="center">
139
+              <template slot-scope="scope">
140
+                {{scope.row.change_nuser_count?scope.row.change_nuser_count:''}}
141
+
142
+              </template>
143
+            </el-table-column>
144
+
145
+             <el-table-column label="疑难穿刺" align="center">
146
+              <template slot-scope="scope">
147
+                {{scope.row.difficult_nuser_count?scope.row.difficult_nuser_count:''}}
148
+
149
+              </template>
150
+            </el-table-column>
151
+
152
+            <el-table-column label="开瘘" align="center">
153
+              <template slot-scope="scope">
154
+                {{scope.row.new_nuser_count?scope.row.new_nuser_count:''}}
155
+
156
+              </template>
157
+            </el-table-column>
158
+
159
+            <el-table-column label="上机" align="center" width="300">
160
+              <template slot-scope="scope">
161
+                {{scope.row.start_nuser_count?scope.row.start_nuser_count:''}}
162
+                <span v-if="getTotalCount(scope.row.admin_user_id)!=''">({{getTotalCount(scope.row.admin_user_id)}})</span>
163
+              </template>
164
+            </el-table-column>
165
+
138
 
166
 
139
             <el-table-column label="宣教/小结" align="center">
167
             <el-table-column label="宣教/小结" align="center">
140
               <template slot-scope="scope">
168
               <template slot-scope="scope">
141
                 {{scope.row.mission_count?scope.row.mission_count:''}}
169
                 {{scope.row.mission_count?scope.row.mission_count:''}}
142
               </template>
170
               </template>
143
             </el-table-column>
171
             </el-table-column>
144
-
172
+             
173
+              <!-- change_nurse_count:total_change_nurse,
174
+                diffcult_nurse_count:total_diffcult_nurse,
175
+                new_fistula_nurse_count:total_new_fistula_nurse,
176
+                start_nurse_count:total_start_nurse, -->
145
             <el-table-column label="合计" align="center">
177
             <el-table-column label="合计" align="center">
146
               <template slot-scope="scope">
178
               <template slot-scope="scope">
147
-                {{scope.row.puncture_count + scope.row.cure_count + scope.row.mission_count ?scope.row.puncture_count  + scope.row.cure_count + scope.row.mission_count:''}}
179
+                {{scope.row.puncture_count + scope.row.cure_count + scope.row.mission_count + scope.row.change_nuser_count+scope.row.difficult_nuser_count+scope.row.new_nuser_count +scope.row.start_nuser_count ?scope.row.puncture_count  + scope.row.cure_count + scope.row.mission_count+scope.row.change_nuser_count+scope.row.difficult_nuser_count+scope.row.new_nuser_count+scope.row.start_nuser_count:''}}
148
               </template>
180
               </template>
149
             </el-table-column>
181
             </el-table-column>
150
           </el-table>
182
           </el-table>
195
           {value:1, name:"治疗"},
227
           {value:1, name:"治疗"},
196
           {value:2, name:"穿刺"},
228
           {value:2, name:"穿刺"},
197
           {value:3, name:"宣教/小结"},
229
           {value:3, name:"宣教/小结"},
230
+          {value:4, name:"换药"},
231
+          {value:5, name:"疑难穿刺"},
232
+          {value:6, name:"开瘘"},
233
+          {value:7, name:"上机"},
198
         ],
234
         ],
199
         crumbs: [
235
         crumbs: [
200
           { path: false, name: "质控管理" },
236
           { path: false, name: "质控管理" },
306
               zoomLock: true // 锁定区域禁止缩放
342
               zoomLock: true // 锁定区域禁止缩放
307
             }
343
             }
308
           ]
344
           ]
309
-        }
345
+        },
346
+        modeList:[],
310
       };
347
       };
311
     },
348
     },
312
     methods: {
349
     methods: {
348
       handleCurrentChange(page) {
385
       handleCurrentChange(page) {
349
         this.query.page = page;
386
         this.query.page = page;
350
         this.GetNurseWorkloadTableData(this.query)
387
         this.GetNurseWorkloadTableData(this.query)
351
-      },GetNurseWorkloadTableData(params) {
388
+      },
389
+      GetNurseWorkloadTableData(params) {
352
         this.loading = true
390
         this.loading = true
353
         this.tableData = []
391
         this.tableData = []
392
+        this.modeList = []
393
+        console.log("params",params)
354
         GetNurseWorkloadTableData(params)
394
         GetNurseWorkloadTableData(params)
355
           .then(rs => {
395
           .then(rs => {
356
             var resp = rs.data
396
             var resp = rs.data
397
+             
357
             if (resp.state == 1) {
398
             if (resp.state == 1) {
399
+            
358
               let total_cure = 0
400
               let total_cure = 0
359
               let total_puncture = 0
401
               let total_puncture = 0
360
               let total_mission = 0
402
               let total_mission = 0
403
+              let total_change_nurse = 0
404
+              let total_diffcult_nurse = 0
405
+              let total_new_fistula_nurse = 0
406
+              let total_start_nurse = 0
361
               this.loading = false
407
               this.loading = false
408
+              
362
               for (let i = 0; i < resp.data.data.length; i++) {
409
               for (let i = 0; i < resp.data.data.length; i++) {
363
                 total_cure = total_cure + resp.data.data[i].cure_count
410
                 total_cure = total_cure + resp.data.data[i].cure_count
364
                 total_puncture = total_puncture + resp.data.data[i].puncture_count
411
                 total_puncture = total_puncture + resp.data.data[i].puncture_count
365
                 total_mission = total_mission + resp.data.data[i].mission_count
412
                 total_mission = total_mission + resp.data.data[i].mission_count
413
+                
414
+                total_change_nurse = total_change_nurse + resp.data.data[i].change_nuser_count
415
+                total_diffcult_nurse = total_diffcult_nurse + resp.data.data[i].difficult_nuser_count
416
+                total_new_fistula_nurse = total_new_fistula_nurse + resp.data.data[i].new_nuser_count
417
+                total_start_nurse = total_start_nurse + resp.data.data[i].start_nuser_count
366
                 this.tableData.push(resp.data.data[i])
418
                 this.tableData.push(resp.data.data[i])
367
-              }
419
+             }
368
               this.tableData.push( {
420
               this.tableData.push( {
369
                 user_name:"合计",
421
                 user_name:"合计",
370
                 cure_count:total_cure,
422
                 cure_count:total_cure,
371
                 puncture_count:total_puncture,
423
                 puncture_count:total_puncture,
372
-                mission_count:total_mission
424
+                mission_count:total_mission,
425
+                change_nuser_count:total_change_nurse,
426
+                difficult_nuser_count:total_diffcult_nurse,
427
+                new_nuser_count:total_new_fistula_nurse,
428
+                start_nuser_count:total_start_nurse,
373
               })
429
               })
430
+             
431
+              var dialysisCount = resp.data.dialysisCount
432
+                console.log("dialysisCount",dialysisCount)
433
+              for(let i=0;i<dialysisCount.length;i++){
434
+                if(dialysisCount[i].mode_id == 1){
435
+                  dialysisCount[i].mode_id = "HD"
436
+                }
437
+                if(dialysisCount[i].mode_id == 2){
438
+                  dialysisCount[i].mode_id = "HDF"
439
+                }
440
+                if(dialysisCount[i].mode_id == 3){
441
+                  dialysisCount[i].mode_id = "HD+HP"
442
+                }
443
+                 if(dialysisCount[i].mode_id == 4){
444
+                  dialysisCount[i].mode_id = "HP"
445
+                }
446
+                 if(dialysisCount[i].mode_id == 5){
447
+                  dialysisCount[i].mode_id = "HF"
448
+                }
449
+                 if(dialysisCount[i].mode_id == 6){
450
+                  dialysisCount[i].mode_id = "SCUF"
451
+                }
452
+                 if(dialysisCount[i].mode_id == 7){
453
+                  dialysisCount[i].mode_id = "IUF"
454
+                }
455
+                 if(dialysisCount[i].mode_id == 8){
456
+                  dialysisCount[i].mode_id = "HFHD"
457
+                }
458
+                 if(dialysisCount[i].mode_id == 9){
459
+                  dialysisCount[i].mode_id = "HFHD+HP"
460
+                }
461
+                 if(dialysisCount[i].mode_id == 10){
462
+                  dialysisCount[i].mode_id = "PHF"
463
+                }
464
+               if(dialysisCount[i].mode_id == 11){
465
+                  dialysisCount[i].mode_id = "HFR"
466
+                }
467
+                if(dialysisCount[i].mode_id == 12){
468
+                  dialysisCount[i].mode_id = "HDF+HP"
469
+                }
470
+                if(dialysisCount[i].mode_id == 13){
471
+                  dialysisCount[i].mode_id = "CRRT"
472
+                }
473
+               if(dialysisCount[i].mode_id == 14){
474
+                  dialysisCount[i].mode_id = "腹水回输"
475
+                }
476
+              }
477
+                let dataInfo = {}
478
+                dialysisCount.forEach((item, index) => {
479
+                let { start_nurse } = item
480
+                  if (!dataInfo[start_nurse]) {
481
+                    dataInfo[start_nurse] = {
482
+                      child: [],
483
+                      start_nurse: item.start_nurse,
484
+                    }
485
+                  }
486
+               })
487
+              let list = Object.values(dataInfo)
488
+              console.log("list222222",list)
489
+              list.map(item=>{
490
+              for(let i=0;i<dialysisCount.length;i++){
491
+                 if(item.start_nurse == dialysisCount[i].start_nurse){
492
+                    item.child.push(dialysisCount[i])
493
+                 }
494
+               }
495
+             })
496
+             console.log("listq23333",list)
497
+             this.modeList.push(...list)
374
             } else {
498
             } else {
375
               this.loading = false
499
               this.loading = false
376
             }
500
             }
398
           this.monthValue = ''
522
           this.monthValue = ''
399
           sessionStorage.setItem("nurse_start_time", val)
523
           sessionStorage.setItem("nurse_start_time", val)
400
           sessionStorage.removeItem("nurseMonth");
524
           sessionStorage.removeItem("nurseMonth");
525
+          
401
           this.GetNurseWorkloadChartData(this.query)
526
           this.GetNurseWorkloadChartData(this.query)
402
           this.GetNurseWorkloadTableData(this.query)
527
           this.GetNurseWorkloadTableData(this.query)
403
 
528
 
404
         }
529
         }
405
 
530
 
406
-      },  GetNurseWorkloadChartData(params) {
531
+      }, 
532
+       GetNurseWorkloadChartData(params) {
407
 
533
 
408
         this.bar.xAxis.data = []
534
         this.bar.xAxis.data = []
409
         this.bar.series[0].data = []
535
         this.bar.series[0].data = []
410
         this.percent = []
536
         this.percent = []
537
+        console.log("parasm",params)
411
         GetNurseWorkloadChartData(params)
538
         GetNurseWorkloadChartData(params)
412
           .then(rs => {
539
           .then(rs => {
413
             var resp = rs.data
540
             var resp = rs.data
541
+            console.log("图标数据",resp)
414
             if (resp.state == 1) {
542
             if (resp.state == 1) {
415
 
543
 
416
               for (let i = 0;  i < resp.data.data.length;i++){
544
               for (let i = 0;  i < resp.data.data.length;i++){
424
                 }else if(this.query.statistics_type == 3){
552
                 }else if(this.query.statistics_type == 3){
425
                   this.bar.series[0].data.push(resp.data.data[i].mission_count)
553
                   this.bar.series[0].data.push(resp.data.data[i].mission_count)
426
                   this.percent.push(resp.data.data[i].mission_ratio)
554
                   this.percent.push(resp.data.data[i].mission_ratio)
555
+                }else if(this.query.statistics_type == 4){
556
+                  this.bar.series[0].data.push(resp.data.data[i].change_nuser_count)
557
+                  this.percent.push(resp.data.data[i].change_nurse_ratio)
558
+                }else if(this.query.statistics_type == 5){
559
+                  this.bar.series[0].data.push(resp.data.data[i].difficult_nuser_count)
560
+                  this.percent.push(resp.data.data[i].difficult_nurse_ratio)
561
+                }else if(this.query.statistics_type == 6){
562
+                  this.bar.series[0].data.push(resp.data.data[i].new_nuser_count)
563
+                  this.percent.push(resp.data.data[i].new_nurse_ratio)
564
+                }else if(this.query.statistics_type == 7){
565
+                  this.bar.series[0].data.push(resp.data.data[i].start_nuser_count)
566
+                  this.percent.push(resp.data.data[i].start_nurse_ratio)
427
                 }
567
                 }
428
               }
568
               }
429
               this.getArrLength(this.bar.xAxis.data)
569
               this.getArrLength(this.bar.xAxis.data)
501
         d = d > 9 ? d : '0' + d;
641
         d = d > 9 ? d : '0' + d;
502
         return y + '-' + m + '-' + d;
642
         return y + '-' + m + '-' + d;
503
       },
643
       },
504
-    },created(){
644
+      getTotalCount(adminuserid){
645
+        console.log("adminuserid",adminuserid)
646
+        console.log("333333",this.modeList)
647
+        var name = ""
648
+        for(let i=0;i<this.modeList.length;i++){
649
+          for(let j=0;j<this.modeList[i].child.length;j++){
650
+            if(adminuserid == this.modeList[i].child[j].start_nurse){
651
+               name += (this.modeList[i].child[j].mode_id+"-"+this.modeList[i].child[j].Count) + "次"+"、"
652
+            }
653
+          }
654
+        }
655
+        console.log("name22222",name)
656
+        return name.substr(0,name.length-1)
657
+      }
658
+    },
659
+    created(){
505
       var date = new Date()
660
       var date = new Date()
506
       var year = date.getFullYear() //获取完整的年份(4位)
661
       var year = date.getFullYear() //获取完整的年份(4位)
507
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
662
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)

+ 11 - 2
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

71
                   :label="item.name"
71
                   :label="item.name"
72
                   :value="item.id">
72
                   :value="item.id">
73
                 </el-option>
73
                 </el-option>
74
+               <!-- <el-option
75
+                  v-for="item,index in getDataConfig('hemodialysis','units')"
76
+                  :key="index"
77
+                  :label="item.name"
78
+                  :value="item.name">
79
+               </el-option> -->
74
               </el-select>
80
               </el-select>
75
             </el-form-item>
81
             </el-form-item>
76
             <el-form-item label="零价 : " prop="retail_price">
82
             <el-form-item label="零价 : " prop="retail_price">
234
 
240
 
235
 
241
 
236
 <script>
242
 <script>
237
-  import { getDictionaryDataConfig } from '@/utils/data'
243
+  import { getDictionaryDataConfig,getDataConfig } from '@/utils/data'
238
 
244
 
239
   export default {
245
   export default {
240
     name: 'goodInfoDailog',
246
     name: 'goodInfoDailog',
339
     methods: {
345
     methods: {
340
       getDictionaryDataConfig(module, filed_name) {
346
       getDictionaryDataConfig(module, filed_name) {
341
         return getDictionaryDataConfig(module, filed_name)
347
         return getDictionaryDataConfig(module, filed_name)
342
-
348
+      },
349
+      getDataConfig(module, filed_name){
350
+        return getDataConfig(module, filed_name)
343
       },
351
       },
344
       show(id,form) {
352
       show(id,form) {
345
         this.visible = true
353
         this.visible = true
456
       visible(val) {
464
       visible(val) {
457
         this.form = this.formValue
465
         this.form = this.formValue
458
         this.good_unit = this.formValue.good_unit
466
         this.good_unit = this.formValue.good_unit
467
+      
459
         if (this.isCreated == 1) {
468
         if (this.isCreated == 1) {
460
           this.good_unit = ''
469
           this.good_unit = ''
461
         }
470
         }

+ 53 - 2
src/xt_pages/stock/detail/cancelStockDetail.vue View File

8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
+    <el-button
12
+      style="float: right;margin-right:10px"
13
+      size="small"
14
+      icon="el-icon-printer"
15
+      @click="exportList"
16
+      type="primary"
17
+      >导出
18
+    </el-button>
11
     <div class="cell clearfix">
19
     <div class="cell clearfix">
12
       <el-input
20
       <el-input
13
         size="small"
21
         size="small"
204
     this.GetCancelStock();
212
     this.GetCancelStock();
205
     this.GetConfigInfo();
213
     this.GetConfigInfo();
206
     this.fetchAllAdminUsers();
214
     this.fetchAllAdminUsers();
215
+    this.goodUnit = this.$store.getters.good_unit
207
   },
216
   },
208
   data() {
217
   data() {
209
     return {
218
     return {
232
       goodInfo: [],
241
       goodInfo: [],
233
       manufacturer: [],
242
       manufacturer: [],
234
       selectedTableData: [],
243
       selectedTableData: [],
235
-      dealer: []
244
+      dealer: [],
245
+      tableList:[],
246
+      goodUnit:[]
236
     };
247
     };
237
   },
248
   },
238
   methods: {
249
   methods: {
331
         order_type: this.order_type,
342
         order_type: this.order_type,
332
         dealer: this.dealer_id
343
         dealer: this.dealer_id
333
       };
344
       };
345
+      
334
       this.cancelStockDate = [];
346
       this.cancelStockDate = [];
335
       getStockDetail(Params).then(response => {
347
       getStockDetail(Params).then(response => {
336
         if (response.data.state == 0) {
348
         if (response.data.state == 0) {
338
           return false;
350
           return false;
339
         } else {
351
         } else {
340
           this.total = response.data.data.total;
352
           this.total = response.data.data.total;
353
+          console.log("数据源头",response.data.data.list)
341
           for (let i = 0; i < response.data.data.list.length; i++) {
354
           for (let i = 0; i < response.data.data.list.length; i++) {
342
             this.cancelStockDate.push(response.data.data.list[i]);
355
             this.cancelStockDate.push(response.data.data.list[i]);
356
+            this.tableList.push(response.data.data.list[i])
343
           }
357
           }
344
         }
358
         }
345
       });
359
       });
540
           });
554
           });
541
         })
555
         })
542
         .catch(() => {});
556
         .catch(() => {});
543
-    }
557
+    },
558
+      exportList(){
559
+     
560
+        for(let i=0;i<this.tableList.length;i++){
561
+          this.tableList[i].index = i+1
562
+          this.tableList[i].drug_name =  this.typeNameOne(this.tableList[i].good_id) 
563
+          this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
564
+          this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
565
+          this.tableList[i].remark = this.tableList[i].GoodInfo.remark
566
+         
567
+        }
568
+       import('@/vendor/Export2Excel').then(excel => {
569
+       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','备注']
570
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','remark']
571
+       
572
+       const data = this.formatJson(filterVal, this.tableList)
573
+       console.log("data",data)
574
+      
575
+        excel.export_json_to_excel({
576
+           header: tHeader,
577
+           data,
578
+           filename: '耗材出库明细'
579
+         })
580
+          this.downloadLoading = false
581
+        })
582
+       },
583
+     formatJson(filterVal, jsonData) {
584
+        return jsonData.map(v => filterVal.map(j => v[j]));
585
+     },
586
+     getUnit(id){
587
+      var name = ""
588
+      for(let i=0;i<this.goodUnit.length;i++){
589
+       if(this.goodUnit[i].id == id){
590
+          name = this.goodUnit[i].name
591
+         }
592
+       }
593
+      return name
594
+     },
544
   }
595
   }
545
 };
596
 };
546
 </script>
597
 </script>

+ 53 - 2
src/xt_pages/stock/detail/salesReturnDetail.vue View File

8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
+
12
+    <el-button
13
+      style="float: right;margin-right:10px"
14
+      size="small"
15
+      icon="el-icon-printer"
16
+      @click="exportList"
17
+      type="primary"
18
+      >导出
19
+    </el-button>
11
     <div class="cell clearfix">
20
     <div class="cell clearfix">
12
       <el-input
21
       <el-input
13
         size="small"
22
         size="small"
206
     this.GetCancelStock();
215
     this.GetCancelStock();
207
     this.GetConfigInfo();
216
     this.GetConfigInfo();
208
     this.fetchAllAdminUsers();
217
     this.fetchAllAdminUsers();
218
+    this.goodUnit = this.$store.getters.good_unit
209
   },
219
   },
210
   data() {
220
   data() {
211
     return {
221
     return {
234
       goodInfo: [],
244
       goodInfo: [],
235
       manufacturer: [],
245
       manufacturer: [],
236
       selectedTableData: [],
246
       selectedTableData: [],
237
-      dealer: []
247
+      dealer: [],
248
+      tableList:[],
249
+      goodUnit:[]
238
     };
250
     };
239
   },
251
   },
240
   methods: {
252
   methods: {
333
         dealer: this.dealer_id
345
         dealer: this.dealer_id
334
       };
346
       };
335
       this.cancelStockDate = [];
347
       this.cancelStockDate = [];
348
+    
336
       getStockDetail(Params).then(response => {
349
       getStockDetail(Params).then(response => {
337
         if (response.data.state == 0) {
350
         if (response.data.state == 0) {
338
           this.$message.error(response.data.msg);
351
           this.$message.error(response.data.msg);
339
           return false;
352
           return false;
340
         } else {
353
         } else {
341
           this.total = response.data.data.total;
354
           this.total = response.data.data.total;
355
+          
342
           for (let i = 0; i < response.data.data.list.length; i++) {
356
           for (let i = 0; i < response.data.data.list.length; i++) {
343
             this.cancelStockDate.push(response.data.data.list[i]);
357
             this.cancelStockDate.push(response.data.data.list[i]);
358
+            this.tableList.push(response.data.data.list[i])
344
           }
359
           }
345
         }
360
         }
346
       });
361
       });
541
           });
556
           });
542
         })
557
         })
543
         .catch(() => {});
558
         .catch(() => {});
544
-    }
559
+    },
560
+    exportList(){
561
+    
562
+      for(let i=0;i<this.tableList.length;i++){
563
+          this.tableList[i].index = i+1
564
+          this.tableList[i].drug_name =  this.typeNameOne(this.tableList[i].good_id) 
565
+          this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
566
+          this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
567
+          this.tableList[i].remark = this.tableList[i].GoodInfo.remark
568
+        }
569
+       import('@/vendor/Export2Excel').then(excel => {
570
+       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','备注']
571
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','remark']
572
+       
573
+       const data = this.formatJson(filterVal, this.tableList)
574
+       console.log("data",data)
575
+       
576
+        excel.export_json_to_excel({
577
+           header: tHeader,
578
+           data,
579
+           filename: '耗材出库明细'
580
+         })
581
+          this.downloadLoading = false
582
+        })
583
+       },
584
+     formatJson(filterVal, jsonData) {
585
+        return jsonData.map(v => filterVal.map(j => v[j]));
586
+     },
587
+     getUnit(id){
588
+      var name = ""
589
+      for(let i=0;i<this.goodUnit.length;i++){
590
+       if(this.goodUnit[i].id == id){
591
+          name = this.goodUnit[i].name
592
+         }
593
+       }
594
+      return name
595
+     },
545
   }
596
   }
546
 };
597
 };
547
 </script>
598
 </script>

+ 89 - 2
src/xt_pages/stock/detail/stockInDetail.vue View File

9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
 
11
 
12
+    <el-button
13
+      style="float: right;margin-right:10px"
14
+      size="small"
15
+      icon="el-icon-printer"
16
+      @click="exportList"
17
+      type="primary"
18
+      >导出
19
+    </el-button>
20
+
12
     <div class="cell clearfix">
21
     <div class="cell clearfix">
13
       <el-input
22
       <el-input
14
         size="small"
23
         size="small"
222
     this.GetCancelStock();
231
     this.GetCancelStock();
223
     this.GetConfigInfo();
232
     this.GetConfigInfo();
224
     this.fetchAllAdminUsers();
233
     this.fetchAllAdminUsers();
234
+    this.goodUnit = this.$store.getters.good_unit
225
   },
235
   },
226
   data() {
236
   data() {
227
     return {
237
     return {
252
       goodInfo: [],
262
       goodInfo: [],
253
       manufacturer: [],
263
       manufacturer: [],
254
       selectedTableData: [],
264
       selectedTableData: [],
255
-      dealer: []
265
+      dealer: [],
266
+      tableList:[],
267
+      goodUnit:[]
256
     };
268
     };
257
   },
269
   },
258
   methods: {
270
   methods: {
320
           this.$message.error(response.data.msg);
332
           this.$message.error(response.data.msg);
321
           return false;
333
           return false;
322
         } else {
334
         } else {
335
+          
323
           this.total = response.data.data.total;
336
           this.total = response.data.data.total;
324
           for (let i = 0; i < response.data.data.list.length; i++) {
337
           for (let i = 0; i < response.data.data.list.length; i++) {
325
             var obj = response.data.data.list[i];
338
             var obj = response.data.data.list[i];
369
           return false;
382
           return false;
370
         } else {
383
         } else {
371
           this.total = response.data.data.total;
384
           this.total = response.data.data.total;
385
+          console.log("数据源头list2222222",response.data.data.list)
386
+
372
           for (let i = 0; i < response.data.data.list.length; i++) {
387
           for (let i = 0; i < response.data.data.list.length; i++) {
373
             var obj = response.data.data.list[i];
388
             var obj = response.data.data.list[i];
374
             obj["is_total"] = 0;
389
             obj["is_total"] = 0;
375
             this.cancelStockDate.push(obj);
390
             this.cancelStockDate.push(obj);
391
+            this.tableList.push(obj)
376
           }
392
           }
377
           this.cancelStockDate.push({
393
           this.cancelStockDate.push({
378
             warehousing_order: "合计",
394
             warehousing_order: "合计",
608
           end_time: this.end_time
624
           end_time: this.end_time
609
         }
625
         }
610
       });
626
       });
611
-    }
627
+    },
628
+    exportList(){
629
+       
630
+     let dataInfo = {}
631
+     this.tableList.forEach((item, index) => {
632
+     let { good_id } = item
633
+     if (!dataInfo[good_id]) {
634
+        dataInfo[good_id] = {
635
+        child: [],
636
+        good_id: item.good_id,
637
+        count:0,
638
+        total:0,
639
+        price:0.0,
640
+        remark:""
641
+      }
642
+      }
643
+     })
644
+     let list = Object.values(dataInfo)
645
+    
646
+     list.map(item=>{
647
+     for(let i=0;i<this.tableList.length;i++){
648
+       if(item.good_id == this.tableList[i].good_id){
649
+           item.child.push(this.tableList[i])
650
+         }
651
+        }
652
+      })
653
+
654
+     for(let k=0;k<list.length;k++){
655
+       for(let z=0;z<list[k].child.length;z++){
656
+          if(list[k].good_id == list[k].child[z].good_id){
657
+             list[k].count += list[k].child[z].warehousing_count
658
+             list[k].price = list[k].child[0].price
659
+             list[k].remark = list[k].child[0].remark
660
+          }
661
+       }
662
+     }
663
+    
664
+      
665
+      for(let i=0;i<list.length;i++){
666
+          list[i].index = i+1
667
+          list[i].drug_name =  this.typeNameOne(list[i].good_id) 
668
+          list[i].drug_spec =  this.specificationName(list[i].good_id)
669
+          list[i].min_unit = this.getUnit(list[i].child[0].GoodInfo.good_unit)
670
+          list[i].total = list[i].price * list[i].count
671
+        }
672
+       import('@/vendor/Export2Excel').then(excel => {
673
+       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
674
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total','remark']
675
+       
676
+       const data = this.formatJson(filterVal, list)
677
+       console.log("data",data)
678
+      
679
+        excel.export_json_to_excel({
680
+           header: tHeader,
681
+           data,
682
+           filename: '耗材入库明细'
683
+         })
684
+          this.downloadLoading = false
685
+        })
686
+       },
687
+     formatJson(filterVal, jsonData) {
688
+        return jsonData.map(v => filterVal.map(j => v[j]));
689
+     },
690
+     getUnit(id){
691
+      var name = ""
692
+      for(let i=0;i<this.goodUnit.length;i++){
693
+       if(this.goodUnit[i].id == id){
694
+          name = this.goodUnit[i].name
695
+         }
696
+       }
697
+      return name
698
+     },
612
   }
699
   }
613
 };
700
 };
614
 </script>
701
 </script>

+ 59 - 2
src/xt_pages/stock/detail/stockOutDetail.vue View File

7
       @click="PrintAction"
7
       @click="PrintAction"
8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
+    </el-button>
11
+     <el-button
12
+      style="float: right;margin-right:10px"
13
+      size="small"
14
+      icon="el-icon-printer"
15
+      @click="exportList"
16
+      type="primary"
17
+      >导出
10
     </el-button>
18
     </el-button>
11
     <div class="cell clearfix">
19
     <div class="cell clearfix">
12
       <el-input
20
       <el-input
216
     this.GetCancelStock();
224
     this.GetCancelStock();
217
     this.GetConfigInfo();
225
     this.GetConfigInfo();
218
     this.fetchAllAdminUsers();
226
     this.fetchAllAdminUsers();
227
+    this.goodUnit = this.$store.getters.good_unit
219
   },
228
   },
220
   data() {
229
   data() {
221
     return {
230
     return {
245
       goodInfo: [],
254
       goodInfo: [],
246
       manufacturer: [],
255
       manufacturer: [],
247
       selectedTableData: [],
256
       selectedTableData: [],
248
-      dealer: []
257
+      dealer: [],
258
+      goodUnit:[],
259
+      tableList:[]
249
     };
260
     };
250
   },
261
   },
251
   methods: {
262
   methods: {
307
       this.cancelStockDate = [];
318
       this.cancelStockDate = [];
308
       getStockDetail(Params).then(response => {
319
       getStockDetail(Params).then(response => {
309
         if (response.data.state == 0) {
320
         if (response.data.state == 0) {
321
+          
310
           this.$message.error(response.data.msg);
322
           this.$message.error(response.data.msg);
311
           return false;
323
           return false;
312
         } else {
324
         } else {
316
             var obj = response.data.data.list[i];
328
             var obj = response.data.data.list[i];
317
             obj["is_total"] = 0;
329
             obj["is_total"] = 0;
318
             this.cancelStockDate.push(obj);
330
             this.cancelStockDate.push(obj);
331
+            this.tableList.push(obj)
319
           }
332
           }
320
           this.cancelStockDate.push({
333
           this.cancelStockDate.push({
321
             warehouse_out_order_number: "合计",
334
             warehouse_out_order_number: "合计",
345
         order_type: this.order_type,
358
         order_type: this.order_type,
346
         dealer: this.dealer_id
359
         dealer: this.dealer_id
347
       };
360
       };
361
+      console.log("parasm334444444",Params)
348
       this.cancelStockDate = [];
362
       this.cancelStockDate = [];
349
       getStockDetail(Params).then(response => {
363
       getStockDetail(Params).then(response => {
350
         if (response.data.state == 0) {
364
         if (response.data.state == 0) {
351
           this.$message.error(response.data.msg);
365
           this.$message.error(response.data.msg);
352
           return false;
366
           return false;
353
         } else {
367
         } else {
368
+          
354
           this.total = response.data.data.total;
369
           this.total = response.data.data.total;
355
          
370
          
356
           for (let i = 0; i < response.data.data.list.length; i++) {
371
           for (let i = 0; i < response.data.data.list.length; i++) {
357
             var obj = response.data.data.list[i];
372
             var obj = response.data.data.list[i];
358
             obj["is_total"] = 0;
373
             obj["is_total"] = 0;
359
             this.cancelStockDate.push(obj);
374
             this.cancelStockDate.push(obj);
375
+            this.tableList.push(obj)
360
           }
376
           }
361
           this.cancelStockDate.push({
377
           this.cancelStockDate.push({
362
             warehouse_out_order_number: "合计",
378
             warehouse_out_order_number: "合计",
366
               warehouse_out_time: 0
382
               warehouse_out_time: 0
367
             }
383
             }
368
           });
384
           });
385
+        
369
         }
386
         }
370
       });
387
       });
371
     },
388
     },
599
           end_time: this.end_time
616
           end_time: this.end_time
600
         }
617
         }
601
       });
618
       });
602
-    }
619
+    },
620
+     exportList(){
621
+     
622
+        for(let i=0;i<this.tableList.length;i++){
623
+          this.tableList[i].index = i+1
624
+          this.tableList[i].drug_name =  this.typeNameOne(this.tableList[i].good_id) 
625
+          this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
626
+          this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
627
+          this.tableList[i].total_price = this.getTotal(this.tableList[i].price,this.tableList[i].count)
628
+         
629
+        }
630
+       import('@/vendor/Export2Excel').then(excel => {
631
+       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
632
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total_price','remark']
633
+       
634
+
635
+      
636
+
637
+       const data = this.formatJson(filterVal, this.tableList)
638
+       console.log("data",data)
639
+       
640
+        excel.export_json_to_excel({
641
+           header: tHeader,
642
+           data,
643
+           filename: '耗材出库明细'
644
+         })
645
+          this.downloadLoading = false
646
+        })
647
+       },
648
+     formatJson(filterVal, jsonData) {
649
+        return jsonData.map(v => filterVal.map(j => v[j]));
650
+     },
651
+     getUnit(id){
652
+      var name = ""
653
+      for(let i=0;i<this.goodUnit.length;i++){
654
+       if(this.goodUnit[i].id == id){
655
+          name = this.goodUnit[i].name
656
+         }
657
+       }
658
+      return name
659
+     },
603
   }
660
   }
604
 };
661
 };
605
 </script>
662
 </script>

+ 35 - 2
src/xt_pages/stock/drugs/components/drugCancelDetail.vue View File

8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
+
12
+    <el-button
13
+      style="float: right;margin-right:10px"
14
+      size="small"
15
+      icon="el-icon-printer"
16
+      @click="exportList"
17
+      type="primary"
18
+      >导出
19
+    </el-button>
11
     <div class="cell clearfix">
20
     <div class="cell clearfix">
12
       <el-input
21
       <el-input
13
         size="small"
22
         size="small"
237
       manufacturer: [],
246
       manufacturer: [],
238
       selectedTableData: [],
247
       selectedTableData: [],
239
       dealer: [],
248
       dealer: [],
240
-      tableData:[]
249
+      tableData:[],
250
+      tableList:[]
241
     };
251
     };
242
   },
252
   },
243
   methods: {
253
   methods: {
350
            var order =  response.data.data.order
360
            var order =  response.data.data.order
351
            console.log("退库详细",order)
361
            console.log("退库详细",order)
352
            this.tableData = order
362
            this.tableData = order
363
+           this.tableList = order
353
            var total = response.data.data.total
364
            var total = response.data.data.total
354
            this.total = total
365
            this.total = total
355
          } 
366
          } 
366
       return name
377
       return name
367
     },
378
     },
368
 
379
 
369
-      getTime: function(val) {
380
+     getTime: function(val) {
370
       if (val == 0) {
381
       if (val == 0) {
371
         return "";
382
         return "";
372
       } else {
383
       } else {
373
         return uParseTime(val, "{y}-{m}-{d}");
384
         return uParseTime(val, "{y}-{m}-{d}");
374
       }
385
       }
375
     },
386
     },
387
+    exportList(){
388
+       for(let i=0;i<this.tableList.length;i++){
389
+          this.tableList[i].index = i+1
390
+        }
391
+       import('@/vendor/Export2Excel').then(excel => {
392
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
393
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
394
+       
395
+       const data = this.formatJson(filterVal, this.tableList)
396
+       console.log("data",data)
397
+       
398
+       excel.export_json_to_excel({
399
+           header: tHeader,
400
+           data,
401
+           filename: '药品退库明细'
402
+         })
403
+          this.downloadLoading = false
404
+        })
405
+       },
406
+     formatJson(filterVal, jsonData) {
407
+        return jsonData.map(v => filterVal.map(j => v[j]));
408
+     },
376
   }
409
   }
377
 };
410
 };
378
 </script>
411
 </script>

+ 33 - 1
src/xt_pages/stock/drugs/components/drugCancelOrder.vue View File

7
       @click="PrintAction"
7
       @click="PrintAction"
8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
+    </el-button>
11
+     <el-button
12
+      style="float: right;margin-right:10px"
13
+      size="small"
14
+      icon="el-icon-printer"
15
+      @click="exportList"
16
+      type="primary"
17
+      >导出
10
     </el-button>
18
     </el-button>
11
     <div class="cell clearfix">
19
     <div class="cell clearfix">
12
       <el-input
20
       <el-input
238
       manufacturer: [],
246
       manufacturer: [],
239
       selectedTableData: [],
247
       selectedTableData: [],
240
       dealer: [],
248
       dealer: [],
241
-      tableData:[]
249
+      tableData:[],
250
+      tableList:[]
242
     };
251
     };
243
   },
252
   },
244
   methods: {
253
   methods: {
393
           var order = response.data.data.order
402
           var order = response.data.data.order
394
           console.log("order",order)
403
           console.log("order",order)
395
           this.tableData = order
404
           this.tableData = order
405
+          this.tableList = order
396
           var total =  response.data.data.total
406
           var total =  response.data.data.total
397
           this.total = total
407
           this.total = total
398
         }
408
         }
415
         return uParseTime(val, "{y}-{m}-{d}");
425
         return uParseTime(val, "{y}-{m}-{d}");
416
       }
426
       }
417
     },
427
     },
428
+    exportList(){
429
+       for(let i=0;i<this.tableList.length;i++){
430
+          this.tableList[i].index = i+1
431
+        }
432
+       import('@/vendor/Export2Excel').then(excel => {
433
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
434
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
435
+       
436
+       const data = this.formatJson(filterVal, this.tableList)
437
+       console.log("data",data)
438
+       
439
+       excel.export_json_to_excel({
440
+           header: tHeader,
441
+           data,
442
+           filename: '药品退货明细'
443
+         })
444
+          this.downloadLoading = false
445
+        })
446
+       },
447
+    formatJson(filterVal, jsonData) {
448
+       return jsonData.map(v => filterVal.map(j => v[j]));
449
+    },
418
   }
450
   }
419
 };
451
 };
420
 </script>
452
 </script>

+ 35 - 2
src/xt_pages/stock/drugs/components/drugInOrder.vue View File

9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
 
11
 
12
+     <el-button
13
+      style="float: right;margin-right:10px"
14
+      size="small"
15
+      icon="el-icon-printer"
16
+      @click="exportList"
17
+      type="primary"
18
+      >导出
19
+    </el-button>
20
+
12
     <div class="cell clearfix">
21
     <div class="cell clearfix">
13
       <el-input
22
       <el-input
14
         size="small"
23
         size="small"
248
       goodInfo: [],
257
       goodInfo: [],
249
       manufacturer: [],
258
       manufacturer: [],
250
       selectedTableData: [],
259
       selectedTableData: [],
251
-      dealer: []
260
+      dealer: [],
261
+      tableList:[],
252
     };
262
     };
253
   },
263
   },
254
   methods: {
264
   methods: {
356
           var drugInOrder = response.data.data.detail
366
           var drugInOrder = response.data.data.detail
357
           console.log("drug3434444",drugInOrder)
367
           console.log("drug3434444",drugInOrder)
358
           this.cancelStockDate = drugInOrder
368
           this.cancelStockDate = drugInOrder
369
+          this.tableList = drugInOrder
359
           var total = response.data.data.total
370
           var total = response.data.data.total
360
           this.total = total
371
           this.total = total
361
         }
372
         }
375
           }
386
           }
376
       }
387
       }
377
       return name
388
       return name
378
-    }
389
+    },
390
+     exportList(){
391
+        for(let i=0;i<this.tableList.length;i++){
392
+          this.tableList[i].index = i+1
393
+        }
394
+       import('@/vendor/Export2Excel').then(excel => {
395
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
396
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','warehousing_count','price','remark']
397
+       
398
+       const data = this.formatJson(filterVal, this.tableList)
399
+       console.log("data",data)
400
+       
401
+        excel.export_json_to_excel({
402
+           header: tHeader,
403
+           data,
404
+           filename: '药品入库明细'
405
+         })
406
+          this.downloadLoading = false
407
+        })
408
+       },
409
+     formatJson(filterVal, jsonData) {
410
+        return jsonData.map(v => filterVal.map(j => v[j]));
411
+     },
379
   }
412
   }
380
 };
413
 };
381
 </script>
414
 </script>

+ 35 - 2
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

7
       @click="PrintAction"
7
       @click="PrintAction"
8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
+    </el-button>
11
+     <el-button
12
+      style="float: right;margin-right:10px"
13
+      size="small"
14
+      icon="el-icon-printer"
15
+      @click="exportList"
16
+      type="primary"
17
+      >导出
10
     </el-button>
18
     </el-button>
11
     <div class="cell clearfix">
19
     <div class="cell clearfix">
12
       <el-input
20
       <el-input
246
       manufacturer: [],
254
       manufacturer: [],
247
       selectedTableData: [],
255
       selectedTableData: [],
248
       dealer: [],
256
       dealer: [],
249
-      tableData:[]
257
+      tableData:[],
258
+      tableList:[]
250
     };
259
     };
251
   },
260
   },
252
   methods: {
261
   methods: {
379
           var order = response.data.data.order
388
           var order = response.data.data.order
380
           console.log("出库数据",order)
389
           console.log("出库数据",order)
381
           this.tableData = order
390
           this.tableData = order
391
+          this.tableList = order
382
           var total = response.data.data.total
392
           var total = response.data.data.total
383
           this.total = total
393
           this.total = total
384
         } 
394
         } 
397
           }
407
           }
398
       }
408
       }
399
       return name
409
       return name
400
-    }
410
+    },
411
+
412
+     exportList(){
413
+        for(let i=0;i<this.tableList.length;i++){
414
+          this.tableList[i].index = i+1
415
+        }
416
+       import('@/vendor/Export2Excel').then(excel => {
417
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
418
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
419
+       
420
+       const data = this.formatJson(filterVal, this.tableList)
421
+       console.log("data",data)
422
+       
423
+       excel.export_json_to_excel({
424
+           header: tHeader,
425
+           data,
426
+           filename: '药品出库明细'
427
+         })
428
+          this.downloadLoading = false
429
+        })
430
+       },
431
+     formatJson(filterVal, jsonData) {
432
+        return jsonData.map(v => filterVal.map(j => v[j]));
433
+     },
401
   }
434
   }
402
 };
435
 };
403
 </script>
436
 </script>

+ 4 - 1
src/xt_pages/stock/stockOutOrder.vue View File

499
           this.$message.error(response.data.msg);
499
           this.$message.error(response.data.msg);
500
           return false;
500
           return false;
501
         } else {
501
         } else {
502
+          console.log("parsm",response.data.data)
502
           this.total = response.data.data.total;
503
           this.total = response.data.data.total;
503
           for (let i = 0; i < response.data.data.list.length; i++) {
504
           for (let i = 0; i < response.data.data.list.length; i++) {
505
+            
504
             this.warehouseOutDate.push(response.data.data.list[i]);
506
             this.warehouseOutDate.push(response.data.data.list[i]);
505
           }
507
           }
508
+          console.log("2222222",this.warehouseOutDate)
506
         }
509
         }
507
       });
510
       });
508
     },
511
     },
562
       } else {
565
       } else {
563
         this.GetWarehouseOut();
566
         this.GetWarehouseOut();
564
       }
567
       }
565
-      this.GetWarehouseOut();
568
+     
566
     },
569
     },
567
     endTimeChange(val) {
570
     endTimeChange(val) {
568
       var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
571
       var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);

+ 14 - 15
src/xt_pages/user/doctorAdvice.vue View File

35
           size="small"
35
           size="small"
36
           @click="printThisInfo()"
36
           @click="printThisInfo()"
37
           :type="
37
           :type="
38
-            adviceType == 1 || adviceType == 3 || adviceType == 2
38
+            adviceType == 1 || adviceType == 3 || adviceType == 2 || adviceType == 4
39
               ? 'primary'
39
               ? 'primary'
40
               : 'warning'
40
               : 'warning'
41
           "
41
           "
153
         >
153
         >
154
           <template slot-scope="scope">
154
           <template slot-scope="scope">
155
             <span v-if="scope.row.advice_type == 1">长嘱</span>
155
             <span v-if="scope.row.advice_type == 1">长嘱</span>
156
-            <span
157
-              v-else-if="
158
-                scope.row.advice_type == 3 || scope.row.advice_type == 2
159
-              "
160
-              >临嘱</span
161
-            >
156
+            <span v-else-if="scope.row.advice_type == 3 || scope.row.advice_type == 2">临嘱</span>
157
+            <span v-else-if="scope.row.advice_type == 4">普通医嘱</span>
162
             <span v-else></span>
158
             <span v-else></span>
163
           </template>
159
           </template>
164
         </el-table-column>
160
         </el-table-column>
584
             </el-col>
580
             </el-col>
585
             <el-col :span="5">
581
             <el-col :span="5">
586
               <el-button
582
               <el-button
587
-                :disabled="
588
-                  $store.getters.xt_user.subscibe.state == 3 ? true : false
589
-                "
583
+                :disabled="$store.getters.xt_user.subscibe.state == 3  ? true : false"
590
                 round
584
                 round
591
                 @click="openAdviceTemplate()"
585
                 @click="openAdviceTemplate()"
592
                 >选择医嘱模板
586
                 >选择医嘱模板
2043
       adviceTypeArr: [
2037
       adviceTypeArr: [
2044
         { value: 0, label: "全部" },
2038
         { value: 0, label: "全部" },
2045
         { value: 1, label: "长期" },
2039
         { value: 1, label: "长期" },
2046
-        { value: 3, label: "临时" }
2040
+        { value: 3, label: "临时" },
2041
+        { value: 4, label: "普通医嘱" },
2047
       ],
2042
       ],
2048
       adviceTypeOptions: [
2043
       adviceTypeOptions: [
2049
         { value: 1, label: "长期" },
2044
         { value: 1, label: "长期" },
2050
-        { value: 3, label: "临时" }
2045
+        { value: 3, label: "临时" },
2046
+        { value: 4,  label: "普通医嘱" },
2051
       ],
2047
       ],
2052
       stopType: 0,
2048
       stopType: 0,
2053
       stopTypeArr: [
2049
       stopTypeArr: [
2324
             mode = "1-2";
2320
             mode = "1-2";
2325
           } else if (this.groupForm.advice_type == 3) {
2321
           } else if (this.groupForm.advice_type == 3) {
2326
             mode = "1-1";
2322
             mode = "1-1";
2323
+          }else if (this.groupForm.advice_type == 4){
2324
+            mode = "1-3"
2327
           }
2325
           }
2328
-        console.log("长期医嘱2222",this.medicals)
2329
         console.log("长期医嘱3333",submitForm)
2326
         console.log("长期医嘱3333",submitForm)
2330
        
2327
        
2331
         if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2328
         if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2593
         this.getAdviceConfig(1);
2590
         this.getAdviceConfig(1);
2594
       } else if (this.groupForm.advice_type == 3) {
2591
       } else if (this.groupForm.advice_type == 3) {
2595
         this.getAdviceConfig(0);
2592
         this.getAdviceConfig(0);
2593
+      }else if(this.groupForm.advice_type == 4){
2594
+        this.getAdviceConfig(0)
2596
       }
2595
       }
2597
 
2596
 
2598
       this.templateForm = { id: "" };
2597
       this.templateForm = { id: "" };
3518
             scanStyles: false
3517
             scanStyles: false
3519
           });
3518
           });
3520
         }, 1);
3519
         }, 1);
3521
-      } else if (this.adviceType == 3 || this.adviceType == 2) {
3520
+      } else if (this.adviceType == 3 || this.adviceType == 2 || this.adviceType == 4) {
3522
         if (this.lstableData.length == 0) {
3521
         if (this.lstableData.length == 0) {
3523
           this.$message.error("请勾选需要打印的医嘱!");
3522
           this.$message.error("请勾选需要打印的医嘱!");
3524
           return false;
3523
           return false;
4372
           var doctoradvice = response.data.data.doctoradvice;
4371
           var doctoradvice = response.data.data.doctoradvice;
4373
           // console.log("doctoradvice", doctoradvice);
4372
           // console.log("doctoradvice", doctoradvice);
4374
           this.dataAdvice = doctoradvice;
4373
           this.dataAdvice = doctoradvice;
4375
-          if (this.adviceType === 3 || this.adviceType === 2) {
4374
+          if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4376
             this.lstableData = this.dataAdvice;
4375
             this.lstableData = this.dataAdvice;
4377
             // console.log("---", this.multipleSelection);
4376
             // console.log("---", this.multipleSelection);
4378
           } else if (this.adviceType === 1) {
4377
           } else if (this.adviceType === 1) {