| | |
| | | </el-button> |
| | | |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="jurisdiction"> |
| | | {{row.jurisdiction==-1?"":row.jurisdiction}} |
| | | {{ row.jurisdiction == -1 ? "" : row.jurisdiction }} |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="派遣单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | |
| | | prop: "name", |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | overHidden: true, |
| | | searchSpan: 4, |
| | | width: 210, |
| | | // span: 12, |
| | | labelWidth: 118, |
| | | }, |
| | |
| | | label: "保安公司", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | overHidden: true, |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | |
| | | }, |
| | | ], |
| | | labelWidth: 118, |
| | | width: 200, |
| | | width: 230, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | searchSpan: 4, |
| | |
| | | // search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | overHidden: true, |
| | | // span: 12, |
| | | labelWidth: 118, |
| | | }, |
| | |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | searchSpan: 4, |
| | | overHidden: true, |
| | | labelWidth: 118, |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-tree?parentId=0", |
| | |
| | | label: "负责人联系方式", |
| | | prop: "phone", |
| | | labelWidth: 118, |
| | | width: 110, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | |
| | | |
| | | //派遣服务公司登记 |
| | | |
| | |
| | | // // hide: true, |
| | | // disabled: true, |
| | | // }, |
| | | { |
| | | label: "保安员", |
| | | prop: "name", |
| | | type: "tree", |
| | | // width: 70, |
| | | labelWidth: 120, |
| | | searchSpan: 3, |
| | | multiple: true, |
| | | search: true, |
| | | // cell: true, |
| | | // hide: true, |
| | | props: { |
| | | label: "realName", |
| | | value: "id", |
| | | }, |
| | | dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择保安", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "保安员", |
| | | // prop: "name", |
| | | // type: "tree", |
| | | // // width: 70, |
| | | // labelWidth: 120, |
| | | // searchSpan: 3, |
| | | // multiple: true, |
| | | // search: true, |
| | | // // cell: true, |
| | | // // hide: true, |
| | | // props: { |
| | | // label: "realName", |
| | | // value: "id", |
| | | // }, |
| | | // dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择保安", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "联系人", |
| | | prop: "linkman", |
| | |
| | | labelWidth: 120, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | cascaderItem: ["name"], |
| | | cascaderItem: ["userIds"], |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: "派遣单位", |
| | | prop: "dispatcherCompany", |
| | |
| | | |
| | | { |
| | | label: "保安员", |
| | | prop: "name", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | // . |
| | | // overHidden: true |
| | | prop: "userIds", |
| | | type: "select", |
| | | width: 70, |
| | | labelWidth: 120, |
| | | searchSpan: 3, |
| | | search: true, |
| | | // cell: true, |
| | | // hide: true, |
| | | props: { |
| | | label: "realName", |
| | | value: "id", |
| | | }, |
| | | dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择保安", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | // { |
| | |
| | | border: true, |
| | | |
| | | selection: true, |
| | | column: column, |
| | | column: [ |
| | | ...column, |
| | | { |
| | | label: "服务区域", |
| | | labelWidth: 160, |
| | | prop: "fregion", |
| | | width: 69, |
| | | }, |
| | | { |
| | | label: "服务时间", |
| | | labelWidth: 160, |
| | | prop: "ftime", |
| | | width: 69, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | } |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | // this.row.businessLicense = ""; |
| | | this.row.businessLicense = res.url; |
| | | update(this.row).then( |
| | | () => { |
| | |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: "所属地区", |
| | | label: "所属辖区", |
| | | prop: "region", |
| | | span: 11, |
| | | labelWidth: 130, |
| | |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | // span: 11, |
| | | labelWidth: 130, |
| | | disabled: true, |
| | | span: 11, |
| | | }, |
| | | { |
| | | label: "经营范围", |
| | | prop: "business", |
| | | span: 24, |
| | |
| | | type: 'textarea', |
| | | showWordLimit: true, |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | // span: 11, |
| | | labelWidth: 130, |
| | | type: 'textarea', |
| | | disabled: true, |
| | | maxRows: 10, |
| | | span: 24, |
| | | } |
| | | |
| | | ] |
| | | |
| | | export var column1 = [ |
| | |
| | | </avue-crud>--> |
| | | <!-- 表单组件 --> |
| | | <basic-container> |
| | | <avue-form ref="form" v-model="obj0" :option="option0"> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | @submit="submit0" |
| | | > |
| | | <!-- <template slot-scope="scope" slot="menuForm"> |
| | | <el-button @click="tip">自定义按钮</el-button> |
| | | </template> --> |
| | |
| | | 枪支管理 |
| | | <gun :fromDeptId="departmentid"></gun> |
| | | </span> --> |
| | | <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> |
| | | <!-- 社保记录 --> |
| | | <social :deptid="obj0.departmentid"></social> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab7'" class="tab"> |
| | | <!-- 营业执照 --> |
| | | <businessLicense :row="obj0"></businessLicense> |
| | |
| | | <!-- 许可证 --> |
| | | <licence :row="obj0"></licence> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> |
| | | <!-- 社保记录 --> |
| | | <social :deptid="obj0.departmentid"></social> |
| | | </span> |
| | | |
| | | <el-dialog |
| | | title="出资人导入" |
| | | append-to-body |
| | |
| | | getOncedata, |
| | | // getdata, |
| | | // adddata, |
| | | // update, |
| | | update, |
| | | // remove, |
| | | getdataOnce1, |
| | | getdata1, |
| | |
| | | import licence from "./licence.vue"; |
| | | import businessLicense from "./businessLicense.vue"; |
| | | import social from "./social.vue"; |
| | | import { mapState } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | // }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "社保记录 ", |
| | | prop: "tab9", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "营业执照 ", |
| | | prop: "tab7", |
| | | }, |
| | |
| | | // icon: "el-icon-info", |
| | | label: "许可证 ", |
| | | prop: "tab8", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "社保记录 ", |
| | | prop: "tab9", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | chuzitime() { |
| | | return this.data1.capitaltime; |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | submit0(row, done, loading) { |
| | | console.log(row); |
| | | update(row).then( |
| | | () => { |
| | | // this.onLoad(this.page); |
| | | this.onloads(); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | |
| | | done(); |
| | | }, |
| | | handleImport() { |
| | | //出资人 |
| | | this.excelBox = true; |
| | |
| | | readLock(name) { |
| | | return window.localStorage.getItem(name); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | var that = this; |
| | | var doit = (a) => { |
| | | that.typeTABS = that.optionTABS.column[0]; |
| | | var row = {}; |
| | | if (that.readLock("danweidata") != null) { |
| | | row = JSON.parse(that.readLock("danweidata")); |
| | | // that.obj0.title = row.enterprisename; |
| | | console.log(row, "row"); |
| | | that.departmentid = row.departmentid; |
| | | for (var k in row) { |
| | | that.obj0[k] = row[k]; |
| | | } |
| | | that.creditcode = row.creditcode; |
| | | if (that.readLock("danweidataS") != null && a == 1) { |
| | | var b = JSON.parse(that.readLock("danweidataS")); |
| | | var i = 0; |
| | | for (var k in b) { |
| | | if (b[k].enterprisename == row.enterprisename) { |
| | | i = 1; |
| | | onloads() { |
| | | var that = this; |
| | | var doit = (a) => { |
| | | that.typeTABS = that.optionTABS.column[0]; |
| | | var row = {}; |
| | | if (that.readLock("danweidata") != null) { |
| | | row = JSON.parse(that.readLock("danweidata")); |
| | | // that.obj0.title = row.enterprisename; |
| | | // console.log(row, "row"); |
| | | that.departmentid = row.departmentid; |
| | | for (var k in row) { |
| | | that.obj0[k] = row[k]; |
| | | } |
| | | that.creditcode = row.creditcode; |
| | | if (that.readLock("danweidataS") != null && a == 1) { |
| | | var b = JSON.parse(that.readLock("danweidataS")); |
| | | var i = 0; |
| | | for (var k in b) { |
| | | if (b[k].enterprisename == row.enterprisename) { |
| | | i = 1; |
| | | } |
| | | } |
| | | if (i == 1) { |
| | | // console.log("存在"); |
| | | } else { |
| | | // console.log("已删除"); |
| | | |
| | | that.obj0 = {}; |
| | | that.obj0.enterprisename = row.enterprisename + "该公司已删除"; |
| | | window.localStorage.removeItem("danweidata"); |
| | | that.creditcode = ""; |
| | | } |
| | | } |
| | | if (i == 1) { |
| | | // console.log("存在"); |
| | | } else { |
| | | // console.log("已删除"); |
| | | |
| | | that.obj0 = {}; |
| | | that.obj0.enterprisename = row.enterprisename + "该公司已删除"; |
| | | window.localStorage.removeItem("danweidata"); |
| | | that.creditcode = ""; |
| | | } |
| | | } else { |
| | | // console.log("no"); |
| | | that.obj0.enterprisename = "未选择查询单位"; |
| | | } |
| | | } else { |
| | | // console.log("no"); |
| | | that.obj0.enterprisename = "未选择查询单位"; |
| | | } |
| | | }; |
| | | var flag = false, |
| | | i = 0, |
| | | ind = null; |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "保安单位详情") { |
| | | if (flag == false) { |
| | | ind = index; |
| | | flag = true; |
| | | } |
| | | i++; |
| | | } |
| | | }); |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1); |
| | | } |
| | | |
| | | var fromSecunityGuardId = this.$route.query.fromSecunityGuardId; |
| | | // var fromSecunityGuardId = this.$route.query; |
| | | if (fromSecunityGuardId != undefined) { |
| | | var value = { |
| | | departmentid: fromSecunityGuardId, |
| | | }; |
| | | getOncedata(value).then((res) => { |
| | | // console.log(res.data.data, "get"); |
| | | window.localStorage.setItem( |
| | | "danweidata", |
| | | JSON.stringify(res.data.data) |
| | | ); |
| | | doit(); |
| | | var flag = false, |
| | | i = 0, |
| | | ind = null; |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "保安单位详情") { |
| | | if (flag == false) { |
| | | ind = index; |
| | | flag = true; |
| | | } |
| | | i++; |
| | | } |
| | | }); |
| | | // return; |
| | | } else { |
| | | doit(1); |
| | | } |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1); |
| | | } |
| | | |
| | | var getdatas = (roleAlias) => { |
| | | var fromSecunityGuardId = that.$route.query.fromSecunityGuardId; |
| | | // var fromSecunityGuardId = that.$route.query; |
| | | if (fromSecunityGuardId != undefined || roleAlias == "保安公司管理员") { |
| | | var value = { |
| | | departmentid: fromSecunityGuardId || that.userInfo.dept_id, |
| | | }; |
| | | getOncedata(value).then((res) => { |
| | | // console.log(res.data.data, "get"); |
| | | window.localStorage.setItem( |
| | | "danweidata", |
| | | JSON.stringify(res.data.data) |
| | | ); |
| | | doit(); |
| | | }); |
| | | // return; |
| | | } else { |
| | | doit(1); |
| | | } |
| | | }; |
| | | |
| | | // console.log(this.userInfo, "userInfo"); |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | var d = that.option0.column; |
| | | // console.log(roleAlias); |
| | | if (roleAlias == "保安公司管理员") { |
| | | that.option0.submitBtn = true; |
| | | for (var k in d) { |
| | | if (d[k].label != "企业类型") { |
| | | d[k].disabled = false; |
| | | } |
| | | } |
| | | } else { |
| | | that.option0.submitBtn = false; |
| | | for (var k in d) { |
| | | d[k].disabled = true; |
| | | } |
| | | } |
| | | getdatas(roleAlias); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.onloads(); |
| | | }, |
| | | watch: { |
| | | // chuzitime() { |