| | |
| | | </div> |
| | | </div> |
| | | <div v-show="forms == 2" class="first-box-outer"> |
| | | <div class="f-b-o-in"> |
| | | <div class="f-b-o-in" v-if="active"> |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <el-collapse-item title="公司基本信息" name="1"> |
| | | <avue-form |
| | |
| | | import { mapGetters } from "vuex"; |
| | | import { add, adds, selectIn } from "@/api/recordOur/outCardPopup"; |
| | | import attach from "@/components/attach/attach"; |
| | | import { |
| | | // getDetail, |
| | | getList, |
| | | getListre, |
| | | getListrek, |
| | | getListrev, |
| | | } from "@/api/permit/permit"; |
| | | export default { |
| | | components: { |
| | | attach: attach, |
| | |
| | | forms: 1, |
| | | data0: {}, |
| | | obj0: {}, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | option: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | |
| | | }, |
| | | activeNames: ["1", "2"], |
| | | opens: true, |
| | | active: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["useWhere", "canDoIt", "yanzhen"]), |
| | | ...mapGetters(["userInfo", "useWhere", "canDoIt", "yanzhen"]), |
| | | }, |
| | | watch: { |
| | | useWhere() { |
| | | // console.log(this.canDoIt, "canDoIt"); |
| | | for (var k in this.data) { |
| | | if (this.useWhere == this.data[k].type) { |
| | | this.see = true; |
| | |
| | | this.apiName = this.data[k].datas.apiName; |
| | | this.name = this.data[k].menuName; |
| | | var d = this.data[k].datas.column; |
| | | |
| | | //判断是否禁用按钮 |
| | | for (var k in this.canDoIt) { |
| | | if (this.canDoIt[k].type == this.type) { |
| | | console.log(this.type + "-------" + this.canDoIt[k].opens); |
| | | this.opens = this.canDoIt[k].opens; |
| | | } |
| | | } |
| | | //是否禁用按钮 |
| | | for (var k in d) { |
| | | d[k]["disabled"] = !this.opens; |
| | | } |
| | | this.option.column = d; |
| | | // this.option.column = d; |
| | | this.onLoad(this.page, {}, this.useWhere, d); |
| | | // //判断是否禁用按钮 |
| | | // for (var k in this.canDoIt) { |
| | | // if (this.canDoIt[k].type == this.type) { |
| | | // console.log(this.type + "-------" + this.canDoIt[k].opens); |
| | | // this.opens = this.canDoIt[k].opens; |
| | | // } |
| | | // } |
| | | // //是否禁用按钮 |
| | | // for (var k in d) { |
| | | // d[k]["disabled"] = !this.opens; |
| | | // } |
| | | |
| | | console.log("已选择type:" + this.useWhere + "--" + this.name); |
| | | this.convert(); |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | onLoad(page, params = {}, val, d) { |
| | | params["cardid"] = this.userInfo.Id; |
| | | 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) => { |
| | | this.data = this.data.concat(ress.data.data.records); |
| | | 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) => { |
| | | this.data = this.data.concat(resv.data.data.records); |
| | | console.log("已有申请数量:", this.data.length); |
| | | console.log(val); |
| | | 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, "审核通过"); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | changeBut(val, d) { |
| | | this.opens = val; |
| | | for (var k in d) { |
| | | d[k]["disabled"] = !this.opens; |
| | | } |
| | | this.option.column = d; |
| | | this.active = true; |
| | | }, |
| | | convert: function () { |
| | | var caridid = this.$store.getters.userInfo.Id; |
| | | selectIn(this.apiName[2], caridid, this.type).then((res) => { |
| | |
| | | }; |
| | | var d = {}; |
| | | this.data0 = d; |
| | | this.active = false; |
| | | }, |
| | | }, |
| | | }; |