WuYongJie e5c068036b feat: 供应商应付 - 货款对账 + 5个子功能页面
新增功能页面:
- 货款对账 (payment-reconciliation): 入库+代发合并对账,228K+2.8M条记录
- 退货对账 (return-reconciliation): finance_purchaseReturn, 36791行
- 发票扣款 (invoice-deductions): finance_invoiceDeduction, 195行
- 赔偿明细 (compensation-details): 纸板厂+压板厂 UNION, 98行
- 借支明细 (advance-details): finance_advanceLoans, 4行
- 样品扣款 (sample-deductions): finance_sampleDeduction, 12行

后端:
- JianSunConnection: PDO_ODBC 直连 SQL Server
- SupplierPayableRepository: 5个子页面的数据查询+分页
- GoodsReconciliationRepository: 货款对账数据查询
- 15个新API路由 (supplier-payables/*)
- 12个JianSun Eloquent模型

前端:
- 6个Blade视图 + 6个Vue组件
- webpack.mix.js 新增5个编译入口
- show.blade.php 动态视图解析
2026-07-21 18:40:24 +08:00

85 lines
2.8 KiB
JavaScript
Vendored

require('./../../bootstrap');
import Vue from 'vue';
import DashboardPlugin from './../../plugins/dashboard-plugin';
import Global from './../../mixins/global';
import {
Table, TableColumn, Pagination, DatePicker, Tag, Button, Input, Message
} from 'element-ui';
Vue.use(DashboardPlugin);
Vue.component(Table.name, Table);
Vue.component(TableColumn.name, TableColumn);
Vue.component(Pagination.name, Pagination);
Vue.component(DatePicker.name, DatePicker);
Vue.component(Tag.name, Tag);
Vue.component(Input.name, Input);
Vue.component(Button.name, Button);
Vue.prototype.$message = Message;
const app = new Vue({
el: '#invoice-deduction-app',
mixins: [Global],
data() {
return {
baseUrl: url + '/api/ecommerce-finance/supplier-payables/invoice-deductions',
loading: false,
tableData: [],
total: 0,
currentPage: 1,
pageSize: 25,
summary: { totalPrice: 0, totalCount: 0 },
filters: { supplier: '', month_range: null }
};
},
mounted() { this.fetchData(); },
methods: {
fetchData() {
this.loading = true;
const params = this.buildParams();
Promise.all([
axios.get(this.baseUrl, { params }),
axios.get(this.baseUrl + '/summary', { params })
]).then(([listRes, sumRes]) => {
this.tableData = listRes.data.data || [];
this.total = listRes.data.total || 0;
this.currentPage = listRes.data.page || 1;
this.pageSize = listRes.data.per_page || 25;
this.summary = sumRes.data;
}).catch(() => this.$message.error('获取数据失败'))
.finally(() => { this.loading = false; });
},
buildParams() {
const params = { page: this.currentPage, limit: this.pageSize };
if (this.filters.supplier) params.supplier = this.filters.supplier;
if (this.filters.month_range && this.filters.month_range.length === 2) {
params.month_from = this.filters.month_range[0];
params.month_to = this.filters.month_range[1];
}
return params;
},
onFilterChange() { this.currentPage = 1; this.fetchData(); },
onPageChange(p) { this.currentPage = p; this.fetchData(); },
onPageSizeChange(s) { this.pageSize = s; this.currentPage = 1; this.fetchData(); },
onReset() {
this.filters = { supplier: '', month_range: null };
this.currentPage = 1;
this.fetchData();
},
formatMoney(v) {
if (v == null || isNaN(v)) return '0.00';
return '¥' + Number(v).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
}
});
export default app;