Kaynağa Gözat

style(components): 统一按钮样式并修复代码格式

- 为多个操作按钮添加 link 和 small 属性保持样式一致
- 格式化企业信息页面的表单组件布局代码
- 修复金额显示的字符串格式统一使用双引号
- 修正代码中的变量声明格式问题
zouzexu 1 gün önce
ebeveyn
işleme
00f9b0b5c3

+ 2 - 0
src/views/toBManage/firm-account-log/index.vue

@@ -271,6 +271,8 @@ const contentConfig: IContentConfig<FirmAccountLogPageQuery> = reactive({
           attrs: () => ({
             type: "danger",
             icon: "delete",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },

+ 40 - 8
src/views/toBManage/firm-info/index.vue

@@ -37,12 +37,12 @@
       </template>
       <template #currentProfit="scope">
         <span :class="['money-text', scope.row.currentProfit >= 0 ? 'success' : 'danger']">
-          {{ scope.row.currentProfit >= 0 ? '+' : '' }}¥ {{ formatMoney(scope.row.currentProfit) }}
+          {{ scope.row.currentProfit >= 0 ? "+" : "" }}¥ {{ formatMoney(scope.row.currentProfit) }}
         </span>
       </template>
       <template #totalProfit="scope">
         <span :class="['money-text', scope.row.totalProfit >= 0 ? 'success' : 'danger']">
-          {{ scope.row.totalProfit >= 0 ? '+' : '' }}¥ {{ formatMoney(scope.row.totalProfit) }}
+          {{ scope.row.totalProfit >= 0 ? "+" : "" }}¥ {{ formatMoney(scope.row.totalProfit) }}
         </span>
       </template>
     </page-content>
@@ -112,8 +112,17 @@
     </el-dialog>
 
     <!-- 上账/下账弹窗 -->
-    <el-dialog v-model="balanceDialogVisible" :title="balanceDialogType === 1 ? '上账(充值)' : '下账(扣款)'" width="500px">
-      <el-form ref="balanceFormRef" :model="balanceForm" :rules="balanceFormRules" label-width="100px">
+    <el-dialog
+      v-model="balanceDialogVisible"
+      :title="balanceDialogType === 1 ? '上账(充值)' : '下账(扣款)'"
+      width="500px"
+    >
+      <el-form
+        ref="balanceFormRef"
+        :model="balanceForm"
+        :rules="balanceFormRules"
+        label-width="100px"
+      >
         <el-form-item label="企业名称">
           <el-input v-model="balanceForm.firmName" disabled />
         </el-form-item>
@@ -123,15 +132,28 @@
           </el-input>
         </el-form-item>
         <el-form-item :label="balanceDialogType === 1 ? '上账金额' : '下账金额'" prop="amount">
-          <el-input-number v-model="balanceForm.amount" :min="0.01" :precision="2" :step="100" style="width: 100%" />
+          <el-input-number
+            v-model="balanceForm.amount"
+            :min="0.01"
+            :precision="2"
+            :step="100"
+            style="width: 100%"
+          />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="balanceForm.remark" type="textarea" :rows="3" placeholder="请输入备注" />
+          <el-input
+            v-model="balanceForm.remark"
+            type="textarea"
+            :rows="3"
+            placeholder="请输入备注"
+          />
         </el-form-item>
       </el-form>
       <template #footer>
         <el-button @click="balanceDialogVisible = false">取消</el-button>
-        <el-button type="primary" :loading="balanceLoading" @click="handleBalanceSubmit">确定</el-button>
+        <el-button type="primary" :loading="balanceLoading" @click="handleBalanceSubmit">
+          确定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -428,6 +450,8 @@ const contentConfig: IContentConfig<FirmInfoPageQuery> = reactive({
           attrs: () => ({
             type: "success",
             icon: "Plus",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },
@@ -437,6 +461,8 @@ const contentConfig: IContentConfig<FirmInfoPageQuery> = reactive({
           attrs: () => ({
             type: "warning",
             icon: "Minus",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },
@@ -446,6 +472,8 @@ const contentConfig: IContentConfig<FirmInfoPageQuery> = reactive({
           attrs: () => ({
             type: "primary",
             icon: "Setting",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
           show: (row: any) => row.firmType === 1, // 仅企业类型显示邀请码
@@ -456,6 +484,8 @@ const contentConfig: IContentConfig<FirmInfoPageQuery> = reactive({
           attrs: () => ({
             type: "primary",
             icon: "edit",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },
@@ -465,6 +495,8 @@ const contentConfig: IContentConfig<FirmInfoPageQuery> = reactive({
           attrs: () => ({
             type: "danger",
             icon: "delete",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },
@@ -549,7 +581,7 @@ const editModalConfig: IModalConfig<FirmInfoForm> = reactive({
 // 处理操作按钮点击
 const dialogTableVisible = ref(false);
 const firmId = ref();
-const firmName= ref();
+const firmName = ref();
 
 // 上账/下账相关
 const balanceDialogVisible = ref(false);

+ 4 - 0
src/views/toBManage/user-firm/index.vue

@@ -244,6 +244,8 @@ const contentConfig: IContentConfig<UserFirmPageQuery> = reactive({
           attrs: () => ({
             type: "primary",
             icon: "edit",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },
@@ -253,6 +255,8 @@ const contentConfig: IContentConfig<UserFirmPageQuery> = reactive({
           attrs: () => ({
             type: "danger",
             icon: "delete",
+            link: true,
+            size: "small",
             disabled: isSfUser.value,
           }),
         },