|
@@ -14,15 +14,19 @@
|
|
>
|
|
>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <div class="center">
|
|
|
|
- <h2>鲅鱼圈一号库 102仓位</h2>
|
|
|
|
- <ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
|
|
|
|
+ <div class="center">
|
|
|
|
+ <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
|
|
|
|
+ <h2>
|
|
|
|
+ {{deptBudgetList1.warehouseName }}库
|
|
|
|
+ {{deptBudgetList1.binNumber }}仓位
|
|
|
|
+ </h2>
|
|
<!-- 货名 -->
|
|
<!-- 货名 -->
|
|
- <ws-form-item label="货名" span="1" class="readonly">
|
|
|
|
|
|
+ <ws-form-item label="货名" span="1" class="readonly" prop="goodsName">
|
|
<ws-select
|
|
<ws-select
|
|
|
|
+ v-model="deptBudgetList.goodsName"
|
|
placeholder=""
|
|
placeholder=""
|
|
class="typeselect"
|
|
class="typeselect"
|
|
- @change="selectpackingMethod"
|
|
|
|
|
|
+ @change="changeioss"
|
|
>
|
|
>
|
|
<ws-option
|
|
<ws-option
|
|
v-for="item in goodnameList"
|
|
v-for="item in goodnameList"
|
|
@@ -33,73 +37,35 @@
|
|
</ws-select>
|
|
</ws-select>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<!--当期累计入库量-->
|
|
<!--当期累计入库量-->
|
|
- <ws-form-item label="当期累计入库量(吨)" span="1" prop="shippingType">
|
|
|
|
- <ws-input
|
|
|
|
- v-model="deptBudgetList.shippingType"
|
|
|
|
- placeholder="当期累计入库量(吨)"
|
|
|
|
- maxlength="20"
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
|
|
+ <ws-form-item label="当期累计入库量(吨)" span="1" prop="cumulativeStockIn">
|
|
|
|
+ {{deptBudgetList.cumulativeStockIn}}
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
-
|
|
|
|
<!--当期累计出库量(吨)-->
|
|
<!--当期累计出库量(吨)-->
|
|
- <ws-form-item
|
|
|
|
- label="当期累计出库量(吨)"
|
|
|
|
- span="1"
|
|
|
|
- prop="buyer"
|
|
|
|
- class="readonly"
|
|
|
|
- >
|
|
|
|
- <ws-input
|
|
|
|
- v-model="deptBudgetList.buyer"
|
|
|
|
- placeholder="当期累计出库量(吨)"
|
|
|
|
- maxlength="100"
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
|
|
+ <ws-form-item label="当期累计出库量(吨)" span="1" prop="cumulativeStockOut" class="readonly">
|
|
|
|
+ {{deptBudgetList.cumulativeStockOut}}
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
-
|
|
|
|
<!--应余库存(吨)-->
|
|
<!--应余库存(吨)-->
|
|
- <ws-form-item label="应余库存(吨)" span="1" prop="settlementMethod">
|
|
|
|
- <ws-input
|
|
|
|
- v-model="deptBudgetList.settlementMethod"
|
|
|
|
- placeholder="应余库存(吨)"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
|
|
+ <ws-form-item label="应余库存(吨)" span="1" prop="surplusInventory">
|
|
|
|
+ {{deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut > 0 ? deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut : 0}}
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
-
|
|
|
|
<!--实际库存(吨)-->
|
|
<!--实际库存(吨)-->
|
|
- <ws-form-item
|
|
|
|
- label="实际库存(吨)"
|
|
|
|
- span="1"
|
|
|
|
- prop="seller"
|
|
|
|
- class="readonly"
|
|
|
|
- >
|
|
|
|
|
|
+ <ws-form-item label="实际库存(吨)" span="1" prop="physicalInventory" class="readonly">
|
|
<ws-input
|
|
<ws-input
|
|
- v-model="deptBudgetList.seller"
|
|
|
|
- placeholder="实际库存(吨)"
|
|
|
|
|
|
+ v-model="deptBudgetList.physicalInventory"
|
|
|
|
+ placeholder="请输入实际库存(吨)"
|
|
maxlength="100"
|
|
maxlength="100"
|
|
size="small"
|
|
size="small"
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
-
|
|
|
|
<!--损耗量(吨)-->
|
|
<!--损耗量(吨)-->
|
|
- <ws-form-item label="损耗量(吨)" span="1" prop="sourceGoods">
|
|
|
|
- <ws-input
|
|
|
|
- v-model="deptBudgetList.sourceGoods"
|
|
|
|
- placeholder="损耗量(吨)"
|
|
|
|
- maxlength="20"
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
|
|
+ <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>
|
|
|
|
|
|
<!--库损比例-->
|
|
<!--库损比例-->
|
|
- <ws-form-item label="库损比例" span="1" prop="contractNo">
|
|
|
|
- <ws-input
|
|
|
|
- v-model.number="deptBudgetList.buyerPhone"
|
|
|
|
- placeholder="库损比例"
|
|
|
|
- maxlength="100"
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
|
|
+ <ws-form-item label="库损比例" span="1" prop="inventoryRatio">
|
|
|
|
+ <!-- .占比=损耗量÷(累计入库-实际库存) -->
|
|
|
|
+ {{((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) > 0 ? ((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) : 0 }} {{'‰'}}
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<p>注:提交成功后,当期实际库存将作为下一期的初始库存。</p>
|
|
<p>注:提交成功后,当期实际库存将作为下一期的初始库存。</p>
|
|
</ws-form>
|
|
</ws-form>
|
|
@@ -119,6 +85,8 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
goodsname,
|
|
goodsname,
|
|
|
|
+ ioss,
|
|
|
|
+ submitioss,
|
|
} from '@/model/warehouse/index'
|
|
} from '@/model/warehouse/index'
|
|
|
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
@@ -169,14 +137,25 @@ export default {
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
deptCircularPage: {},
|
|
deptCircularPage: {},
|
|
packtypeList: {},
|
|
packtypeList: {},
|
|
|
|
+ deptBudgetList1:[],
|
|
date: {
|
|
date: {
|
|
year: dayjs().format('YYYY'),
|
|
year: dayjs().format('YYYY'),
|
|
month: dayjs().format('MM'),
|
|
month: dayjs().format('MM'),
|
|
},
|
|
},
|
|
|
|
+
|
|
contractList: [],
|
|
contractList: [],
|
|
- deptBudgetList: {},
|
|
|
|
|
|
+ deptBudgetList:{},
|
|
historyList: [],
|
|
historyList: [],
|
|
-
|
|
|
|
|
|
+ rules: {
|
|
|
|
+ netWeight: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ type: 'number',
|
|
|
|
+ message: '请输入活动名称',
|
|
|
|
+ trigger: 'blur',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
pickerBeginDateBefore: {
|
|
pickerBeginDateBefore: {
|
|
disabledDate: (time) => {
|
|
disabledDate: (time) => {
|
|
return time.getTime() > Date.now()
|
|
return time.getTime() > Date.now()
|
|
@@ -191,6 +170,18 @@ export default {
|
|
// this.getVesselData();
|
|
// this.getVesselData();
|
|
this.loaddata()
|
|
this.loaddata()
|
|
this.showType = this.isShow
|
|
this.showType = this.isShow
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
|
+ this.deptBudgetList.positionId = this.$route.query.positionId
|
|
|
|
+ this.deptBudgetList.warehouseName = this.$route.query.warehouseName
|
|
|
|
+ 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.positionId=this.$route.query.positionId
|
|
|
|
+ this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
|
|
|
|
+ // this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//返回按钮
|
|
//返回按钮
|
|
@@ -199,7 +190,31 @@ export default {
|
|
},
|
|
},
|
|
//提交按钮
|
|
//提交按钮
|
|
submit(){
|
|
submit(){
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.deptBudgetList.surplusInventory=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
|
|
|
|
+ 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.compId = this.compId
|
|
|
|
+ this.deptBudgetList.contractType = 1
|
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
|
+ submitioss(this.deptBudgetList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('提交成功')
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // this.$router.push({ path: 'warehouseManagementList' })
|
|
},
|
|
},
|
|
dateFormat(fmt, date) {
|
|
dateFormat(fmt, date) {
|
|
let ret
|
|
let ret
|
|
@@ -235,10 +250,38 @@ export default {
|
|
this.currentPage = val
|
|
this.currentPage = val
|
|
console.log(`当前页: ${val}`)
|
|
console.log(`当前页: ${val}`)
|
|
this.getList()
|
|
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(){
|
|
|
|
+ ioss(
|
|
|
|
+ this.deptBudgetList
|
|
|
|
+ )
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.deptBudgetList=response
|
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
|
+
|
|
|
|
+ })
|
|
},
|
|
},
|
|
loaddata() {
|
|
loaddata() {
|
|
// 货名
|
|
// 货名
|
|
- goodsname({ constId: 'CON2' })
|
|
|
|
|
|
+ goodsname({positionId : this.$route.query.positionId})
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.goodnameList = response
|
|
this.goodnameList = response
|