From b1c9d117e356ed601d8072dfb3547ea681030b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Wed, 24 May 2023 16:16:31 +0800 Subject: [PATCH] fix --- src/views/invoice/Detail.jsx | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/views/invoice/Detail.jsx b/src/views/invoice/Detail.jsx index 0cd3dfa..dda8031 100644 --- a/src/views/invoice/Detail.jsx +++ b/src/views/invoice/Detail.jsx @@ -43,7 +43,11 @@ function Detail() { return {'info_money':data.GMD_Cost,'info_Currency':data.GMD_Currency,'info_date':isNotEmpty(data.GMD_PayDate)?dayjs(data.GMD_PayDate):'','info_gmdsn':data.GMD_SN}; } }); - form.setFieldsValue(formData[arrLen-1]); //{'info_money':'111','info_Currency':'THB','info_date':''} + + if (form){ + form.setFieldsValue(formData[arrLen-1]); //{'info_money':'111','info_Currency':'THB','info_date':''} + } + //图片列表 let arrPicList = ZDDetail.map((data,index)=>{ @@ -66,10 +70,9 @@ function Detail() { }); } return picList; - + }) setInvoicePicList(arrPicList); - }) .catch(ex => { notification.error({ @@ -83,12 +86,13 @@ function Detail() { setDataLoading(false); }); - // if (invoiceStore.invoiceFormData){ - // form.setFieldsValue(invoiceStore.invoiceFormData); - // } - }, [GMDSN, GSN]); + + function defaultShow(json){ + + } + const fileList = toJS(invoicekImages); //图片列表 let arrimg = []; @@ -192,13 +196,21 @@ function Detail() { return arr; } + function addInvoice(){ + invoiceStore.postAddInvoice(GSN, "", 0, "", "[]", "").then((data) => { + runInAction(() => { + invoiceStore.invoiceFormData = {'info_money':0,'info_Currency':'','info_date':'','info_gmdsn':GMDSN}; + }); + }); + } + function addButton(check) { if (check) { return ( - @@ -372,7 +384,7 @@ function Detail() { return ( <> - - + */}