From ef8240f531a01774fdbeab4a1593a4518e670b75 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 21 Oct 2024 15:47:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerSaleInvoiceMain.data.ts | 171 ++++++- .../customerSaleInvoiceMain/index.vue | 439 +++++++++++++++--- 2 files changed, 533 insertions(+), 77 deletions(-) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts index cbef4fcb3..0fbce55ae 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts @@ -1,5 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { + CustomerStatementMain, +} from '../../deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data' +import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' // 表单校验 export const CustomerSaleInvoiceMainRules = reactive({ @@ -15,49 +19,100 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, - } ,{ + isForm: false, + }, + { label: '状态', field: 'status', sort: 'custom', isSearch: true, + isForm:false, // 0:新增1:已发布2已作废 }, { - label: '客户对账单单据号', + label: '客户对账单', field: 'customerStatementNumber', sort: 'custom', isSearch: true, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户对账单', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '客户对账单信息', // 查询弹窗标题 + searchAllSchemas: CustomerStatementMain.allSchemas, // 查询弹窗所需类 + searchPage: CustomerStatementMainApi.getCustomerStatementMainPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, { label: '客户代码', field: 'customer', sort: 'custom', isSearch: true, + form: { + componentProps: { + disabled:true + } + } }, { label: '客户名称', field: 'customerName', sort: 'custom', + form: { + componentProps: { + disabled: true + } + } }, { label: '未税金额', field: 'beforeTaxAmount', sort: 'custom', + form: { + componentProps: { + disabled: true + } + } }, { - label: '税率', + label: '税率(%)', field: 'taxRate', + dictType: DICT_TYPE.TAX_RATE_DICT, + dictClass: 'string', + sortTableDefault: 3, + isTable: true, sort: 'custom', + table: { + width: 150 + }, }, { label: '税额', field: 'taxAmount', sort: 'custom', + form: { + componentProps: { + disabled: true + } + } }, { label: '价税合计金额', field: 'adTaxAmount', sort: 'custom', + form: { + componentProps: { + disabled: true + } + } }, { label: '金税票号', @@ -95,7 +150,8 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ label: '是否可用默认TRUE', field: 'available', sort: 'custom', - isTable:false + isTable: false, + isForm:false }, { label: '创建时间', @@ -122,3 +178,110 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ } } ])) +// 表单校验 +export const CustomerSaleInvoiceDetailRules = reactive({ + beforeTaxAmount: [required], + taxRate: [required], + taxAmount: [required], + adTaxAmount: [required], +}) + +export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive([ + { + label: '品番', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + tableForm: { + disabled:true + } + }, + { + label: '品号', + field: 'articleNumber', + sort: 'custom', + isSearch: true, + isForm: false, + // 0:新增1:已发布2已作废 + }, + { + label: '数量', + 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 + }] + } + } + }, + { + label: '销售单价', + field: 'price', + sort: 'custom', + isSearch: true, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '模具分摊单价', + field: 'allocationPrice', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '合计单价', + field: 'beforeTaxAmount', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '未税金额', + field: 'taxRate', + sort: 'custom', + }, + { + label: '税额', + field: 'taxAmount', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '含税金额', + field: 'adTaxAmount', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + } + }, + +])) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue index 7f69959e8..5141e9782 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue @@ -1,7 +1,7 @@