taskAssignment.jsx 33 KB

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