From 358807bb83a348268a6a5ed073ae4c8508c4faa0 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 20 Mar 2025 13:45:35 +0800 Subject: [PATCH] =?UTF-8?q?YT-2203=E4=BB=8E=E3=80=8A=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E3=80=8B=E5=88=9B=E5=BB=BA=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7=E6=97=B6=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E4=BB=8E=E3=80=8A=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E3=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 8 +++- .../CustomerSaleInvoiceBasicForm.vue | 10 +++-- .../customerSaleInvoiceRequestMain.data.ts | 45 ++++++++++++++++++- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index d62b8be0f..ed8a6188b 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -93,7 +93,7 @@ :fixedScrollHieght="fixedScrollHieght" :maxHeight="fixedScrollHieght?'auto':490" :tableFields="tableAllSchemas.tableFormColumns" - :tableData="tableData" + :tableData="showTypeList.length>0&&!showTypeList.includes('')?tableData.filter(aItem => showTypeList.some(bItem => aItem.invoiceType === bItem)):tableData" :tableFormRules="tableFormRules" :isShowButton="isShowButton" :isShowReduceButton="isShowReduceButton" @@ -400,6 +400,12 @@ const props = defineProps({ required: false, default: false }, + // 子表显示某种类型数据 + showTypeList:{ + type: Array, + required: false, + default: [] + }, }) const { t } = useI18n() // 国际化 diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index b41b93e2b..fdf0d5bae 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -10,6 +10,7 @@ :tableAllSchemas="CustomerSaleInvoiceDetail.allSchemas" :tableFormRules="CustomerSaleInvoiceDetailRules" :tableData="tableData" + :showTypeList="showTypeList" :apiUpdate="CustomerSaleInvoiceMainApi.updateCustomerSaleInvoiceMain" :apiCreate="CustomerSaleInvoiceMainApi.createCustomerSaleInvoiceMain" :isBusiness="true" @@ -127,11 +128,9 @@ const openFormTable =async (type: string, row?: any, list?:any) => { initTableDataPrice() }) } - +const showTypeList = ref([]) const onChange = (field, cur, formRef)=>{ - console.log('onChange',field, cur, formRef) - if(field == 'taxRate'){ // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 tableData.value.forEach(item=>{ @@ -139,6 +138,11 @@ const onChange = (field, cur, formRef)=>{ // 含税金额 = 未税价格+税额,四舍五入保留2位小数 item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] }) + } else if (field == 'invoiceType') { + showTypeList.value = cur + // if (cur == '补给品') { + // tableData.value = + // } } } const inputNumberChange = (field, index, row, val) => { diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts index 0c0824221..757b3128f 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts @@ -252,7 +252,35 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ width:150 } }, - + { + label: '开票种类', + field: 'invoiceType', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Select', + componentProps: { + showAll: true,// 备用做全选 + multiple: true, + // emptyValues:[null, undefined], + valueOnClear: null, + options: [{ + label: '全部', + value: '' + }, { + label: '号口品', + value: '号口品' + }, { + label: '补给品', + value: '补给品' + }] + } + }, + }, { label: '创建时间', field: 'createTime', @@ -415,6 +443,21 @@ form:{ disabled:true } }, + { + label: '开票种类', + field: 'invoiceType', + dictType: DICT_TYPE.TAX_RATE_DICT, + dictClass: 'string', + isTable: true, + isTableForm: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled:true + } + }, { label: '品号', field: 'articleNumber',