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

94 lines
6.4 KiB
PHP

<div id="sample-deduction-app" class="sample-deduction-page">
<div v-cloak>
{{-- 统计卡片 --}}
<div class="grid grid-cols-3 gap-4 mb-6">
<div class="bg-white rounded-xl border border-gray-100 p-5 shadow-sm">
<div class="text-sm text-gray-500 mb-1">合计扣款金额</div>
<div class="text-2xl font-bold text-red-600">@{{ formatMoney(summary.totalAmount) }}</div>
</div>
<div class="bg-white rounded-xl border border-gray-100 p-5 shadow-sm">
<div class="text-sm text-gray-500 mb-1">预估总金额</div>
<div class="text-2xl font-bold text-gray-800">@{{ formatMoney(summary.totalEstimate) }}</div>
</div>
<div class="bg-white rounded-xl border border-gray-100 p-5 shadow-sm">
<div class="text-sm text-gray-500 mb-1">总记录数</div>
<div class="text-2xl font-bold text-indigo-600">@{{ (summary.totalCount || 0).toLocaleString() }}</div>
</div>
</div>
{{-- 筛选栏 --}}
<div class="bg-white rounded-xl border border-gray-100 p-4 mb-4 shadow-sm">
<div class="flex flex-wrap items-center gap-3">
<el-input v-model="filters.supplier" placeholder="厂家" size="small" style="width: 160px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-input v-model="filters.department" placeholder="部门" size="small" style="width: 160px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-input v-model="filters.creator" placeholder="申请人" size="small" style="width: 120px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-input v-model="filters.sku_id" placeholder="商品代码" size="small" style="width: 160px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-date-picker v-model="filters.date_range" type="daterange"
start-placeholder="开始" end-placeholder="结束" size="small"
style="width: 240px" value-format="yyyy-MM-dd" @change="onFilterChange">
</el-date-picker>
<el-button size="small" type="primary" @click="onFilterChange">查询</el-button>
<el-button size="small" @click="onReset">重置</el-button>
</div>
</div>
{{-- 数据表格 --}}
<div class="bg-white rounded-xl border border-gray-100 shadow-sm overflow-hidden">
<div v-if="loading" class="flex items-center justify-center py-20">
<span class="text-gray-400">加载中...</span>
</div>
<el-table v-else :data="tableData" stripe border style="width: 100%" size="small" height="600">
<el-table-column type="index" label="#" width="50" fixed="left"></el-table-column>
<el-table-column prop="finish_time" label="日期" width="110" fixed="left"></el-table-column>
<el-table-column prop="department" label="部门" width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="creator" label="申请人" width="100"></el-table-column>
<el-table-column prop="sku_id" label="商品代码" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="skuName" label="商品名称" width="220" show-overflow-tooltip></el-table-column>
<el-table-column prop="num" label="数量" width="70" align="right"></el-table-column>
<el-table-column prop="supplier" label="厂家" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="purchase" label="对应采购" width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="productCode" label="扣款厂家商品代码" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="shipping_fee" label="运费" width="100" align="right">
<template slot-scope="scope">@{{ formatMoney(scope.row.shipping_fee) }}</template>
</el-table-column>
<el-table-column prop="cost_price" label="成本价" width="110" align="right">
<template slot-scope="scope">@{{ formatMoney(scope.row.cost_price) }}</template>
</el-table-column>
<el-table-column prop="total_amount" label="合计扣款金额" width="130" align="right">
<template slot-scope="scope">
<span :class="scope.row.total_amount < 0 ? 'text-red-600' : 'text-gray-800'">@{{ formatMoney(scope.row.total_amount) }}</span>
</template>
</el-table-column>
<el-table-column prop="estimated_price" label="预估价" width="100" align="right">
<template slot-scope="scope">@{{ formatMoney(scope.row.estimated_price) }}</template>
</el-table-column>
<el-table-column prop="estimated_price_all" label="预估金额" width="110" align="right">
<template slot-scope="scope">@{{ formatMoney(scope.row.estimated_price_all) }}</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip>
<template slot-scope="scope"><span class="text-gray-400">@{{ scope.row.remark || '-' }}</span></template>
</el-table-column>
<el-table-column prop="businessId" label="业务单号" width="200" show-overflow-tooltip></el-table-column>
</el-table>
<div class="flex items-center justify-between px-4 py-3 border-t border-gray-100" v-if="!loading">
<div class="text-sm text-gray-500">共 @{{ total }} 条记录</div>
<el-pagination
background
layout="prev, pager, next, sizes, jumper"
:total="total"
:page-size="pageSize"
:current-page.sync="currentPage"
:page-sizes="[25, 50, 100]"
@size-change="onPageSizeChange"
@current-change="onPageChange">
</el-pagination>
</div>
</div>
</div>
</div>
@push('body_end')
<script src="{{ asset('public/js/ecommerce-finance/sample-deductions.min.js') }}"></script>
@endpush