diff --git a/core/api/src/main/java/com/wansenai/api/RetailController.java b/core/api/src/main/java/com/wansenai/api/RetailController.java index 4f997012..caa5f5ea 100644 --- a/core/api/src/main/java/com/wansenai/api/RetailController.java +++ b/core/api/src/main/java/com/wansenai/api/RetailController.java @@ -48,7 +48,7 @@ public Response deleteByIds(@RequestParam("ids") List ids) { return retailService.deleteRetailShipments(ids); } - @PostMapping("/shipments/updateStatus") + @PutMapping("/shipments/updateStatus") public Response updateStatus(@RequestParam("ids") List ids, @RequestParam("status") Integer status) { return retailService.updateRetailShipmentsStatus(ids, status); } diff --git a/core/domain/src/main/java/com/wansenai/dto/receipt/RetailShipmentsDTO.java b/core/domain/src/main/java/com/wansenai/dto/receipt/RetailShipmentsDTO.java index ab265225..4134b7d8 100644 --- a/core/domain/src/main/java/com/wansenai/dto/receipt/RetailShipmentsDTO.java +++ b/core/domain/src/main/java/com/wansenai/dto/receipt/RetailShipmentsDTO.java @@ -44,6 +44,8 @@ public class RetailShipmentsDTO { private String remark; + private Integer status; + private List tableData; private List files; diff --git a/core/service/src/main/java/com/wansenai/service/receipt/impl/RetailServiceImpl.java b/core/service/src/main/java/com/wansenai/service/receipt/impl/RetailServiceImpl.java index 44306dee..038f9e89 100644 --- a/core/service/src/main/java/com/wansenai/service/receipt/impl/RetailServiceImpl.java +++ b/core/service/src/main/java/com/wansenai/service/receipt/impl/RetailServiceImpl.java @@ -139,8 +139,10 @@ public Response addOrUpdateRetailShipments(RetailShipmentsDTO shipmentsD .set(shipmentsDTO.getCollectAmount() != null, ReceiptMain::getChangeAmount, shipmentsDTO.getCollectAmount()) .set(shipmentsDTO.getReceiptAmount() != null, ReceiptMain::getTotalPrice, shipmentsDTO.getReceiptAmount()) .set(shipmentsDTO.getBackAmount() != null, ReceiptMain::getBackAmount, shipmentsDTO.getBackAmount()) + .set(shipmentsDTO.getStatus() != null, ReceiptMain::getStatus, shipmentsDTO.getStatus()) .set(StringUtils.hasText(shipmentsDTO.getPaymentType()), ReceiptMain::getPaymentType, shipmentsDTO.getPaymentType()) .set(StringUtils.hasText(shipmentsDTO.getRemark()), ReceiptMain::getRemark, shipmentsDTO.getRemark()) + .set(StringUtils.hasText(shipmentsDTO.getReceiptDate()), ReceiptMain::getCreateTime, shipmentsDTO.getReceiptDate()) .set(ReceiptMain::getUpdateBy, userId) .set(ReceiptMain::getUpdateTime, LocalDateTime.now()) .update(); @@ -229,6 +231,7 @@ public Response addOrUpdateRetailShipments(RetailShipmentsDTO shipmentsD .backAmount(shipmentsDTO.getBackAmount()) .remark(shipmentsDTO.getRemark()) .fileId(fileIds) + .status(shipmentsDTO.getStatus()) .createBy(userId) .createTime(LocalDateTime.now()) .build(); diff --git a/web/src/api/retail/model/shipmentsModel.ts b/web/src/api/retail/model/shipmentsModel.ts index 0a19f007..3117fafe 100644 --- a/web/src/api/retail/model/shipmentsModel.ts +++ b/web/src/api/retail/model/shipmentsModel.ts @@ -26,6 +26,7 @@ interface AddOrUpdateShipmentsReq { receiptAmount: number; backAmount: number; remark: string; + status: number; tableData: ShipmentsData[]; fileDataList: FileData[]; } diff --git a/web/src/api/retail/shipments.ts b/web/src/api/retail/shipments.ts index ddb7cf91..c3385071 100644 --- a/web/src/api/retail/shipments.ts +++ b/web/src/api/retail/shipments.ts @@ -43,7 +43,7 @@ export function deleteShipments(ids: string[]) { } export function updateShipmentsStatus(ids: string[], status: number) { - return defHttp.post( + return defHttp.put( { url: `${API.UpdateStatus}?ids=${ids}&status=${status}`, } diff --git a/web/src/views/financial/advance-charge/index.vue b/web/src/views/financial/advance-charge/index.vue index 2c9c5419..6f4efe92 100644 --- a/web/src/views/financial/advance-charge/index.vue +++ b/web/src/views/financial/advance-charge/index.vue @@ -106,6 +106,10 @@ export default defineComponent({ } async function handleEdit(record: Recordable) { + if (record.status === 1) { + createMessage.warn('抱歉,只有未审核的单据才能编辑!'); + return; + } advanceChargeModalRef.value.openAdvanceChargeModal(record.id); } diff --git a/web/src/views/retail/shipments/components/AddEditModal.vue b/web/src/views/retail/shipments/components/AddEditModal.vue index 6003196a..7a226ce8 100644 --- a/web/src/views/retail/shipments/components/AddEditModal.vue +++ b/web/src/views/retail/shipments/components/AddEditModal.vue @@ -45,7 +45,7 @@ - + @@ -76,7 +76,7 @@ 扫条码录入数据 - 收起扫码 + 收起扫码 批量添加出库商品 添加一行 删除选中行 @@ -190,7 +190,12 @@