diff --git a/src/api/wms/customerStatementDetail/index.ts b/src/api/wms/customerStatementDetail/index.ts index 943c1dca9..8dca5fc44 100644 --- a/src/api/wms/customerStatementDetail/index.ts +++ b/src/api/wms/customerStatementDetail/index.ts @@ -111,6 +111,17 @@ export const exportCustomerStatementCompareDetail = async (params) => { } } +//导出详情模具分摊对账单列表数据 需要传masterId +export const exportCustomerStatementShareReconciliatioDetail = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-detail/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel`, params }) + } +} + + // 客户模具分摊对账单修改调整金额 export const updateAdjustmentAmount = async (id: number, masterId: number, amount: number) => { diff --git a/src/api/wms/customerStatementMain/index.ts b/src/api/wms/customerStatementMain/index.ts index 90431150d..bd60e0972 100644 --- a/src/api/wms/customerStatementMain/index.ts +++ b/src/api/wms/customerStatementMain/index.ts @@ -107,7 +107,7 @@ export const getCustomerList = async () => { export const exportCustomerStatementMain = async (params) => { if (params.isSearch) { const data = {...params} - return await request.downloadPost({ url: `/eam/basic-eam-workshop/export-excel-senior`, data }) + return await request.downloadPost({ url: `/wms/customer-statement-main/export-excel-senior`, data }) }else{ return await request.download({ url: `/wms/customer-statement-main/export-excel`, params }) } diff --git a/src/api/wms/customerStatementShareRecordDetail/index.ts b/src/api/wms/customerStatementShareRecordDetail/index.ts new file mode 100644 index 000000000..5eeb8dfeb --- /dev/null +++ b/src/api/wms/customerStatementShareRecordDetail/index.ts @@ -0,0 +1,31 @@ +import request from '@/config/axios' +export const getCustomerStatementShareRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-tool-apport-statement-detail/seniorGroup', data }) + } else { + return await request.get({ url: `/wms/customer-tool-apport-statement-detail/pageGroup`, params }) + } +} + + +export const getCustomerStatementShareRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-tool-apport-statement-detail/seniorDetail', data }) + } else { + return await request.get({ url: `/wms/customer-tool-apport-statement-detail/pageDetail`, params }) + } +} + + +export const exportCustomerStatementShareRecordDetail = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-detail/export-excel-senior-detail`, data }) + }else{ + return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel-detail`, params }) + } +} diff --git a/src/api/wms/customerToolApportStatementForecastDetail/index.ts b/src/api/wms/customerToolApportStatementForecastDetail/index.ts index 7dcef738d..29a06f6e4 100644 --- a/src/api/wms/customerToolApportStatementForecastDetail/index.ts +++ b/src/api/wms/customerToolApportStatementForecastDetail/index.ts @@ -25,6 +25,18 @@ export const getCustomerToolApportStatementForecastDetailPage = async (params) = } } +// 查询预测与对账单差异 +export const getCustomerToolApportStatementForecastComparisonPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/tool-apport-statement-forecast-comparison/senior', data }) + } else { + return await request.get({ url: `/wms/tool-apport-statement-forecast-comparison/page`, params }) + } +} + + // 查询客户模具分摊对账单预测子表(WMS)详情 export const getCustomerToolApportStatementForecastDetail = async (id: number) => { return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/get?id=` + id }) @@ -47,7 +59,24 @@ export const deleteCustomerToolApportStatementForecastDetail = async (id: number // 导出客户模具分摊对账单预测子表(WMS) Excel export const exportCustomerToolApportStatementForecastDetail = async (params) => { - return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) + } +} + + + +// 导出预测与对账单差异 Excel +export const exportCustomerToolApportStatementForecastComparisonDetail = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/customerToolApportStatementForecastMain/index.ts b/src/api/wms/customerToolApportStatementForecastMain/index.ts index 553a2fe63..769fefa1c 100644 --- a/src/api/wms/customerToolApportStatementForecastMain/index.ts +++ b/src/api/wms/customerToolApportStatementForecastMain/index.ts @@ -43,10 +43,25 @@ export const deleteCustomerToolApportStatementForecastMain = async (id: number) // 导出客户模具分摊对账单预测主表(WMS) Excel export const exportCustomerToolApportStatementForecastMain = async (params) => { - return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel-senior`, data }) + }else{ + 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 +} + +// 导入客户对账单前校验是否有相同客户代码和年月的数据存在 +export const verifyDataExist = async (yearsMonthStr: String,customerCode:String) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&customerCode='+customerCode }) +} + +// 客户对账单重新比对 +export const recontrast = async (id: number) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/recontrast?id=` + id}) +} diff --git a/src/api/wms/purchaseClaimRequestDetail/index.ts b/src/api/wms/purchaseClaimRequestDetail/index.ts index 0d4a45117..96ef340e5 100644 --- a/src/api/wms/purchaseClaimRequestDetail/index.ts +++ b/src/api/wms/purchaseClaimRequestDetail/index.ts @@ -13,6 +13,10 @@ export const getPurchaseClaimRequestDetailPage = async (params) => { export const getPurchaseClaimRequestDetailList = async (supplierCode) => { return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaim?supplierCode=` + supplierCode }) } +//获得采购索赔子列表 +export const getPurchaseClaimRequestDetailListForUpdate = async (supplierCode, id) => { + return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaimForUpdate?supplierCode=${supplierCode}&id=${id}`}) +} // 创建采购索赔子 export const createPurchaseClaimRequestDetail = async (data) => { return await request.post({ url: `/wms/purchaseClaim-request-detail/create`, data }) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index f465845f0..ff144bc90 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -385,6 +385,12 @@ const props = defineProps({ required: false, default: null }, + // tableObject 数据过滤条件 针对 详情扩展标签页 传入不同条件 + extendRowKeyValue: { + type: Array, + required: false, + default: null + }, // 子列表 筛选 展示与隐藏 ,默认展示 detailButtonIsShowFilter:{ type: Boolean, @@ -795,6 +801,14 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: tableObjectRef.value.params = { masterId: row.masterId||row.id } + if (props.extendRowKeyValue) { + // params 扩展的字段 + props.extendRowKeyValue.forEach(item => { + tableObject.params[item.key] = row[item.value] + masterParmas.value[item.key] =row[item.value] + + }) + } await getList() } isShowDrawer.value = true @@ -946,7 +960,7 @@ const buttonBaseClick = (val, item) => { }else{ openForm('create') } - } else if (val == 'export') { + } else if (val.includes('export')) { // 刷新 emit('buttonBaseClick',val, item,tableObject) } else if (val == 'refresh') { @@ -1139,6 +1153,39 @@ const searchFormClick = async (searchData) => { ? searchData.filters : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] } + if (props.extendRowKeyValue) { + // params 扩展的字段 + props.extendRowKeyValue.forEach(item => { + let findItem = tableObjectRef.value.params.filters.find(item1=>item1.column == [item.key]) + if(findItem){ + findItem.value = masterParmas.value[item.key] + }else{ + tableObjectRef.value.params.filters.push({ + column : item.key, + action : "==", + value : masterParmas.value[item.key] + }) + } + + }) + } + + if (props.tableObjectExtend) { + props.tableObjectExtend.forEach(item => { + let findItem = tableObjectRef.value.params.filters.find(item1=>item1.column == [item.key]) + if(findItem){ + findItem.value = item.value + }else{ + tableObjectRef.value.params.filters.push({ + column : item.key, + action : "==", + value : item.value + }) + } + }) + } + + // const { tableObject, tableMethods } = useTable({ // getListApi: props.apiPage // 分页接口 // }) @@ -1153,6 +1200,7 @@ const searchFormClick = async (searchData) => { // tableMethodsRef.value = tableMethods // tableObjectRef.value.tableList = [] // const { getList } = tableMethods + const { getList } = tableMethodsRef.value await getList() updateKey.value += 1 // tableObjectRef.value.params = { diff --git a/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue b/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue new file mode 100644 index 000000000..a9ca25e88 --- /dev/null +++ b/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue @@ -0,0 +1,468 @@ + + + + + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 2c299d15e..845be7f91 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -411,6 +411,7 @@ export enum DICT_TYPE { RECEIVE_STATUS = 'receive_status', // 收货确认状态 LINE_SCRAP_REASON = 'Reason_or_scrapping_of_production_line', // 线边报废原因(现场史力维护的字典) CUSTOMER_STATEMENT_TYPE = 'customer_statement_type', // wms客户对账单 模具分摊状态 + CUSTOMER_TOOL_APPORT_STATEMENT_TYPE = 'customer_tool_apport_statement_type', // wms客户对账单 模具分摊状态 DELIVER_METHOD = 'deliver_method', CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type', // 销售开票 LEADERSHIP_MATERIAL_TYPE = 'leadership_material_type', diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index db7948081..f1463f58a 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -162,6 +162,15 @@ export const dateFormatter = (row, column, cellValue) => { } return formatDate(cellValue) } + +export const dateFormatterYM = (row, column, cellValue) => { + if (!cellValue) { + return + } + return formatDate(cellValue, 'YYYY-MM') +} + + /** * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD HH:mm:ss 格式 * diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index d4b08dbb9..d5fae481d 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -214,7 +214,8 @@ const openForm = (type: string, row?: any) => { // form表单提交 const formsSuccess = async (formType,data) => { - var isHave =Customerdock.allSchemas.formSchema.some(function (item) { + try { + var isHave =Customerdock.allSchemas.formSchema.some(function (item) { return item.field === 'activeTime' || item.field === 'expireTime'; }); if(isHave){ @@ -233,13 +234,16 @@ const formsSuccess = async (formType,data) => { await CustomerdockApi.updateCustomerdock(data) message.success(t('common.updateSuccess')) } - basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false if (formType === 'create') { getList() }else{ buttonBaseClick('refresh',null) } + } catch { + basicFormRef.value.formLoading = false + + } } // 查询页面返回 diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts index 01ead97f0..d72f9dbc7 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts +++ b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts @@ -37,8 +37,19 @@ export const Customeritem = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + }], + // verificationPage: CustomerApi.getCustomerPage, // tableForm下方输入框校验失去焦点之后是否正确的方法 + // 失去焦点校验参数 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true, }] - } + }, + }, isSearch: true }, @@ -63,6 +74,15 @@ export const Customeritem = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + }], + // 失去焦点校验参数 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true, }] } }, diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue index d51b95a7b..9cdb2c851 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue @@ -221,7 +221,8 @@ const openForm = (type: string, row?: any) => { } // form表单提交 -const formsSuccess = async (formType,data) => { +const formsSuccess = async (formType, data) => { + try { var isHave =Customeritem.allSchemas.formSchema.some(function (item) { return item.field === 'activeTime' || item.field === 'expireTime'; }); @@ -248,6 +249,10 @@ const formsSuccess = async (formType,data) => { }else{ buttonBaseClick('refresh',null) } + } catch { + basicFormRef.value.formLoading = false + } + } const onEnter = async (field,value)=>{ console.log(field,value) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts index a3c7a12e7..0544c52b0 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts @@ -204,29 +204,65 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ field: 'remark', sort: 'custom', }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isDetail:true, + isForm: false, + isTable:false + }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, - isTable:false, - isDetail: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')] + } + }, detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isTable:false, + isForm: false, + table:{ + width:180 + } + }, + { + label: '更新者', + field: 'updater', + sort: 'custom', + isDetail:true, isForm: false, + isTable:false }, { - label: '最后更新时间', + label: '更新时间', field: 'updateTime', sort: 'custom', formatter: dateFormatter, - isTable:false, - isDetail: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')] + } + }, detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isTable:false, isForm: false, + table:{ + width:180 + } }, ])) // 表单校验 diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts index e3736494e..48a011078 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts @@ -38,6 +38,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false, + fixed: 'left', table:{ width:180 } @@ -231,6 +232,14 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ width:150 } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isDetail:true, + isForm: false, + isTable:false + }, { label: '创建时间', field: 'createTime', @@ -247,13 +256,37 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, - form: { + isTable:false, + 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: { - type: 'datetime', - valueFormat: 'x', + 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 diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts index c4729e2f4..2b61a8290 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts @@ -1,6 +1,22 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { validateTwoNum } from '@/utils/validator' +import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 + +let custormList = [] +try { + custormList = await CustomerSaleInvoiceMainApi.getCustomerList() + if(custormList.length>0){ + custormList.unshift({ + customerCode:'ALL', + customerName:t('ts.全选'), + }) + } + console.log('custormList11',custormList) +} catch (error) { + +} // 表单校验 export const CustomerStatementMainRules = reactive({ @@ -29,6 +45,22 @@ export const CustomerStatementMain = useCrudSchemas(reactive([ field: 'customerCode', sort: 'custom', isSearch: true, + search:{ + component:'Select', + value:custormList.length>1?[custormList[0]['customerCode']]:[], + componentProps: { + showAll:true,// 备用做全选 + multiple:true, + // emptyValues:[null, undefined], + valueOnClear:null, + options:custormList.length>0?custormList.map(item=>({ + label:item.customerName, + value:item.customerCode + })):[] + + } + + }, }, { label: '客户名称', @@ -82,6 +114,11 @@ export const CustomerStatementMain = useCrudSchemas(reactive([ //value: '',//可以添加默认值 有无都可 component: 'Select', }, + search:{ + componentProps: { + multiple:true + } + }, }, { @@ -426,6 +463,14 @@ export const CustomerStatementShareReconciliation = useCrudSchemas(reactive - + @@ -254,7 +254,7 @@ const butttondata = (row, $index) => { { label: t('ts.确认对比结果'), name: 'confirmationContrast', - hide: isShowMainButton(row, ['2']), + hide: row.isCompare!='1', type: 'primary', icon: '', color: '', @@ -273,7 +273,7 @@ const butttondata = (row, $index) => { { label: t('ts.确认分摊金额'), name: 'confirmShareMoney', - hide: isShowMainButton(row, ['4']), + hide: row.isShare!='1', type: 'primary', color: '', hasPermi: 'wms:customer-statement-main:confirmationShare', @@ -428,7 +428,42 @@ const searchFormClick = (searchData) => { } getList() // 刷新当前列表 } - +const seachRef = ref() +const onSearchChange = (field, value)=>{ + if(field=='status'){ + // 状态 + if(value.length>0){ + if(value[value.length-1]==''){ + //全选 + seachRef.value.setFormValues({ + status:[''] + }) + }else{ + seachRef.value.setFormValues({ + status:value.filter(item=>item!='') + }) + } + } + } + if(field=='customerCode'){ + if(value.length>0){ + if(value[value.length-1]=='ALL'){ + //全选 + seachRef.value.setFormValues({ + customerCode:['ALL'] + }) + }else{ + seachRef.value.setFormValues({ + customerCode:value.filter(item=>item!='ALL') + }) + } + } + } +} +const searchClick = async (data)=>{ + console.log('查询',data) + setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) +} /** 初始化 **/ onMounted(async () => { getList() @@ -592,6 +627,10 @@ const changeTabs = async (item) => { { key: 'masterId', value: chooseRow.value.id + }, + { + key: 'status', + value: 0 } ] apiPage.value = CustomerStatementDetailApi.getCustomerToolApportStatementPage @@ -636,6 +675,7 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => { handleExportReconciliation(detailTableObject) } else if (tabCurrent.value.prop == 'ShareReconciliation') { // 子表导出模具分摊对账单 + handleExportShareReconciliation(detailTableObject) } } else if (val == 'againContrast') { // 重新对比 @@ -689,7 +729,24 @@ const handleExportDetail = async (detailTableObject) => { const data = await CustomerStatementDetailApi.exportCustomerStatementDetail( detailTableObject.params ) - download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`) + download.excel(data, `客户对账单明细子【${formatDate(new Date())}】.xlsx`) + } catch { + } finally { + exportLoading.value = false + } +} + +// 模具分摊对账单导出 +const handleExportShareReconciliation = async (detailTableObject) => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + exportLoading.value = true + const data = await CustomerStatementDetailApi.exportCustomerStatementShareReconciliatioDetail( + detailTableObject.params + ) + download.excel(data, `模具分摊对账单子${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts new file mode 100644 index 000000000..3bec8d33d --- /dev/null +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts @@ -0,0 +1,221 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter , dateFormatterYM } from '@/utils/formatTime' +import { validateTwoNum } from '@/utils/validator' +import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 + +let custormList = [] +try { + custormList = await CustomerSaleInvoiceMainApi.getCustomerList() + if(custormList.length>0){ + custormList.unshift({ + customerCode:'ALL', + customerName:t('ts.全选'), + }) + } + console.log('custormList11',custormList) +} catch (error) { + +} + + +export const CustomerStatementShareRecordMain = useCrudSchemas(reactive([ + + { + label: '单据号', + field: 'number', + sort: 'custom', + fixed: 'left', + isSearch: true, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.CUSTOMER_TOOL_APPORT_STATEMENT_TYPE, + dictClass: 'string', + form: { + //value: '',//可以添加默认值 有无都可 + component: 'Select', + }, + }, + { + label: '版本号', + field: 'versionNumber', + sort: 'custom', + isTable: false + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + isSearch: true, + search:{ + component:'Select', + value:custormList.length>1?[custormList[0]['customerCode']]:[], + componentProps: { + showAll:true,// 备用做全选 + multiple:true, + // emptyValues:[null, undefined], + valueOnClear:null, + options:custormList.length>0?custormList.map(item=>({ + label:item.customerName, + value:item.customerCode + })):[] + + } + + }, + }, + { + label: '客户名称', + field: 'customerName', + sort: 'custom', + isSearch: false, + }, + { + 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 CustomerStatementShareRecordDetail = useCrudSchemas(reactive([ + + { + label: '厂家编号', + field: 'factoryCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + + { + label: '厂家名称', + field: 'factoryName', + sort: 'custom', + isForm: false, + }, + { + label: '帐票号', + field: 'invoiceNumber', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '品号', + field: 'articleNumber', + sort: 'custom', + isForm: false, + }, + { + label: '车型', + field: 'vehicleType', + sort: 'custom', + isForm: false, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '模具分摊金额', + field: 'amount', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '调整金额', + field: 'adjustmentAmount', + sort: 'custom', + isForm: false, + } +])) + + diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/index.vue new file mode 100644 index 000000000..b99e25fc1 --- /dev/null +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/index.vue @@ -0,0 +1,251 @@ + + + diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts index d9a30c4a3..38f6d0e33 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts @@ -1,6 +1,23 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 +let custormList = [] +try { + custormList = await CustomerSaleInvoiceMainApi.getCustomerList() + + if(custormList.length>0){ + custormList.unshift({ + customerCode:'ALL', + customerName:t('ts.全选'), + }) + } + console.log('custormList11',custormList) + +} catch (error) { + +} // 表单校验 export const CustomerToolApportStatementForecastMainRules = reactive({ customerCode: [required], @@ -20,6 +37,22 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive1?[custormList[0]['customerCode']]:[], + componentProps: { + showAll:true,// 备用做全选 + multiple:true, + // emptyValues:[null, undefined], + valueOnClear:null, + options:custormList.length>0?custormList.map(item=>({ + label:item.customerName, + value:item.customerCode + })):[] + + } + + }, }, { label: '客户名称', @@ -49,28 +82,61 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive - + @@ -32,8 +32,8 @@ {{ row.number }} -