导购换店开发。

feature_0521
kevin jiang 6 years ago
parent f8b35f9a91
commit 07f8a6a523

@ -18,8 +18,7 @@
:columns="columns1"
:data="data1"
style="margin-top: 20px;"
size="small"
>
size="small">
<template slot-scope="{ row }" slot="qrCodeAction">
<img
:src="require('../../../static/img/qrCode-init.png')"
@ -27,16 +26,16 @@
style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"
/>
</template>
<template slot-scope="{ row, index }" slot="state">
<i-switch
size="large"
:value="row.qrCodeState"
@on-change="onSwitchChangeLister(row, index)"
>
<span slot="open">开启</span>
<span slot="close">关闭</span>
</i-switch>
</template>
<!-- <template slot-scope="{ row, index }" slot="accountFlag">-->
<!-- <i-switch-->
<!-- size="large"-->
<!-- :value="row.accountFlag"-->
<!-- @on-change="onSwitchChangeLister"-->
<!-- >-->
<!-- <span slot="open">开启</span>-->
<!-- <span slot="close">关闭</span>-->
<!-- </i-switch>-->
<!-- </template>-->
<template slot-scope="{ row }" slot="action">
<Button
@ -44,17 +43,15 @@
type="primary"
size="small"
style="border: 0px;color:#2074E2"
@click="open(2, row)"
>修改
@click="open(2, row)">修改
</Button>
<Button
ghost
type="error"
size="small"
style="border: 0px"
@click="remove(row)"
>删除</Button
>
@click="remove(row)">删除
</Button>
</template>
</Table>
@ -63,8 +60,7 @@
v-model="isShow"
:footer-hide="true"
width="230"
class-name="vertical-center-modal"
>
class-name="vertical-center-modal">
<div slot="header">
<p></p>
</div>
@ -130,18 +126,21 @@
</CheckboxGroup>
</FormItem>
<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 style="text-align: left;">
<Row>
<i-col span="16">
<Button type="primary" @click="handleSubmit(formValidate)"
>保存</Button
>保存
</Button
>
<Button
@click="handleReset('formValidate')"
style="margin-left: 8px"
>取消</Button
>取消
</Button
>
</i-col>
</Row>
@ -167,7 +166,8 @@
type="error"
style="width: 100px;margin-left: 20px"
@click="deleteStaff"
>确认删除</Button
>确认删除
</Button
>
</div>
</Modal>
@ -188,7 +188,7 @@
<script>
import data from "../../utils/PhoneRegionData";
import http from "../../services/store/IncreaseStoreManager";
import accountManagementService from '../../services/account/AccountManagement';
import staff from "../../services/staff/staff";
export default {
@ -257,7 +257,30 @@ import staff from "../../services/staff/staff";
},
{
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: '操作',
@ -338,7 +361,12 @@ import staff from "../../services/staff/staff";
if (datas.records == null) {
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 () {
that.loading = false;
@ -444,7 +472,8 @@ import staff from "../../services/staff/staff";
downRegionChange: function () {
this.downShopData();
},
onChangeDateLister: function() {},
onChangeDateLister: function () {
},
//
show: function (index) {
this.isShow = true;
@ -461,7 +490,8 @@ import staff from "../../services/staff/staff";
url: index.epWechatQrCode,
},
name,
function(/*data*/) {}
function (/*data*/) {
}
);
},
// 广
@ -519,7 +549,28 @@ import staff from "../../services/staff/staff";
});
},
// 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) {
if (value) {
let request = {};

@ -44,11 +44,21 @@ export function listRoleInfoApi(params, call) {
return http.get('/role/info/list', params).then(call);
}
/**
* 修改账号状态
* @param params
* @param call
* @returns {Promise<any | never>}
*/
export function postAccountModifyStatus(params, call, p) {
return http.post('account/modify/status', params).then(call);
}
export default {
listAccountInfoApi,
removeAccountApi,
listAllShopApi,
listRoleInfoApi
listRoleInfoApi,
postAccountModifyStatus
}

Loading…
Cancel
Save