|
@@ -24,14 +24,28 @@ import ModifyManagerModal from './ModifyManagerModal';
|
|
|
import { connect } from 'dva';
|
|
|
import FirmModal from './ManufacturerModal';
|
|
|
import { queryCreaterList, saveMfr } from '@/services/manufacturer';
|
|
|
+import ProjectRecordModal from './ProjectRecordModal';
|
|
|
|
|
|
const { Option } = Select;
|
|
|
-//状态
|
|
|
-const STATUS = [
|
|
|
+//项目阶段
|
|
|
+const SECTION = [
|
|
|
{ value: 0, label: '售前' },
|
|
|
- { value: 1, label: '转执行' },
|
|
|
- { value: 2, label: '转运营' },
|
|
|
- { value: 3, label: '转质保' },
|
|
|
+ { value: 1, label: '执行' },
|
|
|
+ { value: 2, label: '运营' },
|
|
|
+ { value: 3, label: '质保' },
|
|
|
+];
|
|
|
+//现阶段状态
|
|
|
+const STATUS = [
|
|
|
+ { value: 0, label: '初步交流' },
|
|
|
+ { value: 1, label: '预算和方式' },
|
|
|
+ { value: 2, label: '招标' },
|
|
|
+ { value: 3, label: '中标' },
|
|
|
+ { value: 4, label: '执行' },
|
|
|
+ { value: 5, label: '运营' },
|
|
|
+ { value: 6, label: '质保' },
|
|
|
+ { value: 7, label: '放弃' },
|
|
|
+ { value: 8, label: '失败' },
|
|
|
+ { value: 9, label: '关闭' },
|
|
|
];
|
|
|
|
|
|
function List(props) {
|
|
@@ -61,6 +75,8 @@ function List(props) {
|
|
|
const [qualityOperate, setQualityOperate] = useState(0);
|
|
|
const [modifyManagerVisible, setModifyManagerVisible] = useState(false);
|
|
|
const [addFirmVisible, setAddFirmVisible] = useState(false);
|
|
|
+ const [recordVisible, setRecordVisible] = useState(false);
|
|
|
+ const [isEdit, setIsEdit] = useState(false);
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '项目编号',
|
|
@@ -73,80 +89,64 @@ function List(props) {
|
|
|
{
|
|
|
title: '客户',
|
|
|
dataIndex: 'supplier_name',
|
|
|
- render: () => '-',
|
|
|
},
|
|
|
{
|
|
|
title: '规模',
|
|
|
- render: () => '-',
|
|
|
+ dataIndex: 'process_info',
|
|
|
+ render: info => {
|
|
|
+ const str = '';
|
|
|
+ if (info) {
|
|
|
+ const data = JSON.parse(info) || [];
|
|
|
+ const list = data.filter(item => item.scale);
|
|
|
+ str = list.join('+');
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- title: '技术',
|
|
|
- render: () => '-',
|
|
|
+ title: '工艺',
|
|
|
+ dataIndex: 'process_info',
|
|
|
+ render: info => {
|
|
|
+ const str = '';
|
|
|
+ if (info) {
|
|
|
+ const data = JSON.parse(info) || [];
|
|
|
+ const list = data.filter(item => item.type);
|
|
|
+ str = list.join('+');
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- title: '项目种类(前分类)',
|
|
|
- render: () => '-',
|
|
|
+ title: '项目种类',
|
|
|
+ dataIndex: 'TypeInfo',
|
|
|
+ render: TypeInfo => (TypeInfo ? `${TypeInfo.name}(${TypeInfo.code})` : '-'),
|
|
|
},
|
|
|
{
|
|
|
- title: '项目阶段(前流程)',
|
|
|
- render: () => '-',
|
|
|
+ title: '项目阶段',
|
|
|
+ dataIndex: ['FlowInfo', 'name'],
|
|
|
},
|
|
|
{
|
|
|
- title: '现阶段状态(前状态)',
|
|
|
- render: () => '-',
|
|
|
+ title: '现阶段状态',
|
|
|
+ dataIndex: 'project_status',
|
|
|
+ render: project_status => {
|
|
|
+ // return project_status === 0 ? <>售前</> : <>转执行</>;
|
|
|
+ //若添加其他状态则启用以下switch case:
|
|
|
+ switch (project_status) {
|
|
|
+ case 0:
|
|
|
+ return <>售前</>;
|
|
|
+ case 1:
|
|
|
+ return <>转执行</>;
|
|
|
+ case 2:
|
|
|
+ return <>转运营</>;
|
|
|
+ case 3:
|
|
|
+ return <>转质保</>;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '现阶段状态时间(月)',
|
|
|
render: () => '-',
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '分类',
|
|
|
- // dataIndex: 'TypeInfo',
|
|
|
- // render: TypeInfo => (TypeInfo ? `${TypeInfo.name}(${TypeInfo.code})` : '-'),
|
|
|
- // },
|
|
|
- /*
|
|
|
- {
|
|
|
- title: '名称',
|
|
|
- dataIndex: 'name',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '行业',
|
|
|
- dataIndex: 'IndustryInfo',
|
|
|
- render: IndustryInfo => `${IndustryInfo.name}(${IndustryInfo.code})`,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '所在地',
|
|
|
- dataIndex: 'location',
|
|
|
- render: (location, record) => `${location}(${record.location_code})`,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '期数',
|
|
|
- dataIndex: 'version',
|
|
|
- render: version => `${version}期`,
|
|
|
- },
|
|
|
- */
|
|
|
- // {
|
|
|
- // title: '流程',
|
|
|
- // dataIndex: ['FlowInfo', 'name'],
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '状态',
|
|
|
- // dataIndex: 'project_status',
|
|
|
- // render: project_status => {
|
|
|
- // // return project_status === 0 ? <>售前</> : <>转执行</>;
|
|
|
- // //若添加其他状态则启用以下switch case:
|
|
|
- // switch (project_status) {
|
|
|
- // case 0:
|
|
|
- // return <>售前</>;
|
|
|
- // case 1:
|
|
|
- // return <>转执行</>;
|
|
|
- // case 2:
|
|
|
- // return <>转运营</>;
|
|
|
- // case 3:
|
|
|
- // return <>转质保</>;
|
|
|
- // }
|
|
|
- // },
|
|
|
- // },
|
|
|
{
|
|
|
title: '节点',
|
|
|
dataIndex: 'NodeInfo',
|
|
@@ -194,7 +194,7 @@ function List(props) {
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
- render: record => renderEditBtns2(record),
|
|
|
+ render: record => renderEditBtns(record),
|
|
|
},
|
|
|
];
|
|
|
|
|
@@ -203,6 +203,7 @@ function List(props) {
|
|
|
<>
|
|
|
<a
|
|
|
onClick={() => {
|
|
|
+ setIsEdit(false);
|
|
|
setCurrentItem(record);
|
|
|
setDetailVisible(true);
|
|
|
}}
|
|
@@ -210,9 +211,24 @@ function List(props) {
|
|
|
项目详情
|
|
|
</a>
|
|
|
<Divider type="vertical" />
|
|
|
- <a onClick={() => {}}>项目编辑</a>
|
|
|
+ <a
|
|
|
+ onClick={() => {
|
|
|
+ setIsEdit(true);
|
|
|
+ setCurrentItem(record);
|
|
|
+ setDetailVisible(true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 项目编辑
|
|
|
+ </a>
|
|
|
<Divider type="vertical" />
|
|
|
- <a onClick={() => {}}>项目日志</a>
|
|
|
+ <a
|
|
|
+ onClick={() => {
|
|
|
+ setCurrentItem(record);
|
|
|
+ setRecordVisible(true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 项目日志
|
|
|
+ </a>
|
|
|
<Divider type="vertical" />
|
|
|
<a onClick={() => {}}>设置人日预算</a>
|
|
|
</>
|
|
@@ -259,10 +275,24 @@ function List(props) {
|
|
|
<Form.Item label="项目编号" name="projectCode">
|
|
|
<Input style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
- <Form.Item label="状态" name="projectStatus">
|
|
|
+ <Form.Item label="项目阶段" name="projectStatus">
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ style={{ width: 160 }}
|
|
|
+ filterOption={(input, option) =>
|
|
|
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Option value={null}>全部</Option>
|
|
|
+ {SECTION.map(item => (
|
|
|
+ <Option key={item.value}>{item.label}</Option>
|
|
|
+ ))}
|
|
|
+ </Select>
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item label="现阶段状态" name="projectStatus">
|
|
|
<Select
|
|
|
showSearch
|
|
|
- style={{ width: 120 }}
|
|
|
+ style={{ width: 160 }}
|
|
|
filterOption={(input, option) =>
|
|
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
}
|
|
@@ -615,11 +645,13 @@ function List(props) {
|
|
|
onAddFirm={() => setAddFirmVisible(true)}
|
|
|
/>
|
|
|
<DetailModal
|
|
|
+ depUserTree={depUserTree}
|
|
|
industryList={industryList}
|
|
|
flowList={flowList}
|
|
|
typeList={typeList}
|
|
|
visible={detailVisible}
|
|
|
data={currentItem}
|
|
|
+ isEdit={isEdit}
|
|
|
onClose={() => setDetailVisible(false)}
|
|
|
/>
|
|
|
<ExecutionModal
|
|
@@ -630,14 +662,6 @@ function List(props) {
|
|
|
onOk={() => setExecutionVisible(false)}
|
|
|
onClose={() => setExecutionVisible(false)}
|
|
|
/>
|
|
|
- {/* <MemberModal
|
|
|
- depUserTree={depUserTree}
|
|
|
- loading={loading}
|
|
|
- visible={memberVisible}
|
|
|
- onClose={() => setMemberVisible(false)}
|
|
|
- currentItem={currentItem}
|
|
|
- dataSource={member}
|
|
|
- /> */}
|
|
|
<QualityOperateModal
|
|
|
depUserTree={depUserTree}
|
|
|
loading={loading}
|
|
@@ -665,11 +689,16 @@ function List(props) {
|
|
|
onOk={() => setModifyManagerVisible(false)}
|
|
|
/>
|
|
|
<FirmModal
|
|
|
- // projectId={projectId}
|
|
|
visible={addFirmVisible}
|
|
|
onCancel={() => setAddFirmVisible(false)}
|
|
|
onOk={handlerSaveFirm}
|
|
|
/>
|
|
|
+ <ProjectRecordModal
|
|
|
+ depUserTree={depUserTree}
|
|
|
+ currentItem={currentItem}
|
|
|
+ visible={recordVisible}
|
|
|
+ onClose={() => setRecordVisible(false)}
|
|
|
+ />
|
|
|
</div>
|
|
|
);
|
|
|
}
|