outsourcingPaiDan.jsx 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762
  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. Tooltip
  19. } from "antd";
  20. import Assign from "@/manageCenter/publicComponent/assign";
  21. import ResolutionDetail from "@/resolutionDetail";
  22. import {
  23. getjiedian,
  24. getProcessStatus,
  25. getApproval,
  26. getNewOrderType,
  27. getLiquidationStatus,
  28. splitUrl,
  29. getprovince,
  30. getRefundStatus
  31. } from "@/tools";
  32. import ImgList from "../../../common/imgList";
  33. import { ChooseList } from "../../order/orderNew/chooseList";
  34. import { getProjectName } from "../../../tools";
  35. import OrderItemStatus from "../../../common/orderItemStatus";
  36. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  37. import ContentUrl from "../../order/orderNew/contentUrl";
  38. import { salesList } from "@/dataDic.js";
  39. const FormItem = Form.Item;
  40. const outsourcingPaiDan = React.createClass({
  41. departmentList() {
  42. this.setState({
  43. loading: true,
  44. });
  45. $.ajax({
  46. method: "get",
  47. dataType: "json",
  48. crossDomain: false,
  49. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  50. data: {},
  51. success: function (data) {
  52. let thedata = data.data;
  53. let theArr = [];
  54. if (!thedata) {
  55. if (data.error && data.error.length) {
  56. message.warning(data.error[0].message);
  57. }
  58. } else {
  59. thedata.map(function (item, index) {
  60. theArr.push({
  61. key: index,
  62. name: item.name,
  63. id: item.id,
  64. });
  65. });
  66. }
  67. this.setState({
  68. departmentArr: theArr,
  69. });
  70. }.bind(this),
  71. }).always(
  72. function () {
  73. this.setState({
  74. loading: false,
  75. });
  76. }.bind(this)
  77. );
  78. },
  79. loadData(pageNo) {
  80. this.state.data = [];
  81. this.setState({
  82. selectedRowKeys: [],
  83. selectedRowKey: [],
  84. page: pageNo,
  85. loading: true,
  86. });
  87. $.ajax({
  88. method: "get",
  89. dataType: "json",
  90. crossDomain: false,
  91. url: globalConfig.context + "/api/admin/financial/allUnassignedOrder",
  92. data: {
  93. pageNo: pageNo || 1,
  94. pageSize: this.state.pagination.pageSize,
  95. buyerName: this.state.nameSearch, //客户名称
  96. orderNo: this.state.orderNoSearch,
  97. startTime: this.state.releaseDate[0],
  98. endTime: this.state.releaseDate[1],
  99. processStatus: this.state.processStatusSearch,
  100. contractNo: this.state.contractNoSearch,
  101. departmentId: this.state.departmenttList,
  102. outsource: 1,
  103. },
  104. success: function (data) {
  105. let theArr = [];
  106. if (!data.data || !data.data.list) {
  107. if (data.error && data.error.length) {
  108. message.warning(data.error[0].message);
  109. }
  110. } else {
  111. for (let i = 0; i < data.data.list.length; i++) {
  112. let thisdata = data.data.list[i];
  113. theArr.push({
  114. key: i,
  115. orderNo: thisdata.orderNo,
  116. approval: thisdata.approval,
  117. orderType: thisdata.orderType,
  118. processStatus: thisdata.processStatus,
  119. signTotalAmount: thisdata.signTotalAmount,
  120. buyerName: thisdata.buyerName,
  121. sellerName: thisdata.sellerName,
  122. createTime: thisdata.createTime
  123. ? new Date(thisdata.createTime).toLocaleString()
  124. : "",
  125. signTime: thisdata.signTime,
  126. contractNo: thisdata.contractNo,
  127. financeId: thisdata.financeId,
  128. departmentName: thisdata.departmentName,
  129. outsourceName: thisdata.outsourceName,
  130. });
  131. }
  132. }
  133. this.state.pagination.total = data.data.totalCount;
  134. this.state.pagination.current = data.data.pageNo;
  135. if (data.data && data.data.list && !data.data.list.length) {
  136. this.state.pagination.current = 0;
  137. this.state.pagination.total = 0;
  138. }
  139. this.setState({
  140. totalPage: data.data.totalPage,
  141. dataSource: theArr,
  142. pagination: this.state.pagination,
  143. });
  144. }.bind(this),
  145. }).always(
  146. function () {
  147. this.setState({
  148. loading: false,
  149. });
  150. }.bind(this)
  151. );
  152. },
  153. getInitialState() {
  154. return {
  155. rotateDeg: 0,
  156. searchMore: true,
  157. assignVisible: false,
  158. releaseDate: [],
  159. totalPage: 0,
  160. attachmentUrl: [],
  161. pictureUrl: [],
  162. processStatusSearch: "2",
  163. boHuivisible: false,
  164. selectedRowKeys: [],
  165. selectedRows: [],
  166. modKey: "1",
  167. width: "800px",
  168. loading: false,
  169. pagination: {
  170. defaultCurrent: 1,
  171. defaultPageSize: 10,
  172. showQuickJumper: true,
  173. pageSize: 10,
  174. onChange: function (page) {
  175. this.loadData(page);
  176. }.bind(this),
  177. showTotal: function (total) {
  178. return "共" + total + "条数据";
  179. },
  180. },
  181. columns: [
  182. {
  183. title: "订单编号",
  184. dataIndex: "orderNo",
  185. key: "orderNo",
  186. },
  187. {
  188. title: "合同编号",
  189. dataIndex: "contractNo",
  190. key: "contractNo",
  191. },
  192. {
  193. title: "下单时间",
  194. dataIndex: "createTime",
  195. key: "createTime",
  196. },
  197. {
  198. title: "签单时间",
  199. dataIndex: "signTime",
  200. key: "signTime",
  201. },
  202. {
  203. title: "签单客户",
  204. dataIndex: "buyerName",
  205. key: "buyerName",
  206. render: (text) => {
  207. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  208. },
  209. },
  210. {
  211. title: "外包公司",
  212. dataIndex: "outsourceName",
  213. key: "outsourceName",
  214. render: (text) => {
  215. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  216. },
  217. },
  218. {
  219. title: "流程状态",
  220. dataIndex: "processStatus",
  221. key: "processStatus",
  222. render: (text) => {
  223. return getProcessStatus(text);
  224. },
  225. },
  226. {
  227. title: "订单部门",
  228. dataIndex: "departmentName",
  229. key: "departmentName",
  230. render: (text) => {
  231. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  232. },
  233. },
  234. {
  235. title: "订单总金额(万)",
  236. dataIndex: "signTotalAmount",
  237. key: "signTotalAmount",
  238. },
  239. {
  240. title: "是否特批",
  241. dataIndex: "approval",
  242. key: "approval",
  243. render: (text) => {
  244. return getApproval(text);
  245. },
  246. },
  247. {
  248. title: "订单负责人",
  249. dataIndex: "sellerName",
  250. key: "sellerName",
  251. },
  252. {
  253. title: "操作",
  254. dataIndex: "caozuo",
  255. key: "caouzo",
  256. render: (text, recard) => {
  257. return <div>{this.judgeFenpai(recard)}</div>;
  258. },
  259. },
  260. ],
  261. columnsX: [
  262. {
  263. title: "业务项目名称",
  264. dataIndex: "commodityName",
  265. key: "commodityName",
  266. render: (text, record) => {
  267. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  268. }
  269. },
  270. {
  271. title: "项目类别",
  272. dataIndex: "cname",
  273. key: "cname",
  274. },
  275. {
  276. title: "项目数量",
  277. dataIndex: "commodityQuantity",
  278. key: "commodityQuantity",
  279. render: (text, record) => {
  280. if (record.splitStatus == 1) {
  281. return (
  282. <span>
  283. {text}{" "}
  284. <Tag
  285. color="#108ee9"
  286. onClick={(e) => {
  287. e.stopPropagation();
  288. this.showRes(record);
  289. }}
  290. >
  291. 已拆
  292. </Tag>
  293. </span>
  294. );
  295. } else {
  296. return text;
  297. }
  298. },
  299. },
  300. {
  301. title: "服务市价(万元)",
  302. dataIndex: "commodityPrice",
  303. key: "commodityPrice",
  304. },
  305. {
  306. title: "项目状态",
  307. dataIndex: "projectStatus",
  308. key: "projectStatus",
  309. render: (text) => {
  310. return getProjectName(text);
  311. },
  312. },
  313. {
  314. title: "证书编号",
  315. dataIndex: "certificateNumber",
  316. key: "certificateNumber",
  317. },
  318. {
  319. title: "是否主要项目",
  320. dataIndex: "main",
  321. key: "main",
  322. render: (text) => {
  323. return text ? "是" : "否";
  324. },
  325. },
  326. {
  327. title: "项目说明",
  328. dataIndex: "taskComment",
  329. key: "taskComment",
  330. render: (text) => {
  331. return text && text.length > 8 ? (
  332. <span title={text}>{text.substr(0, 8)}...</span>
  333. ) : (
  334. text
  335. );
  336. },
  337. },
  338. ],
  339. columnsY: [
  340. {
  341. title: "流程",
  342. dataIndex: "processName",
  343. key: "processName",
  344. },
  345. {
  346. title: "操作人",
  347. dataIndex: "adminName",
  348. key: "adminName",
  349. },
  350. {
  351. title: "时间",
  352. dataIndex: "createDate",
  353. key: "createDate",
  354. },
  355. ],
  356. columnsW: [
  357. {
  358. title: "外包名称",
  359. dataIndex: "name",
  360. key: "name",
  361. },
  362. {
  363. title: "联系人",
  364. dataIndex: "contacts",
  365. key: "contacts",
  366. },
  367. {
  368. title: "联系人电话",
  369. dataIndex: "contactsMobile",
  370. key: "contactsMobile",
  371. },
  372. {
  373. title: "地址",
  374. dataIndex: "ProvinceCity",
  375. key: "ProvinceCity",
  376. render: (test) => {
  377. return test[0] === null
  378. ? ""
  379. : getprovince(test[0]) +
  380. "/" +
  381. getprovince(test[1]) +
  382. "/" +
  383. getprovince(test[2]);
  384. },
  385. },
  386. {
  387. title: "地址详情",
  388. dataIndex: "address",
  389. key: "address",
  390. render: (text) => {
  391. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  392. },
  393. },
  394. {
  395. title: "创建时间",
  396. dataIndex: "createTimes",
  397. key: "createTimes",
  398. },
  399. {
  400. title: "任务名称",
  401. dataIndex: "tname",
  402. key: "tname",
  403. },
  404. {
  405. title: "合同编号",
  406. dataIndex: "contractNo",
  407. key: "contractNo",
  408. },
  409. {
  410. title: "项目状态",
  411. dataIndex: "projectStatus",
  412. key: "projectStatus",
  413. render: (text) => {
  414. return getProjectName(text);
  415. },
  416. },
  417. ],
  418. dataSource: [],
  419. searchTime: [,],
  420. };
  421. },
  422. /* 判断是否有分派按钮 */
  423. judgeFenpai(recard) {
  424. if (recard.approval === 2) {
  425. if (recard.financeId === null || recard.financeId === "") {
  426. return (
  427. <Button
  428. type="primary"
  429. onClick={(e) => {
  430. e.stopPropagation(), this.evaluate(recard);
  431. }}
  432. >
  433. 分派
  434. </Button>
  435. );
  436. } else {
  437. return undefined;
  438. }
  439. } else if (recard.processStatus <= 2) {
  440. return (
  441. <Button
  442. type="primary"
  443. onClick={(e) => {
  444. e.stopPropagation(), this.evaluate(recard);
  445. }}
  446. >
  447. 分派
  448. </Button>
  449. );
  450. } else {
  451. return undefined;
  452. }
  453. },
  454. jdDate(orderNo) {
  455. $.ajax({
  456. method: "get",
  457. dataType: "json",
  458. crossDomain: false,
  459. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  460. data: {
  461. orderNo: orderNo,
  462. },
  463. success: function (data) {
  464. let thisData = data.data;
  465. if (!thisData.length) {
  466. if (data.error && data.error.length) {
  467. message.warning(data.error[0].message);
  468. }
  469. thisData = {};
  470. } else {
  471. this.setState({
  472. jsDate: thisData,
  473. });
  474. }
  475. }.bind(this),
  476. }).always(
  477. function () {
  478. this.setState({
  479. loading: false,
  480. });
  481. }.bind(this)
  482. );
  483. },
  484. /* 分派 */
  485. evaluate(recard) {
  486. this.state.assignData = recard;
  487. this.setState({
  488. assignVisible: true,
  489. });
  490. },
  491. /* 驳回 */
  492. reject(recard) {
  493. this.setState({
  494. bohuiData: recard,
  495. boHuiVisible: true,
  496. content: "",
  497. });
  498. },
  499. boHuiOk() {
  500. this.setState({
  501. boHuiVisible: false,
  502. });
  503. if (
  504. this.state.pagination.current == this.state.totalPage &&
  505. this.state.pagination.total % 10 == 1
  506. ) {
  507. this.loadData(this.state.page - 1);
  508. } else {
  509. this.loadData(this.state.page);
  510. }
  511. },
  512. boHuiCancel() {
  513. this.setState({
  514. boHuiVisible: false,
  515. });
  516. },
  517. componentWillMount() {
  518. this.departmentList();
  519. this.loadData();
  520. },
  521. // 拆分详细
  522. showRes(record) {
  523. this.setState({
  524. resVisible: true,
  525. resRecord: record,
  526. });
  527. },
  528. resCancel() {
  529. this.setState({
  530. resVisible: false,
  531. });
  532. },
  533. tableRowClick(record) {
  534. this.state.RowData = record;
  535. this.setState({
  536. showDesc: true,
  537. visible: true,
  538. orderNo: record.orderNo,
  539. modKey: "1",
  540. });
  541. this.jdDate(record.orderNo);
  542. this.loadXmu(record);
  543. this.loadModal(record);
  544. },
  545. //详情
  546. callBack(key) {
  547. if (key === "2") {
  548. this.setState({
  549. modKey: key,
  550. width: "1200px",
  551. });
  552. this.loadWaiBao();
  553. }
  554. if (key === "1") {
  555. this.setState({
  556. modKey: key,
  557. width: "800px",
  558. });
  559. }
  560. if (this.state.pictureUrl.length) {
  561. let picArr = [];
  562. this.state.pictureUrl.map(function (item) {
  563. if (item.response && item.response.data && item.response.data.length) {
  564. picArr.push(item.response.data);
  565. }
  566. });
  567. }
  568. if (key === "3") {
  569. this.setState({
  570. modKey: key,
  571. width: "800px",
  572. });
  573. this.setState({
  574. loading: true,
  575. });
  576. $.ajax({
  577. method: "get",
  578. dataType: "json",
  579. crossDomain: false,
  580. url:
  581. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  582. data: {
  583. orderNo: this.state.orderNo,
  584. },
  585. success: function (data) {
  586. let thisdata = data.data;
  587. this.setState({
  588. id: thisdata.id,
  589. createTimes: thisdata.createTimes,
  590. auditTimes: thisdata.auditTimes,
  591. remarks: thisdata.remarks,
  592. attachmentUrl: thisdata.attachmentUrl
  593. ? splitUrl(
  594. thisdata.attachmentUrl,
  595. ",",
  596. globalConfig.avatarHost + "/upload"
  597. )
  598. : [],
  599. pictureUrl: thisdata.pictureUrl
  600. ? splitUrl(
  601. thisdata.pictureUrl,
  602. ",",
  603. globalConfig.avatarHost + "/upload"
  604. )
  605. : [], //图片地址
  606. amount: thisdata.amount,
  607. companyName: thisdata.companyName,
  608. refundStatus: thisdata.refundStatus,
  609. outsourceRemarks: thisdata.outsourceRemarks,
  610. unitNumber: thisdata.unitNumber,
  611. unitPrice: thisdata.unitPrice,
  612. });
  613. }.bind(this),
  614. }).always(
  615. function () {
  616. this.setState({
  617. loading: false,
  618. });
  619. }.bind(this)
  620. );
  621. }
  622. },
  623. //外包详情
  624. loadWaiBao() {
  625. $.ajax({
  626. method: "get",
  627. dataType: "json",
  628. rossDomain: false,
  629. url:
  630. globalConfig.context +
  631. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  632. data: {
  633. orderNo: this.state.orderNo,
  634. },
  635. success: function (data) {
  636. let theArr = [];
  637. if (data.error.length || data.data.list == "") {
  638. if (data.error && data.error.length) {
  639. message.warning(data.error[0].message);
  640. }
  641. } else {
  642. for (let i = 0; i < data.data.length; i++) {
  643. let thisdata = data.data[i];
  644. let ProvinceCityArr = [];
  645. let ProvinceS = thisdata.province; //省
  646. let citys = thisdata.city; //市
  647. let Areas = thisdata.area; //区
  648. ProvinceCityArr.push(ProvinceS, citys, Areas);
  649. theArr.push({
  650. key: i,
  651. id: thisdata.id,
  652. name: thisdata.name,
  653. contacts: thisdata.contacts, //订单编号
  654. contactsMobile: thisdata.contactsMobile,
  655. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  656. province: thisdata.province,
  657. city: thisdata.city,
  658. area: thisdata.area,
  659. address: thisdata.address,
  660. remarks: thisdata.remarks,
  661. tid: thisdata.tid,
  662. createTimes: thisdata.createTimes,
  663. tname: thisdata.tname,
  664. contractNo: thisdata.contractNo,
  665. projectStatus: thisdata.projectStatus,
  666. });
  667. }
  668. }
  669. this.setState(
  670. {
  671. dataSourceW: theArr,
  672. },
  673. () => { }
  674. );
  675. }.bind(this),
  676. }).always(
  677. function () {
  678. this.setState({
  679. loading: false,
  680. });
  681. }.bind(this)
  682. );
  683. },
  684. loadXmu(record) {
  685. this.state.data = [];
  686. this.setState({
  687. loading: true,
  688. });
  689. $.ajax({
  690. method: "get",
  691. dataType: "json",
  692. crossDomain: false,
  693. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  694. data: {
  695. orderNo: record.orderNo,
  696. },
  697. success: function (data) {
  698. let theArr = [];
  699. if (!data.data) {
  700. if (data.error && data.error.length) {
  701. message.warning(data.error[0].message);
  702. }
  703. } else {
  704. for (let i = 0; i < data.data.length; i++) {
  705. let thisdata = data.data[i];
  706. theArr.push({
  707. key: i,
  708. id: thisdata.id,
  709. orderNo: thisdata.orderNo,
  710. commodityName: thisdata.commodityName,
  711. commodityPrice: thisdata.commodityPrice,
  712. commodityQuantity: thisdata.commodityQuantity,
  713. taskStatus: thisdata.taskStatus,
  714. taskComment: thisdata.taskComment,
  715. main: thisdata.main,
  716. contacts: thisdata.contacts,
  717. contactsMobile: thisdata.contactsMobile,
  718. cname: thisdata.cname,
  719. certificateNumber: thisdata.certificateNumber,
  720. projectStatus: thisdata.projectStatus,
  721. splitStatus: thisdata.splitStatus,
  722. });
  723. }
  724. }
  725. this.setState({
  726. dataSourceX: theArr,
  727. });
  728. }.bind(this),
  729. }).always(
  730. function () {
  731. this.setState({
  732. loading: false,
  733. });
  734. }.bind(this)
  735. );
  736. },
  737. loadModal(record) {
  738. this.state.orderList = [];
  739. $.ajax({
  740. method: "get",
  741. dataType: "json",
  742. crossDomain: false,
  743. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  744. data: {
  745. orderNo: record.orderNo,
  746. },
  747. success: function (data) {
  748. let thisData = data.data;
  749. if (!thisData) {
  750. if (data.error && data.error.length) {
  751. message.warning(data.error[0].message);
  752. }
  753. thisData = {};
  754. }
  755. this.setState({
  756. orderUid: thisData.uid,
  757. id: thisData.id,
  758. orderList: thisData,
  759. approval:
  760. thisData.approval == 0
  761. ? thisData.approval.toString()
  762. : thisData.approval,
  763. orderRemarks: thisData.orderRemarks,
  764. orgCodeUrl: thisData.contractPictureUrl
  765. ? splitUrl(
  766. thisData.contractPictureUrl,
  767. ",",
  768. globalConfig.avatarHost + "/upload"
  769. )
  770. : [],
  771. replenishUrl: thisData.agreementUrl
  772. ? splitUrl(
  773. thisData.agreementUrl,
  774. ",",
  775. globalConfig.avatarHost + "/upload"
  776. )
  777. : [],
  778. contentUrl: thisData.serviceContent
  779. ? splitUrl(
  780. thisData.serviceContent,
  781. ",",
  782. globalConfig.avatarHost + "/upload"
  783. )
  784. : [], //图片地址
  785. orderNo: thisData.orderNo, //订单编号
  786. buyerId: thisData.buyerId,
  787. depName: thisData.depName,
  788. deleteSign: thisData.deleteSign,
  789. });
  790. }.bind(this),
  791. }).always(
  792. function () {
  793. this.setState({
  794. loading: false,
  795. });
  796. }.bind(this)
  797. );
  798. },
  799. rizhi() {
  800. this.setState({
  801. loading: true,
  802. });
  803. $.ajax({
  804. method: "get",
  805. dataType: "json",
  806. crossDomain: false,
  807. url: "/api/admin/newOrder/selectOrderLog",
  808. data: {
  809. orderNo: this.state.orderNo,
  810. },
  811. success: function (data) {
  812. let theArr = [];
  813. let thisData = data.data;
  814. if (!thisData.length) {
  815. if (data.error && data.error.length) {
  816. message.warning(data.error[0].message);
  817. }
  818. thisData = {};
  819. } else {
  820. for (let i = 0; i < data.data.length; i++) {
  821. let thisdata = data.data[i];
  822. theArr.push({
  823. processName: thisdata.processName,
  824. adminName: thisdata.adminName,
  825. createDate: thisdata.createDate,
  826. remarks: thisdata.remarks,
  827. });
  828. }
  829. }
  830. this.setState({
  831. dataSourceY: theArr,
  832. });
  833. }.bind(this),
  834. }).always(
  835. function () {
  836. this.setState({
  837. loading: false,
  838. });
  839. }.bind(this)
  840. );
  841. },
  842. closeOrderLog() {
  843. this.setState({
  844. avisible: false,
  845. });
  846. },
  847. load() {
  848. if (this.state.attachmentUrl) {
  849. let url = window.location.href.substring(7);
  850. this.state.attachmentUrl.forEach((e) => {
  851. window.location.href =
  852. "http://" +
  853. url.substring(0, url.indexOf("/")) +
  854. "/api/admin/outsourceOrg//downloadFile?path=" +
  855. e.response.data;
  856. });
  857. } else {
  858. message.error("此订单无上传文件");
  859. }
  860. },
  861. getOrderLog() {
  862. this.setState({
  863. avisible: true,
  864. });
  865. this.rizhi();
  866. },
  867. closeModal() {
  868. this.setState(
  869. {
  870. visible: false,
  871. width: "800px",
  872. },
  873. () => {
  874. this.setState({
  875. modKey: "1",
  876. });
  877. }
  878. );
  879. },
  880. closeDesc(e, s) {
  881. this.state.showDesc = e;
  882. if (s) {
  883. this.loadData(this.state.page);
  884. }
  885. },
  886. closeAssign(e, s) {
  887. this.state.assignVisible = e;
  888. if (s) {
  889. if (
  890. this.state.pagination.current == this.state.totalPage &&
  891. this.state.pagination.total % 10 == 1
  892. ) {
  893. this.loadData(this.state.page - 1);
  894. } else {
  895. this.loadData(this.state.page);
  896. }
  897. }
  898. },
  899. search() {
  900. this.loadData();
  901. },
  902. downImg() {
  903. let num = 0;
  904. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  905. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  906. num = i;
  907. }
  908. }
  909. if (num == this.state.orgCodeUrl.length - 1) {
  910. return message.warning("已经是最后一张了哦");
  911. }
  912. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  913. this.setState({
  914. previewImage: this.state.previewImage,
  915. rotateDeg: 0,
  916. });
  917. },
  918. upImg() {
  919. let num = 0;
  920. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  921. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  922. num = i;
  923. }
  924. }
  925. if (num == 0) {
  926. return message.warning("已经是第一张了哦");
  927. }
  928. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  929. this.setState({
  930. previewImage: this.state.previewImage,
  931. rotateDeg: 0,
  932. });
  933. },
  934. rotate() {
  935. let rotateDeg = this.state.rotateDeg + 90;
  936. this.setState({
  937. rotateDeg,
  938. });
  939. },
  940. downImgs() {
  941. let num = 0;
  942. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  943. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  944. num = i;
  945. }
  946. }
  947. if (num == this.state.replenishUrl.length - 1) {
  948. return message.warning("已经是最后一张了哦");
  949. }
  950. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  951. this.setState({
  952. previewImage: this.state.previewImage,
  953. rotateDeg: 0,
  954. });
  955. },
  956. upImgs() {
  957. let num = 0;
  958. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  959. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  960. num = i;
  961. }
  962. }
  963. if (num == 0) {
  964. return message.warning("已经是第一张了哦");
  965. }
  966. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  967. this.setState({
  968. previewImage: this.state.previewImage,
  969. rotateDeg: 0,
  970. });
  971. },
  972. rotates() {
  973. let rotateDeg = this.state.rotateDeg + 90;
  974. this.setState({
  975. rotateDeg,
  976. });
  977. },
  978. reset() {
  979. this.state.nameSearch = "";
  980. this.state.releaseDate = [];
  981. this.state.orderNoSearch = "";
  982. this.state.departmenttList = undefined;
  983. this.state.processStatus = [];
  984. this.state.contractNoSearch = "";
  985. this.loadData();
  986. },
  987. searchSwitch() {
  988. this.setState({
  989. searchMore: !this.state.searchMore,
  990. });
  991. },
  992. changeList(arr) {
  993. const newArr = [];
  994. this.state.columns.forEach(item => {
  995. arr.forEach(val => {
  996. if (val === item.title) {
  997. newArr.push(item);
  998. }
  999. });
  1000. });
  1001. this.setState({
  1002. changeList: newArr
  1003. });
  1004. },
  1005. render() {
  1006. const { RangePicker } = DatePicker;
  1007. const { TabPane } = Tabs;
  1008. var departmentArr = this.state.departmentArr || [];
  1009. const theData = this.state.orderList || {};
  1010. const formItemLayout = {
  1011. labelCol: { span: 8 },
  1012. wrapperCol: { span: 12 },
  1013. };
  1014. const jsDate = this.state.jsDate || [];
  1015. return (
  1016. <div className="user-content">
  1017. {this.state.resVisible ? (
  1018. <ResolutionDetail
  1019. cancel={this.resCancel}
  1020. detail={this.state.resRecord}
  1021. visible={this.state.resVisible}
  1022. id={this.state.resRecord.orderNo}
  1023. />
  1024. ) : (
  1025. ""
  1026. )}
  1027. <div className="content-title">
  1028. <span>外包派单</span>
  1029. </div>
  1030. <Tabs defaultActiveKey="1" className="test">
  1031. <TabPane tab="搜索" key="1">
  1032. <div className="user-search">
  1033. <Input
  1034. placeholder="客户名称"
  1035. value={this.state.nameSearch}
  1036. onChange={(e) => {
  1037. this.setState({ nameSearch: e.target.value });
  1038. }}
  1039. />
  1040. <Input
  1041. placeholder="订单编号"
  1042. value={this.state.orderNoSearch}
  1043. onChange={(e) => {
  1044. this.setState({ orderNoSearch: e.target.value });
  1045. }}
  1046. />
  1047. <Select
  1048. placeholder="订单部门"
  1049. style={{ width: 150, marginRight: 10 }}
  1050. value={this.state.departmenttList}
  1051. onChange={(e) => {
  1052. this.setState({ departmenttList: e });
  1053. }}
  1054. >
  1055. {departmentArr.map(function (item) {
  1056. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  1057. })}
  1058. </Select>
  1059. <Select
  1060. placeholder="流程状态"
  1061. onChange={(e) => {
  1062. this.setState({ processStatusSearch: e });
  1063. }}
  1064. style={{ width: 160, marginRight: 5 }}
  1065. value={this.state.processStatusSearch}
  1066. >
  1067. <Option value="2">未分配</Option>
  1068. <Option value="3">已分配</Option>
  1069. </Select>
  1070. <Input
  1071. placeholder="合同编号"
  1072. value={this.state.contractNoSearch}
  1073. onChange={(e) => {
  1074. this.setState({
  1075. contractNoSearch: e.target.value,
  1076. });
  1077. }}
  1078. />
  1079. <span style={{ marginRight: 10 }}>下单时间 :</span>
  1080. <RangePicker
  1081. value={[
  1082. this.state.releaseDate[0]
  1083. ? moment(this.state.releaseDate[0])
  1084. : null,
  1085. this.state.releaseDate[1]
  1086. ? moment(this.state.releaseDate[1])
  1087. : null,
  1088. ]}
  1089. onChange={(data, dataString) => {
  1090. this.setState({ releaseDate: dataString });
  1091. }}
  1092. />
  1093. <Button
  1094. type="primary"
  1095. onClick={this.search}
  1096. style={{ marginLeft: 10 }}
  1097. >
  1098. 搜索
  1099. </Button>
  1100. <Button onClick={this.reset}>重置</Button>
  1101. </div>
  1102. </TabPane>
  1103. <TabPane tab="更改表格显示数据" key="2">
  1104. <div style={{ marginLeft: 10 }}>
  1105. <ChooseList
  1106. columns={this.state.columns}
  1107. changeFn={this.changeList}
  1108. changeList={this.state.changeList}
  1109. top={55}
  1110. margin={11}
  1111. />
  1112. </div>
  1113. </TabPane>
  1114. </Tabs>
  1115. <div className="patent-table">
  1116. <Spin spinning={this.state.loading}>
  1117. <Table
  1118. columns={
  1119. this.state.changeList
  1120. ? this.state.changeList
  1121. : this.state.columns
  1122. }
  1123. dataSource={this.state.dataSource}
  1124. scroll={{ x: 1500, y: 0 }}
  1125. rowSelection={false}
  1126. size="small"
  1127. bordered
  1128. style={{
  1129. cursor: 'pointer',
  1130. }}
  1131. pagination={this.state.pagination}
  1132. onRowClick={this.tableRowClick.bind(this)}
  1133. />
  1134. </Spin>
  1135. </div>
  1136. <div className="patent-desc">
  1137. {this.state.visible ? <Modal
  1138. maskClosable={false}
  1139. visible={this.state.visible}
  1140. onCancel={this.closeModal}
  1141. width={this.state.width}
  1142. footer=""
  1143. className="admin-desc-content"
  1144. >
  1145. <Tabs
  1146. onChange={this.callBack}
  1147. type="card"
  1148. activeKey={this.state.modKey}
  1149. tabBarExtraContent={
  1150. <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
  1151. <OrderItemStatus deleteSign={this.state.deleteSign} />
  1152. </div>
  1153. }
  1154. >
  1155. <TabPane tab="项目概况" key="1">
  1156. {this.state.modKey === "1" ? <Form layout="horizontal" id="demand-form">
  1157. <Spin spinning={this.state.loading}>
  1158. <div className="clearfix">
  1159. <FormItem
  1160. className="half-item"
  1161. {...formItemLayout}
  1162. label="订单编号"
  1163. >
  1164. <span>{this.state.orderNo}</span>
  1165. </FormItem>
  1166. <FormItem
  1167. className="half-item"
  1168. {...formItemLayout}
  1169. label="签单时间"
  1170. >
  1171. <span>{theData.signDate}</span>
  1172. </FormItem>
  1173. <FormItem
  1174. className="half-item"
  1175. {...formItemLayout}
  1176. label="客户名称"
  1177. >
  1178. <span>{theData.userName}</span>
  1179. <EnterpriseNameChange
  1180. type='journal'
  1181. style={{ marginLeft: 10 }}
  1182. enterpriseId={this.state.orderUid} />
  1183. </FormItem>
  1184. <FormItem
  1185. className="half-item"
  1186. {...formItemLayout}
  1187. label="销售类型"
  1188. >
  1189. <span>
  1190. {(["私有客户-", "签单客户-"][theData.userType] || " ") +
  1191. (salesList[theData.salesType] || "")}
  1192. {
  1193. theData.other != null && theData.other != "" &&
  1194. <Tooltip title={theData.other}>
  1195. <span>
  1196. {"(" + theData.other.toString().slice(0, 10) + (theData.other.toString().length > 9 ? "...)" : ")")}
  1197. </span>
  1198. </Tooltip>
  1199. }
  1200. </span>
  1201. </FormItem>
  1202. <FormItem
  1203. className="half-item"
  1204. {...formItemLayout}
  1205. label="流转状态"
  1206. >
  1207. <span>{getProcessStatus(theData.processStatus)}</span>
  1208. </FormItem>
  1209. <FormItem
  1210. className="half-item"
  1211. {...formItemLayout}
  1212. label="订单类型"
  1213. >
  1214. <span>{getNewOrderType(theData.orderType)}</span>
  1215. </FormItem>
  1216. <FormItem
  1217. className="half-item"
  1218. {...formItemLayout}
  1219. label="结算状态"
  1220. >
  1221. <span>
  1222. {getLiquidationStatus(theData.liquidationStatus)}
  1223. </span>
  1224. </FormItem>
  1225. <FormItem
  1226. className="half-item"
  1227. {...formItemLayout}
  1228. label="签单总金额(万元)"
  1229. >
  1230. <span>{theData.totalAmount}</span>
  1231. </FormItem>
  1232. <FormItem
  1233. className="half-item"
  1234. {...formItemLayout}
  1235. label="首付款(万元)"
  1236. >
  1237. <span>{theData.firstAmount}</span>
  1238. </FormItem>
  1239. <FormItem
  1240. className="half-item"
  1241. {...formItemLayout}
  1242. label="已收款(万元)"
  1243. >
  1244. <span>{theData.settlementAmount}</span>
  1245. </FormItem>
  1246. <FormItem
  1247. className="half-item"
  1248. {...formItemLayout}
  1249. label="是否特批"
  1250. >
  1251. <span>{getApproval(theData.approval)}</span>
  1252. </FormItem>
  1253. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1254. <span>{this.props.data.refundAmount}</span>
  1255. </FormItem>*/}
  1256. </div>
  1257. <div className="clearfix">
  1258. <FormItem
  1259. labelCol={{ span: 5 }}
  1260. wrapperCol={{ span: 18 }}
  1261. label="合同扫描件"
  1262. >
  1263. {/*<Upload*/}
  1264. {/* className="demandDetailShow-upload"*/}
  1265. {/* listType="picture-card"*/}
  1266. {/* fileList={this.state.orgCodeUrl}*/}
  1267. {/* onPreview={(file) => {*/}
  1268. {/* this.setState({*/}
  1269. {/* previewImage: file.url || file.thumbUrl,*/}
  1270. {/* previewVisible: true,*/}
  1271. {/* });*/}
  1272. {/* }}*/}
  1273. {/*/>*/}
  1274. {this.state.visible && this.state.modKey === "1" && this.state.orgCodeUrl ? <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1275. <ImgList fileList={this.state.orgCodeUrl} domId={'outsourcingPaiDan1'} />
  1276. </div> : <div />}
  1277. <Modal
  1278. maskClosable={false}
  1279. footer={null}
  1280. width={"50%"}
  1281. visible={this.state.previewVisible}
  1282. onCancel={() => {
  1283. this.setState({
  1284. previewVisible: false,
  1285. rotateDeg: 0,
  1286. });
  1287. }}
  1288. >
  1289. <img
  1290. alt=""
  1291. style={{
  1292. width: "100%",
  1293. transform: `rotate(${this.state.rotateDeg}deg)`,
  1294. }}
  1295. src={this.state.previewImage || ""}
  1296. />
  1297. <Button
  1298. onClick={this.rotate}
  1299. style={{
  1300. position: "relative",
  1301. left: "50%",
  1302. transform: "translateX(-50%)",
  1303. }}
  1304. >
  1305. 旋转
  1306. </Button>
  1307. <Button
  1308. onClick={this.upImg}
  1309. style={{
  1310. position: "absolute",
  1311. left: -81,
  1312. top: "50%",
  1313. transform: "translateY(-50%)",
  1314. }}
  1315. >
  1316. 上一张
  1317. </Button>
  1318. <Button
  1319. onClick={this.downImg}
  1320. style={{
  1321. position: "absolute",
  1322. right: -81,
  1323. top: "50%",
  1324. transform: "translateY(-50%)",
  1325. }}
  1326. >
  1327. 下一张
  1328. </Button>
  1329. </Modal>
  1330. <Button
  1331. style={{
  1332. float: "right",
  1333. marginRight: "140px",
  1334. marginTop: "20px",
  1335. }}
  1336. onClick={this.getOrderLog}
  1337. >
  1338. 查看订单日志
  1339. </Button>
  1340. </FormItem>
  1341. <FormItem
  1342. labelCol={{ span: 5 }}
  1343. wrapperCol={{ span: 18 }}
  1344. label="补充协议"
  1345. >
  1346. {/*<Upload*/}
  1347. {/* className="demandDetailShow-upload"*/}
  1348. {/* listType="picture-card"*/}
  1349. {/* fileList={this.state.replenishUrl}*/}
  1350. {/* onPreview={(file) => {*/}
  1351. {/* this.setState({*/}
  1352. {/* previewImage: file.url || file.thumbUrl,*/}
  1353. {/* previewVisibles: true,*/}
  1354. {/* });*/}
  1355. {/* }}*/}
  1356. {/*/>*/}
  1357. {this.state.visible && this.state.modKey === "1" && this.state.replenishUrl ? <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1358. <ImgList fileList={this.state.replenishUrl} domId={'outsourcingPaiDan2'} />
  1359. </div> : <div />}
  1360. <Modal
  1361. maskClosable={false}
  1362. footer={null}
  1363. width={"50%"}
  1364. visible={this.state.previewVisibles}
  1365. onCancel={() => {
  1366. this.setState({
  1367. previewVisibles: false,
  1368. rotateDeg: 0,
  1369. });
  1370. }}
  1371. >
  1372. <img
  1373. alt=""
  1374. style={{
  1375. width: "100%",
  1376. transform: `rotate(${this.state.rotateDeg}deg)`,
  1377. }}
  1378. src={this.state.previewImage || ""}
  1379. />
  1380. <Button
  1381. onClick={this.rotates}
  1382. style={{
  1383. position: "relative",
  1384. left: "50%",
  1385. transform: "translateX(-50%)",
  1386. }}
  1387. >
  1388. 旋转
  1389. </Button>
  1390. <Button
  1391. onClick={this.upImgs}
  1392. style={{
  1393. position: "absolute",
  1394. left: -81,
  1395. top: "50%",
  1396. transform: "translateY(-50%)",
  1397. }}
  1398. >
  1399. 上一张
  1400. </Button>
  1401. <Button
  1402. onClick={this.downImgs}
  1403. style={{
  1404. position: "absolute",
  1405. right: -81,
  1406. top: "50%",
  1407. transform: "translateY(-50%)",
  1408. }}
  1409. >
  1410. 下一张
  1411. </Button>
  1412. </Modal>
  1413. </FormItem>
  1414. </div>
  1415. <ContentUrl
  1416. processStatus={1}
  1417. domId={"paidanContents"}
  1418. contentUrl={this.state.contentUrl}
  1419. imgId={"paidanContentsImg"}
  1420. />
  1421. <div className="clearfix">
  1422. <FormItem
  1423. className="half-item"
  1424. {...formItemLayout}
  1425. label="合同编号"
  1426. >
  1427. <span>{theData.contractNo}</span>
  1428. </FormItem>
  1429. <FormItem
  1430. className="half-item"
  1431. {...formItemLayout}
  1432. label="订单部门"
  1433. >
  1434. <span>{theData.depName}</span>
  1435. </FormItem>
  1436. </div>
  1437. <div className="clearfix">
  1438. <FormItem
  1439. labelCol={{ span: 5 }}
  1440. wrapperCol={{ span: 18 }}
  1441. label="订单留言"
  1442. >
  1443. <p style={{ width: 500, wordWrap: "break-word" }}>
  1444. {this.state.orderRemarks}
  1445. </p>
  1446. </FormItem>
  1447. </div>
  1448. <div className="clearfix">
  1449. <FormItem
  1450. labelCol={{ span: 5 }}
  1451. wrapperCol={{ span: 18 }}
  1452. label="收款节点"
  1453. >
  1454. {jsDate.map((item) => {
  1455. return (
  1456. <p>
  1457. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1458. </p>
  1459. );
  1460. })}
  1461. </FormItem>
  1462. </div>
  1463. <div className="clearfix">
  1464. <FormItem
  1465. className="half-item"
  1466. {...formItemLayout}
  1467. label="订单负责人"
  1468. >
  1469. <span>{theData.salesmanName}</span>
  1470. </FormItem>
  1471. <FormItem
  1472. className="half-item"
  1473. {...formItemLayout}
  1474. label="订单负责人电话"
  1475. >
  1476. <span>{theData.salesmanMobile}</span>
  1477. </FormItem>
  1478. <FormItem
  1479. className="half-item"
  1480. {...formItemLayout}
  1481. label="财务负责人"
  1482. >
  1483. <span>{theData.financeName}</span>
  1484. </FormItem>
  1485. <FormItem
  1486. className="half-item"
  1487. {...formItemLayout}
  1488. label="财务负责人电话"
  1489. >
  1490. <span>{theData.financeMobile}</span>
  1491. </FormItem>
  1492. </div>
  1493. <Modal
  1494. visible={this.state.avisible}
  1495. className="admin-desc-content"
  1496. width="800px"
  1497. maskClosable={false}
  1498. title="订单日志"
  1499. footer={null}
  1500. onCancel={this.closeOrderLog}
  1501. >
  1502. <div className="patent-table">
  1503. <Spin spinning={this.state.loading}>
  1504. <Table
  1505. columns={this.state.columnsY}
  1506. size="small"
  1507. bordered
  1508. dataSource={this.state.dataSourceY}
  1509. pagination={false}
  1510. />
  1511. </Spin>
  1512. </div>
  1513. </Modal>
  1514. <div className="clearfix">
  1515. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1516. <div className="patent-table">
  1517. <Spin spinning={this.state.loading}>
  1518. <Table
  1519. columns={this.state.columnsX}
  1520. dataSource={this.state.dataSourceX}
  1521. pagination={false}
  1522. size="small"
  1523. bordered
  1524. style={{
  1525. cursor: 'pointer',
  1526. }}
  1527. onRowClick={this.tableRowClick}
  1528. />
  1529. </Spin>
  1530. </div>
  1531. </div>
  1532. </Spin>
  1533. </Form> : <div />}
  1534. </TabPane>
  1535. <TabPane tab="外包详情" key="2">
  1536. <div className="clearfix">
  1537. <p style={{ color: "red" }}>
  1538. 提示:查看备注请点击表格左侧加号按钮~
  1539. </p>
  1540. <div className="patent-table">
  1541. <Spin spinning={this.state.loading}>
  1542. <Table
  1543. columns={this.state.columnsW}
  1544. dataSource={this.state.dataSourceW}
  1545. pagination={false}
  1546. expandedRowRender={(record) => (
  1547. <p style={{ margin: 0 }}>{record.remarks}</p>
  1548. )}
  1549. scroll={{ x: 300, y: 0 }}
  1550. />
  1551. </Spin>
  1552. </div>
  1553. </div>
  1554. </TabPane>
  1555. <TabPane tab="外包审核" key="3">
  1556. <div className="clearfix">
  1557. <FormItem
  1558. className="half-item"
  1559. {...formItemLayout}
  1560. label="外包公司"
  1561. >
  1562. <span>{this.state.companyName}</span>
  1563. </FormItem>
  1564. </div>
  1565. <div className="clearfix">
  1566. <FormItem
  1567. className="half-item"
  1568. {...formItemLayout}
  1569. label="单价(万元)"
  1570. >
  1571. <span>{this.state.unitPrice}</span>
  1572. </FormItem>
  1573. </div>
  1574. <div className="clearfix">
  1575. <FormItem
  1576. className="half-item"
  1577. {...formItemLayout}
  1578. label="数量(个)"
  1579. >
  1580. <span>{this.state.unitNumber}</span>
  1581. </FormItem>
  1582. </div>
  1583. <div className="clearfix">
  1584. <FormItem
  1585. className="half-item"
  1586. {...formItemLayout}
  1587. label="总金额(万元)"
  1588. >
  1589. <span>{this.state.amount}</span>
  1590. </FormItem>
  1591. </div>
  1592. <div className="clearfix">
  1593. <FormItem
  1594. className="half-item"
  1595. {...formItemLayout}
  1596. label="备注"
  1597. >
  1598. <span>{this.state.outsourceRemarks}</span>
  1599. </FormItem>
  1600. </div>
  1601. {/*<div className="clearfix">
  1602. <FormItem className="half-item"
  1603. {...formItemLayout}
  1604. label="上传协议文件" >
  1605. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1606. data={(e)=>{
  1607. return {
  1608. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1609. }
  1610. }}
  1611. fileList={this.state.attachmentUrl}
  1612. showUploadList={{showRemoveIcon:false}}
  1613. onPreview={(e)=>{
  1614. let url = window.location.href.substring(7)
  1615. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1616. }}>
  1617. </Upload>
  1618. </FormItem>
  1619. </div>*/}
  1620. <div className="clearfix">
  1621. <FormItem
  1622. labelCol={{ span: 4 }}
  1623. wrapperCol={{ span: 18 }}
  1624. label="合同/协议扫描件"
  1625. >
  1626. {/*<Upload*/}
  1627. {/* className="demandDetailShow-upload"*/}
  1628. {/* listType="picture-card"*/}
  1629. {/* fileList={this.state.pictureUrl}*/}
  1630. {/* onPreview={(file) => {*/}
  1631. {/* this.setState({*/}
  1632. {/* previewImage: file.url || file.thumbUrl,*/}
  1633. {/* previewVisible: true,*/}
  1634. {/* });*/}
  1635. {/* }}*/}
  1636. {/*/>*/}
  1637. {this.state.visible && this.state.modKey === "3" && this.state.pictureUrl ? <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1638. <ImgList fileList={this.state.pictureUrl} domId={'outsourcingPaiDan3'} />
  1639. </div> : <div />}
  1640. <Modal
  1641. maskClosable={false}
  1642. footer={null}
  1643. visible={this.state.previewVisible}
  1644. onCancel={() => {
  1645. this.setState({ previewVisible: false });
  1646. }}
  1647. >
  1648. <img
  1649. alt=""
  1650. style={{ width: "100%" }}
  1651. src={this.state.previewImage || ""}
  1652. />
  1653. </Modal>
  1654. </FormItem>
  1655. </div>
  1656. <div className="clearfix">
  1657. <hr className="division" />
  1658. <div className="clearfix">
  1659. <FormItem
  1660. className="half-item"
  1661. {...formItemLayout}
  1662. label="审核意见"
  1663. >
  1664. <span>{this.state.remarks}</span>
  1665. </FormItem>
  1666. </div>
  1667. <div className="clearfix">
  1668. <FormItem
  1669. className="half-item"
  1670. {...formItemLayout}
  1671. label="审核结果"
  1672. >
  1673. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1674. </FormItem>
  1675. </div>
  1676. <div className="clearfix">
  1677. <FormItem
  1678. className="half-item"
  1679. {...formItemLayout}
  1680. label="审核时间"
  1681. >
  1682. <span>{this.state.auditTimes}</span>
  1683. </FormItem>
  1684. </div>
  1685. </div>
  1686. </TabPane>
  1687. </Tabs>
  1688. </Modal> : <div />}
  1689. </div>
  1690. <Assign
  1691. title="订单"
  1692. selApi="/api/admin/financial/distributionFinance"
  1693. data={this.state.assignData}
  1694. fenpaiData={4}
  1695. showDesc={this.state.assignVisible}
  1696. closeDesc={this.closeAssign.bind(this)}
  1697. roleName={"财务专员"}
  1698. requestMethod={"post"}
  1699. />
  1700. <Modal
  1701. visible={this.state.boHuiVisible}
  1702. width="400px"
  1703. title="驳回备注"
  1704. footer=""
  1705. maskClosable={false}
  1706. onOk={this.boHuiOk}
  1707. onCancel={this.boHuiCancel}
  1708. >
  1709. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1710. <Spin spinning={this.state.loading}>
  1711. <FormItem
  1712. labelCol={{ span: 5 }}
  1713. wrapperCol={{ span: 16 }}
  1714. label={
  1715. <span>
  1716. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1717. </span>
  1718. }
  1719. >
  1720. <Input
  1721. type="textarea"
  1722. rows={4}
  1723. placeholder="请输入驳回原因"
  1724. value={this.state.content}
  1725. onChange={(e) => {
  1726. this.setState({ content: e.target.value });
  1727. }}
  1728. />
  1729. </FormItem>
  1730. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1731. <Button
  1732. type="primary"
  1733. htmlType="submit"
  1734. style={{ marginRight: 20 }}
  1735. >
  1736. 驳回
  1737. </Button>
  1738. <Button
  1739. type="default"
  1740. onClick={() => {
  1741. this.boHuiCancel();
  1742. }}
  1743. >
  1744. 取消
  1745. </Button>
  1746. </FormItem>
  1747. </Spin>
  1748. </Form>
  1749. </Modal>
  1750. </div>
  1751. );
  1752. },
  1753. });
  1754. export default outsourcingPaiDan;