Commit 1180ad68 authored by xiexiuxing's avatar xiexiuxing
parents c4e44f8c ac138cd4
@import '~antd/es/style/themes/default.less';
.anchor-page {
&-header {
background: #FFFFFF;
&-main {
padding: 0 16px;
display: flex;
}
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0 9px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
min-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
&-anchors {
display: flex;
align-items: center;
}
:global {
.ant-anchor {
background-color: #FFFFFF;
&-wrapper {
margin-left: 0;
}
&-link {
padding: 0 16px;
font-size: 14px;
font-weight: 400;
color: @text-color;
&-title {
padding: 16px 0;
border-bottom: 2px solid transparent;
}
&-active,
&:hover {
font-weight: 500;
color: @text-color;
.ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
}
}
}
&-ink {
display: none;
}
}
}
}
&-content {
padding: 16px;
}
}
\ No newline at end of file
@import '~antd/es/style/themes/default.less';
.anchor-page {
&-header {
background: #FFFFFF;
&-main {
padding: 0 16px;
display: flex;
}
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0 9px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
min-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
&-anchors {
display: flex;
align-items: center;
&:hover {
overflow-x: auto;
}
}
:global {
.ant-anchor {
background-color: #FFFFFF;
&-wrapper {
margin-left: 0;
}
&-link {
padding: 0 16px;
font-size: 14px;
font-weight: 400;
color: @text-color;
&-title {
padding: 16px 0;
border-bottom: 2px solid transparent;
}
&-active,
&:hover {
font-weight: 500;
color: @text-color;
.ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
}
}
}
&-ink {
display: none;
}
}
}
}
&-content {
padding: 16px;
}
}
......@@ -78,12 +78,12 @@ const HeaderDropdown: React.FC = () => {
console.log(getLocale(), "locale")
if (locales) {
setLocale(locales as any, true);
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
}
setCurrentLangKey(getLocale())
}, [])
const setLang = (langItem: countryItem) => {
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
setLocale(langItem.key, true)
}
......
......@@ -9,7 +9,7 @@ export default {
'commodity.goods.columns.brand':'Brand',
'commodity.goods.columns.unit':'Unit',
'commodity.goods.columns.costPrice':'Into unit price',
'commodity.goods.columns.currency':'¥',
'commodity.goods.columns.currency':'$',
'commodity.goods.columns.batch':'Import batch',
'commodity.goods.columns.option':'Operation',
'commodity.goods.columns.option.button.1':'Modify',
......
......@@ -14,7 +14,6 @@ import { IButtonFilter, IFormFilter } from 'god/dist/src/standard-table/TableCon
import { getMemberRolePage, postMemberRoleDelete, postMemberRoleUpdatestatus } from '@/services/MemberV2Api';
import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl';
......@@ -94,6 +93,21 @@ const MemberSystem: React.FC<{}> = () => {
}
];
const STATUS_ENUM = [
{
label: intl.formatMessage({id: 'common.text.all'}),
value: null
},
{
label: intl.formatMessage({id: 'common.status.effective'}),
value: 1
},
{
label: intl.formatMessage({id: 'common.status.invalid'}),
value: 0
}
]
return (
<PageHeaderWrapper>
......
......@@ -35,6 +35,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
const loadingTableData = async (params) => {
const _params = { ...params, ...searchParams }
const { data } = await getSettleAccountsBusinessReconciliationToReconciliationList(_params)
setDataSource(data);
return data;
}
......@@ -53,7 +54,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
title: intl.formatMessage({ id: 'balance.fahuopici' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
// render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => `第${text}批`,
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......@@ -343,7 +344,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
selectedRows.forEach((item) => {
item.products.forEach((child) => {
if (childSelectedRowKeys.includes(child.productId)) {
_rows.push({ ...child, orderId: item.billId, orderNo: item.billNo, expectPayTime: formatTimeString(child?.expectPayTime, 'YYYY-MM-DD') });
_rows.push({ ...child, ...item, orderId: item.billId, orderNo: item.billNo, expectPayTime: formatTimeString(child?.expectPayTime, 'YYYY-MM-DD') });
}
})
})
......@@ -351,6 +352,17 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
onOk?.(_rows);
}
useEffect(() => {
if (visible) {
ref?.current?.reload();
}else{
setChildSelectedRowKeys([]);
setSelectedRowKeys([]);
setChildSelectedRows([]);
setSelectedRows([]);
}
}, [visible])
return (
<Drawer
title={intl.formatMessage({ id: 'balance.xuanzedaiduizhangmingxi' })}
......@@ -437,7 +449,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
},
},
properties: {
"batch": {
"deliveryBatch": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'balance.qingshurufahuopici' }),
......
......@@ -26,7 +26,7 @@ const TABLINK = [
{ id: 'billLayout', title: intl.formatMessage({ id: 'balance.duizhangdanmingxi' }) },
{ id: 'fileLayout', title: intl.formatMessage({ id: 'balance.fujian' }), },
{ id: 'invoiceLayout', title: intl.formatMessage({ id: 'balance.fapiaoxinxi' }), },
{ id: 'recordLayout', title: '流转记录'}
{ id: 'recordLayout', title: '流转记录' }
]
const SearchDetail = () => {
......@@ -108,88 +108,109 @@ const SearchDetail = () => {
title: '订单号',
key: 'orderNo',
dataIndex: 'orderNo',
fixed: 'left',
width: 100
},
{
title: '预计结算日期',
key: 'settlementDate',
dataIndex: 'settlementDate',
key: 'expectPayTime',
dataIndex: 'expectPayTime',
width: 150
},
{
title: '发货批次',
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
width: 150
},
{
title: '发货单号',
key: 'deliveryNo',
dataIndex: 'deliveryNo',
width: 150
},
{
title: '收货单号',
key: 'receiveNo',
dataIndex: 'receiveNo',
width: 150
},
{
title: '物料编码',
key: 'productNo',
dataIndex: 'productNo',
width: 150
},
{
title: '物料名称',
key: 'productName',
dataIndex: 'productName',
width: 150
},
{
title: '规格型号',
key: 'spec',
dataIndex: 'spec',
width: 150
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
width: 150
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
width: 150
},
{
title: '单位',
key: 'unit',
dataIndex: 'unit',
width: 150
},
{
title: '税率',
title: '含税/税率',
key: 'taxRate',
dataIndex: 'taxRate',
width: 150,
render: (text: any) => {
return text > 0 ? `是/${text}%` : '否';
}
},
{
title: '单价(含税)',
key: 'price',
dataIndex: 'price',
width: 150,
render: (text: any) => ${priceFormat(text)}`
},
{
title: '待对账数量',
key: 'reconciliationQuantity',
dataIndex: 'reconciliationQuantity',
width: 150
},
{
title: '待对账金额(含税)',
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
width: 150,
render: (text: any) => ${priceFormat(text)}`
},
{
title: '本次对账数量',
key: 'currentReconciliationQuantity',
dataIndex: 'currentReconciliationQuantity',
width: 150
},
{
title: '本次对账金额(含税)',
key: 'currentMoney',
dataIndex: 'currentMoney',
width: 150,
render: (text: any) => ${priceFormat(text)}`
},
];
......@@ -217,7 +238,7 @@ const SearchDetail = () => {
keepAlive={false}
currentRef={currentRef}
columns={columns}
tableProps={{ rowKey: 'reconciliationRowId' }}
tableProps={{ rowKey: 'reconciliationRowId', scroll: { x: 2600 } }}
fetchTableData={(params: any) => loadingTableData(params)}
/>
</Card>
......
......@@ -29,7 +29,6 @@ const TABLINK = [
]
const Add = () => {
console.log(history)
const {
query: {
id,
......@@ -47,6 +46,7 @@ const Add = () => {
const [drawerVisible, setDrawerVisible] = useState<boolean>(false);
const [unsaved, setUnsaved] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const [buyerData, setBuyerData] = useState<any>({});
const filesRef = useRef<any>({});
const _tabs = useMemo(() => {
......@@ -120,7 +120,7 @@ const Add = () => {
const data = res.data.data;
let _fields = {}
for (let key in data) {
_fields[`currentReconciliationQuantity_${key}`] = data[key]['currentReconciliationQuantity']
_fields[`currentReconciliationQuantity_${data[key].orderNo}_${data[key].productId}`] = data[key]['currentReconciliationQuantity']
}
form.setFieldsValue(_fields);
setTabelSource(data);
......@@ -137,6 +137,7 @@ const Add = () => {
const data = res.data;
setDataSource(data);
setTabelSource(data.rows);
setBuyerData({ buyerMemberId: state?.rows?.[0]?.buyerMemberId, buyerRoleId: state?.rows?.[0]?.buyerRoleId })
}
})
} else {
......@@ -161,9 +162,10 @@ const Add = () => {
}
/** 删除列表 */
const handleRemove = (index: number) => {
const handleRemove = (index: number, record: any) => {
const data = [...tabelSource];
data.splice(index, 1);
form.setFieldsValue({ [`currentReconciliationQuantity_${record.orderNo}_${record.productId}`]: null });
setTabelSource(data)
}
......@@ -183,7 +185,7 @@ const Add = () => {
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
width: 100,
// render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => `第${text}批`,
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......@@ -246,7 +248,7 @@ const Add = () => {
render: (text: any, record: any, index: number) => (
_editAble ? (
<Form.Item
name={`currentReconciliationQuantity_${index}`}
name={`currentReconciliationQuantity_${record.orderNo}_${record.productId}`}
style={{ margin: 0 }}
rules={[
{ required: true, message: intl.formatMessage({ id: 'balance.qingshuruduizhangshuliang' }) }
......@@ -271,7 +273,7 @@ const Add = () => {
fixed: 'right',
width: 100,
render: (text: any, record: any, index: number) => (
<Button type='link' onClick={() => { handleRemove(index) }}>
<Button type='link' onClick={() => { handleRemove(index, record) }}>
{intl.formatMessage({ id: 'balance.shanchu' })}
</Button>
)
......@@ -313,6 +315,8 @@ const Add = () => {
_params.payer = dataSource.payer;
_params.payee = dataSource.payee;
_params.launchReconciliation = dataSource.launchReconciliation;
_params.buyerMemberId = buyerData.buyerMemberId;
_params.buyerRoleId = buyerData.buyerRoleId;
} else {
_params.reconciliationId = id;
}
......@@ -393,14 +397,14 @@ const Add = () => {
</Button> : null}
<Table dataSource={tabelSource} columns={_editAble ? columnsEdit : columns} scroll={{ x: 1300 }} pagination={false} />
</Card>
<BusinessFileLayout fetchdata={[]} currentRef={filesRef} editAble={_editAble} />
<BusinessFileLayout fetchdata={dataSource?.files} currentRef={filesRef} editAble={_editAble} />
<DetailDrawer
searchParams={
{
payer: dataSource.payer,
payee: dataSource.payee,
// payee: dataSource.payee,
taxRate: tabelSource?.[0]?.taxRate || '',
ids: ids?.join(',') || ''
ids: ids
}
}
visible={drawerVisible}
......
......@@ -14,7 +14,7 @@ import { priceFormat } from '@/utils/numberFomat'
import { createFormActions } from '@formily/antd'
import { getIntl, history, Link } from 'umi';
import { getSettleAccountsBusinessReconciliationToSaveReconciliationList, postSettleAccountsBusinessReconciliationSubmitReconciliation, postSettleAccountsBusinessReconciliationDeleteReconciliation } from '@/services/SettleV2Api'
import { postSettleAccountsBusinessReconciliationToSaveReconciliationList, postSettleAccountsBusinessReconciliationSubmitReconciliation, postSettleAccountsBusinessReconciliationDeleteReconciliation } from '@/services/SettleV2Api'
const intl = getIntl();
......@@ -34,7 +34,7 @@ const ReadyAdd: React.FC = () => {
if (params.createTimeEnd) {
_params.createTimeEnd = formatTimeString(Number(params.createTimeEnd), 'YYYY-MM-DD');
}
const { data } = await getSettleAccountsBusinessReconciliationToSaveReconciliationList(_params)
const { data } = await postSettleAccountsBusinessReconciliationToSaveReconciliationList(_params)
return data
}
......@@ -72,8 +72,8 @@ const ReadyAdd: React.FC = () => {
width: 180
}, {
title: intl.formatMessage({ id: 'balance.waibuzhuangtai' }),
key: 'status',
dataIndex: 'status',
key: 'statusName',
dataIndex: 'statusName',
render: (text: any) => <StatusTag type='primary' title={text} />
},
{
......@@ -81,7 +81,7 @@ const ReadyAdd: React.FC = () => {
dataIndex: 'operate',
align: 'center',
render: (text: any, record: any) => <>
{record.button === 1 && <Popconfirm title={intl.formatMessage({ id: 'balance.quedingyaotijiaoma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchSubmitBatch(record.reconciliationId)}>
{record.status === 1 && <Popconfirm title={intl.formatMessage({ id: 'balance.quedingyaotijiaoma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchSubmitBatch(record.reconciliationId)}>
<Button type='link'>
{intl.formatMessage({ id: 'balance.tijiao' })}
</Button>
......@@ -100,15 +100,15 @@ const ReadyAdd: React.FC = () => {
}];
const fetchSubmitBatch = (id: number) => {
postSettleAccountsBusinessReconciliationSubmitReconciliation({ reconciliationId: id }).then((res) => {
postSettleAccountsBusinessReconciliationSubmitReconciliation({ id }).then((res) => {
if (res.code === 1000) {
ref.current.reload();
}
})
}
const fetchDelete = (id: string) => {
postSettleAccountsBusinessReconciliationDeleteReconciliation({ id: id }).then((res) => {
const fetchDelete = (id: number) => {
postSettleAccountsBusinessReconciliationDeleteReconciliation({ id }).then((res) => {
if (res.code === 1000) {
ref.current.reload();
}
......
......@@ -55,7 +55,7 @@ const ReadyReconciliation: React.FC = () => {
title: intl.formatMessage({ id: 'balance.fahuopici' }),
key: 'deliveryBatch',
dataIndex: 'deliveryBatch',
// render: (text: any, record: any) => `第${text}批`,
render: (text: any, record: any) => `第${text}批`,
}, {
title: intl.formatMessage({ id: 'balance.fahuodanhao' }),
key: 'deliveryNo',
......
......@@ -76,8 +76,8 @@ const Search: React.FC = () => {
width: 180
}, {
title: intl.formatMessage({ id: 'balance.waibuzhuangtai' }),
key: 'status',
dataIndex: 'status',
key: 'statusName',
dataIndex: 'statusName',
render: (text: any) => <StatusTag type='primary' title={text} />
}];
......
......@@ -17,7 +17,7 @@ const { onFieldChange$ } = FormEffectHooks;
export interface IProps {
title: string,
visible: boolean,
id: number,
id: any,
onCancel?: () => void,
onOk?: () => void,
fetch?: () => Promise<unknown>,
......@@ -38,8 +38,8 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const useFormEffects = () => {
onFieldChange$('state').subscribe(({ value }) => {
actions.setFieldState('auditOpinion', state => {
onFieldChange$('isConfirm').subscribe(({ value }) => {
actions.setFieldState('reason', state => {
if (value == 1) {
state.visible = false
} else {
......@@ -60,7 +60,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
{ label: intl.formatMessage({ id: 'detail.purchase.message86' }), value: 1 },
{ label: intl.formatMessage({ id: 'detail.purchase.message87' }), value: 0 }
]}
name='state'
name='isConfirm'
required
x-component="Radio"
x-component-props={{}}
......@@ -78,9 +78,9 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
setConfirmLoading(true);
let value = { ...val }
let params: any = {}
params.state = value.state;
value.state !== 1 && (params.auditOpinion = value.auditOpinion);
fetch({ id, ...params }).then(res => {
params.isConfirm = value.isConfirm;
value.isConfirm !== 1 && (params.reason = value.reason);
fetch({ reconciliationId: id, ...params }).then(res => {
if (res.code === 1000) {
onOk && onOk()
}
......@@ -120,14 +120,14 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
effects={() => useFormEffects()}
onSubmit={(values) => handleSubmit(values)}
initialValues={{
state: 1,
isConfirm: 1,
status: 1
}}
>
{modalNode()}
<Field
title={modalText()}
name={'auditOpinion'}
name={'reason'}
x-component="TextArea"
required
x-component-props={{
......
......@@ -12,10 +12,10 @@ import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'
import { getSettleAccountsBusinessReconciliationTeamworkConfirmReconciliationList } from '@/services/SettleV2Api'
import { createFormActions } from '@formily/antd'
import { getIntl } from 'umi';
import { getIntl, Link } from 'umi';
const intl = getIntl();
const { Link, Text } = Typography;
const { Text } = Typography;
// 对账单查询
......@@ -42,8 +42,8 @@ const ReadyConfirm: React.FC = () => {
title: intl.formatMessage({ id: 'balance.duizhangdanhao' }),
key: 'reconciliationNo',
dataIndex: 'reconciliationNo',
render: (text: any) => (
<Link>{text}</Link>
render: (text: any, record: any) => (
<Link to={`readyConfirm/preview?id=${record.reconciliationId}&no=${text}`}>{text}</Link>
)
}, {
title: intl.formatMessage({ id: 'balance.danjuzhaiyao' }),
......@@ -78,7 +78,7 @@ const ReadyConfirm: React.FC = () => {
title: intl.formatMessage({ id: 'balance.caozuo' }),
key: 'operate',
dataIndex: 'operate',
render: (text: any) => <Button type='link'>{intl.formatMessage({ id: 'balance.queren' })}</Button>
render: (text: any, record: any) => <Link to={`readyConfirm/detail?id=${record.reconciliationId}&no=${text}`}>{intl.formatMessage({ id: 'balance.queren' })}</Link>
}];
return (
......
......@@ -12,10 +12,10 @@ import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'
import { getSettleAccountsBusinessReconciliationTeamworkTobeApplyamountList } from '@/services/SettleV2Api'
import { createFormActions } from '@formily/antd'
import { getIntl } from 'umi';
import { getIntl, Link } from 'umi';
const intl = getIntl();
const { Link, Text } = Typography;
const { Text } = Typography;
// 待请款
......@@ -39,14 +39,14 @@ const ReadyPay: React.FC = () => {
}
const columns: ColumnType<any>[] = [{
title: intl.formatMessage({id: 'balance.duizhangdanhao'}),
title: intl.formatMessage({ id: 'balance.duizhangdanhao' }),
key: 'reconciliationNo',
dataIndex: 'reconciliationNo',
render: (text: any, record: any) => (
<Link>{text}</Link>
<Link to={`readyPay/preview?id=${record.reconciliationId}&no=${text}`}>{text}</Link>
)
}, {
title: intl.formatMessage({id: 'balance.danjuzhaiyao'}),
title: intl.formatMessage({ id: 'balance.danjuzhaiyao' }),
key: 'reconciliationAbstract',
dataIndex: 'reconciliationAbstract',
render: (text: any, record: any) => (
......@@ -55,30 +55,30 @@ const ReadyPay: React.FC = () => {
</Space>
)
}, {
title: intl.formatMessage({id: 'balance.shoukuanfang'}),
title: intl.formatMessage({ id: 'balance.shoukuanfang' }),
key: 'payee',
dataIndex: 'payee',
}, {
title: intl.formatMessage({id: 'balance.duizhangzongjinehanshui'}),
title: intl.formatMessage({ id: 'balance.duizhangzongjinehanshui' }),
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any, record: any) => ${priceFormat(text)}`,
}, {
title: intl.formatMessage({id: 'balance.danjushijian'}),
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => formatTimeString(text, 'YYYY-MM-DD HH:mm'),
width: 180
}, {
title: intl.formatMessage({id: 'balance.waibuzhuangtai'}),
title: intl.formatMessage({ id: 'balance.waibuzhuangtai' }),
key: 'status',
dataIndex: 'status',
render: (text: any, record: any) => <StatusTag type='primary' title={text} />
}, {
title: intl.formatMessage({id: 'balance.caozuo'}),
title: intl.formatMessage({ id: 'balance.caozuo' }),
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => <Button type='link'>{intl.formatMessage({id: 'balance.qingkuan'})}</Button>
render: (text: any, record: any) => <Link to={`readyPay/detail?id=${record.reconciliationId}&no=${text}`}>{intl.formatMessage({ id: 'balance.qingkuan' })}</Link>
}];
return (
......@@ -115,7 +115,7 @@ const ReadyPay: React.FC = () => {
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: intl.formatMessage({id: 'balance.qingshuruduizhangdanhao'}),
placeholder: intl.formatMessage({ id: 'balance.qingshuruduizhangdanhao' }),
align: 'flex-start',
allowClear: true,
},
......@@ -138,14 +138,14 @@ const ReadyPay: React.FC = () => {
"reconciliationAbstract": {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'balance.qingshuruduizhangdanzhaiyao'}),
placeholder: intl.formatMessage({ id: 'balance.qingshuruduizhangdanzhaiyao' }),
allowClear: true,
}
},
"payee": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({id: 'balance.qingshurushoukuanfang'}),
placeholder: intl.formatMessage({ id: 'balance.qingshurushoukuanfang' }),
allowClear: true,
}
},
......@@ -153,14 +153,14 @@ const ReadyPay: React.FC = () => {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: intl.formatMessage({id: 'balance.danjushijianquanbu'}),
placeholder: intl.formatMessage({ id: 'balance.danjushijianquanbu' }),
allowClear: true,
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: intl.formatMessage({id: 'balance.chaxun'}),
children: intl.formatMessage({ id: 'balance.chaxun' }),
},
},
},
......
......@@ -47,7 +47,7 @@ const Search: React.FC = () => {
key: 'reconciliationNo',
dataIndex: 'reconciliationNo',
render: (text: any, record: any) => (
<Link to={`search/preview?id=${record.id}`}>{text}</Link>
<Link to={`search/preview?id=${record.reconciliationId}&no=${text}`}>{text}</Link>
)
}, {
title: intl.formatMessage({ id: 'balance.danjuzhaiyao' }),
......
import React, { useEffect, useState, useMemo, useRef } from 'react';
import { Form, Button, Row, Col, Input, Select, DatePicker, Radio, Table, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { CheckCircleOutlined, PlusOutlined, LinkOutlined } from '@ant-design/icons';
import { getIntl, history, Prompt } from 'umi';
import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
import { getSettleAccountsBusinessReconciliationDetailReconciliation, getSettleAccountsBusinessReconciliationReconciliationRowList, postSettleAccountsBusinessReconciliationUpdateReconciliation, postSettleAccountsBusinessReconciliationSaveReconciliation, postSettleAccountsBusinessReconciliationGenerateReconciliation } from '@/services/SettleV2Api'
import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/detail';
import Card from '@/pages/transaction/purchaseAbility/components/card';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 24 },
labelAlign: "left"
}
const intl = getIntl();
const TABLINK = [
{ id: 'basicLayout', title: intl.formatMessage({ id: 'balance.jibenxinxi' }) },
{ id: 'billLayout', title: '请款明细' },
]
const Add = () => {
const {
query: {
id,
no
},
pathname,
} = history.location;
const [form] = Form.useForm();
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [dataSource, setDataSource] = useState<any>({});
const [tabelSource, setTabelSource] = useState<any>([]);
const [ids, setIds] = useState<any>([]);
const [drawerVisible, setDrawerVisible] = useState<boolean>(false);
const [unsaved, setUnsaved] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const [buyerData, setBuyerData] = useState<any>({});
const filesRef = useRef<any>({});
const _tabs = useMemo(() => {
let _list = [];
TABLINK.forEach((item) => {
_list.push(item)
})
return _list;
}, [pathPci])
const _title = useMemo(() => {
switch (path) {
case 'add': return '新增请款单';
case 'edit': return '对账单请款';
}
}, [path])
const _editAble = useMemo(() => {
return path !== 'preview';
}, [path])
const _returnTopButton = () => {
return (
<Button type='primary' loading={submitLoading} icon={<CheckCircleOutlined />} >{intl.formatMessage({ id: 'balance.baocun' })}</Button>
)
}
return (
<div style={{ margin: '-24px -24px 0' }}>
<PeripheralLayout
no={_title}
tabLink={_tabs}
effect={_editAble && _returnTopButton()}
components={
<Form
{...layout}
form={form}
>
<Card id='basicLayout' title={intl.formatMessage({ id: 'balance.jibenxinxi' })}>
<Row gutter={[8, 8]} justify="space-between">
<Col span={11}>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='单据摘要'
name='reconciliationAbstract'
rules={[{ required: true, message: '请输入单据摘要' }]}
>
<Input placeholder={'请输入单据摘要'} maxLength={60} />
</Form.Item></Col>
</Row>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='请款类型'
name='reconciliationtype'
rules={[{ required: true, message: '请选择请款类型' }]}
>
<Select placeholder={'请选择请款类型'} />
</Form.Item>
</Col>
</Row>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='预计付款日期'
name='reconciliationDate'
rules={[{ required: true, message: '请选择预计付款日期' }]}
>
<DatePicker placeholder={'请选择预计付款日期'} style={{ width: '100%' }} />
</Form.Item>
</Col>
</Row>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='付款方式'
name='reconciliationWay'
rules={[{ required: true, message: '请选择付款方式' }]}
>
<Radio.Group>
<Radio.Button value="1">现结</Radio.Button>
<Radio.Button value="2">月结</Radio.Button>
<Radio.Button value="3">帐期(按天)</Radio.Button>
<Radio.Button value="4">帐期(按月)</Radio.Button>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='支付方式'
name='reconciliationtPayWay'
rules={[{ required: true, message: '请选择支付方式' }]}
>
<Select placeholder={'请选择支付方式'} />
</Form.Item>
</Col>
</Row>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='请款备注'
name='remarks'
rules={[{ required: true, message: '请输入请款备注' }]}
>
<Input placeholder={'请输入请款备注'} maxLength={80} />
</Form.Item>
</Col>
</Row>
</Col>
<Col span={11}>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='收款方'
>
<Input readOnly maxLength={80} addonAfter={<Button type='primary' icon={<LinkOutlined />} />} />
</Form.Item>
</Col>
</Row>
<Row>
<Form.Item
label='账号名称'
>
广州白马家具交易中心
</Form.Item>
</Row>
<Row>
<Form.Item
label='银行账号'
>
6214 7812 3456 7891 1234
</Form.Item>
</Row>
<Row>
<Form.Item
label='开户行'
>
中国建设银行广州市分行营业部
</Form.Item>
</Row>
<Row>
<Form.Item
label='请款金额'
>
¥ 10,000.00
</Form.Item>
</Row>
</Col>
</Row>
</Card>
<Card id='billLayout' title={'请款明细'}>
{_editAble ? <>
<Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label='单据类型'
name='reconciliationWay'
rules={[{ required: true, message: '请选择单据类型' }]}
>
<Radio.Group>
<Radio value="1">待请款单据</Radio>
<Radio value="2">待请款合同</Radio>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Button
type='dashed'
block
style={{
marginBottom: '24px',
}}
onClick={() => { setDrawerVisible(true) }}
>
<PlusOutlined />
{intl.formatMessage({ id: 'balance.xuanze' })}
</Button>
</> : null}
<Table dataSource={tabelSource} columns={[]} scroll={{ x: 1300 }} pagination={false} />
</Card>
</Form>
}
/>
<Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</div>
)
}
export default Add;
......@@ -34,7 +34,7 @@ const SearchDetail = () => {
} = history.location;
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [writeOffVisible, setWriteOffVisible] = useState<any>({});
const [writeOffVisible, setWriteOffVisible] = useState<any>(false);
const [dataSource, setDataSource] = useState<any>({});
const currentRef = useRef({});
const [basicEffect, setBasicEffect] = useState<any>([
......
......@@ -45,7 +45,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
title: intl.formatMessage({ id: 'table.purchase.status' }),
key: 'status',
dataIndex: 'status',
render: (_text: any, _record: any) => <StatusTag type='primary' title={_record.stateName} />
render: (_text: any, _record: any) => <StatusTag type='primary' title={_text} />
},
{
title: intl.formatMessage({ id: 'table.purchase.operate' }),
......
......@@ -66,13 +66,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.danjujine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {toorderAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{toorderAmount}</Text>
</Space>
),
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{record.orderType == 2 ? `-${text}` : text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.orderType == 2 ? `-${text}` : text}</div>
</div>
},
......@@ -90,12 +90,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {topayAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{topayAmount}</Text>
</Space>
),
render: (text) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -103,12 +103,12 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.yiqingkuandaifukuan'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {tounPayApplyAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{tounPayApplyAmount}</Text>
</Space>
),
render: (text, record) =>
<div>
<div>{text ? text : 0}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text ? text : 0}</div>
</div>
},
{
......@@ -116,13 +116,13 @@ const table = (props: any) => {
title: (
<Space direction='vertical'>
<Text>{intl.formatMessage({id: 'contract.qingkuanjine'})}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {applyAmount}</Text>
<Text>{intl.formatMessage({id: 'contract.heji'})}: {intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{applyAmount}</Text>
</Space>
),
render: (_, item, index) =>
<Input
addonBefore="¥"
addonBefore={intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}
style={{
width: 130,
}}
......@@ -257,7 +257,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
{
......@@ -266,7 +266,7 @@ const table = (props: any) => {
align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{text}</div>
</div>
},
]
......
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