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
69fc566b
Commit
69fc566b
authored
Jan 11, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zwpFix' into dev
parents
ff4b6d6c
032cb074
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
264 additions
and
191 deletions
+264
-191
index.tsx
src/pages/classAndProperty/class/index.tsx
+1
-1
index.tsx
src/pages/commodity/goods/index.tsx
+1
-1
logisticsForm.tsx
...ages/commodity/products/addProductsItem/logisticsForm.tsx
+6
-0
index.tsx
src/pages/commodity/products/index.tsx
+3
-3
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+2
-1
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+2
-2
index.tsx
src/pages/transaction/transactionRules/index.tsx
+249
-183
No files found.
src/pages/classAndProperty/class/index.tsx
View file @
69fc566b
...
...
@@ -161,7 +161,7 @@ const ClassProperty: React.FC<{}> = () => {
const
syncIds
=
syncTreeActions
.
getSelectKeys
()
if
(
syncIds
.
length
)
{
// @ts-ignore
PublicApi
.
postProductCustomerSyncCategory
({
idList
:
syncIds
}).
then
(
res
=>
{
PublicApi
.
postProductCustomerSyncCategory
({
idList
:
syncIds
.
concat
(
syncTreeActions
.
getExpandedKeys
()[
0
])
}).
then
(
res
=>
{
resetMenu
()
syncTreeActions
.
setSelectKeys
([])
setResetSearch
(
true
)
...
...
src/pages/commodity/goods/index.tsx
View file @
69fc566b
...
...
@@ -320,7 +320,7 @@ const Goods: React.FC<{}> = () => {
>
<
PlusOutlined
/>
新建
</
Button
>
<
Button
style=
{
{
margin
:
'0 16px'
}
}
onClick=
{
()
=>
setImportModal
(
true
)
}
>
导入数据
</
Button
>
{
/* <Button style={{ margin: '0 16px' }} onClick={() => setImportModal(true)}>导入数据</Button> */
}
<
Dropdown
overlay=
{
menuMore
}
trigger=
{
[
'click'
]
}
>
<
Button
>
更多
<
DownOutlined
/>
...
...
src/pages/commodity/products/addProductsItem/logisticsForm.tsx
View file @
69fc566b
...
...
@@ -219,6 +219,12 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
deliveryType
!==
3
&&
<
Form
.
Item
name=
"sendAddress"
label=
"发货地址"
rules=
{
[
{
required
:
true
,
message
:
'请选择发货地址'
},
]
}
>
<
Select
placeholder=
"请选择发货地址"
...
...
src/pages/commodity/products/index.tsx
View file @
69fc566b
...
...
@@ -544,9 +544,9 @@ const Products: React.FC<{}> = () => {
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
<
Menu
.
Item
key=
"2"
icon=
{
<
DeleteOutlined
/>
}
>
{
/*
<Menu.Item key="2" icon={<DeleteOutlined />}>
删除导入批次
</
Menu
.
Item
>
</Menu.Item>
*/
}
</
Menu
>
)
...
...
@@ -558,7 +558,7 @@ const Products: React.FC<{}> = () => {
>
<
PlusOutlined
/>
新建
</
Button
>
<
Button
style=
{
{
margin
:
'0 16px'
}
}
onClick=
{
()
=>
setImportModal
(
true
)
}
>
导入数据
</
Button
>
{
/* <Button style={{margin:'0 16px'}} onClick={()=>setImportModal(true)}>导入数据</Button> */
}
<
Dropdown
overlay=
{
menuMore
}
trigger=
{
[
'click'
]
}
>
<
Button
>
更多
<
DownOutlined
/>
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
69fc566b
...
...
@@ -72,7 +72,8 @@ const warehouseColumns: any[] = [
dataIndex
:
'reductionInventory'
,
key
:
'reductionInventory'
,
title
:
'扣减仓位库存'
,
align
:
'center'
align
:
'center'
,
render
:
(
t
,
r
)
=>
r
.
type
===
4
?
`-
${
t
}
`
:
`+
${
t
}
`
},
{
dataIndex
:
'createTime'
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
69fc566b
...
...
@@ -77,7 +77,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
},
[
sum
,
freePrice
])
useEffect
(()
=>
{
// 存在商品 并且有选择收货地址,则开始计算运费
// 存在商品 并且有选择收货地址,则开始计算运费
,此外 收货方式变动也要重新计算
if
(
data
&&
data
.
length
>
0
&&
receiverAddressId
)
{
// 筛选配送方式为物流的商品并且使用了运费模板
const
logsiticsDataMaps
=
data
.
filter
(
v
=>
v
.
logistics
&&
v
.
logistics
.
useTemplate
&&
v
.
logistics
.
deliveryType
===
1
)
...
...
@@ -98,7 +98,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
setFreePrice
(
0
)
}
}
},
[
data
])
},
[
data
,
receiverAddressId
])
return
<
RowStyle
>
...
...
src/pages/transaction/transactionRules/index.tsx
View file @
69fc566b
import
React
,
{
ReactNode
,
useRef
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
,
message
,
Dropdown
,
Menu
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
PlayCircleOutlined
,
EyeOutlined
,
PauseCircleOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
moment
from
'moment'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PublicApi
}
from
'@/services/api'
const
TransactionRules
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
fetchData
=
(
params
:
any
)
=>
{
console
.
log
(
params
,
'params'
)
if
(
!
params
?.
name
)
delete
params
.
name
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderTradingRulesList
(
params
).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'交易规则ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
},
{
title
:
'流程规则名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/transactionRules/detail?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'交易流程名称'
,
dataIndex
:
'transactionProcess'
,
key
:
'transactionProcess'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
text
&&
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
confirm
(
record
)
}
onCancel=
{
cancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
style=
{
record
.
state
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
state
?
<>
有效
<
PlayCircleOutlined
/></>
:
<>
无效
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
)
return
component
}
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
{
(
record
.
state
===
0
)
?
<>
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
handelDelete
(
record
)
}
onCancel=
{
cancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/transactionRules/add?id=${record.id}`
)
}
>
修改
</
Button
>
</>
:
''
}
</>
)
}
}
];
const
confirm
=
(
record
:
any
)
=>
{
PublicApi
.
postOrderTradingRulesUpdateState
({
id
:
record
.
id
,
state
:
record
.
state
?
0
:
1
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
const
cancel
=
()
=>
{
console
.
log
(
'cancel'
)
}
const
handelDelete
=
(
record
:
any
)
=>
{
PublicApi
.
postOrderTradingRulesDelete
({
id
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyProps=
{
{
layouts
:
{
order
:
1
,
span
:
4
,
},
ctx
:
{
inline
:
false
,
schema
:
{
type
:
'object'
,
properties
:
{
megaLayout0
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
,
columns
:
2
,
},
properties
:
{
name
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'规则名称'
,
},
'x-component'
:
'Search'
}
}
}
}
}
}
}
}
formilyChilds=
{
{
layouts
:
{
order
:
0
},
children
:
(
<>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/transactionRules/add'
)
}
>
新建
</
Button
>
</>
)
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
TransactionRules
import
React
,
{
ReactNode
,
useRef
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
,
message
,
Dropdown
,
Menu
,
Space
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
PlayCircleOutlined
,
EyeOutlined
,
PauseCircleOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
moment
from
'moment'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PublicApi
}
from
'@/services/api'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
const
formActions
=
createFormActions
();
const
TransactionRules
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
fetchData
=
(
params
:
any
)
=>
{
console
.
log
(
params
,
'params'
)
if
(
!
params
?.
name
)
delete
params
.
name
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderTradingRulesList
(
params
).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'交易规则ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
},
{
title
:
'流程规则名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/transactionRules/detail?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'交易流程名称'
,
dataIndex
:
'transactionProcess'
,
key
:
'transactionProcess'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
text
&&
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
confirm
(
record
)
}
onCancel=
{
cancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
style=
{
record
.
state
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
state
?
<>
有效
<
PlayCircleOutlined
/></>
:
<>
无效
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
)
return
component
}
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
{
(
record
.
state
===
0
)
?
<>
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
handelDelete
(
record
)
}
onCancel=
{
cancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/transactionRules/add?id=${record.id}`
)
}
>
修改
</
Button
>
</>
:
''
}
</>
)
}
}
];
const
confirm
=
(
record
:
any
)
=>
{
PublicApi
.
postOrderTradingRulesUpdateState
({
id
:
record
.
id
,
state
:
record
.
state
?
0
:
1
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
const
cancel
=
()
=>
{
console
.
log
(
'cancel'
)
}
const
handelDelete
=
(
record
:
any
)
=>
{
PublicApi
.
postOrderTradingRulesDelete
({
id
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
}
const
Actions
=
(
<
Space
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/transactionRules/add'
)
}
>
新建
</
Button
>
</
Space
>
);
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
expressionScope=
{
{
Actions
,
}
}
effects=
{
(
$
,
actions
)
=>
{
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
searchWrap
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
actions
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{Actions}}'
,
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'规则名称'
,
advanced
:
false
,
// tip: '输入 单据名称 进行搜索',
},
},
},
},
},
}
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
/>
}
/>
{
/* <StandardTable
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
layouts: {
order: 1,
span: 4,
},
ctx: {
inline: false,
schema: {
type: 'object',
properties: {
megaLayout0: {
type: 'object',
'x-component': 'mega-layout',
"x-component-props": {
grid: true,
columns: 2,
},
properties: {
name: {
type: 'string',
'x-component-props': {
placeholder: '规则名称',
},
'x-component': 'Search'
}
}
}
}
}
}
}}
formilyChilds={{
layouts: {
order: 0
},
children: (
<>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/tranactionAbility/transactionRules/add')}>
新建
</Button>
</>
)
}}
/> */
}
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
TransactionRules
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