diff --git a/src/sscivm/invoiceSale/invoiceSale/list/invoiceSaleList.js b/src/sscivm/invoiceSale/invoiceSale/list/invoiceSaleList.js index 6a3ae86..a8370a6 100644 --- a/src/sscivm/invoiceSale/invoiceSale/list/invoiceSaleList.js +++ b/src/sscivm/invoiceSale/invoiceSale/list/invoiceSaleList.js @@ -2,6 +2,7 @@ import React, { Component } from "react"; import { + formDownload, createPage, getMultiLang, base, @@ -56,7 +57,9 @@ class InvoiceSale extends Component { }, // 作废 [presetVar.headBtns.Download]: () => { - Download.call(this); + this.props.modal.show('LnvoiceDownloadTypeModal'); + this.props.form.setFormStatus('LnvoiceDownloadType', 'edit'); + // Download.call(this); }, // 下载 [presetVar.headBtns.LinkBill]: () => { @@ -87,6 +90,14 @@ class InvoiceSale extends Component { handlePageInfoChange = (...params) => { handlePageInfoChange.call(this, ...params); }; + // onAfterEditForm = (props, moduleId, key, value, oldValue) => { + // let map = { + // pdf_type: {value: key == 'pdf_type' ? value.value : false, display: key == 'pdf_type' ? value.value ? '是' : '否' : '否'}, + // xml_type: {value: key == 'xml_type' ? value.value : false, display: key == 'xml_type' ? value.value ? '是' : '否' : '否'}, + // ofd_type: {value: key == 'ofd_type' ? value.value : false, display: key == 'ofd_type' ? value.value ? '是' : '否' : '否'} + // } + // this.props.form.setFormItemsValue('LnvoiceDownloadType', map) + // } //单选事件 onSelected = (props, moduleId, status, index, isSelect) => {//单选第五个参数为是否选中(true/false) @@ -121,6 +132,8 @@ class InvoiceSale extends Component { }, props: { search: {NCCreateSearch,}, + form: {createForm,}, + modal: {createModal,}, table: {createSimpleTable,}, }, headerBtnEventDistribute, @@ -262,6 +275,99 @@ class InvoiceSale extends Component { this.props.modal.close('redinfomodal'); } })} + {this.props.modal.createModal('LnvoiceDownloadTypeModal', { + title: '发票类型', + content: ( +
+
+ {createForm('LnvoiceDownloadType', { + onAfterEvent: this.onAfterEditForm,//表单编辑后事件 + })} +
+
+ ), + size: '100', + beSureBtnClick: () => { + let formData = this.props.table.getCheckedRows(presetVar.tableAreaId); + let formMap = this.props.form.getAllFormValue('LnvoiceDownloadType'); + + let {pdf_type, xml_type, ofd_type} = formMap.rows[0].values + + let invoiceType = pdf_type.value ? '1' : xml_type.value ? '2' : ofd_type.value ? '3' : ''; + if (!invoiceType) { + return toast({ + color: 'danger', + content: '请选择下载的文件类型' + }) + } + for(let i=0;i { + // formDownload({ + // params, + // url: '/nccloud/sscivm/ivsale/InvoiceDownloadAction.do', + // enctype: 1 + // }); + // } + // }) + + // formDownload({ + // params, + // url: '/nccloud/sscivm/ivsale/InvoiceDownloadAction.do', + // // url: '/nccloud/sscivm/ivsale/InvoiceIsDownloadAction.do', + // enctype: 1 + // }); + }, + cancelBtnClick: () => { + this.props.modal.close('LnvoiceDownloadTypeModal') + }, + userControl: true + })} );