门店号推广修改bug

master
LegnaYet 6 years ago
parent 281a1deed3
commit e0f0109b80

@ -89,6 +89,17 @@
</Form> </Form>
</Modal> </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 <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;"></Page>
</div> </div>
@ -96,12 +107,15 @@
<script> <script>
import data from "../../utils/PhoneRegionData"; import data from "../../utils/PhoneRegionData";
import http from '../../services/store/IncreaseStoreManager';
import staff from "../../services/staff/staff"; import staff from "../../services/staff/staff";
export default { export default {
name: "IncreaseStaffManager", name: "IncreaseStaffManager",
data () { data () {
return { return {
modal13: false,
deleteId: null,
userId: 13, userId: 13,
// 1 2 // 1 2
flag: 1, flag: 1,
@ -340,27 +354,14 @@
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+"-导购码";
let image = new Image(); http.downloadImg({
// Canvas url:index.epWechatQrCode
image.setAttribute("crossOrigin", "anonymous"); },name,function (data) {
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;
}, },
// 广 // 广
open: function (flag,row) { open: function (flag,row) {
@ -383,14 +384,21 @@
}, },
// //
remove: function (row) { remove: function (row) {
this.modal13 = true;
this.deleteId = row.id;
},
//
deleteStaff: function () {
let requset = { let requset = {
staffId : row.id staffId : this.deleteId
} }
let that = this; let that = this;
staff.removeStaff(requset,function (data) { staff.removeStaff(requset,function (data) {
data = data.data; data = data.data;
if (data.results) { if (data.results) {
that.$Message.success('删除成功!'); that.$Message.success('删除成功!');
that.modal13 = false;
that.listOfLogistics();
}else { }else {
that.$Message.success('删除失败!'); that.$Message.success('删除失败!');
} }

@ -38,7 +38,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">
<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> </template>
<router-link slot-scope="{ row, index }" slot="action" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}"> <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> <Button ghost style="border:0px;color: #2074E2;"> 门店导购管理</Button>
@ -158,7 +158,7 @@
</Upload> </Upload>
</Modal> </Modal>
<Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total <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> </div>
</template> </template>
@ -314,7 +314,7 @@
listOfStore() { listOfStore() {
let that = this; let that = this;
let request = { let request = {
userId: 1 , userId: that.userId,
companyId: that.changeData(that.selectedRegion), companyId: that.changeData(that.selectedRegion),
storeId: that.changeData(that.selectedStore), storeId: that.changeData(that.selectedStore),
pageNum: that.pageNum, pageNum: that.pageNum,
@ -387,7 +387,7 @@
selectValue = that.selectedRegion selectValue = that.selectedRegion
} }
let request = let request =
{userId: that.userId,regionId: that.changeData(selectValue)}; {userId: that.userId,companyId: that.changeData(selectValue)};
staff.downShopData(request, function (data) { staff.downShopData(request, function (data) {
data = data.data.results; data = data.data.results;
if(data){ if(data){
@ -410,26 +410,17 @@
this.qrCodeImage = index.qrCodeAction; this.qrCodeImage = index.qrCodeAction;
this.rowData = index; this.rowData = index;
}, },
hide: function () {
this.isShow = false;
},
// //
download: function (index) { download: function (index) {
let name = index.code+"-"+index.name let fileName = index.name + "-门店码";
let image = new Image(); http.downloadImg({
// Canvas url:index.qrCodeAction
image.setAttribute("crossOrigin", "anonymous"); },fileName,function (data) {
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) { handlePage:function (value) {

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

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

Loading…
Cancel
Save