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
9104204b
Commit
9104204b
authored
Mar 02, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
3203a2dd
e6c97400
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
35 deletions
+32
-35
index.tsx
...erService/exchangeManage/exchangePrAddLogistics/index.tsx
+2
-2
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+30
-33
No files found.
src/pages/afterService/exchangeManage/exchangePrAddLogistics/index.tsx
View file @
9104204b
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-18 11:22:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-07 11:12:00
* @LastEditTime: 2021-0
3-02 11:48:31
* @Description: 待新增换货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -134,7 +134,7 @@ const ReturnPrAddLogistics: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/edit?id=${record.replaceId}`
)
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/edit?id=${record.replace
Logistics
Id}`
)
}
>
编辑
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
9104204b
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
2-19 20:24:47
* @LastEditTime: 2021-0
3-02 14:30:30
* @Description: 联动逻辑相关
*/
import
{
Modal
,
message
}
from
'antd'
;
...
...
@@ -531,17 +531,14 @@ export const useBusinessEffects = (context, actions) => {
const
current
=
originAsyncData
.
find
(
item
=>
item
.
id
===
value
);
const
invoicesTypeIdVal
=
getFieldValue
(
'invoicesTypeId'
);
const
invoicesDetailsRequestsValue
=
getFieldValue
(
'invoicesDetailsRequests'
);
const
itemIndex
=
name
.
match
(
/
\d
/
)[
0
];
const
itemNoValue
=
getFieldValue
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`invoicesDetailsRequests.
${
$1
}
.itemNo`
}));
// 这里判断是否货品 跟 商品 都已经选择过了,不可重复选择
const
sameGood
=
invoicesDetailsRequestsValue
.
find
(
item
=>
item
.
itemNo
===
itemNoValue
);
if
(
invoicesDetailsRequestsValue
.
length
>
1
&&
sameGood
&&
sameGood
.
product
===
value
)
{
const
sameGood
=
invoicesDetailsRequestsValue
.
find
((
item
,
index
)
=>
index
!==
+
itemIndex
&&
item
.
itemNo
===
itemNoValue
&&
item
.
product
===
value
);
if
(
sameGood
)
{
message
.
warning
(
'存在相同货号+商品的组合,请重新选择'
);
setTimeout
(()
=>
{
setFieldState
(
...
...
@@ -640,6 +637,30 @@ export const useBusinessEffects = (context, actions) => {
}
);
// 额外的数据
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`invoicesDetailsRequests.
${
$1
}
.extraData`
}),
state
=>
{
state
.
value
=
{
productName
:
current
.
productName
,
deliveryType
:
// 配送方式,一个单据只能有一个配送方式
current
.
logistics
&&
current
.
logistics
.
deliveryType
?
current
.
logistics
.
deliveryType
:
undefined
,
id
:
current
.
id
,
// 加工发货单需要,明细id
processNum
:
current
.
processNum
,
// 加工发货单需要,加工数量
orderNo
:
current
.
orderNo
,
// 订单编号
goodsCount
:
current
.
purchaseCount
,
// 采购数量
price
:
current
.
processPrice
,
// 加工发货、入库单需要,加工单价
totalPrice
:
current
.
processTotalPrice
,
// 加工发货、入库单需要,加工总价
};
}
);
switch
(
invoicesTypeIdVal
)
{
// 采购入库单、销售发货单
case
DOC_TYPE_PURCHASE_RECEIPT
:
...
...
@@ -674,7 +695,7 @@ export const useBusinessEffects = (context, actions) => {
state
=>
{
if
(
current
.
logistics
&&
invoicesDetailsRequestsValue
.
some
(
item
=>
item
.
extraData
.
deliveryType
!==
current
.
logistics
.
deliveryType
)
invoicesDetailsRequestsValue
.
some
(
item
=>
item
.
extraData
&&
item
.
extraData
.
deliveryType
!==
current
.
logistics
.
deliveryType
)
)
{
state
.
errors
=
'商品配送方式不一致,请保持一次性'
;
}
else
{
...
...
@@ -687,7 +708,7 @@ export const useBusinessEffects = (context, actions) => {
if
(
current
.
logistics
&&
current
.
logistics
.
deliveryType
&&
invoicesDetailsRequestsValue
.
every
(
item
=>
item
.
extraData
.
deliveryType
===
current
.
logistics
.
deliveryType
)
invoicesDetailsRequestsValue
.
every
(
item
=>
item
.
extraData
&&
item
.
extraData
.
deliveryType
===
current
.
logistics
.
deliveryType
)
)
{
setFieldValue
(
'transport'
,
DELIVERY_TYPE
[
current
.
logistics
.
deliveryType
]);
setFieldValue
(
'deliveryType'
,
current
.
logistics
.
deliveryType
);
...
...
@@ -768,30 +789,6 @@ export const useBusinessEffects = (context, actions) => {
break
;
}
}
// 额外的数据
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`invoicesDetailsRequests.
${
$1
}
.extraData`
}),
state
=>
{
state
.
value
=
{
productName
:
current
.
productName
,
deliveryType
:
// 配送方式,一个单据只能有一个配送方式
current
.
logistics
&&
current
.
logistics
.
deliveryType
?
current
.
logistics
.
deliveryType
:
undefined
,
id
:
current
.
id
,
// 加工发货单需要,明细id
processNum
:
current
.
processNum
,
// 加工发货单需要,加工数量
orderNo
:
current
.
orderNo
,
// 订单编号
goodsCount
:
current
.
purchaseCount
,
// 采购数量
price
:
current
.
processPrice
,
// 加工发货、入库单需要,加工单价
totalPrice
:
current
.
processTotalPrice
,
// 加工发货、入库单需要,加工总价
};
}
);
});
// 关联明细 商品数量 联动计算商品金额
...
...
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