|
@@ -18,8 +18,8 @@
|
|
|
<el-table :data="formData.data.contractOutboundInfoList" style="width: 100%;">
|
|
|
<el-table-column prop="contractBelongType" label="订单归属" width="150"
|
|
|
:formatter="(row)=>dictKeyValue(row.contractBelongType,contractBelongTypeData)" />
|
|
|
- <el-table-column prop="contractTaxTransportationWay" label="税运方式" width="150"
|
|
|
- :formatter="(row)=>dictKeyValue(row.contractTaxTransportationWay,contractTaxTransportationWay)" />
|
|
|
+ <!-- <el-table-column prop="contractTaxTransportationWay" label="税运方式" width="150"
|
|
|
+ :formatter="(row)=>dictKeyValue(row.contractTaxTransportationWay,contractTaxTransportationWay)" /> -->
|
|
|
<el-table-column prop="code" label="出货单号" width="150" />
|
|
|
<el-table-column prop="sumQuantity" label="出货件数" width="150" />
|
|
|
<el-table-column label="出货单图片">
|
|
@@ -299,30 +299,23 @@
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column prop="currentPayable" label="本期应付(抵扣)" width="140" v-if="isShowAtt('currentPayable','detailObj')">
|
|
|
+ <el-table-column prop="currentPayableDeductionBefore" label="本期应付(抵扣前)" width="140"
|
|
|
+ v-if="isShowAtt('currentPayableDeductionBefore','detailObj')">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-form-item :prop="'costControlDetailList.' + $index + '.currentPayable'" :rules="rules.currentPayable" :inline-message="true"
|
|
|
- class="margin-b-0">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="row.currentPayable" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" />
|
|
|
+ <el-form-item :prop="'costControlDetailList.' + $index + '.currentPayableDeductionBefore'"
|
|
|
+ :rules="rules.currentPayableDeductionBefore" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.currentPayableDeductionBefore" placeholder="请输入" style="width: 100%"
|
|
|
+ :precision="2" :controls="false" :min="0"
|
|
|
+ @change="(val)=>handleChangeMoney(val,$index,'currentPayableDeductionBefore')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="currentPayable" label="本期应付(抵扣前)" width="140" v-if="isShowAtt('currentPayable','detailObj')">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <el-form-item :prop="'costControlDetailList.' + $index + '.currentPayable'" :rules="rules.currentPayable" :inline-message="true"
|
|
|
- class="margin-b-0">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="row.currentPayable" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" />
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column prop="currentPayableDeduction" label="本期应付(抵扣后)" width="140" v-if="isShowAtt('currentPayableDeduction','detailObj')">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-form-item :prop="'costControlDetailList.' + $index + '.currentPayableDeduction'" :rules="rules.currentPayableDeduction"
|
|
|
:inline-message="true" class="margin-b-0">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.currentPayableDeduction" placeholder="请输入" style="width: 100%"
|
|
|
- :precision="2" :controls="false" :disabled="isDisabled" />
|
|
|
+ :precision="2" :controls="false" :disabled="getCurrentPayableDisabled" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -842,6 +835,19 @@ const formConfig = computed(() => {
|
|
|
) {
|
|
|
formData.data.shopName =
|
|
|
formData.data.costControlDetailList[0].businessName;
|
|
|
+ } else if (
|
|
|
+ val == 2 &&
|
|
|
+ formData.data.costControlDetailList &&
|
|
|
+ formData.data.costControlDetailList.length > 0
|
|
|
+ ) {
|
|
|
+ let current = shopList.value.find(
|
|
|
+ (x) => x.value == formData.data.costControlDetailList[0].shopId
|
|
|
+ );
|
|
|
+ if (current) {
|
|
|
+ formData.data.accountBank = current.accountBank;
|
|
|
+ formData.data.accountName = current.accountName;
|
|
|
+ formData.data.accountNumber = current.accountNumber;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -1405,15 +1411,7 @@ const changeIsPublicTransfer = (val) => {
|
|
|
const row = formData.data.costControlDetailList[i];
|
|
|
if (formData.data.isAdvance == "1") {
|
|
|
row.currentPayable =
|
|
|
- val == "1"
|
|
|
- ? Number(
|
|
|
- parseFloat(
|
|
|
- row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
- ).toFixed(2)
|
|
|
- )
|
|
|
- : Number(
|
|
|
- parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
- );
|
|
|
+ val == "1" ? row.currentPrepaidTax : row.currentPrepaid;
|
|
|
} else {
|
|
|
row.currentPayable =
|
|
|
val == "1"
|
|
@@ -1424,9 +1422,10 @@ const changeIsPublicTransfer = (val) => {
|
|
|
)
|
|
|
: Number(
|
|
|
parseFloat(
|
|
|
- row.accountPeriodAmountTax - row.deductionPrepaid
|
|
|
+ row.accountPeriodAmount - row.deductionPrepaid
|
|
|
).toFixed(2)
|
|
|
);
|
|
|
+ row.currentPayable = row.currentPayable > 0 ? row.currentPayable : 0;
|
|
|
}
|
|
|
handleGetRemark(i);
|
|
|
}
|
|
@@ -1438,26 +1437,24 @@ const changeIsPublicTransfer = (val) => {
|
|
|
const row = formData.data.costControlDetailList[i];
|
|
|
if (formData.data.isAdvance == "1") {
|
|
|
row.currentPayable =
|
|
|
+ val == "1" ? row.currentPrepaidTax : row.currentPrepaid;
|
|
|
+ } else {
|
|
|
+ row.currentPayableDeduction =
|
|
|
val == "1"
|
|
|
? Number(
|
|
|
parseFloat(
|
|
|
- row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
+ row.currentPayableDeductionBefore - row.deductionPrepaidTax
|
|
|
).toFixed(2)
|
|
|
)
|
|
|
: Number(
|
|
|
- parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
- );
|
|
|
- } else {
|
|
|
- row.currentPayable =
|
|
|
- val == "1"
|
|
|
- ? Number(
|
|
|
parseFloat(
|
|
|
- row.balancePrepaidTax - row.deductionPrepaidTax
|
|
|
+ row.currentPayableDeductionBefore - row.deductionPrepaid
|
|
|
).toFixed(2)
|
|
|
- )
|
|
|
- : Number(
|
|
|
- parseFloat(row.balancePrepaid - row.deductionPrepaid).toFixed(2)
|
|
|
);
|
|
|
+
|
|
|
+ row.currentPayableDeduction =
|
|
|
+ row.currentPayableDeduction > 0 ? row.currentPayableDeduction : 0;
|
|
|
+ row.currentPayable = row.currentPayableDeduction;
|
|
|
}
|
|
|
handleGetRemark(i);
|
|
|
}
|
|
@@ -1466,7 +1463,7 @@ const changeIsPublicTransfer = (val) => {
|
|
|
|
|
|
const handleChangeMoney = (val, index, att) => {
|
|
|
let row = formData.data.costControlDetailList[index];
|
|
|
- if (formData.data.isPublicTransfer) {
|
|
|
+ if (formData.data.isPublicTransfer != undefined) {
|
|
|
// 快递费充值 应付取对应的含税和不含税
|
|
|
if (currentCostTypeData.value.name.indexOf("快递费充值") != -1) {
|
|
|
row.currentPayable =
|
|
@@ -1492,14 +1489,8 @@ const handleChangeMoney = (val, index, att) => {
|
|
|
if (formData.data.isAdvance == "1") {
|
|
|
row.currentPayable =
|
|
|
formData.data.isPublicTransfer == "1"
|
|
|
- ? Number(
|
|
|
- parseFloat(
|
|
|
- row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
- ).toFixed(2)
|
|
|
- )
|
|
|
- : Number(
|
|
|
- parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
- );
|
|
|
+ ? row.currentPrepaidTax
|
|
|
+ : row.currentPrepaid;
|
|
|
} else {
|
|
|
row.currentPayable =
|
|
|
formData.data.isPublicTransfer == "1"
|
|
@@ -1510,7 +1501,7 @@ const handleChangeMoney = (val, index, att) => {
|
|
|
)
|
|
|
: Number(
|
|
|
parseFloat(
|
|
|
- row.accountPeriodAmountTax - row.deductionPrepaid
|
|
|
+ row.accountPeriodAmount - row.deductionPrepaid
|
|
|
).toFixed(2)
|
|
|
);
|
|
|
}
|
|
@@ -1523,25 +1514,20 @@ const handleChangeMoney = (val, index, att) => {
|
|
|
if (formData.data.isAdvance == "1") {
|
|
|
row.currentPayable =
|
|
|
formData.data.isPublicTransfer == "1"
|
|
|
- ? Number(
|
|
|
- parseFloat(
|
|
|
- row.balancePrepaidTax - row.currentPrepaidTax
|
|
|
- ).toFixed(2)
|
|
|
- )
|
|
|
- : Number(
|
|
|
- parseFloat(row.balancePrepaid - row.currentPrepaid).toFixed(2)
|
|
|
- );
|
|
|
- row.currentPayable = row.currentPayable > 0 ? row.currentPayable : 0;
|
|
|
+ ? row.currentPrepaidTax
|
|
|
+ : row.currentPrepaid;
|
|
|
} else {
|
|
|
row.currentPayableDeduction =
|
|
|
formData.data.isPublicTransfer == "1"
|
|
|
? Number(
|
|
|
parseFloat(
|
|
|
- row.balancePrepaidTax - row.deductionPrepaidTax
|
|
|
+ row.currentPayableDeductionBefore - row.deductionPrepaidTax
|
|
|
).toFixed(2)
|
|
|
)
|
|
|
: Number(
|
|
|
- parseFloat(row.balancePrepaid - row.deductionPrepaid).toFixed(2)
|
|
|
+ parseFloat(
|
|
|
+ row.currentPayableDeductionBefore - row.deductionPrepaid
|
|
|
+ ).toFixed(2)
|
|
|
);
|
|
|
row.currentPayableDeduction =
|
|
|
row.currentPayableDeduction > 0 ? row.currentPayableDeduction : 0;
|
|
@@ -1630,7 +1616,7 @@ const changeSelectData = (val, index, type) => {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- if (current && ["1", "2", "4"].includes(type)) {
|
|
|
+ if (current && ["1", "2", "4"].includes(type) && index == 0) {
|
|
|
formData.data.accountBank = current.accountBank;
|
|
|
formData.data.accountName = current.accountName;
|
|
|
formData.data.accountNumber = current.accountNumber;
|