XMLWAN hace 3 años
padre
commit
92c4b302fd
Se han modificado 2 ficheros con 31 adiciones y 7 borrados
  1. 30 6
      src/xt_pages/stock/detail/print.vue
  2. 1 1
      src/xt_pages/stock/stockQuery.vue

+ 30 - 6
src/xt_pages/stock/detail/print.vue Ver fichero

@@ -60,12 +60,15 @@
60 60
                 <span v-else>{{calCount(stock)}}</span> 
61 61
               </td>
62 62
               <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
63
-              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">{{stock.query_warehouseout_info[0].price}}</td>
63
+              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">
64
+                <!-- {{stock.query_warehouseout_info[0].price}} -->
65
+                {{getReailPrice(stock.id)}}
66
+              </td>
64 67
               <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
65 68
               <td style="line-height: 50px" v-if="type == 3">
66 69
                 
67
-                  <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
68
-                  <span v-else>{{(getStockCount(stock.id) * stock.query_warehouseout_info[0].price).toFixed(2)}}</span> 
70
+                  <span v-if="org_id == 9671">{{getPrice(stock.id)}}</span>
71
+                  <span v-else>{{(getStockCount(stock.id) * getPrice(stock.id)).toFixed(2)}}</span> 
69 72
                
70 73
              </td>
71 74
               <td style="line-height: 50px"></td>
@@ -134,7 +137,8 @@
134 137
         end_time: this.$route.query.end_time,
135 138
         stockTotal:[],
136 139
         wareOutInfo:[],
137
-        org_id:0
140
+        org_id:0,
141
+        informationList:[]
138 142
       }
139 143
     },
140 144
     methods: {
@@ -188,7 +192,10 @@
188 192
             var org_id = response.data.data.orgid
189 193
             console.log("org_id",org_id)
190 194
             this.org_id = org_id
191
-           
195
+
196
+            var informationlist = response.data.data.infomationList
197
+            console.log('数据列表',informationlist)
198
+            this.informationList = informationlist
192 199
             for (let i = 0; i < response.data.data.list.length; i++) {
193 200
               if (this.type == 1) {
194 201
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
@@ -352,14 +359,31 @@
352 359
      },
353 360
      getPrice(id){
354 361
        var sum = ""
362
+       for(let i=0;i<this.informationList.length;i++){
363
+        for(let j=0;j<this.wareOutInfo.length;j++){
364
+           if(this.informationList[i].id == this.wareOutInfo[j].good_id){
365
+             this.wareOutInfo[j].retail_price =  this.informationList[i].retail_price 
366
+           }
367
+        }
368
+       }
369
+      
355 370
        for(let j=0;j<this.wareOutInfo.length;j++){
356 371
          if(id == this.wareOutInfo[j].good_id){
357
-            sum += this.wareOutInfo[j].price * this.wareOutInfo[j].count
372
+            sum += (this.wareOutInfo[j].retail_price * this.wareOutInfo[j].count).toFixed(2)
358 373
          }
359 374
        }
360 375
        
361 376
        return sum
362 377
        
378
+     },
379
+     getReailPrice(id){
380
+       var price = 0
381
+       for(let i=0;i<this.informationList.length;i++){
382
+          if(id == this.informationList[i].id){
383
+             price = this.informationList[i].retail_price
384
+          }
385
+       }
386
+       return price
363 387
      }
364 388
     },
365 389
     created() {

+ 1 - 1
src/xt_pages/stock/stockQuery.vue Ver fichero

@@ -383,7 +383,7 @@ export default {
383 383
     },
384 384
 
385 385
     exportList(){
386
-         console.log("2222222",this.WarehouseInfo.warehouseInfoDate)
386
+      
387 387
          import('@/vendor/Export2Excel').then(excel => {
388 388
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
389 389
          const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus']