highTech.jsx 42 KB

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