店铺员工、退款流程优化
This commit is contained in:
parent
a8b5cbe62d
commit
a185d20af1
|
@ -15,3 +15,16 @@ export function appUpdateUserSetting(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据精准手机号获取用户信息
|
||||||
|
export function appGetByEqPhone(eqPhonenumber) {
|
||||||
|
return request({
|
||||||
|
url: "/app/user/getByEqPhone",
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
eqPhonenumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
44
src/api/mch/storeStaff.js
Normal file
44
src/api/mch/storeStaff.js
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询店铺员工列表
|
||||||
|
export function mchListStoreStaff(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mch/storeStaff/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询店铺员工详细
|
||||||
|
export function mchGetStoreStaff(employId) {
|
||||||
|
return request({
|
||||||
|
url: '/mch/storeStaff/' + employId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增店铺员工
|
||||||
|
export function mchAddStoreStaff(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mch/storeStaff',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改店铺员工
|
||||||
|
export function mchUpdateStoreStaff(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mch/storeStaff',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除店铺员工
|
||||||
|
export function mchDelStoreStaff(employId) {
|
||||||
|
return request({
|
||||||
|
url: '/mch/storeStaff/' + employId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
75
src/components/Business/SmUser/UserSearchInput.vue
Normal file
75
src/components/Business/SmUser/UserSearchInput.vue
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
<template>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="val"
|
||||||
|
remote
|
||||||
|
:remote-method="getOptions"
|
||||||
|
filterable
|
||||||
|
reserve-keyword
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:loading="loading"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of options"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { appGetByEqPhone } from '@/api/app/user'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "UserSearchInput",
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: "请输入用户手机号搜索"
|
||||||
|
},
|
||||||
|
initOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => ([])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options: [],
|
||||||
|
loading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
val: {
|
||||||
|
set(val) {
|
||||||
|
this.$emit('input', val);
|
||||||
|
},
|
||||||
|
get() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log(this.initOptions);
|
||||||
|
this.options = this.initOptions;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOptions(keyword) {
|
||||||
|
this.loading = true;
|
||||||
|
appGetByEqPhone(keyword).then(res => {
|
||||||
|
if (res.code === 200 && res.data != null) {
|
||||||
|
this.options = [{value: res.data.userId, label: res.data.realOrUserName}];
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -25,6 +25,17 @@ export const mchRoutes = [
|
||||||
icon: 'store'
|
icon: 'store'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'storeStaff',
|
||||||
|
component: () => import('../views/mch/storeStaff'),
|
||||||
|
hidden: false,
|
||||||
|
name: "MyStoreStaff",
|
||||||
|
meta: {
|
||||||
|
noCache: false,
|
||||||
|
title: '店铺员工',
|
||||||
|
icon: 'agent'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'store/:storeId',
|
path: 'store/:storeId',
|
||||||
component: () => import('../views/mch/store/detail.vue'),
|
component: () => import('../views/mch/store/detail.vue'),
|
||||||
|
|
|
@ -8,6 +8,8 @@ export const views = {
|
||||||
withdraw: 'withdraw', // 提现
|
withdraw: 'withdraw', // 提现
|
||||||
recharge: 'recharge', // 充值订单
|
recharge: 'recharge', // 充值订单
|
||||||
agent: 'agent', // 代理商
|
agent: 'agent', // 代理商
|
||||||
|
|
||||||
|
mchStore: 'mchStore', // 商户中心的店铺
|
||||||
}
|
}
|
||||||
|
|
||||||
// 代理商视图
|
// 代理商视图
|
||||||
|
|
|
@ -160,7 +160,7 @@ export const $recharge = {
|
||||||
},
|
},
|
||||||
canRefund() {
|
canRefund() {
|
||||||
return (row) => {
|
return (row) => {
|
||||||
return row.status === '2';
|
return row.status === '2' && row.isFinished;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canClose() {
|
canClose() {
|
||||||
|
|
|
@ -168,11 +168,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
listDevice,
|
|
||||||
getDevice,
|
|
||||||
addDevice,
|
|
||||||
updateDevice,
|
|
||||||
logicDelDevice,
|
|
||||||
updateDeviceSn,
|
updateDeviceSn,
|
||||||
batchUpdateModel, updateDeviceServiceRate
|
batchUpdateModel, updateDeviceServiceRate
|
||||||
} from '@/api/system/device'
|
} from '@/api/system/device'
|
||||||
|
@ -197,6 +192,12 @@ export default {
|
||||||
mixins: [$serviceType],
|
mixins: [$serviceType],
|
||||||
components: { DeviceTable, DeviceLink, StoreLink, UserLink, ModelDialog, UserInput, StoreInput, SnInput, QrCode, SmUserSelect, ModelSelect},
|
components: { DeviceTable, DeviceLink, StoreLink, UserLink, ModelDialog, UserInput, StoreInput, SnInput, QrCode, SmUserSelect, ModelSelect},
|
||||||
dicts: ['sm_device_online_status', 'sm_device_status', 'sm_device_outage_way','sm_device_notice_way', 'service_type', 'time_unit'],
|
dicts: ['sm_device_online_status', 'sm_device_status', 'sm_device_outage_way','sm_device_notice_way', 'service_type', 'time_unit'],
|
||||||
|
props: {
|
||||||
|
query: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 是否展示选择型号弹窗
|
// 是否展示选择型号弹窗
|
||||||
|
@ -268,6 +269,11 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.queryParams = {
|
||||||
|
...this.queryParams,
|
||||||
|
...this.query
|
||||||
|
}
|
||||||
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<el-tabs>
|
<el-tabs>
|
||||||
<el-tab-pane label="设备列表" :lazy="true">
|
<el-tab-pane label="设备列表" :lazy="true">
|
||||||
<my-device :store-id="store.storeId"/>
|
<my-device v-if="store.storeId != null" :query="{storeId: store.storeId}"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="订单列表" :lazy="true">
|
<el-tab-pane label="订单列表" :lazy="true">
|
||||||
<mch-recharge :query="{storeId: store.storeId}" :view="views.store"/>
|
<mch-recharge :query="{storeId: store.storeId}" :view="views.store"/>
|
||||||
|
|
146
src/views/mch/storeStaff/index.vue
Normal file
146
src/views/mch/storeStaff/index.vue
Normal file
|
@ -0,0 +1,146 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<store-staff-table
|
||||||
|
ref="table"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
:query="query"
|
||||||
|
:list-api="mchListStoreStaff"
|
||||||
|
>
|
||||||
|
<template #table-operator>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<template v-slot:row-operator="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</store-staff-table>
|
||||||
|
|
||||||
|
<!-- 添加或修改店铺员工对话框 -->
|
||||||
|
<store-staff-edit-dialog
|
||||||
|
:show.sync="open"
|
||||||
|
:view="view"
|
||||||
|
:employ-id="row.employId"
|
||||||
|
@success="getList"
|
||||||
|
:init-form="{storeId: query.storeId}"
|
||||||
|
user-input-type="search"
|
||||||
|
:update-api="mchUpdateStoreStaff"
|
||||||
|
:add-api="mchAddStoreStaff"
|
||||||
|
:load-api="mchGetStoreStaff"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { $showColumns, $view } from '@/utils/mixins'
|
||||||
|
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
|
import StoreInput from '@/components/Business/Store/StoreInput.vue'
|
||||||
|
import UserInput from '@/components/Business/SmUser/UserInput.vue'
|
||||||
|
import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
||||||
|
import StoreLink from '@/components/Business/Store/StoreLink.vue'
|
||||||
|
import StoreStaffTable from '@/views/ss/storeStaff/components/StoreStaffTable.vue'
|
||||||
|
import StoreStaffEditDialog from '@/views/ss/storeStaff/components/StoreStaffEditDialog.vue'
|
||||||
|
import {
|
||||||
|
mchAddStoreStaff,
|
||||||
|
mchDelStoreStaff,
|
||||||
|
mchGetStoreStaff,
|
||||||
|
mchListStoreStaff,
|
||||||
|
mchUpdateStoreStaff
|
||||||
|
} from '@/api/mch/storeStaff'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "StoreStaff",
|
||||||
|
components: { StoreStaffEditDialog, StoreStaffTable, StoreLink, UserLink, UserInput, StoreInput, BooleanTag },
|
||||||
|
mixins: [$showColumns, $view],
|
||||||
|
dicts: ['store_staff_permissions', 'store_staff_role'],
|
||||||
|
props: {
|
||||||
|
query: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
row: {},
|
||||||
|
open: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
mchGetStoreStaff,
|
||||||
|
mchAddStoreStaff,
|
||||||
|
mchUpdateStoreStaff,
|
||||||
|
mchListStoreStaff,
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.employId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.row = {};
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.row = row;
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const employIds = row.employId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除店铺员工编号为"' + employIds + '"的数据项?').then(function() {
|
||||||
|
return mchDelStoreStaff(employIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.$refs.table.getList();
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('ss/storeStaff/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `storeStaff_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,12 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body @open="onOpen">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" v-loading="loading">
|
||||||
<el-form-item label="店铺" prop="storeId">
|
<el-form-item label="店铺" prop="storeId">
|
||||||
<store-input v-model="form.storeId" :disabled="hasView(views.store)"/>
|
<store-input v-model="form.storeId" :disabled="hasView([views.store, views.mchStore])"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户" prop="userId">
|
<el-form-item label="用户" prop="userId" v-if="userInputType === 'dialog'">
|
||||||
<user-input v-model="form.userId"/>
|
<user-input v-model="form.userId"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="用户" prop="userId" v-else-if="userInputType === 'search'">
|
||||||
|
<user-search-input v-if="open && !loading" v-model="form.userId" :init-options="initUserSearchOptions"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注名" prop="remark">
|
<el-form-item label="备注名" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注名" maxlength="200" show-word-limit/>
|
<el-input v-model="form.remark" placeholder="请输入备注名" maxlength="200" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -51,21 +54,60 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { StoreStaffRole } from '@/utils/constants'
|
import { StoreStaffRole, UserType } from '@/utils/constants'
|
||||||
import { addStoreStaff, updateStoreStaff } from '@/api/ss/storeStaff'
|
import { addStoreStaff, getStoreStaff, updateStoreStaff } from '@/api/ss/storeStaff'
|
||||||
import StoreInput from '@/components/Business/Store/StoreInput.vue'
|
import StoreInput from '@/components/Business/Store/StoreInput.vue'
|
||||||
import UserInput from '@/components/Business/SmUser/UserInput.vue'
|
import UserInput from '@/components/Business/SmUser/UserInput.vue'
|
||||||
import { $view } from '@/utils/mixins'
|
import { $view } from '@/utils/mixins'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import UserSearchInput from '@/components/Business/SmUser/UserSearchInput.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StoreStaffEditDialog",
|
name: "StoreStaffEditDialog",
|
||||||
mixins: [$view],
|
mixins: [$view],
|
||||||
dicts: ['store_staff_permissions', 'store_staff_role'],
|
dicts: ['store_staff_permissions', 'store_staff_role'],
|
||||||
components: { UserInput, StoreInput },
|
components: { UserSearchInput, UserInput, StoreInput },
|
||||||
|
props: {
|
||||||
|
// ID
|
||||||
|
employId: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
initForm: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
// 用户的输入方式:dialog 弹窗选择,search 搜索选择
|
||||||
|
userInputType: {
|
||||||
|
type: String,
|
||||||
|
default: "dialog"
|
||||||
|
},
|
||||||
|
// 更新API
|
||||||
|
updateApi: {
|
||||||
|
type: Function,
|
||||||
|
default: updateStoreStaff
|
||||||
|
},
|
||||||
|
// 新增API
|
||||||
|
addApi: {
|
||||||
|
type: Function,
|
||||||
|
default: addStoreStaff
|
||||||
|
},
|
||||||
|
// 加载API
|
||||||
|
loadApi: {
|
||||||
|
type: Function,
|
||||||
|
default: getStoreStaff
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
title: null,
|
||||||
|
loading: false,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
storeId: [
|
storeId: [
|
||||||
|
@ -83,7 +125,39 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
initUserSearchOptions() {
|
||||||
|
return [{value: this.form.userId, label: this.form.userName}]
|
||||||
|
},
|
||||||
|
UserType() {
|
||||||
|
return UserType
|
||||||
|
},
|
||||||
|
...mapGetters(['userType']),
|
||||||
|
open: {
|
||||||
|
get() {
|
||||||
|
return this.show;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit('update:show', val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onOpen() {
|
||||||
|
if (this.employId != null) {
|
||||||
|
this.loading = true;
|
||||||
|
this.loadApi(this.employId).then(res => {
|
||||||
|
this.form = res.data;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -93,16 +167,14 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
employId: null,
|
employId: null,
|
||||||
storeId: this.query.storeId,
|
storeId: null,
|
||||||
userId: null,
|
userId: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
role: StoreStaffRole.STAFF,
|
role: StoreStaffRole.STAFF,
|
||||||
point: 0,
|
point: 0,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
permissions: [],
|
permissions: [],
|
||||||
createTime: null,
|
...this.initForm
|
||||||
createBy: null,
|
|
||||||
createId: null
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -111,16 +183,16 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.employId != null) {
|
if (this.form.employId != null) {
|
||||||
updateStoreStaff(this.form).then(response => {
|
this.updateApi(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.$emit('success')
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addStoreStaff(this.form).then(response => {
|
this.addApi(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.$emit('success')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,13 @@
|
||||||
</store-staff-table>
|
</store-staff-table>
|
||||||
|
|
||||||
<!-- 添加或修改店铺员工对话框 -->
|
<!-- 添加或修改店铺员工对话框 -->
|
||||||
<store-staff-edit-dialog :view="view" :employ-id="row.employId"/>
|
<store-staff-edit-dialog
|
||||||
|
:show.sync="open"
|
||||||
|
:view="view"
|
||||||
|
:employ-id="row.employId"
|
||||||
|
@success="getList"
|
||||||
|
:init-form="{storeId: query.storeId}"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -92,7 +98,7 @@ export default {
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
row: {},
|
row: {},
|
||||||
open: false
|
open: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -109,13 +115,8 @@ export default {
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.row = row;
|
||||||
const employId = row.employId || this.ids
|
this.open = true;
|
||||||
getStoreStaff(employId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改店铺员工";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
@ -127,6 +128,9 @@ export default {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
getList() {
|
||||||
|
this.$refs.table.getList();
|
||||||
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('ss/storeStaff/export', {
|
this.download('ss/storeStaff/export', {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user