Commit 25a86da0 authored by Bill's avatar Bill
parents f6cb6037 0a4d2066
......@@ -184,9 +184,11 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
if (item.products.find((d) => d.productId === record.productId)) {
let parentArr = [...selectedRowKeys];
let parentRowArr = [...selectedRows];
if (item.products.length === selectedRow.length) {
parentArr.push(item.billId);
parentRowArr.push(item)
if (selectedRow.length > 0) {
if (!parentArr.includes(item.billId)) {
parentArr.push(item.billId);
parentRowArr.push(item)
}
} else {
if (parentArr.length && parentArr.find((d) => d === item.billId)) {
parentArr.splice(
......
......@@ -188,9 +188,11 @@ const ReadyReconciliation: React.FC = () => {
if (item.products.find((d) => d.productId === record.productId)) {
let parentArr = [...selectedRowKeys];
let parentRowArr = [...selectedRows];
if (item.products.length === selectedRow.length) {
parentArr.push(item.billId);
parentRowArr.push(item)
if (selectedRow.length > 0) {
if (!parentArr.includes(item.billId)) {
parentArr.push(item.billId);
parentRowArr.push(item)
}
} else {
if (parentArr.length && parentArr.find((d) => d === item.billId)) {
parentArr.splice(
......
......@@ -672,8 +672,8 @@ const Add = () => {
tabelSource.forEach((item) => {
form.setFieldsValue({ [`applyPayment${item.billNo}_${item.taxRate}`]: null })
})
setTabelSource([]);
}
setTabelSource([]);
}, [applyType])
return (
......@@ -831,6 +831,13 @@ const Add = () => {
<Link>{dataSource['reconciliationNo']}</Link>
</Form.Item>
</Row>
<Row>
<Form.Item
label='发票号码'
>
{dataSource?.invoiceMessages ? <>{dataSource?.invoiceMessages?.numbers.map((item) => <div>{item.invoiceNumber}({item.invoiceDate})</div>)}</> : '-'}
</Form.Item>
</Row>
</>}
</Col>
</Row>
......
......@@ -46,6 +46,22 @@ const SearchDetail = () => {
return _list;
}, [pathPci])
const _returnPayWay = (data) => {
let _text = data.payWayName;
switch (data.payWay) {
case 2:
_text += `(${data.payMonth}月付款日期:${data.payDate}号)`
break;
case 3:
_text += `(${data.payDate}天)`
break;
case 4:
_text += `(付款日期:每月${data.payDate}号)`
break;
}
return _text;
}
const _getDetail = () => {
const _params: any = {
applyAmountId: id,
......@@ -79,7 +95,7 @@ const SearchDetail = () => {
{ label: '请款金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.writeOffAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: formatTimeString(data.expectPayTime, 'YYYY-MM-DD'), type: 'text' },
{ label: '付款方式', extra: data.payWayName, type: 'text' },
{ label: '付款方式', extra: _returnPayWay(data), type: 'text' },
]
},
]
......@@ -102,7 +118,7 @@ const SearchDetail = () => {
window.open(`/memberCenter/tranactionAbility/purchaseOrder/orderList/preview?id=${record.billId}`)
} else if (record.billType === 2) {
window.open(`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.billId}`)
}else {
} else {
window.open(`/memberCenter/afterService/returnApplication/returnQuery/detail?id=${record.billId}`)
}
}
......@@ -112,7 +128,7 @@ const SearchDetail = () => {
title: '单据号',
key: 'billNo',
dataIndex: 'billNo',
render: (text: any, record: any) => <Button type='link' onClick={() => {_handleOpen(record)}}>{text}</Button>
render: (text: any, record: any) => <Button type='link' onClick={() => { _handleOpen(record) }}>{text}</Button>
},
{
title: '单据摘要',
......
......@@ -46,6 +46,22 @@ const SearchDetail = () => {
return _list;
}, [pathPci])
const _returnPayWay = (data) => {
let _text = data.payWayName;
switch (data.payWay) {
case 2:
_text += `(${data.payMonth}月付款日期:${data.payDate}号)`
break;
case 3:
_text += `(${data.payDate}天)`
break;
case 4:
_text += `(付款日期:每月${data.payDate}号)`
break;
}
return _text;
}
const _getDetail = () => {
const _params: any = {
applyAmountId: id,
......@@ -79,7 +95,7 @@ const SearchDetail = () => {
{ label: '请款金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.writeOffAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: formatTimeString(data.expectPayTime, 'YYYY-MM-DD'), type: 'text' },
{ label: '付款方式', extra: data.payWayName, type: 'text' },
{ label: '付款方式', extra: _returnPayWay(data), type: 'text' },
]
},
]
......
......@@ -40,7 +40,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
}
const renderFooter = () => {
return (
return disabled ? null : (
<div style={{ textAlign: 'right' }}>
<Button onClick={handleCancel} style={{ marginRight: 8 }}>
{intl.formatMessage({ id: 'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.1' })}
......@@ -73,7 +73,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
<Drawer
visible={visible}
width={820}
title={intl.formatMessage({ id: 'balance.kaijufapiao' })}
title={disabled ? '查看发票' : intl.formatMessage({ id: 'balance.kaijufapiao' })}
onClose={handleCancel}
footer={renderFooter()}
>
......@@ -82,7 +82,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
onSubmit={handleSubmit}
components={{ ArrayCustom: ArrayList, Input: Input, DatePicker, InvoiceInfo }}
actions={formActions}
// editable={mode === 'edit'}
// editable={disabled}
>
{
invoiceInfoData?.map((_item, key) => {
......@@ -105,15 +105,19 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
header: (
<div className={styles.header}>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.fapiaoguanli' })}<span className={styles.required}>*</span>
{disabled ? '原订单发票号码' : <>
{intl.formatMessage({ id: 'balance.fapiaoguanli' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.kaipiaoriqi' })}
<span className={styles.required}>*</span>
{disabled ? '原订单开票日期' : <>
{intl.formatMessage({ id: 'balance.kaipiaoriqi' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.kaipiaojineyuan' })}
<span className={styles.required}>*</span>
{disabled ? '原订单开票金额' : <>
{intl.formatMessage({ id: 'balance.kaipiaojineyuan' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>{intl.formatMessage({ id: 'balance.beizhu' })}</div>
</div>
......
......@@ -58,7 +58,7 @@ const FormList = (props: any) => {
const getList = () => {
let parmas: any = {
current: '1',
pageSize: '3',
pageSize: '10',
}
let fn;
switch (sourceType) {
......@@ -165,34 +165,34 @@ const FormList = (props: any) => {
useEffect(() => {
let columnsTab: any = [
{
title: intl.formatMessage({id: 'contract.wuliaobianhaomingcheng'}), dataIndex: 'name', align: 'center',
title: intl.formatMessage({ id: 'contract.wuliaobianhaomingcheng' }), dataIndex: 'name', align: 'center',
render: (text, item) =>
<div>
<p>{item.code}</p>
<p>{text}</p>
</div>
},
{ title: intl.formatMessage({id: 'contract.guigexinghao'}), dataIndex: 'type', align: 'center', },
{ title: intl.formatMessage({ id: 'contract.guigexinghao' }), dataIndex: 'type', align: 'center', },
{
title: intl.formatMessage({id: 'contract.pinlei'}), dataIndex: 'customerCategory', align: 'center',
title: intl.formatMessage({ id: 'contract.pinlei' }), dataIndex: 'customerCategory', align: 'center',
render: (text, item) =>
<span>{item.customerCategory.name ? item.customerCategory.name : item.customerCategory.category}</span>
},
{
title: intl.formatMessage({id: 'contract.pinpai'}), dataIndex: 'brand', align: 'center',
title: intl.formatMessage({ id: 'contract.pinpai' }), dataIndex: 'brand', align: 'center',
render: (text, item) =>
<span>{item.brand ? item.brand.name : ''}</span>
},
{ title: intl.formatMessage({id: 'contract.danwei'}), dataIndex: 'unitName', align: 'center', },
{ title: intl.formatMessage({ id: 'contract.danwei' }), dataIndex: 'unitName', align: 'center', },
{
title: intl.formatMessage({id: 'contract.caigoushuliang'}),
title: intl.formatMessage({ id: 'contract.caigoushuliang' }),
dataIndex: 'purchaseCount',
key: 'purchaseCount',
align: 'center',
render: (text, record, index) =>
<Form.Item
name={`isHasTax${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanze' }) }]}
>
<Input
style={{
......@@ -206,12 +206,12 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.hanshui'}), dataIndex: 'isHasTax', align: 'center',
title: intl.formatMessage({ id: 'contract.hanshui' }), dataIndex: 'isHasTax', align: 'center',
render: (text, record, index) =>
<Form.Item
name={`isHasTax${index}`}
initialValue={text + index}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanze' }) }]}
>
<Select
style={{ width: 80 }}
......@@ -219,17 +219,17 @@ const FormList = (props: any) => {
onChange={(e) => setInput(e, 'isHasTax', index)}
disabled={Object.keys(Row).length != 0 ? true : false}
>
<Option value="0" key={0}>{intl.formatMessage({id: 'contract.fou'})}</Option>
<Option value="1" key={1}>{intl.formatMessage({id: 'contract.shi'})}</Option>
<Option value="0" key={0}>{intl.formatMessage({ id: 'contract.fou' })}</Option>
<Option value="1" key={1}>{intl.formatMessage({ id: 'contract.shi' })}</Option>
</Select>
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.shuil'}), dataIndex: 'taxRate', align: 'center',
title: intl.formatMessage({ id: 'contract.shuil' }), dataIndex: 'taxRate', align: 'center',
render: (text: any, record: any, index: number) =>
<Form.Item
name={`taxRate${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -243,12 +243,12 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.danjiahanshui'}), dataIndex: 'price', align: 'center',
title: intl.formatMessage({ id: 'contract.danjiahanshui' }), dataIndex: 'price', align: 'center',
render: (text: any, record: any, index: number) =>
<Form.Item
name={`price${index}`}
initialValue={text != '' ? Number(text).toFixed(2) : ''}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -262,11 +262,11 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.shoubiaoshuliang'}), dataIndex: 'bidCount', align: 'center',
title: intl.formatMessage({ id: 'contract.shoubiaoshuliang' }), dataIndex: 'bidCount', align: 'center',
render: (text, record, index) =>
<Form.Item
name={`bidCount${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -279,25 +279,25 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.jinehanshui'}),
title: intl.formatMessage({ id: 'contract.jinehanshui' }),
dataIndex: 'bidAmount',
key: 'bidAmount',
align: 'center',
render: (text: any, record: any) => <Text>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.bidAmount ? Number(record.bidAmount).toFixed(2) : '0.00'}</Text>
render: (text: any, record: any) => <Text>{intl.formatMessage({ id: 'commodity.products.directChannel.columns.currency' })}{record.bidAmount ? Number(record.bidAmount).toFixed(2) : '0.00'}</Text>
},
];
if (dataList.length === 0) {
columnsTab.push(
{
title: intl.formatMessage({id: 'contract.caozuo'}),
title: intl.formatMessage({ id: 'contract.caozuo' }),
dataIndex: 'del',
align: 'center',
key: 'del',
render: (_, record, index) => {
return (
<Popconfirm title={intl.formatMessage({id: 'contract.quedingyaoshanchuma'})} onConfirm={() => handleDelete(record.id)}>
<a>{intl.formatMessage({id: 'contract.shanchu'})}</a>
<Popconfirm title={intl.formatMessage({ id: 'contract.quedingyaoshanchuma' })} onConfirm={() => handleDelete(record.id)}>
<a>{intl.formatMessage({ id: 'contract.shanchu' })}</a>
</Popconfirm>
)
}
......@@ -358,19 +358,19 @@ const FormList = (props: any) => {
const listItem = (record, index) => (
<div className={styles.listItem}>
<div className={styles.label}>
<p>{intl.formatMessage({id: 'contract.guanlian'})}</p>
<p>{intl.formatMessage({id: 'contract.baojiashangpin'})}</p>
<p>{intl.formatMessage({ id: 'contract.guanlian' })}</p>
<p>{intl.formatMessage({ id: 'contract.baojiashangpin' })}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.shangpinID'})}{record.associatedDataId}</p>
<p>{intl.formatMessage({id: 'contract.shangpinmingcheng'})}{record.associatedGoods}</p>
<p>{intl.formatMessage({ id: 'contract.shangpinID' })}{record.associatedDataId}</p>
<p>{intl.formatMessage({ id: 'contract.shangpinmingcheng' })}{record.associatedGoods}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.guige'})}{record.associatedType}</p>
<p>{intl.formatMessage({id: 'contract.pinlei'})}{record.associatedCategory}</p>
<p>{intl.formatMessage({ id: 'contract.guige' })}{record.associatedType}</p>
<p>{intl.formatMessage({ id: 'contract.pinlei' })}{record.associatedCategory}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.pinpai'})}:{record.associatedBrand}</p>
<p>{intl.formatMessage({ id: 'contract.pinpai' })}:{record.associatedBrand}</p>
</div>
</div>
......@@ -407,7 +407,7 @@ const FormList = (props: any) => {
<div className={styles.box}>
{
Object.keys(Row).length === 0 && <div style={{ paddingTop: 12, paddingBottom: 12, }} onClick={() => setIsModalVisible(true)}>
<Button block type='dashed'><PlusOutlined />{intl.formatMessage({id: 'contract.xuanzecaigouwuliao'})}</Button>
<Button block type='dashed'><PlusOutlined />{intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })}</Button>
</div>
}
<Table
......@@ -423,7 +423,7 @@ const FormList = (props: any) => {
/>
{/* 模态框 */}
<Modal title={intl.formatMessage({id: 'contract.xuanzecaigouwuliao'})} width={900} visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
<Modal title={intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })} width={900} visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
<StandardTable
tableProps={{
rowKey: 'id',
......
......@@ -74,7 +74,11 @@ const Table: React.FC<Iprops> = (props: any) => {
return new Promise((resolve, reject) => {
if (!Array.isArray(fetch)) {
fetch({ ...params }).then(res => {
resolve(res.data)
const data = {
totalCount: res.data.totalCount,
data: res.data.data || []
}
resolve(data)
}).catch(error => {
console.warn(error)
})
......
......@@ -48,7 +48,7 @@ const DetialLayout = () => {
{
col: [
{ label: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`, extra: data.id },
{ label: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`, extra: data.outerStatusName },
// { label: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`, extra: data.outerStatusName },
{ label: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`, extra: data.innerStatusName },
]
},
......
......@@ -125,7 +125,9 @@ const Condition: React.FC<Iprops> = (props: any) => {
rules={[{ required: true, message: intl.formatMessage({ id: 'detail.purchase.message38' }) }]}
>
<DatePicker
showTime={{ format: 'HH:mm' }}
style={{ width: '100%' }}
format={"YYYY-MM-DD HH:mm"}
disabledDate={(current) => current && current < moment().startOf('day')}
onChange={(val) => deliveryTimeChange(val)}
/>
......@@ -149,6 +151,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
rules={[{ required: true, message: intl.formatMessage({ id: 'detail.purchase.message39' }) }]}
>
<DatePicker
showTime={{ format: 'HH:mm' }}
style={{ width: '100%' }}
format={"YYYY-MM-DD HH:mm"}
disabledDate={(current) => current && current < moment().startOf('day')}
......
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