personnelAll.jsx 38 KB

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