Bläddra i källkod

fix: 优化税率和折让比例输入框样式,添加百分号后缀

xieyong 3 veckor sedan
förälder
incheckning
7056a68aec
1 ändrade filer med 31 tillägg och 14 borttagningar
  1. 31 14
      src/views/financialManage/invoiceManage/components/tableInfo.vue

+ 31 - 14
src/views/financialManage/invoiceManage/components/tableInfo.vue

@@ -75,25 +75,29 @@
       <!-- 税率 -->
       <template v-slot:taxRate="scope">
         <span v-if="dialogType === 'view'">{{ scope.row.taxRate }}</span>
-        <el-input
-          v-else
-          v-model="scope.row.taxRate"
-          type="number"
-          @input="recalcDetailList(scope.row, scope.$index)"
-        ></el-input>%
+        <div v-else class="input-with-suffix">
+          <el-input
+            v-model="scope.row.taxRate"
+            type="number"
+            @input="recalcDetailList(scope.row, scope.$index)"
+          ></el-input>
+          <span class="suffix">%</span>
+        </div>
       </template>
 
       <!-- 折让比例 -->
       <template v-slot:discountRatio="scope">
         <span v-if="dialogType === 'view'">{{ scope.row.discountRatio }}</span>
-        <el-input
-          v-else
-          v-model="scope.row.discountRatio"
-          type="number"
-          :min="0"
-          :max="100"
-          placeholder="请输入"
-        ></el-input>%
+        <div v-else class="input-with-suffix">
+          <el-input
+            v-model="scope.row.discountRatio"
+            type="number"
+            :min="0"
+            :max="100"
+            placeholder="请输入"
+          ></el-input>
+          <span class="suffix">%</span>
+        </div>
       </template>
 
       <!-- 工艺路线 -->
@@ -792,4 +796,17 @@ import {
 .time-form .el-form-item {
   margin-bottom: 0 !important;
 }
+.input-with-suffix {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  .el-input {
+    flex: 1;
+  }
+  .suffix {
+    flex-shrink: 0;
+    padding-left: 6px;
+    color: #606266;
+  }
+}
 </style>