Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
黄庭坚
jinfa-platform
Commits
a49715dd
Commit
a49715dd
authored
Apr 07, 2022
by
前端-彭佳文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418-order' into 'v2-220418'
V2 220418 order See merge request linkseeks-design/pro-platform!139
parents
310401bc
63fe498f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
17 deletions
+81
-17
index.ts
config/routes/index.ts
+1
-1
RoleSelect.tsx
src/components/RoleSelect/RoleSelect.tsx
+16
-11
label.ts
src/pages/order/constants/label.ts
+2
-1
details copy.tsx
...iveryPlanManagement/deliveryPlanAwaitB2B/details copy.tsx
+0
-0
details.tsx
...r/deliveryPlanManagement/deliveryPlanAwaitB2B/details.tsx
+0
-0
assemblyTools.ts
src/pages/order/utils/assemblyTools.ts
+20
-0
date.ts
src/pages/order/utils/date.ts
+38
-2
index.ts
src/pages/order/utils/index.ts
+4
-2
No files found.
config/routes/index.ts
View file @
a49715dd
...
...
@@ -27,7 +27,7 @@ import MaterialRoute from './materialRoute';
// import contracRoute from './contracRoute';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const
isDev
=
false
;
const
isDev
=
process
.
env
.
NODE_ENV
===
"development"
;
const
homeRoute
=
{
path
:
`/memberCenter/home`
,
name
:
'home'
,
...
...
src/components/RoleSelect/RoleSelect.tsx
View file @
a49715dd
...
...
@@ -10,6 +10,7 @@ import {
interface
RoleSelectProps
{
request
?:
(
payload
:
any
)
=>
Promise
<
any
>
params
?:
object
onChange
?:
(
e
)
=>
void
}
...
...
@@ -20,7 +21,7 @@ interface RoleSelectProps {
*/
function
RoleSelect
(
props
:
RoleSelectProps
)
{
const
{
onChange
}
=
props
const
{
request
,
params
,
onChange
}
=
props
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
()
...
...
@@ -38,7 +39,10 @@ function RoleSelect(props: RoleSelectProps) {
useEffect
(()
=>
{
getMemberManageLowerConsumerMemberPage
(
form
.
getFieldsValue
()).
then
(
res
=>
{
request
({
...
params
,
...
form
.
getFieldsValue
()
}).
then
(
res
=>
{
setDataSource
(
res
.
data
.
data
)
})
...
...
@@ -48,7 +52,7 @@ function RoleSelect(props: RoleSelectProps) {
<>
<
Row
gutter=
{
4
}
>
<
Col
span=
{
18
}
>
<
Input
value=
{
intV
?.
name
}
/>
<
Input
value=
{
intV
?.
name
}
disabled
/>
</
Col
>
<
Col
span=
{
6
}
>
<
Button
onClick=
{
showDrawer
}
>
选择采购会员
</
Button
>
...
...
@@ -75,16 +79,12 @@ function RoleSelect(props: RoleSelectProps) {
</
Form
>
<
Radio
.
Group
className=
"block w-full"
onChange=
{
(
e
)
=>
{
const
value
=
e
.
target
.
value
let
target
=
{
buyerMemberId
:
value
.
memberId
,
buyerRoleId
:
value
.
roleId
,
roleType
:
2
}
setIntV
(
target
)
onChange
(
target
)
setIntV
(
value
)
onChange
(
value
)
}
}
>
<
Table
className=
"w-full"
rowKey=
{
'id'
}
columns=
{
TableMemberColumn
}
dataSource=
{
dataSource
}
/>
...
...
@@ -94,5 +94,9 @@ function RoleSelect(props: RoleSelectProps) {
</>
);
}
RoleSelect
.
defaultProps
=
{
request
:
getMemberManageLowerConsumerMemberPage
,
params
:
{},
onChange
:
(
e
)
=>
{}
}
export
default
RoleSelect
;
\ No newline at end of file
src/pages/order/constants/label.ts
View file @
a49715dd
...
...
@@ -51,7 +51,8 @@ export const ReceivingAddress = '收货地址';
export
const
SubmitDeliveryNotice
=
'提交送货通知单'
;
export
const
ConfirmDeliveryNotice
=
'确认送货通知单'
;
export
const
DeliveryPlanText
=
'送货计划'
export
const
DeliveryPlanRemark
=
'最长600个字符,300个汉字'
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitB2B/details copy.tsx
0 → 100644
View file @
a49715dd
This diff is collapsed.
Click to expand it.
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitB2B/details.tsx
View file @
a49715dd
This diff is collapsed.
Click to expand it.
src/pages/order/utils/assemblyTools.ts
0 → 100644
View file @
a49715dd
// 公共组装类工具
/**
* 数组转对象 默认赋值 0 (示例:['$04-01','$04-02'] = { '$04-01': {}, '$04-02': {} })
* @param arr
* @returns
*/
const
convertArrtoObj
=
(
arr
)
=>
{
return
arr
.
reduce
((
obj
,
currVal
)
=>
{
return
{
...
obj
,
[
currVal
]:
{
day
:
currVal
.
substr
(
1
),
planCount
:
0
,
createNotice
:
false
,
createDelivery
:
false
}
}
},
{})
}
export
{
convertArrtoObj
}
\ No newline at end of file
src/pages/order/utils/date.ts
View file @
a49715dd
// 公共日期类工具
const
getDayAll
=
(
starDay
:
string
,
endDay
:
string
)
=>
{
let
arr
=
[]
let
dates
=
[]
...
...
@@ -24,13 +26,46 @@ const getDayAll = (starDay: string, endDay: string) => {
let
day
=
time
.
getDate
()
>=
10
?
time
.
getDate
()
:
'0'
+
time
.
getDate
()
// year + '-' +
// let YYMMDD = year + '-' + mouth + '-' + day
let
MMDD
=
mouth
+
'-'
+
day
let
MMDD
=
'$'
+
mouth
+
'-'
+
day
dates
.
push
(
MMDD
)
}
// dates.pop()
return
dates
}
// deliveryPlanManagement - deliveryPlanAwaitB2B - details copy.ts 测试使用,上线前需要删除
const
getDayAll2
=
(
starDay
:
string
,
endDay
:
string
)
=>
{
let
arr
=
[]
let
dates
=
[]
// 设置两个日期UTC时间
let
db
=
new
Date
(
starDay
)
let
de
=
new
Date
(
endDay
)
// 获取两个日期GTM时间
let
s
=
db
.
getTime
()
-
24
*
60
*
60
*
1000
let
d
=
de
.
getTime
()
-
24
*
60
*
60
*
1000
// 获取到两个日期之间的每一天的毫秒数
for
(
let
i
=
s
;
i
<=
d
;
)
{
i
=
i
+
24
*
60
*
60
*
1000
arr
.
push
(
parseInt
(
String
(
i
)))
}
// 获取每一天的时间 YY-MM-DD
for
(
let
j
in
arr
)
{
let
time
=
new
Date
(
arr
[
j
])
let
year
=
time
.
getFullYear
()
let
mouth
=
time
.
getMonth
()
+
1
>=
10
?
time
.
getMonth
()
+
1
:
'0'
+
(
time
.
getMonth
()
+
1
)
let
day
=
time
.
getDate
()
>=
10
?
time
.
getDate
()
:
'0'
+
time
.
getDate
()
// year + '-' +
let
YYMMDD
=
year
+
'-'
+
mouth
+
'-'
+
day
dates
.
push
(
YYMMDD
)
}
dates
.
pop
()
return
dates
}
export
{
getDayAll
getDayAll
,
getDayAll2
,
}
\ No newline at end of file
src/pages/order/utils/index.ts
View file @
a49715dd
export
*
from
'./status'
\ No newline at end of file
export
*
from
'./status'
export
*
from
'./date'
export
*
from
'./assemblyTools'
\ No newline at end of file
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