瀏覽代碼

feat: 合同概况布局调整

lanjianrong 4 年之前
父節點
當前提交
b45891b692

+ 3 - 0
src/assets/css/common.scss

@@ -394,6 +394,9 @@
   .wrap-content {
     height: calc(100vh - 34px);
     overflow: hidden;
+    &.scroll {
+      overflow-y: auto;
+    }
   }
 }
 

+ 7 - 5
src/components/MoneyInput/index.tsx

@@ -53,11 +53,13 @@ const MoneyInput: React.FC<MoneyInputProps> = (props) => {
   const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
     const val = e.target.value?.match(/^(\d*)\.?(\d{0,2})/)
 
-    let newInputVal = val && val[0] || ''
+    const newInputVal = val && val[0] || ''
 
-    if (newInputVal) {
-      newInputVal = new BigNumber(newInputVal).toString()
-    }
+    // console.log(val);
+    
+    // if (newInputVal) {
+    //   newInputVal = new BigNumber(newInputVal).toString()
+    // }
     if (newInputVal) {
       // newInputVal = parseFloat(newInputVal).toString()
       // if (maxPrice && parseFloat(newInputVal) > maxPrice) {
@@ -91,7 +93,7 @@ const MoneyInput: React.FC<MoneyInputProps> = (props) => {
     <div className='ant-input ant-input-sm'>
       <div className="pi-flex-row">
         <span className="pi-fz-14 pi-mg-right-5">¥</span>
-        <Input bordered={false} value={inputVal || (value && new BigNumber(value).toString())} size="small" onChange={handleChange} autoComplete="off" />
+        <Input bordered={false} value={inputVal || value} size="small" onChange={handleChange} autoComplete="off" />
       </div>
       {
         digit ?

+ 1 - 1
src/pages/Contract/Content/Summary/index.tsx

@@ -142,7 +142,7 @@ export default function Summary() {
   return (
     <div className="wrap-contaniner">
       <Header title="合同概况" />
-      <div className="wrap-content p-3 pi-grid pi-col-2 pi-col-space-3">
+      <div className="wrap-content scroll p-3 pi-grid pi-col-2 pi-col-space-3" >
         <Content data={incomePieData} type="income" />
         <Content data={expenditurePieData} type="expenditure" />
       </div>

+ 1 - 0
src/pages/Dashboard/index.module.scss

@@ -72,6 +72,7 @@
         & > li {
           &:last-of-type {
             padding-bottom: 0;
+            margin-bottom: 0;
             border-bottom: none;
           }