输入正数最多保留两位小数
This commit is contained in:
		| @@ -53,14 +53,14 @@ | ||||
|         @closed="form={},chooseUserList=[]"> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="选择人员" prop="ids" required> | ||||
|           <!-- <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|                             :url="'/app/appgirdmemberinfo/list?size=10'" | ||||
|           <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|                             :url="'/app/appgirdmemberinfo/list?size=10'" headerTitle="网格员列表" | ||||
|                             :isMultiple="true" dialogTitle="选择" @selectPerson="selectPerson"> | ||||
|             <template name="option" v-slot:option="{ item }"> | ||||
|               <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|               <ai-id mode="show" :show-eyes="false" :value="item.idNumber"/> | ||||
|             </template> | ||||
|           </ai-person-select> --> | ||||
|           </ai-person-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="调整说明" prop="eventDesc" required> | ||||
|           <el-input v-model.trim="form.eventDesc" placeholder="请输入..." type="textarea" :rows="4" show-word-limit | ||||
| @@ -147,7 +147,10 @@ export default { | ||||
|         ids: [{required: true, message: '请选择人员', trigger: 'blur'}], | ||||
|         eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'}], | ||||
|         integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}], | ||||
|         integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}], | ||||
|         // integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}, | ||||
|         // {pattern: /^(([0-9]\d*))(\.\d{0})?$/, message: '请输入正数', trigger: 'blur'}], | ||||
|         integral: [{required: true, message: '请输入积分', trigger: 'blur' }, | ||||
|         {pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}], | ||||
|       } | ||||
|     }, | ||||
|   }, | ||||
| @@ -283,7 +286,11 @@ export default { | ||||
|                 this.getTableData() | ||||
|                 this.dialog = false | ||||
|               }) | ||||
|             } else { | ||||
|               this.flag = false | ||||
|             } | ||||
|           }).catch(() => { | ||||
|             this.flag = false | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
| @@ -309,5 +316,62 @@ export default { | ||||
|   ::v-deep .ai-dialog .ai-dialog__content { | ||||
|     overflow-y: hidden; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .selectCont .pagination { | ||||
|     width: 100%; | ||||
|   } | ||||
|  | ||||
|   .userlist { | ||||
|     display: inline-block; | ||||
|   } | ||||
|  | ||||
|   .userlist, .user { | ||||
|     display: inline-block; | ||||
|   } | ||||
|  | ||||
|   .user { | ||||
|     position: relative; | ||||
|     width: 70px; | ||||
|     text-align: center; | ||||
|  | ||||
|     .remove-icon { | ||||
|       position: absolute; | ||||
|       right: 7px; | ||||
|       top: -4px; | ||||
|       line-height: 1; | ||||
|       padding: 6px 0; | ||||
|       font-size: 16px; | ||||
|       cursor: pointer; | ||||
|  | ||||
|       &:hover { | ||||
|         color: crimson; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     img, h2 { | ||||
|       display: block; | ||||
|       width: 40px; | ||||
|       height: 40px; | ||||
|       line-height: 40px; | ||||
|       text-align: center; | ||||
|       margin: 0 auto 4px; | ||||
|       font-size: 14px; | ||||
|       color: #fff; | ||||
|       border-radius: 50%; | ||||
|     } | ||||
|  | ||||
|     h2 { | ||||
|       background-color: $primaryColor; | ||||
|     } | ||||
|  | ||||
|     span { | ||||
|       color: #666; | ||||
|       font-size: 14px; | ||||
|       white-space: nowrap; | ||||
|       overflow: hidden; | ||||
|       word-break: break-all; | ||||
|       text-overflow: ellipsis; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -103,10 +103,8 @@ export default { | ||||
|       return [ | ||||
|         {prop: 'doTime', label: '时间', width: 200}, | ||||
|         {prop: "type", label: "类型", dict: "integralDetailType", align: 'center'}, | ||||
|         { | ||||
|           prop: 'changeIntegral', align: 'center', label: '变动积分', | ||||
|           render: (h, {row}) => h('p', `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`) | ||||
|         }, | ||||
|         {prop: 'changeIntegral', align: 'center', label: '变动积分',render:  | ||||
|          (h, {row}) => h('p', `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`)}, | ||||
|         {prop: 'nowIntegral', align: 'center', label: '剩余积分'}, | ||||
|         {prop: 'eventDesc', label: '事件', width: 500} | ||||
|       ] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user