diff --git a/src/api/wms/customerSaleInvoiceDetail/index.ts b/src/api/wms/customerSaleInvoiceDetail/index.ts new file mode 100644 index 000000000..19d594304 --- /dev/null +++ b/src/api/wms/customerSaleInvoiceDetail/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface CustomerSaleInvoiceDetailVO { + id: number + number: string + masterId: number + itemCode: string + articleNumber: string + qty: number + price: number + allocationPrice: number + sumPrice: number + afterTaxAmount: number + beforeTaxAmount: number + taxAmount: number + remark: string + available: string +} + +// 查询客户销售开票子信息表(WMS)列表 +export const getCustomerSaleInvoiceDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-sale-invoice-detail/senior', data }) + } else { + return await request.get({ url: `/wms/customer-sale-invoice-detail/page`, params }) + } +} + +// 查询客户销售开票子信息表(WMS)详情 +export const getCustomerSaleInvoiceDetail = async (id: number) => { + return await request.get({ url: `/wms/customer-sale-invoice-detail/get?id=` + id }) +} + +// 新增客户销售开票子信息表(WMS) +export const createCustomerSaleInvoiceDetail = async (data: CustomerSaleInvoiceDetailVO) => { + return await request.post({ url: `/wms/customer-sale-invoice-detail/create`, data }) +} + +// 修改客户销售开票子信息表(WMS) +export const updateCustomerSaleInvoiceDetail = async (data: CustomerSaleInvoiceDetailVO) => { + return await request.put({ url: `/wms/customer-sale-invoice-detail/update`, data }) +} + +// 删除客户销售开票子信息表(WMS) +export const deleteCustomerSaleInvoiceDetail = async (id: number) => { + return await request.delete({ url: `/wms/customer-sale-invoice-detail/delete?id=` + id }) +} + +// 导出客户销售开票子信息表(WMS) Excel +export const exportCustomerSaleInvoiceDetail = async (params) => { + return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-sale-invoice-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/customerSaleInvoiceMain/index.ts b/src/api/wms/customerSaleInvoiceMain/index.ts new file mode 100644 index 000000000..c77b8dcb8 --- /dev/null +++ b/src/api/wms/customerSaleInvoiceMain/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface CustomerSaleInvoiceMainVO { + id: number + number: string + customerStatementNumber: string + beforeTaxAmount: number + taxRate: number + taxAmount: number + adTaxAmount: number + goldenTaxInvoiceNumber: string + invoiceTime: Date + status: string + publishTime: Date + abrogateTime: Date + remark: string + available: string +} + +// 查询客户销售开票主信息表(WMS)列表 +export const getCustomerSaleInvoiceMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-sale-invoice-main/senior', data }) + } else { + return await request.get({ url: `/wms/customer-sale-invoice-main/page`, params }) + } +} + +// 查询客户销售开票主信息表(WMS)详情 +export const getCustomerSaleInvoiceMain = async (id: number) => { + return await request.get({ url: `/wms/customer-sale-invoice-main/get?id=` + id }) +} + +// 新增客户销售开票主信息表(WMS) +export const createCustomerSaleInvoiceMain = async (data: CustomerSaleInvoiceMainVO) => { + return await request.post({ url: `/wms/customer-sale-invoice-main/create`, data }) +} + +// 修改客户销售开票主信息表(WMS) +export const updateCustomerSaleInvoiceMain = async (data: CustomerSaleInvoiceMainVO) => { + return await request.put({ url: `/wms/customer-sale-invoice-main/update`, data }) +} + +// 删除客户销售开票主信息表(WMS) +export const deleteCustomerSaleInvoiceMain = async (id: number) => { + return await request.delete({ url: `/wms/customer-sale-invoice-main/delete?id=` + id }) +} + +// 导出客户销售开票主信息表(WMS) Excel +export const exportCustomerSaleInvoiceMain = async (params) => { + return await request.download({ url: `/wms/customer-sale-invoice-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-sale-invoice-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts new file mode 100644 index 000000000..cbef4fcb3 --- /dev/null +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts @@ -0,0 +1,124 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const CustomerSaleInvoiceMainRules = reactive({ + beforeTaxAmount: [required], + taxRate: [required], + taxAmount: [required], + adTaxAmount: [required], +}) + +export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + } ,{ + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + // 0:新增1:已发布2已作废 + }, + { + label: '客户对账单单据号', + field: 'customerStatementNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '客户代码', + field: 'customer', + sort: 'custom', + isSearch: true, + }, + { + label: '客户名称', + field: 'customerName', + sort: 'custom', + }, + { + label: '未税金额', + field: 'beforeTaxAmount', + sort: 'custom', + }, + { + label: '税率', + field: 'taxRate', + sort: 'custom', + }, + { + label: '税额', + field: 'taxAmount', + sort: 'custom', + }, + { + label: '价税合计金额', + field: 'adTaxAmount', + sort: 'custom', + }, + { + label: '金税票号', + field: 'goldenTaxInvoiceNumber', + sort: 'custom', + }, + { + label: '开票日期', + field: 'invoiceTime', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '是否可用默认TRUE', + field: 'available', + sort: 'custom', + isTable:false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue new file mode 100644 index 000000000..7f69959e8 --- /dev/null +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue @@ -0,0 +1,245 @@ + + + diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts index 40296aea2..4349dd50a 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { validateTwoNum } from '@/utils/validator' // 表单校验 export const CustomerStatementMainRules = reactive({ @@ -261,17 +262,10 @@ export const CustomerStatementMain = useCrudSchemas(reactive([ // 表单校验 export const CustomerStatementDetailRules = reactive({ - releaseNumber: [required], - ingress: [required], - ingress2: [required], - itemCode: [required], - articleNumber: [required], - articleName: [required], - checkTime: [required], - uom: [required], - qty: [required], - price: [required], - amount: [required], + amount: [ + required, + { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' } + ], }) export const CustomerStatementDetail = useCrudSchemas(reactive([ diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue index 25aac57a1..f4b2c0e70 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue @@ -33,14 +33,13 @@ :apiCreate="CustomerStatementMainApi.createCustomerStatementMain" @searchTableSuccess="searchTableSuccess" :isBusiness="false" /> - - -