zhongrj
2024-03-27 cc1c0a396698648256c350f6f0fe2cb2f0b02c7e
src/views/licenseApproval/securityGuard.vue
@@ -1,15 +1,17 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:57:58
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2021-08-26 17:54:06
 */
/* * @Author: liu * @Date: 2021-08-26 16:57:58 * @Last Modified by: liu * @Last
Modified time: 2021-11-05 14:16:49 */
<template>
  <div>
    <basic-container class="permit">
    <basic-container
      :class="[
        'permit',
        $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
        $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
      ]"
    >
      <avue-crud
        class="tablesss"
        :option="option"
        :table-loading="loading"
        :data="data"
@@ -48,25 +50,67 @@
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
            >附件</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            v-if="row.stateOur == '0'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="
              row.stateOur != '0' &&
              !(
                row.papprove == '1' &&
                row.xapprove == '1' &&
                row.sapprove == '1'
              )
            "
            @click.stop="rowSee(row)"
            >审批查询
          </el-button>
          <el-button
            icon="el-icon-brush"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="
              row.papprove == '1' && row.xapprove == '1' && row.sapprove == '1'
            "
            >打印备案证
          </el-button>
          <el-button
            icon="el-icon-brush"
            :size="size"
            :type="type"
            v-if="
              row.papprove == '1' && row.xapprove == '1' && row.sapprove == '1'
            "
            @click.stop="viewLicensehuizhi(row)"
            >回执打印
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
              row.stateOur == "1"
                ? "通过"
                : row.stateOur == "2"
                ? "不通过"
                : "待审核"
            }}
            <i class="gz" v-if="row.type == '0'"></i>
            <i class="gz" v-if="row.type == '2'"></i>
            <!--  黄色 -->
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '2'"></i>
            <!--  红色 -->
            <i class="zc" v-if="row.type == '0'"></i>
            <!--  绿色 -->
          </el-tag>
        </template>
      </avue-crud>
@@ -82,13 +126,13 @@
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="licence-head">备案回执</div>
          <div class="head-tid">
            洪公保服务
            编号
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
            <!-- 号 -->
          </div>
          <div class="licence-main">
            <div
@@ -100,9 +144,9 @@
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="licence-bottom">(公安机关印章)</div>
          <div class="l-bottom">
            发证日期
            <!-- 发证日期 -->
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
@@ -124,6 +168,48 @@
      </div>
    </div>
    <div
      v-if="dialogVisiblehuizhi"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licencelicencehuizhi"
      >
        <div
          class="licencehuizhi exam-box"
          id="licencehuizhi"
          v-if="dialogVisiblehuizhi"
        >
          <h3>回执单</h3>
          <p>
            南昌市公安局已收到
            <span>{{ rowData == null ? "" : rowData.enterprisename }}</span>
            的相关备案申请!
          </p>
          <div class="examine-bottom">
            <ul>
              <li>审批单位:<span>南昌市公安局</span></li>
              <li>
                日期:<span>{{
                  rowData == null ? "" : rowData.examinetime
                }}</span>
              </li>
            </ul>
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Printhuizhi">打 印</el-button>
          <el-button type="primary" @click="closePrinthuizhi">
            取 消
          </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
@@ -131,7 +217,7 @@
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_title">是否通过备案审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
@@ -141,9 +227,22 @@
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button @click="closecc">通过</el-button>
          <el-button type="primary" @click="subcc">不通过</el-button>
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
    <el-dialog
      title=""
      :visible.sync="dialogVisibleccsee"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <div class="f_title">
          审批 {{ stateOur == "1" ? "通过" : stateOur == "2" ? "不通过" : "" }}
        </div>
        <div><span>审批意见:</span> {{ stateText }}</div>
      </div>
    </el-dialog>
  </div>
@@ -158,7 +257,7 @@
  remove,
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
@@ -166,6 +265,8 @@
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisiblehuizhi: false, //回执
      dialogVisible: false, //许可证抽屉
      licenceData: {
@@ -181,6 +282,7 @@
        pageSize: 10,
        currentPage: 1,
        total: 0,
        ...this.$store.state.control.changePageSize,
      },
      selectionList: [],
      option: {
@@ -192,7 +294,7 @@
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        menuWidth: 377,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
@@ -200,284 +302,17 @@
        index: true,
        viewBtn: true,
        selection: true,
        addBtn:true,
        dialogClickModal: false,
        column: [
          {
            label: "企业名称",
            search: true,
            prop: "enterprisename",
            searchLabelWidth: 80,
            searchSpan: 4,
            overHidden: true,
            width: 250,
            rules: [
              {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "社会信用代码",
            prop: "creditcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入统一社会信用代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人",
            prop: "representative",
            width: 82,
            rules: [
              {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "法定代表人电话",
            width: 106,
            prop: "representativecell",
            rules: [
              {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人",
            prop: "contacts",
            width: 58,
            rules: [
              {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系人电话",
            width: 96,
            prop: "contactscell",
            rules: [
              {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册时间",
            hide: true,
            prop: "establishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请输入注册时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册资本",
            prop: "registeredcapital",
            rules: [
              {
                required: true,
                message: "请输入注册资本",
                trigger: "blur",
              },
            ],
          },
          {
            label: "组织机构代码",
            prop: "organizationcode",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入组织机构代码",
                trigger: "blur",
              },
            ],
          },
          {
            label: "工商注册号",
            hide: true,
            prop: "registrationnumber",
            rules: [
              {
                required: true,
                message: "请输入工商注册号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "纳税人识别号",
            prop: "identificationnumber",
            hide: true,
            rules: [
              {
                required: true,
                message: "请输入纳税人识别号",
                trigger: "blur",
              },
            ],
          },
          {
            label: "企业类型",
            hide: true,
            prop: "enterprises",
            rules: [
              {
                required: true,
                message: "请输入企业类型",
                trigger: "blur",
              },
            ],
          },
          {
            label: "注册地址",
            prop: "address",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属地区",
            hide: true,
            prop: "region",
            rules: [
              {
                required: true,
                message: "请输入所属地区",
                trigger: "blur",
              },
            ],
          },
          {
            label: "登记机关",
            prop: "registration",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属行业",
            hide: true,
            prop: "industry",
            rules: [
              {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属机构",
            prop: "deptid",
            addDisplay: false,
            type: "select",
            hide: true,
            dicUrl: "/api/blade-system/dept/selectIn",
            props: {
              label: "deptname",
              value: "deptid",
            },
          },
          {
            label: "许可类型",
            search: true,
            hide: true,
            prop: "ptype",
            type: "select",
            searchSpan: 4,
            dicData: [
              {
                label: "保安服务许可",
                value: "0",
              },
              {
                label: "保安培训许可",
                value: "1",
              },
            ],
          },
          {
            label: "提交时间",
            prop: "permitime",
            overHidden: true,
            addDisplay: false,
            width: 132,
            type: "date",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
            label: "审核状态",
            prop: "type",
            addDisplay: false,
            type: "select",
            dicData: [
              {
                label: "通过",
                value: "0",
              },
              {
                label: "不通过",
                value: "1",
              },
              {
                label: "待审核",
                value: "2",
              },
            ],
          },
          {
            label: "经营范围",
            prop: "business",
            component: "AvueUeditor",
            hide: true,
            minRows: 6,
            span: 24,
            rules: [
              {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
              },
            ],
          },
        ],
        ...this.$store.state.control.clearOtherBut,
        column: column,
      },
      data: [],
      user_name: "",
      stateOur: "",
      stateText: "",
      dialogVisibleccsee: false,
    };
  },
  computed: {
@@ -498,20 +333,24 @@
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  mounted() {
    this.$store.commit("setWindowSizeHeightAdd");
    //     console.log(this.userInfo.dept_id);
  },
  methods: {
    Printhuizhi() {
      this.$Print(this.$refs.licencehuizhi);
    },
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attach/index",
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.deptid, type: "0" },
        query: { deptid: row.cardid, type: "3" },
        // params: { row: row.identificationnumber },
      });
    },
@@ -552,34 +391,83 @@
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    rowSee(row) {
      this.dialogVisibleccsee = true;
      this.stateOur = row.stateOur;
      if (this.user_name == "派") {
        // 派出所审批
        this.stateText = row.popinion;
      } else if (this.user_name == "分") {
        // 分局审批
        this.stateText = row.xopinion;
      } else if (this.user_name == "市") {
        // 市局审批
        this.stateText = row.sopinion;
      } else {
        let shi = row.sopinion == "" ? "" : "市局:" + row.sopinion + "。";
        let fen = row.xopinion == "" ? "" : "分局:" + row.xopinion + "。";
        let pai = row.popinion == "" ? "" : "派出所:" + row.popinion + "。";
        this.stateText = shi + fen + pai;
      }
    },
    closecc() {
      this.upsData("1", "0");
    },
    subcc() {
      this.upsData("2", "1");
    },
    upsData(state, type) {
      this.dialogVisiblecc = false;
      if (this.user_name == "派") {
        // 派出所审批
        this.xukezData.papprove = state;
        this.xukezData.popinion = this.textareaShenpi;
        this.xukezData.type = ""; // 为了保持审核系统识别
      } else if (this.user_name == "分") {
        // 分局审批
        this.xukezData.xapprove = state;
        this.xukezData.xopinion = this.textareaShenpi;
        this.xukezData.type = ""; // 为了保持审核系统识别
      } else if (this.user_name == "市") {
        // 市局审批
        this.xukezData.sapprove = state;
        this.xukezData.sopinion = this.textareaShenpi;
        this.xukezData.type = type; // 为了保持审核系统识别
      }
      // console.log(this.xukezData);
      // return;
      update(this.xukezData).then((res) => {
        // console.log(res);
        this.$message({
          type: "success",
          message: "操作成功!",
        });
        this.refreshChange();
        this.textareaShenpi = "";
      });
    },
    viewLicensehuizhi() {
      this.dialogVisiblehuizhi = true;
    },
    closePrinthuizhi() {
      this.dialogVisiblehuizhi = false;
    },
    viewLicense(row) {
      //查看许可证
      // console.log(row, 34);
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["地址"] = row.address;
      this.licenceData.chiden["服务区域"] = row.industry;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      this.licenceData.chiden["备案时间"] = row.officetime;
      this.licenceData.chiden["备案内容"] = "自招保安单位备案";
      // this.licenceData.chiden["注册资本"] = row.registeredcapital;
      // this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      // console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
@@ -641,9 +529,61 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    getFenji(name) {
      var d = {};
      if (name == "派出所管理员") {
        d = {
          // papprove: 1,
        };
        this.user_name = "派";
      } else if (name == "分局管理员") {
        d = {
          papprove: "1",
        };
        this.user_name = "分";
      } else if (name == "市局管理员") {
        d = {
          xapprove: "1",
        };
        this.user_name = "市";
      }
      return d;
    },
    changeState(data) {
      var b = data;
      if (this.user_name == "派") {
        // 派出所审批
        b["stateOur"] = b.papprove == "0" ? "0" : b.papprove == "1" ? "1" : "2";
      } else if (this.user_name == "分") {
        // 分局审批
        b["stateOur"] = b.xapprove == "0" ? "0" : b.xapprove == "1" ? "1" : "2";
      } else if (this.user_name == "市") {
        // 市局审批
        b["stateOur"] = b.sapprove == "0" ? "0" : b.sapprove == "1" ? "1" : "2";
      } else {
        let shi = b.sapprove == "0" ? "0" : b.sapprove == "1" ? "1" : "2";
        let fen = b.xapprove == "0" ? "0" : b.xapprove == "1" ? "1" : "2";
        let pai = b.papprove == "0" ? "0" : b.papprove == "1" ? "1" : "2";
        // console.log(shi, fen, pai);
        if (shi == "1" && fen == "1" && pai == "1") {
          b["stateOur"] = 1;
        }
        if (shi == "2" || fen == "2" || pai == "2") {
          b["stateOur"] = 2;
        }
        // b["stateOur"];
      }
      return b;
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 3;
      params = {
        ...params,
        ...this.getFenji(this.userInfo.role_name),
      };
      // console.log(params, "params");
      // return;
      getList(
        page.currentPage,
        page.pageSize,
@@ -652,6 +592,11 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          // console.log(this.changeState(this.data[k]));
          this.data[k] = this.changeState(this.data[k]);
        }
        this.$store.commit("setWindowSizeHeightAdd");
        this.loading = false;
        this.selectionClear();
      });
@@ -741,7 +686,19 @@
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("../../static/img/permit/服务许可背景图.png");
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licencehuizhi {
  width: 800px;
  height: 348px;
  background-color: #fff !important;
  // background-image: url("../../static/img/permit/服务许可背景图.png");
  border: 1px solid rgba(#a3a3a3, 0.5);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
@@ -812,6 +769,9 @@
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  span {
    display: inline-block;
  }
  .f_title {
    position: absolute;
    top: 15px;
@@ -825,4 +785,43 @@
  align-content: center;
  justify-content: center;
}
.exam-box {
  width: 100%;
  height: 360px;
  position: relative;
  padding: 10px;
  background: #fff !important;
  color: #000;
  box-sizing: border-box;
}
.exam-box h3 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: 10px;
  line-height: 46px;
}
.exam-box p {
  text-indent: 2em;
  font-size: 18px;
}
.exam-box .examine-bottom {
  position: absolute;
  bottom: 10px;
  right: 10px;
}
.exam-box li {
  list-style: none;
  font-size: 18px;
  line-height: 32px;
}
.exam-box span {
  text-decoration: underline;
}
</style>