| | |
| | | ref="form1" |
| | | v-model="obj0" |
| | | :option="option" |
| | | @submit="submit" |
| | | class="cardButs" |
| | | ></avue-form> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="附件上传/查询" name="2"> |
| | | <attach :type="imgType" :opens="opens"></attach> |
| | | <attach |
| | | :type="imgType" |
| | | :ptype="type" |
| | | :opens="opens" |
| | | :enclosure="enclosure" |
| | | ></attach> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | |
| | | getListre, |
| | | getListrek, |
| | | getListrev, |
| | | getListrel |
| | | } from "@/api/permit/permit"; |
| | | export default { |
| | | components: { |
| | | attach: attach, |
| | | attach: attach |
| | | }, |
| | | props: ["data", "together"], |
| | | data() { |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | submitBtn: true, |
| | | gutter: 50, |
| | | column: [], |
| | | column: [] |
| | | }, |
| | | activeNames: ["1", "2"], |
| | | opens: true, |
| | |
| | | OnceChouse: false, //选择武装押运或者保安服务许可 |
| | | cardData: [], |
| | | choseType: "", |
| | | overtime: { |
| | | overtimef: "", |
| | | overtimec: "" |
| | | }, |
| | | enclosure: [] //附件上传 基础数据 |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "useWhere"]), |
| | | ...mapGetters(["userInfo", "useWhere"]) |
| | | }, |
| | | watch: { |
| | | useWhere() { |
| | |
| | | this.OnceChouse = true; |
| | | |
| | | d.push(this.together[i]); |
| | | console.log("选择"); |
| | | // console.log("选择"); |
| | | } |
| | | } |
| | | if (this.OnceChouse) { |
| | |
| | | if (this.useWhere == "close") { |
| | | this.tipover(); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | tipchose() { |
| | |
| | | if (n == this.data[k].type) { |
| | | this.see = true; |
| | | this.type = this.data[k].type; |
| | | this.enclosure = this.data[k].enclosure; |
| | | this.overtime = this.data[k].overtime; |
| | | this.imgType = this.data[k].imgType; |
| | | this.htmls = this.data[k].datas.htmls; |
| | | this.apiName = this.data[k].datas.apiName; |
| | |
| | | }, |
| | | 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, "审核不通过"); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | |
| | | 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) { |
| | |
| | | this.qx(); |
| | | this.$message({ |
| | | message: "暂存申请成功", |
| | | type: "success", |
| | | type: "success" |
| | | }); |
| | | }); |
| | | }, |
| | | aa(b) { |
| | | console.log(b); |
| | | }, |
| | | up() { |
| | | submit() { |
| | | this.up(0); |
| | | }, |
| | | up(val = 1) { |
| | | //提交申请 |
| | | // this.submit(); |
| | | if (val == 1) { |
| | | this.$refs.form1.submit(); //解决点击提交不能显示那个字段输入错误的问题 |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in this.option.column) { |
| | |
| | | this.data0.ptype = this.type; |
| | | this.data0.cardid = this.$store.getters.userInfo.Id; |
| | | |
| | | // if (!this.tipover(1, this.data0)) { |
| | | // console.log("不通过"); |
| | | // return; |
| | | // } |
| | | // console.log(this.tipover(1, this.data0)); |
| | | // return; |
| | | |
| | | //验证数据 |
| | | var commin = true; |
| | | var a = this.data0; |
| | |
| | | if (!yanzhengphons.test(a[k])) { |
| | | // console.log(a[k], k); |
| | | commin = false; |
| | | console.log(1); |
| | | break; |
| | | } |
| | | } else if (k == "creditcode" || k == "registeredcapital") { |
| | | // } else if (k == "creditcode" || k == "registeredcapital") { |
| | | } else if (k == "registeredcapital") { |
| | | //数字验证 |
| | | if (!yanzhengnumbers.test(a[k])) { |
| | | // console.log(a[k], k); |
| | | commin = false; |
| | | console.log(2); |
| | | break; |
| | | } |
| | | } else if (k == "address" || k == "business") { |
| | | //跳过验证 |
| | | continue; |
| | | } else { |
| | | //空值验证 |
| | | if (a[k] == "" && k != "ptype") { |
| | | // console.log(a[k], k); |
| | | commin = false; |
| | | 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); |
| | | // 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); |
| | | }); |
| | | }, |
| | | |
| | | getNowTime(form) { |
| | | var DaysToAdd = form; |
| | | var now = new Date(); |
| | | var newdate = new Date(); |
| | | var newtimems = newdate.getTime() + DaysToAdd * 24 * 60 * 60 * 1000; |
| | | newdate.setTime(newtimems); |
| | | //只得到年月日的 |
| | | var time = |
| | | newdate.getFullYear() + |
| | | "-" + |
| | | (newdate.getMonth() + 1) + |
| | | "-" + |
| | | newdate.getDate(); |
| | | //得到具体时间 |
| | | return time; |
| | | }, |
| | | tipover(a, b) { |
| | | if (a == 1) { |
| | | console.log(b); |
| | |
| | | this.data0 = d; |
| | | this.active = false; |
| | | this.OnceChouse = false; |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | </style> |
| | | <style lang="scss"></style> |