zhongtianhaoyuan 4 anni fa
parent
commit
1128720912

+ 1 - 0
src/store/getters.js

@@ -44,6 +44,7 @@ const getters = {
   systemOperationNum: state => state.app.systemOperationNum,
   systemWarnNum: state => state.app.systemWarnNum,
   baseInfo: state => state.user.baseInfo, // 设置系统基础信息
+  deptBudgetList: state => state.app.deptBudgetList,
   guideInfo: state => state.user.guideInfo, // 新手指引信息
   sparepartSp: state => state.app.sparepartSp, // 搜索状态
   sparepartMa: state => state.app.sparepartMa, // 搜索状态

+ 7 - 0
src/store/modules/app.js

@@ -15,6 +15,7 @@ const state = {
   sparepartMa: {},
   sparepartMap: {},
   isLoadding: false,
+  deptBudgetList:{},
   // 产品-体系-文件修改程序(待处理个数)
   modificationNum: 0,
   // 产品-体系运行-预警
@@ -84,6 +85,9 @@ const mutations = {
     state.circulationNum = num
     Cookies.set('circulationNum', num)
   },
+  SET_DEPTBUDGETLIST: (state, deptBudgetList) => {
+    state.deptBudgetList = deptBudgetList
+  },
 }
 
 const actions = {
@@ -108,6 +112,9 @@ const actions = {
   setMaQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMA_QUERY', params)
   },
+  setdeptBudgetList ({ commit }, params) {
+    commit('SET_DEPTBUDGETLIST', params)
+  },
   setMapQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMAP_QUERY', params)
   },

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

@@ -616,10 +616,6 @@ export default {
         })
         return
       }
-     
-
-
-
        this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',

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

@@ -257,14 +257,12 @@ export default {
   },
 computed : {
    totalStorage :function() {
-     var sum = 0
+     var sum  = 0
      if(this.deptBudgetList.warehousePositionInfoList){
        for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
-
-      sum += this.deptBudgetList.warehousePositionInfoList[i].maxStorage
-     }
+      sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
      }
-     
+     }    
      return sum
     },
 },

+ 1 - 0
src/views/warehouse/warehouseManagementIoss.vue

@@ -181,6 +181,7 @@ export default {
       selectpackingMethod: {},
       goodnameList:[],
       size: 10,
+      
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},

+ 10 - 11
src/views/warehouse/warehouseManagementList.vue

@@ -182,7 +182,7 @@ import {
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -252,15 +252,15 @@ export default {
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
-          capacity: item.capacity,
+           capacity:item.capacity
         },
       })
     },
     //入库
-    warehousing(item) {
-      var free = 0
+    warehousing(item) {  
+        var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
-        free += item.warehouseNumViewList[i].storage
+        free += Number(item.warehouseNumViewList[i].storage)
       }
       this.$router.push({
         path: 'warehouseManagementPut',
@@ -269,7 +269,7 @@ export default {
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
-          capacity:item.capacity - free ,
+         capacity:item.capacity-free
         },
       })
     },
@@ -308,11 +308,10 @@ export default {
     nocomplete(row) {
       this.$router.push({
         path: 'warehouseManagementNoComplete',
-        query: {
-          baseId: row.warehouseId,
-          positionId: row.binNumberId,
-          warehouseName: row.warehouseName,
-          binNumber: row.binNumber,
+        query: { baseId: row.warehouseId,
+         positionId: row.binNumberId,
+         warehouseName: row.warehouseName,
+          binNumber : row.binNumber
         },
       })
     },

+ 22 - 18
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -120,14 +120,12 @@
 <script>
 import {
   complete,
-  export1,
-  billoperatehis,
   delInOut,
   // deletewarehouse,
   // warehouseName,
   // addstorageputList,
 } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
+// import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import { dayjs } from 'base-core-lib'
@@ -185,7 +183,6 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-
       // inOutDate:null,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -213,6 +210,7 @@ export default {
     },
     //编辑
     edits(row) {
+      console.log(row)
       if (row.inOutFlag == 2) {
         this.$router.push({
           path: 'warehouseManagementPerfectput',
@@ -224,23 +222,30 @@ export default {
           },
         })
       } else if(row.inOutFlag==1){
+        this.$store.dispatch('app/setdeptBudgetList', row)
+      // this.$store.commit('deptBudgetList',row)
         this.$router.push({
           path: 'warehouseManagementPerfectDelivery',
           query: {
-            warehouseName: row.warehouseName,
-            binNumber: row.binNumber,
-            baseId: row.warehouseId,
-            positionId: row.binNumberId,
-            goodsName:row.goodsName,
-            grossWeight:row.grossWeight,
-            tare:row.tare,
-            netWeight:row.netWeight,
-            grade:row.grade,
             agent:row.agent,
-            carNo:row.carNo,
-            inOutDate:row.inOutDate,
-            contractNo:row.contractNo,
-            inOutType:row.inOutType,
+            baseId: row.baseId,
+             binNumber: row.binNumber,
+             carNo:row.carNo,
+             compId:row.compId,
+             contractNo:row.contractNo,
+             goodsName:row.goodsName,
+             goodsNameKey:row.goodsNameKey,
+             grade:row.grade,
+             grossWeight:row.grossWeight,
+             inOutDate:row.inOutDate,
+             inOutFlag:row.inOutFlag,
+             inOutType:row.inOutType,
+             inOutTypeKey:row.inOutTypeKey,
+             netWeight:row.netWeight,
+             positionId: row.positionId,
+             statusFlag:row.statusFlag,
+             tare:row.tare,
+            warehouseName: row.warehouseName,  
           }
           })
       }
@@ -320,7 +325,6 @@ export default {
               this.getList(row.baseId,row.positionId)
             })
             .catch((response) => {
-
             })
         })
         .catch(() => {

+ 73 - 83
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -23,7 +23,7 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ this.deptBudgetList1.warehouseName }}库
@@ -36,7 +36,7 @@
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
             <ws-select
-              v-model="deptBudgetList.goodsName"
+              v-model="dataList.goodsName"
               placeholder=""
               class="typeselect"
               @change="selectgoodsName"
@@ -53,7 +53,7 @@
           <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
             <ws-input
               @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
+              v-model="dataList.grossWeight"
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -69,7 +69,7 @@
           >
             <ws-input
               @input="tarechange"
-              v-model="deptBudgetList.tare"
+              v-model="dataList.tare"
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -79,7 +79,7 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+              v-model.number="dataList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
               maxlength="120"
@@ -89,7 +89,7 @@
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
-              v-model="deptBudgetList.grade"
+              v-model="dataList.grade"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -106,7 +106,7 @@
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
-              v-model="deptBudgetList.agent"
+              v-model="dataList.agent"
               placeholder="请输入出库经办人姓名"
               maxlength="100"
               size="small"
@@ -120,7 +120,7 @@
             class="deliverydate"
           >
             <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
+              v-model="dataList.inOutDate"
               type="date"
               placeholder="请选择出库日期"
               value-format="yyyy-MM-dd"
@@ -129,7 +129,7 @@
           <!-- 入库类型 -->
           <ws-form-item label="出库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="dataList.inOutType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
@@ -146,7 +146,7 @@
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
-              v-model="deptBudgetList.carNo"
+              v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
@@ -156,7 +156,7 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
-              v-model="deptBudgetList.contractNo"
+              v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               maxlength="100"
               size="small"
@@ -171,7 +171,7 @@
         oss-key="mainPlan"
         :comp-id="compId"
         :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
+        :vesselId="dataList.addressUrl"
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         @onChange="onChange"
@@ -182,7 +182,7 @@
         <!--自检员-->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
@@ -194,7 +194,7 @@
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              v-model="dataList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
               size="small"
@@ -203,7 +203,7 @@
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              v-model="dataList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
               maxlength="120"
               size="small"
@@ -212,7 +212,7 @@
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
               maxlength="120"
               size="small"
@@ -221,7 +221,7 @@
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
               size="small"
@@ -230,7 +230,7 @@
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
               maxlength="120"
               size="small"
@@ -239,7 +239,7 @@
           <!--不完整粒(%)<=-->
           <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
               maxlength="120"
               size="small"
@@ -271,6 +271,7 @@ import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
+import { mapActions, mapGetters, mapState } from 'vuex'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 export default {
@@ -280,13 +281,15 @@ export default {
     Pagination,
   },
   watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
     isShow(val) {
       this.showType = val
     },
   },
+  computed:{
+    ...mapGetters([
+      'deptBudgetList',
+    ]),
+  },
   data() {
     return {
       //弹出框
@@ -336,7 +339,7 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
+      dataList: {
         warehouseInOutDetail: {},
       },
       historyList: [],
@@ -350,26 +353,38 @@ export default {
     }
   },
   mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
-    this.deptBudgetList.goodsName= this.$route.query.goodsName
-    this.deptBudgetList.grossWeight = this.$route.query.grossWeight
-    this.deptBudgetList.tare = this.$route.query.tare
-    this.deptBudgetList.netWeight = this.$route.query.netWeight
-    this.deptBudgetList.grade = this.$route.query.grade
-    this.deptBudgetList.agent = this.$route.query.agent
-    this.deptBudgetList.carNo = this.$route.query.carNo
-    this.deptBudgetList.inOutDate = this.$route.query.inOutDate
-    this.deptBudgetList.contractNo = this.$route.query.contractNo
-    this.deptBudgetList.inOutType = this.$route.query.inOutType
+    console.log(this.deptBudgetList,1111)
+    console.log(this.dataList)
+    console.log(get)
+    // dataList.contractNo = this.$route.query.contractNo
+    // this.dataList.contractNo = this.deptBudgetList.contractNo
+    // 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.deptBudgetList.goodsName = this.$route.query.goodsName
+    // this.deptBudgetList.grossWeight = this.$route.query.grossWeight
+    // this.deptBudgetList.tare = this.$route.query.tare
+    // this.deptBudgetList.netWeight = this.$route.query.netWeight
+    // this.deptBudgetList.grade = this.$route.query.grade
+    // this.deptBudgetList.agent = this.$route.query.agent
+    // this.deptBudgetList.carNo = this.$route.query.carNo
+    // this.deptBudgetList.inOutDate = this.$route.query.inOutDate
+    // this.deptBudgetList.contractNo = this.$route.query.contractNo
+    // this.deptBudgetList.inOutType = this.$route.query.inOutType
+    // this.deptBudgetList.compId = this.$route.query.compId
+    // this.deptBudgetList.goodsNameKey = Number(this.$route.goodsNameKey)
+    // this.deptBudgetList.inOutFlag = this.$route.inOutFlag
+    // this.deptBudgetList.inOutTypeKey = Number(this.$route.inOutTypeKey)
+    // this.deptBudgetList.statusFlag = this.$route.statusFlag
   },
   methods: {
     //返回按钮
     revert() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+      this.$router.go(-1)
     },
     //暂存按钮
     temporaryStorage() {
@@ -404,26 +419,27 @@ export default {
     },
     //提交按钮
     submit() {
-      if (
-        this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
-        deptBudgetList.warehouseInOutDetail.qualityInspector > 10
-      ) {
-        this.$message({
-          message: '质检员姓名长度错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
-        deptBudgetList.warehouseInOutDetail.qualityInspector > 10
-      ) {
-        this.$message({
-          message: '质检员姓名长度错误!',
-          type: 'warning',
-        })
-        return
-      }
+      console.log(this.deptBudgetList)
+      // if (
+      //   this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
+      //   this.deptBudgetList.warehouseInOutDetail.qualityInspector > 10
+      // ) {
+      //   this.$message({
+      //     message: '质检员姓名长度错误!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (
+      //   this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
+      //   deptBudgetList.warehouseInOutDetail.qualityInspector > 10
+      // ) {
+      //   this.$message({
+      //     message: '质检员姓名长度错误!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
 
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
@@ -568,31 +584,6 @@ export default {
           this.historyList = response
         })
     },
-
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
-    // deletecontract(){},
     //删除
     approve() {},
     listQuery() {},
@@ -656,7 +647,6 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -730,7 +720,7 @@ export default {
   background-color: #f6f7fc;
 }
 /deep/.neifor .el-input--small .el-input__inner {
-  width: 120%;
+  width: 100%;
 }
 .el-input__inner {
   width: 150px;