highTech.jsx 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157
  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 if (!adminData.isSuperAdmin && item.disabled) {
  313. return
  314. } else {
  315. newArr.push(item);
  316. }
  317. });
  318. this.setState({
  319. changeList: newArr,
  320. }, () => {
  321. this.loadData();
  322. });
  323. }
  324. // 导出excel
  325. exportExec() {
  326. message.config({
  327. duration: 20,
  328. });
  329. let loading = message.loading("下载中...");
  330. this.setState({
  331. exportPendingLoading: true,
  332. });
  333. let data = {
  334. startDate:
  335. this.state.releaseDate.length > 0
  336. ? this.state.releaseDate[0]
  337. : undefined, //开始时间
  338. endDate:
  339. this.state.releaseDate.length > 0
  340. ? this.state.releaseDate[1]
  341. : undefined, //结束时间
  342. deps: this.state.deps || undefined, //部门ID
  343. thchDeps: this.state.thchDeps || undefined, //责任部门ID
  344. projectStatus: this.state.projectStatus || undefined, //项目类别
  345. projectType: !this.state.projectType ? undefined : this.state.projectType, //项目分类
  346. status: this.state.status,
  347. orderNo: this.state.searchOrderNo || undefined, //订单编号
  348. contractNo: this.state.searchContractNo || undefined, //合同编号
  349. userName: this.state.searchEnterpriseName || undefined, //企业名称
  350. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  351. projectAmount: this.state.projectAmount || undefined, //项目金额
  352. thchId: this.state.thchId || undefined, //咨询师/咨询经理id
  353. taskProjectStatus: this.state.taskProjectStatus || undefined,//项目状态
  354. sdStatus: this.state.sdStatus,//满意度
  355. type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型
  356. };
  357. $.ajax({
  358. method: "get",
  359. dataType: "json",
  360. crossDomain: false,
  361. url: "/api/admin/statistis/exporTaskList",
  362. data,
  363. success: function (data) {
  364. if (data.error.length === 0) {
  365. this.download(data.data);
  366. } else {
  367. message.warning(data.error[0].message);
  368. }
  369. }.bind(this),
  370. }).always(
  371. function () {
  372. loading();
  373. this.setState({
  374. exportPendingLoading: false,
  375. });
  376. }.bind(this)
  377. );
  378. }
  379. // 下载
  380. download(fileName) {
  381. window.location.href =
  382. globalConfig.context + "/open/download?fileName=" + fileName;
  383. }
  384. // 查询用户
  385. supervisor(e) {
  386. $.ajax({
  387. method: "get",
  388. dataType: "json",
  389. crossDomain: false,
  390. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  391. data: {
  392. adminName: e,
  393. },
  394. success: function (data) {
  395. let thedata = data.data;
  396. if (!thedata) {
  397. if (data.error && data.error.length) {
  398. message.warning(data.error[0].message);
  399. }
  400. thedata = {};
  401. }
  402. this.setState({
  403. customerArr: thedata,
  404. });
  405. }.bind(this),
  406. }).always(
  407. function () {
  408. }.bind(this)
  409. );
  410. }
  411. // 输入触发
  412. httpChange(e) {
  413. if (e.length >= 1) {
  414. this.supervisor(e);
  415. }
  416. this.setState({
  417. auto: e,
  418. });
  419. }
  420. // 选中
  421. selectAuto(value, options) {
  422. let thchId = ""
  423. let contactLists = this.state.customerArr || [];
  424. if (value) {
  425. contactLists.map(function (item) {
  426. if (item.name == value.toString()) {
  427. thchId = item.id;
  428. }
  429. });
  430. }
  431. this.setState({
  432. auto: value,
  433. thchId: thchId,
  434. });
  435. }
  436. // 失去焦点
  437. blurChange(e) {
  438. let thchId = ""
  439. let contactLists = this.state.customerArr || [];
  440. if (e) {
  441. contactLists.map(function (item) {
  442. if (item.name == e.toString()) {
  443. thchId = item.id;
  444. }
  445. });
  446. }
  447. this.setState({
  448. thchId: thchId,
  449. });
  450. }
  451. componentWillMount() {
  452. //
  453. if (!this.props.introduce) {
  454. this.defaultcolumns();
  455. this.selectSuperId();
  456. }
  457. if (this.props.searchData) {
  458. let e = this.props.searchData.projectType;
  459. this.setState({
  460. columns:
  461. e == "0"
  462. ? currency(this.showD.bind(this)) : e == "1"
  463. ? patent(this.showD.bind(this)) : e == "2"
  464. ? softWriting(this.showD.bind(this)) : e == "3"
  465. ? audit(this.showD.bind(this)) : e == "4"
  466. ? doubleSoft(this.showD.bind(this)) : e == "5"
  467. ? highTechColumns(this.showD.bind(this)) : e == "6"
  468. ? currency(this.showD.bind(this)) : e == "7"
  469. ? member(this.showD.bind(this)) : currency(this.showD.bind(this)),
  470. }, () => {
  471. this.defaultcolumns();
  472. });
  473. }
  474. }
  475. // 暂停项目 颜色
  476. suspendColor(record) {
  477. if (record.projectStatus == 29) {
  478. return 'light'
  479. } else {
  480. return 'dark'
  481. }
  482. }
  483. getScore(name, cSort, val) {
  484. let data = ""
  485. let list = []
  486. if (cSort == 6) {
  487. if (name == "zyd" || name == "gtl" || name == "ydhb") {
  488. list = [
  489. { title: name == "zyd" ? "很专业" : "很满意", list: [20, 19, 18, 17, 16, 15, 14, 13] },
  490. { title: name == "zyd" ? "专业" : "满意", list: [12, 11, 10, 9, 8, 7] },
  491. { title: "一般", list: [6, 5, 4, 3, 2, 1] },
  492. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  493. ]
  494. } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
  495. list = [
  496. { title: name == "xyd" ? "很速度" : "很满意", list: [10, 9, 8, 7] },
  497. { title: name == "xyd" ? "速度" : "满意", list: [6, 5, 4] },
  498. { title: "一般", list: [3, 2, 1] },
  499. { title: name == "xyd" ? "很慢" : "不满意", list: [0] },
  500. ]
  501. }
  502. } else {
  503. if (name == "zyd" || name == "gtl") {
  504. list = [
  505. { title: name == "zyd" ? "很专业" : "很满意", list: [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20] },
  506. { title: name == "zyd" ? "专业" : "满意", list: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10] },
  507. { title: "一般", list: [9, 8, 7, 6, 5, 4, 3, 2, 1] },
  508. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  509. ]
  510. } else if (name == "gcxx" || name == "fwtd") {
  511. list = [
  512. { title: "很满意", list: [15, 14, 13, 12, 11] },
  513. { title: "满意", list: [10, 9, 8, 7, 6] },
  514. { title: "一般", list: [5, 4, 3, 2, 1] },
  515. { title: "不满意", list: [0] },
  516. ]
  517. } else if (name == "xyd") {
  518. list = [
  519. { title: "很速度", list: [10, 9, 8, 7] },
  520. { title: "速度", list: [6, 5, 4] },
  521. { title: "一般", list: [3, 2, 1] },
  522. { title: "很慢", list: [0] },
  523. ]
  524. }
  525. }
  526. list.map(function (item) {
  527. if (item.list.includes(val)) {
  528. data = item.title + "(" + val + "分)"
  529. }
  530. })
  531. return data
  532. }
  533. render() {
  534. const dataSources = this.state.customerArr || [];
  535. const options = dataSources.map((group) => (
  536. <Select.Option key={group.id} value={group.name}>
  537. {group.name}
  538. </Select.Option>
  539. ));
  540. const approvaChildren = approvalOptions.map(i => (
  541. <Option key={i.value}>{i.label}</Option>
  542. ));
  543. return (
  544. <div className="user-content">
  545. {this.props.introduce ? (
  546. this.props.introduce()
  547. ) : (
  548. <div>
  549. <div className="content-title" style={{ marginBottom: 10 }}>
  550. <span style={{ fontWeight: 900, fontSize: 16 }}>
  551. 项目汇总表 (
  552. {this.state.status === 1
  553. ? "高新" : this.state.status === 2
  554. ? "双软" : this.state.status === 3
  555. ? "软著" : this.state.status === 4
  556. ? "专利" : this.state.status === 5
  557. ? "会员" : this.state.status === 6
  558. ? "审计" : "通用"}
  559. )
  560. </span>
  561. </div>
  562. <Tabs defaultActiveKey="1" className="test"
  563. onChange={e => {
  564. this.setState({
  565. tbaindex: e
  566. })
  567. }}
  568. >
  569. <TabPane tab="搜索" key="1">
  570. <div
  571. className="user-search"
  572. style={{
  573. marginTop: "10px",
  574. marginLeft: "10px",
  575. marginRight: "10px",
  576. }}
  577. >
  578. <Input
  579. placeholder="订单编号"
  580. style={{
  581. width: 220,
  582. marginRight: "10px",
  583. }}
  584. value={this.state.searchOrderNo}
  585. onChange={(e) => {
  586. this.setState({ searchOrderNo: e.target.value });
  587. }}
  588. />
  589. <Input
  590. placeholder="合同编号"
  591. style={{
  592. width: 220,
  593. marginRight: "10px",
  594. }}
  595. value={this.state.searchContractNo}
  596. onChange={(e) => {
  597. this.setState({ searchContractNo: e.target.value });
  598. }}
  599. />
  600. <Input
  601. placeholder="企业名称"
  602. style={{
  603. width: 220,
  604. marginRight: "10px",
  605. }}
  606. value={this.state.searchEnterpriseName}
  607. onChange={(e) => {
  608. this.setState({ searchEnterpriseName: e.target.value });
  609. }}
  610. />
  611. <span style={{ display: "inline-block" }}>
  612. <span style={{ marginRight: "10px" }}>项目分类:</span>
  613. <Cascader
  614. options={this.state.contactsOptionData}
  615. value={this.state.newArray}
  616. placeholder="请选择"
  617. style={{ width: 150, marginRight: 10 }}
  618. onChange={(e, pre) => {
  619. let first = e[0];
  620. let two = e[1];
  621. this.setState({
  622. newArray: e,
  623. projectStatus: first,
  624. projectType: two,
  625. changeList: undefined,
  626. dataSource: [],
  627. status:
  628. two == "4"
  629. ? 2 : two == "3"
  630. ? 6 : two == "2"
  631. ? 3 : two == "1"
  632. ? 4 : two == "5"
  633. ? 1 : two == "7"
  634. ? 5 : 0,
  635. columns:
  636. two == "0"
  637. ? currency(this.showD.bind(this)) : two == "1"
  638. ? patent(this.showD.bind(this)) : two == "2"
  639. ? softWriting(this.showD.bind(this)) : two == "3"
  640. ? audit(this.showD.bind(this)) : two == "4"
  641. ? doubleSoft(this.showD.bind(this)) : two == "5"
  642. ? highTechColumns(this.showD.bind(this)) : two == "6"
  643. ? currency(this.showD.bind(this)) : two == "7"
  644. ? member(this.showD.bind(this)) : currency(this.showD.bind(this)),
  645. }, () => {
  646. this.defaultcolumns()
  647. })
  648. }}
  649. />
  650. </span>
  651. {/* <span style={{ display: "inline-block" }}>
  652. <span style={{ marginRight: "10px" }}>
  653. 项目类别 :
  654. </span>
  655. <Select
  656. value={this.state.projectStatus || undefined}
  657. placeholder="请选择项目类别"
  658. notFoundContent="未获取到上级品类列表"
  659. style={{
  660. width: 150,
  661. marginRight: "10px",
  662. }}
  663. onChange={(e) => {
  664. let infor = this.state.contactsOptionData.filter(
  665. (v) => v.id === e
  666. );
  667. this.setState(
  668. {
  669. projectStatus: e,
  670. },
  671. // () => {
  672. // if (infor[0].cname === '高新会员服务' && typeof this.state.projectType !== 'number') {
  673. // this.setState({
  674. // columns: highTechColumns,
  675. // dataSource: [],
  676. // changeList: [],
  677. // status: 1,
  678. // }, () => {
  679. // this.loadData();
  680. // })
  681. // } else if (typeof this.state.projectType !== 'number') {
  682. // this.setState({
  683. // columns: currency,
  684. // dataSource: [],
  685. // changeList: [],
  686. // status: 0,
  687. // }, () => {
  688. // this.loadData();
  689. // })
  690. // } else {
  691. // this.loadData();
  692. // }
  693. // }
  694. );
  695. }}
  696. >
  697. {this.state.contactsOption}
  698. </Select>
  699. </span>
  700. <span style={{ display: "inline-block" }}>
  701. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  702. 项目分类 :
  703. </span>
  704. <Select
  705. value={
  706. typeof this.state.projectType === "number"
  707. ? this.state.projectType
  708. : undefined
  709. }
  710. placeholder="请选择项目分类"
  711. style={{
  712. width: 150,
  713. marginRight: "10px",
  714. }}
  715. onChange={(e) => {
  716. this.setState(
  717. {
  718. columns:
  719. e === 0
  720. ? currency : e === 1
  721. ? patent : e === 2
  722. ? softWriting : e === 3
  723. ? currency : e === 4
  724. ? doubleSoft : e === 5
  725. ? highTechColumns : e === 6
  726. ? currency : currency,
  727. changeList: [],
  728. projectType: e,
  729. status:
  730. e === 4
  731. ? 2 : e === 2
  732. ? 3 : e === 1
  733. ? 4 : e === 5
  734. ? 1 : 0,
  735. dataSource: [],
  736. },
  737. () => {
  738. this.defaultcolumns();
  739. this.loadData();
  740. }
  741. );
  742. }}
  743. >
  744. <Option value={0}>通用</Option>
  745. <Option value={1}>专利</Option>
  746. <Option value={2}>软著</Option>
  747. <Option value={3}>审计</Option>
  748. <Option value={4}>双软</Option>
  749. <Option value={5}>高新</Option>
  750. <Option value={6}>商标</Option>
  751. <Option value={7}>会员</Option>
  752. </Select>
  753. </span> */}
  754. <span
  755. style={{
  756. display: "inline-block",
  757. }}
  758. >
  759. <span style={{ marginBottom: "10px" }}>订单部门:</span>
  760. <Cascaders
  761. ref={ref => this.Cascaders1 = ref}
  762. placeholder="请选择订单部门"
  763. height={28}
  764. width={150}
  765. onSel={(e) => {
  766. this.setState({
  767. deps: JSON.stringify(e)
  768. })
  769. }}
  770. />
  771. </span>
  772. <span
  773. style={{
  774. display: "inline-block",
  775. }}
  776. >
  777. <span style={{ marginBottom: "10px" }}>负责部门:</span>
  778. <Cascaders
  779. ref={ref => this.Cascaders2 = ref}
  780. placeholder="请选择负责部门"
  781. height={28}
  782. width={150}
  783. onSel={(e) => {
  784. this.setState({
  785. thchDeps: JSON.stringify(e)
  786. })
  787. }}
  788. />
  789. </span>
  790. <span style={{ display: "inline-block" }}>
  791. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  792. 咨询师/经理:
  793. </span>
  794. <AutoComplete
  795. className="certain-category-search"
  796. dropdownClassName="certain-category-search-dropdown"
  797. dropdownMatchSelectWidth={false}
  798. style={{ width: 130 }}
  799. dataSource={options}
  800. placeholder='请输入姓名'
  801. value={this.state.auto}
  802. onChange={this.httpChange}
  803. filterOption={true}
  804. onBlur={this.blurChange}
  805. onSelect={this.selectAuto}
  806. >
  807. <Input />
  808. </AutoComplete>
  809. </span>
  810. <span style={{ display: "inline-block" }}>
  811. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  812. 申报批次:
  813. </span>
  814. <Select
  815. value={this.state.declarationBatch || undefined}
  816. placeholder="请选择批次"
  817. style={{
  818. width: 150,
  819. marginRight: "10px",
  820. }}
  821. onChange={(e) => {
  822. this.setState({
  823. declarationBatch: e,
  824. });
  825. }}
  826. >
  827. <Option value={1}>第一批</Option>
  828. <Option value={2}>第二批</Option>
  829. <Option value={3}>第三批</Option>
  830. <Option value={4}>第四批</Option>
  831. </Select>
  832. </span>
  833. <span style={{ display: "inline-block" }}>
  834. <span style={{ marginRight: "10px" }}>
  835. 项目金额:
  836. </span>
  837. <Select
  838. value={this.state.projectAmount || undefined}
  839. placeholder="请选择项目金额"
  840. style={{
  841. width: 150,
  842. marginRight: "10px",
  843. }}
  844. onChange={(e) => {
  845. this.setState({
  846. projectAmount: e,
  847. });
  848. }}
  849. >
  850. <Option value={1}>0~0.5万</Option>
  851. <Option value={2}>0.5~1万</Option>
  852. <Option value={3}>1~2万</Option>
  853. <Option value={4}>2~5万</Option>
  854. <Option value={5}>5~10万</Option>
  855. <Option value={6}>10~30万</Option>
  856. <Option value={7}>30~50万</Option>
  857. <Option value={8}>50~80万</Option>
  858. <Option value={9}>80万上</Option>
  859. </Select>
  860. </span>
  861. <span style={{ display: "inline-block" }}>
  862. <span style={{ marginRight: "10px" }}>
  863. 项目状态:
  864. </span>
  865. <Select
  866. value={this.state.taskProjectStatus || undefined}
  867. placeholder="请选择项目状态"
  868. style={{
  869. width: 150,
  870. marginRight: "10px",
  871. }}
  872. onChange={(e) => {
  873. this.setState({
  874. taskProjectStatus: e,
  875. });
  876. }}
  877. >
  878. {
  879. projectStatusList.map((item) =>
  880. <Option value={item.value} key={item.value}>{item.label}</Option>
  881. )
  882. }
  883. </Select>
  884. </span>
  885. {/* <span style={{display:"inline-block"}}>*/}
  886. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  887. {/* <Select*/}
  888. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  889. {/* placeholder="请选择项目情况"*/}
  890. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  891. {/* onChange={(e) => {*/}
  892. {/* this.setState({*/}
  893. {/* projectSituation: e,*/}
  894. {/* });*/}
  895. {/* }}*/}
  896. {/* >*/}
  897. {/* <Option value={0}>未开始</Option>*/}
  898. {/* <Option value={1}>进行中</Option>*/}
  899. {/* <Option value={2}>已暂停</Option>*/}
  900. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  901. {/* <Option value={4}>已完成</Option>*/}
  902. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  903. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  904. {/* </Select>*/}
  905. {/*</span>*/}
  906. <span style={{ display: "inline-block" }}>
  907. <span style={{ marginRight: "10px" }}>
  908. 满&nbsp;&nbsp;意&nbsp;&nbsp;度:
  909. </span>
  910. <Select
  911. value={this.state.sdStatus}
  912. placeholder="请选择满意度"
  913. style={{
  914. width: 150,
  915. marginRight: "10px",
  916. }}
  917. onChange={(e) => {
  918. this.setState({
  919. sdStatus: e,
  920. });
  921. }}
  922. >
  923. <Option value={0}>未发放</Option>
  924. <Option value={1}>已发放</Option>
  925. <Option value={2}>已回收(非常满意)</Option>
  926. <Option value={3}>已回收(满意)</Option>
  927. <Option value={4}>已回收(一般)</Option>
  928. <Option value={5}>已回收(不满意)</Option>
  929. </Select>
  930. </span>
  931. <span style={{ display: "inline-block" }}>
  932. <span style={{ marginRight: "10px" }}>
  933. 派单时间:
  934. </span>
  935. <RangePicker
  936. allowClear={false}
  937. style={{ marginRight: "10px", width: 250 }}
  938. value={[
  939. this.state.releaseDate[0]
  940. ? moment(this.state.releaseDate[0])
  941. : null,
  942. this.state.releaseDate[1]
  943. ? moment(this.state.releaseDate[1])
  944. : null,
  945. ]}
  946. onChange={(data, dataString) => {
  947. this.setState({ releaseDate: dataString });
  948. }}
  949. />
  950. </span>
  951. <Select
  952. mode="multiple"
  953. style={{ width: 200 }}
  954. placeholder="特批类型"
  955. value={this.state.approvaType}
  956. onChange={e => {
  957. this.setState({
  958. approvaType: e
  959. })
  960. }}
  961. >
  962. {approvaChildren}
  963. </Select>
  964. <Button
  965. type="primary"
  966. onClick={() => {
  967. this.loadData();
  968. }}
  969. style={{ marginRight: "10px", marginBottom: "10px" }}
  970. >
  971. 搜索
  972. </Button>
  973. <Button
  974. onClick={this.resetAll}
  975. style={{ marginRight: "10px", marginBottom: "10px" }}
  976. >
  977. 重置
  978. </Button>
  979. </div>
  980. </TabPane>
  981. <TabPane tab="更改表格显示数据" key="2">
  982. {
  983. this.state.tbaindex == 2 &&
  984. <div style={{ marginLeft: 10 }}>
  985. <ChooseList
  986. columns={this.state.columns}
  987. changeFn={this.changeList}
  988. changeList={this.state.changeList}
  989. top={55}
  990. margin={11}
  991. />
  992. </div>
  993. }
  994. </TabPane>
  995. {adminData.isSuperAdmin ? <TabPane tab="导出EXCEL" key="3">
  996. <Button
  997. type="primary"
  998. style={{ margin: "10px" }}
  999. onClick={this.exportExec.bind(this)}
  1000. >
  1001. 导出excel
  1002. </Button>
  1003. </TabPane>
  1004. : ""}
  1005. </Tabs>
  1006. </div>
  1007. )}
  1008. <div className="patent-table">
  1009. <Spin spinning={this.state.loading}>
  1010. <Table
  1011. bordered
  1012. size="middle"
  1013. scroll={{
  1014. x:
  1015. this.state.status === 4 || this.state.status === 3
  1016. ? 1800
  1017. : 1000,
  1018. y: 0,
  1019. }}
  1020. columns={
  1021. (this.state.changeList && this.state.changeList.length != 0)
  1022. ? this.state.changeList
  1023. : this.state.columns
  1024. }
  1025. dataSource={this.state.dataSource}
  1026. pagination={this.state.pagination}
  1027. style={{
  1028. cursor: "pointer",
  1029. }}
  1030. rowClassName={this.suspendColor}
  1031. onRowClick={(record) => {
  1032. this.setState({
  1033. projectdetailsId: record.id,
  1034. projectdetailsOrderNo: record.orderNo,
  1035. pname: record.pname,
  1036. visible: true,
  1037. });
  1038. }}
  1039. />
  1040. </Spin>
  1041. </div>
  1042. {this.state.visible ? (
  1043. <ProjectDetails
  1044. visible={this.state.visible}
  1045. id={this.state.projectdetailsId}
  1046. orderNo={this.state.projectdetailsOrderNo}
  1047. taskName={this.state.pname}
  1048. visitOk={() => {
  1049. this.setState({
  1050. visible: false,
  1051. });
  1052. }}
  1053. visitCancel={() => {
  1054. this.loadData(this.state.page);
  1055. this.setState({
  1056. visible: false,
  1057. });
  1058. }}
  1059. />
  1060. ) : null}
  1061. <Modal
  1062. maskClosable={false}
  1063. visible={this.state.score != ""}
  1064. footer=""
  1065. title="项目评分"
  1066. width={400}
  1067. onCancel={() => {
  1068. this.setState({
  1069. score: "",
  1070. cSort: "",
  1071. cname: "",
  1072. tname: "",
  1073. })
  1074. }}
  1075. >
  1076. <div style={{ position: "relative" }}>
  1077. <div
  1078. style={{
  1079. position: "absolute",
  1080. right: 100,
  1081. top: 50,
  1082. fontSize: "40px",
  1083. color: "red"
  1084. }}
  1085. >{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>
  1086. <div>
  1087. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目名称</span>:{this.state.cname}
  1088. </div>
  1089. <div>
  1090. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目咨询</span>:{this.state.tname}
  1091. </div>
  1092. <div>
  1093. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>专&nbsp;业&nbsp;度</span>:{this.getScore("zyd", this.state.cSort, this.state.dataScore.professionalism)}
  1094. </div>
  1095. <div>
  1096. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>沟&nbsp;通&nbsp;力</span>:{this.getScore("gtl", this.state.cSort, this.state.dataScore.communicationSkills)}
  1097. </div>
  1098. <div>
  1099. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>响&nbsp;应&nbsp;度</span>:{this.getScore("xyd", this.state.cSort, this.state.dataScore.responsiveness)}
  1100. </div>
  1101. <div>
  1102. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>公出形象</span>:{this.getScore("gcxx", this.state.cSort, this.state.dataScore.publicImage)}
  1103. </div>
  1104. <div>
  1105. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>服务态度</span>:{this.getScore("fwtd", this.state.cSort, this.state.dataScore.serviceAttitude)}
  1106. </div>
  1107. {this.state.cSort == 6 &&
  1108. <div>
  1109. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>月度汇报</span>:{this.getScore("ydhb", this.state.cSort, this.state.dataScore.monthlyReport)}
  1110. </div>}
  1111. {this.state.cSort == 6 &&
  1112. <div>
  1113. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>年度汇报</span>:{this.getScore("ndhb", this.state.cSort, this.state.dataScore.yearReport)}
  1114. </div>}
  1115. <div>
  1116. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分理由</span>:{this.state.dataScore.remarks}
  1117. </div>
  1118. <div>
  1119. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分时间</span>:{moment(this.state.dataScore.createTime).format('YYYY-MM-DD HH:mm:ss')}
  1120. </div>
  1121. <div style={{ marginTop: 10, textAlign: "center" }}>
  1122. <Button
  1123. type="primary"
  1124. onClick={() => {
  1125. this.setState({
  1126. score: ""
  1127. })
  1128. }}
  1129. >
  1130. 关闭
  1131. </Button>
  1132. </div>
  1133. </div>
  1134. </Modal>
  1135. </div>
  1136. );
  1137. }
  1138. }
  1139. export default HighTech;