|
@@ -46,11 +46,11 @@
|
|
|
<div>{{item.issuingTime}}</div>
|
|
|
<div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
|
|
|
<div>
|
|
|
- <ws-button type="primary" @click="profit(item.warehouseName)" v-hasPermission="
|
|
|
+ <ws-button type="primary" @click="profit(item.id)" v-hasPermission="
|
|
|
`warehouseManagement.warehousingOrder.surplus`
|
|
|
">盘盈
|
|
|
</ws-button>
|
|
|
- <ws-button type="primary" @click="lose(item.warehouseName)" v-hasPermission="
|
|
|
+ <ws-button type="primary" @click="lose(item.id)" v-hasPermission="
|
|
|
`warehouseManagement.warehousingOrder.loss`
|
|
|
">盘亏
|
|
|
</ws-button>
|
|
@@ -59,7 +59,7 @@
|
|
|
<el-table class="wenzi" :data="item.warehousingOrderList" style="width: 100%" >
|
|
|
<el-table-column width="40">
|
|
|
<template scope="scope">
|
|
|
- <img v-if="!scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/wxz.png" alt="">
|
|
|
+ <img v-if="!scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange1(index,scope.row)' src="../../../public/img/wxz.png" alt="">
|
|
|
<img v-if="scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/xz.png" alt="">
|
|
|
<!-- <el-radio @change='radiochange(scope.row)' :name='indexMethod()+index' v-model="scope.row.select" :label="scope.row.id"><span></span></el-radio> -->
|
|
|
<!-- <el-radio :label="scope.row.id" v-model="scope.row.select" @change.native="radiochange(index,scope.row)"> </el-radio> -->
|
|
@@ -332,23 +332,24 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
radiochange(index,row){
|
|
|
- console.log(index,row)
|
|
|
+ console.log(index,row.select)
|
|
|
var data=this.gainList[index].warehousingOrderList
|
|
|
-
|
|
|
-
|
|
|
- if(row.select){
|
|
|
- for (let i = 0; i < data.length; i++) {
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
data[i].select=false
|
|
|
}
|
|
|
- this.multipleSelection[row.warehouseName]=row
|
|
|
- }else{
|
|
|
- for (let i = 0; i < data.length; i++) {
|
|
|
+ row.select=!row.select
|
|
|
+
|
|
|
+ console.log(this.multipleSelection)
|
|
|
+ },
|
|
|
+ radiochange1(index,row){
|
|
|
+ console.log(index,row.select)
|
|
|
+ var data=this.gainList[index].warehousingOrderList
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
data[i].select=false
|
|
|
}
|
|
|
row.select=!row.select
|
|
|
- }
|
|
|
-
|
|
|
- // console.log(this.multipleSelection[row.warehouseName])
|
|
|
+ this.multipleSelection[row.id]=row
|
|
|
+ console.log(this.multipleSelection[row.id])
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentRow = val;
|
|
@@ -374,6 +375,7 @@
|
|
|
},
|
|
|
lose(ware){
|
|
|
if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
|
|
|
+ console.log(this.multipleSelection[ware])
|
|
|
if(this.multipleSelection[ware]){
|
|
|
this.form.id=this.multipleSelection[ware].id
|
|
|
this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
@@ -381,10 +383,11 @@
|
|
|
this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
this.title='盘亏'
|
|
|
this.slecetwarehouseName=''
|
|
|
- if(this.multipleSelection[ware].approveStatus){
|
|
|
+ // console.log(this.multipleSelection[ware].approveStatus,1111111111111)
|
|
|
+ if(this.multipleSelection[ware].inventoryStatus){
|
|
|
this.$notify.warning({
|
|
|
title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
+ message: '当前数据审核中',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
@@ -396,6 +399,12 @@
|
|
|
message: '未选择要盘点的入库记录',
|
|
|
})
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '暂无盘点权限',
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
},
|
|
|
profit(ware){
|
|
@@ -406,10 +415,10 @@
|
|
|
this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
this.title='盘盈'
|
|
|
- if(this.multipleSelection[ware].approveStatus){
|
|
|
+ if(this.multipleSelection[ware].inventoryStatus){
|
|
|
this.$notify.warning({
|
|
|
title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
+ message: '当前数据审核中',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
@@ -421,6 +430,12 @@
|
|
|
message: '未选择要盘点的入库记录',
|
|
|
})
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '暂无盘点权限',
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -604,13 +619,13 @@
|
|
|
response.records[i].payshow=true
|
|
|
var data=response.records[i].warehousingOrderList
|
|
|
for (let q = 0; q < data.length; q++) {
|
|
|
- if(data[q].inType=='收购入库'){
|
|
|
- data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
|
|
|
- data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
|
|
|
- }else{
|
|
|
+ // if(data[q].inType=='收购入库'){
|
|
|
+ // data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
|
|
|
+ // data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
|
|
|
+ // }else{
|
|
|
data[q].inWarehouseWeight1=data[q].inWarehouseWeight.toFixed(3)
|
|
|
data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
|
|
|
- }
|
|
|
+ // }
|
|
|
data[q].select=false
|
|
|
data[q].weightedit=false
|
|
|
data[q].warehouseType=response.records[i].warehouseType
|