gjy 2 年之前
父節點
當前提交
4c19ae6e77

+ 3 - 1
src/api/V2/taskspost/index.js

@@ -58,4 +58,6 @@ export const API_GET_SOURCEOFGOODS = '/warehousingOrder/getSourceOfGoodsList'
 // 矫正
 export const API_SET_CORRECT= '/inOutWarehouseTask/api/correct'
 // 出库货源列表
-export const API_GET_GOODSOURCEINFO= '/warehousingOrder/selectGoodSourceInfo'
+export const API_GET_GOODSOURCEINFO= '/warehousingOrder/selectGoodSourceInfo'
+// 退库选择任务
+export const API_GET_TASKNO= '/inOutWarehouseTask/getOutTaskNo'

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

@@ -123,3 +123,7 @@ export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
 //查看可分配金额
 export const API_GET_EXPENSE='/contractManagementInfo/getContractInfo'
+//入库单仓位
+export const API_GET_WAREHOUSEPOSITIONINFO='/warehousePositionInfo/selectPositionList'
+//入库单折干
+export const API_DRYOUT='/warehousingOrder/dryOut'

+ 5 - 2
src/model/tasksport/index.js

@@ -30,7 +30,8 @@ import {
     API_GET_SOURCEGOOD,
     API_SET_CORRECT,
     API_GET_SOURCEOFGOODS,
-    API_GET_GOODSOURCEINFO
+    API_GET_GOODSOURCEINFO,
+    API_GET_TASKNO
 } from '@/api/V2/taskspost'
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -89,4 +90,6 @@ export const getSourceOfGoodslist = appRx.get(API_GET_SOURCEOFGOODS, errorCatche
 //矫正
 export const setcorrect = appRx.post(API_SET_CORRECT, errorCatcher, errorHandle, filter)
 //出库货源列表
-export const getSourceOfGoodsinfo = appRx.get(API_GET_GOODSOURCEINFO, errorCatcher, errorHandle, filter)
+export const getSourceOfGoodsinfo = appRx.get(API_GET_GOODSOURCEINFO, errorCatcher, errorHandle, filter)
+//退库选择的任务编号
+export const gettaskNo = appRx.get(API_GET_TASKNO, errorCatcher, errorHandle, filter)

+ 7 - 2
src/model/warehouse/index.js

@@ -60,7 +60,8 @@ import {
     API_SET_PAYMONEY,
     API_WORKFLOWHANDLE,
     API_GET_EXPENSE,
-    API_SET_EXPENSE
+    API_GET_WAREHOUSEPOSITIONINFO,
+    API_DRYOUT
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -184,4 +185,8 @@ export const workflowhandle = appRx.post(API_WORKFLOWHANDLE,errorCatcher, errorH
 // //费用详情
 // export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)
 //查看可分配金额
-export const getExpense = appRx.get(API_GET_EXPENSE,errorCatcher, errorHandle, filter)
+export const getExpense = appRx.get(API_GET_EXPENSE,errorCatcher, errorHandle, filter)
+//入库单仓位
+export const getposition = appRx.get(API_GET_WAREHOUSEPOSITIONINFO,errorCatcher, errorHandle, filter)
+//入库单折干
+export const dryout = appRx.post(API_DRYOUT,errorCatcher, errorHandle, filter)

+ 2 - 2
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -14,13 +14,13 @@
     </el-row>
     <div class="center">
       <el-row>
-        <el-col :span="12">
+        <el-col :span="6">
           <el-button :type="warehousingType == 1?'primary':''" size="small" @click="changeType(1)"
             class="btn_css btn_topcss">贸易入库</el-button>
           <el-button :type="warehousingType == 3?'primary':''" size="small" @click="changeType(3)"
             class="btn_css btn_topcss">收购入库</el-button>
         </el-col>
-        <el-col :span="12" class="bg-right">
+        <el-col :span="18" class="bg-right">
           <div style="display:flex">
             <el-select style='margin-right:5px;width:40%' v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
               <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"

+ 5 - 2
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -195,10 +195,13 @@
             {{dataList.goodsName}}
             <!-- </el-select> -->
           </el-form-item>
-          <el-form-item v-else label="货源" class="huom">
+          <el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
             {{goods}}
             <el-button style='margin-left:5px;' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
           </el-form-item>
+          <el-form-item v-else label="货源" class="huom">
+            {{dataList.inOutTaskNo}}
+          </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" >
             {{dataList1.weight}}
@@ -687,7 +690,7 @@ export default {
           }
           if(this.dataList.sourceRelationInfoList){
             if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
-                  this.goods=this.dataList.sourceId
+                  this.goods=this.dataList1.sourceId
                 }else 
               for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
                 if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){

+ 32 - 7
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -193,11 +193,19 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item>
+					<el-form-item v-else label="货源" class="huom">
+						
+						<el-select v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom" @change="selectinOutTaskNo"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 						<el-input :disabled='dataList1.inOutType=="收购入库"' @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
@@ -371,9 +379,9 @@
 		getwarehousename,
 		xialaNo,
 		addoreditoutput,
-		getGoodsName
+		getGoodsName,
+		gettaskNo
 	} from '@/model/tasksport/index'
-
 	import {
 		mapGetters
 	} from 'vuex'
@@ -447,6 +455,7 @@
 				deptBudgetTotal: 0,
 				readonly: true,
 				currentPage: 1,
+				taskNolist:[],
 				pageSize: 10,
 				searchType: 1,
 				searchKeyWord: '',
@@ -893,8 +902,14 @@
 									this.$set(this.dataList1, 'waterContent', response.waterContent)
 									this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
 									if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'){
-										this.goods=''
 										this.dataList1.weight=0
+										gettaskNo({
+											contractNo: this.dataList1.contractNo,
+										})
+										.toPromise()
+										.then((response) => {
+											this.taskNolist = response
+										})
 									}else{
 										this.$set(this.dataList1, 'weight', response.weight)
 									}
@@ -1536,8 +1551,10 @@
 					
 				}
 				var supplygoods=data
-				this.dataList.sourceId=this.goods
-				this.dataList1.sourceId=this.goods
+				if(this.dataList.taskTypeKey != 2){
+					this.dataList.sourceId=this.goods
+					this.dataList1.sourceId=this.goods
+				}
 				if (this.dataList.taskTypeKey == 1) {
 					this.dataList.inOutTaskNo = this.inOutTaskNo
 					this.dataList.sourceRelationInfoList=supplygoods
@@ -1598,6 +1615,14 @@
 					}
 				}
 			},
+			selectinOutTaskNo(e) {
+				for (var i = 0; i < this.taskNolist.length; i++) {
+					if (this.taskNolist[i].inOutTaskNo == e) {
+						this.dataList1.sourceId = this.taskNolist[i].id
+						// this.dataList1.weight = this.taskNolist[i].weight
+					}
+				}
+			},
 			selectpackingMethod(e) {
 				for (var i = 0; i < this.gradeList.length; i++) {
 					if (this.gradeList[i].constValue == e) {
@@ -1650,7 +1675,7 @@
 						this.flag = 0
 						break
 					case '退库':
-						this.flag = 2
+						this.flag = 5
 						break
 				}
 				for (var i = 0; i < this.storageType1.length; i++) {

+ 9 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -226,11 +226,18 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
 					</el-form-item>
+          <el-form-item v-else label="货源" class="huom">
+            <el-select disabled v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+          </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)" maxlength="120"
@@ -487,6 +494,7 @@
         // 是否显示
         showType: true,
         disabled: false,
+        taskNolist:[],
         // 年
         year: '',
         disableReason: '',

+ 14 - 6
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -167,7 +167,7 @@
           <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-            <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+            <!-- <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item
@@ -349,7 +349,7 @@
           <!-- 入库类型 -->
           <el-form-item label="入库类型">
             <el-select
-              :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4||dataList1.inOutType=='收购入库'"
+              disabled
               v-model="dataList1.inOutType"
               placeholder="请选择入库类型"
               class="typeselect"
@@ -375,7 +375,7 @@
           <!-- 合同编号 -->
           <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
             <el-select
-            :disabled="dataList1.inOutType=='收购入库'"
+              disabled
               @change="changecontract1"
               v-model="dataList1.contractNo"
               placeholder="请输入合同编号"
@@ -407,10 +407,18 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+						<!-- <el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
+					</el-form-item>
+          <el-form-item v-else label="出库任务编号" class="huom">
+						<el-select disabled v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+						<!-- <el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
 					</el-form-item>
           <!--重量(吨)-->
           <el-form-item
@@ -624,7 +632,7 @@
           <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-            <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+            <!-- <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item

+ 80 - 15
src/views/warehousenew/warehousingOrder.vue

@@ -328,22 +328,39 @@
          <div slot="title" class="header-title">
             <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
         </div>
-          <el-form ref="form" :model="form" label-width="120px">
-            <el-form-item label="合同编号">
-              <el-input disabled v-model="form.accumulatedPrepayment"></el-input>
-            </el-form-item>
+          <el-form ref="form" :model="form" label-width="140px">
             <el-form-item label="折干前重量(吨)">
               <el-input v-model="fieldrationsList.beforeWeight"></el-input>
             </el-form-item>
              <el-form-item label="折干前成本(元/吨)">
               <el-input disabled placeholder="自动计算,不可编辑" v-model="fieldrationsList.beforeCost"></el-input>
             </el-form-item>
+            <el-form-item label="折干前仓位">
+              <el-select @focus="warehousefocus" @change="warehousechange" v-model="fieldrationsList.beforeBinNo" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.id"
+                  :label="item.binNumber"
+                  :value="item.binNumber">
+                </el-option>
+              </el-select>
+            </el-form-item>
             <el-form-item label="折干后重量(吨)">
               <el-input @input="afterWeightchange" v-model="fieldrationsList.afterWeight"></el-input>
             </el-form-item>
              <el-form-item label="折干后成本(元/吨)">
               <el-input disabled  placeholder="自动计算,不可编辑" v-model="fieldrationsList.afterCost"></el-input>
             </el-form-item>
+            <el-form-item label="折干后仓位">
+              <el-select @focus="warehousefocus1" @change="warehousechange1" v-model="fieldrationsList.afterBinNo" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in options1"
+                  :key="item.id"
+                  :label="item.binNumber"
+                  :value="item.binNumber">
+                </el-option>
+              </el-select>
+            </el-form-item>
           </el-form>
         </div>
         <span slot="footer" class="dialog-footer">
@@ -414,7 +431,8 @@
   editwarehousingorder,
   getExpense,
   workflowhandle,
-  setExpense
+  getposition,
+  dryout
 } from '@/model/warehouse/index'
   import {getpayeeinfo,getbuypayeeinfo} from '@/model/profitable/index'
   import {
@@ -451,6 +469,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         dialogApproveFormVisible: false,
         dataList:[],
         payeeinfo:{},
+        options:[],
         // 船舶类型
         monetaryKey: null,
         form:{
@@ -539,6 +558,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         multipleSelection:[],
         size: 10,
         spanArr: [],
+        options1:[],
         id:'',
         customerInfo:{},
         appendixIdss:[],
@@ -578,6 +598,36 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       this.showType = this.isShow
     },
     methods: {
+      warehousefocus(){
+        getposition({baseId:this.fieldrationsList.baseId,flag:1}).toPromise()
+              .then((response) => {
+                // row.weightedit=false
+                this.options=response
+              })
+      },
+      warehousechange(e){
+        for (let i = 0; i < this.options.length; i++) {
+          if(this.options[i].binNumber==e){
+            this.fieldrationsList.beforePositionId=this.options[i].id
+          }
+          
+        }
+      },
+      warehousefocus1(){
+        getposition({baseId:this.fieldrationsList.baseId}).toPromise()
+              .then((response) => {
+                // row.weightedit=false
+                this.options1=response
+              })
+      },
+      warehousechange1(e){
+        for (let i = 0; i < this.options1.length; i++) {
+          if(this.options1[i].binNumber==e){
+            this.fieldrationsList.afterPositionId=this.options1[i].id
+          }
+          
+        }
+      },
       fujian(row) {
         this.id = row.id
         this.accessoryTFs = true
@@ -632,8 +682,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               });
               var that =this
               setTimeout(()=>{
-              console.log(that.$refs[`multipleTable${index}`][0])
-              that.$refs[`multipleTable${index}`][0].toggleRowSelection(val[i],false);
+                that.$refs[`multipleTable${index}`][0].toggleRowSelection(val[i],false);
             },1000)
             }else{
               val[i].select=true
@@ -825,7 +874,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         // console.log(currectData)
         var arr1=currectData
         for (let i = 0; i < arr1.length; i++) {
-          if(arr1[i].goodsName.indexOf('潮粮')){
+          if(arr1[i].goodsName.indexOf('潮粮')==-1){
             this.$message({
               message: '只有潮粮可以折干!',
               type: 'warning'
@@ -836,6 +885,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         }
         // this.currectdata=item
         this.currectdata=arr1
+        this.fieldrationsList.id=this.currectdata[0].id
+        this.fieldrationsList.baseId=this.currectdata[0].baseId
         this.fieldrationsList.beforeWeight=this.currectdata[0].surplusWeight
         this.fieldrationsList.beforeCost=this.currectdata[0].avgCost
         this.fieldrationsshow=true
@@ -1077,9 +1128,16 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
+          if(!this.fieldrationsList.beforeBinNo){
+            this.$message({
+              message: '折干前仓位不能为空',
+              type: 'warning'
+            });
+            return
+          }
           if(!this.fieldrationsList.afterWeight){
             this.$message({
-              message: '折干前重量不能为空',
+              message: '折干重量不能为空',
               type: 'warning'
             });
             return
@@ -1091,23 +1149,30 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
-          this.$confirm('确定提交分配金额?', '提示', {
+          if(!this.fieldrationsList.afterBinNo){
+            this.$message({
+              message: '折干后仓位不能为空',
+              type: 'warning'
+            });
+            return
+          }
+          this.$confirm('确定提交折干?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2,contractId:this.form.contractId}).toPromise()
+            dryout(this.fieldrationsList).toPromise()
           .then((response) => {
             this.$message({
-              message: '分配成功',
+              message: '折干成功',
               type: 'success'
             });
             this.form.distributionIng=''
-            this.marginshow=false
+            this.fieldrationsshow=false
             this.getList()
           }).catch(() => {
            this.$message({
-              message: '分配失败',
+              message: '折干失败',
               type: 'warning'
             });
           })
@@ -1634,7 +1699,7 @@ multiFilter(array, filters) {
     width: 92%;
 }
   .el-select {
-    width: 30%;
+    width: 100%;
     margin-right: 10px;
   }
   .col1 {