Compare commits

...

1 Commits

View File

@@ -247,18 +247,13 @@ function renderProjects() {
`<button class="btn btn-ghost btn-sm text-blue-600" onclick="event.stopPropagation(); state.projectView=${x.id}; renderProjects()"><i data-lucide="eye"></i>查看</button>`
]);
document.querySelector("#projects").innerHTML = `<div class="grid gap-4">
<div class="flex items-center justify-end">
<button class="btn btn-primary" onclick="document.querySelector('#project-form').classList.toggle('hidden')">
<i data-lucide="plus"></i>新增项目
</button>
</div>
<div id="project-form" class="hidden">
<div id="project-form">
${card(formHtml([
{ label: "项目名称", input: `<input name="project_name" required>` },
{ label: "当前阶段", input: `<select name="current_stage"><option>商务洽谈</option><option>线</option><option></option><option></option><option>线广</option><option></option></select>` },
{ label: "项目金额", input: `<input name="expected_contract_amount" type="number" step="0.01" placeholder="万元">` },
{ label: "负责人", input: `<input name="owner">` },
], { handler: "createOperation", text: "确认新增" }), "p-4")}
], { handler: "createOperation", text: "新增项目" }), "p-4")}
</div>
${renderTable(["项目", "项目说明", "当前阶段", "项目金额", "负责人", "进展"], rows, items.map((x) => ({ resource: "operations", id: x.id })))}
</div>`;