Forráskód Böngészése

付款管理页码缓存

gjy 3 éve
szülő
commit
95317e1091

BIN
public/img/duihao@2x.png


BIN
public/img/saoma.png


BIN
public/img/wxz.png


BIN
public/img/xz.png


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

@@ -52,4 +52,8 @@ export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
 // 货源提交
 export const API_EDIT_SOURCEOFGOODS = '/warehousingOrder/editSourceOfGoods'
 // 货源查看
-export const API_GET_SOURCEGOOD = 'warehousingOrder/getSourceOfGoodsList'
+export const API_GET_SOURCEGOOD = 'warehousingOrder/getSourceOfGoodsList'
+// 退库货源列表
+export const API_GET_SOURCEOFGOODS = '/warehousingOrder/getSourceOfGoodsList'
+// 矫正
+export const API_SET_CORRECT= '/inOutWarehouseTask/api/correct'

+ 1 - 1
src/layout/index/index.vue

@@ -54,7 +54,7 @@
         //刷新token锁
         refreshLock: false,
         //刷新token的时间
-        refreshTime: ''
+        refreshTime: '',  
       };
     },
     created() {

+ 0 - 2
src/model/supply/index.js

@@ -292,8 +292,6 @@ export const sparepartOutStoreInfoCancelBill = appRx.post(API_POST_SUPPLYSPAREPA
 export const selectParameterStatus = appRx.get(API_GET_PURCHASEPARAMETERSTATUS_SELECTLIST, errorCatcher, errorHandle, filter)
 // 根据公司ID获取船舶数据
 export const getAppShips = appRx.get(API_GET_VESSEL_GETUSERVESSELLISTBYSTATUS, errorCatcher, errorHandle, filter)
-// 获取物料类型
-export const getMaterielType = appRx.get(API_GET_SUPPLYMATERIELTYPEINFO_SELECTLISTMATERIELTYPE, errorCatcher, errorHandle, filter)
 // 船载物料 -> 分页查询
 export const selectMaterielPartInfoPage = appRx.get(API_GET_SUPPLYMATERIELPARTINFO_SELECTPAGE, errorCatcher, errorHandle, filter)
 // 设备管理 -> 设备管理-删除

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

@@ -28,7 +28,8 @@ import {
     API_POST_WORKFLOW_TASK,
     API_EDIT_SOURCEOFGOODS,
     API_GET_SOURCEGOOD,
-    API_SET_CORRECT
+    API_SET_CORRECT,
+    API_GET_SOURCEOFGOODS
 } from '@/api/V2/taskspost'
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -82,5 +83,7 @@ export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filt
 export const editSourceOfGoods = appRx.post(API_EDIT_SOURCEOFGOODS, errorCatcher, errorHandle, filter)
 //货源查看
 export const getSourceOfGoods = appRx.get(API_GET_SOURCEGOOD, errorCatcher, errorHandle, filter)
+// 退库货源列表
+export const getSourceOfGoodslist = appRx.get(API_GET_SOURCEOFGOODS, errorCatcher, errorHandle, filter)
 //矫正
 export const setcorrect = appRx.get(API_SET_CORRECT, errorCatcher, errorHandle, filter)

+ 11 - 3
src/views/houseSelfCollect/paymentManagement.vue

@@ -248,7 +248,7 @@
     </el-dialog>
     <div style="text-align: center">
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" :page-size="pageSize"  layout="total, sizes, prev, pager, next, jumper"
         :total="deptBudgetTotal"></el-pagination>
       <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint"
         :title="printData.compName + '结算凭证'">
@@ -479,7 +479,9 @@
     },
     mounted() {
       this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
-
+      this.currentPage = sessionStorage.getItem('currenPage') || 1;
+      this.pageSize =Number(sessionStorage.getItem('pageSize') ) || 1;
+      console.log( this.currentPage,this.pageSize)
       this.getPassYearFormatDate()
       this.getWarehouse()
     },
@@ -708,6 +710,7 @@
           this.filesToRar(arr, '结算单文件')
         }
       },
+      
       async exportlist() {
         let _data = {
           paymentManagementList: this.modification,
@@ -1257,6 +1260,10 @@
           }
         
       },
+      detailpage(){
+          sessionStorage.setItem('currentPage',this.currentPage)
+          sessionStorage.setItem('pageSize',this.pageSize)
+        },
       getList() {
         for (let _temp = 0; _temp < this.warehouseList.length; _temp++) {
           if (this.warehouseName == this.warehouseList[_temp].warehouseName) {
@@ -1281,7 +1288,7 @@
           startDate = this.value2[0] ? this.value2[0] : ''
           endDate = this.value2[1] ? this.value2[1] : ''
         }
-
+        
         getpayment({
             currentPage: this.currentPage,
             pageSize: this.pageSize,
@@ -1348,6 +1355,7 @@
         this.getList()
       },
       settlement(index, row) {
+        this.detailpage()
         if (row.goodsName) {
           localStorage.setItem('paymentManagementReturn', false)
           this.$router.push({

+ 8 - 6
src/views/houseSelfCollect/settlement.vue

@@ -699,16 +699,18 @@
         this.isShowPrint = false
         this.paymentList = []
         localStorage.setItem('paymentManagementReturn', true)
-        this.$router.push({
-          path: 'paymentManagement'
-        })
+        // this.$router.push({
+        //   path: 'paymentManagement'
+        // })
+        this.$router.go(-1)
       },
       closePrint() {
         this.isShowPrint = false
         localStorage.setItem('paymentManagementReturn', true)
-        this.$router.push({
-          path: 'paymentManagement'
-        })
+        // this.$router.push({
+        //   path: 'paymentManagement'
+        // })
+        this.$router.go(-1)
       },
     },
   }

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

@@ -217,6 +217,12 @@
     },
     methods: {
       selectwarehouse(e){
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if(this.warehouseList[i].warehouseName==e){
+            this.deptBudgetList.warehouseId=this.warehouseList[i].id
+          }
+          
+        }
       },
       disabledDate() {
         let that = this
@@ -344,6 +350,7 @@
         for (let i = 0; i < this.contractList.length; i++) {
           console.log(this.contractList[i])
           if(this.contractList[i].contractNo==e){
+            this.deptBudgetList.contractId=this.contractList[i].id
             this.signingDate=this.contractList[i].signingDate
             // this.disabledDate()
           }
@@ -522,7 +529,7 @@
               })
               return
         }
-        if(!this.deptBudgetList.warehouse&&this.deptBudgetList.expensesPurpose==3){
+        if(!this.deptBudgetList.warehouseName&&this.deptBudgetList.expensesPurpose==3){
           this.$message({
                 message: '仓库名称不能为空!',
                 type: 'warning',

+ 3 - 1
src/views/profitable/expensemanagement.vue

@@ -148,6 +148,9 @@
     },
     methods: {
       getList() {
+        this.monthlist=[]
+        this.incomelist=[]
+        this.expenditurelist=[]
         getexpensechat({
          compId:localStorage.getItem('ws-pf_compId'),
          year:this.year
@@ -224,7 +227,6 @@
 
       },
       initCharts() {
-        console.log(this.monthlist)
         let app = this;
         let myChart7 = app.$echarts.init(this.$refs.myEchart7);
         var option;

+ 7 - 7
src/views/profitable/expensemanagementdetails.vue

@@ -80,28 +80,28 @@
           <el-table-column prop="status" label="费用状态">
             <template slot-scope="scope">
               <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span><span v-else>{{scope.row.status}}</span>
-              <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
+              <i v-if='scope.row.approveStatus' @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
             </template>
           </el-table-column>
           <el-table-column prop="address" label="操作" width="500">
             <template slot-scope="scope">
               <el-button @click="look(scope.row)" type="primary">查看</el-button>
-              <el-button @click="shoukuanqueren(scope.row)" type="primary">确认</el-button>
+              <el-button v-if='scope.row.approveStatus=="待确认"&&scope.row.expensesType==1' @click="shoukuanqueren(scope.row)" type="primary">确认</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="待确认"' @click="accomplish(scope.row)" type="primary">完成</el-button> -->
               <el-button v-if='scope.row.expensesPurpose==1&&scope.row.approveStatus=="已收款"||scope.row.expensesPurpose==1&&scope.row.approveStatus=="已付款"' @click="accomplish(scope.row)" type="primary">完成</el-button>
-              <el-button  @click="expenseedit(scope.row)" type="primary">编辑</el-button>
+              <el-button  v-if='scope.row.approveStatus=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button>
               <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
               <el-button v-if='scope.row.distributionStatus=="未完成"&&scope.row.allocatedAmount>0' @click="allot(scope.row)" type="primary">分配</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
-              <el-button @click="del(0,scope.row)" type="primary">删除</el-button>
-              <el-button @click="aduit(scope.row)" type="primary">审核</el-button>
-              <el-button @click="payment(scope.row)" type="primary">付款</el-button>
+              <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button>
+              <el-button v-if='scope.row.taskId' @click="aduit(scope.row)" type="primary">审核</el-button>
+              <el-button v-if='cope.row.expensesType==2&&scope.row.approveStatus=="已付款"' @click="payment(scope.row)" type="primary">付款</el-button>
             </template>
           </el-table-column>
           <el-table-column prop="expenseRemarks" label="分配状态">
             <template slot-scope="scope">
               <span>{{scope.row.distributionStatus}}</span>
-              <el-tooltip class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
+              <el-tooltip v-if='scope.row.rejectionReason' class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
                 <i class="el-icon-question"></i>
               </el-tooltip>
               

+ 0 - 10
src/views/supply/materiel/apply/components/addAppBasicInfo.vue

@@ -80,7 +80,6 @@
 </template>
 
 <script>
-import { getMaterielType } from '@/model/supply/index'; // 公用api接口
 import typeSelectionBox from '@/views/supply/components/typeSelectionBox'; // 下拉框
 import shipsSelectionBox from '@/views/supply/components/shipsSelectionBox'; // 下拉框
 import { EventBus } from 'base-core-lib'
@@ -168,15 +167,6 @@ export default {
   methods: {
     // 页面数据初始化
     pageInit () {
-      // 物料类型
-      getMaterielType()
-        .toPromise()
-        .then(succ => {
-          this.shipList = succ;
-        })
-        .catch(err => {
-          EventBus.$emit('error', err.message)
-        });
     },
 
     // 设置当前选择的船舶id

+ 23 - 20
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -81,14 +81,8 @@
             <div>  {{dataList.contractNo}}</div>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-option
-              v-for="item in goodnameList"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
-            ></el-option>
-            {{dataList.goodsName}}
+          <el-form-item label="货源" class="huom">
+            {{goods}}
             <!-- </el-select> -->
           </el-form-item>
           <!--重量(吨)-->
@@ -191,14 +185,19 @@
             <div>  {{dataList.contractNo}}</div>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-option
+          <el-form-item v-if='dataList1.inOutType!="退库"&&dataList1.taskTypeKey == 2' label="货名" class="huom">
+            <!-- <el-option
               v-for="item in goodnameList"
               :key="item.constKey"
               :label="item.constValue"
               :value="item.constValue"
-            ></el-option>
-            {{dataList1.goodsName}}
+            ></el-option> -->
+            {{dataList.goodsName}}
+            <!-- </el-select> -->
+          </el-form-item>
+          <el-form-item v-else label="货源" class="huom">
+            {{goods}}
+            <!-- </el-select> -->
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
@@ -303,14 +302,8 @@
             <!-- </el-select> -->
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-option
-              v-for="item in goodnameList"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
-            ></el-option>
-            {{dataList.goodsName}}
+          <el-form-item label="货源" class="huom">
+            {{goods}}
             <!-- </el-select> -->
           </el-form-item>
           <!--重量(吨)-->
@@ -476,6 +469,7 @@ export default {
         ]
       },
       size: 10,
+      goods:'',
       compId: localStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
@@ -669,6 +663,15 @@ export default {
               this.dataList = response[0]
             }
           }
+          if(this.dataList.sourceRelationInfoList){
+              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){
+                  this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
+                }
+              }
+            }
           xialaNo({
 						compId: localStorage.getItem('ws-pf_compId'),
 					})

+ 36 - 53
src/views/taskManagement/outsupplyofgoods.vue

@@ -50,7 +50,7 @@
         </ws-button>
         </el-col>
     </el-row>   
-      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+      <el-table class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
           <el-table-column
       type="selection"
       width="55">
@@ -61,12 +61,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="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-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="货源"></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>
@@ -75,6 +79,7 @@
 <script>
   import {
     getoreditoutput,
+    getSourceOfGoodslist,
     outdelete,
     movestates
   } from '@/model/tasksport/index'
@@ -200,6 +205,13 @@
       selectinOutType(){
         this.getList()
       },
+      checkSelectable(row) {
+        if(row.returnTickFlag){
+          return false
+        }else{
+          return true
+        }
+    },
       preview(){
         this.gainList=this.multipleSelection
          this.deptBudgetTotal=this.multipleSelection.length
@@ -207,10 +219,11 @@
       cancelpreview(){
         this.getList()
       },
+      
        handleSelectionChange(val) {
          this.num=0
          for (let i = 0; i < val.length; i++) {
-          this.num+=val[i].outWeight;
+          this.num+=Number(val[i].estimateOutWarehouseWeight);
          }
         this.multipleSelection = val;
       },
@@ -227,20 +240,14 @@
       },
 
       getList() {
-        getoreditoutput({
+        getSourceOfGoodslist({
             compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            searchType: this.searchType,
-            searchKeyWord: this.searchKeyWord,
-            inOutType:this.inOutType
+            contractNo:this.$route.query.contractNo
           })
           .toPromise()
           .then((response) => {
             this.gainList = response
-            this.currentPage = response.current
-            this.pageSize = response.size
-            this.deptBudgetTotal = response.total
+            this.deptBudgetTotal = response.length
           })
       },
       getSpanArr(data) {
@@ -286,31 +293,6 @@
         })
       },
        submit(){
-         for (let i = 0; i < this.multipleSelection.length; i++) {
-          if(!this.multipleSelection[i].outWeight){
-              this.$message({
-              message: '预计出库重量不能为空',
-              type: 'error'
-              });
-              return
-
-          }
-          if(this.multipleSelection[i].outWeight>this.multipleSelection[i].surplusWeight){
-            this.$message({
-              message: '预计出库重量不能超过剩余重量',
-              type: 'error'
-              });
-              return
-          }   
-          if(this.multipleSelection[i].outWeight.indexOf('.')!=-1&&this.multipleSelection[i].outWeight.substring(this.multipleSelection[i].outWeight.indexOf('.')+1, this.multipleSelection[i].outWeight.length).length>3){
-            this.$message({
-              message: '预计出库重量输入错误',
-              type: 'error'
-              });
-              return
-          }
-          
-        }
         var that=this
         this.$confirm(`确定提交货源信息?`, {
             confirmButtonText: '确定',
@@ -318,21 +300,22 @@
             type: 'warning',
           })
           .then(() => {
-        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
-          .then((response) => {
-            this.$message({
-					message: '提交成功',
-					type: 'success'
-					});
+        // editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+        //   .then((response) => {
+        //     this.$message({
+				// 	message: '提交成功',
+				// 	type: 'success'
+				// 	});
             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'
-              }); 
+          // }).catch((response) => {
+          //    this.$message({
+          //     message: '提交失败',
+          //     type: 'error'
+          //     }); 
                 // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
+              // })
           })
       },
       returnsales(){

+ 32 - 30
src/views/taskManagement/outsupplyofgoodsedit.vue

@@ -34,7 +34,7 @@
       </template>
     </BaseHeaderLayout>
     <el-row style='margin:10px;'>
-        <el-col :span="12">已选 10 条,合计出库重量  {{num}}吨,</el-col>
+        <el-col :span="12">已选 {{multipleSelection.length}} 条,合计出库重量  {{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 +50,7 @@
         </ws-button>
         </el-col>
     </el-row>   
-      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+      <el-table class="wenzi" :data="gainList" :selectable="checkSelectable" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
           <el-table-column
       type="selection"
       width="55">
@@ -66,7 +66,11 @@
         </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="货源"></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>
       </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>
@@ -180,6 +184,8 @@
         compId: localStorage.getItem('ws-pf_compId'),
         deptCircularPage: {},
         historyList: [],
+        multipleSelection1:[],
+        multipleSelection:[],
         pickerBeginDateBefore: {
           disabledDate: (time) => {
             return time.getTime() > Date.now()
@@ -197,6 +203,13 @@
       this.showType = this.isShow
     },
     methods: {
+      checkSelectable(row) {
+        if(row.returnTickFlag){
+          return false
+        }else{
+          return true
+        }
+    },
       selectinOutType(){
         this.getList()
       },
@@ -227,21 +240,9 @@
       },
 
       getList() {
-        getoreditoutput({
-            compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            searchType: this.searchType,
-            searchKeyWord: this.searchKeyWord,
-            inOutType:this.inOutType
-          })
-          .toPromise()
-          .then((response) => {
-            this.gainList = response
-            this.currentPage = response.current
-            this.pageSize = response.size
-            this.deptBudgetTotal = response.total
-          })
+        this.gainList = JSON.parse(this.$route.query.list)
+        this.deptBudgetTotal = this.gainList.length
+        
       },
       getSpanArr(data) {
         let that = this
@@ -294,21 +295,22 @@
             type: 'warning',
           })
           .then(() => {
-        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:1}).toPromise()
-          .then((response) => {
-            this.$message({
-					message: '提交成功',
-					type: 'success'
-					});
+        // editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+        //   .then((response) => {
+        //     this.$message({
+				// 	message: '提交成功',
+				// 	type: 'success'
+				// 	});
             localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection1));
             that.$router.go(-1)
-          }).catch((response) => {
-             this.$message({
-              message: '提交失败',
-              type: 'error'
-              }); 
+          // }).catch((response) => {
+          //    this.$message({
+          //     message: '提交失败',
+          //     type: 'error'
+          //     }); 
                 // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
+              // })
           })
       },
       returnsales(){

+ 12 - 195
src/views/taskManagement/outsupplyofgoodslook.vue

@@ -33,7 +33,11 @@
         </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="goodsSource" 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"
         :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
@@ -43,7 +47,8 @@
   import {
     getoreditoutput,
     outdelete,
-    movestates
+    movestates,
+    getSourceOfGoods
   } from '@/model/tasksport/index'
   import {
     downloadFile
@@ -135,71 +140,8 @@
         searchType: 1,
         searchTypeText: '待审核',
         searchKeyWord: '',
-        inOutType:'',
-        inOutTypeList:[
-          {
-            value: '销售出库',
-            type: 1
-          },
-          {
-            value: '移库出库',
-            type: 3
-          },
-          {
-            value: '暂存出库',
-            type: 2
-          },
-          {
-            value: '贸易服务出库',
-            type: 4
-          },
-          {
-            value: '采购出库',
-            type: 5
-          },
-          {
-            value: '采购入库',
-            type: 6
-          },
-          {
-            value: '移库入库',
-            type: 7
-          },
-          {
-            value: '暂存入库',
-            type: 8
-          },
-          {
-            value: '贸易服务入库',
-            type: 9
-          },
-          {
-            value: '退库',
-            type: 10
-          },
-        ],
+        inOutType:'',   
         contractType: 2,
-        taskTypeList: [{
-            value: '待审核',
-            type: 1
-          },
-          {
-            value: '执行中',
-            type: 3
-          },
-          {
-            value: '已驳回',
-            type: 2
-          },
-          {
-            value: '已完成',
-            type: 4
-          },
-          {
-            value: '全部任务',
-            type: ''
-          },
-        ],
         // 提交类型
         submitType: true,
         size: 10,
@@ -243,40 +185,9 @@
         this.currentPage = 1
         this.getList()
       },
-      deleteclick(row) {
-        var text = ''
-        if (
-          (row.taskTypeKey == 3 && row.inOutType == '移库出库') ||
-          (row.taskTypeKey == 4 && row.inOutType == '销售出库') ||
-          (row.taskTypeKey == 4 && row.inOutType == '退库')
-        ) {
-          text = '相同任务编号的任务将一并删除且不可恢复,是否确定删除?'
-        } else {
-          text = `任务删除后不可恢复,是否确定删除?`
-        }
-        //cancelButtonClass: "btn-custom-cancel"
-        this.$confirm(text, {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          })
-          .then(() => {
-            outdelete({
-                id: row.id,
-                relevanceId: row.relevanceId,
-                inOutFlag: row.inOutFlag,
-              })
-              .toPromise()
-              .then((response) => {
-                this.getList()
-              })
-          })
-          .catch(() => {
-            return false
-          })
-      },
+      
       getList() {
-        getoreditoutput({
+        getSourceOfGoods({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
             pageSize: this.pageSize,
@@ -292,69 +203,7 @@
             this.deptBudgetTotal = response.total
           })
       },
-      //编辑
-      delivery(item) {
-        this.$router.push({
-          path: 'tranManagementWarehouseInOuttaskedit',
-          query: {
-            relevanceId: item.relevanceId,
-            inOutFlag: item.inOutFlag
-          },
-        })
-      },
-      audit(item) {
-        this.$router.push({
-          path: 'tranManagementWarehouseInOuttaskaudit',
-          query: {
-            relevanceId: item.relevanceId,
-            taskId: item.taskId,
-            businessKey: item.id,
-            workflowId: item.workflowId,
-          },
-        })
-      },
-      getSpanArr(data) {
-        let that = this
-
-        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
-
-        that.spanArr = []
-
-        that.pos = 0
-
-        //遍历数据
-
-        data.forEach((item, index) => {
-          //判断是否是第一项
-
-          // if (index === 0) {
-          //   this.spanArr.push(1)
-          //   this.pos = 0
-          // } else {
-          //不是第一项时,就根据标识去存储
-          if (data[index].warehouseNumViewList.length > 1) {
-            // 查找到符合条件的数据时每次要把之前存储的数据+1
-            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
-            this.spanArr.push(0)
-          } else {
-            // 没有符合的数据时,要记住当前的index
-            this.spanArr.push(1)
-            this.pos = index
-          }
-          // }
-        })
-      },
-      //查看//传参
-      nocomplete(row) {
-        this.$router.push({
-          path: 'inOutWarehousetaskEdit',
-          query: {
-            relevanceId: row.relevanceId,
-            businessKey: row.id,
-            workflowId: row.workflowId,
-          },
-        })
-      },
+     
       dateFormat(fmt, date) {
         let ret
         const opt = {
@@ -390,39 +239,7 @@
         console.log(`当前页: ${val}`)
         this.getList()
       },
-      editClick(row) {
-        var status = ''
-        if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
-          status = '执行中'
-        } else if (row.taskStatus == '执行中') {
-          status = '已完成'
-        }
-        //cancelButtonClass: "btn-custom-cancel"
-        this.$confirm(`是否将状态改为${status}`, {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          })
-          .then(() => {
-            movestates({
-                id: row.id
-              })
-              .toPromise()
-              .then((response) => {
-                this.$notify.success({
-                  title: '成功',
-                  message: '状态修改成功',
-                })
-                this.getList()
-              })
-              .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
-          })
-          .catch(() => {
-            return false
-          })
-      },
+    
       selecttaskType(e) {
         for (var i = 0; i < this.taskTypeList.length; i++) {
           if (this.taskTypeList[i].value == e) {

+ 51 - 40
src/views/taskManagement/supplyofgoods.vue

@@ -77,7 +77,7 @@
         <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
         <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
-                <el-input @input='outweightchange' v-model="scope.row.outWeight" placeholder="输入本次出库重量"></el-input>
+                <el-input @input='outweightchange' v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
             </template>
         </el-table-column>
       </el-table>
@@ -234,23 +234,29 @@
          this.content=''
          this.multipleSelection1=[]
          for (let i = 0; i < val.length; i++) {
-          this.num+=Number(val[i].outWeight);
+          this.num+=Number(val[i].estimateOutWarehouseWeight);
           if(this.multipleSelection1.length>0){
-            console.log(222221)
-            for (let q = 0; q < this.multipleSelection1.length; q++) {
-              if(this.multipleSelection1[q].goodsName==val[i].goodsName){
-                this.multipleSelection1[q].outWeight=Number(this.multipleSelection1[q].outWeight)+Number(val[i].outWeight)
+            if(this.multipleSelection1.every((item,index)=>{
+              return item.goodsName!=val[i].goodsName
+            })==false){
+              for (let q = 0; q < this.multipleSelection1.length; q++) {
+                if(this.multipleSelection1[q].goodsName==val[i].goodsName){
+                  this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(val[i].estimateOutWarehouseWeight)
+                }
               }
-              this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].outWeight+'吨,'
+            }else{
+              this.multipleSelection1.push(JSON.parse(JSON.stringify(val[i])) )
             }
           }else{
-            console.log(111111)
-            this.multipleSelection1.push(val[i])
-            for (let q = 0; q < this.multipleSelection1.length; q++) {
-              this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].outWeight+'吨,'
-            }
+            // console.log(111111)
+            this.multipleSelection1.push(JSON.parse(JSON.stringify(val[i])) )
           }
+          
          }
+         console.log(this.multipleSelection1)
+          for (let q = 0; q < this.multipleSelection1.length; q++) {
+            this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+          }
         this.multipleSelection = val;
       },
       //添加
@@ -272,29 +278,33 @@
           })
       
       },
-      outweightchange(){
+      outweightchange(e){
          this.num=0
+        
          this.content=''
         this.multipleSelection1=[]
          for (let i = 0; i < this.multipleSelection.length; i++) {
-          this.num+=Number(this.multipleSelection[i].outWeight);
+          this.num+=Number(this.multipleSelection[i].estimateOutWarehouseWeight);
           if(this.multipleSelection1.length>0){
-            console.log(222221)
-            for (let q = 0; q < this.multipleSelection1.length; q++) {
-              console.log(this.content)
-              if(this.multipleSelection1[q].goodsName==this.multipleSelection[i].goodsName){
-                this.multipleSelection1[q].outWeight=Number(this.multipleSelection1[q].outWeight)+Number(this.multipleSelection[i].outWeight)
+            if(this.multipleSelection1.every((item,index)=>{
+              return item.goodsName!=this.multipleSelection[i].goodsName
+            })==false){
+              for (let q = 0; q < this.multipleSelection1.length; q++) {
+                if(this.multipleSelection1[q].goodsName==this.multipleSelection[i].goodsName){
+                  this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(this.multipleSelection[i].estimateOutWarehouseWeight)
+                }
               }
-              this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].outWeight+'吨,'
+            }else{
+              this.multipleSelection1.push(JSON.parse(JSON.stringify(this.multipleSelection[i])) )
             }
           }else{
-            console.log(111111)
-            this.multipleSelection1.push(this.multipleSelection[i])
-            for (let q = 0; q < this.multipleSelection1.length; q++) {
-              this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].outWeight+'吨,'
-            }
+            this.multipleSelection1.push(JSON.parse(JSON.stringify(this.multipleSelection[i])) )
           }
+          
          }
+          for (let q = 0; q < this.multipleSelection1.length; q++) {
+            this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+          }
       },
       getList() {
          getwarehousingorder({
@@ -314,7 +324,7 @@
       },
       submit(){
         for (let i = 0; i < this.multipleSelection.length; i++) {
-          if(!this.multipleSelection[i].outWeight){
+          if(!this.multipleSelection[i].estimateOutWarehouseWeight){
               this.$message({
               message: '预计出库重量不能为空',
               type: 'error'
@@ -329,7 +339,7 @@
               });
               return
           }   
-          if(this.multipleSelection[i].outWeight.indexOf('.')!=-1&&this.multipleSelection[i].outWeight.substring(this.multipleSelection[i].outWeight.indexOf('.')+1, this.multipleSelection[i].outWeight.length).length>3){
+          if(this.multipleSelection[i].estimateOutWarehouseWeight.indexOf('.')!=-1&&this.multipleSelection[i].estimateOutWarehouseWeight.substring(this.multipleSelection[i].estimateOutWarehouseWeight.indexOf('.')+1, this.multipleSelection[i].estimateOutWarehouseWeight.length).length>3){
             this.$message({
               message: '预计出库重量输入错误',
               type: 'error'
@@ -345,21 +355,22 @@
             type: 'warning',
           })
           .then(() => {
-        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
-          .then((response) => {
-            this.$message({
-					message: '提交成功',
-					type: 'success'
-					});
+        // editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+        //   .then((response) => {
+        //     this.$message({
+				// 	message: '提交成功',
+				// 	type: 'success'
+				// 	});
             localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection1));
             that.$router.go(-1)
-          }).catch((response) => {
-             this.$message({
-              message: '提交失败',
-              type: 'error'
-              }); 
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
+          // }).catch((response) => {
+          //    this.$message({
+          //     message: '提交失败',
+          //     type: 'error'
+          //     }); 
+          //       // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          //     })
           })
       },
       returnsales(){

+ 122 - 55
src/views/taskManagement/supplyofgoodsedit.vue

@@ -44,14 +44,6 @@
     <el-row style='margin:10px;'>
         <el-col :span="12">已选 {{this.multipleSelection.length}} 条,合计出库重量  {{num}}吨,{{content}}</el-col>
         <el-col style='text-align:right;' :span="12">
-             <ws-button type="primary" @click="preview()" v-hasPermission="
-            `warehouseManagement.warehouse.warehouseInfoTask.add`
-          ">预览
-        </ws-button>
-         <ws-button type="primary" @click="cancelpreview()" v-hasPermission="
-            `warehouseManagement.warehouse.warehouseInfoTask.add`
-          ">取消预览
-        </ws-button>
          <ws-button type="primary" @click="submit()" v-hasPermission="
             `warehouseManagement.warehouse.warehouseInfoTask.add`
           ">提交
@@ -59,10 +51,6 @@
         </el-col>
     </el-row>   
       <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
-          <el-table-column
-      type="selection"
-      width="55">
-    </el-table-column>
         <el-table-column type="index" label="序号">
           <template scope="scope">
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -77,9 +65,11 @@
         <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
         <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
-                <el-input v-model="scope.row.outWeight" placeholder="输入本次出库重量"></el-input>
+                <el-input  @input='outweightchange' v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
             </template>
         </el-table-column>
+        <el-table-column prop="actualOutWarehouseWeight" 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>
@@ -199,6 +189,7 @@
         compId: localStorage.getItem('ws-pf_compId'),
         deptCircularPage: {},
         historyList: [],
+        multipleSelection1:[],
         pickerBeginDateBefore: {
           disabledDate: (time) => {
             return time.getTime() > Date.now()
@@ -212,7 +203,7 @@
       // this.showType = this.isShow
     // },
     mounted() {
-      this.baseId=this.$route.query.baseId
+      // this.baseId=this.$route.query.baseId
       this.getList()
       this.showType = this.isShow
     },
@@ -227,15 +218,36 @@
       cancelpreview(){
         this.getList()
       },
-       handleSelectionChange(val) {
-         this.num=0
-         this.content=''
-         for (let i = 0; i < val.length; i++) {
-          this.num+=val[i].outWeight;
-          this.content=this.content?this.content:''+val[i].goodsName+val[i].outWeight+','
-         }
-        this.multipleSelection = val;
-      },
+      // handleSelectionChange(val) {
+      //    this.num=0
+      //    this.content=''
+      //    this.multipleSelection1=[]
+      //    for (let i = 0; i < val.length; i++) {
+      //     this.num+=Number(val[i].estimateOutWarehouseWeight);
+      //     if(this.multipleSelection1.length>0){
+      //       if(this.multipleSelection1.every((item,index)=>{
+      //         return item.goodsName!=val[i].goodsName
+      //       })==false){
+      //         for (let q = 0; q < this.multipleSelection1.length; q++) {
+      //           if(this.multipleSelection1[q].goodsName==val[i].goodsName){
+      //             this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(val[i].estimateOutWarehouseWeight)
+      //           }
+      //         }
+      //       }else{
+      //         this.multipleSelection1.push(JSON.parse(JSON.stringify(val[i])) )
+      //       }
+      //     }else{
+      //       // console.log(111111)
+      //       this.multipleSelection1.push(JSON.parse(JSON.stringify(val[i])) )
+      //     }
+          
+      //    }
+      //    console.log(this.multipleSelection1)
+      //     for (let q = 0; q < this.multipleSelection1.length; q++) {
+      //       this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+      //     }
+      //   this.multipleSelection = val;
+      // },
       //添加
       handleAdd() {
         this.$router.push({
@@ -247,6 +259,34 @@
         this.currentPage = 1
         this.getList()
       },
+      outweightchange(e){
+         this.num=0
+        
+         this.content=''
+        this.multipleSelection1=[]
+         for (let i = 0; i < this.gainList.length; i++) {
+          this.num+=Number(this.gainList[i].estimateOutWarehouseWeight);
+          if(this.multipleSelection1.length>0){
+            if(this.multipleSelection1.every((item,index)=>{
+              return item.goodsName!=this.gainList[i].goodsName
+            })==false){
+              for (let q = 0; q < this.multipleSelection1.length; q++) {
+                if(this.multipleSelection1[q].goodsName==this.gainList[i].goodsName){
+                  this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(this.gainList[i].estimateOutWarehouseWeight)
+                }
+              }
+            }else{
+              this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+            }
+          }else{
+            this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+          }
+          
+         }
+          for (let q = 0; q < this.multipleSelection1.length; q++) {
+            this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+          }
+      },
       costsort(){
           this.gainList.sort(function(a,b){
               var x = a['avgCost'];
@@ -257,24 +297,50 @@
       },
       
       getList() {
-         getwarehousingorder({
-            compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            searchType: this.searchType,
-            searchKeyWord: this.searchKeyWord,
-            inOutType:this.inOutType,
-            baseId:this.baseId
-          })
-          .toPromise()
-          .then((response) => {
-            this.gainList = response.records
-            this.deptBudgetTotal = response.total
-          })
+        //  getwarehousingorder({
+        //     compId: localStorage.getItem('ws-pf_compId'),
+        //     currentPage: this.currentPage,
+        //     pageSize: this.pageSize,
+        //     searchType: this.searchType,
+        //     searchKeyWord: this.searchKeyWord,
+        //     inOutType:this.inOutType,
+        //     baseId:this.baseId
+        //   })
+        //   .toPromise()
+        //   .then((response) => {
+            this.gainList = JSON.parse(this.$route.query.list)
+            this.deptBudgetTotal = this.gainList.length
+          // })
+          this.num=0
+        
+         this.content=''
+        this.multipleSelection1=[]
+         for (let i = 0; i < this.gainList.length; i++) {
+          this.num+=Number(this.gainList[i].estimateOutWarehouseWeight);
+          if(this.multipleSelection1.length>0){
+            if(this.multipleSelection1.every((item,index)=>{
+              return item.goodsName!=this.gainList[i].goodsName
+            })==false){
+              for (let q = 0; q < this.multipleSelection1.length; q++) {
+                if(this.multipleSelection1[q].goodsName==this.gainList[i].goodsName){
+                  this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(this.gainList[i].estimateOutWarehouseWeight)
+                }
+              }
+            }else{
+              this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+            }
+          }else{
+            this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+          }
+          
+         }
+          for (let q = 0; q < this.multipleSelection1.length; q++) {
+            this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+          }
       },
       submit(){
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          if(!this.multipleSelection[i].outWeight){
+        for (let i = 0; i < this.gainList.length; i++) {
+          if(!this.gainList[i].estimateOutWarehouseWeight){
               this.$message({
               message: '预计出库重量不能为空',
               type: 'error'
@@ -282,14 +348,14 @@
               return
 
           }
-          if(this.multipleSelection[i].outWeight>this.multipleSelection[i].surplusWeight){
+          if(this.gainList[i].estimateOutWarehouseWeight>this.gainList[i].surplusWeight){
             this.$message({
               message: '预计出库重量不能超过剩余重量',
               type: 'error'
               });
               return
           }   
-          if(this.multipleSelection[i].outWeight.indexOf('.')!=-1&&this.multipleSelection[i].outWeight.substring(this.multipleSelection[i].outWeight.indexOf('.')+1, this.multipleSelection[i].outWeight.length).length>3){
+          if(String(this.gainList[i].estimateOutWarehouseWeight).indexOf('.')!=-1&&this.gainList[i].estimateOutWarehouseWeight.substring(String(this.gainList[i].estimateOutWarehouseWeight).indexOf('.')+1, this.multipleSelection[i].estimateOutWarehouseWeight.length).length>3){
             this.$message({
               message: '预计出库重量输入错误',
               type: 'error'
@@ -305,21 +371,22 @@
             type: 'warning',
           })
           .then(() => {
-        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:1}).toPromise()
-          .then((response) => {
-            this.$message({
-					message: '提交成功',
-					type: 'success'
-					});
-            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+        // editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+        //   .then((response) => {
+        //     this.$message({
+				// 	message: '提交成功',
+				// 	type: 'success'
+				// 	});
+            localStorage.setItem("supplygoods",JSON.stringify(this.gainList));
+            localStorage.setItem("supplygoods1",JSON.stringify(this.multipleSelection1));
             that.$router.go(-1)
-          }).catch((response) => {
-             this.$message({
-              message: '提交失败',
-              type: 'error'
-              }); 
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
+          // }).catch((response) => {
+          //    this.$message({
+          //     message: '提交失败',
+          //     type: 'error'
+          //     }); 
+          //       // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          //     })
           })
       },
       returnsales(){

+ 53 - 75
src/views/taskManagement/supplyofgoodslook.vue

@@ -13,15 +13,11 @@
 			</el-col>
 		</el-row>
     <el-row style='margin:10px;'>
-        <el-col :span="12">共 {{this.gainList.length}} 条,合计出库重量  100吨,玉米(潮粮)50吨,玉米(机收)20吨,玉米 30吨</el-col>
+        <el-col :span="12">共 {{this.gainList.length}} 条,合计出库重量  {{num}}吨,{{content}}</el-col>
         <el-col style='text-align:right;' :span="12">
         </el-col>
     </el-row>   
       <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
-          <el-table-column
-      type="selection"
-      width="55">
-    </el-table-column>
         <el-table-column type="index" label="序号">
           <template scope="scope">
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -36,9 +32,11 @@
         <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
         <el-table-column prop="estimateOutWarehouseWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
-                <el-input v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
+                <el-input disabled v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
             </template>
         </el-table-column>
+        <el-table-column prop="actualOutWarehouseWeight" 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>
@@ -149,7 +147,10 @@
         size: 10,
         spanArr: [],
         warehouseName: '',
+        num:0,
+        content:'',
         multipleSelection:[],
+        multipleSelection1:[],
         deptBudgetTotal: 0,
         compId: localStorage.getItem('ws-pf_compId'),
         historyList: [],
@@ -172,6 +173,9 @@
     methods: {
       selectinOutType(){
         this.getList()
+      },
+      returnsales(){
+        this.$router.go(-1)
       },
        handleSelectionChange(val) {
         this.multipleSelection = val;
@@ -189,42 +193,49 @@
       },
      
       getList() {
-        getSourceOfGoods({
-            compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            searchType: this.searchType,
-            searchKeyWord: this.searchKeyWord,
-            inOutType:this.inOutType
-          })
-          .toPromise()
-          .then((response) => {
-            this.gainList = response
-            this.currentPage = response.current
-            this.pageSize = response.size
-            this.deptBudgetTotal = response.total
-          })
-      },
-      //编辑
-      delivery(item) {
-        this.$router.push({
-          path: 'tranManagementWarehouseInOuttaskedit',
-          query: {
-            relevanceId: item.relevanceId,
-            inOutFlag: item.inOutFlag
-          },
-        })
-      },
-      audit(item) {
-        this.$router.push({
-          path: 'tranManagementWarehouseInOuttaskaudit',
-          query: {
-            relevanceId: item.relevanceId,
-            taskId: item.taskId,
-            businessKey: item.id,
-            workflowId: item.workflowId,
-          },
-        })
+        this.gainList = JSON.parse(this.$route.query.list)
+        this.deptBudgetTotal = this.gainList.length
+        // getSourceOfGoods({
+        //     compId: localStorage.getItem('ws-pf_compId'),
+        //     currentPage: this.currentPage,
+        //     pageSize: this.pageSize,
+        //     searchType: this.searchType,
+        //     searchKeyWord: this.searchKeyWord,
+        //     inOutType:this.inOutType
+        //   })
+        //   .toPromise()
+        //   .then((response) => {
+        //     this.gainList = response
+        //     this.currentPage = response.current
+        //     this.pageSize = response.size
+        //     this.deptBudgetTotal = response.total
+        //   })
+         this.num=0
+        
+         this.content=''
+        this.multipleSelection1=[]
+         for (let i = 0; i < this.gainList.length; i++) {
+          this.num+=Number(this.gainList[i].estimateOutWarehouseWeight);
+          if(this.multipleSelection1.length>0){
+            if(this.multipleSelection1.every((item,index)=>{
+              return item.goodsName!=this.gainList[i].goodsName
+            })==false){
+              for (let q = 0; q < this.multipleSelection1.length; q++) {
+                if(this.multipleSelection1[q].goodsName==this.gainList[i].goodsName){
+                  this.multipleSelection1[q].estimateOutWarehouseWeight=Number(this.multipleSelection1[q].estimateOutWarehouseWeight)+Number(this.gainList[i].estimateOutWarehouseWeight)
+                }
+              }
+            }else{
+              this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+            }
+          }else{
+            this.multipleSelection1.push(JSON.parse(JSON.stringify(this.gainList[i])) )
+          }
+          
+         }
+          for (let q = 0; q < this.multipleSelection1.length; q++) {
+            this.content=this.content+this.multipleSelection1[q].goodsName+this.multipleSelection1[q].estimateOutWarehouseWeight+'吨,'
+          }
       },
       getSpanArr(data) {
         let that = this
@@ -303,39 +314,6 @@
         console.log(`当前页: ${val}`)
         this.getList()
       },
-      editClick(row) {
-        var status = ''
-        if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
-          status = '执行中'
-        } else if (row.taskStatus == '执行中') {
-          status = '已完成'
-        }
-        //cancelButtonClass: "btn-custom-cancel"
-        this.$confirm(`是否将状态改为${status}`, {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          })
-          .then(() => {
-            movestates({
-                id: row.id
-              })
-              .toPromise()
-              .then((response) => {
-                this.$notify.success({
-                  title: '成功',
-                  message: '状态修改成功',
-                })
-                this.getList()
-              })
-              .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
-          })
-          .catch(() => {
-            return false
-          })
-      },
       selecttaskType(e) {
         for (var i = 0; i < this.taskTypeList.length; i++) {
           if (this.taskTypeList[i].value == e) {

+ 78 - 44
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -68,11 +68,8 @@
 					</el-form-item>
 					<!-- 货名 -->
 					<!-- <el-form-item label="货源" class="huom">
-						<el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货源"
-							class="huom" @change="selectgoodsName" filterable clearable>
-							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-								:value="item.constValue"></el-option>
-						</el-select>
+						<el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
 						<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item> -->
 					<!--重量(吨)-->
@@ -171,16 +168,18 @@
 						</el-select>
 					</el-form-item>
 					<!-- 货名 -->
-					<!--<el-form-item label="货源" class="huom">
-						 <el-select :disabled="dataList.taskTypeKey != 3 || dataList.taskTypeKey == 3" filterable clearable
-							v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1">
-							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-								:value="item.constValue"></el-option>
-						</el-select> 
-						<el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
+					<!-- <el-form-item v-if='dataList1.inOutType!="退库"&&dataList1.taskTypeKey == 2' label="货名" class="huom">
+						<el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
+						filterable clearable>
+						<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+							:value="item.constValue"></el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item v-else label="货源" class="huom">
+						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>-->
+					</el-form-item> -->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 						<el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
@@ -283,15 +282,10 @@
 					</el-form-item>
 					<!-- 货名 -->
 					<!-- <el-form-item label="货源" class="huom">
-						<el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
-							class="huom" @change="selectgoodsName " filterable clearable>
-							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-								:value="item.constValue"></el-option> 
-						</el-select>
-						<el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
+						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-						<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>-->
+						 <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+					</el-form-item> -->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 						<el-input :disabled="dataList.taskTypeKey == 4" v-model="dataList.weight" placeholder="请输入重量(吨)"
@@ -473,6 +467,7 @@
 					}]
 				},
 				size: 10,
+				goods:'',
 				compId: localStorage.getItem('ws-pf_compId'),
 				deptCircularPage: {},
 				packtypeList: {},
@@ -485,11 +480,13 @@
 				inOutTaskNo1: '',
 				sourceId:'',
 				dataList: {
-					taskTypeKey: '1'
+					taskTypeKey: '1',
+					weight:0,
 				},
 				dataList1: {
 					taskTypeKey: '1',
-					inOutType: ''
+					inOutType: '',
+					weight:0,
 				},
 				historyList: [],
 				pickerBeginDateBefore: {
@@ -503,16 +500,31 @@
 		},
 		activated() {
 			this.getList()
-			var goods=''
 			var num=0
 			this.sourceId=''
-			if(localStorage.setItem("supplygoods")){
-				var supplygoods=JSON.parse(localStorage.setItem("supplygoods"))
-				for (let i = 0; i < supplygoods.length; i++) {
-					goods+=supplygoods[i].goodsName
-					this.sourceId=this.sourceId+','+supplygoods[i].id
-					num+=supplygoods[i].outWeight
+			this.dataList.weight=0
+			this.dataList1.weight=0
+			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
+							}
+							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)
+						}
+					}
+				}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)
+					}
 				}
+				
 			}
 			
 		},
@@ -522,27 +534,32 @@
 				this.$router.go(-1)
 			},
 			supplygoods(){
-				if(this.dataList.warehouseName){
-					if(this.dataList.taskTypeKey==4){
-						this.$router.push({name:'outsupplyofgoods',query:{baseId:this.baseId}})
-					}else{
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+					if(this.dataList.warehouseName){
 						this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
+					}else{
+						this.$message({
+							message: '请先选择仓库',
+							type: 'warning'
+						});
+					}
+				}else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==3){
+					if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
+						this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo}})
+					}else{
+						this.$message({
+							message: '请先选择合同/移库编号',
+							type: 'warning'
+						});
 					}
-				}else{
-					this.$message({
-					message: '请先选择仓库',
-					type: 'warning'
-					});
-
 				}
       		},
 			returnsales() {
 				this.dataList = {
 								taskTypeKey: 1
 							}
-				this.$router.push({
-					path: 'tranManagementWarehouseInOuttask'
-				})
+				localStorage.removeItem('supplygoods1')
+				this.$router.go(-1)
 			},
 			// 获取当前年月日
 			getdate() {
@@ -746,6 +763,7 @@
 			},
 			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 == '随行就市'){
@@ -765,7 +783,12 @@
 									this.$set(this.dataList1, 'gradeKey', response.gradeKey)
 									this.$set(this.dataList1, 'waterContent', response.waterContent)
 									this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
-									this.$set(this.dataList1, 'weight', response.weight)
+									if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"){
+										this.goods=''
+										this.dataList1.weight=0
+									}else{
+										this.$set(this.dataList1, 'weight', response.weight)
+									}
 									this.$set(
 										this.dataList1,
 										'unitPrice',
@@ -791,6 +814,7 @@
 				}
 			},
 			requestadd(list, status) {
+				localStorage.removeItem('supplygoods1')
 				list.compId = localStorage.getItem('ws-pf_compId')
 				list.publisher =
 					localStorage.getItem('ws-pf_roleName') +
@@ -1381,11 +1405,19 @@
 				// this.dataList.baseId =
 				this.dataList.inOutFlag = 1
 				this.dataList1.inOutFlag = 2
+				var data=JSON.parse(localStorage.getItem("supplygoods"))
+				for (let i = 0; i < data.length; i++) {
+					data[i].sourceId=data[i].id
+					
+				}
+				var supplygoods=data
 				if (this.dataList.taskTypeKey == 1) {
 					this.dataList.inOutTaskNo = this.inOutTaskNo
+					this.dataList.sourceRelationInfoList=supplygoods
 					this.requestadd(this.dataList)
 				} else if (this.dataList1.taskTypeKey == 2) {
 					this.dataList1.inOutTaskNo = this.inOutTaskNo1
+					this.dataList1.sourceRelationInfoList=supplygoods
 					this.requestadd(this.dataList1)
 				} else if (
 					this.dataList.taskTypeKey == 3 ||
@@ -1393,6 +1425,8 @@
 				) {
 					this.dataList.inOutTaskNo = this.inOutTaskNo
 					this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
+					this.dataList.sourceRelationInfoList=supplygoods
+					this.dataList1.sourceRelationInfoList=supplygoods
 					if (this.dataList.taskTypeKey == 3) {
 						this.dataList.sendWarehouse=this.dataList.warehouseName
 						this.dataList.receiveWarehouse=this.dataList1.warehouseName

+ 87 - 16
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -89,13 +89,18 @@
             </el-select>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
+          <!-- <el-form-item label="货名" class="huom">
             <el-select disabled v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName"
               filterable clearable>
               <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
                 :value="item.constValue"></el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
+          <!-- <el-form-item label="货源" class="huom">
+            <el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+            <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"
@@ -214,13 +219,18 @@
             </el-select>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
-              filterable clearable>
-              <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-                :value="item.constValue"></el-option>
-            </el-select>
-          </el-form-item>
+          <!-- <el-form-item v-if='dataList1.inOutType!="退库"&&dataList1.taskTypeKey == 2' label="货名" class="huom">
+						<el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
+						filterable clearable>
+						<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+							:value="item.constValue"></el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item v-else label="货源" class="huom">
+						<el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
+					</el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)" maxlength="120"
@@ -336,13 +346,12 @@
             </el-select>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-select disabled v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName"
-              filterable clearable>
-              <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-                :value="item.constValue"></el-option>
-            </el-select>
-          </el-form-item>
+
+          <!-- <el-form-item label="货源" class="huom">
+            <el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+             <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">查看货源</el-button>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"
@@ -567,6 +576,27 @@
       revert() {
         this.$router.go(-1)
       },
+      supplygoods(){
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+					if(this.dataList.warehouseName){
+						this.$router.push({name:'supplyofgoodslook',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
+					}else{
+						this.$message({
+							message: '请先选择仓库',
+							type: 'warning'
+						});
+					}
+				}else if(this.dataList1.taskTypeKey==2&&dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==3){
+					if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
+						this.$router.push({name:'outsupplyofgoodslook',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
+					}else{
+						this.$message({
+							message: '请先选择合同/移库编号',
+							type: 'warning'
+						});
+					}
+				}
+      },
       returnsales() {
         this.$router.push({
           path: 'tranManagementWarehouseInOuttask'
@@ -1005,6 +1035,47 @@
                 }
                 this.dataList = response[0]
               }
+              this.goods=''
+            if(this.dataList.sourceRelationInfoList){
+              for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
+                if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
+                  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
+                    }
+                  }
+                }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+                  this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
+                }
+              }
+            }
+          if(localStorage.getItem("supplygoods1")){
+                this.goods=''
+                this.dataList1.weight=0
+                this.dataList.weight=0
+            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 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
+                    }
+                    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)
+                  }
+                }
+              }
+            }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++) {
+                console.log(this.goods)
+                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)
+              }
+            }
+          }
             })
         } else {
           this.tasknumber()

+ 114 - 54
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -108,7 +108,7 @@
               filterable clearable
             >
               <el-option
-                v-for="item in moveTaskNo"
+                v-for="item in contractNoList"
                 :key="item.constKey"
                 :label="item.contractNo"
                 :value="item.contractNo"
@@ -124,23 +124,11 @@
             />
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-select
-              :disabled="dataList.taskTypeKey != 3"
-              v-model="dataList.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
+          <!-- <el-form-item label="货源" class="huom">
+            <el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+            <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             <el-input
@@ -324,23 +312,18 @@
             />
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-select
-              :disabled="dataList.taskTypeKey != 3"
-              v-model="dataList1.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName1"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
+          <!-- <el-form-item v-if='dataList1.inOutType!="退库"&&dataList1.taskTypeKey == 2' label="货名" class="huom">
+						<el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
+						filterable clearable>
+						<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+							:value="item.constValue"></el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item v-else label="货源" class="huom">
+						<el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+					</el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             <el-input
@@ -530,23 +513,11 @@
             />
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货名" class="huom">
-            <el-select
-              :disabled="dataList.taskTypeKey != 3"
-              v-model="dataList.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
+          <!-- <el-form-item label="货源" class="huom">
+            <el-input disabled v-model="goods" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+            <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             <el-input
@@ -697,6 +668,7 @@ export default {
       dialogApproveFormVisible: false,
       // 船舶类型
       monetaryKey: null,
+      goods:'',
       // 表格显示数据
       tableDate: [],
       // 是否显示
@@ -757,8 +729,8 @@ export default {
       contractList: [],
       inOutTaskNo: '',
       inOutTaskNo1: '',
-      dataList: { taskTypeKey: '1' },
-      dataList1: { taskTypeKey: '1' },
+      dataList: { taskTypeKey: '1' ,weight:0},
+      dataList1: { taskTypeKey: '1' ,weight:0},
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
@@ -772,7 +744,12 @@ export default {
     }
   },
   activated() {
+    this.dataList.weight=0
+			this.dataList1.weight=0
     this.getList()
+    var num=0
+			this.sourceId=''
+			
   },
   methods: {
     //返回按钮
@@ -781,8 +758,30 @@ export default {
     },
     returnsales() {
       this.$router.go(-1)
+      localStorage.removeItem('supplygoods1')
       this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
     },
+      supplygoods(){
+				if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+					if(this.dataList.warehouseName){
+						this.$router.push({name:'supplyofgoodsedit',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
+					}else{
+						this.$message({
+							message: '请先选择仓库',
+							type: 'warning'
+						});
+					}
+				}else if(this.dataList1.taskTypeKey==2&&dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==3){
+					if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
+						this.$router.push({name:'outsupplyofgoodsedit',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
+					}else{
+						this.$message({
+							message: '请先选择合同/移库编号',
+							type: 'warning'
+						});
+					}
+				}
+      },
     // 获取当前年月日
     getdate() {
       var date = new Date()
@@ -940,6 +939,7 @@ export default {
       }
     },
     requestadd(list, status) {
+      localStorage.removeItem('supplygoods1')
       list.compId = localStorage.getItem('ws-pf_compId')
       list.publisher =
         localStorage.getItem('ws-pf_roleName') +
@@ -1396,6 +1396,13 @@ export default {
           })
           return
         }
+        var data=JSON.parse(localStorage.getItem("supplygoods"))
+				for (let i = 0; i < data.length; i++) {
+					data[i].sourceId=data[i].id
+				}
+        var supplygoods=data
+        this.dataList.sourceRelationInfoList=supplygoods
+				this.dataList1.sourceRelationInfoList=supplygoods
         this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
         if (this.dataList.taskTypeKey == 3) {
           this.dataList.businessDescribe = this.dataList1.businessDescribe
@@ -1557,6 +1564,8 @@ export default {
             if (response.length > 1) {
               this.dataList = response[0]
               this.dataList1 = response[1]
+
+        
               console.log(this.dataList1.inOutTaskNo, '入库任务')
             } else {
               if (response[0].taskTypeKey == 3) {
@@ -1575,6 +1584,57 @@ export default {
                 // this.dataList = response[0]
               }
             }
+            this.goods=''
+            if(this.dataList.sourceRelationInfoList){
+              for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
+                if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
+                  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
+                    }
+                  }
+                }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
+                  this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
+                }
+              }
+            }
+          if(localStorage.getItem("supplygoods1")){
+            this.goods=''
+            this.dataList1.weight=0
+            this.dataList.weight=0
+				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
+              }
+              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)
+            }
+					}
+				}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++) {
+            console.log(this.goods)
+						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("supplygoods1")){
+      //       this.goods=''
+      //       this.dataList1.weight=0
+      //       this.dataList.weight=0
+			// 	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)
+			// 	}
+			// }
+				
           })
       } else {
         this.tasknumber()

+ 75 - 23
src/views/warehousenew/inventoryCheck.vue

@@ -24,16 +24,16 @@
     </BaseHeaderLayout>
     <el-row style='margin:10px;'>
         <el-col :span="12">
-             <ws-button :type="flag===''?'primary':''" @click="handleAdd()" v-hasPermission="
-            `warehouseManagement.warehouse.warehouseInfoTask.add`
+             <ws-button :type="flag===''?'primary':''" @click="handlestatus('')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`
           ">全部
         </ws-button>
-         <ws-button :type="flag===0?'primary':''" @click="handleAdd()" v-hasPermission="
-            `warehouseManagement.warehouse.warehouseInfoTask.add`
+         <ws-button :type="flag==='0'?'primary':''" @click="handlestatus('0')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`
           ">盘盈
         </ws-button>
-         <ws-button :type="flag===1?'primary':''" @click="handleAdd()" v-hasPermission="
-            `warehouseManagement.warehouse.warehouseInfoTask.add`
+         <ws-button :type="flag==='1'?'primary':''" @click="handlestatus('1')" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`
           ">盘亏
         </ws-button>
         </el-col>
@@ -41,7 +41,7 @@
           
         </el-col>
     </el-row>
-    <div v-for='item in gainList' style='margin:10px;border:1px solid #ccc;padding:10px;'>
+    <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.warehouseName}}</div>
@@ -56,10 +56,13 @@
         </ws-button>
         </div>
       </div>
-      <el-table ref='multipleTable' class="wenzi" :data="item.goodssourcelist" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+      <el-table class="wenzi" :data="item.goodssourcelist" style="width: 100%"    height="calc(100% - 110px)">
         <el-table-column  width="40">
           <template scope="scope">
-            <el-radio @change='radiochange(scope.row)' v-model="scope.row.select" :label="scope.row.id"><span></span></el-radio>
+            <img v-if="!scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/wxz.png" alt="">
+            <img v-if="scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/xz.png" alt="">
+            <!-- <el-radio @change='radiochange(scope.row)' :name='indexMethod()+index' v-model="scope.row.select" :label="scope.row.id"><span></span></el-radio> -->
+             <!-- <el-radio :label="scope.row.id" v-model="scope.row.select" @change.native="radiochange(index,scope.row)">&nbsp;</el-radio> -->
           </template>
     </el-table-column>
         <el-table-column type="index" label="序号">
@@ -85,10 +88,10 @@
           <template slot-scope="scope">
             <template>
               <span slot="reference">
-                <span v-if="scope.row.taskStatus == '待审核'" class="executory"></span>
-                <span v-if="scope.row.taskStatus == '执行中'" class="inExecution"></span>
-                <span v-if="scope.row.taskStatus == '已完成'" class="done"></span>
-                {{ scope.row.taskStatus }}
+                <span v-if="scope.row.inventoryStatus == '待审核'" class="executory"></span>
+                <span v-if="scope.row.inventoryStatus == '执行中'" class="inExecution"></span>
+                <span v-if="scope.row.inventoryStatus == '已完成'" class="done"></span>
+                {{ scope.row.inventoryStatus }}
               </span>
             </template>
             <img v-if="scope.row.taskStatus == '执行中'" width="17" height="18"
@@ -291,6 +294,9 @@
       this.showType = this.isShow
     },
     methods: {
+      indexMethod(index) {
+        return index * 2;
+      },
       handlerecord(row){
         gettaskhistories({ businessKey: row.id,
             workflowId: row.workflowId}).toPromise()
@@ -315,14 +321,23 @@
       selectinOutType(){
         this.getList()
       },
-      radiochange(row){
-
+      handlestatus(status){
+        this.flag=status
+        this.getList()
+      },
+      radiochange(index,row){
+        console.log(index,row)
+        var data=this.gainList[index].goodssourcelist
+        for (let i = 0; i < data.length; i++) {
+          data[i].select=false
+        }
+        row.select=true
+        
         this.multipleSelection[row.warehouseName]=row
+        console.log(this.multipleSelection[row.warehouseName])
       },
-       handleSelectionChange(val) {
-         console.log(this.$refs)
-  this.$refs.multipleTable.clearSelection()
-        this.multipleSelection = val;
+       handleCurrentChange(val) {
+        this.currentRow = val;
       },
       aduit(row){
         this.aduitList=row
@@ -363,6 +378,7 @@
         }
       },
       loseprofit(){
+        var title=''
         if(this.form.num<0){
             this.$notify.warning({
               title: '警告',
@@ -380,6 +396,7 @@
             })
             return
           }
+          title='确定提交盘盈数据?'
         }
         if(this.title=='盘亏'){
           this.form.profitAndLoss=-this.form.surplusWeight-this.form.num
@@ -391,12 +408,29 @@
             })
             return
           }
+          title='确定提交盘亏数据?'
         }
-        editwarehousingorder(this.form).toPromise()
+         this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+          editwarehousingorder(this.form).toPromise()
               .then((response) => {
                 this.aduitshow=false
+                this.$message({
+                  message: '提交成功',
+                  type: 'error'
+                });
                 this.getList()
-              })
+              }).catch(() => {
+                  this.$message({
+                    message: '提交失败',
+                    type: 'error'
+                  });
+              })  
+        })
       },
       pass(){
         this.$confirm('确定通过盘点操作?', {
@@ -413,8 +447,17 @@
               }).toPromise()
               .then((response) => {
                 this.aduitshow=false
+                this.$message({
+                  message: '通过成功',
+                  type: 'error'
+                });
                 this.getList()
-              })
+              }).catch(() => {
+                  this.$message({
+                    message: '通过失败',
+                    type: 'error'
+                  });
+              })  
           }).catch(() => {
             return false
           })
@@ -435,8 +478,17 @@
               }).toPromise()
               .then((response) => {
                 this.aduitshow=false
+                this.$message({
+                  message: '驳回成功',
+                  type: 'error'
+                });
                 this.getList()
-              })
+              }).catch(() => {
+                  this.$message({
+                    message: '驳回失败',
+                    type: 'error'
+                  });
+              })  
               }).catch(() => {
             return false
           })

+ 50 - 13
src/views/warehousenew/warehousingOrder.vue

@@ -43,13 +43,13 @@
     <div v-for="item 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 v-if=''>{{item.warehouseName}}入库单</div>
+        <div>{{item.warehouseName}}入库单</div>
         <div>
           <ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
             `warehouseManagement.warehousingOrder.appl`
           ">请款
         </ws-button>
-         <ws-button v-if='!item.payshow' type="primary" @click="cancel()" v-hasPermission="
+         <ws-button v-if='!item.payshow' type="primary" @click="cancel(item)" v-hasPermission="
             `warehouseManagement.warehousingOrder.appl`
           ">取消
         </ws-button>
@@ -178,7 +178,7 @@
         </ws-button>
   </div>
 </el-dialog> -->
-<el-dialog width='50%' :visible.sync="dialogVisible1" title="附件" top="20vh">
+<el-dialog width='50%' :visible.sync="accessoryTFs" title="附件" top="20vh">
       <div v-for="(item,index) in appendixIdss" :key="'fujian'+index" >
        <el-image 
         style="width: 100px; height: 100px"
@@ -327,12 +327,12 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         spanArr: [],
         id:'',
         appendixIdss:[],
-        accessoryTFs:'',
         paymentScreenshot:[],
         warehouseName: '',
         deptBudgetTotal: 0,
         compId: localStorage.getItem('ws-pf_compId'),
         historyList: [],
+        money:0,
         aduitshow:false,
         costlist:[],
         pickerBeginDateBefore: {
@@ -390,10 +390,13 @@ 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++) {
-            this.multipleSelection[i].select=true
+            if(item.warehouseName==this.multipleSelection[i].warehouseName){
+              this.multipleSelection[i].select=true
+            }
           }
         }else{
           this.$message({
@@ -417,6 +420,11 @@ 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
+            }
+          }
       },
       costclick(row){
         this.costlist=row.expenseAllocationInfoList
@@ -427,13 +435,12 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         //   })
       },
       selectInit(row,index){
-        if(localStorage.getItem('ws-pf_roleName')=='内勤'){
+        if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
           if(row.inType=='移库入库'||row.inType=='退库入库'){
             return false
           }else{
             if(row.amountNotPayable>0){
-              console.log(row.approveStatus)
-              if(row.approveStatus!='请款中'){
+              if(!row.approveStatus){
                 return true
               }else{
                 return false
@@ -479,7 +486,14 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
-           if(arr[i].requestFunds>arr[i].amountNotPayable){
+          if(arr1[i].approveStatus){
+            this.$message({
+              message: '至少选择一条待请款条目',
+              type: 'warning'
+            });
+            return
+          }
+           if(arr1[i].requestFunds>arr1[i].amountNotPayable){
             this.$message({
               message: '请款金额不能大于未付金额!',
               type: 'warning'
@@ -499,6 +513,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               message: '提交成功',
               type: 'success'
             });
+            this.getList()
           }).catch(() => {
            this.$message({
               message: '提交失败',
@@ -510,8 +525,9 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           })
       },
       paymentsubmit(){
+        var that=this
          var arr2=this.multipleSelection.filter(function(items,index){
-                  return this.currectdata.warehouseName==items.warehouseName
+                  return that.currectdata.warehouseName==items.warehouseName
                 })
           if(this.paymentScreenshot.length==0){
             this.$message({
@@ -530,6 +546,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               message: '付款成功',
               type: 'success'
             });
+            this.aduitshow=false
+            this.getList()
           }).catch(() => {
            this.$message({
               message: '付款失败',
@@ -539,6 +557,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
   
       },
       payment(item){
+        this.money=0
+        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)
+         }
+        }
+        this.form.name=this.money
         this.currectdata=item
         this.aduitshow=true
         
@@ -562,10 +587,20 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
            
+        }
+        for (let i = 0; i < arr2.length; i++) {
+          if(!arr2[i].approveStatus){
+            this.$message({
+              message: '至少选择一条待审核的条目',
+              type: 'eroor'
+            });
+            return
+          }
+          
         }
           this.$confirm('审核请款信息', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
+            confirmButtonText: '通过',
+            cancelButtonText: '驳回',
             type: 'warning',
           })
           .then(() => {
@@ -603,11 +638,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               message: '通过成功',
               type: 'success'
             });
+            this.getList()
           }else{
             this.$message({
               message: '驳回成功',
               type: 'success'
             });
+            this.getList()
           }
         }
           
@@ -634,7 +671,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               response.records[i].select=false
               response.records[i].surplusWeight=response.records[i].inWarehouseWeight-response.records[i].outWarehouseWeight+response.records[i].profitAndLoss
               response.records[i].weightedit=false
-              if(response.records[i].warehouseName.indexOf('临')){
+              if(response.records[i].warehouseName.indexOf('临')!=-1){
                 response.records[i].weightshow=true
               }else{
                 response.records[i].weightshow=false