Commit 01427304 authored by Administrator's avatar Administrator

Merge branch 'pre-release' into 'jd_dev'

Pre release合并到release分支

See merge request !135
parents f2b79406 c97ff655
import request from "@/utils/request";
import request from "@/utils/request"
// 创建出货
export function createbox(data) {
return request({
url: "/shipment/box/create",
method: "post",
data: data,
});
data: data
})
}
// 更新出货
......@@ -14,24 +14,24 @@ export function updatebox(data) {
return request({
url: "/shipment/box/update",
method: "put",
data: data,
});
data: data
})
}
// 删除出货
export function deletebox(id) {
return request({
url: "/shipment/box/delete?id=" + id,
method: "delete",
});
method: "delete"
})
}
// 获得出货
export function getbox(id) {
return request({
url: "/shipment/box/get?id=" + id,
method: "get",
});
method: "get"
})
}
// 获得出货分页
......@@ -39,8 +39,8 @@ export function getboxPage(query) {
return request({
url: "/shipment/box/page",
method: "get",
params: query,
});
params: query
})
}
// 导出出货 Excel
......@@ -50,8 +50,8 @@ export function exportboxExcel(query) {
method: "get",
params: query,
timeout: 20 * 60000,
responseType: "blob",
});
responseType: "blob"
})
}
// 导出预装单-异步
......@@ -60,7 +60,7 @@ export function exportPreloadGoodsList(query) {
url: "/ecw/box-preload-goods/downloadPreloadGoodsList",
method: "get",
params: query
});
})
}
// 导出海运预装单,上面的预装单是空运的
......@@ -69,7 +69,7 @@ export function exportSeaPreloadGoodsList(query) {
url: "/ecw/box-preload-goods/downloadSeaPreloadGoodsList",
method: "get",
params: query
});
})
}
// 创建费用登记
......@@ -78,23 +78,23 @@ export function createCost(data) {
return request({
url: "/ecw/box-cost/update",
method: "put",
data,
});
data
})
}
return request({
url: "/ecw/box-cost/create",
method: "post",
data,
});
data
})
}
// 删除费用登记
export function deleteCost(id) {
return request({
url: `/ecw/box-cost/delete?id=${id}`,
method: "delete",
});
method: "delete"
})
}
// 审核详情
......@@ -103,8 +103,8 @@ export function approvalDetail(data) {
url: "/ecw/box-approval/approvalDetail",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
data: jsonToFormData(data)
})
}
// 出货操作日志列表
......@@ -112,8 +112,8 @@ export function getLogList(params) {
return request({
url: "/ecw/box-op-log/list",
method: "get",
params,
});
params
})
}
// 获得费用登记列表
......@@ -123,17 +123,17 @@ export function getCostList(params) {
return request({
url: "/ecw/box-cost/list",
method: "get",
params,
});
params
})
}
// 收款单表 SELECT * from ecw_payment
// 应付款表 SELECT * from ecw_payable
// 根据明细获取主表ID
export function getPaymentId(id) {
return request({
url: "/ecw/box-cost/getPaymentId?id="+id,
url: "/ecw/box-cost/getPaymentId?id=" + id,
method: "get"
});
})
}
// 获得出货异常记录列表
......@@ -141,8 +141,8 @@ export function getAbnormalList(params) {
return request({
url: "/ecw/box-abnormal/list",
method: "get",
params,
});
params
})
}
// 获得制作提货单列表
......@@ -150,8 +150,8 @@ export function getMakeBillList(params) {
return request({
url: "/shipment/make-bill-of-lading/getMakeLadingBillList",
method: "get",
params,
});
params
})
}
// 制作提货单
......@@ -159,8 +159,8 @@ export function makeBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/make",
method: "get",
params,
});
params
})
}
// 空运制作提单
......@@ -168,8 +168,8 @@ export function makeAirBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/airMake",
method: "get",
params,
});
params
})
}
// 创建制作提货单
......@@ -177,16 +177,16 @@ export function createBillService(data) {
return request({
url: "/shipment/make-bill-of-lading/create",
method: "post",
data,
});
data
})
}
// 取消制作提货单审核
export function cancelBillService(id) {
return request({
url: `/shipment/make-bill-of-lading/cancel?id=${id}`,
method: "delete",
});
method: "delete"
})
}
// 下载提货单
......@@ -194,8 +194,8 @@ export function downloadBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/download",
method: "get",
params,
});
params
})
}
// 更新制作提货单
......@@ -203,23 +203,23 @@ export function updateBillService(data) {
return request({
url: "/shipment/make-bill-of-lading/update",
method: "put",
data,
});
data
})
}
// 删除制作提货单
export function deleteBillService(id) {
return request({
url: `/shipment/make-bill-of-lading/delete?id=${id}`,
method: "delete",
});
method: "delete"
})
}
// 检查提单状态是否已制作提单
export function checkBillOfLadingService(orderId) {
return request({
url: "/shipment/make-bill-of-lading/check/billOfLading/" + orderId,
method: "post",
});
method: "post"
})
}
// 获得制作提货单
......@@ -227,8 +227,8 @@ export function getBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/get",
method: "get",
params,
});
params
})
}
// 打包下载提货单
......@@ -237,8 +237,8 @@ export function zipDownload(params) {
url: "/shipment/make-bill-of-lading/zipDownload",
method: "get",
timeout: 120000,
params,
});
params
})
}
/**
......@@ -248,11 +248,11 @@ export function zipDownload(params) {
* @return {*}
*/
function jsonToFormData(params) {
const formData = new FormData();
const formData = new FormData()
for (const [key, value] of Object.entries(params)) {
formData.append(key, value);
formData.append(key, value)
}
return formData;
return formData
}
// 创建制作提货单
......@@ -260,8 +260,8 @@ export function getNoticeList(data) {
return request({
url: "/shipment/box/noticeList",
method: "post",
data,
});
data
})
}
// 空运出货提示
......@@ -269,8 +269,8 @@ export function getAirNoticeList(data) {
return request({
url: "/shipment/box/airNoticeList",
method: "post",
data,
});
data
})
}
/**
......@@ -284,9 +284,9 @@ export function downloadByOrderId(orderId) {
return request({
url: "/shipment/make-bill-of-lading/downloadByOrderId",
method: "get",
params: { orderId },
params: { orderId }
/* responseType: "arraybuffer", */
});
})
}
// 获得出货审核
......@@ -294,8 +294,8 @@ export function getBoxApproval(params) {
return request({
url: "/ecw/box-approval/get",
method: "get",
params,
});
params
})
}
// 获得制作提货单(审核中调用)
......@@ -303,17 +303,17 @@ export function getBillOfLandingInProcessing(params) {
return request({
url: "/shipment/make-bill-of-lading/getInProcessing",
method: "get",
params,
});
params
})
}
// 下载agent list文件
export function downloadAgentListFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadAgentListFiles",
method: "get",
timeout: 3*60*1000,
params,
});
timeout: 3 * 60 * 1000,
params
})
}
// 下载son cap文件
......@@ -321,9 +321,9 @@ export function downloadSoncapFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadSoncapFiles",
method: "get",
timeout: 3*60*1000,
params,
});
timeout: 3 * 60 * 1000,
params
})
}
// 下载报关单
......@@ -331,19 +331,19 @@ export function downloadCustomFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadCustomFiles",
method: "get",
timeout: 3*60*1000,
params,
});
timeout: 3 * 60 * 1000,
params
})
}
// 下载已装单
export function downloadLoadGoodsList(params) {
return request({
url: "/ecw/box-preload-goods/downloadLoadGoodsList",
timeout: 3*60*1000,
timeout: 3 * 60 * 1000,
method: "get",
params,
});
params
})
}
/**
......@@ -354,7 +354,7 @@ export function downloadLoadGoods(params) {
url: "/ecw/box-preload-goods/downloadAirLoadGoodsList",
method: "get",
timeout: 120000,
params,
params
})
}
......@@ -363,20 +363,20 @@ export function downloadPreloadGoodsList(params) {
return request({
url: "/ecw/box-preload-goods/downloadPreloadGoodsList",
responseType: "blob",
timeout: 3*60*1000,
timeout: 3 * 60 * 1000,
method: "get",
params,
});
params
})
}
// 下载应收汇总 lanbm 2024-05-24 添加注释
export function downloadReceivableList(params) {
return request({
url: "/ecw/box-preload-goods/downloadReceivableList",
timeout: 3*60*1000,
timeout: 3 * 60 * 1000,
method: "get",
params,
});
params
})
}
// 空运的应收汇总下载
......@@ -384,8 +384,8 @@ export function downloadAirReceivableList(params) {
return request({
url: "/ecw/box-preload-goods/downloadAirBillReceivable",
method: "get",
params,
});
params
})
}
// 下载提单copy
......@@ -393,9 +393,9 @@ export function downloadLadingCopy(params) {
return request({
url: "/ecw/box-lading-copy/downloadLadingCopy",
method: "get",
timeout: 3*60*1000,
params,
});
timeout: 3 * 60 * 1000,
params
})
}
// 下载提单copy
......@@ -403,20 +403,18 @@ export function cdAwbFile(params) {
return request({
url: "/ecw/box-preload-goods/cdAwbFile",
method: "get",
timeout: 3*60*1000,
params,
});
timeout: 3 * 60 * 1000,
params
})
}
// 更新异常订单状态
export function updateAbnormalOrder(data) {
return request({
url: "/shipment/box/updateAbnormalOrder",
method: "post",
data,
});
data
})
}
// 更新提单URL
......@@ -424,14 +422,14 @@ export function updateUrl(data) {
return request({
url: "/shipment/make-bill-of-lading/updateUrl",
method: "put",
data,
});
data
})
}
export function dealCustomsSplitNotify(notifyId){
export function dealCustomsSplitNotify(notifyId) {
return request({
url: `/shipment/box/dealCustomsSplitNotify?notifyId=${notifyId}`,
method: "get",
method: "get"
})
}
......@@ -440,8 +438,8 @@ export function boxSettlementPage(params) {
return request({
url: "/shipment/box/pageSettlement",
method: "get",
params,
});
params
})
}
// 导出自编号汇总excel
......@@ -449,8 +447,8 @@ export function exportSettlementExcel(params) {
return request({
url: "/shipment/box/export-shipment-summary",
method: "get",
params,
});
params
})
}
// 刷新空运提单
......@@ -458,5 +456,14 @@ export function updateAirBill(id) {
return request({
url: "/shipment/make-bill-of-lading/updateAirBill?ids=" + id,
method: "get"
});
})
}
// 新导出自编号汇总excel
export function exportSettlementExcelNew(params) {
return request({
url: "/shipment/box/export-shipment-summary/new",
method: "get",
params
})
}
......@@ -35,19 +35,29 @@ export function getReceiptList(data) {
// 获取应收款列表
export function getReceivableList(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/receivable/page",
method: "get",
params: query
method: "post",
params,
data: query
})
}
// 获取应收款总额
export function getReceivableAmount(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/receivable/page/amount",
method: "get",
params: query
method: "post",
params,
data: query
})
}
......@@ -285,10 +295,15 @@ export function deletePayable(id) {
// 获取应付款列表
export function getPayableList(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/payable/page",
method: "get",
params: query
method: "post",
params,
data: query
})
}
......@@ -328,10 +343,15 @@ export function commissionPayment(data) {
// 获取付款单列表
export function getPaymentList(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/payment/page",
method: "get",
params: query
method: "post",
params,
data: query
})
}
......@@ -439,20 +459,32 @@ export function paymentVerifyCancel(data) {
}
//获取佣金应付款
export function payablePage(params) {
export function payablePage(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/commission-payable/page",
method: "get",
params
method: "post",
params,
data: query
})
}
//获取佣金付款单
export function commissionPaymentPage(params) {
export function commissionPaymentPage(query) {
let params = {
page: query.page,
rows: query.rows
}
return request({
url: "/ecw/commission-payment/page",
method: "get",
params
method: "post",
params,
data: query
})
}
......@@ -929,3 +961,31 @@ export function loadReceivablePage(data) {
params
})
}
//应收报表列表
export function loadStatementsReceivableList(data) {
let params = {
page: data.page,
rows: data.rows
}
return request({
url: "/ecw/receivable/box/report",
method: "post",
data,
params
})
}
//应收报表列表-自编号的订单费用汇总
export function loadSelfNoSummaryList(data) {
let params = {
page: data.page,
rows: data.rows
}
return request({
url: "/ecw/orderCount/containerNumber/orderSummary/new",
method: "post",
data,
params
})
}
......@@ -4838,5 +4838,43 @@
"开票税率": "Tax rate of billing",
"汇率有效期": "Validity period of exchange rate",
"收款明细税率": "Collection details tax rate",
"请输入收款明细税率": "Please enter the tax rate of the collection details"
"请输入收款明细税率": "Please enter the tax rate of the collection details",
"财务结算": "financial settlement",
"应收款(Accounts receivable)": "Accounts receivable",
"汇总 Total": "Total",
"结算币种 settlement currency": "settlement currency",
"应收款明细 RECEIVABLE DEATAILS": "RECEIVABLE DEATAILS",
"额外费用(副币种) EXTRAL FEE": " EXTRAL FEE(Vice currency)",
"目的国实收": "Actual receipt in the destination country",
"应收款明细": "Details of receivables",
"应收款-原币": "Receivables - original currency",
"始发国实收": "Received in the country of origin",
"未收款明细": "No payment details",
"应收款": "account receivable",
"额外费用(副币种)": "EXTRAL FEE(Vice currency)",
"筛选合计信息:": "Filter total information:",
"未收款明细 Accounts receivable": "Accounts receivable",
"订单时间类型": "Order time type",
"是否泡货": "Whether to bubble or not",
"折后总金额": "Total discounted amount:",
"折扣金额": "discount amount",
"未收总金额": "Total amount not received:",
"折后应收金额": "Discounted amount receivable",
"已收金额": "amount received",
"未收金额": "Amount not received",
"应收": "receivable",
"批量处理成功": "Batch processing is successful",
"批量处理失败": "Batch processing failed",
"请选择需要批量操作的任务。": "Select the task that you want to batch.",
"批量通过": "Pass in batches",
"批量不通过": "Batch does not pass",
"审批意见不能为空。": "The approval opinion cannot be empty.",
"请输入审批意见": "Please enter the approval opinion",
"审批意见": "approval opinion",
"结算币种金额合计": "Total amount of settlement currency",
"实收金额合计": "Total amount received",
"收款账号": "shroff account number",
"结算币种": "settlement currency",
"汇总": "total",
"实收金额汇总": "Summary of amount received"
}
......@@ -285,7 +285,9 @@ export const DICT_TYPE = {
RECEIPT_GENERATE_PATH: "receipt_generate_path", //收款单生成路径
RECEIPT_LINK: "receipt_link", //应收款日志环节
ECW_INCOME_RELATION_SYMBOL: "income_relation_symbol", //银行收支明细查询关系符号
LADING_BILL_STATUS_DATA: "lading_Bill_Status_Data"
LADING_BILL_STATUS_DATA: "lading_Bill_Status_Data", //提单制作
ATTRIBUTION_OF_INCOME: "attribution_of_income", //收入归属
PICKUP_RATE_COMPARISON_SYMBOLS: "pickup_rate_comparison_symbols" //提货率比较符号
}
/**
......
......@@ -43,9 +43,11 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('收入归属')" prop="baIncomeBelong">
<el-select v-model="queryParams.baIncomeBelong" :placeholder="$t('请选择')" clearable>
<dict-selector :type="DICT_TYPE.ATTRIBUTION_OF_INCOME" v-model="queryParams.baIncomeBelong" clearable></dict-selector>
<!-- <el-select v-model="queryParams.baIncomeBelong" :placeholder="$t('请选择')" clearable>
<el-option v-for="countryItem in countryList" :key="countryItem.id" :label="$l(countryItem, 'title')" :value="countryItem.id" />
</el-select>
</el-select> -->
</el-form-item>
<el-form-item :label="$t('币种')" prop="baCurrency">
<el-select v-model="queryParams.baCurrency" :placeholder="$t('请选择')" clearable>
......@@ -77,8 +79,8 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('银行账号编号')" align="center" prop="id" />
<el-table-column :label="$t('户名')" align="center" prop="baAccountName" />
<el-table-column :label="$t('银行账号编号')" fixed="left" align="center" prop="id" />
<el-table-column :label="$t('户名')" fixed="left" align="center" prop="baAccountName" />
<el-table-column :label="$t('开户银行')" align="center" prop="baBankName" />
<el-table-column :label="$t('银行账号')" align="center" prop="baAccountNum" />
<el-table-column :label="$t('银行代码')" align="center" prop="baSwiftCode" />
......@@ -89,7 +91,11 @@
<dict-tag :type="DICT_TYPE.ECW_BANK_TYPE" :value="scope.row.baType" />
</template>
</el-table-column>
<el-table-column :label="$t('收入归属')" align="center" :prop="$l('baIncomeBelong')" />
<el-table-column :label="$t('收入归属')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ATTRIBUTION_OF_INCOME" :value="scope.row.baIncomeBelong" />
</template>
</el-table-column>
<el-table-column :label="$t('币种')" align="center" prop="baCurrency">
<template slot-scope="scope">
{{ $l(getCurrencyData(scope.row.baCurrency), "title") }}
......@@ -113,10 +119,13 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('操作')" fixed="right" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['ecw:bank-account:update']">{{ $t("修改") }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['ecw:bank-account:delete']">{{ $t("删除") }}</el-button>
<el-button size="mini" type="text" @click="$router.push({ path: '/financial/bankAccount/bankBalanceDetails', query: { platformAccountIds: scope.row.id } })">{{ $t("收支明细") }}</el-button>
<!-- /financial/bankAccount/bankBalanceDetails -->
</template>
</el-table-column>
</el-table>
......@@ -155,9 +164,10 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('收入归属')" prop="baIncomeBelong">
<el-select v-model="form.baIncomeBelong" :placeholder="$t('请选择收入归属')" clearable>
<dict-selector :type="DICT_TYPE.ATTRIBUTION_OF_INCOME" formatter="number" v-model="form.baIncomeBelong" clearable></dict-selector>
<!-- <el-select v-model="form.baIncomeBelong" :placeholder="$t('请选择收入归属')" clearable>
<el-option v-for="countryItem in countryList" :key="countryItem.id" :label="$l(countryItem, 'title')" :value="countryItem.id" />
</el-select>
</el-select> -->
</el-form-item>
<el-form-item :label="$t('余额')" prop="baBalance">
<el-input v-model="form.baBalance" :placeholder="$t('请输入开户银行地址')" />
......@@ -208,7 +218,7 @@ export default {
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
showSearch: false,
// 总条数
total: 0,
// 银行账户列表
......
......@@ -47,7 +47,9 @@
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template slot-scope="scope">
<el-link type="primary" @click.native="showWarehouseLogs(scope.row)">
{{ scope.row.sumNum }}<span v-if="scope.row.mixStatus === 1">{{$t('混箱')}}</span>
</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('纸箱尺寸')" align="center">
......@@ -82,19 +84,30 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</el-row>
</el-row>
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
<realated-order :orderItemId="showRelatedItemId" v-if="showRelatedItemId" @close="showRelatedItemId=null"></realated-order>
</div>
</template>
<script>
import { getUnPkgPage, createPkgOrder, createBatchPkgOrder } from '@/api/ecw/boxAir'
import { getUnPkgPage, createPkgOrder, createBatchPkgOrder, getOrderTagList } from '@/api/ecw/boxAir'
import { formatDate, serviceMsg } from '../../utils'
import WarehouseDetail from "./warehouseDetail.vue";
import RealatedOrder from "../../../shippingSea/nodePage/tally/realatedOrder.vue";
import {getOrder} from "@/api/ecw/order";
export default {
components: {
WarehouseDetail,
RealatedOrder,
},
props: {
pkgData: Object,
shipmentObj: Object,
},
data() {
return {
showWarehouseInItemId: null,
showRelatedItemId: null,
pagList: [],
// 查询参数
queryParams: {
......@@ -113,7 +126,11 @@ export default {
methods: {
getList() {
getUnPkgPage(this.queryParams).then((res) => {
let list = [];
this.pagList = res.data.list || []
res.data.forEach((item) => {
})
this.total = res.data.total
})
},
......@@ -136,6 +153,17 @@ export default {
})
return data.toString()
},
// 显示入仓记录
showWarehouseLogs(row) {
getOrder(row.orderId).then((response) => {
this.order = response.data;
this.showWarehouseInItemId = row.orderId;
});
},
// 显示关联单
showRelatedOrder(row) {
this.showRelatedItemId = row.orderId
},
addPkg(row) {
let data = {
pkgId: this.pkgData.id,
......
<template>
<!-- 订单获取入仓记录 -->
<el-dialog title="入仓记录" visible :before-close="closeDialog" :close-on-click-modal="false" width="95%" append-to-body>
<el-table :data="warehouseItem">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{row}">
<template v-if="row.orderWarehouseInDetailsVOList && row.orderWarehouseInDetailsVOList.length">
<WarehouseRecordDetail v-model="row.orderWarehouseInDetailsVOList" :num="row.cartonsNum" text readonly />
</template>
<template v-else>{{ row.cartonsNum }}</template>
</template>
</el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge && row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge && row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge && row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('快递单号')" prop="expressNo" />
<el-table-column :label="$t('储位')" align="center" prop="positionNo" width="250px">
<template slot-scope="{row}">{{row.orderLocationBackVOList && row.orderLocationBackVOList.map(e => (e.areaName + (e.locationName === null ? '' : e.locationName))).join(',')}}</template>
</el-table-column>
<el-table-column :label="$t('首次入仓时间')" prop="inTime">
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { getOrder, getOrderWarehouseIn } from "@/api/ecw/order";
import WarehouseRecordDetail from '@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue'
import { parseTime } from "@/utils/ruoyi";
export default {
filters: { parseTime },
components: {
WarehouseRecordDetail
},
props: {
order: Object, // order 和 orderId 二选一
orderId: Number,
orderItemId: Number,
},
data() {
return {
orderDetail: null,
warehouseList: null,
};
},
computed: {
info() {
return this.orderDetail || this.order;
},
orderItem() {
if (!this.info) return null;
return this.info.orderItemVOList.find(
(item) => item.orderItemId == this.orderItemId
);
},
warehouseItem() {
if (!this.warehouseList) return [];
let dataList = []
this.warehouseList.map(
(item) => {
return item.orderWarehouseInBackItemDoList.map(v => {
dataList.push({...v})
})
}
)
console.log('dataList', dataList)
return dataList
},
title() {
if (!this.orderItem) return "-";
return this.$l(this.orderItem, "prodTitle") + " - " + this.$t("入仓记录");
}
},
created() {
this.show = true;
if (!this.order && this.orderId) {
getOrder(this.orderId).then((res) => {
this.orderDetail = res.data;
});
}
this.getOrderWarehouseIn();
},
methods: {
closeDialog() {
this.show = false;
this.$emit("close");
},
getOrderWarehouseIn() {
getOrderWarehouseIn(this.info.orderId).then((res) => {
this.warehouseList = res.data;
});
},
},
};
</script>
......@@ -44,7 +44,7 @@
</div>
<div class="table-box">
<el-table v-loading="loading" :data="list" border>
<el-table-column type="index" :index="indexMethod" />
<el-table-column type="index" :index="indexMethod" :label="$t('序号')" />
<el-table-column :label="$t('开户银行')" width="160" align="center" prop="accountBankName"> </el-table-column>
<el-table-column :label="$t('支/收')" width="160" align="center">
<template slot-scope="scope">
......@@ -114,6 +114,10 @@ export default {
}
},
async created() {
if (this.$route.query.platformAccountIds != null) {
this.queryParams.platformAccountIds = [this.$route.query.platformAccountIds * 1]
}
const { data } = await getBankAccountPage({ pageNo: 1, pageSize: 1000 })
this.bankData = data.list
this.handleQuery()
......@@ -123,7 +127,7 @@ export default {
},
methods: {
goBankReceiptDetailsList(row) {
this.$router.push({ path: "/financial/BankReceiptDetails", query: { receiptNo: row.receiptNo } })
this.$router.push({ path: "/financial/bankAccount/BankReceiptDetails", query: { receiptNo: row.receiptNo } })
},
indexMethod(index) {
return index * this.queryParams.pageNo + 1
......
......@@ -362,11 +362,22 @@ export default {
})
getChannelList().then((res) => (this.channelList = res.data))
this.init()
const orderNo = this.$route.query.orderNo || ""
if (orderNo) {
this.queryParams.orderNo = orderNo
}
this.handleQuery()
},
activated() {
const orderNo = this.$route.query.orderNo || ""
if (orderNo) {
this.queryParams.orderNo = orderNo
}
this.handleQuery()
},
methods: {
goBankReceiptDetailsList(row) {
this.$router.push({ path: "/financial/BankReceiptDetails", query: { receiptNo: row.receiptNo } })
this.$router.push({ path: "/financial/bankAccount/BankReceiptDetails", query: { receiptNo: row.receiptNo } })
},
getChannelName(channelId) {
const channel = this.channelList.filter((item) => item.channelId == channelId)
......
......@@ -26,7 +26,7 @@
<user-selector style="width: 260px" multiple manage v-model="formQuery.salesmanIds" clearable :placeholder="$t('请选择')" />
</el-form-item>
<el-form-item :label="$t('客户') + ':'" style="margin-bottom: 0; margin-top: 20px" label-width="100px" prop="customerName">
<el-input style="width: 260px" v-model="formQuery.customerName" :placeholder="$t('输入客户')"> ></el-input>
<el-input style="width: 260px" v-model="formQuery.customerName" :placeholder="$t('输入客户')"> ></el-input>
</el-form-item>
<el-form-item :label="$t('提交时间') + ':'" style="margin-bottom: 0; margin-top: 20px" label-width="100px" prop="endTimeData">
<el-date-picker v-model="formQuery.endTimeData" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"></el-date-picker>
......
<template>
<div style="padding: 20px">
<el-card class="box-card">
<div slot="header" class="clearfix" style="font-size: 20px;">
{{$t('佣金付款单')}}
<div slot="header" class="clearfix" style="font-size: 20px">
{{ $t("佣金付款单") }}
</div>
<el-form label-width="80px" label-position="left">
<el-row :gutter="30">
......@@ -18,18 +18,13 @@
</el-col>
<el-col :span="6">
<el-form-item :label="$t('状态')">
<dict-selector clearable :type="DICT_TYPE.ECW_PAYMENT_STATE" v-model="queryParams.state" />
<dict-selector clearable multiple :type="DICT_TYPE.ECW_PAYMENT_STATE" v-model="queryParams.stateList" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('业务员')">
<el-select v-model="queryParams.salesmanName" :placeholder="$t('请选择业务员')">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
<el-select clearabl multiple v-model="queryParams.salesmanNameList" :placeholder="$t('请选择业务员')">
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.nickname" />
</el-select>
</el-form-item>
</el-col>
......@@ -37,23 +32,12 @@
<el-row :gutter="30">
<el-col :span="7">
<el-form-item :label="$t('创建时间')">
<el-date-picker
style="width:100%;"
v-model="selectDate"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')">
</el-date-picker>
<el-date-picker style="width: 100%" v-model="selectDate" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"> </el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')">
<el-select clearable multiple v-model="queryParams.invoiceStatusList" :placeholder="$t('请选择是否开票')">
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
</el-select>
......@@ -66,8 +50,16 @@
</el-col>
<el-col :span="4">
<el-form-item>
<el-button size="mini" type="primary" @click="queryParams.page = 1;getList()">{{$t('查找')}}</el-button>
<el-button type="success" size="mini" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:0}})" v-has-permi="['ecw:commission-Payment:add']" >{{$t('新增请款单')}}</el-button>
<el-button
size="mini"
type="primary"
@click="
queryParams.page = 1
getList()
"
>{{ $t("查找") }}</el-button
>
<el-button type="success" size="mini" @click="$router.push({ path: '/financial/commission-requestFunds', query: { payableId: 0 } })" v-has-permi="['ecw:commission-Payment:add']">{{ $t("新增请款单") }}</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -77,230 +69,215 @@
<el-table border :data="list" style="margin-top: 30px">
<el-table-column align="center" type="index" :label="$t('序号')"></el-table-column>
<el-table-column align="center" prop="paymentNo" :label="$t('付款单号')">
<template v-slot="{row}">
<router-link :to="{path:'/financial/commission-requestFunds',query:{[[0].includes(row.state) ? 'id' : 'lookId' ]:row.id}}">{{row.paymentNo}} </router-link>
<template v-slot="{ row }">
<router-link :to="{ path: '/financial/commission-requestFunds', query: { [[0].includes(row.state) ? 'id' : 'lookId']: row.id } }">{{ row.paymentNo }} </router-link>
</template>
</el-table-column>
<el-table-column align="center" prop="customerName" :label="$t('客户')"></el-table-column>
<el-table-column align="center" :label="$t('创建时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
<template v-slot="{ row }">
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('最后付款时间')">
<template v-slot="{row}">
{{parseTime(row.latestPayAt)}}
<template v-slot="{ row }">
{{ parseTime(row.latestPayAt) }}
</template>
</el-table-column>
<el-table-column align="center" prop="invoiceStatus" :label="$t('发票')">
<template v-slot="{row}">
{{row.invoiceStatus ? $t('已开票') : $t('未开票')}}
<template v-slot="{ row }">
{{ row.invoiceStatus ? $t("已开票") : $t("未开票") }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('状态')" prop="state" >
<el-table-column align="center" :label="$t('状态')" prop="state">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state"
/>
<span v-if="[2,4,6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
<dict-tag :type="DICT_TYPE.ECW_PAYMENT_STATE" :value="scope.row.state" />
<span v-if="[2, 4, 6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{row}">
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:edit']" v-if="[0,2].includes(row.state)" @click="$router.push({path:'/financial/commission-requestFunds',query:{id:row.id}})" >{{$t('编辑')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:delete']" @click="deleteFn(row)" v-if="[0,2].includes(row.state)" > {{$t('删除')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:details']" v-if="[7,3,1,5].includes(row.state)" @click="$router.push({path:'/bpm/process-instance/detail',query:{id:row.bmpId}})" >{{$t('审核详情')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:Unapprove']" v-if="[1].includes(row.state)" @click="bridgeFn($t('取消审核'),7, row, $t('取消审核') )" >{{$t('取消审核')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:De-approval']" v-if="[4,].includes(row.state)" @click="bridgeFn($t('佣金付款单反审核'), 1, row, $t('提交反审核'),)" >{{$t('反审核')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:Write-off']" v-if="[4,].includes(row.state)" @click="bridgeFn($t('佣金付款单核销申请'), 2, row, $t('提交核销'))" >{{$t('核销')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:print']" v-if="[4,6].includes(row.state)" @click="$router.push({path:'/financial/printPaymentVoucherCommission',query:{id:row.id}})" >{{$t('打印')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[6,].includes(row.state)" @click="bridgeFn($t('佣金付款单反核销申请'), 3, row, $t('提交反核销'))" >{{$t('反核销')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelDe-approval']" v-if="[3].includes(row.state)" @click="bridgeFn($t('取消佣金付款单反审核'),4, row, $t('提交取消反审核') )" >{{$t('取消反审核')}}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[5].includes(row.state)" @click="bridgeFn($t('取消佣金付款单核销'),5, row, $t('取消付款单核销') )" > {{$t('取消核销')}} </el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelCancellingWrite-off']" v-if="[7].includes(row.state)" @click="bridgeFn($t('取消佣金付款单反核销'),6, row, $t('取消付款单反核销') )" > {{$t('取消反核销')}} </el-button>
<template v-slot="{ row }">
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:edit']" v-if="[0, 2].includes(row.state)" @click="$router.push({ path: '/financial/commission-requestFunds', query: { id: row.id } })">{{ $t("编辑") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:delete']" @click="deleteFn(row)" v-if="[0, 2].includes(row.state)"> {{ $t("删除") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:details']" v-if="[7, 3, 1, 5].includes(row.state)" @click="$router.push({ path: '/bpm/process-instance/detail', query: { id: row.bmpId } })">{{ $t("审核详情") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:Unapprove']" v-if="[1].includes(row.state)" @click="bridgeFn($t('取消审核'), 7, row, $t('取消审核'))">{{ $t("取消审核") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:De-approval']" v-if="[4].includes(row.state)" @click="bridgeFn($t('佣金付款单反审核'), 1, row, $t('提交反审核'))">{{ $t("反审核") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:Write-off']" v-if="[4].includes(row.state)" @click="bridgeFn($t('佣金付款单核销申请'), 2, row, $t('提交核销'))">{{ $t("核销") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:print']" v-if="[4, 6].includes(row.state)" @click="$router.push({ path: '/financial/printPaymentVoucherCommission', query: { id: row.id } })">{{ $t("打印") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[6].includes(row.state)" @click="bridgeFn($t('佣金付款单反核销申请'), 3, row, $t('提交反核销'))">{{ $t("反核销") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelDe-approval']" v-if="[3].includes(row.state)" @click="bridgeFn($t('取消佣金付款单反审核'), 4, row, $t('提交取消反审核'))">{{ $t("取消反审核") }}</el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[5].includes(row.state)" @click="bridgeFn($t('取消佣金付款单核销'), 5, row, $t('取消付款单核销'))"> {{ $t("取消核销") }} </el-button>
<el-button type="text" size="mini" v-has-permi="['ecw:commission-Payment:CancelCancellingWrite-off']" v-if="[7].includes(row.state)" @click="bridgeFn($t('取消佣金付款单反核销'), 6, row, $t('取消付款单反核销'))"> {{ $t("取消反核销") }} </el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
<!--对话框 审核 -->
<el-dialog @close="paymentValue = ''" width="30%" :title="paymentTitle" :visible.sync="paymentShow">
<div class="cancel_content">
<span>{{ $t('申请理由') }}</span>
<el-input type="textarea" :rows="6" v-model="paymentValue" :placeholder="[1,2,3].includes(paymentIndex) ? $t('请输入申请理由') : $t('请输入取消理由')"></el-input>
<span>{{ $t("申请理由") }}</span>
<el-input type="textarea" :rows="6" v-model="paymentValue" :placeholder="[1, 2, 3].includes(paymentIndex) ? $t('请输入申请理由') : $t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{ $t(butTitle) }}</el-button>
<el-button @click="paymentShow = false; paymentValue = ''">{{ $t('取消') }}</el-button>
<el-button
@click="
paymentShow = false
paymentValue = ''
"
>{{ $t("取消") }}</el-button
>
</span>
</el-dialog>
<!-- <commission-payment-details :id="6"></commission-payment-details>-->
<!-- <commission-payment-details :id="6"></commission-payment-details>-->
</div>
</template>
<script>
import {listSimpleUsers} from "@/api/system/user";
import {
commissionPaymentCancelFinancePaymentApproval,
commissionPaymentCancelFinancePaymentApprovalNo,
commissionPaymentCancelFinancePaymentWriteOff,
commissionPaymentCancelFinancePaymentWriteOffNo,
commissionPaymentDelete,
commissionPaymentPage,
commissionPaymentVerification,
commissionPaymentVerificationCancel,
commissionPaymentVerifyCancel
} from "@/api/ecw/financial";
import {parseTime} from "../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
import commissionPaymentDetails from "@/views/ecw/financial/components/commissionPaymentDetails.vue";
import { listSimpleUsers } from "@/api/system/user"
import { commissionPaymentCancelFinancePaymentApproval, commissionPaymentCancelFinancePaymentApprovalNo, commissionPaymentCancelFinancePaymentWriteOff, commissionPaymentCancelFinancePaymentWriteOffNo, commissionPaymentDelete, commissionPaymentPage, commissionPaymentVerification, commissionPaymentVerificationCancel, commissionPaymentVerifyCancel } from "@/api/ecw/financial"
import { parseTime } from "../../../utils/ruoyi"
import Template from "@/views/cms/template/index.vue"
import commissionPaymentDetails from "@/views/ecw/financial/components/commissionPaymentDetails.vue"
export default {
name: "EcwFinancialCommission-payment",
components: {Template,commissionPaymentDetails},
activated(){
components: { Template, commissionPaymentDetails },
activated() {
this.getList()
},
created() {
// 业务员
listSimpleUsers().then((res) => (this.creatorData = res.data));
this.getList();
listSimpleUsers().then((res) => (this.creatorData = res.data))
this.getList()
},
watch:{
selectDate(val){
if(val !== null && val.length){
watch: {
selectDate(val) {
if (val !== null && val.length) {
this.queryParams.beginCreateTime = val[0]
this.queryParams.endCreateTime = val[1]
}else {
this.queryParams.beginCreateTime = null;
this.queryParams.endCreateTime = null;
} else {
this.queryParams.beginCreateTime = null
this.queryParams.endCreateTime = null
}
}
},
data(){
data() {
return {
queryParams:{
accountNumber:null,
invoiceStatus:null,
state:null,
salesmanName:null,
searchKey:null,
paymentNo:null,
beginCreateTime:null,
endCreateTime:null,
page:1,
rows:10,
queryParams: {
accountNumber: null,
invoiceStatusList: null,
stateList: null,
salesmanNameList: null,
searchKey: null,
paymentNo: null,
beginCreateTime: null,
endCreateTime: null,
page: 1,
rows: 10
},
selectDate:[],
creatorData:[],
list:[],
total:0,
paymentRow:{},
paymentIndex:0,
paymentTitle:'',
butTitle:'',
paymentShow:false,
paymentValue:''
selectDate: [],
creatorData: [],
list: [],
total: 0,
paymentRow: {},
paymentIndex: 0,
paymentTitle: "",
butTitle: "",
paymentShow: false,
paymentValue: ""
}
},
methods:{
methods: {
parseTime,
getList(){
commissionPaymentPage(this.queryParams).then(r => {
getList() {
commissionPaymentPage(this.queryParams).then((r) => {
this.list = r.data.list
this.total = r.data.total
})
},
// 删除
deleteFn(row){
this.$confirm(this.$t('是否删除此条佣金付款单'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
commissionPaymentDelete({id:row.id}).then(r => {
deleteFn(row) {
this.$confirm(this.$t("是否删除此条佣金付款单"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning"
})
.then(() => {
commissionPaymentDelete({ id: row.id }).then((r) => {
this.$message({
type: 'success',
message:this.$t('删除成功!')
});
this.getList();
type: "success",
message: this.$t("删除成功!")
})
this.getList()
})
})
}).catch(() => {
.catch(() => {
this.$message({
type: 'info',
message: this.$t('已取消删除')
});
});
type: "info",
message: this.$t("已取消删除")
})
})
},
bridgeFn(title, index ,row, butTitle = '提交'){
this.paymentTitle = title;
this.butTitle = butTitle;
this.paymentIndex = index;
this.paymentRow = row;
this.paymentShow = true;
bridgeFn(title, index, row, butTitle = "提交") {
this.paymentTitle = title
this.butTitle = butTitle
this.paymentIndex = index
this.paymentRow = row
this.paymentShow = true
},
//提交
cancelWriteOffClick(){
if(!this.paymentValue) return this.$message.warning(this.$t('请输入理由!'))
let resolve = (val = '操作成功')=>{
this.getList();
this.paymentShow = false;
this.paymentValue = ''
this.$message.success(val);
cancelWriteOffClick() {
if (!this.paymentValue) return this.$message.warning(this.$t("请输入理由!"))
let resolve = (val = "操作成功") => {
this.getList()
this.paymentShow = false
this.paymentValue = ""
this.$message.success(val)
}
let reject = ()=>{
this.paymentShow = false;
this.paymentValue = ''
let reject = () => {
this.paymentShow = false
this.paymentValue = ""
}
let p = {
"paymentId": this.paymentRow.id,
"paymentNo": this.paymentRow.paymentNo,
"remark":this.paymentValue,
"reason":this.paymentValue
paymentId: this.paymentRow.id,
paymentNo: this.paymentRow.paymentNo,
remark: this.paymentValue,
reason: this.paymentValue
}
switch (this.paymentIndex){
switch (this.paymentIndex) {
case 1:
// 反审核佣金付款单
commissionPaymentVerifyCancel(p).then(()=>resolve(this.$t('提交佣金付款单反审核成功,请耐心等待审核结果!')), reject)
break;
commissionPaymentVerifyCancel(p).then(() => resolve(this.$t("提交佣金付款单反审核成功,请耐心等待审核结果!")), reject)
break
case 2:
// 佣金付款单核销
commissionPaymentVerification(p).then(() =>resolve(this.$t('提交佣金付款单核销成功,请耐心等待审核结果!')), reject)
break;
commissionPaymentVerification(p).then(() => resolve(this.$t("提交佣金付款单核销成功,请耐心等待审核结果!")), reject)
break
case 3:
// 付款单反核销申请
commissionPaymentVerificationCancel(p).then(() =>resolve(this.$t('提交佣金付款单反核销申请成功,请耐心等待审核结果')), reject)
break;
commissionPaymentVerificationCancel(p).then(() => resolve(this.$t("提交佣金付款单反核销申请成功,请耐心等待审核结果")), reject)
break
case 4:
// 取消付款单反审核
commissionPaymentCancelFinancePaymentApprovalNo(p).then(() =>resolve(this.$t('取消佣金付款单反审核成功!')), reject)
break;
commissionPaymentCancelFinancePaymentApprovalNo(p).then(() => resolve(this.$t("取消佣金付款单反审核成功!")), reject)
break
case 5:
// 取消付款单核销
commissionPaymentCancelFinancePaymentWriteOff(p).then(() =>resolve(this.$t('取消佣金付款单核销成功!')), reject)
commissionPaymentCancelFinancePaymentWriteOff(p).then(() => resolve(this.$t("取消佣金付款单核销成功!")), reject)
break
case 6:
// 取消付款单反核销
commissionPaymentCancelFinancePaymentWriteOffNo(p).then(() =>resolve(this.$t('取消佣金付款单反核销成功!')), reject)
break;
commissionPaymentCancelFinancePaymentWriteOffNo(p).then(() => resolve(this.$t("取消佣金付款单反核销成功!")), reject)
break
case 7:
// 取消付款单审核
commissionPaymentCancelFinancePaymentApproval(p).then(() =>resolve(this.$t('取消佣金付款单审核成功!')), reject)
break;
commissionPaymentCancelFinancePaymentApproval(p).then(() => resolve(this.$t("取消佣金付款单审核成功!")), reject)
break
}
}
}
}
</script>
<style scoped>
</style>
<style scoped></style>
<template>
<div style="padding: 20px">
<div style="padding: 20px">
<el-card class="box-card">
<div slot="header" class="clearfix" style="font-size: 20px;">
{{$t('应付款佣金')}}
<div slot="header" class="clearfix" style="font-size: 20px">
{{ $t("应付款佣金") }}
</div>
<el-form label-width="80px" inline>
<el-row :gutter="20">
......@@ -18,33 +18,15 @@
</el-col>
<el-col :span="6">
<el-form-item :label="$t('始发仓')">
<el-select
v-model="queryParams.startWarehouseId"
:placeholder="$t('请选择始发仓')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<el-select multiple v-model="queryParams.startWarehouseIdList" :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('目的仓')">
<el-select
v-model="queryParams.destWarehouseId"
:placeholder="$t('请选择目的仓')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<el-select multiple v-model="queryParams.destWarehouseIdList" :placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -52,168 +34,153 @@
<el-row :gutter="20">
<el-col :span="6">
<el-form-item :label="$t('运输方式')">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
clearable
/>
<dict-selector multiple :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportIdList" formatter="number" clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('佣金类型')">
<dict-selector
:type="DICT_TYPE.COMMISSION_TYPE"
v-model="queryParams.feeType"
formatter="number"
clearable
/>
<dict-selector multiple :type="DICT_TYPE.COMMISSION_TYPE" v-model="queryParams.feeTypeList" formatter="number" clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('状态')">
<el-select clearable v-model="queryParams.state">
<el-option v-for="(item) in STATE" :label="$t(item.title)" :value="item.value" :key="item.value"></el-option>
<el-select clearable v-model="queryParams.stateList" multiple>
<el-option v-for="item in STATE" :label="$t(item.title)" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button size="mini" type="primary" @click="queryParams.page = 1;getList()">{{$t('查找')}}</el-button>
<el-button size="mini" v-has-permi="['ecw:commission-payable:add']" type="success" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:0}})" >{{$t('新增请款单')}}</el-button>
<el-button
size="mini"
type="primary"
@click="
queryParams.page = 1
getList()
"
>{{ $t("查找") }}</el-button
>
<el-button size="mini" v-has-permi="['ecw:commission-payable:add']" type="success" @click="$router.push({ path: '/financial/commission-requestFunds', query: { payableId: 0 } })">{{ $t("新增请款单") }}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-table border :data="list" style="margin-top: 30px">
<el-table-column align="center" :label="$t('订单编号')" prop="orderNo" ></el-table-column>
<el-table-column align="center" :label="$t('订单编号')" prop="orderNo"></el-table-column>
<el-table-column align="center" :label="$t('品名')">
<template v-slot="{row}">
{{row.titleZh}}/{{row.titleEn}}
</template>
<template v-slot="{ row }"> {{ row.titleZh }}/{{ row.titleEn }} </template>
</el-table-column>
<el-table-column align="center" :label="$t('客户名称')" prop="customerName" ></el-table-column>
<el-table-column align="center" :label="$t('客户名称')" prop="customerName"></el-table-column>
<el-table-column align="center" :label="$t('佣金类型')">
<template v-slot="{row}">
<dict-tag
:type="DICT_TYPE.COMMISSION_TYPE"
:value="row.feeType"
></dict-tag>
<template v-slot="{ row }">
<dict-tag :type="DICT_TYPE.COMMISSION_TYPE" :value="row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" :label="$t('金额')" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<span>{{getCurrencyLabel(scope.row.currencyId)}}</span>
<span>{{ getCurrencyLabel(scope.row.currencyId) }}</span>
</template>
</el-table-column>
<el-table-column align="center" :label="$t('应付生成时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
<template v-slot="{ row }">
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('状态')">
<template v-slot="{row}">
{{$t(STATE.find(r => r.value === row.state).title)}}
<template v-slot="{ row }">
{{ $t(STATE.find((r) => r.value === row.state).title) }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('付款单号')" prop="paymentNo"></el-table-column>
<el-table-column :label="$t('备注')" prop="remark" ></el-table-column>
<el-table-column :label="$t('备注')" prop="remark"></el-table-column>
<el-table-column align="center" :label="$t('操作')">
<template v-slot="{row}">
<el-button size="mini" v-has-permi="['ecw:commission-payable:funds']" v-if="!row.state" type="text" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >{{$t('请款')}}</el-button>
<template v-slot="{ row }">
<el-button size="mini" v-has-permi="['ecw:commission-payable:funds']" v-if="!row.state" type="text" @click="$router.push({ path: '/financial/commission-requestFunds', query: { payableId: row.id } })">{{ $t("请款") }}</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</div>
</template>
<script>
import {getWarehouseList} from "@/api/ecw/warehouse";
import item from "@/layout/components/Sidebar/Item.vue";
import {payablePage} from "@/api/ecw/financial";
import Template from "@/views/cms/template/index.vue";
import {getCurrencyPage} from "@/api/ecw/currency";
import {parseTime} from "../../../utils/ruoyi";
import { getWarehouseList } from "@/api/ecw/warehouse"
import item from "@/layout/components/Sidebar/Item.vue"
import { payablePage } from "@/api/ecw/financial"
import Template from "@/views/cms/template/index.vue"
import { getCurrencyPage } from "@/api/ecw/currency"
import { parseTime } from "../../../utils/ruoyi"
export default {
// 应付款佣金
name: "EcwFinancialCommission-payable",
components: {Template},
activated(){
components: { Template },
activated() {
this.getList()
},
created() {
getWarehouseList().then(res => this.warehouseList = res.data)
getWarehouseList().then((res) => (this.warehouseList = res.data))
this.getList()
getCurrencyPage().then(res => this.currencyList = res.data.list)
getCurrencyPage().then((res) => (this.currencyList = res.data.list))
},
data(){
data() {
return {
STATE:[
STATE: [
{
value:0,
title:this.$t('未付款'),
value: 0,
title: this.$t("未付款")
},
{
value:1,
title:this.$t('付款中'),
value: 1,
title: this.$t("付款中")
},
{
value:2,
title:this.$t('已付款'),
value: 2,
title: this.$t("已付款")
}
],
warehouseList:[],
queryParams:{
rows:10,
page:1,
orderNo:'',
customerName:'',
startWarehouseId:'',
destWarehouseId:'',
feeType:'',
state:''
warehouseList: [],
queryParams: {
rows: 10,
page: 1,
orderNo: "",
customerName: "",
startWarehouseIdList: [],
destWarehouseIdList: [],
feeTypeList: [],
stateList: []
},
list:[],
total:0,
currencyList:[],
list: [],
total: 0,
currencyList: []
}
},
computed:{
exportWarehouseList(){
computed: {
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
}
},
methods:{
methods: {
parseTime,
getList(){
payablePage(this.queryParams).then(r =>{
getList() {
payablePage(this.queryParams).then((r) => {
this.list = r.data.list
this.total = r.data.total
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return ''
},
},
getCurrencyLabel(id) {
var label = this.currencyList.filter((item) => item.id == id)
if (label.length > 0) return this.$i18n.locale == "zh_CN" ? label[0].titleZh : label[0].titleEn
return ""
}
}
}
</script>
<style scoped>
</style>
<style scoped></style>
......@@ -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('收款账户')"
......@@ -455,7 +455,7 @@ export default {
}
}
}
this.$set(this.bankReceiptDetails, "writeOffAmount", Math.round(NP.times(this.bankReceiptDetails.rate || 0, this.bankReceiptDetails.amount || 0)), 2)
this.$set(this.bankReceiptDetails, "writeOffAmount", NP.round(NP.times(this.bankReceiptDetails.rate || 0, this.bankReceiptDetails.amount || 0), 2))
//已填写核销金额
this.$set(this.bankReceiptDetails, "currentWriteOffAmount", 0)
// 剩余核销金额
......
......@@ -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])
},
......
......@@ -143,7 +143,7 @@ export default {
},
methods: {
handleInvoiceOperate({ id, key }) {
this.$router.push("invoiceOperate?id=" + id + "&key=" + key)
this.$router.push("/financial/invoiceOperate?id=" + id + "&key=" + key)
},
async getInvoiceList() {
this.loading = true
......
......@@ -652,7 +652,7 @@ export default {
message: this.$t("成功"),
type: "success"
})
this.$router.push({ path: "/financial/voucher" })
this.$router.push({ path: "/financial/receivable/voucher" })
}
})
})
......
......@@ -3,129 +3,50 @@
<div slot="header" class="card-title">{{ $t("应付款") }}</div>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="100px"
class="card"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px" class="card">
<el-row>
<el-form-item :label="$t('柜号')">
<el-input
style="max-width: 188px"
v-model="queryParams.containerNo"
:placeholder="$t('请输入柜号')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input style="max-width: 188px" v-model="queryParams.containerNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('自编号')">
<el-input
style="max-width: 188px"
v-model="queryParams.payableNo"
:placeholder="$t('请输入自编号')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input style="max-width: 188px" v-model="queryParams.payableNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('始发仓')">
<el-select
v-model="queryParams.departureId"
:placeholder="$t('请选择始发仓')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<el-select v-model="queryParams.departureIdList" multiple :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select
v-model="queryParams.objectiveId"
:placeholder="$t('请选择目的仓')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<el-select v-model="queryParams.objectiveIdList" multiple :placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
clearable
/>
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" multiple v-model="queryParams.transportIdList" formatter="number" clearable />
</el-form-item>
</el-row>
<el-row>
<!--lanbm 2024-05-17 add-->
<el-form-item label="时间节点" prop="dateType">
<el-select
v-model="queryParams.dateType"
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="$l(item, 'label')"
:value="item.value"
/>
<el-select v-model="queryParams.dateTypeList" multiple :placeholder="$t('请选择时间类型')" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker
v-model="queryParams.dateRangeCreateTime"
style="width: 300px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
clearable
/>
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 300px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('供应商名称')">
<el-input
style="max-width: 188px"
v-model="queryParams.supplierName"
:placeholder="$t('请输入供应商名称')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input style="max-width: 188px" v-model="queryParams.supplierName" :placeholder="$t('请输入供应商名称')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('费用类型')">
<dict-selector
:type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType"
clearable
></dict-selector>
<dict-selector :type="DICT_TYPE.FEE_TYPE" multiple v-model="queryParams.feeTypeList" clearable></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:payable:create']"
@click="handleAdd(0)"
>{{ $t("新增付款单") }}</el-button
>
<el-button type="primary" @click="handleQuery">{{ $t("查找") }}</el-button>
<el-button style="margin-left: 10px" type="success" v-hasPermi="['ecw:payable:create']" @click="handleAdd(0)">{{ $t("新增付款单") }}</el-button>
<!--lanbm 2024-05-17修改此按钮名称-->
</el-form-item>
</el-row>
......@@ -134,32 +55,13 @@
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column :label="$t('自编号')" align="center" prop="payableNo" />
<!--lanbm 2024-05-17 add-->
<el-table-column
:label="$t('自编号状态')"
align="center"
prop="shipmentStatusText"
/>
<el-table-column
:label="$t('运输方式')"
align="center"
prop="transportTypeName"
/>
<el-table-column
:label="$t('货柜号')"
align="center"
prop="containerNo"
/>
<el-table-column
:label="$t('供应商')"
align="center"
prop="supplierName"
/>
<el-table-column :label="$t('自编号状态')" align="center" prop="shipmentStatusText" />
<el-table-column :label="$t('运输方式')" align="center" prop="transportTypeName" />
<el-table-column :label="$t('货柜号')" align="center" prop="containerNo" />
<el-table-column :label="$t('供应商')" align="center" prop="supplierName" />
<el-table-column :label="$t('费用类型')" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="scope.row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('金额')" align="center" prop="totalAmount">
......@@ -168,162 +70,67 @@
<span>{{ getCurrencyLabel(scope.row.currencyId) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('费用产生时间')"
align="center"
prop="freecsdate"
/>
<el-table-column :label="$t('费用产生时间')" align="center" prop="freecsdate" />
<!--lanbm 2024-05-17 添加字段 BaseDO -->
<el-table-column :label="$t('创建人')" align="center" prop="creator" />
<el-table-column
:label="$t('创建时间')"
align="center"
prop="createTime"
/>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" />
<el-table-column :label="$t('修改人')" align="center" prop="updater" />
<el-table-column
:label="$t('修改时间')"
align="center"
prop="updateTime"
/>
<el-table-column :label="$t('修改时间')" align="center" prop="updateTime" />
<el-table-column :label="$t('备注')" align="center" prop="remark" />
<el-table-column
:label="$t('操作')"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
v-hasPermi="['ecw:payable:edit']"
@click="editClick(scope.row)"
>{{ $t("编辑") }}</el-button
>
<el-button
size="mini"
type="text"
v-hasPermi="['ecw:payable:add']"
@click="handleAdd(scope.row.id)"
>{{ $t("请款") }}</el-button
>
<el-button
size="mini"
type="text"
v-hasPermi="['ecw:payable:delete']"
@click="deleteClick(scope.row)"
>{{ $t("删除") }}</el-button
>
<el-button size="mini" type="text" v-hasPermi="['ecw:payable:edit']" @click="editClick(scope.row)">{{ $t("编辑") }}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:payable:add']" @click="handleAdd(scope.row.id)">{{ $t("请款") }}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:payable:delete']" @click="deleteClick(scope.row)">{{ $t("删除") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title="$t('费用登记')"
:visible.sync="open"
width="500px"
append-to-body
>
<el-dialog :title="$t('费用登记')" :visible.sync="open" width="500px" append-to-body>
<el-form ref="costForm" :model="costObj" label-width="120px">
<el-form-item :label="$t('操作步骤')">
<el-select
v-model="costObj.stepsId"
:placeholder="$t('请选择操作步骤')"
>
<el-option
v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="costObj.stepsId" :placeholder="$t('请选择操作步骤')">
<el-option v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('费用类型')">
<el-select
v-model="costObj.feeType"
:placeholder="$t('请选择费用类型')"
>
<el-option
v-for="item in this.getDictDatas(DICT_TYPE.FEE_TYPE)"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="costObj.feeType" :placeholder="$t('请选择费用类型')">
<el-option v-for="item in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('供应商')">
<el-select
v-model="costObj.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
<el-select v-model="costObj.supplierId" :placeholder="$t('请选择供应商')">
<el-option v-for="supplier in allSupplier" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select>
</el-form-item>
<!--lanbm 2024-05-17 添加字段-->
<el-form-item :label="$t('费用产生时间')" prop="freecsdate">
<el-date-picker
v-model="costObj.freecsdate"
style="width: 200px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="datetime"
placeholder="费用产生时间"
/>
<el-date-picker v-model="costObj.freecsdate" style="width: 200px" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="datetime" placeholder="费用产生时间" />
</el-form-item>
<el-row class="two-element">
<el-form-item :label="$t('金额')">
<el-input-number
v-model="costObj.totalAmount"
controls-position="right"
:min="1"
></el-input-number>
<el-input-number v-model="costObj.totalAmount" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="" label-width="0px">
<el-select
v-model="costObj.currencyId"
:placeholder="$t('请选择单位')"
>
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale == 'zh_CN' ? item.titleZh : item.titleEn"
:value="item.id"
></el-option>
<el-select v-model="costObj.currencyId" :placeholder="$t('请选择单位')">
<el-option v-for="item in currencyList" :key="item.id" :label="$i18n.locale == 'zh_CN' ? item.titleZh : item.titleEn" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-form-item :label="$t('备注')">
<el-input
v-model="costObj.remark"
type="textarea"
rows="2"
:placeholder="$t('请输入备注')"
></el-input>
<el-input v-model="costObj.remark" type="textarea" rows="2" :placeholder="$t('请输入备注')"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="operate-button">
<el-button type="primary" @click="submitEditForm">{{
$t("确定")
}}</el-button>
<el-button type="primary" @click="submitEditForm">{{ $t("确定") }}</el-button>
<el-button @click="cancelEditForm">{{ $t("取消") }}</el-button>
</div>
</el-dialog>
......@@ -331,17 +138,13 @@
</template>
<script>
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import { getTradeCityList } from "@/api/ecw/region";
import {
getPayableList,
deletePayable,
updatePayable,
} from "@/api/ecw/financial";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getCurrencyPage } from "@/api/ecw/currency";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { userList } from "@/api/system/user"
import { DICT_TYPE } from "@/utils/dict"
import { getTradeCityList } from "@/api/ecw/region"
import { getPayableList, deletePayable, updatePayable } from "@/api/ecw/financial"
import { getSupplierPage } from "@/api/ecw/supplier"
import { getCurrencyPage } from "@/api/ecw/currency"
import { getWarehouseList } from "@/api/ecw/warehouse"
/*
应付款
......@@ -363,14 +166,14 @@ export default {
loading: "",
params: {
page: 1,
rows: 20,
rows: 20
},
queryParams: {
page: 1,
rows: 20,
dateRangeCreateTime: undefined,
beginCreateTime: undefined,
endCreateTime: undefined,
endCreateTime: undefined
},
allSupplier: [],
currencyList: [],
......@@ -383,83 +186,71 @@ export default {
{ value: "3", label: this.$t("起运时间") },
{ value: "4", label: this.$t("到港时间") },
{ value: "5", label: this.$t("清关时间") },
{ value: "6", label: this.$t("卸柜时间") },
],
};
{ value: "6", label: this.$t("卸柜时间") }
]
}
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
return this.tradeCityList.filter((item) => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
return this.tradeCityList.filter((item) => item.type == 1)
},
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(
(item) => item.tradeType == 2 || item.tradeType == 3
);
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == 1 || item.tradeType == 3
);
},
return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
}
},
activated() {
this.handleQuery();
this.handleQuery()
},
created() {
let that = this;
getWarehouseList().then((res) => (this.warehouseList = res.data));
getCurrencyPage(this.params).then(
(res) => (this.currencyList = res.data.list)
);
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList();
let that = this
getWarehouseList().then((res) => (this.warehouseList = res.data))
getCurrencyPage(this.params).then((res) => (this.currencyList = res.data.list))
userList("salesman").then((res) => (that.creatorData = res.data))
getTradeCityList().then((res) => (that.tradeCityList = res.data))
this.getList()
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
const { data } = res
this.allSupplier = data.list
})
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
let params = { ...this.queryParams }
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime")
// 执行查询
if (
params.dateRangeCreateTime != null &&
params.dateRangeCreateTime.length == 2
) {
params.beginCreateTime = params.dateRangeCreateTime[0];
params.endCreateTime = params.dateRangeCreateTime[1];
if (params.dateRangeCreateTime != null && params.dateRangeCreateTime.length == 2) {
params.beginCreateTime = params.dateRangeCreateTime[0]
params.endCreateTime = params.dateRangeCreateTime[1]
}
getPayableList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
this.list = response.data.list
this.total = response.data.total
this.loading = false
})
},
getCurrencyLabel(id) {
var label = this.currencyList.filter((item) => item.id == id);
if (label.length > 0)
return this.$i18n.locale == "zh_CN"
? label[0].titleZh
: label[0].titleEn;
return "";
var label = this.currencyList.filter((item) => item.id == id)
if (label.length > 0) return this.$i18n.locale == "zh_CN" ? label[0].titleZh : label[0].titleEn
return ""
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
this.queryParams.pageNo = 1
this.getList()
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push("creatPayment?payableId=" + id);
return this.$router.push("/financial/creatPayment?payableId=" + id)
},
submitEditForm() {
const params = {
......@@ -470,41 +261,41 @@ export default {
supplierId: this.costObj.supplierId,
totalAmount: this.costObj.totalAmount,
currencyId: this.costObj.currencyId,
remark: this.costObj.remark,
};
remark: this.costObj.remark
}
updatePayable(params).then((res) => {
this.$modal.msgSuccess(this.$t("修改成功"));
this.getList();
this.open = false;
});
this.$modal.msgSuccess(this.$t("修改成功"))
this.getList()
this.open = false
})
},
/** 取消按钮 */
cancelEditForm() {
this.open = false;
this.open = false
},
editClick(row) {
row.stepsId = String(row.stepsId);
row.feeType = String(row.feeType);
row.currencyId = row.currencyId;
console.log(row);
this.costObj = { ...row };
this.open = true;
row.stepsId = String(row.stepsId)
row.feeType = String(row.feeType)
row.currencyId = row.currencyId
console.log(row)
this.costObj = { ...row }
this.open = true
},
deleteClick(row) {
const id = row.id;
const id = row.id
this.$modal
.confirm(this.$t("是否确认删除该应付款") + "?")
.then(function () {
return deletePayable(id);
return deletePayable(id)
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
this.getList()
this.$modal.msgSuccess(this.$t("删除成功"))
})
.catch(() => {});
},
},
};
.catch(() => {})
}
}
}
</script>
<style lang="scss" scoped>
......
......@@ -3,183 +3,82 @@
<div slot="header" class="card-title">{{ $t("付款单") }}</div>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch" class="card">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="100px"
class="card"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px" class="card">
<el-form-item :label="$t('付款单号')">
<el-input
style="max-width: 188px"
v-model="queryParams.paymentNo"
:placeholder="$t('请输入付款单号')"
clearable
@keyup.enter.native="handleQuery"
></el-input>
<el-input style="max-width: 188px" v-model="queryParams.paymentNo" :placeholder="$t('请输入付款单号')" clearable @keyup.enter.native="handleQuery"></el-input>
</el-form-item>
<el-form-item :label="$t('供应商')">
<el-select
clearable
v-model="queryParams.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
<el-select clearable v-model="queryParams.supplierIdList" multiple :placeholder="$t('请选择供应商')">
<el-option v-for="supplier in allSupplier" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('业务员')">
<el-select
v-model="queryParams.salesmanName"
filterable
:placeholder="$t('请选择业务员')"
clearable
>
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
<el-select v-model="queryParams.salesmanNameList" multiple filterable :placeholder="$t('请选择业务员')" clearable>
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.nickname" />
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
:start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')"
>
</el-date-picker>
<el-date-picker v-model="queryParams.beginCreateTime" type="datetimerange" value-format="yyyy-MM-dd" range-separator="到" :start-placeholder="$t('请选择日期')" :end-placeholder="$t('请选择日期')"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
clearable
:type="DICT_TYPE.ECW_PAYMENT_STATE"
v-model="queryParams.state"
></dict-selector>
<dict-selector clearable :type="DICT_TYPE.ECW_PAYMENT_STATE" multiple v-model="queryParams.stateList"></dict-selector>
</el-form-item>
<el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-select clearable v-model="queryParams.invoiceStatusList" multiple :placeholder="$t('请选择是否开票')">
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<el-button type="primary" @click="handleQuery">{{ $t("查找") }}</el-button>
<!--lanbm 2024-05-06 改 “新增请款单” 为 “新增付款单” -->
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:paymentVoucher:create']"
@click="handleAdd(0)"
>{{ $t("新增付款单") }}
</el-button>
<el-button style="margin-left: 10px" type="success" v-hasPermi="['ecw:paymentVoucher:create']" @click="handleAdd(0)">{{ $t("新增付款单") }} </el-button>
</el-form-item>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column
:label="$t('序号')"
align="center"
prop="id"
type="index"
>
<el-table-column :label="$t('序号')" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('付款单号')" align="center" prop="paymentNo">
<template slot-scope="scope">
<span style="color: #1890ff" @click="paymentDetail(scope.row)">{{
scope.row.paymentNo
}}</span>
<span style="color: #1890ff" @click="paymentDetail(scope.row)">{{ scope.row.paymentNo }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('供应商')"
align="center"
prop="supplierName"
/>
<el-table-column :label="$t('供应商')" align="center" prop="supplierName" />
<el-table-column :label="$t('创建时间')" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('实际付款日期')"
align="center"
prop="sjfkdate"
>
<el-table-column :label="$t('实际付款日期')" align="center" prop="sjfkdate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.sjfkdate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('最后付款时间')"
align="center"
prop="latestPayAt"
>
<el-table-column :label="$t('最后付款时间')" align="center" prop="latestPayAt">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.latestPayAt, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('发票')" align="center" prop="invoiceStatus">
<template slot-scope="scope">
<span>{{
scope.row.invoiceStatus === 0 ? $t("未开票") : $t("已开票")
}}</span>
<span>{{ scope.row.invoiceStatus === 0 ? $t("未开票") : $t("已开票") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state"
/>
<span
v-if="[2, 4, 6].includes(scope.row.state) && scope.row.comment"
:title="scope.row.comment"
><i class="el-icon-question"></i
></span>
<dict-tag :type="DICT_TYPE.ECW_PAYMENT_STATE" :value="scope.row.state" />
<span v-if="[2, 4, 6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
</template>
</el-table-column>
<el-table-column
:label="$t('操作')"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template v-slot="{ row }">
<el-button
v-if="[0, 2].includes(row.state)"
size="mini"
@click="handleAdd(row.id)"
v-hasPermi="['ecw:paymentVoucher:edit']"
type="text"
>{{ $t("编辑") }}
</el-button>
<el-button v-if="[0, 2].includes(row.state)" size="mini" @click="handleAdd(row.id)" v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t("编辑") }} </el-button>
<!-- <el-button v-if="[1,3].includes(row.state)" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>-->
<el-button
size="mini"
type="text"
v-show="[1].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Unapprove']"
@click="bridgeFn(1, $t('取消审核'), row)"
>
<el-button size="mini" type="text" v-show="[1].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Unapprove']" @click="bridgeFn(1, $t('取消审核'), row)">
{{ $t("取消审核") }}
</el-button>
<el-button
......@@ -190,208 +89,84 @@
@click="
$router.push({
path: '/bpm/process-instance/detail',
query: { id: row.bmpId },
query: { id: row.bmpId }
})
"
>{{ $t("审核详情") }}</el-button
>
<el-button
size="mini"
type="text"
v-if="[3].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-De-approval']"
@click="bridgeFn(2, $t('取消付款单反审核'), row)"
>{{ $t("取消反审核") }}</el-button
>
<el-button
size="mini"
type="text"
v-if="[5].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-Write-off']"
@click="bridgeFn(3, $t('取消付款单核销'), row)"
>{{ $t("取消核销") }}</el-button
>
<el-button size="mini" type="text" v-if="[3].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-De-approval']" @click="bridgeFn(2, $t('取消付款单反审核'), row)">{{ $t("取消反审核") }}</el-button>
<el-button size="mini" type="text" v-if="[5].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-Write-off']" @click="bridgeFn(3, $t('取消付款单核销'), row)">{{ $t("取消核销") }}</el-button>
<el-button
v-if="[4].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:De-approval']"
@click="bridgeFn(4, $t('反审核'), row)"
>{{ $t("反审核") }}
</el-button>
<el-button
v-if="[4].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:writeOff']"
@click="bridgeFn(5, $t('核销'), row)"
>{{ $t("核销") }}
</el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:De-approval']" @click="bridgeFn(4, $t('反审核'), row)">{{ $t("反审核") }} </el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']" @click="bridgeFn(5, $t('核销'), row)">{{ $t("核销") }} </el-button>
<el-button
v-if="[6].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']"
@click="bridgeFn(6, $t('反核销'), row)"
>
<el-button v-if="[6].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="bridgeFn(6, $t('反核销'), row)">
{{ $t("反核销") }}
</el-button>
<el-button
v-if="[7].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-Cancelling-Write-off']"
size="mini"
type="text"
@click="bridgeFn(7, $t('取消付款单反核销'), row)"
>
{{ $t("取消反核销") }}</el-button
>
<el-button
v-if="[6, 4].includes(row.state)"
size="mini"
type="text"
@click="toprint(row.id)"
v-hasPermi="['ecw:paymentVoucher:print']"
>{{ $t("打印") }}
</el-button>
<el-button
v-if="[0, 2].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:delete']"
@click="deleteClick(row)"
>{{ $t("删除") }}
</el-button>
<el-button v-if="[7].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-Cancelling-Write-off']" size="mini" type="text" @click="bridgeFn(7, $t('取消付款单反核销'), row)"> {{ $t("取消反核销") }}</el-button>
<el-button v-if="[6, 4].includes(row.state)" size="mini" type="text" @click="toprint(row.id)" v-hasPermi="['ecw:paymentVoucher:print']">{{ $t("打印") }} </el-button>
<el-button v-if="[0, 2].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:delete']" @click="deleteClick(row)">{{ $t("删除") }} </el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title="$t('导出账单')"
:visible.sync="open"
width="500px"
style="margin-top: 20vh !important"
append-to-body
>
<div
slot="header"
class="card-title"
style="border-bottom: 2px solid #f8f8f8"
>
<el-dialog :title="$t('导出账单')" :visible.sync="open" width="500px" style="margin-top: 20vh !important" append-to-body>
<div slot="header" class="card-title" style="border-bottom: 2px solid #f8f8f8">
<span>{{ $t("导出账单") }}</span>
<i class="el-icon-close" @click="cancel"></i>
</div>
<div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm"
>{{ $t("国内账单") }}
</el-button>
<el-button
plain
type="primary"
style="width: 130px; margin: 0"
@click="submitForm"
>Debite note
</el-button>
<el-button type="primary" style="width: 130px" @click="submitForm">{{ $t("国内账单") }} </el-button>
<el-button plain type="primary" style="width: 130px; margin: 0" @click="submitForm">Debite note </el-button>
</div>
</el-dialog>
<!--对话框 审核 -->
<el-dialog
width="30%"
@close="cancelReason = ''"
:title="examineTitle"
:visible.sync="examineShow"
>
<el-dialog width="30%" @close="cancelReason = ''" :title="examineTitle" :visible.sync="examineShow">
<div class="cancel_content">
<!--lanbm 2024-05-17 修改-->
<span>{{ $t("付款备注") }}</span>
<el-input
type="textarea"
:rows="6"
v-model="cancelReason"
:placeholder="$t('请输入付款备注')"
></el-input>
<el-input type="textarea" :rows="6" v-model="cancelReason" :placeholder="$t('请输入付款备注')"></el-input>
<span>{{ $t("实际付款日期") }}</span>
<el-date-picker
v-model="sjfkdate"
style="width: 200px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
type="datetime"
placeholder="实际付款日期"
/>
<el-date-picker v-model="sjfkdate" style="width: 200px" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" type="datetime" placeholder="实际付款日期" />
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{
$t("提交")
}}</el-button>
<el-button type="primary" @click="cancelWriteOffClick()">{{ $t("提交") }}</el-button>
<el-button @click="examineShow = false">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
<el-dialog
width="30%"
@close="cancelReason = ''"
:title="examineTitle"
:visible.sync="fhxShow"
>
<el-dialog width="30%" @close="cancelReason = ''" :title="examineTitle" :visible.sync="fhxShow">
<div class="cancel_content">
<span>{{ $t("申请理由") }}</span>
<el-input
type="textarea"
:rows="6"
v-model="cancelReason"
:placeholder="$t('申请理由')"
></el-input>
<el-input type="textarea" :rows="6" v-model="cancelReason" :placeholder="$t('申请理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick2()">{{
$t("提交")
}}</el-button>
<el-button @click="cancelWriteOffClick2_Close">{{
$t("取消")
}}</el-button>
<el-button type="primary" @click="cancelWriteOffClick2()">{{ $t("提交") }}</el-button>
<el-button @click="cancelWriteOffClick2_Close">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { userList, listSimpleUsers } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import { getSupplierPage } from "@/api/ecw/supplier";
import {
getPaymentList,
deletePayment,
paymentVerification,
paymentVerificationCancel,
paymentVerifyCancel,
cancelFinancePaymentApproval,
cancelFinancePaymentApprovalNo,
cancelFinancePaymentWriteOff,
cancelFinancePaymentWriteOffNo,
paymentCancelFinancePaymentWriteOffNo,
} from "@/api/ecw/financial";
import { userList, listSimpleUsers } from "@/api/system/user"
import { DICT_TYPE } from "@/utils/dict"
import CustomerSelector from "@/components/CustomerSelector"
import { getSupplierPage } from "@/api/ecw/supplier"
import { getPaymentList, deletePayment, paymentVerification, paymentVerificationCancel, paymentVerifyCancel, cancelFinancePaymentApproval, cancelFinancePaymentApprovalNo, cancelFinancePaymentWriteOff, cancelFinancePaymentWriteOffNo, paymentCancelFinancePaymentWriteOffNo } from "@/api/ecw/financial"
export default {
name: "EcwFinancialPaymentvoucher",
components: {
CustomerSelector,
CustomerSelector
},
data() {
return {
examineShow: false,
fhxShow: false,
textTip:undefined,
textTip: undefined,
examineTitle: "",
examineIndex: 0,
examineData: {},
......@@ -424,296 +199,250 @@ export default {
marks: null,
prodId: null,
productRecord: null,
followUpSalesmanId: null,
},
};
followUpSalesmanId: null
}
}
},
activated() {
this.handleQuery();
this.handleQuery()
},
created() {
let that = this;
listSimpleUsers().then((res) => (that.creatorData = res.data));
let that = this
listSimpleUsers().then((res) => (that.creatorData = res.data))
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
this.getList();
const { data } = res
this.allSupplier = data.list
})
this.getList()
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(
params,
this.queryParams.beginCreateTime,
"createTime"
);
let params = { ...this.queryParams }
this.addBeginAndEndTime(params, this.queryParams.beginCreateTime, "createTime")
// 执行查询
getPaymentList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
this.list = response.data.list
this.total = response.data.total
this.loading = false
})
},
paymentDetail(row) {
const id = row.id;
return this.$router.push("paymentDetail?id=" + id);
const id = row.id
return this.$router.push("paymentDetail?id=" + id)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
this.queryParams.page = 1
this.getList()
},
stateMap(state) {
switch (state) {
case 1:
return this.$t("待审核");
return this.$t("待审核")
case 2:
return this.$t("已审核待核销");
return this.$t("已审核待核销")
case 3:
return this.$t("审批驳回");
return this.$t("审批驳回")
case 4:
return this.$t("已核销");
return this.$t("已核销")
}
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push("creatPayment?id=" + id);
return this.$router.push("/financial/creatPayment?id=" + id)
},
examineClick(id) {
return this.$router.push("paymentExamine?id=" + id);
return this.$router.push("/financial/paymentExamine?id=" + id)
},
deleteClick(row) {
const id = row.id;
const id = row.id
this.$modal
.confirm(this.$t("是否确认删除该付款单") + "?")
.then(function () {
return deletePayment(id);
return deletePayment(id)
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
this.getList()
this.$modal.msgSuccess(this.$t("删除成功"))
})
.catch(() => {});
.catch(() => {})
},
verificationClick(row) {
const id = row.id;
const id = row.id
this.$modal
.confirm(this.$t("您确认要核销吗") + "?")
.then(function () {
return paymentVerification(id);
return paymentVerification(id)
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("核销成功"));
this.getList()
this.$modal.msgSuccess(this.$t("核销成功"))
})
.catch(() => {});
.catch(() => {})
},
verificationCancelClick(row) {
const id = row.id;
const id = row.id
this.$modal
.confirm(this.$t("您确认要反核销吗") + "?")
.then(function () {
return paymentVerificationCancel(id);
return paymentVerificationCancel(id)
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("反核销成功"));
this.getList()
this.$modal.msgSuccess(this.$t("反核销成功"))
})
.catch(() => {});
.catch(() => {})
},
verifyCancelClick(row) {
const id = row.id;
const id = row.id
this.$modal
.confirm(this.$t("您确认要反审核吗") + "?")
.then(function () {
return paymentVerifyCancel(id);
return paymentVerifyCancel(id)
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("反审核成功"));
this.getList()
this.$modal.msgSuccess(this.$t("反审核成功"))
})
.catch(() => {});
.catch(() => {})
},
toprint(id) {
return this.$router.push("printPaymentVoucher?id=" + id);
return this.$router.push("/financial/printPaymentVoucher?id=" + id)
},
submitForm() {
this.open = false;
this.open = false
},
/** 取消按钮 */
cancel() {
this.open = false;
this.open = false
},
bridgeFn(index, title, row) {
this.examineIndex = index;
this.examineTitle = title;
this.textTip=title;//lanbm2024-05-16 add
this.examineData = row;
this.examineIndex = index
this.examineTitle = title
this.textTip = title //lanbm2024-05-16 add
this.examineData = row
if (index == 5) {
//核销
this.examineShow = true;
this.examineShow = true
} else {
//lanbm 2024-05-17 add
this.fhxShow = true;
this.fhxShow = true
}
},
//lanbm 2024-05-17 add
cancelWriteOffClick2_Close() {
this.fhxShow = false;
this.fhxShow = false
},
cancelWriteOffClick2() {
//反核销对话框
if (!this.cancelReason) {
return this.$message.warning(this.$t("请输入申请理由!"));
return this.$message.warning(this.$t("请输入申请理由!"))
}
let resolve = (val = this.$t("操作成功吗!")) => {
this.getList();
this.$message.success(val);
this.fhxShow = false;
};
this.getList()
this.$message.success(val)
this.fhxShow = false
}
let reject = () => {
this.fhxShow = false;
};
let { id: paymentId, paymentNo } = this.examineData;
this.fhxShow = false
}
let { id: paymentId, paymentNo } = this.examineData
let p = {
paymentId,
remark: this.cancelReason,
paymentNo,
reason: this.cancelReason,
//时间付款时间 lanbm 2024-05-17 add
sjfkdate: this.sjfkdate,
};
sjfkdate: this.sjfkdate
}
switch (this.examineIndex) {
case 1:
// 取消审核
cancelFinancePaymentApproval(p).then(
() => resolve(this.$t("取消付款单审核成功!")),
reject
);
break;
cancelFinancePaymentApproval(p).then(() => resolve(this.$t("取消付款单审核成功!")), reject)
break
// 取消付款单反审核
case 2:
cancelFinancePaymentApprovalNo(p).then(
() => resolve(this.$t("取消付款单反审核成功!")),
reject
);
break;
cancelFinancePaymentApprovalNo(p).then(() => resolve(this.$t("取消付款单反审核成功!")), reject)
break
case 3:
//取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单核销成功!")),
reject
);
break;
cancelFinancePaymentWriteOffNo(p).then(() => resolve(this.$t("取消付款单核销成功!")), reject)
break
case 4:
// 反审核
paymentVerifyCancel(p).then(
() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerifyCancel(p).then(() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")), reject)
break
case 5:
// 核销
paymentVerification(p).then(
() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerification(p).then(() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")), reject)
break
case 6:
// 反核销
paymentVerificationCancel(p).then(
() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerificationCancel(p).then(() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")), reject)
break
case 7:
// 取消反核销
paymentCancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单反核销成功!")),
reject
);
break;
paymentCancelFinancePaymentWriteOffNo(p).then(() => resolve(this.$t("取消付款单反核销成功!")), reject)
break
}
},
cancelWriteOffClick() {
if (!this.cancelReason) {
return this.$message.warning(this.$t("请输入申请理由!"));
return this.$message.warning(this.$t("请输入申请理由!"))
}
let resolve = (val = this.$t("操作成功吗!")) => {
this.getList();
this.$message.success(val);
this.examineShow = false;
};
this.getList()
this.$message.success(val)
this.examineShow = false
}
let reject = () => {
this.examineShow = false;
};
let { id: paymentId, paymentNo } = this.examineData;
this.examineShow = false
}
let { id: paymentId, paymentNo } = this.examineData
let p = {
paymentId,
remark: this.cancelReason,
paymentNo,
reason: this.cancelReason,
//时间付款时间 lanbm 2024-05-17 add
sjfkdate: this.sjfkdate,
};
sjfkdate: this.sjfkdate
}
switch (this.examineIndex) {
case 1:
// 取消审核
cancelFinancePaymentApproval(p).then(
() => resolve(this.$t("取消付款单审核成功!")),
reject
);
break;
cancelFinancePaymentApproval(p).then(() => resolve(this.$t("取消付款单审核成功!")), reject)
break
// 取消付款单反审核
case 2:
cancelFinancePaymentApprovalNo(p).then(
() => resolve(this.$t("取消付款单反审核成功!")),
reject
);
break;
cancelFinancePaymentApprovalNo(p).then(() => resolve(this.$t("取消付款单反审核成功!")), reject)
break
case 3:
//取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单核销成功!")),
reject
);
break;
cancelFinancePaymentWriteOffNo(p).then(() => resolve(this.$t("取消付款单核销成功!")), reject)
break
case 4:
// 反审核
paymentVerifyCancel(p).then(
() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerifyCancel(p).then(() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")), reject)
break
case 5:
// 核销
paymentVerification(p).then(
() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerification(p).then(() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")), reject)
break
case 6:
// 反核销
paymentVerificationCancel(p).then(
() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")),
reject
);
break;
paymentVerificationCancel(p).then(() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")), reject)
break
case 7:
// 取消反核销
paymentCancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单反核销成功!")),
reject
);
break;
paymentCancelFinancePaymentWriteOffNo(p).then(() => resolve(this.$t("取消付款单反核销成功!")), reject)
break
}
},
},
};
}
}
}
</script>
<style scoped>
......
......@@ -225,7 +225,9 @@
<el-descriptions-item :label="$t('账单汇率有效期')">
{{ parseTime(form.rateValidateDate) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('核销误差兑额外费用主币种金额')"> </el-descriptions-item>
<el-descriptions-item :label="$t('核销误差兑额外费用主币种金额')">
{{ form.writeOffDiffMainCurrency }}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -270,12 +272,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 +508,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('收款账户')"
......@@ -583,7 +586,7 @@
</el-form-item>
<el-form-item v-if="showCurrencyId != addForm.currencyId">
<template slot="label"> {{ $t("兑核销基准币种金额") }}{{ getCurrencyLabel(showCurrencyId) }} </template>
<span>{{ addForm.writeOffAmount ? parseFloat(addForm.writeOffAmount).toFixed(2) : "" }}</span>
<span>{{ addForm.writeOffAmount }}</span>
</el-form-item>
<el-form-item :label="$t('水单附件')" prop="attr">
<el-upload v-if="!isView" class="upload-demo" :action="uploadFileUrl" :headers="headers" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload" :on-error="handleUploadError" :before-remove="beforeRemove" :file-list="addForm.attr" multiple>
......@@ -896,11 +899,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 +915,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 +933,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 +941,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 +1173,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]
......@@ -1269,7 +1276,7 @@ export default {
}
}
}
this.$set(this.addForm, "writeOffAmount", Math.round(NP.times(this.addForm.rate || 0, this.addForm.amount || 0)), 2)
this.$set(this.addForm, "writeOffAmount", NP.round(NP.times(this.addForm.rate || 0, this.addForm.amount || 0), 2))
//已填写核销金额
this.$set(this.addForm, "currentWriteOffAmount", 0)
// 剩余核销金额
......@@ -1511,7 +1518,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 +1695,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
......
......@@ -10,47 +10,44 @@
<!-- 搜索工作栏 -->
<el-card v-show="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px" class="card">
<el-row>
<el-form-item :label="$t('始发地')">
<el-select v-model="queryParams.departureId" :placeholder="$t('请选择始发地')" clearable>
<el-select class="custom-form-item" v-model="queryParams.departureIdList" multiple :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')">
<el-select v-model="queryParams.objectiveId" :placeholder="$t('请选择目的地')" clearable>
<el-select class="custom-form-item" v-model="queryParams.objectiveIdList" multiple :placeholder="$t('请选择目的地')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" clearable />
<dict-selector class="custom-form-item" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" multiple v-model="queryParams.transportIdList" formatter="number" clearable />
</el-form-item>
<el-form-item :label="$t('控货')">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.isCargoControl" clearable />
<dict-selector class="custom-form-item" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.isCargoControl" clearable />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('订单状态')">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" clearable />
<dict-selector class="custom-form-item" :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" clearable />
</el-form-item>
<el-form-item :label="$t('报关方式')">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable />
<dict-selector class="custom-form-item" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" multiple v-model="queryParams.customsTypeList" clearable />
</el-form-item>
<el-form-item :label="$t('订单号')">
<el-input style="max-width: 188px" v-model="queryParams.orderNo" :placeholder="$t('请输入订单编号')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.orderNo" :placeholder="$t('请输入订单编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('品名')">
<el-input style="max-width: 188px" v-model="queryParams.title" :placeholder="$t('请输入品名')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.title" :placeholder="$t('请输入品名')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('提单号')">
<el-input style="max-width: 188px" v-model="queryParams.tidanNo" :placeholder="$t('请输入提单号')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.tidanNo" :placeholder="$t('请输入提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('唛头')">
<el-input style="max-width: 188px" v-model="queryParams.marks" :placeholder="$t('请输入唛头')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.marks" :placeholder="$t('请输入唛头')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('费用类型')">
<dict-selector :type="DICT_TYPE.FEE_TYPE" v-model="queryParams.feeType" clearable></dict-selector>
<dict-selector class="custom-form-item" :type="DICT_TYPE.FEE_TYPE" multiple v-model="queryParams.feeTypeList" clearable></dict-selector>
</el-form-item>
<!-- <el-form-item :label="$t('发货人')">
<customer-selector
......@@ -60,12 +57,11 @@
/>
</el-form-item> -->
<el-form-item label="发货人:">
<el-input style="max-width: 188px" v-model="queryParams.consignorNameOrPhone" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.consignorNameOrPhone" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('收货人')">
<el-input style="max-width: 188px" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery" />
<el-input class="custom-form-item" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery" />
<!-- <customer-selector
v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event"
......@@ -74,16 +70,15 @@
</el-form-item>
<el-form-item :label="$t('创建时间')">
<!-- <dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector> -->
<el-date-picker v-model="dateType" type="datetimerange" range-separator="-" value-format="yyyy-MM-dd" :start-placeholder="$t('请选择日期')" :end-placeholder="$t('请选择日期')"> </el-date-picker>
<el-date-picker placement="bottom-start" v-model="dateType" type="datetimerange" range-separator="-" value-format="yyyy-MM-dd" :start-placeholder="$t('请选择日期')" :end-placeholder="$t('请选择日期')"> </el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</el-form-item>
</el-row>
</el-form>
</el-card>
<div v-loading="loading">
<el-row :gutter="10" class="mb8 pad-t20">
<el-row :gutter="0" class="mb8 pad-t20">
<div class="card-title">
<div class="gird-cell">
<div>{{ $t("合计:") }}</div>
......@@ -255,8 +250,8 @@ export default {
},
/** 新增按钮操作 */
handleAdd(row) {
if (!row) return this.$router.push("creatCollection")
return this.$router.push("creatCollection?orderId=" + row.orderId)
if (!row) return this.$router.push("/financial/creatCollection")
return this.$router.push("/financial/creatCollection?orderId=" + row.orderId)
},
submitForm() {}
}
......@@ -264,6 +259,9 @@ export default {
</script>
<style scoped>
::v-deep .custom-form-item {
width: 200px;
}
.card {
margin-top: 20px;
}
......
<template>
<div class="app-container">
<!-- 搜索 -->
<el-card v-show="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" inline class="card">
<el-form-item :label="$t('自编号')" prop="selfNo">
<el-input v-model="queryParams.selfNo" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIdList">
<el-select v-model="queryParams.startWarehouseIdList" multiple :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select v-model="queryParams.destCountryId" multiple :placeholder="$t('请选择目的国')" clearable>
<el-option v-for="item in countryList" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="destCity">
<el-select v-model="queryParams.destCity" multiple :placeholder="$t('请选择目的城市')" clearable>
<el-option v-for="item in cityList" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdList">
<el-select v-model="queryParams.destWarehouseIdList" multiple :placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in objWareHouseList" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('自编号状态')" prop="boxStatus">
<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>
</el-form-item> -->
<el-form-item :label="$t('是否结算')" prop="slStatus">
<dict-selector :type="DICT_TYPE.SETTLEMENT_STATUS" v-model="queryParams.slStatus" clearable></dict-selector>
</el-form-item>
<!--提单制作 -->
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<dict-selector :type="DICT_TYPE.LADING_BILL_STATUS_DATA" v-model="queryParams.ladingBillStatus" clearable></dict-selector>
</el-form-item>
<el-form-item :label="$t('到港时间')" prop="daogangTime">
<el-date-picker v-model="queryParams.daogangTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('卸柜/到仓时间')" prop="ulWarehouseTime">
<el-date-picker v-model="queryParams.ulWarehouseTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('清关时间')" prop="qingguanTime">
<el-date-picker v-model="queryParams.qingguanTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery" :loading="loading">{{ $t("查询") }}</el-button>
<el-button icon="el-icon-refresh" @click="handleReset">{{ $t("重置") }}</el-button>
<el-button type="primary" :loading="exporting" icon="el-icon-download" @click="handleExport">{{ $t("导出搜索") }}</el-button>
</el-form-item>
</el-form>
</el-card>
<div class="mb8">
<el-descriptions v-show="showSearch" class="margin-top barTop" :title="$t('筛选合计信息:')" :column="2" :size="size" border>
<el-descriptions-item>
<template slot="label"> {{ $t("应收款-原币") }}: </template>
<div v-if="totalSearch && totalSearch.receivableTotalSummary">
<span class="unit" v-for="item in totalSearch.receivableTotalSummary" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<!-- 结算 -->
<el-descriptions-item>
<template slot="label"> {{ $t("应收款") }}: </template>
<div v-if="totalSearch && totalSearch.receivableTotalSettle">
<span class="unit" v-for="item in totalSearch.receivableTotalSettle" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> {{ $t("应收款明细") }}: </template>
<div>
<span class="item" v-if="totalSearch && totalSearch.receivableDetailFreight">
{{ $t("运费") }} <span class="unit" v-for="item in totalSearch.receivableDetailFreight" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableDetailClearance">
{{ $t("清关费") }} <span class="unit" v-for="item in totalSearch.receivableDetailClearance" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableDetailOtherFee">
{{ $t("额外费用") }} <span class="unit" v-for="item in totalSearch.receivableDetailOtherFee" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
</div>
</el-descriptions-item>
<!-- 目的国实 -->
<el-descriptions-item>
<template slot="label"> {{ $t("目的国实收") }}: </template>
<div>
<span class="item" v-if="totalSearch && totalSearch.receivableDestCountryFreight">
{{ $t("运费") }} <span class="unit" v-for="item in totalSearch.receivableDestCountryFreight" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableDestCountryClearance">
{{ $t("清关费") }} <span class="unit" v-for="item in totalSearch.receivableDestCountryClearance" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableDestCountryOtherFee">
{{ $t("额外费用") }} <span class="unit" v-for="item in totalSearch.receivableDestCountryOtherFee" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableDestCountryOtherFeeSub">
{{ $t("额外费用(副币种)") }} <span class="unit" v-for="item in totalSearch.receivableDestCountryOtherFeeSub" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
</div>
</el-descriptions-item>
<!-- 始发国实收 -->
<el-descriptions-item>
<template slot="label"> {{ $t("始发国实收") }}: </template>
<div>
<span class="item" v-if="totalSearch && totalSearch.receivableStartCountryFreight">
{{ $t("运费") }} <span class="unit" v-for="item in totalSearch.receivableStartCountryFreight" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableStartCountryClearance">
{{ $t("清关费") }} <span class="unit" v-for="item in totalSearch.receivableStartCountryClearance" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableStartCountryOtherFee">
{{ $t("额外费用") }} <span class="unit" v-for="item in totalSearch.receivableStartCountryOtherFee" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableStartCountryOtherFeeSub">
{{ $t("额外费用(副币种)") }} <span class="unit" v-for="item in totalSearch.receivableStartCountryOtherFeeSub" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
</div>
</el-descriptions-item>
<!-- 未收款明细 -->
<el-descriptions-item>
<template slot="label"> {{ $t("未收款明细") }}: </template>
<div>
<span class="item" v-if="totalSearch && totalSearch.receivableUnsettledFreight">
{{ $t("运费") }} <span class="unit" v-for="item in totalSearch.receivableUnsettledFreight" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableUnsettledClearance">
{{ $t("清关费") }} <span class="unit" v-for="item in totalSearch.receivableUnsettledClearance" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
<span class="item" v-if="totalSearch && totalSearch.receivableUnsettledOtherFee">
{{ $t("额外费用") }} <span class="unit" v-for="item in totalSearch.receivableUnsettledOtherFee" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</span>
</div>
</el-descriptions-item>
</el-descriptions>
<right-toolbar :show-search.sync="showSearch" class="show-bt" @queryTable="getList" />
</div>
<el-table v-loading="loading" :data="list" border class="card" :element-loading-text="$t('汇总计算中...')" show-summary :summary-method="getSummary">
<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">
<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">
<el-table-column :label="$t('汇总 Total')" prop="receivableTotalSummary" align="center" width="200"></el-table-column>
<el-table-column :label="$t('结算币种 settlement currency')" prop="receivableTotalSettle" align="center" width="200"></el-table-column>
</el-table-column>
<el-table-column :label="$t('应收款明细 RECEIVABLE DEATAILS')" align="center" prop="summaryInfo.receivableTotalFeeGroup">
<el-table-column :label="$t('运费 FREIGHT')" prop="receivableDetailFreight" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('清关费 CLEARING FEE')" prop="receivableDetailClearance" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用 EXTRAL FEE')" prop="receivableDetailOtherFee" align="center" width="200"> </el-table-column>
</el-table-column>
<el-table-column :label="'received in ' + (dstCountryName || $t('目的国'))" align="center" prop="">
<el-table-column :label="$t('运费 FREIGHT')" prop="receivableDestCountryFreight" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('清关费 CLEARING FEE')" prop="receivableDestCountryClearance" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用 EXTRAL FEE')" prop="receivableDestCountryOtherFee" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用(副币种) EXTRAL FEE')" prop="receivableDestCountryOtherFeeSub" align="center" width="200"> </el-table-column>
</el-table-column>
<el-table-column :label="$t('received in China(中国实收)')" align="center" prop="">
<el-table-column :label="$t('运费 FREIGHT')" prop="receivableStartCountryFreight" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('清关费 CLEARING FEE')" prop="receivableStartCountryClearance" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用 EXTRAL FEE')" prop="receivableStartCountryOtherFee" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用(副币种) EXTRAL FEE')" prop="receivableStartCountryOtherFeeSub" align="center" width="200"> </el-table-column>
</el-table-column>
<el-table-column :label="$t('Discounts 折扣')" align="center">
<el-table-column :label="$t('运费 FREIGHT')" prop="receivableDiscountFreight" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('清关费 CLEARING FEE')" prop="receivableDiscountClearance" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用 EXTRAL FEE')" prop="receivableDiscountOtherFee" align="center" width="200"> </el-table-column>
</el-table-column>
<el-table-column :label="$t('未收款明细 Accounts receivable')" align="center" prop="">
<el-table-column :label="$t('运费 FREIGHT')" prop="receivableUnsettledFreight" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('清关费 CLEARING FEE')" prop="receivableUnsettledClearance" align="center" width="200"> </el-table-column>
<el-table-column :label="$t('额外费用 EXTRAL FEE')" prop="receivableUnsettledOtherFee" align="center" width="200"> </el-table-column>
</el-table-column>
<el-table-column :label="$t('核销比例')" align="center" prop="writeOffPercent"></el-table-column>
<el-table-column :label="$t('提单制作')" align="center" prop="ladingBillStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.LADING_BILL_STATUS_DATA" :value="scope.row.ladingBillStatus"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('到港时间')" align="center" prop="dgDate" width="200"></el-table-column>
<el-table-column :label="$t('清关时间')" align="center" prop="qgDate" width="200"></el-table-column>
<el-table-column :label="$t('卸柜/到仓时间')" align="center" prop="ulWarehouseTime" width="200"></el-table-column>
<el-table-column :label="$t('操作')" fixed="right" v-if="permissions.indexOf('selfno:report:detail') > -1">
<template slot-scope="scope">
<el-button type="text" @click="$router.push('./selfNoReportDetailNew?containerNumber=' + scope.row.selfNo)">{{ $t("查看") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</div>
</template>
<script>
import { getCurrencyPage } from "@/api/ecw/currency"
import { getWarehouseList } from "@/api/ecw/warehouse"
import store from "@/store"
import { mapGetters } from "vuex"
import { boxSettlementPage, exportSettlementExcelNew } from "@/api/ecw/box"
import { getRegionList } from "@/api/ecw/order"
import { getListTree } from "@/api/ecw/region"
import { loadStatementsReceivableList } from "@/api/ecw/financial"
import Decimal from "decimal.js"
export default {
name: "EcwFinancialSelfnoreport",
data() {
return {
size: "small",
loading: false, // 是否加载中
totalColumn: [], //列表汇总数据
totalSearch: [], //搜索条件汇总数据
list: [],
total: 0,
showSearch: true,
queryParams: {
selfNo: "", //自编号
ulWarehouseTime: [], //卸柜/到仓时间
qingguanTime: [],
daogangTime: this.setETATime(), //到港时间
startWarehouseIdList: [], //始发仓
destWarehouseIdList: [], //目的地
boxStatus: [], //自编号状态
page: 1,
rows: 10
},
exportWarehouseList: [], //始发仓列表
objWareHouseList: [], //目的仓列表
currencyList: [],
warehouseList: [],
cityList: [],
countryList: [],
// 导出中状态
exporting: false
}
},
activated() {
// 如果有必须的条件则查询
this.getList()
},
created() {
getWarehouseList().then((res) => {
this.warehouseList = res.data
this.exportWarehouseList = this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
})
this.init()
this.getList()
getCurrencyPage(this.params).then((res) => (this.currencyList = res.data.list))
},
watch: {
// 目的国变更后要重置目的仓
"queryParams.destCountryId": {
handler(val, oldVal) {
this.queryParams.destCity = []
if (val && val.length > 0) {
this.loadCityList(2, val.join())
} else {
this.loadCityList()
}
}
},
"queryParams.destCity": {
handler(val, oldVal) {
this.queryParams.destWarehouseIdList = []
if (val.length > 0) {
this.loadWareHouseList(3, val.join())
} else {
this.loadWareHouseList()
}
}
}
},
computed: {
...mapGetters(["getCurrencySymbol"]),
isChinese() {
return this.$i18n.locale === "zh_CN"
},
permissions() {
return store.getters.permissions
},
// 获取列的货币名称 columnName 取值为Other, Freight, Clearance
ColumnCurrencyName() {
return (columnName, wrapper = true) => {
if (!this.list.length) return ""
let field = `total${columnName}FeeCurrency`
return wrapper ? `(${this.list[0]["summaryInfo"][field]})` : this.list[0]["summaryInfo"][field]
}
},
dstCountryName() {
if (!this.queryParams.destCountryId) return null
const country = this.countryList.filter((item) => {
const select = this.queryParams.destCountryId.filter((itemCountry) => itemCountry == item.guojia)
if (select.length > 0) {
return item
}
// item.id == this.queryParams.destCountryId
})
if (!country) return null
let countryListLabel = ""
country.forEach((selectItem) => {
countryListLabel += this.isChinese ? ` ${selectItem.guojiaName}` : `${selectItem.guojiaNameEn}`
})
return countryListLabel
}
},
methods: {
setETATime() {
let date = new Date()
let year = date.getFullYear().toString()
let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()
let day = date.getDate() < 10 ? "0" + date.getDate().toString() : date.getDate().toString()
let start = `${year}-01-01 00:00:00`
let end = `${year}-${month}-${day} 23:59:59`
return [start, end]
},
init() {
//请求获取国家
this.loadCountyList()
this.loadCityList()
this.loadWareHouseList()
},
//目的地
loadWareHouseList(type = 5, cityId = 5) {
getRegionList(type, cityId)
.then(({ data }) => {
this.objWareHouseList = data
})
.catch((error) => {
console.log(error)
})
},
loadCityList(type = 4, countryId = 4) {
getRegionList(type, countryId)
.then(({ data }) => {
this.cityList = data
})
.catch((error) => {
console.log(error)
})
},
loadCountyList() {
getRegionList(1, 1)
.then(({ data }) => {
this.countryList = data
})
.catch((error) => {
console.log(error)
})
},
getCurrencyLabel(id) {
const item = this.currencyList.find((item) => item.id === id)
if (!item) return ""
return this.$l(item, "title")
},
/** 查询列表 */
getList() {
this.loading = true
let params = {
...this.queryParams
}
// this.addBeginAndEndTime(params, this.queryParams.dateFilter, "JsDate", false)
this.addBeginAndEndTime(params, this.queryParams.ulWarehouseTime, "UlWarehouseTime", false)
this.addBeginAndEndTime(params, this.queryParams.daogangTime, "DaogangTime", false)
this.addBeginAndEndTime(params, this.queryParams.qingguanTime, "QingguanTime", false)
this.list = []
this.loading = false
// 执行查询
loadStatementsReceivableList(params)
.then((response) => {
this.list = response.data.list
this.total = response.data.total
this.totalColumn = response.data.pageAmount //当前页面列汇总
this.totalSearch = response.data.queryAmount //查询条件汇总
})
.finally(() => {
this.loading = false
})
},
getCommonTotalString(key) {
if (this.totalColumn && this.totalColumn[key] && this.totalColumn[key].length > 0) {
return this.totalColumn[key]
.map((item) => {
return `${this.getCurrencySymbol(item.currencyId)} ${item.amount}`
})
.join(",")
}
return ""
},
// 返回汇总行数据
getSummary() {
//应收款
const receivableTotalSummary = this.getCommonTotalString("receivableTotalSummary") // 应收款汇总
const receivableTotalSettle = this.getCommonTotalString("receivableTotalSettle") //应收款结算币种
// 应收款明细
const receivableDetailFreight = this.getCommonTotalString("receivableDetailFreight") //应收款明细-运费
const receivableDetailClearance = this.getCommonTotalString("receivableDetailClearance") //清关费
const receivableDetailOtherFee = this.getCommonTotalString("receivableDetailOtherFee") //额外费用
//目的国实收
const receivableDestCountryFreight = this.getCommonTotalString("receivableDestCountryFreight") //运费
const receivableDestCountryClearance = this.getCommonTotalString("receivableDestCountryClearance") //清关费
const receivableDestCountryOtherFee = this.getCommonTotalString("receivableDestCountryOtherFee") //额外费用
const receivableDestCountryOtherFeeSub = this.getCommonTotalString("receivableDestCountryOtherFeeSub") //额外费用(副币种)
//始发国实收
const receivableStartCountryFreight = this.getCommonTotalString("receivableStartCountryFreight") //运费
const receivableStartCountryClearance = this.getCommonTotalString("receivableStartCountryClearance") //清关费
const receivableStartCountryOtherFee = this.getCommonTotalString("receivableStartCountryOtherFee") //额外费用
const receivableStartCountryOtherFeeSub = this.getCommonTotalString("receivableStartCountryOtherFeeSub") //额外费用(副币种)
//折扣
const receivableDiscountFreight = this.getCommonTotalString("receivableDiscountFreight") //运费
const receivableDiscountClearance = this.getCommonTotalString("receivableDiscountClearance") //清关费
const receivableDiscountOtherFee = this.getCommonTotalString("receivableDiscountOtherFee") //额外费用
//未收款明细
const receivableUnsettledFreight = this.getCommonTotalString("receivableUnsettledFreight") //运费
const receivableUnsettledClearance = this.getCommonTotalString("receivableUnsettledClearance") //清关费
const receivableUnsettledOtherFee = this.getCommonTotalString("receivableUnsettledOtherFee") //额外费用
const data = [
this.$t("合计"),
"", //柜号列
receivableTotalSummary, // 应收款汇总
receivableTotalSettle, //应收款结算币种
receivableDetailFreight, //应收款明细-运费
receivableDetailClearance, // 清关费
receivableDetailOtherFee, //额外费用
receivableDestCountryFreight, //目的国实收运费
receivableDestCountryClearance, //清关费
receivableDestCountryOtherFee, //额外费用
receivableDestCountryOtherFeeSub, //额外费用(副币种)
receivableStartCountryFreight, //始发国实收运费
receivableStartCountryClearance, //清关费
receivableStartCountryOtherFee, //额外费用
receivableStartCountryOtherFeeSub, //额外费用(副币种)
receivableDiscountFreight, //折扣运费
receivableDiscountClearance, //清关费
receivableDiscountOtherFee, //额外费用
receivableUnsettledFreight, //未收款明细运费
receivableUnsettledClearance, //清关费
receivableUnsettledOtherFee //额外费用
]
return data
},
/** 搜索按钮操作 */
handleQuery() {
this.$refs.queryForm.validate().then(() => {
this.queryParams.page = 1
this.getList()
})
},
handleReset() {
this.$refs["queryForm"].resetFields()
this.queryParams.page = 1
// this.dateFilter = []
this.handleQuery()
},
// 导出搜索
handleExport() {
this.$refs.queryForm.validate().then(() => {
this.exporting = true
let params = { ...this.queryParams }
// this.addBeginAndEndTime(params, this.dateFilter, "JsDate", false)
this.addBeginAndEndTime(params, this.queryParams.ulWarehouseTime, "UlWarehouseTime", false)
this.addBeginAndEndTime(params, this.queryParams.daogangTime, "DaogangTime", false)
this.addBeginAndEndTime(params, this.queryParams.qingguanTime, "QingguanTime", false)
exportSettlementExcelNew(params)
.then((res) => {
//this.$download.excel(res, 'shipment-summary.xls');
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
})
.finally(() => {
this.exporting = false
})
})
}
}
}
</script>
<style scoped>
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
display: inline-block;
}
.unit {
margin-right: 10px;
font-size: 12px;
}
.bar {
flex: 1;
flex-wrap: wrap;
display: flex;
}
.showBar {
width: 100%;
display: flex;
}
.sideBar {
margin-bottom: 2px;
font-size: 14px;
padding-right: 20px;
width: 50%;
}
.sideBar-bt {
margin-bottom: 2px;
font-size: 14px;
padding-right: 20px;
}
.mb8 {
padding-top: 6px;
}
</style>
<template>
<div class="app-container">
<el-card v-if="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" inline class="card">
<el-form-item :label="$t('订单编号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" clearable :placeholder="$t('请输入')"></el-input>
</el-form-item>
<el-form-item :label="$t('提单号')" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" clearable :placeholder="$t('请输入')"></el-input>
</el-form-item>
<el-form-item :label="$t('唛头')" prop="marks">
<el-input v-model="queryParams.marks" clearable :placeholder="$t('请输入')"></el-input>
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('客户编号,名称,手机号')"></el-input>
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('客户编号,名称,手机号')"></el-input>
</el-form-item>
<el-form-item :label="$t('订单时间类型')" prop="dateFilter">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker placement="bottom-start" v-model="queryParams.dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryIds">
<el-select v-model="queryParams.destCountryIds" multiple :placeholder="$t('请选择目的国')" clearable>
<el-option v-for="item in countryList" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="destCityIds">
<el-select v-model="queryParams.destCityIds" multiple :placeholder="$t('请选择目的城市')" clearable>
<el-option v-for="item in cityList" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIds">
<el-select v-model="queryParams.destWarehouseIds" multiple :placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in objWareHouseList" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" clearable />
</el-form-item>
<el-form-item :label="$t('是否重货')" prop="isHeavyCargo">
<dict-selector :type="DICT_TYPE.ECW_YESNO" v-model="queryParams.isHeavyCargo" clearable />
</el-form-item>
<el-form-item :label="$t('是否泡货')" prop="isPaoCargo">
<dict-selector :type="DICT_TYPE.ECW_YESNO" v-model="queryParams.isPaoCargo" clearable />
</el-form-item>
<el-form-item :label="$t('是否控货')" prop="isCargoControl">
<dict-selector :type="DICT_TYPE.ECW_YESNO" v-model="queryParams.isCargoControl" clearable />
</el-form-item>
<el-form-item :label="$t('提货率')" prop="pickRatio">
<el-input placeholder="请输入内容" v-model="queryParams.pickRatio" class="input-with-select">
<el-form-item prop="pickRatioSymbols" slot="prepend" style="margin-bottom: 0">
<dict-selector :type="DICT_TYPE.PICKUP_RATE_COMPARISON_SYMBOLS" v-model="queryParams.pickRatioSymbols" clearable />
</el-form-item>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery" :loading="loading">{{ $t("查询") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- 汇总 -->
<div class="mb8">
<el-descriptions v-show="showSearch" class="margin-top barTop" :title="$t('筛选合计信息:')" :column="2" :size="size" border>
<el-descriptions-item>
<template slot="label"> {{ $t("应收总金额") }}: </template>
<div v-if="receivableTotalFeeGroupDtoList">
<span class="unit" v-for="item in receivableTotalFeeGroupDtoList" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> {{ $t("折扣金额") }}: </template>
<div v-if="discountTotalFeeGroupDtoList">
<span class="unit" v-for="item in discountTotalFeeGroupDtoList" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> {{ $t("折后总金额") }}: </template>
<div v-if="netReceiptsTotalFeeGroupDtoList">
<span class="unit" v-for="item in netReceiptsTotalFeeGroupDtoList" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> {{ $t("已收总金额") }}: </template>
<div v-if="writeOffTotalFeeGroupDtoList">
<span class="unit" v-for="item in writeOffTotalFeeGroupDtoList" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> {{ $t("未收总金额") }}: </template>
<div v-if="notWriteOffTotalFeeGroupDtoList">
<span class="unit" v-for="item in notWriteOffTotalFeeGroupDtoList" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId) }}{{ item.amount }}</span>
</div>
</el-descriptions-item>
</el-descriptions>
<right-toolbar :show-search.sync="showSearch" class="show-bt" @queryTable="getList" />
</div>
<el-table v-loading="loading" show-summary :summary-method="getSummary" :data="list" border class="card" :element-loading-text="$t('汇总计算中...')">
<el-table-column :label="$t('订单号')" prop="orderNo" width="200" align="center" fixed="left">
<template v-slot="{ row }"> {{ row.orderNo }}/{{ row.tidanNo }} </template>
</el-table-column>
<!-- 订单 -->
<el-table-column :label="$t('订单')" align="center">
<el-table-column :label="$t('应收总金额')" width="150" align="center" prop="receivableTotalFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.receivableTotalFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折扣金额')" width="150" align="center" prop="discountTotalFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.discountTotalFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折后总金额')" width="150" align="center" prop="netReceiptsTotalFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.netReceiptsTotalFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('已收总金额')" width="150" align="center" prop="writeOffTotalFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.writeOffTotalFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('未收总金额')" width="150" align="center" prop="notWriteOffTotalFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.notWriteOffTotalFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('核销比例')" width="150" align="center">
<template v-slot="{ row }">
{{ row.writeOffRatio }}
</template>
</el-table-column>
</el-table-column>
<!-- 运费 -->
<el-table-column :label="$t('运费')" align="center">
<el-table-column :label="$t('应收金额')" width="150" align="center" prop="receivableFreightFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.receivableFreightFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折扣金额')" width="150" align="center" prop="discountFreightFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.discountFreightFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折后应收金额')" width="150" align="center" prop="netReceiptsFreightFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.netReceiptsFreightFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('已收金额')" width="150" align="center" prop="writeOffFreightFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.writeOffFreightFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('未收金额')" width="150" align="center" prop="notWriteOffFreightFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.notWriteOffFreightFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
</el-table-column>
<!-- 清关费 -->
<el-table-column :label="$t('清关费')" align="center">
<el-table-column :label="$t('应收')" width="150" align="center" prop="receivableClearanceFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.receivableClearanceFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折扣金额')" width="150" align="center" prop="discountClearanceFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.discountClearanceFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折后应收金额')" width="150" align="center" prop="netReceiptsClearanceFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.netReceiptsClearanceFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('已收金额')" width="150" align="center" prop="writeOffClearanceFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.writeOffClearanceFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('未收金额')" width="150" align="center" prop="notWriteOffClearanceFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.notWriteOffClearanceFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
</el-table-column>
<!-- 额外费用 -->
<el-table-column :label="$t('额外费用')" align="center">
<el-table-column :label="$t('应收')" width="150" align="center" prop="receivableOtherFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.receivableOtherFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折扣金额')" width="150" align="center" prop="discountOtherFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.discountOtherFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('折后应收金额')" width="150" align="center" prop="netReceiptsOtherFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.netReceiptsOtherFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('已收金额')" width="150" align="center" prop="writeOffOtherFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.writeOffOtherFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('未收金额')" width="150" align="center" prop="notWriteOffOtherFeeGroupDtoList">
<template slot-scope="{ row }">
<div v-for="item in row.notWriteOffOtherFeeGroupDtoList || []" :key="item.currencyId">{{ item.amount }}{{ item.currencyName }}</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column :label="$t('始发仓')" prop="startWarehouseName" width="150" align="center" />
<el-table-column :label="$t('运输方式') + '/' + $t('目的地')" width="200" align="center">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId"></dict-tag>
/{{ row.dstWarehouseName }}
</template>
</el-table-column>
<el-table-column :label="$t('仓库实测')" width="150" align="center">
<template slot-scope="{ row }"> {{ row.sumNum }}{{ $t("") }},{{ row.sumVolume }}m³,{{ row.sumWeight }}kg </template>
</el-table-column>
<el-table-column :label="$t('是否重泡货')" width="150" align="center">
<template slot-scope="{ row }">
<el-tooltip v-if="row.orderType !== 1" effect="dark" :content="row.orderType == 3 ? `${row.vweight}kg` : `${row.wvolume}m³`" placement="top-start">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="row.orderType !== 1 ? '1' : '0'"></dict-tag>
</el-tooltip>
<template v-else>{{ $t("") }}</template>
</template>
</el-table-column>
<el-table-column :label="$t('收费数据')" width="200" align="center">
<template slot-scope="{ row }">
<el-tooltip v-if="row.orderType !== 1" effect="dark" :content="row.orderType == 3 ? `${row.vweight}kg` : `${row.wvolume}m³`" placement="top-start">
<span>{{ row.realityChargeNum }}{{ $t("") }},{{ row.realityChargeVolume }}m³,{{ row.realityChargeWeight }}kg</span>
</el-tooltip>
<template v-else>{{ row.realityChargeNum }}{{ $t("") }},{{ row.realityChargeVolume }}m³,{{ row.realityChargeWeight }}kg</template>
</template>
</el-table-column>
<el-table-column :label="$t('是否控货')" align="center" width="120">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="row.isCargoControl"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('提货率')" align="center" width="120">
<template slot-scope="{ row }"> {{ row.pickRatio }}% </template>
</el-table-column>
<el-table-column :label="$t('提单制作')" align="center" width="120">
<template slot-scope="{ row }">
{{ row.billOfLadingStatus == 2 ? $t("") : $t("") }}
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" prop="salesmanName" width="150" align="center"></el-table-column>
<el-table-column :label="$t('发货人')" width="300" align="center">
<template slot-scope="{ row }"
><router-link :to="'/customer/query/' + row.consignorCustomerId"> {{ row.consignorCustomerNumber }}-{{ isChinese ? row.consignorName : row.consignorNameEn }}-{{ row.consignorPhone }} </router-link></template
>
</el-table-column>
<el-table-column :label="$t('收货人')" width="300" align="center">
<template slot-scope="{ row }">
<router-link :to="'/customer/query/' + row.consigneeCustomerId">{{ row.consigneeCustomerNumber }}-{{ isChinese ? row.consigneeName : row.consigneeNameEn }}-{{ row.consigneePhone }} </router-link></template
>
</el-table-column>
<el-table-column :label="$t('订单入仓时间')" width="150" align="center">
<template slot-scope="{ row }">
{{ row.inTime | parseTime }}
</template>
</el-table-column>
<el-table-column :label="$t('订单装柜时间')" width="150" align="center">
<template slot-scope="{ row }">
{{ row.loadTime | parseTime }}
</template>
</el-table-column>
<el-table-column :label="$t('到港时间')" width="150" align="center">
<template slot-scope="{ row }">
{{ row.daogangTime }}
</template>
</el-table-column>
<el-table-column :label="$t('清关时间')" width="150" align="center">
<template slot-scope="{ row }">
{{ row.qingguanTime }}
</template>
</el-table-column>
<el-table-column :label="$t('卸柜/到仓时间')" width="150" align="center">
<template slot-scope="{ row }">
{{ row.unloadTime }}
</template>
</el-table-column>
<el-table-column :label="$t('更多')" width="220" align="center" fixed="right">
<template slot-scope="{ row }">
<el-button type="primary" size="small" @click="$router.push('/financial/chargeDetails?orderNo=' + row.orderNo)" plain>{{ $t("费用明细") }}</el-button>
<el-button type="primary" size="small" @click="$router.push('/financial/receivable/voucher?orderNo=' + row.orderNo)">{{ $t("收款单") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</div>
</template>
<script>
import { loadSelfNoSummaryList } from "@/api/ecw/financial"
import { getWarehouseList } from "@/api/ecw/warehouse"
import { getRegionList } from "@/api/ecw/order"
import { parseTime } from "@/utils/ruoyi"
import { mapGetters } from "vuex"
import NP from "number-precision"
export default {
filters: { parseTime },
data() {
return {
size: "small",
totalColumnKeyList: ["receivableTotalFeeGroupDtoList", "discountTotalFeeGroupDtoList", "netReceiptsTotalFeeGroupDtoList", "writeOffTotalFeeGroupDtoList", "notWriteOffTotalFeeGroupDtoList", "receivableFreightFeeGroupDtoList", "discountFreightFeeGroupDtoList", "netReceiptsFreightFeeGroupDtoList", "writeOffFreightFeeGroupDtoList", "notWriteOffFreightFeeGroupDtoList", "receivableClearanceFeeGroupDtoList", "discountClearanceFeeGroupDtoList", "netReceiptsClearanceFeeGroupDtoList", "writeOffClearanceFeeGroupDtoList", "notWriteOffClearanceFeeGroupDtoList", "receivableOtherFeeGroupDtoList", "discountOtherFeeGroupDtoList", "netReceiptsOtherFeeGroupDtoList", "writeOffOtherFeeGroupDtoList", "notWriteOffOtherFeeGroupDtoList"],
receivableTotalFeeGroupDtoList: [], //应收总金额 汇总
discountTotalFeeGroupDtoList: [], //折扣金额汇总
netReceiptsTotalFeeGroupDtoList: [], //折后总金额
writeOffTotalFeeGroupDtoList: [], //已收总金额
notWriteOffTotalFeeGroupDtoList: [], //未收总金额
total: 0,
showSearch: true,
totalColumn: [], //列表汇总数据
totalSearch: [], //搜索条件汇总数据
list: [],
dateFilterType: "",
warehouseList: [], //仓库列表
exportWarehouseList: [], //始发仓列表
countryList: [], //国家列表
cityList: [], //城市列表
objWareHouseList: [], //目的仓列表
queryParams: {
page: 1,
rows: 10,
orderNo: "",
dateFilter: [], //时间区间
marks: "",
tidanNo: "",
consigneeKey: "",
consignorKey: "", //发货人
containerNumber: this.$route.query.containerNumber, // 自编号
destCityIds: [],
destCountryIds: [],
destWarehouseIds: [],
startWarehouseIds: []
}
}
},
created() {
getWarehouseList().then((res) => {
this.warehouseList = res.data
this.exportWarehouseList = this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
})
this.init()
this.handleQuery()
},
watch: {
"queryParams.destCountryIds": {
handler(val, oldVal) {
this.queryParams.destCityIds = []
if (val && val.length > 0) {
this.loadCityList(2, val.join())
} else {
this.loadCityList()
}
}
},
"queryParams.destCityIds": {
handler(val, oldVal) {
this.queryParams.destWarehouseIds = []
if (val.length > 0) {
this.loadWareHouseList(3, val.join())
} else {
this.loadWareHouseList()
}
}
}
},
computed: {
...mapGetters(["getCurrencySymbol"]),
isChinese() {
return this.$i18n.locale === "zh_CN"
}
},
methods: {
// 返回汇总行数据
getSummary(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = this.$t("合计金额")
return
} else if (this.totalColumnKeyList.indexOf(column.property) == -1) {
sums[index] = "NA"
return
} else {
const currencySums = {}
data.forEach((item) => {
item[column.property].forEach((itemList) => {
currencySums[itemList.currencyId] = NP.plus(currencySums[itemList.currencyId] || 0, itemList.amount)
})
// currencySums[currencyId] = NP.plus(currencySums[currencyId] || 0, item[column.property])
// (currencySums[currencyId] || 0) + parseInt(item[column.property], 10)
})
const reducedDataList = Object.keys(currencySums).map((currencyId) => {
return `${this.getCurrencySymbol(currencyId * 1)}${currencySums[currencyId].toString()} `
})
sums[index] = reducedDataList
return
}
})
return sums
},
init() {
//请求获取国家
this.loadCountyList()
this.loadCityList()
this.loadWareHouseList()
},
//目的地
loadWareHouseList(type = 5, cityId = 5) {
getRegionList(type, cityId)
.then(({ data }) => {
this.objWareHouseList = data
})
.catch((error) => {
console.log(error)
})
},
loadCityList(type = 4, countryId = 4) {
getRegionList(type, countryId)
.then(({ data }) => {
this.cityList = data
})
.catch((error) => {
console.log(error)
})
},
loadCountyList() {
getRegionList(1, 1)
.then(({ data }) => {
this.countryList = data
})
.catch((error) => {
console.log(error)
})
},
resetQuery() {
this.$refs["queryForm"].resetFields()
this.dateFilterType = ""
this.queryParams.page = 1
this.queryParams.rows = 10
this.handleQuery()
},
handleQuery() {
this.loading = true
this.$nextTick(() => {
this.queryParams.page = 1
this.getList()
})
},
async getList() {
const params = this.removeEmpty({ ...this.queryParams })
// 提货率
if (this.queryParams.pickRatio && !this.queryParams.pickRatioSymbols) {
this.$message.warning(this.$t("请先选择操作符号"))
}
if (this.queryParams.pickRatio && this.queryParams.pickRatioSymbols) {
params[this.queryParams.pickRatioSymbols] = this.queryParams.pickRatio
}
this.addBeginAndEndTime(params, this.queryParams.dateFilter, this.dateFilterType, false)
const { data } = await loadSelfNoSummaryList(params)
this.list = data.list
this.loading = false
this.receivableTotalFeeGroupDtoList = data.receivableTotalFeeGroupDtoList //应收总金额 汇总
this.discountTotalFeeGroupDtoList = data.discountTotalFeeGroupDtoList //折扣金额汇总
this.netReceiptsTotalFeeGroupDtoList = data.netReceiptsTotalFeeGroupDtoList //折后总金额
this.writeOffTotalFeeGroupDtoList = data.writeOffTotalFeeGroupDtoList //已收总金额
this.notWriteOffTotalFeeGroupDtoList = data.notWriteOffTotalFeeGroupDtoList //未收总金额
this.total = data.total
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-select .el-input {
width: 130px;
}
.unit {
margin-right: 10px;
font-size: 12px;
}
.bar {
flex: 1;
flex-wrap: wrap;
display: flex;
}
.showBar {
width: 100%;
display: flex;
}
.sideBar {
margin-bottom: 2px;
font-size: 14px;
padding-right: 20px;
width: 50%;
}
.sideBar-bt {
margin-bottom: 2px;
font-size: 14px;
padding-right: 20px;
}
.mb8 {
padding-top: 6px;
}
</style>
......@@ -9,13 +9,15 @@
<el-input style="max-width: 188px" v-model="queryParams.receiptNo" :placeholder="$t('请输入收款单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('客户名称')">
<customer-selector v-model="queryParams.customerId" @change="changeCustomerId" clearable />
<el-select multiple :remote-method="customerDropDownFn" remote clearable filterable v-model="queryParams.customerIdList" :placeholder="$t('请输入关键词')">
<el-option v-for="(item, index) in customeList" :key="item.id" :value="item.id" :label="item.name"> </el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector :type="DICT_TYPE.ECW_RECEIPT_STATE" v-model="queryParams.state" clearable />
<dict-selector multiple :type="DICT_TYPE.ECW_RECEIPT_STATE" v-model="queryParams.stateList" clearable />
</el-form-item>
<el-form-item :label="$t('业务员')">
<el-select v-model="queryParams.salesmanId" :placeholder="$t('请选择业务员')" clearable>
<el-select multiple v-model="queryParams.salesmanIdList" :placeholder="$t('请选择业务员')" clearable>
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
......@@ -65,7 +67,7 @@
</template>
</el-table-column>
<!--lanbm 2024-06-06 添加链接-->
<el-table-column :label="$t('收款单号')" fixed="left" align="center" prop="receiptNo">
<el-table-column :label="$t('收款单号')" width="150" fixed="left" align="center" prop="receiptNo">
<template slot-scope="scope">
<span style="color: #1890ff" @click="verificationCancelClick(scope.row)">{{ scope.row.receiptNo }}</span>
</template>
......@@ -254,6 +256,8 @@
</template>
<script>
import { customerDropDownList } from "@/api/ecw/customerCommissionInfo"
import { getCustomerList } from "@/api/ecw/customer"
import { listSimpleUsers } from "@/api/system/user"
import { DICT_TYPE } from "@/utils/dict"
import CustomerSelector from "@/components/CustomerSelector"
......@@ -320,10 +324,15 @@ export default {
dateType: [],
loading: "",
params: {},
customeList: [],
// 查询参数
queryParams: {
page: 1,
rows: 20,
customerIdList: [],
stateList: null,
salesmanIdList: [],
numberNo: null,
dateType: null,
date: null,
originId: null,
......@@ -369,18 +378,35 @@ export default {
}
},
activated() {
this.customerDropDownFn()
const orderNo = this.$route.query.orderNo || ""
if (orderNo) {
this.queryParams.numberNo = orderNo
}
this.getList()
},
computed: {},
created() {
this.customerDropDownFn()
//获取汇率 lanbm 2024-06-06 add
getCurrencyPage(this.params).then((res) => (this.currencyList = res.data.list))
let that = this
listSimpleUsers().then((res) => (that.creatorData = res.data))
const orderNo = this.$route.query.orderNo || ""
if (orderNo) {
this.queryParams.numberNo = orderNo
}
this.getList()
},
methods: {
customerDropDownFn(val) {
customerDropDownList({ pageNo: 1, pageSize: 200, searchKey: val }).then((res) => {
if (res.code === 0) {
this.customeList = res.data.list
}
})
},
continueUpload() {
this.$message.success(this.$t("正在提交,请稍后。"))
this.$refs.upload.handleStart(this.fileCopy.raw)
......@@ -468,7 +494,7 @@ export default {
},
//发票新增/编辑页面
goInvoiceOperate({ id, key }) {
this.$router.push("invoiceOperate?id=" + id + "&key=" + key)
this.$router.push("/financial/invoiceOperate?id=" + id + "&key=" + key)
},
/** 查询列表 */
getList() {
......@@ -509,7 +535,7 @@ export default {
},
verificationCancelClick(row) {
const id = row.id
return this.$router.push("receiptDetail?id=" + id)
return this.$router.push("/financial/receiptDetail?id=" + id)
// this.$modal
// .confirm("您确认要反核销吗?")
// .then(function () {
......@@ -740,13 +766,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push("creatCollection?id=" + id)
return this.$router.push("/financial/creatCollection?id=" + id)
},
toprint(id) {
return this.$router.push("printVoucher?id=" + id)
return this.$router.push("/financial/printVoucher?id=" + id)
},
openInvoice(id) {
return this.$router.push("openInvoice?id=" + id)
return this.$router.push("/financial/openInvoice?id=" + id)
},
exportReceipt(id) {
this.open = true
......
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