|
@@ -166,9 +166,16 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
|
|
|
- <el-table-column prop="transferOutWeight" width="120" class="table_td" label="转出">
|
|
|
+ <el-table-column prop="transferOutWeight" width="200" class="table_td" label="转出">
|
|
|
<template scope="scope">
|
|
|
- <span :style="scope.row.transferOutWeight>0?'color:#5F7DE9;':''">{{ scope.row.transferOutWeight }} <span v-if="scope.row.redeemFlag">(赎)</span></span>
|
|
|
+ <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>
|
|
@@ -477,7 +484,7 @@
|
|
|
</el-dialog>
|
|
|
<el-dialog width='50%' :visible.sync="rolloutShow" title="货权转出" top="20vh">
|
|
|
<div class="form-inline">
|
|
|
- <div>
|
|
|
+ <div style="margin:10px;">
|
|
|
选中{{ rolloutData.warehousingOrderList.length }}条:{{rolloutData.warehouseName}} 转出 {{ rolloutData.goodsName }}
|
|
|
{{ rolloutData.transferOutWeight }}吨 应付{{rolloutData.amountIngPayable}} 已付{{rolloutData.amountEdPayable}}
|
|
|
未付{{rolloutData.amountNotPayable}} 平均成本 {{ rolloutData.avgCost }}
|
|
@@ -493,7 +500,7 @@
|
|
|
</el-form>
|
|
|
<el-form :inline="true" label-width="120px" class="demo-form-inline">
|
|
|
<el-form-item label="合同编号">
|
|
|
- <el-select v-model="rolloutData.outContractNo" placeholder="选择合同编号">
|
|
|
+ <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>
|
|
@@ -503,23 +510,23 @@
|
|
|
<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-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 @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 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 v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
|
|
|
+ <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>合计:吨</div>
|
|
|
+ <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>
|
|
@@ -664,6 +671,7 @@ export default {
|
|
|
EndDate:'',
|
|
|
rejectshow:false,
|
|
|
options: [],
|
|
|
+ rollweight:0,
|
|
|
rolloutData:{
|
|
|
warehouseId:'',
|
|
|
warehouseName:'',
|
|
@@ -676,7 +684,8 @@ export default {
|
|
|
redeemFlag:'1',
|
|
|
systemIdentification:'1',
|
|
|
warehousingOrderList:[],
|
|
|
- cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',}]
|
|
|
+ cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
|
|
|
+ compId: localStorage.getItem('ws-pf_compId')
|
|
|
},
|
|
|
isShowPrintType: false,
|
|
|
rolloutShow:false,
|
|
@@ -850,28 +859,104 @@ 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(this.rolloutData).toPromise()
|
|
|
+ editrollout({warehousingOrderList:concatarr}).toPromise()
|
|
|
.then((response) => {
|
|
|
this.$message.success('操作成功!')
|
|
|
// row.weightedit=false
|
|
|
this.getList()
|
|
|
- }).catch((req)=>{
|
|
|
- this.$message.error(req.message)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
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: '取消',
|
|
@@ -894,18 +979,36 @@ export default {
|
|
|
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.warehousingOrderList.length>1){
|
|
|
- this.rolloutData.warehousingOrderList.splice(index,1)
|
|
|
+ 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.warehousingOrderList.push({binNumber:'',positionId:'',weight:'',})
|
|
|
+ this.rolloutData.cargoPositionDetailsList.push({binNumber:'',positionId:'',weight:'',goodsweight:''})
|
|
|
+ console.log(this.rolloutData)
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
async goodrollOut(){
|
|
|
var concatarr=[]
|
|
@@ -990,7 +1093,6 @@ export default {
|
|
|
this.rolloutData.amountIngPayable+=Number(arr[i].grainFund)
|
|
|
num+=(Number(arr[i].surplusWeight*arr[i].avgCost))
|
|
|
}
|
|
|
- console.log(this.rolloutData)
|
|
|
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)
|
|
@@ -998,6 +1100,22 @@ export default {
|
|
|
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(){
|
|
@@ -2286,10 +2404,10 @@ 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 {
|
|
|
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)
|