|
@@ -35,7 +35,7 @@
|
|
|
<el-button size="small" v-show="item_info.code == 'creator' && isStart" @click="dialogFormVisible = true" type="primary">添加</el-button>
|
|
|
<el-button size="small" v-show="item_info.code != 'creator' && table_list.length > 0" @click="del_item" type="danger">删除</el-button>
|
|
|
<el-button size="small" v-show="item_info.code != 'creator'" @click="add_item" type="primary">添加</el-button>
|
|
|
- <el-button size="small" v-show="item_info.code == 'dept_manager'" @click="exportEmploye = true">导出/修改管理列表</el-button>
|
|
|
+ <el-button size="small" v-show="item_info.code == 'dept_manager'" @click="toleadShw = true">导出/修改管理列表</el-button>
|
|
|
<el-button size="small" v-show="item_info.code == 'dept_manager'" @click="synchronization" type="primary">同步管理范围</el-button>
|
|
|
</div>
|
|
|
<div class="gap-right-8 fr" style="display:inline-block; width:180px;" v-show="item_info.code == 'dept_manager'">
|
|
@@ -671,6 +671,75 @@
|
|
|
<div class="align-center" style="margin-bottom:20px; float:left; margin-left:10px;"></div>
|
|
|
<div style="clear:both;"></div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <toLead :visible.sync="toleadShw" :nowIndex.sync="nowIndex" :tolead="toleadResult" @confirm="tealConfirm" :export_type="'integral_event'" :dstyle="'height:150px;'">
|
|
|
+ <template slot="1">
|
|
|
+ <div v-if="nowIndex == 1">
|
|
|
+ <div class=" margin-bottom">
|
|
|
+ <div class="flex-box flex-v-ce">
|
|
|
+ <div style="margin-right: 10px;">1、导出部门管理者信息</div>
|
|
|
+ <el-button size="medium" type="primary" @click="downloadSheet" plain>导出</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="leadhint">导出部门管理者信息表进行修改</div> -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="margin-bottom">
|
|
|
+ <!-- <p>2、修改部门管理者信息<br>
|
|
|
+ 导出部门管理者信息表进行修改<br>
|
|
|
+ 上传修改好的部门管理者信息表</p> -->
|
|
|
+ <el-upload
|
|
|
+ :limit="1"
|
|
|
+ :headers="ATOKEN"
|
|
|
+ ref="upload2"
|
|
|
+ :action="integralUpload"
|
|
|
+ :on-success="handlePictureCardPreview"
|
|
|
+ :before-upload="beforeFilesUpload"
|
|
|
+ :on-progress="handleOnthecross"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ 2、上传修改好的部门管理者信息表
|
|
|
+ <el-button style="margin-left: 10px;" size="medium" type="primary" plain>选取文件</el-button>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <!-- <div class="leadhint">上传修改好的部门管理者信息表</div> -->
|
|
|
+ </div>
|
|
|
+ <!-- <div>3、选择文件后点击下方【上传】按钮</div> -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <div v-if="nowIndex == 1">
|
|
|
+ <div style="float: left;width:49%" class="ps">
|
|
|
+ <div style="margin-left: 20%;">
|
|
|
+ <p>1.导出部门管理者信息</p>
|
|
|
+ <el-button type="primary" plain @click="downloadSheet">导出</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="border-left: 1px solid #D8D8D8;width: 1px;height: 255px;float: left;"></div>
|
|
|
+
|
|
|
+ <div style="float: left;width:49%;" class="ps">
|
|
|
+ <div style="margin-left: 20%;">
|
|
|
+ <p>2.修改部门管理者信息</p>
|
|
|
+ <p>导出部门管理者信息表进行修改</p>
|
|
|
+ <p>上传修改好的部门管理者信息表</p>
|
|
|
+ <el-upload
|
|
|
+ :limit="1"
|
|
|
+ :headers="ATOKEN"
|
|
|
+ ref="upload2"
|
|
|
+ :action="integralUpload"
|
|
|
+ :on-success="handlePictureCardPreview"
|
|
|
+ :before-upload="beforeFilesUpload"
|
|
|
+ :on-progress="handleOnthecross"
|
|
|
+ >
|
|
|
+ <p><el-button slot="trigger" type="primary" plain>选取文件</el-button></p>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="align-center" style="margin-bottom:20px; float:left; margin-left:10px;"></div>
|
|
|
+ <div class="align-center" style="margin-bottom:20px; float:left; margin-left:10px;"></div>
|
|
|
+ <div style="clear:both;"></div>
|
|
|
+ </div> -->
|
|
|
+ </template>
|
|
|
+ </toLead>
|
|
|
+
|
|
|
<!-- 同步人员 -->
|
|
|
<el-dialog title="提示" :visible.sync="isShowTb" :before-close="closeTb" width="500px">
|
|
|
<p style="font-size: 18px;font-weight: 600;margin-bottom: 10px;">
|
|
@@ -692,6 +761,7 @@
|
|
|
<script>
|
|
|
import EmployeeSelector from '@/components/EmployeeSelector.vue';
|
|
|
import noData from '@/components/noData';
|
|
|
+import toLead from '@/components/toLead';
|
|
|
const minimum = (rule, value, callback) => {
|
|
|
if (value < 0) {
|
|
|
callback(new Error('数值不能为负数'));
|
|
@@ -818,10 +888,15 @@ export default {
|
|
|
del_arr: [],
|
|
|
isShowTb: false,
|
|
|
tb_loading: false,
|
|
|
- isMode: false
|
|
|
+ isMode: false,
|
|
|
+
|
|
|
+ //导入相关
|
|
|
+ toleadShw: false,
|
|
|
+ nowIndex: 1,
|
|
|
+ toleadResult: {}
|
|
|
};
|
|
|
},
|
|
|
- components: { EmployeeSelector, noData },
|
|
|
+ components: { EmployeeSelector, noData, toLead },
|
|
|
created() {
|
|
|
this.get_role_list();
|
|
|
// 判断是否是创始人
|
|
@@ -835,6 +910,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ toleadShw(val){
|
|
|
+ if(val) this.nowIndex = 1
|
|
|
+ },
|
|
|
isShowTb(val) {
|
|
|
if (!val) {
|
|
|
this.isMode = false;
|
|
@@ -849,6 +927,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleOnthecross(event, file, fileList){
|
|
|
+ this.nowIndex = 2
|
|
|
+ },
|
|
|
// 同步管理范围
|
|
|
tb() {
|
|
|
this.tb_loading = true;
|
|
@@ -918,7 +999,21 @@ export default {
|
|
|
}
|
|
|
window.open(this.publicBASE_API + 'api/download/prize_export?role_id=' + role_id + '&employee_id=' + this.$getUserData().id, '_blank');
|
|
|
},
|
|
|
+ tealConfirm(){
|
|
|
+ this.page=1;
|
|
|
+ this.get_table_list();
|
|
|
+ },
|
|
|
handlePictureCardPreview(response) {
|
|
|
+ console.log(response)
|
|
|
+ if(response.code == 1){
|
|
|
+ response.data.id = 1
|
|
|
+ }else{
|
|
|
+ response.data.id = 0
|
|
|
+ response.data.name = response.msg
|
|
|
+ }
|
|
|
+ this.toleadResult = response.data
|
|
|
+ this.nowIndex = 3
|
|
|
+ return
|
|
|
if (response.code == 1) {
|
|
|
if (Array.isArray(response.data)&&response.data.length > 0) {
|
|
|
var htmls = response.data;
|
|
@@ -953,7 +1048,10 @@ export default {
|
|
|
const $ext_name = file.name.split('.')[len];
|
|
|
if ($ext_list.indexOf($ext_name) != -1) {
|
|
|
} else {
|
|
|
- this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
|
|
|
+ this.toleadResult.id = 0
|
|
|
+ this.toleadResult.name = '文件格式上传错误,仅支持上传xlsx,xls)'
|
|
|
+ this.nowIndex = 3
|
|
|
+ // this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
@@ -1442,4 +1540,8 @@ export default {
|
|
|
.ps p {
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+.leadhint{
|
|
|
+ padding: 2px 0 0 10px;
|
|
|
+ color: #949494;
|
|
|
+}
|
|
|
</style>
|