XMLWAN 4 年之前
父節點
當前提交
9a2d767a09
共有 1 個文件被更改,包括 18 次插入18 次删除
  1. 18 18
      src/xt_pages/stock/detail/stockOutDetail.vue

+ 18 - 18
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

322
       this.cancelStockDate = [];
322
       this.cancelStockDate = [];
323
       getStockDetail(Params).then(response => {
323
       getStockDetail(Params).then(response => {
324
         if (response.data.state == 0) {
324
         if (response.data.state == 0) {
325
-          
325
+
326
           this.$message.error(response.data.msg);
326
           this.$message.error(response.data.msg);
327
           return false;
327
           return false;
328
         } else {
328
         } else {
329
-          
329
+
330
           this.total = response.data.data.total;
330
           this.total = response.data.data.total;
331
           for (let i = 0; i < response.data.data.list.length; i++) {
331
           for (let i = 0; i < response.data.data.list.length; i++) {
332
             var obj = response.data.data.list[i];
332
             var obj = response.data.data.list[i];
333
             obj["is_total"] = 0;
333
             obj["is_total"] = 0;
334
             this.cancelStockDate.push(obj);
334
             this.cancelStockDate.push(obj);
335
-            
335
+
336
           }
336
           }
337
           this.cancelStockDate.push({
337
           this.cancelStockDate.push({
338
             warehouse_out_order_number: "合计",
338
             warehouse_out_order_number: "合计",
369
           this.$message.error(response.data.msg);
369
           this.$message.error(response.data.msg);
370
           return false;
370
           return false;
371
         } else {
371
         } else {
372
-          
372
+
373
           this.total = response.data.data.total;
373
           this.total = response.data.data.total;
374
-         
374
+
375
           for (let i = 0; i < response.data.data.list.length; i++) {
375
           for (let i = 0; i < response.data.data.list.length; i++) {
376
             var obj = response.data.data.list[i];
376
             var obj = response.data.data.list[i];
377
             obj["is_total"] = 0;
377
             obj["is_total"] = 0;
378
             this.cancelStockDate.push(obj);
378
             this.cancelStockDate.push(obj);
379
-           
379
+
380
           }
380
           }
381
           this.cancelStockDate.push({
381
           this.cancelStockDate.push({
382
             warehouse_out_order_number: "合计",
382
             warehouse_out_order_number: "合计",
386
               warehouse_out_time: 0
386
               warehouse_out_time: 0
387
             }
387
             }
388
           });
388
           });
389
-        
389
+
390
         }
390
         }
391
       });
391
       });
392
     },
392
     },
644
                 this.tableList.push(list[i])
644
                 this.tableList.push(list[i])
645
               }
645
               }
646
             }
646
             }
647
-          console.log("表哥",this.tableList)
647
+          // console.log("表哥",this.tableList)
648
           }
648
           }
649
       })
649
       })
650
     },
650
     },
663
        array = stock.query_warehousing_info
663
        array = stock.query_warehousing_info
664
         let total_price = 0.0
664
         let total_price = 0.0
665
         for (let i = 0; i < array.length; i++) {
665
         for (let i = 0; i < array.length; i++) {
666
-         total_price = total_price + array[i].warehousing_count * array[i].price  
666
+         total_price = total_price + array[i].warehousing_count * array[i].price
667
         }
667
         }
668
         return  Math.floor(total_price * 100) / 100
668
         return  Math.floor(total_price * 100) / 100
669
-      }, 
669
+      },
670
       calTotalPrice() {
670
       calTotalPrice() {
671
         var amountPrice = 0
671
         var amountPrice = 0
672
         for (let i = 0; i < this.tableList.length; i++) {
672
         for (let i = 0; i < this.tableList.length; i++) {
675
           len = obj.query_warehouseout_info.length
675
           len = obj.query_warehouseout_info.length
676
           let total_price = 0.0
676
           let total_price = 0.0
677
           for (let a = 0; a < len; a++) {
677
           for (let a = 0; a < len; a++) {
678
-           total_price = total_price + obj.query_warehouseout_info[a].total_price   
678
+           total_price = total_price + obj.query_warehouseout_info[a].total_price
679
           }
679
           }
680
 
680
 
681
           amountPrice = amountPrice +  Math.floor(total_price* 100) / 100
681
           amountPrice = amountPrice +  Math.floor(total_price* 100) / 100
682
         }
682
         }
683
         return Math.floor(amountPrice* 100) / 100
683
         return Math.floor(amountPrice* 100) / 100
684
-      }, 
684
+      },
685
       getStockCount(id){
685
       getStockCount(id){
686
-        
686
+
687
         var count = ""
687
         var count = ""
688
         for(let i=0;i<this.stockTotal.length;i++){
688
         for(let i=0;i<this.stockTotal.length;i++){
689
             if(id == this.stockTotal[i].good_id){
689
             if(id == this.stockTotal[i].good_id){
709
         r2 = Number(total.toString().replace('.', ''))
709
         r2 = Number(total.toString().replace('.', ''))
710
         return r1 * r2 / Math.pow(10, m)
710
         return r1 * r2 / Math.pow(10, m)
711
       },
711
       },
712
-   
712
+
713
 
713
 
714
      exportList(){
714
      exportList(){
715
-     
715
+
716
       var obj = {index:"合计",total:0}
716
       var obj = {index:"合计",total:0}
717
        obj.total = this.calTotalPrice()
717
        obj.total = this.calTotalPrice()
718
        for(let i=0;i<this.tableList.length;i++){
718
        for(let i=0;i<this.tableList.length;i++){
727
        import('@/vendor/Export2Excel').then(excel => {
727
        import('@/vendor/Export2Excel').then(excel => {
728
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
728
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
729
        const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
729
        const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
730
-       
731
 
730
 
732
-      
731
+
732
+
733
 
733
 
734
        const data = this.formatJson(filterVal, this.tableList)
734
        const data = this.formatJson(filterVal, this.tableList)
735
        console.log("data",data)
735
        console.log("data",data)
736
-     
736
+
737
         excel.export_json_to_excel({
737
         excel.export_json_to_excel({
738
            header: tHeader,
738
            header: tHeader,
739
            data,
739
            data,