|
@@ -2,15 +2,21 @@
|
|
|
<div class="container">
|
|
|
<el-row>
|
|
|
<el-col :span="20">
|
|
|
- <h2 class="bg-left title">盘损当期仓损</h2>
|
|
|
+ <h2 class="bg-left title"> 盘损当期仓损</h2>
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="bg-right">
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
class="bg-bottom"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
@click="returnWarehouse()"
|
|
|
- >返回</el-button
|
|
|
+ ><img
|
|
|
+ width="6"
|
|
|
+ height="10"
|
|
|
+ style="vertical-align: bottom; margin-right: 3px"
|
|
|
+ src="../../../public/img/lujing.png"
|
|
|
+ alt=""
|
|
|
+ />返回</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -18,10 +24,12 @@
|
|
|
<ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
|
|
|
<h2>
|
|
|
{{deptBudgetList1.warehouseName }}库
|
|
|
+ <span class="position">
|
|
|
{{deptBudgetList1.binNumber }}仓位
|
|
|
+ </span>
|
|
|
</h2>
|
|
|
<!-- 货名 -->
|
|
|
- <ws-form-item label="货名" span="1" class="readonly" prop="goodsName">
|
|
|
+ <ws-form-item label="货名:" span="1" prop="goodsName" class="goodsname">
|
|
|
<ws-select
|
|
|
v-model="deptBudgetList.goodsName"
|
|
|
placeholder=""
|
|
@@ -37,36 +45,37 @@
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
<!--当期累计入库量-->
|
|
|
- <ws-form-item label="当期累计入库量(吨)" span="1" prop="cumulativeStockIn">
|
|
|
+ <ws-form-item label="当期累计入库量(吨):" span="1" prop="cumulativeStockIn" class="readonly">
|
|
|
{{deptBudgetList.cumulativeStockIn}}
|
|
|
</ws-form-item>
|
|
|
- <!--当期累计出库量(吨)-->
|
|
|
- <ws-form-item label="当期累计出库量(吨)" span="1" prop="cumulativeStockOut" class="readonly">
|
|
|
- {{deptBudgetList.cumulativeStockOut}}
|
|
|
- </ws-form-item>
|
|
|
- <!--应余库存(吨)-->
|
|
|
- <ws-form-item label="应余库存(吨)" span="1" prop="surplusInventory">
|
|
|
- {{deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut > 0 ? deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut : 0}}
|
|
|
- </ws-form-item>
|
|
|
<!--实际库存(吨)-->
|
|
|
- <ws-form-item label="实际库存(吨)" span="1" prop="physicalInventory" class="readonly">
|
|
|
+ <ws-form-item label="实际库存(吨):" span="1" prop="physicalInventory" class="readonly">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.physicalInventory"
|
|
|
- placeholder="请输入实际库存(吨)"
|
|
|
+ placeholder=""
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!--损耗量(吨)-->
|
|
|
- <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 label="当期累计出库量(吨):" span="1" prop="cumulativeStockOut" class="readonly">
|
|
|
+ {{deptBudgetList.cumulativeStockOut}}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--损耗量(吨)-->
|
|
|
+ <ws-form-item label="损耗量(吨):" span="1" prop="ioss" class="readonly">
|
|
|
+ {{ioss1 > 0 ? ioss1 : 0}}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--应余库存(吨)-->
|
|
|
+ <ws-form-item label="应余库存(吨):" span="1" prop="surplusInventory" class='readonly'>
|
|
|
+ {{surplusInventory1 > 0 ? surplusInventory1 : 0 }}
|
|
|
</ws-form-item>
|
|
|
<!--库损比例-->
|
|
|
- <ws-form-item label="库损比例" span="1" prop="inventoryRatio">
|
|
|
+ <ws-form-item label="库损比例:" span="1" prop="inventoryRatio" class="readonly">
|
|
|
<!-- .占比=损耗量÷(累计入库-实际库存) -->
|
|
|
- {{((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) > 0 ? ((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) : 0 }} {{'‰'}}
|
|
|
+ <!-- ((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*1000 > 0 ? ((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*1000 : 0 -->
|
|
|
+ <span class="proportion" v-if="inventoryRatio1 > 3">{{inventoryRatio1 > 0 ? inventoryRatio1 : 0}} {{'‰'}}</span>
|
|
|
</ws-form-item>
|
|
|
- <p>注:提交成功后,当期实际库存将作为下一期的初始库存。</p>
|
|
|
+ <p class="fontsize">注:提交成功后,当期实际库存将作为下一期的初始库存。</p>
|
|
|
</ws-form>
|
|
|
|
|
|
<div style="text-align: right; padding: 10px">
|
|
@@ -143,7 +152,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
contractList: [],
|
|
|
- deptBudgetList:{},
|
|
|
+ deptBudgetList:{
|
|
|
+ physicalInventory:0
|
|
|
+ },
|
|
|
historyList: [],
|
|
|
rules: {
|
|
|
netWeight: [
|
|
@@ -163,6 +174,27 @@ export default {
|
|
|
accessoryTFs: false,
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ioss1 :function() {
|
|
|
+ return (this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
|
|
|
+ // return this.message.split('').reverse().join('')
|
|
|
+ },
|
|
|
+ surplusInventory1: function(){
|
|
|
+ return this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
|
|
|
+ },
|
|
|
+ inventoryRatio1 : function(){
|
|
|
+ var loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
|
|
|
+ var defect=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory
|
|
|
+ if((loss/defect)==1){
|
|
|
+ var num=0
|
|
|
+ }else{
|
|
|
+ // .占比=损耗量÷(累计入库-实际库存)
|
|
|
+ var num = Math.floor((loss/defect)*1000000)/1000
|
|
|
+ }
|
|
|
+
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ },
|
|
|
activated() {
|
|
|
//cg.viewBudget
|
|
|
//cg.viewSpareMoney
|
|
@@ -179,6 +211,8 @@ export default {
|
|
|
this.deptBudgetList1.binNumber = this.$route.query.binNumber
|
|
|
this.deptBudgetList1.baseId=this.$route.query.baseId
|
|
|
this.deptBudgetList1.positionId=this.$route.query.positionId
|
|
|
+ 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()
|
|
|
},
|
|
@@ -308,10 +342,11 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.container {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
.center {
|
|
|
- position: relative;
|
|
|
- margin-top: 100px;
|
|
|
- top: 100px;
|
|
|
+ top: 50px;
|
|
|
width: 40%;
|
|
|
height: 700px;
|
|
|
margin: 0 auto;
|
|
@@ -322,10 +357,71 @@ export default {
|
|
|
/deep/.el-input--small{
|
|
|
width: 70%;
|
|
|
}
|
|
|
+/deep/.bg-right{
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
.container .bg-bottom {
|
|
|
+ margin: 15px 0px;
|
|
|
+}
|
|
|
+
|
|
|
+//仓位
|
|
|
+.position{
|
|
|
+ width: 52px;
|
|
|
+height: 20px;
|
|
|
+background: #AFB5CB;
|
|
|
+border-radius: 2px;
|
|
|
+font-size: 12px;
|
|
|
+font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+color: #FFFFFF;
|
|
|
+line-height: 20px;
|
|
|
+}
|
|
|
+//表格
|
|
|
+.readonly{
|
|
|
+ width: 49%;
|
|
|
+ display: inline-flex;
|
|
|
+ height: 40px;
|
|
|
+}
|
|
|
+/deep/.el-form-item__label {
|
|
|
+ width: 170px;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 14px;
|
|
|
+font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+font-weight: 400;
|
|
|
+color: #8890B1;
|
|
|
+line-height: 16px;
|
|
|
+}
|
|
|
+//下拉框
|
|
|
+.goodsname{
|
|
|
+ width: 40%;
|
|
|
+}
|
|
|
+.goodsname:first-child{
|
|
|
+ width: 140px;
|
|
|
+}
|
|
|
+//注意字体
|
|
|
+.fontsize{
|
|
|
+ width: 312px;
|
|
|
+height: 17px;
|
|
|
+font-size: 12px;
|
|
|
+font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+font-weight: 400;
|
|
|
+color: #AFB5CB;
|
|
|
+line-height: 17px;
|
|
|
+}
|
|
|
+//比例文字
|
|
|
+.proportion{
|
|
|
+color: #FF2C58;
|
|
|
+}
|
|
|
+.title {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.title::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
position: absolute;
|
|
|
- float: right;
|
|
|
- top: 15px;
|
|
|
- right: 20px;
|
|
|
+ left: 0;
|
|
|
}
|
|
|
</style>
|