From c9c584fd7c8c675d331f4005a428f6cf922d2139 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 8 Apr 2025 09:40:24 +0800
Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E5=A2=9E=E5=8A=A0=E9=80=80=E6=AC=BE=E6=96=B9=E5=BC=8F?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/order/index/components/detail.vue | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/views/order/index/components/detail.vue b/src/views/order/index/components/detail.vue
index 1d7ed7e..88e0f2a 100644
--- a/src/views/order/index/components/detail.vue
+++ b/src/views/order/index/components/detail.vue
@@ -100,17 +100,20 @@
+
支付方式:{{ returnPayType(detail.payType) }}
退款金额:¥{{ detail.refundAmount }}
-
退款详情>
-
+ -->
-
支付方式:{{ returnPayType(detail.payType) }}
+
退款方式:{{ detail.refundType }}
+
+
From d34a8c71e999c4d58dbaced206693b1ab2002ca8 Mon Sep 17 00:00:00 2001
From: wwz <1144797966@qq.com>
Date: Tue, 8 Apr 2025 11:18:36 +0800
Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E9=80=9A=E7=9F=A5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 4 +
src/api/notifications/index.ts | 51 ++++++++++++
src/views/notifications/config/add.ts | 77 ++++++++++++++++++
src/views/notifications/config/config.ts | 46 +++++++++++
src/views/notifications/config/content.ts | 87 ++++++++++++++++++++
src/views/notifications/config/edit.ts | 75 +++++++++++++++++
src/views/notifications/config/search.ts | 53 ++++++++++++
src/views/notifications/index.vue | 99 +++++++++++++++++++++++
8 files changed, 492 insertions(+)
create mode 100644 src/api/notifications/index.ts
create mode 100644 src/views/notifications/config/add.ts
create mode 100644 src/views/notifications/config/config.ts
create mode 100644 src/views/notifications/config/content.ts
create mode 100644 src/views/notifications/config/edit.ts
create mode 100644 src/views/notifications/config/search.ts
create mode 100644 src/views/notifications/index.vue
diff --git a/.vscode/settings.json b/.vscode/settings.json
index ca69dfc..a0228de 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -89,5 +89,9 @@
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
+ },
+ "files.associations": {
+ "*.ttml": "xml",
+ "*.ttss": "css"
}
}
diff --git a/src/api/notifications/index.ts b/src/api/notifications/index.ts
new file mode 100644
index 0000000..f8e9601
--- /dev/null
+++ b/src/api/notifications/index.ts
@@ -0,0 +1,51 @@
+import request from "@/utils/request";
+import { Account_BaseUrl } from "@/api/config";
+const baseURL = Account_BaseUrl + "/admin";
+// 供应商
+const Api = {
+ /** 通知消息列表*/
+ getList(params: any) {
+ return request({
+ url: `${baseURL}/syncNotice`,
+ method: "get",
+ params,
+ });
+ },
+ /** 全部*/
+ getAllList(params: any) {
+ return request({
+ url: `${baseURL}/list`,
+ method: "get",
+ params,
+ });
+ },
+ get(id: string | number) {
+ return request({
+ url: `${baseURL}/` + id,
+ method: "get",
+ });
+ },
+ add(data: any) {
+ return request({
+ url: `${baseURL}`,
+ method: "post",
+ data,
+ });
+ },
+ edit(data: any) {
+ return request({
+ url: `${baseURL}`,
+ method: "put",
+ data,
+ });
+ },
+
+ delete(id: string | number) {
+ return request({
+ url: `${baseURL}/` + id,
+ method: "delete",
+ });
+ },
+};
+
+export default Api;
diff --git a/src/views/notifications/config/add.ts b/src/views/notifications/config/add.ts
new file mode 100644
index 0000000..0f42129
--- /dev/null
+++ b/src/views/notifications/config/add.ts
@@ -0,0 +1,77 @@
+import Api from "@/api/product/vendor";
+import { returnOptions, switchAttr } from "./config";
+import type { IModalConfig } from "@/components/CURD/types";
+
+const modalConfig: IModalConfig = {
+ pageName: "sys:user",
+ dialog: {
+ title: "添加供应商",
+ width: 800,
+ draggable: true,
+ },
+ form: {
+ labelWidth: 140,
+ },
+ formAction: function (data) {
+ return Api.add({ ...data });
+ },
+ beforeSubmit(data) {
+ console.log("提交之前处理", data);
+ },
+ formItems: [
+
+ {
+ label: "名称",
+ prop: "name",
+ rules: [{ required: true, message: "请输入名称", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入名称",
+ },
+ },
+ {
+ label: "联系人名字",
+ prop: "contactName",
+ rules: [{ required: false, message: "请输入联系人名字", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入联系人名字",
+ },
+ },
+ {
+ label: "联系人电话",
+ prop: "telephone",
+ rules: [{ required: false, message: "请输入联系人名字", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入联系人名字",
+ },
+ },
+ {
+ label: "供应商地址",
+ prop: "address",
+ rules: [{ required: false, message: "请输入供应商地址", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入供应商地址",
+ },
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ rules: [{ required: false, message: "请输入备注", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入备注",
+ },
+ },
+ {
+ label: "排序",
+ prop: "sort",
+ rules: [{ required: true, message: "请输入排序", trigger: "blur" }],
+ type: "input-number",
+ attrs: {
+ placeholder: "请输入排序",
+ },
+ },
+
+ ],
+};
+
+// 如果有异步数据会修改配置的,推荐用reactive包裹,而纯静态配置的可以直接导出
+export default reactive(modalConfig);
diff --git a/src/views/notifications/config/config.ts b/src/views/notifications/config/config.ts
new file mode 100644
index 0000000..2183658
--- /dev/null
+++ b/src/views/notifications/config/config.ts
@@ -0,0 +1,46 @@
+export interface options {
+ label: string;
+ value: string | number;
+ [property: string]: any;
+}
+export interface optionObject {
+ [property: string]: options[];
+}
+const options: optionObject = {
+ payType: [
+ { label: "现金", value: "cash" },
+ { label: "微信", value: "weixin" },
+ { label: "银行卡", value: "bank" },
+ { label: "会员支付", value: "member-account" },
+ { label: "支付宝", value: "alipay" },
+ { label: "刷卡", value: "deposit" },
+ { label: "挂账", value: "arrears" },
+ { label: "刷卡", value: "deposit" },
+ { label: "储值", value: "member-account" },
+ { label: "自定义", value: "virtual" },
+ ],
+ isIdeal: [
+ { label: "否", value: 0 },
+ { label: "是", value: 1 },
+ ],
+};
+
+export const switchAttr = {
+ "active-value": 1,
+ "inactive-value": 0,
+};
+
+export type optionsType = string;
+
+export function returnOptions(type: optionsType) {
+ return options[type];
+}
+
+export function returnOptionsLabel(optionsType: optionsType, value: string | number) {
+ const options = returnOptions(optionsType);
+ if (!options) {
+ return "";
+ }
+ const option = options.find((item) => item.value === value);
+ return option ? option.label : "";
+}
diff --git a/src/views/notifications/config/content.ts b/src/views/notifications/config/content.ts
new file mode 100644
index 0000000..036acfc
--- /dev/null
+++ b/src/views/notifications/config/content.ts
@@ -0,0 +1,87 @@
+import Api from "@/api/notifications";
+import type { IContentConfig } from "@/components/CURD/types";
+
+const contentConfig: IContentConfig = {
+ pageName: "sys:user",
+ table: {
+ border: true,
+ highlightCurrentRow: true,
+ },
+ pagination: {
+ background: true,
+ layout: "prev,pager,next,jumper,total,sizes",
+ pageSize: 20,
+ pageSizes: [10, 20, 30, 50],
+ },
+ indexAction: function (params) {
+ return Api.getList(params);
+ },
+ deleteAction: function (id) {
+ return Api.delete(id);
+ },
+ modifyAction: function (data) {
+ return Api.edit(data);
+ },
+ indexActionData: {},
+ pk: "id",
+ toolbar: [
+ // {
+ // text: "入库记录",
+ // name: "manual-in",
+ // auth: "",
+ // },
+ // {
+ // text: "出库记录",
+ // name: "manual-out",
+ // auth: "",
+ // },
+ // {
+ // text: "报损记录",
+ // name: "damage-out",
+ // auth: "",
+ // },
+ ],
+ defaultToolbar: ["refresh", "filter", "search"],
+ cols: [
+ // { type: "selection", width: 50, align: "center" },
+ {
+ label: "通知类型",
+ align: "center",
+ prop: "type",
+ },
+ {
+ label: "是否已读",
+ align: "center",
+ prop: "isRead",
+ slotName: "isRead",
+ templet: "custom",
+ },
+ {
+ label: "消息内容",
+ align: "center",
+ prop: "content",
+ slotName: "content",
+ templet: "list",
+ },
+ {
+ label: "商品/耗材",
+ align: "center",
+ prop: "extraJson",
+ },
+ {
+ label: "创建时间",
+ align: "center",
+ prop: "createTime",
+ },
+ // {
+ // label: "操作",
+ // align: "center",
+ // fixed: "right",
+ // width: 280,
+ // templet: "tool",
+ // operat: ["edit", "delete"],
+ // },
+ ],
+};
+
+export default contentConfig;
diff --git a/src/views/notifications/config/edit.ts b/src/views/notifications/config/edit.ts
new file mode 100644
index 0000000..4878c63
--- /dev/null
+++ b/src/views/notifications/config/edit.ts
@@ -0,0 +1,75 @@
+import Api from "@/api/product/vendor";
+import { returnOptions, switchAttr } from "./config";
+import type { IModalConfig } from "@/components/CURD/types";
+
+const modalConfig: IModalConfig = {
+ pageName: "sys:user",
+ dialog: {
+ title: "编辑供应商",
+ width: 800,
+ draggable: true,
+ },
+ form: {
+ labelWidth: 140,
+ },
+ formAction: function (data) {
+ return Api.edit({ ...data });
+ },
+ beforeSubmit(data) {
+ console.log("提交之前处理", data);
+ },
+ formItems: [
+ {
+ label: "名称",
+ prop: "name",
+ rules: [{ required: true, message: "请输入名称", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入名称",
+ },
+ },
+ {
+ label: "联系人名字",
+ prop: "contactName",
+ rules: [{ required: false, message: "请输入联系人名字", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入联系人名字",
+ },
+ },
+ {
+ label: "联系人电话",
+ prop: "telephone",
+ rules: [{ required: false, message: "请输入联系人名字", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入联系人名字",
+ },
+ },
+ {
+ label: "供应商地址",
+ prop: "address",
+ rules: [{ required: false, message: "请输入供应商地址", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入供应商地址",
+ },
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ rules: [{ required: false, message: "请输入备注", trigger: "blur" }],
+ attrs: {
+ placeholder: "请输入备注",
+ },
+ },
+ {
+ label: "排序",
+ prop: "sort",
+ rules: [{ required: true, message: "请输入排序", trigger: "blur" }],
+ type: "input-number",
+ attrs: {
+ placeholder: "请输入排序",
+ },
+ },
+ ],
+};
+
+// 如果有异步数据会修改配置的,推荐用reactive包裹,而纯静态配置的可以直接导出
+export default reactive(modalConfig);
diff --git a/src/views/notifications/config/search.ts b/src/views/notifications/config/search.ts
new file mode 100644
index 0000000..951dd38
--- /dev/null
+++ b/src/views/notifications/config/search.ts
@@ -0,0 +1,53 @@
+import type { ISearchConfig } from "@/components/CURD/types";
+const searchConfig: ISearchConfig = {
+ pageName: "sys:user",
+ isExpandable: false,
+ formItems: [
+ {
+ type: "select",
+ label: "通知类型 ",
+ prop: "type",
+ attrs: {
+ placeholder: "请选择",
+ clearable: true,
+ style: {
+ width: "200px",
+ },
+ },
+ options: [
+ {
+ label: "商品",
+ value: "0",
+ },
+ {
+ label: "耗材",
+ value: "1",
+ },
+ ],
+ },
+ {
+ type: "select",
+ label: "是否已读",
+ prop: "isRead",
+ attrs: {
+ placeholder: "请选择",
+ clearable: true,
+ style: {
+ width: "200px",
+ },
+ },
+ options: [
+ {
+ label: "未读",
+ value: "0",
+ },
+ {
+ label: "已读",
+ value: "1",
+ },
+ ],
+ },
+ ],
+};
+
+export default searchConfig;
diff --git a/src/views/notifications/index.vue b/src/views/notifications/index.vue
new file mode 100644
index 0000000..dab42d2
--- /dev/null
+++ b/src/views/notifications/index.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+ {{ scope.row.isRead == 1 ? "已读" : "未读" }}
+
+
+
+
+ {{ scope.row.isRead == 1 ? "已读" : "未读" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
From 5809e0ec0b1e5b96b524c3bd6dbfbe524e907990 Mon Sep 17 00:00:00 2001
From: wwz <1144797966@qq.com>
Date: Tue, 8 Apr 2025 11:19:36 +0800
Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E8=A7=A3=E5=86=B3=E5=86=B2?=
=?UTF-8?q?=E7=AA=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/notifications/index.vue | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/views/notifications/index.vue b/src/views/notifications/index.vue
index dab42d2..aac8aad 100644
--- a/src/views/notifications/index.vue
+++ b/src/views/notifications/index.vue
@@ -24,11 +24,6 @@
{{ scope.row.isRead == 1 ? "已读" : "未读" }}
-
-
- {{ scope.row.isRead == 1 ? "已读" : "未读" }}
-
-