| | |
| | | <template> |
| | | <div class="dispatch"> |
| | | <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> |
| | | <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> |
| | | <span v-if="typeTABS.prop === 'tab1'" class="tab"> |
| | | <!-- <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud>--> |
| | | <!-- 表单组件 --> |
| | | <basic-container> |
| | | <avue-form |
| | | ref="form" |
| | |
| | | :option="option0" |
| | | @submit="submit0" |
| | | > |
| | | <!-- <template slot-scope="scope" slot="menuForm"> |
| | | <el-button @click="tip">自定义按钮</el-button> |
| | | </template> --> |
| | | </avue-form> |
| | | </basic-container> |
| | | </span> |
| | | <span v-if="typeTABS.prop === 'tab11'" class="tab"> |
| | | <!-- <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud>--> |
| | | <!-- 表单组件 --> |
| | | <basic-container> |
| | | <avue-form |
| | | ref="form" |
| | |
| | | :option="option01" |
| | | @submit="submit0" |
| | | > |
| | | <!-- <template slot-scope="scope" slot="menuForm"> |
| | | <el-button @click="tip">自定义按钮</el-button> |
| | | </template> --> |
| | | </avue-form> |
| | | </basic-container> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab2'" class="tab"> |
| | | <!-- <span v-if="typeTABS.prop === 'tab2'"> --> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option1" |
| | |
| | | @row-del="rowDel1" |
| | | @selection-change="selectionChange1" |
| | | @refresh-change="refreshChange1" |
| | | @on-load="onLoad1" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | |
| | | @row-del="rowDel2" |
| | | @selection-change="selectionChange2" |
| | | @refresh-change="refreshChange2" |
| | | @on-load="onLoad2" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | |
| | | </basic-container> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab4'" class="tab"> |
| | | <!-- 装备管理 --> |
| | | <equipments :fromDeptId="departmentid"></equipments> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab5'" class="tab"> |
| | | <!-- 车辆管理 --> |
| | | <car :fromDeptId="departmentid"></car> |
| | | </span> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab6'" class="tab"> |
| | | 枪支管理 |
| | | <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> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab8'" class="tab"> |
| | | <!-- 许可证 --> |
| | | <licence :row="obj0"></licence> |
| | | </span> |
| | | |
| | | </span> --> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <!-- <span v-if="typeTABS.prop === 'tab1'" class="tab"> --> |
| | | <el-tab-pane label="保安单位基本信息" name="tab1"> |
| | | <basic-container> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | @submit="submit0" |
| | | > |
| | | </avue-form> |
| | | </basic-container> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-if="typeTABS.prop === 'tab11'" class="tab"> --> |
| | | <el-tab-pane label="工商信息" name="tab11"> |
| | | <basic-container> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option01" |
| | | @submit="submit0" |
| | | > |
| | | </avue-form> |
| | | </basic-container> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab2'" class="tab"> --> |
| | | <el-tab-pane label="保安单位出资人员" name="tab2"> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option1" |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | ref="crudrec1" |
| | | :table-loading="loading1" |
| | | @row-save="rowSave1" |
| | | @search-change="searchChange1" |
| | | @search-reset="searchReset1" |
| | | @row-update="rowUpdate1" |
| | | @row-del="rowDel1" |
| | | @selection-change="selectionChange1" |
| | | @refresh-change="refreshChange1" |
| | | @on-load="onLoad1" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete1" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab3'" class="tab"> --> |
| | | <el-tab-pane label="主要管理人员信息" name="tab3"> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option2" |
| | | :data="data2" |
| | | :page.sync="page2" |
| | | ref="crudrec2" |
| | | :table-loading="loading2" |
| | | @row-save="rowSave2" |
| | | @search-change="searchChange2" |
| | | @search-reset="searchReset2" |
| | | @row-update="rowUpdate2" |
| | | @row-del="rowDel2" |
| | | @selection-change="selectionChange2" |
| | | @refresh-change="refreshChange2" |
| | | @on-load="onLoad2" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete2" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab4'" class="tab"> --> |
| | | <el-tab-pane label="装备管理" name="tab4"> |
| | | <!-- 装备管理 --> |
| | | <equipments :fromDeptId="departmentid" v-if="overzb"></equipments> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab5'" class="tab"> --> |
| | | <el-tab-pane label="车辆管理" name="tab5"> |
| | | <!-- 车辆管理 --> |
| | | <car :fromDeptId="departmentid" v-if="overcar"></car> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab6'" class="tab"> |
| | | 枪支管理 |
| | | <gun :fromDeptId="departmentid"></gun> |
| | | </span> --> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> --> |
| | | <el-tab-pane label="社保记录" name="tab9"> |
| | | <!-- 社保记录 --> |
| | | <social |
| | | :deptid="obj0.departmentid" |
| | | :socialRE="social" |
| | | v-if="social" |
| | | ></social> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab7'" class="tab"> --> |
| | | <el-tab-pane label="营业执照" name="tab7"> |
| | | <!-- 营业执照 --> |
| | | <businessLicense :row="obj0" v-if="overHtp"></businessLicense> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab8'" class="tab"> --> |
| | | <el-tab-pane label="许可证" name="tab8"> |
| | | <!-- 许可证 --> |
| | | <licence :row="obj0" v-if="overHtp"></licence> |
| | | <!-- </span> --> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-dialog |
| | | title="出资人导入" |
| | | append-to-body |
| | |
| | | ], |
| | | }; |
| | | return { |
| | | overcar: false, //结决id传入、信息获取的优先级 |
| | | overzb: false, //结决id传入、信息获取的优先级 |
| | | overcar: false, //结决id传入、信息获取的优先级 |
| | | |
| | | social: false, //解决表格错乱 |
| | | overHtp: false, |
| | | |
| | | activeName: "tab1", |
| | | |
| | | departmentid: "", |
| | | |
| | | excelBox: false, //出资人 |
| | |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/car/import-examSubject", |
| | | action: "/api/shareholder/import-share", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/examSubjectChoices/import-examSubject", |
| | | action: "/api/member/import-member", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | |
| | | }, |
| | | methods: { |
| | | submit0(row, done, loading) { |
| | | // let nowTab = this.typeTABS.prop; |
| | | // console.log(this.typeTABS); |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | row["departmentid"] = this.userInfo.dept_id; |
| | | } |
| | | console.log(row); |
| | | update(row).then( |
| | | () => { |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.onloads(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | this.refreshChange1(); |
| | | done(); |
| | | }, |
| | | handleTemplate() { |
| | | window.open(`/api/car/export-template`); |
| | | window.open(`/api/shareholder/export-template`); |
| | | }, |
| | | |
| | | handleImport1() { |
| | |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | this.refreshChange2(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | window.open(`/api/member/export-template`); |
| | | }, |
| | | |
| | | handleChangeTABS(column) { |
| | | this.typeTABS = column; |
| | | // this.$message.success(JSON.stringify(column)); |
| | | if (column.prop == "tab1") { |
| | | // handleChangeTABS(column) { |
| | | // // this.typeTABS = column; |
| | | // // console.log(column.prop); |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // // this.loading2 = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | handleClick(tab, event) { |
| | | // console.log(tab.name, event); |
| | | if (tab.name == "tab1") { |
| | | this.loading1 = false; |
| | | this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | } else if (column.prop == "tab2") { |
| | | } else if (tab.name == "tab5") { |
| | | this.overcar = true; |
| | | // this.onLoad(this.page); |
| | | } else if (tab.name == "tab4") { |
| | | this.overzb = true; |
| | | // this.onLoad(this.page); |
| | | } else if (tab.name == "tab2") { |
| | | // this.loading1 = false; |
| | | this.loading2 = false; |
| | | this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | } else if (column.prop == "tab3") { |
| | | } else if (tab.name == "tab3") { |
| | | this.loading1 = false; |
| | | // this.loading2 = false; |
| | | this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | } else if (tab.name == "tab9") { |
| | | this.social = true; //表格错乱 |
| | | } else { |
| | | this.social = false; |
| | | this.overcar = false; |
| | | this.overzb = false; |
| | | this.overcar = false; |
| | | } |
| | | }, |
| | | |
| | | //派遣记录 |
| | | sizeChange1(val) { |
| | | this.page1.currentPage = 1; |
| | |
| | | // var form = this.data[0]; |
| | | // delete form.id; |
| | | // for (var k = 0; k < 13; k++) { |
| | | form["creditcode"] = this.creditcode; |
| | | form["deptId"] = this.departmentid; |
| | | adddata1(form).then( |
| | | () => { |
| | | this.onLoad1(this.page1); |
| | |
| | | rowUpdate1(row, index, done, loading) { |
| | | delete row.shareholdingratio; |
| | | delete row.tenantId; |
| | | |
| | | console.log(row); |
| | | row["deptId"] = this.departmentid; |
| | | update1(row).then( |
| | | () => { |
| | | this.onLoad1(this.page1); |
| | |
| | | onLoad1(page, params = {}) { |
| | | this.loading1 = true; |
| | | console.log(page, params, 3435434); |
| | | params["creditcode"] = this.creditcode; |
| | | params["deptId"] = this.departmentid; |
| | | getdataOnce1( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | this.data1 = data.records; |
| | | console.log(this.data1); |
| | | this.loading1 = false; |
| | | |
| | | this.$refs.crudrec1.refreshTable(); |
| | | this.$refs.crudrec1.doLayout(); |
| | | }); |
| | | // onLoad1(page, params = {}) { |
| | | // this.loading1 = true; |
| | |
| | | // var form = this.data[0]; |
| | | // delete form.id; |
| | | // for (var k = 0; k < 13; k++) { |
| | | form["creditcode"] = this.creditcode; |
| | | form["deptId"] = this.departmentid; |
| | | adddata2(form).then( |
| | | () => { |
| | | this.onLoad2(this.page1); |
| | |
| | | rowUpdate2(row, index, done, loading) { |
| | | console.log(row); |
| | | delete row.shareholdingratio; |
| | | row["deptId"] = this.departmentid; |
| | | update2(row).then( |
| | | () => { |
| | | this.onLoad2(this.page2); |
| | |
| | | this.loading2 = true; |
| | | // console.log(page); |
| | | // getdata2( |
| | | params["creditcode"] = this.creditcode; |
| | | params["deptId"] = this.departmentid; |
| | | getdataOnce2( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | this.data2 = data.records; |
| | | console.log(this.data2); |
| | | this.loading2 = false; |
| | | this.$refs.crudrec2.refreshTable(); |
| | | this.$refs.crudrec2.doLayout(); |
| | | }); |
| | | }, |
| | | //派遣记录 |
| | |
| | | readLock(name) { |
| | | return window.localStorage.getItem(name); |
| | | }, |
| | | onloads() { |
| | | onloads(tab) { |
| | | var that = this; |
| | | var doit = (a) => { |
| | | that.typeTABS = that.optionTABS.column[0]; |
| | | // if (tab) { |
| | | // that.typeTABS.prop = tab; |
| | | // } |
| | | var row = {}; |
| | | if (that.readLock("danweidata") != null) { |
| | | row = JSON.parse(that.readLock("danweidata")); |
| | |
| | | } else { |
| | | that.creditcode = row.creditcode; |
| | | } |
| | | that.overHtp = true; |
| | | if (that.readLock("danweidataS") != null && a == 1) { |
| | | var b = JSON.parse(that.readLock("danweidataS")); |
| | | var i = 0; |