diff --git a/src/api/wms/suppliperMoldCostDetail/index.ts b/src/api/wms/suppliperMoldCostDetail/index.ts new file mode 100644 index 000000000..bd87e852d --- /dev/null +++ b/src/api/wms/suppliperMoldCostDetail/index.ts @@ -0,0 +1,18 @@ +import request from '@/config/axios' +export const getSupplierMoldCostDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/supplier-tool-apport-statement-detail/senior', data }) + } else { + return await request.get({ url: `/wms/supplier-tool-apport-statement-detail/page`, params }) + } +} +export const exportSupplierMoldCostDetail = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/supplier-tool-apport-statement-detail/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/supplier-tool-apport-statement-detail/export-excel`, params }) + } +} diff --git a/src/api/wms/suppliperMoldCostMain/index.ts b/src/api/wms/suppliperMoldCostMain/index.ts new file mode 100644 index 000000000..bb9c209fb --- /dev/null +++ b/src/api/wms/suppliperMoldCostMain/index.ts @@ -0,0 +1,33 @@ +import request from '@/config/axios' +// 从客户对账单中获取客户代码 -- 销售申请 +export const getCustomerList = async () => { + return await request.get({ url: `/wms/supplier-tool-apport-statement-main/getCustomerList`}) +} +export const getSupplierMoldCostMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/supplier-tool-apport-statement-main/senior', data }) + } else { + return await request.get({ url: `/wms/supplier-tool-apport-statement-main/page`, params }) + } +} +export const exportSupplierMoldCostMain = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/supplier-tool-apport-statement-main/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/supplier-tool-apport-statement-main/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/supplier-tool-apport-statement-main/get-import-template' }) +} +// 导入客户对账单前校验是否有相同客户代码和年月的数据存在 +export const verifyDataExist = async (yearsMonthStr: String,customerCode:String) => { + return await request.get({ url: `/wms/supplier-tool-apport-statement-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&customerCode='+customerCode }) +} + + diff --git a/src/components/ImportForm/src/ImportSupplierMoldCostForm.vue b/src/components/ImportForm/src/ImportSupplierMoldCostForm.vue new file mode 100644 index 000000000..a229e9337 --- /dev/null +++ b/src/components/ImportForm/src/ImportSupplierMoldCostForm.vue @@ -0,0 +1,467 @@ + + + + + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 845be7f91..a9fa2e771 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -415,4 +415,8 @@ export enum DICT_TYPE { DELIVER_METHOD = 'deliver_method', CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type', // 销售开票 LEADERSHIP_MATERIAL_TYPE = 'leadership_material_type', + SUPPLIER_TOOL_APPORT_STATEMENT_MAIN = 'supplier_tool_apport_statement_main', // 供应商模具费用主 + SUPPLIER_TOOL_APPORT_STATEMENT_DETAIL = 'supplier_tool_apport_statement_detail', // 供应商模具费用子 + + } diff --git a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue new file mode 100644 index 000000000..afeb10a82 --- /dev/null +++ b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue @@ -0,0 +1,284 @@ + + + + \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts new file mode 100644 index 000000000..de91af5b7 --- /dev/null +++ b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts @@ -0,0 +1,178 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter , dateFormatterYM } from '@/utils/formatTime' +import { validateTwoNum } from '@/utils/validator' + + +export const SupplierMoldCostMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + fixed: 'left', + isSearch: true, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.SUPPLIER_TOOL_APPORT_STATEMENT_MAIN, + dictClass: 'string', + form: { + //value: '',//可以添加默认值 有无都可 + component: 'Select', + }, + isSearch: true, + search:{ + component:'Select', + componentProps: { + multiple:true, + } + + }, + }, + { + label: '版本号', + field: 'versionNumber', + sort: 'custom', + isTable: false + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '年月', + field: 'yearsMonth', + sort: 'custom', + formatter: dateFormatterYM, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + detail: { + dateFormat: 'YYYY-MM' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'YYYY-MM' + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isDetail:true, + isForm: false, + isTable:true + }, + { + 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')] + } + }, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + isTable:true, + isForm: false, + table:{ + width:180 + } + }, + { + label: '更新者', + field: 'updater', + sort: 'custom', + isDetail:true, + isForm: false, + isTable:false + }, + { + label: '更新时间', + field: 'updateTime', + 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')] + } + }, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + isTable:false, + isForm: false, + table:{ + width:180 + } + } +])) + + +export const SupplierMoldCostDetail = useCrudSchemas(reactive([ + { + label: '物料品号', + field: 'articleNumber', + sort: 'custom', + isForm: false, + }, + { + label: '车型', + field: 'vehicleType', + sort: 'custom', + isForm: false, + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.SUPPLIER_TOOL_APPORT_STATEMENT_DETAIL, + dictClass: 'string', + form: { + //value: '',//可以添加默认值 有无都可 + component: 'Select', + }, + }, +])) + +