Commit b5cd1eeb by 无尘

fix: 修改接口路径

parent cd29f921
......@@ -20,7 +20,7 @@ let api = {
method: 'post',
useFormData: true
},
getBrand: '/member/list-brand', // 获取店招品牌
getListBrand: '/member/list-brand', // 获取店招品牌
getClerkList: '/member/clerk-list', // 获取导购列表
getMemberCount: '', // 获取会员数量
saveAssign: {
......@@ -127,6 +127,6 @@ let api = {
},
};
api = getFetch(api, '/hb-manage-web');
api = getFetch(api, '/hb-app-customer-web');
export default api;
......@@ -4,10 +4,10 @@
* @Author: 无尘
* @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 10:32:15
* @LastEditTime: 2020-09-07 11:11:11
-->
<!--
<customer-assign v-if="assignShow" :brand-id="brandId" :clerk-id="clerkId" :search-params="searchInput" :choose-all="selectRadio" :depart-obj="departObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
<customer-assign v-if="assignShow" :brand-id="brandId" :customer-assign-total="customerAssignTotal" :clerk-id="clerkId" :search-params="searchInput" :choose-all="selectRadio" :depart-obj="departObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
import customerAssign from '@/components/app/my-customer/customer-assign.vue';
-->
<template>
......@@ -62,6 +62,12 @@ export default {
return '';
}
},
customerAssignTotal: {
type: [ String, Number ],
default() {
return '';
}
},
clerkId: {
type: String,
default() {
......@@ -380,7 +386,7 @@ export default {
if (Object.keys(that.editRow).length) {
that.assignPeople = 1;
} else {
that.chooseAll == 0 ? (that.assignPeople = that.multipleData.length) : that.getMemberData();
that.chooseAll == 0 ? (that.assignPeople = that.multipleData.length) : that.customerAssignTotal; // that.getMemberData();
}
}
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-09-01 17:16:25
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 14:43:33
* @LastEditTime: 2020-09-07 11:23:52
-->
<!--
......@@ -70,7 +70,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue';
import { _debounce, emojiToStr } from '@/common/js/public.js';
import showMsg from '@/common/js/showmsg.js';
import api from '@/api/my-customer-app.js';
const { addClerkTag, getTagClassify } = api;
const { addClerkTag, editClerkTag, getTagClassify } = api;
export default {
name: 'TagClassifyDialog',
components: {
......@@ -88,6 +88,7 @@ export default {
return {
tagId: '',
tagName: '',
linkId: '',
categoryId: '',
childList: []
};
......@@ -102,6 +103,7 @@ export default {
form: {
tagId: '',
tagName: '',
linkId: '',
categoryId: '',
childList: []
},
......@@ -184,10 +186,19 @@ export default {
const param = {
tagId: that.form.tagId,
tagName: emojiToStr(that.form.tagName),
linkId: that.form.linkId,
childList: JSON.stringify(that.form.childList),
categoryId: that.form.categoryId,
wxEnterpriseId: that.wxEnterpriseId
};
if (that.form.tagId) {
that.editPost(param);
}else {
that.addPost(param);
}
},
addPost(param) {
const that = this;
addClerkTag(param)
.then(res => {
that.loadBtn = false;
......@@ -203,6 +214,23 @@ export default {
that.loadBtn = false;
});
},
editPost(param) {
const that = this;
editClerkTag(param)
.then(res => {
that.loadBtn = false;
if (res.code == '0000') {
showMsg.showmsg('操作成功', 'success');
that.$refs['tagForm'].resetFields();
that.$emit('closeTag', 'success');
}else {
showMsg.showmsg(res.message || '未知错误', 'warning');
}
})
.catch(error => {
that.loadBtn = false;
});
},
/**
* @description: 获取分类数据
*/
......
......@@ -3,7 +3,7 @@
* @Author : 无尘
* @Date : 2020-08-13 14:02:22
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 10:32:52
* @LastEditTime: 2020-09-07 11:01:01
* @FilePath : haoban-4\src\components\app\my-customer\store-list.vue
-->
<!--
......@@ -30,6 +30,9 @@
<el-table-column class="cursor-pointer" prop="" label="门店类型" show-overflow-tooltip>
<template slot-scope="scope">{{ storeType[scope.row.storeType] || '--' }}</template>
</el-table-column>
<el-table-column class="cursor-pointer" prop="" label="门店代码" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeCode || '--' }}</template>
</el-table-column>
<el-table-column class="cursor-pointer" prop="" label="门店分组" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.storeGroupName || '--' }}
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-28 16:51:22
* @LastEditors: 无尘
* @LastEditTime: 2020-09-07 10:54:14
* @LastEditTime: 2020-09-07 11:18:38
-->
<template>
......@@ -265,13 +265,13 @@ export default {
type: 'warning'
})
.then(() => {
that.delTagData(row.tagId);
that.delTagData(row.tagId, row.linkId);
})
.catch(() => {});
},
delTagData(tagId) {
delTagData(tagId, linkId) {
const that = this;
const para = { tagId };
const para = { tagId, linkId };
delClerkTag(para)
.then(res => {
that.getTableList();
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-07 10:53:33
* @LastEditTime: 2020-09-07 11:12:25
-->
<template>
<div class="customer-assign-wrap">
......@@ -36,10 +36,13 @@
</div>
<div class="table-top flex flex-space-between">
<div>
<el-select class="w-168" v-model="clerkId" placeholder="" @change="changeCondition">
<el-input placeholder="请输入姓名/昵称/会员卡号" maxlength="50" prefix-icon="el-icon-search" v-model="searchInput" class="w-264 m-l-10" style="width: 264px;" clearable @clear="clearSearch" @keyup.native="value => toInput(value, searchInput)"> </el-input><el-select class="w-168" v-model="clerkId" placeholder="" @change="changeCondition">
<el-option label="全部" value="0"></el-option>
<el-option label="无归属" value="-1"></el-option>
<el-option v-for="item in clerkOptions" :key="item.clerkId" :label="item.clerkName" :value="item.clerkId"> </el-option> </el-select><el-input placeholder="请输入会员姓名/手机号/卡号" maxlength="50" prefix-icon="el-icon-search" v-model="searchInput" class="w-264 m-l-10" style="width: 264px;" clearable @clear="clearSearch" @keyup.native="value => toInput(value, searchInput)"> </el-input>
<el-option v-for="item in clerkOptions" :key="item.clerkId" :label="item.clerkName" :value="item.clerkId"> </el-option>
</el-select><el-select class="w-168" v-model="storeBrandId" placeholder="" @change="changeCondition">
<el-option v-for="item in storeBrandOptions" :key="item.clerkId" :label="item.clerkName" :value="item.clerkId"></el-option>
</el-select>
</div>
<el-button type="primary" @click="toAssign">批量分配会员</el-button>
</div>
......@@ -63,12 +66,16 @@
<el-table-column prop="" label="会员等级">
<template slot-scope="scope">{{ scope.row.gradeName || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="消费总额" show-overflow-tooltip>
<el-table-column prop="" label="消费总额" sortable show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.costFee }} {{ scope.row.costFee == null && scope.row.costFee != 0 ? '--' : '' }}</template>
</el-table-column>
<el-table-column prop="" label="最近消费时间" show-overflow-tooltip>
<el-table-column prop="" label="消费次数" sortable>
<template slot-scope="scope">{{ scope.row.consumeTimes || '0' }}</template>
</el-table-column>
<el-table-column prop="" label="最近消费" sortable show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.lastCostTime | timeStampToYmd }} {{ !scope.row.lastCostTime ? '--' : '' }}
<div class="line-h-18">{{ scope.row.lastConsume | timeStampToYmd }} {{ !scope.row.lastConsume ? '--' : '' }}</div>
<div class="line-h-18">{{ scope.row.lastConsume | timeStampToHms }} {{ !scope.row.lastConsume ? '--' : '' }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="生日" show-overflow-tooltip>
......@@ -93,7 +100,7 @@
</div>
</div>
</div>
<customer-assign v-if="assignShow" :brand-id="brandId" :clerk-id="clerkId" :search-params="searchInput" :edit-row="editRow" :choose-all="selectRadio" :depart-obj="storeObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
<customer-assign v-if="assignShow" :brand-id="brandId" :customer-assign-total="total" :clerk-id="clerkId" :search-params="searchInput" :edit-row="editRow" :choose-all="selectRadio" :depart-obj="storeObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
</div>
</template>
<script>
......@@ -104,7 +111,7 @@ import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
import fetch from '@/api/my-customer-app.js';
const { getCustomerSet, saveCustomerSet, getGroupList, getMemberList, getNavChain, getAssignStatus, getClerkList } = fetch;
const { getCustomerSet, saveCustomerSet, getGroupList, getMemberList, getNavChain, getAssignStatus, getListBrand, getClerkList } = fetch;
export default {
name: 'CustomerAssignPage',
components: { orgTree, customerAssign, storeList },
......@@ -144,6 +151,8 @@ export default {
clerkId: '0', // 导购
searchInput: '',
clerkOptions: [], // 导购下拉列表
storeBrandId: '',
storeBrandOptions: [], // 店招品牌下拉列表
tableData: [],
currentPage: 1,
pageSize: 20,
......@@ -262,7 +271,7 @@ export default {
*/
async changeDepart(item) {
const that = this;
if (!!item.storeId) {
if (!!item.storeInfoId) {
return false;
}
that.departObj = item;
......@@ -289,6 +298,7 @@ export default {
const that = this;
that.storeObj = obj;
that.showMember = true;
that.getBrandData();
that.getClerkData();
that.getTableList();
that.toGetNavData();
......@@ -302,7 +312,7 @@ export default {
return new Promise((resolve, reject) => {
let para = {
wxEnterpriseId: that.wxEnterpriseId,
storeId: that.storeObj.storeId
storeInfoId: that.storeObj.storeInfoId
};
getAssignStatus(para)
.then(res => {
......@@ -565,6 +575,26 @@ export default {
});
},
/**
* @description: 获取店招品牌
* @author: 无尘
*/
getBrandData() {
const that = this;
const para = {
enterpriseId: that.brandId,
wxEnterpriseId: that.wxEnterpriseId,
storeInfoId: that.storeObj.storeInfoId
};
getListBrand(para)
.then(res => {
that.storeBrandOptions = res.result || [];
that.storeBrandId = res.result.length ? res.result[0].storeBrandId : '';
})
.catch(function(error) {
});
},
/**
* @description: 获取导购列表
* @author: 无尘
*/
......@@ -573,7 +603,7 @@ export default {
const para = {
enterpriseId: that.brandId,
wxEnterpriseId: that.wxEnterpriseId,
storeId: that.storeObj.storeId
storeInfoId: that.storeObj.storeInfoId
};
getClerkList(para)
.then(res => {
......@@ -594,7 +624,7 @@ export default {
wxEnterpriseId: that.wxEnterpriseId,
pageNum: that.currentPage,
pageSize: that.pageSize,
storeId: that.storeObj.storeId,
storeInfoId: that.storeObj.storeInfoId,
clerkId: that.clerkId,
keyword: that.searchInput
};
......@@ -637,8 +667,8 @@ export default {
width: 195px;
}
.color-1890ff {
color: #2f54eb;
.line-h-18 {
line-height: 18px;
}
.p-20 {
......
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