outOutsourcingList.jsx 34 KB

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