|
@@ -73,6 +73,15 @@
|
|
@click="handerCompanyUserAreaList"
|
|
@click="handerCompanyUserAreaList"
|
|
>批量设置销售所属区域(原有的暂用)</el-button>
|
|
>批量设置销售所属区域(原有的暂用)</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="success"
|
|
|
|
+ plain
|
|
|
|
+ size="mini"
|
|
|
|
+ :disabled="multiple"
|
|
|
|
+ @click="handleBind"
|
|
|
|
+ >批量绑定延时时间</el-button>
|
|
|
|
+ </el-col>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
@@ -83,6 +92,7 @@
|
|
<el-table-column label="员工后台昵称" align="center" prop="nickName" :show-overflow-tooltip="true" 员工后台 width="100"/>
|
|
<el-table-column label="员工后台昵称" align="center" prop="nickName" :show-overflow-tooltip="true" 员工后台 width="100"/>
|
|
<el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="手机号码" align="center" prop="phonenumber" width="120" />
|
|
<el-table-column label="手机号码" align="center" prop="phonenumber" width="120" />
|
|
|
|
+ <el-table-column label="发送延时时间" align="center" prop="sendDelayTime" width="100" />
|
|
<el-table-column label="状态" align="center">
|
|
<el-table-column label="状态" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
@@ -347,6 +357,32 @@
|
|
<el-button @click="cancelArea">取 消</el-button>
|
|
<el-button @click="cancelArea">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :title="title" :visible.sync="openTime" width="500px" append-to-body>
|
|
|
|
+ <el-form ref="form" :model="formTime" :rules="rulesTime" label-width="80px">
|
|
|
|
+ <el-form-item label="延时时间" prop="sendDelayTime"
|
|
|
|
+ :rules="rulesDelay"
|
|
|
|
+ >
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="请输入延时时间,范围在1000毫秒-2000毫秒之间" placement="top-end">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.number="formTime.sendDelayTime"
|
|
|
|
+ type="number"
|
|
|
|
+ :min="1000"
|
|
|
|
+ :max="2000"
|
|
|
|
+ placeholder="请输入1000-2000之间的数值">
|
|
|
|
+ <template slot="append">毫秒</template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
|
+ <el-input v-model="formTime.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitFormTime">绑 定</el-button>
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -361,7 +397,7 @@ import {
|
|
resetUserPwd,
|
|
resetUserPwd,
|
|
changeUserStatus,
|
|
changeUserStatus,
|
|
importTemplate,
|
|
importTemplate,
|
|
- getCitysAreaList, updateCompanyUserAreaList,
|
|
|
|
|
|
+ getCitysAreaList, updateCompanyUserAreaList, getUserList,
|
|
} from "../../../api/company/companyUser";
|
|
} from "../../../api/company/companyUser";
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
@@ -371,6 +407,7 @@ import {bindQwUser, getQwUserList, addQwUser, getQwUser, getQwUserByIds} from '@
|
|
import { syncDept } from '@/api/qw/qwDept';
|
|
import { syncDept } from '@/api/qw/qwDept';
|
|
import { getMyQwUserList,getMyQwCompanyList } from "@/api/qw/user";
|
|
import { getMyQwUserList,getMyQwCompanyList } from "@/api/qw/user";
|
|
import selectUser from "@/views/company/components/selectQwUser.vue";
|
|
import selectUser from "@/views/company/components/selectQwUser.vue";
|
|
|
|
+import {batchAddSendDelayTime} from "@/api/company/sendDelayTime";
|
|
export default {
|
|
export default {
|
|
name: "User",
|
|
name: "User",
|
|
components: { Treeselect ,selectUser},
|
|
components: { Treeselect ,selectUser},
|
|
@@ -382,12 +419,14 @@ export default {
|
|
qwUserId:[],
|
|
qwUserId:[],
|
|
myQwCompanyList:[],
|
|
myQwCompanyList:[],
|
|
qwUser:[],
|
|
qwUser:[],
|
|
|
|
+ formTime:{},
|
|
user:{
|
|
user:{
|
|
open:false,
|
|
open:false,
|
|
title:"搜索企业"
|
|
title:"搜索企业"
|
|
},
|
|
},
|
|
// 选中数组
|
|
// 选中数组
|
|
ids: [],
|
|
ids: [],
|
|
|
|
+ users:[],
|
|
synform:{corpId:null},
|
|
synform:{corpId:null},
|
|
synOpen:false,
|
|
synOpen:false,
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
@@ -406,6 +445,7 @@ export default {
|
|
deptOptions: undefined,
|
|
deptOptions: undefined,
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
|
|
+ openTime: false,
|
|
qwOpen:false,
|
|
qwOpen:false,
|
|
// 部门名称
|
|
// 部门名称
|
|
deptName: undefined,
|
|
deptName: undefined,
|
|
@@ -468,6 +508,30 @@ export default {
|
|
},
|
|
},
|
|
qwStatusOptions:[],
|
|
qwStatusOptions:[],
|
|
// 表单校验
|
|
// 表单校验
|
|
|
|
+ rulesTime: {
|
|
|
|
+ companyUserId: [
|
|
|
|
+ { required: true, message: "员工信息不能为空", trigger: "change" }
|
|
|
|
+ ],
|
|
|
|
+ sendDelayTime: [
|
|
|
|
+ { required: true, message: "发送延时时间(单位:毫秒)不能为空", trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ rulesDelay:[
|
|
|
|
+ {
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
+ if (value === '' || value == null) {
|
|
|
|
+ callback(); // 允许为空,不校验范围
|
|
|
|
+ } else if (isNaN(value)) {
|
|
|
|
+ callback(new Error('请输入有效数字'));
|
|
|
|
+ } else if (value < 1000 || value > 2000) {
|
|
|
|
+ callback(new Error('延时时间必须在1000-2000毫秒之间'));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
rules: {
|
|
rules: {
|
|
userName: [
|
|
userName: [
|
|
{ required: true, message: "员工工号不能为空", trigger: "blur" },
|
|
{ required: true, message: "员工工号不能为空", trigger: "blur" },
|
|
@@ -518,6 +582,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.getUserList();
|
|
this.getList();
|
|
this.getList();
|
|
this.getTreeselect();
|
|
this.getTreeselect();
|
|
this.getDicts("sys_normal_disable").then((response) => {
|
|
this.getDicts("sys_normal_disable").then((response) => {
|
|
@@ -537,6 +602,17 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getUserList() {
|
|
|
|
+ getUserList().then(response => {
|
|
|
|
+ this.users = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleBind(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ const id = row.id || this.ids
|
|
|
|
+ this.openTime = true;
|
|
|
|
+ this.title = "批量绑定发送延时时间";
|
|
|
|
+ },
|
|
onDomainBlur() {
|
|
onDomainBlur() {
|
|
if (this.form.domain!=null){
|
|
if (this.form.domain!=null){
|
|
let value = this.form.domain.trim();
|
|
let value = this.form.domain.trim();
|
|
@@ -872,6 +948,27 @@ export default {
|
|
loadingRock.close()
|
|
loadingRock.close()
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ submitFormTime(){
|
|
|
|
+
|
|
|
|
+ let loadingRock = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: '绑定中.....同步客户信息中.....',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
+ });
|
|
|
|
+ this.formTime.id = (this.ids).join(',');
|
|
|
|
+ console.log(this.formTime)
|
|
|
|
+ batchAddSendDelayTime(this.formTime).then(response => {
|
|
|
|
+ this.msgSuccess("绑定成功");
|
|
|
|
+ this.openTime = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ this.ids=[];
|
|
|
|
+ }).finally(res=>{
|
|
|
|
+ loadingRock.close()
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const userIds = row.userId || this.ids;
|
|
const userIds = row.userId || this.ids;
|