Commit dc84facc authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/huaguohao/crm into master

parents 092031c3 e19a64c4
...@@ -73,17 +73,6 @@ ...@@ -73,17 +73,6 @@
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
<div class="MyEditForm-item">
<el-form-item label="同时添加至" class="label-pad-left form-check">
<div class="pad-left-10">
<el-checkbox-group v-model="TransferOther">
<el-checkbox :value="4" :label="4">订单</el-checkbox>
<el-checkbox :value="2" :label="2">商机</el-checkbox>
<el-checkbox :value="3" :label="3">合同</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
</div>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -95,7 +84,7 @@ ...@@ -95,7 +84,7 @@
</template> </template>
<script> <script>
export default { export default {
props: ["ID"], props: ["GuestId"],
data() { data() {
return { return {
dialogTableVisible: true, dialogTableVisible: true,
...@@ -103,14 +92,17 @@ ...@@ -103,14 +92,17 @@
EmpIdsS: [], EmpIdsS: [],
TransferOther: [], TransferOther: [],
form: { form: {
CustomerIds: 0, GuestId: 0,
EmpIds: "", EmployeeIds: "",
IsRead: 0, IsRead: 0,
TransferOther: "",
}, },
}; };
}, },
watch: {}, watch: {},
created()
{
},
mounted() { mounted() {
this.Employee(); this.Employee();
let $this = this; let $this = this;
...@@ -120,10 +112,10 @@ ...@@ -120,10 +112,10 @@
}, },
methods: { methods: {
closedDialog() { closedDialog() {
this.MsgBus.$emit("closeeditGuestTeam"); this.MsgBus.$emit("success");
}, },
addData() { addData() {
this.form.CustomerIds = this.ID; this.form.GuestId = this.GuestId;
if (this.EmpIdsS.length < 1) { if (this.EmpIdsS.length < 1) {
return this.$message.error("请选择成员"); return this.$message.error("请选择成员");
} else { } else {
...@@ -131,20 +123,13 @@ ...@@ -131,20 +123,13 @@
this.EmpIdsS.map((x, i) => { this.EmpIdsS.map((x, i) => {
str = str + x + ","; str = str + x + ",";
}); });
this.form.EmpIds = str.substring(0, str.length - 1); this.form.EmployeeIds = str.substring(0, str.length - 1);
}
if (this.TransferOther.length < 1) {
let str2 = "";
this.TransferOther.map((x, i) => {
str2 = str2 + x + ",";
});
this.form.TransferOther = str2.substring(0, str2.length - 1);
} }
this.apipost("/api/SellEvent/SetGuestTeam", this.form, (res) => { this.apipost("/api/SellEvent/SetGuestTeam", this.form, (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.resetForm("form"); this.resetForm("form");
this.dialogTableVisible = false; this.dialogTableVisible = false;
this.$emit("editGuestTeamOk"); this.$emit("success");
this.$message.success(res.data.message); this.$message.success(res.data.message);
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
...@@ -184,10 +169,9 @@ ...@@ -184,10 +169,9 @@
resetForm(formName) { resetForm(formName) {
// 重置表单 // 重置表单
this.form = { this.form = {
CustomerId: 0, GuestId: 0,
EmpIds: [], EmployeeIds: [],
IsRead: 0, IsRead: 0,
TransferOther: [],
}; };
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
......
<style> <style>
.editGuestTeamPower .add-tit { .editGuestTeamPower .add-tit {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 20px; height: 20px;
} }
.editGuestTeamPower .add-tit p {
.editGuestTeamPower .add-tit p {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: bold; font-weight: bold;
color: rgba(17, 17, 17, 1); color: rgba(17, 17, 17, 1);
font-size: 14px; font-size: 14px;
} }
.editGuestTeamPower .add-tit p span {
.editGuestTeamPower .add-tit p span {
display: inline-block; display: inline-block;
width: 6px; width: 6px;
height: 6px; height: 6px;
background: #409efe; background: #409efe;
border-radius: 50%; border-radius: 50%;
margin-right: 10px; margin-right: 10px;
} }
.editGuestTeamPower .el-dialog__header {
.editGuestTeamPower .el-dialog__header {
padding: 15px 20px; padding: 15px 20px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
} }
.editGuestTeamPower .dialog-footer {
.editGuestTeamPower .dialog-footer {
text-align: center; text-align: center;
background-color: rgba(248, 250, 251, 1); background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px; padding-bottom: 20px;
} }
.editGuestTeamPower .el-dialog__footer {
.editGuestTeamPower .el-dialog__footer {
padding: 0; padding: 0;
} }
</style> </style>
<template> <template>
<el-dialog @closed="closedDialog" :modal="false" width="400px" :visible.sync="dialogTableVisible" :close-on-click-modal="false" class="editGuestTeamPower"> <el-dialog @closed="closedDialog" :modal="false" width="400px" :visible.sync="dialogTableVisible"
:close-on-click-modal="false" class="editGuestTeamPower">
<div class="add-tit" slot="title"> <div class="add-tit" slot="title">
<p><span></span>编辑权限</p> <p><span></span>编辑权限</p>
<span icon="el-icon-close"></span> <span icon="el-icon-close"></span>
</div> </div>
<div class="form-box" > <div class="form-box">
<el-form :model="form" ref="form" class="MyEditForm"> <el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="权限" class="label-pad-left form-check"> <el-form-item label="权限" class="label-pad-left form-check">
<div class="pad-left-10"> <div class="pad-left-10">
<el-radio v-model="form.IsRead" :label="1">只读</el-radio> <el-radio v-model="form.IsRead" :label="0">只读</el-radio>
<el-radio v-model="form.IsRead" :label="0">读写</el-radio> <el-radio v-model="form.IsRead" :label="1">读写</el-radio>
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
...@@ -53,19 +59,16 @@ ...@@ -53,19 +59,16 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button> <el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button> <el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
ID: { Ids: {
type: "", type: String,
default: 0,
},
CustomerId: {
type: Number,
default: 0, default: 0,
}, },
}, },
...@@ -74,8 +77,7 @@ export default { ...@@ -74,8 +77,7 @@ export default {
dialogTableVisible: true, dialogTableVisible: true,
zwList: [], zwList: [],
form: { form: {
CustomerId: 0, Ids: "",
ID: "",
IsRead: 1, IsRead: 1,
}, },
}; };
...@@ -89,20 +91,19 @@ export default { ...@@ -89,20 +91,19 @@ export default {
}, },
methods: { methods: {
closedDialog() { closedDialog() {
this.MsgBus.$emit("closeeditGuestTeamPower"); this.MsgBus.$emit("success");
}, },
addData() { addData() {
this.form.CustomerId = this.CustomerId; this.form.Ids = this.Ids;
this.form.IDs = this.ID;
this.apipost( this.apipost(
"/api/Customer/EditCustomerJurisdiction", "/api/SellEvent/SetTravelGuestTeamPower",
this.form, this.form,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.resetForm("form"); this.resetForm("form");
this.dialogTableVisible = false; this.dialogTableVisible = false;
this.$emit("addTeammanOk"); this.$emit("success");
} }
} }
); );
...@@ -120,12 +121,11 @@ export default { ...@@ -120,12 +121,11 @@ export default {
resetForm(formName) { resetForm(formName) {
// 重置表单 // 重置表单
this.form = { this.form = {
CustomerId: 0, Ids: "",
ID: "",
IsRead: 0, IsRead: 0,
}; };
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
}, },
}; };
</script> </script>
\ No newline at end of file
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<Details v-if="activeName === '2'" :detailsData="detailsData" /> <Details v-if="activeName === '2'" :detailsData="detailsData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="团队" name="10"> <el-tab-pane label="团队" name="10">
<guestTeam v-if="activeName === '10'" :ID="CustomerId" /> <guestTeam v-if="activeName === '10'" :GuestId="CustomerId" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="商机" name="5"> <el-tab-pane label="商机" name="5">
<Business v-if="activeName === '5'" :ID="CustomerId" /> <Business v-if="activeName === '5'" :ID="CustomerId" />
...@@ -182,6 +182,10 @@ ...@@ -182,6 +182,10 @@
}, },
deep: true, deep: true,
}, },
},
created()
{
}, },
mounted() { mounted() {
let $this = this; let $this = this;
......
...@@ -707,6 +707,7 @@ ...@@ -707,6 +707,7 @@
this.dialogTableVisible = true; this.dialogTableVisible = true;
}, },
openDetails(scope) { openDetails(scope) {
console.log("scope",scope)
this.drawer = true; this.drawer = true;
this.CustomerId = scope.row.ID; this.CustomerId = scope.row.ID;
this.CustomerName = scope.row.GusetName; this.CustomerName = scope.row.GusetName;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<el-table v-loading="loading" stripe ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%" <el-table v-loading="loading" stripe ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange" row-class-name="font-size-12"> @selection-change="handleSelectionChange" row-class-name="font-size-12">
<el-table-column :selectable='checkboxT' fixed type="selection" width="40"></el-table-column> <el-table-column :selectable='checkboxT' fixed type="selection" width="40"></el-table-column>
<el-table-column prop="EmpName" label="销售名称" show-overflow-tooltip> <el-table-column prop="EmployeeName" label="销售名称" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="PostName" label="岗位" show-overflow-tooltip> <el-table-column prop="PostName" label="岗位" show-overflow-tooltip>
</el-table-column> </el-table-column>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div v-if="addTeammanShow"> <div v-if="addTeammanShow">
<editGuestTeam :ID="CustomerId" @addTeammanOk="addTeammanOk" /> <editGuestTeam :GuestId="GuestId" @success="addTeammanOk" />
</div> </div>
<div v-if="editTeamPowerShow"> <div v-if="editTeamPowerShow">
<editGuestTeamPower :CustomerId="CustomerId" :ID="IDs" @addTeammanOk="addTeammanOk" /> <editGuestTeamPower :Ids="IDs" @success="addTeammanOk" />
</div> </div>
</div> </div>
</template> </template>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
editGuestTeamPower editGuestTeamPower
}, },
props: { props: {
CustomerId: { GuestId: {
type: Number, type: Number,
default: 0 default: 0
}, },
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
editTeamPowerShow: false, editTeamPowerShow: false,
dataList: [], dataList: [],
multipleSelection: [], multipleSelection: [],
IDs: '' IDs: "",
}; };
}, },
watch: { watch: {
CustomerId: { GuestId: {
handler(val, oldVal) { handler(val, oldVal) {
this.GetGuestTeamList() this.GetGuestTeamList()
}, },
...@@ -78,12 +78,7 @@ ...@@ -78,12 +78,7 @@
mounted() { mounted() {
this.GetGuestTeamList() this.GetGuestTeamList()
let $this = this let $this = this
this.MsgBus.$on('closeaddTeamman', function () {
$this.addTeammanShow = false
})
this.MsgBus.$on('closeeditTeamPower', function () {
$this.editTeamPowerShow = false
})
}, },
methods: { methods: {
tuichu() { tuichu() {
...@@ -96,21 +91,21 @@ ...@@ -96,21 +91,21 @@
this.multipleSelection.map((x, i) => { this.multipleSelection.map((x, i) => {
str = str + x + ',' str = str + x + ','
}) })
let msg = { // let msg = {
CustomerId: this.CustomerId, // CustomerId: this.CustomerId,
IDs: str.substring(0, str.length - 1) // IDs: str.substring(0, str.length - 1)
} // }
this.apipost('/api/Customer/ExitCustomerJurisdiction', msg, res => { // this.apipost('/api/Customer/ExitCustomerJurisdiction', msg, res => {
if (res.data.resultCode == 1) { // if (res.data.resultCode == 1) {
this.$message.success('操作成功') // this.$message.success('操作成功')
this.GetGuestTeamList() // this.GetGuestTeamList()
} // }
}) // })
}).catch(() => { // }).catch(() => {
this.$message({ // this.$message({
type: 'info', // type: 'info',
message: '已取消' // message: '已取消'
}); // });
}); });
}, },
yichu() { yichu() {
...@@ -127,10 +122,9 @@ ...@@ -127,10 +122,9 @@
str = str + x + ',' str = str + x + ','
}) })
let msg = { let msg = {
CustomerId: this.CustomerId, Ids: str.substring(0, str.length - 1)
IDs: str.substring(0, str.length - 1)
} }
this.apipost('/api/Customer/RemoveCustomerListJurisdiction', msg, res => { this.apipost('/api/SellEvent/RemoveGuestTeam', msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success('操作成功') this.$message.success('操作成功')
this.GetGuestTeamList() this.GetGuestTeamList()
...@@ -151,7 +145,7 @@ ...@@ -151,7 +145,7 @@
this.multipleSelection.map((x, i) => { this.multipleSelection.map((x, i) => {
str = str + x + ',' str = str + x + ','
}) })
this.IDs = str.substring(0, str.length - 1) this.IDs = str.substring(0, str.length - 1);
this.editTeamPowerShow = true this.editTeamPowerShow = true
}, },
checkboxT(row, index) { checkboxT(row, index) {
...@@ -163,17 +157,19 @@ ...@@ -163,17 +157,19 @@
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val.map(x => this.multipleSelection = val.map(x =>
x.ID x.Id
) )
}, },
addTeammanOk() { addTeammanOk() {
this.addTeammanShow = false;
this.editTeamPowerShow = false;
this.GetGuestTeamList() this.GetGuestTeamList()
}, },
GetGuestTeamList() { GetGuestTeamList() {
if (this.CustomerId === 0) return if (this.GuestId === 0) return
this.loading = true this.loading = true
this.apipost('/api/SellEvent/GetGuestTeamPage', { this.apipost('/api/SellEvent/GetGuestTeamList', {
GuestId: this.CustomerId GuestId: this.GuestId
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.loading = false this.loading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment