소스 검색

前端sdy

zhongtianhaoyuan 4 년 전
부모
커밋
172e39a1c4

+ 1 - 5
src/views/warehouse/component/router/index.js

@@ -212,11 +212,7 @@ const warehouseManagementRouter = {
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
-    },
-
-
-
-    
+    },   
   ],
 };
 export default warehouseManagementRouter;

+ 27 - 24
src/views/warehouse/warehouseManagementAdd.vue

@@ -188,7 +188,13 @@
 //  import { getVesselOne } from '@/model/procurement/basic'
 //  import { dayjs } from 'base-core-lib'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { addList, addxiala, editxiala, delxiala ,xiala} from '@/model/warehouse/index'
+import {
+  addList,
+  addxiala,
+  editxiala,
+  delxiala,
+  xiala,
+} from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -264,7 +270,7 @@ export default {
       list: [],
     }
   },
-  activated(){
+  activated() {
     this.loaddata()
   },
   computed: {
@@ -309,8 +315,10 @@ export default {
       this.selectedOptions = value
     },
     returnsales() {
-      this.$router.push({ path: 'warehouseManagementList' })
       this.deptBudgetList = {}
+      this.freightspace = {}
+      this.selectedOptions = ""
+      this.$router.push({ path: 'warehouseManagementList' })
     },
     // confirmPosition() {
     //   this.draggable = false
@@ -329,34 +337,28 @@ export default {
     onChange(files) {
       this.fileNum = files
       this.$refs.upload.handleSaveBill().then((res) => {
-        console.log(files)
       })
     },
-     loaddata() {
-      // 仓库名称
-      xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
-        .toPromise()
-        .then((response) => {
-          this.packtypeList = response
-        })
-    },
 
     submit() {
-       if(!this.deptBudgetList.warehouseName){
+      if (!this.deptBudgetList.warehouseName) {
         this.$message({
           message: '仓库名称不能为空!',
           type: 'warning',
         })
         return
       }
-      if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+      if (
+        this.deptBudgetList.warehouseName.length < 2 ||
+        this.deptBudgetList.warehouseName.length > 20
+      ) {
         this.$message({
           message: '仓库名长度不符合要求!',
           type: 'warning',
         })
         return
       }
-       if(!this.deptBudgetList.personCharge){
+      if (!this.deptBudgetList.personCharge) {
         this.$message({
           message: '负责人不能为空!',
           type: 'warning',
@@ -373,14 +375,14 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.personPhone){
+      if (!this.deptBudgetList.personPhone) {
         this.$message({
           message: '负责人电话不能为空!',
           type: 'warning',
         })
         return
       }
-      if(this.deptBudgetList.personPhone.length != 11){
+      if (this.deptBudgetList.personPhone.length != 11) {
         this.$message({
           message: '手机号输入有误!',
           type: 'warning',
@@ -394,15 +396,15 @@ export default {
       //   })
       //   return
       // }
-       if(!this.deptBudgetList.detailedAddress){
+      if (!this.deptBudgetList.detailedAddress) {
         this.$message({
           message: '详细地址不能为空!',
           type: 'warning',
         })
         return
       }
-      
-      if(this.totalStorage <= 0){
+
+      if (this.totalStorage <= 0) {
         this.$message({
           message: '仓位储量不能为空!',
           type: 'warning',
@@ -445,9 +447,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
+              this.deptBudgetList.compId =
+                sessionStorage.getItem('ws-pf_compId')
               this.deptBudgetList.warehousePrivate =
                 CodeToText[this.selectedOptions[0]]
               this.deptBudgetList.warehouseCity =
@@ -460,8 +461,10 @@ export default {
                 .toPromise()
                 .then((response) => {
                   this.$message.success('添加成功')
-                  this.$router.push({ path: 'warehouseManagementList' })
                   this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ""
+                  this.$router.push({ path: 'warehouseManagementList' })
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 3 - 0
src/views/warehouse/warehouseManagementDelivery.vue

@@ -1234,6 +1234,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

+ 2 - 2
src/views/warehouse/warehouseManagementEdit.vue

@@ -269,8 +269,8 @@ computed : {
   methods: {
     //返回按钮
     returnWarehouse() {
-      this.$router.push({ path: 'warehouseManagementList' })
       this.deptBudgetList = {}
+      this.$router.push({ path: 'warehouseManagementList' })   
     },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
@@ -470,8 +470,8 @@ computed : {
             .toPromise()
             .then((response) => {
               this.$message.success('编辑成功')     
+                            this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
-              this.deptBudgetList = {}
             })
         } else {
           //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 48 - 51
src/views/warehouse/warehouseManagementIoss.vue

@@ -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>

+ 4 - 5
src/views/warehouse/warehouseManagementList.vue

@@ -1,5 +1,6 @@
 <!--仓库管理-->
 <template>
+   
   <div>
     <BaseHeaderLayout :leftSpan="20">
       <template slot="left">
@@ -78,7 +79,7 @@
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-        <el-table-column prop="warehouseName" label="库房名" width="80">
+        <el-table-column prop="warehouseName" label="库房名" width="80" >
         </el-table-column>
         <el-table-column prop="binNumber" label="仓位编号" width="80">
         </el-table-column>
@@ -175,7 +176,7 @@
 </template>
 <script>
 import {
-  getList,
+   getList,
   export1,
   editstatus,
   billoperatehis,
@@ -260,7 +261,6 @@ export default {
     },
     //入库
     warehousing(item) {
-     
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
         free += Number(item.warehouseNumViewList[i].storage)
@@ -561,8 +561,7 @@ export default {
   -webkit-line-clamp: 10;
   max-height: 400px;
 }
-.record,
-.adjustment {
+.record ,.adjustment {
   display: inline-block;
   color: #5878e8;
   padding: 0 4px !important;

+ 3 - 0
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -968,6 +968,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

+ 3 - 1
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -985,7 +985,9 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
+.inspector{
+  width: 50%;
+} 
 //质检员
 /deep/[data-v-58803672] .el-form-item__label {
     width: 60px;

+ 3 - 0
src/views/warehouse/warehouseManagementPut.vue

@@ -1261,6 +1261,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;