taskAssignment.jsx 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083
  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: "splitSuper",
  554. key: "splitSuper",
  555. render: (text, record) => {
  556. return (
  557. text + "-" + record.splitId
  558. )
  559. }
  560. },
  561. {
  562. title: "任务名称",
  563. dataIndex: "taskName",
  564. key: "taskName"
  565. },
  566. {
  567. title: "订单编号",
  568. dataIndex: "orderNo",
  569. key: "orderNo"
  570. },
  571. {
  572. title: "业务类别",
  573. dataIndex: "cname",
  574. key: "cname"
  575. },
  576. {
  577. title: "客户名称",
  578. dataIndex: "userName",
  579. key: "userName"
  580. },
  581. {
  582. title: "项目状态",
  583. dataIndex: "projectStatus",
  584. key: "projectStatus",
  585. render: text => {
  586. return getProjectStatus(text);
  587. }
  588. },
  589. {
  590. title: "分配时间",
  591. dataIndex: "taskDate",
  592. key: "taskDate"
  593. },
  594. {
  595. title: "任务数量",
  596. dataIndex: "commodityQuantity",
  597. key: "commodityQuantity"
  598. },
  599. {
  600. title: "订单部门",
  601. dataIndex: "depName",
  602. key: "depName"
  603. },
  604. {
  605. title: "拆分操作人",
  606. dataIndex: "splitAname",
  607. key: "splitAname"
  608. },
  609. {
  610. title: "拆分时间人",
  611. dataIndex: "splitTimes",
  612. key: "splitTimes"
  613. },
  614. {
  615. title: "操作",
  616. dataIndex: "caozuo",
  617. key: "caouzo",
  618. render: (text, record) => {
  619. return (
  620. <div>
  621. <Button
  622. type="primary"
  623. style={{ margin: "0 10px" }}
  624. disabled={record.distributeSign == 1 ? true : false}
  625. onClick={e => {
  626. e.stopPropagation(), this.evaluate(record, "咨询师经理");
  627. }}
  628. >
  629. 转交
  630. </Button>
  631. <Button
  632. type="primary"
  633. style={{ margin: "0 10px" }}
  634. disabled={record.distributeSign == 1 ? true : false}
  635. onClick={e => {
  636. e.stopPropagation(), this.evaluate(record, "咨询师");
  637. }}
  638. >
  639. 分配任务
  640. </Button>
  641. </div>
  642. );
  643. }
  644. }
  645. ];
  646. return (
  647. <Table
  648. columns={columns}
  649. dataSource={data}
  650. pagination={false}
  651. onRowClick={this.tableRowClick.bind(this)}
  652. />
  653. );
  654. } else {
  655. columns = [];
  656. return (
  657. <p style={{ fontWeight: "bold", color: "red", textAlign: "center" }}>
  658. 此项目暂未拆分
  659. </p>
  660. );
  661. }
  662. }
  663. const rowSelection = {
  664. selectedRowKeys: this.state.selectedRowKeys,
  665. onChange: (selectedRowKeys, selectedRows) => {
  666. this.setState({
  667. selectedRows: selectedRows.slice(-1),
  668. selectedRowKeys: selectedRowKeys.slice(-1)
  669. });
  670. }
  671. };
  672. const formItemLayout = {
  673. labelCol: { span: 8 },
  674. wrapperCol: { span: 14 }
  675. };
  676. let departmentArr = this.state.departmentArr || [];
  677. return (
  678. <div className="user-content">
  679. {
  680. this.state.resVisible ? (
  681. <ResolutionDetail
  682. cancel={this.resCancel}
  683. detail={this.state.resRecord}
  684. visible={this.state.resVisible}
  685. id={this.state.resRecord.orderNo}
  686. />
  687. ) : ("")
  688. }
  689. <ResolutionPro
  690. resolutionVisible={this.state.resolutionVisible}
  691. number={this.state.resolutionNumber}
  692. name={this.state.resolutionName}
  693. cancel={this.resolutionCancel}
  694. id={this.state.resolutionId}
  695. loadData={this.loadData}
  696. />
  697. <ShowModalDiv ShowModal={this.state.showModal} />
  698. <div className="content-title">
  699. <span>任务派单</span>
  700. </div>
  701. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  702. <TabPane tab="搜索" key="1">
  703. <div className="user-search">
  704. <Input
  705. placeholder="客户名称"
  706. value={this.state.nameSearch}
  707. style={{ marginLeft: 10 }}
  708. onChange={e => {
  709. this.setState({ nameSearch: e.target.value });
  710. }}
  711. />
  712. <Input
  713. placeholder="订单编号"
  714. value={this.state.orderNoSearch}
  715. onChange={e => {
  716. this.setState({ orderNoSearch: e.target.value });
  717. }}
  718. />
  719. <Input
  720. placeholder="任务编号"
  721. value={this.state.taskNoSearch}
  722. onChange={e => {
  723. this.setState({ taskNoSearch: e.target.value });
  724. }}
  725. />
  726. <Select
  727. placeholder="选择部门"
  728. style={{ width: 150, marginRight: "10px" }}
  729. value={this.state.departmenttSearch}
  730. onChange={e => {
  731. this.setState({ departmenttSearch: e });
  732. }}
  733. >
  734. {departmentArr.map(function(item) {
  735. return (
  736. <Select.Option key={item.id}>{item.name}</Select.Option>
  737. );
  738. })}
  739. </Select>
  740. <Button type="primary" onClick={this.search}>
  741. 搜索
  742. </Button>
  743. <Button onClick={this.reset}>重置</Button>
  744. {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  745. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  746. <span>订单时间 :</span>
  747. <RangePicker
  748. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  749. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  750. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  751. </div> */}
  752. </div>
  753. </TabPane>
  754. </Tabs>
  755. <div className="patent-table">
  756. <Spin spinning={this.state.loading}>
  757. <Table
  758. columns={this.state.columns}
  759. dataSource={this.state.dataSource}
  760. expandedRowRender={expandedRowRender}
  761. // rowSelection={rowSelection}
  762. pagination={this.state.pagination}
  763. onRowClick={this.tableRowClick.bind(this)}
  764. bordered
  765. size="small"
  766. />
  767. </Spin>
  768. </div>
  769. <Assign
  770. title="任务"
  771. selApi={"/api/admin/orderProject/projectDistribution"}
  772. data={this.state.assignData}
  773. showDesc={this.state.assignVisible}
  774. closeDesc={this.closeAssign.bind(this)}
  775. fenpaiData={8}
  776. specially={this.state.nub == "咨询师经理" ? 1 : 0}
  777. // 判断是转交按钮还是分配任务按钮
  778. // chooseBtn={this.state.nub == "咨询师经理" ? true : false}
  779. roleName={this.state.nub}
  780. requestMethod={"post"}
  781. />
  782. <Modal
  783. className="customeDetails"
  784. footer=""
  785. title="任务详情"
  786. width="900px"
  787. visible={this.state.visible}
  788. onOk={this.visitOk}
  789. onCancel={this.visitCancel}
  790. >
  791. <Form
  792. layout="horizontal"
  793. onSubmit={this.handleSubmit}
  794. id="demand-form"
  795. style={{ paddingBottom: "40px" }}
  796. >
  797. <Spin spinning={this.state.loading}>
  798. <div className="clearfix">
  799. <FormItem
  800. className="half-item"
  801. {...formItemLayout}
  802. label="订单编号"
  803. >
  804. <span>{this.state.orderNo}</span>
  805. </FormItem>
  806. <FormItem
  807. className="half-item"
  808. {...formItemLayout}
  809. label="合同编号"
  810. >
  811. <span>{this.state.contractNo}</span>
  812. </FormItem>
  813. <FormItem
  814. className="half-item"
  815. {...formItemLayout}
  816. label="客户名称"
  817. >
  818. <span>{this.state.userName}</span>
  819. </FormItem>
  820. <FormItem
  821. className="half-item"
  822. {...formItemLayout}
  823. label="合同签订时间"
  824. >
  825. <span>{this.state.signDate}</span>
  826. </FormItem>
  827. <FormItem
  828. className="half-item"
  829. {...formItemLayout}
  830. label="流程状态"
  831. >
  832. <span>{getProcessStatus(this.state.processStatus)}</span>
  833. </FormItem>
  834. <FormItem
  835. className="half-item"
  836. {...formItemLayout}
  837. label="结算状态"
  838. >
  839. <span>
  840. {getLiquidationStatus(this.state.liquidationStatus)}
  841. </span>
  842. </FormItem>
  843. <FormItem
  844. className="half-item"
  845. {...formItemLayout}
  846. label="企业联系人"
  847. >
  848. <span>{this.state.contacts}</span>
  849. </FormItem>
  850. <FormItem
  851. className="half-item"
  852. {...formItemLayout}
  853. label="联系人电话"
  854. >
  855. <span>{this.state.contactMobile}</span>
  856. </FormItem>
  857. <FormItem
  858. className="half-item"
  859. {...formItemLayout}
  860. label="企业法人"
  861. >
  862. <span>{this.state.legalPerson}</span>
  863. </FormItem>
  864. <FormItem
  865. className="half-item"
  866. {...formItemLayout}
  867. label="法人电话"
  868. >
  869. <span>{this.state.legalPersonTel}</span>
  870. </FormItem>
  871. <FormItem
  872. className="half-item"
  873. {...formItemLayout}
  874. label="签单金额(万元)"
  875. >
  876. <span>{this.state.totalAmount}</span>
  877. </FormItem>
  878. <FormItem
  879. className="half-item"
  880. {...formItemLayout}
  881. label="首付金额(万元)"
  882. >
  883. <span>{this.state.firstAmount}</span>
  884. </FormItem>
  885. <FormItem
  886. className="half-item"
  887. {...formItemLayout}
  888. label="特批立项"
  889. >
  890. <span>{getApprovedState(this.state.approval)}</span>
  891. </FormItem>
  892. <FormItem
  893. className="half-item"
  894. {...formItemLayout}
  895. label="已收款项(万元)"
  896. >
  897. <span>{this.state.settlementAmount}</span>
  898. </FormItem>
  899. <div className="clearfix">
  900. <FormItem
  901. labelCol={{ span: 4 }}
  902. wrapperCol={{ span: 16 }}
  903. label="订单留言"
  904. >
  905. <p style={{ width: 500, wordWrap: "break-word" }}>
  906. {this.state.orderRemarks}
  907. </p>
  908. </FormItem>
  909. </div>
  910. <div className="clearfix">
  911. <FormItem
  912. className="half-item"
  913. {...formItemLayout}
  914. label="订单负责人"
  915. >
  916. <span>{this.state.salesmanName}</span>
  917. </FormItem>
  918. <FormItem
  919. className="half-item"
  920. {...formItemLayout}
  921. label="订单负责人电话"
  922. >
  923. <span>{this.state.salesmanMobile}</span>
  924. </FormItem>
  925. <FormItem
  926. className="half-item"
  927. {...formItemLayout}
  928. label="订单部门"
  929. >
  930. <span>{this.state.depName}</span>
  931. </FormItem>
  932. </div>
  933. <div className="clearfix">
  934. <FormItem
  935. className="half-item"
  936. {...formItemLayout}
  937. label="当前财务负责人"
  938. >
  939. <span>{this.state.nowFinance}</span>
  940. </FormItem>
  941. <FormItem
  942. className="half-item"
  943. {...formItemLayout}
  944. label="当前财务负责人电话"
  945. >
  946. <span>{this.state.nowFinanceMobile}</span>
  947. </FormItem>
  948. </div>
  949. <div className="clearfix">
  950. <FormItem
  951. className="half-item"
  952. {...formItemLayout}
  953. style={{ opacity: ".5" }}
  954. label="原订单负责人"
  955. >
  956. <span>{this.state.oldSalesmanName}</span>
  957. </FormItem>
  958. <FormItem
  959. className="half-item"
  960. {...formItemLayout}
  961. style={{ opacity: ".5" }}
  962. label="原订单负责人电话"
  963. >
  964. <span>{this.state.oldSalesmanMobile}</span>
  965. </FormItem>
  966. </div>
  967. <div className="clearfix">
  968. <FormItem
  969. className="half-item"
  970. {...formItemLayout}
  971. style={{ opacity: ".5" }}
  972. label="实际财务操作人"
  973. >
  974. <span>{this.state.financeName}</span>
  975. </FormItem>
  976. <FormItem
  977. className="half-item"
  978. {...formItemLayout}
  979. style={{ opacity: ".5" }}
  980. label="实际财务操作人电话"
  981. >
  982. <span>{this.state.financeMobile}</span>
  983. </FormItem>
  984. </div>
  985. <div>
  986. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  987. 项目业务
  988. </span>
  989. {this.state.processStatus == 0 ? (
  990. <Button
  991. type="primary"
  992. onClick={this.addDetailed}
  993. style={{
  994. float: "right",
  995. marginRight: "50px",
  996. marginBottom: "15px"
  997. }}
  998. >
  999. 添加项目明细
  1000. </Button>
  1001. ) : (
  1002. ""
  1003. )}
  1004. </div>
  1005. <div className="patent-table">
  1006. <Spin spinning={this.state.loading}>
  1007. <Table
  1008. columns={this.state.columnsX}
  1009. dataSource={this.state.dataSourceX}
  1010. pagination={this.state.paginations}
  1011. onRowClick={this.tableRowClickX}
  1012. bordered
  1013. size="small"
  1014. />
  1015. </Spin>
  1016. </div>
  1017. </div>
  1018. </Spin>
  1019. </Form>
  1020. </Modal>
  1021. <Modal
  1022. maskClosable={false}
  1023. visible={this.state.addnextVisible}
  1024. onOk={this.nextCancel}
  1025. onCancel={this.nextCancel}
  1026. width="800px"
  1027. title="项目任务详情"
  1028. footer=""
  1029. className="admin-desc-content"
  1030. >
  1031. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1032. <Spin spinning={this.state.loading}>
  1033. <div className="clearfix">
  1034. <FormItem
  1035. className="half-item"
  1036. {...formItemLayout}
  1037. label="项目名称"
  1038. >
  1039. <span>{this.state.commodityName}</span>
  1040. </FormItem>
  1041. <FormItem
  1042. className="half-item"
  1043. {...formItemLayout}
  1044. label="项目数量"
  1045. >
  1046. <span>{this.state.commodityQuantity}</span>
  1047. </FormItem>
  1048. <FormItem
  1049. className="half-item"
  1050. {...formItemLayout}
  1051. label="金额(万元)"
  1052. >
  1053. <span>{this.state.commodityPrice}</span>
  1054. </FormItem>
  1055. <FormItem
  1056. className="half-item"
  1057. {...formItemLayout}
  1058. label="主要项目"
  1059. >
  1060. <span>{getboutique(this.state.main)}</span>
  1061. </FormItem>
  1062. <div className="clearfix">
  1063. <FormItem
  1064. labelCol={{ span: 4 }}
  1065. wrapperCol={{ span: 16 }}
  1066. label="服务说明"
  1067. >
  1068. <span>{this.state.taskComment}</span>
  1069. </FormItem>
  1070. </div>
  1071. </div>
  1072. </Spin>
  1073. </Form>
  1074. </Modal>
  1075. </div>
  1076. );
  1077. }
  1078. });
  1079. export default Task;