Commit 6c2f1d20 authored by 前端-吴智勇's avatar 前端-吴智勇

Merge branch 'jinfa-0518' into 'jinfa-0518'

fix: 生成合同校验时间 See merge request project/jinfa-platform!325
parents e6ec82e5 6015f4cc
......@@ -107,6 +107,10 @@ const ContractText = (props: any) => {
? await purchaseMate.current.get()
: [];
getOtherInfo().then(datas => {
if (!(picker.endTime && picker.startTime)) {
message.info('生成合同日期不可以为空!')
return
}
const param = {
contractTemplateId: Templatel.id,
memberId,
......
......@@ -17,12 +17,12 @@ const Information = (props: any) => {
const [attrValueForm] = Form.useForm();
const [startTime, setstartTime] = useState('');
const [endTime, setendTime] = useState('');
const [currencyList,setCurrencyList] = useState<any>([])
const [currencyList, setCurrencyList] = useState<any>([])
const [areaList, setAreaList] = useState<any>()
const [businessTypeList, setBusinessTypeList] = useState<any>()
const [portList, setPortList] = useState<any>()
const [areaList,setAreaList] = useState<any>()
const [businessTypeList,setBusinessTypeList] = useState<any>()
const [portList,setPortList] = useState<any>()
const [visible_, setvisible_] = useState<boolean>(false);
const [rowSelection_, RowCtl_] = useRowSelectionTable({ customKey: 'id', type: 'radio' });
......@@ -91,9 +91,9 @@ const Information = (props: any) => {
})
useEffect(() => {
/* 获取币别列表 */
useEffect(() => {
/* 获取币别列表 */
getContractSelectCurrencyList().then(res => {
if (res.code === 1000) {
setCurrencyList(res.data)
......@@ -121,11 +121,11 @@ const Information = (props: any) => {
}
})
}, [])
/* 时间选中 */
const onChange = (value: any) => {
let startTime = moment(Number(value[0])).format('YYYY-MM-DD HH:mm:ss')
let endTime = moment(Number(value[1])).format('YYYY-MM-DD HH:mm:ss')
let startTime = value ? moment(Number(value?.[0])).format('YYYY-MM-DD HH:mm:ss') : null
let endTime = value ? moment(Number(value?.[1])).format('YYYY-MM-DD HH:mm:ss') : null
getPicker({
startTime,
endTime,
......@@ -134,7 +134,7 @@ const Information = (props: any) => {
setendTime(endTime)
}
const rangeConfig = {
rules: [{ type: 'array' as const, required: true, message: intl.formatMessage({id: 'contract.qingxuanzekaishihuozhejie'}) }],
rules: [{ type: 'array' as const, required: true, message: intl.formatMessage({ id: 'contract.qingxuanzekaishihuozhejie' }) }],
};
const [ht_val, setHt_val] = useState<any>({})
const handleConfirm = () => {
......@@ -154,7 +154,7 @@ const Information = (props: any) => {
autoComplete="off"
>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongbianhao'})}
label={intl.formatMessage({ id: 'contract.hetongbianhao' })}
labelAlign="left"
name="contractNo"
labelCol={{ span: 2 }}
......@@ -163,52 +163,52 @@ const Information = (props: any) => {
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingshuruhetongbianhao'}),
message: intl.formatMessage({ id: 'contract.qingshuruhetongbianhao' }),
},
]}
>
{/* disabled */}
<Input placeholder={intl.formatMessage({id: 'contract.qingshuruhetongbianhao'})} disabled />
<Input placeholder={intl.formatMessage({ id: 'contract.qingshuruhetongbianhao' })} disabled />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongzhaiyao'})}
label={intl.formatMessage({ id: 'contract.hetongzhaiyao' })}
labelAlign="left"
name="contractAbstract"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
// rules={[
// {
// required: true,
// message: intl.formatMessage({id: 'contract.qingshuruhetongzhaiyao'}),
// },
// ]}
// rules={[
// {
// required: true,
// message: intl.formatMessage({id: 'contract.qingshuruhetongzhaiyao'}),
// },
// ]}
>
<Input placeholder={intl.formatMessage({id: 'contract.qingshuruhetongzhaiyao'})} />
<Input placeholder={intl.formatMessage({ id: 'contract.qingshuruhetongzhaiyao' })} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.xunyuanleixing'})}
label={intl.formatMessage({ id: 'contract.xunyuanleixing' })}
labelAlign="left"
name="sourceType"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
initialValue={basic.sourceType}
// rules={[
// {
// required: true,
// message: intl.formatMessage({id: 'contract.qingxuanzexunyuanleixing'}),
// },
// ]}
// rules={[
// {
// required: true,
// message: intl.formatMessage({id: 'contract.qingxuanzexunyuanleixing'}),
// },
// ]}
>
<Select disabled>
<Option value="1" >{intl.formatMessage({id: 'contract.caigouxunjia'})}</Option>
<Option value="1" >{intl.formatMessage({ id: 'contract.caigouxunjia' })}</Option>
{/* <Option value="2" >{intl.formatMessage({id: 'contract.caigouzhaobiao'})}</Option>
<Option value="3" >{intl.formatMessage({id: 'contract.caigoujingjia'})}</Option> */}
<Option value="4" >{intl.formatMessage({id: 'contract.purchase.title'})}</Option>
<Option value="4" >{intl.formatMessage({ id: 'contract.purchase.title' })}</Option>
<Option value="5" >{intl.formatMessage({ id: 'contract.kuangjiahetong' })}</Option>
</Select>
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongyouxiaoqi'})}
label={intl.formatMessage({ id: 'contract.hetongyouxiaoqi' })}
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
......@@ -220,20 +220,20 @@ const Information = (props: any) => {
/>
</Form.Item>
{(basic.sourceType != 4 && basic.sourceType != 5) ?
<Form.Item
label={intl.formatMessage({id: 'contract.duiyingdanju'})}
labelAlign="left"
labelCol={{ span: 2 }}
name="sourceNo"
initialValue={basic.sourceNo ? basic.sourceNo : ''}
wrapperCol={{ span: 8 }}
>
<Input placeholder={intl.formatMessage({id: 'contract.zuichang60gezifu30ge'})} disabled />
</Form.Item>
: null }
<Form.Item
label={intl.formatMessage({ id: 'contract.duiyingdanju' })}
labelAlign="left"
labelCol={{ span: 2 }}
name="sourceNo"
initialValue={basic.sourceNo ? basic.sourceNo : ''}
wrapperCol={{ span: 8 }}
>
<Input placeholder={intl.formatMessage({ id: 'contract.zuichang60gezifu30ge' })} disabled />
</Form.Item>
: null}
<Form.Item
label={intl.formatMessage({id: 'contract.supplier'})}
label={intl.formatMessage({ id: 'contract.supplier' })}
labelAlign="left"
labelCol={{ span: 2 }}
name="partyBName"
......@@ -242,11 +242,11 @@ const Information = (props: any) => {
rules={[
{
required: true,
message: intl.formatMessage({id: 'contract.qingxuanzeshoubiaohuiyuan'}),
message: intl.formatMessage({ id: 'contract.qingxuanzeshoubiaohuiyuan' }),
},
]}
>
<Input placeholder={intl.formatMessage({id: 'contract.zuichang60gezifu30ge'})} disabled />
<Input placeholder={intl.formatMessage({ id: 'contract.zuichang60gezifu30ge' })} disabled />
</Form.Item>
{/* 关联合同 */}
{basic.sourceType == 4 && <Form.Item
......@@ -273,14 +273,14 @@ const Information = (props: any) => {
placeholder={intl.formatMessage({ id: 'contract.currency.tip' })}
disabled={basic.sourceType == 4}
>
{currencyList?.length ? currencyList.map((item)=>(
{currencyList?.length ? currencyList.map((item) => (
<Option value={item.id} key={item.id}>{item.text}</Option>
)):null}
)) : null}
</Select>
</Form.Item>
{/* 业务类型 */}
<Form.Item
{/* 业务类型 */}
<Form.Item
label={intl.formatMessage({ id: 'contract.businessType' })}
labelAlign="left"
name="businessType"
......@@ -288,19 +288,19 @@ const Information = (props: any) => {
wrapperCol={{ span: 8 }}
initialValue={basic.businessType ? basic.businessType : ''}
>
<Select
<Select
// onChange={handleChange}
disabled={basic.sourceType == 4}
placeholder={intl.formatMessage({ id: 'contract.businessType.tip' })}
>
{businessTypeList?.length ? businessTypeList.map((item)=>(
{businessTypeList?.length ? businessTypeList.map((item) => (
<Option value={item.id} key={item.id}>{item.text}</Option>
)):null}
)) : null}
</Select>
</Form.Item>
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'contract.hetongjine'})}
label={intl.formatMessage({ id: 'contract.hetongjine' })}
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
......
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