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
shenshaokai
jinfa-platform
Commits
063cec32
Commit
063cec32
authored
Dec 21, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change: 修改单据数量校验正则
parent
19509777
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
9 deletions
+31
-9
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+29
-7
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+1
-1
index.tsx
src/pages/transaction/stockSellStorage/bills/index.tsx
+1
-1
No files found.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
063cec32
...
...
@@ -21,12 +21,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
DEPENDENT_DOC_ORDER
,
DEPENDENT_DOC_EXCHANGE
,
DEPENDENT_DOC_RETURN
,
DEPENDENT_DOC_PRODUCTION
,
DEPENDENT_DOC_INTERNAL
,
DOC_TYPE_PURCHASE_RECEIPT
,
DOC_TYPE_SALES_INVOICE
,
DOC_TYPE_PROCESS_RECEIPT
,
...
...
@@ -59,6 +53,23 @@ interface BillsFormProps {
relevanceInvoicesId
:
string
,
// 单据id,可能是待新增销售发货单,待新增采购入库单跳转过来的
};
function
transforDirection
(
type
)
{
let
flag
=
0
;
switch
(
type
)
{
case
DOC_TYPE_PURCHASE_RECEIPT
:
case
DOC_TYPE_PROCESS_RECEIPT
:
case
DOC_TYPE_RETURN_RECEIPT
:
case
DOC_TYPE_EXCHANGE_RECEIPT
:
case
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
:
flag
=
1
;
break
;
default
:
break
;
}
return
flag
;
};
const
BillsForm
:
React
.
FC
<
BillsFormProps
>
=
({
id
,
isEdit
=
false
,
...
...
@@ -154,9 +165,20 @@ const BillsForm: React.FC<BillsFormProps> = ({
const
details
=
invoicesDetailsList
?
invoicesDetailsList
.
map
(
item
=>
({
...
item
,
// 单据数量,需要判断是 入库 还是 发货 单 匹配对应的字段值
productCount
:
transforDirection
(
rest
.
invoicesTypeId
)
?
item
.
storageCount
:
item
.
shipmentQuantity
,
product
:
item
.
productId
,
amount
:
`¥
${(
+
item
.
productCount
*
item
.
price
).
toFixed
(
2
)}
`
,
deliveryType
,
extraData
:
{
productName
:
item
.
productName
,
deliveryType
,
id
:
''
,
// 加工发货单需要,明细id
processNum
:
0
,
// 加工发货单需要,加工数量
orderNo
:
item
.
orderNo
,
// 订单编号
goodsCount
:
item
.
productCount
,
// 采购数量
price
:
item
.
price
,
// 加工发货、入库单需要,加工单价
totalPrice
:
0
,
// 加工发货、入库单需要,加工总价
},
}))
:
[];
addSchemaAction
.
setFieldState
(
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
063cec32
...
...
@@ -504,7 +504,7 @@ export const addBillSchema: ISchema = {
message
:
'请输入单据数量'
,
},
{
pattern
:
PATTERN_MAPS
.
quantity
,
pattern
:
PATTERN_MAPS
.
weight
,
message
:
'请输入正确的数量'
,
},
],
...
...
src/pages/transaction/stockSellStorage/bills/index.tsx
View file @
063cec32
...
...
@@ -178,7 +178,7 @@ const Bills: React.FC<{}> = () => {
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.id}
&preview=1
`
}
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
...
...
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