12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622 |
- 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",
- render: (text, record) => {
- return (
- <div style={{ maxWidth: 200 }}>
- {text}
- {!!record.serviceLife && <span>{"-" + record.serviceLife}</span>}
- {!!record.yearSum && <span>{",共" + record.yearSum + "年"}</span>}
- {!!record.serviceYear && <span>{",本次" + record.serviceYear}</span>}
- </div>
- )
- }
- },
- {
- 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;
|