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
linweijiong
jinfa-platform
Commits
24876d7d
Commit
24876d7d
authored
Sep 29, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
007a0e54
64c7300a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
330 additions
and
38 deletions
+330
-38
payandSettle.ts
config/routes/payandSettle.ts
+20
-1
menu.ts
src/locales/zh-CN/menu.ts
+5
-0
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+43
-3
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+1
-1
index.less
src/pages/commodity/products/addProductsItem/index.less
+1
-3
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+24
-23
index.less
src/pages/commodity/products/index.less
+27
-7
accountDetail.tsx
...yandSettle/capitalAccounts/accountLists/accountDetail.tsx
+16
-0
index.tsx
...pages/payandSettle/capitalAccounts/accountLists/index.tsx
+115
-0
index.tsx
...ayandSettle/capitalAccounts/accountLists/schema/index.tsx
+78
-0
No files found.
config/routes/payandSettle.ts
View file @
24876d7d
...
...
@@ -40,7 +40,25 @@ const payandSettleRoute = {
hideInMenu
:
true
,
},
],
},
},
// 资金账户
{
path
:
'/memberCenter/payandSettle/capitalAccounts'
,
name
:
'capitalAccounts'
,
routes
:
[
{
path
:
'/memberCenter/payandSettle/capitalAccounts/accountLists'
,
name
:
'accountLists'
,
component
:
'@/pages/payandSettle/capitalAccounts/accountLists'
,
},
{
path
:
'/memberCenter/payandSettle/capitalAccounts/accountLists/accountDetail'
,
name
:
'accountDetail'
,
component
:
'@/pages/payandSettle/capitalAccounts/accountLists/accountDetail'
,
hideInMenu
:
true
,
},
],
},
]
}
export
default
payandSettleRoute
\ No newline at end of file
src/locales/zh-CN/menu.ts
View file @
24876d7d
...
...
@@ -241,12 +241,17 @@ export default {
'menu.logisticsAbility.logisticsResult.orderResultDeatil'
:
'物流单详情'
,
'menu.logisticsAbility.logisticsResult.toOrderComfirmList'
:
'待确认物流单'
,
// 支付
'menu.payandSettle'
:
'支付'
,
'menu.payandSettle.paySetting'
:
'支付方式管理'
,
'menu.payandSettle.paySetting.payParamsSetting'
:
'会员支付参数配置'
,
'menu.payandSettle.creditApplication'
:
'授信申请'
,
'menu.payandSettle.creditApplication.quotaMenage'
:
'授信额度管理'
,
'menu.payandSettle.creditApplication.quotaMenageDetail'
:
'授信额度管理'
,
'menu.payandSettle.capitalAccounts'
:
'资金账户'
,
'menu.payandSettle.capitalAccounts.accountLists'
:
'账户管理'
,
'menu.payandSettle.capitalAccounts.accountDetail'
:
'账户详情'
,
// 权限管理
'menu.systemSetting'
:
'系统'
,
...
...
src/pages/commodity/products/addProducts.tsx
View file @
24876d7d
import
React
,
{
useState
,
useRef
,
useEffect
,
createContext
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
Button
,
Card
,
Tabs
,
message
}
from
'antd'
import
{
Button
,
Card
,
Tabs
,
message
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
SaveOutlined
,
...
...
@@ -106,8 +106,6 @@ const AddProducts: React.FC<{}> = (props) => {
}
},
[
selectCategoryId
])
// useEffect(() => {
// renderTemplate(currentTemplateName)
// }, [currentTemplateName])
...
...
@@ -371,7 +369,49 @@ const AddProducts: React.FC<{}> = (props) => {
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
/>
</
TabPane
>
{
/* 带校验 Badge */
}
{
/* <TabPane tab={<Badge count={1} offset={[12, 0]}>基本信息</Badge>} key="1">
<BasicInfoForm
onRef={(refs) => setFormRefs([...formRefs, refs])}
onChangeAttributeList={(_lists: any) => setAttributeList(_lists)} />
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>选择货品</Badge>} key="2">
<SelectGoodsForm />
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>商品属性</Badge>} key="3">
<ProductAttributeForm
onRef={(refs) => setFormRefs([...formRefs, refs])}
attributesData={attributeList}
/>
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>价格设置</Badge>} key="4">
<PriceAttributeForm
onRef={(refs) => setFormRefs([...formRefs, refs])}
/>
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>商品图片</Badge>} key="5">
<ProductImageForm />
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>商品描述</Badge>} key="6">
{
renderTemplate()
}
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>物流信息</Badge>} key="7">
<LogisticsForm
onRef={(refs) => setFormRefs([...formRefs, refs])}
/>
</TabPane>
<TabPane tab={<Badge count={1} offset={[12, 0]}>其他</Badge>} key="8">
<OtherForm
onRef={(refs) => setFormRefs([...formRefs, refs])}
/>
</TabPane> */
}
</
Tabs
>
</
Card
>
</
PageHeaderWrapper
>)
}
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
24876d7d
...
...
@@ -6,7 +6,6 @@ import {
PlusOutlined
,
MinusOutlined
,
}
from
'@ant-design/icons'
import
styles
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetProductCustomerGetCustomerCategoryTreeResponse
,
...
...
@@ -208,6 +207,7 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
]
}
>
<
Cascader
allowClear=
{
false
}
disabled=
{
!
isUpdateAttribute
}
options=
{
customerCategoryTree
}
fieldNames=
{
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
}
}
...
...
src/pages/commodity/products/addProductsItem/index.less
View file @
24876d7d
...
...
@@ -8,8 +8,6 @@
padding: 0;
li{
padding-left: 24px;
// height: 32px;
// line-height: 32px;
color: #303133;
display: flex;
justify-content: space-between;
...
...
@@ -50,7 +48,7 @@
// productDescFormCloud // y
unxiancai
template
// productDescFormCloud // y
xc
template
.cloud-container{
width: 790px;
}
...
...
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
24876d7d
...
...
@@ -129,30 +129,31 @@ const ProductImageForm: React.FC<{}> = (props) => {
if
(
!
isLimit
)
{
message
.
error
(
'上传图片不超过600K!'
);
}
return
isJpgOrPng
&&
isLimit
&&
isSize
(
file
,
800
,
800
);
return
isJpgOrPng
&&
isLimit
}
//检测尺寸
const
isSize
=
(
file
,
w
,
h
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
width
=
w
;
let
height
=
h
;
let
_URL
=
window
.
URL
||
window
.
webkitURL
;
let
img
=
new
Image
();
img
.
onload
=
function
()
{
let
valid
=
img
.
width
<=
width
&&
img
.
height
<=
height
;
valid
?
resolve
()
:
reject
();
};
img
.
src
=
_URL
.
createObjectURL
(
file
);
}).
then
(
()
=>
{
return
file
;
},
()
=>
{
message
.
error
(
file
.
name
+
"图片尺寸不符合要求,请修改后重新上传!"
);
return
Promise
.
reject
();
}
);
};
// 检测尺寸
// const isSize = (file, w, h) => {
// return new Promise((resolve, reject) => {
// let width = w;
// let height = h;
// let _URL = window.URL || window.webkitURL;
// let img = new Image();
// img.onload = function() {
// let valid = img.width <= width && img.height <= height;
// valid ? resolve() : reject();
// };
// img.src = _URL.createObjectURL(file);
// }).then(
// () => {
// return file;
// },
// () => {
// message.error(file.name + "图片尺寸不符合要求,请修改后重新上传!");
// return Promise.reject();
// }
// );
// };
const
handlePreview
=
async
file
=>
{
if
(
!
file
.
url
&&
!
file
.
preview
)
{
...
...
src/pages/commodity/products/index.less
View file @
24876d7d
...
...
@@ -113,12 +113,22 @@
left:50%;
transform: translate(-50%, -50%);
}
.divVideo
, .divImage
{
.divVideo{
margin: 24px auto;
height: auto;
}
.divImage{
width: 320px;
height: 240px;
margin: 24px auto;
position: relative;
img{
width: 320px;
height: 240px;
max-width: 100%;
max-height: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.right-btn{
...
...
@@ -153,9 +163,14 @@
margin-left: 16px;
margin-bottom: 12px;
border:1px solid rgba(235,236,240,1);
position: relative;
img{
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.videoItem{
...
...
@@ -185,9 +200,14 @@
height:104px;
margin-right: 16px;
border:1px solid rgba(235,236,240,1);
position: relative;
.pic{
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
...
...
src/pages/payandSettle/capitalAccounts/accountLists/accountDetail.tsx
0 → 100644
View file @
24876d7d
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
Card
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
const
AccountDetail
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
<
PageHeaderWrapper
>
<
Card
>
<
p
>
账户详情
</
p
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
AccountDetail
src/pages/payandSettle/capitalAccounts/accountLists/index.tsx
0 → 100644
View file @
24876d7d
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
Card
,
Space
,
Button
,
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
PublicApi
}
from
'@/services/api'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
searchSchema
}
from
'./schema'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
EyePreview
from
'@/components/EyePreview'
const
formActions
=
createFormActions
();
const
AccountLists
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'账户归属'
,
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/payandSettle/capitalAccounts/accountLists/accountDetail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'会员类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
},
{
title
:
'会员角色'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
,
},
{
title
:
'会员等级'
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
,
},
{
title
:
'会员等级类型'
,
dataIndex
:
'unitName'
,
key
:
'unit'
,
},
{
title
:
'会员状态'
,
dataIndex
:
'unitName'
,
key
:
'unit'
,
},
{
title
:
'账户状态'
,
dataIndex
:
'unitName'
,
key
:
'unit'
,
},
{
title
:
'锁定余额'
,
dataIndex
:
'costPrice'
,
key
:
'costPrice'
,
render
:
text
=>
`¥
${
text
}
`
},
{
title
:
'可用余额'
,
dataIndex
:
'batch'
,
key
:
'batch'
,
render
:
text
=>
`¥
${
text
}
`
},
]
const
fetchData
=
(
params
:
any
)
=>
{
console
.
log
(
params
)
return
new
Promise
((
resolve
,
reject
)
=>
{
let
obj
=
{
...
params
}
PublicApi
.
getProductGoodsGetGoodsList
(
obj
).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
"id"
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
schema=
{
searchSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
AccountLists
src/pages/payandSettle/capitalAccounts/accountLists/schema/index.tsx
0 → 100644
View file @
24876d7d
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
export
const
searchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'账户归属'
,
align
:
'flex-left'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
justifyContent
:
'end'
,
},
colStyle
:
{
marginRight
:
20
,
},
},
properties
:
{
code
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'会员状态'
},
},
batch
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'账户状态'
},
},
applyTime
:
{
type
:
"daterange"
,
properties
:
{
"[start,end]"
:
{
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
}
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ 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