diff --git a/src/global_data.js b/src/global_data.js
index 1769b44..b14735f 100644
--- a/src/global_data.js
+++ b/src/global_data.js
@@ -8,3 +8,9 @@ export function getApiUrl() {
export function getDataBaseUrl() {
return '/kitchbase';
}
+
+export function GetkitchbaseUrl() {
+ return '/kitchbase';
+}
+
+
diff --git a/src/pages/authorization/storeAuthorization/index.jsx b/src/pages/authorization/storeAuthorization/index.jsx
index 595202d..8f35abb 100644
--- a/src/pages/authorization/storeAuthorization/index.jsx
+++ b/src/pages/authorization/storeAuthorization/index.jsx
@@ -4,9 +4,15 @@ import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
import { QuestionCircleOutlined } from '@ant-design/icons';
+import dayjs from 'dayjs';
+import weekday from "dayjs/plugin/weekday";
+import localeData from "dayjs/plugin/localeData";
+dayjs.extend(weekday);
+dayjs.extend(localeData);
+const dateFormat = 'YYYY/MM/DD';
const { Paragraph, Text } = Typography;
-import { PageStoreAuthorization, AddStoreAuthorization, UpdateStoreAuthorization, GetStoreList } from "./services"
+import { PageStoreAuthorization, AddStoreAuthorization, UpdateStoreAuthorization, UpdateStoreAuthTime, GetStoreList } from "./services"
const App = () => {
const actionRef = useRef();
@@ -57,6 +63,22 @@ const App = () => {
valueType: 'textarea',
search: false,
},
+ {
+ title: '有效日期',
+ dataIndex: 'periodValidity',
+ valueType: 'textarea',
+ search: false,
+ render: (_, record) => {
+ return {record.periodValidity == null ? "长期有效" : record.periodValidity}
+ }
+ },
+ {
+ title: '修改时间',
+ dataIndex: 'updateAt',
+ valueType: 'textarea',
+ width: 200,
+ search: false
+ },
{
title: '操作',
dataIndex: 'option',
@@ -109,7 +131,7 @@ const App = () => {
request={async (params) => {
var data = [];
var total = 0;
- await PageStoreAuthorization(params).then((r) => {
+ await PageStoreAuthorization(params).then((r) => {
total = r.data.total;
data = r.data.data;
});
@@ -122,35 +144,69 @@ const App = () => {
columns={columns}
/>
- {
- if (!currentRow) {
- message.error("请选择店铺");
- return;
- }
- AddStoreAuthorization(currentRow).then((r) => {
- if (r.statusCode == 200 && r.data) {
- message.success("添加成功");
- actionRef.current.reload();
- handleModalVisible(false);
- } else {
- message.error(r.errors || "添加失败");
- }
- });
+ form.submit();
}}
onCancel={() => {
handleModalVisible(false);
}}>
-
diff --git a/src/pages/authorization/storeAuthorization/services.js b/src/pages/authorization/storeAuthorization/services.js
index b3f9e55..1bf8b3a 100644
--- a/src/pages/authorization/storeAuthorization/services.js
+++ b/src/pages/authorization/storeAuthorization/services.js
@@ -26,6 +26,14 @@ export async function UpdateStoreAuthorization(data) {
});
}
+ /** 修改平台授权码时间 */
+ export async function UpdateStoreAuthTime(data) {
+ return request(GetkitchbaseUrl()+`/api/authorization/updatestoreauthtime`, {
+ method: 'POST',
+ data: data,
+ });
+ }
+
/** 获取店铺列表 */
export async function GetStoreList(data) {