feat
parent
7ebbd54d63
commit
77c372f615
|
|
@ -62,7 +62,7 @@ export const evalProjectSave = declareRequest(
|
||||||
export const evalProjectDetail = declareRequest(
|
export const evalProjectDetail = declareRequest(
|
||||||
"evalProjectDetailLoading",
|
"evalProjectDetailLoading",
|
||||||
"Get > /safetyEval/institution/eval-project/get",
|
"Get > /safetyEval/institution/eval-project/get",
|
||||||
'evalProjectDetail: {} | res.data || {}',
|
'evalProjectDetailData: {} | res.data || {}',
|
||||||
);
|
);
|
||||||
|
|
||||||
export const evalProjectDelete = declareRequest(
|
export const evalProjectDelete = declareRequest(
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ function OrgInfoGuard(props) {
|
||||||
if (res?.data?.id) {
|
if (res?.data?.id) {
|
||||||
// 下方两行切勿更换顺序
|
// 下方两行切勿更换顺序
|
||||||
sessionStorage.setItem("orgInfoId", res?.data?.id);
|
sessionStorage.setItem("orgInfoId", res?.data?.id);
|
||||||
|
sessionStorage.setItem("orgInfo", JSON.stringify(res?.data));
|
||||||
setOrgInfoId(res?.data?.id);
|
setOrgInfoId(res?.data?.id);
|
||||||
} else {
|
} else {
|
||||||
props.history.push("/container/EnterpriseInfo/OrgInfo");
|
props.history.push("/container/EnterpriseInfo/OrgInfo");
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import {
|
||||||
message,
|
message,
|
||||||
Descriptions,
|
Descriptions,
|
||||||
Flex,
|
Flex,
|
||||||
|
Tag,
|
||||||
Space,
|
Space,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import { PlusOutlined } from "@ant-design/icons";
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import {
|
||||||
Card,
|
Card,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
|
InputNumber,
|
||||||
Select,
|
Select,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
Row,
|
Row,
|
||||||
|
|
@ -16,6 +17,8 @@ import {
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||||
|
import { district } from "~/enumerate/constant";
|
||||||
|
import { phoneRule } from "~/utils/validators";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import AttachmentUpload from "~/components/AttachmentUpload";
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
|
|
||||||
|
|
@ -41,56 +44,87 @@ const YES_NO_OPTIONS = [
|
||||||
|
|
||||||
const ContractContent = (props) => {
|
const ContractContent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [saving, setSaving] = useState(false);
|
|
||||||
|
|
||||||
const projectId = router.query?.id;
|
const projectId = router.query?.id;
|
||||||
|
|
||||||
const { safetyEvalBusiness, evalContractGet, evalContractSave } = props;
|
const {
|
||||||
const { contractLoading } = safetyEvalBusiness || {};
|
safetyEvalBusiness,
|
||||||
|
evalContractGet,
|
||||||
|
evalContractSave,
|
||||||
|
customerDetail,
|
||||||
|
} = props;
|
||||||
|
const { contractLoading, contractSaveLoading, evalProjectDetailData } =
|
||||||
|
safetyEvalBusiness || {};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (!projectId) return;
|
if (!projectId) return;
|
||||||
setLoading(true);
|
|
||||||
try {
|
|
||||||
const res = await evalContractGet({ projectId });
|
const res = await evalContractGet({ projectId });
|
||||||
if (res?.success !== false && res?.data) {
|
if (res?.success !== false && res?.data) {
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...res.data,
|
...res.data,
|
||||||
contractStartDate: res.data.contractStartDate ? dayjs(res.data.contractStartDate) : undefined,
|
contractStartDate: res.data.contractStartDate
|
||||||
contractEndDate: res.data.contractEndDate ? dayjs(res.data.contractEndDate) : undefined,
|
? dayjs(res.data.contractStartDate)
|
||||||
|
: undefined,
|
||||||
|
contractEndDate: res.data.contractEndDate
|
||||||
|
? dayjs(res.data.contractEndDate)
|
||||||
|
: undefined,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const orgInfo = JSON.parse(sessionStorage.getItem("orgInfo"));
|
||||||
|
|
||||||
|
form.setFieldsValue({
|
||||||
|
orgName: orgInfo?.unitName,
|
||||||
|
projectName: evalProjectDetailData?.projectName,
|
||||||
|
evalTypeCode: evalProjectDetailData?.evalTypeCode,
|
||||||
|
projectRegion: evalProjectDetailData?.districtCode,
|
||||||
|
});
|
||||||
|
const customerRes = await customerDetail({
|
||||||
|
id: evalProjectDetailData.customerId,
|
||||||
|
});
|
||||||
|
if (customerRes?.success && customerRes?.data) {
|
||||||
|
form.setFieldsValue({
|
||||||
|
enterpriseName: customerRes.data.customerName,
|
||||||
|
officeAddress: customerRes.data.businessAddress,
|
||||||
|
creditCode: customerRes.data.creditCode,
|
||||||
|
legalPerson: customerRes.data.legalRepresentative,
|
||||||
|
contactName: customerRes.data.principalName,
|
||||||
|
contactPhone: customerRes.data.principalPhone,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (evalProjectDetailData?.id) {
|
||||||
fetchData();
|
fetchData();
|
||||||
}, [projectId]);
|
}
|
||||||
|
}, [projectId, evalProjectDetailData?.id]);
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
try {
|
try {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
setSaving(true);
|
|
||||||
const { contractStartDate, contractEndDate, ...rest } = values;
|
const { contractStartDate, contractEndDate, ...rest } = values;
|
||||||
const res = await evalContractSave({
|
const res = await evalContractSave({
|
||||||
...rest,
|
...rest,
|
||||||
projectId,
|
projectId,
|
||||||
contractStartDate: contractStartDate ? contractStartDate.format("YYYY-MM-DD") : undefined,
|
contractStartDate: contractStartDate
|
||||||
contractEndDate: contractEndDate ? contractEndDate.format("YYYY-MM-DD") : undefined,
|
? contractStartDate.format("YYYY-MM-DD")
|
||||||
|
: undefined,
|
||||||
|
contractEndDate: contractEndDate
|
||||||
|
? contractEndDate.format("YYYY-MM-DD")
|
||||||
|
: undefined,
|
||||||
|
scanFileUrl: rest.scanFileUrl? JSON.stringify(rest.scanFileUrl) :undefined,
|
||||||
});
|
});
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("合同保存成功");
|
message.success("合同保存成功");
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setSaving(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Spin spinning={loading || contractLoading}>
|
<Spin spinning={contractLoading}>
|
||||||
<div>
|
<div>
|
||||||
<div className="pf-permission">
|
<div className="pf-permission">
|
||||||
<Tag color="blue" className="pf-tag">
|
<Tag color="blue" className="pf-tag">
|
||||||
|
|
@ -102,141 +136,295 @@ const ContractContent = (props) => {
|
||||||
</div>
|
</div>
|
||||||
<Card title="项目合同信息" styles={{ header: { textAlign: "center" } }}>
|
<Card title="项目合同信息" styles={{ header: { textAlign: "center" } }}>
|
||||||
<Form form={form} layout="vertical">
|
<Form form={form} layout="vertical">
|
||||||
<Card type="inner" size="small" title="项目合同信息" extra={<Tag color="blue">合同基本信息</Tag>} className="pf-section">
|
<Card
|
||||||
|
type="inner"
|
||||||
|
size="small"
|
||||||
|
title="项目合同信息"
|
||||||
|
extra={<Tag color="blue">合同基本信息</Tag>}
|
||||||
|
className="pf-section"
|
||||||
|
>
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="机构名称" name="orgName" rules={[{ required: true, message: "请填写机构名称" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入机构名称" maxLength={100} allowClear />
|
label="机构名称"
|
||||||
|
name="orgName"
|
||||||
|
rules={[{ required: true, message: "请填写机构名称" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入机构名称"
|
||||||
|
maxLength={100}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="合同编号" name="contractNo" rules={[{ required: true, message: "请填写合同编号" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入合同编号" maxLength={50} allowClear />
|
label="合同编号"
|
||||||
|
name="contractNo"
|
||||||
|
rules={[{ required: true, message: "请填写合同编号" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入合同编号"
|
||||||
|
maxLength={50}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目名称" name="projectName" rules={[{ required: true, message: "请填写项目名称" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入项目名称" maxLength={100} allowClear />
|
label="项目名称"
|
||||||
|
name="projectName"
|
||||||
|
rules={[{ required: true, message: "请填写项目名称" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
maxLength={100}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目简介" name="projectIntro" rules={[{ required: true, message: "请填写项目简介" }]}>
|
<Form.Item
|
||||||
<TextArea rows={3} maxLength={500} showCount placeholder="请输入项目简介" />
|
label="项目简介"
|
||||||
|
name="projectIntro"
|
||||||
|
rules={[{ required: true, message: "请填写项目简介" }]}
|
||||||
|
>
|
||||||
|
<TextArea
|
||||||
|
rows={3}
|
||||||
|
maxLength={500}
|
||||||
|
showCount
|
||||||
|
placeholder="请输入项目简介"
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="合同金额(万元)" name="amount">
|
<Form.Item label="合同金额(万元)" name="amount">
|
||||||
<Input placeholder="请输入合同金额" maxLength={20} allowClear />
|
<InputNumber style={{width: '100%'}} placeholder="请输入合同金额" min={0} precision={2} max={9999999} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="项目类型" name="projectTypeCode" rules={[{ required: true, message: "请选择项目类型" }]}>
|
<Form.Item
|
||||||
|
label="项目类型"
|
||||||
|
name="projectTypeCode"
|
||||||
|
rules={[{ required: true, message: "请选择项目类型" }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择项目类型" allowClear>
|
<Select placeholder="请选择项目类型" allowClear>
|
||||||
{PROJECT_TYPE_OPTIONS.map((opt) => (
|
{PROJECT_TYPE_OPTIONS.map((opt) => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>
|
||||||
|
{opt.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目风险分析" name="riskSummary" rules={[{ required: true, message: "请填写项目风险分析" }]}>
|
<Form.Item
|
||||||
<TextArea rows={3} maxLength={500} showCount placeholder="自动带入风险分析结论,可补充说明" />
|
label="项目风险分析"
|
||||||
|
name="riskSummary"
|
||||||
|
rules={[{ required: true, message: "请填写项目风险分析" }]}
|
||||||
|
>
|
||||||
|
<TextArea
|
||||||
|
rows={3}
|
||||||
|
maxLength={500}
|
||||||
|
showCount
|
||||||
|
placeholder="自动带入风险分析结论,可补充说明"
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目所在地" name="projectRegion" rules={[{ required: true, message: "请填写项目所在地" }]}>
|
<Form.Item
|
||||||
<TextArea rows={2} maxLength={200} showCount placeholder="请输入项目所在地" />
|
label="项目所在地"
|
||||||
|
name="projectRegion"
|
||||||
|
rules={[{ required: true, message: "请填写项目所在地" }]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
placeholder="请选择"
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
|
>
|
||||||
|
{district.map((opt) => (
|
||||||
|
<Select.Option key={opt.code} value={opt.code}>
|
||||||
|
{opt.name}
|
||||||
|
</Select.Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目详细地址" name="projectAddress" rules={[{ required: true, message: "请填写项目详细地址" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入项目详细地址" maxLength={200} allowClear />
|
label="项目详细地址"
|
||||||
|
name="projectAddress"
|
||||||
|
rules={[{ required: true, message: "请填写项目详细地址" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入项目详细地址"
|
||||||
|
maxLength={200}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="合同开始时间" name="contractStartDate" rules={[{ required: true, message: "请选择合同开始时间" }]}>
|
<Form.Item
|
||||||
|
label="合同开始时间"
|
||||||
|
name="contractStartDate"
|
||||||
|
rules={[{ required: true, message: "请选择合同开始时间" }]}
|
||||||
|
>
|
||||||
<DatePicker className="pf-w-full" allowClear />
|
<DatePicker className="pf-w-full" allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="合同结束时间" name="contractEndDate" rules={[{ required: true, message: "请选择合同结束时间" }]}>
|
<Form.Item
|
||||||
|
label="合同结束时间"
|
||||||
|
name="contractEndDate"
|
||||||
|
rules={[{ required: true, message: "请选择合同结束时间" }]}
|
||||||
|
>
|
||||||
<DatePicker className="pf-w-full" allowClear />
|
<DatePicker className="pf-w-full" allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="评价类型" name="evalTypeCode" rules={[{ required: true, message: "请选择评价类型" }]}>
|
<Form.Item
|
||||||
|
label="评价类型"
|
||||||
|
name="evalTypeCode"
|
||||||
|
rules={[{ required: true, message: "请选择评价类型" }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择评价类型" allowClear>
|
<Select placeholder="请选择评价类型" allowClear>
|
||||||
{EVAL_TYPE_OPTIONS.map((opt) => (
|
{EVAL_TYPE_OPTIONS.map((opt) => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>
|
||||||
|
{opt.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="是否生产剧毒化学品" name="toxicFlag" rules={[{ required: true, message: "请选择" }]}>
|
<Form.Item
|
||||||
|
label="是否生产剧毒化学品"
|
||||||
|
name="toxicFlag"
|
||||||
|
rules={[{ required: true, message: "请选择" }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择" allowClear>
|
<Select placeholder="请选择" allowClear>
|
||||||
{YES_NO_OPTIONS.map((opt) => (
|
{YES_NO_OPTIONS.map((opt) => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>
|
||||||
|
{opt.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="是否生产易制毒化学品" name="precursorFlag" rules={[{ required: true, message: "请选择" }]}>
|
<Form.Item
|
||||||
|
label="是否生产易制毒化学品"
|
||||||
|
name="precursorFlag"
|
||||||
|
rules={[{ required: true, message: "请选择" }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择" allowClear>
|
<Select placeholder="请选择" allowClear>
|
||||||
{YES_NO_OPTIONS.map((opt) => (
|
{YES_NO_OPTIONS.map((opt) => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>
|
||||||
|
{opt.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="是否跨省建设项目" name="crossProvinceFlag" rules={[{ required: true, message: "请选择" }]}>
|
<Form.Item
|
||||||
|
label="是否跨省建设项目"
|
||||||
|
name="crossProvinceFlag"
|
||||||
|
rules={[{ required: true, message: "请选择" }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择" allowClear>
|
<Select placeholder="请选择" allowClear>
|
||||||
{YES_NO_OPTIONS.map((opt) => (
|
{YES_NO_OPTIONS.map((opt) => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>
|
||||||
|
{opt.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="项目业务范围" name="businessScope" rules={[{ required: true, message: "请填写项目业务范围" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入项目业务范围" maxLength={200} allowClear />
|
label="项目业务范围"
|
||||||
|
name="businessScope"
|
||||||
|
rules={[{ required: true, message: "请填写项目业务范围" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入项目业务范围"
|
||||||
|
maxLength={200}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card type="inner" size="small" title="被评价企业信息" extra={<Tag color="blue">合同服务对象</Tag>} className="pf-section">
|
<Card
|
||||||
|
type="inner"
|
||||||
|
size="small"
|
||||||
|
title="被评价企业信息"
|
||||||
|
extra={<Tag color="blue">合同服务对象</Tag>}
|
||||||
|
className="pf-section"
|
||||||
|
>
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="企业名称" name="enterpriseName" rules={[{ required: true, message: "请填写企业名称" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入企业名称" maxLength={100} allowClear />
|
label="企业名称"
|
||||||
|
name="enterpriseName"
|
||||||
|
rules={[{ required: true, message: "请填写企业名称" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入企业名称"
|
||||||
|
maxLength={100}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="国民经济行业类别" name="industryCategory">
|
<Form.Item label="国民经济行业类别" name="industryCategory">
|
||||||
<TextArea rows={2} maxLength={200} showCount placeholder="请输入国民经济行业类别" />
|
<TextArea
|
||||||
|
rows={2}
|
||||||
|
maxLength={200}
|
||||||
|
showCount
|
||||||
|
placeholder="请输入国民经济行业类别"
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="办公地址" name="officeAddress">
|
<Form.Item label="办公地址" name="officeAddress">
|
||||||
<Input placeholder="请输入办公地址" maxLength={200} allowClear />
|
<Input
|
||||||
|
placeholder="请输入办公地址"
|
||||||
|
maxLength={200}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item label="社会统一信用代码" name="creditCode">
|
<Form.Item label="社会统一信用代码" name="creditCode">
|
||||||
<Input placeholder="请输入社会统一信用代码" maxLength={18} allowClear />
|
<Input
|
||||||
|
placeholder="请输入社会统一信用代码"
|
||||||
|
maxLength={18}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="邮政编码" name="postCode">
|
<Form.Item label="邮政编码" name="postCode">
|
||||||
<Input placeholder="请输入邮政编码" maxLength={10} allowClear />
|
<Input
|
||||||
|
placeholder="请输入邮政编码"
|
||||||
|
maxLength={10}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="企业电话" name="enterprisePhone">
|
<Form.Item label="企业电话" name="enterprisePhone"
|
||||||
<Input placeholder="请输入企业电话" maxLength={20} allowClear />
|
rules={[phoneRule("企业电话", false)]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入企业电话"
|
||||||
|
maxLength={20}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -246,22 +434,44 @@ const ContractContent = (props) => {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="法人代表" name="legalPerson">
|
<Form.Item label="法人代表" name="legalPerson">
|
||||||
<Input placeholder="请输入法人代表" maxLength={20} allowClear />
|
<Input
|
||||||
|
placeholder="请输入法人代表"
|
||||||
|
maxLength={20}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="联系人" name="contactName" rules={[{ required: true, message: "请填写联系人" }]}>
|
<Form.Item
|
||||||
<Input placeholder="请输入联系人" maxLength={20} allowClear />
|
label="联系人"
|
||||||
|
name="contactName"
|
||||||
|
rules={[{ required: true, message: "请填写联系人" }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入联系人"
|
||||||
|
maxLength={20}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item label="联系人电话" name="contactPhone"
|
||||||
|
rules={[phoneRule("联系人电话")]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
placeholder="请输入联系人电话"
|
||||||
|
maxLength={20}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="职工人数" name="staffCount">
|
<Form.Item label="职工人数" name="staffCount">
|
||||||
<Input placeholder="请输入职工人数" maxLength={10} allowClear />
|
<Input
|
||||||
</Form.Item>
|
placeholder="请输入职工人数"
|
||||||
</Col>
|
maxLength={10}
|
||||||
<Col span={12}>
|
allowClear
|
||||||
<Form.Item label="联系人电话" name="contactPhone" rules={[{ required: true, message: "请填写联系人电话" }]}>
|
/>
|
||||||
<Input placeholder="请输入联系人电话" maxLength={20} allowClear />
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -278,7 +488,13 @@ const ContractContent = (props) => {
|
||||||
|
|
||||||
<Flex justify="flex-end" gap={8}>
|
<Flex justify="flex-end" gap={8}>
|
||||||
<Button onClick={() => props.history.goBack()}>取消</Button>
|
<Button onClick={() => props.history.goBack()}>取消</Button>
|
||||||
<Button type="primary" onClick={handleSave} loading={saving}>完成合同录入并保存</Button>
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={handleSave}
|
||||||
|
loading={contractSaveLoading}
|
||||||
|
>
|
||||||
|
完成合同录入并保存
|
||||||
|
</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -286,7 +502,4 @@ const ContractContent = (props) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Connect(
|
export default Connect([NS_SAFETY_EVAL_BUSINESS], true)(ContractContent);
|
||||||
[NS_SAFETY_EVAL_BUSINESS],
|
|
||||||
true,
|
|
||||||
)(ContractContent);
|
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,13 @@ const RiskAnalysisContent = (props) => {
|
||||||
safetyEvalBusiness,
|
safetyEvalBusiness,
|
||||||
evalRiskAnalysisGet,
|
evalRiskAnalysisGet,
|
||||||
evalRiskAnalysisSave,
|
evalRiskAnalysisSave,
|
||||||
evalProjectDetail,
|
|
||||||
evalRiskAnalysisPeopleSave,
|
evalRiskAnalysisPeopleSave,
|
||||||
} = props;
|
} = props;
|
||||||
const {
|
const {
|
||||||
riskAnalysisLoading,
|
riskAnalysisLoading,
|
||||||
evalProjectDetailLoading,
|
evalProjectDetailLoading,
|
||||||
riskAnalysisSaveLoading,
|
riskAnalysisSaveLoading,
|
||||||
|
evalProjectDetailData,
|
||||||
} = safetyEvalBusiness || {};
|
} = safetyEvalBusiness || {};
|
||||||
|
|
||||||
// 查询风险分析数据回显
|
// 查询风险分析数据回显
|
||||||
|
|
@ -62,18 +62,18 @@ const RiskAnalysisContent = (props) => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
evalTypeCode: r.data.evalTypeCode,
|
evalTypeCode: evalProjectDetailData.evalTypeCode,
|
||||||
projectName: r.data.projectName,
|
projectName: evalProjectDetailData.projectName,
|
||||||
industryName: r.data.industryCode,
|
industryName: evalProjectDetailData.industryCode,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (evalProjectDetail?.id) {
|
if (evalProjectDetailData?.id) {
|
||||||
fetchData();
|
fetchData();
|
||||||
}
|
}
|
||||||
}, [projectId, evalProjectDetail?.id]);
|
}, [projectId, evalProjectDetailData?.id]);
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handleSave = async (statusCode) => {
|
const handleSave = async (statusCode) => {
|
||||||
|
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
import { ImportCore } from "@cqsjjb/jjb-common-decorator/module";
|
|
||||||
import { theme as antdTheme, App, ConfigProvider } from "antd";
|
|
||||||
import language from "antd/locale/zh_CN";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
import { InjectContext } from "~/enumerate/context";
|
|
||||||
|
|
||||||
export default class Container extends React.Component {
|
|
||||||
state = window?.base?.themeConfig || {
|
|
||||||
algorithm: window.process.env.app.antd.algorithm,
|
|
||||||
borderRadius: window.process.env.app.antd.borderRadius,
|
|
||||||
colorPrimary: window.process.env.app.antd.colorPrimary,
|
|
||||||
};
|
|
||||||
|
|
||||||
get token() {
|
|
||||||
const {
|
|
||||||
colorPrimary,
|
|
||||||
borderRadius,
|
|
||||||
} = this.state;
|
|
||||||
return {
|
|
||||||
fontFamily: window.process.env.app.antd.fontFamily,
|
|
||||||
colorPrimary,
|
|
||||||
borderRadius,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
get algorithm() {
|
|
||||||
return antdTheme[this.state.algorithm];
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
if (window.__IN_BASE__) {
|
|
||||||
// eslint-disable-next-line react-web-api/no-leaked-event-listener
|
|
||||||
window.base.addEventListener("EVENT_THEME_CONTROL", (e) => {
|
|
||||||
const config = e.data;
|
|
||||||
this.setState({ [config.field]: config.value });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<ConfigProvider
|
|
||||||
theme={{
|
|
||||||
token: this.token,
|
|
||||||
algorithm: this.algorithm,
|
|
||||||
}}
|
|
||||||
locale={language}
|
|
||||||
prefixCls={window.process.env.app.antd["ant-prefix"]}
|
|
||||||
>
|
|
||||||
<App style={{ height: "100%" }}>
|
|
||||||
<AppMiddle {...this.props} />
|
|
||||||
</App>
|
|
||||||
</ConfigProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function AppMiddle(props) {
|
|
||||||
return (
|
|
||||||
<InjectContext.Provider value={App.useApp()}>
|
|
||||||
{process.env.NODE_ENV === "development"
|
|
||||||
? props.children
|
|
||||||
: (
|
|
||||||
<Interceptor>
|
|
||||||
{props.children}
|
|
||||||
</Interceptor>
|
|
||||||
)}
|
|
||||||
</InjectContext.Provider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Interceptor extends React.Component {
|
|
||||||
state = {
|
|
||||||
Component: undefined,
|
|
||||||
};
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
if (process.env.app.appKey) {
|
|
||||||
ImportCore({
|
|
||||||
name: "$",
|
|
||||||
from: "https://cdn.cqjjb.cn/jcloud/use/plugin/b31c9840a57f11ef91cf7f3cabbb7484/latest",
|
|
||||||
}).then(async (res) => {
|
|
||||||
if (res.status) {
|
|
||||||
this.setState({ Component: res.module?.PageCover });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { Component } = this.state;
|
|
||||||
return (Component && process.env.app.appKey && process.env.NODE_ENV === "development")
|
|
||||||
? (
|
|
||||||
<Component appKey={process.env.app.appKey}>
|
|
||||||
{this.props.children}
|
|
||||||
</Component>
|
|
||||||
)
|
|
||||||
: this.props.children;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue