Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 1 gadu atpakaļ
vecāks
revīzija
785c8cbfaa
26 mainītis faili ar 759 papildinājumiem un 120 dzēšanām
  1. 21 6
      src/xt_pages/Pharmacy/PatientDispensing.vue
  2. 14 1
      src/xt_pages/dialysis/batch_print/batch_print_order_seventy.vue
  3. 15 2
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  4. 20 4
      src/xt_pages/dialysis/details/consumable/dialysisGather.vue
  5. 22 4
      src/xt_pages/dialysis/details/consumable/dialysisGatherPrint.vue
  6. 5 0
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  7. 9 2
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  8. 3 2
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  9. 2 2
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  10. 1 1
      src/xt_pages/dialysis/details/index.vue
  11. 41 0
      src/xt_pages/dialysis/signPrint.vue
  12. 6 0
      src/xt_pages/dialysis/template/DialysisPrintOrderSeventy.vue
  13. 151 12
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  14. 42 31
      src/xt_pages/outpatientCharges/components/registerDialog.vue
  15. 74 21
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  16. 128 6
      src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue
  17. 84 7
      src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue
  18. 83 2
      src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue
  19. 18 4
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  20. 3 4
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  21. 2 1
      src/xt_pages/stock/query/purchaseNewStockQuery.vue
  22. 2 1
      src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue
  23. 3 1
      src/xt_pages/stock/query/purchaseStockQuery.vue
  24. 2 1
      src/xt_pages/stock/query/purchaseStockQueryPrint.vue
  25. 1 0
      src/xt_pages/stock/stockOutOrderEdit.vue
  26. 7 5
      src/xt_pages/user/doctorAdvice.vue

+ 21 - 6
src/xt_pages/Pharmacy/PatientDispensing.vue Parādīt failu

187
                 <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
187
                 <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
188
               </template>
188
               </template>
189
             </el-table-column>
189
             </el-table-column>
190
-            <el-table-column label="单次用量" width="150" align="center">
190
+            <el-table-column label="规格" width="100" align="center">
191
+              <template slot-scope="scope">
192
+                <span>{{getSpecaiName(scope.row.DrugId)}}</span>
193
+              </template>
194
+            </el-table-column>
195
+            <el-table-column label="单次用量" width="100" align="center">
191
               <template slot-scope="scope">
196
               <template slot-scope="scope">
192
                 <span>{{
197
                 <span>{{
193
                   scope.row.SingleDosage ? scope.row.SingleDosage : ""
198
                   scope.row.SingleDosage ? scope.row.SingleDosage : ""
194
                 }}</span>
199
                 }}</span>
195
               </template>
200
               </template>
196
             </el-table-column>
201
             </el-table-column>
197
-            <el-table-column label="用法" width="160" align="center">
202
+            <el-table-column label="用法" width="100" align="center">
198
               <template slot-scope="scope">
203
               <template slot-scope="scope">
199
                 <span>{{ scope.row.Usage ? scope.row.Usage : "" }}</span>
204
                 <span>{{ scope.row.Usage ? scope.row.Usage : "" }}</span>
200
               </template>
205
               </template>
201
             </el-table-column>
206
             </el-table-column>
202
-            <el-table-column label="频率" width="160" align="center">
207
+            <el-table-column label="频率" width="100" align="center">
203
               <template slot-scope="scope">
208
               <template slot-scope="scope">
204
                 <span>{{
209
                 <span>{{
205
                   scope.row.Frequency ? scope.row.Frequency : ""
210
                   scope.row.Frequency ? scope.row.Frequency : ""
206
                 }}</span>
211
                 }}</span>
207
               </template>
212
               </template>
208
             </el-table-column>
213
             </el-table-column>
209
-            <el-table-column label="天数" width="140" align="center">
214
+            <el-table-column label="天数" width="100" align="center">
210
               <template slot-scope="scope">
215
               <template slot-scope="scope">
211
                 <span>{{ scope.row.Days ? scope.row.Days : "" }}</span>
216
                 <span>{{ scope.row.Days ? scope.row.Days : "" }}</span>
212
               </template>
217
               </template>
213
             </el-table-column>
218
             </el-table-column>
214
-            <el-table-column label="总量" width="140" align="center">
219
+            <el-table-column label="总量" width="100" align="center">
215
               <template slot-scope="scope">
220
               <template slot-scope="scope">
216
                 <span>{{ scope.row.Total ? scope.row.Total : "" }}</span>
221
                 <span>{{ scope.row.Total ? scope.row.Total : "" }}</span>
217
               </template>
222
               </template>
218
             </el-table-column>
223
             </el-table-column>
219
-            <el-table-column label="生产厂商" width="140" align="center">
224
+            <el-table-column label="生产厂商" width="100" align="center">
220
               <template slot-scope="scope">
225
               <template slot-scope="scope">
221
                 <span>{{ getManutuer(scope.row.DrugId) }}</span>
226
                 <span>{{ getManutuer(scope.row.DrugId) }}</span>
222
               </template>
227
               </template>
559
             this.tableData = []
564
             this.tableData = []
560
             this.tableData = list
565
             this.tableData = list
561
           }
566
           }
567
+          console.log("tableDatawoowow",this.tableData)
562
         } else {
568
         } else {
563
           this.$message.error(res.data.msg);
569
           this.$message.error(res.data.msg);
564
         }
570
         }
733
          }
739
          }
734
        }
740
        }
735
        return manufacturer_name
741
        return manufacturer_name
742
+    },
743
+    getSpecaiName(drug_id){
744
+       var spc =""
745
+       for(let i=0;i<this.baseList.length;i++){
746
+         if(drug_id == this.baseList[i].id){
747
+           spc = this.baseList[i].dose + this.baseList[i].dose_unit +"*"+this.baseList[i].min_number+this.baseList[i].min_unit+"/"+this.baseList[i].max_unit
748
+         }
749
+       }
750
+       return spc
736
     }
751
     }
737
   },
752
   },
738
 };
753
 };

+ 14 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_seventy.vue Parādīt failu

782
                           class="under_line"
782
                           class="under_line"
783
                           style="width: 130px; text-align: center"
783
                           style="width: 130px; text-align: center"
784
                         >
784
                         >
785
-                          {{
785
+                         <span v-if="record.assessment_before_dislysis&&record.assessment_before_dislysis.symptom_before_dialysis!=''">{{
786
                             record.assessment_before_dislysis &&
786
                             record.assessment_before_dislysis &&
787
                             record.assessment_before_dislysis
787
                             record.assessment_before_dislysis
788
                               .symptom_before_dialysis
788
                               .symptom_before_dialysis
790
                                   .symptom_before_dialysis
790
                                   .symptom_before_dialysis
791
                               : "/"
791
                               : "/"
792
                           }}
792
                           }}
793
+                          </span>
794
+                          <span v-if="record.assessment_before_dislysis&&record.assessment_before_dislysis.symptom_before_dialysis_other!=''">{{
795
+                            record.assessment_before_dislysis &&
796
+                            record.assessment_before_dislysis
797
+                              .symptom_before_dialysis_other
798
+                              ? record.assessment_before_dislysis
799
+                                  .symptom_before_dialysis_other
800
+                              : "/"
801
+                          }}
802
+                          </span>
803
+                          <span v-if="record.assessment_before_dislysis&&record.assessment_before_dislysis.symptom_before_dialysis=='' && record.assessment_before_dislysis&&record.assessment_before_dislysis.symptom_before_dialysis_other==''" >
804
+                             /
805
+                          </span>
793
                         </div>
806
                         </div>
794
                       </div>
807
                       </div>
795
 
808
 

+ 15 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Parādīt failu

970
                       <div class="inline_block" style="flex: 1">
970
                       <div class="inline_block" style="flex: 1">
971
                         透前体重:
971
                         透前体重:
972
                         <div
972
                         <div
973
+                          v-if="org_id != 10580"
973
                           class="under_line"
974
                           class="under_line"
974
                           style="width: 70px; text-align: center"
975
                           style="width: 70px; text-align: center"
975
                         >
976
                         >
985
                               : "/"
986
                               : "/"
986
                           }}
987
                           }}
987
                         </div>
988
                         </div>
989
+                        <div
990
+                          v-if="org_id == 10580"
991
+                          class="under_line"
992
+                          style="width: 70px; text-align: center"
993
+                        >
994
+                          {{
995
+                            record.assessment_before_dislysis &&
996
+                            record.assessment_before_dislysis.weight_before
997
+                              ? parseFloat(record.assessment_before_dislysis.weight_before).toFixed(1)
998
+                              : "/"
999
+                          }}
1000
+                        </div>
988
                         kg
1001
                         kg
989
                       </div>
1002
                       </div>
990
                       <div class="inline_block" style="flex: 1" v-if=" org_id!=10469">
1003
                       <div class="inline_block" style="flex: 1" v-if=" org_id!=10469">
1821
                             执行人签名
1834
                             执行人签名
1822
                           </td>
1835
                           </td>
1823
                           <td style="font-size: 16px" width="10%">时间</td>
1836
                           <td style="font-size: 16px" width="10%">时间</td>
1824
-                           <td style="font-size: 16px" width="10%" v-if="org_id == 10375 || org_id == 0 || org_id ==10206">核对护士</td>
1837
+                           <td style="font-size: 16px" width="10%" v-if="org_id == 10375 || org_id == 0 || org_id ==10206 || org_id == 10571 || org_id ==10600">核对护士</td>
1825
                         </tr>
1838
                         </tr>
1826
                         <!-- <template v-for="group in doctor_advices" > -->
1839
                         <!-- <template v-for="group in doctor_advices" > -->
1827
 
1840
 
1929
                                 getTime(advice[0].execution_time, " {h}:{i}")
1942
                                 getTime(advice[0].execution_time, " {h}:{i}")
1930
                               }}</span>
1943
                               }}</span>
1931
                             </td>
1944
                             </td>
1932
-                            <td height="35px" v-if="org_id == 10375 || org_id ==0||org_id ==10206">
1945
+                            <td height="35px" v-if="org_id == 10375 || org_id ==0||org_id ==10206|| org_id == 10571 || org_id ==10600">
1933
                               <span
1946
                               <span
1934
                                 v-if="
1947
                                 v-if="
1935
                                   setAdminUserES(
1948
                                   setAdminUserES(

+ 20 - 4
src/xt_pages/dialysis/details/consumable/dialysisGather.vue Parādīt failu

166
 
166
 
167
           <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)"  v-if="gatherSetting.anticoagulant==1">
167
           <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)"  v-if="gatherSetting.anticoagulant==1">
168
              <template slot-scope="scope">
168
              <template slot-scope="scope">
169
-               <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
170
-               <span v-if="scope.row.dialysis_prescription.anticoagulant_shouji > 0">({{scope.row.dialysis_prescription.anticoagulant_shouji}})</span>
171
-               <span v-if="scope.row.dialysis_prescription.anticoagulant_weichi > 0">({{scope.row.dialysis_prescription.anticoagulant_weichi}})</span>
172
-               <span v-if="scope.row.dialysis_prescription.anticoagulant_zongliang > 0">({{scope.row.dialysis_prescription.anticoagulant_zongliang}})</span>
169
+              
170
+               <span v-if="scope.row.schedule_date == timenow">
171
+                <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
172
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_shouji > 0">({{scope.row.dialysis_prescription.anticoagulant_shouji}})</span>
173
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_weichi > 0">({{scope.row.dialysis_prescription.anticoagulant_weichi}})</span>
174
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_zongliang > 0">({{scope.row.dialysis_prescription.anticoagulant_zongliang}})</span>
175
+              </span>
176
+               <span v-if="scope.row.schedule_date<timenow">
177
+                <span>{{getAnticoagualnt(scope.row.dialysis_prescription.anticoagulant)}}</span>
178
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_shouji > 0">({{scope.row.dialysis_prescription.anticoagulant_shouji}})</span>
179
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_weichi > 0">({{scope.row.dialysis_prescription.anticoagulant_weichi}})</span>
180
+                <span v-if="scope.row.dialysis_prescription.anticoagulant_zongliang > 0">({{scope.row.dialysis_prescription.anticoagulant_zongliang}})</span>
181
+               </span>
182
+               <span v-if="scope.row.schedule_date>timenow">
183
+                <span>{{getAnticoagualnt(scope.row.dialysis_solution.anticoagulant)}}</span>
184
+                <span v-if="scope.row.dialysis_solution.anticoagulant_shouji > 0">({{scope.row.dialysis_solution.anticoagulant_shouji}})</span>
185
+                <span v-if="scope.row.dialysis_solution.anticoagulant_weichi > 0">({{scope.row.dialysis_solution.anticoagulant_weichi}})</span>
186
+                <span v-if="scope.row.dialysis_solution.anticoagulant_zongliang > 0">({{scope.row.dialysis_solution.anticoagulant_zongliang}})</span>
187
+
188
+               </span>
173
              </template>
189
              </template>
174
           </el-table-column>
190
           </el-table-column>
175
 
191
 

+ 22 - 4
src/xt_pages/dialysis/details/consumable/dialysisGatherPrint.vue Parādīt failu

118
                     <span v-if="(getBloodAccessOption(item.dialysis_prescription.blood_access)).indexOf('内瘘')!=-1">1</span>
118
                     <span v-if="(getBloodAccessOption(item.dialysis_prescription.blood_access)).indexOf('内瘘')!=-1">1</span>
119
                   </td>
119
                   </td>
120
                   <td width="100" v-if="gatherSetting.anticoagulant==1">
120
                   <td width="100" v-if="gatherSetting.anticoagulant==1">
121
-                    <span>{{getAnticoagualnt(item.dialysis_prescription.anticoagulant)}}</span>
122
-                    <span v-if="item.dialysis_prescription.anticoagulant_shouji > 0">({{item.dialysis_prescription.anticoagulant_shouji}})</span>
123
-                    <span v-if="item.dialysis_prescription.anticoagulant_weichi > 0">({{item.dialysis_prescription.anticoagulant_weichi}})</span>
124
-                    <span v-if="item.dialysis_prescription.anticoagulant_zongliang > 0">({{item.dialysis_prescription.anticoagulant_zongliang}})</span>
121
+                  
122
+
123
+                    <span v-if="item.schedule_date == timenow">
124
+                      <span>{{getAnticoagualnt(item.dialysis_prescription.anticoagulant)}}</span>
125
+                      <span v-if="item.dialysis_prescription.anticoagulant_shouji > 0">({{item.dialysis_prescription.anticoagulant_shouji}})</span>
126
+                      <span v-if="item.dialysis_prescription.anticoagulant_weichi > 0">({{item.dialysis_prescription.anticoagulant_weichi}})</span>
127
+                      <span v-if="item.dialysis_prescription.anticoagulant_zongliang > 0">({{item.dialysis_prescription.anticoagulant_zongliang}})</span>
128
+                    </span>
129
+
130
+                    <span v-if="item.schedule_date < timenow">
131
+                      <span>{{getAnticoagualnt(item.dialysis_prescription.anticoagulant)}}</span>
132
+                      <span v-if="item.dialysis_prescription.anticoagulant_shouji > 0">({{item.dialysis_prescription.anticoagulant_shouji}})</span>
133
+                      <span v-if="item.dialysis_prescription.anticoagulant_weichi > 0">({{item.dialysis_prescription.anticoagulant_weichi}})</span>
134
+                      <span v-if="item.dialysis_prescription.anticoagulant_zongliang > 0">({{item.dialysis_prescription.anticoagulant_zongliang}})</span>
135
+                    </span>
136
+
137
+                    <span v-if="item.schedule_date > timenow">
138
+                      <span>{{getAnticoagualnt(item.dialysis_solution.anticoagulant)}}</span>
139
+                      <span v-if="item.dialysis_solution.anticoagulant_shouji > 0">({{item.dialysis_solution.anticoagulant_shouji}})</span>
140
+                      <span v-if="item.dialysis_solution.anticoagulant_weichi > 0">({{item.dialysis_solution.anticoagulant_weichi}})</span>
141
+                      <span v-if="item.dialysis_solution.anticoagulant_zongliang > 0">({{item.dialysis_solution.anticoagulant_zongliang}})</span>
142
+                    </span>
125
                  </td>
143
                  </td>
126
                   <td width="200" v-if="gatherSetting.tube==1">
144
                   <td width="200" v-if="gatherSetting.tube==1">
127
                     <span v-if="getBloodAccessOption(item.dialysis_prescription.blood_access).indexOf('导管')!==-1">1</span>
145
                     <span v-if="getBloodAccessOption(item.dialysis_prescription.blood_access).indexOf('导管')!==-1">1</span>

+ 5 - 0
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Parādīt failu

1000
       if (this.form.weight_after == '') {
1000
       if (this.form.weight_after == '') {
1001
         this.form.weight_loss = ''
1001
         this.form.weight_loss = ''
1002
       }
1002
       }
1003
+
1004
+      if(this.predialysis_evaluation!=null){
1005
+         
1006
+        this.form.additional_weight = this.predialysis_evaluation.additional_weight
1007
+      }
1003
       
1008
       
1004
     }
1009
     }
1005
   },
1010
   },

+ 9 - 2
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Parādīt failu

2818
         } else {
2818
         } else {
2819
           last_weight_after = this.last_record.weight_after
2819
           last_weight_after = this.last_record.weight_after
2820
         }
2820
         }
2821
-        console.log("last2323232323232332wode",this.predialysis)
2822
-        console.log("lastwoowowow",last)
2821
+        // console.log("last2323232323232332wode",this.predialysis)
2822
+        // console.log("lastwoowowow",last)
2823
         if(this.predialysis!=null && this.predialysis.id == 0){
2823
         if(this.predialysis!=null && this.predialysis.id == 0){
2824
             if(this.$store.getters.xt_user.org.id == 9671 || this.$store.getters.xt_user.org.id == 9675 || this.$store.getters.xt_user.org.id == 10340 || this.$store.getters.xt_user.org.id == 10600){
2824
             if(this.$store.getters.xt_user.org.id == 9671 || this.$store.getters.xt_user.org.id == 9675 || this.$store.getters.xt_user.org.id == 10340 || this.$store.getters.xt_user.org.id == 10600){
2825
               this.dialysisPrescription.sodium = 138
2825
               this.dialysisPrescription.sodium = 138
2831
             if(this.$store.getters.xt_user.org.id == 10447 || this.$store.getters.xt_user.org.id == 10600){
2831
             if(this.$store.getters.xt_user.org.id == 10447 || this.$store.getters.xt_user.org.id == 10600){
2832
               this.dialysisPrescription.dialysate_flow = 500
2832
               this.dialysisPrescription.dialysate_flow = 500
2833
             }
2833
             }
2834
+
2835
+            if(this.$store.getters.xt_user.org.id == 10598){
2836
+               if(this.dialysisPrescription.dialysis_duration_minute == ""){
2837
+                 this.dialysisPrescription.dialysis_duration_minute =0
2838
+
2839
+               }
2840
+            }
2834
         }
2841
         }
2835
         if (this.predialysis == null || this.predialysis.id == 0) {
2842
         if (this.predialysis == null || this.predialysis.id == 0) {
2836
 
2843
 

+ 3 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Parādīt failu

573
                 org_id!=10551 &&
573
                 org_id!=10551 &&
574
                 template_id != 43 &&
574
                 template_id != 43 &&
575
                 template_id != 47 &&
575
                 template_id != 47 &&
576
-                org_id!=10558) ||
576
+                org_id!=10558 &&
577
+                org_id!=10517) ||
577
                 org_id == 9779 ||
578
                 org_id == 9779 ||
578
                 template_id == 11 ||
579
                 template_id == 11 ||
579
                 template_id == 20 ||
580
                 template_id == 20 ||
605
             width="100"
606
             width="100"
606
             v-if="
607
             v-if="
607
               isShow('置换量') &&
608
               isShow('置换量') &&
608
-              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id == 10551 || org_id ==10558) &&
609
+              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id == 10551 || org_id ==10558 || org_id ==10517) &&
609
               template_id != 9779 &&
610
               template_id != 9779 &&
610
               template_id != 11 &&
611
               template_id != 11 &&
611
               template_id != 20 &&
612
               template_id != 20 &&

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue Parādīt failu

24
           <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46  || template_id == 48 || template_id == 53  || template_id == 54 || template_id == 56 || org_id == 10432 || org_id == 10445 || org_id == 10410) && org_id!=10558" width="92px" > 置换率(ml/min) </th>
24
           <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46  || template_id == 48 || template_id == 53  || template_id == 54 || template_id == 56 || org_id == 10432 || org_id == 10445 || org_id == 10410) && org_id!=10558" width="92px" > 置换率(ml/min) </th>
25
           <th v-if=" isShow('置换率') && (template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && org_id!=10432 && org_id!=10445 && org_id!=10410) || org_id == 10558" width="92px" > 置换率(L/h)  </th>
25
           <th v-if=" isShow('置换率') && (template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && org_id!=10432 && org_id!=10445 && org_id!=10410) || org_id == 10558" width="92px" > 置换率(L/h)  </th>
26
           <th v-if=" isShow('置换量') && (template_id == 43)" width="92px"> 置换量(ml/h)  </th>
26
           <th v-if=" isShow('置换量') && (template_id == 43)" width="92px"> 置换量(ml/h)  </th>
27
-          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191 && org_id!=10478 && org_id!=10346) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 ) && org_id!=10558" width="92px"  > 置换量(ml)  </th>
28
-          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id ==10346) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445) || org_id == 10558" width="92px" > 置换量(L) </th>
27
+          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191 && org_id!=10478 && org_id!=10346 && org_id!=10517) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 ) && org_id!=10558" width="92px"  > 置换量(ml)  </th>
28
+          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id ==10346 || org_id ==10517) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445) || org_id == 10558" width="92px" > 置换量(L) </th>
29
           <th v-if=" isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11  " width="92px" > SpO₂(%) </th>
29
           <th v-if=" isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11  " width="92px" > SpO₂(%) </th>
30
           <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
30
           <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
31
           <th v-if="isShow('置换液流量') && template_id != 27 && template_id != 60" width="92px">置换液流量(ml/h)</th>
31
           <th v-if="isShow('置换液流量') && template_id != 27 && template_id != 60" width="92px">置换液流量(ml/h)</th>

+ 1 - 1
src/xt_pages/dialysis/details/index.vue Parādīt failu

2238
           newArr.sort(this.compare('created_time'))
2238
           newArr.sort(this.compare('created_time'))
2239
         }
2239
         }
2240
 
2240
 
2241
-        if(this.org_id ==10579 || this.org_id == 0 || this.org_id ==10587){
2241
+        if(this.org_id ==10579 || this.org_id == 0 || this.org_id ==10587 || this.org_id ==10571){
2242
           if(newArr!=null && newArr.length>0){
2242
           if(newArr!=null && newArr.length>0){
2243
             for(let i=0;i<newArr.length;i++){
2243
             for(let i=0;i<newArr.length;i++){
2244
               newArr[i].sort =0
2244
               newArr[i].sort =0

+ 41 - 0
src/xt_pages/dialysis/signPrint.vue Parādīt failu

135
             execution_frequency:this.execution_frequency,
135
             execution_frequency:this.execution_frequency,
136
             patient_id:this.$route.query.patient_id,
136
             patient_id:this.$route.query.patient_id,
137
             keyword:this.$route.query.keyword,
137
             keyword:this.$route.query.keyword,
138
+            excution_way:this.excution_way
138
             }).then(rs => {
139
             }).then(rs => {
139
                 var resp = rs.data
140
                 var resp = rs.data
140
                 if (resp.state == 1) {
141
                 if (resp.state == 1) {
497
                   }
498
                   }
498
                   console.log("哈哈哈",schedules)
499
                   console.log("哈哈哈",schedules)
499
                    this.list = schedules.sort(this.compare('sort'))
500
                    this.list = schedules.sort(this.compare('sort'))
501
+                   
502
+                   //未执行
503
+                   if(this.$route.query.excution_way == 2){
504
+                      if(this.list!=null){
505
+                        for(let i=0;i<this.list.length;i++){
506
+                            this.list[i].doctor_advice_map = []
507
+                          for(let j=0;j<this.list[i].parent_advice.length;j++){
508
+                              if(this.list[i].parent_advice[j].execution_state!=1){
509
+                                 this.list[i].doctor_advice_map.push(this.list[i].parent_advice[j])
510
+                              }
511
+                              
512
+                          }
513
+                          this.list[i].parent_advice= []
514
+                          if(this.list[i].doctor_advice_map!=null){
515
+                            this.list[i].parent_advice.push(...this.list[i].doctor_advice_map)
516
+                          }
517
+                          
518
+                        }
519
+                      }
520
+                   }
521
+
522
+                   if(this.$route.query.excution_way == 1){
523
+                     for(let i=0;i<this.list.length;i++){
524
+                            this.list[i].doctor_advice_map = []
525
+                          for(let j=0;j<this.list[i].parent_advice.length;j++){
526
+                              if(this.list[i].parent_advice[j].execution_state==1){
527
+                                 this.list[i].doctor_advice_map.push(this.list[i].parent_advice[j])
528
+                              }
529
+                              
530
+                          }
531
+                          this.list[i].parent_advice= []
532
+                          if(this.list[i].doctor_advice_map!=null){
533
+                            this.list[i].parent_advice.push(...this.list[i].doctor_advice_map)
534
+                          }
535
+                         
536
+                        }
537
+                   }
538
+                
500
                  
539
                  
501
                    this.scheduleMap = scheduleMap  
540
                    this.scheduleMap = scheduleMap  
502
                  }
541
                  }
542
+
543
+
503
                 console.log("this.list",this.list)
544
                 console.log("this.list",this.list)
504
                 
545
                 
505
                 }
546
                 }

+ 6 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSeventy.vue Parādīt failu

758
                         class="under_line"
758
                         class="under_line"
759
                         style="width: 100px; text-align: center"
759
                         style="width: 100px; text-align: center"
760
                       >
760
                       >
761
+                       <span v-if="predialysis&&predialysis.symptom_before_dialysis!=''">
761
                         {{
762
                         {{
762
                           predialysis.symptom_before_dialysis
763
                           predialysis.symptom_before_dialysis
763
                             ? predialysis.symptom_before_dialysis
764
                             ? predialysis.symptom_before_dialysis
764
                             : "/"
765
                             : "/"
765
                         }}
766
                         }}
767
+                       </span> 
768
+                       <span v-if="predialysis&&predialysis.symptom_before_dialysis_other!=''">
769
+                         {{ predialysis.symptom_before_dialysis_other?predialysis.symptom_before_dialysis_other:"/" }}
770
+                       </span>
771
+                       <span v-if="predialysis&&predialysis.symptom_before_dialysis==''&&predialysis.symptom_before_dialysis_other==''">/</span>
766
                       </div>
772
                       </div>
767
                     </div>
773
                     </div>
768
 
774
 

+ 151 - 12
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Parādīt failu

316
                     <div
316
                     <div
317
                       class="inline_block"
317
                       class="inline_block"
318
                       style="margin-left: 10px; flex: 1"
318
                       style="margin-left: 10px; flex: 1"
319
-                      v-if="org_id!=10580 && org_id !=0"
319
+                      v-if="(org_id == 10598 || org_id == 0) &&  predialysis.internal_fistula!=''"
320
                     >
320
                     >
321
                       穿刺方式:
321
                       穿刺方式:
322
                       <div
322
                       <div
323
                         class="under_line"
323
                         class="under_line"
324
                         style="width: 100px; text-align: center"
324
                         style="width: 100px; text-align: center"
325
-                        v-if="predialysis.puncture_way == ''"
325
+                        v-if="predialysis&&predialysis.puncture_way == ''"
326
                       >
326
                       >
327
                          /
327
                          /
328
                       </div>
328
                       </div>
329
                       <div
329
                       <div
330
                         class="under_line"
330
                         class="under_line"
331
                         style="width: 100px; text-align: center"
331
                         style="width: 100px; text-align: center"
332
-                        v-if="predialysis.puncture_way.indexOf('绳梯') > -1"
332
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('绳梯') > -1"
333
                       >
333
                       >
334
                         绳梯
334
                         绳梯
335
                       </div>
335
                       </div>
336
                       <div
336
                       <div
337
                         class="under_line"
337
                         class="under_line"
338
                         style="width: 100px; text-align: center"
338
                         style="width: 100px; text-align: center"
339
-                        v-if="predialysis.puncture_way.indexOf('扣眼') > -1"
339
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('扣眼') > -1"
340
                       >
340
                       >
341
                         扣眼
341
                         扣眼
342
                       </div>
342
                       </div>
343
                       <div
343
                       <div
344
                         class="under_line"
344
                         class="under_line"
345
                         style="width: 100px; text-align: center"
345
                         style="width: 100px; text-align: center"
346
-                        v-if="predialysis.puncture_way.indexOf('区域') > -1"
346
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('区域') > -1"
347
+                      >
348
+                        区域
349
+                      </div>
350
+                    </div>
351
+                    <div
352
+                      class="inline_block"
353
+                      style="margin-left: 10px; flex: 1"
354
+                      v-if="org_id!=10580 && org_id !=0 && org_id!=10598"
355
+                    >
356
+                      穿刺方式:
357
+                      <div
358
+                        class="under_line"
359
+                        style="width: 100px; text-align: center"
360
+                        v-if="predialysis&&predialysis.puncture_way == ''"
361
+                      >
362
+                         /
363
+                      </div>
364
+                      <div
365
+                        class="under_line"
366
+                        style="width: 100px; text-align: center"
367
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('绳梯') > -1"
368
+                      >
369
+                        绳梯
370
+                      </div>
371
+                      <div
372
+                        class="under_line"
373
+                        style="width: 100px; text-align: center"
374
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('扣眼') > -1"
375
+                      >
376
+                        扣眼
377
+                      </div>
378
+                      <div
379
+                        class="under_line"
380
+                        style="width: 100px; text-align: center"
381
+                        v-if="predialysis&&predialysis.puncture_way.indexOf('区域') > -1"
347
                       >
382
                       >
348
                         区域
383
                         区域
349
                       </div>
384
                       </div>
358
                         class="under_line"
393
                         class="under_line"
359
                         style="width: 100px; text-align: center"
394
                         style="width: 100px; text-align: center"
360
                       >
395
                       >
361
-                         {{ dialysisOrder.puncture_way }}
396
+                         {{ dialysisOrder&&dialysisOrder.puncture_way }}
362
                       </div>
397
                       </div>
363
                       
398
                       
364
                     </div>
399
                     </div>
365
                     <div
400
                     <div
366
                       class="inline_block"
401
                       class="inline_block"
367
                       style="margin-left: 10px; flex: 1"
402
                       style="margin-left: 10px; flex: 1"
403
+                      v-if="(org_id == 10598 || org_id == 0) &&  predialysis.internal_fistula!=''"
404
+                    >
405
+                      穿刺针:
406
+                      <div
407
+                        class="under_line"
408
+                        style="width: 100px; text-align: center"
409
+                      >
410
+                      <span v-if="org_id==10580 || org_id==0">
411
+                        {{ dialysisOrder.puncture_needle}}
412
+                      </span>
413
+                      <span v-if="org_id != 10580 && org_id!=0">
414
+                        {{
415
+                          predialysis.puncture_needle
416
+                            ? predialysis.puncture_needle
417
+                            : "/"
418
+                        }}
419
+                      </span>
420
+                       
421
+                      </div>
422
+                    </div>
423
+                    <div
424
+                      class="inline_block"
425
+                      style="margin-left: 10px; flex: 1"
426
+                      v-if="org_id != 10598"
368
                     >
427
                     >
369
                       穿刺针:
428
                       穿刺针:
370
                       <div
429
                       <div
750
                     <div
809
                     <div
751
                       class="inline_block"
810
                       class="inline_block"
752
                       style="margin-left: 10px; flex: 1"
811
                       style="margin-left: 10px; flex: 1"
812
+                      v-if="org_id==10598 && prescription.mode_id == 2"
753
                     >
813
                     >
754
                       置换方式:
814
                       置换方式:
755
                       <div
815
                       <div
761
                         }}
821
                         }}
762
                       </div>
822
                       </div>
763
                     </div>
823
                     </div>
824
+
764
                     <div
825
                     <div
765
-                     
826
+                      class="inline_block"
827
+                      style="margin-left: 10px; flex: 1"
828
+                      v-if="org_id!=10598"
829
+                    >
830
+                      置换方式:
831
+                      <div
832
+                        class="under_line"
833
+                        style="width: 100px; text-align: center"
834
+                      >
835
+                        {{
836
+                          getDisplaceLiquiPart(prescription.displace_liqui_part)
837
+                        }}
838
+                      </div>
839
+                    </div>
840
+
841
+                    <div
842
+                      v-if="org_id==10598 && prescription.mode_id == 2"
766
                       class="inline_block"
843
                       class="inline_block"
767
                       style="margin-left: 10px; flex: 1"
844
                       style="margin-left: 10px; flex: 1"
768
                     >
845
                     >
786
                       </div>
863
                       </div>
787
                       L
864
                       L
788
                     </div>
865
                     </div>
866
+
867
+                    <div
868
+                      v-if="org_id!=10598"
869
+                      class="inline_block"
870
+                      style="margin-left: 10px; flex: 1"
871
+                    >
872
+                      置换量:
873
+                      <div
874
+                        class="under_line"
875
+                        style="width: 70px; text-align: center"
876
+                      >
877
+                      <span v-if="org_id ==10206"> {{
878
+                          prescription.replacement_total
879
+                            ? prescription.replacement_total
880
+                            : "/"
881
+                        }}
882
+                        </span> 
883
+                        <span v-if="org_id!=10206"> {{
884
+                          prescription.displace_liqui_value
885
+                            ? prescription.displace_liqui_value
886
+                            : "/"
887
+                        }}
888
+                        </span> 
889
+                      </div>
890
+                      L
891
+                      </div>
789
                     <div
892
                     <div
790
                       class="inline_block"
893
                       class="inline_block"
791
                       style="margin-left: 10px; flex: 1"
894
                       style="margin-left: 10px; flex: 1"
986
                         class="under_line"
1089
                         class="under_line"
987
                         style="width: 70px; text-align: center"
1090
                         style="width: 70px; text-align: center"
988
                       >
1091
                       >
989
-                      <span v-if="org_id !=10447 && org_id != 9675">{{
1092
+                      <span v-if="org_id !=10447 && org_id != 9675 && org_id!=10580">{{
990
                           predialysis.weight_before
1093
                           predialysis.weight_before
991
                             ? parseFloat(
1094
                             ? parseFloat(
992
                                 predialysis.weight_before -
1095
                                 predialysis.weight_before -
1005
                             : "未称重"
1108
                             : "未称重"
1006
                         }}
1109
                         }}
1007
                        </span>
1110
                        </span>
1111
+                       <span v-if="org_id ==10580">
1112
+                        {{
1113
+                          predialysis.weight_before? parseFloat(predialysis.weight_before).toFixed(1): "未称重"
1114
+                        }}
1115
+                       </span>
1008
                       </div>
1116
                       </div>
1009
                       kg
1117
                       kg
1010
                     </div>
1118
                     </div>
1084
                       </div>
1192
                       </div>
1085
                       mmol/L
1193
                       mmol/L
1086
                     </div>
1194
                     </div>
1087
-                    <div class="inline_block" style="margin-left: 10px" v-if="org_id!=10478">
1195
+                    <div class="inline_block" style="margin-left: 10px" v-if="org_id!=10478 && org_id!=10598">
1088
                       碳酸氢根:
1196
                       碳酸氢根:
1089
                       <div
1197
                       <div
1090
                         class="under_line"
1198
                         class="under_line"
1098
                       </div>
1206
                       </div>
1099
                       mmol/L
1207
                       mmol/L
1100
                     </div>
1208
                     </div>
1101
-                    <div class="inline_block" style="margin-left: 10px" v-if="org_id!=10478">
1209
+                    <div class="inline_block" style="margin-left: 10px" v-if="org_id!=10478&&org_id!=10598">
1102
                       流量:
1210
                       流量:
1103
                       <div
1211
                       <div
1104
                         class="under_line"
1212
                         class="under_line"
1503
                         <td width="50" v-if="org_id == 9671">在线尿素监测</td>  
1611
                         <td width="50" v-if="org_id == 9671">在线尿素监测</td>  
1504
                         <td width="50" v-if="org_id == 9538 || org_id == 9919 || org_id== 9671">血容量<br />(L)</td>
1612
                         <td width="50" v-if="org_id == 9538 || org_id == 9919 || org_id== 9671">血容量<br />(L)</td>
1505
                         <td width="50" v-if="org_id == 10490 || org_id == 0">碳酸氢钠<br />(ml)</td>
1613
                         <td width="50" v-if="org_id == 10490 || org_id == 0">碳酸氢钠<br />(ml)</td>
1614
+                        <td width="50" v-if="org_id == 10598 || org_id == 0">护士签名</td>
1506
                         <td width="200">病情变化及处理</td>
1615
                         <td width="200">病情变化及处理</td>
1507
                       </tr>
1616
                       </tr>
1508
 
1617
 
1635
                         <td width="50" v-if="org_id ==10490 || org_id == 0">
1744
                         <td width="50" v-if="org_id ==10490 || org_id == 0">
1636
                           {{ monitor.dicarbonate?monitor.dicarbonate:"" }}
1745
                           {{ monitor.dicarbonate?monitor.dicarbonate:"" }}
1637
                         </td>
1746
                         </td>
1747
+                        <td width="50" v-if="org_id == 10598 || org_id == 0">
1748
+                          <span v-if="monitor.creator == 0">
1749
+                            <span
1750
+                            v-if="setAdminUserES(monitor.modify) == ''"
1751
+                            >{{ getAdminUser(monitor.modify) }}</span
1752
+                          >
1753
+                          <img
1754
+                            style="height: 30px"
1755
+                            :src="setAdminUserES(monitor.modify)"
1756
+                            alt=""
1757
+                            srcset=""
1758
+                            v-else
1759
+                          />
1760
+                          </span>
1761
+
1762
+                          <span v-if="monitor.creator > 0">
1763
+                            <span
1764
+                            v-if="setAdminUserES(monitor.creator) == ''"
1765
+                            >{{ getAdminUser(monitor.creator) }}</span
1766
+                          >
1767
+                          <img
1768
+                            style="height: 30px"
1769
+                            :src="setAdminUserES(monitor.creator)"
1770
+                            alt=""
1771
+                            srcset=""
1772
+                            v-else
1773
+                          />
1774
+                          </span>
1775
+                        </td>
1638
                         <td style="line-height: 16px; padding: 0px">
1776
                         <td style="line-height: 16px; padding: 0px">
1639
                           <div
1777
                           <div
1640
                             style="
1778
                             style="
1699
                         ></td>
1837
                         ></td>
1700
                         <td v-if="org_id == 9919||org_id == 9538 || org_id == 9671"></td>
1838
                         <td v-if="org_id == 9919||org_id == 9538 || org_id == 9671"></td>
1701
                         <td v-if="org_id == 9538"></td>
1839
                         <td v-if="org_id == 9538"></td>
1840
+                        <td v-if="org_id == 10598 || org_id == 0"></td>
1702
                         <td v-if="org_id == 10490 || org_id == 0"></td>
1841
                         <td v-if="org_id == 10490 || org_id == 0"></td>
1703
                         <td style="line-height: 16px; padding: 0px">
1842
                         <td style="line-height: 16px; padding: 0px">
1704
                           <div
1843
                           <div
1763
                         <td
1902
                         <td
1764
                           style="font-size: 16px"
1903
                           style="font-size: 16px"
1765
                           width="10%"
1904
                           width="10%"
1766
-                          v-if="org_id == 10223 || org_id == 9538 || org_id == 0 || org_id ==10375"
1905
+                          v-if="org_id == 10223 || org_id == 9538 || org_id == 0 || org_id ==10375 || org_id ==10571 || org_id ==10600"
1767
                         >
1906
                         >
1768
                           核对护士
1907
                           核对护士
1769
                         </td>
1908
                         </td>
1859
                             getTime(advice.execution_time, "{h}:{i}")
1998
                             getTime(advice.execution_time, "{h}:{i}")
1860
                           }}</span>
1999
                           }}</span>
1861
                         </td>
2000
                         </td>
1862
-                        <td height="32px" v-if="org_id == 10223 || org_id == 9538 || org_id == 0 || org_id ==10375">
2001
+                        <td height="32px" v-if="org_id == 10223 || org_id == 9538 || org_id == 0 || org_id ==10375 || org_id ==10571 || org_id ==10600">
1863
                           <span v-if="advice!=null && advice.checker>0">
2002
                           <span v-if="advice!=null && advice.checker>0">
1864
                             <span v-if="setAdminUserES(advice.checker) == ''">{{ getAdminUser(advice.checker)}}</span>
2003
                             <span v-if="setAdminUserES(advice.checker) == ''">{{ getAdminUser(advice.checker)}}</span>
1865
                             <img
2004
                             <img

+ 42 - 31
src/xt_pages/outpatientCharges/components/registerDialog.vue Parādīt failu

685
                     that.$message.error(response.data.msg)
685
                     that.$message.error(response.data.msg)
686
                     return false
686
                     return false
687
                   } else {
687
                   } else {
688
-                    var patient = response.data.data.patient
689
-
690
-                    if (that.form.id_card_type == 1) {
691
-                      that.form.id = patient.id
692
-                      that.form.name = patient.name
693
-                      that.form.gender = patient.gender
694
-                      that.form.age = patient.age
695
-                      that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
696
-                      that.form.phone = patient.phone
697
-                      that.form.id_card = patient.id_card_no
698
-                      that.form.medical_insurance_card = response.data.data.number
699
-                      that.form.social_type = parseInt(response.data.data.insutype)
700
-
701
-
702
-                    } else if (that.form.id_card_type == 2) {
703
-                      that.form.id = patient.id
704
-                      that.form.name = patient.name
705
-                      that.form.gender = patient.gender
706
-                      that.form.age = patient.age
707
-                      that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
708
-                      that.form.phone = patient.phone
709
-                      that.form.id_card = patient.id_card_no
688
+
689
+                    if (response.data.data.failed_code == -10) {
690
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
691
+                        confirmButtonText: '确 定',
692
+                        type: 'warning'
693
+                      }).then(() => {
694
+
695
+                      }).catch(() => {
696
+                      })
710
                     } else {
697
                     } else {
711
-                      that.form.id = patient.id
712
-                      that.form.name = patient.name
713
-                      that.form.gender = patient.gender
714
-                      that.form.age = patient.age
715
-                      that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
716
-                      that.form.phone = patient.phone
717
-                      that.form.id_card = patient.id_card_no
718
-                      that.form.social_type = parseInt(response.data.data.insutype)
698
+
699
+                      var patient = response.data.data.patient
700
+
701
+                      if (that.form.id_card_type == 1) {
702
+                        that.form.id = patient.id
703
+                        that.form.name = patient.name
704
+                        that.form.gender = patient.gender
705
+                        that.form.age = patient.age
706
+                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
707
+                        that.form.phone = patient.phone
708
+                        that.form.id_card = patient.id_card_no
709
+                        that.form.medical_insurance_card = response.data.data.number
710
+                        that.form.social_type = parseInt(response.data.data.insutype)
711
+
712
+                      } else if (that.form.id_card_type == 2) {
713
+                        that.form.id = patient.id
714
+                        that.form.name = patient.name
715
+                        that.form.gender = patient.gender
716
+                        that.form.age = patient.age
717
+                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
718
+                        that.form.phone = patient.phone
719
+                        that.form.id_card = patient.id_card_no
720
+                      } else {
721
+                        that.form.id = patient.id
722
+                        that.form.name = patient.name
723
+                        that.form.gender = patient.gender
724
+                        that.form.age = patient.age
725
+                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
726
+                        that.form.phone = patient.phone
727
+                        that.form.id_card = patient.id_card_no
728
+                        that.form.social_type = parseInt(response.data.data.insutype)
729
+                      }
730
+                      that.$message({ message: '读卡成功', type: 'success' })
719
                     }
731
                     }
720
-                    that.$message({ message: '读卡成功', type: 'success' })
721
                   }
732
                   }
722
                 })
733
                 })
723
                 .catch(function(error) {
734
                 .catch(function(error) {

+ 74 - 21
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Parādīt failu

112
             <!--                       type="primary">记账-->
112
             <!--                       type="primary">记账-->
113
             <!--            </el-button>-->
113
             <!--            </el-button>-->
114
 
114
 
115
-
116
-
117
             <el-button v-loading="loadingone" size="small"
115
             <el-button v-loading="loadingone" size="small"
118
                        @click="open(40)"
116
                        @click="open(40)"
119
-                       v-if="org_id == 10191 || org_id == 10318 || org_id == 10567"
117
+                       v-if="org_id == 10191 || org_id == 10318 || org_id == 10567  || org_id == 10375"
120
                        type="primary">登陆
118
                        type="primary">登陆
121
             </el-button>
119
             </el-button>
122
 
120
 
1511
           this.month_prescriptions = []
1509
           this.month_prescriptions = []
1512
           this.setMonthPrescription(response.data.data.month_prescriptions)
1510
           this.setMonthPrescription(response.data.data.month_prescriptions)
1513
           this.curMonthPrescriptions = this.month_prescriptions[0]
1511
           this.curMonthPrescriptions = this.month_prescriptions[0]
1514
-
1512
+          this.form.diagnosis = []
1513
+          for(let i = 0; i <  response.data.data.dia_arr.length;i++) {
1514
+            if (response.data.data.dia_arr[i] > 0 || response.data.data.dia_arr[i].length > 0) {
1515
+              this.form.diagnosis.push(parseInt(response.data.data.dia_arr[i]))
1516
+            }
1517
+          }
1515
         } else {
1518
         } else {
1516
           this.$message.error(response.data.msg)
1519
           this.$message.error(response.data.msg)
1517
         }
1520
         }
1536
           this.month_prescriptions = []
1539
           this.month_prescriptions = []
1537
           this.setMonthPrescription(response.data.data.month_prescriptions)
1540
           this.setMonthPrescription(response.data.data.month_prescriptions)
1538
           this.curMonthPrescriptions = this.month_prescriptions[0]
1541
           this.curMonthPrescriptions = this.month_prescriptions[0]
1539
-
1542
+          this.form.diagnosis = []
1543
+          for(let i = 0; i <  response.data.data.dia_arr.length;i++) {
1544
+            if (response.data.data.dia_arr[i] > 0 || response.data.data.dia_arr[i].length > 0) {
1545
+              this.form.diagnosis.push(parseInt(response.data.data.dia_arr[i]))
1546
+            }
1547
+          }
1540
         } else {
1548
         } else {
1541
           this.$message.error(response.data.msg)
1549
           this.$message.error(response.data.msg)
1542
         }
1550
         }
1668
           .then(function(response) {
1676
           .then(function(response) {
1669
             if (response.data.state == 0) {
1677
             if (response.data.state == 0) {
1670
               that.$message.error(response.data.msg)
1678
               that.$message.error(response.data.msg)
1679
+
1671
               that.loadingtwo = false
1680
               that.loadingtwo = false
1672
               that.$refs.charge.hide()
1681
               that.$refs.charge.hide()
1682
+
1673
               return false
1683
               return false
1674
             } else {
1684
             } else {
1675
               if (response.data.data.failed_code == -10) {
1685
               if (response.data.data.failed_code == -10) {
1686
+
1676
                 that.$confirm(response.data.data.msg, '医保错误信息', {
1687
                 that.$confirm(response.data.data.msg, '医保错误信息', {
1677
                   confirmButtonText: '确 定',
1688
                   confirmButtonText: '确 定',
1678
                   type: 'warning'
1689
                   type: 'warning'
1679
                 }).then(() => {
1690
                 }).then(() => {
1691
+                  that.$refs.charge.hide()
1692
+                  that.changeRadioAndPatient(1)
1680
                   that.newLoading = false
1693
                   that.newLoading = false
1681
                 }).catch(() => {
1694
                 }).catch(() => {
1695
+                  that.$refs.charge.hide()
1696
+                  that.changeRadioAndPatient(1)
1682
                   that.newLoading = false
1697
                   that.newLoading = false
1683
                 })
1698
                 })
1684
 
1699
 
2460
             this.setMonthPrescription(response.data.data.month_prescriptions)
2475
             this.setMonthPrescription(response.data.data.month_prescriptions)
2461
             this.curMonthPrescriptions = this.month_prescriptions[0]
2476
             this.curMonthPrescriptions = this.month_prescriptions[0]
2462
 
2477
 
2478
+            this.form.diagnosis = []
2479
+            for(let i = 0; i <  response.data.data.dia_arr.length;i++) {
2480
+              if (response.data.data.dia_arr[i] > 0 || response.data.data.dia_arr[i].length > 0) {
2481
+                this.form.diagnosis.push(parseInt(response.data.data.dia_arr[i]))
2482
+              }
2483
+            }
2484
+
2463
           } else {
2485
           } else {
2464
             this.$message.error(response.data.msg)
2486
             this.$message.error(response.data.msg)
2465
           }
2487
           }
3404
         }
3426
         }
3405
 
3427
 
3406
       } else if (index == 9) {
3428
       } else if (index == 9) {
3407
-        this.statementVisible = true
3408
-        let obj = {
3409
-          order_id: this.order.id,
3410
-          settle_type: this.order.settle_type,
3411
-          start_time: this.order.settle_start_time,
3412
-          end_time: this.order.settle_end_time,
3413
-          balance_accounts_type: this.hisPatientInfo.balance_accounts_type
3429
+        if (this.org_id == 10375){
3430
+          var that = this
3431
+          axios
3432
+            .get('http://127.0.0.1:9532/api/settle/query', {
3433
+              params: {
3434
+                order_id: that.order.id,
3435
+                admin_user_id: that.$store.getters.xt_user.user.id
3436
+              }
3437
+            })
3438
+            .then(function(response) {
3439
+              if (response.data.state == 0) {
3440
+                this.$message.error(response.data.msg)
3441
+                return false
3442
+              } else {
3443
+                if (response.data.data.failed_code == -10) {
3444
+                  // that.$message.error(response.data.data.msg)
3445
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
3446
+                    confirmButtonText: '确 定',
3447
+                    type: 'warning'
3448
+                  }).then(() => {
3449
+
3450
+                  }).catch(() => {
3451
+                  })
3452
+                }
3453
+              }
3454
+            })
3455
+            .catch(function(error) {
3456
+            })
3457
+        }else{
3458
+          this.statementVisible = true
3459
+          let obj = {
3460
+            order_id: this.order.id,
3461
+            settle_type: this.order.settle_type,
3462
+            start_time: this.order.settle_start_time,
3463
+            end_time: this.order.settle_end_time,
3464
+            balance_accounts_type: this.hisPatientInfo.balance_accounts_type
3465
+          }
3466
+          this.orderObj = obj
3467
+
3414
         }
3468
         }
3415
-        this.orderObj = obj
3416
         // this.$refs.print.getInfo(this.order.id)
3469
         // this.$refs.print.getInfo(this.order.id)
3417
       }else if (index == 100) {
3470
       }else if (index == 100) {
3418
         this.newStatementVisibleTwo = true
3471
         this.newStatementVisibleTwo = true
4938
 
4991
 
4939
                 this.all_table_data.push(obj)
4992
                 this.all_table_data.push(obj)
4940
             }else{
4993
             }else{
4941
-              console.log("count")
4942
-              console.log(response.data.data.list[i].his_patient.length)
4943
               if (response.data.data.list[i].his_patient.length > 0) {
4994
               if (response.data.data.list[i].his_patient.length > 0) {
4944
-
4945
                 for(let b = 0;b < response.data.data.list[i].his_patient.length; b++){
4995
                 for(let b = 0;b < response.data.data.list[i].his_patient.length; b++){
4946
-                  console.log("his_patient")
4947
-                  console.log(response.data.data.list[i].his_patient)
4948
                   let obj = {
4996
                   let obj = {
4949
                     id: response.data.data.list[i].id,
4997
                     id: response.data.data.list[i].id,
4950
                     name: response.data.data.list[i].name,
4998
                     name: response.data.data.list[i].name,
4961
             }
5009
             }
4962
           }
5010
           }
4963
 
5011
 
4964
-          console.log("this.all_table_data")
4965
-          console.log(this.all_table_data)
4966
-
4967
           let unChargePatient = []
5012
           let unChargePatient = []
4968
           for (let i = 0; i < this.all_table_data.length; i++) {
5013
           for (let i = 0; i < this.all_table_data.length; i++) {
4969
             unChargePatient.push(this.all_table_data[i])
5014
             unChargePatient.push(this.all_table_data[i])
5702
             this.info = response.data.data.info
5747
             this.info = response.data.data.info
5703
             this.order = response.data.data.order
5748
             this.order = response.data.data.order
5704
             this.addtions_charge = response.data.data.addtions_charge
5749
             this.addtions_charge = response.data.data.addtions_charge
5750
+
5751
+             // response.data.data.dia_arr
5752
+            this.form.diagnosis = []
5753
+            for(let i = 0; i <  response.data.data.dia_arr.length;i++) {
5754
+              if (response.data.data.dia_arr[i] > 0 || response.data.data.dia_arr[i].length > 0) {
5755
+                this.form.diagnosis.push(parseInt(response.data.data.dia_arr[i]))
5756
+              }
5757
+            }
5705
             this.setMonthPrescription(response.data.data.month_prescriptions)
5758
             this.setMonthPrescription(response.data.data.month_prescriptions)
5706
           }
5759
           }
5707
         })
5760
         })

+ 128 - 6
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Parādīt failu

389
              }
389
              }
390
             }
390
             }
391
 
391
 
392
-            console.log("list23323223322332232323322323wode",list)
392
+          
393
             for(let i=0;i<list.length;i++){
393
             for(let i=0;i<list.length;i++){
394
               list[i].last_price_in = 0
394
               list[i].last_price_in = 0
395
+              list[i].drugInOne = 0
396
+              list[i].drugAddOne =0
397
+              list[i].drugOutOne =0
395
               list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
398
               list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
399
+              list[i].drugInOne = this.getDrugWarehouseInfoTwentyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
396
               list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
400
               list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
397
               list[i].drugSaleMoney = this.getSaleMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
401
               list[i].drugSaleMoney = this.getSaleMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
398
 
402
 
399
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
403
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
404
+              list[i].drugAddOne = this.drugAddInfoTwetyOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
400
               list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
405
               list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
401
               list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
406
               list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
402
 
407
 
403
               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)
408
               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)
409
+              list[i].drugOutOne=  this.getDrugOutTwetyOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
404
               list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
410
               list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
405
               list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
411
               list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
406
 
412
 
407
-              list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
413
+              // list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
414
+              list[i].overDrug = this.getOverDrug(list[i].drugInOne,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
408
               list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
415
               list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
409
               list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
416
               list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
410
             }
417
             }
418
+            console.log("我的世界搜哦对哦奥法",list)
411
             this.tableList = list;
419
             this.tableList = list;
412
             this.total = response.data.data.total
420
             this.total = response.data.data.total
413
             this.manufacturerList = response.data.data.manufacturerList
421
             this.manufacturerList = response.data.data.manufacturerList
525
       totalfive += arr5[i].count
533
       totalfive += arr5[i].count
526
      }
534
      }
527
   }
535
   }
528
-  // console.log("totalONE223323232323232",totalOne)
529
-  // console.log("totalTwo2oo2o32o3o32o23",totalTwo)
530
-  // console.log("totalfive",totalfive)
531
-  // console.log("00-------------------------")
536
+  
532
   total = totalOne - totalTwo + totalthree - totalfour + totalfive
537
   total = totalOne - totalTwo + totalthree - totalfour + totalfive
533
   if (total < min_number) {
538
   if (total < min_number) {
534
      min_str = total + min_unit;
539
      min_str = total + min_unit;
554
   }
559
   }
555
 
560
 
556
 
561
 
562
+  },
563
+
564
+  getDrugWarehouseInfoTwentyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
565
+   var total = 0
566
+   var totalOne =0
567
+   var totalTwo = 0
568
+   var totalthree= 0
569
+   var totalfour = 0
570
+   var totalfive = 0
571
+   var max_str = "";
572
+   var min_str = "";
573
+   if(arr!=null && arr.length > 0){
574
+    for(let i=0;i<arr.length;i++){
575
+      totalOne += arr[i].count
576
+     }
577
+   }
578
+   if(arr2!=null && arr2.length > 0){
579
+    for(let i=0;i<arr2.length;i++){
580
+      totalTwo += arr2[i].count
581
+     }
582
+   }
583
+   if(arr3!=null && arr3.length > 0){
584
+    for(let i=0;i<arr3.length;i++){
585
+      totalthree += arr3[i].count
586
+     }
587
+   }
588
+  if(arr4!=null && arr4.length > 0){
589
+    for(let i=0;i<arr4.length;i++){
590
+      totalfour += arr4[i].count
591
+     }
592
+  }
593
+
594
+  if(arr5!=null && arr5.length > 0){
595
+    for(let i=0;i<arr5.length;i++){
596
+      totalfive += arr5[i].count
597
+     }
598
+  }
599
+  
600
+  total = totalOne - totalTwo + totalthree - totalfour + totalfive
601
+ 
602
+  
603
+   return total
557
   },
604
   },
558
   getDrugWarehouseInfo(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
605
   getDrugWarehouseInfo(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
559
    var total = 0
606
    var total = 0
1061
     }
1108
     }
1062
 
1109
 
1063
    },
1110
    },
1111
+
1112
+  drugAddInfoTwetyOne(arr,min_number,min_unit,max_unit,arr2){
1113
+    var total = 0
1114
+    var totalone = 0
1115
+    var totaltwo = 0
1116
+    var max_str = "";
1117
+    var min_str = "";
1118
+    if(arr!=null && arr.length > 0){
1119
+      for(let i=0;i<arr.length;i++){
1120
+        totalone += arr[i].count
1121
+      }
1122
+    }
1123
+    if(arr2!=null && arr2.length >0){
1124
+      for(let i=0;i<arr2.length;i++){
1125
+        totaltwo += arr2[i].count
1126
+      }
1127
+    }
1128
+    total = totalone + totaltwo
1129
+
1130
+    
1131
+    
1132
+    return total
1133
+
1134
+   },
1064
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1135
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1065
     var total = 0
1136
     var total = 0
1066
     var totalone =0
1137
     var totalone =0
1148
     return max_str + min_str;
1219
     return max_str + min_str;
1149
    }
1220
    }
1150
 
1221
 
1222
+   },
1223
+   getDrugOutTwetyOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1224
+    var total = 0
1225
+    var totalone = 0
1226
+    var totaltwo = 0
1227
+    var totalthree = 0
1228
+    var min_str = ""
1229
+    var max_str = ""
1230
+    if(arr!=null&&arr.length > 0){
1231
+      for(let i=0;i<arr.length;i++){
1232
+         totalone +=arr[i].count
1233
+      }
1234
+    }
1235
+    if(arr2!=null && arr2.length>0){
1236
+      for(let i=0;i<arr2.length;i++){
1237
+        totaltwo +=arr2[i].count
1238
+      }
1239
+    }
1240
+    if(arr3!=null && arr3.length>0){
1241
+      for(let i=0;i<arr3.length;i++){
1242
+        totalthree +=arr3[i].count
1243
+      }
1244
+    }
1245
+    total = totalone + totaltwo - totalthree
1246
+     
1247
+    return total
1248
+
1151
    },
1249
    },
1152
    getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1250
    getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1153
 
1251
 
1263
       }
1361
       }
1264
       return dear_name
1362
       return dear_name
1265
     },
1363
     },
1364
+    getOverDrug(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1365
+      var total = 0
1366
+      total = totalone + totaltwo - totalthree
1367
+      if (total < min_number) {
1368
+        min_str = total + min_unit;
1369
+      }
1370
+      if (total == 0) {
1371
+        min_str = "";
1372
+        max_str = "";
1373
+      }
1374
+      if (total >= min_number) {
1375
+        if (parseInt(total / min_number) != 0) {
1376
+          max_str = parseInt(total / min_number) + max_unit;
1377
+        }
1378
+        if (total % min_number != 0) {
1379
+          min_str = (total % min_number) + min_unit;
1380
+        }
1381
+    }
1382
+    if(max_str == "" && min_str == ""){
1383
+      return "0"
1384
+    }else{
1385
+      return max_str + min_str;
1386
+    }
1387
+   }
1266
   }
1388
   }
1267
 }
1389
 }
1268
 </script>
1390
 </script>

+ 84 - 7
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue Parādīt failu

392
             console.log("list23323223322332232323322323wode",list)
392
             console.log("list23323223322332232323322323wode",list)
393
             for(let i=0;i<list.length;i++){
393
             for(let i=0;i<list.length;i++){
394
               list[i].last_price_in = 0
394
               list[i].last_price_in = 0
395
+              list[i].drugAddOne= 0
396
+              list[i].drugOutOne =0
395
               list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
397
               list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
396
             //   list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
398
             //   list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
397
             //   list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
399
             //   list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
400
               list[i].drugSaleMoney = "/"
402
               list[i].drugSaleMoney = "/"
401
 
403
 
402
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
404
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
405
+              list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
403
             //   list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
406
             //   list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
404
             //   list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
407
             //   list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
405
               list[i].drugAddPrice = "/"
408
               list[i].drugAddPrice = "/"
406
               list[i].drugAddSalePrice = "/"
409
               list[i].drugAddSalePrice = "/"
407
 
410
 
408
               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)
411
               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)
412
+              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)
409
             //   list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
413
             //   list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
410
             //   list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
414
             //   list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
411
               list[i].drugOutPrice = "/"
415
               list[i].drugOutPrice = "/"
414
             //   list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
418
             //   list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
415
             //   list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
419
             //   list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
416
             //   list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
420
             //   list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
417
-             list[i].overDrug = this.GetDrugEndFlow(list[i].DrugEndFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
421
+            //  list[i].overDrug = this.GetDrugEndFlow(list[i].DrugEndFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
422
+             list[i].overDrug = this.GetDrugOver(list[i].DrugStatFlow.over_count,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
418
              list[i].overDrugPrice = "/"
423
              list[i].overDrugPrice = "/"
419
              list[i].oveDrugSaleMoney = "/"
424
              list[i].oveDrugSaleMoney = "/"
420
             }
425
             }
815
    }
820
    }
816
 
821
 
817
    total_price =(totalOne - totalTwo + total_three - total_four + totalFive).toFixed(2)
822
    total_price =(totalOne - totalTwo + total_three - total_four + totalFive).toFixed(2)
818
-   console.log("totalONE232332323323223322323wi",totalOne)
819
-   console.log("totalTwo99999999999999988888888",totalTwo)
820
-   console.log("total_three99999999999999988888888",total_three)
821
-   console.log("total_four99999999999999988888888",total_four)
822
-   console.log("totalFive99999999999999988888888",totalFive)
823
-   console.log("-------------------------------------------")
823
+ 
824
    if(total_price >0){
824
    if(total_price >0){
825
     return total_price
825
     return total_price
826
    }else{
826
    }else{
1071
       return max_str + min_str
1071
       return max_str + min_str
1072
     }
1072
     }
1073
 
1073
 
1074
+   },
1075
+   drugAddInfoOne(arr,min_number,min_unit,max_unit,arr2){
1076
+    var total = 0
1077
+    var totalone = 0
1078
+    var totaltwo = 0
1079
+    var max_str = "";
1080
+    var min_str = "";
1081
+    if(arr!=null && arr.length > 0){
1082
+      for(let i=0;i<arr.length;i++){
1083
+        totalone += arr[i].count
1084
+      }
1085
+    }
1086
+    if(arr2!=null && arr2.length >0){
1087
+      for(let i=0;i<arr2.length;i++){
1088
+        totaltwo += arr2[i].count
1089
+      }
1090
+    }
1091
+    total = totalone + totaltwo
1092
+
1093
+    
1094
+    return total
1095
+
1074
    },
1096
    },
1075
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1097
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1076
     var total = 0
1098
     var total = 0
1162
     return max_str + min_str;
1184
     return max_str + min_str;
1163
    }
1185
    }
1164
 
1186
 
1187
+   },
1188
+   getDrugOutOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1189
+    var total = 0
1190
+    var totalone = 0
1191
+    var totaltwo = 0
1192
+    var totalthree = 0
1193
+    var min_str = ""
1194
+    var max_str = ""
1195
+    if(arr!=null&&arr.length > 0){
1196
+      for(let i=0;i<arr.length;i++){
1197
+         totalone +=arr[i].count
1198
+      }
1199
+    }
1200
+    if(arr2!=null && arr2.length>0){
1201
+      for(let i=0;i<arr2.length;i++){
1202
+        totaltwo +=arr2[i].count
1203
+      }
1204
+    }
1205
+    if(arr3!=null && arr3.length>0){
1206
+      for(let i=0;i<arr3.length;i++){
1207
+        totalthree +=arr3[i].count
1208
+      }
1209
+    }
1210
+    total = totalone + totaltwo - totalthree
1211
+    
1212
+    return total
1213
+
1165
    },
1214
    },
1166
    getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1215
    getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1167
 
1216
 
1292
             return max_str + min_str;
1341
             return max_str + min_str;
1293
         }
1342
         }
1294
     },
1343
     },
1344
+
1345
+  
1295
     GetDrugEndFlow(total,min_number,min_unit,max_unit){
1346
     GetDrugEndFlow(total,min_number,min_unit,max_unit){
1296
 
1347
 
1297
      var min_str = ""
1348
      var min_str = ""
1334
       }
1385
       }
1335
       return dear_name
1386
       return dear_name
1336
     },
1387
     },
1388
+    GetDrugOver(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1389
+      var total = 0
1390
+      var min_str = ""
1391
+      var max_str = ""  
1392
+       total = totalone + totaltwo - totalthree
1393
+        if (total < min_number) {
1394
+          min_str = total + min_unit;
1395
+        }
1396
+        if (total == 0) {
1397
+          min_str = "";
1398
+          max_str = "";
1399
+        }
1400
+        if (total >= min_number) {
1401
+          if (parseInt(total / min_number) != 0) {
1402
+            max_str = parseInt(total / min_number) + max_unit;
1403
+          }
1404
+          if (total % min_number != 0) {
1405
+            min_str = (total % min_number) + min_unit;
1406
+          }
1407
+      }
1408
+      if(max_str == "" && min_str == ""){
1409
+        return "0"
1410
+      }else{
1411
+        return max_str + min_str;
1412
+      }
1413
+    }
1337
   }
1414
   }
1338
 }
1415
 }
1339
 </script>
1416
 </script>

+ 83 - 2
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue Parādīt failu

301
 
301
 
302
             for(let i=0;i<list.length;i++){
302
             for(let i=0;i<list.length;i++){
303
                 list[i].last_price_in = 0
303
                 list[i].last_price_in = 0
304
+                list[i].drugAddOne= 0
305
+                list[i].drugOutOne =0
306
+               
304
                 list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
307
                 list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
305
                 //   list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
308
                 //   list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
306
                 //   list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
309
                 //   list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
309
                 list[i].drugSaleMoney = "/"
312
                 list[i].drugSaleMoney = "/"
310
 
313
 
311
                 list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
314
                 list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
315
+                list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
312
                 //   list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
316
                 //   list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
313
                 //   list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
317
                 //   list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
314
                 list[i].drugAddPrice = "/"
318
                 list[i].drugAddPrice = "/"
315
                 list[i].drugAddSalePrice = "/"
319
                 list[i].drugAddSalePrice = "/"
316
 
320
 
317
                 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)
321
                 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)
322
+                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)
318
                 //   list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
323
                 //   list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
319
                 //   list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
324
                 //   list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
320
                 list[i].drugOutPrice = "/"
325
                 list[i].drugOutPrice = "/"
323
                 //   list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
328
                 //   list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
324
                 //   list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
329
                 //   list[i].overDrugPrice =  this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
325
                 //   list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
330
                 //   list[i].oveDrugSaleMoney =  this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
326
-                list[i].overDrug = this.GetDrugEndFlow(list[i].DrugEndFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
331
+                // list[i].overDrug = this.GetDrugEndFlow(list[i].DrugEndFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
332
+                list[i].overDrug = this.GetDrugOver(list[i].DrugStatFlow.over_count,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
327
                 list[i].overDrugPrice = "/"
333
                 list[i].overDrugPrice = "/"
328
                 list[i].oveDrugSaleMoney = "/"
334
                 list[i].oveDrugSaleMoney = "/"
329
             }
335
             }
957
       return max_str + min_str;
963
       return max_str + min_str;
958
     }
964
     }
959
 
965
 
966
+   },
967
+   drugAddInfoOne(arr,min_number,min_unit,max_unit,arr2){
968
+    var total = 0
969
+    var totalone = 0
970
+    var totaltwo = 0
971
+    var max_str = "";
972
+    var min_str = "";
973
+    if(arr!=null && arr.length > 0){
974
+      for(let i=0;i<arr.length;i++){
975
+        totalone += arr[i].count
976
+      }
977
+    }
978
+    if(arr2!=null && arr2.length >0){
979
+      for(let i=0;i<arr2.length;i++){
980
+        totaltwo += arr2[i].count
981
+      }
982
+    }
983
+    total = totalone + totaltwo
984
+
985
+    return total
986
+
960
    },
987
    },
961
     getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
988
     getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
962
     var total = 0
989
     var total = 0
1046
    }
1073
    }
1047
 
1074
 
1048
    },
1075
    },
1049
-     getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1076
+   getDrugOutOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1077
+    var total = 0
1078
+    var totalone = 0
1079
+    var totaltwo = 0
1080
+    var totalthree = 0
1081
+    var min_str = ""
1082
+    var max_str = ""
1083
+    if(arr!=null&&arr.length > 0){
1084
+      for(let i=0;i<arr.length;i++){
1085
+         totalone +=arr[i].count
1086
+      }
1087
+    }
1088
+    if(arr2!=null && arr2.length>0){
1089
+      for(let i=0;i<arr2.length;i++){
1090
+        totaltwo +=arr2[i].count
1091
+      }
1092
+    }
1093
+    if(arr3!=null && arr3.length>0){
1094
+      for(let i=0;i<arr3.length;i++){
1095
+        totalthree +=arr3[i].count
1096
+      }
1097
+    }
1098
+    total = totalone + totaltwo - totalthree
1099
+    
1100
+    return total
1101
+
1102
+   },
1103
+   getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1050
 
1104
 
1051
     var total_price = 0
1105
     var total_price = 0
1052
     var total_one_price =0
1106
     var total_one_price =0
1139
             return max_str + min_str;
1193
             return max_str + min_str;
1140
         }
1194
         }
1141
     },
1195
     },
1196
+
1142
     GetDrugEndFlow(total,min_number,min_unit,max_unit){
1197
     GetDrugEndFlow(total,min_number,min_unit,max_unit){
1143
 
1198
 
1144
      var min_str = ""
1199
      var min_str = ""
1173
       }
1228
       }
1174
       return dear_name
1229
       return dear_name
1175
     },
1230
     },
1231
+    GetDrugOver(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1232
+      var total = 0
1233
+      var min_str = ""
1234
+      var max_str = ""  
1235
+       total = totalone + totaltwo - totalthree
1236
+        if (total < min_number) {
1237
+          min_str = total + min_unit;
1238
+        }
1239
+        if (total == 0) {
1240
+          min_str = "";
1241
+          max_str = "";
1242
+        }
1243
+        if (total >= min_number) {
1244
+          if (parseInt(total / min_number) != 0) {
1245
+            max_str = parseInt(total / min_number) + max_unit;
1246
+          }
1247
+          if (total % min_number != 0) {
1248
+            min_str = (total % min_number) + min_unit;
1249
+          }
1250
+      }
1251
+      if(max_str == "" && min_str == ""){
1252
+        return "0"
1253
+      }else{
1254
+        return max_str + min_str;
1255
+      }
1256
+    }
1176
    },
1257
    },
1177
     created(){
1258
     created(){
1178
       this.org_id =  this.$store.getters.xt_user.org_id
1259
       this.org_id =  this.$store.getters.xt_user.org_id

+ 18 - 4
src/xt_pages/stock/drugs/drugStockOutOrder.vue Parādīt failu

1570
       getExportOutOrderDrugList(params).then((response) => {
1570
       getExportOutOrderDrugList(params).then((response) => {
1571
         if (response.data.state == 1) {
1571
         if (response.data.state == 1) {
1572
           var list = response.data.data.list;
1572
           var list = response.data.data.list;
1573
-        
1573
+          if(list!=null){
1574
+            for(let i=0;i<list.length;i++){
1575
+              list[i].count_one =0
1576
+              if(list[i].count_unit == list[i].max_unit && list[i].max_unit!=list[i].min_unit){
1577
+                 list[i].count_one = list[i].count * list[i].min_number
1578
+              }
1579
+              if(list[i].count_unit == list[i].min_unit && list[i].max_unit!=list[i].min_unit){
1580
+                 list[i].count_one = list[i].count 
1581
+              }
1582
+
1583
+              if(list[i].count_unit == list[i].max_unit && list[i].max_unit==list[i].min_unit){
1584
+                 list[i].count_one = list[i].count 
1585
+              }
1586
+            }
1587
+          }
1574
           this.exportList = list;
1588
           this.exportList = list;
1575
           this.exportLoding = false
1589
           this.exportLoding = false
1576
           this.manufacturerList = response.data.data.manufacturerList;
1590
           this.manufacturerList = response.data.data.manufacturerList;
1631
             this.exportList[i].dealer = this.dealerList[z].dealer_name;
1645
             this.exportList[i].dealer = this.dealerList[z].dealer_name;
1632
           }
1646
           }
1633
         }
1647
         }
1634
-        if(this.exportList[i].retail_price ==0){
1635
-           this.exportList[i].retail_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2)
1636
-        }
1648
+       
1649
+        this.exportList[i].retail_price = (this.exportList[i].count_one * this.exportList[i].min_price).toFixed(2)
1650
+        
1637
         this.exportList[i].ctime = this.getTime(this.exportList[i].ctime)
1651
         this.exportList[i].ctime = this.getTime(this.exportList[i].ctime)
1638
       }
1652
       }
1639
 
1653
 

+ 3 - 4
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Parādīt failu

1001
               "{y}-{h}-{d}"
1001
               "{y}-{h}-{d}"
1002
             );
1002
             );
1003
 
1003
 
1004
-            response.data.data.list[i].stock_count =
1005
-              response.data.data.list[i].stock_count;
1006
-            response.data.data.list[i].last_price =
1007
-              response.data.data.list[i].last_price;
1004
+            response.data.data.list[i].stock_count = response.data.data.list[i].stock_count;
1005
+            response.data.data.list[i].last_price = response.data.data.list[i].last_price;
1006
+            response.data.data.list[i].patient_id = response.data.data.list[i].patient_id
1008
             this.recordInfo.recordData.push(response.data.data.list[i]);
1007
             this.recordInfo.recordData.push(response.data.data.list[i]);
1009
           }
1008
           }
1010
 
1009
 

+ 2 - 1
src/xt_pages/stock/query/purchaseNewStockQuery.vue Parādīt failu

286
               // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
286
               // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
287
               // list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
287
               // list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
288
               // list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
288
               // list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
289
-              list[i].overStock = list[i].GoodEndFlowInfo.over_count
289
+              // list[i].overStock = list[i].GoodEndFlowInfo.over_count
290
+              list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
290
               list[i].overPrice = "/"
291
               list[i].overPrice = "/"
291
               list[i].overMoney = "/"
292
               list[i].overMoney = "/"
292
              
293
              

+ 2 - 1
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue Parādīt failu

188
                     // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
188
                     // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
189
                     // list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
189
                     // list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
190
                     // list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
190
                     // list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
191
-                    list[i].overStock = list[i].GoodEndFlowInfo.over_count
191
+                    // list[i].overStock = list[i].GoodEndFlowInfo.over_count
192
+                    list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
192
                     list[i].overPrice = "/"
193
                     list[i].overPrice = "/"
193
                     list[i].overMoney = "/"
194
                     list[i].overMoney = "/"
194
                 
195
                 

+ 3 - 1
src/xt_pages/stock/query/purchaseStockQuery.vue Parādīt failu

262
               list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
262
               list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
263
               list[i].saleOutMoney = this.getSaleStockMony(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
263
               list[i].saleOutMoney = this.getSaleStockMony(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
264
               
264
               
265
-              list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
265
+              // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
266
+
267
+              list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
266
               list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
268
               list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
267
               list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
269
               list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
268
              
270
              

+ 2 - 1
src/xt_pages/stock/query/purchaseStockQueryPrint.vue Parādīt failu

172
                   list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
172
                   list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
173
                   list[i].saleOutMoney = this.saleOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
173
                   list[i].saleOutMoney = this.saleOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
174
                   
174
                   
175
-                  list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
175
+                  list[i].overStock = list[i].stockIn + list[i].stockAdd -list[i].outStock
176
+                  // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
176
                   list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
177
                   list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
177
                   list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
178
                   list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
178
                 
179
                 

+ 1 - 0
src/xt_pages/stock/stockOutOrderEdit.vue Parādīt failu

913
             response.data.data.list[i].remark = response.data.data.list[i].remark
913
             response.data.data.list[i].remark = response.data.data.list[i].remark
914
             response.data.data.list[i].buy_price = response.data.data.list[i].buy_price.toString()
914
             response.data.data.list[i].buy_price = response.data.data.list[i].buy_price.toString()
915
             response.data.data.list[i].stock_count = response.data.data.list[i].stock_count.toString()
915
             response.data.data.list[i].stock_count = response.data.data.list[i].stock_count.toString()
916
+            response.data.data.list[i].patient_id = response.data.data.list[i].patient_id
916
             if(response.data.data.list[i].dealer == 0){
917
             if(response.data.data.list[i].dealer == 0){
917
                response.data.data.list[i].dealer = ""
918
                response.data.data.list[i].dealer = ""
918
             }
919
             }

+ 7 - 5
src/xt_pages/user/doctorAdvice.vue Parādīt failu

199
           <template slot-scope="scope">
199
           <template slot-scope="scope">
200
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
200
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
201
               <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
201
               <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
202
-                <span v-if="scope.row.frequency_type >0" style="color:#1AAD19"> {{ scope.row.advice_name}}</span>
202
+                <span v-if="scope.row.frequency_type ==1" style="color:#1AAD19"> {{ scope.row.advice_name}}</span>
203
+                <span v-if="scope.row.frequency_type ==2 && scope.row.day_count>0" style="color:#1AAD19"> {{ scope.row.advice_name}}</span>
204
+                <span v-if="scope.row.frequency_type ==3 && scope.row.week_day!=''" style="color:#1AAD19"> {{ scope.row.advice_name}}</span>
203
                 <span v-if="scope.row.frequency_type ==0"> {{ scope.row.advice_name}}</span>
205
                 <span v-if="scope.row.frequency_type ==0"> {{ scope.row.advice_name}}</span>
204
                 <i class="el-icon-arrow-down el-icon--right"></i>
206
                 <i class="el-icon-arrow-down el-icon--right"></i>
205
               </span>
207
               </span>
4432
       // this.sameRowArr = sameRowArr;
4434
       // this.sameRowArr = sameRowArr;
4433
     },
4435
     },
4434
     mergeSpan({ row, column, rowIndex, columnIndex }) {
4436
     mergeSpan({ row, column, rowIndex, columnIndex }) {
4435
-      console.log("row29292929",columnIndex)
4436
-      console.log("conlumnindex",this.tempArr)
4437
+      // console.log("row29292929",columnIndex)
4438
+      // console.log("conlumnindex",this.tempArr)
4437
       if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) {
4439
       if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) {
4438
         const _row = this.tempArr[rowIndex];
4440
         const _row = this.tempArr[rowIndex];
4439
         const _col = _row > 0 ? 1 : 0;
4441
         const _col = _row > 0 ? 1 : 0;
4440
-        console.log("_row--------------",_row)
4441
-        console.log("_col",_col)
4442
+        // console.log("_row--------------",_row)
4443
+        // console.log("_col",_col)
4442
         return {
4444
         return {
4443
           rowspan: _row,
4445
           rowspan: _row,
4444
           colspan: _col
4446
           colspan: _col