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',