浏览代码

前端盘损完成 sdy

zhongtianhaoyuan 4 年之前
父节点
当前提交
3c7f351fbb
共有 3 个文件被更改,包括 15 次插入55 次删除
  1. 1 1
      src/api/V2/warehouse/index.js
  2. 2 3
      src/model/warehouse/index.js
  3. 12 51
      src/views/warehouse/warehouseManagementIoss.vue

+ 1 - 1
src/api/V2/warehouse/index.js

@@ -20,7 +20,7 @@ export const API_POST_WAREHOUSE_EDIT = '/warehouseBaseInfo/api/editWarehouse'
 //盘损
 export const API_GET_WAREHOUSE_IOSS = '/warehouseInventoryCountInfo/getInfo'
 //货名下拉
-export const API_POST_WAREHOUSE_NAME = '/warehousePositionStorageInfo/selectGoodsName'
+export const API_GET_WAREHOUSE_NAME = '/warehousePositionStorageInfo/selectGoodsName'
 
 // 货名等下拉
 export const API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN = `/commonSysParameter/getInfo`

+ 2 - 3
src/model/warehouse/index.js

@@ -11,7 +11,7 @@ import {
     // API_GET_WAREHOUSE_DELETE,
     API_POST_WAREHOUSE_EDIT,
     API_GET_WAREHOUSE_IOSS,
-    API_POST_WAREHOUSE_NAME,
+    API_GET_WAREHOUSE_NAME,
     API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN,
     API_POST_STORAGE_PUT,
     API_POST_STORAGE_IOSS,
@@ -39,14 +39,13 @@ export const edit = appRx.post(API_POST_WAREHOUSE_EDIT, errorCatcher, errorHandl
 //盘损
 export const ioss = appRx.get(API_GET_WAREHOUSE_IOSS, errorCatcher, errorHandle, filter)
 //货名下拉
-export const goodsname = appRx.get(API_POST_WAREHOUSE_NAME, errorCatcher, errorHandle, filter)
+export const goodsname = appRx.get(API_GET_WAREHOUSE_NAME, errorCatcher, errorHandle, filter)
 // 货名等下拉
 export const pullDown = appRx.get(API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
 // 入库添加
 export const addstorageputList = appRx.post(API_POST_STORAGE_PUT, errorCatcher, errorHandle, filter)
 //盘损提交
 export const submitioss = appRx.post(API_POST_STORAGE_IOSS, errorCatcher, errorHandle, filter)
-
 //待完善记录
 export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, errorHandle, filter)
 

+ 12 - 51
src/views/warehouse/warehouseManagementIoss.vue

@@ -61,7 +61,6 @@
         <ws-form-item label="损耗量(吨)" span="1" prop="ioss">
           {{(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory > 0 ? (deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory : 0}}
         </ws-form-item>
-
         <!--库损比例-->
         <ws-form-item label="库损比例" span="1" prop="inventoryRatio">
           <!-- .占比=损耗量÷(累计入库-实际库存) -->
@@ -178,9 +177,9 @@ export default {
     this.deptBudgetList.binNumber = this.$route.query.binNumber
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
-    this.deptBudgetList1.baseId=this.this.$route.query.baseId
+   this.deptBudgetList1.baseId=this.$route.query.baseId
     this.deptBudgetList1.positionId=this.$route.query.positionId
-    this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
+    // this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
     // this.getList()
   },
   methods: {
@@ -196,10 +195,14 @@ export default {
           this.deptBudgetList.loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
          this.deptBudgetList.inventoryRatio=((this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory)/(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory)
          this.deptBudgetList.baseId=this.deptBudgetList1.baseId
-         this.deptBudgetList.positionId=this.deptBudgetList1.positionId
-         this.deptBudgetList.binNumber=this.deptBudgetList1.binNumber
-         this.deptBudgetList.warehouseName=this.deptBudgetList1.warehouseName
-         this.deptBudgetList.goodsNameKey=this.deptBudgetList1.goodsNameKey
+          this.deptBudgetList.positionId=this.deptBudgetList1.positionId
+          this.deptBudgetList.binNumber=this.deptBudgetList1.binNumber
+          this.deptBudgetList.warehouseName=this.deptBudgetList1.warehouseName
+       for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].goodsName == this.deptBudgetList.goodsName) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
+        }
+      }
          this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
           console.log(this.deptBudgetList)
@@ -214,7 +217,6 @@ export default {
           return false
         }
       })
-      // this.$router.push({ path: 'warehouseManagementList' })
     },
     dateFormat(fmt, date) {
       let ret
@@ -252,20 +254,11 @@ export default {
       this.getList()
     },
     changeioss(e){
-      console.log(e)
         for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].goodsName == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
         }
-      }
-      // console.log(this.deptBudgetList)
-      //   for (var i = 0; i < this.packtypeList.length; i++) {
-      //     console.log(this.packtypeList[i].goodsName)
-      //   if (this.packtypeList[i].goodsName == e) {
-      //    this.getLook(this.packtypeList[i].id)
-      //   //  console.log(this.packtypeList[i].positionId)
-      //   }
-      // }    
+      }  
       this.ioss()
     },
      ioss(){
@@ -274,9 +267,7 @@ export default {
       )
         .toPromise()
         .then((response) => {
-         this.deptBudgetList=response
-         console.log(this.deptBudgetList)
-        
+         this.deptBudgetList=response     
         })
     },
      loaddata() {
@@ -287,35 +278,6 @@ export default {
           this.goodnameList = response
         })
     },
-    // getList() {
-    //   getList({
-    //     compId: sessionStorage.getItem('ws-pf_compId'),
-    //     contractType: this.contractType,
-    //     currentPage: this.currentPage,
-    //     pageSize: this.pageSize,
-    //     searchType: this.searchType,
-    //     searchKeyWord: this.searchKeyWord,
-    //     startDate: this.startDate,
-    //     endDate: this.endDate,
-    //     contrPage: this.contrPage,
-    //   })
-    //     .toPromise()
-    //     .then((response) => {
-    //       for (var i = 0; i < response.records.length; i++) {
-    //         if (response.records[i].addressUrl != null) {
-    //           response.records[i].addressUrlArray = response.records[
-    //             i
-    //           ].addressUrl.split(',')
-    //         } else {
-    //           response.records[i].addressUrlArray = []
-    //         }
-    //       }
-    //       this.deptCircularPage.currentPage = response.current
-    //       this.deptCircularPage.pageSize = response.size
-    //       this.deptBudgetTotal = response.total
-    //       this.contractList = response
-    //     })
-    // },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {
@@ -335,7 +297,6 @@ export default {
           this.historyList = response
         })
     },
-   
     // deletecontract(){},
     //删除
     approve() {},