Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
94effd5f
Commit
94effd5f
authored
Mar 08, 2024
by
guang.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改上传发票逻辑
parent
dfda61d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
72 deletions
+61
-72
env.config.js
config/env.config.js
+1
-1
InvoiceListModal.jsx
src/pages/PaymentMange/components/InvoiceListModal.jsx
+26
-63
UploadInvoiceModal.jsx
src/pages/PaymentMange/components/UploadInvoiceModal.jsx
+2
-2
index.jsx
src/pages/PaymentMange/index.jsx
+9
-6
bll.js
src/utils/bll.js
+23
-0
No files found.
config/env.config.js
View file @
94effd5f
import
RoleType
,
{
isPlatForm
}
from
'
./role.config
'
;
import
RoleType
,
{
isPlatForm
}
from
'
./role.config
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
sc
'
;
const
environment
=
'
yxm2
'
;
const
envAPi
=
{
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
...
...
src/pages/PaymentMange/components/InvoiceListModal.jsx
View file @
94effd5f
import
React
,
{
useRef
,
useEffect
}
from
'
react
'
;
import
React
,
{
useRef
,
useEffect
}
from
'
react
'
;
import
{
Modal
,
Form
,
Upload
,
Input
}
from
'
antd
'
;
import
{
Modal
,
Form
,
Upload
,
Input
}
from
'
antd
'
;
import
{
merchantView
}
from
'
../service
'
;
import
{
apiMerchantView
}
from
'
../service
'
;
import
{
getFileData
}
from
'
@/utils/bll
'
;
const
formItemLayout
=
{
const
formItemLayout
=
{
labelCol
:
{
span
:
4
},
labelCol
:
{
span
:
4
},
...
@@ -15,68 +16,30 @@ const InvoiceListModal = props => {
...
@@ -15,68 +16,30 @@ const InvoiceListModal = props => {
const
{
id
}
=
props
;
const
{
id
}
=
props
;
const
getDetail
=
async
()
=>
{
const
getDetail
=
async
()
=>
{
// const data = await merchantView(id);
const
res
=
await
apiMerchantView
(
id
);
// if (data.businessCode === '0000') {
if
(
res
&&
res
.
data
)
{
// // settoExamineData({ ...data.data });
const
{
invoiceFiles
=
[],
refuseReason
}
=
res
.
data
;
// // setToExamineModalVisibel(true);
// 发票列表
// // setVisibleInvoiceList(true);
const
invoiceList
=
[];
// refForm.current?.setFieldsValue?.({
// 补录发票列表
// fileList: [{ url: 'https://kdspstatic.q-gp.com//CAA61F398F500001A395224099801D75.png', name: '18.png', uid: 0, status: 'done' }],
const
subInvoiceList
=
[];
// other: '11111',
// sFileList: [{ url: 'https://kdspstatic.q-gp.com//CAA61F398F500001A395224099801D75.png', name: '18.png', uid: 0, status: 'done' }],
invoiceFiles
.
forEach
(
item
=>
{
// sOther: '2222',
if
(
item
.
supplementary
)
{
// })
subInvoiceList
.
push
(
item
);
// }
}
else
{
refForm
.
current
?.
setFieldsValue
?.({
invoiceList
.
push
(
item
);
fileList
:
[
}
{
});
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
const
params
=
{
uid
:
0
,
fileList
:
getFileData
(
invoiceList
,
'
filePath
'
,
'
fileName
'
),
status
:
'
done
'
,
other
:
refuseReason
,
},
sFileList
:
getFileData
(
subInvoiceList
,
'
filePath
'
,
'
fileName
'
),
],
sOther
:
''
,
other
:
'
11111
'
,
};
sFileList
:
[
refForm
.
current
?.
setFieldsValue
?.(
params
);
{
}
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
0
,
status
:
'
done
'
,
},
{
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
1
,
status
:
'
done
'
,
},
{
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
2
,
status
:
'
done
'
,
},
{
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
3
,
status
:
'
done
'
,
},
{
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
4
,
status
:
'
done
'
,
},
{
url
:
'
https://kdspstatic.q-gp.com/CAA61F398F500001A395224099801D75.png
'
,
name
:
'
18.png
'
,
uid
:
5
,
status
:
'
done
'
,
},
],
sOther
:
'
2222
'
,
});
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/pages/PaymentMange/components/UploadInvoiceModal.jsx
View file @
94effd5f
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
import
{
Modal
,
notification
,
Form
}
from
'
antd
'
;
import
{
Modal
,
notification
,
Form
}
from
'
antd
'
;
import
Upload
from
'
./CustomUpload
'
;
import
Upload
from
'
./CustomUpload
'
;
import
{
formItemLayout
}
from
'
../data
'
;
import
{
formItemLayout
}
from
'
../data
'
;
import
{
upload
Bill
}
from
'
../service
'
;
import
{
apiUploadSupplementary
Bill
}
from
'
../service
'
;
/**
/**
* 上传发票弹窗
* 上传发票弹窗
...
@@ -20,7 +20,7 @@ const UploadInvoiceModal = props => {
...
@@ -20,7 +20,7 @@ const UploadInvoiceModal = props => {
fileName
:
fileList
[
0
]?.
name
||
''
,
fileName
:
fileList
[
0
]?.
name
||
''
,
id
,
id
,
};
};
const
data
=
await
upload
Bill
(
params
);
const
data
=
await
apiUploadSupplementary
Bill
(
params
);
if
(
data
.
businessCode
===
'
0000
'
)
{
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
上传成功
'
});
notification
.
success
({
message
:
'
上传成功
'
});
props
.
onCancel
(
true
);
props
.
onCancel
(
true
);
...
...
src/pages/PaymentMange/index.jsx
View file @
94effd5f
...
@@ -19,7 +19,7 @@ import {
...
@@ -19,7 +19,7 @@ import {
selfPaymentExport
,
selfPaymentExport
,
selfPaymentexportDetail
,
selfPaymentexportDetail
,
settlement
,
settlement
,
m
erchantView
,
apiM
erchantView
,
}
from
'
./service
'
;
}
from
'
./service
'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
...
@@ -79,7 +79,7 @@ const PaymentMange = props => {
...
@@ -79,7 +79,7 @@ const PaymentMange = props => {
};
};
// 查看发票
// 查看发票
const
invoiceDetail
=
async
params
=>
{
const
invoiceDetail
=
async
params
=>
{
const
data
=
await
m
erchantView
(
params
);
const
data
=
await
apiM
erchantView
(
params
);
if
(
data
.
businessCode
===
'
0000
'
)
{
if
(
data
.
businessCode
===
'
0000
'
)
{
settoExamineData
({
...
data
.
data
});
settoExamineData
({
...
data
.
data
});
// setToExamineModalVisibel(true);
// setToExamineModalVisibel(true);
...
@@ -95,9 +95,8 @@ const PaymentMange = props => {
...
@@ -95,9 +95,8 @@ const PaymentMange = props => {
settoExamineData
({
id
});
settoExamineData
({
id
});
setToExamineModalVisibel
(
true
);
setToExamineModalVisibel
(
true
);
}
else
if
(
status
===
2
)
{
}
else
if
(
status
===
2
)
{
settoExamineData
({
id
});
setVisibleInvoiceList
(
true
);
setVisibleInvoiceList
(
true
);
// setstatus(status);
// invoiceDetail(id);
}
else
if
(
status
===
3
)
{
}
else
if
(
status
===
3
)
{
exportDetail
(
id
);
exportDetail
(
id
);
}
else
if
(
status
===
11
)
{
}
else
if
(
status
===
11
)
{
...
@@ -238,8 +237,12 @@ const PaymentMange = props => {
...
@@ -238,8 +237,12 @@ const PaymentMange = props => {
/>
/>
)
}
)
}
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
{
visibleUploadInvoice
&&
<
UploadInvoiceModal
onCancel=
{
onCloseUploadInvoice
}
/>
}
{
visibleUploadInvoice
&&
(
{
visibleInvoiceList
&&
<
InvoiceListModal
onCancel=
{
setVisibleInvoiceList
}
/>
}
<
UploadInvoiceModal
onCancel=
{
onCloseUploadInvoice
}
id=
{
toExamineData
.
id
}
/>
)
}
{
visibleInvoiceList
&&
(
<
InvoiceListModal
onCancel=
{
setVisibleInvoiceList
}
id=
{
toExamineData
.
id
}
/>
)
}
</
Spin
>
</
Spin
>
);
);
};
};
...
...
src/utils/bll.js
View file @
94effd5f
import
UUID
from
'
@/utils/uuid
'
;
export
const
layout
=
{
export
const
layout
=
{
labelCol
:
{
span
:
6
},
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
16
},
wrapperCol
:
{
span
:
16
},
};
};
/**
* 文件路径数组转Upload fileList 列表值
* * */
export
const
getFileData
=
(
arr
=
[],
urlKey
,
nameKey
)
=>
arr
.
map
(
item
=>
{
let
url
=
item
;
let
name
=
item
;
if
(
urlKey
)
{
url
=
item
[
urlKey
];
}
if
(
nameKey
)
{
name
=
item
[
nameKey
];
}
return
{
url
,
name
,
uid
:
UUID
.
createUUID
(),
status
:
'
done
'
,
};
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment