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
c88227a2
Commit
c88227a2
authored
Jan 19, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理采购订单编辑发票编辑异常,处理采购订单列表评价和售后显示异常,处理同步平台品类传父级id参数异常,处理新增编辑商品积分类型禁用并默认不提供发票
parent
1c32b75f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
18 deletions
+39
-18
index.tsx
src/pages/classAndProperty/class/index.tsx
+1
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+3
-1
otherForm.tsx
src/pages/commodity/products/addProductsItem/otherForm.tsx
+17
-4
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+2
-2
index.tsx
...chaseOrder/orderCollect/components/invoiceModal/index.tsx
+1
-1
index.tsx
...aseOrder/orderCollect/components/theInvoiceList/index.tsx
+0
-0
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+15
-9
index.ts
src/store/product/index.ts
+0
-0
No files found.
src/pages/classAndProperty/class/index.tsx
View file @
c88227a2
...
...
@@ -161,7 +161,7 @@ const ClassProperty: React.FC<{}> = () => {
const
syncIds
=
syncTreeActions
.
getSelectKeys
()
if
(
syncIds
.
length
)
{
// @ts-ignore
PublicApi
.
postProductCustomerSyncCategory
({
idList
:
syncIds
.
concat
(
syncTreeActions
.
getExpandedKeys
()[
0
]
)}).
then
(
res
=>
{
PublicApi
.
postProductCustomerSyncCategory
({
idList
:
Array
.
from
(
new
Set
([...
syncIds
,
...
syncTreeActions
.
getExpandedKeys
()])
)}).
then
(
res
=>
{
resetMenu
()
syncTreeActions
.
setSelectKeys
([])
setResetSearch
(
true
)
...
...
src/pages/commodity/products/addProducts.tsx
View file @
c88227a2
...
...
@@ -53,7 +53,8 @@ const AddProducts: React.FC<{}> = (props) => {
selectCategoryId
,
clearPartData
,
setTabClickItem
,
setSelectedGoods
setSelectedGoods
,
setProductPriceType
}
=
ProductStore
useEffect
(()
=>
{
...
...
@@ -89,6 +90,7 @@ const AddProducts: React.FC<{}> = (props) => {
afterService
:
data
.
afterService
})
setProductName
(
data
?.
name
)
setProductPriceType
(
data
?.
priceType
)
const
attributeRes
=
await
PublicApi
.
getProductCustomerGetCustomerCategoryById
({
id
:
data
?.
customerCategory
?.
id
+
''
})
setAttributeLists
(
attributeRes
.
data
?.
customerAttributeList
)
// 预先设置选择货品
...
...
src/pages/commodity/products/addProductsItem/otherForm.tsx
View file @
c88227a2
import
React
,
{
useEffect
,
useRef
}
from
'react'
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
import
{
history
}
from
'umi'
import
{
Form
,
Radio
,
Input
}
from
'antd'
import
{
store
}
from
'@/store'
...
...
@@ -25,14 +25,18 @@ const OtherForm: React.FC<Iprops> = (props) => {
const
otherFormRef
=
useRef
()
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
[
otherForm
]
=
Form
.
useForm
()
const
{
getOtherFormParamsByEdit
,
selectCategoryId
}
=
ProductStore
const
{
getOtherFormParamsByEdit
,
selectCategoryId
,
productPriceType
,
productInfoByEdit
}
=
ProductStore
const
[
disabledInvoice
,
setDisabledInvoice
]
=
useState
(
false
)
const
{
id
}
=
history
.
location
.
query
useEffect
(()
=>
{
//传入ref给父级
onRef
(
otherFormRef
)
if
(
history
.
location
.
query
?.
id
)
if
(
id
){
otherForm
.
setFieldsValue
(
getOtherFormParamsByEdit
)
}
},
[])
useEffect
(()
=>
{
...
...
@@ -44,6 +48,15 @@ const OtherForm: React.FC<Iprops> = (props) => {
}
},
[
selectCategoryId
])
useEffect
(()
=>
{
if
(
productPriceType
===
3
)
{
otherForm
.
setFieldsValue
({
"isInvoice"
:
false
})
setDisabledInvoice
(
true
)
}
else
{
setDisabledInvoice
(
false
)
}
},
[
productPriceType
])
return
(<>
<
Form
{
...
layout
}
...
...
@@ -62,7 +75,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
message
:
"请选择是否提供发票"
}]
}
>
<
Radio
.
Group
size=
"small"
>
<
Radio
.
Group
size=
"small"
disabled=
{
disabledInvoice
}
>
<
Radio
.
Button
value=
{
true
}
style=
{
{
width
:
100
,
textAlign
:
'center'
}
}
>
是
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
false
}
style=
{
{
width
:
100
,
textAlign
:
'center'
}
}
>
否
</
Radio
.
Button
>
</
Radio
.
Group
>
...
...
src/pages/transaction/purchaseOrder/index.tsx
View file @
c88227a2
...
...
@@ -107,9 +107,9 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
externalState
===
PurchaseOrderOutWorkState
.
FINISH_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleEvaluate
(
record
.
id
)
}
>
评价
</
Button
>
}
{
record
.
externalState
===
PurchaseOrderOutWorkState
.
FINISH_ORDER
&&
!
record
.
procurementEevaluateState
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleEvaluate
(
record
.
id
)
}
>
评价
</
Button
>
}
{
record
.
receivingTimes
>=
1
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleSaleAfter
(
record
.
id
)
}
>
售后
</
Button
>
record
.
receivingTimes
>=
1
||
PurchaseOrderOutWorkState
.
FINISH_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleSaleAfter
(
record
.
id
)
}
>
售后
</
Button
>
}
</>
}
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/invoiceModal/index.tsx
View file @
c88227a2
...
...
@@ -42,7 +42,7 @@ const InvoiceModal:React.FC<InvoiceModalProps> = (props) => {
const
handleSubmit
=
async
(
value
)
=>
{
const
params
=
{
...
value
,
isDefault
:
value
.
isDefault
?
1
:
0
isDefault
:
value
?
.
isDefault
?
1
:
0
}
const
fn
=
mode
===
'edit'
?
PublicApi
.
postSettleAccountsInvoiceMessageUpdate
:
PublicApi
.
postSettleAccountsInvoiceMessageAdd
await
fn
(
params
)
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/theInvoiceList/index.tsx
View file @
c88227a2
This diff is collapsed.
Click to expand it.
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
c88227a2
...
...
@@ -274,9 +274,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
...
omit
(
value
.
deliveryAddresId
,
[
'id'
]),
// 冗余发票信息
theInvoiceId
:
value
.
theInvoiceId
?
value
.
theInvoiceId
.
id
:
undefined
,
// theInvoiceId: typeof value.theInvoiceId === 'object' ? value.theInvoiceId.id : value.theInvoiceId,
// 去掉该冗余字段的传递, 只做详情展示
// theInvoiceInfo: (value.typeof value.theInvoiceId === 'object' ? value.theInvoiceId : null
// theInvoiceInfo: value.theInvoiceInfo
}
// 校验是否选择支付渠道/支付比例
...
...
@@ -311,10 +310,11 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
if
(
!
judgementByCount
||
judgementByCount
.
includes
(
false
)){
throw
new
Error
(
'请填写商品采购数量'
)
}
// // 校验简单电子合同必选
// if(processEnum === 24 && !usingElectronicContracts){
// throw new Error('此订单必须签署电子合同')
// }
// 使用发票即校验发票id
console
.
log
(
params
,
'params'
)
if
(
params
.
needTheInvoice
&&
!
params
.
theInvoiceId
)
{
throw
new
Error
(
'请新增或选择需要使用的发票'
)
}
// logistics render字段字符串化
params
.
orderProductRequests
=
params
.
orderProductRequests
.
map
(
item
=>
{
let
logistics
:
any
=
{
...
item
.
logistics
,
render
:
item
.
logistics
?.
render
?
JSON
.
stringify
(
item
.
logistics
.
render
)
:
''
};
...
...
@@ -533,10 +533,16 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// 选择某种类型时, 需显示对应的订单类型
ctx
.
setFieldValue
(
'type'
,
orderTypeLabel
[
value
-
4
])
// -4 获得对应的数组下标, 由于id是固定的
//
发票id变动,调用订单更新接口
$
(
'onFieldInputChange'
,
'theInvoiceId'
).
subscribe
(
state
=>
{
//
需要发票变动或者发票id变动,调用订单更新接口传入发票id
$
(
'onFieldInputChange'
,
'theInvoiceId
, needTheInvoice
'
).
subscribe
(
state
=>
{
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
addSchemaAction
.
submit
((
values
)
=>
PublicApi
.
postOrderProcurementOrderAddReinsurancePolicy
(
values
,
{
ctlType
:
"none"
}))
addSchemaAction
.
submit
((
values
)
=>
PublicApi
.
postOrderProcurementOrderUpdate
({
...
values
,
deliveryTime
:
moment
(
values
.
deliveryTime
).
valueOf
(),
theInvoiceId
:
state
.
value
.
id
,
needTheInvoice
:
Number
(
values
.
needTheInvoice
),
id
,
},
{
ctlType
:
"none"
}))
}
})
...
...
src/store/product/index.ts
View file @
c88227a2
This diff is collapsed.
Click to expand it.
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