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
0f7c1776
Commit
0f7c1776
authored
Mar 29, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 接口联调
parent
a07ded6e
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
230 deletions
+218
-230
data.js
src/pages/businessManage/info/data.js
+21
-6
index.jsx
src/pages/businessManage/info/index.jsx
+109
-158
style.less
src/pages/businessManage/info/style.less
+4
-0
data.js
src/pages/chainStoreManage/data.js
+3
-0
index.jsx
src/pages/chainStoreManage/index.jsx
+61
-58
style.less
src/pages/chainStoreManage/style.less
+7
-2
index.jsx
src/pages/contractView/index.jsx
+13
-6
No files found.
src/pages/businessManage/info/data.js
View file @
0f7c1776
...
@@ -39,6 +39,10 @@ export const businessModel = [
...
@@ -39,6 +39,10 @@ export const businessModel = [
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
];
];
export
const
signDateTypeList
=
[{
label
:
'
自商品售卖起默认一年
'
,
value
:
1
}];
export
const
legalPersonList
=
[{
label
:
'
长期
'
,
value
:
'
长期
'
}];
// 获取申请信息
// 获取申请信息
export
async
function
getInfo
()
{
export
async
function
getInfo
()
{
const
data
=
await
apiBusinessDetail
();
const
data
=
await
apiBusinessDetail
();
...
@@ -49,6 +53,7 @@ export async function getInfo() {
...
@@ -49,6 +53,7 @@ export async function getInfo() {
res
.
customList
=
res
.
facilities
.
customList
||
[];
res
.
customList
=
res
.
facilities
.
customList
||
[];
res
.
selfList
=
res
.
facilities
.
selfList
||
[];
res
.
selfList
=
res
.
facilities
.
selfList
||
[];
}
}
res
.
signDateType
=
[
res
.
signDateType
]
||
[];
res
.
accountOpenPermitImage
=
res
.
accountOpenPermitImage
res
.
accountOpenPermitImage
=
res
.
accountOpenPermitImage
?
[{
uid
:
0
,
url
:
res
.
accountOpenPermitImage
}]
?
[{
uid
:
0
,
url
:
res
.
accountOpenPermitImage
}]
:
[];
:
[];
...
@@ -87,18 +92,28 @@ export async function getInfo() {
...
@@ -87,18 +92,28 @@ export async function getInfo() {
}
}
settlementType
=
+
res
.
settlementType
;
settlementType
=
+
res
.
settlementType
;
}
}
res
.
checked
=
res
.
legalPersonPeriod
===
'
长期
'
;
// 身份证有效期处理
res
.
legalPerson
=
const
date
=
res
.
legalPersonPeriod
.
split
(
'
-
'
)
||
[];
res
.
legalPersonPeriod
&&
res
.
legalPersonStart
=
date
[
0
]
&&
moment
(
date
[
0
]);
res
.
legalPersonPeriod
!==
'
长期
'
&&
res
.
legalPersonEnd
=
date
[
1
]
&&
date
[
1
]
!==
'
长期
'
?
moment
(
date
[
1
])
:
''
;
res
.
legalPersonPeriod
.
split
(
'
-
'
).
map
(
item
=>
moment
(
item
));
res
.
checked
=
date
[
1
]
&&
date
[
1
]
===
'
长期
'
?
[
'
长期
'
]
:
[];
const
checkboxDisabled
=
date
[
1
]
&&
date
[
1
]
===
'
长期
'
;
res
.
businessLicensePeriod
=
res
.
businessLicensePeriod
&&
moment
(
res
.
businessLicensePeriod
);
res
.
businessLicensePeriod
=
res
.
businessLicensePeriod
&&
moment
(
res
.
businessLicensePeriod
);
const
companyNamedis
=
!!
res
.
companyName
;
const
companyNamedis
=
!!
res
.
companyName
;
// 获取主营类目
let
categoryList
=
[];
if
(
res
.
productBusiness
.
length
)
{
const
dataList
=
await
apiCategoryList
(
res
.
productBusiness
);
categoryList
=
dataList
.
data
;
}
this
.
setState
({
this
.
setState
({
settlementType
,
settlementType
,
businessInfo
:
res
,
businessInfo
:
res
,
checkboxDisabled
:
res
.
checked
,
checkboxDisabled
,
companyNamedis
,
companyNamedis
,
categoryList
,
mainCategoryId
:
res
.
mainCategoryId
,
});
});
}
}
...
...
src/pages/businessManage/info/index.jsx
View file @
0f7c1776
This diff is collapsed.
Click to expand it.
src/pages/businessManage/info/style.less
View file @
0f7c1776
...
@@ -55,6 +55,10 @@
...
@@ -55,6 +55,10 @@
}
}
.formBtns {
.formBtns {
display: flex;
align-items: center;
justify-content: space-evenly;
width: 100%;
padding: 20px 0;
padding: 20px 0;
background-color: #fff;
background-color: #fff;
}
}
src/pages/chainStoreManage/data.js
View file @
0f7c1776
...
@@ -24,3 +24,6 @@ export const businessModel = [
...
@@ -24,3 +24,6 @@ export const businessModel = [
{
label
:
'
实物商品业务员
'
,
value
:
2
},
{
label
:
'
实物商品业务员
'
,
value
:
2
},
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
];
];
// 营业日
export
const
businessStatus
=
[{
label
:
'
停业
'
,
value
:
2
},
{
label
:
'
营业中
'
,
value
:
1
}];
src/pages/chainStoreManage/index.jsx
View file @
0f7c1776
...
@@ -10,14 +10,16 @@ import {
...
@@ -10,14 +10,16 @@ import {
Table
,
Table
,
Pagination
,
Pagination
,
Modal
,
Modal
,
Select
,
}
from
'
antd
'
;
}
from
'
antd
'
;
import
_
from
'
lodash
'
;
import
_
from
'
lodash
'
;
import
{
el
}
from
'
date-fns/locale
'
;
import
{
el
}
from
'
date-fns/locale
'
;
import
{
searchList
,
apiEnableStore
,
apiAddrArea
,
apiproductBusiness
}
from
'
./services
'
;
import
{
searchList
,
apiEnableStore
,
apiAddrArea
,
apiproductBusiness
}
from
'
./services
'
;
import
{
stateDesc
,
weeks
,
layout
}
from
'
./data
'
;
import
{
stateDesc
,
weeks
,
layout
,
businessStatus
,
businessModel
}
from
'
./data
'
;
import
StoreModal
from
'
./components/storeModal
'
;
import
StoreModal
from
'
./components/storeModal
'
;
import
style
from
'
./style.less
'
;
import
style
from
'
./style.less
'
;
const
{
Option
}
=
Select
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
export
default
()
=>
{
export
default
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
...
@@ -117,6 +119,10 @@ export default () => {
...
@@ -117,6 +119,10 @@ export default () => {
params
[
ids
[
i
]]
=
item
;
params
[
ids
[
i
]]
=
item
;
});
});
}
}
if
(
val
.
businessStatus
)
{
params
.
businessStatus
=
val
.
businessStatus
;
}
getList
(
params
);
getList
(
params
);
};
};
const
closeModal
=
isReload
=>
{
const
closeModal
=
isReload
=>
{
...
@@ -205,74 +211,60 @@ export default () => {
...
@@ -205,74 +211,60 @@ export default () => {
const
columns
=
[
const
columns
=
[
{
{
title
:
'
门店名称
'
,
title
:
'
业务模式
'
,
dataIndex
:
'
name
'
,
dataIndex
:
'
productBusiness
'
,
width
:
120
,
width
:
120
,
align
:
'
center
'
,
render
:
v
=>
{
let
str
=
''
;
v
.
forEach
(
it
=>
{
businessModel
.
forEach
(
item
=>
{
if
(
+
it
===
+
item
.
value
)
{
str
+=
`
${
item
.
label
}
`
;
}
});
});
return
str
;
},
},
},
{
{
title
:
'
门店电话
'
,
title
:
'
门店名称
'
,
dataIndex
:
'
phone
'
,
dataIndex
:
'
name
'
,
hideInSearch
:
true
,
width
:
120
,
width
:
120
,
align
:
'
center
'
,
},
},
{
{
title
:
'
营业时间
'
,
title
:
'
营业状态
'
,
dataIndex
:
'
businessHours
'
,
dataIndex
:
'
businessStatus
'
,
hideInSearch
:
true
,
width
:
80
,
width
:
150
,
align
:
'
center
'
,
render
:
businessHours
=>
(
render
:
val
=>
businessStatus
.
find
(
item
=>
item
.
value
===
val
)?.
label
||
'
-
'
,
<
div
>
<
div
>
{
getWeekSlots
(
businessHours
.
weeks
)
}
</
div
>
<
div
>
{
businessHours
.
hoursItems
.
map
(
item
=>
(
<
div
key=
{
item
.
begin
}
>
<
span
>
{
item
.
begin
}
</
span
>
-
<
span
>
{
item
.
end
}
</
span
>
</
div
>
))
}
</
div
>
</
div
>
),
},
},
{
{
title
:
'
地区
'
,
title
:
'
创建时间
'
,
dataIndex
:
'
addr
'
,
dataIndex
:
'
createdAt
'
,
width
:
200
,
width
:
120
,
hideInSearch
:
true
,
align
:
'
center
'
,
render
:
(
addr
,
r
)
=>
(
<
span
>
{
`${r.provinceName}${r.cityName}${r.countyName}${r.townName || ''}`
}
</
span
>
),
},
{
title
:
'
详细地址
'
,
dataIndex
:
'
address
'
,
hideInSearch
:
true
,
width
:
150
,
},
},
{
{
title
:
'
经纬度
'
,
title
:
'
门店电话
'
,
dataIndex
:
'
latlng
'
,
dataIndex
:
'
phone
'
,
hideInSearch
:
true
,
align
:
'
center
'
,
width
:
120
,
width
:
100
,
render
:
(
latlng
,
r
)
=>
<
span
>
{
`${r.longitude},${r.latitude}`
}
</
span
>,
},
},
{
{
title
:
'
状态
'
,
title
:
'
门店
状态
'
,
dataIndex
:
'
state
'
,
dataIndex
:
'
state
'
,
hideInSearch
:
true
,
hideInSearch
:
true
,
width
:
120
,
align
:
'
center
'
,
width
:
80
,
render
:
v
=>
<
span
>
{
`${stateDesc[v]}`
}
</
span
>,
render
:
v
=>
<
span
>
{
`${stateDesc[v]}`
}
</
span
>,
},
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
createdAt
'
,
hideInSearch
:
true
,
width
:
120
,
},
{
{
title
:
'
操作
'
,
title
:
'
操作
'
,
hideInSearch
:
true
,
hideInSearch
:
true
,
dataIndex
:
'
action
'
,
dataIndex
:
'
action
'
,
width
:
17
0
,
width
:
20
0
,
fixed
:
'
right
'
,
fixed
:
'
right
'
,
render
:
(
val
,
r
)
=>
(
render
:
(
val
,
r
)
=>
(
<
div
className=
{
style
.
actionBtn
}
>
<
div
className=
{
style
.
actionBtn
}
>
...
@@ -310,6 +302,18 @@ export default () => {
...
@@ -310,6 +302,18 @@ export default () => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
<
Col
span=
{
8
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"营业状态"
name=
"businessStatus"
>
<
Select
>
{
businessStatus
.
map
(
item
=>
(
<
Option
label=
{
item
.
label
}
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
div
className=
{
style
.
search
}
>
<
Button
type=
"primary"
htmlType=
"submit"
size=
"middle"
>
<
Button
type=
"primary"
htmlType=
"submit"
size=
"middle"
>
搜索
搜索
</
Button
>
</
Button
>
...
@@ -319,8 +323,7 @@ export default () => {
...
@@ -319,8 +323,7 @@ export default () => {
<
Button
type=
"primary"
size=
"middle"
onClick=
{
()
=>
onCreate
()
}
>
<
Button
type=
"primary"
size=
"middle"
onClick=
{
()
=>
onCreate
()
}
>
新建
新建
</
Button
>
</
Button
>
</
Col
>
</
div
>
</
Row
>
</
Form
>
</
Form
>
</
div
>
</
div
>
<
Table
<
Table
...
...
src/pages/chainStoreManage/style.less
View file @
0f7c1776
.serachForm {
.serachForm {
margin-bottom: 20px;
margin-bottom: 20px;
padding: 20px 50px
0
10px;
padding: 20px 50px
10px
10px;
background-color: #fff;
background-color: #fff;
}
}
.search {
display: flex;
justify-content: end;
}
.searchBtn {
.searchBtn {
margin: 0 10px;
margin: 0 10px;
}
}
...
@@ -16,8 +20,9 @@
...
@@ -16,8 +20,9 @@
.actionBtn {
.actionBtn {
display: flex;
display: flex;
flex-direction: column;
align-items: center;
align-items: center;
// flex-direction: column;
justify-content: space-around;
button {
button {
width: 75px;
width: 75px;
margin-bottom: 5px;
margin-bottom: 5px;
...
...
src/pages/contractView/index.jsx
View file @
0f7c1776
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
notification
,
Button
,
Modal
,
Image
}
from
'
antd
'
;
import
{
notification
,
Button
,
Modal
,
Image
,
message
}
from
'
antd
'
;
import
{
query
}
from
'
./services
'
;
import
{
query
}
from
'
./services
'
;
const
ContractView
=
()
=>
{
const
ContractView
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
url
=
const
[
url
,
setUrl
]
=
useState
();
'
https://contract-test.q-gp.com/621-621T18364B279E2null.pdf?Expires=1679994655&OSSAccessKeyId=LTAI5tGV1jdSEBjuKDUYZVHY&Signature=nVC2YgG8t5DWZl6sMyRmCzeRYLw%3D
'
;
// 查看
// 查看
const
onLook
=
({
contractPdfUrl
})
=>
{
const
onLook
=
({
contractPdfUrl
})
=>
{
if
(
contractPdfUrl
)
{
setUrl
(
contractPdfUrl
);
setVisible
(
true
);
setVisible
(
true
);
// window.open(url)
}
else
{
message
.
error
(
'
暂无合同
'
);
}
};
};
// 下载
// 下载
const
ondown
=
({
contractPdfUrl
})
=>
{
const
ondown
=
({
contractPdfUrl
})
=>
{
window
.
open
(
url
);
if
(
contractPdfUrl
)
{
window
.
open
(
contractPdfUrl
);
}
else
{
message
.
error
(
'
暂无合同
'
);
}
};
};
const
columns
=
[
const
columns
=
[
{
{
...
...
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