Compare commits

...

22 Commits

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

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

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

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

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

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

@ -221,23 +221,28 @@ export default {
return h("div", [ return h("div", [
h("i-switch", { h("i-switch", {
props: { props: {
value: params.row.status, value: params.row.accountFlag,
"true-value": 1, // "true-value": true, //
"false-value": 2, // "false-value": false, //
size: "large" size: "large"
}, },
on: { on: {
// //
"on-change": function(value) { "on-change": function(value) {
let status = null;
if (value == true){
status = 1;
}else{
status = 0;
}
// //
// _this.modifyStatus(params.row.accountId, value); // _this.modifyStatus(params.row.accountId, value);
let request = { let request = {
status: value, status: status,
id: _this.formValidate.id accountId: params.row.accountId
}; };
debugger;
// //
_this.editSattf(request); _this.editSattfStatus(request);
} }
}, },
scopedSlots: { 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() { searchCustomerDataBtnClick: function() {
this.listOfLogistics(); this.listOfLogistics();
@ -501,7 +519,8 @@ export default {
} }
}, },
back: function() { back: function() {
this.$router.push({ path: "/shop/increase/manager" }); // this.$router.push({ path: "/shop/increase/manager" });
this.$router.back();
}, },
// //
remove: function(row) { remove: function(row) {

@ -53,6 +53,7 @@
<img :src="qrCodeImage" style="width:200px;height:200px;"/> <img :src="qrCodeImage" style="width:200px;height:200px;"/>
<div style="text-align: center;"> <div style="text-align: center;">
<Button ghost type="primary" @click="download(rowData)"></Button> <Button ghost type="primary" @click="download(rowData)"></Button>
<Button ghost type="primary" style="margin-left: 20px;" @click="resetQrCode(rowData)"></Button>
</div> </div>
</Modal> </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) { handlePage: function (value) {
this.pageNum = value; this.pageNum = value;

@ -1,5 +1,14 @@
<template> <template>
<div class> <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> <Row>
<i-col :span="12"> <i-col :span="12">
<Form ref="welcomeForm" :model="welcome" :rules="welcomeRules"> <Form ref="welcomeForm" :model="welcome" :rules="welcomeRules">
@ -265,6 +274,9 @@ export default {
selectStoreStep selectStoreStep
}, },
methods: { methods: {
back: function() {
this.$router.back();
},
paramFilter() { paramFilter() {
return this.welcome.params.length < 1; return this.welcome.params.length < 1;
}, },

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

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

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

@ -43,7 +43,7 @@ export function listOfSellerByStore(params, call) {
* @returns {Promise<any>} * @returns {Promise<any>}
*/ */
export function generalizeOfRetail(params, call) { 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) 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) { export function removeStaff(params, call) {
return http.post('/store/staff/delete',params).then(call) return http.post('/store/staff/delete',params).then(call)
} }
@ -55,5 +59,6 @@ export default {
downRoleData, downRoleData,
addSattf, addSattf,
editSattf, editSattf,
editSattfStatus,
removeStaff removeStaff
} }

@ -15,18 +15,22 @@ import axios from 'axios'
export function uploadUser(params, call) { 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) { export function storeList(params, call, errorCallBack) {
return http return http
.post('/store/emp/list', params) .post('/store/emp/list', params)
.then(call) .then(call)
.catch(errorCallBack) .catch(errorCallBack)
} }
export function addStoreWX(params, call) { 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) { export function modifyStoreWX(params, call) {
return http.post('/user/update', params).then(call); return http.post('/user/update', params).then(call);
} }
export function downloadImg(params, name, call) { export function downloadImg(params, name, call) {
return http.downloadImg('/user/img/download', name, params).then(call); return http.downloadImg('/user/img/download', name, params).then(call);
} }
@ -37,6 +41,7 @@ export function downloadImg(params,name, call) {
export function downCompanyData(params, call) { export function downCompanyData(params, call) {
return http.get('/retail/company', params).then(call) return http.get('/retail/company', params).then(call)
} }
/** /**
* 下拉框数据品牌公司 * 下拉框数据品牌公司
*/ */
@ -55,6 +60,7 @@ export function downloadStoreCode(params, call) {
.downloadZip('/store/emp/download/store/code/bsd', '门店码', params) .downloadZip('/store/emp/download/store/code/bsd', '门店码', params)
.then(call) .then(call)
} }
/** /**
* 下载门店导购码 * 下载门店导购码
* @param params * @param params
@ -96,9 +102,21 @@ export function downloadDataListToList(params, call, errorCallBack) {
export function getWelcomeList(params, call) { 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) { 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 { export default {
uploadUser, uploadUser,
getBaseUrl, getBaseUrl,
@ -113,4 +131,5 @@ export default {
downloadDataListToList, downloadDataListToList,
getWelcomeList, getWelcomeList,
deleteWelcome, deleteWelcome,
postStoreStaffQrCodeReset
} }

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

Loading…
Cancel
Save