diff --git a/src/views/invoice/Detail.jsx b/src/views/invoice/Detail.jsx index 4755e0b..e7259dd 100644 --- a/src/views/invoice/Detail.jsx +++ b/src/views/invoice/Detail.jsx @@ -22,9 +22,6 @@ function Detail() { const { formCurrency, onCurrencyChange } = useState(); const { notification } = App.useApp(); - const [isModalOpen, setIsModalOpen] = useState(false); - const [confirmLoading, setConfirmLoading] = useState(false); - const [invoicePicList,setInvoicePicList] = useState([]); @@ -132,36 +129,6 @@ function Detail() { }; - const onAddFinish = values => { - const fieldVaule = { - ...values, - 'info_date': isNotEmpty(values['info_date']) ? values['info_date'].format('YYYY-MM-DD') : null, - 'info_images': JSON.stringify(arrimg), - } - console.log("Success:", fieldVaule); - //入库 - if (fieldVaule) { - invoiceStore.postAddInvoice(GSN, fieldVaule.info_Currency, fieldVaule.info_money, fieldVaule.info_date, fieldVaule.info_images, "").then((data) => { - console.log("return:",data); - runInAction(() => { - let param = { 'info_money': fieldVaule.info_money, 'info_Currency': fieldVaule.info_Currency, 'info_date': fieldVaule.info_date }; - invoiceStore.invoiceFormData = param; - }) - if (data.errcode == 0 ){ - // notification.success({ - // message: `Notification`, - // description: "Success Submit!", - // placement: "top", - // duration: 4, - // }); - setIsModalOpen(false); - } - - }); - } - - }; - const handleChange = info => { console.log(info); @@ -197,10 +164,7 @@ function Detail() { } function addInvoice(){ - invoiceStore.postAddInvoice(GSN, "", 0, "", "[]", "").then((data) => { - runInAction(() => { - invoiceStore.invoiceFormData = {'info_money':0,'info_Currency':'','info_date':'','info_gmdsn':GMDSN}; - }); + invoiceStore.postAddInvoice(GSN, "", 0, "", "[]", "").then((data) => { }).finally(()=>{ defaultShow(); }) @@ -244,13 +208,13 @@ function Detail() {
Click to Upload
- 提交信息 + Details - + - 金额币种: + {addButton(index + 1 == invoiceZDDetail.length)} @@ -276,7 +240,7 @@ function Detail() {
- 上传照片 + Upload Invoice - 提交信息 + Details @@ -358,108 +322,10 @@ function Detail() { } - //#region Modal - const showConfirmModal = (confirm) => { - setIsModalOpen(true); - }; - - const fromRef = useRef() - const handleOk = () => { - setConfirmLoading(true); - try{ - fromRef.current?.submit(); - //onAddFinish; - //setIsModalOpen(false); - } finally{ - - setConfirmLoading(false); - navigate("/invoice/detail/"+GMDSN+"/"+GSN) - } - }; - const handleCancel = () => { - setIsModalOpen(false); - }; - - //#endregion - - return ( <> - {/* - Add New Invoice - - 上传照片 - - -
- -
Click to Upload
-
-
-
- 提交信息 - - - - - - - - - - - - -
*/} @@ -471,24 +337,6 @@ function Detail() { - 基础信息 - - - -

CHINA HIGHLIGHTS

-
- - - -

{invoiceGroupInfo.WLFirstName} {invoiceGroupInfo.WLLastName}    Email: {invoiceGroupInfo.WLEmail}

-
- - - -

{invoiceGroupInfo.County}

-
- -
报账信息 {bindSubmitForm()}