|
@@ -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,7 +250,7 @@ export default {
|
|
|
}
|
|
|
// this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
|
|
|
// this.deptBudgetList.inventoryRatio = num
|
|
|
- return num
|
|
|
+ return num
|
|
|
},
|
|
|
},
|
|
|
activated() {
|
|
@@ -267,23 +267,43 @@ export default {
|
|
|
this.deptBudgetList1.positionId = this.deptBudgetList.positionId
|
|
|
this.loaddata()
|
|
|
this.showType = this.isShow
|
|
|
- console.log(this.deptBudgetList)
|
|
|
},
|
|
|
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: '实际库存不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.physicalInventory <= 0) {
|
|
|
this.$message({
|
|
|
- message: '请填写实际库存!',
|
|
|
+ message: '实际库存输入错误!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cumulativeStockIn -
|
|
|
+ this.deptBudgetList.physicalInventory <=
|
|
|
+ 0
|
|
|
+ ) {
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -295,11 +315,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
|
|
@@ -309,14 +333,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) => {
|
|
@@ -366,7 +388,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
|
|
@@ -379,18 +401,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()
|
|
@@ -405,25 +427,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>
|