fix: 修改支付方式是否生效文字改为是否显示,优化支付方式快捷修改和弹窗提醒

This commit is contained in:
2025-03-14 11:07:00 +08:00
parent c371df05ce
commit b54985f150
3 changed files with 8 additions and 9 deletions

View File

@@ -882,7 +882,6 @@ function handleOperat(data: IOperatData) {
// 属性修改
function handleModify(field: string, value: boolean | string | number, row: Record<string, any>) {
console.log(1111111111111111111111111);
if (props.contentConfig.modifyAction) {
props.contentConfig.modifyAction({
[pk]: row[pk],

View File

@@ -16,8 +16,10 @@ const contentConfig: IContentConfig = {
indexAction: function (params) {
return Api.getList();
},
modifyAction: function (data) {
return Api.edit(data);
modifyAction: async function (data) {
const res = await Api.edit(data);
ElMessage.success(res ? '修改成功' : '修改失败');
return res
},
pk: "id",
toolbar: ["add"],
@@ -45,15 +47,13 @@ const contentConfig: IContentConfig = {
label: "开钱箱权限",
align: "center",
prop: "isOpenCashDrawer",
templet: 'custom',
slotName: 'switch'
templet: 'switch',
},
{
label: "是否生效",
label: "是否显示",
align: "center",
prop: "isDisplay",
templet: 'custom',
slotName: 'switch'
templet: 'switch',
},
{
label: "条件排序",

View File

@@ -497,7 +497,7 @@ function refScanPayOpen(payType) {
async function getPaytype() {
const res = await payTypeApi.getList();
payTypes.list = res;
payTypes.list = res.filter((v) => v.isDisplay);
if (currentpayMoney.value * 1 <= 0) {
payTypes.sel = payTypes.list.findIndex((v) => v.payType == "cash");
}