保安服务单位许可和备案申请系统
liuyg
2022-02-17 fa2872c51e7a8f6ff9ebb52cdf0fcb188610b3da
src/components/cardPopup/cardPopup.vue
@@ -95,10 +95,11 @@
  getListre,
  getListrek,
  getListrev,
  getListrel
} from "@/api/permit/permit";
export default {
  components: {
    attach: attach,
    attach: attach
  },
  props: ["data", "together"],
  data() {
@@ -115,13 +116,13 @@
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
        total: 0
      },
      option: {
        emptyBtn: false,
        submitBtn: true,
        gutter: 50,
        column: [],
        column: []
      },
      activeNames: ["1", "2"],
      opens: true,
@@ -132,13 +133,13 @@
      choseType: "",
      overtime: {
        overtimef: "",
        overtimec: "",
        overtimec: ""
      },
      enclosure: [], //附件上传 基础数据
      enclosure: [] //附件上传 基础数据
    };
  },
  computed: {
    ...mapGetters(["userInfo", "useWhere"]),
    ...mapGetters(["userInfo", "useWhere"])
  },
  watch: {
    useWhere() {
@@ -168,7 +169,7 @@
      if (this.useWhere == "close") {
        this.tipover();
      }
    },
    }
  },
  methods: {
    tipchose() {
@@ -197,33 +198,40 @@
    },
    onLoad(page, params = {}, val, d) {
      params["cardid"] = this.userInfo.Id;
      getList(page.currentPage, page.pageSize, params).then((res) => {
      getList(page.currentPage, page.pageSize, params).then(res => {
        const data = res.data.data;
        this.data = data.records;
        getListre(page.currentPage, page.pageSize, params).then((ress) => {
        getListre(page.currentPage, page.pageSize, params).then(ress => {
          this.data = this.data.concat(ress.data.data.records);
          getListrek(page.currentPage, page.pageSize, params).then((resk) => {
          getListrek(page.currentPage, page.pageSize, params).then(resk => {
            this.data = this.data.concat(resk.data.data.records);
            getListrev(page.currentPage, page.pageSize, params).then((resv) => {
            getListrev(page.currentPage, page.pageSize, params).then(resv => {
              this.data = this.data.concat(resv.data.data.records);
              // console.log("已有申请数量:", this.data.length);
              // console.log(val, "当前type");
              this.changeBut(true, d);
              if (this.data.length == 0) {
                // console.log("一条数据都没有");
              } else {
                this.data.forEach((item) => {
                  if (item.ptype == val) {
                    if (item.type == 0 || item.type == 2) {
                      this.changeBut(false, d);
                      // console.log(item, "有数据未审核或者审核通过");
                    } else {
                      this.changeBut(true, d);
                      // console.log(item, "审核不通过");
              getListrel(page.currentPage, page.pageSize, params).then(resl => {
                this.data = this.data.concat(resl.data.data.records);
                // console.log("已有申请数量:", this.data.length);
                // console.log(val, "当前type");
                if (this.data.kservicetime) {
                  this.data.kservicetime.split(",");
                }
                this.changeBut(true, d);
                if (this.data.length == 0) {
                  // console.log("一条数据都没有");
                } else {
                  this.data.forEach(item => {
                    // console.log(item.ptype);
                    if (item.ptype == val) {
                      if (item.type == 0 || item.type == 2) {
                        this.changeBut(false, d);
                        // console.log(item, "有数据未审核或者审核通过");
                      } else {
                        this.changeBut(true, d);
                        // console.log(item, "审核不通过");
                      }
                    }
                  }
                });
              }
                  });
                }
              });
            });
          });
        });
@@ -237,9 +245,9 @@
      this.option.column = d;
      this.active = true;
    },
    convert: function () {
    convert: function() {
      var caridid = this.$store.getters.userInfo.Id;
      selectIn(this.apiName[2], caridid, this.type).then((res) => {
      selectIn(this.apiName[2], caridid, this.type).then(res => {
        var d = res.data.data;
        // console.log(d, "d");
        for (var k in d) {
@@ -276,7 +284,7 @@
        this.qx();
        this.$message({
          message: "暂存申请成功",
          type: "success",
          type: "success"
        });
      });
    },
@@ -331,30 +339,39 @@
          continue;
        } else {
          //空值验证
          if (a[k] == "" && k != "ptype") {
            // console.log(a[k], k);
            commin = false;
            console.log(3);
            break;
          }
          // if (a[k] == "" && k != "ptype" && k != "creditcode") {
          //   console.log(a[k], k);
          //   commin = false;
          //   console.log(3);
          //   break;
          // }
        }
      }
      if (!commin) {
        this.$message({
          message: "请检查输入数据是否正确!",
          type: "warning",
          type: "warning"
        });
        return;
      }
      a["overtime"] = this.getNowTime(this.overtime.overtimec);
      console.log(a);
      // console.log(a);
      // return;
      // console.log(typeof this.data0.kservicetime);
      if (
        this.data0.kservicetime &&
        typeof this.data0.kservicetime != "string"
      ) {
        this.data0.kservicetime = this.data0.kservicetime.join(",");
      }
      // console.log(this.apiName[0], this.data0);
      // return;
      add(this.apiName[0], this.data0).then(() => {
        this.qx();
        this.$message({
          message: "提交申请成功",
          type: "success",
          type: "success"
        });
        this.$store.commit("changecanDoIt", false);
      });
@@ -401,10 +418,9 @@
      this.data0 = d;
      this.active = false;
      this.OnceChouse = false;
    },
  },
    }
  }
};
</script>
<style lang="scss">
</style>
<style lang="scss"></style>