fix: 清理禅道BUG

msb_test
ch 3 years ago
parent e032aa48cc
commit fe2a88bb97

@ -38,10 +38,11 @@ export const logistics = (id) => {
method: 'get', method: 'get',
}); });
}; };
export const summary = () => { export const summary = (params) => {
return request({ return request({
url: '/mall/trade/admin/tradeOrder/statistics', url: '/mall/trade/admin/tradeOrder/statistics',
method: 'get', method: 'get',
params,
}); });
}; };
export const updateFees = (data) => { export const updateFees = (data) => {

@ -52,7 +52,7 @@ const actions = {
if (!res) { if (!res) {
ElMessage.error('查询订单列表失败'); ElMessage.error('查询订单列表失败');
} }
res = await api.summary(); res = await api.summary({ userId: data.userId });
if (res) { if (res) {
commit( commit(
'setSummary', 'setSummary',

@ -95,6 +95,7 @@
:config="employeeConfig" :config="employeeConfig"
:data="employeeList" :data="employeeList"
:operation="['search']" :operation="['search']"
:reset="handleResetEmployee"
@search="handleSearchEmployee" @search="handleSearchEmployee"
> >
<template #search> <template #search>
@ -234,9 +235,15 @@
proxy.$message.error('请先选择部门'); proxy.$message.error('请先选择部门');
} }
}; };
const handleResetEmployee = () => {
state.condition2.employeeName = '';
state.condition2.userName = '';
state.condition2.phone = '';
};
watch( watch(
() => state.condition2, () => state.condition2,
(value) => { (value) => {
console.log(value, 'xxxxxx');
let search = value?.departmentId && value?.departmentId !== store.state.deptEmployee.condition.departmentId; let search = value?.departmentId && value?.departmentId !== store.state.deptEmployee.condition.departmentId;
store.commit('deptEmployee/setCondition', _.cloneDeep(value)); store.commit('deptEmployee/setCondition', _.cloneDeep(value));
if (search) { if (search) {
@ -285,7 +292,9 @@
label: '状态', label: '状态',
width: 160, width: 160,
slots: { slots: {
default: ({ row }) => <ElSwitch v-model={row.isEnable} />, default: ({ row }) => (
<ElSwitch v-model={row.isEnable} onClick={() => handleEmployeeEnabled(row)} />
),
}, },
}, },
{ {
@ -416,6 +425,13 @@
const handleEnabled = (row) => { const handleEnabled = (row) => {
store.dispatch('dept/enable', row); store.dispatch('dept/enable', row);
}; };
const handleEmployeeEnabled = (row) => {
const data = {
id: row.id,
isEnable: row.isEnable,
};
store.dispatch('employee/save', data);
};
const handleDelete = (row) => { const handleDelete = (row) => {
store.dispatch('dept/remove', [row.id]); store.dispatch('dept/remove', [row.id]);
}; };
@ -454,6 +470,7 @@
} }
.aside-body { .aside-body {
:deep(.el-tree) { :deep(.el-tree) {
font-size: 14px;
.flex { .flex {
width: 100%; width: 100%;
display: flex; display: flex;

@ -86,11 +86,11 @@
</template> </template>
</el-dialog> </el-dialog>
</el-form-item> </el-form-item>
<el-form-item>
<el-button @click="handleCancel"></el-button>
<el-button :disabled="loading" :loading="submitting" type="primary" @click="handleSave"></el-button>
</el-form-item>
</el-form> </el-form>
<div class="form-footer">
<el-button @click="handleCancel"></el-button>
<el-button :disabled="loading" :loading="submitting" type="primary" @click="handleSave"></el-button>
</div>
</div> </div>
</template> </template>
@ -152,6 +152,9 @@
try { try {
await proxy.$validate(refsForm); await proxy.$validate(refsForm);
let data = { ...unref(form) }; let data = { ...unref(form) };
if (!data.password) {
delete data.password;
}
data.voucherClueUrls = data.voucherClueUrls || []; data.voucherClueUrls = data.voucherClueUrls || [];
data.voucherClueUrl = data.voucherClueUrls.join(','); data.voucherClueUrl = data.voucherClueUrls.join(',');
let res = await store.dispatch('employee/save', data); let res = await store.dispatch('employee/save', data);
@ -185,7 +188,8 @@
} }
}; };
const handleClose = () => { const handleClose = () => {
router.push({ name: 'EmployeeManagement' }); store.commit('layout/closeTab', { current: true });
router.replace({ name: 'EmployeeManagement' });
}; };
const loading2 = ref(false); const loading2 = ref(false);
const roleVisible = ref(false); const roleVisible = ref(false);
@ -216,6 +220,8 @@
<style lang="less" scoped> <style lang="less" scoped>
.form-container { .form-container {
flex-direction: row-reverse !important;
align-items: flex-start !important;
.el-form { .el-form {
width: 480px; width: 480px;
} }

@ -16,6 +16,7 @@
emitPath: false, emitPath: false,
children: 'childDepartment', children: 'childDepartment',
}" }"
style="width: 500px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="选择角色权限" prop="handType"> <el-form-item label="选择角色权限" prop="handType">

@ -118,7 +118,8 @@
} }
}; };
const handleClose = () => { const handleClose = () => {
router.push({ name: 'CategoryManagement' }); store.commit('layout/closeTab', { current: true });
router.replace({ name: 'CategoryManagement' });
}; };
</script> </script>

@ -158,6 +158,9 @@
if (route.query.status) { if (route.query.status) {
state.condition.orderStatus = route.query.status.split(',').map((item) => +item); state.condition.orderStatus = route.query.status.split(',').map((item) => +item);
} else { } else {
if (route.query.id) {
state.condition.orderStatus = [0];
}
handleSearch(); handleSearch();
} }
}); });

@ -294,7 +294,7 @@
} }
await store.dispatch('productSkus/save', { id: route.params.id, data }); await store.dispatch('productSkus/save', { id: route.params.id, data });
store.commit('layout/closeTab', { current: true }); store.commit('layout/closeTab', { current: true });
router.push({ name: 'ProductManagement' }); router.replace({ name: 'ProductManagement' });
} }
state.loading = false; state.loading = false;
}; };

Loading…
Cancel
Save