瀏覽代碼

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

see999 4 年之前
父節點
當前提交
58ac843ae2
共有 27 個文件被更改,包括 1046 次插入181 次删除
  1. 2 2
      config/dev.env.js
  2. 7 7
      src/api/drug/drug.js
  3. 9 0
      src/api/stock.js
  4. 16 0
      src/router/modules/selfPreparedMedicine.js
  5. 7 4
      src/utils/tools.js
  6. 2 1
      src/xt_pages/data/components/project.vue
  7. 29 1
      src/xt_pages/dialysis/details/assessmentBefore.vue
  8. 66 38
      src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue
  9. 1 4
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  10. 3 2
      src/xt_pages/dialysis/details/index.vue
  11. 50 0
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue
  12. 3 1
      src/xt_pages/dialysis/template/dialysisPrintOrderTwelve.vue
  13. 25 22
      src/xt_pages/medicalScheduling/index.vue
  14. 28 22
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  15. 1 1
      src/xt_pages/outpatientCharges/statementPrint.vue
  16. 3 3
      src/xt_pages/outpatientCharges/statementTemplate/printOne.vue
  17. 6 5
      src/xt_pages/outpatientDoctorStation/components/callPrescription.vue
  18. 4 4
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  19. 2 2
      src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue
  20. 7 0
      src/xt_pages/sign/signIn.vue
  21. 147 34
      src/xt_pages/stock/drugs/query.vue
  22. 330 0
      src/xt_pages/stock/selfPreparedMedicine/stockquery.vue
  23. 202 0
      src/xt_pages/stock/selfStockPrint.vue
  24. 48 13
      src/xt_pages/stock/stockOutOrder.vue
  25. 35 9
      src/xt_pages/stock/stockOutOrderDetail.vue
  26. 1 1
      src/xt_pages/stock/stockQuery.vue
  27. 12 5
      src/xt_pages/stock/stockUserDetail.vue

+ 2 - 2
config/dev.env.js 查看文件

6
 module.exports = {
6
 module.exports = {
7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
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"',
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"',
10
   // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  BASE_API: '"http://localhost:9531"',
11
+  // BASE_API: '"http://localhost:9531"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',

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

276
    })
276
    })
277
 }
277
 }
278
 
278
 
279
-// export function toSeachPatient(params){
279
+export function getSelfStockQuery(params){
280
    
280
    
281
-//    return request({
282
-//       url:"/api/drug/toseachpatient",
283
-//       methods:"Get",
284
-//       params:params
285
-//    })
286
-// }
281
+   return request({
282
+      url:"/api/drug/getselfstockquery",
283
+      methods:"get",
284
+      params:params
285
+   })
286
+}

+ 9 - 0
src/api/stock.js 查看文件

574
     method:"get",
574
     method:"get",
575
     params:params
575
     params:params
576
   })
576
   })
577
+}
578
+
579
+export function GetOutStockTotalCount(params){
580
+  
581
+  return request({
582
+    url:"/api/warehouseout/getoutstocktotalcount",
583
+    method:"get",
584
+    params:params
585
+  })
577
 }
586
 }

+ 16 - 0
src/router/modules/selfPreparedMedicine.js 查看文件

12
     isChild: true
12
     isChild: true
13
   },
13
   },
14
   children: [
14
   children: [
15
+    {
16
+      path: '/stock/selfstockquery',
17
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/stockquery'),
18
+      name: 'stockquery',
19
+      meta: { title: '库存查询', noCache: true } 
20
+
21
+    },
22
+
15
     {
23
     {
16
         path: '/stock/selfPreparedMedicineIndex',
24
         path: '/stock/selfPreparedMedicineIndex',
17
         component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
25
         component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
46
       is_menu: false,
54
       is_menu: false,
47
       meta: { title: 'stockprint', noCache: true }
55
       meta: { title: 'stockprint', noCache: true }
48
      },
56
      },
57
+     {
58
+       path:"/stock/selfstockprint",
59
+       component:()=>import('@/xt_pages/stock/selfStockPrint'),
60
+       name:'selfStockQuery',
61
+       hidden:true,
62
+       is_menu:false,
63
+       meta:{title:'selfStockPrint',noCache:true}
64
+     }
49
   ]
65
   ]
50
 }
66
 }

+ 7 - 4
src/utils/tools.js 查看文件

153
 }
153
 }
154
 
154
 
155
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
155
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
156
-  // console.log(type)
157
-  // console.log('首剂', shouji)
158
-  // console.log('总量', shichang)
159
-  // console.log('维持', weichi)
156
+  console.log('类型',type)
157
+  console.log('首剂', shouji)
158
+  console.log('总量', shichang)
159
+  console.log('维持', weichi)
160
 
160
 
161
   var t = 0.5
161
   var t = 0.5
162
   if (type == 1) {
162
   if (type == 1) {
177
 }
177
 }
178
 
178
 
179
 
179
 
180
+
181
+
182
+
180
 export function formatDate (date, format) {
183
 export function formatDate (date, format) {
181
   if (/(y+)/.test(format)) {
184
   if (/(y+)/.test(format)) {
182
       format= format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
185
       format= format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));

+ 2 - 1
src/xt_pages/data/components/project.vue 查看文件

107
               {value:2,label:'否'}
107
               {value:2,label:'否'}
108
             ],
108
             ],
109
             value: '',
109
             value: '',
110
-            limit:20,
110
+            limit:10,
111
             page:1,
111
             page:1,
112
             total:0,
112
             total:0,
113
             tableData: [],
113
             tableData: [],
177
                console.log('projectlist',projecList)
177
                console.log('projectlist',projecList)
178
                this.tableData = projecList
178
                this.tableData = projecList
179
                var total = response.data.data.total
179
                var total = response.data.data.total
180
+               console.log("total-----",total)
180
                this.total = total
181
                this.total = total
181
              }
182
              }
182
           })  
183
           })  

+ 29 - 1
src/xt_pages/dialysis/details/assessmentBefore.vue 查看文件

308
           <span class="content">{{ this.record.special_treatment}}</span>
308
           <span class="content">{{ this.record.special_treatment}}</span>
309
           <span class="unit"></span>
309
           <span class="unit"></span>
310
         </li>
310
         </li>
311
+        
312
+        <li v-if="isShow('血栓')">
313
+          <label>血栓: </label>
314
+          <span class="content" v-if="this.record.thromubus_type == 1">有</span>
315
+          <span class="content" v-if="this.record.thromubus_type == 2">无</span>
316
+          <span class="unit"></span>
317
+        </li>
318
+
319
+         <li v-if="isShow('血栓')">
320
+          <label>导管AV端约为(cm): </label>
321
+          <span class="content">{{this.record.thrombus_av}}</span>
322
+          <span class="unit"></span>
323
+        </li>
324
+       
325
+        <li v-if="isShow('血栓')">
326
+          <label>导管A端约(cm): </label>
327
+          <span class="content">{{this.record.thromubus_a}}</span>
328
+          <span class="unit"></span>
329
+        </li>
330
+
331
+         <li v-if="isShow('血栓')">
332
+          <label>导管V端约(cm): </label>
333
+          <span class="content">{{this.record.thromubus_v}}</span>
334
+          <span class="unit"></span>
335
+        </li>
311
       </ul>
336
       </ul>
312
     </div>
337
     </div>
313
     <div class="note">
338
     <div class="note">
334
       type: Object
359
       type: Object
335
     }
360
     }
336
   },
361
   },
362
+  created(){
363
+    console.log("血栓22222",this.record)
364
+  },
337
   computed: {
365
   computed: {
366
+   
338
     weight_before: function() {
367
     weight_before: function() {
339
       if (this.record.id == 0) {
368
       if (this.record.id == 0) {
340
         return '-'
369
         return '-'
382
         return '-'
411
         return '-'
383
       }
412
       }
384
       return this.record.catheter
413
       return this.record.catheter
385
-      console.log('导管', this.record.catheter)
386
     },
414
     },
387
 
415
 
388
     temperature: function() {
416
     temperature: function() {

+ 66 - 38
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

289
                 <el-option label="是" value="1"></el-option>
289
                 <el-option label="是" value="1"></el-option>
290
                 <el-option label="否" value="2"></el-option>
290
                 <el-option label="否" value="2"></el-option>
291
               </el-select>
291
               </el-select>
292
-
293
-             <!-- <el-select v-model="assessmentBeforeDislysis.is_hemorrhage" placeholder="请选择">
294
-                <el-option
295
-                  v-for="item in hemorrhages"
296
-                  :key="item.value"
297
-                  :label="item.label"
298
-                  :value="item.value">
299
-                </el-option>
300
-              </el-select> -->
301
             </el-form-item>
292
             </el-form-item>
302
           </el-col>
293
           </el-col>
303
 
294
 
310
             </el-form-item>
301
             </el-form-item>
311
           </el-col>
302
           </el-col>
312
 
303
 
304
+
305
+
306
+           <el-col :span="8">
307
+            <el-form-item label="血栓:" v-if="isShow('血栓')">
308
+              <el-select v-model="assessmentBeforeDislysis.thromubus_type" @change="changeThrombus">
309
+                <el-option :key="0" label="请选择" :value="0"></el-option>
310
+                <el-option label="有" value="1"></el-option>
311
+                <el-option label="无" value="2"></el-option>
312
+              </el-select>
313
+            </el-form-item>
314
+          </el-col>
315
+          
316
+          <el-col :span="8">
317
+            <el-form-item label="导管AV端约为(cm):" v-show="thrombuShow" label-width="200px">
318
+              <el-input v-model="assessmentBeforeDislysis.thrombus_av" style="width:150px"></el-input>
319
+            </el-form-item>
320
+          </el-col>
321
+
322
+          <el-col :span="8">
323
+            <el-form-item label="导管A端约(cm):" v-show="thrombuShow">
324
+              <el-input v-model="assessmentBeforeDislysis.thromubus_a" style="width:150px"></el-input>
325
+            </el-form-item>
326
+          </el-col>
327
+
328
+          <el-col :span="8">
329
+            <el-form-item label="导管V端约(cm):" v-show="thrombuShow">
330
+              <el-input v-model="assessmentBeforeDislysis.thromubus_v" style="width:150px"></el-input>
331
+            </el-form-item>
332
+          </el-col>
333
+
313
           <el-col :span="8" v-if="isShow('皮肤')">
334
           <el-col :span="8" v-if="isShow('皮肤')">
314
             <el-form-item label="皮肤: ">
335
             <el-form-item label="皮肤: ">
315
               <!-- <el-select v-model="assessmentBeforeDislysis.skin">
336
               <!-- <el-select v-model="assessmentBeforeDislysis.skin">
525
             </el-form-item>
546
             </el-form-item>
526
           </el-col>
547
           </el-col>
527
 
548
 
549
+         
528
 
550
 
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-          <!-- </el-row>
540
-
541
-
542
-          <el-row :gutter="20"> -->
543
-          <!--<el-col :span="8">-->
544
-          <!--<el-form-item label="穿刺方法: " v-if="isShow('穿刺方法')">-->
545
-
546
-          <!--<el-select v-model="assessmentBeforeDislysis.puncture_method">-->
547
-          <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
548
-
549
-          <!--<el-option v-for="item in puncture_method" :label="item.name" :value="item.name"-->
550
-          <!--:key="item.id"></el-option>-->
551
-          <!--</el-select>-->
552
-
553
-          <!--</el-form-item>-->
554
-          <!--</el-col>-->
555
-
551
+         
552
+      
556
         </el-row>
553
         </el-row>
557
 
554
 
558
 
555
 
704
           edema:'',
701
           edema:'',
705
           special_treatment:'',
702
           special_treatment:'',
706
           catheter_maintenance:"",
703
           catheter_maintenance:"",
704
+          thromubus_type:"",
705
+          thrombus_av:"",
706
+          thromubus_a:"",
707
+          thromubus_v:""
708
+
707
         },
709
         },
708
 
710
 
709
         InnerDialogProps: {
711
         InnerDialogProps: {
718
         puncture_ways: '',
720
         puncture_ways: '',
719
         skins:[],
721
         skins:[],
720
         pinholings:[],
722
         pinholings:[],
721
-        catheter_maintenancelist:[]
723
+        catheter_maintenancelist:[],
724
+        thrombuShow:false
722
       }
725
       }
723
     },
726
     },
724
     props: {
727
     props: {
759
       },
762
       },
760
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
763
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
761
         this.lastPredialysisEvaluation = last_predialysis_evaluation
764
         this.lastPredialysisEvaluation = last_predialysis_evaluation
765
+       
766
+       
767
+        console.log("获取上次数据",this.lastPredialysisEvaluation)
762
         if(this.lastPredialysisEvaluation != null) {
768
         if(this.lastPredialysisEvaluation != null) {
769
+         if(this.lastPredialysisEvaluation.thromubus_type == 1){
770
+          this.assessmentBeforeDislysis.thromubus_type = this.lastPredialysisEvaluation.thromubus_type.toString()
771
+           this.thrombuShow = true
772
+        }
773
+
763
           if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
774
           if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
764
             this.lastPredialysisEvaluation.is_hemorrhage = "1"
775
             this.lastPredialysisEvaluation.is_hemorrhage = "1"
765
           }
776
           }
828
           }
839
           }
829
 
840
 
830
         } else {
841
         } else {
842
+         
843
+     
831
           this.assessmentBeforeDislysis.dry_weight = this.predialysis_evaluation['dry_weight']
844
           this.assessmentBeforeDislysis.dry_weight = this.predialysis_evaluation['dry_weight']
832
           this.weight_adjust.weight = this.predialysis_evaluation['dry_weight']
845
           this.weight_adjust.weight = this.predialysis_evaluation['dry_weight']
833
         }
846
         }
1165
         }).then(res => {
1178
         }).then(res => {
1166
           // console.log(res)
1179
           // console.log(res)
1167
           // console.log('透前', this.patient_prop)
1180
           // console.log('透前', this.patient_prop)
1168
-           console.log('透前', this.assessment)
1181
+          
1169
           if (res.data.state == 0) {
1182
           if (res.data.state == 0) {
1170
             this.hasPermission = false
1183
             this.hasPermission = false
1171
           } else if (res.data.state == 1) {
1184
           } else if (res.data.state == 1) {
1189
             }
1202
             }
1190
           }
1203
           }
1191
         })
1204
         })
1205
+      },
1206
+
1207
+      changeThrombus(val){
1208
+        if(val == 1){
1209
+          this.thrombuShow = true
1210
+        }
1211
+        if(val == 2){
1212
+         this.thrombuShow = false
1213
+        }
1192
       }
1214
       }
1193
     },
1215
     },
1194
     created() {
1216
     created() {
1221
       console.log("针眼",this.pinholings)
1243
       console.log("针眼",this.pinholings)
1222
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1244
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1223
       console.log("导管维护",this.catheter_maintenancelist)
1245
       console.log("导管维护",this.catheter_maintenancelist)
1246
+     
1224
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1247
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1225
 
1248
 
1226
       // if(this.predialysis_evaluation.id == 0){
1249
       // if(this.predialysis_evaluation.id == 0){
1240
 
1263
 
1241
       },
1264
       },
1242
       'predialysis_evaluation.id': function() {
1265
       'predialysis_evaluation.id': function() {
1266
+         
1267
+       if(this.predialysis_evaluation.thromubus_type == 1){
1268
+             this.predialysis_evaluation.thromubus_type = this.predialysis_evaluation.thromubus_type.toString()
1269
+             this.thrombuShow = true
1270
+        }
1243
 
1271
 
1244
         if (this.predialysis_evaluation.id > 0) {
1272
         if (this.predialysis_evaluation.id > 0) {
1245
           for (var index in this.assessmentBeforeDislysis) {
1273
           for (var index in this.assessmentBeforeDislysis) {

+ 1 - 4
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

3237
           parseFloat(dialysis_duration_hour) +
3237
           parseFloat(dialysis_duration_hour) +
3238
           parseFloat(dialysis_duration_minute) / 60
3238
           parseFloat(dialysis_duration_minute) / 60
3239
 
3239
 
3240
-        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
3241
-          1,
3242
-          this.dialysisPrescription.anticoagulant_shouji,
3243
-          duration,
3240
+        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1,this.dialysisPrescription.anticoagulant_shouji,duration,
3244
           this.dialysisPrescription.anticoagulant_weichi
3241
           this.dialysisPrescription.anticoagulant_weichi
3245
         )
3242
         )
3246
         if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
3243
         if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {

+ 3 - 2
src/xt_pages/dialysis/details/index.vue 查看文件

971
         if (resp.state == 1) {
971
         if (resp.state == 1) {
972
           var patient = resp.data.patient // 患者信息
972
           var patient = resp.data.patient // 患者信息
973
           var schedual = resp.data.schedual // 患者排班信息
973
           var schedual = resp.data.schedual // 患者排班信息
974
-          console.log("患者排班信息99999999",schedual)
974
+          // console.log("患者排班信息99999999",schedual)
975
           var prescription = resp.data.prescription // 透析处方
975
           var prescription = resp.data.prescription // 透析处方
976
           if (prescription != null) {
976
           if (prescription != null) {
977
             if (prescription.body_fluid == -2) {
977
             if (prescription.body_fluid == -2) {
983
           var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
983
           var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
984
           // console.log('receiver_treatment_access', receiver_treatment_access)
984
           // console.log('receiver_treatment_access', receiver_treatment_access)
985
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
985
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
986
-          // console.log('透前评估22222', predialysis_evaluation)
986
+         
987
+        
987
 
988
 
988
           if (predialysis_evaluation != null) {
989
           if (predialysis_evaluation != null) {
989
             if (predialysis_evaluation.blood_access_part_id == -2) {
990
             if (predialysis_evaluation.blood_access_part_id == -2) {

+ 50 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue 查看文件

419
                   </tr>
419
                   </tr>
420
                 </tbody>
420
                 </tbody>
421
               </table>
421
               </table>
422
+
423
+              <table class="table-box">
424
+                <tbody>
425
+                  <tr>
426
+                    <td width="70"></td>
427
+                    <td width="40">血栓:</td>
428
+                    <td width="90">
429
+                      <div>
430
+                        <label-box :isChecked="predialysis.thromubus_type == 1?true:false" showValue="有"></label-box>
431
+                        &nbsp;
432
+                        <label-box :isChecked="predialysis.thromubus_type == 2?true:false" showValue="无"></label-box>
433
+                        &nbsp;
434
+                      </div>
435
+                    </td>
436
+                    <td width="10">(</td>
437
+                    <td width="90">导管AV端各约</td>
438
+                    <td width="50">
439
+                      <div class="under-line">
440
+                        &nbsp;
441
+                        <span>
442
+                            {{ predialysis.thrombus_av ? predialysis.thrombus_av : '' }}
443
+                        </span>
444
+                      </div>
445
+                    </td>
446
+                    <td width="10">cm</td>
447
+                    <td width="50">A端约</td>
448
+                     <td width="50">
449
+                      <div class="under-line">
450
+                        &nbsp;
451
+                        <span>
452
+                            {{ predialysis.thromubus_a ? predialysis.thromubus_a : '' }}
453
+                        </span>
454
+                      </div>
455
+                    </td>
456
+                    <td width="10">cm</td>
457
+                    <td width="50">V端约</td>
458
+                     <td width="50">
459
+                      <div class="under-line">
460
+                        &nbsp;
461
+                        <span>
462
+                            {{ predialysis.thromubus_v ? predialysis.thromubus_v : '' }}
463
+                        </span>
464
+                      </div>
465
+                    </td>
466
+                    <td width="10">cm</td>
467
+                    <td width="10">)</td>
468
+                    <td></td>
469
+                  </tr>
470
+                </tbody>
471
+              </table>
422
               <table >
472
               <table >
423
                 <tbody>
473
                 <tbody>
424
                   <tr class="table-box">
474
                   <tr class="table-box">

+ 3 - 1
src/xt_pages/dialysis/template/dialysisPrintOrderTwelve.vue 查看文件

789
               <div>
789
               <div>
790
                 <span style="width:70px;display:inline-block">
790
                 <span style="width:70px;display:inline-block">
791
                   {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : "/" }}
791
                   {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : "/" }}
792
-                </span>ml
792
+                </span>
793
+
794
+                <span>L</span>
793
               </div>
795
               </div>
794
             </td>
796
             </td>
795
             <td width="100" style="border:none;border-left:1px solid #000;padding-left:5px">
797
             <td width="100" style="border:none;border-left:1px solid #000;padding-left:5px">

+ 25 - 22
src/xt_pages/medicalScheduling/index.vue 查看文件

7
                 <el-button type="primary" @click="DeleteStaffSchedule">清除</el-button>
7
                 <el-button type="primary" @click="DeleteStaffSchedule">清除</el-button>
8
                 <el-button type="primary" @click="copyStaffSchedule">复制</el-button>
8
                 <el-button type="primary" @click="copyStaffSchedule">复制</el-button>
9
                 <el-button type="primary" icon="el-icon-printer" @click="toPrint">打印</el-button>
9
                 <el-button type="primary" icon="el-icon-printer" @click="toPrint">打印</el-button>
10
+                <!-- <el-button type="primary" icon="el-icon-printer" @click="toPrint">导出</el-button> -->
10
             </div>
11
             </div>
11
         </div>
12
         </div>
12
         <div class="app-container">
13
         <div class="app-container">
312
                             </el-table>
313
                             </el-table>
313
                         </el-tab-pane>
314
                         </el-tab-pane>
314
                     </el-tabs>
315
                     </el-tabs>
315
-                    <!-- <div style="margin-top:20px;">
316
-                        <p style="line-height:20px;">1.默认科室所有排序在职员工账号</p>
317
-                        <p style="line-height:20px;">2.护士默认排序,按加入机构先后降序排序,最先加入机构的排序为1,显示在列表最下面,自定义排序,最大的序号排在最上面</p>
318
-                        <p style="line-height:20px;">3.职称显示与管理中旬的员工列表显示的职称一样</p>
319
-                        <p style="line-height:20px;">4.是否排班,默认机构所有用户是“是”,如果是否,则该用户不在医护排班列表中</p>
320
-                    </div> -->
316
+                 
321
                 </div>
317
                 </div>
322
-                <!-- <div slot="footer" class="dialog-footer">
323
-                <el-button @click="hide">取 消</el-button>
324
-                <el-button type="primary" @click="submitAction()">保 存</el-button>
325
-                </div> -->
326
-            </el-dialog>
318
+            </el-dialog>    
327
         </div>
319
         </div>
320
+
321
+
322
+        <el-dialog
323
+            title="导出排班"
324
+            :visible.sync="exportDialogVisible"
325
+            width="30%"
326
+            :before-close="handleClose">
327
+            <span>
328
+
329
+            </span>
330
+            <span slot="footer" class="dialog-footer">
331
+                <el-button @click="dialogVisible = false">取 消</el-button>
332
+                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
333
+            </span>
334
+        </el-dialog>    
328
     </div>
335
     </div>
329
 </template>
336
 </template>
330
 
337
 
390
            arrFive:[],
397
            arrFive:[],
391
            arrSix:[],
398
            arrSix:[],
392
            arrSeven:[],
399
            arrSeven:[],
393
-
394
-           //
395
-            nurseVisible:false,
396
-            activeName:'nurse',
397
-            radio:'1',
398
-            nurseTableData:[],
399
-            doctorTableData:[],
400
+           nurseVisible:false,
401
+           activeName:'nurse',
402
+           radio:'1',
403
+           nurseTableData:[],
404
+           doctorTableData:[],
405
+           exportDialogVisible:false
400
         }
406
         }
401
     },
407
     },
402
     methods:{
408
     methods:{
403
         search(){},
409
         search(){},
404
         toPrint(){
410
         toPrint(){
405
-            this.$router.push({
406
-                path: '/medicalScheduling/schedule/print?starttime='+this.getTimestamp(this.weekDayArr[0])+"&endtime="+this.getTimestamp(this.weekDayArr[6])+"&weekArr="+ this.weekDayArr+"&typeValue="+this.typeValue,
407
-                // query: { date: date }
408
-            })
411
+          this.exportDialogVisible = true
409
         },
412
         },
410
         getDoctorList(){
413
         getDoctorList(){
411
             getDoctorList().then(response=>{
414
             getDoctorList().then(response=>{

+ 28 - 22
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

29
           </el-radio-group>
29
           </el-radio-group>
30
         </div>
30
         </div>
31
         <div class="mainCell" style="margin-bottom:10px;">
31
         <div class="mainCell" style="margin-bottom:10px;">
32
-          <el-input size="small" v-model="key" class="filter-item"/>
33
-
32
+          <!--<el-input size="small" v-model="key" class="filter-item"/>-->
34
           <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
33
           <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
35
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
34
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
36
             搜索
35
             搜索
87
           <!--&gt;退号-->
86
           <!--&gt;退号-->
88
           <!--</el-button>-->
87
           <!--</el-button>-->
89
 
88
 
90
-          <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(11)" type="primary"-->
89
+          <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
90
+                     <!--size="small" @click="open(11)" type="primary"-->
91
           <!--&gt;撤销明细-->
91
           <!--&gt;撤销明细-->
92
           <!--</el-button>-->
92
           <!--</el-button>-->
93
 
93
 
96
           <!--&gt;查编码-->
96
           <!--&gt;查编码-->
97
           <!--</el-button>-->
97
           <!--</el-button>-->
98
 
98
 
99
-          <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(13)" type="primary"-->
99
+          <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
100
+                     <!--size="small" @click="open(13)" type="primary"-->
100
           <!--&gt;查待遇-->
101
           <!--&gt;查待遇-->
101
           <!--</el-button>-->
102
           <!--</el-button>-->
102
 
103
 
324
     data() {
325
     data() {
325
       return {
326
       return {
326
         key: "",
327
         key: "",
327
-        other_start_time:"",
328
-        other_end_time:"",
328
+        other_start_time: "",
329
+        other_end_time: "",
329
         crumbs: [
330
         crumbs: [
330
           {path: false, name: '门诊收费'},
331
           {path: false, name: '门诊收费'},
331
           {path: false, name: '门诊收费管理'}
332
           {path: false, name: '门诊收费管理'}
394
       this.getPatientList()
395
       this.getPatientList()
395
     },
396
     },
396
     methods: {
397
     methods: {
397
-      changeTime(val){
398
+      changeTime(val) {
398
         this.other_start_time = val
399
         this.other_start_time = val
399
 
400
 
400
 
401
 
401
-      },changeEndTime(val){
402
+      }, changeEndTime(val) {
402
         this.other_end_time = val
403
         this.other_end_time = val
403
 
404
 
404
 
405
 
405
-
406
       }, chargeConfirm(form) {
406
       }, chargeConfirm(form) {
407
 
407
 
408
         form['id'] = this.patientInfo.id
408
         form['id'] = this.patientInfo.id
409
         form['record_time'] = this.record_date
409
         form['record_time'] = this.record_date
410
-        if(this.activeName == 'first'){
410
+        form['admin_user_id'] = this.$store.getters.xt_user.user.id
411
+
412
+        if (this.activeName == 'first') {
411
           form['settle_accounts_type'] = 1
413
           form['settle_accounts_type'] = 1
412
-        }else {
414
+        } else {
413
           form['start_time'] = this.other_start_time
415
           form['start_time'] = this.other_start_time
414
           form['end_time'] = this.other_end_time
416
           form['end_time'] = this.other_end_time
415
           form['settle_accounts_type'] = 2
417
           form['settle_accounts_type'] = 2
418
+
416
         }
419
         }
417
 
420
 
418
         this.loadingtwo = true
421
         this.loadingtwo = true
468
       },
471
       },
469
       confirm(forms) {
472
       confirm(forms) {
470
         forms['id'] = this.patientInfo.id,
473
         forms['id'] = this.patientInfo.id,
471
-          forms['record_time'] = this.record_date,
472
-          this.loadingone = true
474
+        forms['record_time'] = this.record_date,
475
+        forms['admin_user_id'] = this.$store.getters.xt_user.user.id
476
+        this.loadingone = true
473
 
477
 
474
         if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
478
         if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
475
           var that = this
479
           var that = this
555
                   single_dose: prescription.advices[b].single_dose,
559
                   single_dose: prescription.advices[b].single_dose,
556
                   delivery_way: prescription.advices[b].delivery_way,
560
                   delivery_way: prescription.advices[b].delivery_way,
557
                   execution_frequency: prescription.advices[b].execution_frequency,
561
                   execution_frequency: prescription.advices[b].execution_frequency,
558
-                  retail_price: prescription.advices[b].price.toString(),
562
+                  retail_price: prescription.advices[b].price,
559
                   remark: prescription.advices[b].remark,
563
                   remark: prescription.advices[b].remark,
560
                   day: prescription.advices[b].day,
564
                   day: prescription.advices[b].day,
561
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
565
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
643
         if (this.curPrescriptions.type == 1) {
647
         if (this.curPrescriptions.type == 1) {
644
           if (this.curPrescriptions.advices != null) {
648
           if (this.curPrescriptions.advices != null) {
645
             for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
649
             for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
646
-              total = total + Math.floor((this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number) * 100) / 100
650
+              total = total + (this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
647
 
651
 
648
             }
652
             }
649
           }
653
           }
650
         } else {
654
         } else {
651
           if (this.curPrescriptions.project != null) {
655
           if (this.curPrescriptions.project != null) {
652
             for (let b = 0; b < this.curPrescriptions.project.length; b++) {
656
             for (let b = 0; b < this.curPrescriptions.project.length; b++) {
653
-              total = total + Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
657
+              total = total + (this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
654
 
658
 
655
             }
659
             }
656
           }
660
           }
658
 
662
 
659
         if (this.curPrescriptions.addition != null) {
663
         if (this.curPrescriptions.addition != null) {
660
           for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
664
           for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
661
-            total = total + Math.floor((this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count) * 100) / 100
665
+            total = total + (this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count)
662
           }
666
           }
663
         }
667
         }
664
-        return Math.floor(total * 100) / 100
668
+        return (total * 100) / 100
665
 
669
 
666
       },
670
       },
667
       getTotal() {
671
       getTotal() {
669
         for (let i = 0; i < this.prescriptions.length; i++) {
673
         for (let i = 0; i < this.prescriptions.length; i++) {
670
           if (this.prescriptions[i].advices != null) {
674
           if (this.prescriptions[i].advices != null) {
671
             for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
675
             for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
672
-              total = total + Math.floor((this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number) * 100) / 100
676
+              total = total + (this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number)
673
             }
677
             }
674
           }
678
           }
675
           if (this.prescriptions[i].project != null) {
679
           if (this.prescriptions[i].project != null) {
676
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
680
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
677
 
681
 
678
-              total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
682
+              total = total + (this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
679
             }
683
             }
680
           }
684
           }
681
           if (this.prescriptions[i].addition != null) {
685
           if (this.prescriptions[i].addition != null) {
682
             for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
686
             for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
683
-              total = total + Math.floor((this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count) * 100) / 100
687
+              total = total + (this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count)
684
             }
688
             }
685
           }
689
           }
686
         }
690
         }
687
-        return Math.floor(total * 100) / 100
691
+        return (total * 100) / 100
688
 
692
 
689
       },
693
       },
690
       moreState(tab, event) {
694
       moreState(tab, event) {
734
                 'number': this.order.number,
738
                 'number': this.order.number,
735
                 'patient_id': this.patientInfo.id,
739
                 'patient_id': this.patientInfo.id,
736
                 'record_time': this.record_date,
740
                 'record_time': this.record_date,
741
+                'admin_user_id':this.$store.getters.xt_user.user.id
742
+
737
 
743
 
738
               }
744
               }
739
               axios.get('http://127.0.0.1:9532/api/refund/post', {
745
               axios.get('http://127.0.0.1:9532/api/refund/post', {

+ 1 - 1
src/xt_pages/outpatientCharges/statementPrint.vue 查看文件

150
 
150
 
151
     },
151
     },
152
     getInfo(order_id) {
152
     getInfo(order_id) {
153
-      if (this.$store.getters.xt_user.org_id == 4) {
153
+      if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
154
 
154
 
155
         var that = this
155
         var that = this
156
 
156
 

+ 3 - 3
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue 查看文件

186
             </tr>
186
             </tr>
187
             <tr>
187
             <tr>
188
                 <td>合计</td>
188
                 <td>合计</td>
189
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total + info.operation_cost_total + info.other_cost_total + info.material_cost_total + info.western_medicine_cost_total + info.chinese_traditional_medicine_cost_total + info.check_cost_total + info.laboratory_cost_total + info.treat_cost_total}}</td>
190
-                <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total + info.operation_cost_self_total + info.other_cost_self_total + info.material_cost_self_total + info.western_medicine_cost_self_total + info.chinese_traditional_medicine_cost_self_total + info.check_cost_self_total + info.laboratory_cost_self_total + info.treat_cost_self_total}}</td>
191
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total + info.operation_cost_part_self_total + info.other_cost_part_self_total + info.material_cost_part_self_total + info.western_medicine_cost_part_self_total + info.chinese_traditional_medicine_cost_part_self_total + info.check_cost_part_self_total + info.laboratory_cost_part_self_total + info.treat_cost_part_self_total}}</td>
189
+                <td colspan="2" style="text-align:right;padding-right:10px;">{{(info.bed_cost_total + info.operation_cost_total + info.other_cost_total + info.material_cost_total + info.western_medicine_cost_total + info.chinese_traditional_medicine_cost_total + info.check_cost_total + info.laboratory_cost_total + info.treat_cost_total) * 100 /100 }}</td>
190
+                <td style="text-align:right;padding-right:10px;">{{(info.bed_cost_self_total + info.operation_cost_self_total + info.other_cost_self_total + info.material_cost_self_total + info.western_medicine_cost_self_total + info.chinese_traditional_medicine_cost_self_total + info.check_cost_self_total + info.laboratory_cost_self_total + info.treat_cost_self_total)*100/100}}</td>
191
+                <td colspan="2" style="text-align:right;padding-right:10px;">{{(info.bed_cost_part_self_total + info.operation_cost_part_self_total + info.other_cost_part_self_total + info.material_cost_part_self_total + info.western_medicine_cost_part_self_total + info.chinese_traditional_medicine_cost_part_self_total + info.check_cost_part_self_total + info.laboratory_cost_part_self_total + info.treat_cost_part_self_total)*100/100}}</td>
192
                 <td style="text-align:right;padding-right:10px;"></td>
192
                 <td style="text-align:right;padding-right:10px;"></td>
193
                 <td colspan="2" style="text-align:right;padding-right:10px;"></td>
193
                 <td colspan="2" style="text-align:right;padding-right:10px;"></td>
194
                 <td style="text-align:right;padding-right:10px;"></td>
194
                 <td style="text-align:right;padding-right:10px;"></td>

+ 6 - 5
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue 查看文件

80
             </el-table-column>
80
             </el-table-column>
81
             <el-table-column align="center" prop="retail_price" width="80" label="单价">
81
             <el-table-column align="center" prop="retail_price" width="80" label="单价">
82
               <template slot-scope="scope">
82
               <template slot-scope="scope">
83
-                <div>{{scope.row.retail_price}}</div>
83
+                <div>{{scope.row.price}}</div>
84
               </template>
84
               </template>
85
             </el-table-column>
85
             </el-table-column>
86
             <el-table-column align="center" prop="remark" label="备注">
86
             <el-table-column align="center" prop="remark" label="备注">
131
             </el-table-column>
131
             </el-table-column>
132
             <el-table-column align="center" prop="total" width="70" label="总量">
132
             <el-table-column align="center" prop="total" width="70" label="总量">
133
               <template slot-scope="scope">
133
               <template slot-scope="scope">
134
-                <div>{{ scope.row.total }}{{scope.row.unit}}</div>
134
+                <div>{{ scope.row.count }}{{scope.row.unit}}</div>
135
               </template>
135
               </template>
136
             </el-table-column>
136
             </el-table-column>
137
             <el-table-column align="center" prop="name" width="60" label="单价">
137
             <el-table-column align="center" prop="name" width="60" label="单价">
247
             let tempAddition = []
247
             let tempAddition = []
248
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
248
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
249
               let obj = {
249
               let obj = {
250
-                advice_id: prescription.doctor_advice[b].id,
250
+                advice_id: 0,
251
                 drug_name: prescription.doctor_advice[b].advice_name,
251
                 drug_name: prescription.doctor_advice[b].advice_name,
252
                 single_dose: prescription.doctor_advice[b].single_dose,
252
                 single_dose: prescription.doctor_advice[b].single_dose,
253
                 delivery_way: prescription.doctor_advice[b].delivery_way,
253
                 delivery_way: prescription.doctor_advice[b].delivery_way,
268
 
268
 
269
             for (let b = 0; b < prescription.project.length; b++) {
269
             for (let b = 0; b < prescription.project.length; b++) {
270
               let obj = {
270
               let obj = {
271
-                id: prescription.project[b].id,
271
+                id: 0,
272
                 project_id: prescription.project[b].project_id,
272
                 project_id: prescription.project[b].project_id,
273
                 project_name: prescription.project[b].project.project_name,
273
                 project_name: prescription.project[b].project.project_name,
274
                 statistical_classification: prescription.project[b].project.statistical_classification,
274
                 statistical_classification: prescription.project[b].project.statistical_classification,
276
                 delivery_way: prescription.project[b].delivery_way,
276
                 delivery_way: prescription.project[b].delivery_way,
277
                 execution_frequency: prescription.project[b].execution_frequency,
277
                 execution_frequency: prescription.project[b].execution_frequency,
278
                 number_days: prescription.project[b].day,
278
                 number_days: prescription.project[b].day,
279
-                total:prescription.project[b].count.toString(),
279
+                total:prescription.project[b].count,
280
                 price:prescription.project[b].price,
280
                 price:prescription.project[b].price,
281
                 remark:prescription.project[b].remark,
281
                 remark:prescription.project[b].remark,
282
                 medical_code:prescription.project[b].project.medical_code,
282
                 medical_code:prescription.project[b].project.medical_code,
288
               advices: tempAdvice,
288
               advices: tempAdvice,
289
               project: tempProject,
289
               project: tempProject,
290
               addition:tempAddition,
290
               addition:tempAddition,
291
+              type:prescription.type,
291
               order_status:0,
292
               order_status:0,
292
             }
293
             }
293
             prescriptions.push(obj)
294
             prescriptions.push(obj)

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

90
                 v-model="item.pre_time"
90
                 v-model="item.pre_time"
91
                 type="datetime"
91
                 type="datetime"
92
                 :clearable="false"
92
                 :clearable="false"
93
-                format="yyyy-MM-dd hh:mm"
94
-                value-format="yyyy-MM-dd hh:mm"
93
+                format="yyyy-MM-dd HH:mm"
94
+                value-format="yyyy-MM-dd HH:mm"
95
                 placeholder="选择日期">
95
                 placeholder="选择日期">
96
               </el-date-picker>
96
               </el-date-picker>
97
               <el-date-picker
97
               <el-date-picker
118
                 </el-button>
118
                 </el-button>
119
               </div>
119
               </div>
120
             </div>
120
             </div>
121
-              
121
+
122
 
122
 
123
             </el-tab-pane>
123
             </el-tab-pane>
124
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
124
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
125
             </el-tab-pane>
125
             </el-tab-pane>
126
-            
126
+
127
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
127
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
128
                                 :activeType="customTabIndex"></prescription-table>
128
                                 :activeType="customTabIndex"></prescription-table>
129
           </el-tabs>
129
           </el-tabs>

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

302
             let tempAddition = []
302
             let tempAddition = []
303
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
303
             for (let b = 0; b < prescription.doctor_advice.length; b++) {
304
               let obj = {
304
               let obj = {
305
-                advice_id: prescription.doctor_advice[b].id,
305
+                advice_id: 0,
306
                 drug_name: prescription.doctor_advice[b].advice_name,
306
                 drug_name: prescription.doctor_advice[b].advice_name,
307
                 single_dose: prescription.doctor_advice[b].single_dose,
307
                 single_dose: prescription.doctor_advice[b].single_dose,
308
                 delivery_way: prescription.doctor_advice[b].delivery_way,
308
                 delivery_way: prescription.doctor_advice[b].delivery_way,
323
 
323
 
324
             for (let b = 0; b < prescription.project.length; b++) {
324
             for (let b = 0; b < prescription.project.length; b++) {
325
               let obj = {
325
               let obj = {
326
-                id: prescription.project[b].id,
326
+                id: 0,
327
                 project_id: prescription.project[b].project_id,
327
                 project_id: prescription.project[b].project_id,
328
                 project_name: prescription.project[b].project.project_name,
328
                 project_name: prescription.project[b].project.project_name,
329
                 statistical_classification: prescription.project[b].project.statistical_classification,
329
                 statistical_classification: prescription.project[b].project.statistical_classification,

+ 7 - 0
src/xt_pages/sign/signIn.vue 查看文件

279
                         this.signInList.map(item => {
279
                         this.signInList.map(item => {
280
                             item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
280
                             item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
281
                         })
281
                         })
282
+                    }else if(res.channel == 'queue/queuelistbyq'){
283
+                        console.log(11111111111,res.data)
284
+                        this.signInList = res.data.patientQueueList.data
285
+                        this.count = res.data.patientQueueList.count
286
+                        this.signInList.map(item => {
287
+                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
288
+                        })
282
                     }
289
                     }
283
                 
290
                 
284
                 // console.log("action", re.action);
291
                 // console.log("action", re.action);

+ 147 - 34
src/xt_pages/stock/drugs/query.vue 查看文件

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-      <el-button
6
-        size="small"
7
-        class="filter-item"
8
-        type="primary"
9
-        icon="el-icon-search"
10
-        @click="setting"
11
-      >设置
12
-      </el-button
13
-      >
14
-    </div>
15
-    <div class="app-container ">
16
-      <div class="cell clearfix">
17
-        <el-input
18
-          size="small"
19
-          style="width: 400px;"
20
-          class="filter-item"
21
-          v-model.trim="keywords"
22
-          placeholder="商品名称/规格名称"
23
-        />
5
+      <div>
24
         <el-button
6
         <el-button
25
           size="small"
7
           size="small"
26
           class="filter-item"
8
           class="filter-item"
27
           type="primary"
9
           type="primary"
28
           icon="el-icon-search"
10
           icon="el-icon-search"
29
-          @click="search"
30
-        >搜索
11
+          @click="setting"
12
+        >设置
31
         </el-button
13
         </el-button
32
         >
14
         >
15
+      <el-button
16
+          size="small"
17
+          class="filter-item"
18
+          type="primary"
19
+          icon="el-icon-search"
20
+          @click="exportStock"
21
+        >导出
22
+        </el-button>
23
+      </div>
24
+    </div>
25
+    <div class="app-container ">
26
+      <div class="cell clearfix">
27
+         <el-select v-model="drug_category" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
28
+            <el-option
29
+              v-for="(item,index) in drugCategory"
30
+              :key="index"
31
+              :label="item.name"
32
+              :value="item.id">
33
+            </el-option>
34
+        </el-select>
35
+         <el-date-picker
36
+            size="small"
37
+            v-model="start_time"
38
+            prefix-icon="el-icon-date"
39
+            :editable="false"
40
+            style="width: 196px;"
41
+            type="date"
42
+            placeholder="选择日期时间"
43
+            align="right"
44
+            format="yyyy-MM-dd"
45
+            value-format="yyyy-MM-dd"
46
+            @change="startTimeChange"
47
+           ></el-date-picker>-
48
+            <el-date-picker
49
+              size="small"
50
+              v-model="end_time"
51
+              prefix-icon="el-icon-date"
52
+              :editable="false"
53
+              style="width: 196px;margin-right:10px;"
54
+              type="date"
55
+              placeholder="选择日期时间"
56
+              align="right"
57
+              format="yyyy-MM-dd"
58
+              value-format="yyyy-MM-dd"
59
+              @change="endTimeChange"
60
+          ></el-date-picker>
61
+          <el-input
62
+            size="small"
63
+            style="width: 200px;"
64
+            class="filter-item"
65
+            v-model.trim="keywords"
66
+            placeholder="商品名称/规格名称"
67
+          />
68
+          <el-button
69
+            size="small"
70
+            class="filter-item"
71
+            type="primary"
72
+            icon="el-icon-search"
73
+            @click="search"
74
+          >搜索
75
+          </el-button>
33
       </div>
76
       </div>
34
 
77
 
35
 
78
 
113
       <el-pagination
156
       <el-pagination
114
         @size-change="handleSizeChange"
157
         @size-change="handleSizeChange"
115
         @current-change="handleCurrentChange"
158
         @current-change="handleCurrentChange"
116
-        :page-sizes="[10, 50, 100]"
159
+        :page-sizes="[10, 50, 100,500,1000]"
117
         :page-size="10"
160
         :page-size="10"
118
         background
161
         background
119
         align="right"
162
         align="right"
136
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
179
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
137
   import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
180
   import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
138
   import SettingDialog from './settingDialog/index'
181
   import SettingDialog from './settingDialog/index'
139
-
182
+  import { getDictionaryDataConfig } from "@/utils/data";
140
   export default {
183
   export default {
141
     name: 'stockIn',
184
     name: 'stockIn',
142
     created() {
185
     created() {
143
       this.GetAllDrugStockQueryList()
186
       this.GetAllDrugStockQueryList()
187
+
188
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
189
+      this.drugCategory.push(...drugCategory)
190
+      console.log("透析记录",this.drugCategory)
144
     },
191
     },
145
     components: {
192
     components: {
146
       SettingDialog,
193
       SettingDialog,
167
         WarehouseInfo: {
214
         WarehouseInfo: {
168
           loading: false,
215
           loading: false,
169
           warehouseInfoDate: []
216
           warehouseInfoDate: []
170
-        }
217
+        },
218
+        tableData:[],
219
+        drug_category:0,
220
+        drugCategory:[
221
+          {id:0,name:"全部"}
222
+        ]
171
       }
223
       }
172
     },
224
     },
173
     methods: {
225
     methods: {
218
         }
270
         }
219
       },
271
       },
220
       GetAllDrugStockQueryList: function() {
272
       GetAllDrugStockQueryList: function() {
221
-        console.log(this.keywords)
273
+       
222
         const Params = {
274
         const Params = {
223
           page: this.page,
275
           page: this.page,
224
           limit: this.limit,
276
           limit: this.limit,
225
-          keyword: this.keywords
277
+          keyword: this.keywords,
278
+          drug_category:this.drug_category,
279
+          start_time:this.start_time,
280
+          end_time:this.end_time,
226
         }
281
         }
282
+        console.log("parasm22222",Params)
227
         this.WarehouseInfo.loading = true
283
         this.WarehouseInfo.loading = true
228
         this.WarehouseInfo.warehouseInfoDate = []
284
         this.WarehouseInfo.warehouseInfoDate = []
229
         getAllDrugStockQueryList(Params).then(response => {
285
         getAllDrugStockQueryList(Params).then(response => {
234
           } else {
290
           } else {
235
             this.WarehouseInfo.loading = false
291
             this.WarehouseInfo.loading = false
236
             this.total = response.data.data.total
292
             this.total = response.data.data.total
293
+            var arr = []
237
             for (let i = 0; i < response.data.data.list.length; i++) {
294
             for (let i = 0; i < response.data.data.list.length; i++) {
238
-
239
               this.WarehouseInfo.warehouseInfoDate.push(
295
               this.WarehouseInfo.warehouseInfoDate.push(
240
                 response.data.data.list[i]
296
                 response.data.data.list[i]
241
               )
297
               )
298
+              arr.push(response.data.data.list[i])
242
             }
299
             }
300
+            console.log("数据源头",arr)
301
+            for(let i=0;i<arr.length;i++){
302
+               arr[i].stockInCount =  this.stockInCount(arr[i])
303
+               arr[i].salesReturnCount = this.salesReturnCount(arr[i])
304
+               arr[i].reactCount = (this.stockInCount(arr[i]) - this.salesReturnCount(arr[i]))?this.stockInCount(arr[i]) - this.salesReturnCount(arr[i]):0
305
+               arr[i].stockOutCount = this.stockOutCount(arr[i])
306
+               arr[i].cancelStockCount = this.cancelStockCount(arr[i])?this.cancelStockCount(arr[i]):0
307
+               arr[i].reactOutCount = (this.stockOutCount(arr[i]) - this.cancelStockCount(arr[i]))?(this.stockOutCount(arr[i]) - this.cancelStockCount(arr[i])):0
308
+               arr[i].overplusCount = (this.stockInCount(arr[i])-this.salesReturnCount(arr[i])-this.stockOutCount(arr[i])+this.cancelStockCount(arr[i]))?this.stockInCount(arr[i])-this.salesReturnCount(arr[i])-this.stockOutCount(arr[i])+this.cancelStockCount(arr[i]):0
309
+            }
310
+             console.log("arr222222222",arr)
311
+             this.tableData = arr
243
             this.handleSpanTempArr()
312
             this.handleSpanTempArr()
244
           }
313
           }
245
         })
314
         })
277
       calculate: function(val) {
346
       calculate: function(val) {
278
         return Math.round(parseFloat(val) * 100) / 100
347
         return Math.round(parseFloat(val) * 100) / 100
279
       },
348
       },
280
-      startTimeChange: function() {
281
-        this.GetAllDrugStockQueryList()
282
-      },
283
-      endTimeChange: function() {
284
-        this.GetAllDrugStockQueryList()
285
-      },
349
+  
350
+    startTimeChange: function(val) {
351
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
352
+      
353
+      if (time > 0) {
354
+        this.$message.error("开始时间不能大于结束时间");
355
+        this.start_time = "";
356
+      } else {
357
+        this.GetAllDrugStockQueryList();
358
+      }
359
+    },
360
+    endTimeChange: function(val) {
361
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
362
+      if (time < 0) {
363
+        this.$message.error("结束时间不能小于开始时间");
364
+        this.end_time = "";
365
+      } else {
366
+        this.GetAllDrugStockQueryList();
367
+      }
368
+     
369
+    },
286
       stockInCount: function(row) {
370
       stockInCount: function(row) {
287
         let total = 0
371
         let total = 0
288
         for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
372
         for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
323
       },
407
       },
324
       search: function() {
408
       search: function() {
325
         this.GetAllDrugStockQueryList()
409
         this.GetAllDrugStockQueryList()
326
-      }, setting: function() {
410
+      }, 
411
+      setting: function() {
327
         this.$refs.dialog.show()
412
         this.$refs.dialog.show()
413
+      },
414
+       exportStock(){
415
+         import('@/vendor/Export2Excel').then(excel => {
416
+         const tHeader = ['药品名称', '规格名称', '入库数量','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
417
+         const filterVal = ['drug_name', 'drug_spec', 'stockInCount','salesReturnCount','reactCount','stockOutCount','cancelStockCount','reactOutCount','overplusCount']
418
+       
419
+        
420
+         const data = this.formatJson(filterVal, this.tableData)
421
+      
422
+         excel.export_json_to_excel({
423
+           header: tHeader,
424
+           data,
425
+           filename: '自备药查询'
426
+         })
427
+          this.downloadLoading = false
428
+        })
429
+       },
430
+       formatJson(filterVal, jsonData) {
431
+        return jsonData.map(v => filterVal.map(j => v[j]));
432
+      },
433
+      getDictionaryDataConfig(module, filed_name) {
434
+        return getDictionaryDataConfig(module, filed_name)
435
+      },
436
+      getTimestamp(time) { // 把时间日期转成时间戳
437
+        return (new Date(time)).getTime() / 1000
438
+      },
439
+      changeDrug(){
440
+       this.GetAllDrugStockQueryList()
328
       }
441
       }
329
     }
442
     }
330
   }
443
   }

+ 330 - 0
src/xt_pages/stock/selfPreparedMedicine/stockquery.vue 查看文件

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container ">
7
+      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8
+        <div>
9
+          <el-select v-model="type_name" style="width:140px;margin-right:10px;" placeholder="请选择"
10
+          @change="changeTypeName">
11
+            <el-option
12
+              v-for="item in drugType"
13
+              :key="item.id"
14
+              :label="item.name"
15
+              :value="item.id">
16
+            </el-option>
17
+          </el-select>
18
+          <el-date-picker
19
+            size="small"
20
+            v-model="start_time"
21
+            prefix-icon="el-icon-date"
22
+            :editable="false"
23
+            style="width: 196px;"
24
+            type="date"
25
+            placeholder="选择日期时间"
26
+            align="right"
27
+            format="yyyy-MM-dd"
28
+            value-format="yyyy-MM-dd"
29
+            @change="startTimeChange"
30
+           ></el-date-picker>-
31
+            <el-date-picker
32
+              size="small"
33
+              v-model="end_time"
34
+              prefix-icon="el-icon-date"
35
+              :editable="false"
36
+              style="width: 196px;"
37
+              type="date"
38
+              placeholder="选择日期时间"
39
+              align="right"
40
+              format="yyyy-MM-dd"
41
+              value-format="yyyy-MM-dd"
42
+              @change="endTimeChange"
43
+          ></el-date-picker>
44
+          <el-input
45
+            size="small"
46
+            style="width: 200px;margin-left:10px;"
47
+            class="filter-item"
48
+            v-model.trim="keywords"
49
+            placeholder="药品名称"
50
+          />
51
+          <el-button
52
+            size="small"
53
+            class="filter-item"
54
+            type="primary"
55
+            icon="el-icon-search"
56
+            @click="search"
57
+            >搜索</el-button
58
+          >
59
+        </div>
60
+        <div>
61
+          <el-button size="small" type="primary" @click="exportList">导出</el-button>
62
+          <el-button size="small" type="primary" @click="toPrint">打印</el-button>
63
+        </div>
64
+      </div>
65
+      
66
+
67
+      <el-table
68
+        :row-style="{ color: '#303133' }"
69
+        :header-cell-style="{
70
+          backgroundColor: 'rgb(245, 247, 250)',
71
+          color: '#606266'
72
+        }"
73
+        :data="tableData"
74
+        :class="signAndWeighBoxPatients"
75
+        border
76
+      >
77
+        <el-table-column label="药品名称" align="center">
78
+          <template slot-scope="scope">
79
+            <span>{{scope.row.drug_name?scope.row.drug_name:""}}</span>
80
+          </template>
81
+        </el-table-column>
82
+        <el-table-column label="规格名称" align="center">
83
+          <template slot-scope="scope">
84
+            <span>{{scope.row.drug_spec?scope.row.drug_spec:""}}</span>
85
+          </template>
86
+        </el-table-column>
87
+        <el-table-column label="入库数量" align="center">
88
+          <template slot-scope="scope">
89
+            <span>{{scope.row.Count?scope.row.Count:""}}</span>
90
+          </template>
91
+        </el-table-column>
92
+        <el-table-column label="实际入库" align="center">
93
+          <template slot-scope="scope">
94
+            <span>{{scope.row.Count?scope.row.Count:""}}</span>
95
+          </template>
96
+        </el-table-column>
97
+        <el-table-column label="出库数量" align="center">
98
+          <template slot-scope="scope">
99
+            <span>{{scope.row.outCount?scope.row.outCount:""}}</span>
100
+          </template>
101
+        </el-table-column>
102
+        <el-table-column label="实际出库" align="center">
103
+          <template slot-scope="scope">
104
+            <span>{{scope.row.outCount?scope.row.outCount:""}}</span>
105
+          </template>
106
+        </el-table-column>
107
+        <el-table-column label="剩余库存" align="center">
108
+          <template slot-scope="scope">
109
+            <span>{{scope.row.total?scope.row.total:""}}</span>
110
+          </template>
111
+        </el-table-column>
112
+       
113
+      </el-table>
114
+      <el-pagination
115
+        @size-change="handleSizeChange"
116
+        @current-change="handleCurrentChange"
117
+        :page-sizes="[10, 50, 100,200,500,1000]"
118
+        :page-size="10"
119
+        background
120
+        align="right"
121
+        style="margin-top:20px;"
122
+        layout="total, sizes, prev, pager, next, jumper"
123
+        :total="total"
124
+      >
125
+      </el-pagination>
126
+    </div>
127
+  </div>
128
+</template>
129
+
130
+<script>
131
+import { uParseTime } from "@/utils/tools";
132
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
133
+import { getDictionaryDataConfig,getDataConfig } from "@/utils/data";
134
+import { getSelfStockQuery } from "@/api/drug/drug"
135
+export default {
136
+  name: "stockIn",
137
+  created() {
138
+    var types =  getDictionaryDataConfig('system','drug_type')
139
+    console.log("44444",types)
140
+    var arr= []
141
+    var obj = {id:0,name:"全部" }
142
+    arr.push(obj)
143
+    arr.push(...types)
144
+    this.drugType = arr
145
+    console.log("arrr",arr)
146
+    this.getlist()
147
+  },
148
+  components: {
149
+    BreadCrumb
150
+  },
151
+  data() {
152
+    return {
153
+      crumbs: [
154
+        { path: false, name: "库存管理" },
155
+        { path: "/stock/query", name: "库存查询" }
156
+      ],
157
+      keywords: "",
158
+      total: 0,
159
+      multipleSelection: [],
160
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
161
+      start_time: "",
162
+      end_time: "",
163
+      page: 1,
164
+      limit: 10,
165
+      tableData:[],
166
+      drugType:[],
167
+      type_name:0,
168
+      stockOutData:[]
169
+    };
170
+  },
171
+  methods: {
172
+     
173
+     getlist(){
174
+         var params ={
175
+           type_name:this.type_name,
176
+           start_time:this.start_time,
177
+           end_time:this.end_time,
178
+           keywords:this.keywords,
179
+           page:this.page,
180
+           limit:this.limit
181
+         }
182
+        console.log("params",params)
183
+       getSelfStockQuery(params).then(response=>{
184
+          if(response.data.state == 1){
185
+            var stockQuery =  response.data.data.stockQuery
186
+            console.log("入库",stockQuery)
187
+            this.total = response.data.data.total
188
+            console.log("total",this.total)
189
+            var stockOutQuery = response.data.data.stockOutQuery
190
+            console.log("stockOut",stockOutQuery)
191
+             for(let i=0;i<stockQuery.length;i++){
192
+               for(let j=0;j<stockOutQuery.length;j++){
193
+                  if(stockQuery[i].drug_name_id == stockOutQuery[j].drug_name_id ){
194
+                     stockQuery[i].outCount = stockOutQuery[j].Count
195
+                     stockQuery[i].total = stockQuery[i].Count - stockOutQuery[j].Count
196
+                  }
197
+               }
198
+             }
199
+            console.log("表格数据",stockQuery)
200
+             this.tableData = stockQuery
201
+          }
202
+       })
203
+     },
204
+    handleSizeChange(val) {
205
+      this.limit = val;
206
+      this.getlist()
207
+    },
208
+    handleCurrentChange(val) {
209
+      this.page = val;
210
+      this.getlist()
211
+    },
212
+  
213
+    startTimeChange: function(val) {
214
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
215
+      
216
+      if (time > 0) {
217
+        this.$message.error("开始时间不能大于结束时间");
218
+        this.start_time = "";
219
+      } else {
220
+        this.getlist()
221
+      }
222
+    },
223
+    endTimeChange: function(val) {
224
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
225
+      if (time < 0) {
226
+        this.$message.error("结束时间不能小于开始时间");
227
+        this.end_time = "";
228
+      } else {
229
+        this.getlist()
230
+      }
231
+     
232
+    },
233
+   
234
+
235
+    search: function() {
236
+      this.getlist()
237
+    },
238
+
239
+    exportList(){
240
+         import('@/vendor/Export2Excel').then(excel => {
241
+         const tHeader = ['药品名称', '规格名称', '入库数量','实际入库','出库数量','实际出库','剩余库存']
242
+         const filterVal = ['drug_name', 'drug_spec', 'Count','Count','outCount','outCount','total'] 
243
+         const data = this.formatJson(filterVal, this.tableData)
244
+      
245
+         excel.export_json_to_excel({
246
+           header: tHeader,
247
+           data,
248
+           filename: '库存查询'
249
+         })
250
+          this.downloadLoading = false
251
+        })
252
+       },
253
+       formatJson(filterVal, jsonData) {
254
+        return jsonData.map(v => filterVal.map(j => v[j]));
255
+      },
256
+      changeTypeName(){
257
+        this.getlist()
258
+      },
259
+      toPrint(){
260
+        this.$router.push("/stock/selfstockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name)
261
+        
262
+      },
263
+
264
+     
265
+      getTimestamp(time) {
266
+      // 把时间日期转成时间戳
267
+      return new Date(time).getTime() / 1000;
268
+    },
269
+      getDictionaryDataConfig(module, filed_name) {
270
+        return getDictionaryDataConfig(module, filed_name)
271
+
272
+      },
273
+      getDataConfig(module, filed_name){
274
+        return getDataConfig(module, filed_name)
275
+      },
276
+  }
277
+};
278
+</script>
279
+
280
+<style rel="stylesheet/css" lang="scss" scoped>
281
+.information {
282
+  border: 1px #dcdfe6 solid;
283
+  padding: 30px 20px 30px 20px;
284
+
285
+  .border {
286
+    border-bottom: 1px #dcdfe6 solid;
287
+    margin: 0px 0 20px 0;
288
+  }
289
+}
290
+
291
+.title {
292
+  background: #409eff;
293
+  height: 44px;
294
+  line-height: 44px;
295
+  padding: 0 0 0 10px;
296
+  color: #fff;
297
+  margin: 0 0 10px 0;
298
+}
299
+
300
+.edit_separater {
301
+  border-top: 1px solid rgb(233, 233, 233);
302
+  margin-top: 15px;
303
+  margin-bottom: 15px;
304
+}
305
+</style>
306
+
307
+<style>
308
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
309
+  font-size: 12px;
310
+}
311
+
312
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
313
+  background: #6fb5fa;
314
+}
315
+
316
+.count {
317
+  color: #bd2c00;
318
+}
319
+.el-table td,
320
+.el-table th.is-leaf,
321
+.el-table--border,
322
+.el-table--group {
323
+  border-color: #d0d3da;
324
+}
325
+.el-table--border::after,
326
+.el-table--group::after,
327
+.el-table::before {
328
+  background-color: #d0d3da;
329
+}
330
+</style>

+ 202 - 0
src/xt_pages/stock/selfStockPrint.vue 查看文件

1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">耗材管理查询表</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                    <td width="60">药品名称</td>
25
+                                    <td width="80">规格名称</td>
26
+                                    <td width="80">入库数量</td>
27
+                                    <td width="80">实际入库</td>
28
+                                    <td width="80">出库数量</td>
29
+                                    <td width="80">实际出库</td>
30
+                                    <td width="80">剩余库存</td>
31
+                                </tr>
32
+                            </thead>
33
+                            <tbody>
34
+                                <tr v-for='(item,index) in tableData' :key="index">
35
+                                    <td>{{item.drug_name}}</td>
36
+                                    <td>{{item.drug_spec}}</td>
37
+                                    <td>{{item.Count}}</td>
38
+                                    <td>{{item.Count}}</td>
39
+                                    <td>{{item.outCount}}</td>
40
+                                    <td>{{item.outCount}}</td>
41
+                                    <td>{{item.total}}</td>
42
+                                </tr>
43
+                            </tbody>
44
+                        </table>
45
+                    </div>
46
+                </div>
47
+            </div>
48
+        </div>
49
+    </div>
50
+</template>
51
+
52
+<script>
53
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
54
+import { getSelfStockQuery } from "@/api/drug/drug"
55
+import print from 'print-js'
56
+const moment = require('moment')
57
+export default {
58
+    components:{
59
+        BreadCrumb
60
+    },
61
+    data(){
62
+        return{
63
+          crumbs: [
64
+            { path: false, name: '自备药管理' },
65
+            { path: false, name: '库存查询' },
66
+            { path: false, name: '库存打印' },
67
+          ],
68
+          start_time:"",
69
+          end_time:"",
70
+          drug_name:"",
71
+          drug_spec:"",
72
+          keyword:"",
73
+          tableData:[],
74
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
75
+          type_name:"",
76
+          limit:20,
77
+          page:1,
78
+        }
79
+    },
80
+    methods:{
81
+      printAction: function() {
82
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
83
+          printJS({
84
+          printable: 'print_content',
85
+          type: 'html',
86
+          documentTitle: '  ',
87
+          style: style,
88
+          scanStyles: false
89
+          })
90
+      },
91
+      getlist(){
92
+          var params ={
93
+           type_name:this.type_name,
94
+           start_time:this.start_time,
95
+           end_time:this.end_time,
96
+           keywords:this.keywords,
97
+           page:this.page,
98
+           limit:this.limit
99
+         }
100
+          console.log("params",params)
101
+         getSelfStockQuery(params).then(response=>{
102
+          if(response.data.state == 1){
103
+            var stockQuery =  response.data.data.stockQuery
104
+            var stockOutQuery = response.data.data.stockOutQuery
105
+             for(let i=0;i<stockQuery.length;i++){
106
+               for(let j=0;j<stockOutQuery.length;j++){
107
+                  if(stockQuery[i].drug_name_id == stockOutQuery[j].drug_name_id ){
108
+                     stockQuery[i].outCount = stockOutQuery[j].Count
109
+                     stockQuery[i].total = stockQuery[i].Count - stockOutQuery[j].Count
110
+                  }
111
+               }
112
+             }
113
+            console.log("表格数据",stockQuery)
114
+             this.tableData = stockQuery
115
+          }
116
+       })
117
+      },
118
+    },
119
+    created(){
120
+      var starttime =  this.$route.query.start_time
121
+      this.start_time = starttime
122
+      var endtime =  this.$route.query.end_time
123
+      this.end_time = endtime
124
+      var type_name = this.$route.query.type_name
125
+      this.type_name = type_name
126
+      var keyword = this.$route.query.keyword
127
+      this.keyword = keyword
128
+
129
+      this.getlist()
130
+    }
131
+}
132
+</script>
133
+
134
+
135
+<style rel="stylesheet/scss" lang="scss" scoped>
136
+.print_main_content {
137
+  background-color: white;
138
+  max-width: 1500px;
139
+  margin: 0 auto;
140
+  padding: 0 0 20px 0;
141
+
142
+  .order_title_panl {
143
+    text-align: center;
144
+
145
+    .main_title {
146
+      font-size: 18px;
147
+      line-height: 40px;
148
+      font-weight: 500;
149
+    }
150
+  }
151
+  .table_panel {
152
+    .table {
153
+      width: 100%;
154
+      border: 1px solid;
155
+      border-collapse: collapse;
156
+      padding: 2px;
157
+      
158
+
159
+      thead {
160
+        tr {
161
+          td {
162
+            border: 1px solid;
163
+            text-align: center;
164
+            font-size: 18px;
165
+            padding: 15px 5px;
166
+          }
167
+        }
168
+      }
169
+      tbody {
170
+        tr {
171
+          td {
172
+            border: 1px solid;
173
+            text-align: center;
174
+            font-size: 18px;
175
+            padding: 10px 5px;
176
+            white-space: pre-line;
177
+            .proj {
178
+              padding: 5px 0;
179
+              text-align: left;
180
+
181
+              .proj_title {
182
+                font-size: 16px;
183
+                font-weight: 500;
184
+                line-height: 25px;
185
+              }
186
+
187
+              .proj_item {
188
+                font-size: 15px;
189
+                line-height: 20px;
190
+
191
+                .zone_name {
192
+                  font-weight: 500;
193
+                }
194
+              }
195
+            }
196
+          }
197
+        }
198
+      }
199
+    }
200
+  }
201
+}
202
+</style>

+ 48 - 13
src/xt_pages/stock/stockOutOrder.vue 查看文件

132
                 size="small"
132
                 size="small"
133
                 type="warning"
133
                 type="warning"
134
                 icon="el-icon-document"
134
                 icon="el-icon-document"
135
-                @click="handleSearch(scope.row.id)"
135
+                @click="handleSearch(scope.row.id,scope.row)"
136
               >
136
               >
137
               </el-button>
137
               </el-button>
138
             </el-tooltip>
138
             </el-tooltip>
259
                 <span>出库数量</span>
259
                 <span>出库数量</span>
260
               </template>
260
               </template>
261
               <template slot-scope="scope">
261
               <template slot-scope="scope">
262
-                <span>{{scope.row.count}}</span>
263
-
262
+                <!-- <span>{{scope.row.count}}</span> -->
263
+                <span>{{getOutStockCount(scope.row.good_id)}}</span>
264
               </template>
264
               </template>
265
             </el-table-column>
265
             </el-table-column>
266
             <el-table-column label="总价" min-width="20" align="center">
266
             <el-table-column label="总价" min-width="20" align="center">
383
   GetAllConfig,
383
   GetAllConfig,
384
   getWarehouseOutList,
384
   getWarehouseOutList,
385
   getWarehouseOutInfo,
385
   getWarehouseOutInfo,
386
-  getWarehouseOutUser
386
+  getWarehouseOutUser,
387
+  GetOutStockTotalCount
387
 } from "@/api/stock";
388
 } from "@/api/stock";
388
 import BreadCrumb from "../components/bread-crumb";
389
 import BreadCrumb from "../components/bread-crumb";
389
 
390
 
452
       userList:[],
453
       userList:[],
453
       type_name:'',
454
       type_name:'',
454
       specification_name:"",
455
       specification_name:"",
455
-      
456
+      stockCount:[]
456
     };
457
     };
457
   },
458
   },
458
   methods: {
459
   methods: {
607
       }
608
       }
608
     },
609
     },
609
     handleEdit: function(index, row) {
610
     handleEdit: function(index, row) {
611
+      
610
       this.$router.push({
612
       this.$router.push({
611
         name: "stockOutDetail",
613
         name: "stockOutDetail",
612
-        query: { id: row.id, type: this.type }
614
+        query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
613
       });
615
       });
614
     },
616
     },
615
     handleDelete: function(index, row) {
617
     handleDelete: function(index, row) {
708
 
710
 
709
     
711
     
710
     //新增
712
     //新增
711
-    handleSearch(id){ 
713
+    handleSearch(id,row){ 
714
+      console.log("row2233r5",row)
712
       this.warehousingOutInfo.info = []
715
       this.warehousingOutInfo.info = []
713
       this.warehousingOutInfo.warehousingOutData = []
716
       this.warehousingOutInfo.warehousingOutData = []
714
       this.GetOrderDetailOne(id)
717
       this.GetOrderDetailOne(id)
715
-      this.dialogVisible = true
718
+      this.GetTotalCount(row.warehouse_out_time)
719
+      
716
     },
720
     },
717
   
721
   
718
     //获取出库单详情数据
722
     //获取出库单详情数据
790
             return false
794
             return false
791
           } else {
795
           } else {
792
             var total = 0
796
             var total = 0
793
-            for (let i = 0; i < response.data.data.list.length; i++) {
794
-              var obj = response.data.data.list[i]
797
+            var list = response.data.data.list
798
+            var arrList =  this.unique(list)
799
+            for (let i = 0; i < arrList.length; i++) {
800
+              var obj = arrList[i]
795
               obj['is_total'] = 0
801
               obj['is_total'] = 0
796
               this.userList.push(obj)
802
               this.userList.push(obj)
797
-              total = total + response.data.data.list[i].count
803
+              total = total + arrList[i].count
798
             }
804
             }
799
             this.userList.push({
805
             this.userList.push({
800
               is_total: 1,
806
               is_total: 1,
803
             this.type_name = this.userList[0].type.type_name
809
             this.type_name = this.userList[0].type.type_name
804
             this.specification_name = this.userList[0].info.specification_name
810
             this.specification_name = this.userList[0].info.specification_name
805
             console.log("详情数据区",this.userList)
811
             console.log("详情数据区",this.userList)
806
-              this.editdialogVisible = true
812
+            this.editdialogVisible = true
807
           }
813
           }
808
         })
814
         })
809
       },
815
       },
813
       },
819
       },
814
       deleteRecord(){
820
       deleteRecord(){
815
 
821
 
816
-      }
822
+      },
823
+
824
+      GetTotalCount(time){
825
+          var params = {
826
+           warehouse_out_time:time
827
+          }
828
+        GetOutStockTotalCount(params).then(response=>{
829
+           if(response.data.state == 1){
830
+              var stockCount = response.data.data.stockCount
831
+              console.log("出库数量2323",stockCount)
832
+              this.stockCount = stockCount
833
+              this.dialogVisible = true
834
+           }
835
+        })
836
+      },
837
+
838
+     getOutStockCount(id){
839
+         var count = 0 
840
+         for(let i=0;i<this.stockCount.length;i++){
841
+            if(id == this.stockCount[i].good_id){
842
+              count = this.stockCount[i].count
843
+            }
844
+         }
845
+         return count
846
+     },
847
+
848
+     unique(arr) {
849
+        const res = new Map();
850
+        return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
851
+     }
817
   }
852
   }
818
 };
853
 };
819
 </script>
854
 </script>

+ 35 - 9
src/xt_pages/stock/stockOutOrderDetail.vue 查看文件

74
               <span>出库数量</span>
74
               <span>出库数量</span>
75
             </template>
75
             </template>
76
             <template slot-scope="scope">
76
             <template slot-scope="scope">
77
-              <span>{{scope.row.count}}</span>
78
-
77
+              <!-- <span>{{scope.row.count}}</span> -->
78
+                <span>{{getOutStockCount(scope.row.good_id)}}</span>
79
             </template>
79
             </template>
80
           </el-table-column>
80
           </el-table-column>
81
           <el-table-column label="总价" min-width="20" align="center">
81
           <el-table-column label="总价" min-width="20" align="center">
112
 
112
 
113
 <script>
113
 <script>
114
   import { uParseTime } from '@/utils/tools'
114
   import { uParseTime } from '@/utils/tools'
115
-  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo } from '@/api/stock'
115
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo,GetOutStockTotalCount } from '@/api/stock'
116
   import BreadCrumb from '../components/bread-crumb'
116
   import BreadCrumb from '../components/bread-crumb'
117
 
117
 
118
   export default {
118
   export default {
120
     components: { BreadCrumb },
120
     components: { BreadCrumb },
121
     created() {
121
     created() {
122
       const order_id = this.$route.query.id
122
       const order_id = this.$route.query.id
123
+      const warehouse_out_time = this.$route.query.warehouse_out_time
124
+      console.log("时间搓",warehouse_out_time)
123
       this.GetConfigInfo()
125
       this.GetConfigInfo()
124
       this.GetOrderDetail(order_id)
126
       this.GetOrderDetail(order_id)
127
+      this.GetTotalCount(warehouse_out_time)
125
     },
128
     },
126
     data() {
129
     data() {
127
       return {
130
       return {
149
           loading: false,
152
           loading: false,
150
           warehousingOutData: [],
153
           warehousingOutData: [],
151
           info: {}
154
           info: {}
152
-        }
155
+        },
156
+        stockCount:[]
153
       }
157
       }
154
     },
158
     },
155
     methods: {
159
     methods: {
221
             this.$message.error(response.data.msg)
225
             this.$message.error(response.data.msg)
222
             return false
226
             return false
223
           } else {
227
           } else {
224
-            console.log("=====",response.data.data.list)
225
-            console.log("=11111",response.data.data.info)
228
+           
226
             for (let i = 0; i < response.data.data.list.length; i++) {
229
             for (let i = 0; i < response.data.data.list.length; i++) {
227
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
230
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
228
             }
231
             }
229
             this.warehousingOutInfo.info = response.data.data.info
232
             this.warehousingOutInfo.info = response.data.data.info
233
+            console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
230
             this.handleSpanTempArr()
234
             this.handleSpanTempArr()
231
           }
235
           }
232
         })
236
         })
263
         })
267
         })
264
       }, editRecord: function() {
268
       }, editRecord: function() {
265
         this.$emit('edit-record')
269
         this.$emit('edit-record')
266
-      },jump(row){
270
+      },
271
+      jump(row){
267
         this.$router.push({
272
         this.$router.push({
268
           name: 'user_detail',
273
           name: 'user_detail',
269
           query: { id: row.id }
274
           query: { id: row.id }
277
             colspan: _col
282
             colspan: _col
278
           }
283
           }
279
         }
284
         }
280
-      },handleSpanTempArr(){
285
+      },
286
+      handleSpanTempArr(){
281
         this.tempArr = []
287
         this.tempArr = []
282
 
288
 
283
         for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
289
         for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
311
           }
317
           }
312
         })
318
         })
313
         this.sameRowArr = sameRowArr
319
         this.sameRowArr = sameRowArr
320
+      },
314
 
321
 
322
+      GetTotalCount(time){
323
+          var params = {
324
+           warehouse_out_time:time
325
+          }
326
+        GetOutStockTotalCount(params).then(response=>{
327
+           if(response.data.state == 1){
328
+              var stockCount = response.data.data.stockCount
329
+              console.log("stockCount",stockCount)
330
+              this.stockCount = stockCount
331
+           }
332
+        })
333
+      },
315
 
334
 
316
-
335
+      getOutStockCount(id){
336
+         var count = 0 
337
+         for(let i=0;i<this.stockCount.length;i++){
338
+            if(id == this.stockCount[i].good_id){
339
+              count = this.stockCount[i].count
340
+            }
341
+         }
342
+         return count
317
       }
343
       }
318
     }
344
     }
319
   }
345
   }

+ 1 - 1
src/xt_pages/stock/stockQuery.vue 查看文件

345
       return total;
345
       return total;
346
     },
346
     },
347
     stockOutCount: function(row) {
347
     stockOutCount: function(row) {
348
-      console.log("row------",row)
348
+      
349
       let total = 0;
349
       let total = 0;
350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
351
         total = total + row.query_warehouseout_info[i].count;
351
         total = total + row.query_warehouseout_info[i].count;

+ 12 - 5
src/xt_pages/stock/stockUserDetail.vue 查看文件

117
             return false
117
             return false
118
           } else {
118
           } else {
119
             var total = 0
119
             var total = 0
120
-            for (let i = 0; i < response.data.data.list.length; i++) {
121
-              var obj = response.data.data.list[i]
120
+          
121
+            var list =  response.data.data.list
122
+            console.log("list",list)
123
+            var arrList = this.unique(list)
124
+            for (let i = 0; i < arrList.length; i++) {
125
+              var obj = arrList[i]
122
               obj['is_total'] = 0
126
               obj['is_total'] = 0
123
               this.userList.push(obj)
127
               this.userList.push(obj)
124
-              total = total + response.data.data.list[i].count
128
+              total = total + arrList[i].count
125
             }
129
             }
126
             this.userList.push({
130
             this.userList.push({
127
               is_total: 1,
131
               is_total: 1,
128
               total: total,
132
               total: total,
129
             })
133
             })
130
-
131
-            console.log(this.userList)
132
           }
134
           }
133
         })
135
         })
136
+      },
137
+
138
+      unique(arr) {
139
+        const res = new Map();
140
+        return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
134
       }
141
       }
135
     }
142
     }
136
   }
143
   }