|
@@ -23,8 +23,8 @@
|
|
|
<div class="center">
|
|
|
<ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
|
|
|
<h2>
|
|
|
- {{ deptBudgetList1.warehouseName }}
|
|
|
- <span class="position"> {{ deptBudgetList1.binNumber }}仓位 </span>
|
|
|
+ {{ this.$route.query.warehouseName }}
|
|
|
+ <span class="position"> {{ this.$route.query.binNumber }}仓位 </span>
|
|
|
</h2>
|
|
|
<!-- 货名 -->
|
|
|
<ws-form-item
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
selectpackingMethod: {},
|
|
|
goodnameList: [],
|
|
|
size: 10,
|
|
|
-
|
|
|
+
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
deptCircularPage: {},
|
|
|
packtypeList: {},
|
|
@@ -250,18 +250,16 @@ export default {
|
|
|
}
|
|
|
// this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
|
|
|
// this.deptBudgetList.inventoryRatio = num
|
|
|
- return num
|
|
|
+ return num
|
|
|
},
|
|
|
},
|
|
|
activated() {
|
|
|
//cg.viewBudget
|
|
|
//cg.viewSpareMoney
|
|
|
// this.getVesselData();
|
|
|
- this.loaddata()
|
|
|
+ // this.loaddata()
|
|
|
this.showType = this.isShow
|
|
|
- console.log(this.deptBudgetList)
|
|
|
},
|
|
|
-
|
|
|
mounted() {
|
|
|
this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
this.deptBudgetList.positionId = this.$route.query.positionId
|
|
@@ -271,28 +269,44 @@ export default {
|
|
|
this.deptBudgetList1.binNumber = this.deptBudgetList.binNumber
|
|
|
this.deptBudgetList1.baseId = this.$route.query.baseId
|
|
|
this.deptBudgetList1.positionId = this.deptBudgetList.positionId
|
|
|
- this.loaddata()
|
|
|
- // 货名
|
|
|
- // this.deptBudgetList.inventoryRatio=((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*100
|
|
|
- // this.deptBudgetList.ioss=(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory
|
|
|
- // this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
|
|
|
- // this.getList()
|
|
|
+ this.loaddata()
|
|
|
},
|
|
|
methods: {
|
|
|
//返回按钮
|
|
|
returnWarehouse() {
|
|
|
- this.deptBudgetList= {}
|
|
|
+ this.deptBudgetList = {}
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
},
|
|
|
//提交按钮
|
|
|
submit() {
|
|
|
- if(this.deptBudgetList.physicalInventory <= 0){
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
+ this.$message({
|
|
|
+ message: '货名不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.physicalInventory) {
|
|
|
this.$message({
|
|
|
- message: '请填写实际库存!',
|
|
|
+ message: '实际库存不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (this.deptBudgetList.physicalInventory <= 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '实际库存输入错误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cumulativeStockIn -
|
|
|
+ this.deptBudgetList.physicalInventory <=
|
|
|
+ 0
|
|
|
+ ) {
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -304,11 +318,15 @@ export default {
|
|
|
this.deptBudgetList.cumulativeStockOut -
|
|
|
this.deptBudgetList.physicalInventory
|
|
|
this.deptBudgetList.inventoryRatio =
|
|
|
- (this.deptBudgetList.cumulativeStockIn -
|
|
|
- this.deptBudgetList.cumulativeStockOut -
|
|
|
- this.deptBudgetList.physicalInventory) /
|
|
|
- (this.deptBudgetList.cumulativeStockIn -
|
|
|
- this.deptBudgetList.physicalInventory)
|
|
|
+ Math.floor(
|
|
|
+ ((this.deptBudgetList.cumulativeStockIn -
|
|
|
+ this.deptBudgetList.cumulativeStockOut -
|
|
|
+ this.deptBudgetList.physicalInventory) /
|
|
|
+ (this.deptBudgetList.cumulativeStockIn -
|
|
|
+ this.deptBudgetList.physicalInventory)) *
|
|
|
+ 1000000
|
|
|
+ ) / 1000
|
|
|
+ // this.deptBudgetList.inventoryRatio = inventoryRatio1
|
|
|
this.deptBudgetList.baseId = this.deptBudgetList1.baseId
|
|
|
this.deptBudgetList.positionId = this.deptBudgetList1.positionId
|
|
|
this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
|
|
@@ -318,14 +336,12 @@ export default {
|
|
|
if (
|
|
|
this.goodnameList[i].goodsName == this.deptBudgetList.goodsName
|
|
|
) {
|
|
|
- this.deptBudgetList.goodsNameKey = this.goodnameList[
|
|
|
- i
|
|
|
- ].goodsNameKey
|
|
|
+ this.deptBudgetList.goodsNameKey =
|
|
|
+ this.goodnameList[i].goodsNameKey
|
|
|
}
|
|
|
}
|
|
|
this.deptBudgetList.compId = this.compId
|
|
|
this.deptBudgetList.contractType = 1
|
|
|
- console.log(this.deptBudgetList)
|
|
|
submitioss(this.deptBudgetList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
@@ -375,7 +391,7 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
changeioss(e) {
|
|
|
- if(!this.deptBudgetList.baseId){
|
|
|
+ if (!this.deptBudgetList.baseId) {
|
|
|
this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
this.deptBudgetList.positionId = this.deptBudgetList1.positionId
|
|
|
this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
|
|
@@ -388,18 +404,18 @@ export default {
|
|
|
this.ioss()
|
|
|
},
|
|
|
ioss() {
|
|
|
- ioss({baseId:this.deptBudgetList.baseId,
|
|
|
-positionId: this.deptBudgetList.positionId,
|
|
|
-goodsNameKey:this.deptBudgetList.goodsNameKey,
|
|
|
-goodsName:this.deptBudgetList.goodsName,
|
|
|
-})
|
|
|
+ ioss({
|
|
|
+ baseId: this.$route.query.baseId,
|
|
|
+ positionId: this.$route.query.positionId,
|
|
|
+ goodsNameKey: this.deptBudgetList.goodsNameKey,
|
|
|
+ goodsName: this.deptBudgetList.goodsName,
|
|
|
+ })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.deptBudgetList = response
|
|
|
})
|
|
|
},
|
|
|
loaddata() {
|
|
|
-
|
|
|
// 货名
|
|
|
goodsname({ positionId: this.$route.query.positionId })
|
|
|
.toPromise()
|
|
@@ -414,25 +430,6 @@ goodsName:this.deptBudgetList.goodsName,
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- // // 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
- // handleCloe() {
|
|
|
- // this.dialogViewSpareMoney = false
|
|
|
- // },
|
|
|
- // history(row) {
|
|
|
- // console.log(row)
|
|
|
- // billoperatehis({ id: row.id })
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // this.historyList = response
|
|
|
- // })
|
|
|
- // },
|
|
|
-
|
|
|
- //删除
|
|
|
- // approve() {},
|
|
|
- // listQuery() {},
|
|
|
- // total() {},
|
|
|
- // clearfiltQuery() {},
|
|
|
- // selectCrtDuty() {},
|
|
|
},
|
|
|
}
|
|
|
</script>
|