|
@@ -46,13 +46,18 @@
|
|
|
" src="../../../public/img/sousuo.png" alt="" /></ws-button> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <el-row>
|
|
|
- <div>粮食单价:<span v-if="grainPricetext=='编辑'">{{grainPrice}}</span><el-input></el-input><el-button type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div>
|
|
|
- </el-row> -->
|
|
|
+ <el-row>
|
|
|
+ <div style="display:flex;align-items:center;justify-content: flex-start;" v-if="contractNo!='全部合同'&&warehouseList.records.length>0"><div style="width:100px;">粮食单价:</div> <div v-if="grainPricetext=='编辑'">{{grainPrice}}</div><el-input style="margin:0;" v-else v-model="grainPrice"></el-input><el-button style="margin:0 0 0 5px;" type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div>
|
|
|
+ </el-row>
|
|
|
<el-row>
|
|
|
<div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
|
|
|
</el-row>
|
|
|
- <!-- <div>合计 装车净重(吨):{{totalList.loadingWeight}} 卸车净重(吨):{{totalList.unloadingWeight}}</div> -->
|
|
|
+ <div v-if="modification.length>0">合计 装车净重(吨):{{totalList.loadingWeight}} 卸车净重(吨):{{totalList.unloadingWeight}} 公司承担运损:{{totalList.transportDamage}}
|
|
|
+ 损耗:{{totalList.lossWeight}} 实际损耗:{{totalList.actualLoss}} 预计单价:{{totalList.transportPrice}} 结算单价:{{totalList.settlementPrice}}
|
|
|
+ 结算重量:{{totalList.settlementWeight}} 货损:{{totalList.cargoDamage}} 扣款:{{totalList.deductionAmount}} 服务费:{{totalList.serviceCharge}}
|
|
|
+ 实付金额(元):{{totalList.amountActuallyPaid}} 合计应付(元):{{totalList.totalPayable}} 已付金额(元):{{totalList.amountEdPayable}}
|
|
|
+ 未付金额(元):{{totalList.amountNotPayable}} 已开发票(元):{{totalList.alreadyInvoice}}
|
|
|
+ </div>
|
|
|
<el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList" @row-click="handleRowClick"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
<el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
|
|
@@ -576,6 +581,19 @@ export default {
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
+ editgrainPrice(){
|
|
|
+ if(this.grainPricetext=='编辑'){
|
|
|
+ this.grainPricetext='提交'
|
|
|
+ }else{
|
|
|
+ editgrainprice({id:this.warehouseList.records[0].id,flag:7,grainPrice:this.grainPrice}).toPromise().then((response) => {
|
|
|
+ this.$message.success('提交粮食单价成功')
|
|
|
+ this.grainPrice=''
|
|
|
+ this.grainPricetext='编辑'
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
warehouseNameChange(){
|
|
|
this.getList()
|
|
|
},
|
|
@@ -585,7 +603,21 @@ export default {
|
|
|
countTotal(data) {
|
|
|
var sums={
|
|
|
loadingWeight:0,
|
|
|
- unloadingWeight:0
|
|
|
+ unloadingWeight:0,
|
|
|
+ transportDamage:0,
|
|
|
+ lossWeight:0,
|
|
|
+ actualLoss:0,
|
|
|
+ transportPrice:0,
|
|
|
+ settlementPrice:0,
|
|
|
+ settlementWeight:0,
|
|
|
+ cargoDamage:0,
|
|
|
+ deductionAmount:0,
|
|
|
+ serviceCharge:0,
|
|
|
+ amountActuallyPaid:0,
|
|
|
+ totalPayable:0,
|
|
|
+ amountEdPayable:0,
|
|
|
+ amountNotPayable:0,
|
|
|
+ alreadyInvoice:0
|
|
|
}
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
if(!isNaN(data[i].loadingWeight)){
|
|
@@ -594,7 +626,67 @@ export default {
|
|
|
if(!isNaN(data[i].unloadingWeight)){
|
|
|
sums.unloadingWeight+=Number(data[i].unloadingWeight)
|
|
|
}
|
|
|
+ if(!isNaN(data[i].transportDamage)){
|
|
|
+ sums.transportDamage+=Number(data[i].transportDamage)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].lossWeight)){
|
|
|
+ sums.lossWeight+=Number(data[i].lossWeight)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].actualLoss)){
|
|
|
+ sums.actualLoss+=Number(data[i].actualLoss)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].transportPrice)){
|
|
|
+ sums.transportPrice+=Number(data[i].transportPrice)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].settlementPrice)){
|
|
|
+ sums.settlementPrice+=Number(data[i].settlementPrice)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].settlementWeight)){
|
|
|
+ sums.settlementWeight+=Number(data[i].settlementWeight)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].cargoDamage)){
|
|
|
+ sums.cargoDamage+=Number(data[i].cargoDamage)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].deductionAmount)){
|
|
|
+ sums.deductionAmount+=Number(data[i].deductionAmount)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].serviceCharge)){
|
|
|
+ sums.serviceCharge+=Number(data[i].serviceCharge)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].amountActuallyPaid)){
|
|
|
+ sums.amountActuallyPaid+=Number(data[i].amountActuallyPaid)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].totalPayable)){
|
|
|
+ sums.totalPayable+=Number(data[i].totalPayable)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].amountEdPayable)){
|
|
|
+ sums.amountEdPayable+=Number(data[i].amountEdPayable)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].amountNotPayable)){
|
|
|
+ sums.amountNotPayable+=Number(data[i].amountNotPayable)
|
|
|
+ }
|
|
|
+ if(!isNaN(data[i].alreadyInvoice)){
|
|
|
+ sums.alreadyInvoice+=Number(data[i].alreadyInvoice)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+ sums.loadingWeight=sums.loadingWeight.toFixed(2)
|
|
|
+ sums.unloadingWeight= sums.unloadingWeight.toFixed(2)
|
|
|
+ sums.transportDamage=sums.transportDamage.toFixed(2)
|
|
|
+ sums.lossWeight=sums.lossWeight.toFixed(2)
|
|
|
+ sums.actualLoss=sums.actualLoss.toFixed(2)
|
|
|
+ sums.transportPrice=sums.transportPrice.toFixed(2)
|
|
|
+ sums.settlementPrice=sums.settlementPrice.toFixed(2)
|
|
|
+ sums.settlementWeight=sums.settlementWeight.toFixed(2)
|
|
|
+ sums.cargoDamage=sums.cargoDamage.toFixed(2)
|
|
|
+ sums.deductionAmount=sums.deductionAmount.toFixed(2)
|
|
|
+ sums.serviceCharge=sums.serviceCharge.toFixed(2)
|
|
|
+ sums.amountActuallyPaid=sums.amountActuallyPaid.toFixed(2)
|
|
|
+ sums.totalPayable=sums.totalPayable.toFixed(2)
|
|
|
+ sums.amountEdPayable=sums.amountEdPayable.toFixed(2)
|
|
|
+ sums.amountNotPayable=sums.amountNotPayable.toFixed(2)
|
|
|
+ sums.alreadyInvoice=sums.alreadyInvoice.toFixed(2)
|
|
|
+
|
|
|
return sums;
|
|
|
},
|
|
|
onChange() {
|
|
@@ -1270,10 +1362,7 @@ export default {
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
|
- var contract = that.modification[0].contractNo
|
|
|
-
|
|
|
for (let i = 0; i < this.modification.length; i++) {
|
|
|
-
|
|
|
if(this.modification[i].status=='待请款'&&this.modification[i].approveStatus||this.modification[i].status!='待请款'&&this.modification[i].status!='已驳回'){
|
|
|
this.$message.warning('请选择待请款的条目')
|
|
|
return
|
|
@@ -1282,10 +1371,6 @@ export default {
|
|
|
this.$message.warning('请选择已卸车的车辆')
|
|
|
return
|
|
|
}
|
|
|
- if(that.modification[i].contractNo != contract){
|
|
|
- this.$message.warning('请选择相同的合同条目进行请款!')
|
|
|
- return
|
|
|
- }
|
|
|
}
|
|
|
var arr=this.ArrSet(this.modification,this.contractNo)
|
|
|
|
|
@@ -1311,10 +1396,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
- this.modification = val
|
|
|
if (val.length !== 0) {
|
|
|
this.totalList = this.countTotal(val)
|
|
|
}
|
|
|
+ this.modification = val
|
|
|
},
|
|
|
handlestatus(status) {
|
|
|
this.searchType = status
|
|
@@ -1407,6 +1492,9 @@ export default {
|
|
|
}
|
|
|
this.deptBudgetTotal = response.total
|
|
|
this.warehouseList = response
|
|
|
+ if(this.warehouseList.records.length>0&&this.contractNo!='全部合同'){
|
|
|
+ this.grainPrice=this.warehouseList.records[0].grainPrice
|
|
|
+ }
|
|
|
})
|
|
|
autocontract({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|