taskAssignment.jsx 34 KB

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