|
|
@@ -153,6 +153,7 @@
|
|
|
<!-- User Table -->
|
|
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
+<!-- <el-table-column label="项目会员id" align="center" prop="id" />-->
|
|
|
<el-table-column label="ID" align="center" prop="userId" />
|
|
|
<el-table-column label="项目" align="center" prop="projectId">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -315,7 +316,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
|
+import {
|
|
|
+ listUser,
|
|
|
+ getMemberUser,
|
|
|
+ addUser,
|
|
|
+ updateUser,
|
|
|
+ delUser,
|
|
|
+ exportUser,
|
|
|
+ auditUser,
|
|
|
+ updateMemberUser
|
|
|
+} from '@/api/user/fsUser'
|
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
|
export default {
|
|
|
@@ -326,6 +336,7 @@ export default {
|
|
|
show:{
|
|
|
open:false,
|
|
|
},
|
|
|
+ rowInfo:null,
|
|
|
cusTransfer: {
|
|
|
targetUserId: [{required: true, message: '请选择转移至销售', trigger: 'change'}],
|
|
|
content: [{required: true, message: '请选择转移至销售', trigger: 'change'}]
|
|
|
@@ -561,9 +572,10 @@ export default {
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+ this.rowInfo=row;
|
|
|
this.reset();
|
|
|
- const userId = row.userId || this.ids[0];
|
|
|
- getUser(userId).then(response => {
|
|
|
+ const id = row.id;
|
|
|
+ getMemberUser(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
|
|
|
// 处理标签数据,将字符串转为数组
|
|
|
@@ -580,30 +592,18 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- // 处理标签数据,将数组转为字符串
|
|
|
- if (this.form.tagIds && Array.isArray(this.form.tagIds)) {
|
|
|
- this.form.tagIds = this.form.tagIds.join(',');
|
|
|
- }
|
|
|
-
|
|
|
- if (this.form.userId != null) {
|
|
|
- //手机号不能修改 置空
|
|
|
- this.form.phone = null;
|
|
|
- updateUser(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- addUser(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.$message.success("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
+ const updateForm={
|
|
|
+ id: this.rowInfo.id,
|
|
|
+ status: this.form.status,
|
|
|
+ remark: this.form.remark
|
|
|
}
|
|
|
+ updateMemberUser(updateForm).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|