Commit 3f159a67 authored by 前端-许冠华's avatar 前端-许冠华

Merge branch 'feat-220518' into 'v2-220518'

完善0518接口接入需求 See merge request linkseeks-design/pro-platform!578
parents da750a59 f2fbe908
import React, { MutableRefObject, useImperativeHandle } from 'react';
import { getIntl } from 'umi';
import { Modal, Form, Radio, Input, ModalProps } from 'antd';
import { validatorByte } from '@/utils/regExp';
interface ModuleAuditProps {
formref?: MutableRefObject<any>,
modalTypes: ModalProps,
}
const ModuleAudit: React.FC<ModuleAuditProps> = (props: any) => {
const intl = getIntl();
const { formref, modalTypes } = props
const [form] = Form.useForm();
useImperativeHandle(formref, () => ({
formref: () => form
}))
return (
<Modal
{...modalTypes}
>
<Form form={form} layout='vertical'>
<Form.Item name='state' initialValue={1}>
<Radio.Group>
<Radio value={1}>{intl.formatMessage({ id: 'components.shenhetongguo', defaultMessage: '审核通过' })}</Radio>
<Radio value={0}>{intl.formatMessage({ id: 'components.shenhebutongguo', defaultMessage: '审核不通过' })}</Radio>
</Radio.Group>
</Form.Item>
<Form.Item
noStyle
shouldUpdate={(prevValues, curValues) => prevValues.state !== curValues.state}
>
{({ getFieldValue }) => {
form.resetFields(['auditOpinion'])
return (getFieldValue('state') === 1 || getFieldValue('state') === 0) ? (
<Form.Item
name='auditOpinion'
label={getFieldValue('state') === 1 ? intl.formatMessage({ id: 'contract.shenhetongguoyuanyin', defaultMessage: '审核通过原因' }) : intl.formatMessage({ id: 'transaction_components.shenhebutongguoyuanyin', defaultMessage: '审核不通过原因' })}
rules={[
{ required: getFieldValue('state') === 0 ? true : false, message: intl.formatMessage({ id: 'transaction_components.qingshurushenhebutongguo', defaultMessage: '请输入审核不通过原因' }) },
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 120) }
]}
>
<Input.TextArea rows={3} placeholder={intl.formatMessage({ id: 'componnets.maxTextLength', defaultMessage: '在此输入您的原因, 最长{char}个字符,{hanzi}个汉字' }, { hanzi: 60, char: 120 })} />
</Form.Item>
) : null
}}
</Form.Item>
</Form>
</Modal >
)
}
export default ModuleAudit
...@@ -884,4 +884,8 @@ export default { ...@@ -884,4 +884,8 @@ export default {
'balance.platformSettlement.columns.payTime': 'payTime', 'balance.platformSettlement.columns.payTime': 'payTime',
'balance.platformSettlement.columns.settlementName': 'settlementName', 'balance.platformSettlement.columns.settlementName': 'settlementName',
'balance.memberSettle.settleMethod.payDay.default': 'Payment date: payment date is not set. It is the settlement date by default', 'balance.memberSettle.settleMethod.payDay.default': 'Payment date: payment date is not set. It is the settlement date by default',
'balance.createTimeStart': 'createTimeStart',
'balance.createTimeEnd': 'createTimeEnd',
'balance.expectPayTimeStart': 'expectPayTimeStart',
'balance.expectPayTimeEnd': 'expectPayTimeEnd',
} }
...@@ -144,5 +144,6 @@ ...@@ -144,5 +144,6 @@
'common.content': `Your company has participated in our 《{data}》 bidding. 'common.content': `Your company has participated in our 《{data}》 bidding.
After synthesizing the basic situation of each bidder and conducting full technical exchanges, your company failed to win the bid after the comprehensive evaluation by the bid evaluation committee. After synthesizing the basic situation of each bidder and conducting full technical exchanges, your company failed to win the bid after the comprehensive evaluation by the bid evaluation committee.
Our company is very grateful for your active participation and support. Our company is very grateful for your active participation and support.
I hope the cooperation will be successful next time.` I hope the cooperation will be successful next time.`,
'common.maxTextnumberLength': 'The longest is {char} characters, {hanzi} Chinese characters',
} }
This diff is collapsed.
...@@ -87,4 +87,26 @@ export default { ...@@ -87,4 +87,26 @@ export default {
'coupon.quanma': 'coupon code', 'coupon.quanma': 'coupon code',
'coupon.shiyongshangcheng': 'Applicable mall', 'coupon.shiyongshangcheng': 'Applicable mall',
'coupon.mandatayuankeyong': 'Full{data}meta available', 'coupon.mandatayuankeyong': 'Full{data}meta available',
'process.processId': 'processId',
'process.processIdruleName': 'processIdruleName',
'process.processName': 'processName',
'process.createTime': 'createTime',
'process.status': 'status',
'process.operation': 'operation',
'process.infointegrity': 'completeness of information',
'process.processIdRule': 'Process rules',
'process.processIdSelect': 'Process selection',
'process.requestType': 'Request type',
'process.baseProcessIdmessage': 'Please select a process',
'process.save': 'save',
'process.order1': 'material statement',
'process.order2': 'Purchase Inquiry Contract',
'process.order3': 'Procurement Tender Contract',
'process.order4': 'Purchase Auction Contract',
'process.order5': 'purchase requisition contract',
'process.order6': 'purchase requisition',
'process.processSuitableType': 'Please select a request type',
'process.namelabel': 'Process rule name',
'process.namemessage': 'Please enter a process rule name',
} }
...@@ -884,5 +884,8 @@ export default { ...@@ -884,5 +884,8 @@ export default {
'balance.platformSettlement.columns.payTime': '실제 지불 시간', 'balance.platformSettlement.columns.payTime': '실제 지불 시간',
'balance.platformSettlement.columns.settlementName': '결제자', 'balance.platformSettlement.columns.settlementName': '결제자',
'balance.memberSettle.settleMethod.payDay.default': '결제일: 결제일은 설정되지 않으며 기본적으로 결제일', 'balance.memberSettle.settleMethod.payDay.default': '결제일: 결제일은 설정되지 않으며 기본적으로 결제일',
'balance.createTimeStart': '문서 시작 시간',
'balance.createTimeEnd': '문서 종료 시간',
'balance.expectPayTimeStart': '예상 지급 시작일',
'balance.expectPayTimeEnd': '예상 지급 종료일',
} }
...@@ -144,5 +144,6 @@ export default { ...@@ -144,5 +144,6 @@ export default {
'common.content': `귀사는 우리 회사의 《{data}》 입찰에 참여했습니다. 'common.content': `귀사는 우리 회사의 《{data}》 입찰에 참여했습니다.
우리 회사는 각 입찰 단위의 기본 상황을 종합하고 충분한 기술 교류를 한 후 평표 위원회가 종합적으로 평가한 결과 귀사가 낙찰을 받지 못했다. 우리 회사는 각 입찰 단위의 기본 상황을 종합하고 충분한 기술 교류를 한 후 평표 위원회가 종합적으로 평가한 결과 귀사가 낙찰을 받지 못했다.
저희 회사는 귀사의 적극적인 참여와 성원에 깊은 감사를 드립니다! 저희 회사는 귀사의 적극적인 참여와 성원에 깊은 감사를 드립니다!
다음 번 협력이 성공하기를 바랍니다.` 다음 번 협력이 성공하기를 바랍니다.`,
'common.maxTextnumberLength': '가장 긴 것은 {char}자, {hanzi}자입니다.',
} }
...@@ -272,5 +272,6 @@ export default { ...@@ -272,5 +272,6 @@ export default {
'components.tableResetTip': '초기화', 'components.tableResetTip': '초기화',
'components.tableFilterTip': '고급 심사', 'components.tableFilterTip': '고급 심사',
'components.xuanzezhidinghetong': '선택지정계약', 'components.xuanzezhidinghetong': '선택지정계약',
'componnets.standardTablePages': '총 {totalPage}' 'componnets.standardTablePages': '총 {totalPage}',
'componnets.maxTextLength': '여기에 이유를 입력하세요. 최대 {char}자,{hanzi}자',
} }
...@@ -85,4 +85,26 @@ export default { ...@@ -85,4 +85,26 @@ export default {
'coupon.quanma': '쿠폰 코드', 'coupon.quanma': '쿠폰 코드',
'coupon.shiyongshangcheng': '해당 쇼핑몰', 'coupon.shiyongshangcheng': '해당 쇼핑몰',
'coupon.mandatayuankeyong': '가득한{data}메타 사용 가능', 'coupon.mandatayuankeyong': '가득한{data}메타 사용 가능',
'process.processId': '프로세스 규칙 ID',
'process.processIdruleName': '프로세스 규칙 이름',
'process.processName': '프로세스 이름',
'process.createTime': '가동시간',
'process.status': '상태',
'process.operation': '작동하다',
'process.infointegrity': '정보의 완전성',
'process.processIdRule': '프로세스 규칙',
'process.processIdSelect': '프로세스 선택',
'process.requestType': '요청 유형',
'process.baseProcessIdmessage': '프로세스를 선택하십시오',
'process.save': '저장',
'process.order1': '중요한 진술',
'process.order2': '견적 계약 구매 요청',
'process.order3': '조달 입찰 계약',
'process.order4': '구매 경매 계약',
'process.order5': '구매 요청 계약',
'process.order6': '구매 요청',
'process.processSuitableType': '요청 유형을 선택하세요.',
'process.namelabel': '프로세스 규칙 이름',
'process.namemessage': '프로세스 규칙 이름을 입력하십시오.',
} }
...@@ -886,4 +886,8 @@ export default { ...@@ -886,4 +886,8 @@ export default {
'balance.platformSettlement.columns.payTime': '实际付款时间', 'balance.platformSettlement.columns.payTime': '实际付款时间',
'balance.platformSettlement.columns.settlementName': '结算方', 'balance.platformSettlement.columns.settlementName': '结算方',
'balance.memberSettle.settleMethod.payDay.default': '付款日:付款日未设置,默认为结算日', 'balance.memberSettle.settleMethod.payDay.default': '付款日:付款日未设置,默认为结算日',
'balance.createTimeStart': '单据开始时间',
'balance.createTimeEnd': '单据结束时间',
'balance.expectPayTimeStart': '预计付款开始日期',
'balance.expectPayTimeEnd': '预计付款结束日期',
} }
...@@ -142,5 +142,6 @@ export default { ...@@ -142,5 +142,6 @@ export default {
'common.letter1': '评标工作已经结束,中标人已经确定。现将中标结果公布如下', 'common.letter1': '评标工作已经结束,中标人已经确定。现将中标结果公布如下',
'common.letter2': '中标供应商', 'common.letter2': '中标供应商',
'common.letter3': '中标理由', 'common.letter3': '中标理由',
'common.content': '贵公司参与了我公司《{data}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。' 'common.content': '贵公司参与了我公司《{data}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。',
'common.maxTextnumberLength': '最长{char}个字符,{hanzi}个汉字',
} }
...@@ -272,5 +272,6 @@ export default { ...@@ -272,5 +272,6 @@ export default {
'components.tableResetTip': '重置', 'components.tableResetTip': '重置',
'components.tableFilterTip': '高级筛选', 'components.tableFilterTip': '高级筛选',
'components.xuanzezhidinghetong': '选择指定合同', 'components.xuanzezhidinghetong': '选择指定合同',
'componnets.standardTablePages': '共 {totalPage} 条' 'componnets.standardTablePages': '共 {totalPage} 条',
'componnets.maxTextLength': '在此输入您的原因, 最长{char}个字符,{hanzi}个汉字',
} }
...@@ -68,4 +68,4 @@ export default { ...@@ -68,4 +68,4 @@ export default {
"authConfig.lookUser": "查看用户", "authConfig.lookUser": "查看用户",
"authConfig.addUser": "新增用户", "authConfig.addUser": "新增用户",
"authConfig.editUser": "编辑用户" "authConfig.editUser": "编辑用户"
} }
\ No newline at end of file
...@@ -84,5 +84,27 @@ export default { ...@@ -84,5 +84,27 @@ export default {
'coupon.qushiyong': '去使用', 'coupon.qushiyong': '去使用',
'coupon.quanma': '券码', 'coupon.quanma': '券码',
'coupon.shiyongshangcheng': '适用商城', 'coupon.shiyongshangcheng': '适用商城',
'coupon.mandatayuankeyong': '满{data}元可用' 'coupon.mandatayuankeyong': '满{data}元可用',
'process.processId': '流程规则ID',
'process.processIdruleName': '流程规则名称',
'process.processName': '流程名称',
'process.createTime': '操作时间',
'process.status': '状态',
'process.operation': '操作',
'process.infointegrity': '信息完整度',
'process.processIdRule': '流程规则',
'process.processIdSelect': '流程选择',
'process.requestType': '请款类型',
'process.baseProcessIdmessage': '请选择流程',
'process.save': '保存',
'process.order1': '物料对账单',
'process.order2': '采购询价合同',
'process.order3': '采购招标合同',
'process.order4': '采购竞价合同',
'process.order5': '请购单合同',
'process.order6': '采购请购单',
'process.processSuitableType': '请选择请款类型',
'process.namelabel': '流程规则名称',
'process.namemessage': '请输入流程规则名称',
} }
...@@ -17,8 +17,10 @@ export const applyAbstract = { ...@@ -17,8 +17,10 @@ export const applyAbstract = {
/** 请款类型 */ /** 请款类型 */
export const applyType = { export const applyType = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyTypeName', defaultMessage: '请款类型' }), title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyTypeName', defaultMessage: '请款类型' }),
key: 'applyType', key: 'applyTypeName',
dataIndex: 'applyType', dataIndex: 'applyTypeName',
filters: [],
onFilter: (value, record) => record.applyTypeName.includes(value),
} }
/** 收款方 */ /** 收款方 */
...@@ -33,6 +35,9 @@ export const applyAmount = { ...@@ -33,6 +35,9 @@ export const applyAmount = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyAmount', defaultMessage: '请款金额' }), title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyAmount', defaultMessage: '请款金额' }),
key: 'applyAmount', key: 'applyAmount',
dataIndex: 'applyAmount', dataIndex: 'applyAmount',
showSorterTooltip: false,
sorter: (a, b) => a.applyAmount - b.applyAmount,
sortDirections: ['descend'],
} }
/** 预计付款日期 */ /** 预计付款日期 */
...@@ -40,6 +45,9 @@ export const expectPayTime = { ...@@ -40,6 +45,9 @@ export const expectPayTime = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.expectPayTime', defaultMessage: '预计付款日期' }), title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.expectPayTime', defaultMessage: '预计付款日期' }),
key: 'expectPayTime', key: 'expectPayTime',
dataIndex: 'expectPayTime', dataIndex: 'expectPayTime',
showSorterTooltip: false,
sorter: (a, b) => a.expectPayTime - b.expectPayTime,
sortDirections: ['descend'],
} }
/** 单据时间 */ /** 单据时间 */
...@@ -47,13 +55,18 @@ export const createTime = { ...@@ -47,13 +55,18 @@ export const createTime = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.columns.billTime', defaultMessage: '单据时间' }), title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.columns.billTime', defaultMessage: '单据时间' }),
key: 'createTime', key: 'createTime',
dataIndex: 'createTime', dataIndex: 'createTime',
showSorterTooltip: false,
sorter: (a, b) => a.createTime - b.createTime,
sortDirections: ['descend'],
} }
/** 内部状态 */ /** 内部状态 */
export const interiorStateName = { export const interiorStateName = {
title: getIntl().formatMessage({ id: 'components.neibuzhuangtai', defaultMessage: '内部状态' }), title: getIntl().formatMessage({ id: 'components.neibuzhuangtai', defaultMessage: '内部状态' }),
key: 'interiorStateName', key: 'statusName',
dataIndex: 'interiorStateName', dataIndex: 'statusName',
filters: [],
onFilter: (value, record) => record.statusName.includes(value),
} }
/** 操作 */ /** 操作 */
......
import React, { Fragment, useEffect, useState, useMemo, useRef } from 'react'; import React, { Fragment, useEffect, useState, useMemo, useRef } from 'react';
import { Button } from 'antd'; import { Button, message } from 'antd';
import { getIntl, history, Link } from 'umi'; import { getIntl, history, Link } from 'umi';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from '@linkseeks/god'; import { StandardTable } from '@linkseeks/god';
...@@ -12,10 +12,11 @@ import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/det ...@@ -12,10 +12,11 @@ import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/det
import Card from '@/pages/transaction/purchaseAbility/components/card'; import Card from '@/pages/transaction/purchaseAbility/components/card';
import CommonLayout from '@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout'; import CommonLayout from '@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout';
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList, postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos } from '@/services/SettleV2Api' import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList, postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos, postSettleAccountsBusinessApplyAmountApplyAmountExamine1, postSettleAccountsBusinessApplyAmountGoodsExamine2, postSettleAccountsBusinessApplyAmountGoodsExamine3 } from '@/services/SettleV2Api'
import WriteOffDrawer from '../../components/WriteOffDrawer' import WriteOffDrawer from '../../components/WriteOffDrawer'
import { CheckCircleOutlined } from '@ant-design/icons'; import { CheckCircleOutlined } from '@ant-design/icons';
import ModalAudit from '@/components/ModalAudit';
const intl = getIntl(); const intl = getIntl();
const TABLINK = [ const TABLINK = [
...@@ -31,6 +32,7 @@ const SearchDetail = () => { ...@@ -31,6 +32,7 @@ const SearchDetail = () => {
}, },
pathname, pathname,
} = history.location; } = history.location;
const ref = useRef<any>({})
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]); const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]); const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [writeOffVisible, setWriteOffVisible] = useState<any>(false); const [writeOffVisible, setWriteOffVisible] = useState<any>(false);
...@@ -38,6 +40,8 @@ const SearchDetail = () => { ...@@ -38,6 +40,8 @@ const SearchDetail = () => {
const currentRef = useRef({}); const currentRef = useRef({});
const [basicEffect, setBasicEffect] = useState<any>([]); const [basicEffect, setBasicEffect] = useState<any>([]);
const [writeOffRecord, setWriteOffRecord] = useState<any>({}); const [writeOffRecord, setWriteOffRecord] = useState<any>({});
const [visible, setVisible] = useState<boolean>(false);
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const _tabs = useMemo(() => { const _tabs = useMemo(() => {
let _list = []; let _list = [];
...@@ -231,6 +235,35 @@ const SearchDetail = () => { ...@@ -231,6 +235,35 @@ const SearchDetail = () => {
return data return data
} }
/** 单据审核 */
const handleSubmit = () => {
let fetchApi = null;
switch (pathPci) {
case 'one':
fetchApi = postSettleAccountsBusinessApplyAmountApplyAmountExamine1
break;
case 'two':
fetchApi = postSettleAccountsBusinessApplyAmountGoodsExamine2
break;
default:
fetchApi = postSettleAccountsBusinessApplyAmountGoodsExamine3
break;
}
setConfirmLoading(true)
ref.current.formref().validateFields().then(values => {
fetchApi({ ...values, id }).then(res => {
if (res.code !== 1000) {
message.error(res.message);
setConfirmLoading(false)
return
}
setVisible(false)
setConfirmLoading(false)
history.goBack();
})
})
}
return ( return (
<> <>
<PeripheralLayout <PeripheralLayout
...@@ -241,7 +274,7 @@ const SearchDetail = () => { ...@@ -241,7 +274,7 @@ const SearchDetail = () => {
<> <>
{path === 'detail' {path === 'detail'
&& ( && (
<Button icon={<CheckCircleOutlined />} type='primary'>{intl.formatMessage({ id: 'dealAbility.danjushenhe', defaultMessage: '单据审核' })}</Button> <Button onClick={() => setVisible(true)} icon={<CheckCircleOutlined />} type='primary'>{intl.formatMessage({ id: 'dealAbility.danjushenhe', defaultMessage: '单据审核' })}</Button>
)} )}
</> </>
} }
...@@ -261,6 +294,17 @@ const SearchDetail = () => { ...@@ -261,6 +294,17 @@ const SearchDetail = () => {
} }
/> />
<WriteOffDrawer visible={writeOffVisible} record={writeOffRecord} onClose={() => { setWriteOffVisible(false) }} /> <WriteOffDrawer visible={writeOffVisible} record={writeOffRecord} onClose={() => { setWriteOffVisible(false) }} />
<ModalAudit
formref={ref}
modalTypes={{
title: intl.formatMessage({ id: 'dealAbility.danjushenhe', defaultMessage: '单据审核' }),
visible: visible,
destroyOnClose: true,
onOk: () => handleSubmit(),
onCancel: () => setVisible(false),
confirmLoading: confirmLoading
}}
/>
</> </>
) )
} }
......
...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl'; ...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns'; import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma'; import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine1List } from '@/services/SettleV2Api';
const intl = getIntl(); const intl = getIntl();
const One = () => { const One = () => {
...@@ -16,25 +17,10 @@ const One = () => { ...@@ -16,25 +17,10 @@ const One = () => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
} }
const mock = [
{
id: 1,
applyNo: 'QPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
applyType: '询价采购',
payee: '广州麦多食品有限公司',
applyAmount: '10,000.00',
expectPayTime: 1650614083779,
createTime: 1650614111890,
interiorStateName: '待审核请款单(一级)',
interiorState: 1,
}
]
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...applyNo, ...applyNo,
render: (_text) => <a href='#'>{_text}</a> render: (_text, record) => <a href={`/memberCenter/balance/businessRequestFunds/one/preview?id=${record.id}&no=${record.applyNo}`}>{_text}</a>
}, },
{ {
...applyAbstract ...applyAbstract
...@@ -47,7 +33,7 @@ const One = () => { ...@@ -47,7 +33,7 @@ const One = () => {
}, },
{ {
...applyAmount, ...applyAmount,
render: (_text) => `¥${_text}`, render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
}, },
{ {
...expectPayTime, ...expectPayTime,
...@@ -59,11 +45,11 @@ const One = () => { ...@@ -59,11 +45,11 @@ const One = () => {
}, },
{ {
...interiorStateName, ...interiorStateName,
render: (_text, _record) => <Tag color={INTERNALSTATE_COLOR[_record.interiorState]}>{_text}</Tag> render: (_text, _record) => <Tag color={INTERNALSTATE_COLOR[_record.status]}>{_text}</Tag>
}, },
{ {
...operation, ...operation,
render: (_text, _record) => <Button type='link'>审核</Button>, render: (_text, record) => <Button type='link' href={`/memberCenter/balance/businessRequestFunds/one/detail?id=${record.id}&no=${record.applyNo}`}>{intl.formatMessage({id: 'dealAbility.shenhe', defaultMessage: '审核'})}</Button>,
}, },
] ]
...@@ -71,7 +57,7 @@ const One = () => { ...@@ -71,7 +57,7 @@ const One = () => {
<Table <Table
columns={columns} columns={columns}
effects="applyNo" effects="applyNo"
fetch={mock} fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine1List}
schema={schema} schema={schema}
/> />
) )
......
...@@ -57,18 +57,22 @@ export const schema: ISchema = { ...@@ -57,18 +57,22 @@ export const schema: ISchema = {
}, },
"[createTimeStart,createTimeEnd]": { "[createTimeStart,createTimeEnd]": {
type: "string", type: "string",
"x-component": "DateRangePickerUnix", "x-component": "daterange",
"x-component-props": { "x-component-props": {
placeholder: ['单据时间开始', '单据时间结束'], placeholder: [
fmt: 'YYYY-MM-DD' getIntl().formatMessage({ id: 'balance.createTimeStart', defaultMessage: '单据开始时间' }),
getIntl().formatMessage({ id: 'balance.createTimeEnd', defaultMessage: '单据结束时间' }),
],
} }
}, },
"[expectPayTimeStart,expectPayTimeEnd]": { "[expectPayTimeStart,expectPayTimeEnd]": {
type: "string", type: "string",
"x-component": "DateRangePickerUnix", "x-component": "daterange",
"x-component-props": { "x-component-props": {
placeholder: ['预计付款日期开始', '预计付款日期结束'], placeholder: [
fmt: 'YYYY-MM-DD HH:mm' getIntl().formatMessage({ id: 'balance.expectPayTimeStart', defaultMessage: '预计付款开始日期' }),
getIntl().formatMessage({ id: 'balance.expectPayTimeEnd', defaultMessage: '预计付款结束日期' }),
],
} }
}, },
} }
......
...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl'; ...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns'; import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma'; import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine3List } from '@/services/SettleV2Api';
const intl = getIntl(); const intl = getIntl();
const Submit = () => { const Submit = () => {
...@@ -16,25 +17,10 @@ const Submit = () => { ...@@ -16,25 +17,10 @@ const Submit = () => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
} }
const mock = [
{
id: 1,
applyNo: 'QPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
applyType: '询价采购',
payee: '广州麦多食品有限公司',
applyAmount: '10,000.00',
expectPayTime: 1650614083779,
createTime: 1650614111890,
interiorStateName: '待审核请款单(一级)',
interiorState: 1,
}
]
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...applyNo, ...applyNo,
render: (_text) => <a href='#'>{_text}</a> render: (_text, record) => <a href={`/memberCenter/balance/businessRequestFunds/submit/preview?id=${record.id}&no=${record.applyNo}`}>{_text}</a>
}, },
{ {
...applyAbstract ...applyAbstract
...@@ -47,7 +33,7 @@ const Submit = () => { ...@@ -47,7 +33,7 @@ const Submit = () => {
}, },
{ {
...applyAmount, ...applyAmount,
render: (_text) => `¥${_text}`, render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
}, },
{ {
...expectPayTime, ...expectPayTime,
...@@ -63,7 +49,7 @@ const Submit = () => { ...@@ -63,7 +49,7 @@ const Submit = () => {
}, },
{ {
...operation, ...operation,
render: (_text, _record) => <Button type='link'>审核</Button>, render: (_text, record) => <Button type='link' href={`/memberCenter/balance/businessRequestFunds/submit/detail?id=${record.id}&no=${record.applyNo}`}>{intl.formatMessage({id: 'balance.tijiao', defaultMessage: '提交'})}</Button>,
}, },
] ]
...@@ -71,7 +57,7 @@ const Submit = () => { ...@@ -71,7 +57,7 @@ const Submit = () => {
<Table <Table
columns={columns} columns={columns}
effects="applyNo" effects="applyNo"
fetch={mock} fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine3List}
schema={schema} schema={schema}
/> />
) )
......
...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl'; ...@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns'; import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma'; import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine2List } from '@/services/SettleV2Api';
const intl = getIntl(); const intl = getIntl();
const Two = () => { const Two = () => {
...@@ -16,25 +17,10 @@ const Two = () => { ...@@ -16,25 +17,10 @@ const Two = () => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
} }
const mock = [
{
id: 1,
applyNo: 'QPTY12',
applyAbstract: '进口头层黄牛皮荔枝纹',
applyType: '询价采购',
payee: '广州麦多食品有限公司',
applyAmount: '10,000.00',
expectPayTime: 1650614083779,
createTime: 1650614111890,
interiorStateName: '待审核请款单(一级)',
interiorState: 1,
}
]
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...applyNo, ...applyNo,
render: (_text) => <a href='#'>{_text}</a> render: (_text, record) => <a href={`/memberCenter/balance/businessRequestFunds/two/preview?id=${record.id}&no=${record.applyNo}`}>{_text}</a>
}, },
{ {
...applyAbstract ...applyAbstract
...@@ -47,7 +33,7 @@ const Two = () => { ...@@ -47,7 +33,7 @@ const Two = () => {
}, },
{ {
...applyAmount, ...applyAmount,
render: (_text) => `¥${_text}`, render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
}, },
{ {
...expectPayTime, ...expectPayTime,
...@@ -63,7 +49,7 @@ const Two = () => { ...@@ -63,7 +49,7 @@ const Two = () => {
}, },
{ {
...operation, ...operation,
render: (_text, _record) => <Button type='link'>审核</Button>, render: (_text, record) => <Button type='link' href={`/memberCenter/balance/businessRequestFunds/two/detail?id=${record.id}&no=${record.applyNo}`}>{intl.formatMessage({id: 'dealAbility.shenhe', defaultMessage: '审核'})}</Button>,
}, },
] ]
...@@ -71,7 +57,7 @@ const Two = () => { ...@@ -71,7 +57,7 @@ const Two = () => {
<Table <Table
columns={columns} columns={columns}
effects="applyNo" effects="applyNo"
fetch={mock} fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine2List}
schema={schema} schema={schema}
/> />
) )
......
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { getIntl } from 'umi';
/** 流程规则ID */ /** 流程规则ID */
export const id: ColumnType<any> = { export const id: ColumnType<any> = {
title: '流程规则ID', title: getIntl().formatMessage({ id: 'process.processId', defaultMessage: '流程规则ID' }),
key: 'processId', key: 'processId',
dataIndex: 'processId', dataIndex: 'processId',
} }
/** 流程规则名称 */ /** 流程规则名称 */
export const name: ColumnType<any> = { export const name: ColumnType<any> = {
title: '流程规则名称', title: getIntl().formatMessage({ id: 'process.processIdruleName', defaultMessage: '流程规则名称' }),
key: 'name', key: 'name',
dataIndex: 'name', dataIndex: 'name',
width: 160, width: 160,
...@@ -18,28 +19,28 @@ export const name: ColumnType<any> = { ...@@ -18,28 +19,28 @@ export const name: ColumnType<any> = {
/** 流程名称 */ /** 流程名称 */
export const processName: ColumnType<any> = { export const processName: ColumnType<any> = {
title: '流程名称', title: getIntl().formatMessage({ id: 'process.processName', defaultMessage: '流程名称' }),
key: 'processName', key: 'processName',
dataIndex: 'processName', dataIndex: 'processName',
} }
/** 操作时间 */ /** 操作时间 */
export const createTime: ColumnType<any> = { export const createTime: ColumnType<any> = {
title: '操作时间', title: getIntl().formatMessage({ id: 'process.createTime', defaultMessage: '操作时间' }),
key: 'createTime', key: 'createTime',
dataIndex: 'createTime', dataIndex: 'createTime',
} }
/** 状态 */ /** 状态 */
export const status: ColumnType<any> = { export const status: ColumnType<any> = {
title: '状态', title: getIntl().formatMessage({ id: 'process.status', defaultMessage: '状态' }),
key: 'status', key: 'status',
dataIndex: 'status', dataIndex: 'status',
} }
/** 操作 */ /** 操作 */
export const operation: ColumnType<any> = { export const operation: ColumnType<any> = {
title: '操作', title: getIntl().formatMessage({ id: 'process.operation', defaultMessage: '操作' }),
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
} }
...@@ -7,7 +7,7 @@ import ProcessSelectLayout from './components/processSelect'; ...@@ -7,7 +7,7 @@ import ProcessSelectLayout from './components/processSelect';
import InvoiceTypeLayout from './components/invoiceType'; import InvoiceTypeLayout from './components/invoiceType';
import { getColor } from '@/components/FormProgress'; import { getColor } from '@/components/FormProgress';
import { getSettleAccountsApplyAmountProcessGetInfo, postSettleAccountsApplyAmountProcessSave, postSettleAccountsApplyAmountProcessUpdate } from '@/services/SettleV2Api'; import { getSettleAccountsApplyAmountProcessGetInfo, postSettleAccountsApplyAmountProcessSave, postSettleAccountsApplyAmountProcessUpdate } from '@/services/SettleV2Api';
import { history } from 'umi'; import { history, getIntl } from 'umi';
export const layout: any = { export const layout: any = {
colon: false, colon: false,
...@@ -27,7 +27,8 @@ const progress = { ...@@ -27,7 +27,8 @@ const progress = {
fontWeight: 'normal', fontWeight: 'normal',
} }
const AddInvoiceProcessEng: React.FC<{}> = () => { const AddInvoiceProcessEng: React.FC<{}> = (props: any) => {
const intl = getIntl();
const [form] = Form.useForm(); const [form] = Form.useForm();
const { query: { processId }, pathname } = history.location; const { query: { processId }, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]); const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
...@@ -88,18 +89,18 @@ const AddInvoiceProcessEng: React.FC<{}> = () => { ...@@ -88,18 +89,18 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
<Fragment> <Fragment>
<PeripheralLayout <PeripheralLayout
hideBreak hideBreak
detail='新增请款单流程规则' detail={props?.route?.name}
no={ no={
<div <div
style={{ ...progress, backgroundColor: getColor(percent).bg, color: getColor(percent).text }} style={{ ...progress, backgroundColor: getColor(percent).bg, color: getColor(percent).text }}
> >
信息完整度 {percent.toFixed(0)}% {intl.formatMessage({id: 'process.infointegrity', defaultMessage: '信息完整度'})} {percent.toFixed(0)}%
</div> </div>
} }
tabLink={[ tabLink={[
{ title: '流程规则', id: 'processEng' }, { title: intl.formatMessage({id: 'process.processIdRule', defaultMessage: '流程规则'}), id: 'processEng' },
{ title: '流程选择', id: 'processSelect' }, { title: intl.formatMessage({id: 'process.processIdSelect', defaultMessage: '流程选择'}), id: 'processSelect' },
{ title: '请款类型', id: 'invoiceType' }, { title: intl.formatMessage({id: 'process.requestType', defaultMessage: '请款类型'}), id: 'invoiceType' },
]} ]}
effect={ effect={
<Button <Button
...@@ -108,7 +109,7 @@ const AddInvoiceProcessEng: React.FC<{}> = () => { ...@@ -108,7 +109,7 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
onClick={() => handleSubmit()} onClick={() => handleSubmit()}
loading={loading} loading={loading}
> >
保存 {intl.formatMessage({id: 'process.save', defaultMessage: '保存'})}
</Button> </Button>
} }
components={ components={
......
import React from 'react'; import React from 'react';
import { Form, Radio } from 'antd'; import { getIntl } from 'umi';
import { Form, Radio, Space } from 'antd';
import { FormInstance } from 'antd/es/form/Form'; import { FormInstance } from 'antd/es/form/Form';
import CardLayout from '../card'; import CardLayout from '../card';
import styles from './index.less'; import styles from './index.less';
...@@ -12,19 +13,20 @@ interface InvoiceTypeProps { ...@@ -12,19 +13,20 @@ interface InvoiceTypeProps {
const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => { const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
const { form, disabled } = props; const { form, disabled } = props;
const intl = getIntl();
const mock = [ const mock = [
{value: 1, label: '物料对账单'}, { value: 1, label: intl.formatMessage({ id: 'process.order1', defaultMessage: '物料对账单' }) },
{value: 9, label: '采购询价合同'}, { value: 9, label: intl.formatMessage({ id: 'process.order2', defaultMessage: '采购询价合同' }) },
{value: 11, label: '采购招标合同'}, { value: 11, label: intl.formatMessage({ id: 'process.order3', defaultMessage: '采购招标合同' }) },
{value: 10, label: '采购竞价合同'}, { value: 10, label: intl.formatMessage({ id: 'process.order4', defaultMessage: '采购竞价合同' }) },
{value: 12, label: '请购单合同'}, { value: 12, label: intl.formatMessage({ id: 'process.order5', defaultMessage: '请购单合同' }) },
{value: 14, label: '采购请购单'}, { value: 14, label: intl.formatMessage({ id: 'process.order6', defaultMessage: '采购请购单' }) },
] ]
return ( return (
<CardLayout <CardLayout
id="invoiceType" id="invoiceType"
title='请款类型' title={intl.formatMessage({ id: 'process.requestType', defaultMessage: '请款类型' })}
weight weight
bodyStyle={{ paddingBottom: '1px' }} bodyStyle={{ paddingBottom: '1px' }}
classNames={styles['invoice-type']} classNames={styles['invoice-type']}
...@@ -32,13 +34,15 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => { ...@@ -32,13 +34,15 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
<Form.Item <Form.Item
name='processSuitableType' name='processSuitableType'
rules={[ rules={[
{ required: true, message: '请选择请款类型' }, { required: true, message: intl.formatMessage({ id: 'process.processSuitableType', defaultMessage: '请选择请款类型' }) },
]} ]}
> >
<Radio.Group disabled={disabled}> <Radio.Group disabled={disabled}>
{mock.map(_item => ( <Space size={[8, 16]} wrap>
<Radio key={_item.value} value={_item.value}>{_item.label}</Radio> {mock?.map(_item => (
))} <Radio key={`data_${_item.value}`} value={_item.value}>{_item.label}</Radio>
))}
</Space>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</CardLayout> </CardLayout>
......
...@@ -3,6 +3,7 @@ import { Form, Row, Col, Input } from 'antd'; ...@@ -3,6 +3,7 @@ import { Form, Row, Col, Input } from 'antd';
import { FormInstance } from 'antd/es/form/Form'; import { FormInstance } from 'antd/es/form/Form';
import CardLayout from '../card'; import CardLayout from '../card';
import { validatorByte } from '@/utils/regExp'; import { validatorByte } from '@/utils/regExp';
import { getIntl } from 'umi';
interface ProcessEngProps { interface ProcessEngProps {
/** FormInstance */ /** FormInstance */
...@@ -12,25 +13,25 @@ interface ProcessEngProps { ...@@ -12,25 +13,25 @@ interface ProcessEngProps {
const ProcessEngLayout: React.FC<ProcessEngProps> = (props: any) => { const ProcessEngLayout: React.FC<ProcessEngProps> = (props: any) => {
const { form, disabled } = props; const { form, disabled } = props;
const intl = getIntl();
return ( return (
<CardLayout <CardLayout
id="processEng" id="processEng"
title='流程规则' title={intl.formatMessage({id: 'process.processIdRule', defaultMessage: '流程规则' })}
weight weight
bodyStyle={{ paddingBottom: '0px' }} bodyStyle={{ paddingBottom: '0px' }}
> >
<Row gutter={[24, 24]}> <Row gutter={[24, 24]}>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
label='流程规则名称' label={intl.formatMessage({id: 'process.namelabel', defaultMessage: '流程规则名称'})}
name='name' name='name'
rules={[ rules={[
{ required: true, message: '请输入流程规则名称' }, { required: true, message: intl.formatMessage({id: 'process.namemessage', defaultMessage: '请输入流程规则名称' })},
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 48) } { validator: (rule, value, callback) => validatorByte(rule, value, callback, 48) }
]} ]}
> >
<Input placeholder='最长48个字符,24个汉字' disabled={disabled} /> <Input placeholder={intl.formatMessage({id: 'common.maxTextnumberLength', defaultMessage: '最长{char}个字符,{hanzi}个汉字' }, { char: 48, hanzi: 24 })} disabled={disabled} />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
......
...@@ -5,6 +5,7 @@ import CardLayout from '../card'; ...@@ -5,6 +5,7 @@ import CardLayout from '../card';
import styles from './index.less'; import styles from './index.less';
import { getSettleAccountsApplyAmountProcessBaseList, GetSettleAccountsApplyAmountProcessBaseListResponse } from '@/services/SettleV2Api'; import { getSettleAccountsApplyAmountProcessBaseList, GetSettleAccountsApplyAmountProcessBaseListResponse } from '@/services/SettleV2Api';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { getIntl } from 'umi';
interface ProcessSelectProps { interface ProcessSelectProps {
/** FormInstance */ /** FormInstance */
...@@ -16,6 +17,7 @@ interface ProcessSelectProps { ...@@ -16,6 +17,7 @@ interface ProcessSelectProps {
const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => { const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
const { form, onFieldsChange, disabled } = props; const { form, onFieldsChange, disabled } = props;
const [dataSource, setDataSource] = useState<GetSettleAccountsApplyAmountProcessBaseListResponse>([]) const [dataSource, setDataSource] = useState<GetSettleAccountsApplyAmountProcessBaseListResponse>([])
const intl = getIntl();
useEffect(() => { useEffect(() => {
getSettleAccountsApplyAmountProcessBaseList().then(res => { getSettleAccountsApplyAmountProcessBaseList().then(res => {
...@@ -31,7 +33,7 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => { ...@@ -31,7 +33,7 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
return ( return (
<CardLayout <CardLayout
id="processSelect" id="processSelect"
title='流程选择' title={intl.formatMessage({id: 'process.processIdSelect', defaultMessage: '流程选择' })}
weight weight
bodyStyle={{ paddingBottom: '1px' }} bodyStyle={{ paddingBottom: '1px' }}
classNames={styles['select-box']} classNames={styles['select-box']}
...@@ -41,12 +43,12 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => { ...@@ -41,12 +43,12 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
<Form.Item <Form.Item
name='baseProcessId' name='baseProcessId'
rules={[ rules={[
{ required: true, message: '请选择流程' }, { required: true, message: intl.formatMessage({id: 'process.baseProcessIdmessage', defaultMessage: '请选择流程' }) },
]} ]}
> >
<Radio.Group disabled={disabled}> <Radio.Group disabled={disabled}>
{dataSource.map(_item => ( {dataSource?.map((_item, index) => (
<Radio key={_item.baseProcessId} value={_item.baseProcessId}> <Radio key={`data${_item.baseProcessId * index}`} value={_item.baseProcessId}>
<div className={styles['box']}> <div className={styles['box']}>
<div className={styles['box-clerk']}> <div className={styles['box-clerk']}>
<div className={styles['box-clerk-name']}>{_item.processName}</div> <div className={styles['box-clerk-name']}>{_item.processName}</div>
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { history, Link } from 'umi'; import { history, Link, getIntl } from 'umi';
import { Button, message, Popconfirm, Switch } from 'antd'; import { Button, message, Popconfirm, Switch } from 'antd';
import moment from 'moment'; import moment from 'moment';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
...@@ -10,6 +10,7 @@ import { createTime, id, name, operation, processName, status } from '../../colu ...@@ -10,6 +10,7 @@ import { createTime, id, name, operation, processName, status } from '../../colu
import AuthButton from '@/components/AuthButton'; import AuthButton from '@/components/AuthButton';
const InvoiceProcessEng: React.FC<{}> = () => { const InvoiceProcessEng: React.FC<{}> = () => {
const intl = getIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const format = (text, fmt?: string) => { const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
...@@ -66,11 +67,11 @@ const InvoiceProcessEng: React.FC<{}> = () => { ...@@ -66,11 +67,11 @@ const InvoiceProcessEng: React.FC<{}> = () => {
{ !!!record.status && { !!!record.status &&
<> <>
<AuthButton btnCode='invoiceProcessEng.edit' > <AuthButton btnCode='invoiceProcessEng.edit' >
<Button type='link' href={`/memberCenter/systemSetting/processManagement/invoiceProcessEng/edit?processId=${record.processId}`} >编辑</Button> <Button type='link' href={`/memberCenter/systemSetting/processManagement/invoiceProcessEng/edit?processId=${record.processId}`}>{intl.formatMessage({ id: 'balance.bianji', defaultMessage: '编辑' })}</Button>
</AuthButton> </AuthButton>
<AuthButton btnCode='invoiceProcessEng.del' > <AuthButton btnCode='invoiceProcessEng.del' >
<Popconfirm okButtonProps={{ loading: deleteLoading }} title='确定删除么?' okText='是' cancelText='否' onConfirm={() => fetchDeleteBatch(record.processId)}> <Popconfirm okButtonProps={{ loading: deleteLoading }} title={intl.formatMessage({ id: 'authConfig.confirmDelete', defaultMessage: '确定删除么?' })} okText={intl.formatMessage({ id: 'balance.shi', defaultMessage: '是' })} cancelText={intl.formatMessage({ id: 'balance.fou', defaultMessage: '否' })} onConfirm={() => fetchDeleteBatch(record.processId)}>
<Button type='link'>删除</Button> <Button type='link'>{intl.formatMessage({ id: 'authConfig.delete', defaultMessage: '删除' })}</Button>
</Popconfirm> </Popconfirm>
</AuthButton> </AuthButton>
</> </>
...@@ -105,7 +106,7 @@ const InvoiceProcessEng: React.FC<{}> = () => { ...@@ -105,7 +106,7 @@ const InvoiceProcessEng: React.FC<{}> = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '流程规则名称', placeholder: intl.formatMessage({ id: 'process.processIdruleName', defaultMessage: '流程规则名称' }),
advanced: false advanced: false
}, },
}, },
...@@ -113,7 +114,7 @@ const InvoiceProcessEng: React.FC<{}> = () => { ...@@ -113,7 +114,7 @@ const InvoiceProcessEng: React.FC<{}> = () => {
} }
} }
}} }}
controllerBtns={<Button type='primary' icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/systemSetting/processManagement/invoiceProcessEng/add')}>新增</Button>} controllerBtns={<Button type='primary' icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/systemSetting/processManagement/invoiceProcessEng/add')}>{intl.formatMessage({id: 'authConfig.add', defaultMessage: '新增'})}</Button>}
/> />
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment