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 {
'balance.platformSettlement.columns.payTime': 'payTime',
'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.createTimeStart': 'createTimeStart',
'balance.createTimeEnd': 'createTimeEnd',
'balance.expectPayTimeStart': 'expectPayTimeStart',
'balance.expectPayTimeEnd': 'expectPayTimeEnd',
}
......@@ -144,5 +144,6 @@
'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.
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 {
'coupon.quanma': 'coupon code',
'coupon.shiyongshangcheng': 'Applicable mall',
'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 {
'balance.platformSettlement.columns.payTime': '실제 지불 시간',
'balance.platformSettlement.columns.settlementName': '결제자',
'balance.memberSettle.settleMethod.payDay.default': '결제일: 결제일은 설정되지 않으며 기본적으로 결제일',
'balance.createTimeStart': '문서 시작 시간',
'balance.createTimeEnd': '문서 종료 시간',
'balance.expectPayTimeStart': '예상 지급 시작일',
'balance.expectPayTimeEnd': '예상 지급 종료일',
}
......@@ -144,5 +144,6 @@ export default {
'common.content': `귀사는 우리 회사의 《{data}》 입찰에 참여했습니다.
우리 회사는 각 입찰 단위의 기본 상황을 종합하고 충분한 기술 교류를 한 후 평표 위원회가 종합적으로 평가한 결과 귀사가 낙찰을 받지 못했다.
저희 회사는 귀사의 적극적인 참여와 성원에 깊은 감사를 드립니다!
다음 번 협력이 성공하기를 바랍니다.`
다음 번 협력이 성공하기를 바랍니다.`,
'common.maxTextnumberLength': '가장 긴 것은 {char}자, {hanzi}자입니다.',
}
......@@ -272,5 +272,6 @@ export default {
'components.tableResetTip': '초기화',
'components.tableFilterTip': '고급 심사',
'components.xuanzezhidinghetong': '선택지정계약',
'componnets.standardTablePages': '총 {totalPage}'
'componnets.standardTablePages': '총 {totalPage}',
'componnets.maxTextLength': '여기에 이유를 입력하세요. 최대 {char}자,{hanzi}자',
}
......@@ -85,4 +85,26 @@ export default {
'coupon.quanma': '쿠폰 코드',
'coupon.shiyongshangcheng': '해당 쇼핑몰',
'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 {
'balance.platformSettlement.columns.payTime': '实际付款时间',
'balance.platformSettlement.columns.settlementName': '结算方',
'balance.memberSettle.settleMethod.payDay.default': '付款日:付款日未设置,默认为结算日',
'balance.createTimeStart': '单据开始时间',
'balance.createTimeEnd': '单据结束时间',
'balance.expectPayTimeStart': '预计付款开始日期',
'balance.expectPayTimeEnd': '预计付款结束日期',
}
......@@ -142,5 +142,6 @@ export default {
'common.letter1': '评标工作已经结束,中标人已经确定。现将中标结果公布如下',
'common.letter2': '中标供应商',
'common.letter3': '中标理由',
'common.content': '贵公司参与了我公司《{data}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。'
'common.content': '贵公司参与了我公司《{data}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。',
'common.maxTextnumberLength': '最长{char}个字符,{hanzi}个汉字',
}
......@@ -272,5 +272,6 @@ export default {
'components.tableResetTip': '重置',
'components.tableFilterTip': '高级筛选',
'components.xuanzezhidinghetong': '选择指定合同',
'componnets.standardTablePages': '共 {totalPage} 条'
'componnets.standardTablePages': '共 {totalPage} 条',
'componnets.maxTextLength': '在此输入您的原因, 最长{char}个字符,{hanzi}个汉字',
}
......@@ -68,4 +68,4 @@ export default {
"authConfig.lookUser": "查看用户",
"authConfig.addUser": "新增用户",
"authConfig.editUser": "编辑用户"
}
\ No newline at end of file
}
......@@ -84,5 +84,27 @@ export default {
'coupon.qushiyong': '去使用',
'coupon.quanma': '券码',
'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 = {
/** 请款类型 */
export const applyType = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyTypeName', defaultMessage: '请款类型' }),
key: 'applyType',
dataIndex: 'applyType',
key: 'applyTypeName',
dataIndex: 'applyTypeName',
filters: [],
onFilter: (value, record) => record.applyTypeName.includes(value),
}
/** 收款方 */
......@@ -33,6 +35,9 @@ export const applyAmount = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.applyAmount', defaultMessage: '请款金额' }),
key: 'applyAmount',
dataIndex: 'applyAmount',
showSorterTooltip: false,
sorter: (a, b) => a.applyAmount - b.applyAmount,
sortDirections: ['descend'],
}
/** 预计付款日期 */
......@@ -40,6 +45,9 @@ export const expectPayTime = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.col.expectPayTime', defaultMessage: '预计付款日期' }),
key: 'expectPayTime',
dataIndex: 'expectPayTime',
showSorterTooltip: false,
sorter: (a, b) => a.expectPayTime - b.expectPayTime,
sortDirections: ['descend'],
}
/** 单据时间 */
......@@ -47,13 +55,18 @@ export const createTime = {
title: getIntl().formatMessage({ id: 'balance.businessRequestFundsCollaboration.detail.columns.billTime', defaultMessage: '单据时间' }),
key: 'createTime',
dataIndex: 'createTime',
showSorterTooltip: false,
sorter: (a, b) => a.createTime - b.createTime,
sortDirections: ['descend'],
}
/** 内部状态 */
export const interiorStateName = {
title: getIntl().formatMessage({ id: 'components.neibuzhuangtai', defaultMessage: '内部状态' }),
key: 'interiorStateName',
dataIndex: 'interiorStateName',
key: 'statusName',
dataIndex: 'statusName',
filters: [],
onFilter: (value, record) => record.statusName.includes(value),
}
/** 操作 */
......
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 { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from '@linkseeks/god';
......@@ -12,10 +12,11 @@ import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/det
import Card from '@/pages/transaction/purchaseAbility/components/card';
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 { CheckCircleOutlined } from '@ant-design/icons';
import ModalAudit from '@/components/ModalAudit';
const intl = getIntl();
const TABLINK = [
......@@ -31,6 +32,7 @@ const SearchDetail = () => {
},
pathname,
} = history.location;
const ref = useRef<any>({})
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [writeOffVisible, setWriteOffVisible] = useState<any>(false);
......@@ -38,6 +40,8 @@ const SearchDetail = () => {
const currentRef = useRef({});
const [basicEffect, setBasicEffect] = useState<any>([]);
const [writeOffRecord, setWriteOffRecord] = useState<any>({});
const [visible, setVisible] = useState<boolean>(false);
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const _tabs = useMemo(() => {
let _list = [];
......@@ -231,6 +235,35 @@ const SearchDetail = () => {
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 (
<>
<PeripheralLayout
......@@ -241,7 +274,7 @@ const SearchDetail = () => {
<>
{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 = () => {
}
/>
<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';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine1List } from '@/services/SettleV2Api';
const intl = getIntl();
const One = () => {
......@@ -16,25 +17,10 @@ const One = () => {
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>[] = [
{
...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
......@@ -47,7 +33,7 @@ const One = () => {
},
{
...applyAmount,
render: (_text) => `¥${_text}`,
render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
},
{
...expectPayTime,
......@@ -59,11 +45,11 @@ const One = () => {
},
{
...interiorStateName,
render: (_text, _record) => <Tag color={INTERNALSTATE_COLOR[_record.interiorState]}>{_text}</Tag>
render: (_text, _record) => <Tag color={INTERNALSTATE_COLOR[_record.status]}>{_text}</Tag>
},
{
...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 = () => {
<Table
columns={columns}
effects="applyNo"
fetch={mock}
fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine1List}
schema={schema}
/>
)
......
......@@ -57,18 +57,22 @@ export const schema: ISchema = {
},
"[createTimeStart,createTimeEnd]": {
type: "string",
"x-component": "DateRangePickerUnix",
"x-component": "daterange",
"x-component-props": {
placeholder: ['单据时间开始', '单据时间结束'],
fmt: 'YYYY-MM-DD'
placeholder: [
getIntl().formatMessage({ id: 'balance.createTimeStart', defaultMessage: '单据开始时间' }),
getIntl().formatMessage({ id: 'balance.createTimeEnd', defaultMessage: '单据结束时间' }),
],
}
},
"[expectPayTimeStart,expectPayTimeEnd]": {
type: "string",
"x-component": "DateRangePickerUnix",
"x-component": "daterange",
"x-component-props": {
placeholder: ['预计付款日期开始', '预计付款日期结束'],
fmt: 'YYYY-MM-DD HH:mm'
placeholder: [
getIntl().formatMessage({ id: 'balance.expectPayTimeStart', defaultMessage: '预计付款开始日期' }),
getIntl().formatMessage({ id: 'balance.expectPayTimeEnd', defaultMessage: '预计付款结束日期' }),
],
}
},
}
......
......@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine3List } from '@/services/SettleV2Api';
const intl = getIntl();
const Submit = () => {
......@@ -16,25 +17,10 @@ const Submit = () => {
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>[] = [
{
...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
......@@ -47,7 +33,7 @@ const Submit = () => {
},
{
...applyAmount,
render: (_text) => `¥${_text}`,
render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
},
{
...expectPayTime,
......@@ -63,7 +49,7 @@ const Submit = () => {
},
{
...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 = () => {
<Table
columns={columns}
effects="applyNo"
fetch={mock}
fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine3List}
schema={schema}
/>
)
......
......@@ -9,6 +9,7 @@ import { AuthUrl } from '@/components/AuthButton/AuthUrl';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { applyAbstract, applyAmount, applyNo, applyType, createTime, expectPayTime, interiorStateName, operation, payee } from '../columns';
import { schema } from '../sechma';
import { getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine2List } from '@/services/SettleV2Api';
const intl = getIntl();
const Two = () => {
......@@ -16,25 +17,10 @@ const Two = () => {
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>[] = [
{
...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
......@@ -47,7 +33,7 @@ const Two = () => {
},
{
...applyAmount,
render: (_text) => `¥${_text}`,
render: (_text) => `${intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}${_text}`,
},
{
...expectPayTime,
......@@ -63,7 +49,7 @@ const Two = () => {
},
{
...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 = () => {
<Table
columns={columns}
effects="applyNo"
fetch={mock}
fetch={getSettleAccountsBusinessApplyAmountToAddApplyAmountExamine2List}
schema={schema}
/>
)
......
import { ColumnType } from 'antd/lib/table/interface';
import { getIntl } from 'umi';
/** 流程规则ID */
export const id: ColumnType<any> = {
title: '流程规则ID',
title: getIntl().formatMessage({ id: 'process.processId', defaultMessage: '流程规则ID' }),
key: 'processId',
dataIndex: 'processId',
}
/** 流程规则名称 */
export const name: ColumnType<any> = {
title: '流程规则名称',
title: getIntl().formatMessage({ id: 'process.processIdruleName', defaultMessage: '流程规则名称' }),
key: 'name',
dataIndex: 'name',
width: 160,
......@@ -18,28 +19,28 @@ export const name: ColumnType<any> = {
/** 流程名称 */
export const processName: ColumnType<any> = {
title: '流程名称',
title: getIntl().formatMessage({ id: 'process.processName', defaultMessage: '流程名称' }),
key: 'processName',
dataIndex: 'processName',
}
/** 操作时间 */
export const createTime: ColumnType<any> = {
title: '操作时间',
title: getIntl().formatMessage({ id: 'process.createTime', defaultMessage: '操作时间' }),
key: 'createTime',
dataIndex: 'createTime',
}
/** 状态 */
export const status: ColumnType<any> = {
title: '状态',
title: getIntl().formatMessage({ id: 'process.status', defaultMessage: '状态' }),
key: 'status',
dataIndex: 'status',
}
/** 操作 */
export const operation: ColumnType<any> = {
title: '操作',
title: getIntl().formatMessage({ id: 'process.operation', defaultMessage: '操作' }),
key: 'operation',
dataIndex: 'operation',
}
......@@ -7,7 +7,7 @@ import ProcessSelectLayout from './components/processSelect';
import InvoiceTypeLayout from './components/invoiceType';
import { getColor } from '@/components/FormProgress';
import { getSettleAccountsApplyAmountProcessGetInfo, postSettleAccountsApplyAmountProcessSave, postSettleAccountsApplyAmountProcessUpdate } from '@/services/SettleV2Api';
import { history } from 'umi';
import { history, getIntl } from 'umi';
export const layout: any = {
colon: false,
......@@ -27,7 +27,8 @@ const progress = {
fontWeight: 'normal',
}
const AddInvoiceProcessEng: React.FC<{}> = () => {
const AddInvoiceProcessEng: React.FC<{}> = (props: any) => {
const intl = getIntl();
const [form] = Form.useForm();
const { query: { processId }, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
......@@ -88,18 +89,18 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
<Fragment>
<PeripheralLayout
hideBreak
detail='新增请款单流程规则'
detail={props?.route?.name}
no={
<div
style={{ ...progress, backgroundColor: getColor(percent).bg, color: getColor(percent).text }}
>
信息完整度 {percent.toFixed(0)}%
{intl.formatMessage({id: 'process.infointegrity', defaultMessage: '信息完整度'})} {percent.toFixed(0)}%
</div>
}
tabLink={[
{ title: '流程规则', id: 'processEng' },
{ title: '流程选择', id: 'processSelect' },
{ title: '请款类型', id: 'invoiceType' },
{ title: intl.formatMessage({id: 'process.processIdRule', defaultMessage: '流程规则'}), id: 'processEng' },
{ title: intl.formatMessage({id: 'process.processIdSelect', defaultMessage: '流程选择'}), id: 'processSelect' },
{ title: intl.formatMessage({id: 'process.requestType', defaultMessage: '请款类型'}), id: 'invoiceType' },
]}
effect={
<Button
......@@ -108,7 +109,7 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
onClick={() => handleSubmit()}
loading={loading}
>
保存
{intl.formatMessage({id: 'process.save', defaultMessage: '保存'})}
</Button>
}
components={
......
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 CardLayout from '../card';
import styles from './index.less';
......@@ -12,19 +13,20 @@ interface InvoiceTypeProps {
const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
const { form, disabled } = props;
const intl = getIntl();
const mock = [
{value: 1, label: '物料对账单'},
{value: 9, label: '采购询价合同'},
{value: 11, label: '采购招标合同'},
{value: 10, label: '采购竞价合同'},
{value: 12, label: '请购单合同'},
{value: 14, label: '采购请购单'},
{ value: 1, label: intl.formatMessage({ id: 'process.order1', defaultMessage: '物料对账单' }) },
{ value: 9, label: intl.formatMessage({ id: 'process.order2', defaultMessage: '采购询价合同' }) },
{ value: 11, label: intl.formatMessage({ id: 'process.order3', defaultMessage: '采购招标合同' }) },
{ value: 10, label: intl.formatMessage({ id: 'process.order4', defaultMessage: '采购竞价合同' }) },
{ value: 12, label: intl.formatMessage({ id: 'process.order5', defaultMessage: '请购单合同' }) },
{ value: 14, label: intl.formatMessage({ id: 'process.order6', defaultMessage: '采购请购单' }) },
]
return (
<CardLayout
id="invoiceType"
title='请款类型'
title={intl.formatMessage({ id: 'process.requestType', defaultMessage: '请款类型' })}
weight
bodyStyle={{ paddingBottom: '1px' }}
classNames={styles['invoice-type']}
......@@ -32,13 +34,15 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
<Form.Item
name='processSuitableType'
rules={[
{ required: true, message: '请选择请款类型' },
{ required: true, message: intl.formatMessage({ id: 'process.processSuitableType', defaultMessage: '请选择请款类型' }) },
]}
>
<Radio.Group disabled={disabled}>
{mock.map(_item => (
<Radio key={_item.value} value={_item.value}>{_item.label}</Radio>
))}
<Space size={[8, 16]} wrap>
{mock?.map(_item => (
<Radio key={`data_${_item.value}`} value={_item.value}>{_item.label}</Radio>
))}
</Space>
</Radio.Group>
</Form.Item>
</CardLayout>
......
......@@ -3,6 +3,7 @@ import { Form, Row, Col, Input } from 'antd';
import { FormInstance } from 'antd/es/form/Form';
import CardLayout from '../card';
import { validatorByte } from '@/utils/regExp';
import { getIntl } from 'umi';
interface ProcessEngProps {
/** FormInstance */
......@@ -12,25 +13,25 @@ interface ProcessEngProps {
const ProcessEngLayout: React.FC<ProcessEngProps> = (props: any) => {
const { form, disabled } = props;
const intl = getIntl();
return (
<CardLayout
id="processEng"
title='流程规则'
title={intl.formatMessage({id: 'process.processIdRule', defaultMessage: '流程规则' })}
weight
bodyStyle={{ paddingBottom: '0px' }}
>
<Row gutter={[24, 24]}>
<Col span={12}>
<Form.Item
label='流程规则名称'
label={intl.formatMessage({id: 'process.namelabel', defaultMessage: '流程规则名称'})}
name='name'
rules={[
{ required: true, message: '请输入流程规则名称' },
{ required: true, message: intl.formatMessage({id: 'process.namemessage', defaultMessage: '请输入流程规则名称' })},
{ 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>
</Col>
</Row>
......
......@@ -5,6 +5,7 @@ import CardLayout from '../card';
import styles from './index.less';
import { getSettleAccountsApplyAmountProcessBaseList, GetSettleAccountsApplyAmountProcessBaseListResponse } from '@/services/SettleV2Api';
import { isEmpty } from 'lodash';
import { getIntl } from 'umi';
interface ProcessSelectProps {
/** FormInstance */
......@@ -16,6 +17,7 @@ interface ProcessSelectProps {
const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
const { form, onFieldsChange, disabled } = props;
const [dataSource, setDataSource] = useState<GetSettleAccountsApplyAmountProcessBaseListResponse>([])
const intl = getIntl();
useEffect(() => {
getSettleAccountsApplyAmountProcessBaseList().then(res => {
......@@ -31,7 +33,7 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
return (
<CardLayout
id="processSelect"
title='流程选择'
title={intl.formatMessage({id: 'process.processIdSelect', defaultMessage: '流程选择' })}
weight
bodyStyle={{ paddingBottom: '1px' }}
classNames={styles['select-box']}
......@@ -41,12 +43,12 @@ const ProcessSelectLayout: React.FC<ProcessSelectProps> = (props: any) => {
<Form.Item
name='baseProcessId'
rules={[
{ required: true, message: '请选择流程' },
{ required: true, message: intl.formatMessage({id: 'process.baseProcessIdmessage', defaultMessage: '请选择流程' }) },
]}
>
<Radio.Group disabled={disabled}>
{dataSource.map(_item => (
<Radio key={_item.baseProcessId} value={_item.baseProcessId}>
{dataSource?.map((_item, index) => (
<Radio key={`data${_item.baseProcessId * index}`} value={_item.baseProcessId}>
<div className={styles['box']}>
<div className={styles['box-clerk']}>
<div className={styles['box-clerk-name']}>{_item.processName}</div>
......
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 moment from 'moment';
import { PlusOutlined } from '@ant-design/icons';
......@@ -10,6 +10,7 @@ import { createTime, id, name, operation, processName, status } from '../../colu
import AuthButton from '@/components/AuthButton';
const InvoiceProcessEng: React.FC<{}> = () => {
const intl = getIntl();
const ref = useRef<any>({});
const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
......@@ -66,11 +67,11 @@ const InvoiceProcessEng: React.FC<{}> = () => {
{ !!!record.status &&
<>
<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 btnCode='invoiceProcessEng.del' >
<Popconfirm okButtonProps={{ loading: deleteLoading }} title='确定删除么?' okText='是' cancelText='否' onConfirm={() => fetchDeleteBatch(record.processId)}>
<Button type='link'>删除</Button>
<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'>{intl.formatMessage({ id: 'authConfig.delete', defaultMessage: '删除' })}</Button>
</Popconfirm>
</AuthButton>
</>
......@@ -105,7 +106,7 @@ const InvoiceProcessEng: React.FC<{}> = () => {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '流程规则名称',
placeholder: intl.formatMessage({ id: 'process.processIdruleName', defaultMessage: '流程规则名称' }),
advanced: false
},
},
......@@ -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