소스 검색

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 1 년 전
부모
커밋
25ae95ba4c

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

@@ -159,3 +159,17 @@ export const API_EXPORT_ORDER ='/warehousingOrder/exportWarehousingOrder'
 export const API_GET_DRYLIST='/dryWarehouse/getInfo'
 // 计算折干后重量
 export const API_GET_DRYWEIGHT='/warehousingOrder/dryWeight'
+// 货权转出
+export const API_SET_ROLLOUT='/cargoTitleDetails/api/addInfo'
+// 修改货权赎回状态
+export const API_EDIT_ROLLOUT='/cargoTitleDetails/api/editStatus'
+// 待赎回
+export const API_REDEEMEDINFO='/contractManagementInfo/toBeRedeemedInfo'
+// 货权明细
+export const API_GETROLL='/cargoTitleDetails/selectInfo'
+// 客户操作记录
+export const API_GET_CUSACTIONINFO='/cargoTitleDetails/selectCusActionInfo'
+// 客户操作记录-拒收
+export const API_GET_CUSACTIONINFO_REJECT='/cargoTitleDetails/api/rejection'
+// 货权转入
+export const API_SET_ROLLIN='/cargoTitleDetails/api/toChangeInto'

+ 4 - 0
src/lang/zh.js

@@ -675,6 +675,10 @@ export default {
     purchasDetail: '采购详情',
     billDetail: '备件结算详情',
     warehousingOrder: '入库单',
+    awaitrAnsom:'入库单  /  待赎回',
+    customerrecord:'客户操作记录',
+    goodsrollIn:'货权转入',
+    gooddetail:'货权明细',
     storageCharge:'仓储费',
     earnestmoney:'保证金',
     oilcost:'油费',

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

@@ -77,7 +77,14 @@ import {
     API_SPONSOR_WITHDRAW,
     API_EXPORT_ORDER,
     API_GET_DRYLIST,
-    API_GET_DRYWEIGHT
+    API_GET_DRYWEIGHT,
+    API_SET_ROLLOUT,
+    API_EDIT_ROLLOUT,
+    API_REDEEMEDINFO,
+    API_GETROLL,
+    API_GET_CUSACTIONINFO,
+    API_GET_CUSACTIONINFO_REJECT,
+    API_SET_ROLLIN
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -238,3 +245,17 @@ export const exportOrder = appRx.post(API_EXPORT_ORDER)
 export const getdrylist = appRx.get(API_GET_DRYLIST, errorCatcher, errorHandle, filter)
 // 计算折干后重量
 export const getdryweight = appRx.post(API_GET_DRYWEIGHT, errorCatcher, errorHandle, filter)
+// 货权转出
+export const setrollout = appRx.post(API_SET_ROLLOUT, errorCatcher, errorHandle, filter)
+// 修改货权赎回状态
+export const editrollout = appRx.post(API_EDIT_ROLLOUT, errorCatcher, errorHandle, filter)
+// 待赎回
+export const getredeemedinfo = appRx.get(API_REDEEMEDINFO, errorCatcher, errorHandle, filter)
+// 货权明细
+export const getroll = appRx.get(API_GETROLL, errorCatcher, errorHandle, filter)
+// 客户操作记录
+export const getcusationinfo = appRx.get(API_GET_CUSACTIONINFO, errorCatcher, errorHandle, filter)
+// 客户操作记录-拒收
+export const rejectcusationinfo = appRx.post(API_GET_CUSACTIONINFO_REJECT, errorCatcher, errorHandle, filter)
+// 货源转入
+export const setrollin = appRx.post(API_SET_ROLLIN, errorCatcher, errorHandle, filter)

+ 1 - 0
src/utils/request.js

@@ -94,6 +94,7 @@ service.interceptors.response.use(
         if (!msg || msg.indexOf('network.') >= 0) {
           msg = lang.t('network.timeout');
         }
+        var errormsg=msg.message?msg.message:msg
         EventBus.$emit('error', msg)
       }
     } else if (error.request) {

+ 9 - 3
src/views/contractManagement/purchaseContract.vue

@@ -617,9 +617,15 @@ export default {
           if (e == '发运结束') {
             data = { id: row.id, endFlag: 1 }
           } else if (e == '已完成') {
-            var response=await getsettlementprice({ contractNo: row.contractNo }).toPromise()
-            data = { id: row.id, settlementPrice: response}
-            text = `合同单价${response}元/吨,确定合同已完成?`
+            var response=await getsettlementprice({ contractNo: row.contractNo }).toPromise().catch(()=>{
+              row.status = row.currectstatus
+              return
+            })
+            if(row.status=='执行中'){
+              return
+            }
+              data = { id: row.id, settlementPrice: response}
+              text = `合同单价${response}元/吨,确定合同已完成?`   
           } else {
             data = { id: row.id }
           }

+ 3 - 0
src/views/contractManagement/purchaseContractAdd.vue

@@ -628,6 +628,7 @@ import { isUndefined } from 'xe-utils/methods'
         }
       },
       copySelect(e){
+
         for (let i = 0; i < this.outContractNo.length; i++) {
           if(this.outContractNo[i].contractNo==e){
             examineList({
@@ -675,6 +676,8 @@ import { isUndefined } from 'xe-utils/methods'
       },
       selectpriceType(e) {
         if (e == '随行就市') {
+          this.deptBudgetList.unitContractPrice=''
+          this.deptBudgetList.totalContractPrice=''
           // this.deptBudgetList.deliverType = '1'
         }
       },

+ 2 - 2
src/views/contractManagement/salesContractAdd.vue

@@ -688,14 +688,14 @@
           this.deptBudgetList.sourceProvince = data[0]
           this.deptBudgetList.sourceCity = data[1]
           this.deptBudgetList.sourceArea = data[2]
-          this.deptBudgetList.sourceGoods = data[3]
+          // this.deptBudgetList.sourceGoods = data[3]
           this.deptBudgetList.sourceLocation=data[5].lat+','+data[5].lng
         } else {
           this.newSelectedOptions1 = data[0] + '/' + data[1] + '/' + data[2]
           this.deptBudgetList.deliveryProvince = data[0]
           this.deptBudgetList.deliveryCity = data[1]
           this.deptBudgetList.deliveryArea = data[2]
-          this.deptBudgetList.placeDelivery = data[3]
+          // this.deptBudgetList.placeDelivery = data[3]
           this.deptBudgetList.deliveryLocation=data[5].lat+','+data[5].lng
         }
       },

+ 89 - 60
src/views/profitable/expensemanagementdetails.vue

@@ -29,34 +29,45 @@
               <el-option v-for="item in warehousNameList" :key="item.id" :label="item.warehouseName"
                 :value="item.warehouseName"></el-option>
             </el-select>
-            <el-select v-model="costNo" multiple filterable allow-create default-first-option placeholder="按编号筛选"
+            <!-- <el-select v-model="costNo" multiple filterable allow-create default-first-option placeholder="按编号筛选"
               clearable @change="getList1" class="options_css">
               <el-option v-for="item in choiceObj" :key="item.id" :label="item.costNo" :value="item.costNo">
               </el-option>
-            </el-select>
+            </el-select> -->
+            <el-input style="width: 255px;" class="options_css" v-model="searchKeyWord" placeholder="可按编号进行查找" clearable maxlength="500" type="input"
+           @keyup.enter.native="find()"></el-input>
             <el-select v-model="purpose" multiple filterable allow-create default-first-option placeholder="按用途筛选"
               clearable @change="getList1" class="options_css">
               <el-option v-for="item in costChoice" :key="item.id" :label="item.name" :value="item.name">
               </el-option>
             </el-select>
-            <el-select v-model="flowTo" multiple filterable allow-create default-first-option placeholder="按流向筛选"
+            <!-- <el-select v-model="flowTo" multiple filterable allow-create default-first-option placeholder="按流向筛选"
               clearable @change="getList1" class="options_css">
               <el-option v-for="item in flowToList" :key="item.id" :label="item.flowTo" :value="item.flowTo">
               </el-option>
-            </el-select>
+            </el-select> -->
+            <el-input style="width: 255px;" class="options_css" v-model="flowTo" placeholder="可按流向进行查找" clearable maxlength="500" type="input"
+           @keyup.enter.native="find()"></el-input>
 
-            <el-select v-model="expenseName" multiple filterable allow-create default-first-option placeholder="按费用名称筛选"
+            <!-- <el-select v-model="expenseName" multiple filterable allow-create default-first-option placeholder="按费用名称筛选"
               clearable @change="getList1" class="options_css">
               <el-option v-for="item in costNameList" :key="item.id" :label="item.expenseName"
                 :value="item.expenseName">
               </el-option>
-            </el-select>
-            <el-select v-model="unallocatedAmount" multiple filterable allow-create default-first-option
+            </el-select> -->
+            <el-input style="width: 280px;" class="options_css" v-model="expenseName" placeholder="可按费用名称进行查找" clearable maxlength="500" type="input"
+           @keyup.enter.native="find()"></el-input>
+            <!-- <el-select v-model="unallocatedAmount" multiple filterable allow-create default-first-option
               placeholder="按未分配金额筛选" clearable @change="getList1" class="options_css">
               <el-option v-for="item in moneyList" :key="item.id" :label="item.unallocatedAmount"
                 :value="item.unallocatedAmount">
               </el-option>
-            </el-select>
+            </el-select> -->
+          <el-select v-model="unallocatedAmount" filterable placeholder="" @change="unallocatedAmountChange" 
+            style="margin: 0 10px;width:200px">
+            <el-option key="全部金额" label="全部金额" value="" style="color: #8890b1" />
+            <el-option key="未分配金额大于0" label="未分配金额大于0" value="1" style="color: #8890b1" />
+          </el-select>
             <el-select v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选"
               clearable @change="getList1" class="options_css">
               <el-option v-for="item in personList" :key="item.id" :label="item.agent" :value="item.agent">
@@ -89,7 +100,7 @@
           <el-button @click="costChange(2)" :type="expensesPurpose == 2 ? 'primary' : ''">运费</el-button>
           <el-button @click="exportFile" type="primary">导出</el-button>
         </el-col>
-        <el-col style="text-align: right" :span="6">
+        <el-col style="text-align: right;display: flex;" :span="6">
           <el-button @click="coalCost()">燃料费</el-button>
           <el-badge v-if="approveStatus" is-dot class="item">
             <el-button style="margin-left: 10px" @click="oilcost()">油费</el-button>
@@ -132,6 +143,8 @@
                 <span v-else>-非粮款</span>
               </div>
               <div v-else-if="scope.row.expensesPurpose == 5">经营性费用</div>
+              <div v-else-if="scope.row.expensesPurpose == 7">备用金</div>
+              
               <div v-else>{{ scope.row.costType }}</div>
             </template>
           </el-table-column>
@@ -143,7 +156,7 @@
               <div v-else-if="scope.row.expensesPurpose == 3">
                 <span>{{ scope.row.warehouseName }}</span>
               </div>
-              <div v-else-if="scope.row.expensesPurpose == 5">中天昊元</div>
+              <div v-else-if="scope.row.expensesPurpose == 5 || scope.row.expensesPurpose == 7 ">中天昊元</div>
               <div v-else-if="scope.row.expensesPurpose == 2">
                 {{ scope.row.contractNo }}
               </div>
@@ -332,7 +345,7 @@ import {
   getXialaList,
   sponsorWithdraw,
   exportFile,
-  getcostNo,
+  // getcostNo,
   editfujian
 } from '@/model/profitable/index'
 import {
@@ -366,11 +379,15 @@ export default {
       deptCircularPage: {},
       searchType: '',
       searchKeyWord: '',
+      expenseName: '',//费用名称
       costNo: [],//编号
       purpose: [],//用途
-      flowTo: [],//流向
-      expenseName: [],//费用名称
-      unallocatedAmount: [],//未分配金额(元)
+      // flowTo: [],//流向
+      flowTo: '',//流向
+      flowFlag:'',
+      // expenseName: [],//费用名称
+      // unallocatedAmount: [],//未分配金额(元)
+      unallocatedAmount:'',//未分配金额(元)
       agent: [],//经办人
       startDate: '',
       endDate: '',
@@ -471,6 +488,9 @@ export default {
           })
       })
     },
+    unallocatedAmountChange(e){
+      this.getList()
+    },
     xiala() {
       //仓库筛选
     getwarehouse({
@@ -480,51 +500,51 @@ export default {
         .then((response) => {
           this.warehousNameList = response
         })
-      //搜索框下拉数据
-      getcostNo({
-        compId: localStorage.getItem('ws-pf_compId'),
-        // currentPage: 1,
-        // pageSize: 9999,
-      })
-        .toPromise()
-        .then((response) => {
-          this.choiceObj = response
-        })
+      // //搜索框下拉数据
+      // getcostNo({
+      //   compId: localStorage.getItem('ws-pf_compId'),
+      //   // currentPage: 1,
+      //   // pageSize: 9999,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.choiceObj = response
+      //   })
       //流向
-      getXialaList({
-        removeRepeatFlag: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          this.flowToList = response
-          for (let i = 0; i < this.flowToList.length; i++) {
-            if (this.flowToList[i].expensesPurpose == 3) {
-              this.flowToList[i].flowTo = this.flowToList[i].warehouseName
-            } else if (this.flowToList[i].expensesPurpose == 1) {
-              this.flowToList[i].flowTo = this.flowToList[i].contractNo
-            } else if (this.flowToList[i].expensesPurpose == 5) {
-              this.flowToList[i].flowTo = '中天昊元'
-            } else if (this.flowToList[i].expensesPurpose == 2) {
-              this.flowToList[i].flowTo = this.flowToList[i].contractNo
-            }
-          }
-        })
+      // getXialaList({
+      //   removeRepeatFlag: 1,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.flowToList = response
+      //     for (let i = 0; i < this.flowToList.length; i++) {
+      //       if (this.flowToList[i].expensesPurpose == 3) {
+      //         this.flowToList[i].flowTo = this.flowToList[i].warehouseName
+      //       } else if (this.flowToList[i].expensesPurpose == 1) {
+      //         this.flowToList[i].flowTo = this.flowToList[i].contractNo
+      //       } else if (this.flowToList[i].expensesPurpose == 5) {
+      //         this.flowToList[i].flowTo = '中天昊元'
+      //       } else if (this.flowToList[i].expensesPurpose == 2) {
+      //         this.flowToList[i].flowTo = this.flowToList[i].contractNo
+      //       }
+      //     }
+      //   })
       //费用名称
-      getXialaList({
-        removeRepeatFlag: 2,
-      })
-        .toPromise()
-        .then((response) => {
-          this.costNameList = response
-        })
-      //未分配金额
-      getXialaList({
-        removeRepeatFlag: 3,
-      })
-        .toPromise()
-        .then((response) => {
-          this.moneyList = response
-        })
+      // getXialaList({
+      //   removeRepeatFlag: 2,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.costNameList = response
+      //   })
+      // //未分配金额
+      // getXialaList({
+      //   removeRepeatFlag: 3,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.moneyList = response
+      //   })
       //经办人
       getXialaList({
         removeRepeatFlag: 4,
@@ -887,7 +907,13 @@ export default {
       this.value = [this.startDate, this.endDate]
     },
     getList() {
-      this.getfielfillingList()
+      if(this.flowTo == '中天昊元'){
+        this.flowFlag = 1
+        this.flowTo = ''
+      }else{
+        this.flowFlag = ''
+      }
+      // this.getfielfillingList()
       getexenseinfo({
         // warehouseType: 1,
         compId: localStorage.getItem('ws-pf_compId'),
@@ -896,16 +922,19 @@ export default {
         startDate: localStorage.getItem('startDate'),
         endDate: localStorage.getItem('endDate'),
         searchKeyWord: this.searchKeyWord,
+        expenseName:this.expenseName,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         expensesPurpose: this.expensesPurpose,
         costNo: this.costNo.length > 0 ? this.costNo.toString() : '',
         purpose: this.purpose.length > 0 ? this.purpose.toString() : '',
-        expenseName: this.expenseName.length > 0 ? this.expenseName.toString() : '',
+        // expenseName: this.expenseName.length > 0 ? this.expenseName.toString() : '',
         unallocatedNumber: this.unallocatedAmount.length > 0 ? this.unallocatedAmount.toString() : '',
         agent: this.agent.length > 0 ? this.agent.toString() : '',
-        flowTo: this.flowTo.length > 0 ? this.flowTo.toString() : '',
+        flowTo: this.flowTo,
+        flowFlag:this.flowFlag,
+        unallocatedAmount:this.unallocatedAmount,
         warehouseName: this.warehouseName,
         toExamineType: this.toExamineType,
       })

+ 4 - 1
src/views/taskManagement/supplyofgoods.vue

@@ -232,12 +232,15 @@
           .then((response) => {
             this.goodsList = response
           })
-      this.getNowTime()
       this.baseId=this.$route.query.baseId
       if(this.$route.query.status){
         this.status=true
         this.goodsName='玉米'
+      }else{
+        this.status=false
+        this.goodsName=''
       }
+      this.getNowTime()
       this.showType = this.isShow
     },
     methods: {

+ 289 - 0
src/views/warehousenew/awaitRansom.vue

@@ -0,0 +1,289 @@
+//待赎回
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">待赎回</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="6">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="18">
+          <div style='margin-left:10px;' class="datascreen">
+            <div style="display:inline-block;width:50;">
+              <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
+            </el-date-picker></div>
+            <el-input placeholder="可按合同编号、接收公司查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">未完成</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">已完成</el-button>
+        </el-col>
+        <el-col style='padding-right:10px;text-align:right;' :span="6">
+          合计待赎回:{{num}}吨
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="contractNo" label="合同编号">
+          </el-table-column>
+          <el-table-column prop="receivingCompany" label="接收公司">
+          </el-table-column>
+          <el-table-column prop="cumulativeTransfer" label="累计转出(吨)"></el-table-column>
+          <el-table-column prop="expectedRedemption" label="预计赎回(吨)"></el-table-column>
+          <el-table-column width="120" prop="redeemed" label="已赎回(吨)">
+          </el-table-column>
+           <el-table-column width="150" prop="settlementPrice" label="待赎回(吨)">
+          </el-table-column>
+          <el-table-column width="120" prop="signingDate" label="合同签订日期">
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+
+import {
+  getredeemedinfo
+} from '@/model/warehouse/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: '',
+        tableData: [],
+        show:false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        searchType:'',
+        searchKeyWord:'',
+        startDate:'',
+        endDate:'',
+        tableData:{},
+        datalist:{},
+        num:0,
+        compId:localStorage.getItem('ws-pf_compId'),
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      handleClose1(){
+        this.show=false
+      },
+      typeChange(num){
+        this.searchType= num
+        this.getList()
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      async getList() {
+         var response=await getredeemedinfo({
+            // warehouseType: 1,
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType,
+            dropFlag:0,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          // 合计
+          var response1=await getredeemedinfo({
+            // warehouseType: 1,
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:9999 ,
+            searchType:this.searchType,
+            dropFlag:0,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          for (let i = 0; i < response.records.length; i++) {
+            response.records[i].settlementPrice=(response.records[i].expectedRedemption-response.records[i].redeemed).toFixed(3)
+          }
+          this.num=0
+          for (let i = 0; i < response1.records.length; i++) {
+            this.num+=Number((response1.records[i].expectedRedemption-response1.records[i].redeemed).toFixed(3))
+          }
+          this.num=this.num.toFixed(3)
+            this.tableData = response.records
+           this.deptBudgetTotal = response.total
+      },
+
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }else{
+          this.startDate = ''
+          this.endDate = ''
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+  .el-icon-connection{
+    color:#409eff;
+  }
+</style>

+ 63 - 0
src/views/warehousenew/component/router/index.js

@@ -508,6 +508,69 @@ const warehouseManagementRouter = {
       },
       hidden: true
     },
+    // {
+    //   path: 'awaitRansom',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/awaitRansom'),
+    //   name: 'awaitRansom',
+    //   meta: {
+    //     title: 'awaitrAnsom',
+    //     shortcutEntrance: 'warehouseManagementList',
+    //     module: 'warehouseManagement.warehouse.warehouseInfo',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'待赎回'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden:true
+    // },
+    // {
+    //   path: 'gooddetail',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/gooddetail'),
+    //   name: 'gooddetail',
+    //   meta: {
+    //     title: 'gooddetail',
+    //     shortcutEntrance: 'warehouseManagementList',
+    //     module: 'warehouseManagement.warehouse.warehouseInfo',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'货权明细'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    // },
+    // {
+    //   path: 'customerrecord',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/customerrecord'),
+    //   name: 'customerrecord',
+    //   meta: {
+    //     title: 'customerrecord',
+    //     shortcutEntrance: 'warehouseManagementList',
+    //     module: 'warehouseManagement.warehouse.warehouseInfo',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'客户操作记录'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden:true
+    // },
+    // {
+    //   path: 'goodsrollIn',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/goodsrollIn'),
+    //   name: 'goodsrollIn',
+    //   meta: {
+    //     title: 'goodsrollIn',
+    //     shortcutEntrance: 'warehouseManagementList',
+    //     module: 'warehouseManagement.warehouse.warehouseInfo',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'货权转入'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden:true
+    // },
   ],
 };
 export default warehouseManagementRouter;

+ 282 - 0
src/views/warehousenew/customerrecord.vue

@@ -0,0 +1,282 @@
+//客户操作记录
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">客户操作记录</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="6">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="18">
+          <div style='margin-left:10px;' class="datascreen">
+            <div style="display:inline-block;width:50;">
+              <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
+            </el-date-picker></div>
+            <el-input placeholder="可按业务编号、合同编号、客户查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="relationReceiveNo" label="我司业务编号">
+          </el-table-column>
+          <el-table-column prop="transferOutNo" label="客户业务编号">
+          </el-table-column>
+          <el-table-column prop="outContractNo" label="客户销售合同编号"></el-table-column>
+          <el-table-column prop="customer" label="客户"></el-table-column>
+          <el-table-column width="200" prop="agent" label="期初粮款数据(元)">
+            <template scope="scope">
+              应付{{scope.row.amountIngPayable}}-已付{{scope.row.amountEdPayable}}=未付{{scope.row.amountNotPayable}}
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="transferOutWeight" label="重量(吨)">
+          </el-table-column>
+          <el-table-column width="120" prop="salePrice" label="售价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" prop="updateDate" label="日期">
+          </el-table-column>
+          <el-table-column width="120" prop="status" label="状态">
+          </el-table-column>
+          <el-table-column width="120" label="操作">
+            <template scope="scope">
+              <el-button v-if="scope.row.status=='待接收'" @click="rejection(scope.row)" type="text">拒收</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+
+import {
+  getcusationinfo,
+  rejectcusationinfo
+} from '@/model/warehouse/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: '',
+        tableData: [],
+        show:false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        agreementType:'',
+        deptCircularPage: {},
+        searchType:'',
+        searchKeyWord:'',
+        startDate:'',
+        endDate:'',
+        tableData:{},
+        datalist:{},
+        currectData:{},
+        compId:localStorage.getItem('ws-pf_compId'),
+        binNumbershow:false,
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      lookbinNumber(item){
+        this.currectData=item
+        this.binNumbershow=true
+      },
+      handleClose1(){
+        this.show=false
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      rejection(row){
+        this.$confirm('确定拒收该笔货权?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          rejectcusationinfo({id:row.id}).toPromise().then((response) => {
+              this.$message.success('操作成功!')
+              // row.weightedit=false
+              this.getList()
+            })
+        })
+      },
+      async getList() {
+         var response=await getcusationinfo({
+            // warehouseType: 1,
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+            this.tableData = response.records
+           this.deptBudgetTotal = response.total
+      },
+
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+  .el-icon-connection{
+    color:#409eff;
+  }
+  .flex{
+    display:flex;justify-content: space-between;
+  }
+</style>

+ 316 - 0
src/views/warehousenew/gooddetail.vue

@@ -0,0 +1,316 @@
+//货权明细
+<template>
+  <div class="container">
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="6">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="18">
+          <div style='margin-left:10px;' class="datascreen">
+            <div style="display:inline-block;width:50;">
+              <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
+            </el-date-picker></div>
+            <el-input placeholder="可按业务编号、合同编号、客户查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">转入</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">转出</el-button>
+        </el-col>
+        <el-col style="text-align:right;padding-right:10px;" :span="6">
+          <el-button @click="handlerecord" type="primary">客户操作记录</el-button>
+          <el-button @click="rollin" type="primary">货权转入</el-button>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="transferOutNo" label="业务编号">
+          </el-table-column>
+          <el-table-column prop="relationReceiveNo" label="关联业务编号">
+            <template scope="scope">
+              <span v-if="scope.row.transferFlag==1"></span>
+              <span v-if="scope.row.transferFlag==2">{{scope.row.relationReceiveNo}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="outContractNo" label="合同编号"></el-table-column>
+          <el-table-column prop="customer" label="客户">
+            <template scope="scope">
+              <span v-if="scope.row.transferFlag==1">{{scope.row.receiveCompName}}</span>
+              <span v-if="scope.row.transferFlag==2">{{scope.row.customer}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="warehouseName" label="库点名称">
+          </el-table-column>
+           <el-table-column width="150" prop="settlementPrice" label="仓位">
+            <template scope="scope">
+              <el-button @click="lookbinNumber(scope.row)" type="text">查看</el-button>
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="signingDate" label="类型">
+            <template scope="scope">
+
+             <span v-if="scope.row.transferFlag==1">转出</span>
+             <span v-if="scope.row.transferFlag==2">转入</span>
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="agent" label="经办人">
+          </el-table-column>
+          <el-table-column width="200" prop="agent" label="期初粮款数据(元)">
+            <template scope="scope">
+              应付{{scope.row.amountIngPayable}}-已付{{scope.row.amountEdPayable}}=未付{{scope.row.amountNotPayable}}
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="transferOutWeight" label="重量(吨)">
+          </el-table-column>
+          <el-table-column width="120" prop="avgCost" label="成本(元/吨)">
+            <template scope="scope">
+              <span v-if="scope.row.transferFlag==1">{{scope.row.salePrice}}</span>
+              <span v-if="scope.row.transferFlag==2">{{scope.row.avgCost}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column width="120" prop="updateDate" label="日期">
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+      <el-dialog width='50%' :visible.sync="binNumbershow" :title="'仓位详情-'+(currectData.transferFlag==1?'转出':'')" top="20vh">
+        <div class="flex"><div>仓位号</div><div>重量(吨)</div></div>
+        <div class="flex" v-for="item in currectData.cargoPositionDetailsList">
+          <div>{{ item.binNumber }}</div>
+          <div>{{ item.weight }}</div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+
+import {
+  getroll
+} from '@/model/warehouse/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: '',
+        tableData: [],
+        show:false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        agreementType:'',
+        deptCircularPage: {},
+        searchType:'',
+        searchKeyWord:'',
+        startDate:'',
+        endDate:'',
+        tableData:{},
+        datalist:{},
+        currectData:{},
+        compId:localStorage.getItem('ws-pf_compId'),
+        binNumbershow:false,
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      lookbinNumber(item){
+        this.currectData=item
+        this.binNumbershow=true
+      },
+      typeChange(num){
+        this.searchType=num
+        this.getList()
+      },
+      handleClose1(){
+        this.show=false
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      handlerecord(){
+        this.$router.push({path:'customerrecord'})
+      },
+      rollin(){
+        this.$router.push({path:'goodsrollIn'})
+      },
+
+      async getList() {
+         var response=await getroll({
+            // warehouseType: 1,
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType,
+            
+            dropFlag:0,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+            this.tableData = response.records
+           this.deptBudgetTotal = response.total
+      },
+
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+  .el-icon-connection{
+    color:#409eff;
+  }
+  .flex{
+    display:flex;justify-content: space-between;
+  }
+</style>

+ 457 - 0
src/views/warehousenew/goodsrollIn.vue

@@ -0,0 +1,457 @@
+//货权转入
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">货权转入</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+        <el-form ref="form" :model="form" label-width="200px">
+            <el-form-item label="关联货权转出记录">
+                <el-select @change="receiveNochange" v-model="form.relationReceiveNo" placeholder="选择关联货权">
+                    <el-option label="不关联" value="不关联"></el-option>
+                    <el-option v-for="item in cusationinfo" :key="item.id" :label="item.relationReceiveNo+('('+item.transferOutWeight+'吨)')" :value="item.relationReceiveNo"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="合同编号">
+                <el-select @change="contractNochange" v-model="form.outContractNo" placeholder="请选择合同编号">
+                <el-option v-for="item in contractNoList" :key="item.id" :label="item.contractNo" :value="item.contractNo"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="客户">
+                <el-input disabled placeholder="自动获取,不可编辑" v-model="form.customer"></el-input>
+            </el-form-item>
+            <el-form-item label="货名">
+                <el-select @change="goosnamechange" v-model="form.goodsName" placeholder="选择货名">
+                    <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="是否为货权赎回">
+                <el-radio-group v-model="form.redeemFlag">
+                    <el-radio label="0" >否</el-radio>
+                    <el-radio label="1" >是</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item v-if="form.redeemFlag==1" label="待赎回合同">
+                <el-select v-model="form.redeemContractNo" placeholder="选择待赎回的合同">
+                    <el-option v-for="item in tableData" :key="item.id" :label="item.contractNo" :value="item.contractNo"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="平均成本(元/吨)">
+                <el-input v-model="form.avgCost" placeholder="输入平均成本"></el-input>
+            </el-form-item>
+            <el-form-item label="应付粮款(元)">
+                <el-input @input="amountinginput" v-model="form.amountIngPayable" placeholder="输入粮款金额"></el-input>
+            </el-form-item>
+            <el-form-item label="已付粮款(元)">
+                <el-input @input="amountedinput" v-model="form.amountEdPayable" placeholder="输入粮款金额"></el-input>
+            </el-form-item>
+            <el-form-item label="未付粮款(元)">
+                <el-input disabled v-model="form.amountNotPayable" placeholder="自动计算,不可编辑"></el-input>
+            </el-form-item>
+            <el-form-item label="库点">
+                <el-select @change="warehouseNamechange" v-model="form.warehouseName" placeholder="选择库点">
+                    <el-option  v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"></el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <el-form :inline="true" label-width="200px" v-for="(item,index) in form.cargoPositionDetailsList" :key="'cangwe'+index" class="demo-form-inline">
+          <el-form-item :label="'仓位-'+(index+1)">
+            <el-select @focus="binNumberfocus" clearable filterable @change="($event)=>binNumberchange($event,item,index)" v-model="item.binNumber" placeholder="选择仓位">
+              <el-option v-for="item1 in binNumberList" :label="item1.binNumber" :value="item1.binNumber"></el-option>
+            </el-select>
+          </el-form-item> 
+          <el-form-item label="入库重量(吨)">
+            <el-input @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
+          </el-form-item>
+          <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
+          <img width="22" height="22" class="del" @click="del(index)" src="../../../public/img/del.png" alt="" />
+        </el-form>
+        <el-form label-width="200px">
+            <el-form-item label="合计重量">
+                <el-input disabled v-model="form.transferOutWeight" placeholder="自动计算,不可编辑"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" @click="onSubmit">提交</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+  </div>
+</template>
+<script>
+
+import {
+    getredeemedinfo,
+    getcusationinfo,
+    setrollin
+} from '@/model/warehouse/index'
+import {
+    packList,
+  } from '@/model/contarct/index'
+  import {
+    getwarehouse
+  } from '@/model/houseSelfCollect/index'
+import {xialaNo} from '@/model/tasksport/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        cusationinfo:[],
+        tableData:[],
+        contractNoList:[],
+        goodnameList:[],
+        warehouseList:[],
+        binNumberList:[],
+        rollweight:0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        form:{
+            relationReceiveNo:'不关联',
+            redeemFlag:'0',
+            cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
+            compId: localStorage.getItem('ws-pf_compId')
+        }
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+    amountinginput(e){
+        if(this.form.amountEdPayable){
+            this.form.amountNotPayable=e-this.form.amountEdPayable
+        }
+    },
+    amountedinput(e){
+        if(this.form.amountIngPayable){
+            this.form.amountNotPayable=this.form.amountIngPayable-e
+        }
+    },
+    del(index){
+        if(this.form.cargoPositionDetailsList.length>1){
+            this.form.cargoPositionDetailsList.splice(index,1)
+        }else{
+            this.$message.error('至少保留一条仓位!')
+        }
+        this.form.transferOutWeight=0
+        for (let i = 0; i < this.form.cargoPositionDetailsList.length; i++) {
+                if(this.form.cargoPositionDetailsList[i].weight){
+                this.form.transferOutWeight+=Number(this.form.cargoPositionDetailsList[i].weight)
+                }
+            }
+        this.form.transferOutWeight=this.form.transferOutWeight.toFixed(3)
+    },
+    add(){
+      this.form.cargoPositionDetailsList.push({binNumber:'',positionId:'',weight:'',goodsweight:''})
+      this.$forceUpdate()
+    },
+    onSubmit(){
+        if(!this.form.outContractNo){
+            this.$message.error('合同编号不能为空!')
+            return
+        }
+        if(!this.form.goodsName){
+            this.$message.error('货名不能为空!')
+            return
+        }
+        if(this.form.redeemFlag==1&&!this.form.redeemContractNo){
+            this.$message.error('待赎回合同不能为空!')
+            return
+        }
+        if(!this.form.avgCost){
+            this.$message.error('平均成本不能为空!')
+            return
+        }
+        if(!this.form.amountIngPayable&&this.form.amountIngPayable!=0){
+            this.$message.error('应付粮款不能为空!')
+            return
+        }
+        if(!this.form.amountEdPayable&&this.form.amountEdPayable!=0){
+            this.$message.error('已付粮款不能为空!')
+            return
+        }
+        if(!this.form.amountNotPayable&&this.form.amountNotPayable!=0){
+            this.$message.error('未付粮款不能为空!')
+            return
+        }
+        if(!this.form.warehouseName){
+            this.$message.error('库点不能为空!')
+            return
+        }
+            for (let i = 0; i < this.form.cargoPositionDetailsList.length; i++) {
+                if(!this.form.cargoPositionDetailsList[i].binNumber){
+                this.$message.error('仓位号不能为空!')
+                return
+                }
+                if(!this.form.cargoPositionDetailsList[i].weight){
+                this.$message.error('入库重量不能为空!')
+                return
+                }
+                if(this.form.cargoPositionDetailsList[i].weight<0||
+                String(this.form.cargoPositionDetailsList[i].weight).indexOf(".") != -1 && String(this.form.cargoPositionDetailsList[i].weight).split('.')[1].length > 3){
+                this.$message.error('入库重量输入错误!')
+                return
+                }
+                var binNumberdata=this.form.cargoPositionDetailsList.filter((item)=>{return item.binNumber==this.form.cargoPositionDetailsList[i].binNumber})
+                if(binNumberdata.length>1){
+                this.$message.error('仓位号不能重复!')
+                return
+                }
+            }
+            if(this.form.transferOutWeight!=this.form.transferOutWeight1&&this.form.relationReceiveNo!='不关联'){
+                this.$message.error('入库重量与出库重量不相等!')
+                return
+            }
+            this.$confirm('确定提交货权转移信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+            })
+                .then(() => {
+                    setrollin(this.form).toPromise()
+                    .then((response) => {
+                    this.$message.success('提交成功!')
+                    this.$router.go(-1)
+                    // row.weightedit=false
+                    this.getList()
+                    }).catch((req)=>{
+                    this.$message.error(req.message)
+                    })
+                })
+        },
+        returnsales(){
+        this.$router.go(-1)
+      },
+        binNumberchange(e,item,index){
+            for (let i = 0; i < this.binNumberList.length; i++) {
+                if(this.binNumberList[i].binNumber==e){
+                item.positionId=this.binNumberList[i].id
+                }
+            }
+        },
+        binNumberfocus(){
+            if(!this.form.warehouseName){
+                this.$message.error('请选择库点!')
+            }
+        },
+        async warehouseNamechange(e){
+            for (let i = 0; i < this.warehouseList.length; i++) {
+                this.form.baseId=this.warehouseList[i].id
+                if(this.form.warehouseName==this.warehouseList[i].warehouseName){
+                    console.log(this.warehouseList[i].positionInfos,111111)
+                    this.binNumberList = this.warehouseList[i].positionInfos
+                    this.$forceUpdate()
+                }
+            }
+        },
+        weightinput(e){
+            this.form.transferOutWeight=0
+            for (let i = 0; i < this.form.cargoPositionDetailsList.length; i++) {
+                if(this.form.cargoPositionDetailsList[i].weight){
+                this.form.transferOutWeight+=Number(this.form.cargoPositionDetailsList[i].weight)
+                }
+            }
+            this.form.transferOutWeight=this.form.transferOutWeight.toFixed(3)
+        },
+    contractNochange(e){
+        for (let i = 0; i < this.contractNoList.length; i++) {
+            if(this.contractNoList[i].contractNo==e&&this.form.relationReceiveNo=='不关联'){
+                this.$set(this.form,'customer',this.contractNoList[i].seller)
+            }
+            if(this.contractNoList[i].contractNo==e){
+              this.$set(this.form,'contractSeller',this.contractNoList[i].seller)
+                this.$set(this.form,'goodsName',this.contractNoList[i].goodsName)
+                this.$set(this.form,'goodsNameKey',this.contractNoList[i].goodsNameKey)
+                this.$set(this.form,'avgCost',this.contractNoList[i].unitContractPrice)
+            }
+        }
+    },
+    receiveNochange(e){
+        for (let i = 0; i < this.cusationinfo.length; i++) {
+            if(this.cusationinfo[i].relationReceiveNo==e){
+                this.$set(this.form,'customer',this.cusationinfo[i].customer)
+                this.$set(this.form,'transferOutWeight1',this.cusationinfo[i].transferOutWeight)
+                this.$set(this.form,'amountIngPayable',this.cusationinfo[i].amountIngPayable)
+                this.$set(this.form,'amountEdPayable',this.cusationinfo[i].amountEdPayable)
+                this.$set(this.form,'amountNotPayable',this.cusationinfo[i].amountNotPayable)
+            } 
+        }
+    },
+    goosnamechange(e){
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.form.goodsNameKey = this.goodnameList[i].constKey
+          }
+        }
+    },
+    async getList() {
+        var response=await getcusationinfo({
+            searchType:1,
+            currentPage: 1,
+            pageSize:9999,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          this.cusationinfo=response.records
+          this.contractNoList=await xialaNo({compId: localStorage.getItem('ws-pf_compId'),flag: 0}).toPromise()
+          this.warehouseList=await getwarehouse({compId: this.compId}).toPromise()
+          // 货名
+          this.goodnameList =await packList({
+            constId: 'CON2',
+          })
+          .toPromise()
+         var response1=await getredeemedinfo({
+            dropFlag:1,
+            pageSize:9999 ,
+            currentPage: 1,
+            compId:localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+            this.tableData = response1.records
+           this.deptBudgetTotal = response.total
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+  .el-icon-connection{
+    color:#409eff;
+  }
+  .flex{
+    display:flex;justify-content: space-between;
+  }
+  .el-form{
+    width:50%;
+    margin:0 auto; 
+    position:relative;
+  }
+  /deep/.el-form .el-select{
+    width:100%;
+  }
+  /deep/.el-form.el-form--inline{
+    margin-bottom:18px;
+  }
+  /deep/.el-form.el-form--inline .el-form-item{
+      margin:0;
+}
+.add,.del{
+      position:absolute;
+      top:50%;
+      transform:translateY(-50%);
+      right:25px;
+    }
+    .del{
+      right:-2px;
+    }
+</style>

+ 416 - 11
src/views/warehousenew/warehousingOrder.vue

@@ -62,7 +62,10 @@
       <el-col style='text-align:right;' :span="12">
         <!-- <ws-button v-hasPermission="
             `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
-            <ws-button  type="primary" @click="exportList()">导出</ws-button>
+        <!-- <ws-button  type="primary" @click="awatingransom()">待赎回</ws-button>
+        <ws-button  type="primary" @click="editRollout()">修改赎回状态</ws-button>
+        <ws-button  type="primary" @click="goodrollOut()">货权转出</ws-button> -->
+        <ws-button  type="primary" @click="exportList()">导出</ws-button>
         <ws-button v-hasPermission="
         `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
         <ws-button v-hasPermission="
@@ -163,6 +166,18 @@
           </template>
         </el-table-column>
         <el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
+        <!-- <el-table-column prop="transferOutWeight" width="200" class="table_td" label="转出">
+          <template scope="scope">
+            <el-popover v-if="scope.row.transferOutWeight>0"
+              placement="top-start"
+              width="220"
+              trigger="hover"
+              :content="scope.row.transferOutNo">
+              <span slot="reference" :style="scope.row.transferOutWeight>0?'color:#5F7DE9;':''">{{ scope.row.transferOutWeight }} <span v-if="scope.row.redeemFlag=='赎'">(赎)</span></span>
+            </el-popover>
+            <span v-else>{{ scope.row.transferOutWeight }}</span>
+          </template>
+        </el-table-column> -->
         <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
         <el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
         <el-table-column prop="grainFund" width="80" class="table_td" label="粮款(元)"></el-table-column>
@@ -467,6 +482,57 @@
     <el-dialog width='30%' :visible.sync="remarkList" title="备注" top="20vh">
       <span>{{ remark }}</span>
     </el-dialog>
+    <el-dialog width='50%' :visible.sync="rolloutShow" title="货权转出" top="20vh">
+      <div class="form-inline">
+        <div style="margin:10px;">
+          选中{{ rolloutData.warehousingOrderList.length }}条:{{rolloutData.warehouseName}}&nbsp;转出&nbsp;{{ rolloutData.goodsName }}&nbsp;
+          {{ rolloutData.transferOutWeight }}吨&nbsp;应付{{rolloutData.amountIngPayable}}&nbsp; 已付{{rolloutData.amountEdPayable}}&nbsp; 
+          未付{{rolloutData.amountNotPayable}}&nbsp; 平均成本 {{ rolloutData.avgCost }}
+        </div>
+        <el-form :inline="true" label-width="120px" class="demo-form-inline">
+          <el-form-item label="售价(元/吨)">
+            <el-input v-model="rolloutData.salePrice" placeholder="输入货权转出售价"></el-input>
+          </el-form-item>
+          <el-form-item label="是否赎回">
+            <el-radio v-model="rolloutData.redeemFlag" label="1">暂定赎回</el-radio>
+            <el-radio v-model="rolloutData.redeemFlag" label="0">永不赎回</el-radio>
+          </el-form-item>
+        </el-form>
+        <el-form :inline="true" label-width="120px" class="demo-form-inline">
+          <el-form-item label="合同编号">
+            <el-select clearable filterable @change="contractNochange" v-model="rolloutData.outContractNo" placeholder="选择合同编号">
+              <el-option v-for="item in contractNoList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <el-form :inline="true" label-width="120px" class="demo-form-inline">
+          <el-form-item label="是否赎回">
+            <el-radio v-model="rolloutData.systemIdentification" label="1">易粮易运用户</el-radio>
+            <el-radio v-model="rolloutData.systemIdentification" label="0">非易粮易运用户</el-radio>
+          </el-form-item>
+          <el-form-item label="">
+            <el-input v-model="rolloutData.receiveCompName" placeholder="输入货权接收公司全称"></el-input>
+          </el-form-item>
+        </el-form>
+        <el-form :inline="true" label-width="120px" v-for="(item,index) in rolloutData.cargoPositionDetailsList" class="demo-form-inline">
+          <el-form-item :label="'仓位-'+(index+1)">
+            <el-select clearable filterable @change="($event)=>binNumberchange($event,item,index)" v-model="item.binNumber" placeholder="选择仓位">
+              <el-option v-for="item1 in binNumberList" :label="item1.binNumber+'('+item1.goodsweight+')'" :value="item1.binNumber"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="出库重量(吨)">
+            <el-input @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
+          </el-form-item>
+          <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
+          <img width="22" height="22" class="del" @click="del(index)" src="../../../public/img/del.png" alt="" />
+        </el-form>
+        <div style="text-align: right;margin: 10px;">合计:{{rollweight}}吨</div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="rolloutShow = false">取 消</el-button>
+          <el-button type="primary" @click="rolloutclick">确 定</el-button>
+        </span>
+      </div>
+    </el-dialog>
     <el-dialog width='50%' :visible.sync="interestrateshow" title="修改利率" top="20vh">
       <el-input placeholder="" v-model="interestratevalue.value"></el-input>
       <span slot="footer" class="dialog-footer">
@@ -534,6 +600,7 @@
   </div>
 </template>
 <script>
+import { allRoles } from '@/utils/util'
 import {
   getoreditoutput,
   outdelete,
@@ -554,7 +621,10 @@ import {
   getbyname,
   sponsorWithdraw,
   exportOrder,
-  getdryweight
+  getdryweight,
+  getbinnumber,
+  setrollout,
+  editrollout
 } from '@/model/warehouse/index'
 import {
   selectWarehouseSelf,
@@ -570,6 +640,9 @@ import {
   fmoney,
   EventBus
 } from 'base-core-lib'
+import {
+		xialaNo,
+	} from '@/model/tasksport/index'
 import { findLastIndexOfIterate } from 'xe-utils/methods'
 export default {
   name: 'viewSpareMoney',
@@ -599,7 +672,24 @@ export default {
       EndDate:'',
       rejectshow:false,
       options: [],
+      rollweight:0,
+      rolloutData:{
+        warehouseId:'',
+        warehouseName:'',
+        goodsName:'',
+        transferOutWeight:0,
+        amountEdPayable:0,
+        amountNotPayable:0,
+        amountIngPayable:0,
+        avgCost:0,
+        redeemFlag:'1',
+        systemIdentification:'1',
+        warehousingOrderList:[],
+        cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
+        compId: localStorage.getItem('ws-pf_compId')
+      },
       isShowPrintType: false,
+      rolloutShow:false,
       // warehouseAllXiaLa:[],
       textarea: '',
       weightGreater:'',
@@ -744,7 +834,9 @@ export default {
       titletype: '',
       remark: '',
       baseId:'',
-      auditMind:''
+      auditMind:'',
+      contractNoList:[],
+      binNumberList:[],
     }
   },
   // activated() {
@@ -768,6 +860,285 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    weightinput(e){
+      this.rollweight=0
+      for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
+        if(this.rolloutData.cargoPositionDetailsList[i].weight){
+          this.rollweight+=Number(this.rolloutData.cargoPositionDetailsList[i].weight)
+        }
+      }
+      this.rollweight=this.rollweight.toFixed(3)
+    },
+    contractNochange(e){
+      for (let i = 0; i < this.contractNoList.length; i++) {
+        if(this.contractNoList[i].contractNo==e){
+          this.rolloutData.receiveCompName=this.contractNoList[i].buyer
+        }
+      }
+      
+    },
+    awatingransom(){
+      this.$router.push({path: 'awaitRansom'})
+    },
+    editRollout(){
+      var concatarr=[]
+      var arr=[]
+      for (const key in this.multipleSelection1) {
+        concatarr = concatarr.concat(this.multipleSelection1[key])
+      }
+      if(concatarr.length==0){
+        this.$message.error('至少勾选一条!')
+        return 
+      }
+      for (const key in this.multipleSelection1) {
+        var array = this.multipleSelection1[key]
+        for (let i = 0; i < array.length; i++) {
+          if(array[i].redeemFlag == '赎'){
+            arr.push(array[i])
+          }else{
+            this.$message.error('请勾选需要赎回的货源!')
+            return
+          }
+        }
+        
+      }
+      this.$confirm('确定以上货源不再赎回?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editrollout({warehousingOrderList:concatarr}).toPromise()
+            .then((response) => {
+              this.$message.success('操作成功!')
+              // row.weightedit=false
+              this.getList()
+            })
+        })
+    },
+    rolloutclick(){
+      if(!this.rolloutData.salePrice){
+        this.$message.error('转出售价不能为空!')
+        return
+      }
+      if(!this.rolloutData.outContractNo){
+        this.$message.error('合同编号不能为空!')
+        return
+      }
+      if(this.rolloutData.systemIdentification==1&&!this.rolloutData.receiveCompName){
+        this.$message.error('货权接收公司不存在!')
+        return
+      }
+      for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
+        if(!this.rolloutData.cargoPositionDetailsList[i].binNumber){
+          this.$message.error('仓位号不能为空!')
+          return
+        }
+        if(!this.rolloutData.cargoPositionDetailsList[i].weight){
+          this.$message.error('出库重量不能为空!')
+          return
+        }
+        if(this.rolloutData.cargoPositionDetailsList[i].weight<0||
+        String(this.rolloutData.cargoPositionDetailsList[i].weight).indexOf(".") != -1 && String(this.rolloutData.cargoPositionDetailsList[i].weight).split('.')[1].length > 3){
+          this.$message.error('出库重量输入错误!')
+          return
+        }
+        if(this.rolloutData.cargoPositionDetailsList[i].weight>this.rolloutData.cargoPositionDetailsList[i].goodsweight){
+          this.$message.error('出库重量不能超过库存重量!')
+          return
+        }
+        var binNumberdata=this.rolloutData.cargoPositionDetailsList.filter((item)=>{return item.binNumber==this.rolloutData.cargoPositionDetailsList[i].binNumber})
+        if(binNumberdata.length>1){
+          this.$message.error('仓位号不能重复!')
+          return
+        }
+      }
+      if(this.rollweight!=this.rolloutData.transferOutWeight){
+        this.$message.error('输入的出库重量合计须等于勾选的重量合计!')
+        return
+      }
+      
+      this.$confirm('提交后不可修改,确定转出货权?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          setrollout(this.rolloutData).toPromise()
+            .then((response) => {
+              this.rolloutShow=false
+              this.$message.success('提交成功!')
+              // row.weightedit=false
+              this.getList()
+              this.rolloutData={
+                warehouseId:'',
+                warehouseName:'',
+                goodsName:'',
+                transferOutWeight:0,
+                amountEdPayable:0,
+                amountNotPayable:0,
+                amountIngPayable:0,
+                avgCost:0,
+                redeemFlag:'1',
+                systemIdentification:'1',
+                warehousingOrderList:[],
+                cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
+                compId: localStorage.getItem('ws-pf_compId')
+              }
+            }).catch((req)=>{
+              this.$message.error(req.message)
+            })
+        })
+      
+    },
+    binNumberchange(e,item,index){
+      for (let i = 0; i < this.binNumberList.length; i++) {
+        if(this.binNumberList[i].binNumber==e){
+          item.positionId=this.binNumberList[i].id
+          item.weight=this.binNumberList[i].goodsweight
+          item.goodsweight=this.binNumberList[i].goodsweight
+        }
+      }
+      this.rollweight=0
+      for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
+        if(this.rolloutData.cargoPositionDetailsList[i].weight){
+          this.rollweight+=Number(this.rolloutData.cargoPositionDetailsList[i].weight)
+        }
+      }
+      this.rollweight=this.rollweight.toFixed(3)
+    },
+    del(index){
+      if(this.rolloutData.cargoPositionDetailsList.length>1){
+        this.rolloutData.cargoPositionDetailsList.splice(index,1)
+      }else{
+        this.$message.error('至少保留一条仓位!')
+      }
+      this.rollweight=0
+      for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
+        if(this.rolloutData.cargoPositionDetailsList[i].weight){
+          this.rollweight+=this.rolloutData.cargoPositionDetailsList[i].weight
+        }
+      }
+      this.rollweight=this.rollweight.toFixed(3)
+    },
+    add(){
+      this.rolloutData.cargoPositionDetailsList.push({binNumber:'',positionId:'',weight:'',goodsweight:''})
+      console.log(this.rolloutData)
+      this.$forceUpdate()
+    },
+    async goodrollOut(){
+      var concatarr=[]
+      var arr=[]
+      var arr3=[]
+      var arr4=[]
+      for (const key in this.multipleSelection1) {
+        concatarr = concatarr.concat(this.multipleSelection1[key])
+      }
+      if(concatarr.length==0){
+        this.$message.error('至少勾选一条!')
+        return 
+      }
+      for (const key in this.multipleSelection1) {
+        var array = this.multipleSelection1[key]
+        for (let i = 0; i < array.length; i++) {
+          if(array[i].amountEdPayable == 0 && !array[i].approveStatus||array[i].amountEdPayable == array[i].grainFund && !array[i].approveStatus){
+            arr.push(array[i])
+          }else{
+            this.$message.error('请选择已付全款或未请款的条目!')
+            return
+          }
+          if (arr3.length == 0) {
+            arr3.push(array[i])
+          } else {
+            var arr2 = arr3.filter((item) => { return item.warehouseName == array[i].warehouseName })
+            if (arr2.length == 0) {
+              arr3.push(array[i])
+            }
+          }
+          if (arr4.length == 0) {
+            arr4.push(array[i])
+          } else {
+            var arr5 = arr4.filter((item) => { return item.warehouseName == array[i].warehouseName })
+            if (arr5.length == 0) {
+              arr4.push(array[i])
+            }
+          }
+        }
+        
+      }
+      let map = new Map();
+      for (let item of arr) {
+        map.set(item.goodsName, item);
+      }
+
+      var data = [...map.values()];
+      if (data.length > 1) {
+        this.$message({
+          message: '所选条目货名不一致!',
+          type: 'warning'
+        });
+        return
+      }
+      if (arr3.length > 1) {
+        this.$message({
+          message: '所选条目库点不一致!',
+          type: 'warning'
+        });
+        return
+      }
+      if (arr4.length > 1) {
+        this.$message({
+          message: '所选条目合同编号不一致!',
+          type: 'warning'
+        });
+        return
+      }
+      var num=0
+      this.rolloutData.warehousingOrderList=arr
+      this.rolloutData.warehouseId=arr[0].baseId
+      this.rolloutData.warehouseName=arr[0].warehouseName
+      this.rolloutData.goodsName=arr[0].goodsName
+      this.rolloutData.transferOutWeight=0
+      this.rolloutData.amountEdPayable=0
+      this.rolloutData.amountNotPayable=0
+      this.rolloutData.amountIngPayable=0
+      for (let i = 0; i < arr.length; i++) {
+        this.rolloutData.transferOutWeight+=Number(arr[i].surplusWeight)
+        this.rolloutData.amountEdPayable+=Number(arr[i].amountEdPayable)
+        this.outamountNotPayable+=Number(arr[i].amountNotPayable)
+        this.rolloutData.amountIngPayable+=Number(arr[i].grainFund)
+        num+=(Number(arr[i].surplusWeight*arr[i].avgCost))
+      }
+      this.rolloutData.transferOutWeight= this.rolloutData.transferOutWeight.toFixed(3)
+      this.rolloutData.avgCost=(num/this.rolloutData.transferOutWeight).toFixed(3)
+      this.rolloutData.amountEdPayable=this.rolloutData.amountEdPayable.toFixed(3)
+      this.rolloutData.amountNotPayable=this.rolloutData.amountNotPayable.toFixed(3)
+      this.rolloutData.amountIngPayable=this.rolloutData.amountIngPayable.toFixed(3)
+      this.contractNoList=await xialaNo({compId: localStorage.getItem('ws-pf_compId'),flag: 1}).toPromise()
+      var data=await getbinnumber({id: this.rolloutData.warehouseId,}).toPromise()
+      for (let i = 0; i < data.warehousePositionInfoList.length; i++) {
+        var item=data.warehousePositionInfoList[i]
+        if(item.warehousePositionStorageInfoList){
+          for (let q = 0; q < item.warehousePositionStorageInfoList.length; q++) {
+            if(item.warehousePositionStorageInfoList[q].goodsName==this.rolloutData.goodsName){
+              this.$set(item,'goodsweight',item.warehousePositionStorageInfoList[q].storage)
+            }
+          }
+          if(item.warehousePositionStorageInfoList.filter((item)=>{return item.goodsName==this.rolloutData.goodsName}).length==0){
+            this.$set(item,'goodsweight',0)
+          }
+        }else{
+          this.$set(item,'goodsweight',0)
+        }
+      }
+      console.log(data.warehousePositionInfoList)
+      this.binNumberList = data.warehousePositionInfoList
+      // var that = this
+      // setTimeout(function(){
+        this.rolloutShow=true
+      // },1000)
+      
+    },
     exportList() {
           let date = new Date()
           var year = date.getFullYear();
@@ -1122,7 +1493,7 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          editwarehousingorder({ id: row.id, inWarehouseWeight: row.inWarehouseWeight1 }).toPromise()
+          editwarehousingorder({ id: row.id, inWarehouseWeight: row.inWarehouseWeight1,flag: 6}).toPromise()
             .then((response) => {
               // row.weightedit=false
               this.getList()
@@ -1217,6 +1588,13 @@ export default {
                 });
                 return
               }
+              if (this.multipleSelection1[item.id][i].transferOutWeight > 0) {
+                this.$message({
+                  message: '已转出的条目禁止请款!',
+                  type: 'warning'
+                });
+                return
+              }
               if (this.multipleSelection1[item.id][i].amountNotPayable > 0 && this.multipleSelection1[item.id][i].approveStatus 
               && this.multipleSelection1[item.id][i].approveStatus !='发起人撤回') {
                 this.$message({
@@ -1528,16 +1906,16 @@ export default {
       //   })
     },
     selectInit(row, index) {
-      if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
+      var role = allRoles()
+      if (role.roleName.indexOf('销售内勤') != -1 ||role.roleName.indexOf('采购内勤') != -1||role.roleName.indexOf('专员') != -1) {
         return true
-
       } else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
         return true
       } else if (localStorage.getItem('ws-pf_staffName') == '范占国') {
         return true
-      } else if (localStorage.getItem('ws-pf_roleName') == '财务') {
+      } else if (role.roleName.indexOf('财务') != -1) {
         return true
-      } else if (localStorage.getItem('ws-pf_roleName') == '出纳') {
+      } else if (role.roleName.indexOf('出纳') != -1) {
         return true
       }else if (localStorage.getItem('ws-pf_deptName') == '单证中心') {
         return true
@@ -2057,14 +2435,14 @@ export default {
             for (let q = 0; q < data.length; q++) {
               if (data[q].inType == '收购入库') {
                 data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
-                data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
+                // data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               } else {
+                console.log( data[q].inWarehouseWeight.toFixed(3))
                 data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
-                data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
+                // data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               }
               data[q].avgCost = Number(data[q].avgCost).toFixed(2)
               data[q].amountMoney = Number(data[q].amountMoney).toFixed(4)
-              console.log(response.records[i].warehouseType)
               data[q].select = false
               data[q].weightedit = false
               data[q].edit = false
@@ -2415,4 +2793,31 @@ export default {
       text-align: center;
      
     }
+    /deep/.form-inline .el-form.el-form--inline{
+      width:90%;
+      position:relative;
+    }
+    /deep/.form-inline .el-form.el-form--inline .el-form-item{
+      width:49%;
+      
+    }
+    /deep/.form-inline .el-form.el-form--inline .el-form-item .el-form-item__label{
+      width:30%;
+    }
+    /deep/.form-inline .el-form.el-form--inline .el-form-item .el-form-item__content{
+      width:70%;
+    }
+    .add,.del{
+      position:absolute;
+      top:50%;
+      transform:translateY(-50%);
+      right:-10px;
+    }
+    .del{
+      right:-40px;
+    }
+    // {
+    //   position:absolute;
+    //   top:50%;
+    // }
 </style>