ezhizao_zx 1 jaar geleden
bovenliggende
commit
8225b02405

+ 77 - 343
src/views/business/deduction/index.vue

@@ -8,22 +8,13 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:deposit:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:deposit:export']">
+              导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
-      <el-radio-group
-        v-model="queryRadio"
-        style="margin-left: 20px; height: 100%"
-        size="small"
-        @change="radioChangeHandler"
-      >
+      <el-radio-group v-model="queryRadio" style="margin-left: 20px; height: 100%" size="small"
+        @change="radioChangeHandler">
         <el-radio-button label="全部" />
         <el-radio-button label="待确认扣款" />
         <el-radio-button label="可扣款" />
@@ -33,155 +24,58 @@
       </el-radio-group>
     </div>
     <!-- 搜索区 -->
-    <el-form
-      class="list-search-container"
-      size="small"
-      :model="queryParams"
-      ref="queryRef"
-      :inline="true"
-      label-width="78px"
-    >
+    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
+      label-width="78px">
       <el-form-item label="来源名:">
-        <el-select
-          v-model="queryParams.sourceNames"
-          placeholder="请选择来源名"
-          multiple
-        >
-          <el-option
-            v-for="item in sources"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
+        <el-select v-model="queryParams.sourceNames" placeholder="请选择来源名" multiple>
+          <el-option v-for="item in sources" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
       <el-form-item label="客户名称:">
-        <el-input
-          v-model.trim="queryParams.companyName"
-          size="small"
-          type="text"
-          placeholder="客户名称"
-          :clearable="true"
-          style="width: 140px"
-        />
+        <el-input v-model.trim="queryParams.companyName" size="small" type="text" placeholder="客户名称" :clearable="true"
+          style="width: 140px" />
       </el-form-item>
       <el-form-item label="所属期:">
-        <el-date-picker
-          v-model="queryParams.currentMonth"
-          type="month"
-          format="YYYY年MM月"
-          value-format="YYYY-MM"
-          style="width: 130px"
-        />
+        <el-date-picker v-model="queryParams.currentMonth" type="month" format="YYYY年MM月" value-format="YYYY-MM"
+          style="width: 130px" />
       </el-form-item>
       <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:">
         <el-switch v-model="oneself" @change="handleOneself" />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery"
-          >搜索</el-button
-        >
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="operation" @click="moreSearch = true">更多</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="list"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名"
-        prop="companyName"
-        min-width="250"
-        align="center"
-      />
-      <el-table-column
-        label="来源"
-        min-width="100"
-        align="center"
-        prop="fromCompanyName"
-      />
-      <el-table-column
-        label="纳税性质"
-        prop="taxType"
-        width="100"
-        align="center"
-      />
-      <el-table-column
-        label="扣款期"
-        prop="currentMonth"
-        min-width="100"
-        align="center"
-      >
+      <el-table-column label="客户名" prop="companyName" min-width="250" align="center" />
+      <el-table-column label="来源" min-width="100" align="center" prop="fromCompanyName" />
+      <el-table-column label="纳税性质" prop="taxType" width="100" align="center" />
+      <el-table-column label="扣款期" prop="currentMonth" min-width="100" align="center">
         <template #default="scope">
           {{ scope.row.year }}年{{ scope.row.month }}月
         </template>
       </el-table-column>
-      <el-table-column
-        label="来源名"
-        prop="sourceName"
-        width="150"
-        align="center"
-      />
-      <el-table-column
-        label="金额"
-        prop="amount"
-        width="130"
-        header-align="center"
-        align="right"
-      >
+      <el-table-column label="来源名" prop="sourceName" width="150" align="center" />
+      <el-table-column label="金额" prop="amount" width="130" header-align="center" align="right">
         <template #default="scope">
-          <el-button
-            v-if="scope.row.deductible === 1"
-            type="primary"
-            link
-            size="small"
-            @click="amountDetail(scope.row)"
-            >{{ rowNum(scope.row.amount) }}</el-button
-          >
+          <el-button v-if="scope.row.deductible === 1" type="primary" link size="small"
+            @click="amountDetail(scope.row)">{{ rowNum(scope.row.amount) }}</el-button>
         </template>
       </el-table-column>
-      <el-table-column
-        label="确认人"
-        prop="confirmName"
-        width="110"
-        align="center"
-      />
-      <el-table-column
-        label="确认时间"
-        prop="confirmDate"
-        min-width="140"
-        align="center"
-      />
-      <el-table-column
-        label="操作人"
-        prop="operationName"
-        width="100"
-        align="center"
-      />
-      <el-table-column
-        label="操作时间"
-        min-width="140"
-        prop="operationDate"
-        align="center"
-      />
+      <el-table-column label="确认人" prop="confirmName" width="110" align="center" />
+      <el-table-column label="确认时间" prop="confirmDate" min-width="140" align="center" />
+      <el-table-column label="操作人" prop="operationName" width="100" align="center" />
+      <el-table-column label="操作时间" min-width="140" prop="operationDate" align="center" />
       <el-table-column label="文件查看" align="center" width="100">
         <template #default="scope">
-          <el-button
-            v-if="scope.row.status === 2"
-            size="small"
-            type="primary"
-            link
-            @click="showFiles(scope.row)"
-            >查看文件</el-button
-          >
+          <el-button v-if="scope.row.status === 2" size="small" type="primary" link
+            @click="showFiles(scope.row)">查看文件</el-button>
           <span v-else>--</span>
         </template>
       </el-table-column>
@@ -190,13 +84,8 @@
           <span v-if="scope.row.status === 0">待审核</span>
           <span v-if="scope.row.status === 1">可扣款</span>
           <span v-if="scope.row.status === 2">已扣款</span>
-          <el-tooltip
-            v-if="scope.row.status === 4"
-            :content="
-              scope.row.failureType === 1 ? scope.row.failureResult : '余额不足'
-            "
-            placement="top"
-          >
+          <el-tooltip v-if="scope.row.status === 4" :content="scope.row.failureType === 1 ? scope.row.failureResult : '余额不足'
+              " placement="top">
             <span>扣款失败</span>
           </el-tooltip>
           <span v-if="scope.row.status === 5">已申报</span>
@@ -205,76 +94,32 @@
       <el-table-column label="操作" fixed="right" width="220" align="center">
         <template #default="scope">
           <template v-if="scope.row.deductible === 1">
-            <template
-              v-if="
-                (scope.row.status === 0 || scope.row.status === 4) &&
-                checkConfirm(scope.row)
-              "
-            >
-              <el-button
-                v-hasPermi="['business:deduction:confirm']"
-                link
-                type="primary"
-                size="small"
-                @click="showConfirm(scope.row)"
-                >确认扣款</el-button
-              >
+            <template v-if="(scope.row.status === 0 || scope.row.status === 4) &&
+              checkConfirm(scope.row)
+              ">
+              <el-button v-hasPermi="['business:deduction:confirm']" link type="primary" size="small"
+                @click="showConfirm(scope.row)">确认扣款</el-button>
             </template>
             <div v-if="scope.row.sourceName === '公积金'">
               <template v-if="scope.row.status === 1">
-                <el-button
-                  link
-                  v-hasPermi="['business:deduction:declare']"
-                  style="margin-right: 5px"
-                  type="primary"
-                  size="small"
-                  @click="applySuccess(scope.row, 5)"
-                  >申报成功</el-button
-                >
+                <el-button link v-hasPermi="['business:deduction:declare']" style="margin-right: 5px" type="primary"
+                  size="small" @click="applySuccess(scope.row, 5)">申报成功</el-button>
               </template>
             </div>
             <div v-if="scope.row.sourceName === '公积金'">
               <template v-if="scope.row.status === 5">
-                <el-button
-                  link
-                  v-hasPermi="['business:deduction:deduction']"
-                  style="margin-right: 5px"
-                  type="primary"
-                  size="small"
-                  @click="openUpload(scope.row)"
-                  >扣款成功</el-button
-                >
-                <el-button
-                  link
-                  v-hasPermi="['business:deduction:deduction']"
-                  style="margin-left: 5px; :5px "
-                  type="primary"
-                  size="small"
-                  @click="showFeedbackDialog(scope.row)"
-                  >扣款失败</el-button
-                >
+                <el-button link v-hasPermi="['business:deduction:deduction']" style="margin-right: 5px" type="primary"
+                  size="small" @click="openUpload(scope.row)">扣款成功</el-button>
+                <el-button link v-hasPermi="['business:deduction:deduction']" style="margin-left: 5px; " type="primary"
+                  size="small" @click="showFeedbackDialog(scope.row)">扣款失败</el-button>
               </template>
             </div>
             <div v-else>
               <template v-if="scope.row.status === 1">
-                <el-button
-                  link
-                  v-hasPermi="['business:deduction:deduction']"
-                  style="margin-right: 5px"
-                  type="primary"
-                  size="small"
-                  @click="openUpload(scope.row)"
-                  >扣款成功</el-button
-                >
-                <el-button
-                  link
-                  v-hasPermi="['business:deduction:deduction']"
-                  style="margin-left: 5px; :5px "
-                  type="primary"
-                  size="small"
-                  @click="showFeedbackDialog(scope.row)"
-                  >扣款失败</el-button
-                >
+                <el-button link v-hasPermi="['business:deduction:deduction']" style="margin-right: 5px" type="primary"
+                  size="small" @click="openUpload(scope.row)">扣款成功</el-button>
+                <el-button link v-hasPermi="['business:deduction:deduction']" style="margin-left: 5px; " type="primary"
+                  size="small" @click="showFeedbackDialog(scope.row)">扣款失败</el-button>
               </template>
             </div>
           </template>
@@ -282,14 +127,7 @@
       </el-table-column>
     </el-table>
     <!-- <Deposit-form ref="DepositRef" :get-list="getList" /> -->
-    <el-dialog
-      title="扣款信息"
-      v-model="formOpen"
-      width="500px"
-      append-to-body
-      draggable
-      @close="formCancel"
-    >
+    <el-dialog title="扣款信息" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel">
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
@@ -300,57 +138,23 @@
           <el-col :span="24">
             <el-form-item label="凭证附件:" required>
               <div class="details-btns-container" style="display: flex">
-                <el-upload
-                  action="#"
-                  :http-request="upload"
-                  :with-credentials="true"
-                  :show-file-list="false"
-                  multiple
-                >
-                  <el-button size="small" type="primary" icon="Upload"
-                    >点击上传</el-button
-                  >
+                <el-upload action="#" :http-request="upload" :with-credentials="true" :show-file-list="false" multiple>
+                  <el-button size="small" type="primary" icon="Upload">点击上传</el-button>
                 </el-upload>
               </div>
-              <el-table
-                ref="filesTable"
-                :data="form.files"
-                size="small"
-                height="200px"
-                border
-                header-row-class-name="list-header-row"
-              >
-                <el-table-column
-                  type="index"
-                  label="序号"
-                  width="47"
-                  align="center"
-                />
-                <el-table-column
-                  label="文件名"
-                  prop="originalFileName"
-                  align="center"
-                >
+              <el-table ref="filesTable" :data="form.files" size="small" height="200px" border
+                header-row-class-name="list-header-row">
+                <el-table-column type="index" label="序号" width="47" align="center" />
+                <el-table-column label="文件名" prop="originalFileName" align="center">
                   <template #default="scope">
-                    <el-link
-                      :href="`${baseUrl}${scope.row.fileUrl}`"
-                      :underline="false"
-                      target="_blank"
-                      type="primary"
-                    >
+                    <el-link :href="`${baseUrl}${scope.row.fileUrl}`" :underline="false" target="_blank" type="primary">
                       {{ scope.row.originalFileName }}
                     </el-link>
                   </template>
                 </el-table-column>
                 <el-table-column label="操作" width="47" align="center">
                   <template #default="scope">
-                    <el-button
-                      link
-                      size="small"
-                      type="danger"
-                      @click="handleDelFile(scope.$index)"
-                      >删除</el-button
-                    >
+                    <el-button link size="small" type="danger" @click="handleDelFile(scope.$index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -360,128 +164,58 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button
-            type="primary"
-            size="small"
-            icon="Finished"
-            @click="saveHandler"
-            >确 定</el-button
-          >
-          <el-button icon="close" size="small" @click="formCancel"
-            >取 消</el-button
-          >
+          <el-button type="primary" size="small" icon="Finished" @click="saveHandler">确 定</el-button>
+          <el-button icon="close" size="small" @click="formCancel">取 消</el-button>
         </div>
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <el-image-viewer
-      v-if="showViewer"
-      :url-list="currentFileList"
-      @close="closeImages"
-      :initial-index="showIndex"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <el-image-viewer v-if="showViewer" :url-list="currentFileList" @close="closeImages" :initial-index="showIndex" />
     <feedbackDialog ref="feedbackDialogRef" :verify="verifyDeduction" />
     <FileDialog ref="fileDialog" />
     <MergeTaxViewDialog ref="mergeTaxViewDialog" />
     <HousingFundViewDialog ref="housingFundViewDialog" />
     <SocialSecurityViewDialog ref="socialSecurityViewDialog" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog
-      title="更多搜索"
-      v-model="moreSearch"
-      width="620px"
-      append-to-body
-      draggable
-    >
-      <el-form
-        :model="queryParams"
-        ref="queryRef"
-        size="small"
-        label-width="100"
-      >
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable>
+      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="客户名称:">
-              <el-input
-                v-model.trim="queryParams.companyName"
-                size="small"
-                type="text"
-                placeholder="客户名称"
-                :clearable="true"
-              />
+              <el-input v-model.trim="queryParams.companyName" size="small" type="text" placeholder="客户名称"
+                :clearable="true" />
             </el-form-item>
             <el-form-item label="来源名:" prop="sourceNames">
-              <el-select
-                v-model="queryParams.sourceNames"
-                placeholder="请选择来源名"
-                multiple
-              >
-                <el-option
-                  v-for="item in sources"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="queryParams.sourceNames" placeholder="请选择来源名" multiple>
+                <el-option v-for="item in sources" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
 
             <el-form-item label="来源:" prop="fromCompanyName">
-              <el-input
-                size="small"
-                v-model="queryParams.fromCompanyName"
-                type="text"
-                placeholder="客户来源"
-                :clearable="true"
-              />
+              <el-input size="small" v-model="queryParams.fromCompanyName" type="text" placeholder="客户来源"
+                :clearable="true" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="纳税性质:" prop="taxType">
-              <el-select
-                size="small"
-                v-model="queryParams.taxType"
-                placeholder="请选择纳税性质"
-                :clearable="true"
-                @change="taxTypeChange"
-              >
-                <el-option
-                  v-for="item in taxTypes"
-                  :key="item.label"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true"
+                @change="taxTypeChange">
+                <el-option v-for="item in taxTypes" :key="item.label" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-form-item label="所属期:">
-              <el-date-picker
-                v-model="queryParams.currentMonth"
-                type="month"
-                format="YYYY年MM月"
-                value-format="YYYY-MM"
-              />
+              <el-date-picker v-model="queryParams.currentMonth" type="month" format="YYYY年MM月"
+                value-format="YYYY-MM" />
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button
-            type="primary"
-            icon="Finished"
-            size="small"
-            @click="handleQuery"
-            >确 定</el-button
-          >
-          <el-button icon="close" size="small" @click="moreSearch = false"
-            >取 消</el-button
-          >
+          <el-button type="primary" icon="Finished" size="small" @click="handleQuery">确 定</el-button>
+          <el-button icon="close" size="small" @click="moreSearch = false">取 消</el-button>
         </div>
       </template>
     </el-dialog>
@@ -688,7 +422,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => {});
+    .catch(() => { });
 }
 
 /** 导出按钮操作 */
@@ -777,7 +511,7 @@ function handleDelFile(index) {
 
 function amountDetail(row) {
   const item = {
-    year: proxy.moment().format("YYYY"),
+    year: proxy.moment().subtract(1, "months").format("YYYY"),
     month: proxy.moment().subtract(1, "months").format("MM"),
   };
   switch (row.sourceName) {

+ 1 - 0
src/views/business/entrust/deduct/form.vue

@@ -543,6 +543,7 @@ function getForm() {
   getDeduct(form.value.id).then((response) => {
     form.value = response.data;
     editStatus.value = false;
+    loading.value = false;
   });
 }
 

+ 1 - 0
src/views/business/entrust/statementAccount/form.vue

@@ -662,6 +662,7 @@ function submitForm() {
     return;
   }
   proxy.$modal.confirm("确认保存么").then((res) => {
+    form.value.status = 0;
     if (form.value.id == null) {
       addDeduct(form.value).then((res) => {
         cancel();

+ 6 - 5
src/views/business/financial/payment/form.vue

@@ -270,7 +270,8 @@
                   v-if="editStatus"
                   v-model.trim="form.amount"
                   size="small"
-                  placeholder="收款金额"
+                  readonly
+                  placeholder="支出金额"
                   :clearable="true"
                   :precision="2"
                   controls-position="right"
@@ -879,7 +880,7 @@ function cashierVerifyUpload() {
     cashierForm.value.actuallyDate == null ||
     cashierForm.value.actuallyDate === ""
   ) {
-    proxy.$modal.msgError("0");
+    proxy.$modal.msgError("请选择支出时间");
     return;
   }
 
@@ -941,10 +942,10 @@ function amountChange() {
       amount = amount + form.value.details[i].paymentAmount;
     }
     // 判断到款状态
-    form.value.paymentAmount = amount;
-    if (form.value.paymentAmount > 0)
+    form.value.amount = amount;
+    if (form.value.payedAmount > 0)
       form.value.arriveStatus =
-        form.value.paymentAmount === form.value.amount ? 1 : 2;
+        form.value.payedAmount === form.value.amount ? 1 : 2;
     else form.value.arriveStatus = 0;
   }
 }

+ 199 - 55
src/views/business/paymentEntry/type/index.vue

@@ -6,7 +6,8 @@
         <div class="page-container list-container">
           <!--操作按钮 开始-->
           <div>
-            <span style="
+            <span
+              style="
                 display: inline-block;
                 height: 20px;
                 line-height: 18px;
@@ -15,63 +16,133 @@
                 margin-top: 5px;
                 font-weight: 700;
                 border-left: 3px;
-              ">支出类目</span>
-            <el-button type="primary" size="small" v-hasPermi="['paymentEntry:type:add']" icon="plus" @click="newType">
-              新增</el-button>
+              "
+              >支出类目</span
+            >
+            <el-button
+              type="primary"
+              size="small"
+              v-hasPermi="['paymentEntry:type:add']"
+              icon="plus"
+              @click="newType"
+            >
+              新增</el-button
+            >
 
-            <el-button type="success" size="small" icon="refresh" @click="loadData">
-              刷新</el-button>
+            <el-button
+              type="success"
+              size="small"
+              icon="refresh"
+              @click="loadData"
+            >
+              刷新</el-button
+            >
           </div>
-          <div class="el-table-container" style="height: 100%; position: relative; overflow: auto">
-            <div style="
+          <div
+            class="el-table-container"
+            style="height: 100%; position: relative; overflow: auto"
+          >
+            <div
+              style="
                 height: 100%;
                 position: absolute;
                 top: 0;
                 left: 0;
                 right: 0;
                 bottom: 0;
-              ">
-              <el-table class="table-falex" v-loading="loading" :data="typeList" size="small" border height="100%"
-                @row-click="rowClick" @selection-change="handleSelectionChange" highlight-current-row="true">
+              "
+            >
+              <el-table
+                class="table-falex"
+                v-loading="loading"
+                :data="typeList"
+                size="small"
+                border
+                height="100%"
+                @row-click="rowClick"
+                @selection-change="handleSelectionChange"
+                highlight-current-row="true"
+              >
                 <el-table-column label="支出类目" align="center" prop="name">
                   <template #default="scope">
-                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.name"
-                      placeholder="请输入支出类目"></el-input>
+                    <el-input
+                      size="small"
+                      v-if="scope.row.isAdd || scope.row.isEdit"
+                      v-model="scope.row.name"
+                      placeholder="请输入支出类目"
+                    ></el-input>
                     <span v-else>{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
 
                 <el-table-column label="备注" align="center" prop="remark">
                   <template #default="scope">
-                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.remark"
-                      placeholder="请输入备注"></el-input>
+                    <el-input
+                      size="small"
+                      v-if="scope.row.isAdd || scope.row.isEdit"
+                      v-model="scope.row.remark"
+                      placeholder="请输入备注"
+                    ></el-input>
                     <span v-else>{{ scope.row.remark }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <el-table-column
+                  label="操作"
+                  align="center"
+                  class-name="small-padding fixed-width"
+                >
                   <template #default="scope">
-                    <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="warning" size="small"
-                      @click="handleUpdate(scope.row)" circle v-hasPermi="['paymentEntry:type:edit']">修改</el-button>
-                    <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="danger" size="small"
-                      @click="handleDelete(scope.row)" v-hasPermi="['paymentEntry:type:remove']">删除</el-button>
-                    <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="primary" size="small"
-                      @click="typeleSave(scope.row)">保存</el-button>
-                    <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="Delete" size="small"
-                      @click="handleCancel(scope.row)">取消</el-button>
+                    <template v-if="!scope.row.isAdd && !scope.row.isEdit">
+                      <el-button
+                        v-show="!scope.row.isAdd && !scope.row.isEdit"
+                        link
+                        type="warning"
+                        size="small"
+                        @click="handleUpdate(scope.row)"
+                        circle
+                        v-hasPermi="['paymentEntry:type:edit']"
+                        >修改</el-button
+                      >
+                      <el-button
+                        v-show="!scope.row.isAdd && !scope.row.isEdit"
+                        link
+                        type="danger"
+                        size="small"
+                        @click="handleDelete(scope.row)"
+                        v-hasPermi="['paymentEntry:type:remove']"
+                        >删除</el-button
+                      >
+                    </template>
+                    <template v-if="scope.row.isEdit || scope.row.isAdd">
+                      <el-button
+                        v-if="scope.row.isEdit || scope.row.isAdd"
+                        link
+                        type="primary"
+                        size="small"
+                        @click="typeleSave(scope.row)"
+                        >保存</el-button
+                      >
+                      <el-button
+                        v-if="scope.row.isEdit || scope.row.isAdd"
+                        link
+                        type="Delete"
+                        size="small"
+                        @click="handleCancel(scope.row)"
+                        >取消</el-button
+                      >
+                    </template>
                   </template>
                 </el-table-column>
               </el-table>
             </div>
           </div>
-          <!--员工部门列表数据 结束-->
         </div>
       </el-col>
       <el-col :span="14" style="height: 100%">
-        <!--员工列表 开始-->
         <div class="page-container list-container">
-          <!--操作按钮 开始-->
           <div>
-            <span style="
+            <span
+              style="
                 display: inline-block;
                 height: 20px;
                 line-height: 18px;
@@ -80,47 +151,116 @@
                 margin-top: 5px;
                 font-weight: 700;
                 border-left: 3px;
-              ">支付科目</span>
+              "
+              >支付科目</span
+            >
             <template v-if="currentDepartment !== null">
-              <el-button type="primary" size="small" icon="plus" v-hasPermi="['expenditure:subject:add']"
-                @click="newSubType">新增</el-button>
+              <el-button
+                type="primary"
+                size="small"
+                icon="plus"
+                v-hasPermi="['expenditure:subject:add']"
+                @click="newSubType"
+                >新增</el-button
+              >
             </template>
-            <el-button type="success" size="small" icon="refresh" @click="loadSubData">
-              刷新</el-button>
+            <el-button
+              type="success"
+              size="small"
+              icon="refresh"
+              @click="loadSubData"
+            >
+              刷新</el-button
+            >
           </div>
-          <!--支付科目列表数据 开始-->
           <div class="el-table-container" style="height: 100%">
             <div style="height: 100%">
-              <el-table v-loading="loading" :data="typeSubLis" size="small" border height="100%"
-                @selection-change="handleSelectionChange">
+              <el-table
+                v-loading="loading"
+                :data="typeSubLis"
+                size="small"
+                border
+                height="100%"
+                @selection-change="handleSelectionChange"
+              >
                 <el-table-column label="支付科目" align="center" prop="name">
                   <template #default="scope">
-                    <el-input size="small" v-if="scope.row.isAdd || scope.row.isEdit" v-model="scope.row.name"
-                      placeholder="请输入支付科目"></el-input>
+                    <el-input
+                      size="small"
+                      v-if="scope.row.isAdd || scope.row.isEdit"
+                      v-model="scope.row.name"
+                      placeholder="请输入支付科目"
+                    ></el-input>
                     <span v-else>{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="状态" align="center" prop="status">
                   <template #default="scope">
-                    <el-select size="small" style="width: 100%" v-if="scope.row.isAdd || scope.row.isEdit"
-                      v-model.trim="scope.row.status" placeholder="选择状态" :clearable="true">
-                      <el-option v-for="item in subType" :key="item.label" :label="item.label" :value="item.value" />
+                    <el-select
+                      size="small"
+                      style="width: 100%"
+                      v-if="scope.row.isAdd || scope.row.isEdit"
+                      v-model.trim="scope.row.status"
+                      placeholder="选择状态"
+                      :clearable="true"
+                    >
+                      <el-option
+                        v-for="item in subType"
+                        :key="item.label"
+                        :label="item.label"
+                        :value="item.value"
+                      />
                     </el-select>
                     <span v-else>{{
                       scope.row.status === 0 ? "启用" : "停用"
                     }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <el-table-column
+                  label="操作"
+                  align="center"
+                  class-name="small-padding fixed-width"
+                >
                   <template #default="scope">
-                    <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="warning" size="small"
-                      @click="handleUpdate(scope.row)" circle v-hasPermi="['expenditure:subject:edit']">修改</el-button>
-                    <el-button v-show="!scope.row.isAdd && !scope.row.isEdit" link type="danger" size="small"
-                      @click="handleSubDelete(scope.row)" v-hasPermi="['expenditure:subject:remove']">删除</el-button>
-                    <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="primary" size="small"
-                      @click="typeSubSave(scope.row)">保存</el-button>
-                    <el-button v-if="scope.row.isEdit || scope.row.isAdd" link type="Delete" size="small"
-                      @click="subCancel(scope.row)">取消</el-button>
+                    <template v-if="!scope.row.isAdd && !scope.row.isEdit">
+                      <el-button
+                        v-show="!scope.row.isAdd && !scope.row.isEdit"
+                        link
+                        type="warning"
+                        size="small"
+                        @click="handleUpdate(scope.row)"
+                        circle
+                        v-hasPermi="['expenditure:subject:edit']"
+                        >修改</el-button
+                      >
+                      <el-button
+                        v-show="!scope.row.isAdd && !scope.row.isEdit"
+                        link
+                        type="danger"
+                        size="small"
+                        @click="handleSubDelete(scope.row)"
+                        v-hasPermi="['expenditure:subject:remove']"
+                        >删除</el-button
+                      >
+                    </template>
+                    <template v-if="scope.row.isEdit || scope.row.isAdd">
+                      <el-button
+                        v-if="scope.row.isEdit || scope.row.isAdd"
+                        link
+                        type="primary"
+                        size="small"
+                        @click="typeSubSave(scope.row)"
+                        >保存</el-button
+                      >
+                      <el-button
+                        v-if="scope.row.isEdit || scope.row.isAdd"
+                        link
+                        type="Delete"
+                        size="small"
+                        @click="subCancel(scope.row)"
+                        >取消</el-button
+                      >
+                    </template>
                   </template>
                 </el-table-column>
               </el-table>
@@ -129,9 +269,13 @@
         </div>
       </el-col>
     </el-row>
-    <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="loadSubData" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="loadSubData"
+    />
   </div>
 </template>
 
@@ -394,7 +538,7 @@ function handleDelete(row) {
         getList();
         proxy.$modal.msgSuccess("删除成功!");
       })
-      .catch(() => { });
+      .catch(() => {});
   });
 }
 /** 科目删除按钮操作 */
@@ -410,7 +554,7 @@ function handleSubDelete(row) {
       getTypeSubList(queryParams.value);
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */

+ 53 - 114
src/views/business/tenant/init.vue

@@ -4,21 +4,13 @@
     <el-drawer :title="title" v-model="visible" direction="rtl" size="100%">
       <div class="page-container form-container">
         <div class="form-btns-container">
-          <span class="title-label"
-            ><el-icon>
+          <span class="title-label"><el-icon>
               <Document />
             </el-icon>
-            {{ tenant.accountName }} 企业初始化</span
-          >
+            {{ tenant.accountName }} 企业初始化</span>
           <el-button-group>
-            <el-button
-              v-hasPermi="['business:tenant:edit']"
-              type="primary"
-              size="small"
-              icon="Finished"
-              @click="initHandler"
-              >开始初始化</el-button
-            >
+            <el-button v-hasPermi="['business:tenant:edit']" type="primary" size="small" icon="Finished"
+              @click="initHandler">开始初始化</el-button>
           </el-button-group>
           <div class="screen-btn" @click="handleScreen">
             <template v-if="!isFullscreen">
@@ -35,18 +27,8 @@
             <!-- <span>关闭</span> -->
           </div>
         </div>
-        <div
-          class="Y-scrollbar"
-          style="position: absolute top: 32px bottom: 0 width: 100% overflow: auto"
-        ></div>
-        <el-form
-          ref="tenantRef"
-          class="master-container"
-          size="size"
-          :model="form"
-          :rules="rules"
-          label-width="140px"
-        >
+        <div class="Y-scrollbar" style="position: absolute; top: 32px; bottom: 0; width: 100%; overflow: auto;"></div>
+        <el-form ref="tenantRef" class="master-container" size="size" :model="form" :rules="rules" label-width="140px">
           <el-row :gutter="10">
             <el-col :span="24">
               <el-card class="card" style="margin-bottom: 10px">
@@ -64,60 +46,40 @@
                       </el-collapse-item> -->
                       <el-collapse-item name="1">
                         <template #title>
-                          <el-checkbox
-                            v-model="initAdminRole"
-                          />初始化管理员角色
-                          <span
-                            :style="{
-                              color: checkAdminRole ? 'green' : 'red',
-                              paddingLeft: '10px',
-                            }"
-                            >{{
-                              checkAdminRole
-                                ? "已初始化管理员角色"
-                                : "未初始化管理员角色"
-                            }}</span
-                          >
+                          <el-checkbox v-model="initAdminRole" />初始化管理员角色
+                          <span :style="{
+      color: checkAdminRole ? 'green' : 'red',
+      paddingLeft: '10px',
+    }">{{
+      checkAdminRole
+        ? "已初始化管理员角色"
+        : "未初始化管理员角色"
+    }}</span>
                         </template>
                       </el-collapse-item>
                       <el-collapse-item name="2">
                         <template #title>
                           <el-checkbox v-model="initAdminSysUser" />
                           初始化管理员
-                          <span
-                            :style="{
-                              color: checkAdmin ? 'green' : 'red',
-                              paddingLeft: '10px',
-                            }"
-                            >{{
-                              checkAdmin ? "已初始化管理员" : "未初始化管理员"
-                            }}
+                          <span :style="{
+      color: checkAdmin ? 'green' : 'red',
+      paddingLeft: '10px',
+    }">{{
+      checkAdmin ? "已初始化管理员" : "未初始化管理员"
+    }}
                           </span>
                         </template>
                         <template #default>
                           <el-form-item label="管理员账号">
-                            <el-input
-                              v-model="admin.userName"
-                              placeholder="请输入账号"
-                            />
+                            <el-input v-model="admin.userName" placeholder="请输入账号" />
                           </el-form-item>
                           <el-form-item label="管理员昵称">
-                            <el-input
-                              v-model="admin.nickName"
-                              placeholder="请输入"
-                            />
+                            <el-input v-model="admin.nickName" placeholder="请输入" />
                           </el-form-item>
                           <el-form-item label="性别">
-                            <el-select
-                              v-model="admin.gender"
-                              placeholder="请选择"
-                            >
-                              <el-option
-                                v-for="dict in sys_user_sex"
-                                :key="dict.value"
-                                :label="dict.label"
-                                :value="dict.value"
-                              ></el-option>
+                            <el-select v-model="admin.gender" placeholder="请选择">
+                              <el-option v-for="dict in sys_user_sex" :key="dict.value" :label="dict.label"
+                                :value="dict.value"></el-option>
                             </el-select>
                           </el-form-item>
                         </template>
@@ -126,60 +88,40 @@
                         <template #title>
                           <el-checkbox v-model="initDept" />
                           初始化默认部门
-                          <span
-                            :style="{
-                              color: initDept ? 'green' : 'red',
-                              paddingLeft: '10px',
-                            }"
-                            >{{
-                              initDept ? "已初始化默认部门" : "未初始化默认部门"
-                            }}
+                          <span :style="{
+      color: initDept ? 'green' : 'red',
+      paddingLeft: '10px',
+    }">{{
+      initDept ? "已初始化默认部门" : "未初始化默认部门"
+    }}
                           </span>
                         </template>
                         <template #default>
                           <el-form-item label="部门名称">
-                            <el-input
-                              v-model="dept.deptName"
-                              placeholder="请输入账号"
-                            />
+                            <el-input v-model="dept.deptName" placeholder="请输入账号" />
                           </el-form-item>
                         </template>
                       </el-collapse-item>
                       <el-collapse-item name="4">
                         <template #title>
                           <el-checkbox v-model="roleInit" />初始化默认角色
-                          <span
-                            :style="{
-                              color: checkRole ? 'green' : 'red',
-                              paddingLeft: '10px',
-                            }"
-                            >{{
-                              checkRole
-                                ? "已初始化默认角色"
-                                : "未初始化默认角色"
-                            }}</span
-                          >
+                          <span :style="{
+      color: checkRole ? 'green' : 'red',
+      paddingLeft: '10px',
+    }">{{
+      checkRole
+        ? "已初始化默认角色"
+        : "未初始化默认角色"
+    }}</span>
                         </template>
                         <template #default>
                           <el-row>
                             <el-col :span="8">
-                              <el-table
-                                ref="roleRef"
-                                :data="roleList"
-                                border
-                                fit
-                                highlight-current-row
-                                @row-click="rowClick"
-                                @selection-change="roleSelectionChange"
-                                size="small"
-                              >
+                              <el-table ref="roleRef" :data="roleList" border fit highlight-current-row
+                                @row-click="rowClick" @selection-change="roleSelectionChange" size="small">
                                 <el-table-column type="selection" width="55" />
                                 <el-table-column type="index" width="50" />
-                                <el-table-column
-                                  label="角色名称"
-                                  align="center"
-                                  prop="roleName"
-                                />
+                                <el-table-column label="角色名称" align="center" prop="roleName" />
                               </el-table>
                             </el-col>
                           </el-row>
@@ -189,17 +131,14 @@
                         <template #title>
                           <el-checkbox v-model="sourceInit" />
                           初始化其他默认数据
-                          <span
-                            :style="{
-                              color: checkSource ? 'green' : 'red',
-                              paddingLeft: '10px',
-                            }"
-                            >{{
-                              checkSource
-                                ? "已初始化其他默认数据"
-                                : "未初始化其他默认数据"
-                            }}</span
-                          >
+                          <span :style="{
+      color: checkSource ? 'green' : 'red',
+      paddingLeft: '10px',
+    }">{{
+      checkSource
+        ? "已初始化其他默认数据"
+        : "未初始化其他默认数据"
+    }}</span>
                         </template>
                         <template #default> </template>
                       </el-collapse-item>
@@ -223,7 +162,7 @@ const { sys_user_sex } = proxy.useDict("sys_user_sex");
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => {},
+    default: () => { },
   },
 });
 const { getList } = toRefs(props);

+ 1 - 0
src/views/system/config/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="page-container list-container">
     <div :gutter="10" class="list-btns-container">
+
       <el-button size="small" type="primary" icon="Plus" @click="handleAdd"
         v-hasPermi="['system:config:add']">新增</el-button>