Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
63de4e9971

+ 9 - 2
src/xt_pages/hospitalStation/components/deskRecord.vue View File

792
     this.first_dialysis_date = this.getTime(
792
     this.first_dialysis_date = this.getTime(
793
       this.patientInfo.first_dialysis_date
793
       this.patientInfo.first_dialysis_date
794
     );
794
     );
795
-
795
+    console.log("this.23323232322332233223",this.case_history)
796
     this.primary_disease = this.case_history.primary_disease
796
     this.primary_disease = this.case_history.primary_disease
797
     this.confirm_failure_date = this.case_history.confirm_failure_date
797
     this.confirm_failure_date = this.case_history.confirm_failure_date
798
     this.drug_allergy_history = this.case_history.drug_allergy_history
798
     this.drug_allergy_history = this.case_history.drug_allergy_history
849
           this.case_history.diagnose = "";
849
           this.case_history.diagnose = "";
850
         }
850
         }
851
         this.form.id = this.case_history.id;
851
         this.form.id = this.case_history.id;
852
-
852
+        this.primary_disease = this.case_history.primary_disease
853
+        this.confirm_failure_date = this.case_history.confirm_failure_date
854
+        this.drug_allergy_history = this.case_history.drug_allergy_history
855
+        this.physical_examination = this.case_history.physical_examination
856
+        this.special_inspection = this.case_history.special_inspection
857
+        this.lab_apparatus = this.case_history.lab_apparatus
858
+       
859
+      
853
         this.watchSign++;
860
         this.watchSign++;
854
       },
861
       },
855
     },
862
     },

+ 7 - 2
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

792
     this.first_dialysis_date = this.getTime(
792
     this.first_dialysis_date = this.getTime(
793
       this.patientInfo.first_dialysis_date
793
       this.patientInfo.first_dialysis_date
794
     );
794
     );
795
-
795
+   
796
     this.primary_disease = this.case_history.primary_disease
796
     this.primary_disease = this.case_history.primary_disease
797
     this.confirm_failure_date = this.case_history.confirm_failure_date
797
     this.confirm_failure_date = this.case_history.confirm_failure_date
798
     this.drug_allergy_history = this.case_history.drug_allergy_history
798
     this.drug_allergy_history = this.case_history.drug_allergy_history
849
           this.case_history.diagnose = "";
849
           this.case_history.diagnose = "";
850
         }
850
         }
851
         this.form.id = this.case_history.id;
851
         this.form.id = this.case_history.id;
852
-
852
+        this.primary_disease = this.case_history.primary_disease
853
+        this.confirm_failure_date = this.case_history.confirm_failure_date
854
+        this.drug_allergy_history = this.case_history.drug_allergy_history
855
+        this.physical_examination = this.case_history.physical_examination
856
+        this.special_inspection = this.case_history.special_inspection
857
+        this.lab_apparatus = this.case_history.lab_apparatus
853
         this.watchSign++;
858
         this.watchSign++;
854
       },
859
       },
855
     },
860
     },

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

161
           <template slot-scope="scope">
161
           <template slot-scope="scope">
162
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
162
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
163
            <span v-else>
163
            <span v-else>
164
-             <span v-if="scope.row.price >0">
165
-                <span v-if="scope.row.count >= scope.row.min_number">
166
-                 {{((scope.row.price * scope.row.count)/scope.row.min_number).toFixed(2)}}
164
+             <!-- <span v-if="scope.row.price >0">
165
+                <span v-if="scope.row.count_unit == scope.row.min_unit">
166
+                  {{(scope.row.price * scope.row.count).toFixed(2)}}
167
                 </span>  
167
                 </span>  
168
-                <span v-else>{{(scope.row.price * scope.row.count).toFixed(2)}}</span>
168
+                <span v-if="scope.row.count_unit == scope.row.max_unit">{{(scope.row.price * scope.row.count * scope.row.min_number).toFixed(2)}}</span>
169
               </span>
169
               </span>
170
              <span v-if="scope.row.price  == 0">
170
              <span v-if="scope.row.price  == 0">
171
-               <span v-if="scope.row.count >=scope.row.min_number">
172
-                 {{((getPrice(scope.row.drug_id)* scope.row.count)/scope.row.min_number).toFixed(2)}}
171
+               <span v-if="scope.row.count_unit  == scope.row.min_unit">
172
+                 {{((getPrice(scope.row.drug_id)* scope.row.count)).toFixed(2)}}
173
                </span> 
173
                </span> 
174
-               <span v-else>{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
175
-             </span>
174
+               <span v-if="scope.row.count_unit == scope.row.max_unit">
175
+                 {{(getPrice(scope.row.drug_id)* scope.row.count * scope.row.min_number).toFixed(2)}}
176
+              </span>
177
+             </span> -->
178
+             {{scope.row.total_price}}
176
            </span>
179
            </span>
177
-            <!-- {{scope.row.total_price}} -->
178
           </template>
180
           </template>
179
         </el-table-column>
181
         </el-table-column>
180
       </el-table>
182
       </el-table>
433
                total_price += order[i].count * order[i].last_price
435
                total_price += order[i].count * order[i].last_price
434
              }else{
436
              }else{
435
                if(order[i].price > 0){
437
                if(order[i].price > 0){
436
-                 order[i].total_price = order[i].count * order[i].price
437
-                 total_price += order[i].count * order[i].price
438
+                 if(order[i].count_unit == order[i].min_unit){
439
+                   order[i].total_price = order[i].count * order[i].price
440
+                  total_price += order[i].total_price
441
+                 }
442
+                 if(order[i].count_unit == order[i].max_unit){
443
+                   order[i].total_price += order[i].count * order[i].price * order[i].min_number
444
+                   total_price += order[i].total_price
445
+                 }
446
+                
438
                }
447
                }
439
                if(order[i].price ==0 ){
448
                if(order[i].price ==0 ){
440
-                  order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
441
-                  total_price += order[i].count * this.getPrice(order[i].drug_id)
442
-                  order[i].price = this.getPrice(order[i].drug_id)
449
+                 if(order[i].count_unit == order[i].min_unit){
450
+                    order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
451
+                   // total_price += order[i].count * this.getPrice(order[i].drug_id)
452
+                   total_price +=order[i].total_price
453
+                    order[i].price = this.getPrice(order[i].drug_id)
454
+                 }
455
+                
456
+                if(order[i].count_unit == order[i].max_unit){
457
+                   order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) * order[i].min_number
458
+                   //total_price += order[i].count * this.getPrice(order[i].drug_id)
459
+                   order[i].total_price+=order[i].total_price
460
+                   order[i].price = this.getPrice(order[i].drug_id)
461
+                }
462
+                 
443
                } 
463
                } 
444
                
464
                
445
              }
465
              }
458
             order[i].total_price = order[i].total_price.toFixed(2)
478
             order[i].total_price = order[i].total_price.toFixed(2)
459
           }
479
           }
460
        
480
        
461
-         
481
+          console.log("233223322323322332232323",order)
462
           this.tableData = order
482
           this.tableData = order
463
            let objInfo = {}
483
            let objInfo = {}
464
           order.forEach((item,index)=>{
484
           order.forEach((item,index)=>{
524
            for(let i=0;i<list.length;i++){
544
            for(let i=0;i<list.length;i++){
525
               list[i].total_price = list[i].count * list[i].price
545
               list[i].total_price = list[i].count * list[i].price
526
             }
546
             }
527
-        
547
+          
528
           this.tableList = list 
548
           this.tableList = list 
529
           var total = response.data.data.total
549
           var total = response.data.data.total
530
           this.total = total
550
           this.total = total
611
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
631
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
612
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
632
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
613
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
633
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
614
-            if(this.org_id == 9671 || this.org_id == 9919){
634
+            if(this.org_id == 9919){
615
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
635
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
616
               if(this.tableData[i].count >=this.tableData[i].min_number){
636
               if(this.tableData[i].count >=this.tableData[i].min_number){
617
                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
637
                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
621
               
641
               
622
             }else{
642
             }else{
623
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
643
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
624
-                if(this.tableData[i].count >=this.tableData[i].min_number){
625
-                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)/this.tableData[i].min_number
626
-              }else{
627
-                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
644
+              if(this.tableData[i].count_unit == this.tableData[i].min_unit){
645
+                 this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
646
+              }
647
+              if(this.tableData[i].count_unit == this.tableData[i].max_unit){
648
+                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
628
               }
649
               }
629
-             
630
             }
650
             }
631
          }
651
          }
632
        }
652
        }
678
             var list = response.data.data.list
698
             var list = response.data.data.list
679
           
699
           
680
             let objInfo = {}
700
             let objInfo = {}
681
-            if(this.org_id == 9671 || this.org_id == 9919){
701
+            if(this.org_id == 9919){
682
               list.forEach((item,index)=>{
702
               list.forEach((item,index)=>{
683
               let { drug_id } = item
703
               let { drug_id } = item
684
               if(!objInfo[drug_id]){
704
               if(!objInfo[drug_id]){

+ 11 - 8
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

227
 
227
 
228
           <el-table-column label="出库数量" align="center">
228
           <el-table-column label="出库数量" align="center">
229
             <template slot-scope="scope">
229
             <template slot-scope="scope">
230
-              <!-- <span v-if="scope.row.is_sys ==  0">{{getTotalCount(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span> -->
231
               <span> {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
230
               <span> {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
232
             </template>
231
             </template>
233
           </el-table-column>
232
           </el-table-column>
236
               <span>{{getXuserName(scope.row.admin_user_id)}} </span>  
235
               <span>{{getXuserName(scope.row.admin_user_id)}} </span>  
237
             </template>
236
             </template>
238
           </el-table-column>
237
           </el-table-column>
239
-          <el-table-column label="出货单价" align="center">
238
+          <el-table-column label="单价" align="center">
240
             <template slot-scope="scope">
239
             <template slot-scope="scope">
241
               <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
240
               <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
242
               <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
241
               <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
249
           </el-table-column> -->
248
           </el-table-column> -->
250
           <el-table-column label="总价" align="center">
249
           <el-table-column label="总价" align="center">
251
             <template slot-scope="scope">
250
             <template slot-scope="scope">
252
-              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price).toFixed(2)}}</span>
253
-              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price).toFixed(2)}}</span>
251
+              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number).toFixed(2)}}</span>
252
+              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number).toFixed(2)}}</span>
254
             </template>
253
             </template>
255
           </el-table-column>
254
           </el-table-column>
256
           <el-table-column label="生产厂家" align="center">
255
           <el-table-column label="生产厂家" align="center">
980
             }
979
             }
981
            }
980
            }
982
         
981
         
983
-            this.drugFlowList = drugFlowList
982
+          this.drugFlowList = drugFlowList
984
          }
983
          }
985
          if(is_sys == 0 || is_sys == 12){
984
          if(is_sys == 0 || is_sys == 12){
986
             var flowlist = response.data.data.flowlist
985
             var flowlist = response.data.data.flowlist
1005
               list[i].number = ""
1004
               list[i].number = ""
1006
            }
1005
            }
1007
          }
1006
          }
1008
-        
1009
          this.tableList = list
1007
          this.tableList = list
1008
+         console.log("单价23323232323232232332232323233223",this.tableList)
1010
         }
1009
         }
1011
      })
1010
      })
1012
    },
1011
    },
1240
             }
1239
             }
1241
           }
1240
           }
1242
         }
1241
         }
1243
-        const tHeader = ['药品名称','药品类型','规格&单位', '批号','出库数量','出货单价','拆零零售价','总价','生产厂家','生产日期','有效日期','经销商','批准文号','备注']
1242
+        const tHeader = ['药品名称','药品类型','规格&单位', '批号','出库数量','单价','拆零零售价','总价','生产厂家','生产日期','有效日期','经销商','批准文号','备注']
1244
         const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1243
         const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1245
 
1244
 
1246
         // console.log("table",this.exportList)
1245
         // console.log("table",this.exportList)
1257
      formatJson(filterVal, jsonData) {
1256
      formatJson(filterVal, jsonData) {
1258
       return jsonData.map(v => filterVal.map(j => v[j]));
1257
       return jsonData.map(v => filterVal.map(j => v[j]));
1259
      },
1258
      },
1260
-      getAllPriceOne(drug_id,price,min_price){
1259
+      getAllPriceOne(drug_id,price,min_price,max_unit,count_unit,min_number){
1260
+        console.log("drugfalowlist22332233232",this.drugFlowList)
1261
         var total = 0
1261
         var total = 0
1262
         var all_price = 0
1262
         var all_price = 0
1263
         for(let i=0;i<this.drugFlowList.length;i++){
1263
         for(let i=0;i<this.drugFlowList.length;i++){
1265
               total += this.drugFlowList[i].count
1265
               total += this.drugFlowList[i].count
1266
           }
1266
           }
1267
         }
1267
         }
1268
+        if(max_unit == count_unit){
1269
+          total = total * min_number
1270
+        }
1268
         all_price = total * price
1271
         all_price = total * price
1269
 
1272
 
1270
         return  all_price
1273
         return  all_price