-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from Jzow/master
Add sale refund modual api and views #167
- Loading branch information
Showing
11 changed files
with
1,986 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
378 changes: 373 additions & 5 deletions
378
core/service/src/main/java/com/wansenai/service/receipt/impl/ReceiptSaleServiceImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import {FileData} from '/@/api/retail/model/shipmentsModel'; | ||
|
||
export interface QuerySaleRefundReq { | ||
receiptNumber: string; | ||
productInfo: string; | ||
customerId: number | string; | ||
operatorId: number | string; | ||
otherReceipt: string; | ||
arrearsStatus: number; | ||
status: number; | ||
remark: string; | ||
} | ||
|
||
export interface SaleRefundTableData { | ||
warehouseId: number | string; | ||
productId: number | string; | ||
barCode: number | string; | ||
productName: string; | ||
productUnit: string; | ||
productStandard: string; | ||
stock: number; | ||
productNumber: number; | ||
unitPrice: number; | ||
amount: number; | ||
taxRate: number; | ||
taxAmount: number; | ||
taxTotalPrice: number; | ||
remark: string; | ||
} | ||
|
||
export interface AddOrUpdateReceiptSaleRefundReq { | ||
id: number | string | undefined; | ||
customerId: string; | ||
receiptNumber: string; | ||
receiptDate: string; | ||
otherReceipt: string; | ||
operatorIds: number[]; | ||
refundOfferRate: number; | ||
refundOfferAmount: number; | ||
refundLastAmount: number; | ||
otherAmount: number; | ||
thisRefundAmount: number; | ||
thisArrearsAmount: number; | ||
accountId: number | string; | ||
multipleAccountIds: number[]; | ||
multipleAccountAmounts: number[]; | ||
status: number; | ||
remark: string; | ||
tableData: SaleRefundTableData[]; | ||
files: FileData[]; | ||
} | ||
|
||
export interface SaleRefundDetailData { | ||
customerId: number | string; | ||
receiptDate: string; | ||
receiptNumber: string; | ||
operatorIds: number[]; | ||
refundOfferRate: number; | ||
refundOfferAmount: number; | ||
refundLastAmount: number; | ||
otherAmount: number; | ||
thisRefundAmount: number; | ||
thisArrearsAmount: number; | ||
accountIds: number; | ||
multipleAccountAmounts: number[]; | ||
multipleAccountIds: number[]; | ||
remark: string; | ||
tableData: SaleRefundTableData[]; | ||
files: FileData[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import {defHttp} from '/@/utils/http/axios'; | ||
import {BaseDataResp, BaseResp} from "@/api/model/baseModel"; | ||
import { | ||
QuerySaleRefundReq, | ||
AddOrUpdateReceiptSaleRefundReq, | ||
SaleRefundDetailData | ||
} from "@/api/sale/model/refundModel" | ||
|
||
enum API { | ||
PageList = '/sale/refund/pageList', | ||
AddOrUpdate = '/sale/refund/addOrUpdate', | ||
GetDetail = '/sale/refund/detail', | ||
UpdateStatus = '/sale/refund/updateStatus', | ||
Delete = '/sale/refund/delete', | ||
} | ||
|
||
export function getSaleRefundPageList(params: QuerySaleRefundReq) { | ||
return defHttp.get<BaseDataResp<SaleRefundDetailData>>( | ||
{ | ||
url: API.PageList, | ||
params, | ||
} | ||
); | ||
} | ||
|
||
export function addOrUpdateSaleRefund(params: AddOrUpdateReceiptSaleRefundReq) { | ||
return defHttp.post<BaseResp>( | ||
{ | ||
url: API.AddOrUpdate, | ||
params, | ||
} | ||
); | ||
} | ||
|
||
export function getSaleRefundDetail(id: string) { | ||
return defHttp.get<BaseDataResp<AddOrUpdateReceiptSaleRefundReq>>( | ||
{ | ||
url: `${API.GetDetail}/${id}`, | ||
} | ||
); | ||
} | ||
|
||
export function updateSaleRefundStatus(ids: number[], status: number ) { | ||
return defHttp.put<BaseResp>( | ||
{ | ||
url: `${API.UpdateStatus}/${ids}/${status}`, | ||
} | ||
); | ||
} | ||
|
||
export function deleteSaleRefund(ids: number[]) { | ||
return defHttp.put<BaseResp>( | ||
{ | ||
url: `${API.Delete}/${ids}`, | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.