+
+
+
+
+
+
+
+
+ (form.price = String(val))"
+ >
+ 元
+
+
+
+
+
+ 天
+
+
+
+
+
+
+ (form.maturityYield = String(val))"
+ >
+ %
+
+
+
+
+ (form.reformPioneerAllowance = String(val))"
+ >
+ 元
+
+
+
+
+
+ {
+ form.subscribeStartAt = new Date(val[0]);
+ form.subscribeEndAt = new Date(val[1]);
+ }
+ "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
+
+
+
+
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index 3a66e1c..51be5ac 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -5,6 +5,7 @@ import dayjs from 'dayjs';
import { client, safeClient } from '@/service/api';
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
import Add from './components/add.vue';
+import Edit from './components/edit.vue';
const message = useMessage();
const dialog = useDialog();
@@ -102,7 +103,9 @@ const columns: TableBaseColumns = [
{
contentText: '编辑',
size: 'small',
- onClick() {}
+ onClick() {
+ handleEdit(row);
+ }
}
]
}
@@ -122,6 +125,22 @@ function handleAdd() {
style: { width: '800px' }
});
}
+
+function handleEdit(row: any) {
+ const d = dialog.create({
+ title: '编辑产品',
+ showIcon: false,
+ style: { width: '800px' },
+ content: () =>
+ h(Edit, {
+ data: row,
+ onClose: () => {
+ d.destroy();
+ tableInst.value?.reload();
+ }
+ })
+ });
+}