门店号推广修改bug

master
LegnaYet 6 years ago
parent 281a1deed3
commit e0f0109b80

@ -89,6 +89,17 @@
</Form>
</Modal>
<Modal
v-model="modal13"
title="删除提示"
@on-cancel="cancel" align="center">
<p style="margin-top: 20px;margin-bottom: 20px">确定要删除此账户吗删除后不可恢复</p>
<div slot="footer" style="text-align: center;margin-bottom: 10px;margin-top: 10px">
<Button style="width: 100px;" @click="modal13 = false">取消删除</Button>
<Button type="error" style="width: 100px;margin-left: 20px" @click="deleteStaff"></Button>
</div>
</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>
@ -96,12 +107,15 @@
<script>
import data from "../../utils/PhoneRegionData";
import http from '../../services/store/IncreaseStoreManager';
import staff from "../../services/staff/staff";
export default {
name: "IncreaseStaffManager",
data () {
return {
modal13: false,
deleteId: null,
userId: 13,
// 1 2
flag: 1,
@ -340,27 +354,14 @@
this.qrCodeImage = index.epWechatQrCode;
this.rowData = index;
},
//
download: function (index) {
let name = index.staffCode+"-"+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.epWechatQrCode;
let name = index.staffCode+"-"+index.name+"-导购码";
http.downloadImg({
url:index.epWechatQrCode
},name,function (data) {
})
},
// 广
open: function (flag,row) {
@ -383,14 +384,21 @@
},
//
remove: function (row) {
this.modal13 = true;
this.deleteId = row.id;
},
//
deleteStaff: function () {
let requset = {
staffId : row.id
staffId : this.deleteId
}
let that = this;
staff.removeStaff(requset,function (data) {
data = data.data;
if (data.results) {
that.$Message.success('删除成功!');
that.modal13 = false;
that.listOfLogistics();
}else {
that.$Message.success('删除失败!');
}

@ -38,7 +38,7 @@
<Table :columns="columns1" :data="data1" style="margin-top: 20px;">
<template slot-scope="{ row, index }" slot="qrCodeAction">
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" @mouseover="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
</template>
<router-link slot-scope="{ row, index }" slot="action" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}">
<Button ghost style="border:0px;color: #2074E2;"> 门店导购管理</Button>
@ -158,7 +158,7 @@
</Upload>
</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>
placement="top" @on-change="handlePage" style="margin: 20px 50px 0 0;right:0px;position: absolute;bottom: 50px"></Page>
</div>
</template>
@ -314,7 +314,7 @@
listOfStore() {
let that = this;
let request = {
userId: 1 ,
userId: that.userId,
companyId: that.changeData(that.selectedRegion),
storeId: that.changeData(that.selectedStore),
pageNum: that.pageNum,
@ -387,7 +387,7 @@
selectValue = that.selectedRegion
}
let request =
{userId: that.userId,regionId: that.changeData(selectValue)};
{userId: that.userId,companyId: that.changeData(selectValue)};
staff.downShopData(request, function (data) {
data = data.data.results;
if(data){
@ -410,26 +410,17 @@
this.qrCodeImage = index.qrCodeAction;
this.rowData = index;
},
hide: function () {
this.isShow = false;
},
//
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;
let fileName = index.name + "-门店码";
http.downloadImg({
url:index.qrCodeAction
},fileName,function (data) {
})
},
//
handlePage:function (value) {

@ -21,6 +21,9 @@ export function storeList(params, call) {
export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call);
}
export function downloadImg(params,name, call) {
return http.downloadImg('/user/img/download',name, params).then(call);
}
/**
* 下拉框数据品牌公司
@ -58,6 +61,7 @@ export default {
getBaseUrl,
storeList,
addStoreWX,
downloadImg,
downCompanyData,
downloadStoreCode,
downloadStoreSellerCode,

@ -28,7 +28,7 @@ module.exports = {
hotOnly: false,
disableHostCheck: true,
/* 使用代理 后台接口路径 */
proxy: 'http://localhost:8080/'
proxy: 'http://192.168.0.47:8312/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
},
}

Loading…
Cancel
Save