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
9610dc7e
Commit
9610dc7e
authored
Feb 19, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理品牌重复提交问题,处理采购下单摘要校验问题
parent
a5794d15
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
50 deletions
+62
-50
addBrand.tsx
src/pages/trademark/addBrand.tsx
+4
-1
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+1
-1
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+12
-5
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+0
-1
index.ts
...es/transaction/purchaseOrder/orderCollect/schema/index.ts
+4
-1
useSelfTable.tsx
...ction/purchaseOrder/readyFileOrder/model/useSelfTable.tsx
+40
-40
useSelfTable.tsx
...on/purchaseOrder/readyReceiveOrder/model/useSelfTable.tsx
+1
-1
No files found.
src/pages/trademark/addBrand.tsx
View file @
9610dc7e
...
...
@@ -67,6 +67,7 @@ const AddBrand: React.FC<{}> = () => {
const
[
formValues
,
setFormValues
]
=
useState
<
any
>
({})
const
[
banSomeField
,
setBanSomeField
]
=
useState
<
boolean
>
(
false
)
const
[
isDisabledSave
,
setIsDisabledSave
]
=
useState
<
boolean
>
(
false
)
const
[
isDisabledCheck
,
setDisabledCheck
]
=
useState
<
boolean
>
(
false
)
useEffect
(()
=>
{
const
{
id
}
=
history
.
location
.
query
...
...
@@ -153,7 +154,9 @@ const AddBrand: React.FC<{}> = () => {
}
const
handleApplyCheck
=
()
=>
{
setDisabledCheck
(
true
)
PublicApi
.
postProductBrandApplyCheckBrand
({
id
:
responseId
}).
then
(
res
=>
{
setDisabledCheck
(
false
)
setCurrentStep
(
1
)
setTimeout
(()
=>
{
history
.
goBack
()
...
...
@@ -183,7 +186,7 @@ const AddBrand: React.FC<{}> = () => {
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
history
.
location
.
query
?.
id
?
'修改品牌'
:
'新建品牌'
}
extra=
{
[
<
Button
key=
"2"
disabled=
{
isEnableCheck
}
onClick=
{
handleApplyCheck
}
>
直接提交审核
</
Button
>,
<
Button
key=
"2"
disabled=
{
isEnableCheck
}
onClick=
{
handleApplyCheck
}
disabled=
{
isDisabledCheck
}
>
直接提交审核
</
Button
>,
<
Button
icon=
{
<
SaveOutlined
/>
}
key=
"1"
type=
"primary"
onClick=
{
handleSave
}
disabled=
{
isDisabledSave
}
>
保存
</
Button
>,
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
9610dc7e
...
...
@@ -233,7 +233,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
}
})
// FormEffectHooks.onFieldChange$('customerCategoryId').subscribe(state =>
{
// searchCustomerCategoryOptionEffect(actions, 'customerCategoryId')
// searchCustomerCategoryOptionEffect(
schemaAction,
actions, 'customerCategoryId')
//
})
actions
.
setFieldState
(
'brandId'
,
state
=>
{
state
.
props
[
'x-component-props'
].
queryParams
=
{
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
9610dc7e
...
...
@@ -356,11 +356,18 @@ export const useOrderUpdateChangeOther = (ctx: ISchemaFormActions | ISchemaFormA
}
// 高级筛选schema中用于输入搜索商品品类的Effect
export
const
searchCustomerCategoryOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
/**
* @param ctx 外部表单action
* @param mctx 模态框表单action
* @param fieldName 字段名称
*/
export
const
searchCustomerCategoryOptionEffect
=
(
ctx
:
any
,
mctx
:
any
,
fieldName
:
string
)
=>
{
let
params
:
any
=
{}
params
[
'memberId'
]
=
ctx
.
getFieldValue
(
'supplyMembersId'
)
params
[
'memberRoleId'
]
=
ctx
.
getFieldValue
(
'supplyMembersRoleId'
)
mctx
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductSelectGetMemberCategory
(
params
).
then
(
res
=>
{
mctx
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
})
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
9610dc7e
...
...
@@ -194,7 +194,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
},
[])
const
handleSubmit
=
async
(
value
)
=>
{
console
.
log
(
value
,
'value'
,
addSchemaAction
.
getFieldValue
(
"orderProductRequests"
))
let
_orderProductRequests
=
JSON
.
parse
(
JSON
.
stringify
(
value
.
orderProductRequests
))
let
processEnum
=
value
[
'processEnum'
]
let
usingElectronicContracts
=
value
[
'usingElectronicContracts'
]
...
...
src/pages/transaction/purchaseOrder/orderCollect/schema/index.ts
View file @
9610dc7e
...
...
@@ -131,9 +131,12 @@ const basicInfo: ISchema = {
orderThe
:
{
type
:
'string'
,
title
:
'订单摘要'
,
required
:
true
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请输入订单摘要'
},
{
limitByte
:
true
,
maxByte
:
60
}
...
...
src/pages/transaction/purchaseOrder/readyFileOrder/model/useSelfTable.tsx
View file @
9610dc7e
import
React
,
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
// 业务hooks
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
handleSubmit
=
async
(
record
)
=>
{
if
(
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readyFileOrder/detail?id=
${
record
.
id
}
`
)
}
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
.
concat
([
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
FILLING_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
)
}
>
归档
</
Button
>
}
</>
}
])
return
{
columns
:
secondColumns
,
ref
,
rowSelection
,
rowSelectionCtl
}
}
import
React
,
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
// 业务hooks
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
handleSubmit
=
async
(
record
)
=>
{
if
(
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readyFileOrder/detail?id=
${
record
.
id
}
`
)
}
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
.
concat
([
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
FILLING_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
)
}
>
归档
</
Button
>
}
</>
}
])
return
{
columns
:
secondColumns
,
ref
,
rowSelection
,
rowSelectionCtl
}
}
src/pages/transaction/purchaseOrder/readyReceiveOrder/model/useSelfTable.tsx
View file @
9610dc7e
...
...
@@ -62,7 +62,7 @@ export const useSelfTable = () => {
key
:
'sumPrice'
,
render
:
(
t
,
r
)
=>
r
.
type
===
7
||
r
.
type
===
8
?
t
:
'¥'
+
t
},
{
title
:
'已
收
货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
{
title
:
'已
发
货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 收货单号跳转
{
title
:
'入库单号'
,
...
...
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