Kaynağa Gözat

Merge branch '3.29' into dev

lanjianrong 4 yıl önce
ebeveyn
işleme
2304738b29

+ 6 - 3
src/pages/Product/Cloud/components/Detail/UpgradeModal.jsx

@@ -84,6 +84,9 @@ const UpgradeModal = props => {
   const onChange = value => {
     setShowDeadline(value)
   }
+  const disabledDate = current => {
+    return current && current < dayjs().endOf('day')
+  }
   const handleonOk = () => {
     form.validateFields().then(values => {
       const newVal = { ...values }
@@ -135,13 +138,13 @@ const UpgradeModal = props => {
 
       {type === titleType.DEMOTION ? (
         <div className="mb-6">
-          用户<b>{cloudUser.mobile}</b>,<b>{cloudUser.username}</b> 降级 <b>{cloudUser.name}</b>{' '}
+          用户<b>{cloudUser.mobile}</b>,<b>{cloudUser.username}</b> 降级 <b>{cloudUser.name}</b>{' '}
           <b>{compilationListName}</b>
         </div>
       ) : null}
       {type === titleType.DEADLINE ? (
         <div className="mb-6">
-          用户<b>{cloudUser.mobile}</b>,<b>{cloudUser.username}</b> <b>{cloudUser.name}</b>{' '}
+          用户<b>{cloudUser.mobile}</b>,<b>{cloudUser.username}</b> <b>{cloudUser.name}</b>{' '}
           <b>{compilationListName}</b> 设置延期
           <div className="pt-5 pb-5">
             当前限期为 <b>{deadline}</b>
@@ -152,7 +155,7 @@ const UpgradeModal = props => {
       {type !== titleType.DEMOTION ? (
         <Form {...layout} form={form}>
           <Form.Item name="deadline" label="到期时间">
-            <DatePicker style={{ width: '100%' }} disabled={!showDeadline} />
+            <DatePicker style={{ width: '100%' }} disabled={!showDeadline} disabledDate={disabledDate} />
           </Form.Item>
         </Form>
       ) : null}