Compare commits

...

22 Commits

@ -104,7 +104,7 @@
sessionStorage.setItem("userId", data.data.results.userId);
sessionStorage.setItem("roleCode", data.data.results.roleCode);
that.$router.push('/home');
that.$Message.info("登陆成功");
that.$Message.success("登陆成功");
}else if(code === '0004'){
that.$Message.info("账号不存在");
}else if(code === '0003'){

@ -4,6 +4,7 @@
<i-col span="32">
<row>
<row class="search-row">
<i-input placeholder="好友名称" class="search-select" @on-enter="searchCustomerDataBtnClick" v-model="searchCustomer"/>
<span class="left-15">选择日期</span>
<DatePicker v-model="dateRange" class="left-15 date-picker" type="daterange"
placement="bottom-start"
@ -156,6 +157,7 @@
companyId: 0,
organizationalList: [],
shopId: null,
searchCustomer: "",
shopList: [],
sellerId: null,
sellerList: [],
@ -387,6 +389,7 @@
userId: that.userId,
startDate: stdate,
endDate: eddate,
customerName: that.searchCustomer,
companyId: that.changeData(that.companyId),
shopId: that.changeData(that.shopId),
sellerId: that.changeData(that.sellerId),

@ -200,7 +200,7 @@
},
data() {
return {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
userId: null,
intervalId : 0,
//
spinShow: false,
@ -286,6 +286,12 @@
},
},
mounted: function () {
if(!JSON.parse(sessionStorage.getItem("loginInfo"))){
this.$router.push("/login");
return;
}
this.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId;
this.dateBtnClick('今日');
this.timingRefresh();
},

@ -13,6 +13,8 @@
</template>
<script>
import {checkLogin} from "../../utils/Common";
export default {
name: "OrganizationMain",
data() {
@ -22,6 +24,7 @@
}
},
created() {
checkLogin();
this.threeLevel = JSON.parse(sessionStorage.getItem("threeLevel"));
this.menuInit();
},

@ -66,8 +66,8 @@
placeholder="请输入店铺简称">
</i-input>
</FormItem>
<FormItem label="所属客户" prop="parentId">
<Select filterable clearable v-model="formValidate.parentId"
<FormItem label="所属客户" prop="customerId">
<Select filterable clearable v-model="formValidate.customerId"
placeholder="选择客户">
<Option v-for="item in customerList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
@ -158,7 +158,7 @@
name: '',
code: '',
abbreviation: '',
parentId: 0
customerId: 0
},
ruleValidate: {
name: [
@ -170,7 +170,7 @@
detailName: [
{required: true, message: '店铺简称不能为空', trigger: 'blur'}
],
parentId: [
customerId: [
{ required: true, type: 'number', message: '请选择客户', trigger: 'change' }
]
},
@ -204,7 +204,7 @@
name: "",
code: '',
abbreviation: '',
parentId: 0
customerId: 0
}
}else{
this.formValidate = {
@ -212,7 +212,8 @@
name: item.name,
code: item.code,
abbreviation: item.abbreviation,
parentId: item.customerId
customerId: item.customerId
}
}
},
@ -224,7 +225,7 @@
},
handleSubmit(value) {
if (value) {
if(!value.parentId){
if(!value.customerId){
this.$Message.info('请输入表单内容');
return;
}
@ -316,7 +317,7 @@
name: val.name,
code: val.code,
abbreviation: val.abbreviation,
customerId: val.parentId
customerId: val.customerId
};
that.btnLoading = true;
service.postOrganizationStoreAdd(request, function (res) {
@ -343,7 +344,7 @@
name: val.name,
code: val.code,
abbreviation: val.abbreviation,
customerId: val.parentId
customerId: val.customerId
};
service.postOrganizationStoreModify(request, function (res) {
that.btnLoading = false;

@ -118,6 +118,14 @@
{
title: '日增好友平均(去重)',
key: 'avgNewCustomer'
},
{
title: '历史门店拓客总数',
key: 'historyAllCustomers'
},
{
title: '历史门店新增好友数',
key: 'historyAddCustomers'
}
],
data1: [],

@ -221,23 +221,28 @@ export default {
return h("div", [
h("i-switch", {
props: {
value: params.row.status,
"true-value": 1, //
"false-value": 2, //
value: params.row.accountFlag,
"true-value": true, //
"false-value": false, //
size: "large"
},
on: {
//
"on-change": function(value) {
let status = null;
if (value == true){
status = 1;
}else{
status = 0;
}
//
// _this.modifyStatus(params.row.accountId, value);
let request = {
status: value,
id: _this.formValidate.id
status: status,
accountId: params.row.accountId
};
debugger;
//
_this.editSattf(request);
_this.editSattfStatus(request);
}
},
scopedSlots: {
@ -441,6 +446,19 @@ export default {
}
});
},
editSattfStatus: function(request) {
let that = this;
staff.editSattfStatus(request, function(data) {
data = data.data;
if (data.code == "0000") {
that.$Message.success("修改成功!");
}else{
that.$Message.error(data.data);
that.data1 = [];
that.listOfLogistics();
}
});
},
searchCustomerDataBtnClick: function() {
this.listOfLogistics();
@ -501,7 +519,8 @@ export default {
}
},
back: function() {
this.$router.push({ path: "/shop/increase/manager" });
// this.$router.push({ path: "/shop/increase/manager" });
this.$router.back();
},
//
remove: function(row) {

@ -53,6 +53,7 @@
<img :src="qrCodeImage" style="width:200px;height:200px;"/>
<div style="text-align: center;">
<Button ghost type="primary" @click="download(rowData)"></Button>
<Button ghost type="primary" style="margin-left: 20px;" @click="resetQrCode(rowData)"></Button>
</div>
</Modal>
@ -539,6 +540,24 @@
})
},
/**
* 重置二维码
* @param index
*/
resetQrCode: function(index){
if(!index){
return;
}
http.postStoreStaffQrCodeReset({storeCode: index.code, staffCode: index.cpUserId}, function (data) {
if(data.code === '0000'){
this.$Message.success('重置成功');
}else{
this.$Message.error('重置失败');
}
});
},
//
handlePage: function (value) {
this.pageNum = value;

@ -1,5 +1,14 @@
<template>
<div class>
<Row class="search-row">
<i-col span="24" class="search-col">
<Row class="row-style">
<i-col span="12" style="text-align: left;padding-right: 20px;">
<Button type="primary" @click="back()"></Button>
</i-col>
</Row>
</i-col>
</Row>
<Row>
<i-col :span="12">
<Form ref="welcomeForm" :model="welcome" :rules="welcomeRules">
@ -265,6 +274,9 @@ export default {
selectStoreStep
},
methods: {
back: function() {
this.$router.back();
},
paramFilter() {
return this.welcome.params.length < 1;
},

@ -133,7 +133,7 @@
>
<Button
style="height: 39px;width: 101px;border: 0"
@click="modifyAccountcancel()"
@click="goBackPage()"
>返回</Button
>
</div>
@ -293,15 +293,17 @@ import IncreaseData from "../../services/generalize/IncreaseData";
that.$Message.error("该账号已经被使用!");
} else if (data.results == 0) {
that.$Message.success("修改账号成功");
that.$router.push({ path: "/account/manager" });
// that.$router.push({ path: "/account/manager" });
that.goBackPage();
}
}
});
});
},
//
modifyAccountcancel: function() {
this.$router.push({ path: "/account/manager" });
goBackPage: function() {
// this.$router.push({ path: "/account/manager" });
this.$router.back();
},
//
roleChange(roleBean) {

@ -51,6 +51,7 @@
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
import IncreaseData from "../../services/generalize/IncreaseData";
import {checkLogin} from "../../utils/Common";
export default {
data() {
@ -200,6 +201,9 @@
shopList: [], //
}
},
created() {
checkLogin();
},
mounted: function () {
this.getSelectList();
this.listRoleInfo();

@ -134,7 +134,7 @@
>
<Button
style="height:39px;width:101px;border:0"
@click="addAccountCancel()"
@click="goBackPage()"
>返回</Button
>
</row>
@ -294,15 +294,16 @@
that.$Message.error("该账号已经被使用!");
} else if (data.results == "0000") {
that.$Message.success("保存账号成功");
that.$router.push({ path: "/account/manager" });
that.goBackPage();
}
}
});
});
},
//
addAccountCancel: function() {
this.$router.push({ path: "/account/manager" });
goBackPage: function() {
// this.$router.push({ path: "/account/manager" });
this.$router.back();
},
//
roleChange(roleBean) {

@ -43,7 +43,7 @@ export function listOfSellerByStore(params, call) {
* @returns {Promise<any>}
*/
export function generalizeOfRetail(params, call) {
return http.get('/retail/retail', params).then(call)
return http.get('/retail/retail/new', params).then(call)
}
/**

@ -44,6 +44,10 @@ export function editSattf(params, call) {
return http.post('/store/staff/edit',params).then(call)
}
export function editSattfStatus(params, call) {
return http.post('/account/modify/status',params).then(call)
}
export function removeStaff(params, call) {
return http.post('/store/staff/delete',params).then(call)
}
@ -55,5 +59,6 @@ export default {
downRoleData,
addSattf,
editSattf,
editSattfStatus,
removeStaff
}

@ -13,35 +13,40 @@ import axios from 'axios'
* @returns {Promise<any | never>}
*/
export function uploadUser(params, call) {
return http.post('/store/emp/import', params).then(call)
return http.post('/store/emp/import', params).then(call)
}
export function storeList(params, call, errorCallBack) {
return http
.post('/store/emp/list', params)
.then(call)
.catch(errorCallBack)
return http
.post('/store/emp/list', params)
.then(call)
.catch(errorCallBack)
}
export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call)
return http.post('/user/add', params).then(call)
}
export function modifyStoreWX(params, call) {
return http.post('/user/update', params).then(call);
}
export function downloadImg(params,name, call) {
return http.downloadImg('/user/img/download',name, params).then(call);
export function downloadImg(params, name, call) {
return http.downloadImg('/user/img/download', name, params).then(call);
}
/**
* 下拉框数据品牌公司
*/
export function downCompanyData(params, call) {
return http.get('/retail/company', params).then(call)
return http.get('/retail/company', params).then(call)
}
/**
* 下拉框数据品牌公司
*/
export function downBigRegionData(params, call) {
return http.get('/retail/big/region', params).then(call)
return http.get('/retail/big/region', params).then(call)
}
/**
@ -51,10 +56,11 @@ export function downBigRegionData(params, call) {
* @returns {Promise<any | never>}
*/
export function downloadStoreCode(params, call) {
return http
.downloadZip('/store/emp/download/store/code/bsd', '门店码', params)
.then(call)
return http
.downloadZip('/store/emp/download/store/code/bsd', '门店码', params)
.then(call)
}
/**
* 下载门店导购码
* @param params
@ -62,17 +68,17 @@ export function downloadStoreCode(params, call) {
* @returns {Promise<any | never>}
*/
export function downloadStoreSellerCode(params, call) {
return http
.downloadZip(
'/store/emp/download/store/seller/code/bsd',
'门店导购码',
params
)
.then(call)
return http
.downloadZip(
'/store/emp/download/store/seller/code/bsd',
'门店导购码',
params
)
.then(call)
}
export function getBaseUrl() {
return axios.defaults.baseURL
return axios.defaults.baseURL
}
/**
@ -83,22 +89,34 @@ export function getBaseUrl() {
* @returns {Promise<unknown>}
*/
export function downloadDataListToList(params, call, errorCallBack) {
return http
.downloadFileToExcel(
'/store/emp/download/store/excel/bsd',
'推广管理-店铺列表',
params
)
.then(call)
.catch(errorCallBack)
return http
.downloadFileToExcel(
'/store/emp/download/store/excel/bsd',
'推广管理-店铺列表',
params
)
.then(call)
.catch(errorCallBack)
}
export function getWelcomeList(params, call) {
return http.get('/activity/instance/list', params).then(call)
return http.get('/activity/instance/list', params).then(call)
}
export function deleteWelcome(params, call) {
return http.get('/activity/instance/deleteWelcome', params).then(call)
return http.get('/activity/instance/deleteWelcome', params).then(call)
}
/**
* 重置二维码
* @param params
* @param call
* @returns {Promise<any>}
*/
export function postStoreStaffQrCodeReset(params, call) {
return http.post('/store/staff/qrcode/reset', params).then(call)
}
export default {
uploadUser,
getBaseUrl,
@ -111,6 +129,7 @@ export default {
downloadStoreCode,
downloadStoreSellerCode,
downloadDataListToList,
getWelcomeList,
deleteWelcome,
getWelcomeList,
deleteWelcome,
postStoreStaffQrCodeReset
}

@ -18,6 +18,13 @@ export function goToLogin() {
roter.push("/login");
}
export function checkLogin() {
// store.commit("LOGOUT");
if(!sessionStorage.getItem("loginInfo")){
goToLogin();
}
}
export function formatDate(dt) {
dt = new Date(dt);
let year = dt.getFullYear();

Loading…
Cancel
Save