XMLWAN пре 2 година
родитељ
комит
63de4e9971

+ 9 - 2
src/xt_pages/hospitalStation/components/deskRecord.vue Прегледај датотеку

@@ -792,7 +792,7 @@ export default {
792 792
     this.first_dialysis_date = this.getTime(
793 793
       this.patientInfo.first_dialysis_date
794 794
     );
795
-
795
+    console.log("this.23323232322332233223",this.case_history)
796 796
     this.primary_disease = this.case_history.primary_disease
797 797
     this.confirm_failure_date = this.case_history.confirm_failure_date
798 798
     this.drug_allergy_history = this.case_history.drug_allergy_history
@@ -849,7 +849,14 @@ export default {
849 849
           this.case_history.diagnose = "";
850 850
         }
851 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 860
         this.watchSign++;
854 861
       },
855 862
     },

+ 7 - 2
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue Прегледај датотеку

@@ -792,7 +792,7 @@ export default {
792 792
     this.first_dialysis_date = this.getTime(
793 793
       this.patientInfo.first_dialysis_date
794 794
     );
795
-
795
+   
796 796
     this.primary_disease = this.case_history.primary_disease
797 797
     this.confirm_failure_date = this.case_history.confirm_failure_date
798 798
     this.drug_allergy_history = this.case_history.drug_allergy_history
@@ -849,7 +849,12 @@ export default {
849 849
           this.case_history.diagnose = "";
850 850
         }
851 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 858
         this.watchSign++;
854 859
       },
855 860
     },

+ 43 - 23
src/xt_pages/stock/drugs/components/drugOutDetail.vue Прегледај датотеку

@@ -161,20 +161,22 @@
161 161
           <template slot-scope="scope">
162 162
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
163 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 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 169
               </span>
170 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 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 179
            </span>
177
-            <!-- {{scope.row.total_price}} -->
178 180
           </template>
179 181
         </el-table-column>
180 182
       </el-table>
@@ -433,13 +435,31 @@ export default {
433 435
                total_price += order[i].count * order[i].last_price
434 436
              }else{
435 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 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,7 +478,7 @@ export default {
458 478
             order[i].total_price = order[i].total_price.toFixed(2)
459 479
           }
460 480
        
461
-         
481
+          console.log("233223322323322332232323",order)
462 482
           this.tableData = order
463 483
            let objInfo = {}
464 484
           order.forEach((item,index)=>{
@@ -524,7 +544,7 @@ export default {
524 544
            for(let i=0;i<list.length;i++){
525 545
               list[i].total_price = list[i].count * list[i].price
526 546
             }
527
-        
547
+          
528 548
           this.tableList = list 
529 549
           var total = response.data.data.total
530 550
           this.total = total
@@ -611,7 +631,7 @@ export default {
611 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 632
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
613 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 635
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
616 636
               if(this.tableData[i].count >=this.tableData[i].min_number){
617 637
                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
@@ -621,12 +641,12 @@ export default {
621 641
               
622 642
             }else{
623 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,7 +698,7 @@ export default {
678 698
             var list = response.data.data.list
679 699
           
680 700
             let objInfo = {}
681
-            if(this.org_id == 9671 || this.org_id == 9919){
701
+            if(this.org_id == 9919){
682 702
               list.forEach((item,index)=>{
683 703
               let { drug_id } = item
684 704
               if(!objInfo[drug_id]){

+ 11 - 8
src/xt_pages/stock/drugs/drugStockOutOrder.vue Прегледај датотеку

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