Commit 4bd4df27 by chenyu

update: update

parent 69fc1dd0
......@@ -80,6 +80,11 @@ module.exports = {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
}
]
},
......
.list-section {
min-height: 100%;
.top-search-wrap {
display: flex;
align-items: center;
margin: 20px 20px 10px;
padding: 20px;
background: #fff;
& > .label {
font-size: 14px;
font-weight: 400;
color: #606266;
line-height: 20px;
}
.flex-wrap {
display: flex;
align-items: center;
justify-content: flex-start;
.el-checkbox:first-child {
margin-right: 0;
}
/deep/.el-checkbox__label {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 22px;
}
.line {
display: block;
width: 1px;
height: 14px;
margin: 0 26px;
background: #e4e7ed;
}
.label {
font-size: 14px;
font-weight: 400;
color: #909399;
line-height: 20px;
}
/deep/.el-checkbox__label {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 22px;
}
}
}
}
.list-section-contain {
margin: 0 20px 20px;
padding: 20px;
background: #fff;
.contain-header {
margin-bottom: 20px;
.top-header {
display: flex;
align-items: center;
margin-bottom: 20px;
h2 {
margin-right: 20px;
font-size: 16px;
font-weight: bold;
color: #303133;
line-height: 22px;
}
.right {
margin: 0;
font-size: 14px;
color: #606266;
}
}
.action-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.senior-search {
margin-left: 17px;
.el-icon-d-arrow-right,
.el-icon-d-arrow-left {
display: inline-block;
transform: rotate(90deg);
margin-left: 5px;
font-size: 12px;
}
}
}
.senior-search-content {
margin-top: 20px;
}
}
}
/deep/.el-table {
th > .cell:first-child,
td > .cell:first-child {
padding-left: 10px;
}
.setting-cell.el-table__cell {
display: flex;
align-items: center;
height: 59px;
padding: 0;
.cell.setting-cell {
display: flex;
justify-content: space-between;
align-items: center;
height: 59px;
padding-right: 0;
.el-icon-setting {
display: flex;
justify-content: center;
align-items: center;
width: 60px;
height: 100%;
font-size: 20px;
color: #666;
cursor: pointer;
background: #eaeaea;
&:hover {
color: #000;
}
}
}
}
.customer-info-cell {
display: flex;
align-items: center;
img {
display: block;
width: 40px;
height: 40px;
margin-right: 10px;
border-radius: 100%;
}
.memberName {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
<template>
<div>
<el-dialog title="编辑基本信息"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="姓名:"
prop="memberName">
<el-input type="text"
maxlength="10"
show-word-limit
placeholder="请输姓名"
v-model="form.memberName"
style="width: 252px;"></el-input>
<el-dialog title="编辑基本信息" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="姓名:" prop="memberName">
<el-input type="text" maxlength="10" show-word-limit placeholder="请输姓名"
v-model="form.memberName" style="width: 252px;"></el-input>
</el-form-item>
<el-form-item label="性别:"
prop="memberGender">
<el-select v-model="form.memberGender"
placeholder="请选择"
style="width: 252px;">
<el-option label="男"
:value="1"></el-option>
<el-option label="女"
:value="2"></el-option>
<el-form-item label="性别:" prop="memberGender">
<el-select v-model="form.memberGender" placeholder="请选择" style="width: 252px;">
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出生日期:"
prop="memberBirthday">
<el-select v-model="form.birthType"
placeholder="请选择"
<el-form-item label="出生日期:" prop="memberBirthday">
<el-select v-model="form.birthType" placeholder="请选择"
style="width: 106px;margin-right:6px;">
<el-option label="阳历"
:value="1"></el-option>
<el-option label="农历"
:value="0"></el-option>
<el-option label="阳历" :value="1"></el-option>
<el-option label="农历" :value="0"></el-option>
</el-select>
<el-date-picker :clearable="false"
value-format="timestamp"
style="width: 136px;"
v-model="form.memberBirthday"
type="date"
placeholder="选择日期"></el-date-picker>
<el-date-picker :clearable="false" value-format="timestamp" style="width: 136px;"
v-model="form.memberBirthday" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="手机号码:"
prop="phoneNumber">
<el-select style="width: 75px;margin-right:6px;"
v-model="form.nationCode">
<el-option v-for="item in nationCodeList"
:key="item.dictCode"
:value="item.dictCode"
<el-form-item label="手机号码:" prop="phoneNumber">
<el-select style="width: 75px;margin-right:6px;" v-model="form.nationCode">
<el-option v-for="item in nationCodeList" :key="item.dictCode" :value="item.dictCode"
:label="item.dictName"></el-option>
</el-select>
<el-input v-model="form.phoneNumber"
style="width: 301px"></el-input>
<el-input v-model="form.phoneNumber" style="width: 301px"></el-input>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 386px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { fomatBirthday } from "../../../utils/fomatBirthday";
import { doFetch } from "../../axios/api";
import url from "../../axios/url";
import { mapState } from "vuex";
......@@ -135,7 +99,7 @@ export default {
this.$refs[ 'form' ].validate(valid => {
if (valid) {
this.btnLoading = true;
doFetch(url.updateBaseDetail, Object.assign({}, this.form))
doFetch(url.updateBaseDetail, Object.assign({}, this.form, { memberBirthday: fomatBirthday(this.form.memberBirthday) }))
.then(res => {
if (res.data.errorCode === 0) {
setTimeout(() => {
......@@ -144,7 +108,7 @@ export default {
this.$refs[ 'form' ].resetFields();
this.$emit('update:dialogVisible', false);
this.$emit('refresh');
}, 4500);
}, 2000);
} else {
checkFalse();
this.btnLoading = false;
......
<template>
<div class="batch-list">
<template v-if="dataList.length > 0">
<div v-for="(item, index) in dataList"
:key="index"
class="batch-item">
<div v-for="(item, index) in dataList" :key="index" class="batch-item">
<p class="batch-item-name">{{item.name}}</p>
<div class="batch-item-progress">
<el-progress :percentage="item.taskCount == 0 ? 100 : (+((item.finishCount*100/item.taskCount).toFixed(2)))">
<el-progress
:percentage="item.taskCount == 0 ? 100 : (+((item.finishCount*100/item.taskCount).toFixed(2)))">
</el-progress>
</div>
</div>
</template>
<div v-else
style="text-align: center;">
<div v-else style="text-align: center;">
暂无批量处理数据
</div>
</div>
......
<template>
<div>
<el-dialog title="批量修改等级"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户</div>
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item v-if="showEditClique"
label="等级类型:"
prop="gradeType">
<el-radio v-model="form.isClique"
:label="1"
@change="form.gradeId = ''">集团等级</el-radio>
<el-radio v-model="form.isClique"
:label="0"
@change="form.gradeId = ''">商户等级</el-radio>
<el-dialog title="批量修改等级" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item v-if="showEditClique" label="等级类型:" prop="gradeType">
<el-radio v-model="form.isClique" :label="1" @change="form.gradeId = ''">集团等级</el-radio>
<el-radio v-model="form.isClique" :label="0" @change="form.gradeId = ''">商户等级</el-radio>
</el-form-item>
<el-form-item label="调整后等级:"
prop="gradeId">
<el-select v-model="form.gradeId"
placeholder="请选择"
style="width: 400px;">
<el-option v-for="item in gradeList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
<el-form-item label="调整后等级:" prop="gradeId">
<el-select v-model="form.gradeId" placeholder="请选择" style="width: 400px;">
<el-option v-for="item in gradeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 400px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......
<template>
<div>
<el-dialog title="修改等级"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item v-if="showEditClique"
label="等级类型:"
prop="gradeType">
<el-radio v-model="form.isClique"
:label="1"
@change="form.gradeId = ''">集团等级</el-radio>
<el-radio v-model="form.isClique"
:label="0"
@change="form.gradeId = ''">商户等级</el-radio>
<el-dialog title="修改等级" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item v-if="showEditClique" label="等级类型:" prop="gradeType">
<el-radio v-model="form.isClique" :label="1" @change="form.gradeId = ''">集团等级</el-radio>
<el-radio v-model="form.isClique" :label="0" @change="form.gradeId = ''">商户等级</el-radio>
</el-form-item>
<el-form-item label="调整后等级:"
prop="gradeId">
<el-select v-model="form.gradeId"
placeholder="请选择"
style="width: 386px;">
<el-option v-for="item in gradeList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
<el-form-item label="调整后等级:" prop="gradeId">
<el-select v-model="form.gradeId" placeholder="请选择" style="width: 386px;">
<el-option v-for="item in gradeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 386px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -62,19 +37,25 @@ export default {
type: Boolean,
default: false
},
gradeId: {
type: String,
default: ''
},
gradeList: {
type: Array,
default: () => {
return [];
}
},
memberId: ''
},
data() {
return {
form: {
memberId: '',
gradeId: "",
remark: "",
isClique: 0
isClique: 1
},
rules: {
gradeId: [
......@@ -99,7 +80,7 @@ export default {
this.$refs[ 'form' ].validate(valid => {
if (valid) {
this.btnLoading = true;
doFetch(url.updateBaseDetail, Object.assign({}, this.form))
doFetch(url.memberGrade, Object.assign({}, this.form))
.then(res => {
if (res.data.errorCode === 0) {
setTimeout(() => {
......@@ -108,7 +89,7 @@ export default {
this.$refs[ 'form' ].resetFields();
this.$emit('update:dialogVisible', false);
this.$emit('refresh');
}, 4500);
}, 2000);
} else {
checkFalse();
this.btnLoading = false;
......@@ -127,9 +108,7 @@ export default {
watch: {
dialogVisible(n, o) {
if (n) {
if (this.showEditClique) {
this.form.isClique = 1;
}
this.form = { ...this.form, gradeId: this.gradeId, memberId: this.memberId };
}
}
}
......
<template>
<div>
<el-dialog title="编辑手工标签" custom-class="customer-dailog label-dailog"
:visible.sync="dialogVisible" :close-on-click-modal="false" @close="cancel" width="600px">
<el-tabs v-model="activeName">
<template v-for="tab in tabsList">
<el-tab-pane :label="tab.label" :name="tab.name" :key="tab"
v-if="!(tab.name==='weimo'&&!weimobTagFlag)">
<ul class="tags-list" v-if="tab.name==='clerk'&&tagsList.length">
<li v-for="(item,index) in tagsList" :key="index" class="tag-item">
<div class="tag-group-name" v-if="item.subTags && item.subTags.length">
{{ item.tagsName }}</div>
<div class="tag-style">
<el-checkbox-group v-model="item.checkBox"
v-if="item.tagsName && item.subTags && item.subTags.length">
<el-checkbox v-for="(list, idx) in item.subTags" :key="idx"
:label="list.tagsName" @change="changeCheck(item)"></el-checkbox>
</el-checkbox-group>
</div>
</li>
</ul>
<ul class="tags-list" v-if="tab.name==='other'&&tagsList.length">
<li v-for="(item,index) in otherTagsList" :key="index" class="tag-item">
<div class="tag-group-name" v-if="item.subTags && item.subTags.length">
{{ item.tagsName }}</div>
<div class="tag-style">
<el-checkbox-group v-model="item.checkBox"
v-if="item.tagsName && item.subTags && item.subTags.length">
<el-checkbox v-for="(list, idx) in item.subTags" :key="idx"
:label="list.tagsName" @change="changeCheck(item)"></el-checkbox>
</el-checkbox-group>
</div>
</li>
</ul>
<ul class="tags-list" v-if="tab.name==='weimo'&&tagsList.length">
<li v-for="(item,index) in weimobTagsList" :key="index" class="tag-item">
<div class="tag-group-name" v-if="item.subTags && item.subTags.length">
{{ item.tagsName }}</div>
<div class="tag-style">
<el-checkbox-group v-model="item.checkBox"
v-if="item.tagsName && item.subTags && item.subTags.length">
<el-checkbox v-for="(list, idx) in item.subTags" :key="idx"
:label="list.tagsName" @change="changeCheck(item)"></el-checkbox>
</el-checkbox-group>
</div>
</li>
</ul>
</el-tab-pane>
</template>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { doFetch } from "../../axios/api";
import url from "../../axios/url";
import { mapState } from "vuex";
import { checkFalse, checkStatus, checkSuccess } from "../../../../static/js/checkStatus";
export default {
name: "customergradeDialog",
props: {
dialogVisible: {
type: Boolean,
default: false
},
memberId: ''
},
data() {
return {
form: {
memberId: ''
},
rules: {
gradeId: [
{ required: true, message: "请选择修改后等级", trigger: "change" }
],
remark: [
{ required: true, message: "请输入原因备注", trigger: "change" }
],
},
tabsList: [
{ name: 'clerk', label: '导购标签' },
{ name: 'other', label: '其他标签' },
{ name: 'weimo', label: '微盟标签' },
],
activeName: 'clerk',
weimobTagFlag: false,
tagsList: [],
otherTagsList: [],
weimobTagsList: [],
btnLoading: false,
};
},
computed: {
...mapState([ "showEditClique" ])
},
created() {
this.getTagList();
},
methods: {
cancel() {
this.$emit('update:dialogVisible', false);
},
getTagList() {
doFetch(url.clerkTags, {
memberId: this.memberId
})
.then(res => {
if (res.data.errorCode === 0) {
const {
tagsList = [],
otherTagsList = [],
weimobTagsList = [],
weimobTagFlag = false
} = res.data.result;
this.tagsList = this.formatTagsList(tagsList);
this.otherTagsList = this.formatTagsList(otherTagsList);
this.weimobTagsList = this.formatTagsList(weimobTagsList);
this.weimobTagFlag = weimobTagFlag;
} else {
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
});
},
formatTagsList(tempList) {
let curTagsList = [];
if (!tempList.length) return curTagsList;
let paranttag = tempList.filter(item => {
return item.parentTagsId == null;
});
paranttag.forEach(item => {
let subTags = [];
let checkBox = [];
tempList.forEach(list => {
if (item.tagsId == list.parentTagsId) {
subTags.push(list);
if (list.isCheck) {
checkBox.push(list.tagsName);
}
}
});
curTagsList.push({ ...item, subTags, checkBox });
});
return curTagsList;
},
// 切换选中
changeCheck(item) {
let count = 0;
this.$nextTick(_ => {
// 站位
});
for (let i = 0; i < item.checkBox.length; i++) {
let val = item.checkBox[ i ];
for (let j = 0; j < item.subTags.length; j++) {
if (val == item.subTags[ j ].tagsName) {
item.subTags[ j ].isCheck = 1;
count++;
}
}
}
// 是否都选中了
if (count == item.subTags.length) {
item.isCheck = 1;
}
},
submit() {
this.btnLoading = true;
let tagIds = [];
let arr = [
...this.tagsList,
...this.otherTagsList,
...this.weimobTagsList,
];
// 循环对比tagsName 是否在勾选框内部
arr.forEach(ele => {
ele.subTags.forEach(list => {
if (ele.checkBox.indexOf(list.tagsName) > -1) {
tagIds.push(list.tagsId);
}
});
});
let curtagIds = null;
if (tagIds.length > 0) {
curtagIds = tagIds.join(",");
}
if (!curtagIds) {
this.$message.warning("至少选择一个手工标签!");
return;
}
doFetch(url.updateClerkTags, {
memberId: this.memberId,
tagIds: curtagIds
})
.then(res => {
if (res.data.errorCode === 0) {
checkSuccess();
this.$emit('update:dialogVisible', false);
this.$emit('refresh');
} else {
checkFalse(res.data.message);
}
})
.then(() => {
this.dilogTagVisible = false;
})
.catch(err => {
checkStatus(err);
}).finally(_ => this.btnLoading = false);
},
},
watch: {
dialogVisible(n, o) {
if (n) {
this.form.mamberId = this.mamberId;
}
}
}
};
</script>
<style lang="less" scoped>
</style>
<style lang="less">
// 去除dailog-footer上边框
.customer-dailog .el-dialog__footer {
padding-top: 0;
padding-bottom: 20px;
border-top: none !important;
}
.customer-dailog .el-dialog__body {
padding-bottom: 0;
}
.label-dailog {
.el-tabs__header {
margin-bottom: 37px;
}
.el-dialog__body {
padding-top: 0;
}
.el-tabs__content {
height: 247px;
padding-left: 20px;
overflow-y: scroll;
.tag-item {
display: flex;
.tag-group-name {
flex-shrink: 0;
margin-right: 10px;
font-size: 14px;
color: #303133;
line-height: 20px;
}
.tag-style {
.el-checkbox-group {
display: flex;
flex-wrap: wrap;
.el-checkbox {
line-height: 20px;
margin-bottom: 20px;
}
.el-checkbox + .el-checkbox {
margin-left: 0;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog title="修改服务门店"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="服务门店:"
prop="mainStoreId">
<el-select style="width: 386px"
v-model="form.mainStoreId"
filterable
remote
reserve-keyword
placeholder="请输入门店名称/门店code"
@change="getClerckList"
:remote-method="getMainStoreCodeName"
:loading="loading">
<el-option v-for="item in mainstoreList"
:key="item.storeId"
:label="item.storeName"
<el-dialog title="修改服务门店" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="服务门店:" prop="mainStoreId">
<el-select style="width: 386px" v-model="form.mainStoreId" filterable remote
reserve-keyword placeholder="请输入门店名称/门店code" @change="getClerckList"
:remote-method="getMainStoreCodeName" :loading="loading">
<el-option v-for="item in mainstoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId" />
</el-select>
</el-form-item>
<el-form-item label="专属导购:"
prop="mainClerkId">
<el-select v-model="form.mainClerkId"
style="width: 386px">
<el-option v-for="item in clerkOptions"
:key="item.clerkId"
:label="item.clerkName"
<el-form-item label="专属导购:" prop="mainClerkId">
<el-select v-model="form.mainClerkId" style="width: 386px">
<el-option v-for="item in clerkOptions" :key="item.clerkId" :label="item.clerkName"
:value="item.clerkId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 386px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -134,9 +107,9 @@ export default {
}).finally(_ => this.loading = false);
},
// 专属导购列表
getClerckList(v) {
getClerckList(v, type) {
if (!type) this.form.mainClerkId = '';
this.clerkOptions = [];
this.form.mainClerkId = '';
doFetchGet(url.getClerkList, {
storeId: v,
requestProject: "member"
......@@ -150,7 +123,7 @@ export default {
this.$refs[ 'form' ].validate(valid => {
if (valid) {
this.btnLoading = true;
doFetch(url.updateMemberStore, Object.assign({}, this.form))
doFetchGet(url.updateMemberStore, Object.assign({}, this.form))
.then(res => {
if (res.data.errorCode === 0) {
setTimeout(() => {
......@@ -180,7 +153,7 @@ export default {
if (n) {
this.form = Object.assign({}, this.form, { mainStoreIdBak: this.mainStoreId, mainStoreId: this.mainStoreId, mainClerkId: this.mainClerkId });
this.getMainStoreCodeName(this.mainStoreName);
this.getClerckList(this.mainStoreId)
this.getClerckList(this.mainStoreId, true);
}
}
}
......
<template>
<div>
<el-dialog title="修改协管门店"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="协管门店:"
prop="fromSubStoreIds">
<el-select v-model="form.storeIds"
filterable
remote
multiple
class="fromSubStoreIds-select"
style="width:384px;"
:remote-method="getSubStoreList"
placeholder="请输入请输入门店名称/门店code"
v-select-loadmore="getOnlineStore"
<el-dialog title="修改协管门店" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="协管门店:" prop="fromSubStoreIds">
<el-select v-model="form.storeIds" filterable remote multiple
class="fromSubStoreIds-select" style="width:384px;" :remote-method="getSubStoreList"
placeholder="请输入请输入门店名称/门店code" v-select-loadmore="getOnlineStore"
@visible-change="(flag) => flag ? getSubStoreList() : ''">
<el-option v-for="item in subStoreList"
:key="item.storeId"
:label="item.storeName"
<el-option v-for="item in subStoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId"></el-option>
<el-option class="loadmore-loading"
v-if="loading">
<i class="loading-icon"
v-loading="true"></i> 加载中...
<el-option class="loadmore-loading" v-if="loading">
<i class="loading-icon" v-loading="true"></i> 加载中...
</el-option>
</el-select>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 386px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { doFetch, doFetchqs, doFetchGet } from "../../axios/api";
import { doFetchqs, doFetchGet } from "../../axios/api";
import url from "../../axios/url";
import { mapState } from "vuex";
import { checkFalse, checkStatus, checkSuccess } from "../../../../static/js/checkStatus";
......@@ -135,7 +110,7 @@ export default {
this.$refs[ 'form' ].validate(valid => {
if (valid) {
this.btnLoading = true;
doFetch(url.updateMemberStore, Object.assign({}, this.form, { storeIds: this.form.storeIds.join(',') }))
doFetchGet(url.updateMemberStore, Object.assign({}, this.form, { storeIds: this.form.storeIds.join(',') }))
.then(res => {
if (res.data.errorCode === 0) {
setTimeout(() => {
......
<template>
<div>
<el-dialog title="批量调整积分"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户</div>
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="调整积分:"
prop="editType">
<el-dialog title="批量调整积分" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="调整积分:" prop="editType">
<el-radio-group v-model="form.editType">
<el-radio :label=1>增加积分</el-radio>
<el-radio :label=2>扣除积分</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="调整额度:"
prop="accumulatPoints">
<el-input-number v-model="form.accumulatPoints"
style="width: 115px;"
controls-position="right"
:min="1"
:max="999999"></el-input-number>
<el-form-item label="调整额度:" prop="accumulatPoints">
<el-input-number v-model="form.accumulatPoints" style="width: 115px;"
controls-position="right" :min="1" :max="999999"></el-input-number>
</el-form-item>
<el-form-item label="原始成本主体:"
prop="settlementStoreId"
<el-form-item label="原始成本主体:" prop="settlementStoreId"
v-if="integralFlag == 'gic' && form.editType == 1">
<el-select prop="settlementStoreId"
style="width: 400px;"
v-model="form.settlementStoreId"
filterable
remote
reserve-keyword
placeholder="请输入门店名称/门店code"
:remote-method="getStoreCodeName"
:loading="loading">
<el-option v-for="item in storeList"
:key="item.storeId"
:label="item.storeName"
<el-select prop="settlementStoreId" style="width: 400px;" v-model="form.settlementStoreId"
filterable remote reserve-keyword placeholder="请输入门店名称/门店code"
:remote-method="getStoreCodeName" :loading="loading">
<el-option v-for="item in storeList" :key="item.storeId" :label="item.storeName"
:value="item.storeId"></el-option>
</el-select>
<p class="sub-tip">注:除输入选择具体门店外,还可输入总部,记总部名下</p>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 400px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......
<template>
<div>
<el-dialog title="批量修改服务门店"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户</div>
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="服务门店:"
prop="mainStoreId">
<el-select style="width: 382px"
v-model="form.mainStoreId"
filterable
remote
reserve-keyword
placeholder="请输入门店名称/门店code"
:remote-method="getMainStoreCodeName"
<el-dialog title="批量修改服务门店" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="服务门店:" prop="mainStoreId">
<el-select style="width: 382px" v-model="form.mainStoreId" filterable remote
reserve-keyword placeholder="请输入门店名称/门店code" :remote-method="getMainStoreCodeName"
:loading="loading">
<el-option v-for="item in mainstoreList"
:key="item.storeId"
:label="item.storeName"
<el-option v-for="item in mainstoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId" />
</el-select>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 382px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -92,7 +71,7 @@ export default {
form: {
remark: "",
optType: 1, // 1服务门店(主门店),2协管门店
mainOptType:4, //服务门店类型 1替换为最新协管的门店 2替换为最新协管的自营门店 3 替换为最新协管的自营/联营门店 4自定义主门店
mainOptType: 4, //服务门店类型 1替换为最新协管的门店 2替换为最新协管的自营门店 3 替换为最新协管的自营/联营门店 4自定义主门店
mainStoreId: ""
},
rules: {
......@@ -131,7 +110,7 @@ export default {
})
.catch(err => {
checkStatus(err);
}).finally(_=>this.loading = false);
}).finally(_ => this.loading = false);
},
submit() {
this.$refs[ 'form' ].validate(valid => {
......
<template>
<div>
<el-dialog title="批量修改协管门店"
custom-class="customer-dailog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@close="cancel"
width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户</div>
<el-form ref="form"
:model="form"
:rules="rules"
label-width="133px">
<el-form-item label="协管门店:"
prop="fromSubStoreIds">
<el-dialog title="批量修改协管门店" custom-class="customer-dailog" :visible.sync="dialogVisible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">当前选中<span class="num"> {{ multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="协管门店:" prop="fromSubStoreIds">
<el-form-item prop="subOptType" style="margin-bottom:12px;">
<el-radio-group v-model="form.subOptType">
<el-radio :label="1">增加</el-radio>
......@@ -20,43 +13,26 @@
</el-radio-group>
</el-form-item>
<el-form-item prop="fromSubStoreIds">
<el-select v-model="form.fromSubStoreIds"
filterable
remote
multiple
class="fromSubStoreIds-select"
style="width:384px;"
:remote-method="getSubStoreList"
placeholder="请输入请输入门店名称/门店code"
v-select-loadmore="getOnlineStore"
<el-select v-model="form.fromSubStoreIds" filterable remote multiple
class="fromSubStoreIds-select" style="width:384px;" :remote-method="getSubStoreList"
placeholder="请输入请输入门店名称/门店code" v-select-loadmore="getOnlineStore"
@visible-change="(flag) => flag ? getSubStoreList() : ''">
<el-option v-for="item in subStoreList"
:key="item.storeId"
:label="item.storeName"
<el-option v-for="item in subStoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId"></el-option>
<el-option class="loadmore-loading"
v-if="loading">
<i class="loading-icon"
v-loading="true"></i> 加载中...
<el-option class="loadmore-loading" v-if="loading">
<i class="loading-icon" v-loading="true"></i> 加载中...
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item label="原因备注:"
prop="remark">
<el-input type="text"
maxlength="20"
show-word-limit
v-model="form.remark"
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
style="width: 386px;"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
:loading="btnLoading"
@click="submit">确 定</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
</span>
</el-dialog>
</div>
......
<template>
<div>
<el-dialog title="设置显示字段"
custom-class="table-colum-dailog"
:visible.sync="dialogVisible"
@close="cancel"
width="600px">
<el-dialog title="设置显示字段" custom-class="table-colum-dailog" :visible.sync="dialogVisible"
@close="cancel" width="600px">
<div class="checkwtip mBottom10">请选择您想显示的列表字段,最多勾选8个选项,已经勾选了 <span
class="curcheck">{{ checkedFieldsCopy.length }}</span></div>
<el-checkbox-group v-model="checkedFieldsCopy"
class="table-colum-wrap"
:min="0"
:max="8">
<el-checkbox v-for="(item, index) in memberFields"
class="table-colum-item"
:key="index"
:label="item.code"
:disabled="item.code==='name'">{{item.name}}</el-checkbox>
<el-checkbox-group v-model="checkedFieldsCopy" class="table-colum-wrap" :min="0" :max="8">
<el-checkbox v-for="(item, index) in memberFields" class="table-colum-item" :key="index"
:label="item.code" :disabled="item.code==='name'">{{item.name}}</el-checkbox>
</el-checkbox-group>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary"
@click="submitFields">确 定</el-button>
<el-button type="primary" @click="submitFields">确 定</el-button>
</span>
</el-dialog>
</div>
......
......@@ -104,12 +104,16 @@ export default {
if (newV.length === 0) {
this.customerType = [].concat(oldV);
this.$message({
message: '客户类型不能为空',
type: 'warning'
message: "客户类型不能为空",
type: "warning"
});
}
},
immediate: true
},
$route: function(n, o) {
if (n.path === "/allCustomers")
this.$store.commit("mutations-slide", true);
}
},
created() {
......@@ -123,6 +127,7 @@ export default {
this.getAjaxMembers();
this.getEnterpriseInfo();
},
beforUpdate() {},
methods: {
initialize() {
this.pageParam.phoneNameCard = !!sessionStorage.getItem("phoneNameCard")
......@@ -156,7 +161,6 @@ export default {
})
)
.then(res => {
console.log(res);
this.loading = false;
if (
res.data.errorCode === 0 &&
......@@ -225,7 +229,6 @@ export default {
})
.then(res => {
if (res.data.errorCode === 0 && Array.isArray(res.data.result)) {
console.log(res.data.result);
let tempArr = [].concat(res.data.result);
let checkedFields = [];
let memberFields = [];
......@@ -239,7 +242,6 @@ export default {
memberFields.push(item);
});
this.checkedFields = [].concat(checkedFields);
console.log(this.checkedFields);
this.memberFields = [].concat(memberFields);
this.memberFieldsName = Object.assign({}, memberFieldsName);
// this.$nextTick(_ => {
......@@ -261,7 +263,6 @@ export default {
if (res.data.errorCode === 0) {
checkSuccess();
this.checkedFields = v.split(",");
console.log(this.checkedFields);
this.getAjaxMembers();
} else {
checkFalse(res.data.message);
......
......@@ -3,6 +3,7 @@ import baseinfoDialog from "./components/baseinfoDialog.vue";
import customergradeDialog from "./components/customergradeDialog.vue";
import customermainstoreDialog from "./components/customermainstoreDialog.vue";
import customersubstoreDialog from "./components/customersubstoreDialog.vue";
import customerlabelDialog from "./components/customerlabelDialog.vue";
import defaultImg from "../../../static/img/default.png";
import { mapState } from "vuex";
import url from "../../components/axios/url";
......@@ -35,12 +36,42 @@ export default {
thirdImgUrl: "" // 头像
},
memberInfo: {}, // 会员卡信息
extendInfo: { // 开卡字段、扩展字段
extendInfo: {
// 开卡字段、扩展字段
openField: [],
fieldList: []
},
tagAndRemarkInfo: {}, // 标签备注
// 标签备注
tagAndRemarkInfo: {
// 会员分组
memberGroup: {
// 金字塔分层
memberGradeGroup: {},
// 客户分组
memberTagGroupList: {}
},
// 手工标签
tag: {
tagsList: [], // 导购标签
otherTagsList: [], // 其他标签
weimobTagsList: [] // 微盟标签
},
// 导购备注
remarkList: [],
// 身形字段
dictFigureList: []
},
tableData: [],
logPageParam: {
pageSize: 20,
currentPage: 1
},
totalCount: 0,
defaultImg,
labelTabsActive: "groupName",
fullscreenLoading: false, // 全局loading
tableLoading: false, // 用户日志列表loading
imgLoading: false, // 刷新头像loading
toggleTag: false, // 拓展信息展开按钮
showFieldType: 1, // 1开卡拓展字段 2会员信息字段
showClique: false, // 集团权限
......@@ -48,19 +79,111 @@ export default {
gradeDialogVisible: false, // 修改等级弹窗
mainStoreDialogVisible: false, // 修改服务门店、专属导购弹窗
subStoreDialogVisible: false, // 修改协管门店弹窗
labelDialogVisible: false, // 修改手工标签弹窗
nationCodeList: [], // 手机区号列表
gradeList: [], // 等级列表
assistStoreList: [
"杭州武林银泰",
"杭州城wqeq西银泰",
"杭州古墩路印象城",
"杭州武林银泰"
],
transactionRecordList: [
{ label: "门店消费", icon: "icon-mendianbaojiadan", key: "numOfSale" },
{ label: "达摩商城", icon: "", key: "wechatMallNum" },
{ label: "微盟订单", icon: "icon-weimeng", key: "weimobMallNum" },
{ label: "其他订单", icon: "icon-dingdan-copy", key: "otherMallNum" }
// 模块列表
customerInfoItemList: [
{ title: "基本信息", name: "basic", class: "basic-info-contain" },
{
title: "会员卡信息",
name: "card",
class: "card-info-contain max1600"
},
{
title: "资产信息",
name: "assets",
class: "assets-info-contain",
childrenList: [
{
label: "积分",
icon: "icon-jifen1",
iconTheme: "integral",
key: "accumulatPoints",
path: "/integralDataPage"
},
{
label: "卡券",
icon: "icon-01_kaquanguanli",
iconTheme: "coupon",
key: "couponCount",
path: "/cardvoucher"
},
{
label: "储值余额",
icon: "icon-chuzhizhanghu",
iconTheme: "balance",
key: "storedValue",
path: ""
}
]
},
{
title: "归属信息",
name: "ascription",
class: "ascription-info-contain max160"
},
{
title: "交易记录",
name: "transaction",
class: "transaction-record-contain",
childrenList: [
{
label: "门店消费",
icon: "icon-mendianbaojiadan",
key: "numOfSale",
path: "/ajaxmembersinfo"
},
{
label: "达摩商城",
icon: "",
key: "wechatMallNum",
path: "/infoMall"
},
{
label: "微盟订单",
icon: "icon-weimeng",
key: "weimobMallNum",
path: "/wmDetail"
},
{
label: "其他订单",
icon: "icon-dingdan-copy",
key: "otherMallNum",
path: "/otherDetail"
}
]
},
{
title: "交互记录",
name: "interactive",
class: "interactive-record-contain",
childrenList: [
{
label: "营销记录",
icon: "icon-yingxiao",
key: "numOfMarket",
path: ""
},
{
label: "通话记录",
icon: "icon-tonghuajilu",
key: "numOfTel",
path: "/talkLogPage"
}
]
},
{
title: "标签备注",
name: "label",
class: "label-remarks-contain",
childrenList: [
{ title: "导购标签", key: "tagsList" },
{ title: "其他标签", key: "otherTagsList" },
{ title: "微盟标签", key: "weimobTagsList" }
]
},
{ title: "客户日志", name: "log", class: "log-info-contain" }
]
};
},
......@@ -106,31 +229,69 @@ export default {
this.getGradeList();
},
methods: {
updateImgUrl() {},
initData() {
this.loading = true;
doFetch(url.memberLoadBaseDetail, {
async initData() {
this.fullscreenLoading = true;
await this.getCustomerDetail();
await this.getLogPage();
this.fullscreenLoading = false;
},
async getCustomerDetail() {
const res = await doFetch(url.memberLoadBaseDetail, {
memberId: this.memberId,
pageName: this.pageName
})
.then(res => {
if (res.data.errorCode === 0) {
const ret = res.data.result;
this.member = Object.assign({}, ret.member);
this.extendInfo = Object.assign({}, ret.extendInfo);
this.memberInfo = Object.assign({}, ret.memberInfo);
} else {
checkFalse(res.data.message);
return false;
});
if (res.data.errorCode === 0) {
const ret = res.data.result;
this.member = Object.assign({}, ret.member);
this.extendInfo = Object.assign({}, ret.extendInfo);
this.memberInfo = Object.assign({}, ret.memberInfo);
this.tagAndRemarkInfo = Object.assign(
{},
{
memberGroup: {
memberGradeGroup:
ret.tagAndRemarkInfo.memberGroup.memberGradeGroup || {},
memberTagGroupList:
ret.tagAndRemarkInfo.memberGroup.memberTagGroupList || {}
},
tag: {
tagsList: ret.tagAndRemarkInfo.tag.tagsList || [],
otherTagsList: ret.tagAndRemarkInfo.tag.otherTagsList || [],
weimobTagsList: ret.tagAndRemarkInfo.tag.weimobTagsList || []
},
remarkList: ret.tagAndRemarkInfo.remarkList || [],
dictFigureList: ret.tagAndRemarkInfo.dictFigureList || []
}
})
.catch(err => {
checkStatus(err);
})
.finally(_ => (this.loading = false));
);
} else {
checkFalse(res.data.message);
return false;
}
},
// 用户日志
async getLogPage() {
this.tableLoading = true;
const res = await doFetch(url.logPage, {
...this.logPageParam,
memberId: this.memberId
});
this.tableLoading = false;
if (res.data.errorCode === 0) {
this.tableData = res.data.result.page.result || [];
this.tableData = this.tableData.map(el => {
if (typeof el.operRemark == "string")
el.operRemark = el.operRemark.replace(/\n/g, " <br />");
return el;
});
this.totalCount = res.data.result.page.totalCount;
} else {
checkFalse(res.data.message);
return false;
}
},
// 更新头像
updateImgUrl() {
this.imgLoading = true;
doFetch(url.updateImgUrl, {
memberId: this.memberId
})
......@@ -147,7 +308,21 @@ export default {
})
.catch(err => {
checkStatus(err);
});
})
.finally(_ => (this.imgLoading = false));
},
// 路由跳转
goLink(v) {
if (v) this.$router.push({ path: v, query: { memberId: this.memberId } });
},
handleSizeChange(v) {
this.logPageParam.pageSize = v;
this.logPageParam.currentPage = 1;
this.getLogPage();
},
handleCurrentChange(v) {
this.logPageParam.currentPage = v;
this.getLogPage();
},
// 集团配置
getEnterpriseInfo() {
......@@ -198,6 +373,7 @@ export default {
baseinfoDialog,
customergradeDialog,
customermainstoreDialog,
customersubstoreDialog
customersubstoreDialog,
customerlabelDialog
}
};
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