18513069273 4 rokov pred
rodič
commit
a697bb7fd4

+ 13 - 15
src/views/warehouse/warehouseManagementDelete.vue

@@ -502,19 +502,17 @@ export default {
   border-top: 0px;
 }
 
-// .connert {
-//   padding: 10px 40px;
-// }
-// .bg-right{
-// text-align: right;
-//   margin: 15px 0;
-// }
-// //表格文字居中
-// /deep/.el-table th.is-leaf,/deep/.el-table td {
-//     text-align: center;
-// }
-// //表格数据文字
-//  /deep/.el-table .el-table__body .cell{
-//    font-size: 14px;
-//  }
+.connert {
+  padding: 10px 40px;
+}
+
+//表格文字居中
+/deep/.el-table th.is-leaf,
+/deep/.el-table td {
+  text-align: center;
+}
+//表格数据文字
+/deep/.el-table .el-table__body .cell {
+  font-size: 14px;
+}
 </style>

+ 41 - 22
src/views/warehouse/warehouseManagementDelivery.vue

@@ -20,7 +20,10 @@
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList.warehouseName }}库
-          {{ deptBudgetList.binNumber }}仓位
+           <span class="position">
+          {{deptBudgetList.binNumber }}仓位
+          </span>
+        
         </h2>
         <ws-info-table>
           <!-- 货名 -->
@@ -104,12 +107,7 @@
             />
           </ws-form-item>
           <!--出库日期-->
-          <ws-form-item
-            label="出库日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
-          >
+          <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
             <ws-date-picker
               v-model="deptBudgetList.inOutDate"
               type="date"
@@ -168,9 +166,9 @@
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
       />
       <h2>化验数据(选填)</h2>
-      <ws-info-table>
-        <!--自检员-->
-        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+      <div class="inspector">
+       <!--自检员-->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector" >
           <ws-input
             v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
@@ -178,6 +176,9 @@
             size="small"
           />
         </ws-form-item>
+        </div>
+      <ws-info-table>
+       
 
         <!--水分(%)<=-->
         <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
@@ -344,15 +345,6 @@ export default {
     this.deptBudgetList.binNumber = this.$route.query.binNumber
     this.getList()
   },
-  // activated() {
-  //   //cg.viewBudget
-  //   //cg.viewSpareMoney
-  //   // this.getVesselData();
-  //   console.log(2222)
-  //   this.getList()
-  //   console.log(1111)
-  //   this.showType = this.isShow
-  // },
   methods: {
     //返回按钮
     returnWarehouse() {
@@ -614,13 +606,40 @@ export default {
   overflow: scroll;
   height: 120vh;
 }
-/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+/deep/.ws-info-table .el-form-item .el-form-item__label {
   text-align: center;
 }
 .deliverydate {
-  width: 35%;
+  display: inline-block;
+  width: 10%;
 }
-.center[data-v-32a9842f] {
+.center {
   margin-top: -60px;
+    width: 80%;
+}
+//仓位
+.position{
+ width: 52px;
+height: 20px;
+background: #AFB5CB;
+border-radius: 2px;
+font-size: 12px;
+font-family: PingFangSC-Medium, PingFang SC;
+color: #FFFFFF;
+line-height: 20px;
+}
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label{
+  text-align: left;
+font-size: 14px;
+font-family: PingFangSC-Regular, PingFang SC;
+font-weight: 400;
+color: #8890B1;
+line-height: 16px;
+}
+//质检员
+.inspector .el-form-item__content{
+  text-align: left;
+  margin-left: 0px;
 }
 </style>

+ 5 - 8
src/views/warehouse/warehouseManagementEdit.vue

@@ -227,6 +227,7 @@ export default {
       startDate: null,
       endDate: null,
       unitList: [],
+      baseId: '',
       // 提交类型
       submitType: true,
       size: 10,
@@ -253,6 +254,7 @@ export default {
     this.loaddata()
     this.showType = this.isShow
   },
+
   methods: {
     //返回按钮
     returnWarehouse() {
@@ -268,13 +270,6 @@ export default {
     },
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
-
-      // this.deptBudgetList.
-      // this.formData.append('files', files)
-      // this.feedbackObj.uploadNameAttachment = data.appendixName
-      // this.feedbackObj.pathUploadAttachment = data.appendixPath
-      // // this.newAppendixs = files
-      // this.onChangeFlag = true
     },
     onChange(files) {
       this.fileNum = files
@@ -296,9 +291,9 @@ export default {
       this.getList()
     },
     selectpackingMethod(e) {
-      console.log(e)
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].warehouseName == e) {
+          this.baseId = this.packtypeList[i].id
           this.getLook(this.packtypeList[i].id)
         }
       }
@@ -386,12 +381,14 @@ export default {
     submit() {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
+          this.deptBudgetList.baseId = this.baseId
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {
               this.$message.success('编辑成功')
+              this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {

+ 124 - 28
src/views/warehouse/warehouseManagementIoss.vue

@@ -2,15 +2,21 @@
   <div class="container">
     <el-row>
       <el-col :span="20">
-        <h2 class="bg-left title">盘损当期仓损</h2>
+        <h2 class="bg-left title">&nbsp;&nbsp;盘损当期仓损</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>