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
19ac5d51
Commit
19ac5d51
authored
Aug 04, 2020
by
tjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善交易能力模块
parent
e820bf40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
703 additions
and
422 deletions
+703
-422
base.config.json
config/base.config.json
+0
-0
tranactionRoute.ts
config/routes/tranactionRoute.ts
+21
-0
CustomRegistryPhone.tsx
src/components/NiceForm/components/CustomRegistryPhone.tsx
+70
-0
index.tsx
src/components/NiceForm/index.tsx
+20
-20
menu.ts
src/locales/zh-CN/menu.ts
+3
-0
addMember copy.tsx
src/pages/member/memberImport/addMember copy.tsx
+0
-0
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+38
-182
index.tsx
src/pages/member/memberImport/schema/index.tsx
+166
-140
addBills.tsx
src/pages/transaction/stockSellStorage/bills/addBills.tsx
+93
-0
index.tsx
src/pages/transaction/stockSellStorage/bills/index.tsx
+14
-3
addBillsType.tsx
...s/transaction/stockSellStorage/billsType/addBillsType.tsx
+93
-0
index.tsx
src/pages/transaction/stockSellStorage/billsType/index.tsx
+28
-35
addWarehouse.tsx
...s/transaction/stockSellStorage/warehouse/addWarehouse.tsx
+122
-0
index.tsx
src/pages/transaction/stockSellStorage/warehouse/index.tsx
+35
-42
No files found.
config/base.config.json
View file @
19ac5d51
This diff is collapsed.
Click to expand it.
config/routes/tranactionRoute.ts
View file @
19ac5d51
...
...
@@ -17,18 +17,39 @@ const TranactionRoute = {
component
:
'@/pages/transaction/stockSellStorage/warehouse/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addWarehouse'
,
name
:
'addWarehouse'
,
key
:
'addWarehouse'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/warehouse/addWarehouse'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/billsType'
,
name
:
'billsType'
,
key
:
'billsType'
,
component
:
'@/pages/transaction/stockSellStorage/billsType/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addBillsType'
,
name
:
'addBillsType'
,
key
:
'addBillsType'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/billsType/addBillsType'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/bills'
,
name
:
'bills'
,
key
:
'bills'
,
component
:
'@/pages/transaction/stockSellStorage/bills/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addBills'
,
name
:
'addBills'
,
key
:
'addBills'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/bills/addBills'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/inventory'
,
name
:
'inventory'
,
key
:
'inventory'
,
...
...
src/components/NiceForm/components/CustomRegistryPhone.tsx
0 → 100644
View file @
19ac5d51
import
React
from
'react'
;
import
{
Row
,
Col
,
Select
,
Input
}
from
'antd'
;
import
styled
from
'styled-components'
;
import
{
findItemAndDelete
}
from
'@/utils'
;
import
cx
from
'classnames'
;
const
{
Option
}
=
Select
;
const
RowStyleLayout
=
styled
(
props
=>
<
div
{
...
props
}
/>)
``
;
const
registryPhone
=
(
props
:
any
)
=>
{
const
{
dataSource
=
[],
selectPh
,
inputPh
}
=
props
.
props
[
'x-component-props'
];
const
defaultValue
:
any
=
props
.
props
.
default
||
{};
const
value
:
any
=
props
.
value
||
{};
const
handleChange
=
(
type
,
e
)
=>
{
if
(
type
===
'select'
)
{
props
.
mutators
.
change
({
...
value
,
phone
:
e
});
}
else
{
e
.
persist
();
props
.
mutators
.
change
({
...
value
,
countryCode
:
e
.
target
.
value
});
}
};
return
(
<
Row
>
<
Col
span=
{
8
}
>
<
Select
value=
{
defaultValue
.
countryCode
}
onChange=
{
val
=>
handleChange
(
'select'
,
val
)
}
placeholder=
{
selectPh
}
>
{
dataSource
.
map
((
v
,
i
)
=>
{
return
(
<
Option
key=
{
v
.
text
}
value=
{
v
.
id
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
img
style=
{
{
width
:
'24px'
,
height
:
'17px'
,
marginRight
:
'8px'
,
}
}
src=
{
v
.
url
}
/>
{
v
.
text
}
</
div
>
</
Option
>
);
})
}
</
Select
>
</
Col
>
<
Col
span=
{
15
}
offset=
{
1
}
>
<
Input
defaultValue=
{
defaultValue
.
phone
}
placeholder=
{
inputPh
}
maxLength=
{
11
}
onChange=
{
e
=>
handleChange
(
'input'
,
e
)
}
/>
</
Col
>
</
Row
>
);
};
registryPhone
.
defaultProps
=
{};
registryPhone
.
isFieldComponent
=
true
;
export
default
registryPhone
;
src/components/NiceForm/index.tsx
View file @
19ac5d51
import
React
from
'react'
import
SchemaForm
,
{
IAntdSchemaFormProps
,
createFormActions
,
FormPath
,
SchemaField
}
from
'@formily/antd'
import
React
from
'react'
;
import
SchemaForm
,
{
IAntdSchemaFormProps
,
createFormActions
,
FormPath
,
SchemaField
,
}
from
'@formily/antd'
;
import
{
Button
,
Space
}
from
'antd'
;
import
CustomUpload
from
'./components/CustomUpload'
;
import
CustomStatus
from
'./components/CustomStatus'
;
...
...
@@ -10,12 +15,12 @@ import Submit from './components/Submit';
import
Text
from
'./components/Text'
;
import
CardCheckBox
from
'./components/CardCheckBox'
;
import
MultTable
from
'./components/MultTable'
;
import
CustomRegistryPhone
from
'./components/CustomRegistryPhone'
;
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{
}
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
(
props
)
=>
{
const
{
children
,
components
,
...
reset
}
=
props
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
...
reset
}
=
props
;
const
customComponents
=
{
CustomUpload
,
CustomStatus
,
...
...
@@ -25,23 +30,19 @@ const NiceForm:React.FC<NiceFormProps> = (props) => {
Submit
,
Text
,
CardCheckBox
,
MultTable
}
MultTable
,
CustomRegistryPhone
,
};
const
defineComponents
=
Object
.
assign
(
customComponents
,
components
)
const
defineComponents
=
Object
.
assign
(
customComponents
,
components
)
;
return
(
<
SchemaForm
colon=
{
false
}
components=
{
defineComponents
}
{
...
reset
}
>
<
SchemaForm
colon=
{
false
}
components=
{
defineComponents
}
{
...
reset
}
>
{
children
}
</
SchemaForm
>
)
}
)
;
}
;
NiceForm
.
defaultProps
=
{};
NiceForm
.
defaultProps
=
{}
export
default
NiceForm
\ No newline at end of file
export
default
NiceForm
;
src/locales/zh-CN/menu.ts
View file @
19ac5d51
...
...
@@ -69,8 +69,11 @@ export default {
'menu.tranactionAbility'
:
'交易'
,
'menu.tranactionAbility.stockSellStorage'
:
'进销存'
,
'menu.tranactionAbility.stockSellStorage.warehouse'
:
'仓库'
,
'menu.tranactionAbility.stockSellStorage.addWarehouse'
:
'新增仓库'
,
'menu.tranactionAbility.stockSellStorage.billsType'
:
'单据类型'
,
'menu.tranactionAbility.stockSellStorage.addBillsType'
:
'新增单据类型'
,
'menu.tranactionAbility.stockSellStorage.bills'
:
'单据'
,
'menu.tranactionAbility.stockSellStorage.addBills'
:
'新增单据'
,
'menu.tranactionAbility.stockSellStorage.inventory'
:
'库存'
,
//物流能力
...
...
src/pages/member/memberImport/addMember copy.tsx
deleted
100644 → 0
View file @
e820bf40
This diff is collapsed.
Click to expand it.
src/pages/member/memberImport/addMember.tsx
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
,
message
,
Upload
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
ContainerOutlined
}
from
'@ant-design/icons'
;
import
{
Form
,
FormItem
,
createFormActions
}
from
'@formily/antd'
;
import
{
Select
,
Input
,
Upload
}
from
'@formily/antd-components'
;
import
{
ContainerOutlined
,
PlusOutlined
,
SaveOutlined
,
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
IFormFilter
,
IButtonFilter
,
}
from
'god/dist/src/standard-table/TableController'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
styles
from
'./index.less'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
style
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
a
ctions
=
createFormActions
();
const
a
ddSchemaAction
=
createFormActions
();
const
addMember
:
React
.
FC
<
any
>
=
props
=>
{
const
ref
=
useRef
({});
const
[
actived
,
setActived
]
=
useState
(
'-1'
);
const
[
editable
,
setEditable
]
=
useState
(
props
.
location
.
query
.
type
!=
'check'
,
);
const
selectList
:
any
=
[
{
label
:
''
,
...
...
@@ -30,15 +38,10 @@ const addMember: React.FC<any> = props => {
// )
value
:
'1'
,
},
{
label
:
''
,
value
:
'2'
},
{
label
:
''
,
value
:
'3'
},
{
label
:
''
,
value
:
'4'
},
{
label
:
''
,
value
:
'5'
},
];
/* 会员类型、会员角色、会员等级、注册手机号选项 */
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
data
=
[
{
...
...
@@ -146,181 +149,34 @@ const addMember: React.FC<any> = props => {
return
isJpgOrPng
&&
isLt2M
;
};
const
handleChange
=
(
items
:
any
,
file
:
any
)
=>
{
for
(
let
elem
of
file
)
{
elem
.
url
=
elem
.
data
;
}
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
<>
<
div
className=
{
style
.
headerTop
}
>
<
span
>
返回
</
span
>
<
span
>
{
props
.
location
.
query
.
type
===
'add'
?
'新建会员'
:
props
.
location
.
query
.
type
===
'change'
?
'编辑会员'
:
'查看会员'
}
</
span
>
</
div
>
</>
}
extra=
{
<>
<
Button
className=
{
style
.
saveBtn
}
icon=
{
<
ContainerOutlined
/>
}
onClick=
{
()
=>
actions
.
submit
()
}
>
保存
</
Button
>
</>
props
.
location
.
query
.
type
===
'add'
?
'新建会员'
:
props
.
location
.
query
.
type
===
'change'
?
'编辑会员'
:
'查看会员'
}
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
}
>
<
Card
>
<
Form
editable=
{
editable
}
labelCol=
{
3
}
wrapperCol=
{
10
}
labelAlign=
"left"
actions=
{
actions
}
>
<
Tabs
tabBarGutter=
{
30
}
activeKey=
{
actived
}
onChange=
{
activeKey
=>
setActived
(
activeKey
)
}
>
<
TabPane
tab=
{
// <Badge count=
{
tabCount
[
'1'
]}
offset
=
{[
10
,
0
]}
>
'基本信息'
// </Badge>
}
key=
"-1"
>
<
FormItem
label=
"会员类型"
name=
"memberTypes"
dataSource=
{
memberItems
.
memberTypes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员类型!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员角色"
name=
"memberRoles"
dataSource=
{
memberItems
.
memberRoles
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员等级"
name=
"memberLevels"
dataSource=
{
memberItems
.
memberLevels
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员等级!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
{
<>
<
span
className=
{
style
.
required
}
>
*
</
span
>
注册手机号
</>
}
name=
"registry"
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
6
}
>
<
FormItem
itemStyle=
{
{
marginBottom
:
0
}
}
name=
"country"
dataSource=
{
memberItems
.
countryCodes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
</
Col
>
<
Col
span=
{
18
}
>
<
FormItem
name=
"phoneMobile"
itemStyle=
{
{
marginBottom
:
0
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Input
}
/>
</
Col
>
</
Row
>
</
FormItem
>
<
FormItem
label=
"注册邮箱"
name=
"memberEmail"
itemStyle=
{
{
marginBottom
:
0
}
}
component=
{
Input
}
/>
</
TabPane
>
{
memberItems
.
groups
&&
memberItems
.
groups
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
<
TabPane
tab=
{
// <Badge count=
{
tabCount
[
'1'
]}
offset
=
{[
10
,
0
]}
>
item
.
groupName
// </Badge>
}
key=
{
index
}
>
{
item
.
elements
.
map
((
items
:
any
,
indexs
:
number
)
=>
{
return
(
<
div
key=
{
indexs
}
>
{
items
.
fieldType
===
'String'
?
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
component=
{
Input
}
key=
{
indexs
}
/>
)
:
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
action=
"/api/file/file/upload"
listType=
"picture-card"
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
data=
{
{
fileType
:
2
}
}
beforeUpload=
{
beforeUpload
}
onChange=
{
(
file
:
any
)
=>
handleChange
(
items
,
file
)
}
showUploadList=
{
{
showRemoveIcon
:
items
.
value
&&
items
.
value
.
length
>
0
,
}
}
key=
{
indexs
}
component=
{
Upload
}
/>
)
}
</
div
>
);
})
}
</
TabPane
>
);
})
}
</
Tabs
>
</
Form
>
<
NiceForm
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
schema=
{
initDetailSchema
(
memberItems
)
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
...
...
src/pages/
transaction/stockSellStorage/warehouse
/schema/index.tsx
→
src/pages/
member/memberImport
/schema/index.tsx
View file @
19ac5d51
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/addBills.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddBills
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建单据'
:
usePageStatus
().
pageStatus
===
1
?
'编辑单据'
:
'查看单据'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"单据编号"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长10个字符'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"name1"
title=
"单据名称"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长20个字符,10个汉字'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"countryCode"
title=
"仓库负责人"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddBills
;
src/pages/transaction/stockSellStorage/bills/index.tsx
View file @
19ac5d51
...
...
@@ -81,7 +81,14 @@ const Bills: React.FC<{}> = () => {
const
handleBatchDel
=
(
e
:
any
)
=>
{};
const
handleMoreMenu
=
(
e
:
any
)
=>
{};
const
handleMoreMenu
=
(
e
:
any
)
=>
{
if
(
e
.
key
===
'1'
)
{
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addBills?id=
${
''
}
`
,
);
}
// console.log(e);
};
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -91,7 +98,7 @@ const Bills: React.FC<{}> = () => {
key
:
'no'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/
repositories/viewRepository
?id=${record.key}&preview=1`
}
url=
{
`/
memberCenter/tranactionAbility/stockSellStorage/addBills
?id=${record.key}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -192,8 +199,12 @@ const Bills: React.FC<{}> = () => {
<
Space
>
<
Button
type=
"primary"
onClick=
{
handleAdd
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/stockSellStorage/addBills'
,
)
}
>
新建
</
Button
>
...
...
src/pages/transaction/stockSellStorage/billsType/addBillsType.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddWarehouse
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建单据类型'
:
usePageStatus
().
pageStatus
===
1
?
'编辑单据类型'
:
'查看单据类型'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"单据类型编号"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长10个字符'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"name1"
title=
"单据类型名称"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长20个字符,10个汉字'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"countryCode"
title=
"仓库负责人"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddWarehouse
;
src/pages/transaction/stockSellStorage/billsType/index.tsx
View file @
19ac5d51
...
...
@@ -13,10 +13,11 @@ import {
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
...
...
@@ -28,7 +29,7 @@ const data = [
no
:
'DJ001'
,
name
:
'进货入库单'
,
direction
:
1
,
stat
us
:
1
,
stat
e
:
1
,
},
{
key
:
'2'
,
...
...
@@ -36,7 +37,7 @@ const data = [
no
:
'DJ002'
,
name
:
'退货入库单'
,
direction
:
2
,
stat
us
:
2
,
stat
e
:
2
,
},
];
...
...
@@ -64,10 +65,11 @@ const billsType: React.FC<{}> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/addBillsType?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
);
},
},
...
...
@@ -93,31 +95,10 @@ const billsType: React.FC<{}> = () => {
sorter
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
onClick=
{
()
=>
console
.
log
(
'???'
)
}
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
status
===
1
?
(
<>
有效
<
PlayCircleOutlined
/>
</>
)
:
(
<>
无效
<
PauseCircleOutlined
/>
</>
)
}
</
Button
>
</
Popconfirm
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
/>
);
},
},
...
...
@@ -125,9 +106,16 @@ const billsType: React.FC<{}> = () => {
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addBillsType?id=${record.id}`
,
)
}
>
编辑
</
Button
>
<
Popconfirm
...
...
@@ -160,6 +148,11 @@ const billsType: React.FC<{}> = () => {
const
handleReset
=
()
=>
{};
const
handleModify
=
(
record
:
object
)
=>
{
// 通过传入的params字符串判断是修改那种类型的数据
console
.
log
(
'执行状态修改'
,
record
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -176,7 +169,7 @@ const billsType: React.FC<{}> = () => {
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/
memberAbility/manage/addMember?type=add
'
,
'/memberCenter/
tranactionAbility/stockSellStorage/addBillsType
'
,
)
}
>
...
...
src/pages/transaction/stockSellStorage/warehouse/addWarehouse.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddWarehouse
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建仓库'
:
usePageStatus
().
pageStatus
===
1
?
'编辑仓库'
:
'查看仓库'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
,
Textarea
:
Input
.
TextArea
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"仓库名称"
x
-
component=
"Input"
required
/>
<
FormMegaLayout
label=
"仓库地址"
wrapperCol=
{
24
}
required
>
<
FormMegaLayout
grid
full
autoRow
columns=
{
3
}
>
<
Field
name=
"province"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 省 -'
,
}
}
required
/>
<
Field
name=
"city"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 市 -'
,
}
}
required
/>
<
Field
name=
"county"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 县/区 -'
,
}
}
required
/>
</
FormMegaLayout
>
<
Field
name=
"address"
x
-
component=
"Textarea"
x
-
component
-
props=
{
{
placeholder
:
'请输入详细地址(最长50个字符,25个汉字)'
,
rules
:
[{
message
:
'请输入详细地址'
}],
}
}
required
/>
</
FormMegaLayout
>
<
Field
name=
"person"
title=
"仓库负责人"
x
-
component=
"Input"
/>
<
FormMegaLayout
label=
"联系电话"
grid
full
wrapperCol=
{
24
}
>
<
Field
name=
"countryCode"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
<
Field
x
-
mega
-
props=
{
{
span
:
3
}
}
name=
"phoneMobile"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'请输入你的手机号码'
}
}
/>
</
FormMegaLayout
>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddWarehouse
;
src/pages/transaction/stockSellStorage/warehouse/index.tsx
View file @
19ac5d51
...
...
@@ -11,12 +11,9 @@ import {
Space
,
Popconfirm
,
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
...
...
@@ -29,7 +26,7 @@ const data = [
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
stat
us
:
1
,
stat
e
:
1
,
},
{
key
:
'2'
,
...
...
@@ -38,7 +35,7 @@ const data = [
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
stat
us
:
2
,
stat
e
:
2
,
},
];
...
...
@@ -74,10 +71,11 @@ const WareHouse: React.FC<{}> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/addWarehouse?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
);
},
},
...
...
@@ -107,31 +105,10 @@ const WareHouse: React.FC<{}> = () => {
sorter
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
onClick=
{
()
=>
console
.
log
(
'???'
)
}
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
status
===
1
?
(
<>
有效
<
PlayCircleOutlined
/>
</>
)
:
(
<>
无效
<
PauseCircleOutlined
/>
</>
)
}
</
Button
>
</
Popconfirm
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
/>
);
},
},
...
...
@@ -139,9 +116,16 @@ const WareHouse: React.FC<{}> = () => {
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addWarehouse?id=${record.id}`
,
)
}
>
编辑
</
Button
>
<
Popconfirm
...
...
@@ -160,6 +144,11 @@ const WareHouse: React.FC<{}> = () => {
const
handleReset
=
()
=>
{};
const
handleModify
=
(
record
:
object
)
=>
{
// 通过传入的params字符串判断是修改那种类型的数据
console
.
log
(
'执行状态修改'
,
record
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -175,9 +164,13 @@ const WareHouse: React.FC<{}> = () => {
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
history
.
push
({
pathname
:
'/memberCenter/tranactionAbility/stockSellStorage/addWarehouse'
,
query
:
{
type
:
'add'
,
},
})
}
>
<
PlusOutlined
/>
...
...
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