소스 검색

11月14日 库存扣减更新

XMLWAN 2 년 전
부모
커밋
ff59f8cce6

+ 6 - 6
src/xt_pages/stock/detail/print.vue 파일 보기

@@ -52,8 +52,8 @@
52 52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53 53
                 <span v-if="type == 2"> 
54 54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
55
-                   <span  v-if="org_id == 10265">{{getMySelfCount(item.good_id) }}</span>   
56
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583">{{getStockCount(item.good_id) }}</span>
55
+                   <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>   
56
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583&&org_id!=10215">{{getStockCount(item.good_id) }}</span>
57 57
                 </span>
58 58
                
59 59
                 <span v-if="type == 4"> {{ item.count }}</span>
@@ -77,8 +77,8 @@
77 77
                   <span v-if="org_id == 3907 || org_id ==9919">
78 78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
79 79
                   </span>
80
-                  <span v-if="org_id == 10265">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80
+                  <span v-if="org_id == 10265 || org_id == 10215">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919&&org_id!=10215">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
82 82
                 </span>
83 83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
84 84
               </td>
@@ -100,8 +100,8 @@
100 100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
101 101
                 <span v-if="type == 2">
102 102
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
103
-                  <span v-if="org_id == 10265">{{getWareOutTotalSix().toFixed(2)}}</span>
104
-                  <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265"> {{getWareOutTotal().toFixed(2)}}</span>
103
+                  <span v-if="org_id == 10265 || org_id == 10215">{{getWareOutTotalSix().toFixed(2)}}</span>
104
+                  <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265 && org_id!=10215"> {{getWareOutTotal().toFixed(2)}}</span>
105 105
                  </span> 
106 106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
107 107
               </td>

+ 5 - 4
src/xt_pages/stock/detail/stockOutDetail.vue 파일 보기

@@ -744,8 +744,6 @@ export default {
744 744
       },
745 745
 
746 746
     exportList(){
747
-       console.log("哈哈哈",this.tableOut)
748
-      
749 747
        for(let i=0;i<this.tableOut.length;i++){
750 748
         this.tableOut[i].index = i+1
751 749
         this.tableOut[i].good_name = this.tableOut[i].good_name
@@ -756,14 +754,17 @@ export default {
756 754
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
757 755
         }else if(this.orgId == 10265){
758 756
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
757
+        }else if(this.orgId == 10215){
758
+          this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
759 759
         }else{
760 760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
761 761
         }
762 762
        
763
-        if(this.orgId  == 10265){
763
+        if(this.orgId  == 10265 || this.orgId ==10215 ){
764 764
         
765 765
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
766
-        }else{
766
+        }
767
+        if(this.orgId!=10265 && this.orgId !=10215){
767 768
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
768 769
         }
769 770
        }

+ 25 - 5
src/xt_pages/stock/drugs/components/drugOutDetail.vue 파일 보기

@@ -136,15 +136,25 @@
136 136
         </el-table-column>
137 137
         <el-table-column label="数量" align="center">
138 138
           <template slot-scope="scope">
139
-            {{scope.row.count}}
139
+            {{scope.row.count}} 
140 140
           </template>
141 141
         </el-table-column>
142 142
         <el-table-column label="总价" align="center">
143 143
           <template slot-scope="scope">
144 144
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
145 145
            <span v-else>
146
-             <span v-if="scope.row.price >0">{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
147
-             <span v-if="scope.row.price  == 0">{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
146
+             <span v-if="scope.row.price >0">
147
+                <span v-if="scope.row.count >= scope.row.min_number">
148
+                 {{((scope.row.last_price * scope.row.count)/scope.row.min_number).toFixed(2)}}
149
+                </span>  
150
+                <span v-else>{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
151
+              </span>
152
+             <span v-if="scope.row.price  == 0">
153
+               <span v-if="scope.row.count >=scope.row.min_number">
154
+                 {{((getPrice(scope.row.drug_id)* scope.row.count)/scope.row.min_number).toFixed(2)}}
155
+               </span> 
156
+               <span v-else>{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
157
+             </span>
148 158
            </span>
149 159
             <!-- {{scope.row.total_price}} -->
150 160
           </template>
@@ -569,10 +579,20 @@ export default {
569 579
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
570 580
             if(this.org_id == 9671 || this.org_id == 9919){
571 581
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
572
-              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
582
+              if(this.tableData[i].count >=this.tableData[i].min_number){
583
+               this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
584
+              }else{
585
+                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
586
+              }
587
+              
573 588
             }else{
574 589
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
575
-              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
590
+                if(this.tableData[i].count >=this.tableData[i].min_number){
591
+                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)/this.tableData[i].min_number
592
+              }else{
593
+                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
594
+              }
595
+             
576 596
             }
577 597
          }
578 598
        }

+ 2 - 2
src/xt_pages/stock/drugs/drugStockOutOrder.vue 파일 보기

@@ -235,8 +235,8 @@
235 235
           </el-table-column> -->
236 236
           <el-table-column label="总价" align="center">
237 237
             <template slot-scope="scope">
238
-              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price).toFixed(2)}}</span>
239
-              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price).toFixed(2)}}</span>
238
+              <span v-if="scope.row.price > 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price/scope.row.min_number)/scope.row.min_number).toFixed(2)}}</span>
239
+              <span v-if="scope.row.price == 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price)/scope.row.min_number).toFixed(2)}}</span>
240 240
             </template>
241 241
           </el-table-column>
242 242
           <el-table-column label="生产厂家" align="center">