diff --git a/oms_web/oms_vue/src/api/finance/invoice.js b/oms_web/oms_vue/src/api/finance/invoice.js
new file mode 100644
index 00000000..9fb039df
--- /dev/null
+++ b/oms_web/oms_vue/src/api/finance/invoice.js
@@ -0,0 +1,84 @@
+import request from '@/utils/request'
+import {tansParams} from "@/utils/ruoyi"
+
+// 查询销售收票单列表
+export function listInvoice(query) {
+ return request({
+ url: '/finance/invoice/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询销售收票单详细
+export function getInvoice(id) {
+ return request({
+ url: '/finance/invoice/' + id,
+ method: 'get'
+ })
+}
+
+// 查询销售收票单附件
+export function getInvoiceAttachments(id, params) {
+ return request({
+ url: `/finance/invoice/attachment/${id}`,
+ method: 'get',
+ params
+ })
+}
+
+// 上传销售收票单附件
+export function uploadInvoiceAttachment(data) {
+ return request({
+ url: '/finance/invoice/uploadReceipt',
+ method: 'post',
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ },
+ data: data,
+ needLoading: true
+ });
+}
+
+// 申请红冲
+export function redRush(id) {
+ return request({
+ url: '/finance/invoice/applyRefund/' + id,
+ method: 'get'
+ })
+}
+
+// 退回销售收票单
+export function returnInvoice(id) {
+ return request({
+ url: '/finance/invoice/return/' + id,
+ method: 'delete'
+ })
+}
+
+// 新增销售收票单
+export function addInvoice(data) {
+ return request({
+ url: '/finance/receivable/mergeAndInitiateInvoice',
+ method: 'post',
+ data: data,
+ needLoading: true
+ })
+}
+
+// 查询销售收票单产品明细
+export function getInvoiceProducts(code) {
+ return request({
+ url: '/finance/invoice/product/' + code,
+ method: 'get'
+ })
+}
+
+// 申请开票
+export function applyInvoice(data) {
+ return request({
+ url: '/finance/invoice/apply',
+ method: 'post',
+ data: data
+ })
+}
diff --git a/oms_web/oms_vue/src/views/finance/invoice/components/ApplyInvoice.vue b/oms_web/oms_vue/src/views/finance/invoice/components/ApplyInvoice.vue
new file mode 100644
index 00000000..245a5a30
--- /dev/null
+++ b/oms_web/oms_vue/src/views/finance/invoice/components/ApplyInvoice.vue
@@ -0,0 +1,681 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 购买方
信息
+
+
+
+
+
+ 统一社会信用代码/
纳税人识别号
+
+
+
+
+
+
+
+ 销售方
信息
+
+
+
+
+
+ 统一社会信用代码/
纳税人识别号
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.amount }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.taxAmount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
价税合计 (大写)
+
+ ⊗ {{ totalAmountChinese }}
+
+
(小写)
+
+ ¥{{ totalAmountNumber }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/oms_web/oms_vue/src/views/finance/invoice/components/DetailDrawer.vue b/oms_web/oms_vue/src/views/finance/invoice/components/DetailDrawer.vue
index 687ea62e..cfbcd1da 100644
--- a/oms_web/oms_vue/src/views/finance/invoice/components/DetailDrawer.vue
+++ b/oms_web/oms_vue/src/views/finance/invoice/components/DetailDrawer.vue
@@ -8,52 +8,114 @@
>
-
销售-收票单
+
销售-开票单
- 销售-收票单编号: {{ detail.invoiceBillCode }}
+ 销售-开票单编号: {{ detail.invoiceBillCode }}
-
- 客户开票时间: {{ detail.customerInvoiceTime }}
+
+ 销售-生成时间: {{ detail.createTime }}
+
+
+ 进货商名称: {{ detail.partnerName }}
- 客户名称: {{ detail.customerName }}
+ 含税总价(元): {{ detail.totalPriceWithTax }}
- 含税总价: {{ detail.invoicePriceWithTax }}
+ 未税总价(元): {{ detail.totalPriceWithoutTax }}
- 未税总价: {{ detail.invoicePriceWithoutTax }}
+ 税额(元): {{ $calc.sub(detail.totalPriceWithTax,detail.totalPriceWithoutTax) }}
- 税额: {{ detail.taxAmount }}
+ 发票含税总价(元): {{ detail.invoicePriceWithTax }}
- 收票状态:
-
-
+ 发票未税总价(元): {{ detail.invoicePriceWithoutTax }}
- 备注: {{ detail.remark }}
+ 发票税额(元): {{ $calc.sub(detail.invoicePriceWithTax,detail.invoicePriceWithoutTax) }}
+
+
+
+
+ 票据类型:
+
+
+
+
+ 发票/红冲:
+ {{detail.totalPriceWithTax<0?'红冲票据':'正常票据'}}
+
+
+
+
+
+ 购买方信息_名称: {{ detail.buyerName }}
+
+
+ 购买方信息_统一社会信用代码/纳税人识别号: {{ detail.buyerCreditCode }}
+
+
+
+
+
+ 购买方信息_购方开户银行: {{ detail.buyerBank }}
+
+
+ 购买方信息_银行账号: {{ detail.buyerBankAccount }}
+
+
+
+
+
+ 销售方信息_名称: {{ detail.sellerName }}
+
+
+ 销售方信息_统一社会信用代码/纳税人识别号: {{ detail.sellerCreditCode }}
+
+
+
+
+
+ 销售方信息_销方开户银行: {{ detail.sellerBank }}
+
+
+ 销售方信息_银行账号: {{ detail.sellerBankAccount }}
+
+
+
+
+
+ 备注: {{ detail.remark }}
+
+
+ 上传人姓名: {{ detail.createByName }}
+
+
+ 开票状态:
+
+
- 审批节点: {{ detail.approveNode|| '-' }}
+ 审批节点: {{ detail.approveNode }}
审批状态:
-
-
+
- 审批通过时间: {{ detail.approveTime || '-'}}
+ 审批通过时间 :{{detail.approveTime}}
+
@@ -88,7 +150,7 @@ export default {
default: () => null,
},
},
- dicts:['invoice_bill_type','approve_status','invoice_status'],
+ dicts:['finance_invoice_type','approve_status','invoice_bill_status'],
methods: {
handleClose() {
this.$emit("update:visible", false);
diff --git a/oms_web/oms_vue/src/views/finance/invoice/index.vue b/oms_web/oms_vue/src/views/finance/invoice/index.vue
index 718f6396..7ba34260 100644
--- a/oms_web/oms_vue/src/views/finance/invoice/index.vue
+++ b/oms_web/oms_vue/src/views/finance/invoice/index.vue
@@ -121,33 +121,44 @@
-
-
+
+
- {{ parseTime(scope.row.customerInvoiceTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+ {{ parseTime(scope.row.invoiceTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
-
-
-
-
+
+
+
+
-
+ {{ $calc.sub(scope.row.totalPriceWithTax, scope.row.totalPriceWithoutTax) }}
-
+
+
+
+ {{ $calc.sub(scope.row.totalPriceWithTax, scope.row.invoicePriceWithoutTax) }}
+
+
+
+
+
+
+
+
-
+
+
{{ parseTime(scope.row.approveTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
-
+
+
发票
+ 申请开票
+
+
@@ -203,15 +222,17 @@ import { addDateRange } from "@/utils/ruoyi";
import DetailDrawer from "./components/DetailDrawer.vue";
import AddForm from "./components/AddForm.vue";
import InvoiceDialog from "./components/InvoiceDialog.vue";
+import ApplyInvoice from "./components/ApplyInvoice.vue";
export default {
name: "Invoice",
components: {
DetailDrawer,
AddForm,
- InvoiceDialog
+ InvoiceDialog,
+ ApplyInvoice
},
- dicts:['invoice_bill_type','approve_status','invoice_status'],
+ dicts:['invoice_bill_type','approve_status','invoice_bill_status'],
data() {
return {
// 遮罩层
@@ -245,6 +266,8 @@ export default {
detailData: null,
// 新增弹窗
addOpen: false,
+ // 申请开票弹窗
+ applyOpen: false,
// 收票附件弹窗
receiptOpen: false,
currentRow: {}
@@ -309,6 +332,11 @@ export default {
this.currentRow = row;
this.receiptOpen = true;
},
+ /** 申请开票按钮操作 */
+ handleApplyInvoice(row) {
+ this.currentRow = row;
+ this.applyOpen = true;
+ },
/** 红冲按钮操作 */
handleRedRush(row) {
this.$modal.confirm('是否确认收票单编号为"' + row.invoiceBillCode + '"的数据项进行红冲,并提交财务审批?').then(function() {
diff --git a/oms_web/oms_vue/vue.config.js b/oms_web/oms_vue/vue.config.js
index 5d29444a..a87f08b0 100644
--- a/oms_web/oms_vue/vue.config.js
+++ b/oms_web/oms_vue/vue.config.js
@@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || 'UNISSENSE-OMS' // 网页标题
-const baseUrl = 'http://localhost:28081' // 后端接口
+const baseUrl = 'http://localhost:28080' // 后端接口
const port = process.env.port || process.env.npm_config_port || 80 // 端口
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/OmsInvoiceBillController.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/OmsInvoiceBillController.java
index 0afdf6c1..b052d81d 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/OmsInvoiceBillController.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/OmsInvoiceBillController.java
@@ -104,6 +104,12 @@ public class OmsInvoiceBillController extends BaseController
{
return AjaxResult.success(omsInvoiceBillService.selectOmsInvoiceBillById(id));
}
+ @RequiresPermissions("sip:invoiceBill:query")
+ @PostMapping(value = "/apply")
+ public AjaxResult getInfo(@RequestBody OmsInvoiceBill omsInvoiceBill)
+ {
+ return omsInvoiceBillService.applyInvoice(omsInvoiceBill);
+ }
/**
* 新增销售开票单
@@ -200,4 +206,10 @@ public class OmsInvoiceBillController extends BaseController
return AjaxResult.error("操作失败:" + e.getMessage());
}
}
+
+ @GetMapping("/product/{code}")
+ @ResponseBody
+ public AjaxResult listProduct(@PathVariable("code") String code) {
+ return AjaxResult.success(omsInvoiceBillService.listProduct(code));
+ }
}
\ No newline at end of file
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryOuter.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryOuter.java
index 6cdff1e2..5f6d377e 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryOuter.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryOuter.java
@@ -44,6 +44,7 @@ public class InventoryOuter extends BaseEntity
private String orderId;
@Excel(name = "项目名称")
private String projectName;
+ private Long projectId;
/** 产品BOM编码 */
@Excel(name = "产品编码")
private String productCode;
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OmsInvoiceBill.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OmsInvoiceBill.java
index b2495c05..03132588 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OmsInvoiceBill.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OmsInvoiceBill.java
@@ -108,6 +108,14 @@ public class OmsInvoiceBill extends BaseEntity
private String todoId;
private String taskId;
+ private String buyerName;
+ private String buyerCreditCode;
+ private String buyerBank;
+ private String buyerBankAccount;
+ private String sellerName;
+ private String sellerCreditCode;
+ private String sellerBank;
+ private String sellerBankAccount;
public BigDecimal getTaxAmount() {
if (null != totalPriceWithTax && null != totalPriceWithoutTax){
return totalPriceWithTax.subtract(totalPriceWithoutTax);
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/dto/InvoiceProductDto.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/dto/InvoiceProductDto.java
new file mode 100644
index 00000000..6816182a
--- /dev/null
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/dto/InvoiceProductDto.java
@@ -0,0 +1,35 @@
+package com.ruoyi.sip.domain.dto;
+
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author : ch
+ * @version : 1.0
+ * @ClassName : InvoiceProductDto
+ * @Description :
+ * @DATE : Created in 19:45 2025/12/22
+ *