Commit f22f2119 authored by chenwei's avatar chenwei

fix🐛: 修复1/20 日bug

parent 601bc8f3
......@@ -6,7 +6,7 @@
<el-form-item :label="$t('流水号')">{{ bankReceiptDetails.serialNumber }}</el-form-item>
<el-form-item :label="$t('收款单号')">{{ bankReceiptDetails.receiptNo }}</el-form-item>
<el-form-item :label="$t('剩余应收金额')">
<span> {{ bankReceiptDetails.syValue }} </span>
<span>{{ getCurrencySymbol(bankReceiptDetails.writeOffCurrencyId) }} {{ bankReceiptDetails.syValue }} </span>
</el-form-item>
<el-form-item
:label="$t('收款账户')"
......
......@@ -124,18 +124,6 @@
</template>
</el-table-column>
</el-table>
<!-- <el-descriptions :column="2" border class="card">
<el-descriptions-item > -->
<!-- <el-form-item :label="$t('核销基准币种') + ':'" style="margin-bottom: 0; margin-top: 20px">
{{ getCurrencyLabel(showCurrencyId) }}
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
</el-form-item> -->
<!-- </el-descriptions-item>
<el-descriptions-item :label="$t('核销基准币种')">
</el-descriptions-item>
</el-descriptions> -->
</el-card>
<el-card class="card">
......@@ -371,11 +359,7 @@
</el-descriptions>
</el-card>
</el-form>
<!-- <div slot="footer" style="margin: 20px 0">
<el-button v-if="id==0||form.state==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button>
<el-button v-else type="primary" :loading="saveBtnLoading" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button>
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button>
</div> -->
<div slot="header" class="bpm-title">{{ $t("审核流程") }}</div>
<work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
......@@ -383,9 +367,8 @@
<el-button type="primary" @click="submitForm(0)" v-hasPermi="['ecw:voucher:create:sumbit']">{{ $t("提交申请") }}</el-button>
<el-button v-if="id == 0 || form.state == 0" type="primary" :loading="saveBtnLoading" v-hasPermi="['ecw:voucher:create:save']" @click="submitForm(1)">{{ $t("保存草稿") }}</el-button>
<el-button v-if="orderData.inWarehouseState == 207" type="primary" v-hasPermi="['ecw:voucher:create:see']" @click="$router.push(`/bpm/process-instance/detail?id=` + orderApprovalBackVO.applyingFormId)">{{ $t("审核中") }}</el-button>
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> -->
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t("返回") }}</el-button>
<!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> -->
</div>
<!-- 添加应收明细的弹窗 -->
......@@ -1151,7 +1134,8 @@ export default {
discountTotal: discountDollar,
currencyId: item.id,
receivableAmount: NP.round(dollar, 2),
writeOffRate: item.id == this.showCurrencyId ? 1 : this.getRate(item.id, this.showCurrencyId),
writeOffRate: item.id == this.showCurrencyId ? 1 : dollarList[0].exchangeRate,
// this.getRate(item.id, this.showCurrencyId),
platformAccountId: t?.platformAccountId || "",
collectionCurrencyId: item.id,
collectionRate: 1
......@@ -1174,40 +1158,6 @@ export default {
this.form.receivableTotalAmount = totalt.toFixed(2)
}
// receiptAccountList: [
// { currencyId: 1, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 2, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 3, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// ]
if (this.showCurrencyId === 1) {
// 美元
// const usCount = NP.plus(dollar, NP.times(this.RMBtoUS(), rmb), NP.times(this.NANtoUS(), naira))
// this.form.receivableDetailList[0].rate = 1
// this.form.receivableDetailList[0].amount = usCount
// this.form.receivableDetailList[1].rate || (this.form.receivableDetailList[1].rate = this.UStoRMB())
// this.form.receivableDetailList[2].rate || (this.form.receivableDetailList[2].rate = this.UStoNAN())
// this.form.receivableTotalAmount = usCount
// this.calculationCount(usCount)
} else if (this.showCurrencyId === 2) {
// 人民币
// const rmbCount = NP.plus(rmb, NP.times(this.UStoRMB(), dollar), NP.times(this.NANtoRMB(), naira))
// this.form.receivableDetailList[1].rate = 1
// this.form.receivableDetailList[1].amount = usCount
// this.form.receivableDetailList[0].rate || (this.form.receivableDetailList[0].rate = this.RMBtoUS())
// this.form.receivableDetailList[2].rate || (this.form.receivableDetailList[2].rate = this.RMBtoNAN())
// this.form.receivableTotalAmount = rmbCount
// this.calculationCount(rmbCount)
} else if (this.showCurrencyId === 3) {
// 奈拉
// const nairaCount = NP.plus(naira, NP.times(this.UStoNAN(), dollar), NP.times(this.RMBtoNAN(), rmb))
// this.form.receivableDetailList[2].rate = 1
// this.form.receivableDetailList[2].amount = nairaCount
// this.form.receivableDetailList[0].rate || (this.form.receivableDetailList[0].rate = this.NANtoUS())
// this.form.receivableDetailList[1].rate || (this.form.receivableDetailList[1].rate = this.NANtoRMB())
// this.form.receivableTotalAmount = nairaCount
// this.calculationCount(nairaCount)
}
this.$set(this.form, "receiptAccountList", [...this.form.receiptAccountList])
},
......
......@@ -270,12 +270,12 @@
<el-table-column :label="$t('审核通过时间')" align="center" prop="approvalTime"> </el-table-column>
<el-table-column :label="$t('操作')" align="center" width="200">
<template slot-scope="scope">
<el-button v-if="scope.row.status == 0" v-hasPermi="['ecw:payment:detail:delete']" type="text" @click="deleteClick(scope.row)">{{ $t("删除") }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="detailClick(scope.row)" v-hasPermi="['ecw:payment:detail:detail']">{{ $t("详情") }}</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 4" v-hasPermi="['ecw:payment:detail:delete']" type="text" @click="deleteClick(scope.row)">{{ $t("删除") }}</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 4" type="text" @click="detailClick(scope.row)" v-hasPermi="['ecw:payment:detail:detail']">{{ $t("详情") }}</el-button>
<!--核销 提交 lanbm 2024-05-29 -->
<el-button v-if="scope.row.status == 0" type="text" @click="$router.push(`bankDetail?id=` + id + `&bankId=` + scope.row.id)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t("提交") }}</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 4" type="text" @click="$router.push(`bankDetail?id=` + id + `&bankId=` + scope.row.id)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t("提交") }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="showCancel(scope.$index)" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $t("反核销") }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="editClick(scope.row)" v-hasPermi="['ecw:payment:detail:bankEdit']">{{ $t("编辑") }}</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 4" type="text" @click="editClick(scope.row)" v-hasPermi="['ecw:payment:detail:bankEdit']">{{ $t("编辑") }}</el-button>
<el-button v-if="scope.row.status == 2" type="text" @click="cancelClick(scope.$index, 1)" v-hasPermi="['ecw:payment:detail:cancelDetailApproval']">{{ $t("取消审核") }}</el-button>
<el-button v-if="scope.row.status == 3" type="text" @click="cancelClick(scope.$index, 2)" v-hasPermi="['ecw:payment:detail:cancelWriteOffNo']">{{ $t("取消反核销审核") }}</el-button>
<el-button v-if="scope.row.status == 3 || scope.row.status == 2" type="text" @click="$router.push(`/bpm/process-instance/detail?id=` + scope.row.bmpId)" v-hasPermi="['ecw:payment:detail:approval']">{{ $t("审核详情") }}</el-button>
......@@ -506,12 +506,13 @@
<el-form-item :label="$t('流水号')" v-if="addForm.id">{{ addForm.serialNumber }}</el-form-item>
<el-form-item :label="$t('收款单号')">{{ form.receiptNo }}</el-form-item>
<el-form-item :label="$t('剩余应收金额')">
<template v-if="surplusData.length == 0"> 0 </template>
<template> {{ getCurrencySymbol(showCurrencyId) }}{{ remainingAmountReceived }} </template>
<!-- <template v-if="surplusData.length == 0"> 0 </template>
<div v-else>
<div v-for="(amount, currency) in surplusData" :key="currency">
<span v-if="amount"> {{ amount }}{{ getCurrencyLabel(currency) }}</span>
</div>
</div>
</div> -->
</el-form-item>
<el-form-item
:label="$t('收款账户')"
......@@ -688,6 +689,7 @@
width="160"
>
<template slot-scope="scope">
{{ row }}
<el-input-number style="width: 136px" @change="changeCurrentItemWirteOff(scope.row.id)" v-if="!isView && addForm.writeOffAmount" :min="0" :precision="2" :controls="false" v-model="scope.row.writeOffAmount"></el-input-number>
<span v-else>{{ scope.row.writeOffAmount }}</span>
</template>
......@@ -896,11 +898,11 @@ export default {
return "XX"
}
},
// 已核销总金额
//实收 已核销总金额
writeOffTotal() {
let total = {}
this.detailed.forEach((item) => {
if (item.status) {
if (item.status == 1 || item.status == 3) {
if (!total[item.currencyId]) {
total[item.currencyId] = item.amount
} else total[item.currencyId] = NP.plus(total[item.currencyId], item.amount)
......@@ -912,7 +914,7 @@ export default {
writeOffAmount() {
let total = 0
this.detailed.forEach((item) => {
if (item.status) {
if (item.status == 1 || item.status == 3) {
total = NP.plus(total, item.writeOffAmount)
}
})
......@@ -930,7 +932,7 @@ export default {
let amountTotal = this.form.receiptAccountList.find((item) => item.type == "total").writeOffAmount
this.detailed.forEach((item) => {
if (item.status) {
if (item.status == 1 || item.status == 3) {
total = NP.plus(total, item.writeOffAmount)
}
})
......@@ -938,6 +940,17 @@ export default {
let portion = NP.divide(total, amountTotal)
if (!portion) return 0
return (portion * 100).toFixed(2)
},
remainingAmountReceived() {
let total = 0
let amountTotal = this.form.receiptAccountList.find((item) => item.type == "total").writeOffAmount
this.detailed.forEach((item) => {
if (item.status != 0 || item.status != 4) {
total = NP.plus(total, item.writeOffAmount)
}
})
return NP.minus(amountTotal, total)
}
},
watch: {
......@@ -1159,13 +1172,6 @@ export default {
// 已填写核销金额
this.addForm.currentWriteOffAmount = NP.minus(this.addForm.writeOffAmount, writeOffAmount)
},
//银行收款明细基准金额
// addFormCurrentWriteOffAmount(writeOffAmount) {
// this.addForm.currentWriteOffAmount = NP.round(writeOffAmount, 2)
// console.log("8888", this.addForm.currentWriteOffAmount)
// return this.addForm.currentWriteOffAmount
// },
//根据ID 获取收款单应收明细列表信息
async getReceiptItemList() {
await getInvoicingItem({ id: this.$route.query.id }).then((res) => {
this.list = [...res.data]
......@@ -1511,7 +1517,7 @@ export default {
}
})
if (this.addForm.remainingWriteOffAmount != 0) {
this.$modal.msgError(this.$t(`未填写核销金额>0 ,请检查`))
this.$modal.msgError(this.$t(`未填写核销金额不为0 ,请检查`))
throw new Error("Exit loop")
}
if (totalInput > this.addForm.writeOffAmount) {
......@@ -1688,6 +1694,9 @@ export default {
this.currentReceiptItemId = null
loadBankReceiptItemList({ receiptId: this.$route.query.id }).then((res) => {
this.bankReceiptItemList = res.data
this.bankReceiptItemList.forEach((item) => {
item.writeOffAmount = 0
})
this.addForm = {}
this.openAddDialog = true
......
......@@ -30,7 +30,7 @@
</el-form-item>
<el-form-item :label="$t('自编号状态')" prop="boxStatus">
<dict-selector :type="DICT_TYPE.BOX_ORDER_SHIPMENT_STATE" v-model="queryParams.boxStatus" clearable></dict-selector>
<dict-selector multiple :type="DICT_TYPE.BOX_ORDER_SHIPMENT_STATE" v-model="queryParams.boxStatus" clearable></dict-selector>
</el-form-item>
<!-- <el-form-item :label="$t('结算时间')" prop="dateFilter">
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
......@@ -153,8 +153,12 @@
<el-table-column :label="$t('财务结算')" align="center" prop="slSettledTime" width="200" fixed="left"> </el-table-column>
<el-table-column :label="$t('No.柜号')" width="130" align="center" prop="selfNo" fixed="left">
<template slot-scope="scope">
<el-button v-if="permissions.indexOf('selfno:report:detail') > -1" type="text" @click="$router.push('./selfNoReportDetailNew?containerNumber=' + scope.row.selfNo)">{{ scope.row.selfNo }}</el-button>
<router-link v-if="permissions.indexOf('selfno:report:detail') > -1" :to="{ path: './selfNoReportDetailNew?containerNumber=' + scope.row.selfNo }">
{{ scope.row.selfNo }}
</router-link>
<span v-else>{{ scope.row.selfNo }}</span>
<!-- <el-button type="text" @click="$router.push('./selfNoReportDetailNew?containerNumber=' + scope.row.selfNo)">{{ scope.row.selfNo }}</el-button> -->
</template>
</el-table-column>
<el-table-column :label="$t('应收款(Accounts receivable)')" align="center">
......@@ -242,7 +246,7 @@ export default {
daogangTime: this.setETATime(), //到港时间
startWarehouseIdList: [], //始发仓
destWarehouseIdList: [], //目的地
boxStatus: "", //自编号状态
boxStatus: [], //自编号状态
page: 1,
rows: 10
},
......
......@@ -269,9 +269,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('提货率')" align="center" width="120">
<template slot-scope="{ row }">
{{ row.pickRatio }}
</template>
<template slot-scope="{ row }"> {{ row.pickRatio }}% </template>
</el-table-column>
<el-table-column :label="$t('提单制作')" align="center" width="120">
<template slot-scope="{ row }">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment