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
0f8f3f65
Commit
0f8f3f65
authored
Jul 31, 2020
by
tjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
7b21fd1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
384 additions
and
34 deletions
+384
-34
index.tsx
src/pages/transaction/stockSellStorage/billsType/index.tsx
+193
-18
index.tsx
src/pages/transaction/stockSellStorage/warehouse/index.tsx
+191
-16
No files found.
src/pages/transaction/stockSellStorage/billsType/index.tsx
View file @
0f8f3f65
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
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Popconfirm
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
UpOutlined
,
DeleteOutlined
,
DownOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
const
BillsType
:
React
.
FC
<
{}
>
=
()
=>
{
return
<
div
>
BillsType
</
div
>;
const
data
=
[
{
key
:
'1'
,
id
:
'1'
,
no
:
'DJ001'
,
name
:
'进货入库单'
,
direction
:
1
,
status
:
1
,
},
{
key
:
'2'
,
id
:
'2'
,
no
:
'DJ002'
,
name
:
'退货入库单'
,
direction
:
2
,
status
:
2
,
},
];
const
billsType
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
({});
const
[
searchName
,
setSearchName
]
=
useState
(
''
);
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'单据类型编号'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
},
{
title
:
'单据名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
);
},
},
{
title
:
'方向'
,
dataIndex
:
'direction'
,
align
:
'center'
,
key
:
'direction'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
>
{
text
}
{
record
.
direction
===
1
?
' +'
:
' -'
}
</
span
>
);
},
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
key
:
'status'
,
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
>
);
},
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
>
删除
</
Button
>
</
Popconfirm
>
</>
),
},
];
// 模拟请求
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
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
columns=
{
columns
}
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
>
</
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
>
</
Row
>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
B
illsType
;
export
default
b
illsType
;
src/pages/transaction/stockSellStorage/warehouse/index.tsx
View file @
0f8f3f65
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
{
Tooltip
,
Input
,
Button
,
Card
,
Row
,
Col
,
Popconfirm
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
UpOutlined
,
DeleteOutlined
,
DownOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
const
data
=
[
{
key
:
'1'
,
id
:
'1'
,
name
:
'广州成品仓'
,
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
status
:
1
,
},
{
key
:
'2'
,
id
:
'2'
,
name
:
'广州成品仓'
,
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
status
:
2
,
},
];
const
WareHouse
:
React
.
FC
<
{}
>
=
()
=>
{
return
<
div
>
warehouse
</
div
>;
const
ref
=
useRef
({});
const
[
searchName
,
setSearchName
]
=
useState
(
''
);
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'仓库名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
);
},
},
{
title
:
'仓库地址'
,
dataIndex
:
'address'
,
align
:
'center'
,
key
:
'address'
,
},
{
title
:
'仓库负责人'
,
dataIndex
:
'person'
,
align
:
'center'
,
key
:
'person'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'phoneMobile'
,
align
:
'center'
,
key
:
'phoneMobile'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
key
:
'status'
,
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
>
);
},
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
>
删除
</
Button
>
</
Popconfirm
>
</>
),
},
];
// 模拟请求
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
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
columns=
{
columns
}
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
>
</
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
>
</
Row
>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
WareHouse
;
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