推广人员和店铺人员页面

master
yinliujing 6 years ago
parent 4f2418778c
commit 00e99cd87f

@ -3,28 +3,7 @@
<Row style="margin-top: 20px;width: 100%;background-color: #F7F8FA;"> <Row style="margin-top: 20px;width: 100%;background-color: #F7F8FA;">
<i-col span="24" style="text-align: left;padding-left: 10px;"> <i-col span="24" style="text-align: left;padding-left: 10px;">
<Row class="row-style"> <Row class="row-style">
<i-col span="1" style="text-align: right;"> <i-col span="24" style="text-align: right;padding-right: 20px;">
<span class="region">区域选择</span>
</i-col>
<i-col span="4" style="padding-left: 10px;">
<Select v-model="selectedRegion" filterable @on-change="downRegionChange" style="width: 200px;">
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</i-col>
<i-col span="1" style="text-align: right;">
<span class="region">店铺选择</span>
</i-col>
<i-col span="4" style="padding-left: 10px;">
<Select v-model="selectedStore" filterable style="width: 200px;" >
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</i-col>
<i-col span="2">
<Button type="primary" @click="searchCustomerDataBtnClick"></Button>
</i-col>
<i-col span="12" style="text-align: right;padding-right: 20px;">
<Button type="primary" style="margin-right: 10px;">批量下载</Button>
<Button type="primary" style="margin-right: 10px;" to="/shop/increase/manager/staff/batch/add">批量添加</Button>
<Button type="primary" @click="open(1)">广</Button> <Button type="primary" @click="open(1)">广</Button>
</i-col> </i-col>
</Row> </Row>
@ -32,11 +11,9 @@
</Row> </Row>
<Table :columns="columns1" :data="data1" style="margin-top: 20px;"> <Table :columns="columns1" :data="data1" style="margin-top: 20px;">
<template slot-scope="{ row, index }" slot="qrCodeAction"> <template slot-scope="{ row, index }" slot="qrCodeAction">
<Button ghost type="primary" size="small" style="margin-right: 5px" @click="show(row)"></Button> <img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
<Button ghost type="primary" size="small" @click="download(row)"></Button> </template>
</template>
<template slot-scope="{ row, index }" slot="state"> <template slot-scope="{ row, index }" slot="state">
<i-switch size="large" :value="row.qrCodeState" @on-change="onSwitchChangeLister(row, index)"> <i-switch size="large" :value="row.qrCodeState" @on-change="onSwitchChangeLister(row, index)">
<span slot="open">开启</span> <span slot="open">开启</span>
@ -46,7 +23,7 @@
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<Button ghost type="primary" size="small" style="margin-right: 5px" @click="open(2, row)">修改</Button> <Button ghost type="primary" size="small" style="margin-right: 5px" @click="open(2, row)">修改</Button>
<Button ghost type="error" size="small" @click="remove(index)"></Button> <Button ghost type="error" size="small" @click="remove(row)"></Button>
</template> </template>
</Table> </Table>
@ -91,52 +68,36 @@
<i-input v-model="formValidate.staffCode" placeholder="请输入工号" :disabled="flag !== 1 ? true : false" ></i-input> <i-input v-model="formValidate.staffCode" placeholder="请输入工号" :disabled="flag !== 1 ? true : false" ></i-input>
</FormItem> </FormItem>
<FormItem label="角色" prop="role" :rules="rules"> <FormItem label="角色" prop="role" :rules="rules">
<Select v-model="formValidate.role" placeholder="选择角色"> <Select v-model="formValidate.role" placeholder="选择角色" :disabled="flag !== 1 ? true : false">
<Option :value="1" >店长</Option> <Option :value="1" >店长</Option>
<Option :value="2" >副店长</Option>
<Option :value="3" >店长助理</Option>
<Option :value="4" >导购</Option> <Option :value="4" >导购</Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="所属区域" prop="region"> <FormItem v-if="flag === 1" label="" prop="checkbox">
<Select v-model="formValidate.region" placeholder="选择区域"> <CheckboxGroup v-model="formValidate.checkbox">
<Option v-for="item in regionList" :value="item.id" :key="item.id" >{{item.name}}</Option> <Checkbox label="vail" >同步开通账号</Checkbox>
</Select> </CheckboxGroup>
</FormItem>
<FormItem label="所属店铺" prop="store" >
<Select v-model="formValidate.store" placeholder="选择店铺">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select>
</FormItem> </FormItem>
<FormItem style="text-align: left;"> <FormItem style="text-align: left;">
<Row> <Row>
<i-col span="16"> <i-col span="16">
<Button type="primary" @click="handleSubmit(formValidate)">广</Button> <Button type="primary" @click="handleSubmit(formValidate)"></Button>
<Button @click="handleReset('formValidate')" style="margin-left: 8px">取消</Button> <Button @click="handleReset('formValidate')" style="margin-left: 8px">取消</Button>
</i-col> </i-col>
<i-col span="8" style="text-align: right;">
<Button @click="handleAdd(formValidate)" v-if="flag === 1">
<span>继续添加</span>
</Button>
</i-col>
</Row> </Row>
</FormItem> </FormItem>
</Form> </Form>
</Modal> </Modal>
<div style="margin: 30px;overflow: hidden"> <Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total
<div style="float: right;"> placement="top" @on-change="handlePage" style="margin: 20px 50px 0 0;right:0px;position: absolute;"></Page>
<Page :total="total" :current="pageNum" :pageSize="pageSize"></Page>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import data from "../../utils/PhoneRegionData"; import data from "../../utils/PhoneRegionData";
import staff, {downRoleData} from "../../services/staff/staff"; import staff from "../../services/staff/staff";
import customerDetail from "../../services/datacenter/DataCenter";
export default { export default {
name: "IncreaseStaffManager", name: "IncreaseStaffManager",
data () { data () {
@ -157,7 +118,7 @@
pageNum: 1, pageNum: 1,
selectedRegion: null, selectedRegion: null,
regionList: [], regionList: [],
selectedStore: null, selectedStore: this.$route.query.storeId,
storeList: [], storeList: [],
shopList:[], shopList:[],
roleList: [], roleList: [],
@ -205,12 +166,6 @@
key:'epWechatQrCode', key:'epWechatQrCode',
width: 150 width: 150
}, },
{
title: '推广码',
key: 'qrCodeState',
width: 150,
slot: 'state'
},
{ {
title: '操作', title: '操作',
slot: 'action', slot: 'action',
@ -225,7 +180,8 @@
phone: '', phone: '',
role: '', role: '',
store: '', store: '',
userId : '' userId : '',
checkbox: ['vail']
}, },
ruleValidate: { ruleValidate: {
name: [ name: [
@ -264,9 +220,7 @@
listOfLogistics() { listOfLogistics() {
let that = this; let that = this;
let request = { let request = {
userId: 1 , shopId: that.selectedStore,
region: that.changeData(that.selectedRegion),
shopId: that.changeData(that.selectedStore),
pageNum: that.pageNum, pageNum: that.pageNum,
pageSize: that.pageSize, pageSize: that.pageSize,
}; };
@ -354,6 +308,7 @@
if (data.code == "0000"){ if (data.code == "0000"){
that.$Message.success('修改成功!'); that.$Message.success('修改成功!');
that.isShowAdd = false; that.isShowAdd = false;
that.listOfLogistics();
} }
}) })
}, },
@ -365,11 +320,14 @@
if(value == 0){return null;} if(value == 0){return null;}
return value; return value;
}, },
//
handlePage:function (value) {
this.pageNum = value;
this.listOfLogistics();
},
downRegionChange: function () { downRegionChange: function () {
this.downShopData(); this.downShopData();
}, },
//
onChangeDateLister: function () { onChangeDateLister: function () {
}, },
@ -380,6 +338,7 @@
this.qrCodeImage = index.epWechatQrCode; this.qrCodeImage = index.epWechatQrCode;
this.rowData = index; this.rowData = index;
}, },
// //
download: function (index) { download: function (index) {
let name = index.staffCode+"-"+index.name let name = index.staffCode+"-"+index.name
@ -409,19 +368,31 @@
this.formValidate = { this.formValidate = {
name: row.name, name: row.name,
staffCode: row.staffCode, staffCode: row.staffCode,
region: row.region,
phone: row.mobil, phone: row.mobil,
role: row.type, role: row.type,
store: row.storeId, store: row.storeId,
userId:row.userId, userId:row.userId,
id : row.id id : row.id
} }
}else {
this.handleAdd(this.formValidate);
} }
}, },
// //
remove: function () { remove: function (row) {
let requset = {
staffId : row.id
}
let that = this;
staff.removeStaff(requset,function (data) {
data = data.data;
if (data.results) {
that.$Message.success('删除成功!');
}else {
that.$Message.success('删除失败!');
}
})
}, },
// switch // switch
onSwitchChangeLister: function () { onSwitchChangeLister: function () {
@ -430,19 +401,28 @@
handleSubmit (value) { handleSubmit (value) {
if (value) { if (value) {
let request = { let request = {};
name : value.name,
storeId:value.store,
mobil: value.phone,
staffCode :value.staffCode,
roleId: value.role,
userId : this.formValidate.userId,
id:this.formValidate.id
};
if (this.flag == 1){ if (this.flag == 1){
// //
request = {
name : value.name,
storeId:this.selectedStore,
mobil: value.phone,
staffCode :value.staffCode,
roleId: value.role,
isOpen: this.formValidate.checkbox[0]
};
this.addSattf(request); this.addSattf(request);
}else { }else {
request = {
name : value.name,
storeId:this.selectedStore,
mobil: value.phone,
staffCode :value.staffCode,
roleId: value.role,
userId : this.formValidate.userId,
id:this.formValidate.id
};
// //
this.editSattf(request); this.editSattf(request);
} }
@ -463,6 +443,7 @@
value.staffCode =""; value.staffCode ="";
value.role =""; value.role ="";
value.region =""; value.region ="";
value.checkbox=['vail'];
} }
} }
} }

@ -3,12 +3,15 @@
<Row style="margin-top: 20px;width: 100%;background-color: #F7F8FA;"> <Row style="margin-top: 20px;width: 100%;background-color: #F7F8FA;">
<i-col span="24" style="text-align: left;padding-left: 10px;"> <i-col span="24" style="text-align: left;padding-left: 10px;">
<Row class="row-style"> <Row class="row-style">
<i-col span="3">
<i-input placeholder="请输入店铺名称或编码" style="margin-left: 10px;padding-right: 10px;" v-model="searchShop"/>
</i-col>
<i-col span="1" style="text-align: right;"> <i-col span="1" style="text-align: right;">
<span class="region">区域选择</span> <span class="region">零售公司</span>
</i-col> </i-col>
<i-col span="4" style="padding-left: 10px;"> <i-col span="4" style="padding-left: 10px;">
<Select v-model="selectedRegion" filterable style="width: 200px;"> <Select v-model="selectedRegion" filterable style="width: 200px;" @on-change="downRegionChange" >
<Option v-for="item in regionList" :value="item.value" :key="item.value">{{ item.label }} <Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}
</Option> </Option>
</Select> </Select>
</i-col> </i-col>
@ -17,17 +20,16 @@
</i-col> </i-col>
<i-col span="4" style="padding-left: 10px;"> <i-col span="4" style="padding-left: 10px;">
<Select v-model="selectedStore" filterable style="width: 200px;"> <Select v-model="selectedStore" filterable style="width: 200px;">
<Option v-for="item in storeList" :value="item.value" :key="item.value">{{ item.label }} <Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}
</Option> </Option>
</Select> </Select>
</i-col> </i-col>
<i-col span="2"> <i-col span="2">
<Button type="primary"></Button> <Button type="primary" @click="searchCustomerDataBtnClick"></Button>
</i-col> </i-col>
<i-col span="12" style="text-align: right;padding-right: 20px;"> <i-col span="9" style="text-align: right;padding-right: 20px;">
<Button type="primary" @click="downloadStoreCode" style="margin-right: 10px;">批量下载门店码</Button> <Button type="primary" @click="downloadStoreCode" style="margin-right: 10px;">批量下载门店码</Button>
<Button type="primary" @click="downloadStoreSellerCode" style="margin-right: 10px;">批量下载导购码</Button> <Button type="primary" @click="downloadStoreSellerCode" style="margin-right: 10px;">批量下载导购码</Button>
<Button type="primary" @click="showImport" style="margin-right: 10px;">批量开通</Button>
</i-col> </i-col>
</Row> </Row>
</i-col> </i-col>
@ -35,14 +37,7 @@
<Table :columns="columns1" :data="data1" style="margin-top: 20px;"> <Table :columns="columns1" :data="data1" style="margin-top: 20px;">
<template slot-scope="{ row, index }" slot="qrCodeAction"> <template slot-scope="{ row, index }" slot="qrCodeAction">
<Button ghost type="primary" size="small" style="margin-right: 5px" @click="instance(index)" >预览</Button> <img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
<Button ghost type="primary" size="small" @click="download(index)"></Button>
</template>
<template slot-scope="{ row, index }" slot="action">
<Button ghost type="primary" size="small" style="margin-right: 5px" @click="open(index)">
</Button>
<Button ghost type="error" size="small" @click="remove(index)"></Button>
</template> </template>
</Table> </Table>
@ -57,7 +52,7 @@
<div slot="header">{{this.showStoreName}}</div> <div slot="header">{{this.showStoreName}}</div>
<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"></Button> <Button ghost type="primary" @click="download(rowData)"></Button>
</div> </div>
</Modal> </Modal>
@ -76,42 +71,41 @@
<i-input v-model="formValidate.alias" placeholder="请输入别名"></i-input> <i-input v-model="formValidate.alias" placeholder="请输入别名"></i-input>
</FormItem> </FormItem>
<FormItem label="账号" prop="account"> <FormItem label="账号" prop="account">
<i-input v-model="formValidate.account" placeholder="请输入账号"></i-input> <i-input v-model="formValidate.userId" placeholder="请输入账号"></i-input>
</FormItem>
<FormItem label="性别" prop="gender">
<RadioGroup v-model="formValidate.gender">
<Radio label="男"></Radio>
<Radio label="女"></Radio>
</RadioGroup>
</FormItem> </FormItem>
<FormItem label="手机" prop="phone"> <FormItem label="手机" prop="phone">
<i-input v-model="formValidate.phone" placeholder="成员通过验证该手机号后可加入企业"> <i-input v-model="formValidate.mobile" placeholder="成员通过验证该手机号后可加入企业">
<Select v-model="formValidate.selectedPhoneRegion" slot="prepend" style="width: 80px" > <Select v-model="formValidate.selectedPhoneRegion" slot="prepend" style="width: 80px" >
<Option v-for="item in prefixDefault" :key="item.prefix + item.en" :value="item.prefix">{{item.prefix}}</Option> <Option v-for="item in prefixDefault" :key="item.prefix + item.en" :value="item.prefix">{{item.prefix}}</Option>
</Select> </Select>
</i-input> </i-input>
</FormItem> </FormItem>
<FormItem label="邮箱" prop="mail"> <FormItem label="邮箱" prop="mail">
<i-input v-model="formValidate.mail" placeholder="请输入邮箱"></i-input> <i-input v-model="formValidate.email" placeholder="请输入邮箱"></i-input>
</FormItem> </FormItem>
<FormItem label="地址" prop="address"> <FormItem label="地址" prop="address">
<i-input v-model="formValidate.address" placeholder="请输入地址"></i-input> <i-input v-model="formValidate.address" placeholder="请输入地址"></i-input>
</FormItem> </FormItem>
<FormItem label="部门" prop="party"> <FormItem label="零售公司" prop="party">
<Select v-model="formValidate.party" placeholder="选择部门"> <Select v-model="formValidate.departIds" placeholder="选择零售公司" @on-change="downCompanyChange(formValidate)">
<Option value="1">部门1</Option> <Option v-for="item in regionList" :value="item.id" :key="item.id">{{item.name}}</Option>
<Option value="2">部门2</Option> </Select>
<Option value="3">部门3</Option> </FormItem>
<FormItem label="店铺" prop="party">
<Select v-model="formValidate.storeId" placeholder="选择店铺">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select> </Select>
</FormItem> </FormItem>
<!--
<FormItem label="职务" prop="duty"> <FormItem label="职务" prop="position">
<i-input v-model="formValidate.duty" placeholder="请输入职务"></i-input> <i-input v-model="formValidate.position" placeholder="请输入职务"></i-input>
</FormItem> </FormItem>
-->
<FormItem label="身份" prop="position"> <!--<FormItem label="身份" prop="position">
<i-input v-model="formValidate.position" placeholder="请输入身份"></i-input> <i-input v-model="formValidate.position" placeholder="请输入身份"></i-input>
</FormItem> </FormItem>-->
<FormItem label=""> <FormItem label="">
<CheckboxGroup v-model="formValidate.checkbox"> <CheckboxGroup v-model="formValidate.checkbox">
@ -120,7 +114,7 @@
</FormItem> </FormItem>
<FormItem style="text-align: left;"> <FormItem style="text-align: left;">
<Button type="primary" @click="handleSubmit('formValidate')"></Button> <Button type="primary" @click="handleSubmit(formValidate)"></Button>
<Button @click="handleReset('formValidate')" style="margin-left: 8px">取消</Button> <Button @click="handleReset('formValidate')" style="margin-left: 8px">取消</Button>
</FormItem> </FormItem>
</Form> </Form>
@ -159,17 +153,25 @@
</div> </div>
</Upload> </Upload>
</Modal> </Modal>
<Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total
placement="top" @on-change="handlePage" style="margin: 20px 50px 0 0;right:0px;position: absolute;"></Page>
</div> </div>
</template> </template>
<script> <script>
import data from '../../utils/PhoneRegionData'; import data from '../../utils/PhoneRegionData';
import http from '../../services/store/IncreaseStoreManager'; import http from '../../services/store/IncreaseStoreManager';
import staff from "../../services/staff/staff";
export default { export default {
name: "IncreaseStoreManager", name: "IncreaseStoreManager",
data() { data() {
return { return {
userId: 13,
searchShop:null,
total: 0,
pageSize: 10,
pageNum: 1,
prefixDefault: data.prefixDefault, prefixDefault: data.prefixDefault,
isShow: false, isShow: false,
isShowImport: false, isShowImport: false,
@ -183,20 +185,26 @@
regionList: [], regionList: [],
errorList: [], errorList: [],
selectedStore: null, selectedStore: null,
storeList: [], shopList: [],
rowData:{},
company:null,
columns1: [ columns1: [
{ {
title: '序号', title: '序号',
key: 'id', key: 'orderNum',
width: 100 width: 100
}, },
{ {
title: '门店名称', title: '店铺名称',
key: 'storeName' key: 'name'
},
{
title: '店铺编码',
key: 'code'
}, },
{ {
title: '门店企业号', title: '门店企业号',
key: 'storeWx' key: 'cpUserId'
}, },
{ {
title: '员工数', title: '员工数',
@ -218,7 +226,7 @@
} }
], ],
data1: [ data1: [
{ /* {
id: 1, id: 1,
storeName: '店铺1', storeName: '店铺1',
storeWx: 'D1', storeWx: 'D1',
@ -245,23 +253,24 @@
storeWx: 'D4', storeWx: 'D4',
staffNum: 10, staffNum: 10,
customerNum: 999 customerNum: 999
} }*/
], ],
// //
formValidate: { formValidate: {
alias: '', alias: '',
account: '', userId: '',
gender: '', gender: '',
phone: '', mobile: '',
mail: '', email: '',
address: '', address: '',
party: '', departIds: '',
selectedPhoneRegion: '86', selectedPhoneRegion: '86',
duty: '', duty: '',
position: '', position: '',
interest: [], interest: [],
desc: '', desc: '',
checkbox: ['vail'] checkbox: ['vail'],
storeId:'',
}, },
ruleValidate: { ruleValidate: {
account: [ account: [
@ -283,23 +292,148 @@
} }
} }
}, },
mounted() {
this.listOfStore();
this.downRegionData();
this.downShopData();
},
methods: { methods: {
onChangeDateLister: function () { onChangeDateLister: function () {
}, },
instance: function () { searchCustomerDataBtnClick: function () {
this.listOfStore();
},
listOfStore() {
let that = this;
let request = {
userId: 1 ,
companyId: that.changeData(that.selectedRegion),
storeId: that.changeData(that.selectedStore),
pageNum: that.pageNum,
pageSize: that.pageSize,
code:that.searchShop
};
http.storeList(request, function (data) {
data = data.data;
if(data.code == "0000") {
that.data1 = [];
let datas = data.results;
//
if (datas.total == null) {
that.total = 0;
} else {
that.total = datas.total;
}
if (datas.list == null) {
datas.list = [];
}
that.data1 = datas.list;
}
})
},
addStoreWX : function (request){
let that = this;
http.addStoreWX(request,function (data) {
data = data.data;
if (data.code == "0000"){
if (data.results.indexOf("8888") != -1){
let str = data.results.split(",");
that.$Message.success('该企业微信已被 【' + str[1] + '】绑定 请从新绑定微信号' );
}else {
that.$Message.success('添加成功!');
that.listOfStore();
}
}
})
},
//
downRegionData: function () {
let that = this;
that.regionList = [{"id":0,"name":"全部"}];
let request =
{userId: that.userId};
http.downCompanyData(request, function (data) {
data = data.data.results;
if(data){
for(let i=0;i<data.length;i++){
let entity = data[i];
if(entity){
that.regionList.push(entity);
}
}
}
})
},
downRegionChange: function () {
this.downShopData();
},
downCompanyChange: function (formValidate) {
this.downShopData(formValidate.departIds);
},
downShopData: function (selected) {
let that = this;
that.shopList = [{"id":0,"name":"全部"}];
let selectValue = selected;
if (!selected){
selectValue = that.selectedRegion
}
let request =
{userId: that.userId,regionId: that.changeData(selectValue)};
staff.downShopData(request, function (data) {
data = data.data.results;
if(data){
for(let i=0;i<data.length;i++){
let entity = data[i];
if(entity){
that.shopList.push(entity);
}
}
}
})
},
changeData: function (value) {
if(value == 0){return null;}
return value;
},
show: function (index) {
this.isShow = true; this.isShow = true;
this.showStoreName = '店铺1'; this.showStoreName = index.name;
this.qrCodeImage = '../static/img/logo-title.png'; this.qrCodeImage = index.qrCodeAction;
this.rowData = index;
},
//
download: function (index) {
let name = index.code+"-"+index.name
let image = new Image();
// Canvas
image.setAttribute("crossOrigin", "anonymous");
image.onload = function() {
let canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
let context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
let url = canvas.toDataURL("image/png"); //base64
let a = document.createElement("a"); // a
let event = new MouseEvent("click"); //
a.download = name || "photo"; //
a.href = url; // URLa.href
a.dispatchEvent(event); // a
};
image.src = index.qrCodeAction;
},
//
handlePage:function (value) {
this.pageNum = value;
this.listOfStore();
}, },
ok: function () { ok: function () {
this.isShow = false; this.isShow = false;
}, },
cancel: function () { cancel: function () {
this.isShow = false; this.isShow = false;
},
download: function () {
}, },
open: function () { open: function () {
this.isShowAdd = true; this.isShowAdd = true;
@ -312,21 +446,13 @@
this.isShowImport = true; this.isShowImport = true;
this.isShowError = false this.isShowError = false
}, },
downloadStoreCode(){
http.downloadStoreCode({},null);
},
downloadStoreSellerCode(){
http.downloadStoreSellerCode({},null);
},
handleSubmit (name) { handleSubmit (name) {
this.$refs[name].validate((valid) => { if (name) {
if (valid) {
// //
this.$Message.success('Success!'); this.addStoreWX(name);
} else { } else {
this.$Message.error('Fail!'); this.$Message.error('Fail!');
} }
})
}, },
handleReset (name) { handleReset (name) {
this.$refs[name].resetFields(); this.$refs[name].resetFields();

@ -44,11 +44,16 @@ 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 removeStaff(params, call) {
return http.post('/store/staff/delete',params).then(call)
}
export default { export default {
getStaffList, getStaffList,
downRegionData, downRegionData,
downShopData, downShopData,
downRoleData, downRoleData,
addSattf, addSattf,
editSattf editSattf,
removeStaff
} }

@ -15,6 +15,20 @@ 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) {
return http.post('/store/emp/list', params).then(call);
}
export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call);
}
/**
* 下拉框数据品牌公司
*/
export function downCompanyData(params, call) {
return http.get('/retail/company',params).then(call)
}
/** /**
* 下载门店码 * 下载门店码
* @param params * @param params
@ -41,7 +55,11 @@ export function getBaseUrl() {
export default { export default {
uploadUser, uploadUser,
getBaseUrl,
storeList,
addStoreWX,
downCompanyData,
downloadStoreCode, downloadStoreCode,
downloadStoreSellerCode, downloadStoreSellerCode,
getBaseUrl
} }

Loading…
Cancel
Save