highTech.jsx 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. import React, { Component } from "react";
  2. import {
  3. Button,
  4. DatePicker,
  5. Input,
  6. message,
  7. Select,
  8. Spin,
  9. Table,
  10. Tabs,
  11. Cascader,
  12. AutoComplete,
  13. Modal,
  14. } from "antd";
  15. import { ShowModal, getApprovedType } from "@/tools";
  16. import { ChooseList } from "../../order/orderNew/chooseList";
  17. import $ from "jquery/src/ajax";
  18. import moment from "moment";
  19. import {
  20. member,
  21. highTechColumns,
  22. doubleSoft,
  23. softWriting,
  24. patent,
  25. audit,
  26. currency,
  27. } from "./highTechConfig";
  28. import { projectStatusList, approvalOptions } from "@/dataDic";
  29. import ProjectDetails from "./projectDetails";
  30. import Cascaders from "../../../common/cascaders";
  31. const { TabPane } = Tabs;
  32. const { RangePicker } = DatePicker;
  33. const { Option } = Select;
  34. class HighTech extends Component {
  35. constructor(props) {
  36. super(props);
  37. this.state = {
  38. dataScore: {},
  39. score: "",
  40. approvaType: [],
  41. tbaindex: 1,
  42. loading: false,
  43. changeList: undefined,
  44. columns: currency(this.showD.bind(this)),
  45. status: 0,
  46. page: 1,
  47. pagination: {
  48. defaultCurrent: 1,
  49. defaultPageSize: 10,
  50. showQuickJumper: true,
  51. pageSize: 10,
  52. onChange: function (page) {
  53. this.loadData(page);
  54. }.bind(this),
  55. showTotal: function (total) {
  56. return "共" + total + "条数据";
  57. },
  58. },
  59. dataSource: [],
  60. releaseDate: [],
  61. searchOrderNo: "",
  62. searchContractNo: "",
  63. searchEnterpriseName: "",
  64. declarationBatch: "",
  65. projectSituation: "",
  66. projectAmount: "",
  67. deps: "",
  68. thchDeps: "",
  69. projectType: "",
  70. projectStatus: "",
  71. departmentArr: [],
  72. contactsOption: [],
  73. contactsOptionData: [],
  74. visible: false,
  75. };
  76. this.resetAll = this.resetAll.bind(this);
  77. this.changeList = this.changeList.bind(this);
  78. this.loadData = this.loadData.bind(this);
  79. this.selectSuperId = this.selectSuperId.bind(this);
  80. this.supervisor = this.supervisor.bind(this);
  81. this.httpChange = this.httpChange.bind(this);
  82. this.selectAuto = this.selectAuto.bind(this);
  83. this.blurChange = this.blurChange.bind(this);
  84. this.hidD = this.hidD.bind(this);
  85. }
  86. showD(record) {
  87. this.setState({
  88. loading: true,
  89. })
  90. $.ajax({
  91. method: "get",
  92. dataType: "json",
  93. crossDomain: false,
  94. url: globalConfig.context + "/api/admin/taskScore/queryByTid",
  95. data: {
  96. tid: record.id,
  97. },
  98. success: function (data) {
  99. if (data.error.length) {
  100. this.setState({
  101. loading: false,
  102. });
  103. message.warning(data.error[0].message);
  104. } else {
  105. if (!data.data) {
  106. this.setState({
  107. score: "",
  108. })
  109. } else {
  110. this.setState({
  111. score: "selcet",
  112. cSort: record.cSort,
  113. cname: record.pname,
  114. tname: record.techName,
  115. dataScore: data.data,
  116. });
  117. }
  118. }
  119. }.bind(this),
  120. }).always(
  121. function () {
  122. this.setState({
  123. loading: false,
  124. });
  125. }.bind(this)
  126. );
  127. }
  128. hidD() {
  129. this.setState({
  130. score: ""
  131. });
  132. }
  133. changeList(arr) {
  134. const newArr = [];
  135. this.state.columns.forEach((item) => {
  136. arr.forEach((val) => {
  137. if (val === item.title) {
  138. newArr.push(item);
  139. }
  140. });
  141. });
  142. this.setState({
  143. changeList: newArr,
  144. });
  145. }
  146. loadData(pageNo = "") {
  147. this.setState({
  148. loading: true,
  149. });
  150. $.ajax({
  151. method: "get",
  152. dataType: "json",
  153. crossDomain: false,
  154. url: globalConfig.context + "/api/admin/statistis/selectTaskList",
  155. data: this.props.searchData
  156. ? Object.assign(
  157. {
  158. pageNo: pageNo || 1,
  159. pageSize: this.state.pagination.pageSize || 10,
  160. },
  161. this.props.searchData
  162. )
  163. :
  164. {
  165. pageNo: pageNo || 1,
  166. pageSize: this.state.pagination.pageSize || 10,
  167. startDate:
  168. this.state.releaseDate.length > 0
  169. ? this.state.releaseDate[0]
  170. : undefined, //开始时间
  171. endDate:
  172. this.state.releaseDate.length > 0
  173. ? this.state.releaseDate[1]
  174. : undefined, //结束时间
  175. deps: this.state.deps || undefined, //部门ID
  176. thchDeps: this.state.thchDeps || undefined, //责任部门ID
  177. projectStatus: this.state.projectStatus || undefined, //项目类别
  178. projectType: !this.state.projectType ? undefined : this.state.projectType, //项目分类
  179. orderNo: this.state.searchOrderNo || undefined, //订单编号
  180. contractNo: this.state.searchContractNo || undefined, //合同编号
  181. userName: this.state.searchEnterpriseName || undefined, //企业名称
  182. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  183. projectSituation:
  184. typeof this.state.projectSituation === "number"
  185. ? this.state.projectSituation
  186. : undefined, //项目分类
  187. projectAmount: this.state.projectAmount || undefined, //项目金额
  188. status: this.state.status,
  189. thchId: this.state.thchId || undefined, //咨询师/咨询经理id
  190. taskProjectStatus: this.state.taskProjectStatus || undefined,//项目状态
  191. sdStatus: this.state.sdStatus,//满意度
  192. type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型
  193. },
  194. success: function (data) {
  195. ShowModal(this);
  196. let theArr = [];
  197. if (!data.data || !data.data.list) {
  198. if (data.error && data.error.length) {
  199. message.warning(data.error[0].message);
  200. }
  201. } else {
  202. for (let i = 0; i < data.data.list.length; i++) {
  203. let thisdata = data.data.list[i];
  204. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  205. theArr.push(thisdata);
  206. }
  207. this.state.pagination.current = data.data.pageNo;
  208. this.state.pagination.total = data.data.totalCount;
  209. if (data.data && data.data.list && !data.data.list.length) {
  210. this.state.pagination.current = 0;
  211. this.state.pagination.total = 0;
  212. }
  213. this.setState({
  214. pagination: this.state.pagination,
  215. page: pageNo,
  216. dataSource: theArr,
  217. });
  218. }
  219. }.bind(this),
  220. }).always(
  221. function () {
  222. this.setState({
  223. loading: false,
  224. });
  225. }.bind(this)
  226. );
  227. }
  228. resetAll() {
  229. this.setState(
  230. {
  231. newArray: [],
  232. releaseDate: [],
  233. searchOrderNo: "",
  234. searchContractNo: "",
  235. searchEnterpriseName: "",
  236. declarationBatch: "",
  237. projectSituation: "",
  238. projectAmount: "",
  239. projectType: "",
  240. deps: "",
  241. thchDeps: "",
  242. projectStatus: "",
  243. columns: currency(this.showD.bind(this)),
  244. status: 0,
  245. thchId: "",
  246. auto: "",
  247. taskProjectStatus: "",
  248. sdStatus: undefined,
  249. approvaType: [],
  250. },
  251. () => {
  252. this.Cascaders1.empty();
  253. this.Cascaders2.empty();
  254. this.defaultcolumns();
  255. // this.loadData();
  256. }
  257. );
  258. }
  259. //项目类别
  260. selectSuperId() {
  261. $.ajax({
  262. method: "get",
  263. dataType: "json",
  264. crossDomain: false,
  265. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  266. data: {
  267. flag: 0,
  268. },
  269. success: function (data) {
  270. let theArr = [];
  271. let newTheArr = []
  272. let thedata = data.data;
  273. if (!thedata) {
  274. if (data.error && data.error.length) {
  275. message.warning(data.error[0].message);
  276. }
  277. }
  278. for (let i = 0; i < data.data.length; i++) {
  279. let theData = data.data[i];
  280. theArr.push(
  281. <Select.Option value={theData.id} key={theData.cname}>
  282. {theData.cname}
  283. </Select.Option>
  284. );
  285. let newChildren = []
  286. for (let j = 0; j < theData.typeList.length; j++) {
  287. newChildren.push({
  288. label: theData.typeList[j].name,
  289. value: theData.typeList[j].id,
  290. })
  291. }
  292. newTheArr.push({
  293. label: theData.cname,
  294. value: theData.id,
  295. children: newChildren
  296. })
  297. }
  298. this.setState({
  299. contactsOption: theArr,
  300. contactsOptionData: newTheArr,
  301. // contactsOptionData: data.data,
  302. });
  303. }.bind(this),
  304. }).always();
  305. }
  306. // 设置默认table(用来默认不显示某列数据 isNoD:true)
  307. defaultcolumns() {
  308. const newArr = [];
  309. this.state.columns.forEach((item) => {
  310. if (item.isNoD) {
  311. return
  312. } else {
  313. newArr.push(item);
  314. }
  315. });
  316. this.setState({
  317. changeList: newArr,
  318. }, () => {
  319. this.loadData();
  320. });
  321. }
  322. // 导出excel
  323. exportExec() {
  324. message.config({
  325. duration: 20,
  326. });
  327. let loading = message.loading("下载中...");
  328. this.setState({
  329. exportPendingLoading: true,
  330. });
  331. let data = {
  332. startDate:
  333. this.state.releaseDate.length > 0
  334. ? this.state.releaseDate[0]
  335. : undefined, //开始时间
  336. endDate:
  337. this.state.releaseDate.length > 0
  338. ? this.state.releaseDate[1]
  339. : undefined, //结束时间
  340. deps: this.state.deps || undefined, //部门ID
  341. thchDeps: this.state.thchDeps || undefined, //责任部门ID
  342. projectStatus: this.state.projectStatus || undefined, //项目类别
  343. projectType: !this.state.projectType ? undefined : this.state.projectType, //项目分类
  344. status: this.state.status,
  345. orderNo: this.state.searchOrderNo || undefined, //订单编号
  346. contractNo: this.state.searchContractNo || undefined, //合同编号
  347. userName: this.state.searchEnterpriseName || undefined, //企业名称
  348. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  349. projectAmount: this.state.projectAmount || undefined, //项目金额
  350. thchId: this.state.thchId || undefined, //咨询师/咨询经理id
  351. taskProjectStatus: this.state.taskProjectStatus || undefined,//项目状态
  352. sdStatus: this.state.sdStatus,//满意度
  353. type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型
  354. };
  355. $.ajax({
  356. method: "get",
  357. dataType: "json",
  358. crossDomain: false,
  359. url: "/api/admin/statistis/exporTaskList",
  360. data,
  361. success: function (data) {
  362. if (data.error.length === 0) {
  363. this.download(data.data);
  364. } else {
  365. message.warning(data.error[0].message);
  366. }
  367. }.bind(this),
  368. }).always(
  369. function () {
  370. loading();
  371. this.setState({
  372. exportPendingLoading: false,
  373. });
  374. }.bind(this)
  375. );
  376. }
  377. // 下载
  378. download(fileName) {
  379. window.location.href =
  380. globalConfig.context + "/open/download?fileName=" + fileName;
  381. }
  382. // 查询用户
  383. supervisor(e) {
  384. $.ajax({
  385. method: "get",
  386. dataType: "json",
  387. crossDomain: false,
  388. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  389. data: {
  390. adminName: e,
  391. },
  392. success: function (data) {
  393. let thedata = data.data;
  394. if (!thedata) {
  395. if (data.error && data.error.length) {
  396. message.warning(data.error[0].message);
  397. }
  398. thedata = {};
  399. }
  400. this.setState({
  401. customerArr: thedata,
  402. });
  403. }.bind(this),
  404. }).always(
  405. function () {
  406. }.bind(this)
  407. );
  408. }
  409. // 输入触发
  410. httpChange(e) {
  411. if (e.length >= 1) {
  412. this.supervisor(e);
  413. }
  414. this.setState({
  415. auto: e,
  416. });
  417. }
  418. // 选中
  419. selectAuto(value, options) {
  420. let thchId = ""
  421. let contactLists = this.state.customerArr || [];
  422. if (value) {
  423. contactLists.map(function (item) {
  424. if (item.name == value.toString()) {
  425. thchId = item.id;
  426. }
  427. });
  428. }
  429. this.setState({
  430. auto: value,
  431. thchId: thchId,
  432. });
  433. }
  434. // 失去焦点
  435. blurChange(e) {
  436. let thchId = ""
  437. let contactLists = this.state.customerArr || [];
  438. if (e) {
  439. contactLists.map(function (item) {
  440. if (item.name == e.toString()) {
  441. thchId = item.id;
  442. }
  443. });
  444. }
  445. this.setState({
  446. thchId: thchId,
  447. });
  448. }
  449. componentWillMount() {
  450. //
  451. if (!this.props.introduce) {
  452. this.defaultcolumns();
  453. this.selectSuperId();
  454. }
  455. if (this.props.searchData) {
  456. let e = this.props.searchData.projectType;
  457. this.setState({
  458. columns:
  459. e == "0"
  460. ? currency(this.showD.bind(this)) : e == "1"
  461. ? patent(this.showD.bind(this)) : e == "2"
  462. ? softWriting(this.showD.bind(this)) : e == "3"
  463. ? audit(this.showD.bind(this)) : e == "4"
  464. ? doubleSoft(this.showD.bind(this)) : e == "5"
  465. ? highTechColumns(this.showD.bind(this)) : e == "6"
  466. ? currency(this.showD.bind(this)) : e == "7"
  467. ? member(this.showD.bind(this)) : currency(this.showD.bind(this)),
  468. }, () => {
  469. this.defaultcolumns();
  470. });
  471. }
  472. }
  473. // 暂停项目 颜色
  474. suspendColor(record) {
  475. if (record.projectStatus == 29) {
  476. return 'light'
  477. } else {
  478. return 'dark'
  479. }
  480. }
  481. getScore(name, cSort, val) {
  482. let data = ""
  483. let list = []
  484. if (cSort == 6) {
  485. if (name == "zyd" || name == "gtl" || name == "ydhb") {
  486. list = [
  487. { title: name == "zyd" ? "很专业" : "很满意", list: [20, 19, 18, 17, 16, 15, 14, 13] },
  488. { title: name == "zyd" ? "专业" : "满意", list: [12, 11, 10, 9, 8, 7] },
  489. { title: "一般", list: [6, 5, 4, 3, 2, 1] },
  490. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  491. ]
  492. } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
  493. list = [
  494. { title: name == "xyd" ? "很速度" : "很满意", list: [10, 9, 8, 7] },
  495. { title: name == "xyd" ? "速度" : "满意", list: [6, 5, 4] },
  496. { title: "一般", list: [3, 2, 1] },
  497. { title: name == "xyd" ? "很慢" : "不满意", list: [0] },
  498. ]
  499. }
  500. } else {
  501. if (name == "zyd" || name == "gtl") {
  502. list = [
  503. { title: name == "zyd" ? "很专业" : "很满意", list: [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20] },
  504. { title: name == "zyd" ? "专业" : "满意", list: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10] },
  505. { title: "一般", list: [9, 8, 7, 6, 5, 4, 3, 2, 1] },
  506. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  507. ]
  508. } else if (name == "gcxx" || name == "fwtd") {
  509. list = [
  510. { title: "很满意", list: [15, 14, 13, 12, 11] },
  511. { title: "满意", list: [10, 9, 8, 7, 6] },
  512. { title: "一般", list: [5, 4, 3, 2, 1] },
  513. { title: "不满意", list: [0] },
  514. ]
  515. } else if (name == "xyd") {
  516. list = [
  517. { title: "很速度", list: [10, 9, 8, 7] },
  518. { title: "速度", list: [6, 5, 4] },
  519. { title: "一般", list: [3, 2, 1] },
  520. { title: "很慢", list: [0] },
  521. ]
  522. }
  523. }
  524. list.map(function (item) {
  525. if (item.list.includes(val)) {
  526. data = item.title + "(" + val + "分)"
  527. }
  528. })
  529. return data
  530. }
  531. render() {
  532. const dataSources = this.state.customerArr || [];
  533. const options = dataSources.map((group) => (
  534. <Select.Option key={group.id} value={group.name}>
  535. {group.name}
  536. </Select.Option>
  537. ));
  538. const approvaChildren = approvalOptions.map(i => (
  539. <Option key={i.value}>{i.label}</Option>
  540. ));
  541. return (
  542. <div className="user-content">
  543. {this.props.introduce ? (
  544. this.props.introduce()
  545. ) : (
  546. <div>
  547. <div className="content-title" style={{ marginBottom: 10 }}>
  548. <span style={{ fontWeight: 900, fontSize: 16 }}>
  549. 项目汇总表 (
  550. {this.state.status === 1
  551. ? "高新" : this.state.status === 2
  552. ? "双软" : this.state.status === 3
  553. ? "软著" : this.state.status === 4
  554. ? "专利" : this.state.status === 5
  555. ? "会员" : this.state.status === 6
  556. ? "审计" : "通用"}
  557. )
  558. </span>
  559. </div>
  560. <Tabs defaultActiveKey="1" className="test"
  561. onChange={e => {
  562. this.setState({
  563. tbaindex: e
  564. })
  565. }}
  566. >
  567. <TabPane tab="搜索" key="1">
  568. <div
  569. className="user-search"
  570. style={{
  571. marginTop: "10px",
  572. marginLeft: "10px",
  573. marginRight: "10px",
  574. }}
  575. >
  576. <Input
  577. placeholder="订单编号"
  578. style={{
  579. width: 220,
  580. marginRight: "10px",
  581. }}
  582. value={this.state.searchOrderNo}
  583. onChange={(e) => {
  584. this.setState({ searchOrderNo: e.target.value });
  585. }}
  586. />
  587. <Input
  588. placeholder="合同编号"
  589. style={{
  590. width: 220,
  591. marginRight: "10px",
  592. }}
  593. value={this.state.searchContractNo}
  594. onChange={(e) => {
  595. this.setState({ searchContractNo: e.target.value });
  596. }}
  597. />
  598. <Input
  599. placeholder="企业名称"
  600. style={{
  601. width: 220,
  602. marginRight: "10px",
  603. }}
  604. value={this.state.searchEnterpriseName}
  605. onChange={(e) => {
  606. this.setState({ searchEnterpriseName: e.target.value });
  607. }}
  608. />
  609. <span style={{ display: "inline-block" }}>
  610. <span style={{ marginRight: "10px" }}>项目分类:</span>
  611. <Cascader
  612. options={this.state.contactsOptionData}
  613. value={this.state.newArray}
  614. placeholder="请选择"
  615. style={{ width: 150, marginRight: 10 }}
  616. onChange={(e, pre) => {
  617. let first = e[0];
  618. let two = e[1];
  619. this.setState({
  620. newArray: e,
  621. projectStatus: first,
  622. projectType: two,
  623. changeList: undefined,
  624. dataSource: [],
  625. status:
  626. two == "4"
  627. ? 2 : two == "3"
  628. ? 6 : two == "2"
  629. ? 3 : two == "1"
  630. ? 4 : two == "5"
  631. ? 1 : two == "7"
  632. ? 5 : 0,
  633. columns:
  634. two == "0"
  635. ? currency(this.showD.bind(this)) : two == "1"
  636. ? patent(this.showD.bind(this)) : two == "2"
  637. ? softWriting(this.showD.bind(this)) : two == "3"
  638. ? audit(this.showD.bind(this)) : two == "4"
  639. ? doubleSoft(this.showD.bind(this)) : two == "5"
  640. ? highTechColumns(this.showD.bind(this)) : two == "6"
  641. ? currency(this.showD.bind(this)) : two == "7"
  642. ? member(this.showD.bind(this)) : currency(this.showD.bind(this)),
  643. }, () => {
  644. this.defaultcolumns()
  645. })
  646. }}
  647. />
  648. </span>
  649. {/* <span style={{ display: "inline-block" }}>
  650. <span style={{ marginRight: "10px" }}>
  651. 项目类别 :
  652. </span>
  653. <Select
  654. value={this.state.projectStatus || undefined}
  655. placeholder="请选择项目类别"
  656. notFoundContent="未获取到上级品类列表"
  657. style={{
  658. width: 150,
  659. marginRight: "10px",
  660. }}
  661. onChange={(e) => {
  662. let infor = this.state.contactsOptionData.filter(
  663. (v) => v.id === e
  664. );
  665. this.setState(
  666. {
  667. projectStatus: e,
  668. },
  669. // () => {
  670. // if (infor[0].cname === '高新会员服务' && typeof this.state.projectType !== 'number') {
  671. // this.setState({
  672. // columns: highTechColumns,
  673. // dataSource: [],
  674. // changeList: [],
  675. // status: 1,
  676. // }, () => {
  677. // this.loadData();
  678. // })
  679. // } else if (typeof this.state.projectType !== 'number') {
  680. // this.setState({
  681. // columns: currency,
  682. // dataSource: [],
  683. // changeList: [],
  684. // status: 0,
  685. // }, () => {
  686. // this.loadData();
  687. // })
  688. // } else {
  689. // this.loadData();
  690. // }
  691. // }
  692. );
  693. }}
  694. >
  695. {this.state.contactsOption}
  696. </Select>
  697. </span>
  698. <span style={{ display: "inline-block" }}>
  699. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  700. 项目分类 :
  701. </span>
  702. <Select
  703. value={
  704. typeof this.state.projectType === "number"
  705. ? this.state.projectType
  706. : undefined
  707. }
  708. placeholder="请选择项目分类"
  709. style={{
  710. width: 150,
  711. marginRight: "10px",
  712. }}
  713. onChange={(e) => {
  714. this.setState(
  715. {
  716. columns:
  717. e === 0
  718. ? currency : e === 1
  719. ? patent : e === 2
  720. ? softWriting : e === 3
  721. ? currency : e === 4
  722. ? doubleSoft : e === 5
  723. ? highTechColumns : e === 6
  724. ? currency : currency,
  725. changeList: [],
  726. projectType: e,
  727. status:
  728. e === 4
  729. ? 2 : e === 2
  730. ? 3 : e === 1
  731. ? 4 : e === 5
  732. ? 1 : 0,
  733. dataSource: [],
  734. },
  735. () => {
  736. this.defaultcolumns();
  737. this.loadData();
  738. }
  739. );
  740. }}
  741. >
  742. <Option value={0}>通用</Option>
  743. <Option value={1}>专利</Option>
  744. <Option value={2}>软著</Option>
  745. <Option value={3}>审计</Option>
  746. <Option value={4}>双软</Option>
  747. <Option value={5}>高新</Option>
  748. <Option value={6}>商标</Option>
  749. <Option value={7}>会员</Option>
  750. </Select>
  751. </span> */}
  752. <span
  753. style={{
  754. display: "inline-block",
  755. }}
  756. >
  757. <span style={{ marginBottom: "10px" }}>订单部门:</span>
  758. <Cascaders
  759. ref={ref => this.Cascaders1 = ref}
  760. placeholder="请选择订单部门"
  761. height={28}
  762. width={150}
  763. onSel={(e) => {
  764. this.setState({
  765. deps: JSON.stringify(e)
  766. })
  767. }}
  768. />
  769. </span>
  770. <span
  771. style={{
  772. display: "inline-block",
  773. }}
  774. >
  775. <span style={{ marginBottom: "10px" }}>负责部门:</span>
  776. <Cascaders
  777. ref={ref => this.Cascaders2 = ref}
  778. placeholder="请选择负责部门"
  779. height={28}
  780. width={150}
  781. onSel={(e) => {
  782. this.setState({
  783. thchDeps: JSON.stringify(e)
  784. })
  785. }}
  786. />
  787. </span>
  788. <span style={{ display: "inline-block" }}>
  789. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  790. 咨询师/经理:
  791. </span>
  792. <AutoComplete
  793. className="certain-category-search"
  794. dropdownClassName="certain-category-search-dropdown"
  795. dropdownMatchSelectWidth={false}
  796. style={{ width: 130 }}
  797. dataSource={options}
  798. placeholder='请输入姓名'
  799. value={this.state.auto}
  800. onChange={this.httpChange}
  801. filterOption={true}
  802. onBlur={this.blurChange}
  803. onSelect={this.selectAuto}
  804. >
  805. <Input />
  806. </AutoComplete>
  807. </span>
  808. <span style={{ display: "inline-block" }}>
  809. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  810. 申报批次:
  811. </span>
  812. <Select
  813. value={this.state.declarationBatch || undefined}
  814. placeholder="请选择批次"
  815. style={{
  816. width: 150,
  817. marginRight: "10px",
  818. }}
  819. onChange={(e) => {
  820. this.setState({
  821. declarationBatch: e,
  822. });
  823. }}
  824. >
  825. <Option value={1}>第一批</Option>
  826. <Option value={2}>第二批</Option>
  827. <Option value={3}>第三批</Option>
  828. <Option value={4}>第四批</Option>
  829. </Select>
  830. </span>
  831. <span style={{ display: "inline-block" }}>
  832. <span style={{ marginRight: "10px" }}>
  833. 项目金额:
  834. </span>
  835. <Select
  836. value={this.state.projectAmount || undefined}
  837. placeholder="请选择项目金额"
  838. style={{
  839. width: 150,
  840. marginRight: "10px",
  841. }}
  842. onChange={(e) => {
  843. this.setState({
  844. projectAmount: e,
  845. });
  846. }}
  847. >
  848. <Option value={1}>0~0.5万</Option>
  849. <Option value={2}>0.5~1万</Option>
  850. <Option value={3}>1~2万</Option>
  851. <Option value={4}>2~5万</Option>
  852. <Option value={5}>5~10万</Option>
  853. <Option value={6}>10~30万</Option>
  854. <Option value={7}>30~50万</Option>
  855. <Option value={8}>50~80万</Option>
  856. <Option value={9}>80万上</Option>
  857. </Select>
  858. </span>
  859. <span style={{ display: "inline-block" }}>
  860. <span style={{ marginRight: "10px" }}>
  861. 项目状态:
  862. </span>
  863. <Select
  864. value={this.state.taskProjectStatus || undefined}
  865. placeholder="请选择项目状态"
  866. style={{
  867. width: 150,
  868. marginRight: "10px",
  869. }}
  870. onChange={(e) => {
  871. this.setState({
  872. taskProjectStatus: e,
  873. });
  874. }}
  875. >
  876. {
  877. projectStatusList.map((item) =>
  878. <Option value={item.value} key={item.value}>{item.label}</Option>
  879. )
  880. }
  881. </Select>
  882. </span>
  883. {/* <span style={{display:"inline-block"}}>*/}
  884. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  885. {/* <Select*/}
  886. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  887. {/* placeholder="请选择项目情况"*/}
  888. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  889. {/* onChange={(e) => {*/}
  890. {/* this.setState({*/}
  891. {/* projectSituation: e,*/}
  892. {/* });*/}
  893. {/* }}*/}
  894. {/* >*/}
  895. {/* <Option value={0}>未开始</Option>*/}
  896. {/* <Option value={1}>进行中</Option>*/}
  897. {/* <Option value={2}>已暂停</Option>*/}
  898. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  899. {/* <Option value={4}>已完成</Option>*/}
  900. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  901. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  902. {/* </Select>*/}
  903. {/*</span>*/}
  904. <span style={{ display: "inline-block" }}>
  905. <span style={{ marginRight: "10px" }}>
  906. 满&nbsp;&nbsp;意&nbsp;&nbsp;度:
  907. </span>
  908. <Select
  909. value={this.state.sdStatus}
  910. placeholder="请选择满意度"
  911. style={{
  912. width: 150,
  913. marginRight: "10px",
  914. }}
  915. onChange={(e) => {
  916. this.setState({
  917. sdStatus: e,
  918. });
  919. }}
  920. >
  921. <Option value={0}>未发放</Option>
  922. <Option value={1}>已发放</Option>
  923. <Option value={2}>已回收(非常满意)</Option>
  924. <Option value={3}>已回收(满意)</Option>
  925. <Option value={4}>已回收(一般)</Option>
  926. <Option value={5}>已回收(不满意)</Option>
  927. </Select>
  928. </span>
  929. <span style={{ display: "inline-block" }}>
  930. <span style={{ marginRight: "10px" }}>
  931. 派单时间:
  932. </span>
  933. <RangePicker
  934. allowClear={false}
  935. style={{ marginRight: "10px", width: 250 }}
  936. value={[
  937. this.state.releaseDate[0]
  938. ? moment(this.state.releaseDate[0])
  939. : null,
  940. this.state.releaseDate[1]
  941. ? moment(this.state.releaseDate[1])
  942. : null,
  943. ]}
  944. onChange={(data, dataString) => {
  945. this.setState({ releaseDate: dataString });
  946. }}
  947. />
  948. </span>
  949. <Select
  950. mode="multiple"
  951. style={{ width: 200 }}
  952. placeholder="特批类型"
  953. value={this.state.approvaType}
  954. onChange={e => {
  955. this.setState({
  956. approvaType: e
  957. })
  958. }}
  959. >
  960. {approvaChildren}
  961. </Select>
  962. <Button
  963. type="primary"
  964. onClick={() => {
  965. this.loadData();
  966. }}
  967. style={{ marginRight: "10px", marginBottom: "10px" }}
  968. >
  969. 搜索
  970. </Button>
  971. <Button
  972. onClick={this.resetAll}
  973. style={{ marginRight: "10px", marginBottom: "10px" }}
  974. >
  975. 重置
  976. </Button>
  977. </div>
  978. </TabPane>
  979. <TabPane tab="更改表格显示数据" key="2">
  980. {
  981. this.state.tbaindex == 2 &&
  982. <div style={{ marginLeft: 10 }}>
  983. <ChooseList
  984. columns={this.state.columns}
  985. changeFn={this.changeList}
  986. changeList={this.state.changeList}
  987. top={55}
  988. margin={11}
  989. />
  990. </div>
  991. }
  992. </TabPane>
  993. {adminData.isSuperAdmin ? <TabPane tab="导出EXCEL" key="3">
  994. <Button
  995. type="primary"
  996. style={{ margin: "10px" }}
  997. onClick={this.exportExec.bind(this)}
  998. >
  999. 导出excel
  1000. </Button>
  1001. </TabPane>
  1002. : ""}
  1003. </Tabs>
  1004. </div>
  1005. )}
  1006. <div className="patent-table">
  1007. <Spin spinning={this.state.loading}>
  1008. <Table
  1009. bordered
  1010. size="middle"
  1011. scroll={{
  1012. x:
  1013. this.state.status === 4 || this.state.status === 3
  1014. ? 1800
  1015. : 1000,
  1016. y: 0,
  1017. }}
  1018. columns={
  1019. (this.state.changeList && this.state.changeList.length != 0)
  1020. ? this.state.changeList
  1021. : this.state.columns
  1022. }
  1023. dataSource={this.state.dataSource}
  1024. pagination={this.state.pagination}
  1025. style={{
  1026. cursor: "pointer",
  1027. }}
  1028. rowClassName={this.suspendColor}
  1029. onRowClick={(record) => {
  1030. this.setState({
  1031. projectdetailsId: record.id,
  1032. projectdetailsOrderNo: record.orderNo,
  1033. pname: record.pname,
  1034. visible: true,
  1035. });
  1036. }}
  1037. />
  1038. </Spin>
  1039. </div>
  1040. {this.state.visible ? (
  1041. <ProjectDetails
  1042. visible={this.state.visible}
  1043. id={this.state.projectdetailsId}
  1044. orderNo={this.state.projectdetailsOrderNo}
  1045. taskName={this.state.pname}
  1046. visitOk={() => {
  1047. this.setState({
  1048. visible: false,
  1049. });
  1050. }}
  1051. visitCancel={() => {
  1052. this.loadData(this.state.page);
  1053. this.setState({
  1054. visible: false,
  1055. });
  1056. }}
  1057. />
  1058. ) : null}
  1059. <Modal
  1060. maskClosable={false}
  1061. visible={this.state.score != ""}
  1062. footer=""
  1063. title="项目评分"
  1064. width={400}
  1065. onCancel={() => {
  1066. this.setState({
  1067. score: "",
  1068. cSort: "",
  1069. cname: "",
  1070. tname: "",
  1071. })
  1072. }}
  1073. >
  1074. <div style={{ position: "relative" }}>
  1075. <div
  1076. style={{
  1077. position: "absolute",
  1078. right: 100,
  1079. top: 50,
  1080. fontSize: "40px",
  1081. color: "red"
  1082. }}
  1083. >{this.state.dataScore.professionalism + this.state.dataScore.communicationSkills + this.state.dataScore.responsiveness + this.state.dataScore.publicImage + this.state.dataScore.serviceAttitude + this.state.dataScore.monthlyReport + this.state.dataScore.yearReport}分</div>
  1084. <div>
  1085. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目名称</span>:{this.state.cname}
  1086. </div>
  1087. <div>
  1088. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目咨询</span>:{this.state.tname}
  1089. </div>
  1090. <div>
  1091. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>专&nbsp;业&nbsp;度</span>:{this.getScore("zyd", this.state.cSort, this.state.dataScore.professionalism)}
  1092. </div>
  1093. <div>
  1094. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>沟&nbsp;通&nbsp;力</span>:{this.getScore("gtl", this.state.cSort, this.state.dataScore.communicationSkills)}
  1095. </div>
  1096. <div>
  1097. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>响&nbsp;应&nbsp;度</span>:{this.getScore("xyd", this.state.cSort, this.state.dataScore.responsiveness)}
  1098. </div>
  1099. <div>
  1100. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>公出形象</span>:{this.getScore("gcxx", this.state.cSort, this.state.dataScore.publicImage)}
  1101. </div>
  1102. <div>
  1103. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>服务态度</span>:{this.getScore("fwtd", this.state.cSort, this.state.dataScore.serviceAttitude)}
  1104. </div>
  1105. {this.state.cSort == 6 &&
  1106. <div>
  1107. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>月度汇报</span>:{this.getScore("ydhb", this.state.cSort, this.state.dataScore.monthlyReport)}
  1108. </div>}
  1109. {this.state.cSort == 6 &&
  1110. <div>
  1111. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>年度汇报</span>:{this.getScore("ndhb", this.state.cSort, this.state.dataScore.yearReport)}
  1112. </div>}
  1113. <div>
  1114. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分理由</span>:{this.state.dataScore.remarks}
  1115. </div>
  1116. <div>
  1117. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分时间</span>:{moment(this.state.dataScore.createTime).format('YYYY-MM-DD HH:mm:ss')}
  1118. </div>
  1119. <div style={{ marginTop: 10, textAlign: "center" }}>
  1120. <Button
  1121. type="primary"
  1122. onClick={() => {
  1123. this.setState({
  1124. score: ""
  1125. })
  1126. }}
  1127. >
  1128. 关闭
  1129. </Button>
  1130. </div>
  1131. </div>
  1132. </Modal>
  1133. </div>
  1134. );
  1135. }
  1136. }
  1137. export default HighTech;