zhouhui.jiang

update 订单、出库、发票

Showing 25 changed files with 62 additions and 21 deletions
......@@ -141,3 +141,4 @@ public class DeliveryMainController {
}
}
......
......@@ -87,7 +87,7 @@ public class InvoiceMainController {
@Operation(summary = "删除发票", description = "根据发票ID逻辑删除发票")
@DeleteMapping("/{invoiceId}")
@PreAuthorize("hasAuthority('invoice:delete')")
@PreAuthorize("hasAuthority('invoice:remove')")
public ApiRes<Void> deleteInvoice(
@Parameter(description = "发票ID", required = true) @PathVariable Long invoiceId) {
try {
......@@ -141,3 +141,4 @@ public class InvoiceMainController {
}
}
......
......@@ -61,3 +61,4 @@ public class DeliveryAddReq {
private List<DeliveryItemAddReq> deliveryItems;
}
......
......@@ -37,3 +37,4 @@ public class DeliveryItemAddReq {
private BigDecimal deliveryAmount;
}
......
......@@ -59,3 +59,4 @@ public class DeliveryItemRes {
private LocalDateTime updateTime;
}
......
......@@ -40,3 +40,4 @@ public class DeliveryItemUpdateReq {
private BigDecimal deliveryAmount;
}
......
......@@ -67,3 +67,4 @@ public class DeliveryRes {
private List<DeliveryItemRes> deliveryItems;
}
......
......@@ -65,3 +65,4 @@ public class DeliveryUpdateReq {
private List<DeliveryItemUpdateReq> deliveryItems;
}
......
......@@ -42,3 +42,4 @@ public class InvoiceItemAddReq {
private BigDecimal taxAmount;
}
......
......@@ -62,3 +62,4 @@ public class InvoiceItemRes {
private LocalDateTime updateTime;
}
......
......@@ -45,3 +45,4 @@ public class InvoiceItemUpdateReq {
private BigDecimal taxAmount;
}
......
......@@ -55,3 +55,4 @@ public class InvoiceQueryReq {
private Integer pageSize = 10;
}
......
......@@ -66,3 +66,4 @@ public class DeliveryItem {
private String delFlag;
}
......
......@@ -72,3 +72,4 @@ public class InvoiceItem {
private String delFlag;
}
......
......@@ -81,3 +81,4 @@ public class InvoiceMain {
private String delFlag;
}
......
......@@ -14,3 +14,4 @@ import org.apache.ibatis.annotations.Mapper;
public interface DeliveryItemMapper extends BaseMapper<DeliveryItem> {
}
......
......@@ -14,3 +14,4 @@ import org.apache.ibatis.annotations.Mapper;
public interface DeliveryMainMapper extends BaseMapper<DeliveryMain> {
}
......
......@@ -14,3 +14,4 @@ import org.apache.ibatis.annotations.Mapper;
public interface InvoiceItemMapper extends BaseMapper<InvoiceItem> {
}
......
......@@ -14,3 +14,4 @@ import org.apache.ibatis.annotations.Mapper;
public interface InvoiceMainMapper extends BaseMapper<InvoiceMain> {
}
......
......@@ -69,3 +69,4 @@ public interface DeliveryMainService extends IService<DeliveryMain> {
boolean updateDeliveryStatus(Long deliveryId, Integer deliveryStatus);
}
......
......@@ -69,3 +69,4 @@ public interface InvoiceMainService extends IService<InvoiceMain> {
boolean updateInvoiceStatus(Long invoiceId, Integer invoiceStatus);
}
......
......@@ -229,3 +229,4 @@ public class DeliveryMainServiceImpl extends ServiceImpl<DeliveryMainMapper, Del
}
}
......
......@@ -112,6 +112,7 @@ public class InvoiceMainServiceImpl extends ServiceImpl<InvoiceMainMapper, Invoi
InvoiceMain invoiceMain = new InvoiceMain();
BeanUtils.copyProperties(addReq, invoiceMain);
invoiceMain.setUpdateTime(LocalDateTime.now());
invoiceMain.setCreateTime(LocalDateTime.now());
invoiceMain.setUpdateTime(LocalDateTime.now());
invoiceMain.setDelFlag("0");
......
......@@ -63,7 +63,7 @@
<!-- 操作按钮区域 -->
<div class="action-section">
<div class="action-buttons">
<button @click="handleAdd" class="action-btn primary">➕ 新增出库</button>
<button @click="handleAdd" class="action-btn primary">✨ 新增</button>
<button @click="handleExport" class="action-btn secondary">📋 导出</button>
</div>
</div>
......@@ -175,10 +175,18 @@
<div class="dialog-body">
<div v-if="orderDetail" class="detail-content">
<div class="detail-section">
<h4>订单基本信息</h4>
<h4>出库基本信息</h4>
<div class="detail-grid">
<div class="detail-item">
<label>订单编号:</label>
<label>出库单ID:</label>
<span>{{ orderDetail.deliveryId }}</span>
</div>
<div class="detail-item">
<label>出库单编号:</label>
<span>{{ orderDetail.deliveryNo }}</span>
</div>
<div class="detail-item">
<label>关联订单编号:</label>
<span>{{ orderDetail.orderNo }}</span>
</div>
<div class="detail-item">
......@@ -190,12 +198,8 @@
<span>{{ orderDetail.dealerName }}</span>
</div>
<div class="detail-item">
<label>订单日期:</label>
<span>{{ formatDate(orderDetail.orderDate) }}</span>
</div>
<div class="detail-item">
<label>订单总金额:</label>
<span>{{ formatCurrency(orderDetail.totalAmount) }}</span>
<label>出库日期:</label>
<span>{{ formatDate(orderDetail.deliveryDate) }}</span>
</div>
<div class="detail-item">
<label>出库状态:</label>
......@@ -204,33 +208,47 @@
</span>
</div>
<div class="detail-item">
<label>出库时间:</label>
<label>仓库编码:</label>
<span>{{ orderDetail.warehouseCode }}</span>
</div>
<div class="detail-item">
<label>数据来源:</label>
<span>{{ orderDetail.dataSource || '-' }}</span>
</div>
<div class="detail-item">
<label>上传时间:</label>
<span>{{ formatTime(orderDetail.uploadTime || '') }}</span>
</div>
<div class="detail-item">
<label>创建时间:</label>
<span>{{ formatTime(orderDetail.createTime || '') }}</span>
</div>
<div class="detail-item">
<label>更新时间:</label>
<span>{{ formatTime(orderDetail.updateTime || '') }}</span>
</div>
</div>
</div>
<div class="detail-section" v-if="orderDetail.orderItems && orderDetail.orderItems.length > 0">
<div class="detail-section" v-if="orderDetail.deliveryItems && orderDetail.deliveryItems.length > 0">
<h4>出库明细</h4>
<table class="detail-table">
<thead>
<tr>
<th>产品编码</th>
<th>产品名称</th>
<th>产品型号</th>
<th>数量</th>
<th>单价</th>
<th>总价</th>
<th>出库数量</th>
<th>出库单价</th>
<th>出库金额</th>
</tr>
</thead>
<tbody>
<tr v-for="item in orderDetail.orderItems" :key="item.itemId">
<tr v-for="item in orderDetail.deliveryItems" :key="item.deliveryItemId">
<td>{{ item.productCode }}</td>
<td>{{ item.productName }}</td>
<td>{{ item.productModel }}</td>
<td>{{ item.quantity }}</td>
<td>{{ formatCurrency(item.unitPrice) }}</td>
<td>{{ formatCurrency(item.totalPrice) }}</td>
<td>{{ item.deliveryQty }}</td>
<td>{{ formatCurrency(item.deliveryPrice) }}</td>
<td>{{ formatCurrency(item.deliveryAmount) }}</td>
</tr>
</tbody>
</table>
......
This diff is collapsed. Click to expand it.