projectQuery.jsx 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285
  1. import React, { Component } from 'react';
  2. import ajax from 'jquery/src/ajax/xhr.js';
  3. import $ from 'jquery/src/ajax';
  4. import moment from 'moment';
  5. import '@/manageCenter/financialManage/distribute/public.less';
  6. import { Icon, Button, Form, Input, Select, Spin, Tag, Table, Switch, message, DatePicker, Modal, Upload, Col, Tabs, Tooltip } from 'antd';
  7. import OrderDesc from '@/manageCenter/financialManage/orderDetail/orderDesc'
  8. import Assign from '@/manageCenter/publicComponent/assign';
  9. import ResolutionDetail from "@/resolutionDetail";
  10. import {
  11. getProcessStatus,
  12. getApproval,
  13. getLiquidationStatus,
  14. getApprovedState,
  15. splitUrl,
  16. getjiedian,
  17. getboutique,
  18. ShowModal
  19. } from "@/tools";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. import OrderRiZi from "@/orderRiZi.jsx";
  22. import ImgList from "../../../common/imgList";
  23. import { ChooseList } from "../../order/orderNew/chooseList";
  24. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  25. import NewEditProject from "../../../common/projectOperation/newEditProject";
  26. import OrderItemStatus from "../../../common/orderItemStatus";
  27. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  28. import OrderCoor from '../../order/orderNew/changeComponent/orderCoor';
  29. import ContentUrl from '../../order/orderNew/contentUrl';
  30. import { salesList } from "@/dataDic.js";
  31. import Cascaders from "../../../common/cascaders";
  32. import FlowChart from '../../../common/flowchart'; // 流程图
  33. import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
  34. import Property from '../../../common/orderDetail/property' // 知识产权情况
  35. const { TabPane } = Tabs
  36. const PaiDan = React.createClass({
  37. loadData(pageNo) {
  38. this.state.data = [];
  39. this.setState({
  40. page: pageNo,
  41. loading: true
  42. });
  43. $.ajax({
  44. method: "get",
  45. dataType: "json",
  46. crossDomain: false,
  47. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  48. data: {
  49. pageNo: pageNo || 1,
  50. pageSize: this.state.pagination.pageSize,
  51. specially: 4, //咨询师管理列表
  52. distribution: this.state.distribution, //全部列表
  53. name: this.state.customerName, //名称
  54. deps: this.state.departmenttSearch, //订单部门
  55. orderNo: this.state.orderNoSearch, //订单编号
  56. starTime: this.state.releaseDate[0], //开始时间
  57. endTime: this.state.releaseDate[1] //结束时间
  58. },
  59. success: function (data) {
  60. ShowModal(this);
  61. let theArr = [];
  62. if (!data.data || !data.data.list) {
  63. if (data.error && data.error.length) {
  64. message.warning(data.error[0].message);
  65. }
  66. } else {
  67. for (let i = 0; i < data.data.list.length; i++) {
  68. let thisdata = data.data.list[i];
  69. theArr.push({
  70. key: i,
  71. id: thisdata.id, //任务ID
  72. orderNo: thisdata.orderNo, //订单编号
  73. totalAmount: thisdata.totalAmount, //签单金额
  74. processStatus: thisdata.processStatus, //流程状态
  75. liquidationStatus: thisdata.liquidationStatus, //结算状态
  76. approval: thisdata.approval, //特批状态
  77. signDate: thisdata.signDate, //签单时间
  78. userName: thisdata.userName, //客户名称
  79. salesmanName: thisdata.salesmanName, //营销员名称
  80. financeName: thisdata.financeName, //财务名称
  81. consultantName: thisdata.consultantName, //项目负责人
  82. createDate: thisdata.createDate, //下单时间
  83. depName: thisdata.depName //部门名称
  84. });
  85. }
  86. }
  87. this.state.pagination.current = data.data.pageNo;
  88. this.state.pagination.total = data.data.totalCount;
  89. if (data.data && data.data.list && !data.data.list.length) {
  90. this.state.pagination.current = 0;
  91. this.state.pagination.total = 0;
  92. }
  93. this.setState({
  94. dataSource: theArr,
  95. pagination: this.state.pagination
  96. });
  97. }.bind(this)
  98. }).always(
  99. function () {
  100. this.setState({
  101. loading: false
  102. });
  103. }.bind(this)
  104. );
  105. },
  106. getInitialState() {
  107. return {
  108. rotateDeg: 0,
  109. orderNos: '',
  110. searchMore: true,
  111. releaseDate: [],
  112. activeKey: "1",
  113. orgCodeUrl: [],
  114. voucherUrl: [],
  115. boHuivisible: false,
  116. selectedRowKeys: [],
  117. declarationBatch: 1,
  118. dataInfor: {},
  119. selectedRows: [],
  120. loading: false,
  121. resVisible: false,
  122. paginations: false,
  123. pagination: {
  124. defaultCurrent: 1,
  125. defaultPageSize: 10,
  126. showQuickJumper: true,
  127. pageSize: 10,
  128. onChange: function (page) {
  129. this.loadData(page);
  130. }.bind(this),
  131. showTotal: function (total) {
  132. return "共" + total + "条数据";
  133. }
  134. },
  135. columns: [
  136. {
  137. title: "订单编号",
  138. dataIndex: "orderNo",
  139. key: "orderNo"
  140. },
  141. {
  142. title: "签单客户",
  143. dataIndex: "userName",
  144. key: "userName"
  145. },
  146. {
  147. title: "下单时间",
  148. dataIndex: "createDate",
  149. key: "createDate"
  150. },
  151. {
  152. title: "签单时间",
  153. dataIndex: "signDate",
  154. key: "signDate"
  155. },
  156. {
  157. title: "订单总金额(万)",
  158. dataIndex: "totalAmount",
  159. key: "totalAmount"
  160. },
  161. {
  162. title: "是否特批",
  163. dataIndex: "approval",
  164. key: "approval",
  165. render: text => {
  166. return getApproval(text);
  167. }
  168. },
  169. {
  170. title: "订单负责人",
  171. dataIndex: "salesmanName",
  172. key: "salesmanName"
  173. },
  174. {
  175. title: "财务负责人",
  176. dataIndex: "financeName",
  177. key: "financeName"
  178. },
  179. {
  180. title: "项目负责人",
  181. dataIndex: "consultantName",
  182. key: "consultantName"
  183. },
  184. {
  185. title: "订单部门",
  186. dataIndex: "depName",
  187. key: "depName"
  188. },
  189. {
  190. title: "分派状态",
  191. dataIndex: "processStatus",
  192. key: "processStatus",
  193. render: (text, record) => {
  194. return text == 5 || text == 6 ? getProcessStatus(text, record.examineName, record.approval) : "未分配";
  195. }
  196. }
  197. ],
  198. columnsrizhi: [
  199. {
  200. title: "流程",
  201. dataIndex: "processName",
  202. key: "processName"
  203. },
  204. {
  205. title: "操作人",
  206. dataIndex: "adminName",
  207. key: "adminName"
  208. },
  209. {
  210. title: "时间",
  211. dataIndex: "createDate",
  212. key: "createDate"
  213. }
  214. ],
  215. dataSource: [],
  216. searchTime: [],
  217. columnsX: [
  218. {
  219. title: "业务项目名称",
  220. dataIndex: "commodityName",
  221. key: "commodityName",
  222. render: (text, record) => {
  223. return <span>
  224. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  225. <div>
  226. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  227. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  228. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  229. {record.cSort == 3 && <span>{record.technologyProjectType==0?'(简易项目)':record.technologyProjectType==1?'(市区级)':record.technologyProjectType==2?'(省级)':record.technologyProjectType==3?'(国家级)':''}</span>}
  230. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  231. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  232. </div>
  233. </span>
  234. }
  235. },
  236. {
  237. title: "项目类别",
  238. dataIndex: "cname",
  239. key: "cname"
  240. },
  241. {
  242. title: "项目数量",
  243. dataIndex: "commodityQuantity",
  244. key: "commodityQuantity",
  245. render: (text, record) => {
  246. if (record.splitStatus == 1) {
  247. return (
  248. <span>
  249. {text}{" "}
  250. <Tag
  251. color="#108ee9"
  252. onClick={e => {
  253. e.stopPropagation();
  254. this.showRes(record);
  255. }}
  256. >
  257. 已拆
  258. </Tag>
  259. </span>
  260. );
  261. } else {
  262. return text;
  263. }
  264. }
  265. },
  266. {
  267. title: "金额(万元)",
  268. dataIndex: "commodityPrice",
  269. key: "commodityPrice"
  270. },
  271. {
  272. title: "负责人",
  273. dataIndex: "contacts",
  274. key: "contacts"
  275. },
  276. {
  277. title: "负责人电话",
  278. dataIndex: "contactsMobile",
  279. key: "contactsMobile"
  280. },
  281. {
  282. title: "主要项目",
  283. dataIndex: "main",
  284. key: "main",
  285. render: text => {
  286. return text ? "是" : "否";
  287. }
  288. },
  289. {
  290. title: "总年限",
  291. dataIndex: "yearSum",
  292. key: "yearSum",
  293. render: (text, record) => {
  294. return (
  295. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  296. );
  297. }
  298. },
  299. {
  300. title: "年限",
  301. dataIndex: "serviceLife",
  302. key: "serviceLife",
  303. render: (text, record) => {
  304. return (
  305. <div>{!!text && JSON.parse(text).toString()}</div>
  306. );
  307. }
  308. },
  309. {
  310. title: "本次派单",
  311. dataIndex: "serviceYear",
  312. key: "serviceYear",
  313. render: (text, record) => {
  314. return (
  315. <div>{!text ? "" : text}</div>
  316. );
  317. }
  318. },
  319. {
  320. title: "项目说明",
  321. dataIndex: "taskComment",
  322. key: "taskComment",
  323. render: text => {
  324. return (
  325. <Tooltip title={text}>
  326. <div
  327. style={{
  328. width: 100,
  329. overflow: "hidden",
  330. whiteSpace: "nowrap",
  331. textOverflow: "ellipsis",
  332. }}
  333. >{text}</div>
  334. </Tooltip>
  335. )
  336. }
  337. }
  338. ],
  339. dataSourceX: []
  340. };
  341. },
  342. componentWillMount() {
  343. // this.departmentList();
  344. this.loadData();
  345. },
  346. tableRowClick(record, index) {
  347. this.state.RowData = record;
  348. this.setState({
  349. visible: true,
  350. orderNos: record.orderNo
  351. });
  352. this.xiangqing(record.orderNo);
  353. this.xiangmu(record.orderNo);
  354. },
  355. // 拆分详细
  356. showRes(record) {
  357. this.setState({
  358. resVisible: true,
  359. resRecord: record
  360. });
  361. },
  362. resCancel() {
  363. this.setState({
  364. resVisible: false
  365. });
  366. },
  367. //订单详情
  368. xiangqing(orderNos) {
  369. $.ajax({
  370. method: "get",
  371. dataType: "json",
  372. crossDomain: false,
  373. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  374. data: {
  375. orderNo: orderNos
  376. },
  377. success: function (data) {
  378. let theArr = [];
  379. if (data.error.length || data.data.list == "") {
  380. if (data.error && data.error.length) {
  381. message.warning(data.error[0].message);
  382. }
  383. } else {
  384. let thisdata = data.data;
  385. this.setState({
  386. orderUid: thisdata.uid,
  387. userType: thisdata.userType,
  388. salesType: thisdata.salesType,
  389. other: thisdata.other,
  390. orderNo: thisdata.orderNo, //订单编号
  391. contractNo: thisdata.contractNo, //合同编号
  392. userName: thisdata.userName, //客户名称
  393. signDate: thisdata.signDate, //签单时间
  394. examineName: thisdata.examineName,
  395. processStatus: thisdata.processStatus, //流程状态
  396. liquidationStatus: thisdata.liquidationStatus, //结算状态
  397. contacts: thisdata.contacts, //企业联系人
  398. contactMobile: thisdata.contactMobile, //联系人电话
  399. legalPerson: thisdata.legalPerson, //法人
  400. legalPersonTel: thisdata.legalPersonTel, //法人电话
  401. firstAmount: thisdata.firstAmount, //签单金额
  402. totalAmount: thisdata.totalAmount, //首付金额
  403. approval: thisdata.approval, //特批状态
  404. settlementAmount: thisdata.settlementAmount, //已收款项
  405. orderRemarks: thisdata.orderRemarks, //订单留言
  406. orgCodeUrl: thisdata.contractPictureUrl
  407. ? splitUrl(
  408. thisdata.contractPictureUrl,
  409. ",",
  410. globalConfig.avatarHost + "/upload"
  411. )
  412. : [], //图片地址
  413. replenishUrl: thisdata.agreementUrl
  414. ? splitUrl(
  415. thisdata.agreementUrl,
  416. ",",
  417. globalConfig.avatarHost + "/upload"
  418. )
  419. : [], //图片地址
  420. contentUrl: thisdata.serviceContent
  421. ? splitUrl(
  422. thisdata.serviceContent,
  423. ",",
  424. globalConfig.avatarHost + "/upload"
  425. )
  426. : [], //图片地址
  427. salesmanName: thisdata.salesmanName, //营销员名称
  428. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  429. financeName: thisdata.financeName, //财务名称
  430. financeMobile: thisdata.financeMobile, //财务电话
  431. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  432. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  433. nowFinance: thisdata.nowFinance, //财务名称
  434. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  435. depName: thisdata.depName, //订单部门
  436. outsource: thisdata.outsource == 0 ? "否" : "是",
  437. deleteSign: thisdata.deleteSign,
  438. knowledgeServices: thisdata.knowledgeServices, //知识产权服务
  439. auditServices: thisdata.auditServices, //审计服务
  440. addDeductionServices: thisdata.addDeductionServices, //加计扣除服务
  441. knowledgeOther: thisdata.knowledgeOther, //知识产权服务其他描述
  442. auditOther: thisdata.auditOther, //审计服务其他描述
  443. addDeductionOther: thisdata.addDeductionOther, //加计扣除服务其他描述
  444. patentStatus: thisdata.patentStatus, //知识产权情况
  445. });
  446. }
  447. }.bind(this)
  448. }).always(
  449. function () {
  450. this.setState({
  451. loading: false
  452. });
  453. }.bind(this)
  454. );
  455. },
  456. //项目列表
  457. xiangmu(orderNos) {
  458. $.ajax({
  459. method: "get",
  460. dataType: "json",
  461. crossDomain: false,
  462. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  463. data: {
  464. orderNo: orderNos
  465. },
  466. success: function (data) {
  467. let theArr = [];
  468. if (data.error.length || data.data.list == "") {
  469. if (data.error && data.error.length) {
  470. message.warning(data.error[0].message);
  471. }
  472. } else {
  473. for (let i = 0; i < data.data.length; i++) {
  474. let thisdata = data.data[i];
  475. thisdata.key = i;
  476. theArr.push(thisdata);
  477. }
  478. }
  479. this.setState({
  480. dataSourceX: theArr
  481. });
  482. }.bind(this)
  483. }).always(
  484. function () {
  485. this.setState({
  486. loading: false
  487. });
  488. }.bind(this)
  489. );
  490. },
  491. closeDesc(e, s) {
  492. this.state.showDesc = e;
  493. if (s) {
  494. this.loadData(this.state.page);
  495. }
  496. },
  497. search() {
  498. this.loadData();
  499. },
  500. reset() {
  501. this.state.nameSearch = "";
  502. this.state.customerName = "";
  503. this.state.releaseDate = [];
  504. this.state.orderNoSearch = "";
  505. this.state.departmenttSearch = undefined;
  506. this.state.distribution = undefined;
  507. this.Cascaders.empty();
  508. this.loadData(this.state.page);
  509. },
  510. resetAll() {
  511. this.state.nameSearch = "";
  512. this.state.customerName = "";
  513. this.state.releaseDate = [];
  514. this.state.orderNoSearch = "";
  515. this.state.departmenttSearch = undefined;
  516. this.state.distribution = undefined;
  517. this.Cascaders.empty();
  518. this.loadData();
  519. },
  520. searchSwitch() {
  521. this.setState({
  522. searchMore: !this.state.searchMore
  523. });
  524. },
  525. rizhi() {
  526. // console.log(this.state.orderNo);
  527. this.setState({
  528. loading: true
  529. });
  530. $.ajax({
  531. method: "get",
  532. dataType: "json",
  533. crossDomain: false,
  534. url: "/api/admin/newOrder/selectOrderLog",
  535. data: {
  536. orderNo: this.state.orderNo
  537. },
  538. success: function (data) {
  539. let theArr = [];
  540. let thisData = data.data;
  541. if (!thisData.length) {
  542. if (data.error && data.error.length) {
  543. message.warning(data.error[0].message);
  544. }
  545. thisData = {};
  546. } else {
  547. for (let i = 0; i < data.data.length; i++) {
  548. let thisdata = data.data[i];
  549. theArr.push({
  550. processName: thisdata.processName,
  551. adminName: thisdata.adminName,
  552. createDate: thisdata.createDate,
  553. remarks: thisdata.remarks
  554. });
  555. }
  556. }
  557. this.setState({
  558. dataSourcerizhi: theArr
  559. });
  560. }.bind(this)
  561. }).always(
  562. function () {
  563. this.setState({
  564. loading: false
  565. });
  566. }.bind(this)
  567. );
  568. },
  569. //查看订单日志
  570. getOrderLog() {
  571. this.setState({
  572. rizhivisible: true
  573. });
  574. this.rizhi();
  575. },
  576. closeOrderLog() {
  577. this.setState({
  578. rizhivisible: false
  579. });
  580. },
  581. //关闭详情
  582. visitCancel(e) {
  583. this.setState({
  584. visible: false
  585. });
  586. this.reset();
  587. },
  588. visitOk(e) {
  589. this.setState({
  590. visible: false
  591. });
  592. this.reset();
  593. },
  594. nextCancel() {
  595. this.setState({
  596. addnextVisible: false
  597. });
  598. },
  599. //点击打卡项目详情
  600. tableRowClickX(record, index) {
  601. this.setState({
  602. jid: record.id, //项目ID
  603. kid: record.commodityId, //商品ID
  604. commodityName: record.commodityName, //金额
  605. commodityPrice: record.commodityPrice, //金额
  606. commodityQuantity: record.commodityQuantity, //数量
  607. taskComment: record.taskComment, //备注
  608. main: record.main.toString(), //是否为主要
  609. addnextVisible: true,
  610. dataInfor: record,
  611. addState: 0
  612. });
  613. },
  614. resets() {
  615. this.state.orderNo = "";
  616. this.state.customerName = "";
  617. this.state.departmenttSearch = undefined;
  618. this.state.releaseDate[0] = undefined;
  619. this.state.releaseDate[1] = undefined;
  620. },
  621. //部门
  622. departmentList() {
  623. this.setState({
  624. loading: true
  625. });
  626. $.ajax({
  627. method: "get",
  628. dataType: "json",
  629. crossDomain: false,
  630. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  631. data: {},
  632. success: function (data) {
  633. let thedata = data.data;
  634. let theArr = [];
  635. if (!thedata) {
  636. if (data.error && data.error.length) {
  637. message.warning(data.error[0].message);
  638. }
  639. thedata = {};
  640. } else {
  641. thedata.map(function (item, index) {
  642. theArr.push({
  643. key: index,
  644. name: item.name,
  645. id: item.id
  646. });
  647. });
  648. }
  649. this.setState({
  650. departmentArr: theArr
  651. });
  652. }.bind(this)
  653. }).always(
  654. function () {
  655. this.setState({
  656. loading: false
  657. });
  658. }.bind(this)
  659. );
  660. },
  661. downImg() {
  662. let num = 0;
  663. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  664. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  665. num = i;
  666. }
  667. }
  668. if (num == this.state.orgCodeUrl.length - 1) {
  669. return message.warning("已经是最后一张了哦");
  670. }
  671. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  672. this.setState({
  673. previewImage: this.state.previewImage,
  674. rotateDeg: 0
  675. });
  676. },
  677. upImg() {
  678. let num = 0;
  679. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  680. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  681. num = i;
  682. }
  683. }
  684. if (num == 0) {
  685. return message.warning("已经是第一张了哦");
  686. }
  687. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  688. this.setState({
  689. previewImage: this.state.previewImage,
  690. rotateDeg: 0
  691. });
  692. },
  693. rotate() {
  694. let rotateDeg = this.state.rotateDeg + 90;
  695. this.setState({
  696. rotateDeg
  697. });
  698. },
  699. downImgs() {
  700. let num = 0;
  701. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  702. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  703. num = i;
  704. }
  705. }
  706. if (num == this.state.replenishUrl.length - 1) {
  707. return message.warning("已经是最后一张了哦");
  708. }
  709. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  710. this.setState({
  711. previewImage: this.state.previewImage,
  712. rotateDeg: 0
  713. });
  714. },
  715. upImgs() {
  716. let num = 0;
  717. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  718. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  719. num = i;
  720. }
  721. }
  722. if (num == 0) {
  723. return message.warning("已经是第一张了哦");
  724. }
  725. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  726. this.setState({
  727. previewImage: this.state.previewImage,
  728. rotateDeg: 0
  729. });
  730. },
  731. rotates() {
  732. let rotateDeg = this.state.rotateDeg + 90;
  733. this.setState({
  734. rotateDeg
  735. });
  736. },
  737. changeList(arr) {
  738. const newArr = [];
  739. this.state.columns.forEach(item => {
  740. arr.forEach(val => {
  741. if (val === item.title) {
  742. newArr.push(item);
  743. }
  744. });
  745. });
  746. this.setState({
  747. changeList: newArr
  748. });
  749. },
  750. render() {
  751. const rowSelection = {
  752. selectedRowKeys: this.state.selectedRowKeys,
  753. onChange: (selectedRowKeys, selectedRows) => {
  754. this.setState({
  755. selectedRows: selectedRows.slice(-1),
  756. selectedRowKeys: selectedRowKeys.slice(-1)
  757. });
  758. }
  759. };
  760. const formItemLayout = {
  761. labelCol: { span: 10 },
  762. wrapperCol: { span: 14 },
  763. };
  764. const FormItem = Form.Item;
  765. let departmentArr = this.state.departmentArr || [];
  766. const hasSelected = this.state.selectedRowKeys.length > 0;
  767. const { RangePicker } = DatePicker;
  768. return (
  769. <div className="user-content">
  770. {this.state.resVisible ? (
  771. <ResolutionDetail
  772. cancel={this.resCancel}
  773. detail={this.state.resRecord}
  774. visible={this.state.resVisible}
  775. id={this.state.resRecord.orderNo}
  776. />
  777. ) : (
  778. ""
  779. )}
  780. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  781. <div className="content-title" style={{ marginBottom: 10 }}>
  782. <span style={{ fontWeight: 900, fontSize: 16 }}>项目派单管理</span>
  783. </div>
  784. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  785. <TabPane tab="搜索" key="1">
  786. <div className="user-search">
  787. <Input
  788. placeholder="订单编号"
  789. value={this.state.orderNoSearch}
  790. onChange={(e) => {
  791. this.setState({ orderNoSearch: e.target.value });
  792. }}
  793. />
  794. <Input
  795. placeholder="客户名称"
  796. value={this.state.customerName}
  797. style={{ marginLeft: 10 }}
  798. onChange={(e) => {
  799. this.setState({ customerName: e.target.value });
  800. }}
  801. />
  802. <Cascaders
  803. ref={node => this.Cascaders = node}
  804. placeholder="订单部门"
  805. id="id"
  806. name="name"
  807. children="list"
  808. height={28}
  809. onSel={(e) => {
  810. this.setState({
  811. departmenttSearch: JSON.stringify(e),
  812. });
  813. }}
  814. />
  815. {/* <Select
  816. placeholder="选择部门"
  817. style={{ width: 200, marginRight: "10px" }}
  818. value={this.state.departmenttSearch}
  819. onChange={(e) => {
  820. this.setState({ departmenttSearch: e });
  821. }}
  822. >
  823. {departmentArr.map(function (item) {
  824. return (
  825. <Select.Option key={item.id}>{item.name}</Select.Option>
  826. );
  827. })}
  828. </Select> */}
  829. <Select
  830. onChange={(e) => {
  831. this.setState({ distribution: e });
  832. }}
  833. style={{ width: 160, marginRight: 5 }}
  834. placeholder="分派状态"
  835. value={this.state.distribution}
  836. >
  837. <Option value="0">未审核</Option>
  838. <Option value="1">未分配</Option>
  839. <Option value="2">部分分配</Option>
  840. <Option value="3">全部分配</Option>
  841. </Select>
  842. <Button type="primary" onClick={this.search}>
  843. 搜索
  844. </Button>
  845. <Button onClick={this.resetAll}>重置</Button>
  846. <span>
  847. 更多搜索
  848. <Switch
  849. defaultChecked={false}
  850. onChange={this.searchSwitch.bind(this)}
  851. />
  852. </span>
  853. <div
  854. className="search-more"
  855. style={this.state.searchMore ? { display: "none" } : {}}
  856. >
  857. <span>订单时间 :</span>
  858. <RangePicker
  859. value={[
  860. this.state.releaseDate[0]
  861. ? moment(this.state.releaseDate[0])
  862. : null,
  863. this.state.releaseDate[1]
  864. ? moment(this.state.releaseDate[1])
  865. : null,
  866. ]}
  867. onChange={(data, dataString) => {
  868. this.setState({ releaseDate: dataString });
  869. }}
  870. />
  871. </div>
  872. </div>
  873. </TabPane>
  874. <TabPane tab="更改表格显示数据" key="2">
  875. <div style={{ marginLeft: 10 }}>
  876. <ChooseList
  877. columns={this.state.columns}
  878. changeFn={this.changeList}
  879. changeList={this.state.changeList}
  880. top={55}
  881. margin={11}
  882. />
  883. </div>
  884. </TabPane>
  885. </Tabs>
  886. <div className="patent-table">
  887. <Spin spinning={this.state.loading}>
  888. <Table
  889. columns={
  890. this.state.changeList
  891. ? this.state.changeList
  892. : this.state.columns
  893. }
  894. dataSource={this.state.dataSource}
  895. rowSelection={rowSelection}
  896. pagination={this.state.pagination}
  897. onRowClick={this.tableRowClick.bind(this)}
  898. bordered
  899. size="middle"
  900. />
  901. </Spin>
  902. </div>
  903. {this.state.visible ? <Modal
  904. className="customeDetails"
  905. footer=""
  906. title="订单详情"
  907. width="1200px"
  908. visible={this.state.visible}
  909. onOk={this.visitOk}
  910. onCancel={this.visitCancel}
  911. >
  912. <Form
  913. layout="horizontal"
  914. onSubmit={this.handleSubmit}
  915. // id="demand-form"
  916. style={{ paddingBottom: "40px" }}
  917. >
  918. <Spin spinning={this.state.loading}>
  919. <div className="clearfix">
  920. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  921. <OrderItemStatus deleteSign={this.state.deleteSign} />
  922. </div>
  923. <FormItem
  924. className="half-item"
  925. {...formItemLayout}
  926. label="订单编号"
  927. >
  928. <span>{this.state.orderNo}</span>
  929. </FormItem>
  930. <FormItem
  931. className="half-item"
  932. {...formItemLayout}
  933. label="合同编号"
  934. >
  935. <span>{this.state.contractNo}</span>
  936. </FormItem>
  937. <FormItem
  938. className="half-item"
  939. {...formItemLayout}
  940. label="客户名称"
  941. >
  942. <span>{this.state.userName}</span>
  943. <EnterpriseNameChange
  944. type='journal'
  945. style={{ marginLeft: 10 }}
  946. enterpriseId={this.state.orderUid} />
  947. </FormItem>
  948. <FormItem
  949. className="half-item"
  950. {...formItemLayout}
  951. label="销售类型"
  952. >
  953. <span>
  954. {(["私有客户-", "签单客户-"][this.state.userType] || " ") +
  955. (salesList[this.state.salesType] || "")}
  956. {
  957. this.state.other != null && this.state.other != "" &&
  958. <Tooltip title={this.state.other}>
  959. <span>
  960. {"(" + this.state.other.toString().slice(0, 10) + (this.state.other.toString().length > 9 ? "...)" : ")")}
  961. </span>
  962. </Tooltip>
  963. }
  964. </span>
  965. </FormItem>
  966. <FormItem
  967. className="half-item"
  968. {...formItemLayout}
  969. label="合同签订时间"
  970. >
  971. <span>{this.state.signDate}</span>
  972. </FormItem>
  973. <FormItem
  974. className="half-item"
  975. {...formItemLayout}
  976. label="流程状态"
  977. >
  978. <span>{getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}</span>
  979. <FlowChart
  980. orderNo={this.state.orderNos}
  981. />
  982. </FormItem>
  983. <FormItem
  984. className="half-item"
  985. {...formItemLayout}
  986. label="结算状态"
  987. >
  988. <span>
  989. {getLiquidationStatus(this.state.liquidationStatus)}
  990. </span>
  991. </FormItem>
  992. <FormItem
  993. className="half-item"
  994. {...formItemLayout}
  995. label="企业联系人"
  996. >
  997. <span>{this.state.contacts}</span>
  998. </FormItem>
  999. <FormItem
  1000. className="half-item"
  1001. {...formItemLayout}
  1002. label="联系人电话"
  1003. >
  1004. <span>{this.state.contactMobile}</span>
  1005. </FormItem>
  1006. <FormItem
  1007. className="half-item"
  1008. {...formItemLayout}
  1009. label="企业法人"
  1010. >
  1011. <span>{this.state.legalPerson}</span>
  1012. </FormItem>
  1013. <FormItem
  1014. className="half-item"
  1015. {...formItemLayout}
  1016. label="法人电话"
  1017. >
  1018. <span>{this.state.legalPersonTel}</span>
  1019. </FormItem>
  1020. <FormItem
  1021. className="half-item"
  1022. {...formItemLayout}
  1023. label="签单金额(万元)"
  1024. >
  1025. <span>{this.state.totalAmount}</span>
  1026. </FormItem>
  1027. <FormItem
  1028. className="half-item"
  1029. {...formItemLayout}
  1030. label="首付金额(万元)"
  1031. >
  1032. <span>{this.state.firstAmount}</span>
  1033. </FormItem>
  1034. <FormItem
  1035. className="half-item"
  1036. {...formItemLayout}
  1037. label="特批立项"
  1038. >
  1039. <span>{getApprovedState(this.state.approval)}</span>
  1040. </FormItem>
  1041. <FormItem
  1042. className="half-item"
  1043. {...formItemLayout}
  1044. label="已收款项(万元)"
  1045. >
  1046. <span>{this.state.settlementAmount}</span>
  1047. </FormItem>
  1048. <FormItem
  1049. className="half-item"
  1050. {...formItemLayout}
  1051. label="是否外包"
  1052. >
  1053. <span>{this.state.outsource}</span>
  1054. </FormItem>
  1055. <div className="clearfix">
  1056. <FormItem
  1057. labelCol={{ span: 5 }}
  1058. wrapperCol={{ span: 19 }}
  1059. label="订单留言"
  1060. >
  1061. <span>{this.state.orderRemarks}</span>
  1062. </FormItem>
  1063. </div>
  1064. <div className="clearfix">
  1065. <FormItem
  1066. labelCol={{ span: 5 }}
  1067. wrapperCol={{ span: 19 }}
  1068. label="合同扫描件"
  1069. >
  1070. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1071. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} domId={'projectQuery1'} /> : <div />}
  1072. </div>
  1073. <Button
  1074. style={{
  1075. float: "right",
  1076. marginRight: "140px",
  1077. marginTop: "20px",
  1078. }}
  1079. onClick={this.getOrderLog}
  1080. >
  1081. 查看订单日志
  1082. </Button>
  1083. </FormItem>
  1084. {/* 高新纯咨询合同说明详情 */}
  1085. <Gxczx
  1086. knowledgeServices={this.state.knowledgeServices}
  1087. auditServices={this.state.auditServices}
  1088. addDeductionServices={this.state.addDeductionServices}
  1089. knowledgeOther={this.state.knowledgeOther}
  1090. auditOther={this.state.auditOther}
  1091. addDeductionOther={this.state.addDeductionOther}
  1092. />
  1093. <FormItem
  1094. labelCol={{ span: 5 }}
  1095. wrapperCol={{ span: 19 }}
  1096. label="补充协议"
  1097. >
  1098. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1099. {this.state.visible && this.state.replenishUrl ? <ImgList fileList={this.state.replenishUrl} domId={'projectQuery2'} /> : <div />}
  1100. </div>
  1101. </FormItem>
  1102. </div>
  1103. <Property
  1104. patentStatus={this.state.patentStatus}
  1105. />
  1106. <ContentUrl
  1107. processStatus={2}
  1108. domId={"projectQueryContents"}
  1109. contentUrl={this.state.contentUrl}
  1110. imgId={"projectQueryContentsImg"}
  1111. />
  1112. <div className="clearfix">
  1113. <FormItem
  1114. className="half-item"
  1115. {...formItemLayout}
  1116. label="订单负责人"
  1117. >
  1118. <span>{this.state.salesmanName}</span>
  1119. </FormItem>
  1120. <FormItem
  1121. className="half-item"
  1122. {...formItemLayout}
  1123. label="订单负责人电话"
  1124. >
  1125. <span>{this.state.salesmanMobile}</span>
  1126. </FormItem>
  1127. <FormItem
  1128. className="half-item"
  1129. {...formItemLayout}
  1130. label="订单部门"
  1131. >
  1132. <span>{this.state.depName}</span>
  1133. </FormItem>
  1134. </div>
  1135. <div className="clearfix">
  1136. <FormItem
  1137. className="half-item"
  1138. {...formItemLayout}
  1139. label="当前财务负责人"
  1140. >
  1141. <span>{this.state.nowFinance}</span>
  1142. </FormItem>
  1143. <FormItem
  1144. className="half-item"
  1145. {...formItemLayout}
  1146. label="当前财务负责人电话"
  1147. >
  1148. <span>{this.state.nowFinanceMobile}</span>
  1149. </FormItem>
  1150. </div>
  1151. <div className="clearfix">
  1152. <FormItem
  1153. className="half-item"
  1154. {...formItemLayout}
  1155. style={{ opacity: ".5" }}
  1156. label="原订单负责人"
  1157. >
  1158. <span>{this.state.oldSalesmanName}</span>
  1159. </FormItem>
  1160. <FormItem
  1161. className="half-item"
  1162. {...formItemLayout}
  1163. style={{ opacity: ".5" }}
  1164. label="原订单负责人电话"
  1165. >
  1166. <span>{this.state.oldSalesmanMobile}</span>
  1167. </FormItem>
  1168. </div>
  1169. <div className="clearfix">
  1170. <FormItem
  1171. className="half-item"
  1172. {...formItemLayout}
  1173. style={{ opacity: ".5" }}
  1174. label="实际财务操作人"
  1175. >
  1176. <span>{this.state.financeName}</span>
  1177. </FormItem>
  1178. <FormItem
  1179. className="half-item"
  1180. {...formItemLayout}
  1181. style={{ opacity: ".5" }}
  1182. label="实际财务操作人电话"
  1183. >
  1184. <span>{this.state.financeMobile}</span>
  1185. </FormItem>
  1186. </div>
  1187. <div>
  1188. <OrderCoor orderNo={this.state.orderNos} />
  1189. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1190. 项目业务
  1191. </span>
  1192. {this.state.processStatus == 0 ? (
  1193. <Button
  1194. type="primary"
  1195. onClick={this.addDetailed}
  1196. style={{
  1197. float: "right",
  1198. marginRight: "50px",
  1199. marginBottom: "15px",
  1200. }}
  1201. >
  1202. 添加项目明细
  1203. </Button>
  1204. ) : (
  1205. ""
  1206. )}
  1207. </div>
  1208. <div className="patent-table">
  1209. <Spin spinning={this.state.loading}>
  1210. <Table
  1211. columns={this.state.columnsX}
  1212. size="small"
  1213. bordered
  1214. dataSource={this.state.dataSourceX}
  1215. pagination={this.state.paginations}
  1216. onRowClick={this.tableRowClickX}
  1217. />
  1218. </Spin>
  1219. </div>
  1220. </div>
  1221. </Spin>
  1222. </Form>
  1223. </Modal> : <div />}
  1224. {/* <Modal
  1225. visible={this.state.rizhivisible}
  1226. className="admin-desc-content"
  1227. width="800px"
  1228. maskClosable={false}
  1229. title="订单日志"
  1230. footer={null}
  1231. onCancel={this.closeOrderLog}
  1232. >
  1233. <div className="patent-table">
  1234. <Spin spinning={this.state.loading}>
  1235. <Table
  1236. columns={this.state.columnsrizhi}
  1237. dataSource={this.state.dataSourcerizhi}
  1238. pagination={false}
  1239. />
  1240. </Spin>
  1241. </div>
  1242. </Modal> */}
  1243. <OrderRiZi
  1244. dataSourcerizhi={this.state.dataSourcerizhi}
  1245. closeOrderLog={this.closeOrderLog}
  1246. visible={this.state.rizhivisible}
  1247. loading={this.state.loading}
  1248. />
  1249. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1250. infor={this.state.dataInfor}
  1251. visible={this.state.addnextVisible}
  1252. onCancel={this.nextCancel}
  1253. />} */}
  1254. {
  1255. // 项目业务详情
  1256. this.state.addnextVisible &&
  1257. <NewEditProject
  1258. readOnly={true}
  1259. visible={this.state.addnextVisible}
  1260. dataInfor={this.state.dataInfor}
  1261. onCancel={this.nextCancel}
  1262. />
  1263. }
  1264. </div>
  1265. );
  1266. }
  1267. });
  1268. export default PaiDan;