Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 4 năm trước cách đây
mục cha
commit
1787e94b34

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -38,6 +38,8 @@ export const API_POST_WAREHOUSE_DEL_POSITION = '/warehousePositionInfo/api/delet
 export const API_POST_WAREHOUSE_DEL_INOUTINFO = '/warehouseInOutInfo/api/deleteWarehouse'
 //临时仓库增加
 export const API_POST_WAREHOUSE_ADD = '/warehouseBaseInfo/api/addTemporaryWarehouse'
+//临时出入库合同编号下拉
+export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
 

+ 4 - 0
src/model/warehouse/index.js

@@ -20,6 +20,7 @@ import {
     API_POST_WAREHOUSE_DEL_POSITION,
     API_POST_WAREHOUSE_DEL_INOUTINFO,
     API_POST_WAREHOUSE_ADD,
+    API_GET_WAREHOUSE_NO,
     API_GET_STAFF
 } from '@/api/V2/warehouse'
 // 列表
@@ -61,8 +62,11 @@ export const delInOut = appRx.post(API_POST_WAREHOUSE_DEL_INOUTINFO, errorCatche
 
 //临时库增加add
 export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHandle, filter)
+//临时出入库合同编号下拉
+export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
 // 获取负责人 
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
 
 
 
+

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

@@ -25,7 +25,8 @@
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList.warehouseName }}库
-          <span class="position"> {{ deptBudgetList.binNumber }}仓位 </span>
+          <span class="position" v-show="this.deptBudgetList.warehouseType==1"> {{ deptBudgetList.binNumber }}仓位 </span>
+          <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
         </h2>
         <div class="small-title">基本信息</div>
         <ws-info-table>
@@ -342,6 +343,7 @@ export default {
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList.binNumber = this.$route.query.binNumber
+    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
     this.getList()
   },
   methods: {

+ 3 - 3
src/views/warehouse/warehouseManagementList.vue

@@ -323,9 +323,6 @@ export default {
     }
   },
   activated() {
-    //cg.viewBudget
-    //cg.viewSpareMoney
-    // this.getVesselData();
     this.getList()
     this.showType = this.isShow
   },
@@ -340,6 +337,7 @@ export default {
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
           capacity: item.capacity,
+          warehouseType: this.warehouseType
         },
       })
     },
@@ -358,6 +356,8 @@ export default {
           binNumber: item.binNumber,
           capacity: item.capacity - free,
           id: item.id,
+          warehouseType: this.warehouseType,
+          createType: item.createType
         },
       })
     },

+ 141 - 73
src/views/warehouse/warehouseManagementPut.vue

@@ -33,7 +33,10 @@
             alt=""
           />
           {{ deptBudgetList.warehouseName }}库
-          <span class="position"> {{ deptBudgetList.binNumber }}仓位 </span>
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ deptBudgetList.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2">(临)</span>
         </h2>
         <ws-info-table>
           <!-- 货名 -->
@@ -158,14 +161,55 @@
 
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractNo"
-              placeholder="请输入合同编号"
-              maxlength="100"
-              size="small"
-            />
+            <ws-select
+                v-model="deptBudgetList.contractNo"
+                placeholder="请选择合同编号或移库任务编号"
+                class="typeselect"
+              >
+                <ws-option
+                  v-for="item in outContractNo"
+                  :key="item.constKey"
+                  :label="item.contractNo"
+                  :value="item.contractNo"
+                />
+              </ws-select>
           </ws-form-item>
         </ws-info-table>
+        <div v-show="this.$route.query.warehouseType == 2">
+          <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
+          <ws-info-table v-show="checked == true &&  this.deptBudgetList.createType== 2" >
+            <!-- 出库类型 -->
+            <ws-form-item label="出库类型" span="1">
+              <ws-select
+                v-model="deptBudgetList.deliveryType"
+                placeholder=""
+                class="typeselect"
+              >
+                <ws-option
+                  v-for="item in deliveryType"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!-- 出库合同编号 -->
+            <ws-form-item label="出库合同编号" span="1">
+              <ws-select
+                v-model="deptBudgetList.outContractNo"
+                placeholder="请选择合同编号或移库任务编号"
+                class="typeselect"
+              >
+                <ws-option
+                  v-for="item in outContractNo"
+                  :key="item.constKey"
+                  :label="item.contractNo"
+                  :value="item.contractNo"
+                />
+              </ws-select>
+            </ws-form-item>
+          </ws-info-table>
+        </div>
       </div>
       <ws-upload
         ref="upload"
@@ -270,7 +314,7 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import { pullDown, addstorageputList ,xialaNo} from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -311,9 +355,14 @@ export default {
       startDate: null,
       endDate: null,
       goodnameList: {},
+      checked: true,
+
+      outContractNo:[],
+      
       // 提交类型
       submitType: true,
       storageType: [],
+      deliveryType:[],
       readonly: true,
       appendixIdsAdd: '',
       uploadSuccess: {},
@@ -356,23 +405,21 @@ export default {
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList.binNumber = this.$route.query.binNumber
+    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+    this.deptBudgetList.createType = this.$route.query.createType
     this.getList()
     this.deptBudgetList.goodsName = '玉米'
     this.deptBudgetList.goodsNameKey = '1'
     this.deptBudgetList.grade = '一等品'
     this.deptBudgetList.gradeKey = '1'
-    this.deptBudgetList.inOutType = '采购入库'
+    if(this.deptBudgetList.warehouseType==1){
+      this.deptBudgetList.inOutType = '采购入库'
     this.deptBudgetList.inOutTypeKey = '1'
-  },
-  activated() {
-    //   //cg.viewBudget
-    //   //cg.viewSpareMoney
-    //   // this.getVesselData();
-    //   console.log(2222)
-    //   this.getList()
-    //   console.log(1111)
-    //   this.showType = this.isShow
-    // this.getList(this.$route.query.baseId,)
+    }else{
+      this.deptBudgetList.inOutType = '退库'
+    this.deptBudgetList.inOutTypeKey = '1'
+    }
+    
   },
   methods: {
     //返回按钮
@@ -447,7 +494,7 @@ export default {
         })
         return
       }
-       if (!this.deptBudgetList.grade) {
+      if (!this.deptBudgetList.grade) {
         this.$message({
           message: '品级不能为空!',
           type: 'warning',
@@ -500,14 +547,14 @@ export default {
         return
       }
 
-      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
-       //自检员
+      // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
+      //   this.$message({
+      //     message: '入库量大于该仓库容量!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      //自检员
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
           this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
@@ -580,7 +627,7 @@ export default {
           return
         }
       }
-       //霉变
+      //霉变
       if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
           this.$message({
@@ -595,7 +642,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.mildewGrain
               ).indexOf('.') +
@@ -610,7 +658,7 @@ export default {
         }
       }
 
-       //热损伤
+      //热损伤
       if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
           this.$message({
@@ -640,7 +688,7 @@ export default {
         }
       }
 
-        //不完整粒(%)
+      //不完整粒(%)
       if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
           this.$message({
@@ -652,10 +700,11 @@ export default {
         if (
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.imperfectGrain
               ).indexOf('.') +
@@ -670,7 +719,7 @@ export default {
         }
       }
       //容重
-       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
           this.$message({
             message: '容重(克/升)非数字!',
@@ -684,7 +733,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.bulkDensity
               ).indexOf('.') +
@@ -699,7 +749,7 @@ export default {
         }
       }
       this.deptBudgetList.id = this.$route.query.id
-        this.$confirm(`确定提交入库信息`, {
+      this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
@@ -707,9 +757,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.inOutFlag = 2
               this.deptBudgetList.statusFlag = 3
               addstorageputList(this.deptBudgetList)
@@ -727,8 +776,6 @@ export default {
         .catch(() => {
           return false
         })
-    
-      
     },
     temporaryStorage() {
       if (!this.deptBudgetList.goodsName) {
@@ -828,13 +875,13 @@ export default {
         })
         return
       }
-      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
+      // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
+      //   this.$message({
+      //     message: '入库量大于该仓库容量!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
       //自检员
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
@@ -908,7 +955,7 @@ export default {
           return
         }
       }
-       //霉变
+      //霉变
       if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
           this.$message({
@@ -923,7 +970,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.mildewGrain
               ).indexOf('.') +
@@ -938,7 +986,7 @@ export default {
         }
       }
 
-       //热损伤
+      //热损伤
       if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
           this.$message({
@@ -968,7 +1016,7 @@ export default {
         }
       }
 
-        //不完整粒(%)
+      //不完整粒(%)
       if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
           this.$message({
@@ -980,10 +1028,11 @@ export default {
         if (
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.imperfectGrain
               ).indexOf('.') +
@@ -998,7 +1047,7 @@ export default {
         }
       }
       //容重
-       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
           this.$message({
             message: '容重(克/升)非数字!',
@@ -1012,7 +1061,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.bulkDensity
               ).indexOf('.') +
@@ -1034,9 +1084,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.inOutFlag = 2
               this.deptBudgetList.statusFlag = 1
               addstorageputList(this.deptBudgetList)
@@ -1117,11 +1166,32 @@ export default {
           this.gradeList = response
         })
       // 类型
-      pullDown({ constId: 'CON5' })
-        .toPromise()
-        .then((response) => {
-          this.storageType = response
-        })
+      if (this.deptBudgetList.warehouseType == '1') {
+        pullDown({ constId: 'CON5' })
+          .toPromise()
+          .then((response) => {
+            this.storageType = response
+          })
+      } else if (this.deptBudgetList.warehouseType == '2') {
+        pullDown({ constId: 'WARE1' })
+          .toPromise()
+          .then((response) => {
+            this.storageType = response
+          })
+
+           pullDown({ constId: 'WARE2' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      }
+      //合同编号
+       xialaNo({ compId: sessionStorage.getItem('ws-pf_compId')})
+          .toPromise()
+          .then((response) => {
+            this.outContractNo = response
+          })
+
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -1261,9 +1331,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
-.inspector{
+.inspector {
   width: 50%;
-} 
+}
 //质检员
 .inspector .el-form-item__content {
   text-align: left;
@@ -1302,6 +1372,4 @@ export default {
 /deep/.neifor .el-input--small .el-input__inner {
   width: 100%;
 }
-
-
 </style>

+ 1 - 1
vue.config.js

@@ -144,7 +144,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.121:8090/',
-        target: 'http://192.168.1.119:8090/',
+        target: 'http://192.168.1.124:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',