|
|
|
@ -18,8 +18,7 @@
|
|
|
|
:columns="columns1"
|
|
|
|
:columns="columns1"
|
|
|
|
:data="data1"
|
|
|
|
:data="data1"
|
|
|
|
style="margin-top: 20px;"
|
|
|
|
style="margin-top: 20px;"
|
|
|
|
size="small"
|
|
|
|
size="small">
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="{ row }" slot="qrCodeAction">
|
|
|
|
<template slot-scope="{ row }" slot="qrCodeAction">
|
|
|
|
<img
|
|
|
|
<img
|
|
|
|
:src="require('../../../static/img/qrCode-init.png')"
|
|
|
|
:src="require('../../../static/img/qrCode-init.png')"
|
|
|
|
@ -27,16 +26,16 @@
|
|
|
|
style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"
|
|
|
|
style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template slot-scope="{ row, index }" slot="state">
|
|
|
|
<!-- <template slot-scope="{ row, index }" slot="accountFlag">-->
|
|
|
|
<i-switch
|
|
|
|
<!-- <i-switch-->
|
|
|
|
size="large"
|
|
|
|
<!-- size="large"-->
|
|
|
|
:value="row.qrCodeState"
|
|
|
|
<!-- :value="row.accountFlag"-->
|
|
|
|
@on-change="onSwitchChangeLister(row, index)"
|
|
|
|
<!-- @on-change="onSwitchChangeLister"-->
|
|
|
|
>
|
|
|
|
<!-- >-->
|
|
|
|
<span slot="open">开启</span>
|
|
|
|
<!-- <span slot="open">开启</span>-->
|
|
|
|
<span slot="close">关闭</span>
|
|
|
|
<!-- <span slot="close">关闭</span>-->
|
|
|
|
</i-switch>
|
|
|
|
<!-- </i-switch>-->
|
|
|
|
</template>
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
|
|
<template slot-scope="{ row }" slot="action">
|
|
|
|
<template slot-scope="{ row }" slot="action">
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
@ -44,17 +43,15 @@
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
style="border: 0px;color:#2074E2"
|
|
|
|
style="border: 0px;color:#2074E2"
|
|
|
|
@click="open(2, row)"
|
|
|
|
@click="open(2, row)">修改
|
|
|
|
>修改
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
ghost
|
|
|
|
ghost
|
|
|
|
type="error"
|
|
|
|
type="error"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
style="border: 0px"
|
|
|
|
style="border: 0px"
|
|
|
|
@click="remove(row)"
|
|
|
|
@click="remove(row)">删除
|
|
|
|
>删除</Button
|
|
|
|
</Button>
|
|
|
|
>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</Table>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,14 +60,13 @@
|
|
|
|
v-model="isShow"
|
|
|
|
v-model="isShow"
|
|
|
|
:footer-hide="true"
|
|
|
|
:footer-hide="true"
|
|
|
|
width="230"
|
|
|
|
width="230"
|
|
|
|
class-name="vertical-center-modal"
|
|
|
|
class-name="vertical-center-modal">
|
|
|
|
>
|
|
|
|
|
|
|
|
<div slot="header">
|
|
|
|
<div slot="header">
|
|
|
|
<p></p>
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p>{{ this.showStoreCode }}</p>
|
|
|
|
<p>{{ this.showStoreCode }}</p>
|
|
|
|
<p>{{ this.showStoreName }}</p>
|
|
|
|
<p>{{ this.showStoreName }}</p>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -130,18 +126,21 @@
|
|
|
|
</CheckboxGroup>
|
|
|
|
</CheckboxGroup>
|
|
|
|
</FormItem>
|
|
|
|
</FormItem>
|
|
|
|
<FormItem v-if="flag !== 1 && formValidate.role === 'DZ-DIANZHANG'" label="主店长" prop="type">
|
|
|
|
<FormItem v-if="flag !== 1 && formValidate.role === 'DZ-DIANZHANG'" label="主店长" prop="type">
|
|
|
|
<Checkbox :disabled="formValidate.type === 1 ? true : false" v-model="formValidate.type" :true-value="1" :false-value="2"></Checkbox>
|
|
|
|
<Checkbox :disabled="formValidate.type === 1 ? true : false" v-model="formValidate.type"
|
|
|
|
|
|
|
|
:true-value="1" :false-value="2"></Checkbox>
|
|
|
|
</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 type="primary" @click="handleSubmit(formValidate)"
|
|
|
|
>保存</Button
|
|
|
|
>保存
|
|
|
|
|
|
|
|
</Button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
@click="handleReset('formValidate')"
|
|
|
|
@click="handleReset('formValidate')"
|
|
|
|
style="margin-left: 8px"
|
|
|
|
style="margin-left: 8px"
|
|
|
|
>取消</Button
|
|
|
|
>取消
|
|
|
|
|
|
|
|
</Button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</i-col>
|
|
|
|
</i-col>
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
@ -167,7 +166,8 @@
|
|
|
|
type="error"
|
|
|
|
type="error"
|
|
|
|
style="width: 100px;margin-left: 20px"
|
|
|
|
style="width: 100px;margin-left: 20px"
|
|
|
|
@click="deleteStaff"
|
|
|
|
@click="deleteStaff"
|
|
|
|
>确认删除</Button
|
|
|
|
>确认删除
|
|
|
|
|
|
|
|
</Button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Modal>
|
|
|
|
</Modal>
|
|
|
|
@ -186,10 +186,10 @@
|
|
|
|
</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 accountManagementService from '../../services/account/AccountManagement';
|
|
|
|
import staff from "../../services/staff/staff";
|
|
|
|
import staff from "../../services/staff/staff";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "IncreaseStaffManager",
|
|
|
|
name: "IncreaseStaffManager",
|
|
|
|
@ -257,7 +257,30 @@ import staff from "../../services/staff/staff";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '停用/启用',
|
|
|
|
title: '停用/启用',
|
|
|
|
slot: 'status',
|
|
|
|
key: 'accountFlag',
|
|
|
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
|
|
return h('div', [
|
|
|
|
|
|
|
|
h('i-switch', {
|
|
|
|
|
|
|
|
props: {
|
|
|
|
|
|
|
|
value: params.row.accountFlag,
|
|
|
|
|
|
|
|
'true-value': true,//开启值
|
|
|
|
|
|
|
|
'false-value': false,//关闭值
|
|
|
|
|
|
|
|
size: 'large'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
on: { //操作事件
|
|
|
|
|
|
|
|
'on-change': function (value) {
|
|
|
|
|
|
|
|
//修改后请求方法
|
|
|
|
|
|
|
|
_this.modifyStatus(params.row.accountId, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
scopedSlots: {
|
|
|
|
|
|
|
|
open: () => h('span', '开启'),
|
|
|
|
|
|
|
|
close: () => h('span', '关闭')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '操作',
|
|
|
|
title: '操作',
|
|
|
|
@ -338,7 +361,12 @@ import staff from "../../services/staff/staff";
|
|
|
|
if (datas.records == null) {
|
|
|
|
if (datas.records == null) {
|
|
|
|
datas.records = [];
|
|
|
|
datas.records = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
that.data1 = datas.records;
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < datas.records.length; i++) {
|
|
|
|
|
|
|
|
let item = datas.records[i];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.data1.push(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function () {
|
|
|
|
}, function () {
|
|
|
|
that.loading = false;
|
|
|
|
that.loading = false;
|
|
|
|
@ -427,26 +455,27 @@ import staff from "../../services/staff/staff";
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
searchCustomerDataBtnClick: function() {
|
|
|
|
searchCustomerDataBtnClick: function () {
|
|
|
|
this.listOfLogistics();
|
|
|
|
this.listOfLogistics();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeData: function(value) {
|
|
|
|
changeData: function (value) {
|
|
|
|
if (value == 0) {
|
|
|
|
if (value == 0) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
return value;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//切页处理
|
|
|
|
//切页处理
|
|
|
|
handlePage: function(value) {
|
|
|
|
handlePage: function (value) {
|
|
|
|
this.pageNum = value;
|
|
|
|
this.pageNum = value;
|
|
|
|
this.listOfLogistics();
|
|
|
|
this.listOfLogistics();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
downRegionChange: function() {
|
|
|
|
downRegionChange: function () {
|
|
|
|
this.downShopData();
|
|
|
|
this.downShopData();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onChangeDateLister: function() {},
|
|
|
|
onChangeDateLister: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
// 预览二维码
|
|
|
|
// 预览二维码
|
|
|
|
show: function(index) {
|
|
|
|
show: function (index) {
|
|
|
|
this.isShow = true;
|
|
|
|
this.isShow = true;
|
|
|
|
this.showStoreName = "姓名:" + index.name;
|
|
|
|
this.showStoreName = "姓名:" + index.name;
|
|
|
|
this.showStoreCode = "工号:" + index.staffCode;
|
|
|
|
this.showStoreCode = "工号:" + index.staffCode;
|
|
|
|
@ -454,18 +483,19 @@ import staff from "../../services/staff/staff";
|
|
|
|
this.rowData = index;
|
|
|
|
this.rowData = index;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 下载二维码
|
|
|
|
// 下载二维码
|
|
|
|
download: function(index) {
|
|
|
|
download: function (index) {
|
|
|
|
let name = index.staffCode + "-" + index.name + "-导购码";
|
|
|
|
let name = index.staffCode + "-" + index.name + "-导购码";
|
|
|
|
http.downloadImg(
|
|
|
|
http.downloadImg(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
url: index.epWechatQrCode,
|
|
|
|
url: index.epWechatQrCode,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
name,
|
|
|
|
name,
|
|
|
|
function(/*data*/) {}
|
|
|
|
function (/*data*/) {
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 添加、修改推广人员
|
|
|
|
// 添加、修改推广人员
|
|
|
|
open: function(flag, row) {
|
|
|
|
open: function (flag, row) {
|
|
|
|
this.flag = flag;
|
|
|
|
this.flag = flag;
|
|
|
|
this.isShowAdd = true;
|
|
|
|
this.isShowAdd = true;
|
|
|
|
let role;
|
|
|
|
let role;
|
|
|
|
@ -493,21 +523,21 @@ import staff from "../../services/staff/staff";
|
|
|
|
this.handleAdd(this.formValidate);
|
|
|
|
this.handleAdd(this.formValidate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
back: function() {
|
|
|
|
back: function () {
|
|
|
|
this.$router.push({ path: "/shop/increase/manager" });
|
|
|
|
this.$router.push({path: "/shop/increase/manager"});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
remove: function(row) {
|
|
|
|
remove: function (row) {
|
|
|
|
this.modal13 = true;
|
|
|
|
this.modal13 = true;
|
|
|
|
this.deleteId = row.id;
|
|
|
|
this.deleteId = row.id;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
deleteStaff: function() {
|
|
|
|
deleteStaff: function () {
|
|
|
|
let requset = {
|
|
|
|
let requset = {
|
|
|
|
staffId: this.deleteId,
|
|
|
|
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("删除成功!");
|
|
|
|
@ -519,7 +549,28 @@ import staff from "../../services/staff/staff";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// switch开关
|
|
|
|
// switch开关
|
|
|
|
onSwitchChangeLister: function() {},
|
|
|
|
modifyStatus(accountId, val) {
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
let status;
|
|
|
|
|
|
|
|
if (val) {
|
|
|
|
|
|
|
|
status = 1;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
status = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let request = {
|
|
|
|
|
|
|
|
accountId: accountId,
|
|
|
|
|
|
|
|
status: status
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
accountManagementService.postAccountModifyStatus(request, function (res) {
|
|
|
|
|
|
|
|
let data = res.data;
|
|
|
|
|
|
|
|
if (data.code !== "0000") {
|
|
|
|
|
|
|
|
that.$Message.error("修改失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, function (res) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
handleSubmit(value) {
|
|
|
|
handleSubmit(value) {
|
|
|
|
if (value) {
|
|
|
|
if (value) {
|
|
|
|
let request = {};
|
|
|
|
let request = {};
|
|
|
|
@ -586,11 +637,11 @@ import staff from "../../services/staff/staff";
|
|
|
|
value.checkbox = ["vail"];
|
|
|
|
value.checkbox = ["vail"];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
<style scoped>
|
|
|
|
.table-staff {
|
|
|
|
.table-staff {
|
|
|
|
margin-top: 20px !important;
|
|
|
|
margin-top: 20px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|