gjy 3 年之前
父节点
当前提交
51f33fa8d1

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

@@ -116,5 +116,7 @@ export const API_GET_WAREHOUSINGORDER = '/warehousingOrder/selectInfo'
 export const API_EDIT_WAREHOUSINGORDER = '/warehousingOrder/editInfo'
 //请款、收款
 export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
-//费用详情
-export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'
+// //费用详情
+// export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'z
+//审核
+export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'

+ 1 - 1
src/model/tasksport/index.js

@@ -87,6 +87,6 @@ export const getSourceOfGoods = appRx.get(API_GET_SOURCEGOOD, errorCatcher, erro
 // 退库货源列表
 export const getSourceOfGoodslist = appRx.get(API_GET_SOURCEOFGOODS, errorCatcher, errorHandle, filter)
 //矫正
-export const setcorrect = appRx.get(API_SET_CORRECT, errorCatcher, errorHandle, filter)
+export const setcorrect = appRx.post(API_SET_CORRECT, errorCatcher, errorHandle, filter)
 //出库货源列表
 export const getSourceOfGoodsinfo = appRx.get(API_GET_GOODSOURCEINFO, errorCatcher, errorHandle, filter)

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

@@ -58,6 +58,7 @@ import {
     API_GET_WAREHOUSINGORDER,
     API_EDIT_WAREHOUSINGORDER,
     API_SET_PAYMONEY,
+    API_WORKFLOWHANDLE
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -174,5 +175,7 @@ export const getwarehousingorder = appRx.get(API_GET_WAREHOUSINGORDER,errorCatch
 export const editwarehousingorder = appRx.post(API_EDIT_WAREHOUSINGORDER,errorCatcher, errorHandle, filter)
 //请款,收款
 export const paymoney = appRx.post(API_SET_PAYMONEY,errorCatcher, errorHandle, filter)
+//审核
+export const workflowhandle = appRx.post(API_WORKFLOWHANDLE,errorCatcher, errorHandle, filter)
 // //费用详情
 // export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)

+ 49 - 49
src/views/contractManagement/purchaseContractAdd.vue

@@ -1843,12 +1843,12 @@ import { isUndefined } from 'xe-utils/methods'
   //   }
   // }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
-  }
+  // .box-app {
+  //   display: inline-block;
+  //   float: left;
+  //   margin-left: 30px;
+  //   line-height: 50px;
+  // }
 
   /deep/.el-dialog {
     .el-form-item {
@@ -1920,47 +1920,47 @@ import { isUndefined } from 'xe-utils/methods'
   /*}*/
   // 控制select为只读的时候显示样式
 
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
 
-    .el-icon-arrow-up {
-      display: none;
-    }
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
 
-    .el-textarea__inner {
-      background-color: #fff !important;
-      border: 0;
-    }
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
 
-    .el-date-editor {
-      i {
-        display: none;
-      }
-    }
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
 
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
 
-      color: #606266;
+  //     color: #606266;
 
-      .el-input__inner {
-        background-color: #fff !important;
-        border: 0;
-        color: #606266;
-      }
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
 
-      .el-textarea__inner {
-        background-color: #fff !important;
-        border: 0;
-        color: #606266;
-      }
-    }
-  }
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
 
   // 控制select为只读的时候显示样式
   /deep/.ws-class-table-col {
@@ -2005,16 +2005,16 @@ import { isUndefined } from 'xe-utils/methods'
     width: 101%;
   }
 
-  .addressUrls {
-    width: 100%;
-    display: flex;
-    margin-top: 10px;
-  }
+  // .addressUrls {
+  //   width: 100%;
+  //   display: flex;
+  //   margin-top: 10px;
+  // }
 
-  .addressUrls-item {
-    position: relative;
-    display: flex;
-  }
+  // .addressUrls-item {
+  //   position: relative;
+  //   display: flex;
+  // }
 
   .icon-guanbi {
     position: absolute;

+ 25 - 7
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -786,7 +786,7 @@
         })
       },
       carChange(e, status) {
-        console.log(status)
+        console.log(this.carNumberList)
         if (status == 1) {
           this.$set(this.deptBudgetList, 'customerName', this.carNumberList[e].shipperName)
           this.$set(this.deptBudgetList, 'customerPhone', this.carNumberList[e].shipperPhone)
@@ -1053,7 +1053,14 @@
       },
       deletelist() {
         if (this.id) {
-          getinspectDelete({
+           this.$confirm('确认删除该条信息', {
+            confirmButtonText: '通过',
+            cancelButtonText: '驳回',
+            distinguishCancelAndClose:true,
+            type: 'warning',
+          })
+          .then(() => {
+            getinspectDelete({
               id: this.id
             })
             .toPromise()
@@ -1131,6 +1138,11 @@
               // }
               this.getList()
             })
+          }).catch((action) => {
+
+            
+          })       
+          
         }
       },
       listclick(row) {
@@ -2846,11 +2858,16 @@
         // 循环任务编号获取合同号
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
-            var data = this.taskNolist[i]
-            if (this.taskNolist[i].contractNo) {
-              this.deptBudgetList.contractNo = this.taskNolist[i].contractNo
-            } else {
+            var data = this.taskNolist[i] 
+            if(this.taskNolist[i].inOutType=='移库入库'){
               this.deptBudgetList.contractNo = this.taskNolist[i].moveTaskNo
+            }else{
+              if (this.taskNolist[i].contractNo) {
+                // console.log(this.taskNolist[i])
+                this.deptBudgetList.contractNo = this.taskNolist[i].contractNo
+              } else {
+                this.deptBudgetList.contractNo = this.taskNolist[i].moveTaskNo
+              }
             }
           }
         }
@@ -2899,7 +2916,8 @@
               this.deptBudgetList.inOutTypeKey = 4
             } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
               this.deptBudgetList.inOutTypeKey = 5
-            } else if (this.outContractNo[i].inOutType == '退库') {
+            } 
+            else if (this.outContractNo[i].inOutType == '退库') {
               if (this.outContractNo[i].contractNo) {
                 this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
               } else {

+ 26 - 20
src/views/outboundManagement/weighingManagementNew.vue

@@ -398,8 +398,8 @@
         statusType: '3',
         warehouseType: 1,
         weighingList: {
-          grossWeight: 0,
-          tare: 0,
+          grossWeight: '',
+          tare: '',
           buckleMiscellaneous: 0,
           netWeight: 0,
           weight: '',
@@ -629,8 +629,8 @@
                   .then((response) => {
                     this.types = ''
                     this.weighingList = {
-                      grossWeight: 0,
-                      tare: 0,
+                      grossWeight: '',
+                      tare: '',
                       tips: '',
                       // contractNo:'',
                       // inOutTaskNo:'',
@@ -660,8 +660,8 @@
                   .then((response) => {
                     this.types = ''
                     this.weighingList = {
-                      grossWeight: 0,
-                      tare: 0,
+                      grossWeight: '',
+                      tare: '',
                       tips: '',
                       // contractNo:'',
                       // inOutTaskNo:'',
@@ -719,8 +719,8 @@
                   .then((response) => {
                     this.types = ''
                     this.weighingList = {
-                      grossWeight: 0,
-                      tare: 0,
+                      grossWeight: '',
+                      tare: '',
                       tips: '',
                       // contractNo:'',
                       // inOutTaskNo:'',
@@ -750,8 +750,8 @@
                   .then((response) => {
                     this.types = ''
                     this.weighingList = {
-                      grossWeight: 0,
-                      tare: 0,
+                      grossWeight: '',
+                      tare: '',
                       tips: '',
                       // contractNo:'',
                       // inOutTaskNo:'',
@@ -886,8 +886,8 @@
               })
               this.id = ''
               this.weighingList = {
-                grossWeight: 0,
-                tare: 0,
+                grossWeight: '',
+                tare: '',
                 tips: '',
                 // contractNo:'',
                 // inOutTaskNo:'',
@@ -1374,8 +1374,8 @@
       },
       tabClick(val) {
         this.weighingList = {
-          grossWeight: 0,
-          tare: 0,
+          grossWeight: '',
+          tare: '',
           tips: '',
           buckleMiscellaneous: 0,
           netWeight: 0,
@@ -1644,8 +1644,8 @@
       },
       contractNoChange(e) {
         this.weighingList={
-          grossWeight: 0,
-          tare: 0,
+          grossWeight: '',
+          tare: '',
           buckleMiscellaneous: 0,
           netWeight: 0,
           weight: '',
@@ -1670,6 +1670,7 @@
           },
           inOutDate: ''
         }
+        this.weighingList.inOutTaskNo=e
         this.warehouseCount = this.warehouseCount1
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
@@ -1679,12 +1680,17 @@
             this.weighingList.goodsName = this.taskNolist[i].goodsName
             this.weighingList.tips = this.taskNolist[i].businessDescribe
             var data = this.taskNolist[i]
-            if (this.taskNolist[i].contractNo) {
-              // console.log(this.taskNolist[i])
-              this.weighingList.contractNo = this.taskNolist[i].contractNo
-            } else {
+            if(this.taskNolist[i].inOutType=='移库出库'){
               this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
+            }else{
+              if (this.taskNolist[i].contractNo) {
+                // console.log(this.taskNolist[i])
+                this.weighingList.contractNo = this.taskNolist[i].contractNo
+              } else {
+                this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
+              }
             }
+            
           }
         }
         if (!data) return

+ 2 - 1
src/views/profitable/cashout.vue

@@ -32,7 +32,7 @@
           </el-form-item>
           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="合同编号" span="1" prop="contractNo" class="readonly">
             <el-select v-model="deptBudgetList.contractNo" placeholder="选择合同" class="typeselect" @change="selectcontract">
-              <el-option v-for="item in contractList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"
+              <el-option v-for="item in contractList" :key="item.id" :label="item.contractNo" :value="item.contractNo"
                 style="color: #8890b1" />
             </el-select>
           </el-form-item>
@@ -626,6 +626,7 @@
       getList() {
         getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:2
         })
         .toPromise()
         .then((response) => {

+ 3 - 0
src/views/profitable/cashoutaduit.vue

@@ -227,6 +227,9 @@
         this.rejectshow=true
       },
       rejectclick(){
+        if(this.deptBudgetList.taskId){
+
+        }
         woekflowhandle({
           taskId: this.deptBudgetList.taskId,
           approved:false,

+ 2 - 2
src/views/profitable/contractprofits.vue

@@ -141,9 +141,9 @@
           for (let i = 0; i < response.formList.length; i++) {
             // response.formList[i]
             if( response.formList[i].type=='采购重量'){
-            this.deptBudgetList.cgweight=response.formList[i].profit.toFixed(4)
+            this.deptBudgetList.cgweight=response.formList[i].profit?response.formList[i].profit.toFixed(4):response.formList[i].profit
           }else if(response.formList[i].type=='销售重量'){
-            this.deptBudgetList.xsweight=response.formList[i].profit.toFixed(4)
+            this.deptBudgetList.xsweight=response.formList[i].profit?response.formList[i].profit.toFixed(4):response.formList[i].profit
           }else if(response.formList[i].type=='支付粮款'){
             this.deptBudgetList.zfweight=(response.formList[i].profit/10000).toFixed(4)
           }else if(response.formList[i].type=='收入粮款'){

+ 9 - 2
src/views/profitable/expensemanagementdetails.vue

@@ -139,7 +139,7 @@
         <div style='width:100%;justify-content: space-between;' class='flex'>
           <div style='width:33.333%;text-align:center;'>{{item.operateUser}}</div>
           <div style='width:33.333%;text-align:center;'>{{item.dealMsg}}</div>
-          <div style='width:33.333%;text-align:center;'>{{item.createDate}}</div>
+          <div style='width:33.333%;text-align:center;'>{{item.operateDate}}</div>
         </div>
         <div v-if='index<recordList.length-1' style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
         <div v-else style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
@@ -308,7 +308,14 @@
         this.$router.push({name:'receiptaduit',query:{id:row.id}})
       },
       aduit(row){
-        this.$router.push({name:'cashoutaduit',query:{id:row.id,taskId:row.taskId}})
+        if(row.taskId){
+          this.$router.push({name:'cashoutaduit',query:{id:row.id,taskId:row.taskId}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
       },
       allotaduit(row){
         localStorage.setItem('expenseqr',JSON.stringify(row.expenseAllocationInfoList))

+ 4 - 3
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -664,10 +664,11 @@ export default {
             }
           }
           if(this.dataList.sourceRelationInfoList){
+            if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
+                  this.goods=this.dataList.sourceId
+                }else 
               for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
-                if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
-                  this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsSource
-                }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+                if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
                   this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
                 }
               }

+ 93 - 24
src/views/taskManagement/outsupplyofgoods.vue

@@ -15,8 +15,10 @@
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
           <div style='width:50%;margin-right:10px;'>
-            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+            <!-- <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"> -->
+          <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" @change='datechange' :picker-options="pickerOptions">
         </el-date-picker>
   
           </div>
@@ -34,7 +36,10 @@
       </template>
     </BaseHeaderLayout>
     <el-row style='margin:10px;'>
-        <el-col :span="12">已选 10 条,合计出库重量  {{num}}吨,</el-col>
+        <el-col :span="12">
+          <span v-if='taskTypeKey==4'>移库编号:{{contractNo}}</span>
+          <span v-else>合同编号:{{contractNo}}</span> ,合计退库  {{num}}吨
+        </el-col>
         <el-col style='text-align:right;' :span="12">
             <ws-button type="primary" @click="preview()" v-hasPermission="
             `warehouseManagement.warehouse.warehouseInfoTask.add`
@@ -50,8 +55,8 @@
         </ws-button>
         </el-col>
     </el-row>   
-      <el-table class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
-          <el-table-column
+      <el-table ref='multipleTable' class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+        <el-table-column
       type="selection"
       width="55">
     </el-table-column>
@@ -181,7 +186,10 @@
         size: 10,
         spanArr: [],
         warehouseName: '',
+        multipleSelection:[],
         deptBudgetTotal: 0,
+        startDate:'',
+        endDate:'',
         compId: localStorage.getItem('ws-pf_compId'),
         deptCircularPage: {},
         historyList: [],
@@ -191,13 +199,18 @@
           },
         },
         accessoryTFs: false,
+        taskTypeKey:'',
+        contractNo:''
       }
     },
-    activated() {
-      this.getList()
-      this.showType = this.isShow
-    },
+    // activated() {
+    //   this.getList()
+    //   this.showType = this.isShow
+    // },
     mounted() {
+      this.contractNo=this.$route.query.contractNo
+      this.taskTypeKey=this.$route.query.taskTypeKey
+      this.value2=this.getNowTime()
       this.getList()
       this.showType = this.isShow
     },
@@ -212,10 +225,43 @@
           return true
         }
     },
+    getNowTime() {
+      const start = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
+    },
+    datechange(e){
+        this.value2=e
+        this.getList()
+        console.log(e)
+      },
       preview(){
         this.gainList=this.multipleSelection
+        var that=this
+            this.$nextTick(function(){
+              that.toggleSelection(this.gainList)
+            })
          this.deptBudgetTotal=this.multipleSelection.length
       },
+      toggleSelection(rows) {
+        
+      if (rows) {
+        rows.forEach(row => {
+          if(row.select){
+            this.$refs.multipleTable.toggleRowSelection(row,true);
+          }
+        });
+      } else {
+        this.$refs.multipleTable.clearSelection();
+      }
+    },
       cancelpreview(){
         this.getList()
       },
@@ -223,6 +269,8 @@
        handleSelectionChange(val) {
          this.num=0
          for (let i = 0; i < val.length; i++) {
+           val[i].select=true
+           val[i].returnTickFlag=1
           this.num+=Number(val[i].estimateOutWarehouseWeight);
          }
         this.multipleSelection = val;
@@ -240,14 +288,45 @@
       },
 
       getList() {
+        this.startDate=this.value2[0]
+        this.endDate=this.value2[1]
         getSourceOfGoodslist({
+            startDate:this.startDate,
+            endDate:this.endDate,
             compId: localStorage.getItem('ws-pf_compId'),
             contractNo:this.$route.query.contractNo
           })
           .toPromise()
           .then((response) => {
-            this.gainList = response
-            this.deptBudgetTotal = response.length
+            for (let i = 0; i < response.records.length; i++) {
+              response.records[i].goodsSource
+              if(response.records[i].sourceRelationInfoList){
+                response.records[i].goodsName=''
+                for (let q = 0; q < response.records[i].sourceRelationInfoList.length; q++) {
+                  if(response.records[i].goodsName.indexOf(response.records[i].sourceRelationInfoList[q].goodsName)==-1){
+                    response.records[i].goodsName=response.records[i].goodsName+response.records[i].sourceRelationInfoList[q].goodsName+','
+                  }
+                  response.records[i].goodsSource=response.records[i].goodsSource+response.records[i].sourceRelationInfoList[q].goodsSource+response.records[i].sourceRelationInfoList[q].goodsName+response.records[i].sourceRelationInfoList[q].surplusWeight+'吨、'
+                }
+              }
+              
+            }
+            var arr = response.records
+            if(this.multipleSelection.length>0){
+              for (let i = 0; i < arr.length; i++) {
+                for (let q = 0; q < this.multipleSelection.length; q++) {
+                  if(arr[i].id==this.multipleSelection[q].id){
+                    arr[i]=this.multipleSelection[q]
+                  }
+                }
+              }
+            }
+            this.gainList = arr
+            var that=this
+            this.$nextTick(function(){
+              that.toggleSelection(this.gainList)
+            })
+            this.deptBudgetTotal = response.total
           })
       },
       getSpanArr(data) {
@@ -300,22 +379,12 @@
             type: 'warning',
           })
           .then(() => {
-        // editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
-        //   .then((response) => {
-        //     this.$message({
-				// 	message: '提交成功',
-				// 	type: 'success'
-				// 	});
+            console.log(this.multipleSelection)
+            localStorage.setItem("supplygoodsstauts",1);
             localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
             localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection));
             that.$router.go(-1)
-          // }).catch((response) => {
-          //    this.$message({
-          //     message: '提交失败',
-          //     type: 'error'
-          //     }); 
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              // })
+
           })
       },
       returnsales(){

+ 63 - 16
src/views/taskManagement/outsupplyofgoodsedit.vue

@@ -34,7 +34,8 @@
       </template>
     </BaseHeaderLayout>
     <el-row style='margin:10px;'>
-        <el-col :span="12">已选 {{multipleSelection.length}} 条,合计出库重量  {{num}}吨,</el-col>
+        <el-col :span="12"> <span v-if='taskTypeKey==4'>移库编号:{{contractNo}}</span>
+          <span v-else>合同编号:{{contractNo}}</span> ,合计退库  {{num}}吨</el-col>
         <el-col style='text-align:right;' :span="12">
             <ws-button type="primary" @click="preview()" v-hasPermission="
             `warehouseManagement.warehouse.warehouseInfoTask.add`
@@ -50,7 +51,7 @@
         </ws-button>
         </el-col>
     </el-row>   
-      <el-table class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+      <el-table ref='multipleTable' class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
           <el-table-column
       type="selection"
       width="55">
@@ -61,19 +62,16 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="inOutTaskNo" label="车牌号" width="160"></el-table-column>
-        <el-table-column prop="contractNo" label="出库时间" width="160">
+        <el-table-column prop="carNo" label="车牌号" width="160"></el-table-column>
+        <el-table-column prop="issuingTime" label="出库时间" width="160">
         </el-table-column>
-        <el-table-column prop="warehouseName" class="table_td" label="净重(吨)"></el-table-column>
-        <el-table-column prop="inOutType" class="table_td" label="出货库"></el-table-column>
-        <el-table-column prop="goodsName" class="table_td" label="货源">
-          <template scope="scope">
-            <span v-for='item in scope.row.sourceRelationInfoList'>{{item.goodsSource}} {{item.goodsName}} {{item.surplusWeight}}吨、</span>
-          </template>
+        <el-table-column prop="estimateOutWarehouseWeight" class="table_td" label="净重(吨)"></el-table-column>
+        <el-table-column prop="warehouseName" class="table_td" label="出货库"></el-table-column>
+        <el-table-column prop="goodsSource" class="table_td" label="货源">
         </el-table-column>
       </el-table>
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
+      <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination> -->
   </div>
 </template>
 <script>
@@ -113,6 +111,7 @@
         dialogApproveFormVisible: false,
         // 船舶类型
         monetaryKey: null,
+        num:0,
         // 表格显示数据
         tableDate: [],
 
@@ -175,6 +174,7 @@
         searchKeyWord: '',
         inOutType:'',
         contractType: 2,
+        gainList1:[],
         // 提交类型
         submitType: true,
         size: 10,
@@ -186,6 +186,8 @@
         historyList: [],
         multipleSelection1:[],
         multipleSelection:[],
+        taskTypeKey:'',
+        contractNo:'',
         pickerBeginDateBefore: {
           disabledDate: (time) => {
             return time.getTime() > Date.now()
@@ -195,10 +197,14 @@
       }
     },
     activated() {
+      this.contractNo=this.$route.query.contractNo
+      this.taskTypeKey=this.$route.query.taskTypeKey
       this.getList()
       this.showType = this.isShow
     },
     mounted() {
+      this.contractNo=this.$route.query.contractNo
+      this.taskTypeKey=this.$route.query.taskTypeKey
       this.getList()
       this.showType = this.isShow
     },
@@ -214,15 +220,39 @@
         this.getList()
       },
       preview(){
-        this.gainList=this.multipleSelection
+       this.gainList=this.multipleSelection
+        var that=this
+            this.$nextTick(function(){
+              that.toggleSelection(this.gainList)
+            })
          this.deptBudgetTotal=this.multipleSelection.length
       },
       cancelpreview(){
         this.getList()
       },
+      toggleSelection(rows) {
+      if (rows) {
+        rows.forEach(row => {
+          if(row.returnTickFlag==1){
+            this.$refs.multipleTable.toggleRowSelection(row,true);
+          }
+        });
+      } else {
+        this.$refs.multipleTable.clearSelection();
+      }
+    },
        handleSelectionChange(val) {
+         for (let i = 0; i < this.gainList1.length; i++) {
+          this.gainList1[i].returnTickFlag=0
+          for (let q = 0; q < val.length; q++) {
+          if(this.gainList1[i].id==val[q].id){
+            this.gainList1[i].returnTickFlag=1
+          }
+          }
+         }
          this.num=0
          for (let i = 0; i < val.length; i++) {
+           val[i].select=true
           this.num+=val[i].outWeight;
          }
         this.multipleSelection = val;
@@ -240,7 +270,24 @@
       },
 
       getList() {
-        this.gainList = JSON.parse(this.$route.query.list)
+        var arr = JSON.parse(this.$route.query.list)
+        console.log(this.$route.query.list)
+            if(this.multipleSelection.length>0){
+              for (let i = 0; i < arr.length; i++) {
+                for (let q = 0; q < this.multipleSelection.length; q++) {
+                  if(arr[i].id==this.multipleSelection[q].id){
+                    arr[i]=this.multipleSelection[q]
+                  }
+                }
+              }
+            }
+            this.gainList = arr
+            this.gainList1 = JSON.parse(JSON.stringify(arr))
+            console.log(this.gainList)
+            var that=this
+            this.$nextTick(function(){
+              that.toggleSelection(this.gainList)
+            })
         this.deptBudgetTotal = this.gainList.length
         
       },
@@ -301,8 +348,8 @@
 				// 	message: '提交成功',
 				// 	type: 'success'
 				// 	});
-            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
-            localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection1));
+            localStorage.setItem("supplygoods",JSON.stringify(this.gainList1));
+            localStorage.setItem("supplygoods1",JSON.stringify(this.gainList1));
             that.$router.go(-1)
           // }).catch((response) => {
           //    this.$message({

+ 19 - 13
src/views/taskManagement/outsupplyofgoodslook.vue

@@ -13,15 +13,12 @@
 			</el-col>
 		</el-row>
     <el-row style='margin:10px;'>
-        <el-col :span="12">已选 10 条,合计出库重量  100吨,玉米(潮粮)50吨,玉米(机收)20吨,玉米 30吨</el-col>
+        <el-col :span="12"> <span v-if='taskTypeKey==4'>移库编号:{{contractNo}}</span>
+          <span v-else>合同编号:{{contractNo}}</span> ,合计退库  {{num}}吨</el-col>
         <el-col style='text-align:right;' :span="12">
         </el-col>
     </el-row>   
-      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
-          <el-table-column
-      type="selection"
-      width="55">
-    </el-table-column>
+      <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
         <el-table-column type="index" label="序号">
           <template scope="scope">
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -29,14 +26,12 @@
           </template>
         </el-table-column>
         <el-table-column prop="carNo" label="车牌号" width="160"></el-table-column>
-        <el-table-column prop="inOutDate" label="出库时间" width="160">
+        <el-table-column prop="updateDate" label="出库时间" width="160">
         </el-table-column>
-        <el-table-column prop="warehouseName" class="table_td" label="净重(吨)"></el-table-column>
-        <el-table-column prop="deliverywarehouse" class="table_td" label="出货库"></el-table-column>
+        <el-table-column prop="estimateOutWarehouseWeight" class="table_td" label="净重(吨)"></el-table-column>
+        <el-table-column prop="warehouseName" class="table_td" label="出货库"></el-table-column>
         <el-table-column prop="goodsSource" class="table_td" label="货源">
-          <template scope="scope">
-            <span v-for='item in scope.row.sourceRelationInfoList'>{{item.goodsSource}} {{item.goodsName}} {{item.surplusWeight}}吨、</span>
-          </template>
+          
         </el-table-column>
       </el-table>
       <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
@@ -83,7 +78,7 @@
         monetaryKey: null,
         // 表格显示数据
         tableDate: [],
-
+        num:0,
         // 是否显示
         showType: true,
         // 年
@@ -157,23 +152,33 @@
           },
         },
         accessoryTFs: false,
+        taskTypeKey:'',
+        contractNo:''
       }
     },
     activated() {
+      this.contractNo=this.$route.query.contractNo
+      this.taskTypeKey=this.$route.query.taskTypeKey
       this.getList()
       this.showType = this.isShow
     },
     mounted() {
+      this.contractNo=this.$route.query.contractNo
+      this.taskTypeKey=this.$route.query.taskTypeKey
       this.getList()
       this.showType = this.isShow
     },
     methods: {
       selectinOutType(){
         this.getList()
+      },
+      returnsales(){
+        this.$router.go(-1)
       },
        handleSelectionChange(val) {
         this.multipleSelection = val;
       },
+      
       //添加
       handleAdd() {
         this.$router.push({
@@ -188,6 +193,7 @@
       
       getList() {
         this.gainList = JSON.parse(this.$route.query.list)
+        console.log(this.gainList)
         this.deptBudgetTotal = this.gainList.length
         // getSourceOfGoods({
         //     compId: localStorage.getItem('ws-pf_compId'),

+ 42 - 6
src/views/taskManagement/supplyofgoods.vue

@@ -16,7 +16,7 @@
       <template slot="left">
           <div style='width:50%;margin-right:10px;'>
             <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+          start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" @change='datechange' :picker-options="pickerOptions">
         </el-date-picker>
   
           </div>
@@ -137,7 +137,9 @@
         flag:0,
         currentPage: 1,
         primary: '1',
-                pickerOptions: {
+        startDate:'',
+        endDate:'',
+        pickerOptions: {
           shortcuts: [{
               text: '本周',
               onClick(picker) {
@@ -217,6 +219,7 @@
       // this.showType = this.isShow
     // },
     mounted() {
+      this.value2=this.getNowTime()
       this.baseId=this.$route.query.baseId
       this.getList()
       this.showType = this.isShow
@@ -225,9 +228,30 @@
       selectinOutType(){
         this.getList()
       },
+      datechange(e){
+        this.value2=e
+        this.getList()
+        console.log(e)
+      },
+      getNowTime() {
+      const start = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
+    },
       preview(){
         this.gainList=this.multipleSelection
-        this.toggleSelection(this.gainList)
+        var that=this
+        this.$nextTick(function(){
+          that.toggleSelection(this.gainList)
+        })
+        
         this.deptBudgetTotal=this.multipleSelection.length
       },
       cancelpreview(){
@@ -310,10 +334,14 @@
           }
       },
       getList() {
+        this.startDate=this.value2[0]
+        this.endDate=this.value2[1]
          getSourceOfGoodsinfo({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
             pageSize: this.pageSize,
+            startDate:this.startDate,
+            endDate:this.endDate,
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
             // inOutType:this.inOutType,
@@ -322,8 +350,13 @@
           })
           .toPromise()
           .then((response) => {
+            for (let i = 0; i < response.records.length; i++) {
+              if(response.records[i].inType=='收购入库'){
+                response.records[i].surplusWeight=Number((response.records[i].surplusWeight/1000).toFixed(3))
+              }
+              
+            }
             var arr = response.records
-
             if(this.multipleSelection.length>0){
               for (let i = 0; i < arr.length; i++) {
                 for (let q = 0; q < this.multipleSelection.length; q++) {
@@ -332,10 +365,12 @@
                   }
                 }
               }
-
             }
             this.gainList = arr
-            this.toggleSelection(this.gainList)
+            var that=this
+            this.$nextTick(function(){
+              that.toggleSelection(this.gainList)
+            })
             this.deptBudgetTotal = response.total
           })
       },
@@ -390,6 +425,7 @@
 				// 	message: '提交成功',
 				// 	type: 'success'
 				// 	});
+        localStorage.setItem("supplygoodsstatus",0);
             localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
             localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection1));
             that.$router.go(-1)

+ 7 - 0
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -568,6 +568,13 @@ export default {
         if (this.contractNoList[i].contractNo == val) {
             this.deptBudgetList.goodsName = this.contractNoList[i].goodsName
             this.deptBudgetList.weight= this.contractNoList[i].weight
+            console.log(this.contractNoList[i])
+            if(this.contractNoList[i].inOutType){
+              this.deptBudgetList.sendWarehouse = this.contractNoList[i].sendWarehouse
+              this.deptBudgetList.receiveWarehouse = this.contractNoList[i].receiveWarehouse
+              this.sendWarehousechange(this.deptBudgetList.sendWarehouse)
+              this.sendWarehousechange1(this.deptBudgetList.receiveWarehouse)
+            }
         }
       }
     },

+ 6 - 5
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -49,7 +49,7 @@
             </div>
             <div
               v-if="
-                scope.row.inOutType != '移库入库' ||
+                scope.row.inOutType != '移库入库' &&
                 scope.row.inOutType != '移库出库'
               "
             >
@@ -63,7 +63,7 @@
         <el-table-column prop="weight" class="table_td" label="重量(吨)"></el-table-column>
         <el-table-column prop="predictDate" class="table_td" label="预计日期"></el-table-column>
         <el-table-column prop="publisher" class="table_td" label="发布者"></el-table-column>
-        <el-table-column prop="completedQuantity" class="table_td" label="已完成量">
+        <el-table-column prop="completedQuantity" class="table_td" label="已完成量(吨)">
           <template slot-scope="scope">
             {{scope.row.completedQuantity == 0 ? 0:scope.row.completedQuantity.toFixed(3)}}
           </template>
@@ -273,7 +273,7 @@
       this.showType = this.isShow
     },
     methods: {
-      rectify(){
+      rectify(row){
         this.$confirm('确定矫正出库任务重量并结束任务?', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -355,10 +355,11 @@
           .toPromise()
           .then((response) => {
             for (let i = 0; i < response.records.length; i++) {
-              if(response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='销售出库'&&response.records[i].completedQuantity<response.records[i].weight
+              // response.records[i].completedQuantity=response.records[i].completedQuantity/1000
+              if(response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='销售出库'&&response.records[i].taskTypeKey==1&&response.records[i].completedQuantity<response.records[i].weight
               ||response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='移库出库'&&response.records[i].completedQuantity<response.records[i].weight){
                 response.records[i].show=true
-              }else if(response.records[i].taskStatus=='已完成'&&response.records[i].inOutType=='销售出库'&&response.records[i].completedQuantity<response.records[i].weight
+              }else if(response.records[i].taskStatus=='已完成'&&response.records[i].inOutType=='销售出库'&&response.records[i].taskTypeKey==1&&response.records[i].completedQuantity<response.records[i].weight
                ||response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='移库出库'&&response.records[i].completedQuantity<response.records[i].weight){
                  response.records[i].show=true
               }else{

+ 103 - 30
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -74,7 +74,7 @@
 					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input @input="weightchange1" v-model="dataList.weight" placeholder="请输入重量(吨)"
+						<el-input disabled @input="weightchange1" v-model="dataList.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -154,13 +154,19 @@
 						</el-select>
 					</el-form-item>
 					<!-- 合同编号 -->
-					<el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
+					<el-form-item v-if="dataList1.taskTypeKey == 2" label="合同编号">
 						<el-select @change="changecontract1" v-model="dataList1.contractNo" placeholder="请输入合同编号"
 							class="typeselect" filterable clearable>
 							<el-option v-for="item in contractNoList1" :key="item.constKey" :label="item.contractNo"
 								:value="item.contractNo"></el-option>
 						</el-select>
 					</el-form-item>
+					<el-form-item v-if="dataList1.taskTypeKey == 4" label="移库任务编号">
+						<el-select v-model="dataList1.contractNo"  filterable clearable placeholder="请输入移库任务编号" class="typeselect">
+							<el-option v-for="item in contractNoList1" :key="item.constKey" :label="item.contractNo"
+								:value="item.contractNo"></el-option>
+						</el-select>
+					</el-form-item>
 					<el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
 						<el-select disabled v-model="dataList1.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect">
 							<el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
@@ -182,7 +188,7 @@
 					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
+						<el-input disabled @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -288,7 +294,7 @@
 					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input :disabled="dataList.taskTypeKey == 4" v-model="dataList.weight" placeholder="请输入重量(吨)"
+						<el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -423,6 +429,7 @@
 				disabled: false,
 				// 年
 				year: '',
+				inOutType:'',
 				contractNoList: [],
 				contractNoList1: [],
 				deptBudgetTotal: 0,
@@ -501,28 +508,50 @@
 		activated() {
 			this.getList()
 			var num=0
+			this.goods=''
 			this.sourceId=''
 			this.dataList.weight=0
 			this.dataList1.weight=0
+			if(localStorage.getItem("taskTypeKey")){
+				this.dataList.taskTypeKey=localStorage.getItem("taskTypeKey")
+				this.dataList1.taskTypeKey=localStorage.getItem("taskTypeKey")
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+					this.dataList.warehouseName=localStorage.getItem("warehouse")
+					this.dataList.contractNo=localStorage.getItem("contractNo")
+				}
+				else if(this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==4){
+					this.dataList1.warehouseName=localStorage.getItem("warehouse")
+					this.dataList1.contractNo=localStorage.getItem("contractNo")
+				}
+			}
 			if(localStorage.getItem("supplygoods1")){
 				if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList.taskTypeKey==4){
 					var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
 					for (let i = 0; i < supplygoods.length; i++) {
-						for (let q = 0; q < supplygoods[i].sourceRelationInfoList.length; q++) {
-							if(this.goods.indexOf(supplygoods[i].sourceRelationInfoList[q].goodsName)==-1){
-								this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].sourceRelationInfoList[q].goodsName
+						if(supplygoods[i].sourceRelationInfoList){
+							if(localStorage.getItem("supplygoodsstatus")&&localStorage.getItem("supplygoodsstatus")==1){
+							for (let q = 0; q < supplygoods[i].sourceRelationInfoList.length; q++) {
+								
+								if(this.goods.indexOf(supplygoods[i].sourceRelationInfoList[q].goodsName)==-1){
+									this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].sourceRelationInfoList[q].goodsName
+								}
+								this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
+							this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
+							}
 							}
-							this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
-						this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
 						}
+						console.log(this.goods)
 					}
 				}else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
 					var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
-					for (let i = 0; i < supplygoods.length; i++) {
-						this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
-						this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
-						this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
+					if(localStorage.getItem("supplygoodsstatus")&&localStorage.getItem("supplygoodsstatus")==0){
+						for (let i = 0; i < supplygoods.length; i++) {
+							this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
+							this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
+							this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
+						}
 					}
+					
 				}
 				
 			}
@@ -536,6 +565,9 @@
 			supplygoods(){
 				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
 					if(this.dataList.warehouseName){
+						localStorage.setItem("warehouse",this.dataList.warehouseName);
+						localStorage.setItem("contractNo",this.dataList.contractNo);
+            			localStorage.setItem("taskTypeKey",this.dataList.taskTypeKey);
 						this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
 					}else{
 						this.$message({
@@ -545,7 +577,10 @@
 					}
 				}else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==4){
 					if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
-						this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo}})
+						localStorage.setItem("warehouse",this.dataList1.warehouseName);
+						localStorage.setItem("contractNo",this.dataList1.contractNo);
+            			localStorage.setItem("taskTypeKey",this.dataList1.taskTypeKey);
+						this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo,taskTypeKey:this.dataList1.taskTypeKey}})
 					}else{
 						this.$message({
 							message: '请先选择合同/移库编号',
@@ -682,9 +717,12 @@
 				}
 			},
 			changecontract(e) {
+				
 				if (this.dataList.taskTypeKey != 3) {
 					for (let i = 0; i < this.contractNoList.length; i++) {
 						if (this.contractNoList[i].contractNo == e) {
+							console.log(this.contractNoList[i],11222)
+							this.inOutType=this.contractNoList[i].inOutType
 							if(this.contractNoList[i].priceType == '随行就市'){
 								this.Pricetype = false
 							}else{
@@ -715,6 +753,10 @@
 			},
 			selectwarehouseName(e) {
 				this.baseId=e
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==3){
+					this.goods=''
+					localStorage.removeItem('supplygoods1')
+				}
 				for (var i = 0; i < this.warehouseNameList.length; i++) {
 					if (this.warehouseNameList[i].id == e) {
 						this.dataList.warehouseName = this.warehouseNameList[i].warehouseName
@@ -746,6 +788,10 @@
 				}
 			},
 			selectwarehouseName1(e) {
+				if(this.dataList1.taskTypeKey==4){
+					this.goods=''
+					localStorage.removeItem('supplygoods1')
+				}
 				for (var i = 0; i < this.warehouseNameList.length; i++) {
 					if (this.warehouseNameList[i].id == e) {
 						this.dataList1.warehouseName = this.warehouseNameList[i].warehouseName
@@ -765,17 +811,17 @@
 			},
 			changecontract1(e) {
 				if (this.dataList1.taskTypeKey != 3) {
-					
-					for (let i = 0; i < this.contractNoList.length; i++) {
-						if (this.contractNoList[i].contractNo == e) {
-							if(this.contractNoList[i].priceType == '随行就市'){
+					for (let i = 0; i < this.contractNoList1.length; i++) {
+						if (this.contractNoList1[i].contractNo == e) {
+							this.inOutType=this.contractNoList1[i].inOutType
+							if(this.contractNoList1[i].priceType == '随行就市'){
 								this.Pricetype = false
 							}else{
 								this.Pricetype = true
 							}
 							getGoodsName({
-									contractId: this.contractNoList[i].id,
-									contractNo: this.contractNoList[i].contractNo
+									contractId: this.contractNoList1[i].id,
+									contractNo: this.contractNoList1[i].contractNo
 								})
 								.toPromise()
 								.then(response => {
@@ -1151,6 +1197,7 @@
 						})
 						return
 					}
+					this.dataList1.contractNo=''
 					if (!this.dataList1.moveTaskNo) {
 						this.$message({
 							message: '移库任务编号不能为空!',
@@ -1402,6 +1449,9 @@
 						return
 					}
 				}
+				localStorage.removeItem("warehouse")
+				localStorage.removeItem("contractNo");
+            	localStorage.removeItem("taskTypeKey");
 				// this.dataList.goodsNameKey =
 				// this.dataList.positionId =
 				// this.dataList.baseId =
@@ -1413,6 +1463,13 @@
 						data[i].sourceId=data[i].id
 					}
 				}else{
+					if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType){
+						this.$message({
+							message: '请选择货源!',
+							type: 'warning'
+						})
+						return
+					}
 					
 				}
 				var supplygoods=data
@@ -1606,16 +1663,32 @@
 			},
 			getList() {
 				this.tasknumber()
-				this.$set(this.dataList, 'inOutType', '销售出库')
-				this.$set(this.dataList, 'inOutTypeKey', '1')
-				this.$set(this.dataList, 'goodsName', '玉米')
-				this.$set(this.dataList, 'goodsNameKey', '1')
-				this.$set(this.dataList, 'grade', '一等品')
-				this.$set(this.dataList, 'gradeKey', '1')
-				this.$set(this.dataList1, 'goodsName', '玉米')
-				this.$set(this.dataList1, 'goodsNameKey', '1')
-				this.$set(this.dataList1, 'grade', '一等品')
-				this.$set(this.dataList1, 'gradeKey', '1')
+				if(localStorage.getItem("supplygoods1")){
+					if(this.dataList.taskTypeKey == 1){
+						this.$set(this.dataList, 'inOutType', '销售出库')
+						this.$set(this.dataList, 'inOutTypeKey', '1')
+						this.$set(this.dataList, 'goodsName', '玉米')
+						this.$set(this.dataList, 'goodsNameKey', '1')
+						this.$set(this.dataList, 'grade', '一等品')
+						this.$set(this.dataList, 'gradeKey', '1')
+						this.$set(this.dataList1, 'goodsName', '玉米')
+						this.$set(this.dataList1, 'goodsNameKey', '1')
+						this.$set(this.dataList1, 'grade', '一等品')
+						this.$set(this.dataList1, 'gradeKey', '1')
+					}
+				}else{
+					this.$set(this.dataList, 'inOutType', '销售出库')
+					this.$set(this.dataList, 'inOutTypeKey', '1')
+					this.$set(this.dataList, 'goodsName', '玉米')
+					this.$set(this.dataList, 'goodsNameKey', '1')
+					this.$set(this.dataList, 'grade', '一等品')
+					this.$set(this.dataList, 'gradeKey', '1')
+					this.$set(this.dataList1, 'goodsName', '玉米')
+					this.$set(this.dataList1, 'goodsNameKey', '1')
+					this.$set(this.dataList1, 'grade', '一等品')
+					this.$set(this.dataList1, 'gradeKey', '1')
+				}
+				
 				// 货名
 				pullDown({
 						constId: 'CON2'

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

@@ -587,9 +587,9 @@
 							type: 'warning'
 						});
 					}
-				}else if(this.dataList1.taskTypeKey==2&&dataList1.inOutType=='退库'||this.dataList1.taskTypeKey==3){
+				}else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'||this.dataList1.taskTypeKey==4){
 					if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
-						this.$router.push({name:'outsupplyofgoodslook',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
+						this.$router.push({name:'outsupplyofgoodslook',query:{list:JSON.stringify(this.dataList1.sourceRelationInfoList),contractNo:this.dataList1.contractNo,taskTypeKey:this.dataList1.taskTypeKey}})
 					}else{
 						this.$message({
 							message: '请先选择合同/移库编号',
@@ -813,8 +813,8 @@
               .toPromise()
               .then((response) => {
                 workflowcontent({
-                    workflowId: item.workflowId,
-                    businessKey: item.id,
+                    workflowId: list.workflowId,
+                    businessKey: list.id,
                     type: '出入库任务'
                   }).toPromise()
                   .then((response1) => {
@@ -1012,7 +1012,7 @@
             })
             .toPromise()
             .then((response) => {
-              console.log(response,22222)
+              // console.log(response,22222)
               if (response.length > 1) {
                 if (response[0].taskTypeKey == 3) {
                   if (response[0].inOutType == '移库出库') {
@@ -1042,11 +1042,12 @@
               }
               this.goods=''
             if(this.dataList.sourceRelationInfoList){
+              if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
+                  this.goods=this.dataList.sourceId
+                }
               for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
                 var supplygoods=this.dataList.sourceRelationInfoList
-                if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
-                  this.goods=this.dataList1.sourceId
-                }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+                if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
                   this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
                 }
               }

+ 61 - 29
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -66,12 +66,18 @@
         </div>
       </div>
       <div class="ding"></div>
-      <div
+      <!-- <div
         v-if="
           dataList.taskTypeKey == 1 ||
           (dataList.taskTypeKey == 3 && inOutFlag == 1)
         "
         class="center1"
+      > -->
+      <div
+        v-if="
+          dataList.taskTypeKey == 1 ||dataList.taskTypeKey == 3 
+        "
+        class="center1"
       >
         <img
           style="position: relative; top: 40px; left: 300px"
@@ -169,6 +175,7 @@
             style="margin-left: 350px; margin-top: -40px"
           >
             <el-input
+            disabled
               v-model="dataList.weight"
               placeholder="请输入重量(吨)"
               maxlength="120"
@@ -293,13 +300,21 @@
           </el-form-item>
         </el-form>
       </div>
-      <div
+      <!-- <div
         v-show="
           dataList.taskTypeKey == 2 ||
           dataList.taskTypeKey == 4 ||
           (dataList.taskTypeKey == 3 && inOutFlag == 2)
         "
         class="center1"
+      > -->
+      <div
+        v-show="
+          dataList.taskTypeKey == 2 ||
+          dataList.taskTypeKey == 4 ||
+          dataList.taskTypeKey == 3
+        "
+        class="center1"
       >
         <img
           style="position: relative; top: 40px; left: 300px"
@@ -410,6 +425,7 @@
             style="margin-left: 350px; margin-top: -40px"
           >
             <el-input
+              disabled
               @input="weightchange"
               v-model="dataList1.weight"
               placeholder="请输入重量(吨)"
@@ -631,7 +647,7 @@
             style="margin-left: 350px; margin-top: -40px"
           >
             <el-input
-              :disabled="dataList.taskTypeKey == 4"
+              disabled
               v-model="dataList.weight"
               placeholder="请输入重量(吨)"
               maxlength="120"
@@ -878,6 +894,18 @@ export default {
     this.dataList.weight = 0
     this.dataList1.weight = 0
     this.getList()
+    if(localStorage.getItem("taskTypeKey")){
+				this.dataList.taskTypeKey=localStorage.getItem("taskTypeKey")
+        this.dataList1.taskTypeKey=localStorage.getItem("taskTypeKey")
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+					this.dataList.warehouseName=localStorage.getItem("warehouse")
+					this.dataList.contractNo=localStorage.getItem("contractNo")
+				}
+				else if(this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==4){
+					this.dataList1.warehouseName=localStorage.getItem("warehouse")
+					this.dataList1.contractNo=localStorage.getItem("contractNo")
+				}
+		}
     var num = 0
     this.sourceId = ''
   },
@@ -894,10 +922,14 @@ export default {
     supplygoods() {
       if (this.dataList.taskTypeKey == 1 || this.dataList.taskTypeKey == 3) {
         if (this.dataList.warehouseName) {
+          localStorage.setItem("warehouse",this.dataList.warehouseName);
+					localStorage.setItem("contractNo",this.dataList.contractNo);
+          localStorage.setItem("taskTypeKey",this.dataList.taskTypeKey);
           this.$router.push({
             name: 'supplyofgoodsedit',
             query: {
-              list: JSON.stringify(this.dataList.sourceRelationInfoList),
+              list: JSON.stringify(this.dataList1.sourceRelationInfoList),
+              
             },
           })
         } else {
@@ -908,13 +940,18 @@ export default {
         }
       } else if (
         (this.dataList1.taskTypeKey == 2 && dataList1.inOutType == '退库') ||
-        this.dataList1.taskTypeKey == 3
+        this.dataList1.taskTypeKey == 4
       ) {
         if (this.dataList1.moveTaskNo || this.dataList1.contractNo) {
+          localStorage.setItem("warehouse",this.dataList1.warehouseName);
+					localStorage.setItem("contractNo",this.dataList1.contractNo);
+          localStorage.setItem("taskTypeKey",this.dataList1.taskTypeKey);
           this.$router.push({
             name: 'outsupplyofgoodsedit',
             query: {
-              list: JSON.stringify(this.dataList.sourceRelationInfoList),
+              list: JSON.stringify(this.dataList1.sourceRelationInfoList),
+              contractNo:this.dataList1.contractNo,
+              taskTypeKey:this.dataList1.taskTypeKey
             },
           })
         } else {
@@ -1097,6 +1134,9 @@ export default {
     },
     //提交按钮
     submit() {
+      localStorage.removeItem("warehouse")
+			localStorage.removeItem("contractNo");
+      localStorage.removeItem("taskTypeKey");
       this.dataList.inOutFlag = 1
       this.dataList1.inOutFlag = 2
       var supplygoods = JSON.parse(localStorage.getItem('supplygoods'))
@@ -1383,6 +1423,7 @@ export default {
         this.dataList.taskTypeKey == 3 ||
         this.dataList.taskTypeKey == 4
       ) {
+        this.dataList1.moveTaskNo=this.dataList1.contractNo
         if (!this.dataList.warehouseName) {
           this.$message({
             message: '出库仓库名不能为空!',
@@ -1704,10 +1745,11 @@ export default {
           .toPromise()
           .then((response) => {
             if (response.length > 1) {
+              console.log(122222)
               this.dataList = response[0]
               this.dataList1 = response[1]
 
-              console.log(this.dataList1.inOutTaskNo, '入库任务')
+              // console.log(this.dataList1.inOutTaskNo, '入库任务')
             } else {
               if (response[0].taskTypeKey == 3) {
                 this.deletetask = true
@@ -1750,37 +1792,27 @@ export default {
                   this.dataList1.inOutType == '退库') ||
                 this.dataList.taskTypeKey == 4
               ) {
-                var supplygoods = JSON.parse(
-                  localStorage.getItem('supplygoods1')
-                )
+                var supplygoods = JSON.parse(localStorage.getItem('supplygoods1'))
                 for (let i = 0; i < supplygoods.length; i++) {
-                  for (
-                    let q = 0;
-                    q < supplygoods[i].sourceRelationInfoList.length;
-                    q++
-                  ) {
-                    if (
-                      this.goods.indexOf(
-                        supplygoods[i].sourceRelationInfoList[q].goodsName
-                      ) == -1
-                    ) {
-                      this.goods =
-                        this.goods != ''
-                          ? this.goods + ','
-                          : '' +
-                            supplygoods[i].sourceRelationInfoList[q].goodsName
+                    var goods=supplygoods[i].goodsName.split(',')
+                    for (let q = 0; q < goods.length; q++) {
+                      if (this.goods.indexOf(goods[q]) == -1&&goods[q]!='') {
+                        this.goods =this.goods != ''? this.goods + ',': '' + supplygoods[i].goodsName
+                      }
                     }
-                    this.dataList1.weight =
+                    if(supplygoods[i].returnTickFlag==1){
+                      this.dataList1.weight =
                       Number(this.dataList1.weight) +
                       Number(
-                        supplygoods[i].sourceRelationInfoList[q].surplusWeight
+                        supplygoods[i].estimateOutWarehouseWeight
                       )
                     this.dataList.weight =
                       Number(this.dataList.weight) +
                       Number(
-                        supplygoods[i].sourceRelationInfoList[q].surplusWeight
+                        supplygoods[i].estimateOutWarehouseWeight
                       )
-                  }
+                    }
+                    
                 }
               } else if (
                 this.dataList.taskTypeKey == 1 ||

+ 4 - 4
src/views/warehousenew/inventoryCheck.vue

@@ -43,7 +43,7 @@
     </el-row>
     <div v-for='(item,index) in gainList' style='margin:10px;border:1px solid #ccc;padding:10px;'>
       <div style='width:100%;justify-content:space-between;align-items:center;margin-bottom:10px;' class="flex">
-        <div>2022-10-22</div>
+        <div>{{item.issuingTime}}</div>
         <div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
         <div>
           <ws-button type="primary" @click="profit(item.warehouseName)" v-hasPermission="
@@ -75,7 +75,7 @@
         <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
         <el-table-column prop="goodsName" label="货名" width="80">
         </el-table-column>
-        <el-table-column prop="inWarehouseWeight"  width="130" class="table_td" label="入库重量(吨)"></el-table-column>
+        <el-table-column prop="inWarehouseWeight1"  width="130" class="table_td" label="入库重量(吨)"></el-table-column>
         <el-table-column prop="outWarehouseWeight"  width="130" class="table_td" label="出库重量(吨)"></el-table-column>
         <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)">
            <template slot-scope="scope">
@@ -597,10 +597,10 @@
               var data=response.records[i].warehousingOrderList
               for (let q = 0; q < data.length; q++) {
                 if(data[q].inType=='收购入库'){
-                  data[q].inWarehouseWeight=Number((data[q].inWarehouseWeight/1000).toFixed(3))
+                  data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
                 }
                 data[q].select=false
-                data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
+                data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
                 data[q].weightedit=false
                 data[q].warehouseType=response.records[i].warehouseType
               }

+ 3 - 1
src/views/warehousenew/warehouseManagementEdit.vue

@@ -604,7 +604,8 @@
           })
           return
         }
-        for (
+        if(this.deptBudgetList.warehousePositionInfoList){
+          for (
           var i = 0; i < this.deptBudgetList.warehousePositionInfoList.length; i++
         ) {
           for (
@@ -626,6 +627,7 @@
             }
           }
         }
+        }
         this.$refs.deptBudgetList.validate((valid) => {
           if (valid) {
             this.deptBudgetList.warehousePrivate =

+ 133 - 81
src/views/warehousenew/warehousingOrder.vue

@@ -24,13 +24,14 @@
     </BaseHeaderLayout>
     <el-row style='margin:10px;'>
         <el-col :span="12">
-             <ws-button :type="searchType===''?'primary':''" @click="handleAdd()" v-hasPermission="
-            `warehouseManagement.warehousingOrder.View`
-          ">全部
+             <ws-button :type="searchType===''?'primary':''" @click="handle('')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`">全部
         </ws-button>
-         <ws-button :type="searchType==='1'?'primary':''" @click="handleAdd()" v-hasPermission="
-            `warehouseManagement.warehousingOrder.View`
-          ">未付款
+         <ws-button :type="searchType==='1'?'primary':''" @click="handle('1')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`">未付款
+        </ws-button>
+        <ws-button :type="searchType==='2'?'primary':''" @click="handle('2')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`">待审核
         </ws-button>
         </el-col>
         <el-col style='text-align:right;' :span="12">
@@ -67,7 +68,7 @@
         </ws-button>
         </div>
       </div>
-      <el-table class="wenzi" :data="item.warehousingOrderList" style="width: 100%"  @selection-change="handleSelectionChange" >
+      <el-table class="wenzi" :data="item.warehousingOrderList" style="width: 100%"  @selection-change="handleSelectionChange($event,item)" >
           <el-table-column
           :selectable='selectInit'
       type="selection"
@@ -83,13 +84,13 @@
         <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
         <el-table-column prop="goodsName" label="货名" width="80">
         </el-table-column>
-        <el-table-column prop="inWarehouseWeight"  width="200" class="table_td" label="入库重量(吨)">
+        <el-table-column prop="inWarehouseWeight1"  width="200" class="table_td" label="入库重量(吨)">
           <template scope="scope">
-            <span v-if='!scope.row.weightedit&&scope.row.warehouseType==2||scope.row.warehouseType==1'>{{scope.row.inWarehouseWeight}}</span>
-            <el-input style='width:80%;' v-if='scope.row.weightedit&&scope.row.warehouseType==2' v-model='scope.row.inWarehouseWeight'></el-input>
+            <span v-if='scope.row.weightedit==false&&scope.row.warehouseType==2||scope.row.warehouseType==1'>{{scope.row.inWarehouseWeight1}}</span>
+            <el-input style='width:80%;' v-if='scope.row.weightedit&&scope.row.warehouseType==2' v-model='scope.row.inWarehouseWeight1'></el-input>
             <i @click="changeWeight(scope.row)" v-if="
-                scope.row.weightedit&&scope.row.weightshow" class="iconfont icon-dui"></i>
-            <img v-if="!scope.row.weightedit&&scope.row.weightshow" width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                scope.row.weightedit&&scope.row.warehouseType==2" class="iconfont icon-dui"></i>
+            <img v-if="!scope.row.weightedit&&scope.row.warehouseType==2" width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editWeight(scope.row)" alt="" />
           </template>
         </el-table-column>
@@ -111,7 +112,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="avgCost"  width="130" class="table_td" label="平均成本(元/吨)"></el-table-column>
-        <el-table-column prop="requestFunds"  width="130" class="table_td" label="请款">
+        <el-table-column prop="requestFunds"  width="180" class="table_td" label="请款">
           <template scope="scope">
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <el-input v-else v-model='scope.row.requestFunds'></el-input>
@@ -202,13 +203,14 @@
     getoreditoutput,
     outdelete,
     movestates,
-    woekflowhandle
+    // woekflowhandle
   } from '@/model/tasksport/index'
   import {
   getwarehousingorder,
   paymoney,
   editwarehousingorder,
-  getexenseinfo
+  getexenseinfo,
+  workflowhandle
 } from '@/model/warehouse/index'
   import {
     downloadFile
@@ -326,6 +328,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         compId: localStorage.getItem('ws-pf_compId'),
         historyList: [],
         money:0,
+        multipleSelection1:{},
         aduitshow:false,
         costlist:[],
         pickerBeginDateBefore: {
@@ -349,14 +352,35 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       fujian(row) {
         this.id = row.id
         this.accessoryTFs = true
-        this.appendixIdss = row.addressUrl.split(',')
+        if(row.addressUrl.split(',')){
+          var arr=row.addressUrl.split(',')
+          this.dataList=[]
+          for(var i=0;i<arr.length;i++){
+            this.dataList.push({url:arr[i]})
+          }
+          this.appendixIdss=arr
+          this.paymentScreenshot=arr
+        }
+        
         console.log(this.appendixIdss)
       },
+      handle(status){
+        this.searchType=status
+        this.getList()
+      },
       selectinOutType(){
         this.getList()
       },
-       handleSelectionChange(val) {
-         this.multipleSelection=this.noRepeat(this.multipleSelection.concat(val))
+       handleSelectionChange(val,item) {
+         console.log(val,item)
+         for (let i = 0; i < val.length; i++) {
+           if(!item.payshow){
+              val[i].select=true
+           }
+          }
+          this.multipleSelection1[item.id]=val
+        //  this.multipleSelection=this.noRepeat(this.multipleSelection.concat(val))
+        //  console.log(this.multipleSelection)
       },
       noRepeat(arr){
  
@@ -369,7 +393,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         row.weightedit=true
       },
       changeWeight(row){
-        if(row.inWarehouseWeight<row.outWarehouseWOOeight){
+        if(row.inWarehouseWeight1<row.outWarehouseWeight){
           this.$message({
             message: '入库量不能小于出库量',
             type: 'warning'
@@ -382,7 +406,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             type: 'warning',
           })
           .then(() => {
-            editwarehousingorder({id:row.id,inWarehouseWeight:row.inWarehouseWeight}).toPromise()
+            editwarehousingorder({id:row.id,inWarehouseWeight:row.inWarehouseWeight1*1000}).toPromise()
               .then((response) => {
                 // row.weightedit=false
                 this.getList()
@@ -390,21 +414,29 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           })
       },
       payout(item){
-        console.log(item)
-        if(this.multipleSelection.length>0){
-          item.payshow=false
-          for (let i = 0; i < this.multipleSelection.length; i++) {
-            if(item.warehouseName==this.multipleSelection[i].warehouseName){
-              this.multipleSelection[i].select=true
+        // console.log(item)
+        if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
+          if(this.multipleSelection1[item.id].length>0){
+            item.payshow=false
+            for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
+              if(item.warehouseName==this.multipleSelection1[item.id][i].warehouseName){
+                this.multipleSelection1[item.id][i].select=true
+              }
             }
+          }else{
+            this.$message({
+              message: '至少选择一条待请款条目!',
+              type: 'warning'
+            });
           }
         }else{
           this.$message({
-            message: '至少选择一条待请款条目',
-            type: 'warning'
-          });
+              message: '暂无此权限!',
+              type: 'warning'
+            });
         }
         
+        
       },
       getNowTime() {
       const start = new Date(new Date().getTime() - 3600 * 1000 * 24 )
@@ -420,9 +452,10 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
     },
       cancel(item){
         item.payshow=true
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-            if(item.warehouseName==this.multipleSelection[i].warehouseName){
-              this.multipleSelection[i].select=false
+        console.log(this.multipleSelection1[item.id])
+        for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
+            if(item.warehouseName==this.multipleSelection1[item.id][i].warehouseName){
+              this.multipleSelection1[item.id][i].select=false
             }
           }
       },
@@ -468,16 +501,14 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       handleRemove(file) {
         // console.log(file)
         for (let i = 0; i < this.paymentScreenshot.length; i++) {
-          if(this.paymentScreenshot[i]==response.url){
+          if(this.paymentScreenshot[i]==file.url){
             this.paymentScreenshot.splice(i, 1)
           }
           
         }
       },
       submit(item){
-        var arr1=this.multipleSelection.filter(function(items,index){
-                  return item.warehouseName==items.warehouseName
-                })
+        var arr1=this.multipleSelection1[item.id]
         for (let i = 0; i < arr1.length; i++) {
           if(!arr1[i].requestFunds){
             this.$message({
@@ -501,6 +532,11 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
         }
+        // for (let i = 0; i < arr1.length; i++) {
+        //   if(arr[i].inType=='收购入库'){
+        //     arr[i].inWarehouseWeight=arr[i].inWarehouseWeight*1000
+        //   }
+        // }
             this.$confirm('确认提交请款信息', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -524,11 +560,11 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return false
           })
       },
-      paymentsubmit(){
+      paymentsubmit(item){
+        // console.log(item.id)
         var that=this
-        var arr2=this.multipleSelection.filter(function(items,index){
-          return that.currectdata.warehouseName==items.warehouseName
-        })
+        console.log(this.multipleSelection1,this.multipleSelection1[this.currectdata.id])
+        var arr2=this.multipleSelection1[this.currectdata.id]
           if(this.paymentScreenshot.length==0){
             this.$message({
               message: '请上传付款截图',
@@ -536,11 +572,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
+          console.log(arr2)
           for (let i = 0; i < arr2.length; i++) {
-            arr2[i].addressUrl=arr2[i].addressUrl+this.paymentScreenshot.toString()
+            arr2[i].addressUrlArray=arr2[i].addressUrlArray.concat(this.paymentScreenshot)
+            arr2[i].addressUrl=arr2[i].addressUrlArray.toString()
             
           }
-            paymoney({flag:0,warehousingOrderList:arr2}).toPromise()
+          paymoney({flag:0,warehousingOrderList:arr2}).toPromise()
           .then((response) => {
             this.$message({
               message: '付款成功',
@@ -548,7 +586,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             this.aduitshow=false
             this.paymentScreenshot=[]
-            this.$refs.upload.clearFiles()
+            this.$refs.uploadfiles.clearFiles()
             this.getList()
           }).catch(() => {
            this.$message({
@@ -556,46 +594,45 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               type: 'warning'
             });
           })
-  
       },
       payment(item){
-        this.money=0
-        var moneyarr=this.multipleSelection.filter(function(items,index){
-          return item.warehouseName==items.warehouseName
-        })
-        console.log(moneyarr)
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-         if(this.multipleSelection[i].warehouseName==item.warehouseName){
-           this.money=Number(this.money)+Number(this.multipleSelection[i].requestFunds)
-           if(this.multipleSelection[i].approveStatus!==null){
-             this.$message({
-              message: '请勾选一条待付款的条目',
-              type: 'warning'
-            })
-            return
-           }
-         }
-        }
-        this.form.name=this.money
-        this.currectdata=item
-        if(moneyarr&&moneyarr.length>0){
-          this.aduitshow=true
-        }else{
-          this.$message({
-              message: '至少勾选一条待付款的条目',
-              type: 'warning'
-            })
+        if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+          this.money=0
+          var moneyarr=this.multipleSelection1[item.id]
+          console.log(moneyarr)
+          for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
+          if(this.multipleSelection1[item.id][i].warehouseName==item.warehouseName){
+            if(this.multipleSelection1[item.id][i].addressUrl){
+              this.multipleSelection1[item.id][i].addressUrlArray=this.multipleSelection1[item.id][i].addressUrl.split(',')
+            }
+            this.money=Number(this.money)+Number(this.multipleSelection1[item.id][i].requestFunds)
+            if(this.multipleSelection1[item.id][i].approveStatus!==null||this.multipleSelection1[item.id][i].requestFunds==0){
+              this.$message({
+                message: '请勾选一条待付款的条目',
+                type: 'warning'
+              })
+              return
+            }
+          }
+          }
+          
+          this.form.name=this.money
+          this.currectdata=item
+          if(moneyarr&&moneyarr.length>0){
+            this.aduitshow=true
+          }else{
+            this.$message({
+                message: '至少勾选一条待付款的条目',
+                type: 'warning'
+              })
+          }
         }
-        
-        
       },
       aduit(row){
-        var arr2=this.multipleSelection.filter(function(items,index){
-          return row.warehouseName==items.warehouseName
-        })
+        var arr2=this.multipleSelection1[row.id]
         // console.log(arr2)
         if(arr2.length==0){
-          if(localStorage.getItem('ws-pf_roleName')=='采购副总'){
+          if(localStorage.getItem('ws-pf_staffName')=='杜大光'){
             this.$message({
               message: '至少选择一条待决策人审核的条目',
               type: 'eroor'
@@ -617,24 +654,35 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
-          
+          if(!arr2[i].taskId){
+            this.$message({
+              message: '至少选择一条待审核的条目',
+              type: 'eroor'
+            });
+            return
+          }
         }
         var arr3=this.filtertask(arr2)
           this.$confirm('审核请款信息', {
             confirmButtonText: '通过',
             cancelButtonText: '驳回',
+            distinguishCancelAndClose:true,
             type: 'warning',
           })
           .then(() => {
             
             this.aduithandle(arr3,0,true)
-          }).catch(() => {
+          }).catch((action) => {
+          console.log(action)
+          if(action=='cancel'){
             this.aduithandle(arr3,0,false)
+          }
+            
           })       
       },
       aduithandle(item,index,status){
         if(index<item.length){
-          woekflowhandle({
+          workflowhandle({
                 taskId: item[index].taskId,
                 approved:status,
                 auditMind: '34',
@@ -704,10 +752,14 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               var data=response.records[i].warehousingOrderList
               for (let q = 0; q < data.length; q++) {
                 if(data[q].inType=='收购入库'){
-                  data[q].inWarehouseWeight=Number((data[q].inWarehouseWeight/1000).toFixed(3))
+                  data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
+                   data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
+                }else{
+                  data[q].inWarehouseWeight1=data[q].inWarehouseWeight.toFixed(3)
+                  data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
                 }
+                console.log(response.records[i].warehouseType)
                 data[q].select=false
-                data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
                 data[q].weightedit=false
                 data[q].warehouseType=response.records[i].warehouseType
               }