diff --git a/src/components/CURD/PageContent.vue b/src/components/CURD/PageContent.vue index 1af79c3..f82f32d 100644 --- a/src/components/CURD/PageContent.vue +++ b/src/components/CURD/PageContent.vue @@ -882,7 +882,6 @@ function handleOperat(data: IOperatData) { // 属性修改 function handleModify(field: string, value: boolean | string | number, row: Record) { - console.log(1111111111111111111111111); if (props.contentConfig.modifyAction) { props.contentConfig.modifyAction({ [pk]: row[pk], diff --git a/src/views/system-setting/pay-types/config/content.ts b/src/views/system-setting/pay-types/config/content.ts index 071e765..915240c 100644 --- a/src/views/system-setting/pay-types/config/content.ts +++ b/src/views/system-setting/pay-types/config/content.ts @@ -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: "条件排序", diff --git a/src/views/tool/Instead/components/order.vue b/src/views/tool/Instead/components/order.vue index 4915a98..8304607 100644 --- a/src/views/tool/Instead/components/order.vue +++ b/src/views/tool/Instead/components/order.vue @@ -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"); }