Browse Source

hah阿凡达

28169 1 month ago
parent
commit
7892273e58
33 changed files with 1709 additions and 159 deletions
  1. 9 0
      src/api/stock.js
  2. 7 2
      src/xt_pages/data/components/addDrugs.vue
  3. 18 2
      src/xt_pages/data/components/consumables.vue
  4. 13 2
      src/xt_pages/data/components/drugs.vue
  5. 23 1
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  6. 1 1
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  7. 2 2
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  8. 0 15
      src/xt_pages/dialysis/patientDoctorAdvice.vue
  9. 19 4
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  10. 21 17
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  11. 119 2
      src/xt_pages/stock/detail/stockInDetail.vue
  12. 59 4
      src/xt_pages/stock/drugs/components/drugInOrder.vue
  13. 1 1
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  14. 34 16
      src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue
  15. 15 10
      src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue
  16. 2 2
      src/xt_pages/stock/drugs/drugInventoryModePrint.vue
  17. 19 0
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  18. 29 6
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  19. 51 5
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  20. 23 2
      src/xt_pages/stock/query/goodNewQuery.vue
  21. 3 0
      src/xt_pages/stock/query/goodNewQueryPrint.vue
  22. 37 20
      src/xt_pages/stock/query/purchaseNewStockQuery.vue
  23. 12 10
      src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue
  24. 19 1
      src/xt_pages/stock/stockInOrder.vue
  25. 57 10
      src/xt_pages/stock/stockInOrderAdd.vue
  26. 66 5
      src/xt_pages/stock/stockInOrderEdit.vue
  27. 3 3
      src/xt_pages/stock/stockInventoryModePrint.vue
  28. 24 2
      src/xt_pages/user/Informed/Informedconsent.vue
  29. 365 0
      src/xt_pages/user/Informed/components/informef_Thrity.vue
  30. 253 0
      src/xt_pages/user/Informed/components/informef_Thrity_One.vue
  31. 385 0
      src/xt_pages/user/Informed/components/informef_Thrity_Two.vue
  32. 7 1
      src/xt_pages/user/patients.vue
  33. 13 13
      src/xt_permission.js

+ 9 - 0
src/api/stock.js View File

1169
     method:"get",
1169
     method:"get",
1170
     params:params,
1170
     params:params,
1171
   })
1171
   })
1172
+}
1173
+
1174
+export function changeGoodWarehouseInfo(data){
1175
+  
1176
+  return request({
1177
+    url:"/api/patient/changegoodwarehouseinfo",
1178
+    method:"post",
1179
+    data:data,
1180
+  })
1172
 }
1181
 }

+ 7 - 2
src/xt_pages/data/components/addDrugs.vue View File

342
                           </el-option>
342
                           </el-option>
343
                         </el-select>
343
                         </el-select>
344
                       </el-form-item>
344
                       </el-form-item>
345
+
346
+                      <el-form-item label="拆零次数:" prop="is_special_diseases">
347
+                        <el-input v-model="form.split_of_number" style="width:160px"></el-input>
348
+                      </el-form-item>
345
                         <el-form-item label="是否备案 : " prop="is_record">
349
                         <el-form-item label="是否备案 : " prop="is_record">
346
                             <el-select v-model="form.is_record" style="width:160px;" placeholder="请选择">
350
                             <el-select v-model="form.is_record" style="width:160px;" placeholder="请选择">
347
                                 <el-option
351
                                 <el-option
697
           is_self_drug:"2",
701
           is_self_drug:"2",
698
           is_zero_flag:"",
702
           is_zero_flag:"",
699
           scan_code:"",
703
           scan_code:"",
700
-          drug_identification_code:""
704
+          drug_identification_code:"",
705
+          split_of_number:""
701
         },
706
         },
702
 
707
 
703
         rules: {
708
         rules: {
1044
         form['is_zero_flag'] = parseInt(this.form.is_zero_flag)
1049
         form['is_zero_flag'] = parseInt(this.form.is_zero_flag)
1045
         form["scan_code"] = this.form.scan_code
1050
         form["scan_code"] = this.form.scan_code
1046
         form["drug_identification_code"] = this.form.drug_identification_code
1051
         form["drug_identification_code"] = this.form.drug_identification_code
1047
-
1052
+        form["split_of_number"] = parseInt(this.form.split_of_number)
1048
 
1053
 
1049
         return form
1054
         return form
1050
       },
1055
       },

+ 18 - 2
src/xt_pages/data/components/consumables.vue View File

355
               bby01:"",
355
               bby01:"",
356
               is_show:"",
356
               is_show:"",
357
               is_zero_flag:"",
357
               is_zero_flag:"",
358
-
358
+              split_of_number:"",
359
             },
359
             },
360
             isVisibility: false,
360
             isVisibility: false,
361
           }
361
           }
787
               this.goodInfo.goodInfoDialog.formValue.is_zero_flag =  response.data.data.goodInfo.is_zero_flag.toString()
787
               this.goodInfo.goodInfoDialog.formValue.is_zero_flag =  response.data.data.goodInfo.is_zero_flag.toString()
788
             }
788
             }
789
 
789
 
790
+            console.log("hahhhhhhhhhhhhhh",response.data.data.goodInfo.split_of_number)
791
+            this.goodInfo.goodInfoDialog.formValue.split_of_number = response.data.data.goodInfo.split_of_number
792
+
790
 
793
 
791
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
794
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
792
 
795
 
874
         })
877
         })
875
       },
878
       },
876
       goodInfoDialogComfirm: function(val) {
879
       goodInfoDialogComfirm: function(val) {
877
-
880
+        console.log("VAL----------------",val)
878
         if (val.isCreated == 2) {
881
         if (val.isCreated == 2) {
879
           //修改
882
           //修改
880
           val['id'] = this.goodInfo.editGoodId;
883
           val['id'] = this.goodInfo.editGoodId;
881
           val['good_code'] = this.goodInfo.good_code;
884
           val['good_code'] = this.goodInfo.good_code;
885
+          if(val.is_zero_flag == 1){
886
+            if(val.split_of_number ==""){
887
+                this.$message.error("拆零次数不能为空!")
888
+                return
889
+            }
890
+          }
882
 
891
 
883
           modifyGoodInfo(val).then(response => {
892
           modifyGoodInfo(val).then(response => {
884
             if (response.data.state == 0) {
893
             if (response.data.state == 0) {
925
             val.stock_warn_count = parseInt(val.stock_warn_count)
934
             val.stock_warn_count = parseInt(val.stock_warn_count)
926
           }
935
           }
927
 
936
 
937
+          if(val.is_zero_flag == 1){
938
+            if(val.split_of_number ==""){
939
+                this.$message.error("拆零次数不能为空!")
940
+                return
941
+            }
942
+          }
943
+
928
           //新增
944
           //新增
929
           createGoodInfo(val).then(response => {
945
           createGoodInfo(val).then(response => {
930
             if (response.data.state == 0) {
946
             if (response.data.state == 0) {

+ 13 - 2
src/xt_pages/data/components/drugs.vue View File

345
           is_show:"",
345
           is_show:"",
346
           scan_code:"",
346
           scan_code:"",
347
           drug_identification_code:"",
347
           drug_identification_code:"",
348
+          split_of_number:""
348
         },
349
         },
349
         tempFormValue: {
350
         tempFormValue: {
350
           drug_name: '',//药品名称
351
           drug_name: '',//药品名称
559
 
560
 
560
           val.min_number =  parseInt(val.min_number)
561
           val.min_number =  parseInt(val.min_number)
561
           console.log("Val323323232",val)
562
           console.log("Val323323232",val)
562
-
563
+          if(val.is_zero_flag == 1){
564
+             if(val.split_of_number == ""){
565
+               this.$message.error("拆零次数不能为空!")
566
+               return
567
+             }
568
+           }
563
           editBaseDrugLib(val,untit).then(response => {
569
           editBaseDrugLib(val,untit).then(response => {
564
             if (response.data.state == 0) {
570
             if (response.data.state == 0) {
565
               this.$message.error(response.data.msg);
571
               this.$message.error(response.data.msg);
572
           })
578
           })
573
         } else if (val.id == 0) {
579
         } else if (val.id == 0) {
574
           //新增
580
           //新增
575
-
581
+           if(val.is_zero_flag == 1){
582
+             if(val.split_of_number == ""){
583
+               this.$message.error("拆零次数不能为空!")
584
+               return
585
+             }
586
+           }
576
           createBaseDrugLib(val).then(response => {
587
           createBaseDrugLib(val).then(response => {
577
             if (response.data.state == 0) {
588
             if (response.data.state == 0) {
578
               this.$message.error(response.data.msg);
589
               this.$message.error(response.data.msg);

+ 23 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

1319
                             }}
1319
                             }}
1320
                           </td>
1320
                           </td>
1321
                           <td>
1321
                           <td>
1322
+                           <span v-if="org_id!=9478">
1323
+
1322
                             {{
1324
                             {{
1323
                               monitor_record.systolic_blood_pressure
1325
                               monitor_record.systolic_blood_pressure
1324
                                 ? monitor_record.systolic_blood_pressure + "/"
1326
                                 ? monitor_record.systolic_blood_pressure + "/"
1329
                                 ? monitor_record.diastolic_blood_pressure
1331
                                 ? monitor_record.diastolic_blood_pressure
1330
                                 : ""
1332
                                 : ""
1331
                             }}
1333
                             }}
1334
+
1335
+                           </span> 
1336
+                           <span v-if="org_id == 9478">
1337
+                            {{
1338
+                              monitor_record.systolic_blood_pressure
1339
+                                ? monitor_record.systolic_blood_pressure + "/"
1340
+                                : ""
1341
+                            }}
1342
+                            {{
1343
+                              monitor_record.diastolic_blood_pressure
1344
+                                ? monitor_record.diastolic_blood_pressure
1345
+                                : "拒测"
1346
+                            }}
1347
+                           </span>
1348
+                           
1332
                           </td>
1349
                           </td>
1333
 
1350
 
1334
                           <td>
1351
                           <td>
3599
           birth.substr(6, 2)
3616
           birth.substr(6, 2)
3600
 
3617
 
3601
         var age = jsGetAge(birthtwo, '-')
3618
         var age = jsGetAge(birthtwo, '-')
3602
-        return age
3619
+        if(age<0){
3620
+          return val.age
3621
+        }else{
3622
+          return age
3623
+        }
3624
+        
3603
       }
3625
       }
3604
     },
3626
     },
3605
     newAdviceGroupObject: function () {
3627
     newAdviceGroupObject: function () {

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

312
                     <el-col :span="8" v-if="isShows('抗凝剂')">
312
                     <el-col :span="8" v-if="isShows('抗凝剂')">
313
 
313
 
314
                         <el-form-item label="抗凝剂:" prop="anticoagulant" :rules="isCheckmust('抗凝剂')">
314
                         <el-form-item label="抗凝剂:" prop="anticoagulant" :rules="isCheckmust('抗凝剂')">
315
-                            <el-select v-model="dialysisPrescription.anticoagulant" placeholder="请选择"
315
+                            <el-select filterable  v-model="dialysisPrescription.anticoagulant" placeholder="请选择"
316
                                        style="width:100%;"
316
                                        style="width:100%;"
317
                                        @change="changeThisAnticoagulant">
317
                                        @change="changeThisAnticoagulant">
318
                                 <el-option :key="0" label="请选择" :value="0"></el-option>
318
                                 <el-option :key="0" label="请选择" :value="0"></el-option>

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue View File

94
           <td v-if="isShow('跨膜压')"> {{ monitor.transmembrane_pressure ? monitor.transmembrane_pressure : "" }} </td>
94
           <td v-if="isShow('跨膜压')"> {{ monitor.transmembrane_pressure ? monitor.transmembrane_pressure : "" }} </td>
95
           <td v-if="isShow('跨膜压1')"> {{ monitor.transmembrane_pressure_one ? monitor.transmembrane_pressure_one : "/" }} </td>
95
           <td v-if="isShow('跨膜压1')"> {{ monitor.transmembrane_pressure_one ? monitor.transmembrane_pressure_one : "/" }} </td>
96
           <td v-if="isShow('超滤量')"> 
96
           <td v-if="isShow('超滤量')"> 
97
-            <span v-if="org_id!=9671 && org_id!=10440 && org_id!=10702 && org_id!=10644 && org_id!=10744">{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}  </span> 
98
-            <span v-if="org_id ==9671 || org_id==10440 || org_id == 10702 || org_id == 10644 || org_id == 10744">{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "0" }}  </span> 
97
+            <span v-if="org_id!=9671 && org_id!=10440 && org_id!=10702 && org_id!=10644 && org_id!=10744 && org_id!=9478">{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}  </span> 
98
+            <span v-if="org_id ==9671 || org_id==10440 || org_id == 10702 || org_id == 10644 || org_id == 10744 || org_id == 9478">{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "0" }}  </span> 
99
           </td>
99
           </td>
100
           <td v-if="isShow('超滤量1')"> 
100
           <td v-if="isShow('超滤量1')"> 
101
             {{ monitor.ultrafiltration_volume_one ? monitor.ultrafiltration_volume_one : "/" }}
101
             {{ monitor.ultrafiltration_volume_one ? monitor.ultrafiltration_volume_one : "/" }}

+ 0 - 15
src/xt_pages/dialysis/patientDoctorAdvice.vue View File

9
             <el-form :inline="true" :model="listQuery">
9
             <el-form :inline="true" :model="listQuery">
10
                 <el-form-item label>
10
                 <el-form-item label>
11
 
11
 
12
-                <!-- <el-autocomplete
13
-                    class="checkSearch"
14
-                    popper-class="my-autocomplete"
15
-                    v-model.trim="listQuery.search"
16
-                    :fetch-suggestions="querySearchAsync"
17
-                    :trigger-on-focus="false"
18
-                    placeholder="病人透析号/姓名"
19
-                    @select="handleSelect"
20
-                    style="width:160px;"
21
-                    >
22
-                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
23
-                    <template slot-scope="{ item }">
24
-                        <div class="name">{{ item.name }}</div>
25
-                    </template>
26
-                </el-autocomplete> -->
27
                 <el-input v-model="listQuery.search" style="width: 200px;" placeholder="请输入患者姓名或透析号"></el-input>
12
                 <el-input v-model="listQuery.search" style="width: 200px;" placeholder="请输入患者姓名或透析号"></el-input>
28
                 <el-button type="primary" size="small" @click="toSeach">搜索</el-button>
13
                 <el-button type="primary" size="small" @click="toSeach">搜索</el-button>
29
                 </el-form-item>
14
                 </el-form-item>

+ 19 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

1464
                           <td v-if="org_id == 10735">
1464
                           <td v-if="org_id == 10735">
1465
                             {{ monitor.temperature ? monitor.temperature : "" }}
1465
                             {{ monitor.temperature ? monitor.temperature : "" }}
1466
                           </td>
1466
                           </td>
1467
-                          <td>{{ monitor.systolic_blood_pressure ? monitor.systolic_blood_pressure + "/" : "" }}
1468
-                            {{ monitor.diastolic_blood_pressure ? monitor.diastolic_blood_pressure : "" }}</td>
1467
+                          <td>
1468
+                            <span v-if="org_id!=9478">
1469
+                              {{ monitor.systolic_blood_pressure ? monitor.systolic_blood_pressure + "/" : "" }}
1470
+                              {{ monitor.diastolic_blood_pressure ? monitor.diastolic_blood_pressure : "" }}
1471
+                            </span>
1472
+
1473
+                            <span v-if="org_id == 9478">
1474
+                              {{ monitor.systolic_blood_pressure ? monitor.systolic_blood_pressure + "/" : "" }}
1475
+                              {{ monitor.diastolic_blood_pressure ? monitor.diastolic_blood_pressure : "拒测" }}
1476
+                            </span>
1477
+                            
1478
+                          </td>
1469
                           <td>{{ monitor.pulse_frequency ? monitor.pulse_frequency : "" }}</td>
1479
                           <td>{{ monitor.pulse_frequency ? monitor.pulse_frequency : "" }}</td>
1470
                           <td v-if="org_id != 10489">{{ monitor.breathing_rate ? monitor.breathing_rate : "" }}</td>
1480
                           <td v-if="org_id != 10489">{{ monitor.breathing_rate ? monitor.breathing_rate : "" }}</td>
1471
                           <td>{{ monitor.blood_flow_volume ? monitor.blood_flow_volume : "" }}</td>
1481
                           <td>{{ monitor.blood_flow_volume ? monitor.blood_flow_volume : "" }}</td>
4679
           birth.substr(4, 2) +
4689
           birth.substr(4, 2) +
4680
           '-' +
4690
           '-' +
4681
           birth.substr(6, 2)
4691
           birth.substr(6, 2)
4682
-        if (this.org_id != 0 && this.org_id != 10460) {
4692
+        if (this.org_id != 10460 && this.org_id!=10751 && this.org_id == 0) {
4683
           var age = jsGetAge(birthtwo, '-')
4693
           var age = jsGetAge(birthtwo, '-')
4684
           return age
4694
           return age
4685
         }
4695
         }
4686
 
4696
 
4687
-        if (this.org_id == 0 || this.org_id == 10460) {
4697
+        if (this.org_id == 10460) {
4688
           console.log("日期搜哦", this.schedule_date_one)
4698
           console.log("日期搜哦", this.schedule_date_one)
4689
           var strBirthdayArr = this.schedule_date_one.split("-")
4699
           var strBirthdayArr = this.schedule_date_one.split("-")
4690
           console.log("strBirthdayArr", strBirthdayArr)
4700
           console.log("strBirthdayArr", strBirthdayArr)
4697
 
4707
 
4698
         }
4708
         }
4699
 
4709
 
4710
+        if(this.org_id ==10751 || this.org_id == 0){
4711
+           
4712
+          return val.age
4713
+        }
4714
+
4700
       }
4715
       }
4701
     },
4716
     },
4702
     newAdviceGroupObject: function () {
4717
     newAdviceGroupObject: function () {

+ 21 - 17
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

239
               <el-input v-model="form.number" style="width:180px"></el-input>
239
               <el-input v-model="form.number" style="width:180px"></el-input>
240
             </el-form-item>
240
             </el-form-item>
241
 
241
 
242
+            <el-form-item label="是否拆零: " prop="limit_remark" style="width:100%;">
243
+              <el-select v-model="form.is_zero_flag" style="width:160px;" filterable placeholder="请选择">
244
+                <el-option
245
+                  v-for="item in options"
246
+                  :key="item.value"
247
+                  :label="item.label"
248
+                  :value="item.value">
249
+                </el-option>
250
+              </el-select>
251
+          </el-form-item>
252
+
253
+            <el-form-item label="拆零次数:" prop="good_number">
254
+              <el-input v-model="form.split_of_number" style="width:160px;" placeholder="" maxlength="30"></el-input>
255
+            </el-form-item>
256
+
242
             <el-form-item label="备注 : " prop="name" style="width:100%;">
257
             <el-form-item label="备注 : " prop="name" style="width:100%;">
243
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
258
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
244
             </el-form-item>
259
             </el-form-item>
332
           </el-form-item>
347
           </el-form-item>
333
 
348
 
334
 
349
 
335
-          <el-form-item label="是否拆零: " prop="limit_remark" style="width:100%;">
336
-            <el-select v-model="form.is_zero_flag" style="width:160px;" filterable placeholder="请选择">
337
-              <el-option
338
-                v-for="item in options"
339
-                :key="item.value"
340
-                :label="item.label"
341
-                :value="item.value">
342
-              </el-option>
343
-            </el-select>
344
-          </el-form-item>
350
+         
345
 
351
 
346
         </el-form>
352
         </el-form>
347
       </el-tab-pane>
353
       </el-tab-pane>
439
           bby01:"",
445
           bby01:"",
440
           is_show:"",
446
           is_show:"",
441
           is_zero_flag:"",
447
           is_zero_flag:"",
442
-
448
+          split_of_number:"",
443
         },
449
         },
444
 
450
 
445
         rules: {
451
         rules: {
576
               min_unit:"",
582
               min_unit:"",
577
               total:"",
583
               total:"",
578
               is_user:"",
584
               is_user:"",
579
-            bbx01:"",
580
-            bby01:"",
585
+              bbx01:"",
586
+              bby01:"",
587
+              split_of_number:"",
581
             }
588
             }
582
           this.good_status = []
589
           this.good_status = []
583
           for (let key in tempform) {
590
           for (let key in tempform) {
677
         form["bby01"] = this.form.bby01
684
         form["bby01"] = this.form.bby01
678
         form["is_show"] = this.form.is_show
685
         form["is_show"] = this.form.is_show
679
         form["is_zero_flag"] = this.form.is_zero_flag
686
         form["is_zero_flag"] = this.form.is_zero_flag
680
-
681
-
682
-
683
-
687
+        form["split_of_number"] = this.form.split_of_number
684
         return form
688
         return form
685
       }, changeSelected: function(val) {
689
       }, changeSelected: function(val) {
686
         console.log(val)
690
         console.log(val)

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

220
               <span v-else>{{ scope.row.total }}</span>
220
               <span v-else>{{ scope.row.total }}</span>
221
             </template>
221
             </template>
222
           </el-table-column>
222
           </el-table-column>
223
+          
224
+          <el-table-column label="耗材追溯码" align="center">
225
+            <template slot-scope="scope">
226
+              <div  @click="changeGoodCode(scope.row,scope.$index)">
227
+                <el-input v-model="scope.row.good_code"  placeholder="请输入耗材追溯码"></el-input>
228
+              </div>
229
+            </template>
230
+          </el-table-column>
231
+          
232
+          <el-table-column label="追溯码数量" align="center">
233
+            <template slot-scope="scope">
234
+              {{ getGoodCode(scope.row.good_code) }}
235
+            </template>
236
+          </el-table-column>
223
         </el-table>
237
         </el-table>
224
       </div>
238
       </div>
225
       <el-pagination
239
       <el-pagination
423
     >
437
     >
424
     </good-print>
438
     </good-print>
425
 
439
 
440
+    <el-dialog
441
+      title="耗材追溯码"
442
+      :visible.sync="dialogVisibleCode"
443
+      width="40%">
444
+      <div style="margin-bottom: 10px;">
445
+        <span >追溯码个数:{{getGoodTotal() }} 个</span>
446
+      </div>
447
+      <span>
448
+        <el-input
449
+         @keyup.native="changeText"
450
+          type="textarea"
451
+          placeholder="请输入内容"
452
+          v-model="textarea"
453
+          :rows="10"
454
+        >
455
+        </el-input>
456
+      </span>
457
+      <span slot="footer" class="dialog-footer">
458
+        <el-button @click="dialogVisibleCode = false">取 消</el-button>
459
+        <el-button type="primary" @click="saveTextArea()">确 定</el-button>
460
+      </span>
461
+    </el-dialog>
462
+
426
   </div>
463
   </div>
427
 
464
 
428
   
465
   
440
   getPrintStockGood,
477
   getPrintStockGood,
441
   getGoodDetailPrintList,
478
   getGoodDetailPrintList,
442
   postSearchGoodList,
479
   postSearchGoodList,
443
-  getGoodWarehosueInPrintList
480
+  getGoodWarehosueInPrintList,
481
+  changeGoodWarehouseInfo
444
 } from "@/api/stock";
482
 } from "@/api/stock";
445
 
483
 
446
 export default {
484
 export default {
556
       printData:[],
594
       printData:[],
557
       isVisibility: "",
595
       isVisibility: "",
558
       propsTable: "",
596
       propsTable: "",
559
-
597
+      textarea:"",
598
+      currentRow:{},
599
+      currentIndex:0,
600
+      dialogVisibleCode:false,
601
+      id:0,
560
     };
602
     };
561
   },
603
   },
562
   methods: {
604
   methods: {
605
+    getGoodCode(val){
606
+      var newArr = []
607
+      var total = 0
608
+      if(val!=undefined){
609
+        newArr = val.split(",") 
610
+        total = newArr.length - 1
611
+        if(total >0){
612
+          return  total
613
+        }else{
614
+        return ""
615
+        }
616
+      }
617
+      
618
+    },
619
+    changeText(event){
620
+      // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
621
+      var  textAreaList = this.textarea.split(",")
622
+      if (event.key === 'Enter') {
623
+        var textarea = ""
624
+         textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
625
+         var  parts = textarea.split(',')
626
+         for(let i=0;i<textAreaList.length;i++){
627
+           if(parts[parts.length-2] == textAreaList[i]){
628
+              this.$message.error("该条码已经存在,不能重复扫码")
629
+           }
630
+         }
631
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
632
+        this.textarea = uniqueStr
633
+      }
634
+     
635
+     },
636
+    getGoodTotal(){
637
+      if(this.textarea!=null){
638
+        var  textAreaList = this.textarea.split(",")
639
+        var arr = []
640
+        if(textAreaList!=null && textAreaList.length>0){
641
+          for(let i=0;i<textAreaList.length;i++){
642
+            if(textAreaList[i]!=""){
643
+              arr.push(textAreaList[i])
644
+            }
645
+          }
646
+          return  arr.length
647
+        }else{
648
+          return ""
649
+        }
650
+        
651
+      }
652
+    },
653
+    saveTextArea(){
654
+        var params = {
655
+          id:this.id,
656
+          good_code:this.textarea
657
+        }
658
+      changeGoodWarehouseInfo(params).then(response=>{
659
+        if(response.data.state == 1){
660
+          this.$message.success("保存成功")
661
+          for(let i=0;i<this.cancelStockDate.length;i++){
662
+            if(this.currentIndex == i){
663
+              this.cancelStockDate[i].good_code = this.textarea 
664
+            }
665
+          }
666
+           this.dialogVisibleCode = false
667
+        }
668
+      })
669
+     
670
+     },
671
+    changeGoodCode(row,index){
672
+        this.id = 0
673
+        this.id = row.id
674
+        this.textarea=""
675
+        this.textarea = row.good_code
676
+        this.currentRow = row
677
+        this.currentIndex =index
678
+        this.dialogVisibleCode = true
679
+    },
563
     changeStartTime(){
680
     changeStartTime(){
564
 
681
 
565
     },
682
     },

+ 59 - 4
src/xt_pages/stock/drugs/components/drugInOrder.vue View File

227
               </div>
227
               </div>
228
             </template>
228
             </template>
229
           </el-table-column>
229
           </el-table-column>
230
+          <el-table-column label="追溯码数量" width="150" align="center">
231
+            <template slot-scope="scope">
232
+              {{ getGoodCode(scope.row.drug_code) }}
233
+            </template>
234
+          </el-table-column>
230
       </el-table>
235
       </el-table>
231
 
236
 
232
       <el-pagination
237
       <el-pagination
246
       title="药品追溯码"
251
       title="药品追溯码"
247
       :visible.sync="dialogVisible"
252
       :visible.sync="dialogVisible"
248
       width="40%">
253
       width="40%">
254
+      <div style="margin-bottom: 10px;">
255
+        <span >追溯码个数:{{getDrugTotal() }} 个</span>
256
+      </div>
249
       <span>
257
       <span>
250
         <el-input
258
         <el-input
251
          @keyup.native="changeText"
259
          @keyup.native="changeText"
584
     };
592
     };
585
   },
593
   },
586
   methods: {
594
   methods: {
595
+    getGoodCode(val){
596
+      console.log("val-----",val)
597
+      var newArr = []
598
+      var total = 0
599
+      if(val!=undefined){
600
+        newArr = val.split(",") 
601
+        total = newArr.length - 1
602
+        if(total >0){
603
+          return  total
604
+        }else{
605
+        return ""
606
+        }
607
+      }
608
+     
609
+    },
610
+    getDrugTotal(){
611
+      if(this.textarea!=null){
612
+        var  textAreaList = this.textarea.split(",")
613
+        console.log("textArrleti",textAreaList)
614
+        var arr = []
615
+        if(textAreaList!=null && textAreaList.length>0){
616
+          for(let i=0;i<textAreaList.length;i++){
617
+            if(textAreaList[i]!=""){
618
+              arr.push(textAreaList[i])
619
+            }
620
+          }
621
+          return  arr.length
622
+        }else{
623
+          return ""
624
+        }
625
+      
626
+      }
627
+    },
587
     batchSelect(selection){
628
     batchSelect(selection){
588
       if(selection.length == 0){
629
       if(selection.length == 0){
589
         this.$message.error("请选中需要打印的内容")
630
         this.$message.error("请选中需要打印的内容")
713
       this.getDrugWarehouseInfoPrint()
754
       this.getDrugWarehouseInfoPrint()
714
     },
755
     },
715
     changeText(event){
756
     changeText(event){
716
-      // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
757
+
758
+      var  textAreaList = this.textarea.split(",")
717
       if (event.key === 'Enter') {
759
       if (event.key === 'Enter') {
718
         var textarea = ""
760
         var textarea = ""
719
-        textarea += this.textarea + ","
720
-        this.textarea = textarea
721
-
761
+         textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
762
+         var  parts = textarea.split(',')
763
+         for(let i=0;i<textAreaList.length;i++){
764
+           if(parts[parts.length-2] == textAreaList[i]){
765
+              this.$message.error("该条码已经存在,不能重复扫码")
766
+           }
767
+         }
768
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
769
+        this.textarea = uniqueStr
722
       }
770
       }
771
+      // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
772
+      // if (event.key === 'Enter') {
773
+      //   var textarea = ""
774
+      //   textarea += this.textarea + ","
775
+      //   this.textarea = textarea
776
+
777
+      // }
723
    },
778
    },
724
     changeDrugCode(row,index){
779
     changeDrugCode(row,index){
725
       this.textarea=""
780
       this.textarea=""

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

253
       <el-pagination
253
       <el-pagination
254
         @size-change="handleSizeChange"
254
         @size-change="handleSizeChange"
255
         @current-change="handleCurrentChange"
255
         @current-change="handleCurrentChange"
256
-        :page-sizes="[10, 50, 100,1000,2000,3000,4000,5000,6000,7000]"
256
+        :page-sizes="[10, 50, 100,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]"
257
         :page-size="10"
257
         :page-size="10"
258
         background
258
         background
259
         style="margin-top:20px;float: right"
259
         style="margin-top:20px;float: right"

+ 34 - 16
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue View File

47
               :value="item.value">
47
               :value="item.value">
48
             </el-option>
48
             </el-option>
49
           </el-select>
49
           </el-select>
50
+          <span style="font-size:14px;color:#606266">库存预警:</span>
51
+          <el-select v-model="query_type" style="width:250px;margin-right:10px;" placeholder="请选择"
52
+          filterable
53
+           @change="changeGoodName">
54
+            <el-option
55
+              v-for="item in goodList"
56
+              :key="item.id"
57
+              :label="item.name"
58
+              :value="item.id">
59
+            </el-option>
60
+          </el-select>
50
           <el-input v-model="keyword" style="width:200px" placeholder="请输入药品名称或生产厂商" ></el-input>
61
           <el-input v-model="keyword" style="width:200px" placeholder="请输入药品名称或生产厂商" ></el-input>
51
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
62
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
52
          </div>
63
          </div>
178
      goodList:[
189
      goodList:[
179
       {id:1,name:"全部药品"},
190
       {id:1,name:"全部药品"},
180
       {id:2,name:"库存预警"},
191
       {id:2,name:"库存预警"},
192
+      {id:3,name:"库存为零"},
193
+      {id:4,name:"库存不为零"},
181
      ],
194
      ],
182
      houseList:[],
195
      houseList:[],
183
      storehouse_id:0,
196
      storehouse_id:0,
211
             return v.getTime() < 1667491200000
224
             return v.getTime() < 1667491200000
212
           },
225
           },
213
       },
226
       },
214
-     dealerList:[]
227
+     dealerList:[],
228
+     query_type:1,
215
     }
229
     }
216
 
230
 
217
   },
231
   },
218
   methods:{
232
   methods:{
233
+    changeGoodName(){
234
+      this.getlist()
235
+    },
219
     GetInitStartFlowPice(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
236
     GetInitStartFlowPice(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
220
      
237
      
221
       var total_one_price =0
238
       var total_one_price =0
417
           limit:this.limit,
434
           limit:this.limit,
418
           start_time:this.start_time,
435
           start_time:this.start_time,
419
           end_time:this.end_time,
436
           end_time:this.end_time,
437
+          query_type:this.query_type,
420
         }
438
         }
421
       getPurchaseNewDrugQuery(params).then(response=>{
439
       getPurchaseNewDrugQuery(params).then(response=>{
422
          if(response.data.state == 1){
440
          if(response.data.state == 1){
626
            
644
            
627
               list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
645
               list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
628
              
646
              
629
-              if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
647
+              if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
630
                 list[i].drugInMoney = ""
648
                 list[i].drugInMoney = ""
631
               }else{
649
               }else{
632
                 list[i].drugInMoney = list[i].last_price
650
                 list[i].drugInMoney = list[i].last_price
633
               }
651
               }
634
-              if(this.org_id == 10697){
652
+              if(this.org_id == 10697 || this.org_id == 9478){
635
                 list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
653
                 list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
636
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
654
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
637
               
655
               
638
                 list[i].drugSaleMoney =  this.GetInitStartFlowPice(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
656
                 list[i].drugSaleMoney =  this.GetInitStartFlowPice(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
639
               } else{
657
               } else{
644
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
662
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
645
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
663
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
646
               
664
               
647
-              if( this.org_id == 10697){
665
+              if( this.org_id == 10697 || this.org_id == 9478){
648
                  list[i].drugAddPrice = list[i].last_price
666
                  list[i].drugAddPrice = list[i].last_price
649
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
667
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
650
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id ==9478){
668
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
651
                 list[i].drugAddPrice = "/"
669
                 list[i].drugAddPrice = "/"
652
                 list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
670
                 list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
653
                 console.log("本期增加加淀粉",list[i].drugAddSalePrice)
671
                 console.log("本期增加加淀粉",list[i].drugAddSalePrice)
660
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
678
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
661
               list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
679
               list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
662
            
680
            
663
-              if( this.org_id == 10697){
664
-                list[i].drugOutPrice = list[i].retail_price
665
-                list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
666
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
681
+              if( this.org_id == 10697 || this.org_id == 9478){
682
+                list[i].drugOutPrice = list[i].last_price
683
+                list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].last_price).toFixed(2)
684
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
667
                 list[i].drugOutPrice = "/"
685
                 list[i].drugOutPrice = "/"
668
                 list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
686
                 list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
669
               } else{
687
               } else{
680
             }
698
             }
681
              
699
              
682
             list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
700
             list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
683
-            if(this.org_id == 10697){
684
-                list[i].overDrugPrice = list[i].retail_price
685
-                list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
686
-            }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752 || this.org_id == 9478){
701
+            if(this.org_id == 10697 || this.org_id == 9478){
702
+                list[i].overDrugPrice = list[i].last_price
703
+                list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].last_price).toFixed(2)
704
+            }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
687
               console.log("加个2323323",list[i].drugAddSalePrice)
705
               console.log("加个2323323",list[i].drugAddSalePrice)
688
                 list[i].overDrugPrice = ""
706
                 list[i].overDrugPrice = ""
689
                 list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
707
                 list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
694
            
712
            
695
             }
713
             }
696
             
714
             
697
-            if(this.org_id == 10697){
715
+            if(this.org_id == 10697 || this.org_id == 9478){
698
               if(list!=null && list.length>0){
716
               if(list!=null && list.length>0){
699
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
717
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
700
                 for(let i=0;i<list.length;i++){
718
                 for(let i=0;i<list.length;i++){
1575
 
1593
 
1576
    },
1594
    },
1577
    toPrint(){
1595
    toPrint(){
1578
-    this.$router.push({path:"/drugs/purchase/new/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
1596
+    this.$router.push({path:"/drugs/purchase/new/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type+"&query_type="+this.query_type})
1579
    },
1597
    },
1580
     exportList: function() {
1598
     exportList: function() {
1581
        for(let i=0;i<this.tableList.length;i++){
1599
        for(let i=0;i<this.tableList.length;i++){

+ 15 - 10
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue View File

122
           cancelCountList:[],
122
           cancelCountList:[],
123
           org_id:0,
123
           org_id:0,
124
           drugTypeList:[],
124
           drugTypeList:[],
125
-          dealerList:[]
125
+          dealerList:[],
126
+          query_type:0,
126
         }
127
         }
127
     },
128
     },
128
     methods:{
129
     methods:{
153
           limit:this.limit,
154
           limit:this.limit,
154
           start_time:this.start_time,
155
           start_time:this.start_time,
155
           end_time:this.end_time,
156
           end_time:this.end_time,
157
+          query_type:this.query_type,
156
         }
158
         }
157
       getPurchaseNewDrugQuery(params).then(response=>{
159
       getPurchaseNewDrugQuery(params).then(response=>{
158
          if(response.data.state == 1){
160
          if(response.data.state == 1){
363
                 list[i].drugInMoney = list[i].last_price
365
                 list[i].drugInMoney = list[i].last_price
364
               }
366
               }
365
 
367
 
366
-                if( this.org_id == 10697){
368
+                if( this.org_id == 10697 || this.org_id == 9478){
367
                   list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
369
                   list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
368
                 }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
370
                 }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
369
                   list[i].drugAddPrice = ""
371
                   list[i].drugAddPrice = ""
376
                 list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
378
                 list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
377
                
379
                
378
                
380
                
379
-                if(this.org_id == 10697){
381
+                if(this.org_id == 10697 || this.org_id ==9478){
380
                  list[i].drugAddPrice = list[i].last_price
382
                  list[i].drugAddPrice = list[i].last_price
381
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
383
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
382
                 }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
384
                 }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
393
                 
395
                 
394
               
396
               
395
 
397
 
396
-                if( this.org_id == 10697){
397
-                  list[i].drugOutPrice = list[i].retail_price
398
-                  list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
398
+                if( this.org_id == 10697 || this.org_id == 9478){
399
+                  list[i].drugOutPrice = list[i].last_price
400
+                  list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].last_price).toFixed(2)
399
                 }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
401
                 }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
400
                   list[i].drugOutPrice = "/"
402
                   list[i].drugOutPrice = "/"
401
                   list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
403
                   list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
412
                 }
414
                 }
413
                
415
                
414
                 list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
416
                 list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
415
-                if(this.org_id == 10697){
416
-                  list[i].overDrugPrice = list[i].retail_price
417
-                  list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
417
+                if(this.org_id == 10697 || this.org_id == 9478){
418
+                  list[i].overDrugPrice = list[i].last_price
419
+                  list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].last_price).toFixed(2)
418
                 }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
420
                 }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
419
                   list[i].overDrugPrice = ""
421
                   list[i].overDrugPrice = ""
420
                   list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
422
                   list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
423
                   list[i].oveDrugSaleMoney = "/"
425
                   list[i].oveDrugSaleMoney = "/"
424
                 }
426
                 }
425
             }
427
             }
426
-            if(this.org_id == 10697){
428
+            if(this.org_id == 10697 || this.org_id == 9478){
427
               if(list!=null && list.length>0){
429
               if(list!=null && list.length>0){
428
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
430
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
429
                 for(let i=0;i<list.length;i++){
431
                 for(let i=0;i<list.length;i++){
1655
       this.end_time = endtime
1657
       this.end_time = endtime
1656
       var good_type = parseInt(this.$route.query.good_type)
1658
       var good_type = parseInt(this.$route.query.good_type)
1657
       this.good_type = good_type
1659
       this.good_type = good_type
1660
+
1661
+      var query_type = parseInt(this.$route.query.query_type)
1662
+      this.query_type= query_type
1658
       var keyword = this.$route.query.keyword
1663
       var keyword = this.$route.query.keyword
1659
       this.keyword = keyword
1664
       this.keyword = keyword
1660
       this.page = parseInt(this.$route.query.page)
1665
       this.page = parseInt(this.$route.query.page)

+ 2 - 2
src/xt_pages/stock/drugs/drugInventoryModePrint.vue View File

429
                   arr[i].last_price = this.getBuyPrice(arr[i].drug_id)
429
                   arr[i].last_price = this.getBuyPrice(arr[i].drug_id)
430
                   arr[i].month_in_total_price = (this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)).toFixed(2)
430
                   arr[i].month_in_total_price = (this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)).toFixed(2)
431
                   arr[i].month_in_total_price_one =this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)
431
                   arr[i].month_in_total_price_one =this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)
432
-                  arr[i].retail_price = this.getRetailPrice(arr[i].retail_price)
432
+                  arr[i].retail_price = this.getRetailPrice(arr[i].drug_id)
433
                   arr[i].month_out_total_price = (this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)).toFixed(2)
433
                   arr[i].month_out_total_price = (this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)).toFixed(2)
434
                   
434
                   
435
                   arr[i].month_out_total_price_one =this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)
435
                   arr[i].month_out_total_price_one =this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)
804
           var min_price = ""
804
           var min_price = ""
805
           for(let i=0;i<this.drugList.length;i++){
805
           for(let i=0;i<this.drugList.length;i++){
806
             if(drug_id == this.drugList[i].id){
806
             if(drug_id == this.drugList[i].id){
807
-                min_price = this.drugList[i].min_price
807
+                min_price = this.drugList[i].last_price
808
             }
808
             }
809
           } 
809
           } 
810
           return min_price     
810
           return min_price     

+ 19 - 0
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

297
              {{ scope.row.drug_code }}
297
              {{ scope.row.drug_code }}
298
           </template>
298
           </template>
299
         </el-table-column>
299
         </el-table-column>
300
+        <el-table-column label="追溯码数量" align="center">
301
+          <template slot-scope="scope">
302
+            {{ getGoodCode(scope.row.drug_code) }}
303
+          </template>
304
+        </el-table-column>
300
         <el-table-column label="仓库名称" align="center">
305
         <el-table-column label="仓库名称" align="center">
301
           <template slot-scope="scope">
306
           <template slot-scope="scope">
302
             <span v-if="scope.row.is_total == 0">
307
             <span v-if="scope.row.is_total == 0">
574
   },
579
   },
575
 
580
 
576
   methods: {
581
   methods: {
582
+    getGoodCode(val){
583
+      var newArr = []
584
+      var total = 0
585
+      if(val!=undefined){
586
+        newArr = val.split(",") 
587
+        total = newArr.length - 1
588
+        if(total >0){
589
+          return  total
590
+        }else{
591
+        return ""
592
+        }
593
+      }
594
+     
595
+    },
577
     changeTypeName() {
596
     changeTypeName() {
578
       this.getlist();
597
       this.getlist();
579
     },
598
     },

+ 29 - 6
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

386
             </template>
386
             </template>
387
           </el-table-column>
387
           </el-table-column>
388
 
388
 
389
+          <el-table-column label="追溯码数量" width="150" align="center">
390
+            <template slot-scope="scope">
391
+              {{ getGoodCode(scope.row.drug_code) }}
392
+            </template>
393
+          </el-table-column>
394
+
389
           <el-table-column label="备注" width="150" align="center">
395
           <el-table-column label="备注" width="150" align="center">
390
             <template slot-scope="scope">
396
             <template slot-scope="scope">
391
               <el-input v-model="scope.row.remark"  placeholder="请输入备注"></el-input>
397
               <el-input v-model="scope.row.remark"  placeholder="请输入备注"></el-input>
604
     };
610
     };
605
   },
611
   },
606
   methods: {
612
   methods: {
613
+    getGoodCode(val){
614
+      var newArr = []
615
+      var total = 0
616
+      newArr = val.split(",") 
617
+      if(val!=undefined){
618
+        total = newArr.length - 1
619
+        if(total >0){
620
+          return  total
621
+        }else{
622
+        return ""
623
+        }
624
+      }
625
+      
626
+    },
607
     getTotal(){
627
     getTotal(){
608
       if(this.textarea!=null){
628
       if(this.textarea!=null){
609
         var  textAreaList = this.textarea.split(",")
629
         var  textAreaList = this.textarea.split(",")
1271
       }
1291
       }
1272
     },
1292
     },
1273
     changeText(event){
1293
     changeText(event){
1274
-      // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
1294
+      var  textAreaList = this.textarea.split(",")
1275
       if (event.key === 'Enter') {
1295
       if (event.key === 'Enter') {
1276
-        // var textarea = ""
1277
-        // textarea += this.textarea + ","
1278
-        // this.textarea = textarea
1279
         var textarea = ""
1296
         var textarea = ""
1280
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1297
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1281
-        this.textarea = textarea
1282
-
1298
+         var  parts = textarea.split(',')
1299
+         for(let i=0;i<textAreaList.length;i++){
1300
+           if(parts[parts.length-2] == textAreaList[i]){
1301
+              this.$message.error("该条码已经存在,不能重复扫码")
1302
+           }
1303
+         }
1304
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
1305
+        this.textarea = uniqueStr
1283
       }
1306
       }
1284
       this.getTotal()
1307
       this.getTotal()
1285
    },
1308
    },

+ 51 - 5
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

347
             </template>
347
             </template>
348
           </el-table-column>
348
           </el-table-column>
349
 
349
 
350
+          <el-table-column label="追溯码数量" width="150" align="center">
351
+            <template slot-scope="scope">
352
+              {{ getGoodCode(scope.row.drug_code) }}
353
+            </template>
354
+          </el-table-column>
355
+
350
           <el-table-column label="备注" width="150" align="center">
356
           <el-table-column label="备注" width="150" align="center">
351
             <template slot-scope="scope">
357
             <template slot-scope="scope">
352
               <el-input v-model="scope.row.remark"  placeholder="请输入备注" :disabled="disabled"></el-input>
358
               <el-input v-model="scope.row.remark"  placeholder="请输入备注" :disabled="disabled"></el-input>
403
       title="药品追溯码"
409
       title="药品追溯码"
404
       :visible.sync="dialogVisible"
410
       :visible.sync="dialogVisible"
405
       width="40%">
411
       width="40%">
412
+      <div style="margin-bottom: 10px;">
413
+        <span >追溯码个数:{{getTotal() }} 个</span>
414
+      </div>
406
       <span>
415
       <span>
407
         <el-input
416
         <el-input
408
          ref="inputRef"
417
          ref="inputRef"
534
     };
543
     };
535
   },
544
   },
536
   methods: {
545
   methods: {
546
+    getTotal(){
547
+      if(this.textarea!=null){
548
+        var  textAreaList = this.textarea.split(",")
549
+        console.log("textArrleti",textAreaList)
550
+        var arr = []
551
+        if(textAreaList!=null && textAreaList.length>0){
552
+          for(let i=0;i<textAreaList.length;i++){
553
+            if(textAreaList[i]!=""){
554
+              arr.push(textAreaList[i])
555
+            }
556
+          }
557
+          return  arr.length
558
+        }else{
559
+          return ""
560
+        }
561
+      
562
+      }
563
+
564
+    },
565
+    getGoodCode(val){
566
+      var newArr = []
567
+      var total = 0
568
+      if(val!=undefined){
569
+        newArr = val.split(",") 
570
+        total = newArr.length - 1
571
+        if(total >0){
572
+          return  total
573
+        }else{
574
+        return ""
575
+        }
576
+      }
577
+     
578
+    },
537
     openDialog(){
579
     openDialog(){
538
       this.$nextTick(() => {
580
       this.$nextTick(() => {
539
         this.$refs.inputRef.focus()
581
         this.$refs.inputRef.focus()
541
     },
583
     },
542
     changeText(event){
584
     changeText(event){
543
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
585
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
586
+      var  textAreaList = this.textarea.split(",")
544
       if (event.key === 'Enter') {
587
       if (event.key === 'Enter') {
545
-        // var textarea = ""
546
-        // textarea += this.textarea + ","
547
-        // this.textarea = textarea
548
         var textarea = ""
588
         var textarea = ""
549
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
589
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
550
-        this.textarea = textarea
551
-
590
+         var  parts = textarea.split(',')
591
+         for(let i=0;i<textAreaList.length;i++){
592
+           if(parts[parts.length-2] == textAreaList[i]){
593
+              this.$message.error("该条码已经存在,不能重复扫码")
594
+           }
595
+         }
596
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
597
+        this.textarea = uniqueStr
552
       }
598
       }
553
    },
599
    },
554
     changeDrugCode(row,index){
600
     changeDrugCode(row,index){

+ 23 - 2
src/xt_pages/stock/query/goodNewQuery.vue View File

27
               :value="item.id">
27
               :value="item.id">
28
             </el-option>
28
             </el-option>
29
           </el-select>
29
           </el-select>
30
+          <span style="font-size:14px;color:#606266">耗材类型:</span>
31
+          <el-select v-model="good_type_id" style="width:200px;margin-right:10px;" placeholder="请选择"
32
+          filterable
33
+           @change="changeGoodTypeName">
34
+            <el-option
35
+              v-for="item in goodTypeList"
36
+              :key="item.id"
37
+              :label="item.type_name"
38
+              :value="item.id">
39
+            </el-option>
40
+          </el-select>
30
           <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
41
           <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
31
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
42
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
32
          </div>
43
          </div>
438
      checkData:[],
449
      checkData:[],
439
      outData:[],
450
      outData:[],
440
      medicalInsuranceLevelList:[],
451
      medicalInsuranceLevelList:[],
452
+     good_type_id:0
441
     }
453
     }
442
   
454
   
443
   },
455
   },
444
   methods:{
456
   methods:{
457
+    changeGoodTypeName(){
458
+       this.getlist()
459
+    },
445
     getMedicalInsuranceLeve(id){
460
     getMedicalInsuranceLeve(id){
446
       var name = ""
461
       var name = ""
447
       for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
462
       for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
497
              this.houseList.push(houseList[i])
512
              this.houseList.push(houseList[i])
498
            }
513
            }
499
            this.manufacturerList = response.data.data.manufacturerList
514
            this.manufacturerList = response.data.data.manufacturerList
500
-           this.goodTypeList = response.data.data.goodTypeList
515
+           var obj = {id:0,type_name:"全部"}
516
+           this.goodTypeList.push(obj)
517
+           var goodTypeList = response.data.data.goodTypeList
518
+           for(let i=0;i<goodTypeList.length;i++){
519
+             this.goodTypeList.push(goodTypeList[i])
520
+            }
501
            this.patientList = response.data.data.patientList
521
            this.patientList = response.data.data.patientList
502
            this.dealerList = response.data.data.dealerList
522
            this.dealerList = response.data.data.dealerList
503
          }
523
          }
517
           limit:this.limit,
537
           limit:this.limit,
518
           start_time:this.start_time,
538
           start_time:this.start_time,
519
           end_time:this.end_time,
539
           end_time:this.end_time,
540
+          good_type_id:this.good_type_id,
520
         }
541
         }
521
       getGoodNewQuery(params).then(response=>{
542
       getGoodNewQuery(params).then(response=>{
522
          if(response.data.state == 1){
543
          if(response.data.state == 1){
985
         return jsonData.map(v => filterVal.map(j => v[j]));
1006
         return jsonData.map(v => filterVal.map(j => v[j]));
986
       },
1007
       },
987
       toPrint(){
1008
       toPrint(){
988
-        this.$router.push("/good/new/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type)
1009
+        this.$router.push("/good/new/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type+"&good_type_id="+this.good_type_id)
989
       },
1010
       },
990
       getCancelSotckInfo(arr){
1011
       getCancelSotckInfo(arr){
991
         var cancle_toal = 0
1012
         var cancle_toal = 0

+ 3 - 0
src/xt_pages/stock/query/goodNewQueryPrint.vue View File

375
       goodTypeList: [],
375
       goodTypeList: [],
376
       houseList: [],
376
       houseList: [],
377
       dealerList:[],
377
       dealerList:[],
378
+      good_type_id:0,
378
     };
379
     };
379
   },
380
   },
380
   methods: {
381
   methods: {
415
         limit: this.limit,
416
         limit: this.limit,
416
         start_time: this.start_time,
417
         start_time: this.start_time,
417
         end_time: this.end_time,
418
         end_time: this.end_time,
419
+        good_type_id:this.good_type_id,
418
       };
420
       };
419
       getGoodNewQuery(params).then((response) => {
421
       getGoodNewQuery(params).then((response) => {
420
         if (response.data.state == 1) {
422
         if (response.data.state == 1) {
861
     this.keyword = keyword;
863
     this.keyword = keyword;
862
     this.page = parseInt(this.$route.query.page);
864
     this.page = parseInt(this.$route.query.page);
863
     this.limit = parseInt(this.$route.query.limit);
865
     this.limit = parseInt(this.$route.query.limit);
866
+    this.good_type_id = parseInt(this.$route.query.good_type_id)
864
     this.getStorehouseList();
867
     this.getStorehouseList();
865
     this.getlist();
868
     this.getlist();
866
   },
869
   },

+ 37 - 20
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

37
               :clearable="false"
37
               :clearable="false"
38
           ></el-date-picker>  
38
           ></el-date-picker>  
39
           <el-button  type="primary" icon="el-icon-search" @click="getAllQuery">查询</el-button>
39
           <el-button  type="primary" icon="el-icon-search" @click="getAllQuery">查询</el-button>
40
+          <span style="font-size:14px;color:#606266">库存预警:</span>
41
+          <el-select v-model="query_type" style="width:250px;margin-right:10px;" placeholder="请选择"
42
+          filterable
43
+           @change="changeGoodName">
44
+            <el-option
45
+              v-for="item in goodList"
46
+              :key="item.id"
47
+              :label="item.name"
48
+              :value="item.id">
49
+            </el-option>
50
+          </el-select>
40
           <span style="font-size:14px;color:#606266">耗材类型:</span>
51
           <span style="font-size:14px;color:#606266">耗材类型:</span>
41
           <el-select v-model="good_type" style="width:200px;margin-right:10px;" placeholder="请选择"
52
           <el-select v-model="good_type" style="width:200px;margin-right:10px;" placeholder="请选择"
42
           filterable
53
           filterable
184
      goodList:[
195
      goodList:[
185
       {id:1,name:"全部耗材"},
196
       {id:1,name:"全部耗材"},
186
       {id:2,name:"库存预警"},
197
       {id:2,name:"库存预警"},
198
+      {id:3,name:"库存为零"},
199
+      {id:4,name:"库存不为零"},
187
      ],
200
      ],
188
      houseList:[],
201
      houseList:[],
189
      storehouse_id:0,
202
      storehouse_id:0,
218
           },
231
           },
219
       },
232
       },
220
      dealerList:[],
233
      dealerList:[],
221
-     medicalInsuranceLevelList:[]
234
+     medicalInsuranceLevelList:[],
235
+     query_type:1
222
     }
236
     }
223
   
237
   
224
   },
238
   },
225
   methods:{
239
   methods:{
226
-    
240
+    changeGoodName(){
241
+      this.getlist()
242
+    },
227
     changeStorehouseName(){
243
     changeStorehouseName(){
228
 
244
 
229
     },
245
     },
260
           limit:this.limit,
276
           limit:this.limit,
261
           start_time:this.start_time,
277
           start_time:this.start_time,
262
           end_time:this.end_time,
278
           end_time:this.end_time,
279
+          query_type:this.query_type,
263
         }
280
         }
264
       getNewPurchaseStockQuery(params).then(response=>{
281
       getNewPurchaseStockQuery(params).then(response=>{
265
          if(response.data.state == 1){
282
          if(response.data.state == 1){
290
                
307
                
291
               }
308
               }
292
              
309
              
293
-               if(this.org_id ==10697 || this.org_id == 0){
310
+               if(this.org_id ==10697 || this.org_id == 0 || this.org_id == 9478){
294
                   list[i].stock_in_price = list[i].buy_price
311
                   list[i].stock_in_price = list[i].buy_price
295
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
312
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
296
                }else if(this.org_id ==9671){
313
                }else if(this.org_id ==9671){
297
                 list[i].stock_in_price = list[i].buy_price
314
                 list[i].stock_in_price = list[i].buy_price
298
                 list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
315
                 list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
299
-               }else if(this.org_id == 10644 || this.org_id == 10752){
316
+               }else if(this.org_id == 10644){
300
                  list[i].stock_in_price = "/"
317
                  list[i].stock_in_price = "/"
301
                  console.log("val1",this.getAllStockInPrice(list[i].StWarehousingInfoTwo))
318
                  console.log("val1",this.getAllStockInPrice(list[i].StWarehousingInfoTwo))
302
                  console.log("val2",this.getAllStockInFlowPrice(list[i].WareStartInStockFlow))
319
                  console.log("val2",this.getAllStockInFlowPrice(list[i].WareStartInStockFlow))
319
               
336
               
320
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
337
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
321
 
338
 
322
-              if(this.org_id ==10697){
339
+              if(this.org_id ==10697  || this.org_id ==9478 ){
323
                list[i].addStockMoney = list[i].buy_price 
340
                list[i].addStockMoney = list[i].buy_price 
324
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
341
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
325
               }else if(this.org_id == 0){
342
               }else if(this.org_id == 0){
326
                 list[i].addStockMoney = list[i].buy_price 
343
                 list[i].addStockMoney = list[i].buy_price 
327
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
344
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
328
-              } else if(this.org_id == 10644 || this.org_id == 10752 || this.org_id ==9478 ){
345
+              } else if(this.org_id == 10644 || this.org_id == 10752){
329
                 list[i].addStockMoney = "/"
346
                 list[i].addStockMoney = "/"
330
                 list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
347
                 list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
331
               } else{
348
               } else{
335
              
352
              
336
 
353
 
337
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
354
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
338
-              if(this.org_id == 10697){
339
-                list[i].stockOutprice = list[i].packing_price
340
-                list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
355
+              if(this.org_id == 10697 || this.org_id == 9478){
356
+                list[i].stockOutprice = list[i].buy_price
357
+                list[i].saleOutMoney = (list[i].buy_price * list[i].outStock).toFixed(2)
341
               }else if(this.org_id == 0){
358
               }else if(this.org_id == 0){
342
-                list[i].stockOutprice = list[i].packing_price
343
-                list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
344
-              }else if(this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
359
+                list[i].stockOutprice = list[i].buy_price
360
+                list[i].saleOutMoney = (list[i].buy_price * list[i].outStock).toFixed(2)
361
+              }else if(this.org_id == 10644 || this.org_id == 10752 ){
345
                 list[i].stockOutprice = "/"
362
                 list[i].stockOutprice = "/"
346
                 list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
363
                 list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
347
                 if(list[i].saleOutMoney == "NaN"){
364
                 if(list[i].saleOutMoney == "NaN"){
366
                
383
                
367
               }
384
               }
368
             
385
             
369
-              if(this.org_id ==10697){
370
-                list[i].overPrice = list[i].packing_price
371
-                list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
386
+              if(this.org_id ==10697 || this.org_id == 9478){
387
+                list[i].overPrice = list[i].buy_price
388
+                list[i].overMoney = (list[i].buy_price*list[i].overStock).toFixed(2)
372
               }else if(this.org_id == 0){
389
               }else if(this.org_id == 0){
373
                 list[i].overPrice = list[i].GoodEndFlowInfo.buy_price
390
                 list[i].overPrice = list[i].GoodEndFlowInfo.buy_price
374
                 list[i].overMoney = (list[i].GoodEndFlowInfo.buy_price*list[i].overStock).toFixed(2)
391
                 list[i].overMoney = (list[i].GoodEndFlowInfo.buy_price*list[i].overStock).toFixed(2)
375
-              } else if(this.org_id ==10644 || this.org_id == 10752 || this.org_id == 9478){
392
+              } else if(this.org_id ==10644 || this.org_id == 10752){
376
                 list[i].overPrice = "/"
393
                 list[i].overPrice = "/"
377
                 list[i].overMoney = (parseFloat(list[i].stockMoney)  + parseFloat(list[i].saleStockMoney) - parseFloat(list[i].saleOutMoney)).toFixed(2)
394
                 list[i].overMoney = (parseFloat(list[i].stockMoney)  + parseFloat(list[i].saleStockMoney) - parseFloat(list[i].saleOutMoney)).toFixed(2)
378
               }else{
395
               }else{
386
 
403
 
387
             var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
404
             var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
388
           
405
           
389
-            if(this.org_id == 0 || this.org_id == 10697){
406
+            if(this.org_id == 0 || this.org_id == 10697 || this.org_id == 9478){
390
               if(list.length!=null){
407
               if(list.length!=null){
391
                 for(let i=0;i<list.length;i++){
408
                 for(let i=0;i<list.length;i++){
392
                  
409
                  
1170
      }
1187
      }
1171
    },
1188
    },
1172
    toPrint(){
1189
    toPrint(){
1173
-    this.$router.push({path:"/purchase/new/stock/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
1190
+    this.$router.push({path:"/purchase/new/stock/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type+"&query_type="+this.query_type})
1174
    },
1191
    },
1175
    exportList: function() {
1192
    exportList: function() {
1176
 
1193
 
1177
-       if(this.org_id!=0&& this.org_id!=9956 && this.org_id!=10697 && this.org_id!=10375){
1194
+       if(this.org_id!=0&& this.org_id!=9956 && this.org_id!=10697 && this.org_id!=10375 && this.org_id!=9478){
1178
          
1195
          
1179
         for(let i=0;i<this.tableList.length;i++){
1196
         for(let i=0;i<this.tableList.length;i++){
1180
           this.tableList[i].index = i+1
1197
           this.tableList[i].index = i+1
1236
         })
1253
         })
1237
        }
1254
        }
1238
 
1255
 
1239
-       if(this.org_id == 10697 || this.org_id == 0 || this.org_id == 10375){
1256
+       if(this.org_id == 10697 || this.org_id == 0 || this.org_id == 10375 || this.org_id == 9478){
1240
         
1257
         
1241
         for(let i=0;i<this.tableList.length;i++){
1258
         for(let i=0;i<this.tableList.length;i++){
1242
           this.tableList[i].index = i+1
1259
           this.tableList[i].index = i+1

+ 12 - 10
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue View File

125
           cancelCountList:[],
125
           cancelCountList:[],
126
           org_id:0,
126
           org_id:0,
127
           goodTypeList:[],
127
           goodTypeList:[],
128
-          dealerList:[]
128
+          dealerList:[],
129
+          query_type:0,
129
         }
130
         }
130
     },
131
     },
131
     methods:{
132
     methods:{
163
             limit:this.limit,
164
             limit:this.limit,
164
             start_time:this.start_time,
165
             start_time:this.start_time,
165
             end_time:this.end_time,
166
             end_time:this.end_time,
167
+            query_type:this.query_type,
166
             }
168
             }
167
         getNewPurchaseStockQuery(params).then(response=>{
169
         getNewPurchaseStockQuery(params).then(response=>{
168
             if(response.data.state == 1){
170
             if(response.data.state == 1){
184
                       }
186
                       }
185
                     }
187
                     }
186
                     
188
                     
187
-                    if(this.org_id == 0 || this.org_id ==10697){
189
+                    if(this.org_id == 0 || this.org_id ==10697 || this.org_id == 9478){
188
                       list[i].stock_in_price = list[i].buy_price
190
                       list[i].stock_in_price = list[i].buy_price
189
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
191
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
190
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
192
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
201
                     
203
                     
202
                     list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
204
                     list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
203
                    
205
                    
204
-                    if(this.org_id == 0 || this.org_id ==10697){
206
+                    if(this.org_id == 0 || this.org_id ==10697 || this.org_id == 9478){
205
                         list[i].addStockMoney = list[i].buy_price 
207
                         list[i].addStockMoney = list[i].buy_price 
206
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
208
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
207
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
209
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
217
                     list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
219
                     list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
218
                    
220
                    
219
                      
221
                      
220
-                    if(this.org_id == 0 || this.org_id == 10697){
221
-                      list[i].stockOutprice = list[i].packing_price
222
-                      list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
222
+                    if(this.org_id == 0 || this.org_id == 10697 || this.org_id == 9478){
223
+                      list[i].stockOutprice = list[i].buy_price
224
+                      list[i].saleOutMoney = (list[i].buy_price * list[i].outStock).toFixed(2)
223
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
225
                     }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
224
                       list[i].stockOutprice = "/"
226
                       list[i].stockOutprice = "/"
225
                       list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
227
                       list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
238
                         list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
240
                         list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
239
                     } 
241
                     } 
240
                   
242
                   
241
-                    if(this.org_id == 0 || this.org_id ==10697){
242
-                      list[i].overPrice = list[i].packing_price
243
-                      list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
243
+                    if(this.org_id == 0 || this.org_id ==10697 || this.org_id == 9478){
244
+                      list[i].overPrice = list[i].buy_price
245
+                      list[i].overMoney = (list[i].buy_price*list[i].overStock).toFixed(2)
244
                      }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
246
                      }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
245
                       list[i].overPrice = "/"
247
                       list[i].overPrice = "/"
246
                       console.log("stockMoney-00000000000000",list[i].stockMoney)
248
                       console.log("stockMoney-00000000000000",list[i].stockMoney)
260
                
262
                
261
                var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
263
                var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
262
           
264
           
263
-                if(this.org_id == 0 || this.org_id == 10697){
265
+                if(this.org_id == 0 || this.org_id == 10697 || this.org_id == 9478){
264
                   if(list.length!=null){
266
                   if(list.length!=null){
265
                     for(let i=0;i<list.length;i++){
267
                     for(let i=0;i<list.length;i++){
266
                     
268
                     

+ 19 - 1
src/xt_pages/stock/stockInOrder.vue View File

369
             </span>
369
             </span>
370
           </template>
370
           </template>
371
         </el-table-column>
371
         </el-table-column>
372
+        <el-table-column label="耗材追溯码个数" align="center">
373
+          <template slot-scope="scope">
374
+            <span v-if="scope.row.is_total == 0">
375
+               {{ getGoodCodeSumCount(scope.row.good_code)}}
376
+            </span>
377
+          </template>
378
+        </el-table-column>
372
         <el-table-column label="备注" align="center">
379
         <el-table-column label="备注" align="center">
373
           <template slot-scope="scope">
380
           <template slot-scope="scope">
374
             <span v-if="scope.row.is_total == 0">
381
             <span v-if="scope.row.is_total == 0">
915
 
922
 
916
   },
923
   },
917
   methods: {
924
   methods: {
918
-          changeTypeName() {
925
+   getGoodCodeSumCount(val){
926
+     var total = []
927
+     if(val!=null && val.length>0){
928
+        total = val.split(",")
929
+     }
930
+     if(total !="" ){
931
+        return total.length-1
932
+     }else{
933
+        return ""
934
+     }
935
+   },
936
+   changeTypeName() {
919
       this.getlist();
937
       this.getlist();
920
     },
938
     },
921
     getlist() {
939
     getlist() {

+ 57 - 10
src/xt_pages/stock/stockInOrderAdd.vue View File

270
 
270
 
271
           </el-table-column>
271
           </el-table-column>
272
 
272
 
273
+          <el-table-column label="追溯码数量" align="center" width="150">
274
+           
275
+           <template slot-scope="scope">
276
+               {{ getGoodCode(scope.row.good_code)  }}
277
+           </template>
278
+       
279
+         </el-table-column>
280
+
273
           <el-table-column label="备注" align="center" width="150">
281
           <el-table-column label="备注" align="center" width="150">
274
             <template slot-scope="scope">
282
             <template slot-scope="scope">
275
               <el-input placeholder="请输入备注" v-model="scope.row.remark"></el-input>
283
               <el-input placeholder="请输入备注" v-model="scope.row.remark"></el-input>
313
        @open="openDialog"
321
        @open="openDialog"
314
       :visible.sync="dialogVisible"
322
       :visible.sync="dialogVisible"
315
       width="40%">
323
       width="40%">
324
+      <div style="margin-bottom: 10px;">
325
+        <span >追溯码个数:{{getTotal() }} 个</span>
326
+      </div>
316
       <span>
327
       <span>
317
         <el-input
328
         <el-input
318
          ref="inputRef"
329
          ref="inputRef"
434
             remark: '',
445
             remark: '',
435
             dealer: '',
446
             dealer: '',
436
             manufacturer: '',
447
             manufacturer: '',
437
-            good_code:""
448
+            good_code:"",
449
+            good_code_count:""
438
           },
450
           },
439
           isCreated: 1
451
           isCreated: 1
440
 
452
 
479
         dialogVisible:false,
491
         dialogVisible:false,
480
         currentRow:{},
492
         currentRow:{},
481
         currentIndex:0,
493
         currentIndex:0,
482
-        textarea:""
483
-
494
+        textarea:"",
484
       }
495
       }
485
     },
496
     },
486
     methods: {
497
     methods: {
498
+      getTotal(){
499
+        if(this.textarea!=null){
500
+          var  textAreaList = this.textarea.split(",")
501
+          console.log("textArrleti",textAreaList)
502
+          var arr = []
503
+          if(textAreaList!=null && textAreaList.length>0){
504
+            for(let i=0;i<textAreaList.length;i++){
505
+              if(textAreaList[i]!=""){
506
+                arr.push(textAreaList[i])
507
+              }
508
+            }
509
+            return  arr.length
510
+          }else{
511
+            return ""
512
+          }
513
+        
514
+        }
515
+      },
487
       openDialog(){
516
       openDialog(){
488
        this.$nextTick(() => {
517
        this.$nextTick(() => {
489
         this.$refs.inputRef.focus()
518
         this.$refs.inputRef.focus()
644
         tempObj['register_number'] = ''
673
         tempObj['register_number'] = ''
645
         tempObj['good_code'] = ""
674
         tempObj['good_code'] = ""
646
         tempObj['good_code_cnt'] = ''
675
         tempObj['good_code_cnt'] = ''
647
-
676
+        tempObj["good_code_count"] =''
648
         this.recordInfo.recordData.push(tempObj)
677
         this.recordInfo.recordData.push(tempObj)
649
       }, handleDelete: function(index, row) {
678
       }, handleDelete: function(index, row) {
650
         if (this.recordInfo.recordData.length <= 1) {
679
         if (this.recordInfo.recordData.length <= 1) {
1065
         this.dialogVisible = true
1094
         this.dialogVisible = true
1066
      },
1095
      },
1067
      changeText(event){
1096
      changeText(event){
1068
-      // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
1069
-    
1070
-      if (event.key === 'Enter') {
1071
 
1097
 
1098
+      var  textAreaList = this.textarea.split(",")
1099
+      if (event.key === 'Enter') {
1072
         var textarea = ""
1100
         var textarea = ""
1073
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1101
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1074
-        this.textarea = textarea
1075
-
1102
+         var  parts = textarea.split(',')
1103
+         for(let i=0;i<textAreaList.length;i++){
1104
+           if(parts[parts.length-2] == textAreaList[i]){
1105
+              this.$message.error("该条码已经存在,不能重复扫码")
1106
+           }
1107
+         }
1108
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
1109
+        this.textarea = uniqueStr
1076
       }
1110
       }
1077
      },
1111
      },
1078
      saveTextArea(){
1112
      saveTextArea(){
1079
         for(let i=0;i<this.recordInfo.recordData.length;i++){
1113
         for(let i=0;i<this.recordInfo.recordData.length;i++){
1080
           if(this.currentIndex == i){
1114
           if(this.currentIndex == i){
1081
             this.recordInfo.recordData[i].good_code = this.textarea
1115
             this.recordInfo.recordData[i].good_code = this.textarea
1082
-
1116
+            this.recordInfo.recordData[i].good_code_count = this.getTotal()
1083
             // 去除换行符
1117
             // 去除换行符
1084
             let noNewLineStr = this.textarea.replace(/\n/g, "");
1118
             let noNewLineStr = this.textarea.replace(/\n/g, "");
1085
             // 按逗号分割成数组
1119
             // 按逗号分割成数组
1096
         }
1130
         }
1097
         this.dialogVisible = false
1131
         this.dialogVisible = false
1098
       },
1132
       },
1133
+     getGoodCode(val){
1134
+        var newArr = []
1135
+        var total = 0
1136
+        if(val!=undefined){
1137
+          newArr = val.split(",") 
1138
+          total = newArr.length - 1
1139
+          if(total >0){
1140
+            return  total
1141
+          }else{
1142
+            return ""
1143
+          }
1144
+        }
1145
+     }
1099
     }
1146
     }
1100
     ,
1147
     ,
1101
     created() {
1148
     created() {

+ 66 - 5
src/xt_pages/stock/stockInOrderEdit.vue View File

310
               </div>
310
               </div>
311
            </template>
311
            </template>
312
        
312
        
313
+         </el-table-column>
314
+
315
+         <el-table-column label="追溯码数量" align="center" width="150">
316
+           
317
+           <template slot-scope="scope">
318
+               {{ getGoodCode(scope.row.good_code) }}
319
+           </template>
320
+       
313
          </el-table-column>
321
          </el-table-column>
314
 
322
 
315
 
323
 
366
       title="耗材追溯码"
374
       title="耗材追溯码"
367
       :visible.sync="dialogVisible"
375
       :visible.sync="dialogVisible"
368
       width="40%">
376
       width="40%">
377
+      <div style="margin-bottom: 10px;">
378
+        <span >追溯码个数:{{getTotal() }} 个</span>
379
+      </div>
369
       <span>
380
       <span>
370
         <el-input
381
         <el-input
371
          @keyup.native="changeText"
382
          @keyup.native="changeText"
491
     };
502
     };
492
   },
503
   },
493
   methods: {
504
   methods: {
505
+    changeText(event){
506
+      var  textAreaList = this.textarea.split(",")
507
+      if (event.key === 'Enter') {
508
+        var textarea = ""
509
+        textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
510
+        var  parts = textarea.split(',')
511
+        for(let i=0;i<textAreaList.length;i++){
512
+          if(parts[parts.length-2] == textAreaList[i]){
513
+              this.$message.error("该条码已经存在,不能重复扫码")
514
+          }
515
+        }
516
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
517
+        this.textarea = uniqueStr
518
+      }
519
+    },
520
+    getGoodCode(val){
521
+      var newArr = []
522
+      var total = 0
523
+      if(val!=undefined){
524
+        newArr = val.split(",") 
525
+        total = newArr.length - 1
526
+        if(total >0){
527
+          return  total
528
+        }else{
529
+        return ""
530
+       }
531
+      }
532
+     
533
+    },
534
+    getTotal(){
535
+      if(this.textarea!=null){
536
+        var  textAreaList = this.textarea.split(",")
537
+        var arr = []
538
+        if(textAreaList!=null && textAreaList.length>0){
539
+          for(let i=0;i<textAreaList.length;i++){
540
+            if(textAreaList[i]!=""){
541
+              arr.push(textAreaList[i])
542
+            }
543
+          }
544
+          return  arr.length
545
+        }else{
546
+          return ""
547
+        }
548
+      
549
+      }
550
+     },
494
     comfirm: function(val) {
551
     comfirm: function(val) {
495
       this.$refs.dialog.hide();
552
       this.$refs.dialog.hide();
496
       this.propForm.goodType = [];
553
       this.propForm.goodType = [];
1060
      },
1117
      },
1061
      changeText(event){
1118
      changeText(event){
1062
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
1119
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
1120
+      var  textAreaList = this.textarea.split(",")
1063
       if (event.key === 'Enter') {
1121
       if (event.key === 'Enter') {
1064
-        // var textarea = ""
1065
-        // textarea += this.textarea + ","
1066
-        // this.textarea = textarea
1067
         var textarea = ""
1122
         var textarea = ""
1068
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1123
          textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1069
-        this.textarea = textarea
1070
-
1124
+         var  parts = textarea.split(',')
1125
+         for(let i=0;i<textAreaList.length;i++){
1126
+           if(parts[parts.length-2] == textAreaList[i]){
1127
+              this.$message.error("该条码已经存在,不能重复扫码")
1128
+           }
1129
+         }
1130
+        const uniqueStr = [...new Set(textarea.split(','))].join(',');
1131
+        this.textarea = uniqueStr
1071
       }
1132
       }
1072
      },
1133
      },
1073
      saveTextArea(){
1134
      saveTextArea(){

+ 3 - 3
src/xt_pages/stock/stockInventoryModePrint.vue View File

101
               </td>
101
               </td>
102
               <td align="center">
102
               <td align="center">
103
                 <span v-if="item.is_total == 0"> {{ getPackingPrice(item.good_id) }}</span>
103
                 <span v-if="item.is_total == 0"> {{ getPackingPrice(item.good_id) }}</span>
104
-                <span v-if="item.is_total == 1"> {{ item.packing_price }}</span>
104
+                <span v-if="item.is_total == 1"> {{ item.buy_price }}</span>
105
               </td>
105
               </td>
106
               <td align="center">
106
               <td align="center">
107
                 <span v-if="item.is_total == 0"> {{ (getOutCount(item.good_id) * getPackingPrice(item.good_id)).toFixed(2)
107
                 <span v-if="item.is_total == 0"> {{ (getOutCount(item.good_id) * getPackingPrice(item.good_id)).toFixed(2)
514
       var packing_price = ""
514
       var packing_price = ""
515
       for (let i = 0; i < this.goodInfo.length; i++) {
515
       for (let i = 0; i < this.goodInfo.length; i++) {
516
         if (good_id == this.goodInfo[i].id) {
516
         if (good_id == this.goodInfo[i].id) {
517
-          packing_price = this.goodInfo[i].packing_price
517
+          packing_price = this.goodInfo[i].buy_price
518
         }
518
         }
519
       }
519
       }
520
       return packing_price
520
       return packing_price
556
       var packing_price = ""
556
       var packing_price = ""
557
       for (let i = 0; i < this.goodInfo.length; i++) {
557
       for (let i = 0; i < this.goodInfo.length; i++) {
558
         if (good_id == this.goodInfo[i].id) {
558
         if (good_id == this.goodInfo[i].id) {
559
-          packing_price = this.goodInfo[i].packing_price
559
+          packing_price = this.goodInfo[i].buy_price
560
         }
560
         }
561
       }
561
       }
562
       return packing_price
562
       return packing_price

+ 24 - 2
src/xt_pages/user/Informed/Informedconsent.vue View File

167
                 <div v-if="template_id==27">
167
                 <div v-if="template_id==27">
168
                   <informef_Twentysevre></informef_Twentysevre>
168
                   <informef_Twentysevre></informef_Twentysevre>
169
                 </div>
169
                 </div>
170
+
171
+                <div v-if="template_id==30">
172
+                  <informef_Thrity></informef_Thrity>
173
+                </div> 
174
+
175
+                <div v-if="template_id==31">
176
+                  <informef_Thrity_One></informef_Thrity_One>
177
+                </div> 
178
+
179
+                <div v-if="template_id==32">
180
+                  <informef_Thrity_Two></informef_Thrity_Two>
181
+                </div> 
170
               </div>
182
               </div>
171
             </div>
183
             </div>
172
           </el-tab-pane>
184
           </el-tab-pane>
205
 import informef_Twentyfive from './components/informef_Twentyfive'
217
 import informef_Twentyfive from './components/informef_Twentyfive'
206
 import informef_Twentysix from './components/informef_Twentysix'
218
 import informef_Twentysix from './components/informef_Twentysix'
207
 import informef_Twentysevre from './components/informef_Twentysevre'
219
 import informef_Twentysevre from './components/informef_Twentysevre'
220
+import informef_Thrity from './components/informef_Thrity'
221
+import informef_Thrity_One  from './components/informef_Thrity_One.vue'
222
+import informef_Thrity_Two  from './components/informef_Thrity_Two.vue'
208
 import { getPatientDetailInformedconsent,getFallOutBedPrintList,getFilterInformed,getProfundaInformed,
223
 import { getPatientDetailInformedconsent,getFallOutBedPrintList,getFilterInformed,getProfundaInformed,
209
   getArterOvernous,getHighRiskInformed,getPatientMeDicalList,getAnticoagulationInformed,getCriticalInformed,
224
   getArterOvernous,getHighRiskInformed,getPatientMeDicalList,getAnticoagulationInformed,getCriticalInformed,
210
   getHemoperfusionInformed,getInformedConsent,getCatheterization,getDialyzerInformed, getTherapyInformed,
225
   getHemoperfusionInformed,getInformedConsent,getCatheterization,getDialyzerInformed, getTherapyInformed,
237
     informef_Twentyfour,
252
     informef_Twentyfour,
238
     informef_Twentyfive,
253
     informef_Twentyfive,
239
     informef_Twentysix,
254
     informef_Twentysix,
240
-    informef_Twentysevre
255
+    informef_Twentysevre,
256
+    informef_Thrity,
257
+    informef_Thrity_One,
258
+    informef_Thrity_Two
241
   },
259
   },
242
   data() {
260
   data() {
243
     return {
261
     return {
253
                 // {date:'疾病诊断证明书',value:'17'},{date:'无肝素血液透析风险知情同意书',value:'18'},
271
                 // {date:'疾病诊断证明书',value:'17'},{date:'无肝素血液透析风险知情同意书',value:'18'},
254
                 // {date:'连续肾脏替代治疗(CRRT)治疗知情同意书',value:'19'},{date:'患方要求终止治疗及风险、责任承担承诺书',value:'20'},
272
                 // {date:'连续肾脏替代治疗(CRRT)治疗知情同意书',value:'19'},{date:'患方要求终止治疗及风险、责任承担承诺书',value:'20'},
255
                 // {date:'血液透析知情同意书',value:'21'}
273
                 // {date:'血液透析知情同意书',value:'21'}
256
-                {date:'死亡病例讨论记录',value:'22'},{date:'拒绝或放弃医学治疗告知书',value:'23'},
274
+                {date:'死亡病例讨论记录',value:'22'},
275
+                {date:'拒绝或放弃医学治疗告知书',value:'23'},
257
                 // {date:'静脉留置导管护理宣教',value:'24'},{date:'血液净化中心首次透析病人护理宣教单',value:'25'},
276
                 // {date:'静脉留置导管护理宣教',value:'24'},{date:'血液净化中心首次透析病人护理宣教单',value:'25'},
258
                 // {date:'血液净化中心饮食宣教单',value:'26'},{date:'动静脉内瘘护理宣教单',value:'27'}
277
                 // {date:'血液净化中心饮食宣教单',value:'26'},{date:'动静脉内瘘护理宣教单',value:'27'}
278
+                // {date:"血液净化抗凝治疗知情同意书",value:'30'},{date:"血液透析患者须知",value:'31'},
279
+                // {date:"授权委托书",value:'32'}
280
+
259
       ],
281
       ],
260
 
282
 
261
       face_show:true,
283
       face_show:true,

+ 365 - 0
src/xt_pages/user/Informed/components/informef_Thrity.vue View File

1
+<template>
2
+  <div class="anticoagulation-consent">
3
+    <div class="toolbar">
4
+      <el-button type="primary" size="small" @click="editContent">编辑内容</el-button>
5
+      <el-button type="success" size="small" @click="printDocument">打印文档</el-button>
6
+      <el-button size="small" @click="resetForm">重置表单</el-button>
7
+    </div>
8
+
9
+    <div id="printable-content" class="document-container">
10
+      <h1 class="document-title">血液净化抗凝治疗知情同意书</h1>
11
+
12
+      <!-- 患者信息表格 -->
13
+      <table class="patient-info-table">
14
+        <tr>
15
+          <td width="25%"><strong>患者姓名</strong>: {{ form.patientName || '_________________' }}</td>
16
+          <td width="25%"><strong>性别</strong>: {{ form.gender || '______' }}</td>
17
+          <td width="25%"><strong>年龄</strong>: {{ form.age || '______' }}</td>
18
+          <td width="25%"><strong>病案号</strong>: {{ form.medicalRecordNo || '_________________' }}</td>
19
+        </tr>
20
+      </table>
21
+
22
+      <!-- 富文本内容区域 -->
23
+      <div class="rich-text-content" v-html="formattedContent"></div>
24
+    </div>
25
+
26
+    <!-- 富文本编辑器弹窗 -->
27
+    <el-dialog
28
+      title="编辑知情同意书内容"
29
+      :visible.sync="editorVisible"
30
+      width="80%"
31
+      top="5vh"
32
+    >
33
+      <keep-alive>
34
+        <editor ref="editor"
35
+                id="editor"
36
+                style="width: 100%"
37
+                v-bind:r_content="defaultContent">
38
+        </editor>
39
+      </keep-alive>
40
+      <span slot="footer" class="dialog-footer">
41
+        <el-button @click="editorVisible = false">取消</el-button>
42
+        <el-button type="primary" @click="saveContent">保存</el-button>
43
+      </span>
44
+    </el-dialog>
45
+
46
+    <!-- 患者信息编辑弹窗 -->
47
+    <el-dialog
48
+      title="编辑患者信息"
49
+      :visible.sync="patientInfoVisible"
50
+      width="50%"
51
+    >
52
+      <el-form label-width="100px">
53
+        <el-form-item label="患者姓名">
54
+          <el-input v-model="form.patientName"></el-input>
55
+        </el-form-item>
56
+        <el-form-item label="性别">
57
+          <el-select v-model="form.gender">
58
+            <el-option label="男" value="男"></el-option>
59
+            <el-option label="女" value="女"></el-option>
60
+          </el-select>
61
+        </el-form-item>
62
+        <el-form-item label="年龄">
63
+          <el-input v-model="form.age" type="number"></el-input>
64
+        </el-form-item>
65
+        <el-form-item label="病案号">
66
+          <el-input v-model="form.medicalRecordNo"></el-input>
67
+        </el-form-item>
68
+      </el-form>
69
+      <span slot="footer" class="dialog-footer">
70
+        <el-button @click="patientInfoVisible = false">取消</el-button>
71
+        <el-button type="primary" @click="savePatientInfo">保存</el-button>
72
+      </span>
73
+    </el-dialog>
74
+  </div>
75
+</template>
76
+
77
+<script>
78
+import { printJS } from 'print-js'
79
+import Editor from '@/components/Editor'
80
+export default {
81
+  name: 'AnticoagulationConsentForm',
82
+  components: {
83
+    Editor
84
+  },
85
+  data() {
86
+    return {
87
+      editorVisible: false,
88
+      patientInfoVisible: false,
89
+      editorContent: '',
90
+      form: {
91
+        patientName: '',
92
+        gender: '男',
93
+        age: '',
94
+        medicalRecordNo: ''
95
+      },
96
+      defaultContent: `
97
+        <h3>疾病介绍和治疗建议</h3>
98
+        <p>&nbsp;&nbsp;医生已告知我患有__________,需血液净化治疗,治疗过程中需选择抗凝方式。</p>
99
+        
100
+        <h4>&nbsp;&nbsp;常用抗凝方式为:_低分子肝素钠_________</h4>
101
+        
102
+        <h3>血液净化抗凝治疗潜在风险和对策</h3>
103
+        <p>&nbsp;&nbsp;医生告知我血液净化抗凝治疗可能发生的一些风险,有些不常见的风险可能没有在此列出。</p>
104
+        
105
+        <ol>
106
+          <li>&nbsp;&nbsp;1.出血,如皮肤粘膜、消化道等脏器出血,手术伤口出血,严重时脑出血等。(少见)</li>
107
+          <li>&nbsp;&nbsp;2.过敏、血小板减少、骨质疏松、高脂血症、低钙血症、高钠血症和代谢性碱中毒等。(罕见)</li>
108
+          <li>&nbsp;&nbsp;3.体外循环(包括管道及透析器等)凝血,需及时更换管道及透析器等,费用增加,同时血液丢失,纤溶系统激活继发出血风险。</li>
109
+          <li>&nbsp;&nbsp;4.透析过程中或结束后发生血栓栓塞性疾病,严重者脑血栓形成。</li>
110
+          <li>&nbsp;&nbsp;5.其他不可预知的风险。</li>
111
+        </ol>
112
+        
113
+        <h3>特殊风险或主要高危因素</h3>
114
+        <p>&nbsp;&nbsp;我理解根据我个人的病情,我可能出现未包括在上述所交待并发症以外的风险:</p>
115
+        <p>&nbsp;&nbsp;一旦发生上述风险和意外,医生会采取积极应对措施。</p>
116
+        
117
+        <h3>患者知情选择</h3>
118
+        <ul>
119
+          <li>&nbsp;&nbsp;我的医生已经告知我将要进行的治疗方式、此次治疗及治疗后可能发生的并发症和风险、可能存在的其它治疗方法并且解答了我关于此次治疗的相关问题。</li>
120
+          <li>&nbsp;&nbsp;我同意在治疗中医生可以根据我的病情对预定的治疗方式做出调整。</li>
121
+          <li>&nbsp;&nbsp;我理解我的治疗需要多位医护人员共同进行。</li>
122
+          <li>&nbsp;&nbsp;我并未得到治疗百分之百成功的许诺。</li>
123
+        </ul>
124
+        
125
+        <div class="signature-section">
126
+          <div class="signature-row">
127
+            <div class="signature-box">
128
+              <p>患者签名: <span class="signature-line">_________________</span></p>
129
+              <p>签名日期: <span class="date-line">______年______月______日</span></p>
130
+            </div>
131
+            
132
+            <div class="signature-box">
133
+              <p class="note">如果患者无法签署知情同意书,请其授权的亲属在此签名:</p>
134
+              <p>患者授权亲属签名: <span class="signature-line">_________________</span></p>
135
+              <p>与患者关系: <span class="relationship-line">______</span></p>
136
+              <p>签名日期: <span class="date-line">______年______月______日</span></p>
137
+            </div>
138
+          </div>
139
+          
140
+          <div class="signature-row">
141
+            <div class="signature-box">
142
+              <h3>医生陈述</h3>
143
+              <p>我已经告知患者将要进行的手术方式、此次手术及术后可能发生的并发症和风险、可能存在的其它治疗方法并且解答了患者关于此次手术的相关问题。</p>
144
+              <p>医生签名: <span class="signature-line">_________________</span></p>
145
+              <p>签名日期: <span class="date-line">______年______月______日</span></p>
146
+            </div>
147
+          </div>
148
+        </div>
149
+      `,
150
+      editorConfig: {
151
+        height: 600,
152
+        language: 'zh_CN',
153
+        menubar: false,
154
+        plugins: [
155
+          'advlist autolink lists link image charmap print preview anchor',
156
+          'searchreplace visualblocks code fullscreen',
157
+          'insertdatetime media table paste code help wordcount'
158
+        ],
159
+        toolbar: 'undo redo | formatselect | bold italic | \
160
+                  alignleft aligncenter alignright alignjustify | \
161
+                  bullist numlist outdent indent | removeformat | help',
162
+        content_style: `
163
+          body { 
164
+            font-family: "SimSun", "宋体", serif; 
165
+            font-size: 14px; 
166
+            line-height: 1.5; 
167
+          }
168
+          h3 { 
169
+            font-size: 16px; 
170
+            font-weight: bold; 
171
+            margin: 15px 0 10px 0; 
172
+          }
173
+          h4 { 
174
+            font-size: 15px; 
175
+            font-weight: bold; 
176
+            margin: 12px 0 8px 0; 
177
+          }
178
+          ul, ol { 
179
+            margin: 10px 0 10px 20px; 
180
+          }
181
+          li { 
182
+            margin-bottom: 5px; 
183
+          }
184
+          p { 
185
+            margin: 8px 0; 
186
+          }
187
+          .signature-section { 
188
+            margin-top: 30px; 
189
+          }
190
+          .signature-row { 
191
+            margin-bottom: 20px; 
192
+          }
193
+          .signature-box { 
194
+            display: inline-block; 
195
+            margin-right: 40px; 
196
+            vertical-align: top; 
197
+          }
198
+          .note { 
199
+            font-style: italic; 
200
+            margin-bottom: 10px; 
201
+          }
202
+          .signature-line, .date-line, .relationship-line { 
203
+            display: inline-block; 
204
+            min-width: 150px; 
205
+            border-bottom: 1px solid #000; 
206
+          }
207
+          .date-line { 
208
+            min-width: 120px; 
209
+          }
210
+          .relationship-line { 
211
+            min-width: 80px; 
212
+          }
213
+        `
214
+      }
215
+    }
216
+  },
217
+  computed: {
218
+    formattedContent() {
219
+      return this.editorContent || this.defaultContent
220
+    }
221
+  },
222
+  created() {
223
+    this.loadFormData()
224
+  },
225
+  methods: {
226
+    loadFormData() {
227
+      getConsentForm().then(response => {
228
+        if (response.data) {
229
+          this.form = { ...this.form, ...response.data.form }
230
+          this.editorContent = response.data.content || this.defaultContent
231
+        }
232
+      })
233
+    },
234
+    editContent() {
235
+      this.editorContent = this.formattedContent
236
+      this.editorVisible = true
237
+      this.$nextTick(() => {
238
+        this.$refs.editor && this.$refs.editor.focus()
239
+      })
240
+    },
241
+    editPatientInfo() {
242
+      this.patientInfoVisible = true
243
+    },
244
+    saveContent() {
245
+      saveConsentForm({
246
+        form: this.form,
247
+        content: this.editorContent
248
+      }).then(() => {
249
+        this.$message.success('内容保存成功')
250
+        this.editorVisible = false
251
+      })
252
+    },
253
+    savePatientInfo() {
254
+      this.$message.success('患者信息已保存')
255
+      this.patientInfoVisible = false
256
+    },
257
+    printDocument() {
258
+      printJS({
259
+        printable: 'printable-content',
260
+        type: 'html',
261
+        documentTitle: '血液净化抗凝治疗知情同意书',
262
+        scanStyles: false,
263
+        style: `
264
+          @page { size: A4; margin: 1cm; }
265
+          body { font-family: "SimSun", "宋体", serif; font-size: 14px; line-height: 1.5; }
266
+          .document-title { text-align: center; font-size: 18px; font-weight: bold; margin-bottom: 20px; }
267
+          .patient-info-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
268
+          .patient-info-table td { padding: 5px 0; }
269
+          .rich-text-content h3 { font-size: 16px; font-weight: bold; margin: 15px 0 10px 0; }
270
+          .rich-text-content h4 { font-size: 15px; font-weight: bold; margin: 12px 0 8px 0; }
271
+          .rich-text-content ul, .rich-text-content ol { margin: 10px 0 10px 20px; }
272
+          .rich-text-content li { margin-bottom: 5px; }
273
+          .rich-text-content p { margin: 8px 0; }
274
+          .signature-section { margin-top: 30px; }
275
+          .signature-row { margin-bottom: 20px; }
276
+          .signature-box { display: inline-block; margin-right: 40px; vertical-align: top; }
277
+          .note { font-style: italic; margin-bottom: 10px; }
278
+          .signature-line, .date-line, .relationship-line { 
279
+            display: inline-block; 
280
+            min-width: 150px; 
281
+            border-bottom: 1px solid #000; 
282
+          }
283
+          .date-line { min-width: 120px; }
284
+          .relationship-line { min-width: 80px; }
285
+        `
286
+      })
287
+    },
288
+    resetForm() {
289
+      this.$confirm('确定要重置表单内容吗?', '提示', {
290
+        confirmButtonText: '确定',
291
+        cancelButtonText: '取消',
292
+        type: 'warning'
293
+      }).then(() => {
294
+        this.form = {
295
+          patientName: '',
296
+          gender: '男',
297
+          age: '',
298
+          medicalRecordNo: ''
299
+        }
300
+        this.editorContent = this.defaultContent
301
+        this.$message.success('表单已重置')
302
+      })
303
+    }
304
+  }
305
+}
306
+</script>
307
+
308
+<style scoped>
309
+.anticoagulation-consent {
310
+  padding: 20px;
311
+  background-color: #fff;
312
+  border: 1px solid #ebeef5;
313
+  border-radius: 4px;
314
+}
315
+
316
+.toolbar {
317
+  margin-bottom: 20px;
318
+  text-align: right;
319
+}
320
+
321
+.document-container {
322
+  font-family: "SimSun", "宋体", serif;
323
+  font-size: 14px;
324
+  line-height: 1.5;
325
+  color: #333;
326
+  padding: 20px;
327
+  background-color: #fff;
328
+}
329
+
330
+.document-title {
331
+  text-align: center;
332
+  font-size: 18px;
333
+  font-weight: bold;
334
+  margin-bottom: 20px;
335
+  color: #333;
336
+}
337
+
338
+.patient-info-table {
339
+  width: 100%;
340
+  margin: 15px 0;
341
+}
342
+
343
+.patient-info-table td {
344
+  padding: 5px 0;
345
+}
346
+
347
+.rich-text-content {
348
+  margin-top: 15px;
349
+}
350
+
351
+@media print {
352
+  .toolbar {
353
+    display: none;
354
+  }
355
+  
356
+  .anticoagulation-consent {
357
+    padding: 0;
358
+    border: none;
359
+  }
360
+  
361
+  .document-container {
362
+    padding: 0;
363
+  }
364
+}
365
+</style>

+ 253 - 0
src/xt_pages/user/Informed/components/informef_Thrity_One.vue View File

1
+<template>
2
+    <div class="dialysis-instruction-form" style="border:1px solid gainsboro; padding:20px;">
3
+      <!-- 操作按钮区域 -->
4
+      <div class="action-buttons" style="position: relative; left: 400px; width: 250px; margin: 20px 0;">
5
+        <el-button type="primary" @click="editForm">编辑</el-button>
6
+        <el-button type="success" @click="printForm">打印</el-button>
7
+      </div>
8
+  
9
+      <!-- 打印内容区域 -->
10
+      <div id="print_content">
11
+        <div class="print_page_main_content">
12
+          <div class="content">
13
+            <div style="text-align: center; font-size: 20px;">{{ orgName }}</div>
14
+            <div style="text-align: center; font-size: 20px; margin-bottom: 20px;">血液透析患者须知</div>
15
+            
16
+            <!-- 患者基本信息 -->
17
+            <!-- <div class="patient-info">
18
+              <table style="width: 100%; border-collapse: collapse;">
19
+                <tr>
20
+                  <td style="width: 25%;">患者姓名:_________________</td>
21
+                  <td style="width: 25%;">性别:_________________</td>
22
+                  <td style="width: 25%;">年龄:_________________</td>
23
+                  <td style="width: 25%;">病历号:_________________</td>
24
+                </tr>
25
+                <tr>
26
+                  <td colspan="2">联系电话:_________________</td>
27
+                  <td colspan="2">身份证号:_________________</td>
28
+                </tr>
29
+              </table>
30
+            </div> -->
31
+  
32
+            <!-- 患者须知内容 -->
33
+            <div v-html="formContent"></div>
34
+          </div>
35
+        </div>
36
+      </div>
37
+  
38
+      <!-- 编辑对话框 -->
39
+      <el-dialog
40
+        title="编辑血液透析患者须知"
41
+        :visible.sync="dialogVisible"
42
+        width="70%"
43
+        top="5vh"
44
+      >
45
+        <div>
46
+          <h2 style="text-align: center;">血液透析患者须知</h2>
47
+          <keep-alive>
48
+        <editor ref="editor"
49
+                id="editor"
50
+                style="width: 100%"
51
+                v-bind:r_content="defaultContent">
52
+        </editor>
53
+      </keep-alive>
54
+        </div>
55
+        <span slot="footer" class="dialog-footer">
56
+          <el-button @click="dialogVisible = false">取消</el-button>
57
+          <el-button type="primary" @click="saveForm">保存</el-button>
58
+        </span>
59
+      </el-dialog>
60
+    </div>
61
+  </template>
62
+  
63
+  <script>
64
+  import print from "print-js";
65
+  import Editor from '@/components/Editor'
66
+  import { } from '@/api/dialysis'
67
+  
68
+  const defaultContent = `
69
+  <ol>
70
+    <li>我们认为每个患者都应当得到尊重,同时也希望您应当在每次治疗中发挥积极的作用,以保证治疗的有效性,并有助于提高您的生活质量。如果您对治疗有意见,请在不影响他人治疗的情况下进行沟通,我们会公正、及时地处理。</li>
71
+    
72
+    <li>您有权在安静、洁净的环境中进行治疗,您也应该成为环境的保持者。希望您的家人不要在透析过程中进入治疗区,这样会增加您和其他患者的感染机会,同时请您不要大声喧哗,随意走动,以免分散工作人员的注意力。您的家属或陪伴人员可以在专门的患者家属等候区等待。</li>
73
+    
74
+    <li>我们会为您提前安排一周的透析时间,请您积极配合治疗,按时来进行透析治疗。我们认为完整地完成每次透析是您治疗中最重要的一个环节。如果由于您个人或社会的原因不得不缩短,您应当在每次治疗开始时告诉您的医生。由于特殊原因,您需要临时改变您的透析治疗时间的安排,请至少提前半天与我们取得联系并得到认可,否则所产生耗材费用由你个人承担。我们透析时间是上午、下午。</li>
75
+    
76
+    <li>请您最好不要携带贵重物品进行治疗,如果带来应自己妥善保存。</li>
77
+    
78
+    <li>血液透析成本昂贵,为了维持净化中心的正常运作应按时付清透析费用。</li>
79
+    
80
+    <li>血管通路,包括动静脉内瘘,是您的生命线,您应该像爱护自己生命一样爱护它们。对于深静脉导管您应该保持局部的清洁,尽量减少插管处肢体的屈曲,注意固定的缝线有无脱落,导管有无滑出。注意防感染、防脱管、防血栓。对于动静脉内瘘,您要做到日常的检查和维护,特别要防止低血压的发生。</li>
81
+    
82
+    <li>为了使您有更好的生活质量您应自觉地控制每日摄入的钠盐和液体总量。在透析间期,您的体重每天增加不宜超过干体重的3-5%,要达到这个目标,您除了要控制水分的摄入外,更重要的是尽量少吃盐。</li>
83
+    
84
+    <li>患者的营养膳食原则是充足的热量,高蛋白质饮食。充足的热卡能维持您的体重和肌肉量,我们推荐您至少每天每公斤体重摄入35千卡的热量来维持目前的体重。蛋白质是机体组织生长、维持和修复所需要的。每天每公斤体重1.2克蛋白质是比较合适的摄入量;高钾会影响生命,所以含有较多钾的水果如桔子、香蕉、西瓜等,要限制食用。</li>
85
+    
86
+    <li>我们不鼓励您在透析治疗期间进食饭菜,因为这可能使您更容易出现透析并发症。如果您觉得饥饿,您可以带些零食食用。</li>
87
+    
88
+    <li>由于透析治疗需要使用抗凝药物,所以您在来透析的路上和透析结束回家时,特别注意防止磕碰、跌倒、外伤的发生,如有发生请告知且及时到医院就诊。</li>
89
+    
90
+    <li>对于血液透析患者,我们鼓励您重返工作岗位,您可以略微改变您的工作,使工作的压力更小些。我们也推荐您进行适当的锻炼以增强您的体能,而且还可以减少焦虑,提高您的自信心。</li>
91
+    
92
+    <li>如果您有任何紧急情况,您应该到距离您最近的医院就诊,同时和我们联系。联系电话:_________________</li>
93
+  </ol>
94
+  
95
+  <p>本须知仅提供您基本的血液透析知识,为了提高您的生活质量,您应该经常学习有关的知识或向我们工作人员询问。希望通过您的配合以及我们工作人员的努力,您在本中心不仅仅得到了疾病的治疗,而且能重新树立战胜疾病的信心。</p>
96
+  
97
+  <div style="display: flex; justify-content: space-between; margin-top: 50px;">
98
+    <div>
99
+      <p>患者签名:_________________</p>
100
+      <p>日期:______年______月______日</p>
101
+    </div>
102
+    <div>
103
+      <p>家属签名:_________________</p>
104
+      <p>日期:______年______月______日</p>
105
+    </div>
106
+  </div>
107
+  `
108
+  
109
+  export default {
110
+    components: {
111
+      Editor
112
+    },
113
+    props: {
114
+      patientId: {
115
+        type: Number,
116
+        default: null
117
+      },
118
+      initialData: {
119
+        type: Object,
120
+        default: () => ({})
121
+      }
122
+    },
123
+    data() {
124
+      return {
125
+        orgName: 'XX医院血液净化中心',
126
+        formContent: defaultContent,
127
+        dialogVisible: false,
128
+        patientInfo: {}
129
+      }
130
+    },
131
+    created() {
132
+      this.orgName = this.$store.getters.xt_user.org.org_name || 'XX医院血液净化中心'
133
+      this.loadData()
134
+    },
135
+    methods: {
136
+      loadData() {
137
+        if (this.patientId) {
138
+          getDialysisConsent(this.patientId).then(response => {
139
+            if (response.data.state === 1 && response.data.data.content) {
140
+              this.formContent = response.data.data.content
141
+            }
142
+          })
143
+        }
144
+      },
145
+      editForm() {
146
+        // this.dialogVisible = true
147
+        // this.$nextTick(() => {
148
+        //   this.$refs.editor.setContent(this.formContent)
149
+        // })
150
+        this.editorContent = this.formattedContent
151
+        this.dialogVisible = true
152
+        this.$nextTick(() => {
153
+            this.$refs.editor && this.$refs.editor.focus()
154
+        })
155
+      },
156
+      saveForm() {
157
+        const params = {
158
+          patient_id: this.patientId,
159
+          content: this.$refs.editor.getContent()
160
+        }
161
+        
162
+        saveDialysisConsent(params).then(response => {
163
+          if (response.data.state === 1) {
164
+            this.$message.success('保存成功')
165
+            this.formContent = params.content
166
+            this.dialogVisible = false
167
+            this.$emit('saved', response.data.data)
168
+          }
169
+        })
170
+      },
171
+      printForm() {
172
+        const style = `
173
+          @media print {
174
+            body { font-family: "Microsoft YaHei", SimSun; }
175
+            .content { padding: 20px; }
176
+            ol { font-size: 16px; line-height: 1.8; }
177
+            li { margin-bottom: 10px; }
178
+            p { font-size: 16px; line-height: 1.8; margin: 5px 0; }
179
+            table { width: 100%; border-collapse: collapse; }
180
+            table td { padding: 5px 10px; }
181
+          }
182
+        `
183
+        
184
+        printJS({
185
+          printable: 'print_content',
186
+          type: 'html',
187
+          documentTitle: '血液透析患者须知',
188
+          style: style,
189
+          scanStyles: false
190
+        })
191
+      }
192
+    },
193
+    watch: {
194
+      patientId(newVal) {
195
+        if (newVal) {
196
+          this.loadData()
197
+        }
198
+      },
199
+      initialData: {
200
+        deep: true,
201
+        handler(newVal) {
202
+          if (newVal && newVal.content) {
203
+            this.formContent = newVal.content
204
+          }
205
+        }
206
+      }
207
+    }
208
+  }
209
+  </script>
210
+  
211
+  <style scoped>
212
+  .dialysis-instruction-form {
213
+    background-color: white;
214
+    margin: 20px auto;
215
+    max-width: 900px;
216
+  }
217
+  
218
+  .content {
219
+    font-family: "Microsoft YaHei", SimSun;
220
+    line-height: 1.6;
221
+  }
222
+  
223
+  .content ol {
224
+    padding-left: 20px;
225
+  }
226
+  
227
+  .content li {
228
+    margin-bottom: 15px;
229
+    text-align: justify;
230
+  }
231
+  
232
+  .patient-info {
233
+    margin: 20px 0;
234
+    padding: 10px;
235
+    border: 1px solid #ddd;
236
+    background-color: #f9f9f9;
237
+  }
238
+  
239
+  @media print {
240
+    .action-buttons {
241
+      display: none;
242
+    }
243
+    
244
+    .dialysis-instruction-form {
245
+      border: none;
246
+      padding: 0;
247
+    }
248
+    
249
+    .content {
250
+      padding: 0;
251
+    }
252
+  }
253
+  </style>

+ 385 - 0
src/xt_pages/user/Informed/components/informef_Thrity_Two.vue View File

1
+<template>
2
+    <div class="power-of-attorney">
3
+      <div class="toolbar">
4
+        <el-button type="primary" size="small" @click="editContent">编辑内容</el-button>
5
+        <el-button type="success" size="small" @click="printDocument">打印文档</el-button>
6
+        <el-button size="small" @click="resetForm">重置表单</el-button>
7
+      </div>
8
+  
9
+      <div id="printable-content" class="document-container">
10
+        <h1 class="document-title">授权委托书</h1>
11
+  
12
+        <div class="content" v-html="formattedContent"></div>
13
+  
14
+        <div class="signature-section">
15
+          <div class="signature-row">
16
+            <div class="signature-box">
17
+              <p><strong>委托人姓名:</strong> <span class="underline">{{ form.principalName || '_________________' }}</span></p>
18
+              <p><strong>性别:</strong> <span class="underline">{{ form.principalGender || '______' }}</span></p>
19
+              <p><strong>年龄:</strong> <span class="underline">{{ form.principalAge || '______' }}</span></p>
20
+              <p><strong>职业:</strong> <span class="underline">{{ form.principalOccupation || '_________________' }}</span></p>
21
+              <p><strong>工作单位:</strong> <span class="underline">{{ form.principalWorkplace || '_________________' }}</span></p>
22
+              <p><strong>住址:</strong> <span class="underline">{{ form.principalAddress || '_________________' }}</span></p>
23
+              <p><strong>联系电话:</strong> <span class="underline">{{ form.principalPhone || '_________________' }}</span></p>
24
+            </div>
25
+            
26
+            <div class="signature-box">
27
+              <p><strong>受委托人姓名:</strong> <span class="underline">{{ form.agentName || '_________________' }}</span></p>
28
+              <p><strong>性别:</strong> <span class="underline">{{ form.agentGender || '______' }}</span></p>
29
+              <p><strong>年龄:</strong> <span class="underline">{{ form.agentAge || '______' }}</span></p>
30
+              <p><strong>职业:</strong> <span class="underline">{{ form.agentOccupation || '_________________' }}</span></p>
31
+              <p><strong>工作单位:</strong> <span class="underline">{{ form.agentWorkplace || '_________________' }}</span></p>
32
+              <p><strong>住址:</strong> <span class="underline">{{ form.agentAddress || '_________________' }}</span></p>
33
+              <p><strong>与委托人的关系:</strong> <span class="underline">{{ form.relationship || '______' }}</span></p>
34
+              <p><strong>联系电话:</strong> <span class="underline">{{ form.agentPhone || '_________________' }}</span></p>
35
+            </div>
36
+          </div>
37
+          
38
+          <div class="signature-row" style="margin-top: 30px;">
39
+            <div class="signature-box">
40
+              <p>委托人(签字): <span class="signature-line">_________________</span></p>
41
+              <p>日期: <span class="date-line">______年______月______日</span></p>
42
+            </div>
43
+            
44
+            <div class="signature-box">
45
+              <p>受委托人(签字): <span class="signature-line">_________________</span></p>
46
+              <p>日期: <span class="date-line">______年______月______日</span></p>
47
+            </div>
48
+          </div>
49
+        </div>
50
+      </div>
51
+  
52
+      <!-- 富文本编辑器弹窗 -->
53
+      <el-dialog
54
+        title="编辑授权委托书内容"
55
+        :visible.sync="editorVisible"
56
+        width="80%"
57
+        top="5vh"
58
+      >
59
+        <keep-alive>
60
+          <editor ref="editor"
61
+                  id="editor"
62
+                  style="width: 100%"
63
+                  v-bind:r_content="defaultContent">
64
+          </editor>
65
+        </keep-alive>
66
+        <span slot="footer" class="dialog-footer">
67
+          <el-button @click="editorVisible = false">取消</el-button>
68
+          <el-button type="primary" @click="saveContent">保存</el-button>
69
+        </span>
70
+      </el-dialog>
71
+  
72
+      <!-- 信息编辑弹窗 -->
73
+      <el-dialog
74
+        title="编辑委托人/受委托人信息"
75
+        :visible.sync="infoVisible"
76
+        width="50%"
77
+      >
78
+        <el-tabs v-model="activeTab">
79
+          <el-tab-pane label="委托人信息" name="principal">
80
+            <el-form label-width="100px">
81
+              <el-form-item label="姓名">
82
+                <el-input v-model="form.principalName"></el-input>
83
+              </el-form-item>
84
+              <el-form-item label="性别">
85
+                <el-select v-model="form.principalGender">
86
+                  <el-option label="男" value="男"></el-option>
87
+                  <el-option label="女" value="女"></el-option>
88
+                </el-select>
89
+              </el-form-item>
90
+              <el-form-item label="年龄">
91
+                <el-input v-model="form.principalAge" type="number"></el-input>
92
+              </el-form-item>
93
+              <el-form-item label="职业">
94
+                <el-input v-model="form.principalOccupation"></el-input>
95
+              </el-form-item>
96
+              <el-form-item label="工作单位">
97
+                <el-input v-model="form.principalWorkplace"></el-input>
98
+              </el-form-item>
99
+              <el-form-item label="住址">
100
+                <el-input v-model="form.principalAddress"></el-input>
101
+              </el-form-item>
102
+              <el-form-item label="联系电话">
103
+                <el-input v-model="form.principalPhone"></el-input>
104
+              </el-form-item>
105
+            </el-form>
106
+          </el-tab-pane>
107
+          
108
+          <el-tab-pane label="受委托人信息" name="agent">
109
+            <el-form label-width="100px">
110
+              <el-form-item label="姓名">
111
+                <el-input v-model="form.agentName"></el-input>
112
+              </el-form-item>
113
+              <el-form-item label="性别">
114
+                <el-select v-model="form.agentGender">
115
+                  <el-option label="男" value="男"></el-option>
116
+                  <el-option label="女" value="女"></el-option>
117
+                </el-select>
118
+              </el-form-item>
119
+              <el-form-item label="年龄">
120
+                <el-input v-model="form.agentAge" type="number"></el-input>
121
+              </el-form-item>
122
+              <el-form-item label="职业">
123
+                <el-input v-model="form.agentOccupation"></el-input>
124
+              </el-form-item>
125
+              <el-form-item label="工作单位">
126
+                <el-input v-model="form.agentWorkplace"></el-input>
127
+              </el-form-item>
128
+              <el-form-item label="住址">
129
+                <el-input v-model="form.agentAddress"></el-input>
130
+              </el-form-item>
131
+              <el-form-item label="与委托人关系">
132
+                <el-input v-model="form.relationship"></el-input>
133
+              </el-form-item>
134
+              <el-form-item label="联系电话">
135
+                <el-input v-model="form.agentPhone"></el-input>
136
+              </el-form-item>
137
+            </el-form>
138
+          </el-tab-pane>
139
+        </el-tabs>
140
+        
141
+        <span slot="footer" class="dialog-footer">
142
+          <el-button @click="infoVisible = false">取消</el-button>
143
+          <el-button type="primary" @click="saveInfo">保存</el-button>
144
+        </span>
145
+      </el-dialog>
146
+    </div>
147
+  </template>
148
+  
149
+  <script>
150
+  import { printJS } from 'print-js'
151
+  import Editor from '@/components/Editor'
152
+  
153
+  export default {
154
+    name: 'PowerOfAttorney',
155
+    components: {
156
+      Editor
157
+    },
158
+    data() {
159
+      return {
160
+        editorVisible: false,
161
+        infoVisible: false,
162
+        activeTab: 'principal',
163
+        editorContent: '',
164
+        form: {
165
+          principalName: '',
166
+          principalGender: '男',
167
+          principalAge: '',
168
+          principalOccupation: '',
169
+          principalWorkplace: '',
170
+          principalAddress: '',
171
+          principalPhone: '',
172
+          agentName: '',
173
+          agentGender: '男',
174
+          agentAge: '',
175
+          agentOccupation: '',
176
+          agentWorkplace: '',
177
+          agentAddress: '',
178
+          relationship: '',
179
+          agentPhone: ''
180
+        },
181
+        defaultContent: `
182
+          <p>现委托 <span class="underline">_________________</span> 作为我在 <span class="underline">_________________</span> 诊疗期间的代理人,代我行使诊疗工作中涉及病情、诊疗措施、医疗风险、医疗费用等事宜的知情同意权利,并代替我签署所有相关的医疗文件。</p>
183
+        `,
184
+        editorConfig: {
185
+          height: 600,
186
+          language: 'zh_CN',
187
+          menubar: false,
188
+          plugins: [
189
+            'advlist autolink lists link image charmap print preview anchor',
190
+            'searchreplace visualblocks code fullscreen',
191
+            'insertdatetime media table paste code help wordcount'
192
+          ],
193
+          toolbar: 'undo redo | formatselect | bold italic | \
194
+                    alignleft aligncenter alignright alignjustify | \
195
+                    bullist numlist outdent indent | removeformat | help',
196
+          content_style: `
197
+            body { 
198
+              font-family: "SimSun", "宋体", serif; 
199
+              font-size: 14px; 
200
+              line-height: 1.5; 
201
+            }
202
+            .underline {
203
+              text-decoration: underline;
204
+            }
205
+          `
206
+        }
207
+      }
208
+    },
209
+    computed: {
210
+      formattedContent() {
211
+        return this.editorContent || this.defaultContent
212
+      }
213
+    },
214
+    created() {
215
+      this.loadFormData()
216
+    },
217
+    methods: {
218
+      loadFormData() {
219
+        // 这里可以添加从服务器加载数据的逻辑
220
+        // getPowerOfAttorneyForm().then(response => {
221
+        //   if (response.data) {
222
+        //     this.form = { ...this.form, ...response.data.form }
223
+        //     this.editorContent = response.data.content || this.defaultContent
224
+        //   }
225
+        // })
226
+      },
227
+      editContent() {
228
+        this.editorContent = this.formattedContent
229
+        this.editorVisible = true
230
+        this.$nextTick(() => {
231
+          this.$refs.editor && this.$refs.editor.focus()
232
+        })
233
+      },
234
+      editInfo() {
235
+        this.infoVisible = true
236
+      },
237
+      saveContent() {
238
+        // 这里可以添加保存内容到服务器的逻辑
239
+        // savePowerOfAttorneyForm({
240
+        //   form: this.form,
241
+        //   content: this.editorContent
242
+        // }).then(() => {
243
+        //   this.$message.success('内容保存成功')
244
+        //   this.editorVisible = false
245
+        // })
246
+        this.$message.success('内容保存成功')
247
+        this.editorVisible = false
248
+      },
249
+      saveInfo() {
250
+        this.$message.success('信息已保存')
251
+        this.infoVisible = false
252
+      },
253
+      printDocument() {
254
+        printJS({
255
+          printable: 'printable-content',
256
+          type: 'html',
257
+          documentTitle: '授权委托书',
258
+          scanStyles: false,
259
+          style: `
260
+            @page { size: A4; margin: 1cm; }
261
+            body { font-family: "SimSun", "宋体", serif; font-size: 14px; line-height: 1.5; }
262
+            .document-title { text-align: center; font-size: 18px; font-weight: bold; margin-bottom: 20px; }
263
+            .content { margin: 15px 0; }
264
+            .underline { text-decoration: underline; }
265
+            .signature-section { margin-top: 30px; }
266
+            .signature-row { margin-bottom: 20px; }
267
+            .signature-box { display: inline-block; margin-right: 40px; vertical-align: top; width: 45%; }
268
+            .signature-line, .date-line { 
269
+              display: inline-block; 
270
+              min-width: 150px; 
271
+              border-bottom: 1px solid #000; 
272
+            }
273
+            .date-line { min-width: 120px; }
274
+          `
275
+        })
276
+      },
277
+      resetForm() {
278
+        this.$confirm('确定要重置表单内容吗?', '提示', {
279
+          confirmButtonText: '确定',
280
+          cancelButtonText: '取消',
281
+          type: 'warning'
282
+        }).then(() => {
283
+          this.form = {
284
+            principalName: '',
285
+            principalGender: '男',
286
+            principalAge: '',
287
+            principalOccupation: '',
288
+            principalWorkplace: '',
289
+            principalAddress: '',
290
+            principalPhone: '',
291
+            agentName: '',
292
+            agentGender: '男',
293
+            agentAge: '',
294
+            agentOccupation: '',
295
+            agentWorkplace: '',
296
+            agentAddress: '',
297
+            relationship: '',
298
+            agentPhone: ''
299
+          }
300
+          this.editorContent = this.defaultContent
301
+          this.$message.success('表单已重置')
302
+        })
303
+      }
304
+    }
305
+  }
306
+  </script>
307
+  
308
+  <style scoped>
309
+  .power-of-attorney {
310
+    padding: 20px;
311
+    background-color: #fff;
312
+    border: 1px solid #ebeef5;
313
+    border-radius: 4px;
314
+  }
315
+  
316
+  .toolbar {
317
+    margin-bottom: 20px;
318
+    text-align: right;
319
+  }
320
+  
321
+  .document-container {
322
+    font-family: "SimSun", "宋体", serif;
323
+    font-size: 14px;
324
+    line-height: 1.5;
325
+    color: #333;
326
+    padding: 20px;
327
+    background-color: #fff;
328
+  }
329
+  
330
+  .document-title {
331
+    text-align: center;
332
+    font-size: 18px;
333
+    font-weight: bold;
334
+    margin-bottom: 20px;
335
+    color: #333;
336
+  }
337
+  
338
+  .content {
339
+    margin: 15px 0;
340
+  }
341
+  
342
+  .underline {
343
+    text-decoration: underline;
344
+  }
345
+  
346
+  .signature-section {
347
+    margin-top: 30px;
348
+  }
349
+  
350
+  .signature-row {
351
+    margin-bottom: 20px;
352
+  }
353
+  
354
+  .signature-box {
355
+    display: inline-block;
356
+    margin-right: 40px;
357
+    vertical-align: top;
358
+    width: 45%;
359
+  }
360
+  
361
+  .signature-line, .date-line {
362
+    display: inline-block;
363
+    min-width: 150px;
364
+    border-bottom: 1px solid #000;
365
+  }
366
+  
367
+  .date-line {
368
+    min-width: 120px;
369
+  }
370
+  
371
+  @media print {
372
+    .toolbar {
373
+      display: none;
374
+    }
375
+    
376
+    .power-of-attorney {
377
+      padding: 0;
378
+      border: none;
379
+    }
380
+    
381
+    .document-container {
382
+      padding: 0;
383
+    }
384
+  }
385
+  </style>

+ 7 - 1
src/xt_pages/user/patients.vue View File

1688
             birth.substr(6, 2)
1688
             birth.substr(6, 2)
1689
 
1689
 
1690
           var age = jsGetAge(birthtwo, '-')
1690
           var age = jsGetAge(birthtwo, '-')
1691
-          return age
1691
+
1692
+          if(age >0){
1693
+            return age
1694
+          }else{
1695
+            return val.age
1696
+          }
1697
+         
1692
       },
1698
       },
1693
 
1699
 
1694
       OpenView(name, number, id) {
1700
       OpenView(name, number, id) {

+ 13 - 13
src/xt_permission.js View File

12
 
12
 
13
 router.beforeEach((to, from, next) => {
13
 router.beforeEach((to, from, next) => {
14
   // 线上注释
14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //   store.dispatch('VerifyConfigList', []).then(() => {
17
-  //     next()
18
-  //   })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //     next()
23
-  //   })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28
 //  // 线上注释
28
 //  // 线上注释
29
   NProgress.start()
29
   NProgress.start()
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))