ly 1 سال پیش
والد
کامیت
7df32b1a81

+ 15 - 14
src/views/business/crm/company/index.vue

@@ -23,7 +23,8 @@
         </template>
       </el-dropdown>
 
-      <el-button style="margin-left: 5px;" type="primary" size="small" icon="Plus" @click="exportZero">导入是否零申报</el-button>
+      <el-button style="margin-left: 5px;" type="primary" size="small" icon="Plus"
+        @click="exportZero">导入是否零申报</el-button>
     </div>
     <!-- 搜索区 -->
     <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true">
@@ -44,16 +45,14 @@
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-     
-      </el-tab-pane>
-
-      <el-tab-pane label="我的" name="second">
-     
-         
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+      <el-tab-pane label=" 全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -109,7 +108,8 @@
     <exportColumn ref="exportColumnRef"></exportColumn>
     <add ref="addRef" :get-list="getList"></add>
     <exports ref="exportRef" :get-list="getList"></exports>
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable @close="cancel" :close-on-click-modal = "false">
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body draggable @close="cancel"
+      :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" :rules="rules" label-width="100">
         <el-form-item :label="title" :prop="content">
           <el-autocomplete style="width: 100%" :fetch-suggestions="querySearchAsync" :trigger-on-focus="true"
@@ -147,7 +147,7 @@
   import companyForm from "./form";
   import { listUser } from "@/api/system/user";
   import add from "./add.vue";
-  import exports  from "./export.vue"
+  import exports from "./export.vue"
   import { addBin } from "@/api/business/bin";
   import {
     listCompany,
@@ -173,6 +173,7 @@
   const total = ref(0);
   const choiceType = ref("");
   const flag = ref(checkPermission(['business:customer:person']))
+  const flag2 = ref(checkPermission(['business:customer:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const open = ref(false);
   const title = ref("");
@@ -229,7 +230,7 @@
   function resetQuery() {
     proxy.resetForm("queryRef");
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 365 - 362
src/views/business/deduction/index.vue

@@ -48,12 +48,14 @@
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -126,12 +128,12 @@
                 <el-button link v-hasPermi="['business:deduction:deduction']" style="margin-left: 5px; " type="primary"
                   size="small" @click="showFeedbackDialog(scope.row)">扣款失败</el-button>
               </div>
-             
+
             </div>
           </div>
           <div v-if="scope.row.status === 2">
-            <el-button link  style="margin-left: 5px; " type="primary"
-            size="small" @click="returnInit(scope.row)" v-hasPermi="['business:deduction:return']">退回</el-button>
+            <el-button link style="margin-left: 5px; " type="primary" size="small" @click="returnInit(scope.row)"
+              v-hasPermi="['business:deduction:return']">退回</el-button>
           </div>
         </template>
       </el-table-column>
@@ -233,226 +235,227 @@
 </template>
 
 <script setup name="Company">
-import {
-  listDeduction,
-  exportDeposition,
-  saveDeduction
-} from "@/api/business/production/deduction";
-import MergeTaxViewDialog from "./MergeTaxViewDialog";
-import feedbackDialog from "./feedbackDialog";
-import { uploadFile } from "@/api/tool/file";
-import { rowNum } from "@/utils/index";
-import { listCompany } from "@/api/business/crm/company";
-import { taxTypes } from "@/utils/default";
-import useUserStore from "@/store/modules/user";
-import { getTenant } from "@/utils/auth";
-import { ref } from "vue";
-import FileDialog from "../../dialog/fileDialog.vue";
-import HousingFundViewDialog from "./HousingFundViewDialog";
-import SocialSecurityViewDialog from "./SocialSecurityViewDialog";
-
-// import DepositForm from "./form"
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-const tenant = useUserStore().tenant;
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const oneself = ref(false);
-const moreSearch = ref(false);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const queryRadio = ref("全部");
-const permissions = useUserStore().permissions;
-const flag = ref(checkPermission(['business:deduction:person']))
-const activeName = flag.value ? ref('first') : ref('second');
-const sources = ref([
-  {
-    value: "税款",
-    label: "税款",
-  },
-  {
-    value: "社保",
-    label: "社保",
-  },
-  {
-    value: "公积金",
-    label: "公积金",
-  },
-]);
-
-const formOpen = ref(false);
-
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 1,
-  files: [],
-});
-
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  noContract: 1,
-  principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listDeduction(queryParams.value).then((response) => {
-    list.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  import {
+    listDeduction,
+    exportDeposition,
+    saveDeduction
+  } from "@/api/business/production/deduction";
+  import MergeTaxViewDialog from "./MergeTaxViewDialog";
+  import feedbackDialog from "./feedbackDialog";
+  import { uploadFile } from "@/api/tool/file";
+  import { rowNum } from "@/utils/index";
+  import { listCompany } from "@/api/business/crm/company";
+  import { taxTypes } from "@/utils/default";
+  import useUserStore from "@/store/modules/user";
+  import { getTenant } from "@/utils/auth";
+  import { ref } from "vue";
+  import FileDialog from "../../dialog/fileDialog.vue";
+  import HousingFundViewDialog from "./HousingFundViewDialog";
+  import SocialSecurityViewDialog from "./SocialSecurityViewDialog";
+
+  // import DepositForm from "./form"
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const tenant = useUserStore().tenant;
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const oneself = ref(false);
+  const moreSearch = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const queryRadio = ref("全部");
+  const permissions = useUserStore().permissions;
+  const flag = ref(checkPermission(['business:deduction:person']))
+  const flag2 = ref(checkPermission(['business:deduction:myself']))
+  const activeName = flag.value ? ref('first') : ref('second');
+  const sources = ref([
+    {
+      value: "税款",
+      label: "税款",
+    },
+    {
+      value: "社保",
+      label: "社保",
+    },
+    {
+      value: "公积金",
+      label: "公积金",
+    },
+  ]);
+
+  const formOpen = ref(false);
+
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 1,
+    files: [],
   });
-}
 
-/** 是否为自己负责 */
-function handleOneself() {
-  if (oneself.value) {
-    queryParams.value.principal = useUserStore().user.userId;
-  } else {
-    queryParams.value.principal = null;
-  }
-  getList();
-}
-function returnInit(row){
-  row.status = 0;
-  saveDeduction(row).then(res=>{
-    getList();
-  })
-}
-function radioChangeHandler(arg) {
-  const query = {
-    pageNum: 1,
-    pageSize: 20,
+  const emptyForm = {
+    id: null,
     companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
   };
-  switch (arg) {
-    case "全部":
-      query.status = null;
-      break;
-    case "待确认扣款":
-      query.status = 0;
-      break;
-    case "可扣款":
-      query.status = 1;
-      break;
-    case "已扣款":
-      query.status = 2;
-      break;
-    case "已申报":
-      query.status = 5;
-      break;
-    case "扣款失败":
-      query.status = 4;
-      break;
-    default:
-      break;
-  }
-  queryParams.value = query;
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
-    }
-  handleQuery();
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  moreSearch.value = false;
-  getList();
-}
 
-/** 重置按钮操作 */
-function resetQuery() {
-  // proxy.resetForm("queryRef");
-  queryParams.value = {
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
     pageNum: 1,
     pageSize: 20,
     companyName: "",
     orderByColumn: "create_time",
     noContract: 1,
-  };
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
+  });
+
+  /***********************  方法区  ****************************/
+
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listDeduction(queryParams.value).then((response) => {
+      list.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
+
+  /** 是否为自己负责 */
+  function handleOneself() {
+    if (oneself.value) {
+      queryParams.value.principal = useUserStore().user.userId;
+    } else {
+      queryParams.value.principal = null;
     }
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.DepositRef.open();
-  formOpen.value = true;
-}
-
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
-
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.DepositRef.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeposit(_ids);
-    })
-    .then(() => {
+    getList();
+  }
+  function returnInit(row) {
+    row.status = 0;
+    saveDeduction(row).then(res => {
       getList();
-      proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  exportDeposition(queryParams.value);
-}
-function checkPermission(templatePermission) {
+  }
+  function radioChangeHandler(arg) {
+    const query = {
+      pageNum: 1,
+      pageSize: 20,
+      companyName: "",
+    };
+    switch (arg) {
+      case "全部":
+        query.status = null;
+        break;
+      case "待确认扣款":
+        query.status = 0;
+        break;
+      case "可扣款":
+        query.status = 1;
+        break;
+      case "已扣款":
+        query.status = 2;
+        break;
+      case "已申报":
+        query.status = 5;
+        break;
+      case "扣款失败":
+        query.status = 4;
+        break;
+      default:
+        break;
+    }
+    queryParams.value = query;
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
+    }
+    handleQuery();
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    moreSearch.value = false;
+    getList();
+  }
+
+  /** 重置按钮操作 */
+  function resetQuery() {
+    // proxy.resetForm("queryRef");
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      companyName: "",
+      orderByColumn: "create_time",
+      noContract: 1,
+    };
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
+    }
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.DepositRef.open();
+    formOpen.value = true;
+  }
+
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
+
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
+
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.DepositRef.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeposit(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportDeposition(queryParams.value);
+  }
+  function checkPermission(templatePermission) {
     const all_permission = "*:*:*";
     const permissions = useUserStore().permissions;
     const hasPermissions = permissions.some((permission) => {
@@ -472,161 +475,161 @@ function checkPermission(templatePermission) {
       handleOneself()
     }
   }
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
-
-function saveHandler() {
-  if (form.value.amount == null || form.value.amount === 0) {
-    proxy.$modal.msgError("请输入存款金额");
-    return;
-  }
-  if (form.value.files.length === 0) {
-    proxy.$modal.msgError("请上传凭证附件");
-    return;
-  }
-  form.value.operationId = useUserStore().user.userId;
-  form.value.operationDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
-  form.value.status = 2;
-  saveDeduction(form.value).then((res) => {
-    formCancel();
-    getList();
-  });
-}
-
-function upload(param) {
-  const formData = new FormData();
-  formData.append("file", param.file);
-  uploadFile(formData).then((res) => {
-    if (res.code === 200) {
-      const file = {};
-      file.fileName = res.newFileName;
-      file.url = res.url;
-      file.originalFileName = res.originalFilename;
-      file.fileUrl = res.fileName;
-      file.masterId = form.value.id;
-      file.masterTableName = "biz_deduction";
-      form.value.files.push(file);
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
+
+  function saveHandler() {
+    if (form.value.amount == null || form.value.amount === 0) {
+      proxy.$modal.msgError("请输入存款金额");
+      return;
     }
-  });
-}
-
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
-
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
-
-function closeImages() {
-  showViewer.value = false;
-}
-
-function handleInfo(row) {
-  formOpen.value = true;
-  getForm(row.id);
-}
-
-function getForm(id) {
-  getDeposit(id).then((res) => {
-    form.value = res.data;
-    if (form.value == null) {
-      reset();
+    if (form.value.files.length === 0) {
+      proxy.$modal.msgError("请上传凭证附件");
+      return;
     }
-  });
-}
+    form.value.operationId = useUserStore().user.userId;
+    form.value.operationDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
+    form.value.status = 2;
+    saveDeduction(form.value).then((res) => {
+      formCancel();
+      getList();
+    });
+  }
 
-function handleDelFile(index) {
-  form.value.files.splice(index, 1);
-}
+  function upload(param) {
+    const formData = new FormData();
+    formData.append("file", param.file);
+    uploadFile(formData).then((res) => {
+      if (res.code === 200) {
+        const file = {};
+        file.fileName = res.newFileName;
+        file.url = res.url;
+        file.originalFileName = res.originalFilename;
+        file.fileUrl = res.fileName;
+        file.masterId = form.value.id;
+        file.masterTableName = "biz_deduction";
+        form.value.files.push(file);
+      }
+    });
+  }
 
-function amountDetail(row) {
-  const item = {
-    year: proxy.moment().subtract(1, "months").format("YYYY"),
-    month: proxy.moment().subtract(1, "months").format("MM"),
-  };
-  switch (row.sourceName) {
-    case "税款":
-      proxy.$refs.mergeTaxViewDialog.open(row);
-      break;
-    case "社保":
-      proxy.$refs.socialSecurityViewDialog.open(row);
-      break;
-    case "公积金":
-      proxy.$refs.housingFundViewDialog.open(row);
-      break;
-  }
-}
-
-function showFiles(row) {
-  proxy.$refs.fileDialog.open({
-    masterTableName: "biz_deduction",
-    masterId: row.id,
-  });
-}
-
-function checkConfirm(row) {
-  // console.log(row.tenantId)
-  if (row.tenantId === getTenant()) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-function showConfirm(row) {
-  proxy.$modal.confirm("确认扣款么?").then((res) => {
-    row.confirmId = useUserStore().user.userId;
-    row.confirmDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
-    row.status = 1;
-    saveDeduction(row).then((res) => {
-      getList();
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
+
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
+
+  function closeImages() {
+    showViewer.value = false;
+  }
+
+  function handleInfo(row) {
+    formOpen.value = true;
+    getForm(row.id);
+  }
+
+  function getForm(id) {
+    getDeposit(id).then((res) => {
+      form.value = res.data;
+      if (form.value == null) {
+        reset();
+      }
     });
-  });
-}
-
-function applySuccess(row, status) {
-  proxy.$modal
-    .confirm("确认公积金申报成功么?")
-    .then((_) => {
-      const value = proxy.deepClone(row);
-      value.status = status;
-      saveDeduction(value).then((res) => {
+  }
+
+  function handleDelFile(index) {
+    form.value.files.splice(index, 1);
+  }
+
+  function amountDetail(row) {
+    const item = {
+      year: proxy.moment().subtract(1, "months").format("YYYY"),
+      month: proxy.moment().subtract(1, "months").format("MM"),
+    };
+    switch (row.sourceName) {
+      case "税款":
+        proxy.$refs.mergeTaxViewDialog.open(row);
+        break;
+      case "社保":
+        proxy.$refs.socialSecurityViewDialog.open(row);
+        break;
+      case "公积金":
+        proxy.$refs.housingFundViewDialog.open(row);
+        break;
+    }
+  }
+
+  function showFiles(row) {
+    proxy.$refs.fileDialog.open({
+      masterTableName: "biz_deduction",
+      masterId: row.id,
+    });
+  }
+
+  function checkConfirm(row) {
+    // console.log(row.tenantId)
+    if (row.tenantId === getTenant()) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  function showConfirm(row) {
+    proxy.$modal.confirm("确认扣款么?").then((res) => {
+      row.confirmId = useUserStore().user.userId;
+      row.confirmDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
+      row.status = 1;
+      saveDeduction(row).then((res) => {
         getList();
       });
-    })
-    .catch((_) => {
-      proxy.$modal.msg("取消申报");
     });
-}
+  }
 
-function showFeedbackDialog(row) {
-  const value = proxy.deepClone(row);
-  value.status = 4;
-  proxy.$refs.feedbackDialogRef.open(value);
-}
+  function applySuccess(row, status) {
+    proxy.$modal
+      .confirm("确认公积金申报成功么?")
+      .then((_) => {
+        const value = proxy.deepClone(row);
+        value.status = status;
+        saveDeduction(value).then((res) => {
+          getList();
+        });
+      })
+      .catch((_) => {
+        proxy.$modal.msg("取消申报");
+      });
+  }
 
-function verifyDeduction(value) {
-  saveDeduction(value).then((res) => {
-    getList();
-  });
-}
+  function showFeedbackDialog(row) {
+    const value = proxy.deepClone(row);
+    value.status = 4;
+    proxy.$refs.feedbackDialogRef.open(value);
+  }
 
-function openUpload(row) {
-  formOpen.value = true;
-  form.value = proxy.deepClone(row);
-}
+  function verifyDeduction(value) {
+    saveDeduction(value).then((res) => {
+      getList();
+    });
+  }
 
-getList();
-</script>
+  function openUpload(row) {
+    formOpen.value = true;
+    form.value = proxy.deepClone(row);
+  }
+
+  getList();
+</script>

+ 14 - 17
src/views/business/housingFund/confirm/index.vue

@@ -36,7 +36,7 @@
       </el-form-item>
 
       <el-form-item label="审核人:" prop="verifierName">
-        <el-input size="small" v-model="queryParams.verifierName"  placeholder="请输入审核人" clearable style="width: 130px"
+        <el-input size="small" v-model="queryParams.verifierName" placeholder="请输入审核人" clearable style="width: 130px"
           @keyup.enter="handleQuery" />
       </el-form-item>
 
@@ -54,12 +54,14 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -118,17 +120,11 @@
           </template>
         </el-table-column>
       </el-table-column>
-      <el-table-column
-      label="执行人"
-      width="80"
-      align="center"
-      prop="serviceName"
-    />
-    <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-    <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-      :show-overflow-tooltip="true" />
+      <el-table-column label="执行人" width="80" align="center" prop="serviceName" />
+      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
       <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
-      :show-overflow-tooltip="true" />
+        :show-overflow-tooltip="true" />
     </el-table>
     <!-- 分页 -->
     <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
@@ -291,6 +287,7 @@
   });
   const { selectStatus, selectMonths } = toRefs(data);
   const flag = ref(checkPermission(['business:fundconfim:person']))
+  const flag2 = ref(checkPermission(['business:fundconfim:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const formDialogRef = ref(null);
   const viewDialogRef = ref(null);

+ 322 - 476
src/views/business/housingFund/declare/index.vue

@@ -8,13 +8,8 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item
-              icon="Download"
-              @click="handleExport"
-              v-hasPermi="['business:housingFundDeclare:export']"
-            >
-              导出</el-dropdown-item
-            >
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:housingFundDeclare:export']">
+              导出</el-dropdown-item>
             <!-- <el-dropdown-item type="warning" size="small" icon="Download" @click="handleArea"
               v-hasPermi="['business:deposit:export']"> area</el-dropdown-item> -->
           </el-dropdown-menu>
@@ -24,45 +19,17 @@
     <!-- 搜索区 -->
     <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入客户名称"
-          clearable
-          style="width: 150px"
-          @keyup.enter="handleQuery"
-          size="small" 
-        />
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable style="width: 150px"
+          @keyup.enter="handleQuery" size="small" />
       </el-form-item>
       <el-form-item label="所属月:">
-        <el-date-picker
-          v-model="currentMonth"
-          type="month"
-          format="YYYY年MM月"
-          :clearable="false"
-          value-format="YYYY-MM-01"
-          @change="currentMonthChange"
-          :disabled-date="disabledDateHandler"
-          size="small" 
-        />
+        <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" :clearable="false"
+          value-format="YYYY-MM-01" @change="currentMonthChange" :disabled-date="disabledDateHandler" size="small" />
       </el-form-item>
       <el-form-item label="状态:">
-        <el-select
-          v-model.trim="queryParams.status"
-          prop="status"
-          size="small"
-          type="text"
-          placeholder="状态"
-          :clearable="true"
-          style="width: 130px"
-          @clear="clearStatus"
-          
-        >
-          <el-option
-            v-for="item in selectStatus"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
+        <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
+          :clearable="true" style="width: 130px" @clear="clearStatus">
+          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
       <el-form-item label="审核人:" prop="verifierName">
@@ -79,87 +46,49 @@
         <el-switch v-model="oneself" @change="handleOneself" />
       </el-form-item> -->
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery" size="small" 
-          >搜索</el-button
-        >
-        <el-button icon="operation" @click="moreSearch = true" size="small" >更多</el-button>
-        <el-button icon="Refresh" @click="resetQuery" size="small" >重置</el-button>
+        <el-button type="primary" icon="Search" @click="handleQuery" size="small">搜索</el-button>
+        <el-button icon="operation" @click="moreSearch = true" size="small">更多</el-button>
+        <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
-    <el-table
-      v-loading="loading"
-      :data="orderList"
-      size="small"
-      border
-      height="100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
-        label="客户名称"
-        min-width="250"
-        align="center"
-        prop="companyName"
-      />
-      <el-table-column
-        label="来源"
-        min-width="100"
-        align="center"
-        prop="fromCompanyName"
-      />
-      <el-table-column
-        label="纳税性质"
-        width="100"
-        align="center"
-        prop="taxType"
-      />
+      <el-table-column label="客户名称" min-width="250" align="center" prop="companyName" />
+      <el-table-column label="来源" min-width="100" align="center" prop="fromCompanyName" />
+      <el-table-column label="纳税性质" width="100" align="center" prop="taxType" />
       <el-table-column label="人员信息" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button
-            v-if="scope.row.detail != null"
-            link
-            type="primary"
-            size="small"
-            @click="showMember(scope.row)"
-            >查看</el-button
-          >
+          <el-button v-if="scope.row.detail != null" link type="primary" size="small"
+            @click="showMember(scope.row)">查看</el-button>
         </template>
       </el-table-column>
       <el-table-column label="申报填写" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button
-            link
-            type="primary"
-            size="small"
-            v-hasPermi="['business:housingFundDeclare:edit']"
-            @click="fillIn(scope.row)"
-            >{{
-              scope.row.detail == null
-                ? "填写"
-                : scope.row.detail.status === 1
-                ? "进行中"
-                : "已填写"
-            }}</el-button
-          >
+          <el-button link type="primary" size="small" v-hasPermi="['business:housingFundDeclare:edit']"
+            @click="fillIn(scope.row)">{{
+            scope.row.detail == null
+            ? "填写"
+            : scope.row.detail.status === 1
+            ? "进行中"
+            : "已填写"
+            }}</el-button>
         </template>
       </el-table-column>
       <el-table-column label="申报附件" width="100" align="center" prop="">
         <template #default="scope">
-          <el-button
-            size="small"
-            type="primary"
-            link
+          <el-button size="small" type="primary" link
             :disabled="scope.row.detail == null || scope.row.detail.status <= 1"
-            @click="showFiles(scope.row)"
-            >查看文件</el-button
-          >
+            @click="showFiles(scope.row)">查看文件</el-button>
         </template>
       </el-table-column>
       <el-table-column label="状态" width="110" align="center" prop="">
@@ -168,36 +97,28 @@
             {{ getStatusLabel(scope.row) }}
             <el-popover placement="top-start" width="250" trigger="hover">
               <div style="display: flex; flex-direction: row">
-                <div
-                  v-for="item in selectStatus"
-                  :key="item.value"
-                  style="display: flex; flex-direction: row; margin-right: 10px"
-                >
-                  <div
-                    :style="{
+                <div v-for="item in selectStatus" :key="item.value"
+                  style="display: flex; flex-direction: row; margin-right: 10px">
+                  <div :style="{
                       backgroundColor: item.color,
                       width: '14px',
                       height: '14px',
                       margin: 'auto',
                       borderRadius: '50%',
                       border: item.color === '#fff' ? '1px solid #ddd' : 'none',
-                    }"
-                  />
-                  <div
-                    style="
+                    }" />
+                  <div style="
                       display: inline-block;
                       margin-left: 10px;
                       line-height: 36px;
                       font-size: 10px;
-                    "
-                  >
+                    ">
                     {{ item.label }}
                   </div>
                 </div>
               </div>
               <template #reference>
-                <span
-                  style="
+                <span style="
                     color: #fff;
                     font-size: 12px;
                     text-align: center;
@@ -207,23 +128,15 @@
                     height: 14px;
                     background-color: #ccc;
                     border-radius: 50%;
-                  "
-                  >?</span
-                >
+                  ">?</span>
               </template>
             </el-popover>
           </div>
         </template>
       </el-table-column>
-      <el-table-column
-        label="执行人"
-        width="80"
-        align="center"
-        prop="serviceName"
-      />
+      <el-table-column label="执行人" width="80" align="center" prop="serviceName" />
       <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
       <!-- <el-table-column label="操作" width="80" align="center" prop="">
         <template #default="scope">
           <el-button
@@ -241,101 +154,41 @@
       </el-table-column> -->
     </el-table>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <member-dialog ref="memeberDialogRef" :get-list="getList" />
     <FileListDialog ref="fileListDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog
-      title="更多搜索"
-      v-model="moreSearch"
-      width="620px"
-      append-to-body
-      size="small"
-      draggable
-      :close-on-click-modal = "false"
-    >
-      <el-form
-        :model="queryParams"
-        ref="queryRef"
-        size="small"
-        label-width="100"
-      >
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
+      <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="客户名称:" prop="companyName">
-              <el-input
-                v-model="queryParams.companyName"
-                placeholder="请输入客户名称"
-                clearable
-                @keyup.enter="handleQuery"
-              />
+              <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
             </el-form-item>
             <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
-              v-if="tenant.versionId === '4'"
-              label="来源:"
-              prop="fromCompanyName"
-            >
-              <el-input
-                size="small"
-                v-model="queryParams.fromCompanyName"
-                type="text"
-                placeholder="客户来源"
-                :clearable="true"
-              />
+            <el-form-item v-if="tenant.versionId === '4'" label="来源:" prop="fromCompanyName">
+              <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="所属月:">
-              <el-date-picker
-                v-model="currentMonth"
-                type="month"
-                format="YYYY年MM月"
-                :clearable="false"
-                value-format="YYYY-MM-01"
-                @change="currentMonthChange"
-                :disabled-date="disabledDateHandler"
-              />
+              <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" :clearable="false"
+                value-format="YYYY-MM-01" @change="currentMonthChange" :disabled-date="disabledDateHandler" />
             </el-form-item>
             <el-form-item label="状态:">
-              <el-select
-                v-model.trim="queryParams.status"
-                prop="status"
-                size="small"
-                type="text"
-                placeholder="状态"
-                :clearable="true"
-                @clear="clearStatus"
-              >
-                <el-option
-                  v-for="item in selectStatus"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model.trim="queryParams.status" prop="status" size="small" type="text" placeholder="状态"
+                :clearable="true" @clear="clearStatus">
+                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -343,16 +196,8 @@
       </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>
@@ -360,278 +205,279 @@
 </template>
 
 <script setup>
-import useUserStore from "@/store/modules/user";
-import {
-  listHousingFundDeclare,
-  turnBackDetail,
-  exportHoisngFundDeclare,
-} from "@/api/business/production/housingFundDeclare";
-import { uploadFile } from "@/api/tool/file";
-import { listCompany } from "@/api/business/crm/company";
-import { ref } from "vue";
-import formDialog from "./form";
-import { taxTypes } from "@/utils/default";
-import viewDialog from "./view";
-import memberDialog from "../memberDialog";
-import FileListDialog from "../fileListDialog.vue";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-const tenant = useUserStore().tenant;
-const orderList = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const oneself = ref(false);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const moreSearch = ref(false);
-const showIndex = ref(0);
-const formDialogRef = ref(null);
-const viewDialogRef = ref(null);
-const memeberDialogRef = ref(null);
-const fileListDialogRef = ref(null);
+  import useUserStore from "@/store/modules/user";
+  import {
+    listHousingFundDeclare,
+    turnBackDetail,
+    exportHoisngFundDeclare,
+  } from "@/api/business/production/housingFundDeclare";
+  import { uploadFile } from "@/api/tool/file";
+  import { listCompany } from "@/api/business/crm/company";
+  import { ref } from "vue";
+  import formDialog from "./form";
+  import { taxTypes } from "@/utils/default";
+  import viewDialog from "./view";
+  import memberDialog from "../memberDialog";
+  import FileListDialog from "../fileListDialog.vue";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const tenant = useUserStore().tenant;
+  const orderList = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const oneself = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const moreSearch = ref(false);
+  const showIndex = ref(0);
+  const formDialogRef = ref(null);
+  const viewDialogRef = ref(null);
+  const memeberDialogRef = ref(null);
+  const fileListDialogRef = ref(null);
 
-const formOpen = ref(false);
-const currentMonth = ref(proxy.moment().format("YYYY-MM-01"));
+  const formOpen = ref(false);
+  const currentMonth = ref(proxy.moment().format("YYYY-MM-01"));
 
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 1,
-  files: [],
-});
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 1,
+    files: [],
+  });
 
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
+  const emptyForm = {
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
+  };
 
-const permissions = useUserStore().permissions;
-const all_permission = "*:*:*";
-const flag = ref(checkPermission(['business:funddeclare:person']))
+  const permissions = useUserStore().permissions;
+  const all_permission = "*:*:*";
+  const flag = ref(checkPermission(['business:funddeclare:person']))
+  const flag2 = ref(checkPermission(['business:funddeclare:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
-const data = reactive({
-  selectStatus: [
-    {
-      label: "未开始",
-      value: 0,
-      color: "#888",
-    },
-    {
-      label: "进行中",
-      value: 1,
-      color: "#FFB836",
-    },
-    {
-      label: "已完成",
-      value: 3,
-      color: "#2FCB81",
-    },
-  ],
-});
-const { selectStatus, selectMonths } = toRefs(data);
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  companyName: "",
-  orderByColumn: "create_time",
-  year: proxy.moment().format("YYYY"),
-  month: proxy.moment().format("MM"),
-  principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listHousingFundDeclare(queryParams.value).then((response) => {
-    orderList.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  const data = reactive({
+    selectStatus: [
+      {
+        label: "未开始",
+        value: 0,
+        color: "#888",
+      },
+      {
+        label: "进行中",
+        value: 1,
+        color: "#FFB836",
+      },
+      {
+        label: "已完成",
+        value: 3,
+        color: "#2FCB81",
+      },
+    ],
   });
-}
+  const { selectStatus, selectMonths } = toRefs(data);
 
-/** 是否为自己负责 */
-function handleOneself() {
-  if (oneself.value) {
-    queryParams.value.principal = useUserStore().user.userId;
-  } else {
-    queryParams.value.principal = null;
-  }
-  getList();
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  moreSearch.value = false;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-  queryParams.value = {
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
     pageNum: 1,
     pageSize: 20,
     companyName: "",
+    orderByColumn: "create_time",
     year: proxy.moment().format("YYYY"),
     month: proxy.moment().format("MM"),
-  };
-  currentMonth.value = proxy.moment().format("YYYY-MM-01");
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
+  });
+
+  /***********************  方法区  ****************************/
+
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listHousingFundDeclare(queryParams.value).then((response) => {
+      orderList.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
+  }
+
+  /** 是否为自己负责 */
+  function handleOneself() {
+    if (oneself.value) {
+      queryParams.value.principal = useUserStore().user.userId;
+    } else {
+      queryParams.value.principal = null;
     }
-  handleQuery();
-}
+    getList();
+  }
+
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    moreSearch.value = false;
+    getList();
+  }
 
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
+  /** 重置按钮操作 */
+  function resetQuery() {
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      companyName: "",
+      year: proxy.moment().format("YYYY"),
+      month: proxy.moment().format("MM"),
+    };
+    currentMonth.value = proxy.moment().format("YYYY-MM-01");
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
+    }
+    handleQuery();
+  }
 
-/** 导出按钮操作 */
-function handleExport() {
-  exportHoisngFundDeclare(queryParams.value);
-}
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
 
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
+  /** 导出按钮操作 */
+  function handleExport() {
+    exportHoisngFundDeclare(queryParams.value);
+  }
 
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
 
-function closeImages() {
-  showViewer.value = false;
-}
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
 
-function showMember(row) {
-  memeberDialogRef.value.open({
-    companyId: row.companyId,
-    year: queryParams.value.year,
-    month: queryParams.value.month,
-  });
-}
+  function closeImages() {
+    showViewer.value = false;
+  }
 
-function fillIn(row) {
-  // 判断选中行的状态
-  if (row.detail != null) {
-    const detail = row.detail;
-    directDialog(detail);
-  } else {
-    const detail = {
-      housingFundDeclareId: row.id,
+  function showMember(row) {
+    memeberDialogRef.value.open({
       companyId: row.companyId,
-      companyName: row.companyName,
-      month: queryParams.value.month,
       year: queryParams.value.year,
-    };
-    directDialog(detail);
+      month: queryParams.value.month,
+    });
   }
-}
 
-function directDialog(detail) {
-  if (detail.status === 0 || detail.status == null) {
-    if (editable()) {
-      formDialogRef.value.open(detail);
-    } else {
-      proxy.$modal.msgError("没有权限");
-    }
-  } else if (detail.status === 1 || detail.status === 4) {
-    if (editable()) {
-      formDialogRef.value.open(detail);
-    } else if (viewable() || verifiable()) {
-      viewDialogRef.value.open(detail);
+  function fillIn(row) {
+    // 判断选中行的状态
+    if (row.detail != null) {
+      const detail = row.detail;
+      directDialog(detail);
     } else {
-      proxy.$modal.msgError("没有权限");
+      const detail = {
+        housingFundDeclareId: row.id,
+        companyId: row.companyId,
+        companyName: row.companyName,
+        month: queryParams.value.month,
+        year: queryParams.value.year,
+      };
+      directDialog(detail);
     }
-  } else if (detail.status === 2 || detail.status === 3) {
-    if (editable() || viewable() || verifiable()) {
-      viewDialogRef.value.open(detail);
-    } else {
-      proxy.$modal.msgError("没有权限");
+  }
+
+  function directDialog(detail) {
+    if (detail.status === 0 || detail.status == null) {
+      if (editable()) {
+        formDialogRef.value.open(detail);
+      } else {
+        proxy.$modal.msgError("没有权限");
+      }
+    } else if (detail.status === 1 || detail.status === 4) {
+      if (editable()) {
+        formDialogRef.value.open(detail);
+      } else if (viewable() || verifiable()) {
+        viewDialogRef.value.open(detail);
+      } else {
+        proxy.$modal.msgError("没有权限");
+      }
+    } else if (detail.status === 2 || detail.status === 3) {
+      if (editable() || viewable() || verifiable()) {
+        viewDialogRef.value.open(detail);
+      } else {
+        proxy.$modal.msgError("没有权限");
+      }
     }
   }
-}
 
-function viewable() {
-  return (
-    permissions.includes(all_permission) ||
-    permissions.includes("business:housingFundDeclare:view")
-  );
-}
+  function viewable() {
+    return (
+      permissions.includes(all_permission) ||
+      permissions.includes("business:housingFundDeclare:view")
+    );
+  }
 
-function editable() {
-  return (
-    permissions.includes(all_permission) ||
-    permissions.includes("business:housingFundDeclare:edit")
-  );
-}
+  function editable() {
+    return (
+      permissions.includes(all_permission) ||
+      permissions.includes("business:housingFundDeclare:edit")
+    );
+  }
 
-function verifiable() {
-  return (
-    permissions.includes(all_permission) ||
-    permissions.includes("business:housingFundDeclare:verify")
-  );
-}
+  function verifiable() {
+    return (
+      permissions.includes(all_permission) ||
+      permissions.includes("business:housingFundDeclare:verify")
+    );
+  }
 
-function showFiles(row) {
-  fileListDialogRef.value.open(row.detail);
-}
+  function showFiles(row) {
+    fileListDialogRef.value.open(row.detail);
+  }
 
-function getStatusStyle(row) {
-  if (row.detail == null) {
-    return { color: getStatusColor(0), verticalAlign: "middle" };
-  } else {
-    return {
-      color: getStatusColor(row.detail.status),
-      verticalAlign: "middle",
-    };
+  function getStatusStyle(row) {
+    if (row.detail == null) {
+      return { color: getStatusColor(0), verticalAlign: "middle" };
+    } else {
+      return {
+        color: getStatusColor(row.detail.status),
+        verticalAlign: "middle",
+      };
+    }
+  }
+  function getStatusColor(status) {
+    const index = selectStatus.value.findIndex((v) => v.value === status);
+    return index >= 0 ? selectStatus.value[index].color : "#fff";
+  }
+  function getStatusLabel(row) {
+    const index = selectStatus.value.findIndex(
+      (v) => v.value === (row.detail == null ? 0 : row.detail.status)
+    );
+    return index >= 0 ? selectStatus.value[index].label : "";
   }
-}
-function getStatusColor(status) {
-  const index = selectStatus.value.findIndex((v) => v.value === status);
-  return index >= 0 ? selectStatus.value[index].color : "#fff";
-}
-function getStatusLabel(row) {
-  const index = selectStatus.value.findIndex(
-    (v) => v.value === (row.detail == null ? 0 : row.detail.status)
-  );
-  return index >= 0 ? selectStatus.value[index].label : "";
-}
 
-function turnBack(detail) {
-  turnBackDetail(detail)
-    .then((res) => {
-      getList();
-    })
-    .catch((err) => {
-      proxy.$modal.msgError(err.message);
-    });
-}
-function checkPermission(templatePermission) {
+  function turnBack(detail) {
+    turnBackDetail(detail)
+      .then((res) => {
+        getList();
+      })
+      .catch((err) => {
+        proxy.$modal.msgError(err.message);
+      });
+  }
+  function checkPermission(templatePermission) {
     const all_permission = "*:*:*";
     const permissions = useUserStore().permissions;
     const hasPermissions = permissions.some((permission) => {
@@ -651,24 +497,24 @@ function checkPermission(templatePermission) {
       handleOneself()
     }
   }
-function currentMonthChange(arg) {
-  const year = proxy.moment(arg).format("YYYY");
-  const month = proxy.moment(arg).format("MM");
-  queryParams.value.year = year;
-  queryParams.value.month = month;
-  handleQuery();
-}
+  function currentMonthChange(arg) {
+    const year = proxy.moment(arg).format("YYYY");
+    const month = proxy.moment(arg).format("MM");
+    queryParams.value.year = year;
+    queryParams.value.month = month;
+    handleQuery();
+  }
 
-function clearStatus() {
-  queryParams.value.status = null;
-}
+  function clearStatus() {
+    queryParams.value.status = null;
+  }
 
-function disabledDateHandler(date) {
-  if (date <= proxy.moment()) {
-    return false;
-  } else {
-    return true;
+  function disabledDateHandler(date) {
+    if (date <= proxy.moment()) {
+      return false;
+    } else {
+      return true;
+    }
   }
-}
-getList();
-</script>
+  getList();
+</script>

+ 20 - 15
src/views/business/production/IndividualIncomeTaxIs/index.vue

@@ -27,11 +27,13 @@
         </el-select>
       </el-form-item>
       <el-form-item label="所属期:" prop="year">
-        <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月" style="width: 130px" :clearable="false"
-          value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler" />
+        <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月" style="width: 130px"
+          :clearable="false" value-format="YYYY-MM-01" :disabled-date="disabledDateHandler"
+          @change="monthChangeHandler" />
       </el-form-item>
       <el-form-item label="个税状态:">
-        <el-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true" style="width: 130px">
+        <el-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true"
+          style="width: 130px">
           <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
@@ -54,12 +56,14 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first"> </el-tab-pane>
-      <el-tab-pane label="我的" name="second"> </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first"> </el-tab-pane>
+        <el-tab-pane label="我的" name="second"> </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
-    <el-table v-loading="loading" :data="detailList" size="small" border  height="100%"
+    <el-table v-loading="loading" :data="detailList" size="small" border height="100%"
       @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
@@ -154,8 +158,7 @@
       </el-table-column>
       <el-table-column label="执行人" align="center" prop="serviceName" />
       <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
       <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
         :show-overflow-tooltip="true" />
       <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -174,10 +177,11 @@
       v-model:limit="queryParams.pageSize" @pagination="getList" />
     <!-- 表单 -->
     <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
-    <FormDialog ref="fromDialog" :get-list="getList" :workOrderId = workOrderId></FormDialog>
+    <FormDialog ref="fromDialog" :get-list="getList" :workOrderId=workOrderId></FormDialog>
 
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable :close-on-click-modal = "false">
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
       <el-form ref="dictRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
@@ -254,6 +258,7 @@
     proxy.moment().subtract(1, "month").format("YYYY-MM-01")
   );
   const flag = ref(checkPermission(['business:individual:person']))
+  const flag2 = ref(checkPermission(['business:individual:myself']))
   const activeName = flag.value ? ref('first') : ref('second')
   const options = ref([]);
   /** 查询对象 */
@@ -277,7 +282,7 @@
     currentEmployeeName: null,
     year: proxy.moment().subtract(1, "month").format("YYYY"),
     month: proxy.moment().subtract(1, "month").format("MM"),
-    principal: tenant.versionId !== '4' && !flag.value? useUserStore().user.userId : null,
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
 
   /***********************  方法区  ****************************/
@@ -329,7 +334,7 @@
 
   /** 填写按钮操作 */
   function fillIn(row) {
-    workOrderId.value = row.workOrderId 
+    workOrderId.value = row.workOrderId
     if (row.detail == null) {
       openByPermission(0, row, {
         month: queryParams.value.month,
@@ -441,7 +446,7 @@
     };
     currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01");
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 164 - 160
src/views/business/production/IndividualIncomeTaxIsZero/index.vue

@@ -18,108 +18,111 @@
 
     <!-- 搜索区 -->
     <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
-        <el-form-item label="客户名称:">
-          <el-input v-model="queryParams.companyName" placeholder="请输入客户名称"   size="small" :clearable="true" style="width: 130px" />
-        </el-form-item>
-        <el-form-item label="客户标签:">
-          <el-select v-model="queryParams.customerLabelId"  size="small" style="width: 130px" clearable>
-            <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="所属期:" prop="year" >
-          <el-date-picker  size="small" v-model="currentMonth" type="month"  format="YYYY年MM月" style="width: 130px"
-            value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
-            :clearable="false" />
-        </el-form-item>
-        <el-form-item label="个税状态:">
-          <el-select v-model="queryParams.status" size="small" placeholder="状态" :clearable="true" style="width: 130px">
-            <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="审核人:" prop="verifierName">
-          <el-input size="small" v-model="queryParams.verifierName" placeholder="请输入审核人" clearable style="width: 130px"
-            @keyup.enter="handleQuery" />
-        </el-form-item>
-  
-        <el-form-item prop="dateFilter" label="审核时间:">
-          <el-date-picker size="small" v-model="queryParams.dateFilter" type="daterange" clearable
-            format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
-            end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
-        </el-form-item>
-        <!-- <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:" v-hasPermi="['business:nowage:person']"> 
+      <el-form-item label="客户名称:">
+        <el-input v-model="queryParams.companyName" placeholder="请输入客户名称" size="small" :clearable="true"
+          style="width: 130px" />
+      </el-form-item>
+      <el-form-item label="客户标签:">
+        <el-select v-model="queryParams.customerLabelId" size="small" style="width: 130px" clearable>
+          <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属期:" prop="year">
+        <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月" style="width: 130px"
+          value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
+          :clearable="false" />
+      </el-form-item>
+      <el-form-item label="个税状态:">
+        <el-select v-model="queryParams.status" size="small" placeholder="状态" :clearable="true" style="width: 130px">
+          <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="审核人:" prop="verifierName">
+        <el-input size="small" v-model="queryParams.verifierName" placeholder="请输入审核人" clearable style="width: 130px"
+          @keyup.enter="handleQuery" />
+      </el-form-item>
+
+      <el-form-item prop="dateFilter" label="审核时间:">
+        <el-date-picker size="small" v-model="queryParams.dateFilter" type="daterange" clearable
+          format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
+          end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
+      </el-form-item>
+      <!-- <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:" v-hasPermi="['business:nowage:person']"> 
         </el-form-item> -->
-        <el-form-item>
-          <el-button type="primary" icon="Search" @click="handleQuery"  size="small" >搜索</el-button>
-          <el-button icon="operation" @click="moreSearch = true"  size="small" >更多</el-button>
-          <el-button icon="Refresh" @click="resetQuery"  size="small">重置</el-button>
-        </el-form-item>
-      </el-form>
-      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery" size="small">搜索</el-button>
+        <el-button icon="operation" @click="moreSearch = true" size="small">更多</el-button>
+        <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
         <el-tab-pane label="全部" name="first"> </el-tab-pane>
         <el-tab-pane label="我的" name="second"> </el-tab-pane>
       </el-tabs>
-      <!-- 列表区 -->
-      <el-table v-loading="loading" :data="detailList" size="small" border height="100%"
-        @selection-change="handleSelectionChange" >
-        <!-- <el-table-column type="selection" width="55" align="center" /> -->
-        <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
-          <template #default="scope">
-            <div style="display: flex; align-items: center; ">
-              <template v-if="scope.row.customerLabelName ">
-                <el-tooltip :content="scope.row.customerLabelName" placement="top">
-                  <el-icon :size="15">
-                    <CollectionTag />
-                  </el-icon>
-                </el-tooltip>
-                <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
-              </template>
-              <template v-else>
-                <div style="width: 20px; height: 15px;"></div>
-                <span>{{ scope.row.companyName }}</span>
-              </template>
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
-        <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
-        <el-table-column label="人员信息" min-width="60" align="center">
-          <template #default="scope">
-            <el-button v-show="scope.row.detail != null" link type="primary" size="small" @click="showMember(scope.row)"
-              v-hasPermi="['business:tax:wageList']">查看</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="个税填写" align="center" min-width="80" prop="evidenceFile">
-          <template #default="scope">
-            <el-button link type="primary" size="small" @click="fillIn(scope.row)"
-              v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']">{{
-              scope.row.detail == null
-              ? "填写"
-              : scope.row.detail.status === 1
-              ? "进行中"
-              : "已填写"
-              }}</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="个税附件" align="center" min-width="90" prop="content">
-          <template #default="scope">
-            <el-button size="small" link type="primary" v-hasPermi="['business:individualIncomeTaxDetail:query']"
-              :disabled="
+    </div>
+    <!-- 列表区 -->
+    <el-table v-loading="loading" :data="detailList" size="small" border height="100%"
+      @selection-change="handleSelectionChange">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
+        <template #default="scope">
+          <div style="display: flex; align-items: center; ">
+            <template v-if="scope.row.customerLabelName ">
+              <el-tooltip :content="scope.row.customerLabelName" placement="top">
+                <el-icon :size="15">
+                  <CollectionTag />
+                </el-icon>
+              </el-tooltip>
+              <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
+            </template>
+            <template v-else>
+              <div style="width: 20px; height: 15px;"></div>
+              <span>{{ scope.row.companyName }}</span>
+            </template>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
+      <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
+      <el-table-column label="人员信息" min-width="60" align="center">
+        <template #default="scope">
+          <el-button v-show="scope.row.detail != null" link type="primary" size="small" @click="showMember(scope.row)"
+            v-hasPermi="['business:tax:wageList']">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="个税填写" align="center" min-width="80" prop="evidenceFile">
+        <template #default="scope">
+          <el-button link type="primary" size="small" @click="fillIn(scope.row)"
+            v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']">{{
+            scope.row.detail == null
+            ? "填写"
+            : scope.row.detail.status === 1
+            ? "进行中"
+            : "已填写"
+            }}</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="个税附件" align="center" min-width="90" prop="content">
+        <template #default="scope">
+          <el-button size="small" link type="primary" v-hasPermi="['business:individualIncomeTaxDetail:query']"
+            :disabled="
                 scope.row.detail == null || scope.row.detail.evidenceFile === ''
               " @click="showFiles(scope.row)">查看文件</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="状态" align="center" min-width="80" prop="">
-          <template #default="scope">
-            <div :style="getStatusStyle(scope.row)">
-              {{ getStatusLabel(scope.row) }}
-              <el-popover placement="top-start" width="250" trigger="hover">
-                <div style="display: flex; flex-direction: row">
-                  <div v-for="item in selectStatus" :key="item.value" style="
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" min-width="80" prop="">
+        <template #default="scope">
+          <div :style="getStatusStyle(scope.row)">
+            {{ getStatusLabel(scope.row) }}
+            <el-popover placement="top-start" width="250" trigger="hover">
+              <div style="display: flex; flex-direction: row">
+                <div v-for="item in selectStatus" :key="item.value" style="
                       display: flex;
                       flex-direction: row;
                       margin-right: 10px;
                     ">
-                    <div :style="{
+                  <div :style="{
                         backgroundColor: item.color,
                         width: '14px',
                         height: '14px',
@@ -128,18 +131,18 @@
                         border:
                           item.color === '#fff' ? '1px solid #ddd' : 'none',
                       }" />
-                    <div style="
+                  <div style="
                         display: inline-block;
                         margin-left: 10px;
                         line-height: 36px;
                         font-size: 10px;
                       ">
-                      {{ item.label }}
-                    </div>
+                    {{ item.label }}
                   </div>
                 </div>
-                <template #reference>
-                  <span style="
+              </div>
+              <template #reference>
+                <span style="
                       color: #fff;
                       font-size: 12px;
                       text-align: center;
@@ -150,18 +153,17 @@
                       background-color: #ccc;
                       border-radius: 50%;
                     ">?</span>
-                </template>
-              </el-popover>
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
-        <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-        <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-          :show-overflow-tooltip="true" />
-        <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
-          :show-overflow-tooltip="true" />
-        <!-- <el-table-column label="操作" align="center" min-width="80" fixed="right" class-name="small-padding fixed-width">
+              </template>
+            </el-popover>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
+      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
+        :show-overflow-tooltip="true" />
+      <!-- <el-table-column label="操作" align="center" min-width="80" fixed="right" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-button size="small" link type="primary" :disabled="
                 scope.row.detail == null || scope.row.detail.status !== 3
@@ -169,57 +171,58 @@
               v-hasPermi="['business:individualIncomeTaxDetail:saveDetail']">退回</el-button>
           </template>
         </el-table-column> -->
-      </el-table>
+    </el-table>
 
-      <!-- 分页 -->
-      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-        v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <!-- 分页 -->
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+
+    <!-- 表单 -->
+    <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
+    <FormDialog ref="fromDialog" :get-list="getList" :workOrderId=workOrderId></FormDialog>
+    <!-- 更多搜索弹窗 -->
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" size="small" append-to-body draggable
+      :close-on-click-modal="false">
+      <el-form ref="dictRef" size="small" label-width="100">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="个税所属期:" prop="year">
+              <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月"
+                value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
+                :clearable="false" />
+            </el-form-item>
+            <el-form-item label="纳税性质:" prop="taxType">
+              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
+                <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-select size="small" v-model="queryParams.status" placeholder="状态" :clearable="true">
+                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="关键字:">
+              <el-input size="small" v-model="queryParams.companyName" placeholder="请输入客户名称" :clearable="true" />
+            </el-form-item>
+            <el-form-item label="来源:" v-if="tenant.versionId === 4">
+              <el-input v-model="queryParams.fromCompanyName" size="small" placeholder="请输入客户来源" :clearable="true" />
+            </el-form-item>
+            <el-form-item label="税号:">
+              <el-input size="small" v-model="queryParams.socialCreditCode" placeholder="请输入税号" :clearable="true" />
+            </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 @click="moreSearch = false" icon="close" size="small">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
 
-      <!-- 表单 -->
-      <MemberDialog ref="memberDialog" :get-list="getList"></MemberDialog>
-      <FormDialog ref="fromDialog" :get-list="getList" :workOrderId = workOrderId></FormDialog>
-      <!-- 更多搜索弹窗 -->
-      <el-dialog title="更多搜索" v-model="moreSearch" width="620px" size="small" append-to-body draggable :close-on-click-modal = "false">
-        <el-form ref="dictRef" size="small" label-width="100">
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="个税所属期:" prop="year">
-                <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月"
-                  value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
-                  :clearable="false" />
-              </el-form-item>
-              <el-form-item label="纳税性质:" prop="taxType">
-                <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
-                  <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-select size="small" v-model="queryParams.status" placeholder="状态" :clearable="true">
-                  <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="关键字:">
-                <el-input size="small" v-model="queryParams.companyName" placeholder="请输入客户名称" :clearable="true" />
-              </el-form-item>
-              <el-form-item label="来源:" v-if="tenant.versionId === 4">
-                <el-input v-model="queryParams.fromCompanyName" size="small" placeholder="请输入客户来源" :clearable="true" />
-              </el-form-item>
-              <el-form-item label="税号:">
-                <el-input size="small" v-model="queryParams.socialCreditCode" placeholder="请输入税号" :clearable="true" />
-              </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 @click="moreSearch = false" icon="close" size="small">取 消</el-button>
-          </div>
-        </template>
-      </el-dialog>
-    
   </div>
 </template>
 
@@ -256,6 +259,7 @@
 
   const workOrderId = ref(null);
   const flag = ref(checkPermission(['business:nowage:person']))
+  const flag2 = ref(checkPermission(['business:nowage:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const data = reactive({
     selectStatus: [
@@ -340,7 +344,7 @@
 
   /** 填写按钮操作 */
   function fillIn(row) {
-    workOrderId.value = row.workOrderId 
+    workOrderId.value = row.workOrderId
     if (row.detail == null) {
       openByPermission(0, row, {
         month: queryParams.value.month,
@@ -450,7 +454,7 @@
     };
     currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01");
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 360 - 356
src/views/business/production/archiveTicket/index.vue

@@ -21,13 +21,14 @@
           style="width: 130px" />
       </el-form-item>
       <el-form-item label="客户标签:">
-        <el-select v-model="queryParams.customerLabelId"  style="width: 130px" clearable size="small">
+        <el-select v-model="queryParams.customerLabelId" style="width: 130px" clearable size="small">
           <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
         </el-select>
       </el-form-item>
       <el-form-item label="所属月:">
-        <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月"  size="small" :clearable="false"   style="width: 130px" value-format="YYYY-MM-01"
-          @change="currentMonthChange" :disabled-date="disabledDateHandler" />
+        <el-date-picker v-model="currentMonth" type="month" format="YYYY年MM月" size="small" :clearable="false"
+          style="width: 130px" value-format="YYYY-MM-01" @change="currentMonthChange"
+          :disabled-date="disabledDateHandler" />
       </el-form-item>
       <!-- <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:" v-hasPermi="['business:upload:person']">
         <el-switch v-model="oneself" @change="handleOneself" />
@@ -43,22 +44,23 @@
           end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery" size="small" >搜索</el-button>
+        <el-button type="primary" icon="Search" @click="handleQuery" size="small">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first">
 
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-  
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
 
-      </el-tab-pane>
-    </el-tabs>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
 
     <!-- 列表区 -->
-    <el-table v-loading="loading"  :data="list" size="small" border height="100%"
+    <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
       <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
         <template #default="scope">
@@ -81,7 +83,7 @@
       <el-table-column label="来源" align="center" min-width="80" prop="fromCompanyName" />
       <el-table-column label="纳税性质" prop="taxType" min-width="110" align="center" />
       <el-table-column label="上传人" align="center" prop="finishUserName" min-width="100" />
-      <el-table-column label="上传时间" align="center" prop="finishTime" min-width="100"/>
+      <el-table-column label="上传时间" align="center" prop="finishTime" min-width="100" />
       <el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
         <template #default="scope">
           <el-button size="small" link type="primary" v-hasPermi="['business:archiveReceiveTicket:upload']" circle
@@ -92,7 +94,8 @@
       </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" :close-on-click-modal = "false">
+    <el-dialog title="扣款信息" v-model="formOpen" width="500px" append-to-body draggable @close="formCancel"
+      :close-on-click-modal="false">
       <el-form ref="dictRef" :model="form" label-width="100" size="small">
         <el-row :gutter="30">
           <el-col :span="24">
@@ -135,8 +138,8 @@
       </template>
     </el-dialog>
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="getList" />
+    <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" />
     <form-dialog ref="formDialogRef" :getList="getList" />
     <view-dialog ref="viewDialogRef" :getList="getList" />
@@ -144,96 +147,97 @@
 </template>
 
 <script setup name="Company">
-import { listLableNoPage } from "@/api/business/lable"
-import { listArchiveTicket } from "@/api/business/production/archiveTicket";
-import { uploadFile } from "@/api/tool/file";
-import { listCompany } from "@/api/business/crm/company";
-import useUserStore from "@/store/modules/user";
-import { getTenant } from "@/utils/auth";
-import { ref } from "vue";
-import formDialog from "./form.vue";
-import viewDialog from "./view.vue";
-const { proxy } = getCurrentInstance();
-/** 字典数组区 */
-/** 查询 对象 */
-const tenant = useUserStore().tenant
-const list = ref([]);
-const loading = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const oneself = ref(false);
-const total = ref(0);
-const prev = ref([]);
-const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
-const showViewer = ref(false);
-const currentFileList = ref([]);
-const showIndex = ref(0);
-const queryRadio = ref("全部");
-const permissions = useUserStore().permissions;
-
-const currentMonth = ref(
-  proxy.moment().subtract(1, "month").format("YYYY-MM-01")
-);
-
-const formOpen = ref(false);
-const formDialogRef = ref(null);
-const viewDialogRef = ref(null);
-const flag = ref(checkPermission(['business:upload:person']))
-const activeName = flag.value ? ref('first') : ref('second');
-const options = ref([]);
-const form = ref({
-  id: null,
-  companyName: "",
-  companyId: null,
-  remark: "",
-  type: 1,
-  files: [],
-});
-
-const emptyForm = {
-  id: null,
-  companyName: "",
-  companyId: null,
-  type: 1,
-  remark: "",
-  files: [],
-};
-
-const { verify_status } = proxy.useDict("verify_status");
-/** 查询对象 */
-const queryParams = ref({
-  pageNum: 1,
-  pageSize: 20,
-  orderByColumn: "create_time",
-  year: proxy.moment().format("YYYY"),
-  month: proxy.moment().format("MM"),
-  principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
-});
-
-/***********************  方法区  ****************************/
-
-/** 查询company列表 */
-function getList() {
-  loading.value = true;
-  listArchiveTicket(queryParams.value).then((response) => {
-    list.value = response.rows.map((l) => ({ ...l }));
-    prev.value = proxy.deepClone(response.rows);
-    total.value = response.total;
-    loading.value = false;
+  import { listLableNoPage } from "@/api/business/lable"
+  import { listArchiveTicket } from "@/api/business/production/archiveTicket";
+  import { uploadFile } from "@/api/tool/file";
+  import { listCompany } from "@/api/business/crm/company";
+  import useUserStore from "@/store/modules/user";
+  import { getTenant } from "@/utils/auth";
+  import { ref } from "vue";
+  import formDialog from "./form.vue";
+  import viewDialog from "./view.vue";
+  const { proxy } = getCurrentInstance();
+  /** 字典数组区 */
+  /** 查询 对象 */
+  const tenant = useUserStore().tenant
+  const list = ref([]);
+  const loading = ref(true);
+  const ids = ref([]);
+  const single = ref(true);
+  const multiple = ref(true);
+  const oneself = ref(false);
+  const total = ref(0);
+  const prev = ref([]);
+  const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+  const showViewer = ref(false);
+  const currentFileList = ref([]);
+  const showIndex = ref(0);
+  const queryRadio = ref("全部");
+  const permissions = useUserStore().permissions;
+
+  const currentMonth = ref(
+    proxy.moment().subtract(1, "month").format("YYYY-MM-01")
+  );
+
+  const formOpen = ref(false);
+  const formDialogRef = ref(null);
+  const viewDialogRef = ref(null);
+  const flag = ref(checkPermission(['business:upload:person']))
+  const flag2 = ref(checkPermission(['business:upload:myself']))
+  const activeName = flag.value ? ref('first') : ref('second');
+  const options = ref([]);
+  const form = ref({
+    id: null,
+    companyName: "",
+    companyId: null,
+    remark: "",
+    type: 1,
+    files: [],
+  });
+
+  const emptyForm = {
+    id: null,
+    companyName: "",
+    companyId: null,
+    type: 1,
+    remark: "",
+    files: [],
+  };
+
+  const { verify_status } = proxy.useDict("verify_status");
+  /** 查询对象 */
+  const queryParams = ref({
+    pageNum: 1,
+    pageSize: 20,
+    orderByColumn: "create_time",
+    year: proxy.moment().format("YYYY"),
+    month: proxy.moment().format("MM"),
+    principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });
-}
 
-/** 是否为自己负责 */
-function handleOneself() {
-  if (oneself.value) {
-    queryParams.value.principal = useUserStore().user.userId;
-  } else {
-    queryParams.value.principal = null;
+  /***********************  方法区  ****************************/
+
+  /** 查询company列表 */
+  function getList() {
+    loading.value = true;
+    listArchiveTicket(queryParams.value).then((response) => {
+      list.value = response.rows.map((l) => ({ ...l }));
+      prev.value = proxy.deepClone(response.rows);
+      total.value = response.total;
+      loading.value = false;
+    });
   }
-  getList();
-}
-function handleClick(tab) {
+
+  /** 是否为自己负责 */
+  function handleOneself() {
+    if (oneself.value) {
+      queryParams.value.principal = useUserStore().user.userId;
+    } else {
+      queryParams.value.principal = null;
+    }
+    getList();
+  }
+  function handleClick(tab) {
     console.log(tab.props.name)
     if (tab.props.name === "second") {
       oneself.value = true
@@ -243,12 +247,12 @@ function handleClick(tab) {
       handleOneself()
     }
   }
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-function checkPermission(templatePermission) {
+  /** 搜索按钮操作 */
+  function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+  }
+  function checkPermission(templatePermission) {
     const all_permission = "*:*:*";
     const permissions = useUserStore().permissions;
     const hasPermissions = permissions.some((permission) => {
@@ -258,266 +262,266 @@ function checkPermission(templatePermission) {
     });
     return hasPermissions;
   }
-/** 重置按钮操作 */
-function resetQuery() {
-  queryParams.value = {
-    pageNum: 1,
-    pageSize: 20,
-    year: proxy.moment().format("YYYY"),
-    month: proxy.moment().format("MM"),
-    orderByColumn: "create_time",
-  };
-  if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+  /** 重置按钮操作 */
+  function resetQuery() {
+    queryParams.value = {
+      pageNum: 1,
+      pageSize: 20,
+      year: proxy.moment().format("YYYY"),
+      month: proxy.moment().format("MM"),
+      orderByColumn: "create_time",
+    };
+    if (activeName.value != null && activeName.value === 'second') {
+      queryParams.value.principal = useUserStore().user.userId;
     }
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map((item) => item.id);
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-function getOption() {
+    handleQuery();
+  }
+
+  // 多选框选中数据
+  function handleSelectionChange(selection) {
+    ids.value = selection.map((item) => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+  }
+  function getOption() {
     listLableNoPage().then(res => {
       options.value = res.data
     })
   }
-/** 新增按钮操作 */
-function handleAdd() {
-  // proxy.$refs.DepositRef.open();
-  formOpen.value = true;
-}
-
-function formCancel() {
-  formOpen.value = false;
-  reset();
-}
-
-function reset() {
-  form.value = proxy.deepClone(emptyForm);
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  // const id = row.id || ids.value;
-  // proxy.$refs.DepositRef.open(id);
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm("是否确认删除选中的数据项?")
-    .then(function () {
-      return delDeposit(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功!");
-    })
-    .catch(() => { });
-}
-
-/** 导出按钮操作 */
-function handleExport() {
-  // proxy.download(
-  //   "business/archive/order/export",
-  //   {
-  //     ...queryParams.value,
-  //   },
-  //   `合同导出_${new Date().getTime()}.xlsx`
-  // );
-  exportDeposit(queryParams.value);
-}
-
-function startDateChangeHandler(row, startDate) {
-  if (startDate) {
-    // console.log(startDate)
-    row.endMonth = proxy
-      .moment(startDate)
-      .add(row.monthNum - 1, "M")
-      .format("YYYY-MM-DD");
-  } else row.endMonth = null;
-  console.log(row);
-}
-
-function saveHandler() {
-  if (form.value.amount == null || form.value.amount === 0) {
-    proxy.$modal.msgError("请输入存款金额");
-    return;
-  }
-  if (form.value.files.length === 0) {
-    proxy.$modal.msgError("请上传凭证附件");
-    return;
-  }
-  form.value.status = 2;
-  saveDeduction(form.value).then((res) => {
-    formCancel();
-    getList();
-  });
-}
-
-function upload(param) {
-  const formData = new FormData();
-  formData.append("file", param.file);
-  uploadFile(formData).then((res) => {
-    if (res.code === 200) {
-      const file = {};
-      file.fileName = res.newFileName;
-      file.url = res.url;
-      file.originalFileName = res.originalFilename;
-      file.fileUrl = res.fileName;
-      file.masterId = form.value.id;
-      file.masterTableName = "biz_deduction";
-      form.value.files.push(file);
+  /** 新增按钮操作 */
+  function handleAdd() {
+    // proxy.$refs.DepositRef.open();
+    formOpen.value = true;
+  }
+
+  function formCancel() {
+    formOpen.value = false;
+    reset();
+  }
+
+  function reset() {
+    form.value = proxy.deepClone(emptyForm);
+  }
+
+  /** 修改按钮操作 */
+  function handleUpdate(row) {
+    // const id = row.id || ids.value;
+    // proxy.$refs.DepositRef.open(id);
+  }
+
+  /** 删除按钮操作 */
+  function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal
+      .confirm("是否确认删除选中的数据项?")
+      .then(function () {
+        return delDeposit(_ids);
+      })
+      .then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+      })
+      .catch(() => { });
+  }
+
+  /** 导出按钮操作 */
+  function handleExport() {
+    // proxy.download(
+    //   "business/archive/order/export",
+    //   {
+    //     ...queryParams.value,
+    //   },
+    //   `合同导出_${new Date().getTime()}.xlsx`
+    // );
+    exportDeposit(queryParams.value);
+  }
+
+  function startDateChangeHandler(row, startDate) {
+    if (startDate) {
+      // console.log(startDate)
+      row.endMonth = proxy
+        .moment(startDate)
+        .add(row.monthNum - 1, "M")
+        .format("YYYY-MM-DD");
+    } else row.endMonth = null;
+    console.log(row);
+  }
+
+  function saveHandler() {
+    if (form.value.amount == null || form.value.amount === 0) {
+      proxy.$modal.msgError("请输入存款金额");
+      return;
     }
-  });
-}
-
-function openFollowFile(arg) {
-  // console.log(arg)
-  const attach = arg;
-  window.open(`${arg.url}`, arg.fileName);
-}
-
-function showFileList(row) {
-  currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
-  showViewer.value = true;
-}
-
-function closeImages() {
-  showViewer.value = false;
-}
-
-function handleInfo(row) {
-  formOpen.value = true;
-  getForm(row.id);
-}
-
-function getForm(id) {
-  getDeposit(id).then((res) => {
-    form.value = res.data;
-    if (form.value == null) {
-      reset();
+    if (form.value.files.length === 0) {
+      proxy.$modal.msgError("请上传凭证附件");
+      return;
     }
-  });
-}
+    form.value.status = 2;
+    saveDeduction(form.value).then((res) => {
+      formCancel();
+      getList();
+    });
+  }
 
-function handleDelFile(index) {
-  form.value.files.splice(index, 1);
-}
+  function upload(param) {
+    const formData = new FormData();
+    formData.append("file", param.file);
+    uploadFile(formData).then((res) => {
+      if (res.code === 200) {
+        const file = {};
+        file.fileName = res.newFileName;
+        file.url = res.url;
+        file.originalFileName = res.originalFilename;
+        file.fileUrl = res.fileName;
+        file.masterId = form.value.id;
+        file.masterTableName = "biz_deduction";
+        form.value.files.push(file);
+      }
+    });
+  }
 
-function amountDetail(row) {
-  const item = {
-    year: proxy.moment().format("YYYY"),
-    month: proxy.moment().subtract(1, "months").format("MM"),
-  };
-  switch (row.sourceName) {
-    case "税款":
-      proxy.$refs.mergeTaxViewDialog.open(row);
-      break;
-    case "社保":
-      proxy.$refs.socialSecurityViewDialog.open(row);
-      break;
-    case "公积金":
-      proxy.$refs.housingFundViewDialog.open(row);
-      break;
-  }
-}
-
-function showFiles(row) {
-  proxy.$refs.fileDialog.open({
-    masterTableName: "biz_deduction",
-    masterId: row.id,
-  });
-}
-
-function checkConfirm(row) {
-  // console.log(row.tenantId)
-  if (row.tenantId === getTenant()) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-function showConfirm(row) {
-  proxy.$modal.confirm("确认扣款么?").then((res) => {
-    row.confirmId = useUserStore().user.userId;
-    row.confirmDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
-    row.status = 1;
-    saveDeduction(row).then((res) => {
-      getList();
+  function openFollowFile(arg) {
+    // console.log(arg)
+    const attach = arg;
+    window.open(`${arg.url}`, arg.fileName);
+  }
+
+  function showFileList(row) {
+    currentFileList.value = row.files.map((l) => `${baseUrl.value}${l.fileUrl}`);
+    showViewer.value = true;
+  }
+
+  function closeImages() {
+    showViewer.value = false;
+  }
+
+  function handleInfo(row) {
+    formOpen.value = true;
+    getForm(row.id);
+  }
+
+  function getForm(id) {
+    getDeposit(id).then((res) => {
+      form.value = res.data;
+      if (form.value == null) {
+        reset();
+      }
     });
-  });
-}
-
-function applySuccess(row, status) {
-  proxy.$modal
-    .confirm("确认公积金申报成功么?")
-    .then((_) => {
-      const value = proxy.deepClone(row);
-      value.status = status;
+  }
+
+  function handleDelFile(index) {
+    form.value.files.splice(index, 1);
+  }
+
+  function amountDetail(row) {
+    const item = {
+      year: proxy.moment().format("YYYY"),
+      month: proxy.moment().subtract(1, "months").format("MM"),
+    };
+    switch (row.sourceName) {
+      case "税款":
+        proxy.$refs.mergeTaxViewDialog.open(row);
+        break;
+      case "社保":
+        proxy.$refs.socialSecurityViewDialog.open(row);
+        break;
+      case "公积金":
+        proxy.$refs.housingFundViewDialog.open(row);
+        break;
+    }
+  }
+
+  function showFiles(row) {
+    proxy.$refs.fileDialog.open({
+      masterTableName: "biz_deduction",
+      masterId: row.id,
+    });
+  }
+
+  function checkConfirm(row) {
+    // console.log(row.tenantId)
+    if (row.tenantId === getTenant()) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  function showConfirm(row) {
+    proxy.$modal.confirm("确认扣款么?").then((res) => {
+      row.confirmId = useUserStore().user.userId;
+      row.confirmDate = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
+      row.status = 1;
       saveDeduction(row).then((res) => {
         getList();
       });
-    })
-    .catch((_) => {
-      proxy.$modal.msg("取消申报");
     });
-}
+  }
 
-function showFeedbackDialog(row) {
-  const value = proxy.deepClone(row);
-  value.status = 4;
-  proxy.$refs.feedbackDialogRef.open(value);
-}
+  function applySuccess(row, status) {
+    proxy.$modal
+      .confirm("确认公积金申报成功么?")
+      .then((_) => {
+        const value = proxy.deepClone(row);
+        value.status = status;
+        saveDeduction(row).then((res) => {
+          getList();
+        });
+      })
+      .catch((_) => {
+        proxy.$modal.msg("取消申报");
+      });
+  }
 
-function verifyDeduction(value) {
-  saveDeduction(value).then((res) => {
-    getList();
-  });
-}
-
-function openUpload(row) {
-  formOpen.value = true;
-  form.value = proxy.deepClone(row);
-}
-
-function currentMonthChange(arg) {
-  const year = proxy.moment(arg).format("YYYY");
-  const month = proxy.moment(arg).format("MM");
-  queryParams.value.year = year;
-  queryParams.value.month = month;
-  handleQuery();
-}
-
-function disabledDateHandler(date) {
-  if (date <= proxy.moment().subtract(1, "month")) {
-    return false;
-  } else {
-    return true;
-  }
-}
-
-function uploadHandle(row) {
-  formDialogRef.value.open({
-    companyId: row.companyId,
-    companyName: row.companyName,
-    year: queryParams.value.year,
-    month: queryParams.value.month,
-  });
-}
-function viewHandle(row) {
-  viewDialogRef.value.open({
-    companyId: row.companyId,
-    companyName: row.companyName,
-    year: queryParams.value.year,
-    month: queryParams.value.month,
-  });
-}
-getList();
-getOption();
-</script>
+  function showFeedbackDialog(row) {
+    const value = proxy.deepClone(row);
+    value.status = 4;
+    proxy.$refs.feedbackDialogRef.open(value);
+  }
+
+  function verifyDeduction(value) {
+    saveDeduction(value).then((res) => {
+      getList();
+    });
+  }
+
+  function openUpload(row) {
+    formOpen.value = true;
+    form.value = proxy.deepClone(row);
+  }
+
+  function currentMonthChange(arg) {
+    const year = proxy.moment(arg).format("YYYY");
+    const month = proxy.moment(arg).format("MM");
+    queryParams.value.year = year;
+    queryParams.value.month = month;
+    handleQuery();
+  }
+
+  function disabledDateHandler(date) {
+    if (date <= proxy.moment().subtract(1, "month")) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
+  function uploadHandle(row) {
+    formDialogRef.value.open({
+      companyId: row.companyId,
+      companyName: row.companyName,
+      year: queryParams.value.year,
+      month: queryParams.value.month,
+    });
+  }
+  function viewHandle(row) {
+    viewDialogRef.value.open({
+      companyId: row.companyId,
+      companyName: row.companyName,
+      year: queryParams.value.year,
+      month: queryParams.value.month,
+    });
+  }
+  getList();
+  getOption();
+</script>

+ 136 - 133
src/views/business/production/financialReportTax/index.vue

@@ -18,20 +18,22 @@
     <!-- 搜索区 -->
     <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
       <el-form-item label="客户名称:">
-        <el-input v-model="queryParams.companyName" type="text"       size="small"  placeholder="请输入客户名称" :clearable="true"
+        <el-input v-model="queryParams.companyName" type="text" size="small" placeholder="请输入客户名称" :clearable="true"
           style="width: 130px" />
       </el-form-item>
       <el-form-item label="客户标签:">
-        <el-select v-model="queryParams.customerLabelId"       size="small"    style="width: 130px" clearable>
+        <el-select v-model="queryParams.customerLabelId" size="small" style="width: 130px" clearable>
           <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
         </el-select>
       </el-form-item>
       <el-form-item label="所属期:" prop="year">
-        <el-date-picker v-model="currentMonth" type="month" size="small" format="YYYY年MM月" style="width: 120px" :clearable="false"
-          value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler" />
+        <el-date-picker v-model="currentMonth" type="month" size="small" format="YYYY年MM月" style="width: 120px"
+          :clearable="false" value-format="YYYY-MM-01" :disabled-date="disabledDateHandler"
+          @change="monthChangeHandler" />
       </el-form-item>
       <el-form-item label="报税状态:">
-        <el-select v-model="queryParams.status" type="text" placeholder="状态" :clearable="true" size="small" style="width: 130px">
+        <el-select v-model="queryParams.status" type="text" placeholder="状态" :clearable="true" size="small"
+          style="width: 130px">
           <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </el-form-item>
@@ -54,70 +56,72 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
       <el-tab-pane label="全部" name="first"></el-tab-pane>
       <el-tab-pane label="我的" name="second"></el-tab-pane>
     </el-tabs>
-    <!-- 列表区 -->
-    <el-table v-loading="loading" :data="taxList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
-      <!-- <el-table-column type="selection" width="55" align="center" /> -->
-      <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
-        <template #default="scope">
-          <div style="display: flex; align-items: center; ">
-            <template v-if="scope.row.customerLabelName ">
-              <el-tooltip :content="scope.row.customerLabelName" placement="top">
-                <el-icon :size="15">
-                  <CollectionTag />
-                </el-icon>
-              </el-tooltip>
-              <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
-            </template>
-            <template v-else>
-              <div style="width: 20px; height: 15px;"></div>
-              <span>{{ scope.row.companyName }}</span>
-            </template>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
-      <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
-      <el-table-column label="是否零申报" align="center" min-width="80" prop="isZero">
-        <template #default="scope">
-          {{
-          scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
-          }}
-        </template>
-      </el-table-column>
-      <el-table-column label="报税填写" align="center" width="80" prop="evidenceFile">
-        <template #default="scope">
-          <el-button link type="primary" size="small" @click="fillIn(scope.row)"
-            v-hasPermi="['business:financialReportTaxNonZero:saveDetail']">{{
-            scope.row.detail == null
-            ? "填写"
-            : scope.row.detail.status === 1
-            ? "进行中"
-            : "已填写"
-            }}</el-button>
-        </template>
-      </el-table-column>
-      <el-table-column label="报税附件" align="center" width="80" prop="content">
-        <template #default="scope">
-          <el-button link type="primary" :disabled="
+  </div>
+  <!-- 列表区 -->
+  <el-table v-loading="loading" :data="taxList" size="small" border height="100%"
+    @selection-change="handleSelectionChange">
+    <!-- <el-table-column type="selection" width="55" align="center" /> -->
+    <el-table-column label="客户名称" align="center" prop="companyName" min-width="250">
+      <template #default="scope">
+        <div style="display: flex; align-items: center; ">
+          <template v-if="scope.row.customerLabelName ">
+            <el-tooltip :content="scope.row.customerLabelName" placement="top">
+              <el-icon :size="15">
+                <CollectionTag />
+              </el-icon>
+            </el-tooltip>
+            <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
+          </template>
+          <template v-else>
+            <div style="width: 20px; height: 15px;"></div>
+            <span>{{ scope.row.companyName }}</span>
+          </template>
+        </div>
+      </template>
+    </el-table-column>
+    <el-table-column label="来源" align="center" prop="fromCompanyName" min-width="100" />
+    <el-table-column label="纳税性质" align="center" width="100" prop="taxType" />
+    <el-table-column label="是否零申报" align="center" min-width="80" prop="isZero">
+      <template #default="scope">
+        {{
+        scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
+        }}
+      </template>
+    </el-table-column>
+    <el-table-column label="报税填写" align="center" width="80" prop="evidenceFile">
+      <template #default="scope">
+        <el-button link type="primary" size="small" @click="fillIn(scope.row)"
+          v-hasPermi="['business:financialReportTaxNonZero:saveDetail']">{{
+          scope.row.detail == null
+          ? "填写"
+          : scope.row.detail.status === 1
+          ? "进行中"
+          : "已填写"
+          }}</el-button>
+      </template>
+    </el-table-column>
+    <el-table-column label="报税附件" align="center" width="80" prop="content">
+      <template #default="scope">
+        <el-button link type="primary" :disabled="
               scope.row.detail == null || scope.row.detail.evidenceFile === ''
             " size="small" @click="showFiles(scope.row)"
-            v-hasPermi="['business:financialReportTaxNonZero:query']">查看文件</el-button>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" min-width="80" prop="verifyContent">
-        <template #default="scope">
-          <div :style="getStatusStyle(scope.row)">
-            {{ getStatusLabel(scope.row) }}
-            <el-popover placement="top-start" width="250" trigger="hover">
-              <div style="display: flex; flex-direction: row">
-                <div v-for="item in selectStatus" :key="item.value"
-                  style="display: flex; flex-direction: row; margin-right: 10px">
-                  <div :style="{
+          v-hasPermi="['business:financialReportTaxNonZero:query']">查看文件</el-button>
+      </template>
+    </el-table-column>
+    <el-table-column label="状态" align="center" min-width="80" prop="verifyContent">
+      <template #default="scope">
+        <div :style="getStatusStyle(scope.row)">
+          {{ getStatusLabel(scope.row) }}
+          <el-popover placement="top-start" width="250" trigger="hover">
+            <div style="display: flex; flex-direction: row">
+              <div v-for="item in selectStatus" :key="item.value"
+                style="display: flex; flex-direction: row; margin-right: 10px">
+                <div :style="{
                       backgroundColor: item.color,
                       width: '14px',
                       height: '14px',
@@ -125,18 +129,18 @@
                       borderRadius: '50%',
                       border: item.color === '#fff' ? '1px solid #ddd' : 'none',
                     }" />
-                  <div style="
+                <div style="
                       display: inline-block;
                       margin-left: 10px;
                       line-height: 36px;
                       font-size: 10px;
                     ">
-                    {{ item.label }}
-                  </div>
+                  {{ item.label }}
                 </div>
               </div>
-              <template #reference>
-                <span style="
+            </div>
+            <template #reference>
+              <span style="
                     color: #fff;
                     font-size: 12px;
                     text-align: center;
@@ -147,18 +151,16 @@
                     background-color: #ccc;
                     border-radius: 50%;
                   ">?</span>
-              </template>
-            </el-popover>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
-      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
-        <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
-        :show-overflow-tooltip="true" />
-      <!-- <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width">
+            </template>
+          </el-popover>
+        </div>
+      </template>
+    </el-table-column>
+    <el-table-column label="执行人" align="center" min-width="100" prop="serviceName" />
+    <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+    <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
+    <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150" :show-overflow-tooltip="true" />
+    <!-- <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width">
         <template #default="scope">
           <el-button size="small" link type="primary" :disabled="
               scope.row.detail == null || scope.row.detail.status !== 3
@@ -166,59 +168,59 @@
             v-hasPermi="['business:financialReportTaxNonZero:back']">退回</el-button>
         </template>
       </el-table-column> -->
-    </el-table>
+  </el-table>
 
-    <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize" @pagination="getList" />
+  <!-- 分页 -->
+  <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
+    @pagination="getList" />
 
-    <!-- 表单 -->
-    <FormDialog ref="formDialog" :get-list="getList"></FormDialog>
+  <!-- 表单 -->
+  <FormDialog ref="formDialog" :get-list="getList"></FormDialog>
 
-    <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable :close-on-click-modal = "false">
-      <el-form ref="dictRef" size="small" label-width="100">
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="报税所属期:" prop="year">
-              <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月"
-                value-format="YYYY-MM-01" :disabled-date="disabledDateHandler" @change="monthChangeHandler"
-                :clearable="false" />
-            </el-form-item>
-            <el-form-item label="纳税性质:" prop="taxType">
-              <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
-                <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-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true">
-                <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="关键字:">
-              <el-input size="small" v-model="queryParams.companyName" type="text" placeholder="请输入客户名称"
-                :clearable="true" />
-            </el-form-item>
-            <el-form-item label="来源:" v-if="tenant.versionId === '4'">
-              <el-input v-model="queryParams.fromCompanyName" size="small" type="text" placeholder="请输入客户来源"
-                :clearable="true" />
-            </el-form-item>
-            <el-form-item label="税号:">
-              <el-input size="small" v-model="queryParams.socialCreditCode" type="text" placeholder="请输入税号"
-                :clearable="true" />
-            </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>
-        </div>
-      </template>
-    </el-dialog>
+  <!-- 更多搜索弹窗 -->
+  <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body size="small" draggable
+    :close-on-click-modal="false">
+    <el-form ref="dictRef" size="small" label-width="100">
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="报税所属期:" prop="year">
+            <el-date-picker size="small" v-model="currentMonth" type="month" format="YYYY年MM月" value-format="YYYY-MM-01"
+              :disabled-date="disabledDateHandler" @change="monthChangeHandler" :clearable="false" />
+          </el-form-item>
+          <el-form-item label="纳税性质:" prop="taxType">
+            <el-select size="small" v-model="queryParams.taxType" placeholder="请选择纳税性质" :clearable="true">
+              <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-select size="small" v-model="queryParams.status" type="text" placeholder="状态" :clearable="true">
+              <el-option v-for="item in selectStatus" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="关键字:">
+            <el-input size="small" v-model="queryParams.companyName" type="text" placeholder="请输入客户名称"
+              :clearable="true" />
+          </el-form-item>
+          <el-form-item label="来源:" v-if="tenant.versionId === '4'">
+            <el-input v-model="queryParams.fromCompanyName" size="small" type="text" placeholder="请输入客户来源"
+              :clearable="true" />
+          </el-form-item>
+          <el-form-item label="税号:">
+            <el-input size="small" v-model="queryParams.socialCreditCode" type="text" placeholder="请输入税号"
+              :clearable="true" />
+          </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>
+      </div>
+    </template>
+  </el-dialog>
   </div>
 </template>
 
@@ -236,7 +238,7 @@
     exportFinalTax,
   } from "@/api/business/production/tax";
   import FormDialog from "./FormDialog.vue";
- import { listLableNoPage } from "@/api/business/lable"
+  import { listLableNoPage } from "@/api/business/lable"
   const { proxy } = getCurrentInstance();
   /** 字典数组区 */
   /** 查询 对象 */
@@ -251,6 +253,7 @@
   const multiple = ref(true);
   const total = ref(0);
   const flag = ref(checkPermission(['business:taxes:person']))
+  const flag2 = ref(checkPermission(['business:taxes:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const currentMonth = ref(
     proxy.moment().subtract(1, "month").format("YYYY-MM-01")
@@ -341,7 +344,7 @@
     };
     currentMonth.value = proxy.moment().subtract(1, "month").format("YYYY-MM-01");
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 4 - 1
src/views/business/production/financialReportTaxIsZero/index.vue

@@ -87,10 +87,12 @@
         <el-button icon="Refresh" @click="resetQuery" size="small" >重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
       <el-tab-pane label="全部" name="first"></el-tab-pane>
       <el-tab-pane label="我的" name="second"></el-tab-pane>
     </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table
       v-loading="loading"
@@ -393,6 +395,7 @@ const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
 const flag = ref(checkPermission(['business:taxeszero:person']))
+const flag2 = ref(checkPermission(['business:taxeszero:myself']))
  const activeName = flag.value ? ref('first') : ref('second');
 const tenant = useUserStore().tenant;
 const taxList = ref([]);

+ 9 - 6
src/views/business/production/keepAccount/index.vue

@@ -56,12 +56,14 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -305,6 +307,7 @@
   const formDialogRef = ref(null);
   const viewDialogRef = ref(null);
   const flag = ref(checkPermission(['business:account:person']))
+  const flag2 = ref(checkPermission(['business:account:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const form = ref({
     id: null,

+ 17 - 19
src/views/business/production/onceWork/index.vue

@@ -8,8 +8,7 @@
         </el-button>
         <template #dropdown>
           <el-dropdown-menu>
-            <el-dropdown-item icon="Download" @click="handleExport"
-              v-hasPermi="['business:production:onceexport']">
+            <el-dropdown-item icon="Download" @click="handleExport" v-hasPermi="['business:production:onceexport']">
               导出</el-dropdown-item>
           </el-dropdown-menu>
         </template>
@@ -44,12 +43,14 @@
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -62,19 +63,13 @@
         prop="socialCreditCode"
         min-width="150"
       /> -->
-      <el-table-column
-        label="来源列"
-        align="center"
-        prop="accountName"
-        min-width="150"
-        v-if ="tenant.versionId !== '4'"
-      />
+      <el-table-column label="来源列" align="center" prop="accountName" min-width="150" v-if="tenant.versionId !== '4'" />
       <el-table-column label="工单类型" align="center" prop="amount" width="80">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
         </template>
       </el-table-column>
-      <el-table-column label="项目" align="center"  width="200" :show-overflow-tooltip="true">
+      <el-table-column label="项目" align="center" width="200" :show-overflow-tooltip="true">
         <template #default="scope">
           {{
           scope.row.noContract === 1? scope.row.remark: `${scope.row.taskTypeName}${scope.row.alterType
@@ -192,8 +187,10 @@
             领取
           </el-button>
 
-          <el-button v-if="scope.row.record !== undefined && scope.row.record.status == 1 && scope.row.record.handlerId  ===  useUserStore().user.userId" size="small" type="primary"
-            link v-hasPermi="['business:production:onceWork:finished']" @click="finishedHandle3(scope.row)">
+          <el-button
+            v-if="scope.row.record !== undefined && scope.row.record.status == 1 && scope.row.record.handlerId  ===  useUserStore().user.userId"
+            size="small" type="primary" link v-hasPermi="['business:production:onceWork:finished']"
+            @click="finishedHandle3(scope.row)">
             取消领取
           </el-button>
         </template>
@@ -255,6 +252,7 @@
   const total = ref(0);
   const prev = ref([]);
   const flag = ref(checkPermission(['business:once:person']))
+  const flag2 = ref(checkPermission(['business:once:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const setEntrustDialogRef = ref(null);
 
@@ -433,4 +431,4 @@
       }).finally(() => loading.value = false);
   }
   getList();
-</script>
+</script>

+ 1 - 0
src/views/business/production/productionCompany/index.vue

@@ -72,6 +72,7 @@ import useUserStore from "@/store/modules/user";
 /** 字典数组区 */
 /** 查询 对象 */
 const flag = ref(checkPermission(['business:customer:person']))
+const flag2 = ref(checkPermission(['business:customer:myself']))
 const activeName = flag.value ? ref('first') : ref('second');
 const companyList = ref([]);
 const loading = ref(true);

+ 15 - 15
src/views/business/production/receiveTicket/index.vue

@@ -56,14 +56,14 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -92,7 +92,7 @@
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
        scope.row.checkoutDate }} -->
-       {{ proxy.moment().subtract(1, "month").format("yyyy")+"-"+queryParams.month}}
+          {{ proxy.moment().subtract(1, "month").format("yyyy")+"-"+queryParams.month}}
         </template>
       </el-table-column>
       <el-table-column align="center">
@@ -142,18 +142,17 @@
       <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
       </el-table-column>
       <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-        :show-overflow-tooltip="true" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
       <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
         :show-overflow-tooltip="true" />
     </el-table>
     <!-- 分页 -->
-    <pagination  v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
       v-model:limit="queryParams.pageSize" @pagination="getList" />
     <form-dialog ref="formDialogRef" :get-list="getList" />
     <view-dialog ref="viewDialogRef" :get-list="getList" />
     <!-- 更多搜索弹窗 -->
-    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable :close-on-click-modal = "false">
+    <el-dialog title="更多搜索" v-model="moreSearch" width="620px" append-to-body draggable :close-on-click-modal="false">
       <el-form :model="queryParams" ref="queryRef" size="small" label-width="100">
         <el-row :gutter="20">
           <el-col :span="12">
@@ -256,7 +255,7 @@
   } from "@/api/business/production/receiveTicket";
   import { taxTypes } from "@/utils/default";
   import { listCompany } from "@/api/business/crm/company";
-   import { listLableNoPage } from "@/api/business/lable"
+  import { listLableNoPage } from "@/api/business/lable"
   import { reactive, ref, toRefs } from "vue";
   import formDialog from "./form";
   import viewDialog from "./view";
@@ -371,6 +370,7 @@
   const formDialogRef = ref(null);
   const viewDialogRef = ref(null);
   const flag = ref(checkPermission(['business:task:person']))
+  const flag2 = ref(checkPermission(['business:task:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const form = ref({
     id: null,
@@ -448,7 +448,7 @@
       companyName: "",
     };
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 11 - 8
src/views/business/production/receiveTicketFeedback/index.vue

@@ -42,12 +42,14 @@
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -173,6 +175,7 @@ width="50"
   const showIndex = ref(0);
   const queryRadio = ref("全部");
   const flag = ref(checkPermission(['business:feedback:person']))
+  const flag2 = ref(checkPermission(['business:feedback:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const formOpen = ref(false);
 
@@ -270,7 +273,7 @@ width="50"
     };
     feedbackMonth.value = null;
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }
@@ -407,7 +410,7 @@ width="50"
     }
     queryParams.value = query;
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 23 - 23
src/views/business/production/salary/index.vue

@@ -17,19 +17,18 @@
       </el-dropdown>
     </div>
     <!-- 搜索区 -->
-    <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true"
-    label-width="68px">
+    <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input v-model="queryParams.companyName" style="width: 130px"   size="small"  placeholder="请输入客户名称" clearable
+        <el-input v-model="queryParams.companyName" style="width: 130px" size="small" placeholder="请输入客户名称" clearable
           @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="客户标签:">
-        <el-select v-model="queryParams.customerLabelId" style="width:130px"  size="small"  clearable>
+        <el-select v-model="queryParams.customerLabelId" style="width:130px" size="small" clearable>
           <el-option v-for="item in options" :key="item.id" :label="item.lable" :value="item.id" />
         </el-select>
       </el-form-item>
       <el-form-item label="月份:">
-        <el-select v-model.trim="queryParams.month"  placeholder="月份"  size="small"  style="width: 130px"
+        <el-select v-model.trim="queryParams.month" placeholder="月份" size="small" style="width: 130px"
           :clearable="false" @change="handleQuery">
           <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
@@ -41,15 +40,15 @@
         </el-select>
       </el-form-item>
       <el-form-item label="审核人:" prop="verifierName">
-        <el-input size="small"  v-model="queryParams.verifierName"   placeholder="请输入审核人" clearable style="width: 130px"
+        <el-input size="small" v-model="queryParams.verifierName" placeholder="请输入审核人" clearable style="width: 130px"
           @keyup.enter="handleQuery" />
       </el-form-item>
 
       <el-form-item prop="dateFilter" label="审核时间:">
-        <el-date-picker size="small"  v-model="queryParams.dateFilter" type="daterange" clearable  
-            format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
-            end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
-    </el-form-item>
+        <el-date-picker size="small" v-model="queryParams.dateFilter" type="daterange" clearable
+          format="YYYY - MM - DD " value-format="YYYY-MM-DD" range-separator="至" start-placeholder="业务日期"
+          end-placeholder="业务日期" style="width: 70%;"></el-date-picker>
+      </el-form-item>
       <el-form-item>
         <!-- <el-form-item v-if="tenant.versionId !== '4'" label="是否自己负责:" v-hasPermi="['business:noindividual:person']">
           <el-switch v-model="oneself" @change="handleOneself" />
@@ -59,15 +58,14 @@
         <el-button icon="Refresh" @click="resetQuery" size="small">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-
-
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -92,7 +90,7 @@
       </el-table-column>
       <el-table-column label="来源" align="center" min-width="80" prop="fromCompanyName" />
       <el-table-column label="纳税性质" min-width="100" align="center" prop="taxType" />
-      
+
       <el-table-column label="所属期" min-width="90" align="center">
         <template #default="scope">
           <!-- {{
@@ -150,10 +148,11 @@
       </el-table-column>
       <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
       </el-table-column>
-      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100"/>
-      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true"/>
+      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
 
-      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150" :show-overflow-tooltip="true"/>
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
+        :show-overflow-tooltip="true" />
     </el-table>
     <!-- 分页 -->
     <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
@@ -241,6 +240,7 @@
   const permissions = useUserStore().permissions;
   const all_permission = "*:*:*";
   const flag = ref(checkPermission(['business:noindividual:person']))
+  const flag2 = ref(checkPermission(['business:noindividual:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const options = ref([]);
   const data = reactive({

+ 16 - 14
src/views/business/socialSecurity/confirm/index.vue

@@ -55,12 +55,14 @@
       </el-form-item>
 
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
-      <el-tab-pane label="全部" name="first">
-      </el-tab-pane>
-      <el-tab-pane label="我的" name="second">
-      </el-tab-pane>
-    </el-tabs>
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+        <el-tab-pane label="全部" name="first">
+        </el-tab-pane>
+        <el-tab-pane label="我的" name="second">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="list" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -72,7 +74,7 @@
         <template #default="scope">
           <!-- {{ scope.row.currentDate != null && scope.row.currentDate > scope.row.checkoutDate ? scope.row.currentDate :
             scope.row.checkoutDate }} -->
-            {{ proxy.moment().subtract(1, "month").format("yyyy")+"-"+queryParams.month}}
+          {{ proxy.moment().subtract(1, "month").format("yyyy")+"-"+queryParams.month}}
         </template>
       </el-table-column>
       <el-table-column align="center">
@@ -121,11 +123,10 @@
       </el-table-column>
       <el-table-column label="执行人" align="center" prop="serviceName" min-width="100">
       </el-table-column>
-        <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
-        <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100"
-          :show-overflow-tooltip="true" />
-        <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
-          :show-overflow-tooltip="true" />
+      <el-table-column label="审核人" align="center" prop="verifierName" min-width="100" />
+      <el-table-column label="审核时间" align="center" prop="verifierTime" min-width="100" :show-overflow-tooltip="true" />
+      <el-table-column label="税号" align="center" prop="socialCreditCode" min-width="150"
+        :show-overflow-tooltip="true" />
     </el-table>
     <!-- 分页 -->
     <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
@@ -164,7 +165,7 @@
                 <el-option v-for="item in selectMonths" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
-            
+
           </el-col>
         </el-row>
       </el-form>
@@ -208,6 +209,7 @@
   const permissions = useUserStore().permissions;
   const all_permission = "*:*:*";
   const flag = ref(checkPermission(['business:confirm:person']))
+  const flag2 = ref(checkPermission(['business:confirm:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const data = reactive({
     selectMonths: [
@@ -386,7 +388,7 @@
       companyName: "",
     };
     if (activeName.value != null && activeName.value === 'second') {
-        queryParams.value.principal = useUserStore().user.userId;
+      queryParams.value.principal = useUserStore().user.userId;
     }
     handleQuery();
   }

+ 4 - 1
src/views/business/socialSecurity/declare/index.vue

@@ -49,12 +49,14 @@
         <el-button icon="Refresh" @click="resetQuery"  size="small" >重置</el-button>
       </el-form-item>
     </el-form>
-    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="flag">
+    <div v-if="flag && flag2 && tenant.versionId !== '4'">
+    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" >
       <el-tab-pane label="全部" name="first">
       </el-tab-pane>
       <el-tab-pane label="我的" name="second">
       </el-tab-pane>
     </el-tabs>
+  </div>
     <!-- 列表区 -->
     <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
       @selection-change="handleSelectionChange">
@@ -235,6 +237,7 @@
   const formOpen = ref(false);
   const currentMonth = ref(proxy.moment().format("YYYY-MM-01"));
   const flag = ref(checkPermission(['business:declare:person']))
+  const flag2 = ref(checkPermission(['business:declare:myself']))
   const activeName = flag.value ? ref('first') : ref('second');
   const form = ref({
     id: null,