| | |
| | | <el-button v-if="userType === 1" style="margin-left: 10px;" type="primary" icon="el-icon-download" @click="importUnitCode">导入单位代码</el-button> |
| | | <el-button v-if="userType === 1" style="margin-left: 10px;" type="primary" icon="el-icon-download" @click="exportUnitCode">导出单位代码</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="queryHandle" /> |
| | | <el-button type="primary" v-if="isShow" icon="el-icon-delete" @click="openDelete">旧企业清除</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <el-button type="primary" @click="importHandle()">导入</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="deleteVisible" |
| | | append-to-body |
| | | title="清理企业数据" |
| | | :close-on-click-modal="false" |
| | | @close="resetDelete" |
| | | > |
| | | <el-form |
| | | ref="deleteForm" |
| | | label-position="right" |
| | | label-width="120px" |
| | | style="width:500px;" |
| | | element-loading-text="删除中..." |
| | | > |
| | | <el-form-item label="企业名称:"> |
| | | <el-input v-model.trim="deleteForm.enterprisename" class="carrierLicense_select"> |
| | | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="deleteVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="deleteEnter">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <uploadExcel ref="import" @getinfo="getEnterpriseList"></uploadExcel> |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | |
| | | } |
| | | } |
| | | return { |
| | | deleteVisible: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | currentPage: 1, |
| | |
| | | }, |
| | | queryForm: { |
| | | name: '' |
| | | }, |
| | | deleteForm: { |
| | | enterprisename: '' |
| | | }, |
| | | dialogFormVisible: false, |
| | | unitCodeVisible:false, |
| | |
| | | }) |
| | | },//删除企业 |
| | | |
| | | async deleteEnter(){ |
| | | if(this.deleteForm.enterprisename !== ''){ |
| | | await this.deleteByName(this.deleteForm) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message: '请输入企业名称' |
| | | }) |
| | | } |
| | | }, |
| | | resetDelete(){ |
| | | this.deleteForm = { |
| | | enterprisename:'' |
| | | } |
| | | }, |
| | | async deleteByName(row){ |
| | | console.log(row,'row') |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | |
| | | duration:2000, |
| | | }) |
| | | this.getEnterpriseList() |
| | | this.deleteVisible = false |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | |
| | | this.$refs['dataForm'].clearValidate() |
| | | }) |
| | | }, |
| | | |
| | | openDelete(){ |
| | | this.deleteVisible = true |
| | | }, |
| | | updateHandle() { |
| | | this.$refs['dataForm'].validate((valid) => { |
| | | const _this = this |