Commit f9e832fd authored by alwayOnlie's avatar alwayOnlie

修复时间选中

parent 07bfe748
......@@ -50,6 +50,7 @@ const FormList = (props: any) => {
render: (_, item, index) => <DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
value={item.expectPayTime}
onChange={(e) => onSelectChange(e, 'expectPayTime', index)}
/>
},
......@@ -120,7 +121,6 @@ const FormList = (props: any) => {
/* 添加 */
const addtable = () => {
const data = [...PlanList];
if (keys) {
data.push(keys);
setkeys('');
......@@ -205,7 +205,11 @@ const FormList = (props: any) => {
setPlanList(item)
}
useEffect(() => {
payPlanList.map(item => {
item.expectPayTime = moment(item.expectPayTime)
})
setPlanList(payPlanList)
console.log(payPlanList)
}, [payPlanList])
useEffect(() => {
currentRef.current = {
......
......@@ -26,13 +26,22 @@ const Information = (props: any) => {
PublicApi.getContractManageGetContractNo(data).then(res => {
console.log(res.data)
if (res.code === 1000) {
basic.contractNo = res.data
basic.contractNo = res.data;
const rangePicker = [];
let startTime = moment(basic.startTime)
let endTime = moment(basic.endTime);
rangePicker.push(startTime, endTime);
basic.rangePicker = rangePicker;
attrValueForm.setFieldsValue(basic)
}
}).catch((err) => {
});
} else {
const rangePicker = [];
let startTime = moment(basic.startTime)
let endTime = moment(basic.endTime);
rangePicker.push(startTime, endTime);
basic.rangePicker = rangePicker;
attrValueForm.setFieldsValue(basic)
}
}
......@@ -145,7 +154,7 @@ const Information = (props: any) => {
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
name="range-picker"
name="rangePicker"
{...rangeConfig}
>
<RangePicker style={{ width: '100%' }}
......
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