personnelAll.jsx 35 KB

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