fix: 修改桌台统计跳转订单页面展示效果,增加员工修改密码弹窗,修改店铺添加激活码为非必填
This commit is contained in:
parent
d48199b991
commit
b76e67c207
|
|
@ -41,10 +41,10 @@ const searchConfig: ISearchConfig = {
|
|||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "台桌编码",
|
||||
prop: "tableCode",
|
||||
label: "台桌名称",
|
||||
prop: "tableName",
|
||||
attrs: {
|
||||
placeholder: "请输入台桌编码",
|
||||
placeholder: "请输入台桌名称",
|
||||
clearable: true,
|
||||
style: {
|
||||
width: "200px",
|
||||
|
|
|
|||
|
|
@ -154,9 +154,10 @@ function returnOriginAmount(order: OrderInfoVo) {
|
|||
const route = useRoute();
|
||||
onMounted(() => {
|
||||
const { orderNo, tableName, tableCode } = route.query;
|
||||
handleQueryClick({ orderNo, tableCode });
|
||||
handleQueryClick({ orderNo, tableCode, tableName });
|
||||
searchRef.value?.setQueryValue("orderNo", orderNo);
|
||||
searchRef.value?.setQueryValue("tableCode", tableCode);
|
||||
searchRef.value?.setQueryValue("tableName", tableName);
|
||||
route;
|
||||
});
|
||||
|
||||
// 新增
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
<el-radio-button value="release">正式</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="激活码" prop="activateCode">
|
||||
<el-form-item label="激活码">
|
||||
<el-input v-model="state.form.activateCode" placeholder="请输入激活码"></el-input>
|
||||
<div class="tips">注:输入有效激活码表示添加的同时直接激活该店铺。</div>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -97,9 +97,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="createdAt" label="到期时间">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.expireAt).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
<span v-if="scope.row.expireTime">
|
||||
{{ dayjs(scope.row.expireTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="150">
|
||||
<template v-slot="scope">
|
||||
<el-link @click="addShopShow(scope.row)">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<el-dialog title="修改密码" v-model="visible" width="400px" @close="reset">
|
||||
<el-form :model="form" ref="refForm" :rules="rules">
|
||||
<el-form-item label="新密码" prop="newPwd">
|
||||
<el-input v-model="form.newPwd" show-password></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="confirmPwd">
|
||||
<el-input v-model="form.confirmPwd" show-password></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
<el-button @click="reset">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sysUserApi from "@/api/account/sysUser";
|
||||
const visible = ref(false);
|
||||
const form = reactive({
|
||||
oldPwd: "",
|
||||
newPwd: "",
|
||||
confirmPwd: "",
|
||||
});
|
||||
const rules = {
|
||||
newPwd: [{ required: true, message: "请输入新密码", trigger: "blur" }],
|
||||
confirmPwd: [
|
||||
{ required: true, message: "请再次输入新密码", trigger: "blur" },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value !== form.newPwd) {
|
||||
callback(new Error("两次输入密码不一致"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
const emit = defineEmits(["update:visible"]);
|
||||
function reset() {
|
||||
visible.value = false;
|
||||
form.oldPwd = "";
|
||||
form.newPwd = "";
|
||||
form.confirmPwd = "";
|
||||
form.id = "";
|
||||
}
|
||||
const refForm = ref();
|
||||
function submit() {
|
||||
refForm.value.validate((valid) => {
|
||||
if (valid) {
|
||||
sysUserApi
|
||||
.pwd({
|
||||
id: form.id,
|
||||
checkPassword: form.confirmPwd,
|
||||
password: form.confirmPwd,
|
||||
})
|
||||
.then(() => {
|
||||
ElMessage.success("修改成功");
|
||||
close();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function open(data) {
|
||||
visible.value = true;
|
||||
form.id = data.id;
|
||||
}
|
||||
function close() {
|
||||
visible.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
close,
|
||||
});
|
||||
</script>
|
||||
|
|
@ -2,7 +2,7 @@ import ShopStaffApi, { type getListRequest } from "@/api/account/shopStaff";
|
|||
import type { PageShopStaff } from "@/api/account/shopStaff";
|
||||
import type { IContentConfig } from "@/components/CURD/types";
|
||||
|
||||
const contentConfig = {
|
||||
const contentConfig: IContentConfig = {
|
||||
pageName: "sys:user",
|
||||
table: {
|
||||
border: true,
|
||||
|
|
@ -56,7 +56,15 @@ const contentConfig = {
|
|||
align: "center",
|
||||
fixed: "right",
|
||||
templet: "tool",
|
||||
operat: ["edit", "delete"],
|
||||
operat: ["edit", "delete",
|
||||
{
|
||||
name: "change_pwd",
|
||||
auth: "password:reset",
|
||||
icon: "refresh-left",
|
||||
text: "修改密码",
|
||||
type: "primary",
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,10 +66,14 @@
|
|||
></selectPermission>
|
||||
</template>
|
||||
</page-modal>
|
||||
|
||||
<!-- 修改密码 -->
|
||||
<changePwd ref="changePwdRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import changePwd from "./components/change-pwd.vue";
|
||||
import type { IObject, IOperatData } from "@/components/CURD/types";
|
||||
import usePage from "@/components/CURD/usePage";
|
||||
import addModalConfig from "./config/add";
|
||||
|
|
@ -183,8 +187,18 @@ function handleToolbarClick(name: string) {
|
|||
ElMessage.success("点击了自定义1按钮");
|
||||
}
|
||||
}
|
||||
|
||||
const changePwdRef = ref();
|
||||
function changePwdRefShow(row: IObject) {
|
||||
changePwdRef.value?.open(row);
|
||||
}
|
||||
// 其他操作列
|
||||
async function handleOperatClick(data: IOperatData) {}
|
||||
async function handleOperatClick(data: IOperatData) {
|
||||
console.log(data);
|
||||
if (data.name === "change_pwd") {
|
||||
changePwdRefShow(data.row);
|
||||
}
|
||||
}
|
||||
|
||||
// 切换示例
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue