From d515d569cb928444c20967a8d475d914ad9c6310 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Tue, 19 Nov 2024 15:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/customerSaleInvoiceDetail/index.ts | 11 ++ src/api/wms/customerSaleInvoiceMain/index.ts | 22 ++- src/utils/dict.ts | 4 +- .../customerSaleInvoiceRecordMain.data.ts | 108 ++++++++++----- .../customerSaleInvoiceRecordMain/index.vue | 28 +++- .../customerSaleInvoiceRequestMain.data.ts | 120 +++++++++++++--- .../customerSaleInvoiceRequestMain/index.vue | 128 +++++++----------- 7 files changed, 277 insertions(+), 144 deletions(-) diff --git a/src/api/wms/customerSaleInvoiceDetail/index.ts b/src/api/wms/customerSaleInvoiceDetail/index.ts index 19d594304..af4c750bd 100644 --- a/src/api/wms/customerSaleInvoiceDetail/index.ts +++ b/src/api/wms/customerSaleInvoiceDetail/index.ts @@ -27,6 +27,17 @@ export const getCustomerSaleInvoiceDetailPage = async (params) => { return await request.get({ url: `/wms/customer-sale-invoice-detail/page`, params }) } } +// 查询客户销售开票子信息表(WMS)列表 +export const getCustomerSaleInvoiceRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-sale-invoice-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/customer-sale-invoice-record-detail/page`, params }) + } +} + // 查询客户销售开票子信息表(WMS)详情 export const getCustomerSaleInvoiceDetail = async (id: number) => { diff --git a/src/api/wms/customerSaleInvoiceMain/index.ts b/src/api/wms/customerSaleInvoiceMain/index.ts index 32ce70ad8..7bad6f0c0 100644 --- a/src/api/wms/customerSaleInvoiceMain/index.ts +++ b/src/api/wms/customerSaleInvoiceMain/index.ts @@ -57,6 +57,15 @@ export const exportCustomerSaleInvoiceMain = async (params) => { return await request.download({ url: `/wms/customer-sale-invoice-main/export-excel`, params }) } } +// 导出销售开票记录 Excel +export const exportCustomerSaleInvoiceRecordMain = async (params) => { + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/wms/customer-sale-invoice-record-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/customer-sale-invoice-record-main/export-excel`, params }) + } +} // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/customer-sale-invoice-main/get-import-template' }) @@ -66,8 +75,8 @@ export const importTemplate = () => { export const getCustomerSaleInvoiceRecodeMainPage = async (params) => { if (params.isSearch) { delete params.isSearch - // const data = {...params} - // return await request.post({ url: '/wms/customer-sale-invoice-main/senior', data }) + const data = {...params} + return await request.post({ url: '/wms/customer-sale-invoice-record-main/senior', data }) } else { return await request.get({ url: `/wms/customer-sale-invoice-record-main/page`, params }) } @@ -81,3 +90,12 @@ export const publish = async (id: number) => { export const nodeAbrogate = async (id: number) => { return await request.get({ url: `/wms/customer-sale-invoice-main/nodeAbrogate?id=` + id}) } + +// 从客户对账单中获取客户代码 -- 销售申请 +export const getCustomerList = async () => { + return await request.get({ url: `/wms/customer-statement-main/getCustomerList`}) +} +// 从客户对账单中获取客户代码 -- 销售记录 +export const getRecordCustomerList = async () => { + return await request.get({ url: `/wms/customer-sale-invoice-record-main/getCustomerList`}) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 1db5931f7..8755f5c6e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -410,5 +410,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客户对账单 模具分摊状态 - DELIVER_METHOD = 'deliver_method' + DELIVER_METHOD = 'deliver_method', + CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type' // 销售开票 + } diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts index 500d5d257..3955a8085 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts @@ -4,7 +4,23 @@ import { CustomerStatementMain, } from '../moldAllocation/customerStatement/customerStatementMain.data' import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' +import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 + +let custormList = [] +try { + custormList = await CustomerSaleInvoiceMainApi.getRecordCustomerList() + if(custormList.length>0){ + custormList.unshift({ + customerCode:'ALL', + customerName:t('ts.全选'), + }) + } + console.log('custormList11',custormList) +} catch (error) { + +} // 表单校验 export const CustomerSaleInvoiceMainRules = reactive({ customerStatementNumber: [required], @@ -25,12 +41,13 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ isForm: false, }, { - label: '状态', - field: 'status', + label: '申请单号', sort: 'custom', isSearch: true, - isForm:false, - // 0:新增1:已发布2已作废 + field: 'requestNumber', + table:{ + width:150 + } }, { label: '客户对账单', @@ -52,6 +69,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ isMainValue: false }] } + }, + table:{ + width:180 } }, { @@ -63,6 +83,25 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ componentProps: { disabled: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 + })):[] + + } + + }, + table:{ + width:150 } }, { @@ -73,6 +112,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ componentProps: { disabled: true } + }, + table:{ + width:150 } }, { @@ -83,6 +125,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ componentProps: { disabled: true } + }, + table:{ + width:150 } }, { @@ -114,12 +159,18 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ componentProps: { disabled: true } + }, + table:{ + width:150 } }, { label: '金税票号', field: 'goldenTaxInvoiceNumber', sort: 'custom', + table:{ + width:150 + } }, { label: '开票日期', @@ -141,6 +192,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ valueFormat: 'x' } }, + table:{ + width:180 + } }, { @@ -148,21 +202,21 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ field: 'remark', sort: 'custom', }, - { - 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: '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, + // }, ])) // 表单校验 export const CustomerSaleInvoiceDetailRules = reactive({ @@ -237,22 +291,6 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive([ field: 'qty', sort: 'custom', isSearch: true, - form: { - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户对账单', // 输入框占位文本 - searchField: '', // 查询弹窗赋值字段 - searchTitle: '客户对账单信息', // 查询弹窗标题 - searchAllSchemas: CustomerStatementMain.allSchemas, // 查询弹窗所需类 - searchPage: CustomerStatementMainApi.getCustomerStatementMainPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - }, tableForm: { type: 'InputNumber', precision: 2, diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue index 180cc887c..e34e66657 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue @@ -1,7 +1,7 @@