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
e07df5e0
Commit
e07df5e0
authored
Dec 08, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理新增采购订单采购数量变动清空原有支付信息
parent
93d8fd62
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
13 deletions
+12
-13
addBrand.tsx
src/pages/trademark/addBrand.tsx
+3
-3
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+1
-3
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+2
-6
useProductTable.tsx
...tion/purchaseOrder/orderCollect/model/useProductTable.tsx
+3
-1
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+3
-0
No files found.
src/pages/trademark/addBrand.tsx
View file @
e07df5e0
...
...
@@ -77,8 +77,8 @@ const AddBrand: React.FC<{}> = () => {
setFormValues
(
data
)
form
.
setFieldsValue
(
data
)
setlogoUrl
(
data
.
logoUrl
)
if
(
data
.
status
===
4
)
setBanSomeField
(
true
)
//
if(data.status === 4)
//
setBanSomeField(true)
// 多图回显
let
proveImgs
=
Object
.
values
(
data
.
proveUrl
)
let
files
=
[];
...
...
@@ -123,7 +123,7 @@ const AddBrand: React.FC<{}> = () => {
};
const
handleChange
=
({
fileList
})
=>
setFileList
(
fileList
)
const
handleSave
=
()
=>
{
form
.
validateFields
().
then
((
values
:
any
)
=>
{
console
.
log
(
values
,
'vvv'
)
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
e07df5e0
...
...
@@ -8,7 +8,6 @@ import { useUpdate } from '@umijs/hooks';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
filterProductDataById
}
from
'../components/productModalTable'
import
{
getUnitPriceTotal
}
from
'../model/useProductTable'
;
import
{
toPercent
}
from
'@/utils/type'
;
// 异步填充表格字段
const
asyncPadDataForProduct
=
async
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
productValue
:
any
)
=>
{
...
...
@@ -86,7 +85,7 @@ export const useEditHideField = () => {
})
}
export
const
useProductTableChangeForPay
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
update
,
editData
)
=>
{
export
const
useProductTableChangeForPay
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
update
)
=>
{
const
{
pageStatus
}
=
usePageStatus
()
FormEffectHooks
.
onFieldValueChange$
(
'orderProductRequests'
).
subscribe
(
state
=>
{
...
...
@@ -157,7 +156,6 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
// }
return
assign
}).
sort
((
prev
,
next
)
=>
prev
.
disabled
?
prev
.
value
:
next
.
value
-
prev
.
value
)
console
.
log
(
state
.
props
.
enum
)
})
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
e07df5e0
...
...
@@ -5,7 +5,7 @@ import ReutrnEle from '@/components/ReturnEle'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
Card
,
Row
,
Col
,
Drawer
,
message
}
from
'antd'
import
{
createFormActions
,
registerVirtualBox
,
useFormSpy
,
createAsyncFormActions
}
from
'@formily/antd'
import
{
SaveOutlined
,
LinkOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
import
{
SaveOutlined
,
LinkOutlined
,
PlusOutlined
,
CodeSandboxCircleFilled
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
{
orderDetailSchema
,
orderAddSchema
,
mergeAllSchemas
}
from
'./schema'
import
{
useModelTypeChange
,
useEditHideField
,
useOrderFormInitEffect
,
useProductTableChangeForPay
}
from
'./effects'
...
...
@@ -30,7 +30,6 @@ import { changeRouterTitleByStatus } from '../../_public/order/utils'
import
{
ReadyAddOrderDetailContext
}
from
'../context'
import
AuditProcess
from
'@/components/AuditProcess'
import
styles
from
'./index.less'
import
{
toPoint
}
from
'@/utils/type'
export
interface
PurchaseOrderDetailProps
{}
...
...
@@ -208,7 +207,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// theInvoiceInfo: (value.typeof value.theInvoiceId === 'object' ? value.theInvoiceId : null
// theInvoiceInfo: value.theInvoiceInfo
}
console
.
log
(
params
,
'params'
)
// 校验是否选择支付渠道
let
judgementByPay
=
params
.
paymentInformationResponses
.
map
(
item
=>
{
if
(
item
.
channel
&&
item
.
payWay
){
...
...
@@ -244,7 +242,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
break
;
}
}
console
.
log
(
fnResult
,
'fnResult'
)
if
(
fnResult
.
code
===
1000
)
{
// 跳转至待新增列表
window
.
sessionStorage
.
removeItem
(
spam_id
)
...
...
@@ -379,7 +376,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
//
}
})
}
console
.
log
(
initFormValue
,
'init'
)
})
// 监听商品总价的变更, 此处逻辑需优化
$
(
'sumPrice'
).
subscribe
(
payload
=>
{
...
...
@@ -452,7 +448,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
})
useEditHideField
()
// 商品信息的改动 驱动支付信息变化
useProductTableChangeForPay
(
ctx
,
update
,
initFormValue
)
useProductTableChangeForPay
(
ctx
,
update
)
}
}
expressionScope=
{
{
orderNoPrice
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/useProductTable.tsx
View file @
e07df5e0
...
...
@@ -5,7 +5,6 @@ import { productInfoColumns } from '../constant';
import
ProductTableCell
,
{
ProductEditableRow
}
from
'../components/productTableCell'
;
import
{
useModalTable
}
from
'./useModalTable'
;
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
toPoint
}
from
'@/utils/type'
;
// 对象按key排序(运用于商城传过来的阶梯价格排序)
export
const
sortByKey
=
(
params
)
=>
{
...
...
@@ -100,6 +99,9 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
}
const
handleSave
=
row
=>
{
// 商品采购数量变动 清空之前的支付信息
ctx
.
setFieldValue
(
'paymentInformationResponses'
,
[])
return
new
Promise
((
resolve
,
reject
)
=>
{
const
newData
=
[...
ctx
.
getFieldValue
(
'orderProductRequests'
)];
const
index
=
newData
.
findIndex
(
item
=>
row
.
id
===
item
.
id
);
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
e07df5e0
...
...
@@ -321,6 +321,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
visible=
{
visibleChannelRroduct
}
columns=
{
columnsSetProduct
}
rowSelection=
{
productRowSelection
}
resetModal=
{
{
destroyOnClose
:
true
}
}
fetchTableData=
{
params
=>
fetchProductList
(
params
)
}
formilyProps=
{
{
...
...
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