Commit 8ef4887c authored by xiexiuxing's avatar xiexiuxing

fix: 修改bug

parent 98c63cbf
......@@ -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',
......
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