Merge branch 'main' of github.com:hainatravel/GHHub

release
Jimmy Liow 2 years ago
commit 54d48b583b

@ -75,12 +75,9 @@ class Invoice {
}; };
}); });
this.invoicePage.total = json.Result[0].TotalCount; this.invoicePage.total = json.Result[0].TotalCount;
} else {
this.invoiceList = [];
} }
// else{
// this.invoiceList=[];
// this.invoicePage.total=0;
// }
} else { } else {
throw new Error(json.errmsg + ": " + json.errcode); throw new Error(json.errmsg + ": " + json.errcode);
} }

@ -170,7 +170,7 @@ function Detail() {
name="ghhfile" name="ghhfile"
accept="image/*" accept="image/*"
multiple={true} multiple={true}
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GRI_SN}&VEI_SN=${authStore.login.travelAgencyId}`} action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GRI_SN}&VEI_SN=${authStore.login.travelAgencyId}&token=${authStore.login.token}`}
fileList={fileList} fileList={fileList}
listType="picture-card" listType="picture-card"
onChange={handleChange} onChange={handleChange}

@ -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}; 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)=>{ let arrPicList = ZDDetail.map((data,index)=>{
@ -66,10 +70,9 @@ function Detail() {
}); });
} }
return picList; return picList;
}) })
setInvoicePicList(arrPicList); setInvoicePicList(arrPicList);
}) })
.catch(ex => { .catch(ex => {
notification.error({ notification.error({
@ -83,12 +86,13 @@ function Detail() {
setDataLoading(false); setDataLoading(false);
}); });
// if (invoiceStore.invoiceFormData){
// form.setFieldsValue(invoiceStore.invoiceFormData);
// }
}, [GMDSN, GSN]); }, [GMDSN, GSN]);
function defaultShow(json){
}
const fileList = toJS(invoicekImages); const fileList = toJS(invoicekImages);
// //
let arrimg = []; let arrimg = [];
@ -192,13 +196,21 @@ function Detail() {
return arr; 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) { function addButton(check) {
if (check) { if (check) {
return ( return (
<Row> <Row>
<Divider orientation="left"></Divider> <Divider orientation="left"></Divider>
<Button type="primary" block onClick={() => showConfirmModal(confirm)}> <Button type="primary" block onClick={() => addInvoice(confirm)}>
ADD New Invoice ADD New Invoice
</Button> </Button>
</Row> </Row>
@ -221,7 +233,7 @@ function Detail() {
name="ghhfile" name="ghhfile"
accept="image/*" accept="image/*"
multiple={true} multiple={true}
action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice`} action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`}
fileList={invoicePicList[index]} fileList={invoicePicList[index]}
listType="picture-card" listType="picture-card"
> >
@ -372,7 +384,7 @@ function Detail() {
return ( return (
<> <>
<Modal {/* <Modal
centered centered
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
open={isModalOpen} onOk={handleOk} onCancel={handleCancel} open={isModalOpen} onOk={handleOk} onCancel={handleCancel}
@ -445,7 +457,7 @@ function Detail() {
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal> */}
<Space direction="vertical" style={{ width: "100%" }}> <Space direction="vertical" style={{ width: "100%" }}>
<Row gutter={16}> <Row gutter={16}>
<Col span={20}> <Col span={20}>

@ -26,14 +26,8 @@ function Index() {
key: "GroupName", key: "GroupName",
render: (text, record) => <NavLink to={`/invoice/detail/${record.key}/${record.gmd_gri_sn}`}>{text}</NavLink>, render: (text, record) => <NavLink to={`/invoice/detail/${record.key}/${record.gmd_gri_sn}`}>{text}</NavLink>,
}, },
{ {
title: "离团时间", title: "Arrival Date",
dataIndex: "GetGDate",
key: "GetGDate",
render: (text, record) => formatDate(new Date(text)),
},
{
title: "接团时间",
key: "LeftGDate", key: "LeftGDate",
dataIndex: "LeftGDate", dataIndex: "LeftGDate",
render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""),
@ -48,17 +42,6 @@ function Index() {
key: "AllMoney", key: "AllMoney",
dataIndex: "AllMoney", dataIndex: "AllMoney",
}, },
{
title: "填表时间",
key: "GMD_FWks_LastEditTime",
dataIndex: "GMD_FWks_LastEditTime",
render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""),
},
{
title: "填表人",
key: "GMD_FillWorkers_Name",
dataIndex: "GMD_FillWorkers_Name",
},
{ {
title: "账单状态", title: "账单状态",
key: "status", key: "status",

Loading…
Cancel
Save