|
|
@@ -56,6 +56,23 @@
|
|
|
:value="dict.dictValue"
|
|
|
/>
|
|
|
</el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="直播归属销售" prop="bindCompanyUserId" label-width="110px">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.bindCompanyUserId"
|
|
|
+ placeholder="请选择直播归属销售"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 200px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyUserList"
|
|
|
+ :key="item.userId"
|
|
|
+ :label="`${item.nickName}-${item.userName}`"
|
|
|
+ :value="item.userId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="注册时间" prop="createTime">
|
|
|
<el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
|
|
|
@@ -78,6 +95,16 @@
|
|
|
v-hasPermi="['his:user:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-d-arrow-right"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleTransfer"
|
|
|
+ >转移直播归属销售</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -101,6 +128,7 @@
|
|
|
<dict-tag :options="userOptions" :value="scope.row.status"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="直播归属销售" align="center" prop="bindCompanyUserNickName" min-width="120" />
|
|
|
<el-table-column label="注册时间" align="center" prop="createTime" width="150px" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -194,12 +222,39 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 转移直播归属销售 -->
|
|
|
+ <el-dialog title="转移直播归属销售" :visible.sync="openTransferDialog" width="500px" append-to-body>
|
|
|
+ <el-form ref="transferForm" :model="transferForm" :rules="transferRules" label-width="120px">
|
|
|
+ <el-form-item label="转移至销售" prop="companyUserId">
|
|
|
+ <el-select
|
|
|
+ v-model="transferForm.companyUserId"
|
|
|
+ placeholder="请选择销售"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyUserList"
|
|
|
+ :key="item.userId"
|
|
|
+ :label="`${item.nickName}-${item.userName}`"
|
|
|
+ :value="item.userId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <p>确定将选中的 <strong>{{ ids.length }}</strong> 个用户的直播归属销售进行转移吗?</p>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitTransfer">确 定</el-button>
|
|
|
+ <el-button @click="cancelTransfer">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { listUser, getUser, delUser, addUser, updateUser, exportUser,sendCode,bindPhone } from "@/api/store/user";
|
|
|
+import {getUserList, batchBindCompanyUserId} from "@/api/company/companyUser";
|
|
|
import userDetails from '../components/userDetails.vue';
|
|
|
export default {
|
|
|
name: "User",
|
|
|
@@ -207,6 +262,16 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
orOptions:[],
|
|
|
+ companyUserList: [],
|
|
|
+ openTransferDialog: false,
|
|
|
+ transferForm: {
|
|
|
+ companyUserId: null
|
|
|
+ },
|
|
|
+ transferRules: {
|
|
|
+ companyUserId: [
|
|
|
+ { required: true, message: "请选择转移至销售", trigger: "change" }
|
|
|
+ ]
|
|
|
+ },
|
|
|
bindRules: {
|
|
|
phone: [
|
|
|
{ required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
@@ -282,6 +347,7 @@ export default {
|
|
|
sTime:null,
|
|
|
eTime:null,
|
|
|
isBuy:null,
|
|
|
+ bindCompanyUserId: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
@@ -316,6 +382,11 @@ export default {
|
|
|
this.clearCountdown();
|
|
|
},
|
|
|
created() {
|
|
|
+ getUserList().then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.companyUserList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
this.getList();
|
|
|
this.getDicts("sys_user_status").then(response => {
|
|
|
this.userOptions = response.data;
|
|
|
@@ -398,6 +469,45 @@ export default {
|
|
|
this.single = selection.length!==1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
+ /** 转移直播归属销售 */
|
|
|
+ handleTransfer() {
|
|
|
+ if (this.ids.length === 0) {
|
|
|
+ this.$message.warning("请至少选择一个用户进行转移");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.transferForm = {
|
|
|
+ companyUserId: null
|
|
|
+ };
|
|
|
+ this.openTransferDialog = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.transferForm) {
|
|
|
+ this.$refs.transferForm.clearValidate();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancelTransfer() {
|
|
|
+ this.openTransferDialog = false;
|
|
|
+ this.transferForm = {
|
|
|
+ companyUserId: null
|
|
|
+ };
|
|
|
+ },
|
|
|
+ submitTransfer() {
|
|
|
+ this.$refs["transferForm"].validate(valid => {
|
|
|
+ if (!valid) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ batchBindCompanyUserId({
|
|
|
+ companyUserId: this.transferForm.companyUserId,
|
|
|
+ fsUserIds: this.ids
|
|
|
+ }).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.$message.success("转移成功");
|
|
|
+ this.openTransferDialog = false;
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 开始倒计时 */
|
|
|
startCountdown(seconds) {
|
|
|
this.bindPhone.countdown = seconds;
|