personnelAll.jsx 37 KB

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