gjy 2 年之前
父節點
當前提交
32c886d6b5

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

@@ -191,3 +191,5 @@ export const API_GET_LOOKMATERIAL='/materialWarehouseInOut/getMaterialInfo'
 export const API_GET_GETQUALITYZHE = '/warehouseBaseInfo/getQuantityZhe'
 //实际重量
 export const API_GET_GETQUALITYREAL = '/warehouseBaseInfo/getQuantityReal'
+//销售转移
+export const API_SALESTRANINFO = '/salesTransferInfo/api/salesTransfer'

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

@@ -92,7 +92,8 @@ import {
     API_POST_DELMATERIAL,
     API_GET_LOOKMATERIAL,
     API_GET_GETQUALITYZHE,
-    API_GET_GETQUALITYREAL
+    API_GET_GETQUALITYREAL,
+    API_SALESTRANINFO
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -284,3 +285,5 @@ export const lookMaterial = appRx.get(API_GET_LOOKMATERIAL, errorCatcher, errorH
 export const getQualityZhe = appRx.get(API_GET_GETQUALITYZHE, errorCatcher, errorHandle, filter)
 //实际重量
 export const getQualityReal = appRx.get(API_GET_GETQUALITYREAL, errorCatcher, errorHandle, filter)
+//销售转移
+export const salestraninfo = appRx.post(API_SALESTRANINFO, errorCatcher, errorHandle, filter)

+ 1 - 1
src/views/statisticalReport/autoSettlementList.vue

@@ -33,7 +33,7 @@
             <el-option v-for="item in warehouseList1" :key="item.id" :label="item.warehouseName" :value="item.warehouseName" style="color: #8890b1" />
           </el-select>
           <el-select  v-model="carType" filterable placeholder="" @change="carTypeChange" >
-            <el-option key="全部" label="全部" value="" style="color: #8890b1" />
+            <el-option key="全部装卸状态" label="全部装卸状态" value="" style="color: #8890b1" />
             <el-option key="未卸车" label="未卸车" value="1" style="color: #8890b1" />
             <el-option key="已卸车" label="已卸车" value="2" style="color: #8890b1" />
           </el-select>

+ 6 - 5
src/views/warehousenew/goodsrollIn.vue

@@ -11,7 +11,7 @@
     </el-row>
     <div class="center">
       <div style="width:49%;display:inline-block;">
-        <el-form ref="form" :model="form" label-width="200px">
+        <el-form ref="form" :model="form" label-width="160px">
             <el-form-item label="关联货权转出记录">
                 <el-select filterable clearable @change="receiveNochange" v-model="form.relationReceiveNo" placeholder="选择关联货权">
                     <el-option label="不关联" value="不关联"></el-option>
@@ -60,19 +60,19 @@
                 </el-select>
             </el-form-item>
         </el-form>
-        <el-form :inline="true" label-width="200px" v-for="(item,index) in form.cargoPositionDetailsList" :key="'cangwe'+index" class="demo-form-inline">
-          <el-form-item :label="'仓位-'+(index+1)">
+        <el-form :inline="true"  v-for="(item,index) in form.cargoPositionDetailsList" :key="'cangwe'+index" class="demo-form-inline">
+          <el-form-item label-width="160px" :label="'仓位-'+(index+1)">
             <el-select @focus="binNumberfocus" clearable filterable @change="($event)=>binNumberchange($event,item,index)" v-model="item.binNumber" placeholder="选择仓位">
               <el-option v-for="item1 in binNumberList" :label="item1.binNumber" :value="item1.binNumber"></el-option>
             </el-select>
           </el-form-item> 
-          <el-form-item label="入库重量(吨)">
+          <el-form-item label-width="170px" label="入库重量(吨)">
             <el-input @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
           </el-form-item>
           <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
           <img width="22" height="22" class="del" @click="del(index)" src="../../../public/img/del.png" alt="" />
         </el-form>
-        <el-form label-width="200px">
+        <el-form label-width="160px">
             <el-form-item label="合计重量">
                 <el-input disabled v-model="form.transferOutWeight" placeholder="自动计算,不可编辑"></el-input>
             </el-form-item>
@@ -488,6 +488,7 @@ import {xialaNo} from '@/model/tasksport/index'
   }
   /deep/.el-form.el-form--inline .el-form-item{
       margin:0;
+      width:48%;
 }
 .add,.del{
       position:absolute;

+ 107 - 21
src/views/warehousenew/warehouseManagementRecord.vue

@@ -67,7 +67,7 @@
             src="../../../public/img/sousuo.png" alt />
         </ws-button>
         <el-button type="primary" @click="batchPrint">批量打印</el-button>
-        <el-button type="primary" @click="salesTransfer">销售转移</el-button>
+        <!-- <el-button type="primary" @click="salesTransfer">销售转移</el-button> -->
         <el-table show-summary ref="tableData" :data="warehouseList.records" height="570"
           v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
@@ -121,7 +121,7 @@
           </el-table-column>
           <el-table-column prop="contractNo" label="任务编号" width="180">
             <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+              <span style="color: #8890b1">{{ scope.row.inOutTaskNo }}</span>
             </template>
           </el-table-column>
           <el-table-column prop="binNumber" label="仓位号" width="60px"> </el-table-column>
@@ -187,6 +187,9 @@
               <span v-if='scope.row.inOutFlag==1'>{{ scope.row.backOffice }}</span>
             </template>
           </el-table-column>
+          <el-table-column prop="salesTransferStatus" label="销售转移状态">
+          </el-table-column>
+          
           <el-table-column prop="addressUrl" label="操作" width="100px">
             <template slot-scope="scope">
               <!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
@@ -317,24 +320,26 @@
         <div style="display:inline-block;" v-for="item in modification">{{ item.carNo }} ({{ item.netWeight }})</div>
       </div>
       <div>合计:{{modification.length}}车 {{num}}吨 合同编号:{{currectdata.contractNo}}({{currectdata.pointOut}})</div>
-      <el-form ref="form" :model="form" label-width="80px">
-        <el-form-item label="转至销售/移库">
-          <el-select v-model="form.region" placeholder="选择转移后的销售合同编号或移库编号">
-            <el-option label="区域一" value="shanghai"></el-option>
-          </el-select>
-        </el-form-item>
+      
+      <el-form label-position="left" class="sale-form" ref="form" :model="currectdata" label-width="160px">
         <el-form-item label="出入库任务">
-          <el-select v-model="form.region" placeholder="选择转移后的出入库任务编号">
-            <el-option label="区域一" value="shanghai"></el-option>
-            <el-option label="区域二" value="beijing"></el-option>
+          <el-select @change="taskNochange" v-model="currectdata.taskNoNew" placeholder="选择转移后的出入库任务编号">
+            <el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo+(item.taskFlag?'('+item.taskFlag+')':'')" :value="item.inOutTaskNo"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="转至销售/移库">
+          <el-input disabled v-model="currectdata.contractNoNew" placeholder="选择转移后的销售合同编号或移库编号"></el-input>
+        </el-form-item>
         <el-form-item label="运输任务(自运必填)">
-          <el-select v-model="form.region" placeholder="选择转移后的运输任务编号">
-            <el-option label="区域一" value="shanghai"></el-option>
-            <el-option label="区域二" value="beijing"></el-option>
+          <!-- <el-input disabled v-model="currectdata.tranTaskNew" placeholder="选择转移后的运输任务编号"></el-input> -->
+          <el-select :disabled="this.contractNo.deliverType==2" v-model="currectdata.tranTaskNew" placeholder="选择转移后的运输任务编号">
+            <el-option  v-for="item in taskInfo" :label="item.taskNo" :value="item.taskNo"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item>
+          <el-button @click="show=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">提交</el-button>
+        </el-form-item>
       </el-form>
     </WinseaContentModal>
   </div>
@@ -348,11 +353,20 @@
     recordss,
     getPrintInfo,
     getbinnumber,
-    getExpense
+    getExpense,
+    getReceiptTaskNo,
+    salestraninfo
   } from '@/model/warehouse/index'
   import {
     downloadFile
   } from '@/utils/batchDown'
+  import {
+    getcontract
+  } from '@/model/outboundManagement/index'
+  import {
+    getYunShuXiaLa,
+    getYunShuNumber,
+  } from '@/model/statisticalReport/index'
   import Pagination from '@/components/Pagination'
   import WsUpload from '@/components/WsUpload'
   import {
@@ -385,9 +399,13 @@
         showType: true,
         // 年
         year: '',
+        form:{},
+        contractNo:{},
         show:false,
         srcList: [],
-        currectdata:{},
+        currectdata:{
+          compId: localStorage.getItem('ws-pf_compId'),
+        },
         inOutType:'',
         inOutTypeList:[
           {value:'货权转入'},
@@ -400,6 +418,7 @@
           {value:'折转出库'},
           {value:'退库'}],
         num:0,
+        taskInfo:[],
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
@@ -426,6 +445,7 @@
           month: dayjs().format('MM'),
         },
         warehouseList: [],
+        taskNolist:[],
         deptBudgetList: {},
         historyList: [],
         searchType: '',
@@ -455,10 +475,48 @@
     },
     updated() {
       this.$nextTick(() => {
-        this.$refs['tableData'].doLayout();
+        // this.$refs['tableData'].doLayout();
       })
     },
     methods: {
+      onSubmit(){
+        if(!this.currectdata.taskNoNew){
+          this.$message.error("合同/移库编号不能为空!")
+          return
+        }
+        if(!this.currectdata.contractNoNew){
+          this.$message.error("出入库任务编号不能为空!")
+          return
+        }
+        this.$confirm('确定转移出库数据?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+        .then(() => {
+          salestraninfo(this.currectdata).toPromise().then(() => {
+            this.show=false
+            this.currectdata={
+                compId: localStorage.getItem('ws-pf_compId'),
+              }
+              this.$message.success("提交成功!")
+              this.getList()
+          })
+        })
+      },
+      async taskNochange(e){
+        for (let i = 0; i < this.taskNolist.length; i++) {
+          if(this.taskNolist[i].inOutTaskNo==e){
+            this.currectdata.contractNoNew=this.taskNolist[i].contractNo?this.taskNolist[i].contractNo:this.taskNolist[i].moveTaskNo
+          }
+        }
+        this.contractNo=await getcontract({contractNo:this.currectdata.contractNoNew,warehouseName:this.warehouseName,compId:localStorage.getItem('ws-pf_compId')}).toPromise()
+        this.currectdata.pointOutNew=this.contractNo.pointOut
+        var data=await getYunShuNumber({contractNo:this.currectdata.contractNoNew}).toPromise()
+        this.currectdata.tranTaskNew=data[0].taskNo
+        this.taskInfo=data
+        console.log(this.taskinfo)
+      },
       async salesTransfer(){
         var arr=[]
         if (this.modification.length == 0) {
@@ -488,6 +546,15 @@
             this.$message.error("已完成的合同记录不可转移!")
             return
           }
+          this.currectdata.warehouseInOutInfoList=this.modification
+          
+          let map = new Map();
+          for (let item of this.modification) {
+            map.set(item.inOutTaskNo, item.inOutTaskNo);
+          }
+          var arr = [...map.values()]
+          console.log(arr)
+          this.currectdata.taskNo=arr.toString()
           this.currectdata.contractNo=this.modification[0].contractNo
           this.currectdata.pointOut=contractNo.pointOut
           this.show=true
@@ -726,6 +793,15 @@
 							this.warehouseList = response
 						})
 				}
+        getReceiptTaskNo({
+            flag: 1,
+            warehouseName: this.deptBudgetList.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.taskNolist = response
+          })
 
 			},
 			selecttaskType(e) {
@@ -1034,10 +1110,6 @@
     padding: 0 1%;
   }
 
-  .el-form-item {
-    width: 50%;
-  }
-
   .el-form-item__label {
     text-align: center;
   }
@@ -1208,4 +1280,18 @@
     font-size: 18px;
     margin-left: 20px;
   }
+  /deep/.sale-form .el-select{
+    width:100%;
+  }
+  /deep/.winsea__content-modal .winsea__content-modal__win-wrap {
+    width:50%;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    height: 410px;
+    border-radius: 10px;
+  }
 </style>

+ 28 - 5
src/views/warehousenew/warehousingOrder.vue

@@ -58,6 +58,8 @@
         <ws-button :type="searchType === '2' ? 'primary' : ''" @click="handle('2')" v-hasPermission="
         `warehouseManagement.warehousingOrder.View`">待审核
         </ws-button>
+        <el-checkbox @change="chaeckedchange" v-model="checked"></el-checkbox>
+        <span v-if="checked">合计剩余:{{tabletotal}}吨</span>
       </el-col>
       <el-col style='text-align:right;' :span="12">
         <!-- <ws-button v-hasPermission="
@@ -482,12 +484,12 @@
     <el-dialog width='30%' :visible.sync="remarkList" title="备注" top="20vh">
       <span>{{ remark }}</span>
     </el-dialog>
-    <el-dialog width='50%' :visible.sync="rolloutShow" title="货权转出" top="20vh">
+    <el-dialog width='60%' :visible.sync="rolloutShow" title="货权转出" top="20vh">
       <div class="form-inline">
         <div style="margin:10px;">
           选中{{ rolloutData.warehousingOrderList.length }}条:{{rolloutData.warehouseName}}&nbsp;转出&nbsp;{{ rolloutData.goodsName }}&nbsp;
           {{ rolloutData.transferOutWeight }}吨&nbsp;应付{{rolloutData.amountIngPayable}}&nbsp; 已付{{rolloutData.amountEdPayable}}&nbsp; 
-          未付{{rolloutData.amountNotPayable}}&nbsp; 平均成本 {{ rolloutData.avgCost }}
+          未付{{rolloutData.amountNotPayable}}&nbsp; 平均成本 {{ rolloutData.avgCost }} 本次转出重量(吨):<el-input style="width:200px;" v-model="rolloutData.transferOutWeight1" placeholder="输入本次转出重量"></el-input>
         </div>
         <el-form :inline="true" label-width="120px" class="demo-form-inline">
           <el-form-item label="售价(元/吨)">
@@ -668,6 +670,7 @@ export default {
       dataList: [],
       payeeinfo: [],
       title1:'',
+      checked:false,
       StartDate:'',
       EndDate:'',
       rejectshow:false,
@@ -678,6 +681,7 @@ export default {
         warehouseName:'',
         goodsName:'',
         transferOutWeight:0,
+        transferOutWeight1:0,
         amountEdPayable:0,
         amountNotPayable:0,
         amountIngPayable:0,
@@ -835,6 +839,7 @@ export default {
       remark: '',
       baseId:'',
       auditMind:'',
+      tabletotal:0,
       contractNoList:[],
       binNumberList:[],
     }
@@ -860,6 +865,23 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    chaeckedchange(e){
+      console.log(e)
+        this.tabletotal=0
+        for (let i = 0; i < this.gainList.length; i++) {
+          var item=this.gainList[i]
+          if(e){
+            for (let q = 0; q < item.warehousingOrderList.length; q++) {
+              this.tabletotal+=Number(item.warehousingOrderList[q].surplusWeight)
+            }
+          }
+          this.$refs[`multipleTable${i}`][0].toggleAllSelection();
+        }
+        this.tabletotal=this.tabletotal.toFixed(3)
+      
+      
+      // 
+    },
     weightinput(e){
       this.rollweight=0
       for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
@@ -953,11 +975,12 @@ export default {
           return
         }
       }
-      if(this.rollweight!=this.rolloutData.transferOutWeight){
+      console.log(this.rolloutData.transferOutWeight1)
+      if(Number(this.rollweight)!=this.rolloutData.transferOutWeight1){
         this.$message.error('输入的出库重量合计须等于勾选的重量合计!')
         return
       }
-      
+      this.rolloutData.transferOutWeight=this.rolloutData.transferOutWeight1
       this.$confirm('提交后不可修改,确定转出货权?', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -1027,7 +1050,6 @@ export default {
       this.$forceUpdate()
     },
     async goodrollOut(){
-      console.log(11111111111111)
       var concatarr=[]
       var arr=[]
       var arr3=[]
@@ -1115,6 +1137,7 @@ export default {
         num+=(Number(arr[i].surplusWeight*arr[i].avgCost))
       }
       this.rolloutData.transferOutWeight= this.rolloutData.transferOutWeight.toFixed(3)
+      this.$set(this.rolloutData,'transferOutWeight1',this.rolloutData.transferOutWeight)
       this.rolloutData.avgCost=(num/this.rolloutData.transferOutWeight).toFixed(3)
       this.rolloutData.amountEdPayable=this.rolloutData.amountEdPayable.toFixed(3)
       this.rolloutData.amountNotPayable=this.rolloutData.amountNotPayable.toFixed(3)