feature/task1.0.0__0514__ch
向文可 2 years ago
parent 3fe536e29c
commit 5a04bf00b5

@ -10,7 +10,7 @@ const state = () => ({
init: false,
status: [
{ label: '推荐', value: 1 },
{ label: '不推荐', value: 2 },
{ label: '不推荐', value: 0 },
],
},
});

@ -192,18 +192,10 @@
slots: {
default: ({ row }) => (
<div>
<ElButton
disabled={row.activityState !== 1}
type="text"
onClick={() => handleUpdateTime(row)}
>
<ElButton type="text" onClick={() => handleUpdateTime(row)}>
设置时段
</ElButton>
<ElButton
type="text"
disabled={row.activityState !== 1}
onClick={() => handleUpdateProduct(row)}
>
<ElButton type="text" onClick={() => handleUpdateProduct(row)}>
设置商品
</ElButton>
<ElButton type="text" disabled={row.activityState !== 1} onClick={() => handleCreate(row)}>
@ -211,7 +203,7 @@
</ElButton>
<ElButton
type="text"
disabled={row.activityState !== 1}
disabled={row.activityState === 2}
onClick={() => handleRemove([row])}
>
删除

@ -23,7 +23,8 @@
import ElButton from '@/components/extra/ElButton.vue';
import ElInput from '@/components/extra/ElInput.vue';
import ElSwitch from '@/components/extra/ElSwitch.vue';
import { ElTimePicker } from 'element-plus';
import { ElTimePicker } from 'element-plus/es/components/time-picker/index';
import 'element-plus/es/components/time-picker/style/css';
const route = useRoute();
const router = useRouter();
const store = useStore();
@ -153,14 +154,14 @@
default: ({ row }) => (
<div>
<ElButton
disabled={row.state !== 1 && !row.edit}
disabled={row.state === 2 && !row.edit}
type="text"
onClick={() => handleUpdate(row)}
>
{row.edit ? '保存' : '编辑'}
</ElButton>
<ElButton
disabled={row.state !== 1 && !row.edit}
disabled={row.state === 2 && !row.edit}
type="text"
onClick={() => handleRemove([row])}
>

@ -14,8 +14,8 @@
>
<template #search>
<el-form inline>
<el-form-item label="商品名称" prop="name">
<el-input v-model="state.condition.name" />
<el-form-item label="商品名称" prop="productName">
<el-input v-model="state.condition.productName" />
</el-form-item>
<el-form-item label="是否推荐" prop="isEnable">
<el-select v-model="state.condition.isEnable" :opts="opts.status" />
@ -45,7 +45,7 @@
/* 列表查询 */
const state = reactive({
condition: {
name: null,
productName: null,
isEnable: null,
},
});
@ -58,7 +58,7 @@
);
const handleReset = () => {
state.condition = {
name: null,
productName: null,
isEnable: null,
};
};

Loading…
Cancel
Save