Merge remote-tracking branch 'origin/dev' into dev

dev_1.0.1
huwei 2026-07-07 18:08:10 +08:00
commit 5cf43f7028
9 changed files with 143 additions and 56 deletions

View File

@ -16,6 +16,7 @@ const APPLY_TYPE_APPLICATION = 1;
export function toFilingListRow(data = {}) { export function toFilingListRow(data = {}) {
return { return {
id: asId(data.id), id: asId(data.id),
filingId: data.filingId,
filingTerritoryCode: data.filingTerritoryCode, filingTerritoryCode: data.filingTerritoryCode,
filingTerritoryName: data.filingTerritoryName, filingTerritoryName: data.filingTerritoryName,
filingUnitName: data.filingUnitName, filingUnitName: data.filingUnitName,
@ -251,9 +252,9 @@ export async function fetchQualChangeDetail(id) {
return fromSingleResponse(res, toFilingDetail); return fromSingleResponse(res, toFilingDetail);
} }
export async function fetchQualFilingChangeHistory(originFilingId) { export async function fetchQualFilingChangeHistory(filingId) {
const res = await apiGet("/safetyEval/qual-filing-change/history", { const res = await apiGet("/safetyEval/qual-filing-change/history", {
originFilingId: asId(originFilingId), filingId: asId(filingId),
}); });
return fromSingleResponse(res, toChangeHistory); return fromSingleResponse(res, toChangeHistory);
} }

View File

@ -67,7 +67,7 @@ function FilingChangeListPage(props) {
} }
}; };
console.log(historyRecord);
return ( return (
<> <>
<FilingListTable <FilingListTable
@ -99,7 +99,7 @@ function FilingChangeListPage(props) {
/> />
<ChangeHistoryModal <ChangeHistoryModal
open={!!historyRecord} open={!!historyRecord}
originFilingId={historyRecord?.id} filingId={historyRecord?.filingId}
onCancel={() => setHistoryRecord(null)} onCancel={() => setHistoryRecord(null)}
/> />
</> </>

View File

@ -2,20 +2,21 @@ import { Modal, Table } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { fetchQualFilingChangeHistory } from "~/api/qualFiling"; import { fetchQualFilingChangeHistory } from "~/api/qualFiling";
export default function ChangeHistoryModal({ open, originFilingId, onCancel }) { export default function ChangeHistoryModal({ open, filingId, onCancel }) {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [records, setRecords] = useState([]); const [records, setRecords] = useState([]);
const [changeCount, setChangeCount] = useState(0); const [changeCount, setChangeCount] = useState(0);
useEffect(() => { useEffect(() => {
if (!open || !originFilingId) { if (!open || !filingId) {
setRecords([]); setRecords([]);
setChangeCount(0); setChangeCount(0);
return; return;
} }
let cancelled = false; let cancelled = false;
setLoading(true); setLoading(true);
fetchQualFilingChangeHistory(originFilingId) fetchQualFilingChangeHistory(filingId)
.then((res) => { .then((res) => {
if (cancelled) { if (cancelled) {
return; return;
@ -32,7 +33,7 @@ export default function ChangeHistoryModal({ open, originFilingId, onCancel }) {
return () => { return () => {
cancelled = true; cancelled = true;
}; };
}, [open, originFilingId]); }, [open, filingId]);
return ( return (
<Modal <Modal

View File

@ -69,7 +69,7 @@ const QualChange = (props) => {
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}&mode=change`)}> <Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}&mode=change`)}>
查看 查看
</Button> </Button>
{record.filingStatusCode == 2 && ( {(record.filingStatusCode == 2 || record.filingStatusCode == 4) && (
<Button type="link" size="small" onClick={() => props.history.push(`QualReviewForm?id=${record.id}&mode=change`)}> <Button type="link" size="small" onClick={() => props.history.push(`QualReviewForm?id=${record.id}&mode=change`)}>
审核 审核
</Button> </Button>

View File

@ -34,7 +34,7 @@ const ReviewModal = (props) => {
const expertOptions = useMemo( const expertOptions = useMemo(
() => () =>
(qualExpertList || []).map((item) => ({ (qualExpertList || []).map((item) => ({
label: `${item.userName}${item.certificate ? `${item.certificate}` : ""}`, label: item.userName,
value: item.id, value: item.id,
expert: item, expert: item,
})), })),

View File

@ -85,14 +85,13 @@ function OrgAccountPage(props) {
message.success("操作成功"); message.success("操作成功");
await getData(); await getData();
} }
else {
message.error(res?.message || "操作失败");
}
}, },
}); });
}; };
const onResetPassword = (record) => { const onResetPassword = (record) => {
console.log(record);
Modal.confirm({ Modal.confirm({
title: "重置密码", title: "重置密码",
content: ( content: (
@ -108,13 +107,11 @@ function OrgAccountPage(props) {
okText: "确认重置", okText: "确认重置",
cancelText: "取消", cancelText: "取消",
onOk: async () => { onOk: async () => {
const res = await props.orgAccountResetPassword({ id: record.id }); const res = await props.orgAccountResetPassword({ data: record.id });
if (res?.success !== false) { if (res?.success !== false) {
message.success("密码已重置"); message.success("密码已重置");
} }
else {
message.error(res?.message || "重置失败");
}
}, },
}); });
}; };
@ -136,14 +133,12 @@ function OrgAccountPage(props) {
okButtonProps: { danger: true }, okButtonProps: { danger: true },
cancelText: "取消", cancelText: "取消",
onOk: async () => { onOk: async () => {
const res = await props.orgAccountDelete({ id: record.id }); const res = await props.orgAccountDelete({ data: record.id });
if (res?.success !== false) { if (res?.success !== false) {
message.success("删除成功"); message.success("删除成功");
await getData(); await getData();
} }
else {
message.error(res?.message || "删除失败");
}
}, },
}); });
}; };
@ -165,9 +160,7 @@ function OrgAccountPage(props) {
editForm.resetFields(); editForm.resetFields();
await getData(); await getData();
} }
else {
message.error(res?.message || "保存失败");
}
}; };
const columns = [ const columns = [

View File

@ -1,5 +1,14 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Button, Descriptions, Form, Input, message, Modal, Select, Table } from "antd"; import {
Button,
Descriptions,
Form,
Input,
message,
Modal,
Select,
Table,
} from "antd";
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction"; import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
@ -9,6 +18,7 @@ import { tools } from "@cqsjjb/jjb-common-lib";
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { NS_QUAL_EXPERT } from "~/enumerate/namespace"; import { NS_QUAL_EXPERT } from "~/enumerate/namespace";
import { GENDER_OPTIONS, GENDER_MAP } from "~/enumerate/constant"; import { GENDER_OPTIONS, GENDER_MAP } from "~/enumerate/constant";
import AttachmentUpload from "~/components/AttachmentUpload";
const { router } = tools; const { router } = tools;
@ -20,8 +30,21 @@ const ExperManage = (props) => {
const [editingId, setEditingId] = useState(null); const [editingId, setEditingId] = useState(null);
const [submiting, setSubmiting] = useState(false); const [submiting, setSubmiting] = useState(false);
const { qualExpert, queryExpertPage, getExpertDetail, saveExpert, modifyExpert, deleteExpert } = props; const {
const { qualExpertList, qualExpertTotal, qualExpertLoading, qualExpertDetail, qualExpertDetailLoading } = qualExpert || {}; qualExpert,
queryExpertPage,
getExpertDetail,
saveExpert,
modifyExpert,
deleteExpert,
} = props;
const {
qualExpertList,
qualExpertTotal,
qualExpertLoading,
qualExpertDetail,
qualExpertDetailLoading,
} = qualExpert || {};
const getData = () => { const getData = () => {
queryExpertPage({ queryExpertPage({
@ -66,7 +89,11 @@ const ExperManage = (props) => {
setEditVisible(true); setEditVisible(true);
const res = await getExpertDetail({ id }); const res = await getExpertDetail({ id });
if (res?.success !== false) { if (res?.success !== false) {
editForm.setFieldsValue(res.data || qualExpertDetail); const params = res.data;
if (params.certificate) {
params.certificate = JSON.parse(params.certificate);
}
editForm.setFieldsValue(params);
} }
}; };
@ -75,6 +102,9 @@ const ExperManage = (props) => {
setSubmiting(true); setSubmiting(true);
const action = editingId ? modifyExpert : saveExpert; const action = editingId ? modifyExpert : saveExpert;
const params = editingId ? { ...values, id: editingId } : values; const params = editingId ? { ...values, id: editingId } : values;
if (values.certificate) {
params.certificate = JSON.stringify(values.certificate);
}
const res = await action(params); const res = await action(params);
setSubmiting(false); setSubmiting(false);
if (res?.success !== false) { if (res?.success !== false) {
@ -94,7 +124,7 @@ const ExperManage = (props) => {
okButtonProps: { danger: true }, okButtonProps: { danger: true },
cancelText: "取消", cancelText: "取消",
onOk: async () => { onOk: async () => {
const res = await deleteExpert({ id: record.id }); const res = await deleteExpert({ data: record.id });
if (res?.success !== false) { if (res?.success !== false) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -121,16 +151,31 @@ const ExperManage = (props) => {
render: (code) => GENDER_MAP[code] || "--", render: (code) => GENDER_MAP[code] || "--",
}, },
{ title: "身份证号", dataIndex: "idCardNo", width: 180 }, { title: "身份证号", dataIndex: "idCardNo", width: 180 },
{ title: "证书", dataIndex: "certificate", width: 120, ellipsis: true },
{ {
title: "操作", title: "操作",
width: 180, width: 180,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<TableAction> <TableAction>
<Button type="link" size="small" onClick={() => openDetail(record.id)}>查看</Button> <Button
<Button type="link" size="small" onClick={() => openEdit(record.id)}>编辑</Button> type="link"
<Button type="link" size="small" danger onClick={() => handleDelete(record)}>删除</Button> size="small"
onClick={() => openDetail(record.id)}
>
查看
</Button>
<Button type="link" size="small" onClick={() => openEdit(record.id)}>
编辑
</Button>
<Button
type="link"
size="small"
danger
onClick={() => handleDelete(record)}
>
删除
</Button>
</TableAction> </TableAction>
), ),
}, },
@ -140,7 +185,9 @@ const ExperManage = (props) => {
<PageLayout <PageLayout
title="专家管理" title="专家管理"
extra={ extra={
<Button type="primary" onClick={openAdd}>新增专家</Button> <Button type="primary" onClick={openAdd}>
新增专家
</Button>
} }
> >
<SearchForm <SearchForm
@ -149,10 +196,18 @@ const ExperManage = (props) => {
loading={qualExpertLoading} loading={qualExpertLoading}
formLine={[ formLine={[
<Form.Item key="userName" name="userName"> <Form.Item key="userName" name="userName">
<ControlWrapper.Input label="姓名" placeholder="请输入" allowClear /> <ControlWrapper.Input
label="姓名"
placeholder="请输入"
allowClear
/>
</Form.Item>, </Form.Item>,
<Form.Item key="account" name="account"> <Form.Item key="account" name="account">
<ControlWrapper.Input label="账号" placeholder="请输入" allowClear /> <ControlWrapper.Input
label="账号"
placeholder="请输入"
allowClear
/>
</Form.Item>, </Form.Item>,
<Form.Item key="genderCode" name="genderCode"> <Form.Item key="genderCode" name="genderCode">
<ControlWrapper.Select <ControlWrapper.Select
@ -162,12 +217,18 @@ const ExperManage = (props) => {
style={{ width: "100%" }} style={{ width: "100%" }}
> >
{GENDER_OPTIONS.map((item) => ( {GENDER_OPTIONS.map((item) => (
<Select.Option key={item.value} value={item.value}>{item.label}</Select.Option> <Select.Option key={item.value} value={item.value}>
{item.label}
</Select.Option>
))} ))}
</ControlWrapper.Select> </ControlWrapper.Select>
</Form.Item>, </Form.Item>,
<Form.Item key="idCardNo" name="idCardNo"> <Form.Item key="idCardNo" name="idCardNo">
<ControlWrapper.Input label="身份证号" placeholder="请输入" allowClear /> <ControlWrapper.Input
label="身份证号"
placeholder="请输入"
allowClear
/>
</Form.Item>, </Form.Item>,
]} ]}
onReset={handleReset} onReset={handleReset}
@ -210,12 +271,31 @@ const ExperManage = (props) => {
footer={<Button onClick={() => setDetailVisible(false)}>关闭</Button>} footer={<Button onClick={() => setDetailVisible(false)}>关闭</Button>}
width={560} width={560}
> >
<Descriptions column={2} bordered size="small" loading={qualExpertDetailLoading}> <Descriptions
<Descriptions.Item label="姓名">{qualExpertDetail?.userName || "--"}</Descriptions.Item> column={2}
<Descriptions.Item label="账号">{qualExpertDetail?.account || "--"}</Descriptions.Item> bordered
<Descriptions.Item label="性别">{GENDER_MAP[qualExpertDetail?.genderCode] || "--"}</Descriptions.Item> size="small"
<Descriptions.Item label="身份证号">{qualExpertDetail?.idCardNo || "--"}</Descriptions.Item> loading={qualExpertDetailLoading}
<Descriptions.Item label="证书" span={2}>{qualExpertDetail?.certificate || "--"}</Descriptions.Item> >
<Descriptions.Item label="姓名">
{qualExpertDetail?.userName || "--"}
</Descriptions.Item>
<Descriptions.Item label="账号">
{qualExpertDetail?.account || "--"}
</Descriptions.Item>
<Descriptions.Item label="性别">
{GENDER_MAP[qualExpertDetail?.genderCode] || "--"}
</Descriptions.Item>
<Descriptions.Item label="身份证号">
{qualExpertDetail?.idCardNo || "--"}
</Descriptions.Item>
<Descriptions.Item label="证书" span={2}>
{(qualExpertDetail?.certificate? JSON.parse(qualExpertDetail?.certificate): [])?.map((item) => (
<a key={item.id} href={item.url} target="_blank">
{item.name}
</a>
))}
</Descriptions.Item>
</Descriptions> </Descriptions>
</Modal> </Modal>
@ -229,29 +309,40 @@ const ExperManage = (props) => {
width={520} width={520}
> >
<Form form={editForm} layout="vertical"> <Form form={editForm} layout="vertical">
<Form.Item name="userName" label="姓名" rules={[{ required: true, message: "请输入姓名" }]}> <Form.Item
name="userName"
label="姓名"
rules={[{ required: true, message: "请输入姓名" }]}
>
<Input placeholder="请输入" allowClear /> <Input placeholder="请输入" allowClear />
</Form.Item> </Form.Item>
<Form.Item name="account" label="账号" rules={[{ required: true, message: "请输入账号" }]}> <Form.Item
name="account"
label="账号"
rules={[{ required: true, message: "请输入账号" }]}
>
<Input placeholder="请输入" allowClear /> <Input placeholder="请输入" allowClear />
</Form.Item> </Form.Item>
<Form.Item name="genderCode" label="性别"> <Form.Item name="genderCode" label="性别">
<Select placeholder="请选择" allowClear style={{ width: "100%" }}> <Select placeholder="请选择" allowClear style={{ width: "100%" }}>
{GENDER_OPTIONS.map((item) => ( {GENDER_OPTIONS.map((item) => (
<Select.Option key={item.value} value={item.value}>{item.label}</Select.Option> <Select.Option key={item.value} value={item.value}>
{item.label}
</Select.Option>
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item name="idCardNo" label="身份证号"> <Form.Item name="idCardNo" label="身份证号">
<Input placeholder="请输入" allowClear /> <Input placeholder="请输入" allowClear />
</Form.Item> </Form.Item>
<Form.Item name="certificate" label="证书"> <AttachmentUpload name="certificate" maxCount={1} label="证书" />
<Input placeholder="请输入" allowClear />
</Form.Item>
</Form> </Form>
</Modal> </Modal>
</PageLayout> </PageLayout>
); );
}; };
export default Connect([NS_QUAL_EXPERT], true)(AntdTableFuncControl(ExperManage)); export default Connect(
[NS_QUAL_EXPERT],
true,
)(AntdTableFuncControl(ExperManage));

View File

@ -7,6 +7,7 @@
.micro-temp-modal-body { .micro-temp-modal-body {
max-height: 630px; max-height: 630px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden;
scrollbar-width: thin; scrollbar-width: thin;
} }
body { body {

View File

@ -39,17 +39,17 @@ export const orgAccountModify = declareRequest("orgInfoLoading", safeAction(asyn
return fromSingleResponse(res, toOrgInfoForm); return fromSingleResponse(res, toOrgInfoForm);
})); }));
export const orgAccountDelete = declareRequest("orgInfoLoading", safeAction(async ({ id }) => { export const orgAccountDelete = declareRequest("orgInfoLoading", safeAction(async (data) => {
return apiPostDelete("/safetyEval/org-info/delete", id, NO_ORG_CONTEXT); return apiPost("/safetyEval/org-info/delete", data, {}, NO_ORG_CONTEXT);
})); }));
export const orgAccountUpdateState = declareRequest("orgInfoLoading", safeAction(async ({ id, state }) => { export const orgAccountUpdateState = declareRequest("orgInfoLoading", safeAction(async ({ id, state }) => {
return apiPost("/safetyEval/org-info/update-state", { id, state }, {}, NO_ORG_CONTEXT); return apiPost("/safetyEval/org-info/update-state", { id, state }, {}, NO_ORG_CONTEXT);
})); }));
export const orgAccountResetPassword = declareRequest("orgInfoLoading", safeAction(async ({ id }) => { export const orgAccountResetPassword = declareRequest("orgInfoLoading", safeAction(async (data ) => {
const url = `/safetyEval/org-info/reset-password?id=${encodeURIComponent(id)}`; const url = `/safetyEval/org-info/reset-password`;
return apiPost(url, {}, {}, NO_ORG_CONTEXT); return apiPost(url, data, {}, NO_ORG_CONTEXT);
})); }));
export const registeredOrgList = declareRequest("orgInfoLoading", safePageResult(async (params) => { export const registeredOrgList = declareRequest("orgInfoLoading", safePageResult(async (params) => {