门店号管理修改bug

master
LegnaYet 6 years ago
parent ae630196ad
commit 6fe5ebe9bc

@ -67,7 +67,7 @@
<FormItem label="工号" prop="staffCode"> <FormItem label="工号" prop="staffCode">
<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">
<Select v-model="formValidate.role" placeholder="选择角色" :disabled="flag !== 1 ? true : false"> <Select v-model="formValidate.role" placeholder="选择角色" :disabled="flag !== 1 ? true : false">
<Option :value="1" >店长</Option> <Option :value="1" >店长</Option>
<Option :value="4" >导购</Option> <Option :value="4" >导购</Option>
@ -112,6 +112,7 @@
import staff from "../../services/staff/staff"; import staff from "../../services/staff/staff";
export default { export default {
name: "IncreaseStaffManager", name: "IncreaseStaffManager",
inject:['setMenuName'],
data () { data () {
return { return {
modal13: false, modal13: false,
@ -221,6 +222,7 @@
} }
}, },
mounted() { mounted() {
this.setMenuName("门店推广","推广管理","门店导购管理");
this.listOfLogistics(); this.listOfLogistics();
this.downRegionData(); this.downRegionData();
this.downShopData(); this.downShopData();
@ -413,6 +415,18 @@
if (value) { if (value) {
let request = {}; let request = {};
if (this.flag == 1){ if (this.flag == 1){
if (value.name == null || value.name == ""){
this.$Message.success('名称不能为空!');
return;
}
if (value.staffCode == null || value.staffCode == ""){
this.$Message.success('工号不能为空!');
return;
}
if (value.role == null || value.role == ""){
this.$Message.success('角色不能为空!');
return;
}
// //
request = { request = {
name : value.name, name : value.name,

@ -7,9 +7,18 @@
<i-input placeholder="请输入店铺名称或编码" style="margin-left: 10px;padding-right: 10px;" v-model="searchShop"/> <i-input placeholder="请输入店铺名称或编码" style="margin-left: 10px;padding-right: 10px;" v-model="searchShop"/>
</i-col> </i-col>
<i-col span="1" style="text-align: right;"> <i-col span="1" style="text-align: right;">
<span class="region">大区</span>
</i-col>
<i-col span="3" style="padding-left: 10px;">
<Select v-model="selectedBigRegion" filterable style="width: 200px;" @on-change="downBigRegionChange" >
<Option v-for="item in bigRegionList" :value="item.id" :key="item.id">{{ item.name }}
</Option>
</Select>
</i-col>
<i-col span="2" 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="3" style="padding-left: 10px;">
<Select v-model="selectedRegion" filterable style="width: 200px;" @on-change="downRegionChange" > <Select v-model="selectedRegion" filterable style="width: 200px;" @on-change="downRegionChange" >
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }} <Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}
</Option> </Option>
@ -18,19 +27,19 @@
<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="3" 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 shopList" :value="item.id" :key="item.id">{{ item.name }} <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="1" style="padding-left: 20px;">
<Button type="primary" @click="searchCustomerDataBtnClick"></Button> <Button type="primary" @click="searchCustomerDataBtnClick"></Button>
</i-col> </i-col>
<i-col span="9" style="text-align: right;padding-right: 20px;"> <i-col span="7" 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="open()" style="margin-right: 10px;">开通门店号</Button> <!--<Button type="primary" @click="open()" style="margin-right: 10px;">开通门店号</Button>-->
</i-col> </i-col>
</Row> </Row>
</i-col> </i-col>
@ -100,12 +109,12 @@
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option> <Option v-for="item in shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select> </Select>
</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="身份" prop="position"> <!--<FormItem label="身份" prop="position">
<i-input v-model="formValidate.position" placeholder="请输入身份"></i-input> <i-input v-model="formValidate.position" placeholder="请输入身份"></i-input>
@ -169,6 +178,7 @@
export default { export default {
name: "IncreaseStoreManager", name: "IncreaseStoreManager",
inject:['setMenuName'],
data() { data() {
return { return {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
@ -185,10 +195,12 @@
updateUrl: http.getBaseUrl() + "/store/emp/import", updateUrl: http.getBaseUrl() + "/store/emp/import",
downLoadStoreCodeUrl: http.getBaseUrl() + "/store/emp/download/store/code", downLoadStoreCodeUrl: http.getBaseUrl() + "/store/emp/download/store/code",
qrCodeImage: '', qrCodeImage: '',
selectedRegion: null, selectedRegion: 0,
selectedBigRegion: 0,
regionList: [], regionList: [],
bigRegionList: [],
errorList: [], errorList: [],
selectedStore: null, selectedStore: 0,
shopList: [], shopList: [],
rowData:{}, rowData:{},
company:null, company:null,
@ -230,34 +242,34 @@
} }
], ],
data1: [ data1: [
/* { /* {
id: 1, id: 1,
storeName: '店铺1', storeName: '店铺1',
storeWx: 'D1', storeWx: 'D1',
staffNum: 10, staffNum: 10,
customerNum: 999 customerNum: 999
}, },
{ {
id: 2, id: 2,
storeName: '店铺2', storeName: '店铺2',
storeWx: 'D2', storeWx: 'D2',
staffNum: 10, staffNum: 10,
customerNum: 999 customerNum: 999
}, },
{ {
id: 3, id: 3,
storeName: '店铺3', storeName: '店铺3',
storeWx: 'D3', storeWx: 'D3',
staffNum: 10, staffNum: 10,
customerNum: 999 customerNum: 999
}, },
{ {
id: 4, id: 4,
storeName: '店铺4', storeName: '店铺4',
storeWx: 'D4', storeWx: 'D4',
staffNum: 10, staffNum: 10,
customerNum: 999 customerNum: 999
}*/ }*/
], ],
// //
formValidate: { formValidate: {
@ -300,7 +312,9 @@
} }
}, },
mounted() { mounted() {
this.setMenuName("门店推广","推广管理");
this.listOfStore(); this.listOfStore();
this.downBigRegionData();
this.downRegionData(); this.downRegionData();
this.downShopData(); this.downShopData();
}, },
@ -358,12 +372,12 @@
// //
downRegionData: function () { downRegionData: function () {
let that = this; let that = this;
that.regionList = [{"id":0,"name":"全部"}];
let request = let request =
{userId: that.userId}; {userId: that.userId, bigRegionId: that.selectedBigRegion};
http.downCompanyData(request, function (data) { http.downCompanyData(request, function (data) {
data = data.data.results; data = data.data.results;
if(data){ if(data){
that.regionList = [{"id":0,"name":"全部"}];
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
let entity = data[i]; let entity = data[i];
if(entity){ if(entity){
@ -373,24 +387,46 @@
} }
}) })
}, },
//
downBigRegionData: function () {
let that = this;
let request =
{userId: that.userId};
http.downBigRegionData(request, function (data) {
data = data.data.results;
if(data){
that.bigRegionList = [{"id":0,"name":"全部"}];
for(let i=0;i<data.length;i++){
let entity = data[i];
if(entity){
that.bigRegionList.push(entity);
}
}
}
})
},
downRegionChange: function () { downRegionChange: function () {
this.downShopData(); this.downShopData();
}, },
downBigRegionChange: function () {
this.downRegionData();
// this.downShopData();
},
downCompanyChange: function (formValidate) { downCompanyChange: function (formValidate) {
this.downShopData(formValidate.departIds); this.downShopData(formValidate.departIds);
}, },
downShopData: function (selected) { downShopData: function (selected) {
let that = this; let that = this;
that.shopList = [{"id":0,"name":"全部"}];
let selectValue = selected; let selectValue = selected;
if (!selected){ if (!selected){
selectValue = that.selectedRegion selectValue = that.selectedRegion
} }
let request = let request =
{userId: that.userId,companyId: that.changeData(selectValue)}; {userId: that.userId,companyId: that.changeData(selectValue),bigRegionId: that.changeData(that.selectedBigRegion)};
staff.downShopData(request, function (data) { staff.downShopData(request, function (data) {
data = data.data.results; data = data.data.results;
if(data){ if(data){
that.shopList = [{"id":0,"name":"全部"}];
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
let entity = data[i]; let entity = data[i];
if(entity){ if(entity){
@ -446,12 +482,12 @@
this.isShowError = false this.isShowError = false
}, },
handleSubmit (name) { handleSubmit (name) {
if (name) { if (name) {
// //
this.addStoreWX(name); 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();
@ -461,20 +497,26 @@
window.location.href = '/门店号批量开通模板.xlsx' window.location.href = '/门店号批量开通模板.xlsx'
}, },
handleAdd(value){ handleAdd(value){
value.alias = '', value.alias = '',
value.userId = '', value.userId = '',
value.gender = '', value.gender = '',
value. mobile = '', value. mobile = '',
value.email = '', value.email = '',
value. address = '', value. address = '',
value. departIds = '', value. departIds = '',
value. selectedPhoneRegion ='86', value. selectedPhoneRegion ='86',
value.duty= '', value.duty= '',
value.position='', value.position='',
value.interest= [], value.interest= [],
value.desc= '', value.desc= '',
value.checkbox= ['vail'], value.checkbox= ['vail'],
value.storeId='' value.storeId=''
},
downloadStoreCode(){
http.downloadStoreCode({},null);
},
downloadStoreSellerCode(){
http.downloadStoreSellerCode({},null);
}, },
updateSuccess (response) { updateSuccess (response) {
if (response.code === "0000") { if (response.code === "0000") {

@ -31,6 +31,12 @@ 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)
} }
/**
* 下拉框数据品牌公司
*/
export function downBigRegionData(params, call) {
return http.get('/retail/big/region',params).then(call)
}
/** /**
* 下载门店码 * 下载门店码
@ -39,7 +45,7 @@ export function downCompanyData(params, call) {
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function downloadStoreCode(params, call) { export function downloadStoreCode(params, call) {
return http.downloadZip('/store/emp/download/store/code','门店码', params).then(call); return http.downloadZip('/store/emp/download/store/code/bsd','门店码', params).then(call);
} }
/** /**
* 下载门店导购码 * 下载门店导购码
@ -48,7 +54,7 @@ export function downloadStoreCode(params, call) {
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function downloadStoreSellerCode(params, call) { export function downloadStoreSellerCode(params, call) {
return http.downloadZip('/store/emp/download/store/seller/code','门店导购码', params).then(call); return http.downloadZip('/store/emp/download/store/seller/code/bsd','门店导购码', params).then(call);
} }
@ -63,6 +69,7 @@ export default {
addStoreWX, addStoreWX,
downloadImg, downloadImg,
downCompanyData, downCompanyData,
downBigRegionData,
downloadStoreCode, downloadStoreCode,
downloadStoreSellerCode, downloadStoreSellerCode,

Loading…
Cancel
Save