|
@@ -56,10 +56,10 @@
|
|
|
<ws-input type="number" @mousewheel.native.prevent v-model="paymentList.unitDeduction" @input="grainMoney"
|
|
|
placeholder="请输入扣单价" maxlength="100" size="small" :disabled="disabled" />
|
|
|
</ws-form-item>
|
|
|
- <!-- <ws-form-item v-if='paymentList.contractManagement' label="出库净重(公斤)" span="1" prop="weight">
|
|
|
+ <ws-form-item v-if='paymentList.contractManagement && paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1' label="出库净重(公斤)" span="1" prop="weight">
|
|
|
<ws-input type="number" v-model="paymentList.contractManagement.weight" @input="grainMoney"
|
|
|
placeholder="自动获取,不可编辑" maxlength="100" size="small" disabled/>
|
|
|
- </ws-form-item> -->
|
|
|
+ </ws-form-item>
|
|
|
</ws-info-table>
|
|
|
<div class="titles">质检数据</div>
|
|
|
<ws-info-table>
|
|
@@ -177,22 +177,22 @@
|
|
|
|
|
|
<div class="titles">结算金额(元)</div>
|
|
|
<ws-info-table>
|
|
|
- <ws-form-item v-if='paymentList.type=="潮粮"' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
+ <ws-form-item v-if='paymentList.type=="潮粮" && !paymentList.contractManagement' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
class="formItem">
|
|
|
<ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
|
|
|
placeholder="请输入粮款" maxlength="100" size="small" disabled />
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item v-if='paymentList.type=="干粮"' label="粮款 = 净重 x (干粮单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
+ <ws-form-item v-if='paymentList.type=="干粮" && !paymentList.contractManagement' label="粮款 = 净重 x (干粮单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
class="formItem">
|
|
|
<ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
|
|
|
placeholder="请输入粮款" maxlength="100" size="small" disabled />
|
|
|
</ws-form-item>
|
|
|
<!-- 采购合同 自运 按合同的出库净重计算 -->
|
|
|
- <!-- <ws-form-item v-if='paymentList.contractManagement.contractType == 2 && paymentList.contractManagement.deliverType == 1' label="粮款 = 出库净重 x (干粮单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
+ <ws-form-item v-if='paymentList.contractManagement' label="粮款 = 出库净重 x (干粮单价 - 扣单价) =" span="1" prop="waterContent"
|
|
|
class="formItem">
|
|
|
<ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
|
|
|
placeholder="请输入粮款" maxlength="100" size="small" disabled />
|
|
|
- </ws-form-item> -->
|
|
|
+ </ws-form-item>
|
|
|
<ws-form-item label="称重扣款" span="1" prop="waterContent">
|
|
|
<ws-input type="number" @mousewheel.native.prevent @input='grainMoney' @focus="inputFocus($event)"
|
|
|
v-model="paymentList.weighingDeduction" placeholder="请输入称重扣款" maxlength="100" size="small"
|
|
@@ -429,25 +429,30 @@
|
|
|
this.paymentList.capitalize = this.convertCurrency(e)
|
|
|
},
|
|
|
grainMoney() {
|
|
|
- if (this.paymentList.type == '潮粮') {
|
|
|
- this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList
|
|
|
- .unitDeduction) * this.paymentList.weighingManagement.netWeight
|
|
|
- this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight))
|
|
|
- .toFixed(4)
|
|
|
- this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
|
|
|
- .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
|
|
|
- Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
|
|
|
- .freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
|
|
|
- Number(this.paymentList.qualityDeduction)
|
|
|
+ if(this.paymentList.contractManagement && this.paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1){//合同收购自运按出库重量结算 (条件:按出库结算&& 采购合同&&自运)
|
|
|
+ if(this.paymentList.type == '潮粮'){
|
|
|
+ this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
|
|
|
+ }else{
|
|
|
+ this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
|
|
|
+ }
|
|
|
+ this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
|
|
|
+ this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
|
|
|
+ Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
|
|
|
+ this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
|
|
|
+ this.paymentList.actualPayment = this.paymentList.calculationPayable
|
|
|
+ this.actualPayment(this.paymentList.actualPayment)
|
|
|
+ }else if (this.paymentList.type == '潮粮') {
|
|
|
+ this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
|
|
|
+ this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
|
|
|
+ this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
|
|
|
+ Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
|
|
|
this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
|
|
|
|
|
|
this.paymentList.actualPayment = this.paymentList.calculationPayable
|
|
|
this.actualPayment(this.paymentList.actualPayment)
|
|
|
- } else {
|
|
|
- this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList
|
|
|
- .unitDeduction) * this.paymentList.weighingManagement.netWeight
|
|
|
- this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
|
|
|
- .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
|
|
|
+ } else if(this.paymentList.type == '干粮') {
|
|
|
+ this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
|
|
|
+ this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList.weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
|
|
|
Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
|
|
|
.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
|
|
|
Number(this.paymentList.qualityDeduction)
|
|
@@ -655,6 +660,7 @@
|
|
|
this.paymentList.id = this.$route.query.id
|
|
|
this.paymentList.amountIngPayable = this.paymentList.actualPayment
|
|
|
this.paymentList.settlementClerk = localStorage.getItem('ws-pf_staffName')
|
|
|
+ delete this.paymentList.contractManagement
|
|
|
postpaymentedit(this.paymentList).toPromise().then((response) => {
|
|
|
getpaymentexamine({
|
|
|
id: this.$route.query.id
|