| src/pages/procurementManagement/paymentLedger/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/procurementManagement/procurementLedger/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/procurementManagement/procurementLedger/view.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/utils/summarizeTable.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/pages/procurementManagement/paymentLedger/index.vue
@@ -1,7 +1,7 @@ <template> <view class="sales-account"> <!-- 使用通用页面头部组件 --> <PageHeader title="供应商往来" @back="goBack" /> <PageHeader title="供应商付款台账" @back="goBack" /> <!-- 搜索区域 --> <view class="search-section"> @@ -21,7 +21,7 @@ </view> </view> <!-- 供应商列表 --> <!-- 供应商列�?--> <view class="customer-list-container"> <view class="customer-list" v-if="tableData.length > 0"> <view @@ -59,7 +59,7 @@ </view> </view> <view v-else class="no-data"> <text>暂无供应商数据</text> <text>暂无供应商付款记录</text> </view> </view> </view> @@ -114,7 +114,7 @@ }; const formattedNumber = (value) => { return parseFloat(value || 0).toFixed(2); return parseFloat(value || 0).toFixed(3); }; // 显示加载提示 @@ -131,9 +131,9 @@ }; const rowClickMethod = (row) => { // 使用 uni.setStorageSync 存储供应商信息 // 使用 uni.setStorageSync 存储供应商ID uni.setStorageSync('supplierId', row.supplierId); // 跳转到回款记录明细页面 // 跳转到付款记录明细页 uni.navigateTo({ url: '/pages/procurementManagement/paymentLedger/detail' }); @@ -147,9 +147,9 @@ <style scoped lang="scss"> @import '@/styles/procurement-common.scss'; // 供应商往来特有样式 // 供应商付款台账特有样式 .detail-value.danger { color: #ff4757; // 与公共样式中的 #ee0a24 不同 color: #ff4757; // 与公共样式中应付金额颜色不同 font-weight: 500; } </style> </style> src/pages/procurementManagement/procurementLedger/index.vue
@@ -3,7 +3,7 @@ <!-- 使用通用页面头部组件 --> <PageHeader title="采购台账" @back="goBack" /> <!-- 搜索和筛选区域 --> <!-- 搜索和筛选区 --> <view class="search-section"> <view class="search-bar"> <view class="search-input"> @@ -63,7 +63,7 @@ </view> <view class="detail-row"> <text class="detail-label">合同金额(元)</text> <text class="detail-value highlight">{{ item.contractAmount }}</text> <text class="detail-value highlight">{{ formatNumber(item.contractAmount) }}</text> </view> <up-divider></up-divider> <view class="detail-info"> @@ -116,15 +116,15 @@ } from "@/api/procurementManagement/procurementLedger"; const userStore = useUserStore(); const approvalStatusText = { 1: "待审核", 1: "待审批", 2: "审批中", 3: "审批通过", 4: "审批失败", }; // 获取审批状态标签类型 // 获取审批状态标签类�? const getApprovalStatusType = status => { const typeMap = { 1: "info", // 待审核 - 灰色 1: "info", // 待审批 - 灰色 2: "warning", // 审批中 - 橙色 3: "success", // 审批通过 - 绿色 4: "error", // 审批失败 - 红色 @@ -136,6 +136,11 @@ // 采购台账数据 const ledgerList = ref([]); // 格式化金额 const formatNumber = value => { return parseFloat(value || 0).toFixed(3); }; // 返回上一页 const goBack = () => { @@ -258,7 +263,7 @@ }); }) .catch(error => { // 对于 request 封装返回的 '500' 或其他 code,错误提示已经在 request 里 toast 过了,这里不再重复覆盖 // 对于 request 封装返回的 '500' 或其code,错误提示已经在 request 中处理了,这里不再重复覆盖 if (error === "500" || typeof error === "number") { return; } @@ -290,5 +295,5 @@ <style scoped lang="scss"> @import "@/styles/procurement-common.scss"; // 采购台账特有样式(如有需要可在此添加) // 采购台账特有样式(如 需要可在此添加) </style> src/pages/procurementManagement/procurementLedger/view.vue
@@ -8,7 +8,7 @@ <view class="section-title">基本信息</view> <view class="info-grid"> <view class="info-item"> <text class="info-label">采购合同号</text> <text class="info-label">采购合同编号</text> <text class="info-value">{{ form.purchaseContractNumber }}</text> </view> <view class="info-item"> @@ -125,9 +125,9 @@ // 编辑数据 const editData = ref(null); // 返回上一页 // 返回上一�? const goBack = () => { // 清理本地存储的数据 // 清理本地存储的编辑数据 uni.removeStorageSync('editData'); uni.navigateBack(); }; @@ -144,7 +144,7 @@ }; onMounted(() => { // 获取编辑数据并填充表单 // 获取编辑数据并填充表单数据 const editDataStr = uni.getStorageSync('editData'); if (editDataStr) { try { src/utils/summarizeTable.js
@@ -26,9 +26,9 @@ // 如果指定了不需要保留小数,则直接转换为整数 sums[index] = Math.round(sum).toString(); } else { // 默认保留两位小数 // 默认保留三位小数 sums[index] = parseFloat(sum).toFixed( specialFormat[prop]?.decimalPlaces ?? 2 specialFormat[prop]?.decimalPlaces ?? 3 ); } } else { @@ -43,11 +43,11 @@ // 不含税总价计算 const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => { const taxRateDecimal = taxRate / 100; return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2); return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(3); }; // 含税总价计算 const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => { return (taxInclusiveUnitPrice * quantity).toFixed(2); return (taxInclusiveUnitPrice * quantity).toFixed(3); }; // 导出函数供其他文件使用 export {