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
0c072309
Commit
0c072309
authored
Dec 14, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加退货申请手工发货相关、添加采购入库单单据编号字段
parent
83e99a23
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
200 additions
and
108 deletions
+200
-108
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+96
-56
index.tsx
...ges/afterService/components/ManualDeliveryModal/index.tsx
+50
-2
index.ts
...terService/components/ManualDeliveryModal/schema/index.ts
+6
-10
constants.ts
src/pages/afterService/constants.ts
+20
-0
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+1
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+1
-0
verify.tsx
...afterService/returnApplication/returnPrDeliver/verify.tsx
+6
-1
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+14
-38
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+4
-1
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+2
-0
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
0c072309
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-14
09:42:05
* @LastEditTime: 2020-12-14
15:33:42
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -135,6 +135,8 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
};
};
flattened
=
[];
tableColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'订单号'
,
...
...
@@ -222,42 +224,59 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
current
:
`
${
page
}
`
,
pageSize
:
`
${
size
}
`
,
...
searchVal
,
})
})
;
if
(
orderListRes
)
{
// 获取对应订单列表的工作流类型
// const payload = [];
// orderListRes.data.forEach(item => {
// item.productDateilss.forEach(product => {
// const atom = {
// productId: product.productId,
// memberId: product.memberId,
// memberRoleId: product.memberRoleId,
// shopId: item.shopId,
// type, // 流程类型
const
payload
=
[];
orderListRes
.
data
.
forEach
(
item
=>
{
item
.
productDateilss
.
forEach
(
product
=>
{
const
atom
=
{
productId
:
product
.
productId
,
memberId
:
product
.
memberId
,
memberRoleId
:
product
.
memberRoleId
,
shopId
:
item
.
shopId
,
type
,
// 流程类型
};
payload
.
push
(
atom
);
});
});
const
processEnumRes
:
any
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
},
{
ctlType
:
'none'
,
});
if
(
processEnumRes
.
code
!==
1000
)
{
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
return
;
}
// const mockMap = {
// 1: 18,
// 2: 25,
// };
// payload.push(atom);
// });
// });
// const processEnumRes: any = await PublicApi.postOrderGetProcessEnum({
// list: payload,
// }, {
// ctlType: 'none',
// });
// console.log('processEnumRes', processEnumRes)
// if (processEnumRes.code !== 1000) {
// message.error('获取工作流枚举失败,请稍候再试');
// return;
// }
// 组装数据
let
i
=
0
;
orderListRes
.
data
.
forEach
(
item
=>
{
item
.
productDateilss
.
forEach
(
product
=>
{
product
.
processEnum
=
processEnumRes
.
data
[
i
].
processEnum
;
// product.processEnum = mockMap[Math.floor(Math.random()*2 + 1)];
i
++
;
// 防止重复添加数据
if
(
!
this
.
flattened
.
find
(
flat
=>
flat
.
id
===
product
.
id
))
{
this
.
flattened
.
push
({
...
product
,
orderNo
:
item
.
orderNo
,
payInfoList
:
item
.
payInfoList
,
});
}
});
});
this
.
setState
({
dataSource
:
{
data
:
orderListRes
.
data
.
map
((
item
,
index
)
=>
({
...
item
,
// processEnum: processEnumRes.data[index].processEnum,
})),
totalCount
:
orderListRes
.
totalCount
,
},
dataSource
:
orderListRes
,
});
}
this
.
setState
({
loading
:
false
});
...
...
@@ -299,7 +318,6 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
// 子表格选中行
handleChildSelectChange
=
(
record
:
any
,
selected
:
any
,
selectedRows
:
any
)
=>
{
console
.
log
(
'selectedRows'
,
selectedRows
)
const
{
childSelectedRowKeys
,
dataSource
:
{
...
...
@@ -314,11 +332,14 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
childArr
.
splice
(
childArr
.
findIndex
((
item
:
any
)
=>
item
===
record
.
id
),
1
);
}
// const filtered = this.filterProductByProcessEnum(childArr, data);
const
fullData
=
this
.
findFullProductArr
(
childArr
,
this
.
flattened
);
const
filtered
=
this
.
filterProductByProcessEnum
(
fullData
);
const
filteredKeys
=
filtered
.
map
(
item
=>
item
.
id
);
if
(
!
(
'checked'
in
this
.
props
))
{
this
.
setState
({
childSelectedRowKeys
:
childArr
});
this
.
setState
({
childSelectedRowKeys
:
filteredKeys
});
}
this
.
triggerChange
(
childArr
);
this
.
triggerChange
(
filteredKeys
);
};
// 子表格选中所有行
...
...
@@ -340,11 +361,14 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
childArr
=
childArr
.
filter
((
item
:
any
)
=>
!
changeRows
.
some
((
e
:
any
)
=>
e
.
id
===
item
));
}
// const filtered = this.filterProductByProcessEnum(childArr, data);
const
fullData
=
this
.
findFullProductArr
(
childArr
,
this
.
flattened
);
const
filtered
=
this
.
filterProductByProcessEnum
(
fullData
);
const
filteredKeys
=
filtered
.
map
(
item
=>
item
.
id
);
if
(
!
(
'checked'
in
this
.
props
))
{
this
.
setState
({
childSelectedRowKeys
:
childArr
});
this
.
setState
({
childSelectedRowKeys
:
filteredKeys
});
}
this
.
triggerChange
(
childArr
);
this
.
triggerChange
(
filteredKeys
);
};
// 表格选中行
...
...
@@ -362,17 +386,20 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
// 第一步 判断selected true:选中,false,取消选中
if
(
selected
)
{
// 第二步,父Table选中,子Table全选中(全部整合到一起,然后去重)
childArr
=
Array
.
from
(
new
Set
([...
setChildArr
,
...
c
hildArr
]));
childArr
=
Array
.
from
(
new
Set
([...
childArr
,
...
setC
hildArr
]));
}
else
{
// 第二步,父Table取消选中,子Table全取消选中(针对childArr,过滤掉取消选中的父Table下的所有子Table的 id)
childArr
=
childArr
.
filter
((
item
:
any
)
=>
!
setChildArr
.
some
((
e
:
any
)
=>
e
===
item
));
}
// const filtered = this.filterProductByProcessEnum(childArr, data);
const
fullData
=
this
.
findFullProductArr
(
childArr
,
this
.
flattened
);
const
filtered
=
this
.
filterProductByProcessEnum
(
fullData
);
const
filteredKeys
=
filtered
.
map
(
item
=>
item
.
id
);
if
(
!
(
'checked'
in
this
.
props
))
{
this
.
setState
({
childSelectedRowKeys
:
childArr
});
this
.
setState
({
childSelectedRowKeys
:
filteredKeys
});
}
this
.
triggerChange
(
childArr
);
this
.
triggerChange
(
filteredKeys
);
};
// 表格选中所有行
...
...
@@ -390,14 +417,17 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
setChildArr
=
[...
setChildArr
,
...
item
.
productDateilss
.
map
((
item
:
any
)
=>
item
.
id
)];
});
// const filtered = this.filterProductByProcessEnum(setChildArr, data);
// 第一步判断 selected true:全选,false:取消全选
if
(
selected
)
{
// 第二步:父Table选中,子Table全选中,设置子Table 的 SelectedRowKeys
const
fullData
=
this
.
findFullProductArr
(
setChildArr
,
this
.
flattened
);
const
filtered
=
this
.
filterProductByProcessEnum
(
fullData
);
const
filteredKeys
=
filtered
.
map
(
item
=>
item
.
id
);
if
(
!
(
'checked'
in
this
.
props
))
{
this
.
setState
({
childSelectedRowKeys
:
setChildArr
});
this
.
setState
({
childSelectedRowKeys
:
filteredKeys
});
}
this
.
triggerChange
(
setChildArr
);
this
.
triggerChange
(
filteredKeys
);
}
else
{
// 第二步:父Table取消选中,子Table 全取消选中,设置子 Table 的 SelectedRowKeys
if
(
!
(
'checked'
in
this
.
props
))
{
...
...
@@ -419,15 +449,15 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
if
(
onConfirm
)
{
// 从选中的子表格行 key,找到完整的信息
const
fullDate
=
[];
data
.
forEach
(
item
=>
{
item
.
productDateilss
.
forEach
(
product
=>
{
this
.
flattened
.
forEach
(
product
=>
{
if
(
childSelectedRowKeys
.
find
(
key
=>
key
===
product
.
id
))
{
fullDate
.
push
({
...
product
,
orderNo
:
item
.
orderNo
,
// 手动补全订单单号
orderNo
:
product
.
orderNo
,
// 手动补全订单单号
payList
:
item
.
payInfoList
?
item
.
payInfoList
.
map
(
item
=>
{
product
.
payInfoList
?
product
.
payInfoList
.
map
(
item
=>
{
const
{
payPrice
,
payTime
,
payWay
,
channel
,
...
rest
}
=
item
;
return
{
payAmount
:
payPrice
,
...
...
@@ -443,15 +473,14 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
,
// 计算已支付金额,采购单价 * 支付比例 累加
payAmount
:
item
.
payInfoList
?
item
.
payInfoList
.
reduce
((
prev
,
now
)
=>
{
product
.
payInfoList
?
product
.
payInfoList
.
reduce
((
prev
,
now
)
=>
{
return
+
((
product
.
price
*
product
.
purchaseCount
*
(
now
.
payRatio
/
100
)).
toFixed
(
2
))
+
prev
;
},
0
)
:
0
});
}
});
});
onConfirm
(
fullDate
);
}
this
.
handleClose
();
...
...
@@ -470,8 +499,19 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}
};
findFullProductArr
=
(
selectKeys
,
data
)
=>
{
const
ret
=
[];
selectKeys
.
forEach
(
item
=>
{
const
current
=
data
.
find
(
dataItem
=>
dataItem
.
id
===
item
);
if
(
current
)
{
ret
.
push
(
current
);
}
});
return
ret
;
};
// 过滤工作流不同的 商品
filterProductByProcessEnum
=
(
selectKeys
,
data
)
=>
{
filterProductByProcessEnum
=
(
data
)
=>
{
const
first
=
data
.
length
?
data
[
0
]
:
null
;
if
(
!
first
)
{
...
...
src/pages/afterService/components/ManualDeliveryModal/index.tsx
View file @
0c072309
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:48:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-18 17:31:42
* @LastEditTime: 2020-1
2-14 16:38:53
* @Description: 手动发货弹窗
*/
import
React
from
'react'
;
...
...
@@ -10,6 +10,8 @@ import { Modal } from 'antd';
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
DatePicker
}
from
'@formily/antd-components'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
schema
}
from
'./schema'
;
const
modalFormActions
=
createFormActions
();
...
...
@@ -43,6 +45,51 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
}
};
// 获取发货地址
const
fetchShipperAddress
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListShipperAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
options
=
res
.
data
?
res
.
data
.
map
(
item
=>
({
label
:
`
${
item
.
fullAddress
}
/
${
item
.
shipperName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
,
...
item
,
}))
:
[];
resolve
(
options
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
// 获取物流公司
const
fetchLogisticsCompany
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListCompany
({
cooperateType
:
'2'
,
// 1-平台物流服务商,2-商户合作物流公司
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
options
=
res
.
data
?
res
.
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
id
,
}))
:
[];
resolve
(
options
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
return
(
<
Modal
title=
{
title
}
...
...
@@ -54,7 +101,8 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
>
<
NiceForm
effects=
{
(
$
,
{
setFieldState
})
=>
{
useAsyncSelect
(
'deliveryAddress'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
useAsyncSelect
(
'logisticsName'
,
fetchLogisticsCompany
,
[
'label'
,
'value'
]);
}
}
components=
{
{
DatePicker
,
...
...
src/pages/afterService/components/ManualDeliveryModal/schema/index.ts
View file @
0c072309
...
...
@@ -17,17 +17,15 @@ export const schema: ISchema = {
labelAlign
:
'top'
,
},
properties
:
{
a
ddress
:
{
deliveryA
ddress
:
{
type
:
'string'
,
title
:
'发货地址'
,
enum
:
[
],
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
send
Time
:
{
delivery
Time
:
{
type
:
'string'
,
title
:
'发货时间'
,
'x-component'
:
'DatePicker'
,
...
...
@@ -38,7 +36,7 @@ export const schema: ISchema = {
style
:
{
width
:
'100%'
},
},
},
code
No
:
{
logisticsOrder
No
:
{
type
:
'string'
,
title
:
'发货单号'
,
required
:
true
,
...
...
@@ -46,13 +44,11 @@ export const schema: ISchema = {
placeholder
:
'请选择'
,
},
},
company
:
{
logisticsName
:
{
type
:
'string'
,
title
:
'物流公司'
,
required
:
true
,
enum
:
[
],
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
...
...
src/pages/afterService/constants.ts
View file @
0c072309
...
...
@@ -277,3 +277,22 @@ export const REFUND_OUTER_STATUS_TAG_MAP = {
[
REFUND_OUTER_STATUS_NOT_RECEIVED
]:
'warning'
,
[
REFUND_OUTER_STATUS_RECEIVED
]:
'success'
,
};
// 工作流相关
/**
* 售后退货外部流转
*/
export
const
RETURN_GOODS_OUTER_DELIVERY
=
18
;
/**
* 售后换货外部流转
*/
export
const
EXCHANGE_GOODS_OUTER_DELIVERY
=
20
;
/**
* 售后换货手工发货
*/
export
const
EXCHANGE_GOODS_MANUAL_DELIVERY
=
30
;
/**
* 售后退货手工发货
*/
export
const
RETURN_GOODS_MANUAL_DELIVERY
=
31
;
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
0c072309
...
...
@@ -541,6 +541,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
<
GoodsDrawer
title=
"选择换货商品"
type=
{
2
}
visible=
{
visibleGoodsDrawer
}
fetchOrderList=
{
getOrderList
}
onClose=
{
()
=>
setVisibleGoodsDrawer
(
false
)
}
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
0c072309
...
...
@@ -370,6 +370,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
</
Card
>
<
GoodsDrawer
type=
{
4
}
visible=
{
visibleDrawer
}
fetchOrderList=
{
getOrderList
}
onClose=
{
()
=>
setVisibleDrawer
(
false
)
}
...
...
src/pages/afterService/returnApplication/returnPrDeliver/verify.tsx
View file @
0c072309
...
...
@@ -6,6 +6,7 @@ import { SettingOutlined } from '@ant-design/icons';
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
{
RETURN_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
const
ReturnPrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
...
...
@@ -36,7 +37,9 @@ const ReturnPrDeliverVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
()
=>
(
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
RETURN_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
...
...
@@ -45,6 +48,8 @@ const ReturnPrDeliverVerify: React.FC = () => {
手工退货发货
</
Button
>
)
}
</>
)
}
/>
<
ManualDeliveryModal
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
0c072309
...
...
@@ -63,7 +63,6 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
returnGoodsLoading
,
setReturnGoodsLoading
]
=
useState
(
false
);
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
(
null
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
[
visibleReturnInfoDrawer
,
setVisibleReturnInfoDrawer
]
=
useState
(
false
);
...
...
@@ -153,7 +152,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
// 缺
{
title
:
'已退款金额'
,
dataIndex
:
're
turnCount2
'
,
dataIndex
:
're
funded
'
,
align
:
'center'
,
},
];
...
...
@@ -248,47 +247,29 @@ const ReturnForm: React.FC<BillsFormProps> = ({
,
...
rest
,
});
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
// 获取退货明细列表
const
getReturnGoods
=
()
=>
{
if
(
!
id
)
{
return
;
}
setReturnGoodsLoading
(
true
);
PublicApi
.
getAsReturnGoodsPageReturnedGoods
({
returnId
:
id
,
current
:
`
${
1
}
`
,
pageSize
:
`
${
99999
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setReturnGoodsList
(
res
.
data
);
setReturnGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
data
:
goodsDetailList
.
map
(
item
=>
({
...
item
,
returnedCount
:
item
.
purchaseCount
||
0
,
// 已退货数量,这里取 采购数量判断即可
returnedCount
:
item
.
purchaseCount
||
0
,
// 已退货数量,这里取 采购数量判断即可
extraData
:
{
id
:
item
.
orderRecordId
,
returnReason
:
item
.
returnReason
,
payList
:
item
.
payList
,
payList
:
item
.
payList
||
[],
id
:
item
.
orderRecordId
||
[],
taskType
,
},
})),
totalCount
:
res
.
data
.
totalCount
,
totalCount
:
goodsDetailList
.
length
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]
);
setGoodsValue
(
goodsDetailList
.
map
(
item
=>
item
.
orderRecordId
)
);
}
}).
finally
(()
=>
{
set
ReturnGoods
Loading
(
false
);
set
Info
Loading
(
false
);
});
};
useEffect
(()
=>
{
getDetailInfo
();
getReturnGoods
();
},
[]);
const
handleAddGoods
=
()
=>
{
...
...
@@ -405,7 +386,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}),
isNeedReturn
:
1
,
})),
taskType
:
18
,
// taskType: returnGoodsList[0].taskType,
taskType
:
31
,
};
PublicApi
.
postAsReturnGoodsSave
(
payload
)
...
...
@@ -490,6 +472,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
id
:
item
.
id
,
returnReason
:
''
,
payList
:
item
.
payList
,
taskType
:
item
.
processEnum
,
},
};
value
.
push
(
atom
);
...
...
@@ -541,7 +524,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
);
return
(
<
Spin
spinning=
{
infoLoading
||
returnGoodsLoading
}
>
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
style=
{
{
padding
:
24
,
...
...
@@ -575,14 +558,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
<
NiceForm
initialValues=
{
{
...
detailInfo
,
returnGoodsList
:
returnGoodsList
.
data
.
map
(
item
=>
({
...
item
,
extraData
:
{
returnReason
:
item
.
returnReason
,
payList
:
item
.
payList
||
[],
id
:
item
.
orderRecordId
||
[],
},
})),
returnGoodsList
:
returnGoodsList
.
data
,
}
}
expressionScope=
{
{
TableAddButton
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
0c072309
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-14 1
1:26:50
* @LastEditTime: 2020-12-14 1
6:55:09
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
...
...
@@ -497,8 +497,11 @@ export const useBusinessEffects = (context, actions) => {
if
(
fieldState
.
name
===
'invoicesTypeId'
)
{
const
invoicesTypeIdState
=
getFieldState
(
'invoicesTypeId'
);
console
.
log
(
'invoicesTypeIdState2'
,
invoicesTypeIdState
)
if
(
invoicesTypeIdState
.
value
)
{
const
current
=
invoicesTypeIdState
.
originAsyncData
.
find
(
item
=>
item
.
id
===
invoicesTypeIdState
.
value
);
if
(
current
)
{
linkage
.
value
(
'invoicesTypeCode'
,
current
.
number
);
}
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
0c072309
...
...
@@ -748,6 +748,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postOrderPurchaseReceiptAdd
({
...
rest
,
invoicesTypeCode
:
invoicesTypeCode
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
...
...
@@ -849,6 +850,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postOrderSalesInvoiceOrder
({
...
rest
,
invoicesTypeCode
:
invoicesTypeCode
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
...
...
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