personnelAll.jsx 36 KB

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