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
a3fb7d42
Commit
a3fb7d42
authored
Jun 14, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完善流程引擎国际化
parent
a28cd8b4
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
290 additions
and
174 deletions
+290
-174
index.tsx
src/components/CommonDrawer/index.tsx
+14
-1
index.tsx
src/components/ConfigFieldCard/index.tsx
+4
-7
index.tsx
src/components/ContentLayout/index.tsx
+4
-3
index.tsx
src/components/FetchSelect/index.tsx
+3
-1
index.tsx
src/components/FlowChart/index.tsx
+4
-2
index.tsx
src/components/FormProgress/index.tsx
+3
-1
index.tsx
src/components/ImgUpload/index.tsx
+0
-1
common.ts
src/locales/en-US/common.ts
+4
-0
contract.ts
src/locales/en-US/contract.ts
+5
-0
material.ts
src/locales/en-US/material.ts
+5
-4
processRuleSetting.ts
src/locales/en-US/system/processRuleSetting.ts
+25
-0
common.ts
src/locales/ko-KR/common.ts
+4
-0
contract.ts
src/locales/ko-KR/contract.ts
+5
-0
material.ts
src/locales/ko-KR/material.ts
+4
-3
processRuleSetting.ts
src/locales/ko-KR/system/processRuleSetting.ts
+25
-0
common.ts
src/locales/zh-CN/common.ts
+4
-0
contract.ts
src/locales/zh-CN/contract.ts
+5
-0
material.ts
src/locales/zh-CN/material.ts
+4
-3
processRuleSetting.ts
src/locales/zh-CN/system/processRuleSetting.ts
+24
-0
index.tsx
...mponents/ProcessRuleConfig/CommonCheckboxDrawer/index.tsx
+4
-4
index.tsx
...mponents/ProcessRuleConfig/CommonCheckboxSelect/index.tsx
+4
-2
index.tsx
.../components/ProcessRuleConfig/CommonTableDrawer/index.tsx
+5
-3
index.tsx
.../components/ProcessRuleConfig/CommonTableSelect/index.tsx
+4
-2
index.tsx
...g/components/ProcessRuleConfig/CommonTreeDrawer/index.tsx
+3
-1
index.tsx
...g/components/ProcessRuleConfig/CommonTreeSelect/index.tsx
+3
-3
index.less
...sEng/components/ProcessRuleConfig/ProcessRules/index.less
+1
-0
index.tsx
...ssEng/components/ProcessRuleConfig/ProcessRules/index.tsx
+16
-14
index.tsx
...omponents/ProcessRuleConfig/TableContractDrawer/index.tsx
+11
-10
index.tsx
...ts/ProcessRuleConfig/TableContractDrawer/schema/index.tsx
+2
-47
index.tsx
...omponents/ProcessRuleConfig/TableCustomerDrawer/index.tsx
+10
-7
index.tsx
...ts/ProcessRuleConfig/TableCustomerDrawer/schema/index.tsx
+1
-2
index.tsx
...g/components/ProcessRuleConfig/TableGoodsDrawer/index.tsx
+11
-8
index.tsx
...nents/ProcessRuleConfig/TableGoodsDrawer/schema/index.tsx
+2
-2
index.tsx
...omponents/ProcessRuleConfig/TableMaterialDrawer/index.tsx
+11
-8
index.tsx
...ts/ProcessRuleConfig/TableMaterialDrawer/schema/index.tsx
+4
-4
index.tsx
...omponents/ProcessRuleConfig/TableSupplierDrawer/index.tsx
+7
-4
index.tsx
...ts/ProcessRuleConfig/TableSupplierDrawer/schema/index.tsx
+1
-1
index.tsx
...cessEng/components/ProcessRuleConfig/WrapSelect/index.tsx
+15
-2
index.ts
...processEng/components/ProcessRuleConfig/constant/index.ts
+10
-10
index.tsx
...ng/purchaseB2BProcess/components/AddEditContent/index.tsx
+10
-10
index.tsx
...ruleEng/ruleEngConfig/components/CategoryDrawer/index.tsx
+3
-1
index.tsx
...g/ruleEng/ruleEngConfig/components/ConfigDrawer/index.tsx
+3
-1
index.tsx
...ruleEng/ruleEngConfig/components/MaterialDrawer/index.tsx
+3
-1
index.tsx
...ing/ruleEng/ruleEngConfig/components/WrapSelect/index.tsx
+0
-1
No files found.
src/components/CommonDrawer/index.tsx
View file @
a3fb7d42
import
React
,
{
useState
,
useImperativeHandle
,
forwardRef
,
memo
}
from
'react'
import
{
Drawer
,
Space
,
Button
,
DrawerProps
}
from
'antd'
import
styles
from
'./index.less'
import
{
useIntl
}
from
'umi'
;
export
type
HandleType
=
{
show
:
(
flag
?:
boolean
,
params
?:
any
)
=>
void
;
...
...
@@ -19,7 +20,19 @@ interface PropsType extends DrawerProps {
}
const
CommonDrawer
=
(
props
:
PropsType
,
ref
:
any
)
=>
{
const
{
onOk
,
onCancel
,
onShow
,
okText
=
'确定'
,
cancelText
=
'取消'
,
specialFooter
,
children
,
confirmLoading
,
confirmDisabled
,
...
rest
}
=
props
const
intl
=
useIntl
()
const
{
onOk
,
onCancel
,
onShow
,
okText
=
intl
.
formatMessage
({
id
:
'common.button.confirm'
,
defaultMessage
:
'确定'
}),
cancelText
=
intl
.
formatMessage
({
id
:
'common.button.cancel'
,
defaultMessage
:
'取消'
}),
specialFooter
,
children
,
confirmLoading
,
confirmDisabled
,
...
rest
}
=
props
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
_onCancel
=
()
=>
{
...
...
src/components/ConfigFieldCard/index.tsx
View file @
a3fb7d42
...
...
@@ -2,11 +2,10 @@
* 流程规则组件
* @author: Crayon
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Button
,
Form
,
Input
,
Radio
,
Checkbox
,
FormInstance
,
Row
,
Col
,
Space
}
from
'antd'
import
{
validatorByte
}
from
'@/utils/regExp'
import
React
from
'react'
import
{
DeleteOutlined
}
from
'@ant-design/icons'
import
styles
from
'./index.less'
import
{
useIntl
}
from
'umi'
type
PropsType
=
{
title
?:
string
|
React
.
ReactNode
...
...
@@ -14,10 +13,8 @@ type PropsType = {
children
?:
React
.
ReactNode
}
const
rules
=
[{
required
:
true
}];
const
ConfigFieldCard
:
React
.
FC
<
PropsType
>
=
({
title
,
onClick
,
children
})
=>
{
const
intl
=
useIntl
()
return
(
<
div
className=
{
styles
[
'card'
]
}
>
<
div
className=
{
styles
[
'header'
]
}
>
...
...
@@ -27,7 +24,7 @@ const ConfigFieldCard: React.FC<PropsType> = ({ title, onClick, children }) => {
<
div
className=
{
styles
[
'icon'
]
}
onClick=
{
onClick
}
title=
'删除'
title=
{
intl
.
formatMessage
({
id
:
'common.button.delete'
,
defaultMessage
:
'删除'
})
}
>
<
DeleteOutlined
/>
</
div
>
...
...
src/components/ContentLayout/index.tsx
View file @
a3fb7d42
...
...
@@ -8,7 +8,7 @@ import { PAGE_TYPE } from '@/constants';
import
{
FieldData
}
from
'rc-field-form/lib/interface'
;
import
AuthButton
from
'../AuthButton'
;
import
{
ColProps
}
from
'antd/es/grid/col'
;
import
{
useIntl
}
from
'umi'
type
PropsType
=
{
pageType
:
'add'
|
'edit'
|
'view'
// 页面类型
...
...
@@ -25,7 +25,7 @@ type PropsType = {
onBack
?:
()
=>
void
// 左侧返回按钮回调
customStyle
?:
React
.
CSSProperties
// 自定义样式
progressIgnoreConfig
?:
Array
<
{
key
?:
string
,
value
?:
any
,
ignoreKey
:
string
}
>
// 完整度计算 - 需要忽略的字段(key 和 value 是 忽略 ignoreKey 的前置条件)
progressListFieldsConfig
?:
listFieldsConfigItemType
[]
// 完整度计算 - 列表字段内部需要计算的字段配置
progressListFieldsConfig
?:
listFieldsConfigItemType
[]
// 完整度计算 - 列表字段内部需要计算的字段配置
isAutoSetChildrenIdAndTitle
?:
boolean
childrenTitleKey
?:
string
}
...
...
@@ -38,6 +38,7 @@ export const layout: any = {
};
const
ContentLayout
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
tabLink
=
[],
title
,
...
...
@@ -95,7 +96,7 @@ const ContentLayout = (props: PropsType, ref) => {
onClick=
{
handleSubmit
}
loading=
{
loading
}
>
保存
{
intl
.
formatMessage
({
id
:
'common.button.save'
,
defaultMessage
:
'保存'
})
}
</
Button
>
</
AuthButton
>
)
...
...
src/components/FetchSelect/index.tsx
View file @
a3fb7d42
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Select
,
SelectProps
}
from
'antd'
import
{
useIntl
}
from
'umi'
export
interface
PropsType
<
VT
>
extends
SelectProps
<
VT
>
{
requestApi
?:
Function
...
...
@@ -14,6 +15,7 @@ export interface PropsType<VT> extends SelectProps<VT> {
}
const
FetchSelect
=
(
props
:
PropsType
<
number
>
)
=>
{
const
intl
=
useIntl
()
const
{
requestApi
,
params
=
{},
...
...
@@ -71,7 +73,7 @@ const FetchSelect = (props: PropsType<number>) => {
return
(
<
Select
options=
{
options
}
placeholder=
'请选择'
placeholder=
{
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
})
}
value=
{
val
}
onChange=
{
_onChange
}
{
...
rest
}
...
...
src/components/FlowChart/index.tsx
View file @
a3fb7d42
import
React
,
{
forwardRef
,
useImperativeHandle
,
useState
,
memo
}
from
'react'
import
cs
from
'classnames'
import
styles
from
'./index.less'
import
{
useIntl
}
from
'umi'
export
type
FlowChartOptionsType
=
{
label
:
string
,
...
...
@@ -28,6 +29,7 @@ type ItemPropsType = {
}
const
FlowChart
=
({
children
,
options
,
onChange
,
fieldNames
=
{
label
:
'label'
,
value
:
'value'
}
}:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
[
activeValue
,
setActiveValue
]
=
useState
<
string
|
number
>
()
const
onItemChange
=
(
value
:
string
|
number
,
item
?:
any
)
=>
{
...
...
@@ -43,7 +45,7 @@ const FlowChart = ({ children, options, onChange, fieldNames = { label: 'label',
return
(
<
div
className=
{
styles
[
'config-box'
]
}
>
<
FlowChartItem
type=
'start'
>
开始
</
FlowChartItem
>
<
FlowChartItem
type=
'start'
>
{
intl
.
formatMessage
({
id
:
'common.start'
,
defaultMessage
:
'开始'
})
}
</
FlowChartItem
>
{
options
?
options
.
map
(
item
=>
(
...
...
@@ -63,7 +65,7 @@ const FlowChart = ({ children, options, onChange, fieldNames = { label: 'label',
});
})
}
<
FlowChartItem
type=
'end'
>
结束
</
FlowChartItem
>
<
FlowChartItem
type=
'end'
>
{
intl
.
formatMessage
({
id
:
'common.end'
,
defaultMessage
:
'结束'
})
}
</
FlowChartItem
>
</
div
>
)
}
...
...
src/components/FormProgress/index.tsx
View file @
a3fb7d42
...
...
@@ -6,6 +6,7 @@
import
{
useState
,
useImperativeHandle
,
forwardRef
,
ReactNode
}
from
'react'
import
{
FormInstance
}
from
'antd'
import
styles
from
'./index.less'
import
{
useIntl
}
from
'umi'
export
type
HandleType
=
{
/**
...
...
@@ -56,6 +57,7 @@ export const getColor = (scale: number) => {
}
const
FormProgress
=
({
title
,
disabled
,
ignoreConfig
=
[],
listFieldConfig
=
[]
}:
PropsType
,
ref
:
any
)
=>
{
const
intl
=
useIntl
()
const
[
scale
,
setScale
]
=
useState
<
number
>
(
0
)
useImperativeHandle
(
ref
,
()
=>
({
...
...
@@ -121,7 +123,7 @@ const FormProgress = ({ title, disabled, ignoreConfig = [], listFieldConfig = []
className=
{
styles
.
progress
}
style=
{
{
backgroundColor
:
getColor
(
scale
)?.
bg
,
color
:
getColor
(
scale
)?.
text
}
}
>
信息完整度
{
scale
}
%
{
intl
.
formatMessage
({
id
:
'process.infointegrity'
,
defaultMessage
:
'信息完整度'
})
}
{
scale
}
%
</
div
>
)
}
...
...
src/components/ImgUpload/index.tsx
View file @
a3fb7d42
...
...
@@ -109,7 +109,6 @@ const ImgUpload = forwardRef((props: IProps, ref: any) => {
imgData
.
push
(
url
)
}
})
console
.
log
(
`imgData`
,
imgData
)
onChange
&&
onChange
(
maxCount
===
1
?
imgData
[
0
]
:
imgData
,
fileList
)
}
...
...
src/locales/en-US/common.ts
View file @
a3fb7d42
...
...
@@ -90,6 +90,8 @@
'common.form.upload.placeholder'
:
'Please upload'
,
'common.enter'
:
'Please enter'
,
'common.select'
:
'Please select'
,
'common.start'
:
'Start'
,
'common.end'
:
'End'
,
'common.error.nindangqianwuquan'
:
'You are currently not authorized to visit this page'
,
'common.error.chongxindenglu'
:
'Login again'
,
...
...
@@ -152,4 +154,6 @@
I hope the cooperation will be successful next time.`
,
'common.maxTextnumberLength'
:
'The longest is {char} characters, {hanzi} Chinese characters'
,
'common.taxProbabilityMSG'
:
'Number type, retaining up to 2 as decimals, which can be tax free at 0, 0'
,
'common.close.tips'
:
'You still have unsaved content. Are you sure you want to close it?'
,
}
src/locales/en-US/contract.ts
View file @
a3fb7d42
...
...
@@ -176,6 +176,8 @@ export default {
'contract.zhaobiaobianhaohuiyuan'
:
'Tender No./Member'
,
'contract.hetongbianhaozhaiyao'
:
'Contract number/Abstract'
,
'contract.hetongshengxiaoshixiaoshi'
:
'Contract effective/expiration time'
,
'contract.hetongshengxiaoshijian'
:
'Contract effective time'
,
'contract.hetongshixiaoshijian'
:
'Contract expiration time'
,
'contract.hetongyifang'
:
'Contract Party B'
,
'contract.hetongofficer'
:
'Total contract amount'
,
'contract.yizhixingjine'
:
'Executed amount'
,
...
...
@@ -493,4 +495,7 @@ export default {
'contract.quantity.tip'
:
'The quantity awarded is limited to three decimal places'
,
'contract.qingshurufukuanjihua'
:
'Please enter the required fields for payment plan'
,
'contract.all'
:
'All contracts'
,
'contract.select'
:
'Select contract'
,
}
src/locales/en-US/material.ts
View file @
a3fb7d42
...
...
@@ -31,8 +31,8 @@ export default {
'material.frozon.reason.modal.title'
:
'frozen reason'
,
'material.sourceList'
:
'sourceList'
,
'material.submit'
:
'submit'
,
'material.supplier.id'
:
'
supplier
ID'
,
'material.supplier.name'
:
'
supplier.
name'
,
'material.supplier.id'
:
'
Supplier
ID'
,
'material.supplier.name'
:
'
Supplier
name'
,
'material.select.supplier.modal.title'
:
'Select supplier'
,
'material.edit.supplier'
:
'Edit supplier'
,
'material.no'
:
'Serial number'
,
...
...
@@ -142,4 +142,6 @@ export default {
'material.contactMemberName'
:
'contacts'
,
'material.contactMemberPhone'
:
'Contact telephone'
,
'material.sourceList.submit.warn'
:
'Please confirm the data in the form first'
,
}
\ No newline at end of file
'material.all'
:
'All material'
,
'material.supplier.all'
:
'All supplier'
,
}
src/locales/en-US/system/processRuleSetting.ts
View file @
a3fb7d42
...
...
@@ -111,4 +111,29 @@ export default {
'processRuleSetting.dangcaigoudingdantijiaoshi'
:
'when the purchase order is submitted'
,
'processRuleSetting.dang8Dbaogaotijiaohou'
:
'when the 8D report is submitted'
,
'processRuleSetting.dangqingkuandantijiaoshi'
:
'when the payment requisition is submitted'
,
'processRuleSetting.liuchengxinxi'
:
'Process information'
,
'processRuleSetting.laiyuanshangcheng'
:
'source mall'
,
'processRuleSetting.qingkuanleixing'
:
'payment request type'
,
'processRuleSetting.kexuanze'
:
'Optional'
,
'processRuleSetting.yixuanze'
:
'Selected'
,
'processRuleSetting.selectAllTips'
:
'All has been selected'
,
'processRuleSetting.is'
:
'Is'
,
'processRuleSetting.isnot'
:
'Is not'
,
'processRuleSetting.baohan'
:
'Include'
,
'processRuleSetting.bubaohan'
:
'Not include'
,
'processRuleSetting.zaizhiqian'
:
'Before'
,
'processRuleSetting.zaizhihou'
:
'After'
,
'processRuleSetting.and'
:
'And'
,
'processRuleSetting.or'
:
'Or'
,
'processRuleSetting.condition'
:
'Condition'
,
'processRuleSetting.tianjiaziduan'
:
'Add field'
,
'processRuleSetting.tianjiaguize'
:
'Add rule'
,
'processRuleSetting.xianghuguanxi'
:
'Interrelation'
,
'processRuleSetting.customerID'
:
'Customer ID'
,
'processRuleSetting.customerName'
:
'Customer name'
,
'processRuleSetting.selectCustomer'
:
'Select customer'
,
'processRuleSetting.allCustomer'
:
'All customer'
,
}
src/locales/ko-KR/common.ts
View file @
a3fb7d42
...
...
@@ -90,6 +90,8 @@ export default {
'common.form.upload.placeholder'
:
'올려주세요.'
,
'common.enter'
:
'입력하십시오'
,
'common.select'
:
'선택하십시오'
,
'common.start'
:
'시작하다'
,
'common.end'
:
'끝내다'
,
'common.error.nindangqianwuquan'
:
'현재 이 페이지에 대한 액세스 권한이 없습니다.'
,
'common.error.chongxindenglu'
:
'다시 로그인'
,
...
...
@@ -152,4 +154,6 @@ export default {
다음 번 협력이 성공하기를 바랍니다.`
,
'common.maxTextnumberLength'
:
'가장 긴 것은 {char}자, {hanzi}자입니다.'
,
'common.taxProbabilityMSG'
:
'숫자 유형(최대 2는 소수, 0은 0, 0은 면세)'
,
'common.close.tips'
:
'아직 저장되지 않은 내용이 있습니다.닫으시겠습니까?'
,
}
src/locales/ko-KR/contract.ts
View file @
a3fb7d42
...
...
@@ -176,6 +176,8 @@ export default {
'contract.zhaobiaobianhaohuiyuan'
:
'입찰번호/회원'
,
'contract.hetongbianhaozhaiyao'
:
'계약 번호/요약'
,
'contract.hetongshengxiaoshixiaoshi'
:
'계약 효력 발생/실효 시간'
,
'contract.hetongshengxiaoshijian'
:
'계약 효력 발생 시간'
,
'contract.hetongshixiaoshijian'
:
'계약 실효 시간'
,
'contract.hetongyifang'
:
'계약 을측'
,
'contract.hetongzongjine'
:
'계약 총액'
,
'contract.yizhixingjine'
:
'수행된 금액'
,
...
...
@@ -490,4 +492,7 @@ export default {
'contract.fujiandaxiaochaoguo.limit'
:
'계약 텍스트 첨부 형식 업로드: .pdf, .doc(.docx), xls(.xlsx)'
,
'contract.quantity.tip'
:
'수여된 수량은 소수점 이하 세 자리로 제한됩니다.'
,
'contract.qingshurufukuanjihua'
:
'결제 계획에 필요한 필드를 입력하십시오'
,
'contract.all'
:
'모든 계약'
,
'contract.select'
:
'계약 선택'
,
}
src/locales/ko-KR/material.ts
View file @
a3fb7d42
...
...
@@ -31,7 +31,7 @@ export default {
'material.frozon.reason.modal.title'
:
'동결 원인'
,
'material.sourceList'
:
'상품 공급원 명세서'
,
'material.submit'
:
'커밋'
,
'material.supplier.id'
:
'공급업체
id
'
,
'material.supplier.id'
:
'공급업체
ID
'
,
'material.supplier.name'
:
'공급업체 이름'
,
'material.select.supplier.modal.title'
:
'공급업체 선택'
,
'material.edit.supplier'
:
'협력업체 편집'
,
...
...
@@ -143,4 +143,6 @@ export default {
'material.contactMemberName'
:
'연락처'
,
'material.contactMemberPhone'
:
'연락처 전화'
,
'material.sourceList.submit.warn'
:
'먼저 양식의 데이터를 확인하십시오'
,
}
\ No newline at end of file
'material.all'
:
'모든 재료'
,
'material.supplier.all'
:
'모든 공급업체'
,
}
src/locales/ko-KR/system/processRuleSetting.ts
View file @
a3fb7d42
...
...
@@ -110,4 +110,29 @@ export default {
'processRuleSetting.dangcaigoudingdantijiaoshi'
:
'구매 주문 제출 시'
,
'processRuleSetting.dang8Dbaogaotijiaohou'
:
'8D 보고서 제출 시'
,
'processRuleSetting.dangqingkuandantijiaoshi'
:
'지불 신청 제출 시'
,
'processRuleSetting.liuchengxinxi'
:
'프로세스 정보'
,
'processRuleSetting.laiyuanshangcheng'
:
'상점'
,
'processRuleSetting.qingkuanleixing'
:
'결제 요청 유형'
,
'processRuleSetting.kexuanze'
:
'선택 가능'
,
'processRuleSetting.yixuanze'
:
'골라냈어'
,
'processRuleSetting.selectAllTips'
:
'모두 선택'
,
'processRuleSetting.is'
:
'예'
,
'processRuleSetting.isnot'
:
'아니요'
,
'processRuleSetting.baohan'
:
'포함'
,
'processRuleSetting.bubaohan'
:
'포함하지 않음'
,
'processRuleSetting.zaizhiqian'
:
'그 전에'
,
'processRuleSetting.zaizhihou'
:
'이후'
,
'processRuleSetting.and'
:
'화목하다'
,
'processRuleSetting.or'
:
'또는'
,
'processRuleSetting.condition'
:
'조건'
,
'processRuleSetting.tianjiaziduan'
:
'필드 추가'
,
'processRuleSetting.tianjiaguize'
:
'규칙 추가'
,
'processRuleSetting.xianghuguanxi'
:
'상호 관계'
,
'processRuleSetting.customerID'
:
'고객 ID'
,
'processRuleSetting.customerName'
:
'고객 이름'
,
'processRuleSetting.selectCustomer'
:
'고객 선택'
,
'processRuleSetting.allCustomer'
:
'모든 고객'
,
}
src/locales/zh-CN/common.ts
View file @
a3fb7d42
...
...
@@ -92,6 +92,8 @@ export default {
'common.form.upload.placeholder'
:
'请上传'
,
'common.enter'
:
'请填写'
,
'common.select'
:
'请选择'
,
'common.start'
:
'开始'
,
'common.end'
:
'结束'
,
'common.error.nindangqianwuquan'
:
'您当前无权访问该页面'
,
'common.error.chongxindenglu'
:
'重新登录'
,
...
...
@@ -151,4 +153,6 @@ export default {
'common.content'
:
'贵公司参与了我公司《{data}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。'
,
'common.maxTextnumberLength'
:
'最长{char}个字符,{hanzi}个汉字'
,
'common.taxProbabilityMSG'
:
'数字类型,最多保留2为小数, 可为0, 0时表示免税'
,
'common.close.tips'
:
'您还有未保存的内容,是否确定要关闭?'
,
}
src/locales/zh-CN/contract.ts
View file @
a3fb7d42
...
...
@@ -176,6 +176,8 @@ export default {
'contract.zhaobiaobianhaohuiyuan'
:
'招标编号/会员'
,
'contract.hetongbianhaozhaiyao'
:
'合同编号/摘要'
,
'contract.hetongshengxiaoshixiaoshi'
:
'合同生效/失效时间'
,
'contract.hetongshengxiaoshijian'
:
'合同生效时间'
,
'contract.hetongshixiaoshijian'
:
'合同失效时间'
,
'contract.hetongyifang'
:
'合同乙方'
,
'contract.hetongzongjine'
:
'合同总金额'
,
'contract.yizhixingjine'
:
'已执行金额'
,
...
...
@@ -503,4 +505,7 @@ export default {
'contract.quantity.tip'
:
'授标数量仅限三位小数'
,
'contract.qingshurufukuanjihua'
:
'请输入付款计划必填内容'
,
'contract.all'
:
'全部合同'
,
'contract.select'
:
'选择合同'
,
}
src/locales/zh-CN/material.ts
View file @
a3fb7d42
...
...
@@ -32,7 +32,7 @@ export default {
'material.frozon.reason.modal.title'
:
'冻结原因'
,
'material.sourceList'
:
'货源清单'
,
'material.submit'
:
'提交'
,
'material.supplier.id'
:
'供应商
id
'
,
'material.supplier.id'
:
'供应商
ID
'
,
'material.supplier.name'
:
'供应商名称'
,
'material.select.supplier.modal.title'
:
'选择供应商'
,
'material.edit.supplier'
:
'编辑供应商'
,
...
...
@@ -143,4 +143,6 @@ export default {
'material.contactMemberName'
:
'联系人'
,
'material.contactMemberPhone'
:
'联系人电话'
,
'material.sourceList.submit.warn'
:
'请先确认表格内的数据'
,
}
\ No newline at end of file
'material.all'
:
'全部物料'
,
'material.supplier.all'
:
'全部供应商'
,
}
src/locales/zh-CN/system/processRuleSetting.ts
View file @
a3fb7d42
...
...
@@ -112,4 +112,28 @@ export default {
'processRuleSetting.dang8Dbaogaotijiaohou'
:
'当8D报告提交后'
,
'processRuleSetting.dangqingkuandantijiaoshi'
:
'当请款单提交时'
,
'processRuleSetting.liuchengxinxi'
:
'流程信息'
,
'processRuleSetting.laiyuanshangcheng'
:
'来源商城'
,
'processRuleSetting.qingkuanleixing'
:
'请款类型'
,
'processRuleSetting.kexuanze'
:
'可选择'
,
'processRuleSetting.yixuanze'
:
'已选择'
,
'processRuleSetting.selectAllTips'
:
'已存在相关字段选择了全部'
,
'processRuleSetting.is'
:
'不是'
,
'processRuleSetting.isnot'
:
'不是'
,
'processRuleSetting.baohan'
:
'包含'
,
'processRuleSetting.bubaohan'
:
'不包含'
,
'processRuleSetting.zaizhiqian'
:
'在之前'
,
'processRuleSetting.zaizhihou'
:
'在之后'
,
'processRuleSetting.and'
:
'并且'
,
'processRuleSetting.or'
:
'或者'
,
'processRuleSetting.condition'
:
'条件'
,
'processRuleSetting.tianjiaziduan'
:
'添加字段'
,
'processRuleSetting.tianjiaguize'
:
'添加规则'
,
'processRuleSetting.xianghuguanxi'
:
'相互关系'
,
'processRuleSetting.customerID'
:
'客户ID'
,
'processRuleSetting.customerName'
:
'客户名称'
,
'processRuleSetting.selectCustomer'
:
'选择客户'
,
'processRuleSetting.allCustomer'
:
'全部客户'
,
}
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonCheckboxDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -7,6 +7,7 @@ import CommonDrawer from '@/components/CommonDrawer'
import
cs
from
'classnames'
import
styles
from
'./index.less'
import
{
CheckSquareFilled
}
from
'@ant-design/icons'
import
{
useIntl
}
from
'umi'
export
interface
CommonCheckboxDrawerType
{
onOk
?:
(
values
:
any
)
=>
void
...
...
@@ -21,9 +22,8 @@ export interface CommonCheckboxDrawerType {
disabled
?:
boolean
}
const
mock
=
[{
"id"
:
1
,
"name"
:
"B2B建材商城平台"
,
"type"
:
1
,
"environment"
:
1
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049.png"
,
"describe"
:
"B2B联营商城-默认商城"
,
"state"
:
1
,
"url"
:
"lingxi-b2b-uat"
,
"isDefault"
:
1
,
"createTime"
:
1636022896144
},
{
"id"
:
3
,
"name"
:
"渠道商城"
,
"type"
:
3
,
"environment"
:
1
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/Demo Logoc69bfc4910654370bcaed87afafc4be2.jpg"
,
"describe"
:
"渠道商城"
,
"state"
:
1
,
"url"
:
"lingxi-channel"
,
"isDefault"
:
1
,
"createTime"
:
1636024198304
},
{
"id"
:
4
,
"name"
:
"积分商城"
,
"type"
:
2
,
"environment"
:
1
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
null
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demobda1276c04d14273ba89acdc97a53c23.jpg"
,
"describe"
:
"积分商城"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1636024229683
},
{
"id"
:
9
,
"name"
:
"瓴犀建材商城APP"
,
"type"
:
1
,
"environment"
:
4
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/瓴犀 正方形圆角logo63ffadde28f54a2f8929e49e9a558ded.png"
,
"describe"
:
"B端建材商城APP"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1636685121120
},
{
"id"
:
11
,
"name"
:
"APP积分商城"
,
"type"
:
2
,
"environment"
:
4
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
null
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo41a2ce2470714109a9b78353c648c722.jpg"
,
"describe"
:
"APP积分商城"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1636685442585
},
{
"id"
:
12
,
"name"
:
"小程序积分商城"
,
"type"
:
2
,
"environment"
:
3
,
"property"
:
3
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
null
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo8fadccdf7ccb45ecb864c102d10aba57.jpg"
,
"describe"
:
"小程序积分商城"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1636685475000
},
{
"id"
:
14
,
"name"
:
"瓴犀B2C商城"
,
"type"
:
1
,
"environment"
:
3
,
"property"
:
2
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demoe3b123fa3406402f8e98ec97ea994bad.jpg"
,
"describe"
:
"C端联营商城小程序"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1637139438058
},
{
"id"
:
15
,
"name"
:
"瓴犀商城"
,
"type"
:
1
,
"environment"
:
3
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo7d4955a7c31044adb186d81717a18352.jpg"
,
"describe"
:
"小程序B端联营商城-建材"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1637337210138
},
{
"id"
:
16
,
"name"
:
"B2C综合商城"
,
"type"
:
1
,
"environment"
:
1
,
"property"
:
2
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x48a963f082b9a245ab8d8eb0a1d1b42505.png"
,
"describe"
:
"B2C综合商城"
,
"state"
:
1
,
"url"
:
"lingxi-bc-open"
,
"isDefault"
:
0
,
"createTime"
:
1638856144596
},
{
"id"
:
17
,
"name"
:
"APP (B2C综合商城)"
,
"type"
:
1
,
"environment"
:
4
,
"property"
:
2
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demoecfc5f7bc1584926a5886bec072827e8.jpg"
,
"describe"
:
"APP (B2C综合商城)"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
1
,
"createTime"
:
1638861020341
},
{
"id"
:
18
,
"name"
:
"B2C综合商城"
,
"type"
:
1
,
"environment"
:
3
,
"property"
:
2
,
"self"
:
0
,
"memberOperate"
:
1
,
"openMro"
:
0
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/瓴犀 正方形圆角logo2bc418c1767f407681c9cb4078809346.png"
,
"describe"
:
"小程序 (B2C综合商城)"
,
"state"
:
1
,
"url"
:
"/"
,
"isDefault"
:
0
,
"createTime"
:
1638931914330
},
{
"id"
:
27
,
"name"
:
"B2B电子元器件商城"
,
"type"
:
1
,
"environment"
:
1
,
"property"
:
1
,
"self"
:
0
,
"memberOperate"
:
0
,
"openMro"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/瓴犀logo-美政2ffc50291c8e465791b691c1983ac1af.png"
,
"describe"
:
"电子元器件MRO联营商城"
,
"state"
:
1
,
"url"
:
"lingxi-mro"
,
"isDefault"
:
0
,
"createTime"
:
1647833903391
}]
const
CommonCheckboxDrawer
=
(
props
:
CommonCheckboxDrawerType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onOk
,
fieldCode
,
selectCache
,
dataSource
,
fetchApi
,
fetchParams
=
{},
title
,
idKey
=
'id'
,
labelKey
=
'name'
,
disabled
}
=
props
const
[
list
,
setList
]
=
useState
<
any
[]
>
([])
...
...
@@ -85,7 +85,7 @@ const CommonCheckboxDrawer = (props: CommonCheckboxDrawerType, ref) => {
onCancel=
{
(
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
isValuesChangeRef
.
current
=
false
fnClose
()
...
...
@@ -106,7 +106,7 @@ const CommonCheckboxDrawer = (props: CommonCheckboxDrawerType, ref) => {
}
}
checked=
{
checkAll
}
>
全部
{
intl
.
formatMessage
({
id
:
'common.text.all'
,
defaultMessage
:
'全部'
})
}
</
Checkbox
>
<
div
className=
{
styles
[
'box'
]
}
>
{
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonCheckboxSelect/index.tsx
View file @
a3fb7d42
...
...
@@ -8,6 +8,7 @@ import CommonCheckboxDrawer, { CommonCheckboxDrawerType } from '../CommonCheckbo
import
{
Select_Content_Type
,
REQ_FUNDS_TYPE
}
from
'../constant'
import
WrapSelect
from
'../WrapSelect'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
useIntl
}
from
'umi'
export
type
fetchCheckboxParamsType
=
{
[
Select_Content_Type
.
SelectSourceMall
]?:
Object
,
...
...
@@ -32,6 +33,7 @@ interface PropsType {
}
const
CommonCheckboxSelect
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onChange
,
value
,
fieldCode
=
'id'
,
onValueChange
,
selectType
,
disabled
,
fetchParams
=
{},
...
rest
}
=
props
const
[
selectData
,
setSelectData
]
=
useState
<
any
[]
>
([])
// const [fetchParams, setFetchParams] = useState<fetchCheckboxParamsType>({})
...
...
@@ -77,10 +79,10 @@ const CommonCheckboxSelect = (props: PropsType, ref) => {
case
Select_Content_Type
.
SelectSourceMall
:
drawerProps
.
fetchApi
=
postManageWebShopWebAllShop
drawerProps
.
fetchParams
=
{
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
,
...(
fetchParams
[
selectType
]
||
{})
}
drawerProps
.
title
=
'选择来源商城'
drawerProps
.
title
=
`
${
intl
.
formatMessage
({
id
:
'common.button.select'
,
defaultMessage
:
'选择'
})}${
intl
.
formatMessage
({
id
:
'processRuleSetting.laiyuanshangcheng'
,
defaultMessage
:
'来源商城'
})}
`
break
case
Select_Content_Type
.
SelectReqFundsType
:
drawerProps
.
title
=
'选择请款类型'
drawerProps
.
title
=
`
${
intl
.
formatMessage
({
id
:
'common.button.select'
,
defaultMessage
:
'选择'
})}${
intl
.
formatMessage
({
id
:
'processRuleSetting.qingkuanleixing'
,
defaultMessage
:
'请款类型'
})}
`
drawerProps
.
dataSource
=
REQ_FUNDS_TYPE
break
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonTableDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -8,6 +8,7 @@ import { ColumnType } from 'antd/lib/table'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
,
IFormEffect
,
ISchema
,
ISchemaFormActions
,
ISchemaFormAsyncActions
}
from
'@formily/antd'
import
CommonDrawer
,
{
HandleType
}
from
'@/components/CommonDrawer'
import
{
useIntl
}
from
'umi'
export
type
RefHandleType
=
{
show
:
(
flag
?:
boolean
,
params
?:
any
,
data
?:
any
)
=>
void
...
...
@@ -33,6 +34,7 @@ interface PropsType {
}
const
CommonTableDrawer
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
formActions
=
createFormActions
()
const
{
onOk
,
...
...
@@ -204,7 +206,7 @@ const CommonTableDrawer = (props: PropsType, ref) => {
onCancel=
{
(
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
isValuesChangeRef
.
current
=
false
fnClose
()
...
...
@@ -227,7 +229,7 @@ const CommonTableDrawer = (props: PropsType, ref) => {
</
Checkbox
>
</
div
>
<
Tabs
activeKey=
{
tabKey
}
onChange=
{
(
key
:
string
)
=>
{
setTabKey
(
key
)
}
}
>
<
Tabs
.
TabPane
tab=
'可选择'
key=
'1'
className=
'use-ant-pagination-mini'
>
<
Tabs
.
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'processRuleSetting.kexuanze'
,
defaultMessage
:
'可选择'
})
}
key=
'1'
className=
'use-ant-pagination-mini'
>
{
!
isQueryAll
&&
(
<
StandardTable
...
...
@@ -259,7 +261,7 @@ const CommonTableDrawer = (props: PropsType, ref) => {
)
}
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
{
`
已选择
(${selectedRows.length})`
}
key=
'2'
>
<
Tabs
.
TabPane
tab=
{
`
${intl.formatMessage({ id: 'processRuleSetting.yixuanze', defaultMessage: '已选择' })}
(${selectedRows.length})`
}
key=
'2'
>
<
Table
rowKey=
{
rowKey
}
dataSource=
{
selectedRows
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonTableSelect/index.tsx
View file @
a3fb7d42
...
...
@@ -11,6 +11,7 @@ import TableGoodsDrawer from '../TableGoodsDrawer'
import
TableSupplierDrawer
from
'../TableSupplierDrawer'
import
TableContractDrawer
from
'../TableContractDrawer'
import
TableCustomerDrawer
from
'../TableCustomerDrawer'
import
{
useIntl
}
from
'umi'
export
type
fetchTableParamsType
=
{
[
Select_Content_Type
.
SelectMaterial
]?:
Object
,
...
...
@@ -45,6 +46,7 @@ interface PropsType {
}
const
CommonTableSelect
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onChange
,
value
,
onQueryAll
,
onValueChange
,
isAll
,
disabled
,
selectType
,
isSomeQueryAll
,
fetchParams
=
{},
...
rest
}
=
props
const
[
selectData
,
setSelectData
]
=
useState
<
any
[]
>
([])
const
[
isQueryAll
,
setIsQueryAll
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -130,9 +132,9 @@ const CommonTableSelect = (props: PropsType, ref) => {
onItemDelete=
{
onItemDelete
}
data=
{
selectData
}
labelKey=
'value'
placeholder=
{
isQueryAll
?
'全部'
:
'请选择'
}
placeholder=
{
isQueryAll
?
intl
.
formatMessage
({
id
:
'common.text.all'
,
defaultMessage
:
'全部'
})
:
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
})
}
disabled=
{
disabled
}
tips=
{
isSomeQueryAll
?
'已存在相关字段选择了全部'
:
''
}
tips=
{
isSomeQueryAll
?
intl
.
formatMessage
({
id
:
'processRuleSetting.selectAllTips'
,
defaultMessage
:
'已存在相关字段选择了全部'
})
:
''
}
showCount=
{
5
}
/>
{
getTableDrawer
()
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonTreeDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -4,6 +4,7 @@
import
React
,
{
useRef
,
useState
,
useCallback
,
forwardRef
,
memo
,
useEffect
,
useImperativeHandle
}
from
'react'
import
{
Modal
,
Tree
}
from
'antd'
import
CommonDrawer
from
'@/components/CommonDrawer'
import
{
useIntl
}
from
'umi'
interface
PropsType
{
onOk
?:
(
values
:
any
)
=>
void
...
...
@@ -17,6 +18,7 @@ interface PropsType {
}
const
CommonTreeDrawer
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onOk
,
fieldCode
,
selectCache
,
fetchApi
,
fetchParams
=
{},
title
,
treeKey
=
'id'
,
disabled
}
=
props
const
[
tree
,
setTree
]
=
useState
<
any
[]
>
([])
...
...
@@ -91,7 +93,7 @@ const CommonTreeDrawer = (props: PropsType, ref) => {
onCancel=
{
(
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
isValuesChangeRef
.
current
=
false
fnClose
()
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/CommonTreeSelect/index.tsx
View file @
a3fb7d42
...
...
@@ -7,6 +7,7 @@ import { isJSONString } from '@/utils'
import
CommonTreeDrawer
from
'../CommonTreeDrawer'
import
{
Select_Content_Type
}
from
'../constant'
import
WrapSelect
from
'../WrapSelect'
import
{
useIntl
}
from
'umi'
export
type
fetchTreeParamsType
=
{
[
Select_Content_Type
.
SelectCategory
]?:
Object
,
...
...
@@ -29,6 +30,7 @@ interface PropsType {
}
const
CommonTreeSelect
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onChange
,
value
,
fieldCode
=
'title'
,
onValueChange
,
selectType
,
disabled
,
fetchParams
=
{},
...
rest
}
=
props
const
[
selectData
,
setSelectData
]
=
useState
<
any
[]
>
([])
// const [fetchParams, setFetchParams] = useState<fetchTreeParamsType>({})
...
...
@@ -72,17 +74,15 @@ const CommonTreeSelect = (props: PropsType, ref) => {
disabled
,
...
rest
}
console
.
log
(
'drawerProps'
,
drawerProps
)
switch
(
selectType
)
{
case
Select_Content_Type
.
SelectCategory
:
// drawerProps.fetchParams = fetchParams[selectType]
drawerProps
.
fetchApi
=
getProductCustomerGetCustomerCategoryTree
drawerProps
.
title
=
'选择品类'
drawerProps
.
title
=
`
${
intl
.
formatMessage
({
id
:
'common.button.select'
,
defaultMessage
:
'选择'
})}${
intl
.
formatMessage
({
id
:
'processRuleSetting.pinlei'
,
defaultMessage
:
'品类'
})}
`
break
}
return
<
CommonTreeDrawer
{
...
drawerProps
}
/>
}
console
.
log
(
'disabled'
,
disabled
)
return
(
<>
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/ProcessRules/index.less
View file @
a3fb7d42
...
...
@@ -76,6 +76,7 @@
justify-content: center;
width: 32px;
height: 32px;
margin-left: 16px;
background-color: #F4F5F7;
border: 1px solid #F5F6F7;
border-radius: 4px;
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/ProcessRules/index.tsx
View file @
a3fb7d42
...
...
@@ -17,6 +17,7 @@ import CommonTableSelect, { fetchTableParamsType } from '../CommonTableSelect'
import
CommonTreeSelect
,
{
fetchTreeParamsType
}
from
'../CommonTreeSelect'
import
CommonCheckboxSelect
,
{
fetchCheckboxParamsType
}
from
'../CommonCheckboxSelect'
import
{
getRuleEngineProcessEngineGetProcessEngineInfo
}
from
'@/services/RuleEngineV2Api'
import
{
useIntl
}
from
'umi'
type
PropsType
=
{
form
?:
FormInstance
...
...
@@ -47,6 +48,7 @@ const getKey = (code: string, ruleFieldKey: string, fieldFieldKey: string) => {
}
const
ProcessRules
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
form
,
fetchFieldsTypeApi
=
getRuleEngineProcessEngineGetProcessEngineInfo
,
...
...
@@ -219,7 +221,7 @@ const ProcessRules = (props: PropsType, ref) => {
onClick=
{
()
=>
onRuleWrap
(
ruleField
.
key
)
}
>
<
CaretRightFilled
rotate=
{
!
ruleShowConfig
[
ruleField
.
key
]
?
90
:
0
}
style=
{
{
fontSize
:
12
}
}
/>
{
`
流程规则
${ruleIndex + 1}`
}
{
`
${intl.formatMessage({ id: 'processRuleSetting.liuchengguize', defaultMessage: '流程规则' })}
${ruleIndex + 1}`
}
<
div
className=
{
styles
[
'rule-delete'
]
}
...
...
@@ -243,7 +245,7 @@ const ProcessRules = (props: PropsType, ref) => {
}
)
}
}
title=
'删除'
title=
{
intl
.
formatMessage
({
id
:
'common.button.delete'
,
defaultMessage
:
'删除'
})
}
>
<
DeleteOutlined
/>
</
div
>
...
...
@@ -263,7 +265,7 @@ const ProcessRules = (props: PropsType, ref) => {
<
div
className=
{
styles
[
'fields'
]
}
>
{
fields
.
map
((
field
:
any
,
index
)
=>
(
<
div
key=
{
field
.
key
}
>
<
ConfigFieldCard
title=
{
`
条件
${index + 1}`
}
>
<
ConfigFieldCard
title=
{
`
${intl.formatMessage({ id: 'processRuleSetting.condition', defaultMessage: '条件' })}
${index + 1}`
}
>
<
Form
.
Item
name=
{
[
field
.
name
,
"id"
]
}
fieldKey=
{
[
field
.
fieldKey
,
"id"
]
}
...
...
@@ -290,7 +292,7 @@ const ProcessRules = (props: PropsType, ref) => {
<
Form
.
Item
name=
{
[
field
.
name
,
"code"
]
}
fieldKey=
{
[
field
.
fieldKey
,
"code"
]
}
rules=
{
[{
required
:
!
disabled
,
message
:
'请选择'
}]
}
rules=
{
[{
required
:
!
disabled
,
message
:
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
})
}]
}
>
<
CustomLastSelect
disabled=
{
disabled
}
...
...
@@ -319,7 +321,7 @@ const ProcessRules = (props: PropsType, ref) => {
<
Form
.
Item
name=
{
[
field
.
name
,
"condition"
]
}
fieldKey=
{
[
field
.
fieldKey
,
"condition"
]
}
rules=
{
[{
required
:
!
disabled
,
message
:
'请选择'
}]
}
rules=
{
[{
required
:
!
disabled
,
message
:
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
})
}]
}
>
<
Select
disabled=
{
disabled
}
options=
{
conditionOptions
[
type
]
}
/>
</
Form
.
Item
>
...
...
@@ -329,7 +331,7 @@ const ProcessRules = (props: PropsType, ref) => {
</
Col
>
<
Col
style=
{
{
flex
:
1
}
}
>
<
Row
>
<
Col
style=
{
{
flex
:
1
,
marginRight
:
16
}
}
>
<
Col
style=
{
{
flex
:
1
}
}
>
<
Form
.
Item
noStyle
shouldUpdate=
{
true
}
>
{
/* <Form.Item noStyle shouldUpdate={(prevValues, currentValues) => {
return prevValues.engineRuleList?.[ruleIndex]?.ruleFieldList?.[index]?.type !== currentValues.engineRuleList?.[ruleIndex]?.ruleFieldList?.[index]?.type
...
...
@@ -344,13 +346,13 @@ const ProcessRules = (props: PropsType, ref) => {
<
Form
.
Item
name=
{
[
field
.
name
,
"value"
]
}
fieldKey=
{
[
field
.
fieldKey
,
"value"
]
}
rules=
{
[{
required
:
!
disabled
,
message
:
'此项为必填项'
}]
}
rules=
{
[{
required
:
!
disabled
,
message
:
intl
.
formatMessage
({
id
:
'common.bitian'
,
defaultMessage
:
'该字段是必填字段'
})
}]
}
>
{
fieldsTypeItem
?.
type
===
Fields_Type
.
NUMBER
?
// 字段类型为数字
<
Input
maxLength=
{
10
}
disabled=
{
disabled
}
type=
'number'
placeholder=
"请输入"
/>
<
Input
maxLength=
{
10
}
disabled=
{
disabled
}
type=
'number'
placeholder=
{
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
,
defaultMessage
:
'请输入'
})
}
/>
:
fieldsTypeItem
?.
type
===
Fields_Type
.
DATE
?
// 字段类型为日期
<
StringDatePicker
disabled=
{
disabled
}
style=
{
{
width
:
'100%'
}
}
placeholder=
"请选择"
/>
<
StringDatePicker
disabled=
{
disabled
}
style=
{
{
width
:
'100%'
}
}
placeholder=
{
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
})
}
/>
:
fieldsTypeItem
?.
type
===
Fields_Type
.
STRING
&&
fieldsTypeItem
?.
select_content
?
// 字段类型为字符且存在选择弹窗
(
condition
===
CONDITION_VALUE
.
EQUAL
||
condition
===
CONDITION_VALUE
.
UNEQUAL
?
// 条件为是或不是的情况才显示弹窗
...
...
@@ -404,11 +406,11 @@ const ProcessRules = (props: PropsType, ref) => {
<
Input
maxLength=
{
200
}
disabled=
{
inputDisabled
||
disabled
}
placeholder=
{
inputDisabled
?
'已存在相关字段选择了全部'
:
'请输入'
}
placeholder=
{
inputDisabled
?
intl
.
formatMessage
({
id
:
'processRuleSetting.selectAllTips'
,
defaultMessage
:
'已存在相关字段选择了全部'
})
:
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
,
defaultMessage
:
'请输入'
})
}
/>
)
:
// 目前仅有字符/数字/日期三种类型 所以这里是字符+无弹窗的情况
<
Input
maxLength=
{
200
}
disabled=
{
disabled
}
placeholder=
"请输入"
/>
<
Input
maxLength=
{
200
}
disabled=
{
disabled
}
placeholder=
{
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
,
defaultMessage
:
'请输入'
})
}
/>
}
</
Form
.
Item
>
)
...
...
@@ -453,7 +455,7 @@ const ProcessRules = (props: PropsType, ref) => {
}
}
style=
{
{
width
:
"100%"
}
}
>
<
PlusOutlined
/>
添加字段
<
PlusOutlined
/>
{
intl
.
formatMessage
({
id
:
'processRuleSetting.tianjiaziduan'
,
defaultMessage
:
'添加字段'
})
}
</
Button
>
</
Form
.
Item
>
)
...
...
@@ -462,7 +464,7 @@ const ProcessRules = (props: PropsType, ref) => {
)
}
}
</
Form
.
List
>
<
ConfigFieldCard
title=
'相互关系'
>
<
ConfigFieldCard
title=
{
intl
.
formatMessage
({
id
:
'processRuleSetting.xianghuguanxi'
,
defaultMessage
:
'相互关系'
})
}
>
<
Form
.
Item
name=
{
[
ruleField
.
name
,
"relation"
]
}
fieldKey=
{
[
ruleField
.
fieldKey
,
"relation"
]
}
...
...
@@ -487,7 +489,7 @@ const ProcessRules = (props: PropsType, ref) => {
onClick=
{
()
=>
{
ruleAdd
({
relation
:
interrelationOptions
[
0
].
value
})
}
}
>
添加规则
{
intl
.
formatMessage
({
id
:
'processRuleSetting.tianjiaguize'
,
defaultMessage
:
'添加规则'
})
}
</
Button
>
</
Form
.
Item
>
</
div
>
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableContractDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -5,8 +5,7 @@ import { ColumnType } from 'antd/lib/table'
import
React
,
{
memo
,
forwardRef
}
from
'react'
import
CommonTableDrawer
from
'../CommonTableDrawer'
import
{
schema
}
from
'./schema'
import
{
fetchBrand
,
fetchCategoryData
,
fetchTreeData
,
useAsyncCascader
}
from
'../effects'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
getIntl
}
from
'umi'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
Cascader
}
from
'antd'
...
...
@@ -19,13 +18,15 @@ interface PropsType {
otherParams
?:
Object
}
const
intl
=
getIntl
()
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'合同编号'
,
dataIndex
:
'contractNo'
,
key
:
'contractNo'
},
{
title
:
'合同摘要'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
250
},
{
title
:
'合同生效时间'
,
dataIndex
:
'startTime'
,
key
:
'startTime'
},
{
title
:
'合同失效时间'
,
dataIndex
:
'endTime'
,
key
:
'endTime'
},
{
title
:
'合同乙方'
,
dataIndex
:
'partyBName'
,
key
:
'partyBName'
},
{
title
:
'合同金额'
,
dataIndex
:
'totalAmount'
,
key
:
'totalAmount'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongbianhao'
,
defaultMessage
:
'合同编号'
})
,
dataIndex
:
'contractNo'
,
key
:
'contractNo'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongzhaiyao'
,
defaultMessage
:
'合同摘要'
})
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
250
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongshengxiaoshijian'
,
defaultMessage
:
'合同生效时间'
})
,
dataIndex
:
'startTime'
,
key
:
'startTime'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongshixiaoshijian'
,
defaultMessage
:
'合同失效时间'
})
,
dataIndex
:
'endTime'
,
key
:
'endTime'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongyifang'
,
defaultMessage
:
'合同乙方'
})
,
dataIndex
:
'partyBName'
,
key
:
'partyBName'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongjine'
,
defaultMessage
:
'合同金额'
})
,
dataIndex
:
'totalAmount'
,
key
:
'totalAmount'
},
]
const
TableMaterialDrawer
=
({
handleOk
,
onQueryAll
,
otherParams
=
{},
...
rest
}:
PropsType
,
ref
)
=>
{
...
...
@@ -33,8 +34,8 @@ const TableMaterialDrawer = ({ handleOk, onQueryAll, otherParams = {}, ...rest }
return
(
<
CommonTableDrawer
ref=
{
ref
}
title=
'选择合同'
queryAllLabel=
'全部合同'
title=
{
intl
.
formatMessage
({
id
:
'contract.select'
,
defaultMessage
:
'选择合同'
})
}
queryAllLabel=
{
intl
.
formatMessage
({
id
:
'contract.all'
,
defaultMessage
:
'全部合同'
})
}
onOk=
{
handleOk
}
onQueryAll=
{
onQueryAll
}
tableColumns=
{
tableColumns
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableContractDrawer/schema/index.tsx
View file @
a3fb7d42
...
...
@@ -4,51 +4,6 @@ import { getIntl } from 'umi'
const
intl
=
getIntl
()
// export const schema: ISchema = {
// type: 'object',
// properties: {
// contractNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: intl.formatMessage({id: 'contract.qingshuruhetongbianhao', defaultMessage: '请输入合同编号'}),
// align: 'start',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginRight: 20
// }
// },
// properties: {
// contractAbstract: {
// type: 'string',
// "x-component-props": {
// placeholder: intl.formatMessage({id: 'contract.qingshuruhetongzhaiyao', defaultMessage: '请输入合同摘要' })
// }
// },
// "[startTime,endTime]": {
// type: 'array',
// "x-component": 'DateRangePickerUnix',
// 'x-component-props': {
// placeholder: [intl.formatMessage({id: 'contract.kaishishijian', defaultMessage: '开始时间'}), intl.formatMessage({id: 'contract.jieshushijian', defaultMessage: '结束时间'})],
// },
// },
// submit: {
// 'x-component': 'Submit',
// 'x-component-props': {
// children: intl.formatMessage({id: 'contract.chaxun', defaultMessage: '查询'}),
// },
// },
// },
// },
// }
// }
export
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -65,7 +20,7 @@ export const schema: ISchema = {
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'请输入合同编号'
placeholder
:
intl
.
formatMessage
({
id
:
'contract.qingshuruhetongbianhao'
,
defaultMessage
:
'请输入合同编号'
})
},
},
},
...
...
@@ -102,7 +57,7 @@ export const schema: ISchema = {
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
children
:
intl
.
formatMessage
({
id
:
'common.button.query'
,
defaultMessage
:
'查询'
})
,
},
},
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableCustomerDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -6,6 +6,7 @@ import React, { memo, forwardRef } from 'react'
import
CommonTableDrawer
from
'../CommonTableDrawer'
import
{
schema
}
from
'./schema'
import
{
getMemberManageProcessBuyerMember
}
from
'@/services/MemberV2Api'
import
{
getIntl
}
from
'umi'
interface
PropsType
{
handleOk
?:
(
data
:
any
)
=>
void
...
...
@@ -13,12 +14,14 @@ interface PropsType {
otherParams
?:
Object
}
const
intl
=
getIntl
()
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'客户ID'
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
'客户名称'
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
},
{
title
:
intl
.
formatMessage
({
id
:
'processRuleSetting.customerID'
,
defaultMessage
:
'客户ID'
})
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
intl
.
formatMessage
({
id
:
'processRuleSetting.customerName'
,
defaultMessage
:
'客户名称'
})
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.type'
,
defaultMessage
:
'会员类型'
})
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.role'
,
defaultMessage
:
'会员角色'
})
,
dataIndex
:
'roleName'
,
key
:
'roleName'
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.level'
,
defaultMessage
:
'会员等级'
})
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
},
]
const
TableMaterialDrawer
=
({
handleOk
,
onQueryAll
,
otherParams
=
{},
...
rest
}:
PropsType
,
ref
)
=>
{
...
...
@@ -26,8 +29,8 @@ const TableMaterialDrawer = ({ handleOk, onQueryAll, otherParams = {}, ...rest }
return
(
<
CommonTableDrawer
ref=
{
ref
}
title=
'选择客户'
queryAllLabel=
'全部客户'
title=
{
intl
.
formatMessage
({
id
:
'processRuleSetting.selectCustomer'
,
defaultMessage
:
'选择客户'
})
}
queryAllLabel=
{
intl
.
formatMessage
({
id
:
'processRuleSetting.allCustomer'
,
defaultMessage
:
'全部客户'
})
}
onOk=
{
handleOk
}
onQueryAll=
{
onQueryAll
}
tableColumns=
{
tableColumns
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableCustomerDrawer/schema/index.tsx
View file @
a3fb7d42
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
getIntl
}
from
'umi'
const
intl
=
getIntl
()
...
...
@@ -20,7 +19,7 @@ export const schema = {
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'客户名称'
,
placeholder
:
intl
.
formatMessage
({
id
:
'processRuleSetting.customerName'
,
defaultMessage
:
'客户名称'
})
,
advanced
:
false
},
},
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableGoodsDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -11,6 +11,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
Cascader
}
from
'antd'
import
{
getIntl
}
from
'umi'
interface
PropsType
{
handleOk
?:
(
data
:
any
)
=>
void
...
...
@@ -18,13 +19,15 @@ interface PropsType {
otherParams
?:
Object
}
const
intl
=
getIntl
()
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
'品类'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
},
{
title
:
'品牌'
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
},
{
title
:
'跨境电商进口'
,
dataIndex
:
'isCrossBorder'
,
key
:
'isCrossBorder'
,
render
:
(
t
)
=>
t
?
'是'
:
'否'
},
{
title
:
'商品定价'
,
dataIndex
:
'priceTypeName'
,
key
:
'priceTypeName'
},
{
title
:
intl
.
formatMessage
({
id
:
'commodity.products.fastModifyPrice.columns.id'
,
defaultMessage
:
'商品ID'
})
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
intl
.
formatMessage
({
id
:
'commodity.products.columns.name'
,
defaultMessage
:
'商品名称'
})
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
intl
.
formatMessage
({
id
:
'commodity.goods.columns.customerCategory'
,
defaultMessage
:
'品类'
})
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
},
{
title
:
intl
.
formatMessage
({
id
:
'commodity.goods.columns.brand'
,
defaultMessage
:
'品牌'
})
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
},
{
title
:
intl
.
formatMessage
({
id
:
'constants.order.13'
,
defaultMessage
:
'跨境电商进口'
}),
dataIndex
:
'isCrossBorder'
,
key
:
'isCrossBorder'
,
render
:
(
t
)
=>
t
?
intl
.
formatMessage
({
id
:
'processRuleSetting.shi'
,
defaultMessage
:
'是'
})
:
intl
.
formatMessage
({
id
:
'processRuleSetting.fou'
,
defaultMessage
:
'否'
})
},
{
title
:
intl
.
formatMessage
({
id
:
'commodity.products.fastModifyPrice.columns.priceType'
,
defaultMessage
:
'商品定价'
})
,
dataIndex
:
'priceTypeName'
,
key
:
'priceTypeName'
},
]
const
TableGoodsDrawer
=
({
handleOk
,
onQueryAll
,
otherParams
=
{},
...
rest
}:
PropsType
,
ref
)
=>
{
...
...
@@ -32,8 +35,8 @@ const TableGoodsDrawer = ({ handleOk, onQueryAll, otherParams = {}, ...rest }: P
return
(
<
CommonTableDrawer
ref=
{
ref
}
title=
'选择商品'
queryAllLabel=
'全部商品'
title=
{
intl
.
formatMessage
({
id
:
'commodity.products.addDirectChannel.tab.1'
,
defaultMessage
:
'选择商品'
})
}
queryAllLabel=
{
intl
.
formatMessage
({
id
:
'editor.bottom.link.type.commodity'
,
defaultMessage
:
'全部商品'
})
}
onOk=
{
handleOk
}
onQueryAll=
{
onQueryAll
}
tableColumns=
{
tableColumns
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableGoodsDrawer/schema/index.tsx
View file @
a3fb7d42
...
...
@@ -20,7 +20,7 @@ export const schema: ISchema = {
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'商品名称'
placeholder
:
intl
.
formatMessage
({
id
:
'commodity.products.columns.name'
,
defaultMessage
:
'商品名称'
})
},
},
},
...
...
@@ -61,7 +61,7 @@ export const schema: ISchema = {
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
children
:
intl
.
formatMessage
({
id
:
'common.button.query'
,
defaultMessage
:
'查询'
})
,
},
},
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableMaterialDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -11,6 +11,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
Cascader
}
from
'antd'
import
{
getIntl
}
from
'umi'
interface
PropsType
{
handleOk
?:
(
data
:
any
)
=>
void
...
...
@@ -18,14 +19,16 @@ interface PropsType {
otherParams
?:
Object
}
const
intl
=
getIntl
()
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
'物料编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
120
},
{
title
:
'物料名称'
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
'物料组'
,
dataIndex
:
[
'materialGroup'
,
'name'
],
key
:
'materialGroup'
},
{
title
:
'规格型号'
,
dataIndex
:
'type'
,
key
:
'type'
},
{
title
:
'品类'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
},
{
title
:
'品牌'
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.code'
,
defaultMessage
:
'物料编号'
})
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
120
},
{
title
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
})
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.group.title'
,
defaultMessage
:
'物料组'
})
,
dataIndex
:
[
'materialGroup'
,
'name'
],
key
:
'materialGroup'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
})
,
dataIndex
:
'type'
,
key
:
'type'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.category'
,
defaultMessage
:
'品类'
})
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.brand'
,
defaultMessage
:
'品牌'
})
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
},
]
const
TableMaterialDrawer
=
({
handleOk
,
onQueryAll
,
otherParams
=
{},
...
rest
}:
PropsType
,
ref
)
=>
{
...
...
@@ -33,8 +36,8 @@ const TableMaterialDrawer = ({ handleOk, onQueryAll, otherParams = {}, ...rest }
return
(
<
CommonTableDrawer
ref=
{
ref
}
title=
'选择物料'
queryAllLabel=
'全部物料'
title=
{
intl
.
formatMessage
({
id
:
'material.modal.selectMaterial.title'
,
defaultMessage
:
'选择物料'
})
}
queryAllLabel=
{
intl
.
formatMessage
({
id
:
'material.all'
,
defaultMessage
:
'全部物料'
})
}
onOk=
{
handleOk
}
onQueryAll=
{
onQueryAll
}
tableColumns=
{
tableColumns
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableMaterialDrawer/schema/index.tsx
View file @
a3fb7d42
...
...
@@ -23,7 +23,7 @@ export const schema: ISchema = {
'x-component'
:
'Search'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'物料编号'
placeholder
:
intl
.
formatMessage
({
id
:
'material.code'
,
defaultMessage
:
'物料编号'
})
},
},
},
...
...
@@ -44,13 +44,13 @@ export const schema: ISchema = {
type
:
'string'
,
'x-component-props'
:
{
allowClear
:
true
,
placeholder
:
'物料名称'
placeholder
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
})
}
},
type
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'规格型号'
placeholder
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
})
}
},
materialGroupId
:
{
...
...
@@ -91,7 +91,7 @@ export const schema: ISchema = {
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
children
:
intl
.
formatMessage
({
id
:
'common.button.query'
,
defaultMessage
:
'查询'
})
,
},
},
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableSupplierDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -6,6 +6,7 @@ import React, { memo, forwardRef } from 'react'
import
CommonTableDrawer
from
'../CommonTableDrawer'
import
{
schema
}
from
'./schema'
import
{
postMemberManageLowerProviderPage
}
from
'@/services/MemberV2Api'
import
{
getIntl
}
from
'umi'
interface
PropsType
{
handleOk
?:
(
data
:
any
)
=>
void
...
...
@@ -13,9 +14,11 @@ interface PropsType {
otherParams
?:
Object
}
const
intl
=
getIntl
()
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'供应商ID'
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
'供应商名称'
,
dataIndex
:
'name'
,
key
:
'name'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.supplier.id'
,
defaultMessage
:
'供应商ID'
})
,
dataIndex
:
'id'
,
key
:
'id'
},
{
title
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
})
,
dataIndex
:
'name'
,
key
:
'name'
},
]
const
TableSupplierDrawer
=
({
handleOk
,
onQueryAll
,
otherParams
=
{},
...
rest
}:
PropsType
,
ref
)
=>
{
...
...
@@ -23,8 +26,8 @@ const TableSupplierDrawer = ({ handleOk, onQueryAll, otherParams = {}, ...rest }
return
(
<
CommonTableDrawer
ref=
{
ref
}
title=
'选择供应商'
queryAllLabel=
'全部供应商'
title=
{
intl
.
formatMessage
({
id
:
'material.select.supplier.modal.title'
,
defaultMessage
:
'选择供应商'
})
}
queryAllLabel=
{
intl
.
formatMessage
({
id
:
'material.supplier.all'
,
defaultMessage
:
'全部供应商'
})
}
onOk=
{
handleOk
}
onQueryAll=
{
onQueryAll
}
tableColumns=
{
tableColumns
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/TableSupplierDrawer/schema/index.tsx
View file @
a3fb7d42
...
...
@@ -20,7 +20,7 @@ export const schema = {
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'供应商名称'
,
placeholder
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
})
,
advanced
:
false
},
},
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/WrapSelect/index.tsx
View file @
a3fb7d42
...
...
@@ -3,6 +3,7 @@ import styles from './index.less'
import
{
LinkOutlined
,
CloseOutlined
}
from
'@ant-design/icons'
import
cs
from
'classnames'
import
{
Tooltip
}
from
'antd'
import
{
useIntl
}
from
'umi'
interface
PropsType
{
onIconClick
?:
(
isSeeMore
?:
boolean
)
=>
void
...
...
@@ -18,7 +19,19 @@ interface PropsType {
}
const
WrapSelect
=
(
props
:
PropsType
)
=>
{
const
{
onIconClick
,
onItemClick
,
onItemDelete
,
data
=
[],
labelKey
=
'name'
,
valueKey
=
'id'
,
placeholder
=
'请选择'
,
disabled
,
tips
,
showCount
=
3
}
=
props
const
intl
=
useIntl
()
const
{
onIconClick
,
onItemClick
,
onItemDelete
,
data
=
[],
labelKey
=
'name'
,
valueKey
=
'id'
,
placeholder
=
intl
.
formatMessage
({
id
:
'common.select'
,
defaultMessage
:
'请选择'
}),
disabled
,
tips
,
showCount
=
3
}
=
props
return
(
<
div
className=
{
styles
[
'wrap-select'
]
}
>
...
...
@@ -49,7 +62,7 @@ const WrapSelect = (props: PropsType) => {
{
data
.
length
>
showCount
&&
(
<
div
className=
{
styles
[
'content-item'
]
}
onClick=
{
()
=>
{
onIconClick
?.(
true
)
}
}
>
更多
(
{
data
.
length
-
showCount
}
)
{
intl
.
formatMessage
({
id
:
'common.text.more'
,
defaultMessage
:
'更多'
})
}
(
{
data
.
length
-
showCount
}
)
</
div
>
)
}
...
...
src/pages/systemSetting/processEng/components/ProcessRuleConfig/constant/index.ts
View file @
a3fb7d42
...
...
@@ -50,10 +50,10 @@ export enum CONDITION_VALUE {
export
const
conditionOptions
=
{
[
Fields_Type
.
STRING
]:
[
{
label
:
'是'
,
value
:
CONDITION_VALUE
.
EQUAL
},
{
label
:
'不是'
,
value
:
CONDITION_VALUE
.
UNEQUAL
},
{
label
:
'包含'
,
value
:
CONDITION_VALUE
.
INCLUDED
},
{
label
:
'不包含'
,
value
:
CONDITION_VALUE
.
NOT_INCLUDED
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.is'
,
defaultMessage
:
'是'
})
,
value
:
CONDITION_VALUE
.
EQUAL
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.isnot'
,
defaultMessage
:
'不是'
})
,
value
:
CONDITION_VALUE
.
UNEQUAL
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.baohan'
,
defaultMessage
:
'包含'
})
,
value
:
CONDITION_VALUE
.
INCLUDED
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.bubaohan'
,
defaultMessage
:
'不包含'
})
,
value
:
CONDITION_VALUE
.
NOT_INCLUDED
},
],
[
Fields_Type
.
NUMBER
]:
[
{
label
:
'>'
,
value
:
CONDITION_VALUE
.
GREATER_THAN
},
...
...
@@ -64,16 +64,16 @@ export const conditionOptions = {
{
label
:
'!='
,
value
:
CONDITION_VALUE
.
UNEQUAL
},
],
[
Fields_Type
.
DATE
]:
[
{
label
:
'是'
,
value
:
CONDITION_VALUE
.
EQUAL
},
{
label
:
'不是'
,
value
:
CONDITION_VALUE
.
UNEQUAL
},
{
label
:
'在之前'
,
value
:
CONDITION_VALUE
.
LESS_THAN
},
{
label
:
'在之后'
,
value
:
CONDITION_VALUE
.
GREATER_THAN
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.is'
,
defaultMessage
:
'是'
})
,
value
:
CONDITION_VALUE
.
EQUAL
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.isnot'
,
defaultMessage
:
'不是'
})
,
value
:
CONDITION_VALUE
.
UNEQUAL
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.zaizhiqian'
,
defaultMessage
:
'在之前'
})
,
value
:
CONDITION_VALUE
.
LESS_THAN
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.zaizhihou'
,
defaultMessage
:
'在之后'
})
,
value
:
CONDITION_VALUE
.
GREATER_THAN
},
]
}
export
const
interrelationOptions
=
[
{
label
:
'并且'
,
value
:
1
},
{
label
:
'或者'
,
value
:
2
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.and'
,
defaultMessage
:
'并且'
})
,
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'processRuleSetting.or'
,
defaultMessage
:
'或者'
})
,
value
:
2
},
]
export
enum
RULE_TYPE
{
...
...
src/pages/systemSetting/processEng/purchaseB2BProcess/components/AddEditContent/index.tsx
View file @
a3fb7d42
...
...
@@ -3,10 +3,10 @@
* @author: Crayon
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
,
getIntl
}
from
'umi'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
Form
}
from
'antd'
import
{
commonProgressProps
}
from
'../../../constants'
import
{
commonProgressProps
,
commonTabLink
}
from
'../../../constants'
import
ProcessImage
from
'../../../components/ProcessImage'
import
ProcessRules
from
'../../../components/ProcessRuleConfig/ProcessRules'
import
ContentLayout
from
'@/components/ContentLayout'
...
...
@@ -26,18 +26,18 @@ type PropsType = {
title
?:
string
|
React
.
ReactNode
}
const
intl
=
getIntl
()
const
BaseTabLink
=
[
{
key
:
'processBase'
,
name
:
"基本信息"
},
{
key
:
'processSelect'
,
name
:
"流程选择"
},
{
key
:
'processImage'
,
name
:
"流程图示"
},
{
key
:
'processInfo'
,
name
:
"流程信息"
},
{
key
:
'payConfig'
,
name
:
"支付配置"
},
{
key
:
'processRule'
,
name
:
"流程规则"
},
...
commonTabLink
.
slice
(
0
,
3
),
{
key
:
'processInfo'
,
name
:
intl
.
formatMessage
({
id
:
'processRuleSetting.liuchengxinxi'
,
defaultMessage
:
'流程信息'
})
},
{
key
:
'payConfig'
,
name
:
intl
.
formatMessage
({
id
:
'processRuleSetting.zhifupeizhi'
,
defaultMessage
:
'支付配置'
})
},
{
key
:
'processRule'
,
name
:
intl
.
formatMessage
({
id
:
'processRuleSetting.liuchengguize'
,
defaultMessage
:
'流程规则'
})
},
]
const
getTabLink
=
(
processBaseItem
:
any
,
isDefault
:
boolean
)
=>
{
if
(
isDefault
)
return
BaseTabLink
.
slice
(
0
,
5
)
const
newBaseTabLink
=
processBaseItem
.
payTimes
>
0
?
BaseTabLink
:
BaseTabLink
.
filter
(
i
=>
i
.
key
!==
'payConfig'
)
let
newBaseTabLink
=
isDefault
?
BaseTabLink
.
slice
(
0
,
5
)
:
BaseTabLink
newBaseTabLink
=
processBaseItem
.
payTimes
>
0
?
newBaseTabLink
:
new
BaseTabLink
.
filter
(
i
=>
i
.
key
!==
'payConfig'
)
return
processBaseItem
.
processType
===
1
?
newBaseTabLink
:
newBaseTabLink
.
filter
(
i
=>
i
.
key
!==
'processInfo'
)
}
...
...
src/pages/systemSetting/ruleEng/ruleEngConfig/components/CategoryDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -2,6 +2,7 @@ import React, { useRef, useState, useCallback, forwardRef, memo, useEffect, useI
import
{
Modal
,
Tree
}
from
'antd'
import
CommonDrawer
from
'@/components/CommonDrawer'
import
{
getProductCustomerGetCustomerCategoryTree
}
from
'@/services/ProductV2Api'
import
{
useIntl
}
from
'umi'
interface
PropsType
{
onOk
?:
(
values
:
any
)
=>
void
...
...
@@ -10,6 +11,7 @@ interface PropsType {
}
const
CategoryDrawer
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
{
onOk
,
fieldCode
,
selectCache
}
=
props
const
[
categoryTree
,
setCategoryTree
]
=
useState
<
any
[]
>
([])
...
...
@@ -83,7 +85,7 @@ const CategoryDrawer = (props: PropsType, ref) => {
onCancel=
{
(
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
isValuesChangeRef
.
current
=
false
fnClose
()
...
...
src/pages/systemSetting/ruleEng/ruleEngConfig/components/ConfigDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -3,12 +3,14 @@ import { Form, Modal } from 'antd'
import
CommonDrawer
from
'@/components/CommonDrawer'
import
ProcessRules
from
'../ProcessRules'
import
{
getRuleEngineProcessRuleConfigGetProcessRuleConfig
,
postRuleEngineConfigBatchSaveOrUpdate
}
from
'@/services/RuleEngineV2Api'
import
{
useIntl
}
from
'umi'
interface
PropsType
{
onChange
?:
()
=>
void
}
const
ConfigDrawer
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
[
form
]
=
Form
.
useForm
()
const
{
onChange
}
=
props
...
...
@@ -64,7 +66,7 @@ const ConfigDrawer = (props: PropsType, ref) => {
const
handleCancel
=
useCallback
((
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
processRulesRef
.
current
?.
resetCache
()
isValuesChangeRef
.
current
=
false
...
...
src/pages/systemSetting/ruleEng/ruleEngConfig/components/MaterialDrawer/index.tsx
View file @
a3fb7d42
...
...
@@ -11,6 +11,7 @@ import CommonDrawer, { HandleType } from '@/components/CommonDrawer'
import
{
getProductGoodsGetDoesNotFreezeGoodsList
}
from
'@/services/ProductV2Api'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
fetchBrand
,
fetchCategoryData
,
fetchTreeData
,
useAsyncCascader
}
from
'../../effects'
import
{
useIntl
}
from
'umi'
export
type
RefHandleType
=
{
show
:
(
flag
?:
boolean
,
params
?:
any
,
data
?:
any
)
=>
void
...
...
@@ -26,6 +27,7 @@ interface PropsType {
}
const
MaterialDrawer
=
(
props
:
PropsType
,
ref
)
=>
{
const
intl
=
useIntl
()
const
formActions
=
createFormActions
()
const
{
onOk
,
onQueryAll
,
fieldCode
=
'code'
,
fieldLabel
,
selectCache
}
=
props
...
...
@@ -162,7 +164,7 @@ const MaterialDrawer = (props: PropsType, ref) => {
onCancel=
{
(
fnClose
)
=>
{
if
(
isValuesChangeRef
.
current
)
{
Modal
.
confirm
({
content
:
'您还有未保存的内容,是否确定要关闭?'
,
content
:
intl
.
formatMessage
({
id
:
'common.close.tips'
,
defaultMessage
:
'您还有未保存的内容,是否确定要关闭?'
})
,
onOk
:
()
=>
{
isValuesChangeRef
.
current
=
false
fnClose
()
...
...
src/pages/systemSetting/ruleEng/ruleEngConfig/components/WrapSelect/index.tsx
View file @
a3fb7d42
...
...
@@ -59,7 +59,6 @@ const WrapSelect = (props: PropsType) => {
</
Tooltip
>
</
div
>
</
div
>
)
}
...
...
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