zhang_li
1 month ago
7 changed files with 231 additions and 202 deletions
@ -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' }) |
||||
|
} |
@ -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' }) |
||||
|
} |
@ -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<CrudSchema[]>([ |
|
||||
{ |
|
||||
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' |
|
||||
} |
|
||||
} |
|
||||
])) |
|
@ -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<CrudSchema[]>([ |
||||
|
{ |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
])) |
Loading…
Reference in new issue