| | |
| | | var d = this.data, |
| | | b = []; |
| | | for (var k in d) { |
| | | console.log({ |
| | | label: d[k].menuName, |
| | | value: d[k].type + "", |
| | | }); |
| | | // console.log({ |
| | | // label: d[k].menuName, |
| | | // value: d[k].type + "", |
| | | // }); |
| | | b.push({ |
| | | label: d[k].menuName, |
| | | value: d[k].type + "", |
| | |
| | | Object.assign(params, this.query) |
| | | ).then((resv) => { |
| | | this.data = this.data.concat(resv.data.data.records); |
| | | // console.log(this.data); |
| | | if (this.data.length == 0) { |
| | | this.$store.commit("changecanDoIt", true); |
| | | } else { |
| | | if (this.data[0].type == 0 || this.data[0].type == 2) { |
| | | this.$store.commit("changecanDoIt", false); |
| | | } else { |
| | | this.$store.commit("changecanDoIt", true); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="canDoIt" |
| | | v-if="opens" |
| | | @click="handleUpload" |
| | | >上 传 |
| | | </el-button> |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="canDoIt" |
| | | v-if="opens" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | props: ["type"], |
| | | props: ["type", "opens"], |
| | | data() { |
| | | var type = this.type; |
| | | var deptid = this.$route.query.deptId; |
| | |
| | | ></avue-form> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="附件上传/查询" name="2"> |
| | | <attach :type="imgType"></attach> |
| | | <attach :type="imgType" :opens="opens"></attach> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | |
| | | <div class="hand-next"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1" :disabled="!canDoIt" |
| | | <el-button type="primary" @click="tip1" :disabled="!opens" |
| | | >暂存</el-button |
| | | > |
| | | <el-button type="primary" @click="up()" :disabled="!canDoIt">{{ |
| | | <el-button type="primary" @click="up()" :disabled="!opens">{{ |
| | | //canDoIt ? "提交审批" : "已成功提交" |
| | | canDoIt ? "提交审批" : "提交审批" |
| | | opens ? "提交审批" : "提交审批" |
| | | }}</el-button> |
| | | <el-button type="info" @click="qx">取消</el-button> |
| | | </div> |
| | |
| | | column: [], |
| | | }, |
| | | activeNames: ["1", "2"], |
| | | opens: true, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["useWhere", "canDoIt"]), |
| | | ...mapGetters(["useWhere", "canDoIt", "yanzhen"]), |
| | | }, |
| | | watch: { |
| | | useWhere() { |
| | |
| | | this.type = this.data[k].type; |
| | | this.imgType = this.data[k].imgType; |
| | | this.htmls = this.data[k].datas.htmls; |
| | | |
| | | 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.canDoIt; |
| | | d[k]["disabled"] = !this.opens; |
| | | } |
| | | this.option.column = d; |
| | | |
| | | console.log("已选择type:" + this.useWhere + "--" + this.name); |
| | | this.convert(); |
| | | } |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | aa(b) { |
| | | console.log(b); |
| | | }, |
| | | up() { |
| | | //提交申请 |
| | | var d = {}; |
| | |
| | | this.data0 = d; |
| | | 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; |
| | | add(this.apiName[0], this.data0).then(() => { |
| | | this.qx(); |
| | | this.$message({ |
| | |
| | | this.$store.commit("changecanDoIt", false); |
| | | }); |
| | | }, |
| | | tipover() { |
| | | |
| | | tipover(a, b) { |
| | | if (a == 1) { |
| | | console.log(b); |
| | | var number = false, |
| | | reg = /^[0-9]+.?[0-9]*$/; |
| | | for (var k in b) { |
| | | if (k == "creditcode") { |
| | | if (reg.test(b[k])) { |
| | | number = true; |
| | | } else { |
| | | number = false; |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | } |
| | | return number; |
| | | } |
| | | this.forms = 1; |
| | | this.obj0 = { |
| | | // title0: "保安单位基本信息", |
| | |
| | | useWhere: state => state.dict.useWhere, |
| | | handle: state => state.dict.handle, |
| | | canDoIt: state => state.dict.canDoIt, |
| | | yanzhen: state => state.dict.yanzhen, |
| | | } |
| | | export default getters |
| | |
| | | ApprovalShow: false, |
| | | useWhere: 'close', |
| | | handle: true, |
| | | canDoIt: true |
| | | canDoIt: [], |
| | | // yanzhen: true, |
| | | }, |
| | | actions: { |
| | | FlowRoutes({ commit }) { |
| | |
| | | changehandle: (state, data) => { |
| | | state.handle = data |
| | | }, |
| | | setcanDoIt: (state, data) => { |
| | | state.canDoIt = data; |
| | | console.log(state.canDoIt, 'state.canDoIt') |
| | | }, |
| | | changecanDoIt: (state, data) => { |
| | | state.canDoIt = data |
| | | // console.log(data) |
| | | for (var k in state.canDoIt) { |
| | | if (state.canDoIt[k].type == data.ptype) { |
| | | state.canDoIt[k].opens = data.o; |
| | | // state.canDoIt[k].opens = true; |
| | | } |
| | | } |
| | | }, |
| | | // changeyanzhen: (state, data) => { |
| | | // state.yanzhen = data |
| | | // }, |
| | | } |
| | | |
| | | }; |
| | | |
| | |
| | | // import store from "@/store/index"; |
| | | |
| | | |
| | | // var validatePass = (rule, value, callback) => { |
| | | // var reg = /^[0-9]+.?[0-9]*$/; |
| | | // if (!reg.test(value)) { |
| | | // store.commit('changeyanzhen', false); |
| | | // callback(new Error('请输入数字')); |
| | | // } else { |
| | | // store.commit('changeyanzhen', true); |
| | | // callback(); |
| | | // } |
| | | // }; |
| | | |
| | | |
| | | var column = [ |
| | | { |
| | | label: "", |
| | | labelWidth: 20, |
| | | type: "title", |
| | | prop: "title0", |
| | | span: 24, |
| | | styles: { |
| | | fontSize: "24px", |
| | | }, |
| | | }, |
| | | { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | labelWidth: 160, |
| | | span: 12, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入社会信用代码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "辖区", |
| | | prop: "jurisdiction", |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-trees", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | labelWidth: 160, |
| | | span: 12, |
| | | }, |
| | | { |
| | | label: "企业类型", |
| | | prop: "ptype", |
| | | hide: true, |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "所属单位", |
| | | prop: "deptid", |
| | | hide: true, |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "", |
| | | // labelWidth: 20, |
| | | // type: "title", |
| | | // prop: "title0", |
| | | // span: 24, |
| | | // styles: { |
| | | // fontSize: "24px", |
| | | // }, |
| | | // }, |
| | | { |
| | | label: "统一社会信用代码", |
| | | prop: "creditcode", |
| | | labelWidth: 160, |
| | | span: 12, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入社会信用代码", |
| | | trigger: "blur", |
| | | }, |
| | | // { |
| | | // validator: validatePass, trigger: 'change' |
| | | // }, |
| | | ], |
| | | }, |
| | | |
| | | // { |
| | | // label: "企业类型", |
| | | // prop: "ptype", |
| | | // hide: true, |
| | | // display: false, |
| | | // }, |
| | | // { |
| | | // label: "所属单位", |
| | | // prop: "deptid", |
| | | // hide: true, |
| | | // display: false, |
| | | // }, |
| | | |
| | | { |
| | | label: "法定代表人", |
| | | prop: "representative", |
| | |
| | | message: "法定代表人电话", |
| | | trigger: "blur", |
| | | }, |
| | | // { |
| | | // validator: validatePass, trigger: 'change' |
| | | // }, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | message: "联系人电话", |
| | | trigger: "blur", |
| | | }, |
| | | // { |
| | | // validator: validatePass, trigger: 'change' |
| | | // }, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属地区", |
| | | prop: "region", |
| | | label: "所属辖区", |
| | | prop: "jurisdiction", |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-trees", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | labelWidth: 160, |
| | | span: 12, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属地区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | |
| | | this.cc(); |
| | | this.onLoad(this.page); |
| | | this.dataCard = ourDatas; |
| | | var cando = []; |
| | | for (var k in ourDatas) { |
| | | cando.push({ |
| | | opens: true, |
| | | type: ourDatas[k].type, |
| | | }); |
| | | } |
| | | this.$store.commit("setcanDoIt", cando); |
| | | }, |
| | | watch: { |
| | | useWhere() { |
| | | this.onLoad(this.page); |
| | | }, |
| | | }, |
| | | methods: { |
| | | onLoad(page, params = {}) { |
| | |
| | | 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); |
| | | if (this.data.length == 0) { |
| | | this.$store.commit("changecanDoIt", true); |
| | | } else { |
| | | this.$store.commit("changecanDoIt", false); |
| | | } |
| | | console.log("已有申请数量:", this.data.length); |
| | | this.showCard = true; |
| | | this.data.forEach((item) => { |
| | | for (const key in this.dataCard) { |
| | | if (this.dataCard[key].ptype == item.ptype) { |
| | | console.log("已申请名称", this.dataCard[key].menuName); |
| | | console.log("申请状态", this.dataCard[key].type); |
| | | if ( |
| | | this.dataCard[key].type == 0 || |
| | | this.dataCard[key].type == 2 |
| | | ) { |
| | | this.$store.commit("changecanDoIt", false); |
| | | if (this.dataCard[key].type == item.ptype) { |
| | | // console.log("已申请名称:", item.enterprisename); |
| | | // console.log("已申请序号:", item.ptype); |
| | | // console.log("申请状态:", item.type); |
| | | for (var k in this.canDoIt) { |
| | | if (this.canDoIt[k].type == item.ptype) { |
| | | if (item.type == 0 || item.type == 2) { |
| | | this.$store.commit("changecanDoIt", { |
| | | o: false, |
| | | ptype: item.ptype, |
| | | }); |
| | | } else { |
| | | this.$store.commit("changecanDoIt", true); |
| | | this.$store.commit("changecanDoIt", { |
| | | o: false, |
| | | ptype: item.ptype, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | this.$store.commit("doitApprovalShow", true); |
| | | return; |
| | | } |
| | | this.onLoad(this.page); |
| | | this.$store.commit("changeuseWhere", val); |
| | | }, |
| | | }, |