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
e4d28201
Commit
e4d28201
authored
Aug 01, 2020
by
tjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善交易能力模块页面
parent
24c2bbf5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1149 additions
and
127 deletions
+1149
-127
CustomStatus.tsx
src/components/NiceForm/components/CustomStatus.tsx
+15
-13
Search.tsx
src/components/NiceForm/components/Search.tsx
+1
-0
index.tsx
src/pages/repositories/schema/index.tsx
+0
-1
index.tsx
src/pages/transaction/stockSellStorage/bills/index.tsx
+233
-20
index.tsx
...pages/transaction/stockSellStorage/bills/schema/index.tsx
+227
-0
index.tsx
src/pages/transaction/stockSellStorage/billsType/index.tsx
+41
-33
index.tsx
src/pages/transaction/stockSellStorage/inventory/index.tsx
+167
-13
index.tsx
...s/transaction/stockSellStorage/inventory/schema/index.tsx
+227
-0
index.tsx
src/pages/transaction/stockSellStorage/warehouse/index.tsx
+54
-47
index.tsx
...s/transaction/stockSellStorage/warehouse/schema/index.tsx
+184
-0
No files found.
src/components/NiceForm/components/CustomStatus.tsx
View file @
e4d28201
import
React
from
'react'
import
{
Space
}
from
'antd'
import
React
from
'react'
;
import
{
Space
}
from
'antd'
;
const
CustomStatus
=
(
props
)
=>
{
const
CustomStatus
=
props
=>
{
console
.
log
(
props
);
return
(
<>
<
Space
>
<
span
className=
{
props
.
value
===
1
?
'commonStatusValid'
:
'commonStatusInvalid'
}
></
span
>
<
span
>
{
props
.
value
===
1
?
'有效'
:
'无效'
}
</
span
>
</
Space
>
<
Space
>
<
span
className=
{
props
.
value
===
1
?
'commonStatusValid'
:
'commonStatusInvalid'
}
></
span
>
<
span
>
{
props
.
value
===
1
?
'有效'
:
'无效'
}
</
span
>
</
Space
>
</>
)
}
)
;
}
;
export
default
CustomStatus
\ No newline at end of file
export
default
CustomStatus
;
src/components/NiceForm/components/Search.tsx
View file @
e4d28201
...
...
@@ -11,6 +11,7 @@ export interface SearchProps {
}
const
Search
=
(
props
)
=>
{
console
.
log
(
props
)
const
[
state
,
setState
]
=
useFieldState
({
filterSearch
:
false
})
...
...
src/pages/repositories/schema/index.tsx
View file @
e4d28201
...
...
@@ -62,7 +62,6 @@ export const repositSchema: ISchema = {
}
},
},
}
}
}
...
...
src/pages/transaction/stockSellStorage/bills/index.tsx
View file @
e4d28201
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Tooltip
,
Input
,
Select
,
Button
,
Card
,
Dropdown
,
Menu
,
Row
,
Col
,
Popconfirm
,
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
UpOutlined
,
DeleteOutlined
,
DownOutlined
,
}
from
'@ant-design/icons'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Button
,
Card
,
Dropdown
,
Menu
,
Row
,
Col
,
Space
,
Badge
}
from
'antd'
;
import
{
PlusOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
repositSchema
}
from
'./schema'
;
import
UploadModal
from
'@/components/UploadModal'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
data
=
[
{
key
:
'1'
,
id
:
'1'
,
no
:
'广州成品仓'
,
noType
:
'成品入库单'
,
remark
:
'进口头层黄牛皮荔枝纹'
,
name
:
'广州白马皮具交易中心'
,
warehouse
:
'广州仓库 A'
,
tranactionTime
:
'2020-05-12 08:08'
,
orderNo
:
'DPTY12'
,
status
:
1
,
},
{
key
:
'2'
,
id
:
'2'
,
no
:
'广州成品仓'
,
noType
:
'采购入库单'
,
remark
:
'进口头层黄牛皮荔枝纹'
,
name
:
'广州白马皮具交易中心'
,
warehouse
:
'广州仓库 A'
,
tranactionTime
:
'2020-05-12 08:08'
,
orderNo
:
'DPTY12'
,
status
:
2
,
},
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
const
Bills
:
React
.
FC
<
{}
>
=
()
=>
{
return
<
div
>
Bills
</
div
>;
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
visibleModal
,
setVisibleModal
]
=
useState
(
false
);
const
menu
=
(
<
Menu
onClick=
{
e
=>
handleBatchDel
(
e
)
}
>
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
删除导入批次
</
Menu
.
Item
>
</
Menu
>
);
const
moreMenu
=
(
<
Menu
onClick=
{
e
=>
handleMoreMenu
(
e
)
}
>
<
Menu
.
Item
key=
"1"
>
修改
</
Menu
.
Item
>
<
Menu
.
Item
key=
"2"
>
反审
</
Menu
.
Item
>
<
Menu
.
Item
key=
"3"
>
删除
</
Menu
.
Item
>
</
Menu
>
);
const
handleBatchDel
=
(
e
:
any
)
=>
{};
const
handleMoreMenu
=
(
e
:
any
)
=>
{};
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'单据号'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/repositories/viewRepository?id=${record.key}&preview=1`
}
>
{
text
}
</
EyePreview
>
),
},
{
title
:
'单据类型'
,
align
:
'center'
,
dataIndex
:
'noType'
,
key
:
'noType'
,
},
{
title
:
'单据摘要'
,
align
:
'center'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
'对应仓库'
,
align
:
'center'
,
dataIndex
:
'warehouse'
,
key
:
'warehouse'
,
},
{
title
:
'交易时间'
,
align
:
'center'
,
dataIndex
:
'tranactionTime'
,
key
:
'tranactionTime'
,
},
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
},
{
title
:
'单据状态'
,
align
:
'center'
,
dataIndex
:
'state'
,
key
:
'state'
,
filters
:
[
{
text
:
'Male'
,
value
:
'male'
},
{
text
:
'Female'
,
value
:
'female'
},
],
filterMultiple
:
false
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Badge
color=
{
record
.
status
===
1
?
'#C1C7D0'
:
'#41CC9E'
}
text=
{
record
.
status
===
1
?
'未审核'
:
'已审核'
}
/>
),
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
<
Button
type=
"link"
>
审核
</
Button
>
<
Dropdown
overlay=
{
moreMenu
}
trigger=
{
[
'click'
]
}
>
<
Button
type=
"link"
>
更多
<
DownOutlined
/>
</
Button
>
</
Dropdown
>
</>
);
},
},
];
const
handleAdd
=
()
=>
{};
const
rowSelection
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{},
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
'key'
}
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
Row
justify=
"space-between"
>
<
Col
>
<
Space
>
<
Button
type=
"primary"
onClick=
{
handleAdd
}
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
<
Button
style=
{
{
margin
:
'12px'
}
}
onClick=
{
()
=>
setVisibleModal
(
true
)
}
>
导入
</
Button
>
<
Dropdown
.
Button
overlay=
{
menu
}
trigger=
{
[
'click'
]
}
icon=
{
<
DownOutlined
/>
}
>
更多
</
Dropdown
.
Button
>
</
Space
>
</
Col
>
<
Col
>
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'search'
,
FORM_FILTER_PATH
,
);
}
}
schema=
{
repositSchema
}
/>
</
Col
>
</
Row
>
}
/>
<
UploadModal
visibleModal=
{
visibleModal
}
fileText=
"会员资料"
onCancel=
{
()
=>
setVisibleModal
(
false
)
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
Bills
;
src/pages/transaction/stockSellStorage/bills/schema/index.tsx
0 → 100644
View file @
e4d28201
import
React
from
'react'
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
Button
}
from
'antd'
;
export
const
repositSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
properties
:
{
search
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
"x-mega-props"
:
{
},
"x-component-props"
:
{
placeholder
:
'请输入仓位名称'
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
"x-component"
:
"mega-layout"
,
visible
:
false
,
"x-component-props"
:
{
inline
:
true
},
properties
:
{
productName
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'商品名称'
}
},
productId
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'商品ID'
}
},
category
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择品类'
},
enum
:
[]
},
brand
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
},
enum
:
[]
},
submit
:
{
"x-component"
:
'Submit'
,
"x-component-props"
:
{
children
:
'查询'
}
}
},
},
}
}
}
}
export
const
repositDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
"x-component"
:
"tab"
,
"x-component-props"
:
{
type
:
'card'
},
properties
:
{
"tab-1"
:
{
"type"
:
"object"
,
"x-component"
:
"tabpane"
,
"x-component-props"
:
{
"tab"
:
"基本信息"
},
"properties"
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
},
properties
:
{
name
:
{
type
:
'string'
,
required
:
true
,
title
:
'仓位名称'
,
"x-component-props"
:
{
placeholder
:
'建议名称:商品名称+商城名称+渠道描述'
}
},
productName
:
{
type
:
'string'
,
title
:
'商品名称'
,
required
:
true
},
warehouseId
:
{
type
:
'string'
,
title
:
'仓库名称'
,
enum
:
[]
},
itemNo
:
{
type
:
'string'
,
"x-component"
:
'Text'
,
title
:
'对应货品'
,
default
:
'暂无'
},
inventory
:
{
type
:
'number'
,
"x-component"
:
"CustomSlider"
,
required
:
true
,
"x-component-props"
:
{
min
:
0
,
max
:
200
},
title
:
'分配仓位库存'
,
},
inventoryDeductWay
:
{
type
:
'radio'
,
title
:
'库存扣减方式'
,
required
:
true
,
enum
:
[
{
label
:
'按仓位随机扣减'
,
value
:
1
},
{
label
:
'按仓库位置远近扣除'
,
value
:
2
}
],
default
:
1
}
}
}
}
},
"tab-2"
:
{
"type"
:
"object"
,
"x-component"
:
"tabpane"
,
"x-component-props"
:
{
"tab"
:
"适用商城"
},
"properties"
:
{
MEGA_LAYOUT2
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
labelAlign
:
'left'
},
properties
:
{
"shopIds"
:
{
"type"
:
"array:number"
,
"x-component"
:
'CardCheckBox'
,
"x-component-props"
:
{
dataSource
:
[
{
logo
:
''
,
title
:
'会员'
,
id
:
1
},
{
logo
:
''
,
title
:
'小程序'
,
id
:
2
},
{
logo
:
''
,
title
:
'H5'
,
id
:
3
},
{
logo
:
''
,
title
:
'渠道'
,
id
:
4
},
]
},
"title"
:
"适用商城"
,
required
:
true
,
}
}
}
}
},
"tab-3"
:
{
type
:
'object'
,
"x-component"
:
'tabpane'
,
"x-component-props"
:
{
"tab"
:
"适用会员"
},
properties
:
{
MEGA_LAYOUT3
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
labelAlign
:
'left'
},
properties
:
{
"isAllMemberShare"
:
{
"type"
:
"radio"
,
enum
:
[
{
label
:
'所有会员共享(默认)'
,
value
:
1
},
{
label
:
'指定会员'
,
value
:
0
},
],
"title"
:
"选择渠道会员"
,
default
:
1
,
required
:
true
,
},
applyMember
:
{
type
:
'array:number'
,
"x-component"
:
'MultTable'
,
"x-component-props"
:
{
columns
:
"{{tableColumns}}"
},
default
:
[
{
id
:
1
,
name
:
'名称'
,
type
:
'类型'
},
{
id
:
2
,
name
:
'名称1'
,
type
:
'类型1'
}
]
}
}
}
}
}
}
}
}
}
src/pages/transaction/stockSellStorage/billsType/index.tsx
View file @
e4d28201
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Popconfirm
}
from
'antd'
;
import
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Space
,
Popconfirm
,
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
...
...
@@ -160,39 +169,38 @@ const billsType: React.FC<{}> = () => {
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
Row
>
<
Col
span=
{
12
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
<
Row
justify=
"space-between"
style=
{
{
marginBottom
:
'16px'
}
}
>
<
Col
>
<
Space
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
</
Space
>
</
Col
>
<
Col
span=
{
12
}
style=
{
{
textAlign
:
'right'
}
}
>
<
Tooltip
trigger=
{
[
'focus'
]
}
placement=
"top"
title=
{
<
span
>
输入单据名称进行搜索
</
span
>
}
>
<
Input
.
Search
style=
{
{
width
:
'232px'
}
}
value=
{
searchName
}
placeholder=
"搜索"
onChange=
{
e
=>
setSearchName
(
e
.
target
.
value
)
}
/>
</
Tooltip
>
<
Button
style=
{
{
marginLeft
:
'16px'
}
}
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
<
Col
>
<
Space
style=
{
{
justifyContent
:
'flex-end'
,
width
:
'100%'
}
}
>
<
Tooltip
trigger=
{
[
'focus'
]
}
placement=
"top"
title=
{
<
span
>
输入单据名称进行搜索
</
span
>
}
>
<
Input
.
Search
style=
{
{
width
:
'232px'
}
}
value=
{
searchName
}
placeholder=
"搜索"
onChange=
{
e
=>
setSearchName
(
e
.
target
.
value
)
}
/>
</
Tooltip
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
</
Space
>
</
Col
>
</
Row
>
}
...
...
src/pages/transaction/stockSellStorage/inventory/index.tsx
View file @
e4d28201
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Tooltip
,
Input
,
Select
,
Button
,
Card
,
Dropdown
,
Menu
,
Row
,
Col
,
Popconfirm
,
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Input
,
Button
,
Card
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
...
...
@@ -21,10 +11,174 @@ import {
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
repositSchema
}
from
'./schema'
;
import
style
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
data
=
[
{
key
:
'1'
,
id
:
'M-111'
,
no
:
'红色/XXL'
,
type
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
price
:
'¥ 14.50'
,
name
:
'广州白马皮具交易中心'
,
warehouse
:
'广州仓库 A'
,
inventory
:
'2,000'
,
price2
:
'¥ 25,000'
,
safeInventory
:
'123'
,
},
{
key
:
'2'
,
id
:
'M-111'
,
no
:
'红色/XXL'
,
type
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
price
:
'¥ 14.50'
,
name
:
'广州白马皮具交易中心'
,
warehouse
:
'广州仓库 A'
,
inventory
:
'2,000'
,
price2
:
'¥ 25,000'
,
safeInventory
:
''
,
},
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
const
Inventory
:
React
.
FC
<
{}
>
=
()
=>
{
return
<
div
>
Inventory
</
div
>;
const
ref
=
useRef
<
any
>
({});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
align
:
'center'
,
dataIndex
:
'id'
,
key
:
'id'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/repositories/viewRepository?id=${record.key}&preview=1`
}
>
{
text
}
</
EyePreview
>
),
},
{
title
:
'规格型号'
,
align
:
'center'
,
dataIndex
:
'no'
,
key
:
'no'
,
},
{
title
:
'品类'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
},
{
title
:
'品牌'
,
align
:
'center'
,
dataIndex
:
'brand'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
align
:
'center'
,
dataIndex
:
'unit'
,
key
:
'unit'
,
},
{
title
:
'价格'
,
align
:
'center'
,
dataIndex
:
'price'
,
key
:
'price'
,
},
{
title
:
'仓库'
,
align
:
'center'
,
dataIndex
:
'warehouse'
,
key
:
'warehouse'
,
},
{
title
:
'库存'
,
align
:
'center'
,
dataIndex
:
'inventory'
,
key
:
'inventory'
,
},
{
title
:
'安全库存'
,
align
:
'center'
,
dataIndex
:
'safeInventory'
,
key
:
'safeInventory'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Input
value=
{
record
.
safeInventory
}
allowClear
onChange=
{
e
=>
handleChange
(
e
)
}
></
Input
>
);
},
},
];
const
handleChange
=
(
e
:
any
)
=>
{
console
.
log
(
e
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
'key'
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'search'
,
FORM_FILTER_PATH
,
);
}
}
schema=
{
repositSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
Inventory
;
src/pages/transaction/stockSellStorage/inventory/schema/index.tsx
0 → 100644
View file @
e4d28201
import
React
from
'react'
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
Button
}
from
'antd'
;
export
const
repositSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
properties
:
{
search
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
"x-mega-props"
:
{
},
"x-component-props"
:
{
placeholder
:
'请输入仓位名称'
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
"x-component"
:
"mega-layout"
,
visible
:
false
,
"x-component-props"
:
{
inline
:
true
},
properties
:
{
productName
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'商品名称'
}
},
productId
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'商品ID'
}
},
category
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择品类'
},
enum
:
[]
},
brand
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
},
enum
:
[]
},
submit
:
{
"x-component"
:
'Submit'
,
"x-component-props"
:
{
children
:
'查询'
}
}
},
},
}
}
}
}
export
const
repositDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
"x-component"
:
"tab"
,
"x-component-props"
:
{
type
:
'card'
},
properties
:
{
"tab-1"
:
{
"type"
:
"object"
,
"x-component"
:
"tabpane"
,
"x-component-props"
:
{
"tab"
:
"基本信息"
},
"properties"
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
},
properties
:
{
name
:
{
type
:
'string'
,
required
:
true
,
title
:
'仓位名称'
,
"x-component-props"
:
{
placeholder
:
'建议名称:商品名称+商城名称+渠道描述'
}
},
productName
:
{
type
:
'string'
,
title
:
'商品名称'
,
required
:
true
},
warehouseId
:
{
type
:
'string'
,
title
:
'仓库名称'
,
enum
:
[]
},
itemNo
:
{
type
:
'string'
,
"x-component"
:
'Text'
,
title
:
'对应货品'
,
default
:
'暂无'
},
inventory
:
{
type
:
'number'
,
"x-component"
:
"CustomSlider"
,
required
:
true
,
"x-component-props"
:
{
min
:
0
,
max
:
200
},
title
:
'分配仓位库存'
,
},
inventoryDeductWay
:
{
type
:
'radio'
,
title
:
'库存扣减方式'
,
required
:
true
,
enum
:
[
{
label
:
'按仓位随机扣减'
,
value
:
1
},
{
label
:
'按仓库位置远近扣除'
,
value
:
2
}
],
default
:
1
}
}
}
}
},
"tab-2"
:
{
"type"
:
"object"
,
"x-component"
:
"tabpane"
,
"x-component-props"
:
{
"tab"
:
"适用商城"
},
"properties"
:
{
MEGA_LAYOUT2
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
labelAlign
:
'left'
},
properties
:
{
"shopIds"
:
{
"type"
:
"array:number"
,
"x-component"
:
'CardCheckBox'
,
"x-component-props"
:
{
dataSource
:
[
{
logo
:
''
,
title
:
'会员'
,
id
:
1
},
{
logo
:
''
,
title
:
'小程序'
,
id
:
2
},
{
logo
:
''
,
title
:
'H5'
,
id
:
3
},
{
logo
:
''
,
title
:
'渠道'
,
id
:
4
},
]
},
"title"
:
"适用商城"
,
required
:
true
,
}
}
}
}
},
"tab-3"
:
{
type
:
'object'
,
"x-component"
:
'tabpane'
,
"x-component-props"
:
{
"tab"
:
"适用会员"
},
properties
:
{
MEGA_LAYOUT3
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
labelAlign
:
'left'
},
properties
:
{
"isAllMemberShare"
:
{
"type"
:
"radio"
,
enum
:
[
{
label
:
'所有会员共享(默认)'
,
value
:
1
},
{
label
:
'指定会员'
,
value
:
0
},
],
"title"
:
"选择渠道会员"
,
default
:
1
,
required
:
true
,
},
applyMember
:
{
type
:
'array:number'
,
"x-component"
:
'MultTable'
,
"x-component-props"
:
{
columns
:
"{{tableColumns}}"
},
default
:
[
{
id
:
1
,
name
:
'名称'
,
type
:
'类型'
},
{
id
:
2
,
name
:
'名称1'
,
type
:
'类型1'
}
]
}
}
}
}
}
}
}
}
}
src/pages/transaction/stockSellStorage/warehouse/index.tsx
View file @
e4d28201
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Popconfirm
}
from
'antd'
;
import
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Space
,
Popconfirm
,
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
...
...
@@ -33,6 +42,20 @@ const data = [
},
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
const
WareHouse
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
({});
const
[
searchName
,
setSearchName
]
=
useState
(
''
);
...
...
@@ -135,20 +158,6 @@ const WareHouse: React.FC<{}> = () => {
},
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
const
handleReset
=
()
=>
{};
return
(
...
...
@@ -160,39 +169,37 @@ const WareHouse: React.FC<{}> = () => {
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
Row
>
<
Col
span=
{
12
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
<
Row
justify=
"space-between"
style=
{
{
marginBottom
:
'16px'
}
}
>
<
Col
>
<
Space
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
</
Space
>
</
Col
>
<
Col
span=
{
12
}
style=
{
{
textAlign
:
'right'
}
}
>
<
Tooltip
trigger=
{
[
'focus'
]
}
placement=
"top"
title=
{
<
span
>
输入仓库名称进行搜索
</
span
>
}
>
<
Input
.
Search
style=
{
{
width
:
'232px'
}
}
value=
{
searchName
}
placeholder=
"搜索"
onChange=
{
e
=>
setSearchName
(
e
.
target
.
value
)
}
/>
</
Tooltip
>
<
Button
style=
{
{
marginLeft
:
'16px'
}
}
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
<
Col
>
<
Space
style=
{
{
justifyContent
:
'flex-end'
,
width
:
'100%'
}
}
>
<
Tooltip
trigger=
{
[
'focus'
]
}
placement=
"top"
title=
{
<
span
>
输入仓库名称进行搜索
</
span
>
}
>
<
Input
.
Search
value=
{
searchName
}
placeholder=
"搜索"
onChange=
{
e
=>
setSearchName
(
e
.
target
.
value
)
}
/>
</
Tooltip
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
</
Space
>
</
Col
>
</
Row
>
}
...
...
src/pages/transaction/stockSellStorage/warehouse/schema/index.tsx
0 → 100644
View file @
e4d28201
import
React
from
'react'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
Button
}
from
'antd'
;
export
const
repositSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
},
},
},
},
},
};
export
const
repositDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{
type
:
'card'
,
},
properties
:
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'基本信息'
,
},
properties
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
,
},
properties
:
{
name
:
{
type
:
'string'
,
required
:
true
,
title
:
'仓位名称'
,
'x-component-props'
:
{
placeholder
:
'建议名称:商品名称+商城名称+渠道描述'
,
},
},
productName
:
{
type
:
'string'
,
title
:
'商品名称'
,
required
:
true
,
},
warehouseId
:
{
type
:
'string'
,
title
:
'仓库名称'
,
enum
:
[],
},
itemNo
:
{
type
:
'string'
,
'x-component'
:
'Text'
,
title
:
'对应货品'
,
default
:
'暂无'
,
},
inventory
:
{
type
:
'number'
,
'x-component'
:
'CustomSlider'
,
required
:
true
,
'x-component-props'
:
{
min
:
0
,
max
:
200
,
},
title
:
'分配仓位库存'
,
},
inventoryDeductWay
:
{
type
:
'radio'
,
title
:
'库存扣减方式'
,
required
:
true
,
enum
:
[
{
label
:
'按仓位随机扣减'
,
value
:
1
,
},
{
label
:
'按仓库位置远近扣除'
,
value
:
2
,
},
],
default
:
1
,
},
},
},
},
},
'tab-2'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'适用商城'
,
},
properties
:
{
MEGA_LAYOUT2
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
labelAlign
:
'left'
,
},
properties
:
{
shopIds
:
{
type
:
'array:number'
,
'x-component'
:
'CardCheckBox'
,
'x-component-props'
:
{
dataSource
:
[
{
logo
:
''
,
title
:
'会员'
,
id
:
1
},
{
logo
:
''
,
title
:
'小程序'
,
id
:
2
},
{
logo
:
''
,
title
:
'H5'
,
id
:
3
},
{
logo
:
''
,
title
:
'渠道'
,
id
:
4
},
],
},
title
:
'适用商城'
,
required
:
true
,
},
},
},
},
},
'tab-3'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'适用会员'
,
},
properties
:
{
MEGA_LAYOUT3
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
labelAlign
:
'left'
,
},
properties
:
{
isAllMemberShare
:
{
type
:
'radio'
,
enum
:
[
{
label
:
'所有会员共享(默认)'
,
value
:
1
},
{
label
:
'指定会员'
,
value
:
0
},
],
title
:
'选择渠道会员'
,
default
:
1
,
required
:
true
,
},
applyMember
:
{
type
:
'array:number'
,
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
columns
:
'{{tableColumns}}'
,
},
default
:
[
{
id
:
1
,
name
:
'名称'
,
type
:
'类型'
},
{
id
:
2
,
name
:
'名称1'
,
type
:
'类型1'
},
],
},
},
},
},
},
},
},
},
};
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