dev-tmp1
tangjie 2026-08-17 14:09:31 +08:00
parent 70bee2fe2c
commit 96a70d39c3
2 changed files with 94 additions and 102 deletions

View File

@ -52,7 +52,9 @@ const splitContactNamePhone = (value) => {
return { return {
// 按首个 / 拆分;/后全部作为电话(剔除首尾空白),多余字符交给校验/提交时处理 // 按首个 / 拆分;/后全部作为电话(剔除首尾空白),多余字符交给校验/提交时处理
contactName: String(value).slice(0, idx).trim(), contactName: String(value).slice(0, idx).trim(),
contactPhone: String(value).slice(idx + 1).trim(), contactPhone: String(value)
.slice(idx + 1)
.trim(),
}; };
} }
// 无分隔符:整体作为联系人姓名,电话置空(由校验拦截) // 无分隔符:整体作为联系人姓名,电话置空(由校验拦截)
@ -76,7 +78,9 @@ function OrgInfoPage(props) {
setDetail(res.data); setDetail(res.data);
let attachmentUrls = res.data.attachmentUrls; let attachmentUrls = res.data.attachmentUrls;
if (typeof attachmentUrls === "string" && attachmentUrls) { if (typeof attachmentUrls === "string" && attachmentUrls) {
try { attachmentUrls = JSON.parse(attachmentUrls); } catch {} try {
attachmentUrls = JSON.parse(attachmentUrls);
} catch {}
} }
form.setFieldsValue({ form.setFieldsValue({
...res.data, ...res.data,
@ -166,7 +170,7 @@ function OrgInfoPage(props) {
}; };
return ( return (
<PageLayout <PageLayout
title='基础信息管理' title="基础信息管理"
extra={ extra={
hasExistingData && hasExistingData &&
!editing && ( !editing && (
@ -179,11 +183,33 @@ function OrgInfoPage(props) {
</Button> </Button>
) )
} }
footer={
editing && (
<Space>
<Button onClick={handleCancelEdit}>取消</Button>
{!hasExistingData && (
<Button loading={submitting} onClick={() => handleSave("draft")}>
暂存
</Button>
)}
<Button
type="primary"
loading={submitting}
onClick={() => handleSave("submit")}
>
提交
</Button>
</Space>
)
}
> >
<Form
form={form}
<Form form={form} layout="vertical" disabled={!editing} scrollToFirstError> layout="vertical"
<Row gutter={16}> disabled={!editing}
scrollToFirstError
>
<Row gutter={16}>
{/* 2026-08-08 字段顺序严格对齐原型 institution.html 434-450 行 */} {/* 2026-08-08 字段顺序严格对齐原型 institution.html 434-450 行 */}
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
@ -299,7 +325,11 @@ function OrgInfoPage(props) {
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="fax" label="传真" rules={[{ required: true, message: "请输入传真" }]}> <Form.Item
name="fax"
label="传真"
rules={[{ required: true, message: "请输入传真" }]}
>
<Input placeholder="请输入传真" allowClear maxLength={20} /> <Input placeholder="请输入传真" allowClear maxLength={20} />
</Form.Item> </Form.Item>
</Col> </Col>
@ -498,28 +528,8 @@ function OrgInfoPage(props) {
/> />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
{editing && ( </Form>
<div style={{ marginTop: 24, textAlign: "center" }}>
<Space>
<Button onClick={handleCancelEdit}>取消</Button>
{!hasExistingData && (
<Button loading={submitting} onClick={() => handleSave("draft")}>
暂存
</Button>
)}
<Button
type="primary"
loading={submitting}
onClick={() => handleSave("submit")}
>
提交
</Button>
</Space>
</div>
)}
</Form>
</PageLayout> </PageLayout>
); );
} }

View File

@ -170,7 +170,7 @@ const ReviewModal = (props) => {
footer={ footer={
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}> <div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}>
<Button onClick={onCancel}>取消</Button> <Button onClick={onCancel}>取消</Button>
{reviewResult !== 3 && ( {reviewResult !== 2 && reviewResult !== 3 && (
<Button loading={qualReviewSubmitLoading} onClick={handlePass} color="green" variant="solid"> <Button loading={qualReviewSubmitLoading} onClick={handlePass} color="green" variant="solid">
通过 通过
</Button> </Button>
@ -244,79 +244,61 @@ const ReviewModal = (props) => {
style={{ marginTop: "7px" }} style={{ marginTop: "7px" }}
scrollToFirstError scrollToFirstError
> >
{/* 专家核验场景:审核结果 + 核验意见2026-08-14 补充审核结果选项) */} <Form.Item
label="审核结果"
name="reviewResult"
rules={[{ required: true, message: "请选择审核结果" }]}
>
<Select placeholder="请选择">
{(isChangeScene ? CHANGE_RESULT_OPTIONS : QUAL_RESULT_OPTIONS).map((item) => (
<Select.Option key={item.value} value={item.value}>
{item.label}
</Select.Option>
))}
</Select>
</Form.Item>
{/* 2026-08-14 指派专家:仅资质备案初审显示(非变更、非专家核验,原型 modal-review-action */}
{!isChangeScene && !isExpert && (
<Form.Item
label="指派专家"
name="filingExpertId"
rules={[{ required: true, message: "请选择指派专家" }]}
>
<Select
placeholder="请选择"
showSearch
optionFilterProp="label"
onChange={(_, option) => {
// 同步设置专家姓名,随审核提交给后端
form.setFieldValue("filingExpertName", option?.userName);
}}
>
{(qualExpertList || []).map((exp) => (
<Select.Option key={exp.id} value={exp.id} label={exp.userName}>
{exp.userName}
</Select.Option>
))}
</Select>
</Form.Item>
)}
{isExpert ? ( {isExpert ? (
<> <Form.Item
<Form.Item label="核验意见"
label="审核结果" name="expertOpinion"
name="reviewResult" rules={[{ required: true, message: "请输入核验意见" }]}
rules={[{ required: true, message: "请选择审核结果" }]} >
> <TextArea rows={3} placeholder="请输入核验意见..." maxLength={200} />
<Select placeholder="请选择"> </Form.Item>
{QUAL_RESULT_OPTIONS.map((item) => (
<Select.Option key={item.value} value={item.value}>
{item.label}
</Select.Option>
))}
</Select>
</Form.Item>
<Form.Item
label="核验意见"
name="expertOpinion"
rules={[{ required: true, message: "请输入核验意见" }]}
>
<TextArea rows={3} placeholder="请输入核验意见..." maxLength={200} />
</Form.Item>
</>
) : ( ) : (
<> <Form.Item
<Form.Item label="综合审核意见"
label="审核结果" name="reviewOpinion"
name="reviewResult" rules={[{ required: true, message: "请输入综合审核意见" }]}
rules={[{ required: true, message: "请选择审核结果" }]} >
> <TextArea rows={3} placeholder="请输入综合审核意见..." maxLength={200} />
<Select placeholder="请选择"> </Form.Item>
{(isChangeScene ? CHANGE_RESULT_OPTIONS : QUAL_RESULT_OPTIONS).map((item) => (
<Select.Option key={item.value} value={item.value}>
{item.label}
</Select.Option>
))}
</Select>
</Form.Item>
{/* 2026-08-14 指派专家:仅资质备案初审显示(原型 modal-review-action备案变更/专家核验不显示 */}
{!isChangeScene && (
<Form.Item
label="指派专家"
name="filingExpertId"
rules={[{ required: true, message: "请选择指派专家" }]}
>
<Select
placeholder="请选择"
showSearch
optionFilterProp="label"
onChange={(_, option) => {
// 同步设置专家姓名,随审核提交给后端
form.setFieldValue("filingExpertName", option?.userName);
}}
>
{(qualExpertList || []).map((exp) => (
<Select.Option key={exp.id} value={exp.id} label={exp.userName}>
{exp.userName}
</Select.Option>
))}
</Select>
</Form.Item>
)}
<Form.Item
label="综合审核意见"
name="reviewOpinion"
rules={[{ required: true, message: "请输入综合审核意见" }]}
>
<TextArea rows={3} placeholder="请输入综合审核意见..." maxLength={200} />
</Form.Item>
</>
)} )}
</Form> </Form>
</Modal> </Modal>