personnelAll.jsx 37 KB

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