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
dce06502
Commit
dce06502
authored
Mar 24, 2022
by
前端-彭佳文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418' into 'v2-220418'
V2 220418 See merge request GavinPeng/pro-platform!12
parents
5bbdbc0d
74f603e2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
53 deletions
+31
-53
index.ts
...ckSellStorage/bills/components/BillsForm/effects/index.ts
+1
-1
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+0
-0
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+0
-0
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+0
-0
index.tsx
src/pages/transaction/stockSellStorage/bills/index.tsx
+13
-35
index.ts
...Storage/billsType/components/BillTypeForm/schema/index.ts
+17
-17
No files found.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/index.ts
View file @
dce06502
...
...
@@ -41,5 +41,5 @@ export const createEffects = (context, actions) => {
useBusinessEffects
(
context
,
actions
);
useAsyncSelect
(
'invoicesTypeId'
,
fetchInvoicesType
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'
inventoryId'
,
fetchInventory
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'
warehouseId'
,
fetchInventory
,
[
'name'
,
'id'
]);
};
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
dce06502
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
dce06502
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
dce06502
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/index.tsx
View file @
dce06502
import
React
,
{
useState
,
use
Effect
,
use
Ref
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Button
,
Card
,
Dropdown
,
Menu
,
Space
,
Badge
,
Popconfirm
}
from
'antd'
;
import
{
PlusOutlined
,
DownOutlined
,
DeleteOutlined
,
RollbackOutlined
,
SnippetsOutlined
,
ZoomOutOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
DownOutlined
,
DeleteOutlined
,
RollbackOutlined
,
SnippetsOutlined
}
from
'@ant-design/icons'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
getProductInvoicesList
,
getProductInvoicesTypeAll
,
getProductWarehouseAll
,
postProductInvoicesBatchDelete
,
postProductInvoicesBatchReview
All
,
postProductInvoicesBatchAgainstReview
}
from
'@/services/ProductV2Api'
;
import
{
getProductInvoicesList
,
getProductInvoicesTypeAll
,
getProductWarehouseAll
,
postProductInvoicesBatchDelete
,
postProductInvoicesBatchReview
}
from
'@/services/ProductV2Api'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
UploadModal
from
'@/components/UploadModal'
;
...
...
@@ -70,26 +70,11 @@ const Bills: React.FC<{}> = () => {
});
};
const
auditInvoices
=
(
ids
:
number
[],
callback
?:
()
=>
void
)
=>
{
const
auditInvoices
=
(
ids
:
number
[],
reviewType
:
number
,
callback
?:
()
=>
void
)
=>
{
setBatchLoading
(
true
);
postProductInvoicesBatchReviewAll
({
ids
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
if
(
callback
)
{
callback
();
}
}).
finally
(()
=>
{
setBatchLoading
(
false
);
});
};
const
counterclaimInvoices
=
(
ids
:
number
[],
callback
?:
()
=>
void
)
=>
{
setBatchLoading
(
true
);
postProductInvoicesBatchAgainstReview
({
postProductInvoicesBatchReview
({
ids
,
reviewType
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
...
...
@@ -121,7 +106,7 @@ const Bills: React.FC<{}> = () => {
}
case
'BatchAudit'
:
{
auditInvoices
(
selectedRowKeys
,
()
=>
{
auditInvoices
(
selectedRowKeys
,
1
,
()
=>
{
setSelectedRowKeys
([]);
ref
.
current
.
reload
();
});
...
...
@@ -129,7 +114,7 @@ const Bills: React.FC<{}> = () => {
}
case
'BatchCounterclaim'
:
{
counterclaimInvoices
(
selectedRowKeys
,
()
=>
{
auditInvoices
(
selectedRowKeys
,
0
,
()
=>
{
setSelectedRowKeys
([]);
ref
.
current
.
reload
();
});
...
...
@@ -161,15 +146,8 @@ const Bills: React.FC<{}> = () => {
);
const
handleCounterclaim
=
id
=>
{
counterclaimInvoices
([
id
],
()
=>
{
setSelectedRowKeys
([]);
ref
.
current
.
reload
();
});
};
const
handleAudit
=
id
=>
{
auditInvoices
([
id
],
()
=>
{
const
handleAudit
=
(
id
,
reviewType
)
=>
{
auditInvoices
([
id
],
reviewType
,
()
=>
{
setSelectedRowKeys
([]);
ref
.
current
.
reload
();
});
...
...
@@ -258,7 +236,7 @@ const Bills: React.FC<{}> = () => {
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/bills/edit?id=${record.id}`
)
}
>
{
intl
.
formatMessage
({
id
:
'stockSellStorage.xiugai'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'bills.shenhe'
>
<
Button
type=
"link"
onClick=
{
()
=>
handleAudit
(
record
.
id
)
}
>
{
intl
.
formatMessage
({
id
:
'stockSellStorage.shenhe'
})
}
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
handleAudit
(
record
.
id
,
1
)
}
>
{
intl
.
formatMessage
({
id
:
'stockSellStorage.shenhe'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'bills.del'
>
<
Popconfirm
...
...
@@ -278,7 +256,7 @@ const Bills: React.FC<{}> = () => {
</>
)
}
{
record
.
state
===
DOC_STATUS_REVIEWED
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handle
Counterclaim
(
record
.
id
)
}
>
{
intl
.
formatMessage
({
id
:
'stockSellStorage.fanshen'
})
}
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
handle
Audit
(
record
.
id
,
0
)
}
>
{
intl
.
formatMessage
({
id
:
'stockSellStorage.fanshen'
})
}
</
Button
>
)
}
</>
)
:
null
;
...
...
src/pages/transaction/stockSellStorage/billsType/components/BillTypeForm/schema/index.ts
View file @
dce06502
...
...
@@ -22,24 +22,24 @@ export const billsTypeDetailSchema: ISchema = {
},
properties
:
{
number
:
{
type
:
'
string
'
,
type
:
'
text
'
,
title
:
intl
.
formatMessage
({
id
:
'stockSellStorage.danjuleixingbianhao'
}),
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'stockSellStorage.zuichang10gezifu'
}),
maxLength
:
10
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'stockSellStorage.qingshurudanjuleixingbian'
}),
},
{
validator
:
value
=>
{
const
CNReg
=
/
[\u
4E00-
\u
9FA5
]
/g
;
return
CNReg
.
test
(
value
)
?
intl
.
formatMessage
({
id
:
'stockSellStorage.qingshurufeizhongwenzifu'
})
:
''
;
},
},
],
//
'x-component-props': {
//
placeholder: intl.formatMessage({ id: 'stockSellStorage.zuichang10gezifu' }),
//
maxLength: 10,
//
},
//
'x-rules': [
//
{
//
required: true,
//
message: intl.formatMessage({ id: 'stockSellStorage.qingshurudanjuleixingbian' }),
//
},
//
{
//
validator: value => {
//
const CNReg = /[\u4E00-\u9FA5]/g;
//
return CNReg.test(value) ? intl.formatMessage({ id: 'stockSellStorage.qingshurufeizhongwenzifu' }) : '';
//
},
//
},
//
],
},
name
:
{
type
:
'string'
,
...
...
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