Commit 4d881832 authored by 黄奎's avatar 黄奎

页面修改

parent c4c95c6d
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<categoryEdit-form v-if="isShowCategoryForm" :customerObj="customerObj" @close="closeCustomForm" <categoryEdit-form v-if="isShowCategoryForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion"> @success="refreshQuestion">
</categoryEdit-form> </categoryEdit-form>
<peerRight v-if="isShowDetailForm" :rowId="curRowId" @close="closeCustomForm" :auth="AuthorityObj" @success="refreshQuestion"></peerRight> <peerRight v-if="isShowDetailForm" :CategoryId="CategoryId" @close="closeCustomForm" :auth="AuthorityObj" @success="refreshQuestion"></peerRight>
</div> </div>
</template> </template>
<script> <script>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
isShowRebate: false //是否显示返佣 isShowRebate: false //是否显示返佣
}, },
isShowDetailForm:false, isShowDetailForm:false,
curRowId:0 CategoryId:0
}; };
}, },
created() { created() {
...@@ -204,8 +204,7 @@ ...@@ -204,8 +204,7 @@
}, },
//客户详情 //客户详情
showDetail(row) { showDetail(row) {
console.log(row); this.CategoryId = row.CategoryId;
this.curRowId = row.CategoryId;
this.isShowDetailForm = true; this.isShowDetailForm = true;
} }
} }
......
<template> <template>
<q-dialog <q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeAuditCustomerForm">
v-model="persistent"
maximized
full-height
seamless
position="right"
@hide="closeAuditCustomerForm"
>
<div class="info-content-component"> <div class="info-content-component">
<div class="info-head flex items-center"> <div class="info-head flex items-center">
<div class="flex items-center"> <div class="flex items-center">
...@@ -23,194 +16,196 @@ ...@@ -23,194 +16,196 @@
<baseInfo :Data="detailData" @confirm="saveBaseInfo"></baseInfo> <baseInfo :Data="detailData" @confirm="saveBaseInfo"></baseInfo>
</div> </div>
<div class="detail-log"> <div class="detail-log">
<right :Id="rowId"></right> <right :Id="CategoryId"></right>
</div> </div>
</div> </div>
</div> </div>
<div <div class="dialog-out-close" @click="closeAuditCustomerForm"
class="dialog-out-close" style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
@click="closeAuditCustomerForm"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon name="iconfont icon-jujue1" size="26px" /> <q-icon name="iconfont icon-jujue1" size="26px" />
</div> </div>
</q-dialog> </q-dialog>
</template> </template>
<script> <script>
import { GetCustomer, SetCustomer ,RemoveCustomer,setCustomerCareOf} from "../../../api/sale/peemanagement"; import {
import { GetCustomer,
queryCustomerCategory, SetCustomer,
saveCustomerCategory RemoveCustomer,
} from "../../../api/users/user" setCustomerCareOf
import baseInfo from "./baseInfo.vue"; } from "../../../api/sale/peemanagement";
import right from "./conRight.vue"; import {
export default { queryCustomerCategory,
components: { saveCustomerCategory
baseInfo, } from "../../../api/users/user"
right import baseInfo from "./baseInfo.vue";
}, import right from "./conRight.vue";
props: { export default {
rowId: { components: {
type: Number, baseInfo,
default: 0 right
}, },
auth: { props: {
type: Object, CategoryId: {
default: null type: Number,
} default: 0
}, },
data() { auth: {
return { type: Object,
persistent: true, default: null
detailData: {},
//员工列表
employeeList: [],
myEmployeeList: [],
isShowTrans: false,
TransferMsg: {
CustomerIds: "",
EmpId: ""
} }
};
},
mounted() {
this.initObj();
this.employeeList = this.empList;
this.myEmployeeList = this.empList;
},
methods: {
//关闭弹窗
closeAuditCustomerForm() {
this.$emit("close");
this.persistent = false;
}, },
//初始化表单 data() {
initObj() { return {
if (this.rowId > 0) { persistent: true,
let msg = { detailData: {},
CategoryId: this.rowId //员工列表
}; employeeList: [],
queryCustomerCategory(msg).then(res => { myEmployeeList: [],
if (res.Code == 1) { isShowTrans: false,
console.log(res,'数据'); TransferMsg: {
this.detailData = res.Data; CustomerIds: "",
} EmpId: ""
});
} else {
}
},
saveBaseInfo(obj) {
this.detailData[obj.field] = obj.val;
console.log(this.detailData,'this.detailData');
let msg = {
CategoryName:this.detailData.CategoryName,
CatetoryType:this.detailData.CatetoryType,
CategoryId:this.detailData.CategoryId,
linkMan:'',
linkTel:''
}
saveCustomerCategory(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success");
} }
}); };
}, },
//删除客户 mounted() {
RemoveCustomer(obj) { this.initObj();
let that = this; this.employeeList = this.empList;
var message = this.myEmployeeList = this.empList;
"您正在进行删除【" + },
this.detailData.CustomerName + methods: {
"】行为,一旦执行无法找回,是否确认执行?"; //关闭弹窗
this.$q closeAuditCustomerForm() {
.dialog({ this.$emit("close");
title: "删除客户", this.persistent = false;
message: message, },
isShowEditClassRoomForm: true, //初始化表单
cancel: { initObj() {
label: "取消", if (this.rowId > 0) {
flat: true let msg = {
}, CategoryId: this.rowId
ok: {
label: "确认",
flat: true,
focus: true
}
})
.onOk(() => {
var delMsg = {
CustomerId: this.detailData.CustomerId
}; };
RemoveCustomer(delMsg).then(res => { queryCustomerCategory(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
that.$q.notify({ console.log(res, '数据');
icon: "iconfont icon-chenggong", this.detailData = res.Data;
color: "accent",
timeout: 2000,
message: "操作成功",
position: "top"
});
that.$emit("success");
that.closeAuditCustomerForm()
} }
}); });
} else {
}
},
saveBaseInfo(obj) {
this.detailData[obj.field] = obj.val;
console.log(this.detailData, 'this.detailData');
let msg = {
CategoryName: this.detailData.CategoryName,
CatetoryType: this.detailData.CatetoryType,
CategoryId: this.detailData.CategoryId,
linkMan: '',
linkTel: ''
}
saveCustomerCategory(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success");
}
}); });
}, },
} //删除客户
}; RemoveCustomer(obj) {
let that = this;
var message =
"您正在进行删除【" +
this.detailData.CustomerName +
"】行为,一旦执行无法找回,是否确认执行?";
this.$q
.dialog({
title: "删除客户",
message: message,
isShowEditClassRoomForm: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
})
.onOk(() => {
var delMsg = {
CustomerId: this.detailData.CustomerId
};
RemoveCustomer(delMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功",
position: "top"
});
that.$emit("success");
that.closeAuditCustomerForm()
}
});
});
},
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.info-content-component { .info-content-component {
display: flex;
flex-direction: column;
width: 1010px;
padding: 15px 17px;
background-color: #f4f4f6;
overflow: auto;
box-sizing: border-box;
.info-head {
background-color: #fff;
border-radius: 8px;
padding: 22px;
}
.info-content {
flex: 1;
display: flex; display: flex;
margin-top: 17px; flex-direction: column;
overflow: hidden; width: 1010px;
padding: 15px 17px;
background-color: #f4f4f6;
overflow: auto;
box-sizing: border-box;
.detail-info { .info-head {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
width: 350px;
height: 100%;
margin-right: 13px;
background-color: #fff; background-color: #fff;
border-radius: 8px 8px 0 0; border-radius: 8px;
padding: 22px;
} }
.detail-log { .info-content {
width: 100%; flex: 1;
flex-grow: 1;
display: flex; display: flex;
flex-direction: column; margin-top: 17px;
background-color: #fff;
border-radius: 8px 8px 0 0;
overflow: hidden; overflow: hidden;
.detail-info {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
width: 350px;
height: 100%;
margin-right: 13px;
background-color: #fff;
border-radius: 8px 8px 0 0;
}
.detail-log {
width: 100%;
flex-grow: 1;
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 8px 8px 0 0;
overflow: hidden;
}
} }
} }
} </style>
</style> \ No newline at end of file
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