dev01 2 years ago
parent
commit
d182e6ea6f

+ 6 - 13
js/component/manageCenter/order/orderNew/chooseList.jsx

@@ -36,20 +36,13 @@ class ChooseList extends Component {
     const options = [];
     const defaultValue = [];
     this.props.columns.forEach(item => {
-      const obj = {
+      let obj = {
         label: item.title,
         value: item.title
       };
-      // const all = {
-      //   label: "全选",
-      //   value: "全选"
-      // }
       options.push(obj);
-      // options.unshift(all)
       defaultValue.push(item.title);
-      // defaultValue.unshift(item.label);
     });
-    // console.log(defaultValue);
     this.setState({
       columns: this.props.columns,
       options: options,
@@ -73,7 +66,7 @@ class ChooseList extends Component {
     //     flag = true;
     //   })
     // })
-    if(checkedValues.length == this.props.columns.length) {
+    if (checkedValues.length == this.props.columns.length) {
       flag = true
     }
     this.setState({
@@ -85,20 +78,20 @@ class ChooseList extends Component {
     this.setState({
       visible: true
     });
-    if(this.props.changeList != undefined) {
+    if (this.props.changeList != undefined) {
       const arr = []
       this.props.changeList.forEach((i) => {
         arr.push(i.title)
       })
       let flag = false
-      if(arr.length == this.state.columns.length) {
+      if (arr.length == this.state.columns.length) {
         flag = true
       }
       this.setState({
         checkedValues: arr,
         flag
       })
-    }else {
+    } else {
       const arr = [];
       this.props.columns.forEach(i => {
         arr.push(i.title);
@@ -139,7 +132,7 @@ class ChooseList extends Component {
       this.setState({
         checkedValues: []
       });
-    }else {
+    } else {
       this.setState({
         checkedValues: this.state.defaultValue
       });

+ 94 - 84
js/component/manageCenter/project/summary/highTech.jsx

@@ -31,7 +31,7 @@ class HighTech extends Component {
     super(props);
     this.state = {
       loading: false,
-      changeList: [],
+      changeList: undefined,
       columns: currency,
       status: 0,
       page: 1,
@@ -102,41 +102,41 @@ class HighTech extends Component {
       url: globalConfig.context + "/api/admin/statistis/selectTaskList",
       data: this.props.searchData
         ? Object.assign(
-            {
-              pageNo: pageNo || 1,
-              pageSize: this.state.pagination.pageSize || 10,
-            },
-            this.props.searchData
-          )
-        : {
+          {
             pageNo: pageNo || 1,
             pageSize: this.state.pagination.pageSize || 10,
-            startDate:
-              this.state.releaseDate.length > 0
-                ? this.state.releaseDate[0]
-                : undefined, //开始时间
-            endDate:
-              this.state.releaseDate.length > 0
-                ? this.state.releaseDate[1]
-                : undefined, //结束时间
-            depId: this.state.depId || undefined, //部门ID
-            thchDepId: this.state.thchDepId || undefined, //责任部门ID
-            projectStatus: this.state.projectStatus || undefined, //项目类别
-            projectType:
-              typeof this.state.projectType === "number"
-                ? this.state.projectType
-                : undefined, //项目分类
-            orderNo: this.state.searchOrderNo || undefined, //订单编号
-            contractNo: this.state.searchContractNo || undefined, //合同编号
-            userName: this.state.searchEnterpriseName || undefined, //企业名称
-            declarationBatch: this.state.declarationBatch || undefined, //申报批次
-            projectSituation:
-              typeof this.state.projectSituation === "number"
-                ? this.state.projectSituation
-                : undefined, //项目分类
-            projectAmount: this.state.projectAmount || undefined, //项目金额
-            status: this.state.status,
           },
+          this.props.searchData
+        )
+        : {
+          pageNo: pageNo || 1,
+          pageSize: this.state.pagination.pageSize || 10,
+          startDate:
+            this.state.releaseDate.length > 0
+              ? this.state.releaseDate[0]
+              : undefined, //开始时间
+          endDate:
+            this.state.releaseDate.length > 0
+              ? this.state.releaseDate[1]
+              : undefined, //结束时间
+          depId: this.state.depId || undefined, //部门ID
+          thchDepId: this.state.thchDepId || undefined, //责任部门ID
+          projectStatus: this.state.projectStatus || undefined, //项目类别
+          projectType:
+            typeof this.state.projectType === "number"
+              ? this.state.projectType
+              : undefined, //项目分类
+          orderNo: this.state.searchOrderNo || undefined, //订单编号
+          contractNo: this.state.searchContractNo || undefined, //合同编号
+          userName: this.state.searchEnterpriseName || undefined, //企业名称
+          declarationBatch: this.state.declarationBatch || undefined, //申报批次
+          projectSituation:
+            typeof this.state.projectSituation === "number"
+              ? this.state.projectSituation
+              : undefined, //项目分类
+          projectAmount: this.state.projectAmount || undefined, //项目金额
+          status: this.state.status,
+        },
       success: function (data) {
         ShowModal(this);
         let theArr = [];
@@ -282,20 +282,19 @@ class HighTech extends Component {
     if (typeof this.state.projectType === "number") {
       url =
         url +
-        `&projectTypeName=${
-          this.state.projectType === 0
-            ? "通用"
-            : this.state.projectType === 1
+        `&projectTypeName=${this.state.projectType === 0
+          ? "通用"
+          : this.state.projectType === 1
             ? "专利"
             : this.state.projectType === 2
-            ? "软著"
-            : this.state.projectType === 3
-            ? "审计"
-            : this.state.projectType === 4
-            ? "双软"
-            : this.state.projectType === 5
-            ? "高新"
-            : ""
+              ? "软著"
+              : this.state.projectType === 3
+                ? "审计"
+                : this.state.projectType === 4
+                  ? "双软"
+                  : this.state.projectType === 5
+                    ? "高新"
+                    : ""
         }`;
     }
     let data = {
@@ -333,8 +332,23 @@ class HighTech extends Component {
 
     window.location.href = globalConfig.context + url;
   }
+  // 设置默认table(用来默认不显示某列数据 isNoD:true)
+  defaultcolumns() {
+    const newArr = [];
+    this.state.columns.forEach((item) => {
+      if (item.isNoD) {
+        return
+      } else {
+        newArr.push(item);
+      }
+    });
+    this.setState({
+      changeList: newArr,
+    });
+  }
 
   componentWillMount() {
+    this.defaultcolumns();
     this.loadData();
     if (!this.props.introduce) {
       this.departmentList();
@@ -347,18 +361,18 @@ class HighTech extends Component {
           e === 0
             ? currency
             : e === 1
-            ? patent
-            : e === 2
-            ? softWriting
-            : e === 3
-            ? currency
-            : e === 4
-            ? doubleSoft
-            : e === 5
-            ? highTechColumns
-            : e === 6
-            ? currency
-            : currency,
+              ? patent
+              : e === 2
+                ? softWriting
+                : e === 3
+                  ? currency
+                  : e === 4
+                    ? doubleSoft
+                    : e === 5
+                      ? highTechColumns
+                      : e === 6
+                        ? currency
+                        : currency,
       });
     }
   }
@@ -374,14 +388,10 @@ class HighTech extends Component {
               <span style={{ fontWeight: 900, fontSize: 16 }}>
                 项目汇总表 (
                 {this.state.status === 1
-                  ? "高新"
-                  : this.state.status === 2
-                  ? "双软"
-                  : this.state.status === 3
-                  ? "软著"
-                  : this.state.status === 4
-                  ? "专利"
-                  : "通用"}
+                  ? "高新" : this.state.status === 2
+                    ? "双软" : this.state.status === 3
+                      ? "软著" : this.state.status === 4
+                        ? "专利" : "通用"}
                 )
               </span>
             </div>
@@ -504,30 +514,30 @@ class HighTech extends Component {
                               e === 0
                                 ? currency
                                 : e === 1
-                                ? patent
-                                : e === 2
-                                ? softWriting
-                                : e === 3
-                                ? currency
-                                : e === 4
-                                ? doubleSoft
-                                : e === 5
-                                ? highTechColumns
-                                : e === 6
-                                ? currency
-                                : currency,
+                                  ? patent
+                                  : e === 2
+                                    ? softWriting
+                                    : e === 3
+                                      ? currency
+                                      : e === 4
+                                        ? doubleSoft
+                                        : e === 5
+                                          ? highTechColumns
+                                          : e === 6
+                                            ? currency
+                                            : currency,
                             changeList: [],
                             projectType: e,
                             status:
                               e === 4
                                 ? 2
                                 : e === 2
-                                ? 3
-                                : e === 1
-                                ? 4
-                                : e === 5
-                                ? 1
-                                : 0,
+                                  ? 3
+                                  : e === 1
+                                    ? 4
+                                    : e === 5
+                                      ? 1
+                                      : 0,
                             dataSource: [],
                           }
                           //   () => {
@@ -752,7 +762,7 @@ class HighTech extends Component {
                 y: 0,
               }}
               columns={
-                this.state.changeList.length > 0
+                this.state.changeList
                   ? this.state.changeList
                   : this.state.columns
               }

+ 49 - 44
js/component/manageCenter/project/summary/highTechConfig.jsx

@@ -1,8 +1,8 @@
 import { Tooltip } from 'antd';
 import React from 'react';
-import {getProjectName} from '@/tools';
+import { getProjectName } from '@/tools';
 // 高新
-const highTechColumns =[
+const highTechColumns = [
     {
         title: "序号",
         dataIndex: "key",
@@ -72,15 +72,15 @@ const highTechColumns =[
         title: "是否立项/时间",
         dataIndex: "setUpStatus",
         key: "setUpStatus",
-        render:(value,record)=>(
-                value === 1 ? '是'+'/'+record.setUpTime : value === 0 ? '否' : ''
+        render: (value, record) => (
+            value === 1 ? '是' + '/' + record.setUpTime : value === 0 ? '否' : ''
         )
     },
     {
         title: "是否抽查",
         dataIndex: "spotCheckStatus",
         key: "spotCheckStatus",
-        render:(value)=>(
+        render: (value) => (
             value === 1 ? '是' : value === 0 ? '否' : ''
         )
     },
@@ -114,7 +114,7 @@ const highTechColumns =[
         title: "项目状态",
         dataIndex: "projectStatus",
         key: "projectStatus",
-        render:(value)=>(
+        render: (value) => (
             getProjectName(value)
         )
     },
@@ -124,7 +124,7 @@ const highTechColumns =[
         key: "specialComment",
         render: (v) => (
             <Tooltip placement="topRight" title={v} overlayStyle={{
-                wordBreak:'break-all'
+                wordBreak: 'break-all'
             }}>
                 <div style={{
                     maxWidth: '120px',
@@ -208,8 +208,8 @@ const doubleSoft = [
         title: "下证时间",
         dataIndex: "licenceTime",
         key: "licenceTime",
-        render:(value)=>(
-            <div style={{width:'80px'}}>{value}</div>
+        render: (value) => (
+            <div style={{ width: '80px' }}>{value}</div>
         )
     },
     {
@@ -222,7 +222,7 @@ const doubleSoft = [
         title: "项目状态",
         dataIndex: "projectStatus",
         key: "projectStatus",
-        render:(value)=>(
+        render: (value) => (
             getProjectName(value)
         )
     },
@@ -232,7 +232,7 @@ const doubleSoft = [
         key: "specialComment",
         render: (v) => (
             <Tooltip placement="topRight" title={v} overlayStyle={{
-                wordBreak:'break-all'
+                wordBreak: 'break-all'
             }}>
                 <div style={{
                     maxWidth: '120px',
@@ -311,15 +311,15 @@ const softWriting = [
         title: "项目数量/下证数",
         dataIndex: "commodityQuantity",
         key: "commodityQuantity",
-        render:(value,record)=>(
-                value+'/'+record.certificatesCount
+        render: (value, record) => (
+            value + '/' + record.certificatesCount
         )
     },
     {
         title: "有无材料",
         dataIndex: "ifMaterial",
         key: "ifMaterial",
-        render: (value)=>(
+        render: (value) => (
             value === 1 ? '有' : value === 0 ? '无' : ''
         )
     },
@@ -327,7 +327,7 @@ const softWriting = [
         title: "加急天数",
         dataIndex: "urgentDay",
         key: "urgentDay",
-        render: (value)=>(
+        render: (value) => (
             value === 1 ? '有' : value === 0 ? '无' : ''
         )
     },
@@ -335,8 +335,8 @@ const softWriting = [
         title: "下证时间",
         dataIndex: "licenceTime",
         key: "licenceTime",
-        render:(value)=>(
-            <div style={{width:'80px'}}>{value}</div>
+        render: (value) => (
+            <div style={{ width: '80px' }}>{value}</div>
         )
     },
     {
@@ -364,7 +364,7 @@ const softWriting = [
         title: "项目状态",
         dataIndex: "projectStatus",
         key: "projectStatus",
-        render:(value)=>(
+        render: (value) => (
             getProjectName(value)
         )
     },
@@ -374,7 +374,7 @@ const softWriting = [
         key: "specialComment",
         render: (v) => (
             <Tooltip placement="topRight" title={v} overlayStyle={{
-                wordBreak:'break-all'
+                wordBreak: 'break-all'
             }}>
                 <div style={{
                     maxWidth: '120px',
@@ -388,7 +388,7 @@ const softWriting = [
 ];
 
 // 专利
-const patent =[
+const patent = [
     {
         title: "序号",
         dataIndex: "key",
@@ -453,16 +453,16 @@ const patent =[
         title: "项目数量/下证数",
         dataIndex: "commodityQuantity",
         key: "commodityQuantity",
-        render:(value,record)=>(
-                value+'/'+record.certificatesCount
+        render: (value, record) => (
+            value + '/' + record.certificatesCount
         )
     },
     {
         title: "是否高新",
         dataIndex: "highTechstatus",
         key: "highTechstatus",
-        render:(value)=>(
-                value === 1 ? '是' : value === 0 ? '否' : ''
+        render: (value) => (
+            value === 1 ? '是' : value === 0 ? '否' : ''
         )
     },
     {
@@ -494,8 +494,8 @@ const patent =[
         title: "下证时间",
         dataIndex: "licenceTime",
         key: "licenceTime",
-        render:(value)=>(
-            <div style={{width:'80px'}}>{value}</div>
+        render: (value) => (
+            <div style={{ width: '80px' }}>{value}</div>
         )
     },
     {
@@ -518,7 +518,7 @@ const patent =[
         title: "项目状态",
         dataIndex: "projectStatus",
         key: "projectStatus",
-        render:(value)=>(
+        render: (value) => (
             getProjectName(value)
         )
     },
@@ -528,7 +528,7 @@ const patent =[
         key: "specialComment",
         render: (v) => (
             <Tooltip placement="topRight" title={v} overlayStyle={{
-                wordBreak:'break-all'
+                wordBreak: 'break-all'
             }}>
                 <div style={{
                     maxWidth: '120px',
@@ -547,11 +547,13 @@ const currency = [
         title: "序号",
         dataIndex: "key",
         key: "key",
+        isNoD: true,
     },
     {
         title: "派单时间",
         dataIndex: "distributionTime",
-        key: "distributionTime"
+        key: "distributionTime",
+        width: 80,
     },
     {
         title: "派单省份",
@@ -561,7 +563,8 @@ const currency = [
     {
         title: "订单部门",
         dataIndex: "depName",
-        key: "depName"
+        key: "depName",
+        isNoD: true,
     },
     {
         title: "营销员",
@@ -601,7 +604,8 @@ const currency = [
     {
         title: "负责部门",
         dataIndex: "techDepName",
-        key: "techDepName"
+        key: "techDepName",
+        isNoD: true,
     },
     {
         title: "咨询师/咨询经理",
@@ -613,7 +617,7 @@ const currency = [
         title: "项目状态",
         dataIndex: "projectStatus",
         key: "projectStatus",
-        render:(value)=>(
+        render: (value) => (
             getProjectName(value)
         )
     },
@@ -626,18 +630,19 @@ const currency = [
         title: "项目说明",
         dataIndex: "specialComment",
         key: "specialComment",
-        render: (v) => (
-            <Tooltip placement="topRight" title={v} overlayStyle={{
-                wordBreak:'break-all'
-            }}>
-                <div style={{
-                    maxWidth: '120px',
-                    overflow: "hidden",
-                    textOverflow: "ellipsis",
-                    whiteSpace: "nowrap",
-                }}>{v}</div>
-            </Tooltip>
-        )
+        width: 300,
+        // render: (v) => (
+        //     <Tooltip placement="topRight" title={v} overlayStyle={{
+        //         wordBreak: 'break-all'
+        //     }}>
+        //         <div style={{
+        //             maxWidth: '120px',
+        //             overflow: "hidden",
+        //             textOverflow: "ellipsis",
+        //             whiteSpace: "nowrap",
+        //         }}>{v}</div>
+        //     </Tooltip>
+        // )
     },
 ];