From 47577083fc7910c1c090db0c67416aa74a67d0be Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 10 Oct 2024 14:42:42 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=A8=A1=E5=85=B7=E5=88=86=E6=91=8A=E5=AF=B9=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E9=A2=84=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.ts | 56 ++++++ .../index.ts | 52 ++++++ .../customerToolApportStatementDetail.data.ts | 173 ------------------ .../customerStatementMain.data.ts | 4 +- .../customerStatement/index.vue | 0 ...merToolApportStatementForecastMain.data.ts | 94 ++++++++++ .../index.vue | 54 +++--- 7 files changed, 231 insertions(+), 202 deletions(-) create mode 100644 src/api/wms/customerToolApportStatementForecastDetail/index.ts create mode 100644 src/api/wms/customerToolApportStatementForecastMain/index.ts delete mode 100644 src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/customerToolApportStatementDetail.data.ts rename src/views/wms/deliversettlementManage/{customerStatement => moldAllocation}/customerStatement/customerStatementMain.data.ts (99%) rename src/views/wms/deliversettlementManage/{customerStatement => moldAllocation}/customerStatement/index.vue (100%) create mode 100644 src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts rename src/views/wms/deliversettlementManage/{customerStatement/customerToolApportStatement => moldAllocation/customerToolApportStatementForecastMain}/index.vue (71%) diff --git a/src/api/wms/customerToolApportStatementForecastDetail/index.ts b/src/api/wms/customerToolApportStatementForecastDetail/index.ts new file mode 100644 index 000000000..7dcef738d --- /dev/null +++ b/src/api/wms/customerToolApportStatementForecastDetail/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface CustomerToolApportStatementForecastDetailVO { + id: number + number: string + masterId: number + factoryCode: string + factoryName: string + invoiceNumber: string + articleNumber: string + vehicleType: string + forecastAllocationAmount: number + remark: string + available: string +} + +// 查询客户模具分摊对账单预测子表(WMS)列表 +export const getCustomerToolApportStatementForecastDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-tool-apport-statement-forecast-detail/senior', data }) + } else { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/page`, params }) + } +} + +// 查询客户模具分摊对账单预测子表(WMS)详情 +export const getCustomerToolApportStatementForecastDetail = async (id: number) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/get?id=` + id }) +} + +// 新增客户模具分摊对账单预测子表(WMS) +export const createCustomerToolApportStatementForecastDetail = async (data: CustomerToolApportStatementForecastDetailVO) => { + return await request.post({ url: `/wms/customer-tool-apport-statement-forecast-detail/create`, data }) +} + +// 修改客户模具分摊对账单预测子表(WMS) +export const updateCustomerToolApportStatementForecastDetail = async (data: CustomerToolApportStatementForecastDetailVO) => { + return await request.put({ url: `/wms/customer-tool-apport-statement-forecast-detail/update`, data }) +} + +// 删除客户模具分摊对账单预测子表(WMS) +export const deleteCustomerToolApportStatementForecastDetail = async (id: number) => { + return await request.delete({ url: `/wms/customer-tool-apport-statement-forecast-detail/delete?id=` + id }) +} + +// 导出客户模具分摊对账单预测子表(WMS) Excel +export const exportCustomerToolApportStatementForecastDetail = async (params) => { + return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-tool-apport-statement-forecast-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/customerToolApportStatementForecastMain/index.ts b/src/api/wms/customerToolApportStatementForecastMain/index.ts new file mode 100644 index 000000000..553a2fe63 --- /dev/null +++ b/src/api/wms/customerToolApportStatementForecastMain/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +export interface CustomerToolApportStatementForecastMainVO { + id: number + number: string + customerCode: string + customerName: string + yearsMonth: Date + remark: string + available: string +} + +// 查询客户模具分摊对账单预测主表(WMS)列表 +export const getCustomerToolApportStatementForecastMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-tool-apport-statement-forecast-main/senior', data }) + } else { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/page`, params }) + } +} + +// 查询客户模具分摊对账单预测主表(WMS)详情 +export const getCustomerToolApportStatementForecastMain = async (id: number) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/get?id=` + id }) +} + +// 新增客户模具分摊对账单预测主表(WMS) +export const createCustomerToolApportStatementForecastMain = async (data: CustomerToolApportStatementForecastMainVO) => { + return await request.post({ url: `/wms/customer-tool-apport-statement-forecast-main/create`, data }) +} + +// 修改客户模具分摊对账单预测主表(WMS) +export const updateCustomerToolApportStatementForecastMain = async (data: CustomerToolApportStatementForecastMainVO) => { + return await request.put({ url: `/wms/customer-tool-apport-statement-forecast-main/update`, data }) +} + +// 删除客户模具分摊对账单预测主表(WMS) +export const deleteCustomerToolApportStatementForecastMain = async (id: number) => { + return await request.delete({ url: `/wms/customer-tool-apport-statement-forecast-main/delete?id=` + id }) +} + +// 导出客户模具分摊对账单预测主表(WMS) Excel +export const exportCustomerToolApportStatementForecastMain = async (params) => { + return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-tool-apport-statement-forecast-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/customerToolApportStatementDetail.data.ts b/src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/customerToolApportStatementDetail.data.ts deleted file mode 100644 index 9e047ee33..000000000 --- a/src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/customerToolApportStatementDetail.data.ts +++ /dev/null @@ -1,173 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const CustomerToolApportStatementDetailRules = reactive({ - invoiceNumber: [required], - articleNumber: [required], - vehicleType: [required], - amount: [required], - qty: [required], - allocationPrice: [required], - adjustmentAmount: [required], -}) - -export const CustomerToolApportStatementDetail = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, - { - label: '客户对账单单据号', - field: 'customerStatementNumber', - sort: 'custom', - isSearch: true, - }, - { - label: '年月预留字段', - field: 'yearsMonth', - sort: 'custom', - }, - { - label: '客户对账单主id', - field: 'masterId', - sort: 'custom', - form: { - component: 'InputNumber', - value: 0 - }, - }, - { - label: '账票号', - field: 'invoiceNumber', - sort: 'custom', - isSearch: true, - }, - { - label: '品号', - field: 'articleNumber', - sort: 'custom', - isSearch: true, - }, - { - label: '车型', - field: 'vehicleType', - sort: 'custom', - isSearch: true, - form: { - component: 'SelectV2' - }, - }, - { - label: '金额', - field: 'amount', - sort: 'custom', - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - }, - { - label: '模具分摊单价', - field: 'allocationPrice', - sort: 'custom', - }, - { - label: '调整金额', - field: 'adjustmentAmount', - sort: 'custom', - }, - { - label: '确认分摊时间', - field: 'verifyTime', - sort: 'custom', - formatter: dateFormatter, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - }, - }, - { - label: '已作废时间', - field: 'abrogateTime', - sort: 'custom', - formatter: dateFormatter, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - }, - }, - { - label: '0:新增1:已作废', - field: 'status', - sort: 'custom', - isSearch: true, - form: { - component: 'SelectV2' - }, - }, - { - label: '版本号', - field: 'versionNumber', - sort: 'custom', - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - }, - { - label: '是否可用默认TRUE', - field: 'available', - sort: 'custom', - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - 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: '地点ID', - field: 'siteId', - sort: 'custom', - isTable: false, - isSearch: true, - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isTable: false, - isSearch: true, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) diff --git a/src/views/wms/deliversettlementManage/customerStatement/customerStatement/customerStatementMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts similarity index 99% rename from src/views/wms/deliversettlementManage/customerStatement/customerStatement/customerStatementMain.data.ts rename to src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts index d3cb53adf..40296aea2 100644 --- a/src/views/wms/deliversettlementManage/customerStatement/customerStatement/customerStatementMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts @@ -33,7 +33,7 @@ export const CustomerStatementMain = useCrudSchemas(reactive([ label: '客户名称', field: 'customerName', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '年月', @@ -223,7 +223,7 @@ export const CustomerStatementMain = useCrudSchemas(reactive([ field: 'createTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, diff --git a/src/views/wms/deliversettlementManage/customerStatement/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue similarity index 100% rename from src/views/wms/deliversettlementManage/customerStatement/customerStatement/index.vue rename to src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts new file mode 100644 index 000000000..77bf0bb0a --- /dev/null +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts @@ -0,0 +1,94 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const CustomerToolApportStatementForecastMainRules = reactive({ + customerCode: [required], + customerName: [required], + yearsMonth: [required], +}) + +export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + isSearch: true, + }, + { + label: '客户名称', + field: 'customerName', + sort: 'custom', + isSearch: false, + }, + { + label: '年月', + field: 'yearsMonth', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + 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: 'creater', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + 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, + isTable:false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue similarity index 71% rename from src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/index.vue rename to src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue index 0dce2c81b..13759dc77 100644 --- a/src/views/wms/deliversettlementManage/customerStatement/customerToolApportStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue @@ -1,7 +1,7 @@ From c44edecce30a290e9715c7e1fe8bd2484748679c Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Thu, 10 Oct 2024 15:18:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?YT-168=E9=87=87=E8=B4=AD=E6=8D=A2=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/purchaseBarterRequestDetail/index.ts | 53 ++ .../wms/purchaseBarterRequestMain/index.ts | 96 +++ src/locales/zh-CN.ts | 3 + src/utils/disposition/defaultButtons.ts | 13 + .../purchaseBarterRequest/index.vue | 613 ++++++++++++++++++ .../purchaseBarterRequestMain.data.ts | 277 ++++++++ 6 files changed, 1055 insertions(+) create mode 100644 src/api/wms/purchaseBarterRequestDetail/index.ts create mode 100644 src/api/wms/purchaseBarterRequestMain/index.ts create mode 100644 src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue create mode 100644 src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts diff --git a/src/api/wms/purchaseBarterRequestDetail/index.ts b/src/api/wms/purchaseBarterRequestDetail/index.ts new file mode 100644 index 000000000..f7622276c --- /dev/null +++ b/src/api/wms/purchaseBarterRequestDetail/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface PurchaseBarterRequestDetailVO { + masterId: number + itemCode: string + itemName: string + uom: string + batch: string + packUnit: string + qty: number + reason: string +} + +// 查询采购换货申请明细列表 +export const getPurchaseBarterRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchase-barter-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/purchase-barter-request-detail/page`, params }) + } +} + +// 查询采购换货申请明细详情 +export const getPurchaseBarterRequestDetail = async (id: number) => { + return await request.get({ url: `/wms/purchase-barter-request-detail/get?id=` + id }) +} + +// 新增采购换货申请明细 +export const createPurchaseBarterRequestDetail = async (data: PurchaseBarterRequestDetailVO) => { + return await request.post({ url: `/wms/purchase-barter-request-detail/create`, data }) +} + +// 修改采购换货申请明细 +export const updatePurchaseBarterRequestDetail = async (data: PurchaseBarterRequestDetailVO) => { + return await request.put({ url: `/wms/purchase-barter-request-detail/update`, data }) +} + +// 删除采购换货申请明细 +export const deletePurchaseBarterRequestDetail = async (id: number) => { + return await request.delete({ url: `/wms/purchase-barter-request-detail/delete?id=` + id }) +} + +// 导出采购换货申请明细 Excel +export const exportPurchaseBarterRequestDetail = async (params) => { + return await request.download({ url: `/wms/purchase-barter-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/purchase-barter-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/purchaseBarterRequestMain/index.ts b/src/api/wms/purchaseBarterRequestMain/index.ts new file mode 100644 index 000000000..e8fc8e4f4 --- /dev/null +++ b/src/api/wms/purchaseBarterRequestMain/index.ts @@ -0,0 +1,96 @@ +import request from '@/config/axios' + +export interface PurchaseBarterRequestMainVO { + id: number + number: string + status: string + supplierCode: string + supplierName: string + available: string + creatorName: string + updaterName: string + deleteTime: Date + deleter: string + deleteName: string +} + +// 查询采购换货申请主列表 +export const getPurchaseBarterRequestMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchase-barter-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/purchase-barter-request-main/page`, params }) + } +} + +// 查询采购换货申请主详情 +export const getPurchaseBarterRequestMain = async (id: number) => { + return await request.get({ url: `/wms/purchase-barter-request-main/get?id=` + id }) +} + +// 新增采购换货申请主 +export const createPurchaseBarterRequestMain = async (data: PurchaseBarterRequestMainVO) => { + return await request.post({ url: `/wms/purchase-barter-request-main/create`, data }) +} + +// 修改采购换货申请主 +export const updatePurchaseBarterRequestMain = async (data: PurchaseBarterRequestMainVO) => { + return await request.put({ url: `/wms/purchase-barter-request-main/update`, data }) +} + +// 删除采购换货申请主 +export const deletePurchaseBarterRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/purchase-barter-request-main/delete?id=` + id }) +} + +// 导出采购换货申请主 Excel +export const exportPurchaseBarterRequestMain = async (params) => { + return await request.download({ url: `/wms/purchase-barter-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/purchase-barter-request-main/get-import-template' }) +} + +// 审批通过 +export async function agreePurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/agree?id=` + id }) +} + +// 驳回 +export async function refusedPurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/refused?id=` + id }) +} + +// 提交审批 +export async function submitPurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/submit?id=` + id }) +} + +// 重新添加 +export async function reAddPurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/reAdd?id=` + id }) +} + +// 关闭 +export async function closePurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/close?id=` + id }) +} + +// 出库 +export async function outStoragePurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/outStorage?id=` + id }) +} + +// 入库 +export async function inStoragePurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/inStorage?id=` + id }) +} + +// 中止 +export async function suspendPurchaseBarterRequestMain(id: number) { + return await request.put({ url: `/wms/purchase-barter-request-main/suspend?id=` + id }) +} diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 06fac580b..cbaf8fd59 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -79,6 +79,9 @@ export default { confirmAccept: '确认承接吗?', confirmGiveup: '确认放弃吗?', confirmPublish: '确认发布吗?', + confirmOutStorage: '确认出库吗?', + confirmInStorage: '确认入库吗?', + confirmSuspend: '确认中止吗?', }, error: { noPermission: `抱歉,您无权访问此页面。`, diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 13fce99ac..6a9208e12 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1404,6 +1404,19 @@ export function outBtn(option: any) { hasPermi: '' }) } + +export function inBtn(option: any) { + return __defaultBtnOption(option, { + label: '入库', + name: 'in', + hide: false, + type: 'danger', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-重试 export function retryBtn(option: any) { return __defaultBtnOption(option, { diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue new file mode 100644 index 000000000..28d01c6ce --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue @@ -0,0 +1,613 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts new file mode 100644 index 000000000..4ada3c32d --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts @@ -0,0 +1,277 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import {Supplier} from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data"; +import * as SupplierApi from "@/api/wms/supplier"; +import * as ItembasicApi from "@/api/wms/itembasic"; +import { + Supplieritem +} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; +import * as SupplieritemApi from "@/api/wms/supplieritem"; + +/** + * @returns {Array} 采购换货申请主表 + */ +export const PurchaseBarterRequestMain = useCrudSchemas(reactive([ + { + label: '申请单号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 180, + fixed: 'left' + } + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + isForm: false, + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + isDetail: false, + table: { + width: 250, + fixed: 'right' + } + } +])) + +//表单校验 +export const PurchaseBarterRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购换货申请子表 + */ +export const PurchaseBarterRequestDetail = useCrudSchemas(reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + tableForm:{ + multiple:true,//多选 + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码',// 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'supplierCode', + value: 'supplierCode', + action: '==', + message: '供应商代码不能为空!', + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:true, // 前置添加必有,和isFormModel结合使用 + isSearch: true, + isMainValue: false + }], + verificationPage: ItembasicApi.getItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法 + isShowTableFormSearch: false, //tableForm下方是否出现输入框 + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'supplierCode', + value: 'supplierCode', + message: '供应商代码不能为空!', + isMainValue:true + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + isSearch: false, + tableForm: { + disabled: true + }, + form:{ + componentProps:{ + disabled:true + } + } + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + isSearch: false, + tableForm: { + disabled: true + }, + form:{ + componentProps:{ + disabled:true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + tableForm: { + disabled: true + }, + form:{ + componentProps:{ + disabled:true + } + } + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + tableForm: { + disabled: true + }, + form:{ + componentProps:{ + disabled:true + } + } + }, + { + label: '换货数量', + field: 'qty', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '换货原因 ', + field: 'reason', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + hiddenInMain:true, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +function validateQty(rule, value, callback) { + const numericValue = Number(value); + if (Number.isInteger(numericValue) && numericValue > 0) { + callback(); + } else { + callback(new Error('数量必须是一个正整数')); + } +} +//表单校验 +export const PurchaseBarterRequestDetailRules = reactive({ + qty:[ + { validator:validateQty, message: '数量必须是一个正整数', trigger: 'change'} + ], +}) From 52e54cc529ad7143a79a9e2327f30d72359472d6 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 10 Oct 2024 17:07:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=EF=BC=8C=E5=AE=A2=E6=88=B7=E6=A8=A1=E5=85=B7=E5=88=86=E6=91=8A?= =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E9=A2=84=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/customerSaleInvoiceDetail/index.ts | 59 +++++ src/api/wms/customerSaleInvoiceMain/index.ts | 59 +++++ .../customerSaleInvoiceMain.data.ts | 124 +++++++++ .../customerSaleInvoiceMain/index.vue | 245 ++++++++++++++++++ .../customerStatementMain.data.ts | 16 +- .../customerStatement/index.vue | 3 +- ...merToolApportStatementForecastMain.data.ts | 84 ++++++ .../index.vue | 107 +++++++- 8 files changed, 676 insertions(+), 21 deletions(-) create mode 100644 src/api/wms/customerSaleInvoiceDetail/index.ts create mode 100644 src/api/wms/customerSaleInvoiceMain/index.ts create mode 100644 src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts create mode 100644 src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue 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" /> - - -