Browse Source

11月14日 库存扣减更新

XMLWAN 2 years ago
parent
commit
ff59f8cce6

+ 6 - 6
src/xt_pages/stock/detail/print.vue View File

52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53
                 <span v-if="type == 2"> 
53
                 <span v-if="type == 2"> 
54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
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
                 </span>
57
                 </span>
58
                
58
                
59
                 <span v-if="type == 4"> {{ item.count }}</span>
59
                 <span v-if="type == 4"> {{ item.count }}</span>
77
                   <span v-if="org_id == 3907 || org_id ==9919">
77
                   <span v-if="org_id == 3907 || org_id ==9919">
78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
79
                   </span>
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
                 </span>
82
                 </span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
84
               </td>
84
               </td>
100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
101
                 <span v-if="type == 2">
101
                 <span v-if="type == 2">
102
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
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
                  </span> 
105
                  </span> 
106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
107
               </td>
107
               </td>

+ 5 - 4
src/xt_pages/stock/detail/stockOutDetail.vue View File

744
       },
744
       },
745
 
745
 
746
     exportList(){
746
     exportList(){
747
-       console.log("哈哈哈",this.tableOut)
748
-      
749
        for(let i=0;i<this.tableOut.length;i++){
747
        for(let i=0;i<this.tableOut.length;i++){
750
         this.tableOut[i].index = i+1
748
         this.tableOut[i].index = i+1
751
         this.tableOut[i].good_name = this.tableOut[i].good_name
749
         this.tableOut[i].good_name = this.tableOut[i].good_name
756
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
754
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
757
         }else if(this.orgId == 10265){
755
         }else if(this.orgId == 10265){
758
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
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
         }else{
759
         }else{
760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
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
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
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
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
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 View File

136
         </el-table-column>
136
         </el-table-column>
137
         <el-table-column label="数量" align="center">
137
         <el-table-column label="数量" align="center">
138
           <template slot-scope="scope">
138
           <template slot-scope="scope">
139
-            {{scope.row.count}}
139
+            {{scope.row.count}} 
140
           </template>
140
           </template>
141
         </el-table-column>
141
         </el-table-column>
142
         <el-table-column label="总价" align="center">
142
         <el-table-column label="总价" align="center">
143
           <template slot-scope="scope">
143
           <template slot-scope="scope">
144
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
144
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
145
            <span v-else>
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
            </span>
158
            </span>
149
             <!-- {{scope.row.total_price}} -->
159
             <!-- {{scope.row.total_price}} -->
150
           </template>
160
           </template>
569
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
579
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
570
             if(this.org_id == 9671 || this.org_id == 9919){
580
             if(this.org_id == 9671 || this.org_id == 9919){
571
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
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
             }else{
588
             }else{
574
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
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 View File

235
           </el-table-column> -->
235
           </el-table-column> -->
236
           <el-table-column label="总价" align="center">
236
           <el-table-column label="总价" align="center">
237
             <template slot-scope="scope">
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
             </template>
240
             </template>
241
           </el-table-column>
241
           </el-table-column>
242
           <el-table-column label="生产厂家" align="center">
242
           <el-table-column label="生产厂家" align="center">