|
@@ -44,7 +44,7 @@
|
|
|
<div v-for='(item,index) in gainList' style='margin:10px;border:1px solid #ccc;padding:10px;'>
|
|
|
<div style='width:100%;justify-content:space-between;align-items:center;margin-bottom:10px;' class="flex">
|
|
|
<div>2022-10-22</div>
|
|
|
- <div>{{item.warehouseName}}</div>
|
|
|
+ <div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
|
|
|
<div>
|
|
|
<ws-button type="primary" @click="profit(item.warehouseName)" v-hasPermission="
|
|
|
`warehouseManagement.warehousingOrder.surplus`
|
|
@@ -56,7 +56,7 @@
|
|
|
</ws-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table class="wenzi" :data="item.goodssourcelist" style="width: 100%" >
|
|
|
+ <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="">
|
|
@@ -76,7 +76,7 @@
|
|
|
<el-table-column prop="goodsName" label="货名" width="80">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="inWarehouseWeight" width="130" class="table_td" label="入库重量(吨)"></el-table-column>
|
|
|
- <el-table-column prop="outWarehouseWOOeight" width="130" class="table_td" label="出库重量(吨)"></el-table-column>
|
|
|
+ <el-table-column prop="outWarehouseWeight" width="130" class="table_td" label="出库重量(吨)"></el-table-column>
|
|
|
<el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.profitAndLoss}}</span>
|
|
@@ -105,7 +105,7 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
- :page-size="pageSize" layout="total, prev, pager, next" :total="deptBudgetTotal"></el-pagination>
|
|
|
+ :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
|
:visible.sync="aduitshow"
|
|
@@ -136,7 +136,7 @@
|
|
|
<div class="audit_left">
|
|
|
<span class="audit_name">{{item.dealMsg}}</span>
|
|
|
</div>
|
|
|
- <span class="audit_date">{{item.verifyRemark}}</span>
|
|
|
+ <span class="audit_date"><span v-if='item.verifyRemark>0'>+</span>{{item.verifyRemark}}吨</span>
|
|
|
</div>
|
|
|
<div class="audit_item">
|
|
|
<div class="audit_left">
|
|
@@ -269,6 +269,7 @@
|
|
|
currectflag:'',
|
|
|
startDate:'',
|
|
|
endDate:'',
|
|
|
+ profitAndLoss:0,
|
|
|
warehouseName: '',
|
|
|
deptBudgetTotal: 0,
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
@@ -332,7 +333,7 @@
|
|
|
},
|
|
|
radiochange(index,row){
|
|
|
console.log(index,row)
|
|
|
- var data=this.gainList[index].goodssourcelist
|
|
|
+ var data=this.gainList[index].warehousingOrderList
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
data[i].select=false
|
|
|
}
|
|
@@ -345,65 +346,76 @@
|
|
|
this.currentRow = val;
|
|
|
},
|
|
|
aduit(row){
|
|
|
- this.aduitList=row
|
|
|
- this.form.id=row.id
|
|
|
- this.form.surplusWeight=row.surplusWeight
|
|
|
- this.form.profitAndLoss=row.profitAndLoss
|
|
|
- this.form.num=row.surplusWeight+row.plValue
|
|
|
- this.form.plValue=row.plValue
|
|
|
- this.title='审核'
|
|
|
- this.currectflag=row.operationFlag
|
|
|
- this.aduitshow=true
|
|
|
- this.disabled=true
|
|
|
+ if(localStorage.getItem('ws-pf_staffName')=='吕波'){
|
|
|
+ this.aduitList=row
|
|
|
+ this.form.id=row.id
|
|
|
+ this.form.surplusWeight=row.surplusWeight
|
|
|
+ this.form.profitAndLoss=row.profitAndLoss
|
|
|
+ this.form.num=row.surplusWeight+row.plValue
|
|
|
+ this.form.plValue=row.plValue
|
|
|
+ this.title='审核'
|
|
|
+ this.currectflag=row.operationFlag
|
|
|
+ this.aduitshow=true
|
|
|
+ this.disabled=true
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '暂无审核权限',
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
lose(ware){
|
|
|
- if(this.multipleSelection[ware]){
|
|
|
+ if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
|
|
|
+ if(this.multipleSelection[ware]){
|
|
|
+ this.form.id=this.multipleSelection[ware].id
|
|
|
+ this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
|
+ this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
+ this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
+ this.title='盘亏'
|
|
|
+ this.slecetwarehouseName=''
|
|
|
+ if(this.multipleSelection[ware].approveStatus){
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '未选择要盘点的入库记录',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.aduitshow=true
|
|
|
+ this.disabled=false
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '未选择要盘点的入库记录',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ profit(ware){
|
|
|
+ if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
|
|
|
+ if(this.multipleSelection[ware]){
|
|
|
this.form.id=this.multipleSelection[ware].id
|
|
|
this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
|
this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
- this.title='盘亏'
|
|
|
- this.slecetwarehouseName=''
|
|
|
+ this.title='盘盈'
|
|
|
if(this.multipleSelection[ware].approveStatus){
|
|
|
- this.$notify.warning({
|
|
|
- title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '未选择要盘点的入库记录',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.aduitshow=true
|
|
|
this.disabled=false
|
|
|
- }else{
|
|
|
- this.$notify.warning({
|
|
|
- title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
- })
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '未选择要盘点的入库记录',
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- profit(ware){
|
|
|
- if(this.multipleSelection[ware]){
|
|
|
- this.form.id=this.multipleSelection[ware].id
|
|
|
- this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
|
- this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
- this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
- this.title='盘盈'
|
|
|
- if(this.multipleSelection[ware].approveStatus){
|
|
|
- this.$notify.warning({
|
|
|
- title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.aduitshow=true
|
|
|
- this.disabled=false
|
|
|
- }else{
|
|
|
- this.$notify.warning({
|
|
|
- title: '警告',
|
|
|
- message: '未选择要盘点的入库记录',
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
loseprofit(){
|
|
|
var title=''
|
|
|
if(this.form.num<0){
|
|
@@ -468,7 +480,7 @@
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if(this.currectflag==0){
|
|
|
+ if(this.currectflag=='盘盈'){
|
|
|
this.form.flag=2
|
|
|
}else{
|
|
|
this.form.flag=3
|
|
@@ -507,7 +519,7 @@
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if(this.currectflag==1){
|
|
|
+ if(this.currectflag=='盘盈'){
|
|
|
this.form.flag=4
|
|
|
}else{
|
|
|
this.form.flag=5
|
|
@@ -570,7 +582,7 @@
|
|
|
getwarehousingorder({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
currentPage: this.currentPage,
|
|
|
- pageSize: 9999,
|
|
|
+ pageSize: this.pageSize,
|
|
|
startDate:this.startDate,
|
|
|
endDate:this.endDate,
|
|
|
searchType: this.searchType,
|
|
@@ -580,27 +592,25 @@
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- var arr=this.copare(response.records)
|
|
|
for (let i = 0; i < response.records.length; i++) {
|
|
|
- response.records[i].surplusWeight=response.records[i].inWarehouseWeight-response.records[i].outWarehouseWeight+response.records[i].profitAndLoss
|
|
|
- response.records[i].select=''
|
|
|
+ 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].inWarehouseWeight=Number((data[q].inWarehouseWeight/1000).toFixed(3))
|
|
|
+ }
|
|
|
+ data[q].select=false
|
|
|
+ data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
|
|
|
+ data[q].weightedit=false
|
|
|
+ data[q].warehouseType=response.records[i].warehouseType
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- // if(arr[i].warehouseName){
|
|
|
- var arr1=response.records.filter(function(item,index){
|
|
|
- return arr[i].warehouseName==item.warehouseName
|
|
|
- })
|
|
|
- arr[i].goodssourcelist=JSON.parse(JSON.stringify(arr1))
|
|
|
- console.log(arr1)
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
- this.gainList = arr
|
|
|
+ this.gainList = response.records
|
|
|
// this.currentPage = response.current
|
|
|
// this.pageSize = response.size
|
|
|
- console.log(arr)
|
|
|
- this.deptBudgetTotal = arr.length
|
|
|
+ // console.log(arr)
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
})
|
|
|
},
|
|
|
//编辑
|