Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CmsPetrolPay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Board
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
Giang Tran
CmsPetrolPay
Commits
6dc92ec6
Commit
6dc92ec6
authored
Oct 02, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
8814a3d1
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
229 additions
and
147 deletions
+229
-147
dropdown.js
src/app/apis/Functions/dropdown.js
+10
-0
url.js
src/app/apis/url.js
+2
-0
AuthGuard.jsx
src/app/auth/AuthGuard.jsx
+41
-46
detail.js
src/app/views/PaymentSupplier/detail.js
+12
-12
Index.js
src/app/views/Reconciliation/ListTrans/Index.js
+2
-5
Table.js
src/app/views/Reconciliation/ListTrans/Table.js
+4
-4
Index.js
src/app/views/Reconciliation/Setting/Index.js
+6
-3
Update.js
src/app/views/Reconciliation/Setting/Update.js
+17
-13
View.js
src/app/views/Reconciliation/Setting/View.js
+39
-8
Detail.js
src/app/views/Reconciliation/Sheet/Detail.js
+1
-17
Dialog.js
src/app/views/Reconciliation/Sheet/Dialog/Dialog.js
+8
-2
Index.js
src/app/views/Reconciliation/Sheet/Dialog/Index.js
+42
-3
View.js
src/app/views/Reconciliation/Sheet/Dialog/View.js
+26
-14
Index.js
src/app/views/Reconciliation/Sheet/Index.js
+2
-2
Index.js
src/app/views/Reconciliation/Sheet/ListTrans/Index.js
+1
-0
Table.js
src/app/views/Reconciliation/Sheet/ListTrans/Table.js
+1
-1
View.js
src/app/views/Reconciliation/Sheet/ListTrans/View.js
+2
-0
Table.js
src/app/views/Reconciliation/Sheet/Table.js
+1
-1
Update.js
src/app/views/Reconciliation/Sheet/Update.js
+2
-6
View.js
src/app/views/Reconciliation/Sheet/View.js
+10
-10
No files found.
src/app/apis/Functions/dropdown.js
View file @
6dc92ec6
...
...
@@ -104,3 +104,13 @@ export const dropdownListPayType = async (body) =>
GetData
(
url
.
dropdownListPayType
,
body
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
null
)
export
const
dropdownStoreNew
=
async
(
id
)
=>
GetData
(
`
${
url
.
dropdownStore
}
`
,
{})
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
null
)
export
const
dropdownPaymentType
=
async
(
body
)
=>
GetData
(
url
.
dropdownPaymentType
,
body
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
null
)
src/app/apis/url.js
View file @
6dc92ec6
...
...
@@ -192,4 +192,6 @@ export default {
dropdownStoreStatus
:
`
${
root
}
/dropdown/getlistStoreStatus`
,
dropdownProvider
:
`
${
root
}
/dropdown/Provider`
,
dropdownListPayType
:
`
${
root
}
/dropdown/getListPayType`
,
dropdownPaymentType
:
`
${
root
}
/dropdown/paymentType`
,
}
src/app/auth/AuthGuard.jsx
View file @
6dc92ec6
import
React
,
{
useContext
,
useEffect
,
useState
,
}
from
'react'
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
import
{
Redirect
,
useLocation
}
from
'react-router-dom'
import
AppContext
from
"../contexts/AppContext"
;
import
AppContext
from
'../contexts/AppContext'
import
useAuth
from
'app/hooks/useAuth'
import
{
makeStyles
,
useTheme
}
from
"@material-ui/core/styles"
;
import
{
Backdrop
,
CircularProgress
,
}
from
"@material-ui/core"
;
import
{
connect
}
from
"react-redux"
;
import
{
makeStyles
,
useTheme
}
from
'@material-ui/core/styles'
import
KEY
from
'app/assets/Key'
import
localStorageService
from
'app/services/localStorageService'
const
useStyles
=
makeStyles
((
theme
)
=>
({
import
{
Backdrop
,
CircularProgress
}
from
'@material-ui/core'
import
{
connect
}
from
'react-redux'
const
useStyles
=
makeStyles
((
theme
)
=>
({
backdrop
:
{
zIndex
:
theme
.
zIndex
.
drawer
+
1
,
color
:
"#fff"
,
color
:
'#fff'
,
},
}));
}))
const
getUserRoleAuthStatus
=
(
pathname
,
user
)
=>
{
const
token
=
localStorageService
.
getItem
(
KEY
.
API_TOKEN
)
if
(
token
)
{
//return true
if
(
pathname
===
'/dashboard/default'
||
pathname
===
'/'
||
pathname
==
"/dashboard"
||
pathname
==
"/my-profile"
||
pathname
==
"/change-password"
)
if
(
pathname
===
'/dashboard/default'
||
pathname
===
'/'
||
pathname
==
'/dashboard'
||
pathname
==
'/my-profile'
||
pathname
==
'/change-password'
)
return
true
if
(
user
)
{
if
(
user
.
is_sysadmin
)
{
if
(
user
)
{
if
(
user
.
is_sysadmin
)
{
return
true
}
else
{
let
flag
=
false
;
user
.
listPath
.
map
(
e
=>
{
if
(
e
==
pathname
)
flag
=
true
}
else
{
let
flag
=
false
user
.
listPath
.
map
((
e
)
=>
{
if
(
e
==
pathname
)
flag
=
true
})
return
flag
}
}
return
false
}
else
{
return
false
}
}
};
const
AuthGuard
=
({
children
,
modalLoading
})
=>
{
const
classes
=
useStyles
();
const
{
isAuthenticated
,
user
}
=
useAuth
()
const
AuthGuard
=
({
children
,
modalLoading
})
=>
{
const
classes
=
useStyles
()
const
{
isAuthenticated
,
user
}
=
useAuth
()
const
[
previouseRoute
,
setPreviousRoute
]
=
useState
(
null
)
const
{
pathname
}
=
useLocation
()
const
isUserRoleAuthenticated
=
getUserRoleAuthStatus
(
pathname
,
user
)
;
let
authenticated
=
isAuthenticated
&&
isUserRoleAuthenticated
;
const
isUserRoleAuthenticated
=
getUserRoleAuthStatus
(
pathname
,
user
)
let
authenticated
=
isAuthenticated
&&
isUserRoleAuthenticated
// IF YOU NEED ROLE BASED AUTHENTICATION,
// UNCOMMENT ABOVE TWO LINES, getUserRoleAuthStatus METHOD AND user VARIABLE
// AND COMMENT OUT BELOW LINE
// let authenticated = isAuthenticated
useEffect
(()
=>
{
if
(
previouseRoute
!==
null
)
setPreviousRoute
(
pathname
)
},
[
pathname
,
previouseRoute
])
if
(
authenticated
)
return
<>
return
(
<>
<
Backdrop
className=
{
classes
.
backdrop
}
open=
{
modalLoading
.
isVisible
}
...
...
@@ -78,6 +75,7 @@ const AuthGuard = ({ children,modalLoading }) => {
</
Backdrop
>
{
children
}
</>
)
else
{
return
(
<
Redirect
...
...
@@ -90,11 +88,9 @@ const AuthGuard = ({ children,modalLoading }) => {
}
}
const
mapStateToProps
=
(
state
)
=>
{
return
{
modalLoading
:
state
.
ModalLoadingReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
AuthGuard
);
\ No newline at end of file
}
}
export
default
connect
(
mapStateToProps
,
{})(
AuthGuard
)
src/app/views/PaymentSupplier/detail.js
View file @
6dc92ec6
...
...
@@ -372,18 +372,18 @@ const SimpleForm = (props) => {
name
:
'30 ngày'
,
value
:
30
,
},
{
name
:
'90 ngày'
,
value
:
90
,
},
{
name
:
'180 ngày'
,
value
:
180
,
},
{
name
:
'1 năm'
,
value
:
365
,
},
//
{
//
name: '90 ngày',
//
value: 90,
//
},
//
{
//
name: '180 ngày',
//
value: 180,
//
},
//
{
//
name: '1 năm',
//
value: 365,
//
},
].
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
value
}
>
{
e
.
name
}
...
...
src/app/views/Reconciliation/ListTrans/Index.js
View file @
6dc92ec6
...
...
@@ -65,6 +65,7 @@ const ToolNotificate = (props) => {
res
=
await
listTransReconciliation
({
page_no
:
0
,
page_size
:
pageSize
,
text
:
searchDebount
,
date_from
:
startDate
?
convertDate
(
startDate
)
:
null
,
date_to
:
endDate
?
convertDate
(
endDate
)
:
null
,
product_code
:
product
?
product
:
null
,
...
...
@@ -76,6 +77,7 @@ const ToolNotificate = (props) => {
res
=
await
listTransReconciliation
({
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
text
:
searchDebount
,
date_from
:
startDate
?
convertDate
(
startDate
)
:
null
,
date_to
:
endDate
?
convertDate
(
endDate
)
:
null
,
product_code
:
product
?
product
:
null
,
...
...
@@ -90,11 +92,6 @@ const ToolNotificate = (props) => {
const
newList
=
res
.
data
.
data
?.
data
?.
map
((
e
,
i
)
=>
{
return
{
...
e
,
statusReconciliationName
:
renderStatusName
(
e
?.
statusReconciliation
),
index
:
i
+
1
+
pageIndex
*
pageSize
,
}
})
...
...
src/app/views/Reconciliation/ListTrans/Table.js
View file @
6dc92ec6
...
...
@@ -35,7 +35,7 @@ const columns = [
},
{
id
:
'order_code'
,
label
:
'Mã
hoá đơn
'
,
label
:
'Mã
giao dịch
'
,
align
:
'left'
,
minWidth
:
160
,
},
...
...
@@ -197,15 +197,15 @@ function TableList(props) {
style
=
{{
padding
:
5
,
backgroundColor
:
renderStatusBg
(
row
?.
status
R
econciliation
row
?.
status
_r
econciliation
),
color
:
renderStatusColor
(
row
?.
status
R
econciliation
row
?.
status
_r
econciliation
),
borderRadius
:
10
,
}}
>
{
row
?.
status
ReconciliationN
ame
}
{
row
?.
status
_reconciliation_n
ame
}
<
/Typography
>
<
/TableCell
>
<
/TableRow
>
...
...
src/app/views/Reconciliation/Setting/Index.js
View file @
6dc92ec6
...
...
@@ -24,6 +24,7 @@ const ToolNotificate = (props) => {
const
[
listGroup
,
setListGroup
]
=
useState
([])
const
[
group
,
setGroup
]
=
useState
()
const
{
user
}
=
useAuth
()
const
[
type
,
setType
]
=
useState
()
const
[
data
,
setData
]
=
useState
([])
...
...
@@ -54,7 +55,7 @@ const ToolNotificate = (props) => {
page_no
:
0
,
page_size
:
pageSize
,
status
,
// type: 3
,
type
:
type
?
type
:
0
,
})
}
else
{
res
=
await
listProviderSetting
({
...
...
@@ -62,7 +63,7 @@ const ToolNotificate = (props) => {
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
status
,
// type: 3
,
type
:
type
?
type
:
0
,
})
}
...
...
@@ -88,7 +89,7 @@ const ToolNotificate = (props) => {
},
[
pageIndex
])
useEffect
(()
=>
{
getData
(
true
)
},
[
searchDebount
,
status
,
store
,
group
])
},
[
searchDebount
,
status
,
store
,
group
,
type
])
const
removeItem
=
async
(
id
)
=>
{
// props.showLoading()
...
...
@@ -132,6 +133,8 @@ const ToolNotificate = (props) => {
listGroup
=
{
listGroup
}
group
=
{
group
}
setGroup
=
{
setGroup
}
type
=
{
type
}
setType
=
{
setType
}
/
>
)
}
...
...
src/app/views/Reconciliation/Setting/Update.js
View file @
6dc92ec6
...
...
@@ -28,6 +28,8 @@ import {
convertDate
,
convertTimeApi
,
replaceItemInArray
,
toPriceVnd
,
toPriceVndInput
,
}
from
'app/config/Function'
import
{
connect
}
from
'react-redux'
...
...
@@ -137,7 +139,7 @@ const SimpleForm = (props) => {
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/reconciliation/setting'
)
if
(
res
.
data
.
code
==
200
)
{
toast
.
success
(
'Cập nhật
nhà cung cấp thiết bị
thành công!'
,
{
toast
.
success
(
'Cập nhật
cấu hình đối soát
thành công!'
,
{
theme
:
'colored'
,
})
}
...
...
@@ -172,7 +174,13 @@ const SimpleForm = (props) => {
event
.
target
.
name
==
'money'
||
event
.
target
.
name
==
'length'
)
{
const
inputValue
=
event
.
target
.
value
let
inputValue
if
(
event
.
target
.
name
==
'money'
)
{
inputValue
=
event
.
target
.
value
.
split
(
'.'
).
join
(
''
)
}
else
{
inputValue
=
event
.
target
.
value
}
console
.
log
(
'inputValue'
,
inputValue
)
// Kiểm tra nếu input là số nguyên hoặc số thập phân
const
regex
=
/^-
?\d
*
\.?\d
*$/
if
(
regex
.
test
(
inputValue
))
{
...
...
@@ -180,7 +188,7 @@ const SimpleForm = (props) => {
let
newList
=
[...
listMoney
]
const
temp
=
{
...
listMoney
[
index
],
[
event
.
target
.
name
]:
event
.
target
.
v
alue
,
[
event
.
target
.
name
]:
inputV
alue
,
}
newList
=
replaceItemInArray
(
newList
,
index
,
temp
)
setListMoney
(
newList
)
...
...
@@ -306,11 +314,11 @@ const SimpleForm = (props) => {
onChange
=
{
handleChange
}
type
=
"text"
name
=
"percent"
value
=
{
percent
||
''
}
validators
=
{[
'required'
]}
validators
=
{[
'isFloat'
]}
errorMessages
=
{[
'
Không được để trống trường này
'
,
'
Trường này phải nhập số
'
,
]}
value
=
{
percent
||
''
}
/
>
<
/Grid
>
)
:
(
...
...
@@ -377,9 +385,9 @@ const SimpleForm = (props) => {
label
=
"Hoa hồng *"
fullWidth
name
=
"money"
value
=
{
value
=
{
toPriceVndInput
(
listMoney
[
index
].
money
}
)
}
variant
=
"outlined"
InputProps
=
{{
endAdornment
:
(
...
...
@@ -431,16 +439,12 @@ const SimpleForm = (props) => {
<
Grid
xs
=
{
6
}
sm
=
{
6
}
item
>
<
SelectValidator
variant
=
{
'outlined'
}
label
=
{
'Chu kỳ đối soát
*
'
}
label
=
{
'Chu kỳ đối soát'
}
className
=
"mb-4 w-full"
value
=
{
reconciliationCycle
||
''
}
displayEmpty
name
=
"reconciliationCycle"
onChange
=
{
handleChange
}
validators
=
{[
'required'
]}
errorMessages
=
{[
'Không được để trống trường này'
,
]}
>
{[
{
...
...
src/app/views/Reconciliation/Setting/View.js
View file @
6dc92ec6
...
...
@@ -32,14 +32,8 @@ function CustomerView(props) {
pageIndex
,
totalRecords
,
status
,
setStatus
,
store
,
setStore
,
listDrop
,
listGroup
,
group
,
setGroup
,
type
,
setType
,
}
=
props
const
handleChange
=
(
event
)
=>
{
setAge
(
event
.
target
.
value
)
...
...
@@ -93,7 +87,44 @@ function CustomerView(props) {
}}
/
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Lo
ạ
i
hoa
h
ồ
ng
<
/InputLabel
>
<
Select
label
=
"Loại hoa hồng"
value
=
{
type
}
onChange
=
{(
e
)
=>
setType
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{[
{
name
:
'Số tiền cố định'
,
value
:
2
,
id
:
2
,
},
{
name
:
'Theo phần trăm'
,
value
:
1
,
id
:
1
,
},
].
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
/Grid
>
{
/* {checkRole(user, '/reconciliation/setting/create') ? (
<Link to="/reconciliation/setting/create">
<Button
...
...
src/app/views/Reconciliation/Sheet/Detail.js
View file @
6dc92ec6
...
...
@@ -220,27 +220,11 @@ const SimpleForm = (props) => {
color
:
'#000000'
,
fontSize
:
16
,
marginBottom
:
10
,
height
:
65
,
}}
>
{
idPaymentPartner
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'#344054'
,
fontSize
:
14
,
}}
>
Ng
ườ
i
t
ạ
o
<
/Typography
>
<
Typography
style
=
{{
color
:
'#000000'
,
fontSize
:
14
,
}}
>
{
create_by
}
<
/Typography
>
<
/Card
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
6
}
xs
=
{
6
}
>
...
...
src/app/views/Reconciliation/Sheet/Dialog/Dialog.js
View file @
6dc92ec6
...
...
@@ -56,8 +56,13 @@ const DialogActions = withStyles((theme) => ({
}))(
MuiDialogActions
)
const
CustomizedDialogs
=
(
props
)
=>
{
const
{
onSelectCustomer
,
cusomterSelect
,
idPaymentPartner
,
onAddTrans
}
=
props
const
{
onSelectCustomer
,
cusomterSelect
,
idPaymentPartner
,
onAddTrans
,
id
,
}
=
props
const
[
open
,
setOpen
]
=
useState
(
false
)
const
handleClickOpen
=
()
=>
{
...
...
@@ -112,6 +117,7 @@ const CustomizedDialogs = (props) => {
onAddTrans
(
list
)
handleClose
()
}}
id
=
{
id
}
/
>
<
/DialogContent
>
<
/Dialog
>
...
...
src/app/views/Reconciliation/Sheet/Dialog/Index.js
View file @
6dc92ec6
...
...
@@ -8,10 +8,16 @@ import { showLoading, hideLoading } from 'app/redux/actions/loadingAction'
import
{
toast
}
from
'react-toastify'
import
useDebounce
from
'app/hooks/useDebounce'
import
{
useTranslation
}
from
'react-i18next'
import
{
dropdownMerchant
,
dropdownStore
}
from
'app/apis/Functions/dropdown'
import
{
dropdownMerchant
,
dropdownStoreNew
,
dropdownPaymentType
,
}
from
'app/apis/Functions/dropdown'
import
useAuth
from
'app/hooks/useAuth'
const
ToolNotificate
=
(
props
)
=>
{
const
{
customSelect
,
handleClose
,
idPaymentPartner
,
onAddTrans
}
=
props
const
{
customSelect
,
handleClose
,
idPaymentPartner
,
onAddTrans
,
id
}
=
props
const
[
listSelected
,
setListSelected
]
=
useState
([])
const
[
txtSearch
,
setTxtSearch
]
=
useState
(
''
)
const
[
applications
,
setApplications
]
=
useState
(
''
)
...
...
@@ -26,6 +32,15 @@ const ToolNotificate = (props) => {
const
[
data
,
setData
]
=
useState
([])
const
[
type
,
setType
]
=
useState
()
const
[
listType
,
setListType
]
=
useState
([])
const
[
store
,
setStore
]
=
useState
()
const
[
listStore
,
setListStore
]
=
useState
([])
const
[
listMedthodPay
,
setListMethodPay
]
=
useState
([])
const
{
user
}
=
useAuth
()
useEffect
(()
=>
{
getDropdownStore
()
},
[])
const
changeDateRange
=
(
start
,
end
)
=>
{
setStartDate
(
start
)
...
...
@@ -47,9 +62,9 @@ const ToolNotificate = (props) => {
payment_gate_code
:
props
?.
idPaymentPartner
,
order_code
:
searchDebount
,
type_payment
:
type
||
type
,
reconciliation_id
:
id
,
})
console
.
log
(
'res.data'
,
res
.
data
)
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
const
newList
=
res
.
data
.
data
?.
map
((
e
,
i
)
=>
{
...
...
@@ -81,6 +96,26 @@ const ToolNotificate = (props) => {
}
}
const
getDropdownStore
=
async
()
=>
{
const
res
=
await
dropdownStoreNew
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
const
newList
=
res
.
data
.
data
.
map
((
e
)
=>
{
return
{
...
e
,
name
:
e
.
store_name
}
})
setListStore
(
newList
)
}
const
res2
=
await
dropdownPaymentType
()
if
(
res2
.
data
.
code
==
200
&&
res2
.
data
.
data
)
{
const
newList
=
res2
.
data
.
data
.
map
((
e
)
=>
{
return
{
...
e
,
id
:
e
.
code
}
})
setListMethodPay
(
newList
)
}
}
return
(
<
LogAuth
data
=
{
data
}
...
...
@@ -100,6 +135,10 @@ const ToolNotificate = (props) => {
listSelected
=
{
listSelected
}
setListSelected
=
{
setListSelected
}
onAdd
=
{
onAdd
}
store
=
{
store
}
setStore
=
{
setStore
}
listStore
=
{
listStore
}
listMedthodPay
=
{
listMedthodPay
}
/
>
)
}
...
...
src/app/views/Reconciliation/Sheet/Dialog/View.js
View file @
6dc92ec6
...
...
@@ -48,6 +48,7 @@ function CustomerView(props) {
listSelected
,
setListSelected
,
onAdd
,
listMedthodPay
,
}
=
props
const
handleChange
=
(
event
)
=>
{
...
...
@@ -94,20 +95,31 @@ function CustomerView(props) {
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{[
{
id
:
'QR'
,
name
:
'QR'
,
},
{
id
:
'CASH'
,
name
:
'Tiền mặt'
,
},
{
id
:
'DEBT'
,
name
:
'Công nợ'
,
},
].
map
((
e
)
=>
(
{
listMedthodPay
.
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
Grid
item
lg
=
{
3
}
md
=
{
3
}
sm
=
{
3
}
xs
=
{
3
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
C
â
y
x
ă
ng
<
/InputLabel
>
<
Select
label
=
"Cây xăng"
value
=
{
store
}
onChange
=
{(
e
)
=>
setStore
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{
listStore
.
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
...
...
src/app/views/Reconciliation/Sheet/Index.js
View file @
6dc92ec6
...
...
@@ -45,7 +45,7 @@ const ToolNotificate = (props) => {
if
(
init
)
{
setPageIndex
(
0
)
res
=
await
listSheetReconciliation
({
order_code
:
searchDebount
,
text
:
searchDebount
,
page_no
:
0
,
page_size
:
pageSize
,
date_from
:
startDate
?
convertDate
(
startDate
)
:
null
,
...
...
@@ -55,7 +55,7 @@ const ToolNotificate = (props) => {
})
}
else
{
res
=
await
listSheetReconciliation
({
order_code
:
searchDebount
,
text
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
from_date
:
startDate
?
convertDate
(
startDate
)
:
null
,
...
...
src/app/views/Reconciliation/Sheet/ListTrans/Index.js
View file @
6dc92ec6
...
...
@@ -204,6 +204,7 @@ const ToolNotificate = (props) => {
removeItem
=
{
removeItem
}
onAddTrans
=
{
onAddTrans
}
total
=
{
total
}
id
=
{
props
.
id
}
/
>
)
}
...
...
src/app/views/Reconciliation/Sheet/ListTrans/Table.js
View file @
6dc92ec6
...
...
@@ -37,7 +37,7 @@ const columns = [
{
id
:
'order_code'
,
label
:
'Mã
hoá đơn
'
,
label
:
'Mã
giao dịch
'
,
align
:
'left'
,
minWidth
:
170
,
},
...
...
src/app/views/Reconciliation/Sheet/ListTrans/View.js
View file @
6dc92ec6
...
...
@@ -50,6 +50,7 @@ function CustomerView(props) {
removeItem
,
onAddTrans
,
total
,
id
,
}
=
props
const
handleChange
=
(
event
)
=>
{
...
...
@@ -104,6 +105,7 @@ function CustomerView(props) {
<
DialogTrans
idPaymentPartner
=
{
idPaymentPartner
}
onAddTrans
=
{
onAddTrans
}
id
=
{
id
}
/
>
<
/Grid
>
)
:
null
}
...
...
src/app/views/Reconciliation/Sheet/Table.js
View file @
6dc92ec6
...
...
@@ -137,7 +137,7 @@ function TableList(props) {
))}
<
TableCell
style
=
{{
width
:
1
0
0
,
width
:
1
2
0
,
backgroundColor
:
colors
.
headerTable
,
}}
>
...
...
src/app/views/Reconciliation/Sheet/Update.js
View file @
6dc92ec6
...
...
@@ -74,8 +74,6 @@ const SimpleForm = (props) => {
props
.
showLoading
()
const
res
=
await
updateSheetReconciliation
({
...
newValue
,
status
:
1
,
})
props
.
hideLoading
()
...
...
@@ -102,10 +100,7 @@ const SimpleForm = (props) => {
}
console
.
log
(
'state'
,
state
)
const
{
code
,
idPaymentPartner
,
note
}
=
state
console
.
log
(
'location.state?.idPaymentPartner'
,
location
.
state
?.
idPaymentPartner
)
console
.
log
(
'location.state'
,
location
.
state
.
id
)
return
(
<
div
className
=
"m-sm-30"
>
<
div
className
=
"mb-sm-30"
>
...
...
@@ -219,6 +214,7 @@ const SimpleForm = (props) => {
idPaymentPartner
=
{
location
.
state
?.
idPaymentPartner
}
id
=
{
location
.
state
.
id
}
/
>
<
/Grid
>
<
/Grid
>
...
...
src/app/views/Reconciliation/Sheet/View.js
View file @
6dc92ec6
...
...
@@ -99,17 +99,17 @@ function CustomerView(props) {
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{[
{
name
:
'Nháp'
,
value
:
1
,
id
:
1
,
},
//
{
//
name: 'Nháp',
//
value: 1,
//
id: 1,
//
},
{
name
:
'Chưa đối soát'
,
value
:
2
,
id
:
2
,
},
//
{
//
name: 'Chưa đối soát',
//
value: 2,
//
id: 2,
//
},
{
name
:
'Đang đối soát'
,
value
:
3
,
...
...
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