taskAssignment.jsx 36 KB

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