feat: 完善金额格式化与产品预装系统类型功能
1. 新增并统一全链路金额格式化逻辑,添加千分位显示与固定两位小数 2. 为Excel导出添加decimalFormat配置与样式缓存,优化导出展示效果 3. 为产品表新增预装系统类型字段并完善前后端映射 4. 优化产品配置组件,新增税率锁定功能 5. 修复多处金额显示不规范问题,统一金额展示样式 6. 优化批量更新SQL语句语法,修复日志路径配置 7. 忽略.DS_Store文件并清理已跟踪的垃圾文件dev_1.0.3
parent
73cacea552
commit
467e7f74d5
|
|
@ -35,6 +35,7 @@ nbbuild/
|
|||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
.DS_Store
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
# 2026-09-08
|
||||
|
||||
## 代码 review(两轮)
|
||||
|
||||
用户要求只 review 不改代码。范围:工作区 53 个改动文件(Java 后端 + Vue 前端)。
|
||||
|
||||
### 改动主体
|
||||
- Excel 注解新增 `decimalFormat` 字段(Excel.java + ExcelUtil.java),21 个 domain 的 BigDecimal 字段加 `@Excel(scale=2, decimalFormat="#,##0.00")`,仅影响导出显示,安全。
|
||||
- 前端多处 `toFixed(2)` → 全局 `formatCurrency`(main.js 已注册 Vue.prototype),安全。
|
||||
- ProductInfo/Mapper/前端新增 `pre_system_type`(预装系统类型)字段,前后端配套完整,配套 SQL:`sql/20290904update.sql`(文件名年份疑为笔误,写的是 2029)。
|
||||
- `OmsInventoryInnerServiceImpl.insertOmsInventoryInner` 应付单生成逻辑重构(核心风险点)。
|
||||
|
||||
### 第一轮发现的问题 → 用户修复后第二轮复核结果
|
||||
1. NPE(quantity/price 为 null 时直接 multiply)→ 已修:`usePurchaseOrder` 条件含 null 检查,null 时回退原公式 ✓
|
||||
2. 重复 setTaxAmount(新旧两行并存)→ 已清理,只留正确行(含税-未税)✓
|
||||
3. vendorInfo 为 null 时 getPayConfigDay() NPE → 已修,传 0 ✓
|
||||
4. 遗留:`vendorInfo != null ? vendorInfo.getPayConfigDay() : 0` 三元混合 Integer/int,payConfigDay 为 null 时仍会拆箱 NPE(原代码同样会炸,非回归)
|
||||
5. 遗留:ExcelUtil 每单元格 createCellStyle,POI 上限 64000 样式,大数据量导出会失败
|
||||
6. 遗留:OrderList.java 文件末尾无换行;oms_web/.DS_Store 未跟踪垃圾文件
|
||||
|
||||
### 业务逻辑一致性结论(H3C 判定)
|
||||
- 新华三(isH3C=true,startsWith("新华三")):条件退化为原条件,金额公式走原逻辑,与原 100% 一致
|
||||
- 非新华三无采购单:innerComplete 默认 true,与原一致
|
||||
### 第三轮复核(用户又修复了一批)
|
||||
1. 三元拆箱 NPE → 已修:`vendorInfo != null && vendorInfo.getPayConfigDay() != null ? ... : 0` ✓
|
||||
2. ExcelUtil CellStyle → 已修:新增 `moneyStyles` Map 缓存(按 decimalFormat 键),HashMap 已导入,ExcelUtil 每次 export 新建实例,缓存作用域正确 ✓
|
||||
3. OrderList.java 末尾换行 → 已补 ✓
|
||||
仍遗留(非代码 bug,提交时注意):isH3C 口径需业务确认(startsWith("新华三"),基于 ProductInfo.vendorName);sql/20290904update.sql 文件名年份笔误(2029);oms_web/.DS_Store 与 ruoyi-admin/.DS_Store 垃圾文件。
|
||||
至此所有代码级问题均已修复,H3C/无采购单场景与原逻辑一致,非新华三+有采购单为有意业务变更。
|
||||
|
||||
### 金额格式统一专项检查(第四轮,只查不改)
|
||||
**统一现状**:全局 formatCurrency(utils/index.js:17,main.js:46 注册,null→'0.00',toLocaleString en-US 2位小数);本次 diff 新增 72 处 formatCurrency(27 个文件);后端 21 个 domain 106 个 @Excel 字段加 decimalFormat。
|
||||
|
||||
**后端 Excel 遗漏**:OmsTicketBill.java:70 taxAmount(税额,活动注解,其余单据均已加)。比率类(taxRate×4、planRate×2、invoiceRate、receiptRate)未加属合理;折扣类(OrderList.discount、ProjectOrderConfigInfo.guidanceDiscount/discount)需确认语义。
|
||||
|
||||
**前端遗漏**:ApplyInvoice.vue:122/129/143 v-else 分支裸显示 unitPrice/amount/taxAmount;writeoff 两 index 的 $modal 提示文案 5 处无千分位(轻微);formatCurrency(x.toFixed(2)) 双重格式化 ~12 处(冗余无害)。
|
||||
|
||||
**体系性发现**:项目存在 7+ 处组件局部 formatAmount/formatAmountNumber 副本(均为存量,非本次新增):purchaseorder/index.vue:589、orderFinance.vue:377(filters)、base/quotation/index.vue:535、ProductConfig.vue:497、approve/all/index.vue:1295(用zh-CN)、projectTransfer.vue:293、project/info/index.vue:491 等。差异:局部版 null→'',全局版 null→'0.00'。后续统一建议收敛到全局 formatCurrency,先定 null 显示口径。
|
||||
|
||||
**formatCurrency 边界**:非数字字符串入参会显示 "NaN"(Number('abc').toLocaleString → "NaN"),建议加 Number.isNaN 保护。convertCurrency(大写金额)依赖 toFixed 字符串,InvoiceInfoView:115 / ApplyInvoice:278 / invoiceExcelUtils.js:147 的 toFixed(2) 必须保留,不是遗漏。
|
||||
|
||||
### 第五轮:全量改动集成测试(mvn 编译 + vue 解析)
|
||||
**Maven 全量编译**(JAVA_HOME=Corretto 8):7 模块 SUCCESS,0 ERROR。Lombok、@Excel 注解、mapper SQL、Service 实现全部对齐。
|
||||
**前端 31 文件 SFC/JS 解析**:用 @vue/compiler-sfc 批量 parse,0 失败(PaymentRefundDetail、ReceiptDetail、ReceivableInvoiceDetail、ApplyInvoice、InvoiceInfoView、EditForm×2、AddForm、receipt/index、writeoff 6 个文件、inventory/inner、ProductConfig、ProjectForm、project/info/index、OrderDetail、PurchaseOrderDetail、PurchaseOrderDetailView、PurchaseOrderSelectDialog、vendorConfirm、system/product、approve/purchaase×2、selectQuotation、projectTransfer、invoiceExcelUtils.js)。
|
||||
|
||||
**本轮新增发现的位置**(前几轮未深查):
|
||||
- ruoyi-admin/logback.xml:把 jiliu 路径换成 kangwenjing 个人本地路径,纯个人配置切换,不影响代码(提交前建议恢复或加 .gitignore 排除)。
|
||||
- dto/InventoryInfoExcelDto.java、dto/warehouse/WarehouseInnerExcelDto.java:innerPrice 加 decimalFormat,已正确 ✓
|
||||
- approve/purchaase/{approve,approved}/index.vue:含税总金额列加 formatter ✓
|
||||
- base/quotation/selectQuotation.vue:discountAmount 加 formatter,字段名语义为"报价金额"(QuotationInfo 表的折扣后金额),没问题 ✓
|
||||
- system/product/index.vue:queryParams 已在 data() 初始声明 preSystemType: null ✓;resetForm 依赖表单模板自动重置 ✓;handleTypeChange 在切换非硬件时清空 preSystemType ✓
|
||||
- OmsTicketBill.java:70 税额仍**漏** decimalFormat(连续两轮没修)。
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# 2026-09-09 工作日志
|
||||
|
||||
## 全量改动复核 + 集成测试(不动代码)
|
||||
|
||||
**改动规模**:65 文件、+427 / -283 行
|
||||
|
||||
**集成测试结果**:
|
||||
- 后端:`mvn compile -DskipTests`(JAVA_HOME=Corretto 1.8.0_442) → **BUILD SUCCESS**,7 模块 0 ERROR
|
||||
- 前端:31 个 Vue/JS 文件用 `@vue/compiler-sfc` 解析 → **31 ok, 0 fail**
|
||||
|
||||
**本轮发现**:
|
||||
1. `OmsTicketBill.java:70` 税额已加 `decimalFormat = "#,##0.00"`(用户修复)
|
||||
2. SQL 文件名 `20290904` → `20260904`(已改),但文件内注释仍写 `2029-09-04`
|
||||
3. `.gitignore` 已加 `.DS_Store`(用户修复)
|
||||
4. `ruoyi-admin/.DS_Store` 仍被 `git ls-files` 跟踪,需 `git rm --cached` 才能彻底忽略
|
||||
|
||||
**确认正确的覆盖**:
|
||||
- `inventory/inner/index.vue`、`vendorConfirm.vue` — 本次新加 formatter 没问题
|
||||
- `InventoryInfoExcelDto.java`、`WarehouseInnerExcelDto.java` — 入库价已加 decimalFormat
|
||||
- `ProductInfo.java` + `ProductInfoMapper.xml` — preSystemType 字段前后端完整配套
|
||||
- `OmsInventoryInnerServiceImpl.java` — 三处修复(NPE、payConfigDay 拆箱、税金额)均正确
|
||||
|
||||
**仍未修的小遗留**:
|
||||
- `ApplyInvoice.vue:122/129/143` v-else 裸显示(用户上一轮已知,影响小)
|
||||
- 14 处 `formatCurrency(x.toFixed(2))` 双重格式化(冗余但正确)
|
||||
- 7+ 处局部 `formatAmount/formatAmountNumber` 副本(存量代码,本次未改)
|
||||
|
||||
**体系性问题(与本次改动范围无关)**:
|
||||
- 项目里 7+ 处组件局部的 `formatAmount` 副本,行为与全局 `formatCurrency` 略有差异(null 显示空 vs '0.00'),建议后续收敛
|
||||
- `formatCurrency('abc')` 会显示 "NaN",建议加 `Number.isNaN` 保护
|
||||
|
||||
**提交前清单**:
|
||||
- [ ] 修 `sql/20260904update.sql` 注释里的 `2029-09-04` → `2026-09-04`
|
||||
- [ ] `git rm --cached ruoyi-admin/.DS_Store`(.gitignore 已加,但已跟踪文件需手动移除)
|
||||
- [ ] 可选:`git checkout ruoyi-admin/src/main/resources/logback.xml` 恢复个人本地路径
|
||||
|
|
@ -12,7 +12,7 @@ function formatCurrency(value) {
|
|||
if (Number.isNaN(num)) {
|
||||
return "0.00";
|
||||
}
|
||||
return num.toFixed(2);
|
||||
return num.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
|
||||
function getProductTypeLabel(value) {
|
||||
|
|
@ -135,9 +135,9 @@ function buildSummaryRow(items) {
|
|||
return `
|
||||
<tr>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;" colspan="8">合计</td>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;" colspan="2">¥${allPriceTotal.toFixed(2)}</td>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;" colspan="2">¥${formatCurrency(allPriceTotal)}</td>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;">-</td>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;">¥${taxTotal.toFixed(2)}</td>
|
||||
<td class="cell center bold" align="center" style="text-align: center; mso-horizontal-align: center;">¥${formatCurrency(taxTotal)}</td>
|
||||
</tr>
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<!-- Note: Product Type is requested but not present in reference DetailDrawer.vue. Omitting for safety or need to ask. -->
|
||||
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center"></el-table-column>
|
||||
<el-table-column prop="paymentAmount" label="本次付款金额" align="center"></el-table-column>
|
||||
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="paymentAmount" label="本次付款金额" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center"></el-table-column>
|
||||
<el-table-column prop="receiptAmount" label="本次收款金额" align="center"></el-table-column>
|
||||
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="receiptAmount" label="本次收款金额" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span :style="scope.row.totalPriceWithTax < 0 ? 'color: red' : ''">{{ scope.row.totalPriceWithTax }}</span>
|
||||
<span :style="scope.row.totalPriceWithTax < 0 ? 'color: red' : ''">{{ formatCurrency(scope.row.totalPriceWithTax) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="receiptAmount" label="本次开票金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span :style="scope.row.receiptAmount < 0 ? 'color: red' : ''">{{ scope.row.receiptAmount }}</span>
|
||||
<span :style="scope.row.receiptAmount < 0 ? 'color: red' : ''">{{ formatCurrency(scope.row.receiptAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<el-table-column label="采购单号" align="center" prop="purchaseNo" />
|
||||
<el-table-column label="制造商名称" align="center" prop="vendorName"/>
|
||||
<el-table-column label="联系人" align="center" prop="vendorUser" />
|
||||
<el-table-column label="含税总金额" align="center" prop="totalAmount" />
|
||||
<el-table-column label="含税总金额" align="center" prop="totalAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="提交日期" align="center" prop="applyTime" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<el-table-column label="采购单号" align="center" prop="purchaseNo" />
|
||||
<el-table-column label="制造商名称" align="center" prop="vendorName"/>
|
||||
<el-table-column label="联系人" align="center" prop="vendorUser" />
|
||||
<el-table-column label="含税总金额" align="center" prop="totalAmount" />
|
||||
<el-table-column label="含税总金额" align="center" prop="totalAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="提交日期" align="center" prop="applyTime" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<el-table-column label="报价单号" align="center" prop="quotationCode" />
|
||||
<el-table-column label="报价单名称" align="center" prop="quotationName" />
|
||||
<el-table-column label="项目编号" align="center" prop="projectCode" />
|
||||
<el-table-column label="报价金额" align="center" prop="discountAmount" />
|
||||
<el-table-column label="报价金额" align="center" prop="discountAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ export default {
|
|||
/** 格式化金额 */
|
||||
formatAmountNumber(value) {
|
||||
if (value) {
|
||||
return Number(value).toLocaleString('en-US');
|
||||
return Number(value).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@
|
|||
</div>
|
||||
<div class="total-label-small">(小写)</div>
|
||||
<div class="total-value-number">
|
||||
¥{{ totalAmountNumber }}
|
||||
¥{{ formatCurrency(totalAmountNumber) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ export default {
|
|||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = '¥' + sum.toFixed(2);
|
||||
sums[index] = '¥' + formatCurrency(sum);
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<el-table-column label="规格型号" prop="productModel" align="center" width="120"></el-table-column>
|
||||
<el-table-column label="单位" prop="unit" align="center" width="60"></el-table-column>
|
||||
<el-table-column label="数量" prop="quantity" align="center" width="80"></el-table-column>
|
||||
<el-table-column label="单价" prop="price" align="center" width="100"></el-table-column>
|
||||
<el-table-column label="单价" prop="price" align="center" width="100" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column label="金额" prop="allPrice" align="center" width="100" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column label="税率%" prop="taxRate" align="center" width="80"></el-table-column>
|
||||
<el-table-column label="税额" prop="taxAmount" align="center" width="100" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
|
|
@ -146,7 +146,7 @@ export default {
|
|||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = '¥' + sum.toFixed(2);
|
||||
sums[index] = '¥' + formatCurrency(sum);
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ export default {
|
|||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
} else if (column.property === 'paymentAmount') {
|
||||
sums[index] = paymentAmountSum.toFixed(2);
|
||||
sums[index] = this.formatCurrency(paymentAmountSum);
|
||||
} else if (column.property === 'paymentRate') {
|
||||
if (this.formData.totalPriceWithTax && this.formData.totalPriceWithTax > 0) {
|
||||
const ratio = this.$calc.div(paymentAmountSum , this.formData.totalPriceWithTax,4);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
<el-table-column label="预计付款时间" align="center" prop="planPaymentDate" width="180"/>
|
||||
<el-table-column label="预期付款计划" align="center" width="100" prop="planAmount">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateOrderCurrentPaymentAmount(scope.row) }}
|
||||
{{ formatCurrency(calculateOrderCurrentPaymentAmount(scope.row)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预期付款比例" align="center" prop="projectCode" width="150">
|
||||
|
|
@ -96,8 +96,8 @@
|
|||
<!-- <dict-tag :options="dict.type.payment_status" :value="scope.row.paymentStatus"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" width="120"/>
|
||||
<el-table-column label="未付款金额" align="center" prop="unpaidPaymentAmount" width="120"/>
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="未付款金额" align="center" prop="unpaidPaymentAmount" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<!-- <el-table-column label="本次付款金额" align="center" width="120">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ calculateOrderCurrentPaymentAmount(scope.row).toFixed(2) }}-->
|
||||
|
|
@ -108,10 +108,10 @@
|
|||
<!-- {{ calculateOrderCurrentPaymentRate(scope.row) }}%-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="已付款金额" align="center" prop="paidPaymentAmount" width="120"/>
|
||||
<el-table-column label="已付款金额" align="center" prop="paidPaymentAmount" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="付款中金额" align="center" prop="paidAmount" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ $calc.sub($calc.sub(scope.row.totalPriceWithTax, scope.row.paidPaymentAmount), scope.row.unpaidPaymentAmount) }}
|
||||
{{ formatCurrency($calc.sub($calc.sub(scope.row.totalPriceWithTax, scope.row.paidPaymentAmount), scope.row.unpaidPaymentAmount)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100"
|
||||
|
|
@ -428,7 +428,7 @@ export default {
|
|||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
sums[index] = this.formatCurrency(sums[index]);
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ export default {
|
|||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
sums[index] = this.formatCurrency(sums[index]);
|
||||
} else {
|
||||
sums[index] = '0.00';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ export default {
|
|||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
} else if (column.property === 'receiptAmount') {
|
||||
sums[index] = receiptAmountSum.toFixed(2);
|
||||
sums[index] = this.formatCurrency(receiptAmountSum);
|
||||
} else if (column.property === 'receiptRate') {
|
||||
if (this.formData.totalPriceWithTax && this.formData.totalPriceWithTax > 0) {
|
||||
const ratio = this.$calc.div(receiptAmountSum , this.formData.totalPriceWithTax,4);
|
||||
|
|
@ -286,7 +286,7 @@ export default {
|
|||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
} else if (column.property === 'invoiceAmount') {
|
||||
sums[index] = invoiceAmountSum.toFixed(2);
|
||||
sums[index] = this.formatCurrency(invoiceAmountSum);
|
||||
} else if (column.property === 'invoiceRate') {
|
||||
if (this.formData.totalPriceWithTax && this.formData.totalPriceWithTax > 0) {
|
||||
const ratio = this.$calc.div(invoiceAmountSum , this.formData.totalPriceWithTax,4);
|
||||
|
|
|
|||
|
|
@ -111,15 +111,15 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="未核销含税总价(元)" align="center" prop="unpaidPaymentAmount" width="150"/>
|
||||
<el-table-column label="未核销含税总价(元)" align="center" prop="unpaidPaymentAmount" width="150" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="未核销未税总价(元)" align="center" prop="unpaidAmount" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateExcludingTax(scope.row.unpaidPaymentAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateExcludingTax(scope.row.unpaidPaymentAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未核销税额(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateTax(scope.row.unpaidPaymentAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateTax(scope.row.unpaidPaymentAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
<div class="table-summary" style="margin-bottom: 10px;">
|
||||
<span style="font-weight: bold; margin-right: 20px;display: none">付款单本次核销总额: <span
|
||||
:style="{color: isWriteOffAmountValid ? '#67C23A' : '#F56C6C'}">{{
|
||||
totalPaymentWriteOffAmount.toFixed(2)
|
||||
formatCurrency(totalPaymentWriteOffAmount)
|
||||
}}</span></span>
|
||||
<span v-if="!isWriteOffAmountValid" style="color: #F56C6C; font-size: 12px;"><i class="el-icon-warning"></i> 总价之和不能大于应付单本次核销总价之和</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@
|
|||
<dict-tag :options="dict.type.finance_write_off_type" :value="scope.row.writeOffType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" />
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<el-divider content-position="left">销售-收款单</el-divider>
|
||||
<el-table :data="[detail]" border stripe>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="writeOffAmount" label="本次核销含税总价(元)" align="center"></el-table-column>
|
||||
<el-table-column prop="writeOffAmount" label="本次核销含税总价(元)" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="partnerName" label="进货商名称" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="receiptBillCode" label="销售-收款单编号" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="receiptCreateTime" label="收款单生成时间" align="center" width="160">
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<el-divider content-position="left">销售-应收单</el-divider>
|
||||
<el-table :data="detail.detailList" border stripe>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="receiptAmount" label="本次核销含税总价(元)" align="center"></el-table-column>
|
||||
<el-table-column prop="receiptAmount" label="本次核销含税总价(元)" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="partnerName" label="进货商名称" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="receivableBillCode" label="销售-应收单编号" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<h3>销售-应收单</h3>
|
||||
<div class="table-summary" style="margin-bottom: 10px;">
|
||||
<span style="font-weight: bold; margin-right: 20px;">应收单本次核销总额: <span
|
||||
style="color: #409EFF">{{ totalReceivableWriteOffAmount.toFixed(2) }}</span></span>
|
||||
style="color: #409EFF">{{ formatCurrency(totalReceivableWriteOffAmount) }}</span></span>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loadingReceivable"
|
||||
|
|
@ -99,37 +99,35 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="未核销含税总价(元)" align="center" prop="unreceivedAmount" width="150"/>
|
||||
<el-table-column label="未核销含税总价(元)" align="center" prop="unreceivedAmount" width="150" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="未核销未税总价(元)" align="center" prop="unreceivedAmount" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateExcludingTax(scope.row.unreceivedAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateExcludingTax(scope.row.unreceivedAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未核销税额(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateTax(scope.row.unreceivedAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateTax(scope.row.unreceivedAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="核销中含税总价(元)" align="center" prop="receivedAmount" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
$calc.sub($calc.sub(scope.row.totalPriceWithTax, scope.row.receivedAmount), scope.row.unreceivedAmount)
|
||||
}}
|
||||
{{ formatCurrency($calc.sub($calc.sub(scope.row.totalPriceWithTax, scope.row.receivedAmount), scope.row.unreceivedAmount)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已核销含税总价(元)" align="center" prop="receivedAmount" width="150"/>
|
||||
<el-table-column label="已核销含税总价(元)" align="center" prop="receivedAmount" width="150" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="已核销未税总价(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateExcludingTax(scope.row.receivedAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateExcludingTax(scope.row.receivedAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已核销税额(元)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ calculateTax(scope.row.receivedAmount, scope.row.taxRate) }}
|
||||
{{ formatCurrency(calculateTax(scope.row.receivedAmount, scope.row.taxRate)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" width="120"/>
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="进货商名称" fixed="right" align="center" prop="partnerName" width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column label="销售-应收单编号" fixed="right" align="center" prop="receivableBillCode" width="150"
|
||||
|
|
@ -154,7 +152,7 @@
|
|||
<div class="table-summary" style="margin-bottom: 10px;">
|
||||
<span style="font-weight: bold; margin-right: 20px;">本次核销含税总价(元): <span
|
||||
:style="{color: isWriteOffAmountValid ? '#67C23A' : '#F56C6C'}">{{
|
||||
totalReceiptWriteOffAmount.toFixed(2)
|
||||
formatCurrency(totalReceiptWriteOffAmount)
|
||||
}}</span></span>
|
||||
<span v-if="!isWriteOffAmountValid" style="color: #F56C6C; font-size: 12px;"><i class="el-icon-warning"></i> 总价之和不能大于应收单本次核销总价之和</span>
|
||||
</div>
|
||||
|
|
@ -184,14 +182,13 @@
|
|||
|
||||
<el-table-column label="未核销含税总价(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.remainingAmount || '0.00' }} <!-- Assuming receiptAmount is total initially -->
|
||||
</template>
|
||||
{{ formatCurrency(scope.row.remainingAmount) }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已核销含税总价(元)" align="center" prop="writeOffAmount" width="150"/>
|
||||
<el-table-column label="已核销未税总价(元)" align="center" width="150" prop="writeOffAmountWithoutTax"/>
|
||||
<el-table-column label="已核销税额(元)" align="center" width="150" prop="writeOffTaxAmount"/>
|
||||
<el-table-column label="已核销含税总价(元)" align="center" prop="writeOffAmount" width="150" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="已核销未税总价(元)" align="center" width="150" prop="writeOffAmountWithoutTax" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="已核销税额(元)" align="center" width="150" prop="writeOffTaxAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax"/>
|
||||
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="进货商名称" align="center" prop="partnerName" width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column label="销售-收款单编号" align="center" prop="receiptBillCode" width="150"
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@
|
|||
<dict-tag :options="dict.type.finance_write_off_type" :value="scope.row.writeOffType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" width="140" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" width="140" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" width="140" />
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" width="140" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" width="140" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" width="140" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<el-divider content-position="left">收票单信息</el-divider>
|
||||
<el-table :data="[detail]" border stripe>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="writeOffAmount" label="本次核销含税总价(元)" align="center"></el-table-column>
|
||||
<el-table-column prop="writeOffAmount" label="本次核销含税总价(元)" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="vendorName" label="制造商名称" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="ticketBillCode" label="收票单编号" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="createTime" label="收票单生成时间" align="center" width="160">
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<el-divider content-position="left">应付单明细</el-divider>
|
||||
<el-table :data="detail.detailList" border stripe>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="paymentAmount" label="本次核销金额(元)" align="center"></el-table-column>
|
||||
<el-table-column prop="paymentAmount" label="本次核销金额(元)" align="center" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column prop="vendorName" label="制造商名称" align="center"></el-table-column>
|
||||
<el-table-column prop="payableBillCode" label="应付单编号" align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="createTime" label="应付单生成时间" align="center"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -88,9 +88,9 @@
|
|||
<dict-tag :options="dict.type.finance_write_off_type" :value="scope.row.writeOffType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" />
|
||||
<el-table-column label="核销含税总价(元)" align="center" prop="writeOffAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销未税总价(元)" align="center" prop="writeOffAmountWithoutTax" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="核销税额(元)" align="center" prop="writeOffTaxAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@
|
|||
<el-table-column label="产品编码" prop="productCode"/>
|
||||
<el-table-column label="产品型号" prop="model"/>
|
||||
<el-table-column label="描述" prop="productDesc"/>
|
||||
<el-table-column label="入库价" prop="innerPrice"/>
|
||||
<el-table-column label="入库价" prop="innerPrice" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="数量" prop="quantity"/>
|
||||
</template>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="税率(%)" width="100" prop="taxRate">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled"></el-input>
|
||||
<div class="tax-rate-wrap">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled || lockTaxRate"></el-input>
|
||||
<div v-if="lockTaxRate && !isActionDisabled" class="tax-rate-mask" :title="'税率不可编辑'"></div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" width="150" prop="remark">
|
||||
|
|
@ -148,7 +151,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="税率(%)" width="100" prop="taxRate">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled"></el-input>
|
||||
<div class="tax-rate-wrap">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled || lockTaxRate"></el-input>
|
||||
<div v-if="lockTaxRate && !isActionDisabled" class="tax-rate-mask" :title="'税率不可编辑'"></div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" width="150" prop="remark">
|
||||
|
|
@ -227,7 +233,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="税率(%)" width="100" prop="taxRate">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled"></el-input>
|
||||
<div class="tax-rate-wrap">
|
||||
<el-input v-model="scope.row.taxRate" type="number" :min="0" :max="100" size="small" style="width: 100%;" :readonly="readonly" :disabled="disabled || lockTaxRate"></el-input>
|
||||
<div v-if="lockTaxRate && !isActionDisabled" class="tax-rate-mask" :title="'税率不可编辑'"></div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" width="150" prop="remark">
|
||||
|
|
@ -277,6 +286,11 @@ export default {
|
|||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 锁定税率,不允许编辑(用于订单新增等场景)
|
||||
lockTaxRate: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -585,5 +599,22 @@ export default {
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// 税率遮盖层
|
||||
.tax-rate-wrap {
|
||||
position: relative;
|
||||
|
||||
.tax-rate-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
cursor: not-allowed;
|
||||
// 轻微底色区分,提示该字段不可编辑
|
||||
background: rgba(200, 200, 200, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@
|
|||
<div style="max-height: 60vh; overflow-y: auto; padding: 15px;">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="openSelectQuotation" class="mb8" :disabled="isFormDisabled">报价单导入</el-button>
|
||||
<!-- 产品配置信息 -->
|
||||
<product-config v-model="form.productConfig" ref="productConfig" :disabled="isFormDisabled" />
|
||||
<product-config v-model="form.productConfig" ref="productConfig" :disabled="isFormDisabled" :lock-tax-rate="!isFormDisabled" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="工作进度" name="workProgress">
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ export default {
|
|||
/** 格式化金额 */
|
||||
formatAmountNumber(value) {
|
||||
if (value) {
|
||||
return Number(value).toLocaleString('en-US');
|
||||
return Number(value).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="配置信息" name="config">
|
||||
<div style="max-height: 60vh; overflow-y: auto; padding: 15px;">
|
||||
<product-config :value="form" @input="handleProductConfigInput" :disabled="!isProjectSelected || isOrderApprovedOrInReview" />
|
||||
<product-config :value="form" @input="handleProductConfigInput" :disabled="!isProjectSelected || isOrderApprovedOrInReview" :lock-tax-rate="isProjectSelected" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="流转过程" name="flow">
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@
|
|||
<tax-rate-input v-model="scope.row.taxRate" :step="0.1" :min="0" :max="100" @change="calculateRowTotal(scope.row)"></tax-rate-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税小计" prop="amountTotal"></el-table-column>
|
||||
<el-table-column label="含税小计" prop="amountTotal" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column label="交货日期">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.deliveryDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
|
|
@ -178,15 +178,15 @@
|
|||
<div class="summary-footer" style="margin-top: 20px; text-align: right;">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">不含税总计金额:</el-col>
|
||||
<el-col :span="2">{{ totalAmountWithoutTax.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalAmountWithoutTax) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">税额合计:</el-col>
|
||||
<el-col :span="2">{{ totalTaxAmount.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalTaxAmount) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">含税总计金额:</el-col>
|
||||
<el-col :span="2">{{ totalAmountWithTax.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalAmountWithTax) }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="单价">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.price }}</span>
|
||||
<span>{{ formatCurrency(scope.row.price) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税率(%)" prop="taxRate">
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
<span>{{ scope.row.taxRate *100}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税小计" prop="amountTotal"></el-table-column>
|
||||
<el-table-column label="含税小计" prop="amountTotal" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column label="交货日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</span>
|
||||
|
|
@ -170,15 +170,15 @@
|
|||
<div class="summary-footer" style="margin-top: 20px; text-align: right;">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">不含税总计金额:</el-col>
|
||||
<el-col :span="2">{{ totalAmountWithoutTax.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalAmountWithoutTax) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">税额合计:</el-col>
|
||||
<el-col :span="2">{{ totalTaxAmount.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalTaxAmount) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">含税总计金额:</el-col>
|
||||
<el-col :span="2">{{ totalAmountWithTax.toFixed(2) }}</el-col>
|
||||
<el-col :span="2">{{ formatCurrency(totalAmountWithTax) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="font-weight: bold;">供应商:</el-col>
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
<el-table-column label="制造商名称" align="center" prop="vendorName" width="120"></el-table-column>
|
||||
<el-table-column label="联系人" align="center" prop="vendorUser" width="120"></el-table-column>
|
||||
<el-table-column label="联系电话" align="center" prop="vendorPhone" width="120"></el-table-column>
|
||||
<el-table-column label="含税总计金额" align="center" prop="totalAmount" width="120"></el-table-column>
|
||||
<el-table-column label="含税总计金额" align="center" prop="totalAmount" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"></el-table-column>
|
||||
<el-table-column label="发起日期" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@
|
|||
<el-table-column label="产品编码" align="center" prop="productCode" width="100"/>
|
||||
<el-table-column label="产品型号" align="center" prop="productModel" width="100"/>
|
||||
<el-table-column label="数量" align="center" prop="quantity" width="100"/>
|
||||
<el-table-column label="单价" align="center" prop="price" width="100"/>
|
||||
<el-table-column label="单价" align="center" prop="price" width="100" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="小计" align="center" prop="price" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ ((Number(scope.row.quantity) || 0) * (Number(scope.row.price) || 0)).toFixed(2) }}
|
||||
{{ formatCurrency(((Number(scope.row.quantity) || 0) * (Number(scope.row.price) || 0))) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<el-table-column label="制造商名称" align="center" prop="vendorName" width="120"/>
|
||||
<el-table-column label="联系人" align="center" prop="vendorUser" width="100"/>
|
||||
<el-table-column label="联系电话" align="center" prop="vendorPhone" width="120"/>
|
||||
<el-table-column label="含税总计金额" align="center" prop="totalAmount" width="120"/>
|
||||
<el-table-column label="含税总计金额" align="center" prop="totalAmount" width="120" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)"/>
|
||||
<el-table-column label="发起日期" align="center" prop="createTime" sortable width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,16 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预装系统类型" prop="preSystemType">
|
||||
<el-select v-model="queryParams.preSystemType" placeholder="请选择预装系统类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.pre_system_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
|
@ -82,7 +92,12 @@
|
|||
<el-table-column label="产品型号" align="center" prop="model" />
|
||||
<el-table-column label="制造商" align="center" prop="vendorName" />
|
||||
<el-table-column label="产品类型" align="center" prop="level2TypeName" />
|
||||
<el-table-column label="目录单价" align="center" prop="cataloguePrice" />
|
||||
<el-table-column label="预装系统类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ preSystemTypeName(scope.row.preSystemType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="目录单价" align="center" prop="cataloguePrice" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
|
||||
<el-table-column label="指导折扣" align="center" prop="guidanceDiscount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.guidanceDiscount ? (scope.row.guidanceDiscount * 100).toFixed(2) + '%' : '-' }}</span>
|
||||
|
|
@ -174,6 +189,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item v-if="form.type == '2'" label="预装系统类型" prop="preSystemType">
|
||||
<el-select v-model="form.preSystemType" placeholder="请选择预装系统类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.pre_system_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
|
|
@ -269,7 +294,7 @@ import {getDicts} from "@/api/system/dict/data";
|
|||
|
||||
export default {
|
||||
name: "Product",
|
||||
dicts: ['product_type', 'cpu_brand', 'cpu_architecture'],
|
||||
dicts: ['product_type', 'cpu_brand', 'cpu_architecture', 'pre_system_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -306,6 +331,7 @@ export default {
|
|||
productName: null,
|
||||
model: null,
|
||||
vendorName: null,
|
||||
preSystemType: null,
|
||||
isAsc : 'desc',
|
||||
orderByColumn : 'createdAt',
|
||||
},
|
||||
|
|
@ -334,6 +360,19 @@ export default {
|
|||
localization: [],
|
||||
cpuBrand: [],
|
||||
cpuArchitecture: [],
|
||||
preSystemType: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "change",
|
||||
validator: (rule, value, callback) => {
|
||||
if (this.form.type == '2' && (value === null || value === undefined || value === '')) {
|
||||
callback(new Error("预装系统类型不能为空"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
cataloguePrice: [
|
||||
{ required: true, message: "目录单价不能为空", trigger: "blur" }
|
||||
],
|
||||
|
|
@ -445,6 +484,7 @@ export default {
|
|||
localization: null,
|
||||
cpuBrand: null,
|
||||
cpuArchitecture: null,
|
||||
preSystemType: null,
|
||||
cataloguePrice: null,
|
||||
guidanceDiscount: null,
|
||||
vendorCode: null,
|
||||
|
|
@ -546,9 +586,20 @@ export default {
|
|||
this.exportLoading = false;
|
||||
});
|
||||
},
|
||||
/** 展示预装系统类型字典名称 */
|
||||
preSystemTypeName(value) {
|
||||
if (value === null || value === undefined || value === '') {
|
||||
return '';
|
||||
}
|
||||
const dicts = this.dict.type.pre_system_type || [];
|
||||
const opt = dicts.find(item => item.value === value);
|
||||
return opt ? opt.label : value;
|
||||
},
|
||||
handleTypeChange(type) {
|
||||
this.form.level2Type = null;
|
||||
this.level2TypeOptions = [];
|
||||
// 当产品类型不是硬件时,清空并隐藏预装系统类型
|
||||
this.form.preSystemType = null;
|
||||
// 当产品类型改变时,隐藏云终端配置部分
|
||||
this.level2TypeRelation = false;
|
||||
// 移除相关验证
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -53,6 +53,12 @@ public @interface Excel
|
|||
*/
|
||||
public int scale() default -1;
|
||||
|
||||
/**
|
||||
* BigDecimal 数值格式(Excel数字格式), 如: #,##0.00 (千分位+两位小数)
|
||||
* 仅影响单元格显示, 单元格存储值仍为数字, 可被Excel直接求和
|
||||
*/
|
||||
public String decimalFormat() default "";
|
||||
|
||||
/**
|
||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ public class ExcelUtil<T>
|
|||
*/
|
||||
private Map<String, CellStyle> styles;
|
||||
|
||||
/**
|
||||
* 金额格式样式缓存(按 decimalFormat 缓存,避免每个单元格新建样式触发 POI 64000 上限)
|
||||
*/
|
||||
private Map<String, CellStyle> moneyStyles = new HashMap<String, CellStyle>();
|
||||
|
||||
/**
|
||||
* 导入导出数据列表
|
||||
*/
|
||||
|
|
@ -1170,6 +1175,19 @@ public class ExcelUtil<T>
|
|||
else if (value instanceof BigDecimal && -1 != attr.scale())
|
||||
{
|
||||
cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).doubleValue());
|
||||
if (StringUtils.isNotEmpty(attr.decimalFormat()))
|
||||
{
|
||||
CellStyle moneyStyle = moneyStyles.get(attr.decimalFormat());
|
||||
if (moneyStyle == null)
|
||||
{
|
||||
CellStyle beforeStyle = cell.getCellStyle();
|
||||
moneyStyle = this.wb.createCellStyle();
|
||||
moneyStyle.cloneStyleFrom(beforeStyle);
|
||||
moneyStyle.setDataFormat(this.wb.getCreationHelper().createDataFormat().getFormat(attr.decimalFormat()));
|
||||
moneyStyles.put(attr.decimalFormat(), moneyStyle);
|
||||
}
|
||||
cell.setCellStyle(moneyStyle);
|
||||
}
|
||||
}
|
||||
else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,13 +59,13 @@ public class InventoryInfo extends BaseEntity
|
|||
private String warehouseName;
|
||||
|
||||
/** 入库价 */
|
||||
@Excel(name = "入库价")
|
||||
@Excel(name = "入库价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal innerPrice;
|
||||
private BigDecimal taxRate;
|
||||
/** 应付账单号 */
|
||||
private String payableBillCode;
|
||||
/** 出库价 */
|
||||
@Excel(name = "出库价")
|
||||
@Excel(name = "出库价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal outerPrice;
|
||||
private String productType;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,59 +43,59 @@ public class OmsFinanceCharge extends BaseEntity
|
|||
private Date financeChargeDate;
|
||||
|
||||
/** 收入-含税总价 */
|
||||
@Excel(name = "收入-含税总价")
|
||||
@Excel(name = "收入-含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal incomeWithTaxTotal;
|
||||
|
||||
/** 收入-未税总价 */
|
||||
@Excel(name = "收入-未税总价")
|
||||
@Excel(name = "收入-未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal incomeWithoutTaxTotal;
|
||||
|
||||
/** 成本-软件未税总价 */
|
||||
@Excel(name = "成本-软件未税总价")
|
||||
@Excel(name = "成本-软件未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costSoftwareWithoutTax;
|
||||
|
||||
/** 成本-软件含税总价 */
|
||||
@Excel(name = "成本-软件含税总价")
|
||||
@Excel(name = "成本-软件含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costSoftwareWithTax;
|
||||
|
||||
/** 成本-硬件未税总价 */
|
||||
@Excel(name = "成本-硬件未税总价")
|
||||
@Excel(name = "成本-硬件未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costHardwareWithoutTax;
|
||||
|
||||
/** 成本-硬件含税总价 */
|
||||
@Excel(name = "成本-硬件含税总价")
|
||||
@Excel(name = "成本-硬件含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costHardwareWithTax;
|
||||
|
||||
/** 成本-软件维保未税总价 */
|
||||
@Excel(name = "成本-软件维保未税总价")
|
||||
@Excel(name = "成本-软件维保未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costSoftwareMaintWithoutTax;
|
||||
|
||||
/** 成本-软件维保含税总价 */
|
||||
@Excel(name = "成本-软件维保含税总价")
|
||||
@Excel(name = "成本-软件维保含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costSoftwareMaintWithTax;
|
||||
|
||||
/** 成本-硬件维保未税总价 */
|
||||
@Excel(name = "成本-硬件维保未税总价")
|
||||
@Excel(name = "成本-硬件维保未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costHardwareMaintWithoutTax;
|
||||
|
||||
/** 成本-硬件维保含税总价 */
|
||||
@Excel(name = "成本-硬件维保含税总价")
|
||||
@Excel(name = "成本-硬件维保含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costHardwareMaintWithTax;
|
||||
|
||||
/** 成本-省代服务含税总价 */
|
||||
@Excel(name = "成本-省代服务含税总价")
|
||||
@Excel(name = "成本-省代服务含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costProvinceServiceWithTax;
|
||||
|
||||
/** 成本-省代服务未税总价 */
|
||||
@Excel(name = "成本-省代服务未税总价")
|
||||
@Excel(name = "成本-省代服务未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costProvinceServiceWithoutTax;
|
||||
|
||||
/** 成本-其它含税总价 */
|
||||
@Excel(name = "成本-其它含税总价")
|
||||
@Excel(name = "成本-其它含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costOtherWithTax;
|
||||
|
||||
/** 成本-其它未税总价 */
|
||||
@Excel(name = "成本-其它未税总价")
|
||||
@Excel(name = "成本-其它未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal costOtherWithoutTax;
|
||||
|
||||
/** 备注 */
|
||||
|
|
|
|||
|
|
@ -33,15 +33,15 @@ public class OmsFinanceOperateReport extends BaseEntity
|
|||
private String supplier;
|
||||
|
||||
/** 应收含税总价 */
|
||||
@Excel(name = "应收含税总价")
|
||||
@Excel(name = "应收含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivableWithTax;
|
||||
|
||||
/** 应收未税总价 */
|
||||
@Excel(name = "应收未税总价")
|
||||
@Excel(name = "应收未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivableWithoutTax;
|
||||
|
||||
/** 应收税额 */
|
||||
@Excel(name = "应收税额")
|
||||
@Excel(name = "应收税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivableTax;
|
||||
|
||||
/** 计收状态 */
|
||||
|
|
@ -75,39 +75,39 @@ public class OmsFinanceOperateReport extends BaseEntity
|
|||
private String receiptStatus;
|
||||
|
||||
/** 已收款含税金额 */
|
||||
@Excel(name = "已收款含税金额")
|
||||
@Excel(name = "已收款含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivedWithTax;
|
||||
|
||||
/** 已收款未税金额 */
|
||||
@Excel(name = "已收款未税金额")
|
||||
@Excel(name = "已收款未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivedWithoutTax;
|
||||
|
||||
/** 已收款税额 */
|
||||
@Excel(name = "已收款税额")
|
||||
@Excel(name = "已收款税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivedTax;
|
||||
|
||||
/** 收款中含税金额 */
|
||||
@Excel(name = "收款中含税金额")
|
||||
@Excel(name = "收款中含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivingWithTax;
|
||||
|
||||
/** 收款中未税金额 */
|
||||
@Excel(name = "收款中未税金额")
|
||||
@Excel(name = "收款中未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivingWithoutTax;
|
||||
|
||||
/** 收款中税额 */
|
||||
@Excel(name = "收款中税额")
|
||||
@Excel(name = "收款中税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivingTax;
|
||||
|
||||
/** 未收款含税金额 */
|
||||
@Excel(name = "未收款含税金额")
|
||||
@Excel(name = "未收款含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unreceivedWithTax;
|
||||
|
||||
/** 未收款未税金额 */
|
||||
@Excel(name = "未收款未税金额")
|
||||
@Excel(name = "未收款未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unreceivedWithoutTax;
|
||||
|
||||
/** 未收款税额 */
|
||||
@Excel(name = "未收款税额")
|
||||
@Excel(name = "未收款税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unreceivedTax;
|
||||
|
||||
/** 开票状态 */
|
||||
|
|
@ -115,51 +115,51 @@ public class OmsFinanceOperateReport extends BaseEntity
|
|||
private String invoiceStatus;
|
||||
|
||||
/** 已开票含税金额 */
|
||||
@Excel(name = "已开票含税金额")
|
||||
@Excel(name = "已开票含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicedWithTax;
|
||||
|
||||
/** 已开票未税金额 */
|
||||
@Excel(name = "已开票未税金额")
|
||||
@Excel(name = "已开票未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicedWithoutTax;
|
||||
|
||||
/** 已开票税额 */
|
||||
@Excel(name = "已开票税额")
|
||||
@Excel(name = "已开票税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicedTax;
|
||||
|
||||
/** 开票中含税金额 */
|
||||
@Excel(name = "开票中含税金额")
|
||||
@Excel(name = "开票中含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicingWithTax;
|
||||
|
||||
/** 开票中未税金额 */
|
||||
@Excel(name = "开票中未税金额")
|
||||
@Excel(name = "开票中未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicingWithoutTax;
|
||||
|
||||
/** 开票中税额 */
|
||||
@Excel(name = "开票中税额")
|
||||
@Excel(name = "开票中税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicingTax;
|
||||
|
||||
/** 未开票含税金额 */
|
||||
@Excel(name = "未开票含税金额")
|
||||
@Excel(name = "未开票含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal uninvoicedWithTax;
|
||||
|
||||
/** 未开票未税金额 */
|
||||
@Excel(name = "未开票未税金额")
|
||||
@Excel(name = "未开票未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal uninvoicedWithoutTax;
|
||||
|
||||
/** 未开票税额 */
|
||||
@Excel(name = "未开票税额")
|
||||
@Excel(name = "未开票税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal uninvoicedTax;
|
||||
|
||||
/** 应付含税总价 */
|
||||
@Excel(name = "应付含税总价")
|
||||
@Excel(name = "应付含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payableWithTax;
|
||||
|
||||
/** 应付未税总价 */
|
||||
@Excel(name = "应付未税总价")
|
||||
@Excel(name = "应付未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payableWithoutTax;
|
||||
|
||||
/** 应付税额 */
|
||||
@Excel(name = "应付税额")
|
||||
@Excel(name = "应付税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payableTax;
|
||||
|
||||
/** 付款状态 */
|
||||
|
|
@ -167,39 +167,39 @@ public class OmsFinanceOperateReport extends BaseEntity
|
|||
private String paymentStatus;
|
||||
|
||||
/** 已付款含税金额 */
|
||||
@Excel(name = "已付款含税金额")
|
||||
@Excel(name = "已付款含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal paidWithTax;
|
||||
|
||||
/** 已付款未税金额 */
|
||||
@Excel(name = "已付款未税金额")
|
||||
@Excel(name = "已付款未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal paidWithoutTax;
|
||||
|
||||
/** 已付款税额 */
|
||||
@Excel(name = "已付款税额")
|
||||
@Excel(name = "已付款税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal paidTax;
|
||||
|
||||
/** 付款中含税金额 */
|
||||
@Excel(name = "付款中含税金额")
|
||||
@Excel(name = "付款中含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payingWithTax;
|
||||
|
||||
/** 付款中未税金额 */
|
||||
@Excel(name = "付款中未税金额")
|
||||
@Excel(name = "付款中未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payingWithoutTax;
|
||||
|
||||
/** 付款中税额 */
|
||||
@Excel(name = "付款中税额")
|
||||
@Excel(name = "付款中税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal payingTax;
|
||||
|
||||
/** 未付款含税金额 */
|
||||
@Excel(name = "未付款含税金额")
|
||||
@Excel(name = "未付款含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unpaidWithTax;
|
||||
|
||||
/** 未付款未税金额 */
|
||||
@Excel(name = "未付款未税金额")
|
||||
@Excel(name = "未付款未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unpaidWithoutTax;
|
||||
|
||||
/** 未付款税额 */
|
||||
@Excel(name = "未付款税额")
|
||||
@Excel(name = "未付款税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unpaidTax;
|
||||
|
||||
/** 收票状态 */
|
||||
|
|
@ -207,39 +207,39 @@ public class OmsFinanceOperateReport extends BaseEntity
|
|||
private String ticketStatus;
|
||||
|
||||
/** 已收票含税金额 */
|
||||
@Excel(name = "已收票含税金额")
|
||||
@Excel(name = "已收票含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketedWithTax;
|
||||
|
||||
/** 已收票未税金额 */
|
||||
@Excel(name = "已收票未税金额")
|
||||
@Excel(name = "已收票未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketedWithoutTax;
|
||||
|
||||
/** 已收票税额 */
|
||||
@Excel(name = "已收票税额")
|
||||
@Excel(name = "已收票税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketedTax;
|
||||
|
||||
/** 收票中含税金额 */
|
||||
@Excel(name = "收票中含税金额")
|
||||
@Excel(name = "收票中含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketingWithTax;
|
||||
|
||||
/** 收票中未税金额 */
|
||||
@Excel(name = "收票中未税金额")
|
||||
@Excel(name = "收票中未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketingWithoutTax;
|
||||
|
||||
/** 收票中税额 */
|
||||
@Excel(name = "收票中税额")
|
||||
@Excel(name = "收票中税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal ticketingTax;
|
||||
|
||||
/** 未收票含税金额 */
|
||||
@Excel(name = "未收票含税金额")
|
||||
@Excel(name = "未收票含税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unticketedWithTax;
|
||||
|
||||
/** 未收票未税金额 */
|
||||
@Excel(name = "未收票未税金额")
|
||||
@Excel(name = "未收票未税金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unticketedWithoutTax;
|
||||
|
||||
/** 未收票税额 */
|
||||
@Excel(name = "未收票税额")
|
||||
@Excel(name = "未收票税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unticketedTax;
|
||||
|
||||
/** 数据快照日期 */
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ public class OmsInvoiceBill extends BaseEntity
|
|||
private String partnerName;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
@Excel(name = "含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
private BigDecimal invoicePriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
@Excel(name = "未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
private BigDecimal invoicePriceWithoutTax;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,15 +67,15 @@ public class OmsPayableBill extends BaseEntity
|
|||
private String productCode;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
@Excel(name = "含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
@Excel(name = "未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
@Excel(name = "税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal taxAmount;
|
||||
private BigDecimal taxRate;
|
||||
|
||||
|
|
@ -91,19 +91,19 @@ public class OmsPayableBill extends BaseEntity
|
|||
|
||||
private BigDecimal preResidueAmount;
|
||||
/** 已付款金额 */
|
||||
@Excel(name = "已付款金额")
|
||||
@Excel(name = "已付款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal paidPaymentAmount;
|
||||
|
||||
/** 未付款金额 */
|
||||
@Excel(name = "未付款金额")
|
||||
@Excel(name = "未付款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unpaidPaymentAmount;
|
||||
|
||||
/** 已收票金额 */
|
||||
@Excel(name = "已收票金额")
|
||||
@Excel(name = "已收票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivedTicketAmount;
|
||||
|
||||
/** 未收票金额 */
|
||||
@Excel(name = "未收票金额")
|
||||
@Excel(name = "未收票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unreceivedTicketAmount;
|
||||
|
||||
/** 计划付款日期 */
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ public class OmsPayableTicketWriteOff extends BaseEntity
|
|||
private String vendorName;
|
||||
|
||||
/** 本次核销总金额 */
|
||||
@Excel(name = "本次核销总金额")
|
||||
@Excel(name = "本次核销总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount ;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax ;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount ;
|
||||
|
||||
/** 核销时间 */
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ public class OmsPayableWriteOff extends BaseEntity
|
|||
private String vendorName;
|
||||
|
||||
/** 本次核销总金额 */
|
||||
@Excel(name = "本次核销总金额")
|
||||
@Excel(name = "本次核销总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 核销时间 */
|
||||
|
|
|
|||
|
|
@ -44,15 +44,15 @@ public class OmsPayableWriteOffDetail extends BaseEntity
|
|||
private String paymentBillCode;
|
||||
|
||||
/** 核销金额 */
|
||||
@Excel(name = "核销金额")
|
||||
@Excel(name = "核销金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 备注 */
|
||||
|
|
|
|||
|
|
@ -59,15 +59,15 @@ public class OmsPaymentBill extends BaseEntity
|
|||
private String orderCode;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
@Excel(name = "含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
@Excel(name = "未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
@Excel(name = "税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 税率 */
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public class OmsPurchaseOrder extends BaseEntity
|
|||
private String ownerName;
|
||||
|
||||
/** 含税总金额 */
|
||||
@Excel(name = "含税总金额")
|
||||
@Excel(name = "含税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/** 采购状态(0待入库 1部分入库 2已完成) */
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ public class OmsReceivableBill extends BaseEntity
|
|||
private String productCode;
|
||||
private BigDecimal remainingAmount;
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
@Excel(name = "含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
@Excel(name = "未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税率 */
|
||||
|
|
@ -69,15 +69,15 @@ public class OmsReceivableBill extends BaseEntity
|
|||
private BigDecimal taxRate;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
@Excel(name = "税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 已收款金额 */
|
||||
@Excel(name = "已收款金额")
|
||||
@Excel(name = "已收款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/** 未收款金额 */
|
||||
@Excel(name = "未收款金额")
|
||||
@Excel(name = "未收款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal unreceivedAmount;
|
||||
private BigDecimal planAmount;
|
||||
private BigDecimal planInvoiceAmount;
|
||||
|
|
@ -85,11 +85,11 @@ public class OmsReceivableBill extends BaseEntity
|
|||
private Date planInvoiceDate;
|
||||
|
||||
/** 已开票金额 */
|
||||
@Excel(name = "已开票金额")
|
||||
@Excel(name = "已开票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoicedAmount;
|
||||
|
||||
/** 未开票金额 */
|
||||
@Excel(name = "未开票金额")
|
||||
@Excel(name = "未开票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal uninvoicedAmount;
|
||||
private String projectName;
|
||||
private String projectCode;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class OmsReceivableInvoiceDetail extends BaseEntity
|
|||
private Date invoiceTime;
|
||||
|
||||
/** 开票金额 */
|
||||
@Excel(name = "开票金额")
|
||||
@Excel(name = "开票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal invoiceAmount;
|
||||
private BigDecimal invoiceAmountWithoutTax;
|
||||
private BigDecimal invoiceAmountTax;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class OmsReceivableInvoicePlan extends BaseEntity
|
|||
private Date planInvoiceDate;
|
||||
|
||||
/** 计划开票金额 */
|
||||
@Excel(name = "计划开票金额")
|
||||
@Excel(name = "计划开票金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal planAmount;
|
||||
|
||||
/** 计划开票比例 */
|
||||
|
|
|
|||
|
|
@ -43,15 +43,15 @@ public class OmsReceivableInvoiceWriteOff extends BaseEntity
|
|||
private String partnerName;
|
||||
|
||||
/** 本次核销总金额 */
|
||||
@Excel(name = "本次核销总金额")
|
||||
@Excel(name = "本次核销总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount;
|
||||
|
||||
/** 核销时间 */
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class OmsReceivableReceiptDetail extends BaseEntity
|
|||
private Date receiptTime;
|
||||
|
||||
/** 收款金额 */
|
||||
@Excel(name = "收款金额")
|
||||
@Excel(name = "收款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal receiptAmount;
|
||||
|
||||
/** 收款比例 */
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class OmsReceivableReceiptPlan extends BaseEntity
|
|||
private Date planReceiptDate;
|
||||
|
||||
/** 计划收款金额 */
|
||||
@Excel(name = "计划收款金额")
|
||||
@Excel(name = "计划收款金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal planAmount;
|
||||
|
||||
/** 计划收款比例 */
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ public class OmsReceivableWriteOff extends BaseEntity
|
|||
private String partnerName;
|
||||
|
||||
/** 本次核销总金额 */
|
||||
@Excel(name = "本次核销总金额")
|
||||
@Excel(name = "本次核销总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount ;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount;
|
||||
|
||||
/** 核销时间 */
|
||||
|
|
|
|||
|
|
@ -44,15 +44,15 @@ public class OmsReceivableWriteOffDetail extends BaseEntity
|
|||
private String receiptBillCode;
|
||||
|
||||
/** 核销金额 */
|
||||
@Excel(name = "核销金额")
|
||||
@Excel(name = "核销金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销未税总金额 */
|
||||
@Excel(name = "本次核销未税总金额")
|
||||
@Excel(name = "本次核销未税总金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffAmountWithoutTax = BigDecimal.ZERO;
|
||||
|
||||
/** 本次核销税额 */
|
||||
@Excel(name = "本次核销税额")
|
||||
@Excel(name = "本次核销税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal writeOffTaxAmount = BigDecimal.ZERO;
|
||||
|
||||
/** 备注 */
|
||||
|
|
|
|||
|
|
@ -57,17 +57,17 @@ public class OmsTicketBill extends BaseEntity
|
|||
private String vendorName;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
@Excel(name = "含税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
private BigDecimal ticketPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
@Excel(name = "未税总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
private BigDecimal ticketPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
@Excel(name = "税额", scale = 2, decimalFormat = "#,##0.00")
|
||||
@Getter(value= AccessLevel.NONE)
|
||||
private BigDecimal taxAmount;
|
||||
@Getter(value= AccessLevel.NONE)
|
||||
|
|
|
|||
|
|
@ -1,71 +1,71 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 合同清单对象 order_list
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class OrderList extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键,自增 */
|
||||
private Long id;
|
||||
|
||||
/** 关联合同ID */
|
||||
// @Excel(name = "关联合同ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 产品编码,关联产品编码表 */
|
||||
@Excel(name = "产品编码")
|
||||
private String productCode;
|
||||
|
||||
// @Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "目录单价(RMB)")
|
||||
private BigDecimal price;
|
||||
/** 优惠 */
|
||||
@Excel(name = "折扣")
|
||||
private BigDecimal discount;
|
||||
/** 总价 */
|
||||
@Excel(name = "目录总价(RMB)")
|
||||
private BigDecimal amount;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间,软删除 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deletedAt;
|
||||
|
||||
private ProductInfo productInfo;
|
||||
}
|
||||
package com.ruoyi.sip.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 合同清单对象 order_list
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class OrderList extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键,自增 */
|
||||
private Long id;
|
||||
|
||||
/** 关联合同ID */
|
||||
// @Excel(name = "关联合同ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 产品编码,关联产品编码表 */
|
||||
@Excel(name = "产品编码")
|
||||
private String productCode;
|
||||
|
||||
// @Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "目录单价(RMB)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal price;
|
||||
/** 优惠 */
|
||||
@Excel(name = "折扣")
|
||||
private BigDecimal discount;
|
||||
/** 总价 */
|
||||
@Excel(name = "目录总价(RMB)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal amount;
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间,软删除 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deletedAt;
|
||||
|
||||
private ProductInfo productInfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ public class ProductInfo extends BaseEntity
|
|||
private String cpuBrand;
|
||||
@Excel(name = "CPU架构", sort = 22)
|
||||
private String cpuArchitecture;
|
||||
@Excel(name = "预装系统类型", sort = 23)
|
||||
private String preSystemType;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updatedAt;
|
||||
|
|
@ -82,7 +84,7 @@ public class ProductInfo extends BaseEntity
|
|||
@Excel(name = "在库现存", sort = 5)
|
||||
private Long inventoryNum;
|
||||
/** 入库总价 */
|
||||
@Excel(name = "入库总价", sort = 6)
|
||||
@Excel(name = "入库总价", sort = 6, scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal sumInnerPrice;
|
||||
/** 累计发货 */
|
||||
private Long outerNum;
|
||||
|
|
@ -90,7 +92,7 @@ public class ProductInfo extends BaseEntity
|
|||
@Excel(name = "在途库存", sort = 7)
|
||||
private Long purchaseNum;
|
||||
/** 采购总价 */
|
||||
@Excel(name = "采购总价", sort = 8)
|
||||
@Excel(name = "采购总价", sort = 8, scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal sumPurchasePrice;
|
||||
/** 锁单量 */
|
||||
@Excel(name = "锁单量", sort = 10)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class ProjectInfo extends BaseEntity
|
|||
@Excel(name = "代理商TEL")
|
||||
private String contactWay;
|
||||
/** 预计金额 */
|
||||
@Excel(name = "预计金额(元)")
|
||||
@Excel(name = "预计金额(元)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal estimatedAmount;
|
||||
/** 属地 */
|
||||
// @Excel(name = "属地")
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class ProjectOrderConfigInfo extends BaseEntity
|
|||
private Long quantity;
|
||||
|
||||
/** 目录单价 */
|
||||
@Excel(name = "目录单价(¥)")
|
||||
@Excel(name = "目录单价(¥)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal cataloguePrice;
|
||||
/** 指导折扣 */
|
||||
@Excel(name = "指导折扣")
|
||||
|
|
@ -58,13 +58,13 @@ public class ProjectOrderConfigInfo extends BaseEntity
|
|||
private BigDecimal discount;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价(¥)")
|
||||
@Excel(name = "单价(¥)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal price;
|
||||
/** 总价 */
|
||||
@Excel(name = "总价(¥)")
|
||||
@Excel(name = "总价(¥)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal allPrice;
|
||||
/** 目录总价 */
|
||||
@Excel(name = "目录总价(¥)")
|
||||
@Excel(name = "目录总价(¥)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal catalogueAllPrice;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class ProjectOrderInfo extends BaseEntity {
|
|||
/**
|
||||
* 出货金额
|
||||
*/
|
||||
@Excel(name = "金额")
|
||||
@Excel(name = "金额", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal shipmentAmount;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name="下单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class ProjectProductInfo extends BaseEntity
|
|||
private BigDecimal price;
|
||||
|
||||
/** 总价 */
|
||||
@Excel(name = "总价")
|
||||
@Excel(name = "总价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal allPrice;
|
||||
private BigDecimal allPriceDisCount;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,6 @@ public class InventoryInfoExcelDto {
|
|||
private String productDesc;
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseName;
|
||||
@Excel(name = "入库价")
|
||||
@Excel(name = "入库价", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal innerPrice;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class WarehouseInnerExcelDto {
|
|||
private String licenseKey;
|
||||
@Excel(name="产品编码")
|
||||
private String productCode;
|
||||
@Excel(name="入库价(含税)")
|
||||
@Excel(name="入库价(含税)", scale = 2, decimalFormat = "#,##0.00")
|
||||
private BigDecimal innerPrice;
|
||||
@Excel(name="仓库")
|
||||
private String warehouseName;
|
||||
|
|
|
|||
|
|
@ -166,10 +166,13 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
}
|
||||
omsInventoryInner.setWarehouseId(warehouseIdList.get(0));
|
||||
|
||||
OmsPurchaseOrderItem purchaseOrderItem = null;
|
||||
//无采购单时无法跟踪入库完成度,默认已完成(每次入库即生成应付单,与原行为一致)
|
||||
boolean innerComplete = true;
|
||||
if (omsInventoryInner.getItemId() != null) {
|
||||
List<OmsPurchaseOrderItem> purchaseOrderItems = purchaseOrderService.listByItemId(omsInventoryInner.getItemId());
|
||||
if (CollUtil.isNotEmpty(purchaseOrderItems)) {
|
||||
OmsPurchaseOrderItem purchaseOrderItem = purchaseOrderItems.stream()
|
||||
purchaseOrderItem = purchaseOrderItems.stream()
|
||||
.filter(item -> item.getId().equals(omsInventoryInner.getItemId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
|
@ -183,7 +186,8 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
if (currentInnerQuantity > remainingQuantity) {
|
||||
throw new ServiceException(StrUtil.format("入库数量[{}]超过采购单剩余可入库数量[{}]", currentInnerQuantity, remainingQuantity));
|
||||
}
|
||||
|
||||
innerComplete = (alreadyInnerQuantity + currentInnerQuantity) >= purchaseQuantity;
|
||||
|
||||
BigDecimal purchasePrice = purchaseOrderItem.getPrice();
|
||||
if (purchasePrice != null) {
|
||||
for (InventoryInfo inventoryInfo : inventoryInfoList) {
|
||||
|
|
@ -198,12 +202,27 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
|
||||
OmsPayableBill payableBill = new OmsPayableBill();
|
||||
VendorInfo vendorInfo = vendorInfoService.selectVendorInfoByVendorCode(vendorCode);
|
||||
if ((vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType())) || !Arrays.asList("1", "2").contains(omsInventoryInner.getProductType())) {
|
||||
boolean innerPay = vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType());
|
||||
boolean notStandard = !Arrays.asList("1", "2").contains(omsInventoryInner.getProductType());
|
||||
boolean isH3c = isH3C(productInfos.get(0).getVendorName());
|
||||
//生成应付单:新华三直接生成;非新华三需入库完成后才生成
|
||||
if ((innerPay || notStandard) && (isH3c || innerComplete)) {
|
||||
BigDecimal reduce = inventoryInfoList.stream().map(InventoryInfo::getInnerPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
//服务金额为单价* 数量 没有具体的详情
|
||||
BigDecimal totalPriceWithTax = Arrays.asList("3", "22").contains(omsInventoryInner.getProductType()) ?
|
||||
reduce.multiply(new BigDecimal(omsInventoryInner.getQuantity())).setScale(2, RoundingMode.HALF_UP)
|
||||
: reduce;
|
||||
BigDecimal totalPriceWithTax;
|
||||
//非新华三且有完整采购单信息时,按整条采购单数量*单价生成
|
||||
boolean usePurchaseOrder = !isH3c && purchaseOrderItem != null
|
||||
&& purchaseOrderItem.getQuantity() != null
|
||||
&& purchaseOrderItem.getPrice() != null;
|
||||
if (usePurchaseOrder) {
|
||||
totalPriceWithTax = purchaseOrderItem.getQuantity()
|
||||
.multiply(purchaseOrderItem.getPrice())
|
||||
.setScale(2, RoundingMode.HALF_UP);
|
||||
} else {
|
||||
//新华三或无采购单信息:服务金额为单价*数量(无具体详情)
|
||||
totalPriceWithTax = Arrays.asList("3", "22").contains(omsInventoryInner.getProductType()) ?
|
||||
reduce.multiply(new BigDecimal(omsInventoryInner.getQuantity())).setScale(2, RoundingMode.HALF_UP)
|
||||
: reduce;
|
||||
}
|
||||
//生成应付单
|
||||
payableBill.setInventoryCode(omsInventoryInner.getInnerCode());
|
||||
payableBill.setVendorCode(omsInventoryInner.getVendorCode());
|
||||
|
|
@ -224,12 +243,16 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
|
||||
}
|
||||
BigDecimal finalTaxRate = taxRate == null ? new BigDecimal(defaultTax) : taxRate;
|
||||
BigDecimal withoutTax = inventoryInfoList.stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getInnerPrice().divide(BigDecimal.ONE.add(finalTaxRate), 2, RoundingMode.HALF_UP)), BigDecimal::add);
|
||||
BigDecimal withoutTax;
|
||||
if (usePurchaseOrder) {
|
||||
withoutTax = totalPriceWithTax.divide(BigDecimal.ONE.add(finalTaxRate), 2, RoundingMode.HALF_UP);
|
||||
} else {
|
||||
withoutTax = inventoryInfoList.stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getInnerPrice().divide(BigDecimal.ONE.add(finalTaxRate), 2, RoundingMode.HALF_UP)), BigDecimal::add);
|
||||
}
|
||||
payableBill.setTotalPriceWithoutTax(withoutTax);
|
||||
payableBill.setTaxRate(finalTaxRate);
|
||||
payableBill.setTaxAmount(totalPriceWithTax);
|
||||
payableBill.setTaxAmount(totalPriceWithTax.subtract(payableBill.getTotalPriceWithoutTax()));
|
||||
payableBillService.insertOmsPayableBill(payableBill, vendorInfo.getPayConfigDay());
|
||||
payableBillService.insertOmsPayableBill(payableBill, vendorInfo != null && vendorInfo.getPayConfigDay() != null ? vendorInfo.getPayConfigDay() : 0);
|
||||
}
|
||||
inventoryInfoList.forEach(item->{
|
||||
item.setInnerCode(omsInventoryInner.getInnerCode());
|
||||
|
|
@ -256,6 +279,16 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
return code.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断制造商是否为新华三
|
||||
*
|
||||
* @param vendorName 制造商名称
|
||||
* @return 是新华三返回 true
|
||||
*/
|
||||
private boolean isH3C(String vendorName) {
|
||||
return StringUtils.isNotEmpty(vendorName) && vendorName.startsWith("新华三");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateBatch">
|
||||
<foreach item="item" collection="list">
|
||||
<foreach item="item" collection="list" separator=";">
|
||||
update oms_payable_ticket_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="item.writeOffId != null">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<result property="terminalType" column="terminal_type" />
|
||||
<result property="localization" column="localization" />
|
||||
<result property="cpuBrand" column="cpu_brand" />
|
||||
<result property="cpuArchitecture" column="cpu_architecture" />
|
||||
<result property="cpuArchitecture" column="cpu_architecture" />
|
||||
<result property="preSystemType" column="pre_system_type" />
|
||||
<result property="inventoryNum" column="inventory_num" />
|
||||
<result property="outerNum" column="outer_num" />
|
||||
<result property="purchaseNum" column="purchase_num" />
|
||||
|
|
@ -32,7 +33,7 @@
|
|||
<sql id="selectProductInfoVo">
|
||||
select t1.id, t1.product_code, t1.product_name, t1.model, t1.description, t1.remark, t1.created_at, t1.updated_at,
|
||||
t1.deleted_at,t1.value,t1.type,t1.hz_code,t1.catalogue_price,t1.guidance_discount,t1.vendor_code,t1.available_count,t1.cumulative_count,
|
||||
t1.level2_type, t1.terminal_type, t1.localization, t1.cpu_brand, t1.cpu_architecture
|
||||
t1.level2_type, t1.terminal_type, t1.localization, t1.cpu_brand, t1.cpu_architecture, t1.pre_system_type
|
||||
,t2.vendor_name
|
||||
from product_info t1 left join oms_vendor_info t2 on t1.vendor_code = t2.vendor_code
|
||||
</sql>
|
||||
|
|
@ -52,6 +53,7 @@
|
|||
<if test="type != null and type != ''"> and find_in_set(t1.type , #{type})</if>
|
||||
<if test="vendorName != null and vendorName != ''"> and t2.vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||
<if test="vendorCode != null and vendorCode != ''"> and t1.vendor_code = #{vendorCode}</if>
|
||||
<if test="preSystemType != null and preSystemType != ''"> and t1.pre_system_type = #{preSystemType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -205,6 +207,7 @@
|
|||
<if test="localization != null and localization != ''">localization,</if>
|
||||
<if test="cpuBrand != null and cpuBrand != ''">cpu_brand,</if>
|
||||
<if test="cpuArchitecture != null and cpuArchitecture != ''">cpu_architecture,</if>
|
||||
<if test="preSystemType != null and preSystemType != ''">pre_system_type,</if>
|
||||
created_at,status,create_by
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -224,6 +227,7 @@
|
|||
<if test="localization != null and localization != ''">#{localization},</if>
|
||||
<if test="cpuBrand != null and cpuBrand != ''">#{cpuBrand},</if>
|
||||
<if test="cpuArchitecture != null and cpuArchitecture != ''">#{cpuArchitecture},</if>
|
||||
<if test="preSystemType != null and preSystemType != ''">#{preSystemType},</if>
|
||||
NOW(),0,#{createBy}
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
@ -247,6 +251,7 @@
|
|||
<if test="localization != null and localization != ''">localization = #{localization},</if>
|
||||
<if test="cpuBrand != null and cpuBrand != ''">cpu_brand = #{cpuBrand},</if>
|
||||
<if test="cpuArchitecture != null and cpuArchitecture != ''">cpu_architecture = #{cpuArchitecture},</if>
|
||||
<if test="preSystemType != null and preSystemType != ''">pre_system_type = #{preSystemType},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
updated_at = NOW(),update_by=#{updateBy}
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
-- =============================================================
|
||||
-- 2029-09-04 产品管理新增「预装系统类型」字段升级脚本
|
||||
-- 功能说明:
|
||||
-- 1. product_info 表新增 pre_system_type 字段
|
||||
-- 2. 新增「预装系统类型」字典类型(pre_system_type)
|
||||
-- 注意:字典具体选项请在【系统管理-字典管理】中手工维护
|
||||
-- =============================================================
|
||||
|
||||
-- 1. 产品表新增「预装系统类型」字段(仅硬件产品填写,非必填,可为空)
|
||||
ALTER TABLE `product_info`
|
||||
ADD COLUMN `pre_system_type` varchar(100) DEFAULT NULL COMMENT '预装系统类型' AFTER `cpu_architecture`;
|
||||
Loading…
Reference in New Issue