1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612 |
- import React from 'react';
- import {
- DatePicker,
- Tooltip,
- Button,
- AutoComplete,
- Input,
- Select,
- Spin,
- Table,
- message,
- Form,
- Tabs,
- Switch
- } from 'antd';
- import $ from 'jquery/src/ajax';
- import moment from 'moment';
- import { ShowModal, getApprovedState, getWhether, getLiquidationStatus } from "@/tools.js";
- import { projectStatusList, salesList } from "@/dataDic";
- import { citySelect } from "../../../NewDicProvinceList";
- import ShowModalDiv from "@/showModal.jsx";
- import { ChooseList } from "../../order/orderNew/chooseList";
- import StaffSearch from '../../../../component/common/staffSearch';
- import Cascaders from "../../../common/cascaders";
- import './index.less';
- const TabPane = Tabs.TabPane;
- const { RangePicker, MonthPicker } = DatePicker;
- const ProjecDataStatistics = Form.create()(React.createClass({
- getInitialState() {
- return {
- searchValues: {},
- loading: false,
- exportPendingLoading: false,
- changeList: undefined,
- dataSource: [],
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- columns: [
- {
- title: "销售类型",
- dataIndex: "salesType",
- key: "salesType",
- render: (text, record) => {
- const obj = {
- children: <Tooltip title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}>
- <span>
- {salesList[text]}
- </span>
- </Tooltip>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- },
- },
- {
- title: "订单类型",
- dataIndex: "serviceType",
- key: "serviceType",
- render: (text, record) => {
- const obj = {
- children: <div style={{ maxWidth: 200 }}>{text}</div>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "结算状态",
- dataIndex: "liquidationStatus",
- key: "liquidationStatus",
- render: (text, record) => {
- const obj = {
- children: getLiquidationStatus(text),
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "催款节点",
- dataIndex: "dunNodeContent",
- key: "dunNodeContent",
- render: (text, record) => {
- const obj = {
- children: <div style={{ maxWidth: 200 }}>{text}</div>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '是否会员',
- dataIndex: 'projectType',
- key: 'projectType',
- render: (text, record) => {
- const obj = {
- children: getWhether(text),
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '是否大客户',
- dataIndex: 'bigCustomer',
- key: 'bigCustomer',
- render: (text, record) => {
- const obj = {
- children: getWhether(text),
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "是否特批",
- dataIndex: "approval",
- key: "approval",
- render: (text, record) => {
- const obj = {
- children: getApprovedState(text),
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '签单时间',
- dataIndex: 'signTime',
- key: 'signTime',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "派单时间",
- dataIndex: "createTime",
- key: "createTime",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '公司名称',
- dataIndex: 'buyerName',
- key: 'buyerName',
- render: (text, record) => {
- const obj = {
- children: <Tooltip title={text}>
- <div style={{ maxWidth: 200 }}>{text}</div>
- </Tooltip>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "合同编号",
- dataIndex: "contractNo",
- key: "contractNo",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '合同类型',
- dataIndex: 'htlx',
- key: 'htlx',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '省份',
- dataIndex: 'province',
- key: 'province',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "派单公司",
- dataIndex: "depName",
- key: "depName",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '签单金额',
- dataIndex: 'totalAmount',
- key: 'totalAmount',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '合同收款比例',
- dataIndex: 'contractAmountProportion',
- key: 'contractAmountProportion',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '应收款',
- dataIndex: 'orderReceivables',
- key: 'orderReceivables',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: '已收款',
- dataIndex: 'settlementAmount',
- key: 'settlementAmount',
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "欠款",
- dataIndex: "arrearsAmount",
- key: "arrearsAmount",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "已报销",
- dataIndex: "expenseAmount",
- key: "expenseAmount",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "应公出/已公出/超出",
- dataIndex: "shouldPublic",
- key: "shouldPublic",
- render: (text, record) => {
- const obj = {
- children: <span>
- {text + " / " + record.alreadyPublic + " / " + record.exceedPublic}
- </span>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "总成本/实付",
- dataIndex: "costAmount",
- key: "costAmount",
- render: (text, record) => {
- const obj = {
- children: <span>
- {text + " / " + record.paymentAmount}
- </span>,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "已开票金额",
- dataIndex: "invicueAmount",
- key: "invicueAmount",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "退款金额",
- dataIndex: "refundAmount",
- key: "refundAmount",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "财务负责人",
- dataIndex: "financeName",
- key: "financeName",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "营销负责人",
- dataIndex: "salesmanName",
- key: "salesmanName",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- },
- {
- title: "项目转入时间",
- dataIndex: "taskDistributionTime",
- key: "taskDistributionTime",
- },
- {
- title: "是否重报",
- dataIndex: "restatementType",
- key: "restatementType",
- },
- {
- title: "是否科技项目",
- dataIndex: "sortType",
- key: "sortType",
- },
- {
- title: "项目数",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- },
- {
- title: "项目成本",
- dataIndex: "projectCostAmount",
- key: "projectCostAmount",
- },
- {
- title: "项目状态",
- dataIndex: "projectStatus",
- key: "projectStatus",
- },
- {
- title: "项目启动时间",
- dataIndex: "taskStartTime",
- key: "taskStartTime",
- },
- {
- title: "项目完成时间",
- dataIndex: "taskEndTime",
- key: "taskEndTime",
- },
- // {
- // title: "技术组",
- // dataIndex: "expenseAmount",
- // key: "expenseAmount",
- // },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "满意度",
- dataIndex: "satisfactionDegree",
- key: "satisfactionDegree",
- render: text => {
- return (
- <span>{["非常满意", "满意", "一般", "不满意"][text]}</span>
- )
- }
- },
- {
- title: "项目备注",
- dataIndex: "taskComment",
- key: "taskComment",
- render: text => {
- return (
- <div style={{ maxWidth: 220 }}>{text}</div>
- )
- }
- },
- {
- title: "核算比例",
- dataIndex: "hsbl",
- key: "hsbl",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "订单情况",
- dataIndex: "orderStatus",
- key: "orderStatus",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "变更情况",
- dataIndex: "changeType",
- key: "changeType",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- {
- title: "退单退款",
- dataIndex: "refundType",
- key: "refundType",
- render: (text, record) => {
- const obj = {
- children: text,
- props: {
- rowSpan: record.rowSpan || 0
- }
- }
- return obj
- }
- },
- ],
- dataSource: [],
- departmentArr: [],
- searchMore: false,
- };
- },
- componentWillMount() {
- this.departmentList();
- this.selectSuperId();
- this.loadData();
- },
- loadData(pageNo) {
- const { searchValues, pagination } = this.state;
- this.setState({
- loading: true,
- });
- let datas = Object.assign(searchValues, {
- pageNo: pageNo || 1,
- pageSize: pagination.pageSize,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/statistis/orderProject",
- data: datas,
- success: function (data) {
- ShowModal(this);
- this.setState({
- loading: false,
- });
- if (data.error && data.error.length === 0) {
- if (data.data.list) {
- pagination.current = data.data.pageNo;
- pagination.total = data.data.totalCount;
- if (data.data && data.data.list && !data.data.list.length) {
- pagination.current = 0;
- pagination.total = 0;
- }
- let dList = this.handleData(data.data.list, "contractNo")
- this.setState({
- dataSource: dList,
- pagination: this.state.pagination,
- pageNo: data.data.pageNo,
- });
- } else {
- this.setState({
- dataSource: data.data,
- pagination: false,
- });
- }
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 部门
- departmentList() {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
- data: {},
- success: function (data) {
- let thedata = data.data;
- let theArr = [];
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- } else {
- thedata.map(function (item, index) {
- theArr.push({
- key: index,
- name: item.name,
- id: item.id,
- });
- });
- }
- this.setState({
- departmentArr: theArr,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 项目类别
- selectSuperId() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
- data: {
- flag: 0
- },
- success: function (data) {
- let theArr = [];
- let thedata = data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- }
- for (let i = 0; i < data.data.length; i++) {
- let theData = data.data[i];
- theArr.push(
- <Select.Option value={theData.id} key={theData.cname}>
- {theData.cname}
- </Select.Option>
- );
- }
- this.setState({
- contactsOption: theArr,
- contactsOptionData: data.data,
- });
- }.bind(this)
- }).always(
- );
- },
- changeList(arr) {
- const newArr = [];
- let list = this.state.columns
- list.forEach((item) => {
- arr.forEach((val) => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr,
- });
- },
- exportAll() {
- message.config({
- duration: 20,
- });
- let loading = message.loading("下载中...");
- this.setState({
- exportPendingLoading: true,
- });
- let data = JSON.parse(JSON.stringify(this.state.searchValues));
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: "/api/admin/statistis/orderProject/export",
- data,
- success: function (data) {
- if (data.error.length === 0) {
- this.download(data.data);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- loading();
- this.setState({
- exportPendingLoading: false,
- });
- }.bind(this)
- );
- },
- download(fileName) {
- window.location.href =
- globalConfig.context + "/open/download?fileName=" + fileName;
- },
- handleData(array, key) {
- if (array.length === 0) return
- let arr = [...array]
- let startItem = arr[0]
- startItem.rowSpan = 1
- arr.forEach((item, index) => {
- let nextItem = arr[index + 1] || {}
- if (item[key] === nextItem[key]) {
- startItem.rowSpan++
- } else {
- startItem = nextItem
- startItem.rowSpan = 1
- }
- })
- return arr
- },
- search() {
- this.loadData();
- },
- reset() {
- this.setState({
- financeName: "",
- salesmanName: "",
- techName: "",
- searchValues: JSON.parse(JSON.stringify({})),
- }, () => {
- // this.Cascaders1.empty();
- // this.Cascaders2.empty();
- this.StaffSearch1.httpChange("");
- this.StaffSearch2.httpChange("");
- this.StaffSearch3.httpChange("");
- this.loadData();
- })
- },
- render() {
- const { searchValues } = this.state
- let departmentArr = this.state.departmentArr || [];
- const getRowClassName = (record, index) => {
- // 根据某些条件返回不同的类名
- if (index % 10 + 1 === 1) {
- return 'even-row1';
- } else if (index % 10 + 1 === 2) {
- return 'even-row2';
- } else if (index % 10 + 1 === 3) {
- return 'even-row3';
- } else if (index % 10 + 1 === 4) {
- return 'even-row4';
- } else if (index % 10 + 1 === 5) {
- return 'even-row5';
- } else if (index % 10 + 1 === 6) {
- return 'even-row6';
- } else if (index % 10 + 1 === 7) {
- return 'even-row7';
- } else if (index % 10 + 1 === 8) {
- return 'even-row8';
- } else if (index % 10 + 1 === 9) {
- return 'even-row9';
- } else if (index % 10 + 1 === 10) {
- return 'even-row10';
- }
- };
- return (
- <div className="user-content">
- <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
- <div className="content-title" style={{ marginBottom: 10 }}>
- <span style={{ fontWeight: 900, fontSize: 16 }}>项目数据统计</span>
- </div>
- <div className="user-search">
- <Tabs
- defaultActiveKey="1"
- className="test">
- <TabPane tab="搜索" key="1">
- <div
- className="user-search"
- style={{
- marginTop: "10px",
- marginLeft: "10px",
- marginRight: "10px",
- }}
- >
- <Input
- placeholder="订单编号"
- style={{
- width: 220,
- marginRight: "10px",
- }}
- value={searchValues["orderNo"]
- ? searchValues["orderNo"]
- : ""}
- onChange={(e) => {
- searchValues["orderNo"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <Input
- placeholder="合同编号"
- style={{
- width: 220,
- marginRight: "10px",
- }}
- value={searchValues["contractNo"]
- ? searchValues["contractNo"]
- : ""}
- onChange={(e) => {
- searchValues["contractNo"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <Input
- placeholder="企业名称"
- style={{
- width: 220,
- marginRight: "10px",
- }}
- value={searchValues["userName"]
- ? searchValues["userName"]
- : ""}
- onChange={(e) => {
- searchValues["userName"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <Select
- placeholder="项目分类"
- style={{ width: 220 }}
- value={searchValues["businessCategory"]
- ? searchValues["businessCategory"]
- : undefined}
- onChange={(e) => {
- searchValues["businessCategory"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {this.state.contactsOption}
- </Select>
- <Input
- placeholder="项目名称"
- value={searchValues["projectName"]
- ? searchValues["projectName"]
- : ""}
- style={{ width: 220, marginRight: 10 }}
- onChange={e => {
- searchValues["projectName"] = e.target.value
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <span style={{ display: !this.state.searchMore && "none" }}>
- <span
- style={{
- display: "inline-block",
- }}
- >
- <span style={{ marginBottom: "10px" }}>订单部门:</span>
- <Select
- placeholder="选择订单部门"
- style={{ width: 170, }}
- value={searchValues["depId"]
- ? searchValues["depId"]
- : undefined}
- onChange={(e) => {
- searchValues["depId"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {departmentArr.map(function (item) {
- return (
- <Select.Option key={item.id}>{item.name}</Select.Option>
- );
- })}
- </Select>
- {/* <Cascaders
- ref={ref => this.Cascaders1 = ref}
- placeholder="请选择订单部门"
- height={28}
- width={170}
- onSel={(e) => {
- searchValues["deps"] = JSON.stringify(e)
- this.setState({
- searchValues: searchValues,
- });
- }}
- /> */}
- </span>
- <span
- style={{
- display: "inline-block",
- }}
- >
- <span style={{ marginBottom: "10px" }}>负责部门:</span>
- <Select
- placeholder="选择负责部门"
- style={{ width: 170, }}
- value={searchValues["liabilitiesDepId"]
- ? searchValues["liabilitiesDepId"]
- : undefined}
- onChange={(e) => {
- searchValues["liabilitiesDepId"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {departmentArr.map(function (item) {
- return (
- <Select.Option key={item.id}>{item.name}</Select.Option>
- );
- })}
- </Select>
- {/* <Cascaders
- ref={ref => this.Cascaders2 = ref}
- placeholder="请选择负责部门"
- height={28}
- width={170}
- onSel={(e) => {
- searchValues["thchDeps"] = JSON.stringify(e)
- this.setState({
- searchValues: searchValues,
- });
- }}
- /> */}
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px", marginBottom: "10px" }}>
- 申报批次:
- </span>
- <Select
- value={searchValues["declarationBatch"]
- ? searchValues["declarationBatch"]
- : undefined}
- placeholder="请选择批次"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["declarationBatch"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value={1}>第一批</Option>
- <Option value={2}>第二批</Option>
- <Option value={3}>第三批</Option>
- <Option value={4}>第四批</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 项目金额:
- </span>
- <Select
- value={searchValues["projectAmountType"]
- ? searchValues["projectAmountType"]
- : undefined}
- placeholder="请选择项目金额"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["projectAmountType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value={1}>1万以下</Option>
- <Option value={2}>1~5万</Option>
- <Option value={3}>5~10万</Option>
- <Option value={4}>10~20万</Option>
- <Option value={5}>20万以上</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 项目状态:
- </span>
- <Select
- value={(searchValues["projectStatus"] || searchValues["projectStatus"] == 0)
- ? searchValues["projectStatus"]
- : undefined}
- placeholder="请选择项目状态"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["projectStatus"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {
- projectStatusList.map((item) =>
- <Option value={item.value} key={item.value}>{item.label}</Option>
- )
- }
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 满 意 度:
- </span>
- <Select
- value={searchValues["satisfactionDegree"]
- ? searchValues["satisfactionDegree"]
- : undefined}
- placeholder="请选择满意度"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["satisfactionDegree"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">非常满意</Option>
- <Option value="1">满意</Option>
- <Option value="2">一般</Option>
- <Option value="3">不满意</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 派单时间:
- </span>
- <RangePicker
- allowClear={false}
- style={{ marginRight: "10px", width: 250 }}
- value={[
- searchValues["startDate"]
- ? moment(searchValues["startDate"])
- : null,
- searchValues["endDate"]
- ? moment(searchValues["endDate"])
- : null,
- ]}
- onChange={(data, dataString) => {
- searchValues["startDate"] = String(
- dataString[0]
- );
- searchValues["endDate"] = String(
- dataString[1]
- );
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 项目转入时间:
- </span>
- <RangePicker
- allowClear={false}
- style={{ marginRight: "10px", width: 250 }}
- value={[
- searchValues["projectStartDate"]
- ? moment(searchValues["projectStartDate"])
- : null,
- searchValues["projectEndDate"]
- ? moment(searchValues["projectEndDate"])
- : null,
- ]}
- onChange={(data, dataString) => {
- searchValues["projectStartDate"] = String(
- dataString[0]
- );
- searchValues["projectEndDate"] = String(
- dataString[1]
- );
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 销售类型:
- </span>
- <Select
- value={searchValues["salesType"]
- ? searchValues["salesType"]
- : undefined}
- placeholder="请选择销售类型"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["salesType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">电话新开发</Option>
- <Option value="1">电话自带资源</Option>
- <Option value="2">网络</Option>
- <Option value="3">渠道</Option>
- <Option value="4">转介绍</Option>
- <Option value="5">其他</Option>
- <Option value="6">高新复购</Option>
- <Option value="7">其他复购</Option>
- <Option value="8">私有/渠道</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 订单类型:
- </span>
- <Input
- placeholder="请输入订单类型"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- value={searchValues["serviceType"]
- ? searchValues["serviceType"]
- : ""}
- onChange={(e) => {
- searchValues["serviceType"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 结算状态:
- </span>
- <Select
- value={searchValues["liquidationStatus"]
- ? searchValues["liquidationStatus"]
- : undefined}
- placeholder="请选择结算状态"
- style={{
- width: 150,
- marginRight: "10px",
- }}
- onChange={(e) => {
- searchValues["liquidationStatus"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">首付待付请</Option>
- <Option value="1">尾款待付清</Option>
- <Option value="2">已付清</Option>
- <Option value="3">部分退款</Option>
- <Option value="4">全部退款</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 催款节点:
- </span>
- <Select
- placeholder={"催款节点"}
- style={{ width: 150 }}
- value={searchValues["dunType"]
- ? searchValues["dunType"]
- : undefined}
- onChange={(e) => {
- searchValues["dunType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">未启动</Option>
- <Option value="1">已启动</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 签单时间:
- </span>
- <RangePicker
- allowClear={false}
- style={{ marginRight: "10px", width: 250 }}
- value={[
- searchValues["signStartDate"]
- ? moment(searchValues["signStartDate"])
- : null,
- searchValues["signEndDate"]
- ? moment(searchValues["signEndDate"])
- : null,
- ]}
- onChange={(data, dataString) => {
- searchValues["signStartDate"] = String(
- dataString[0]
- );
- searchValues["signEndDate"] = String(
- dataString[1]
- );
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 项目完成时间:
- </span>
- <RangePicker
- allowClear={false}
- style={{ marginRight: "10px", width: 250 }}
- value={[
- searchValues["projectCompleteStartTime"]
- ? moment(searchValues["projectCompleteStartTime"])
- : null,
- searchValues["projectCompleteEndTime"]
- ? moment(searchValues["projectCompleteEndTime"])
- : null,
- ]}
- onChange={(data, dataString) => {
- searchValues["projectCompleteStartTime"] = String(
- dataString[0]
- );
- searchValues["projectCompleteEndTime"] = String(
- dataString[1]
- );
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否特批:
- </span>
- <Select
- placeholder={"是否特批"}
- style={{ width: 150 }}
- value={searchValues["approval"]
- ? searchValues["approval"]
- : undefined}
- onChange={(e) => {
- searchValues["approval"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否会员:
- </span>
- <Select
- placeholder={"是否会员"}
- style={{ width: 150 }}
- value={searchValues["projectType"]
- ? searchValues["projectType"]
- : undefined}
- onChange={(e) => {
- searchValues["projectType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否重报:
- </span>
- <Select
- placeholder={"是否重报"}
- style={{ width: 150 }}
- value={searchValues["restatement"]
- ? searchValues["restatement"]
- : undefined}
- onChange={(e) => {
- searchValues["restatement"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否变更:
- </span>
- <Select
- placeholder={"是否变更"}
- style={{ width: 150 }}
- value={searchValues["changeType"]
- ? searchValues["changeType"]
- : undefined}
- onChange={(e) => {
- searchValues["changeType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否退单:
- </span>
- <Select
- placeholder={"是否退单"}
- style={{ width: 150 }}
- value={searchValues["refundType"]
- ? searchValues["refundType"]
- : undefined}
- onChange={(e) => {
- searchValues["refundType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否大客户:
- </span>
- <Select
- placeholder={"是否大客户"}
- style={{ width: 150 }}
- value={searchValues["bigCustomer"]
- ? searchValues["bigCustomer"]
- : undefined}
- onChange={(e) => {
- searchValues["bigCustomer"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 是否科技项目:
- </span>
- <Select
- placeholder={"是否科技项目"}
- style={{ width: 150 }}
- value={searchValues["orderType"]
- ? searchValues["orderType"]
- : undefined}
- onChange={(e) => {
- searchValues["orderType"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">否</Option>
- <Option value="1">是</Option>
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 省份选择:
- </span>
- <Select
- placeholder="请选择省份"
- style={{
- width: 150,
- }}
- value={searchValues["province"]
- ? searchValues["province"]
- : undefined}
- onChange={(e) => {
- searchValues["province"] = e
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {citySelect().map(function (item) {
- return (
- <Select.Option key={item.value} value={item.value}>
- {item.label}
- </Select.Option>
- );
- })}
- </Select>
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 财务负责人:
- </span>
- <StaffSearch
- ref={ref => this.StaffSearch1 = ref}
- valueName={this.state.financeName}
- placeholder="财务负责人"
- width="150px"
- onBlurText={e => {
- this.setState({
- financeName: e.title
- })
- }}
- onBlurChange={(obj) => {
- searchValues["financeId"] = obj.value
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 营销负责人:
- </span>
- <StaffSearch
- ref={ref => this.StaffSearch2 = ref}
- valueName={this.state.salesmanName}
- placeholder="营销负责人"
- width="150px"
- onBlurText={e => {
- this.setState({
- salesmanName: e.title
- })
- }}
- onBlurChange={(obj) => {
- searchValues["salesmanId"] = obj.value
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- <span style={{ display: "inline-block" }}>
- <span style={{ marginRight: "10px" }}>
- 技术负责人:
- </span>
- <StaffSearch
- ref={ref => this.StaffSearch3 = ref}
- valueName={this.state.techName}
- placeholder="技术负责人"
- width="150px"
- onBlurText={e => {
- this.setState({
- techName: e.title
- })
- }}
- onBlurChange={(obj) => {
- searchValues["techId"] = obj.value
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- </span>
- </span>
- <Button type="primary" onClick={this.search} style={{ marginRight: 10 }}>
- 搜索
- </Button>
- <Button onClick={this.reset}>重置</Button>
- <span style={{ marginLeft: '10px', marginRight: '20px' }}>
- 更多搜索
- <Switch
- checked={this.state.searchMore}
- onChange={() => {
- this.setState({
- searchMore: !this.state.searchMore
- })
- }}
- />
- </span>
- </div>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="2">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- {adminData.isSuperAdmin ?
- <TabPane tab="导出EXCEL" key="3">
- <Button
- type="primary"
- loading={this.state.exportPendingLoading}
- onClick={this.exportAll}
- style={{ margin: 10 }}
- >
- 导出excel
- </Button>
- </TabPane>
- : ""}
- </Tabs>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.changeList
- ? this.state.changeList
- : this.state.columns}
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- bordered
- // rowClassName={getRowClassName}
- scroll={{ x: 4000 }}
- />
- </Spin>
- </div>
- </div >
- );
- }
- }));
- export default ProjecDataStatistics;
|