outsourcingPaiDan.jsx 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726
  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. splitUrl,
  28. getprovince,
  29. getRefundStatus
  30. } from "@/tools";
  31. import ImgList from "../../../common/imgList";
  32. import {ChooseList} from "../../order/orderNew/chooseList";
  33. import {getProjectName} from "../../../tools";
  34. import OrderItemStatus from "../../../common/orderItemStatus";
  35. const FormItem = Form.Item;
  36. const outsourcingPaiDan = React.createClass({
  37. departmentList() {
  38. this.setState({
  39. loading: true,
  40. });
  41. $.ajax({
  42. method: "get",
  43. dataType: "json",
  44. crossDomain: false,
  45. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  46. data: {},
  47. success: function (data) {
  48. let thedata = data.data;
  49. let theArr = [];
  50. if (!thedata) {
  51. if (data.error && data.error.length) {
  52. message.warning(data.error[0].message);
  53. }
  54. } else {
  55. thedata.map(function (item, index) {
  56. theArr.push({
  57. key: index,
  58. name: item.name,
  59. id: item.id,
  60. });
  61. });
  62. }
  63. this.setState({
  64. departmentArr: theArr,
  65. });
  66. }.bind(this),
  67. }).always(
  68. function () {
  69. this.setState({
  70. loading: false,
  71. });
  72. }.bind(this)
  73. );
  74. },
  75. loadData(pageNo) {
  76. this.state.data = [];
  77. this.setState({
  78. selectedRowKeys: [],
  79. selectedRowKey: [],
  80. page: pageNo,
  81. loading: true,
  82. });
  83. $.ajax({
  84. method: "get",
  85. dataType: "json",
  86. crossDomain: false,
  87. url: globalConfig.context + "/api/admin/financial/allUnassignedOrder",
  88. data: {
  89. pageNo: pageNo || 1,
  90. pageSize: this.state.pagination.pageSize,
  91. buyerName: this.state.nameSearch, //客户名称
  92. orderNo: this.state.orderNoSearch,
  93. startTime: this.state.releaseDate[0],
  94. endTime: this.state.releaseDate[1],
  95. processStatus: this.state.processStatusSearch,
  96. contractNo: this.state.contractNoSearch,
  97. departmentId: this.state.departmenttList,
  98. outsource: 1,
  99. },
  100. success: function (data) {
  101. let theArr = [];
  102. if (!data.data || !data.data.list) {
  103. if (data.error && data.error.length) {
  104. message.warning(data.error[0].message);
  105. }
  106. } else {
  107. for (let i = 0; i < data.data.list.length; i++) {
  108. let thisdata = data.data.list[i];
  109. theArr.push({
  110. key: i,
  111. orderNo: thisdata.orderNo,
  112. approval: thisdata.approval,
  113. orderType: thisdata.orderType,
  114. processStatus: thisdata.processStatus,
  115. signTotalAmount: thisdata.signTotalAmount,
  116. buyerName: thisdata.buyerName,
  117. sellerName: thisdata.sellerName,
  118. createTime: thisdata.createTime
  119. ? new Date(thisdata.createTime).toLocaleString()
  120. : "",
  121. signTime: thisdata.signTime,
  122. contractNo: thisdata.contractNo,
  123. financeId: thisdata.financeId,
  124. departmentName: thisdata.departmentName,
  125. outsourceName: thisdata.outsourceName,
  126. });
  127. }
  128. }
  129. this.state.pagination.total = data.data.totalCount;
  130. this.state.pagination.current = data.data.pageNo;
  131. if (data.data && data.data.list && !data.data.list.length) {
  132. this.state.pagination.current = 0;
  133. this.state.pagination.total = 0;
  134. }
  135. this.setState({
  136. totalPage: data.data.totalPage,
  137. dataSource: theArr,
  138. pagination: this.state.pagination,
  139. });
  140. }.bind(this),
  141. }).always(
  142. function () {
  143. this.setState({
  144. loading: false,
  145. });
  146. }.bind(this)
  147. );
  148. },
  149. getInitialState() {
  150. return {
  151. rotateDeg: 0,
  152. searchMore: true,
  153. assignVisible: false,
  154. releaseDate: [],
  155. totalPage: 0,
  156. attachmentUrl: [],
  157. pictureUrl: [],
  158. processStatusSearch: "2",
  159. boHuivisible: false,
  160. selectedRowKeys: [],
  161. selectedRows: [],
  162. modKey: "1",
  163. width: "800px",
  164. loading: false,
  165. pagination: {
  166. defaultCurrent: 1,
  167. defaultPageSize: 10,
  168. showQuickJumper: true,
  169. pageSize: 10,
  170. onChange: function (page) {
  171. this.loadData(page);
  172. }.bind(this),
  173. showTotal: function (total) {
  174. return "共" + total + "条数据";
  175. },
  176. },
  177. columns: [
  178. {
  179. title: "订单编号",
  180. dataIndex: "orderNo",
  181. key: "orderNo",
  182. },
  183. {
  184. title: "合同编号",
  185. dataIndex: "contractNo",
  186. key: "contractNo",
  187. },
  188. {
  189. title: "下单时间",
  190. dataIndex: "createTime",
  191. key: "createTime",
  192. },
  193. {
  194. title: "签单时间",
  195. dataIndex: "signTime",
  196. key: "signTime",
  197. },
  198. {
  199. title: "签单客户",
  200. dataIndex: "buyerName",
  201. key: "buyerName",
  202. render: (text) => {
  203. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  204. },
  205. },
  206. {
  207. title: "外包公司",
  208. dataIndex: "outsourceName",
  209. key: "outsourceName",
  210. render: (text) => {
  211. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  212. },
  213. },
  214. {
  215. title: "流程状态",
  216. dataIndex: "processStatus",
  217. key: "processStatus",
  218. render: (text) => {
  219. return getProcessStatus(text);
  220. },
  221. },
  222. {
  223. title: "订单部门",
  224. dataIndex: "departmentName",
  225. key: "departmentName",
  226. render: (text) => {
  227. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  228. },
  229. },
  230. {
  231. title: "订单总金额(万)",
  232. dataIndex: "signTotalAmount",
  233. key: "signTotalAmount",
  234. },
  235. {
  236. title: "是否特批",
  237. dataIndex: "approval",
  238. key: "approval",
  239. render: (text) => {
  240. return getApproval(text);
  241. },
  242. },
  243. {
  244. title: "订单负责人",
  245. dataIndex: "sellerName",
  246. key: "sellerName",
  247. },
  248. {
  249. title: "操作",
  250. dataIndex: "caozuo",
  251. key: "caouzo",
  252. render: (text, recard) => {
  253. return <div>{this.judgeFenpai(recard)}</div>;
  254. },
  255. },
  256. ],
  257. columnsX: [
  258. {
  259. title: "业务项目名称",
  260. dataIndex: "commodityName",
  261. key: "commodityName",
  262. render: (text) => {
  263. return text && text.length > 6 ? (
  264. <span title={text}>{text.substr(0, 8)}...</span>
  265. ) : (
  266. text
  267. );
  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. id: thisData.id,
  757. orderList: thisData,
  758. approval:
  759. thisData.approval == 0
  760. ? thisData.approval.toString()
  761. : thisData.approval,
  762. orderRemarks: thisData.orderRemarks,
  763. orgCodeUrl: thisData.contractPictureUrl
  764. ? splitUrl(
  765. thisData.contractPictureUrl,
  766. ",",
  767. globalConfig.avatarHost + "/upload"
  768. )
  769. : [],
  770. replenishUrl: thisData.agreementUrl
  771. ? splitUrl(
  772. thisData.agreementUrl,
  773. ",",
  774. globalConfig.avatarHost + "/upload"
  775. )
  776. : [],
  777. orderNo: thisData.orderNo, //订单编号
  778. buyerId: thisData.buyerId,
  779. depName: thisData.depName,
  780. deleteSign:thisData.deleteSign,
  781. });
  782. }.bind(this),
  783. }).always(
  784. function () {
  785. this.setState({
  786. loading: false,
  787. });
  788. }.bind(this)
  789. );
  790. },
  791. rizhi() {
  792. this.setState({
  793. loading: true,
  794. });
  795. $.ajax({
  796. method: "get",
  797. dataType: "json",
  798. crossDomain: false,
  799. url: "/api/admin/newOrder/selectOrderLog",
  800. data: {
  801. orderNo: this.state.orderNo,
  802. },
  803. success: function (data) {
  804. let theArr = [];
  805. let thisData = data.data;
  806. if (!thisData.length) {
  807. if (data.error && data.error.length) {
  808. message.warning(data.error[0].message);
  809. }
  810. thisData = {};
  811. } else {
  812. for (let i = 0; i < data.data.length; i++) {
  813. let thisdata = data.data[i];
  814. theArr.push({
  815. processName: thisdata.processName,
  816. adminName: thisdata.adminName,
  817. createDate: thisdata.createDate,
  818. remarks: thisdata.remarks,
  819. });
  820. }
  821. }
  822. this.setState({
  823. dataSourceY: theArr,
  824. });
  825. }.bind(this),
  826. }).always(
  827. function () {
  828. this.setState({
  829. loading: false,
  830. });
  831. }.bind(this)
  832. );
  833. },
  834. closeOrderLog() {
  835. this.setState({
  836. avisible: false,
  837. });
  838. },
  839. load() {
  840. if (this.state.attachmentUrl) {
  841. let url = window.location.href.substring(7);
  842. this.state.attachmentUrl.forEach((e) => {
  843. window.location.href =
  844. "http://" +
  845. url.substring(0, url.indexOf("/")) +
  846. "/api/admin/outsourceOrg//downloadFile?path=" +
  847. e.response.data;
  848. });
  849. } else {
  850. message.error("此订单无上传文件");
  851. }
  852. },
  853. getOrderLog() {
  854. this.setState({
  855. avisible: true,
  856. });
  857. this.rizhi();
  858. },
  859. closeModal() {
  860. this.setState(
  861. {
  862. visible: false,
  863. width: "800px",
  864. },
  865. () => {
  866. this.setState({
  867. modKey: "1",
  868. });
  869. }
  870. );
  871. },
  872. closeDesc(e, s) {
  873. this.state.showDesc = e;
  874. if (s) {
  875. this.loadData(this.state.page);
  876. }
  877. },
  878. closeAssign(e, s) {
  879. this.state.assignVisible = e;
  880. if (s) {
  881. if (
  882. this.state.pagination.current == this.state.totalPage &&
  883. this.state.pagination.total % 10 == 1
  884. ) {
  885. this.loadData(this.state.page - 1);
  886. } else {
  887. this.loadData(this.state.page);
  888. }
  889. }
  890. },
  891. search() {
  892. this.loadData();
  893. },
  894. downImg() {
  895. let num = 0;
  896. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  897. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  898. num = i;
  899. }
  900. }
  901. if (num == this.state.orgCodeUrl.length - 1) {
  902. return message.warning("已经是最后一张了哦");
  903. }
  904. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  905. this.setState({
  906. previewImage: this.state.previewImage,
  907. rotateDeg: 0,
  908. });
  909. },
  910. upImg() {
  911. let num = 0;
  912. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  913. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  914. num = i;
  915. }
  916. }
  917. if (num == 0) {
  918. return message.warning("已经是第一张了哦");
  919. }
  920. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  921. this.setState({
  922. previewImage: this.state.previewImage,
  923. rotateDeg: 0,
  924. });
  925. },
  926. rotate() {
  927. let rotateDeg = this.state.rotateDeg + 90;
  928. this.setState({
  929. rotateDeg,
  930. });
  931. },
  932. downImgs() {
  933. let num = 0;
  934. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  935. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  936. num = i;
  937. }
  938. }
  939. if (num == this.state.replenishUrl.length - 1) {
  940. return message.warning("已经是最后一张了哦");
  941. }
  942. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  943. this.setState({
  944. previewImage: this.state.previewImage,
  945. rotateDeg: 0,
  946. });
  947. },
  948. upImgs() {
  949. let num = 0;
  950. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  951. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  952. num = i;
  953. }
  954. }
  955. if (num == 0) {
  956. return message.warning("已经是第一张了哦");
  957. }
  958. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  959. this.setState({
  960. previewImage: this.state.previewImage,
  961. rotateDeg: 0,
  962. });
  963. },
  964. rotates() {
  965. let rotateDeg = this.state.rotateDeg + 90;
  966. this.setState({
  967. rotateDeg,
  968. });
  969. },
  970. reset() {
  971. this.state.nameSearch = "";
  972. this.state.releaseDate = [];
  973. this.state.orderNoSearch = "";
  974. this.state.departmenttList = undefined;
  975. this.state.processStatus = [];
  976. this.state.contractNoSearch = "";
  977. this.loadData();
  978. },
  979. searchSwitch() {
  980. this.setState({
  981. searchMore: !this.state.searchMore,
  982. });
  983. },
  984. changeList(arr) {
  985. const newArr = [];
  986. this.state.columns.forEach(item => {
  987. arr.forEach(val => {
  988. if (val === item.title) {
  989. newArr.push(item);
  990. }
  991. });
  992. });
  993. this.setState({
  994. changeList: newArr
  995. });
  996. },
  997. render() {
  998. const { RangePicker } = DatePicker;
  999. const { TabPane } = Tabs;
  1000. var departmentArr = this.state.departmentArr || [];
  1001. const theData = this.state.orderList || {};
  1002. const formItemLayout = {
  1003. labelCol: { span: 8 },
  1004. wrapperCol: { span: 12 },
  1005. };
  1006. const jsDate = this.state.jsDate || [];
  1007. return (
  1008. <div className="user-content">
  1009. {this.state.resVisible ? (
  1010. <ResolutionDetail
  1011. cancel={this.resCancel}
  1012. detail={this.state.resRecord}
  1013. visible={this.state.resVisible}
  1014. id={this.state.resRecord.orderNo}
  1015. />
  1016. ) : (
  1017. ""
  1018. )}
  1019. <div className="content-title">
  1020. <span>外包派单</span>
  1021. </div>
  1022. <Tabs defaultActiveKey="1" className="test">
  1023. <TabPane tab="搜索" key="1">
  1024. <div className="user-search">
  1025. <Input
  1026. placeholder="客户名称"
  1027. value={this.state.nameSearch}
  1028. onChange={(e) => {
  1029. this.setState({ nameSearch: e.target.value });
  1030. }}
  1031. />
  1032. <Input
  1033. placeholder="订单编号"
  1034. value={this.state.orderNoSearch}
  1035. onChange={(e) => {
  1036. this.setState({ orderNoSearch: e.target.value });
  1037. }}
  1038. />
  1039. <Select
  1040. placeholder="订单部门"
  1041. style={{ width: 150, marginRight: 10 }}
  1042. value={this.state.departmenttList}
  1043. onChange={(e) => {
  1044. this.setState({ departmenttList: e });
  1045. }}
  1046. >
  1047. {departmentArr.map(function (item) {
  1048. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  1049. })}
  1050. </Select>
  1051. <Select
  1052. placeholder="流程状态"
  1053. onChange={(e) => {
  1054. this.setState({ processStatusSearch: e });
  1055. }}
  1056. style={{ width: 160, marginRight: 5 }}
  1057. value={this.state.processStatusSearch}
  1058. >
  1059. <Option value="2">未分配</Option>
  1060. <Option value="3">已分配</Option>
  1061. </Select>
  1062. <Input
  1063. placeholder="合同编号"
  1064. value={this.state.contractNoSearch}
  1065. onChange={(e) => {
  1066. this.setState({
  1067. contractNoSearch: e.target.value,
  1068. });
  1069. }}
  1070. />
  1071. <span style={{ marginRight: 10 }}>下单时间 :</span>
  1072. <RangePicker
  1073. value={[
  1074. this.state.releaseDate[0]
  1075. ? moment(this.state.releaseDate[0])
  1076. : null,
  1077. this.state.releaseDate[1]
  1078. ? moment(this.state.releaseDate[1])
  1079. : null,
  1080. ]}
  1081. onChange={(data, dataString) => {
  1082. this.setState({ releaseDate: dataString });
  1083. }}
  1084. />
  1085. <Button
  1086. type="primary"
  1087. onClick={this.search}
  1088. style={{ marginLeft: 10 }}
  1089. >
  1090. 搜索
  1091. </Button>
  1092. <Button onClick={this.reset}>重置</Button>
  1093. </div>
  1094. </TabPane>
  1095. <TabPane tab="更改表格显示数据" key="2">
  1096. <div style={{ marginLeft: 10 }}>
  1097. <ChooseList
  1098. columns={this.state.columns}
  1099. changeFn={this.changeList}
  1100. changeList={this.state.changeList}
  1101. top={55}
  1102. margin={11}
  1103. />
  1104. </div>
  1105. </TabPane>
  1106. </Tabs>
  1107. <div className="patent-table">
  1108. <Spin spinning={this.state.loading}>
  1109. <Table
  1110. columns={
  1111. this.state.changeList
  1112. ? this.state.changeList
  1113. : this.state.columns
  1114. }
  1115. dataSource={this.state.dataSource}
  1116. scroll={{ x: 1500, y: 0 }}
  1117. rowSelection={false}
  1118. size="small"
  1119. bordered
  1120. style={{
  1121. cursor: 'pointer',
  1122. }}
  1123. pagination={this.state.pagination}
  1124. onRowClick={this.tableRowClick.bind(this)}
  1125. />
  1126. </Spin>
  1127. </div>
  1128. <div className="patent-desc">
  1129. {this.state.visible ? <Modal
  1130. maskClosable={false}
  1131. visible={this.state.visible}
  1132. onCancel={this.closeModal}
  1133. width={this.state.width}
  1134. footer=""
  1135. className="admin-desc-content"
  1136. >
  1137. <Tabs
  1138. onChange={this.callBack}
  1139. type="card"
  1140. activeKey={this.state.modKey}
  1141. tabBarExtraContent={
  1142. <div style={{fontWeight:'bold',paddingRight:'15px'}}>
  1143. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  1144. </div>
  1145. }
  1146. >
  1147. <TabPane tab="项目概况" key="1">
  1148. {this.state.modKey === "1" ? <Form layout="horizontal" id="demand-form">
  1149. <Spin spinning={this.state.loading}>
  1150. <div className="clearfix">
  1151. <FormItem
  1152. className="half-item"
  1153. {...formItemLayout}
  1154. label="订单编号"
  1155. >
  1156. <span>{this.state.orderNo}</span>
  1157. </FormItem>
  1158. <FormItem
  1159. className="half-item"
  1160. {...formItemLayout}
  1161. label="签单时间"
  1162. >
  1163. <span>{theData.signDate}</span>
  1164. </FormItem>
  1165. <FormItem
  1166. className="half-item"
  1167. {...formItemLayout}
  1168. label="客户名称"
  1169. >
  1170. <span>{theData.userName}</span>
  1171. </FormItem>
  1172. <FormItem
  1173. className="half-item"
  1174. {...formItemLayout}
  1175. label="流转状态"
  1176. >
  1177. <span>{getProcessStatus(theData.processStatus)}</span>
  1178. </FormItem>
  1179. <FormItem
  1180. className="half-item"
  1181. {...formItemLayout}
  1182. label="订单类型"
  1183. >
  1184. <span>{getNewOrderType(theData.orderType)}</span>
  1185. </FormItem>
  1186. <FormItem
  1187. className="half-item"
  1188. {...formItemLayout}
  1189. label="结算状态"
  1190. >
  1191. <span>
  1192. {getLiquidationStatus(theData.liquidationStatus)}
  1193. </span>
  1194. </FormItem>
  1195. <FormItem
  1196. className="half-item"
  1197. {...formItemLayout}
  1198. label="签单总金额(万元)"
  1199. >
  1200. <span>{theData.totalAmount}</span>
  1201. </FormItem>
  1202. <FormItem
  1203. className="half-item"
  1204. {...formItemLayout}
  1205. label="首付款(万元)"
  1206. >
  1207. <span>{theData.firstAmount}</span>
  1208. </FormItem>
  1209. <FormItem
  1210. className="half-item"
  1211. {...formItemLayout}
  1212. label="已收款(万元)"
  1213. >
  1214. <span>{theData.settlementAmount}</span>
  1215. </FormItem>
  1216. <FormItem
  1217. className="half-item"
  1218. {...formItemLayout}
  1219. label="是否特批"
  1220. >
  1221. <span>{getApproval(theData.approval)}</span>
  1222. </FormItem>
  1223. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1224. <span>{this.props.data.refundAmount}</span>
  1225. </FormItem>*/}
  1226. </div>
  1227. <div className="clearfix">
  1228. <FormItem
  1229. labelCol={{ span: 5 }}
  1230. wrapperCol={{ span: 18 }}
  1231. label="合同扫描件"
  1232. >
  1233. {/*<Upload*/}
  1234. {/* className="demandDetailShow-upload"*/}
  1235. {/* listType="picture-card"*/}
  1236. {/* fileList={this.state.orgCodeUrl}*/}
  1237. {/* onPreview={(file) => {*/}
  1238. {/* this.setState({*/}
  1239. {/* previewImage: file.url || file.thumbUrl,*/}
  1240. {/* previewVisible: true,*/}
  1241. {/* });*/}
  1242. {/* }}*/}
  1243. {/*/>*/}
  1244. {this.state.visible && this.state.modKey === "1" && this.state.orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1245. <ImgList fileList={this.state.orgCodeUrl} domId={'outsourcingPaiDan1'}/>
  1246. </div> : <div/>}
  1247. <Modal
  1248. maskClosable={false}
  1249. footer={null}
  1250. width={"50%"}
  1251. visible={this.state.previewVisible}
  1252. onCancel={() => {
  1253. this.setState({
  1254. previewVisible: false,
  1255. rotateDeg: 0,
  1256. });
  1257. }}
  1258. >
  1259. <img
  1260. alt=""
  1261. style={{
  1262. width: "100%",
  1263. transform: `rotate(${this.state.rotateDeg}deg)`,
  1264. }}
  1265. src={this.state.previewImage || ""}
  1266. />
  1267. <Button
  1268. onClick={this.rotate}
  1269. style={{
  1270. position: "relative",
  1271. left: "50%",
  1272. transform: "translateX(-50%)",
  1273. }}
  1274. >
  1275. 旋转
  1276. </Button>
  1277. <Button
  1278. onClick={this.upImg}
  1279. style={{
  1280. position: "absolute",
  1281. left: -81,
  1282. top: "50%",
  1283. transform: "translateY(-50%)",
  1284. }}
  1285. >
  1286. 上一张
  1287. </Button>
  1288. <Button
  1289. onClick={this.downImg}
  1290. style={{
  1291. position: "absolute",
  1292. right: -81,
  1293. top: "50%",
  1294. transform: "translateY(-50%)",
  1295. }}
  1296. >
  1297. 下一张
  1298. </Button>
  1299. </Modal>
  1300. <Button
  1301. style={{
  1302. float: "right",
  1303. marginRight: "140px",
  1304. marginTop: "20px",
  1305. }}
  1306. onClick={this.getOrderLog}
  1307. >
  1308. 查看订单日志
  1309. </Button>
  1310. </FormItem>
  1311. <FormItem
  1312. labelCol={{ span: 5 }}
  1313. wrapperCol={{ span: 18 }}
  1314. label="补充协议"
  1315. >
  1316. {/*<Upload*/}
  1317. {/* className="demandDetailShow-upload"*/}
  1318. {/* listType="picture-card"*/}
  1319. {/* fileList={this.state.replenishUrl}*/}
  1320. {/* onPreview={(file) => {*/}
  1321. {/* this.setState({*/}
  1322. {/* previewImage: file.url || file.thumbUrl,*/}
  1323. {/* previewVisibles: true,*/}
  1324. {/* });*/}
  1325. {/* }}*/}
  1326. {/*/>*/}
  1327. {this.state.visible && this.state.modKey === "1" && this.state.replenishUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1328. <ImgList fileList={this.state.replenishUrl} domId={'outsourcingPaiDan2'}/>
  1329. </div> : <div/>}
  1330. <Modal
  1331. maskClosable={false}
  1332. footer={null}
  1333. width={"50%"}
  1334. visible={this.state.previewVisibles}
  1335. onCancel={() => {
  1336. this.setState({
  1337. previewVisibles: false,
  1338. rotateDeg: 0,
  1339. });
  1340. }}
  1341. >
  1342. <img
  1343. alt=""
  1344. style={{
  1345. width: "100%",
  1346. transform: `rotate(${this.state.rotateDeg}deg)`,
  1347. }}
  1348. src={this.state.previewImage || ""}
  1349. />
  1350. <Button
  1351. onClick={this.rotates}
  1352. style={{
  1353. position: "relative",
  1354. left: "50%",
  1355. transform: "translateX(-50%)",
  1356. }}
  1357. >
  1358. 旋转
  1359. </Button>
  1360. <Button
  1361. onClick={this.upImgs}
  1362. style={{
  1363. position: "absolute",
  1364. left: -81,
  1365. top: "50%",
  1366. transform: "translateY(-50%)",
  1367. }}
  1368. >
  1369. 上一张
  1370. </Button>
  1371. <Button
  1372. onClick={this.downImgs}
  1373. style={{
  1374. position: "absolute",
  1375. right: -81,
  1376. top: "50%",
  1377. transform: "translateY(-50%)",
  1378. }}
  1379. >
  1380. 下一张
  1381. </Button>
  1382. </Modal>
  1383. </FormItem>
  1384. </div>
  1385. <div className="clearfix">
  1386. <FormItem
  1387. className="half-item"
  1388. {...formItemLayout}
  1389. label="合同编号"
  1390. >
  1391. <span>{theData.contractNo}</span>
  1392. </FormItem>
  1393. <FormItem
  1394. className="half-item"
  1395. {...formItemLayout}
  1396. label="订单部门"
  1397. >
  1398. <span>{theData.depName}</span>
  1399. </FormItem>
  1400. </div>
  1401. <div className="clearfix">
  1402. <FormItem
  1403. labelCol={{ span: 5 }}
  1404. wrapperCol={{ span: 18 }}
  1405. label="订单留言"
  1406. >
  1407. <p style={{ width: 500, wordWrap: "break-word" }}>
  1408. {this.state.orderRemarks}
  1409. </p>
  1410. </FormItem>
  1411. </div>
  1412. <div className="clearfix">
  1413. <FormItem
  1414. labelCol={{ span: 5 }}
  1415. wrapperCol={{ span: 18 }}
  1416. label="收款节点"
  1417. >
  1418. {jsDate.map((item) => {
  1419. return (
  1420. <p>
  1421. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1422. </p>
  1423. );
  1424. })}
  1425. </FormItem>
  1426. </div>
  1427. <div className="clearfix">
  1428. <FormItem
  1429. className="half-item"
  1430. {...formItemLayout}
  1431. label="订单负责人"
  1432. >
  1433. <span>{theData.salesmanName}</span>
  1434. </FormItem>
  1435. <FormItem
  1436. className="half-item"
  1437. {...formItemLayout}
  1438. label="订单负责人电话"
  1439. >
  1440. <span>{theData.salesmanMobile}</span>
  1441. </FormItem>
  1442. <FormItem
  1443. className="half-item"
  1444. {...formItemLayout}
  1445. label="财务负责人"
  1446. >
  1447. <span>{theData.financeName}</span>
  1448. </FormItem>
  1449. <FormItem
  1450. className="half-item"
  1451. {...formItemLayout}
  1452. label="财务负责人电话"
  1453. >
  1454. <span>{theData.financeMobile}</span>
  1455. </FormItem>
  1456. </div>
  1457. <Modal
  1458. visible={this.state.avisible}
  1459. className="admin-desc-content"
  1460. width="800px"
  1461. maskClosable={false}
  1462. title="订单日志"
  1463. footer={null}
  1464. onCancel={this.closeOrderLog}
  1465. >
  1466. <div className="patent-table">
  1467. <Spin spinning={this.state.loading}>
  1468. <Table
  1469. columns={this.state.columnsY}
  1470. size="small"
  1471. bordered
  1472. dataSource={this.state.dataSourceY}
  1473. pagination={false}
  1474. />
  1475. </Spin>
  1476. </div>
  1477. </Modal>
  1478. <div className="clearfix">
  1479. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1480. <div className="patent-table">
  1481. <Spin spinning={this.state.loading}>
  1482. <Table
  1483. columns={this.state.columnsX}
  1484. dataSource={this.state.dataSourceX}
  1485. pagination={false}
  1486. size="small"
  1487. bordered
  1488. style={{
  1489. cursor: 'pointer',
  1490. }}
  1491. onRowClick={this.tableRowClick}
  1492. />
  1493. </Spin>
  1494. </div>
  1495. </div>
  1496. </Spin>
  1497. </Form>:<div/>}
  1498. </TabPane>
  1499. <TabPane tab="外包详情" key="2">
  1500. <div className="clearfix">
  1501. <p style={{ color: "red" }}>
  1502. 提示:查看备注请点击表格左侧加号按钮~
  1503. </p>
  1504. <div className="patent-table">
  1505. <Spin spinning={this.state.loading}>
  1506. <Table
  1507. columns={this.state.columnsW}
  1508. dataSource={this.state.dataSourceW}
  1509. pagination={false}
  1510. expandedRowRender={(record) => (
  1511. <p style={{ margin: 0 }}>{record.remarks}</p>
  1512. )}
  1513. scroll={{ x: 300, y: 0 }}
  1514. />
  1515. </Spin>
  1516. </div>
  1517. </div>
  1518. </TabPane>
  1519. <TabPane tab="外包审核" key="3">
  1520. <div className="clearfix">
  1521. <FormItem
  1522. className="half-item"
  1523. {...formItemLayout}
  1524. label="外包公司"
  1525. >
  1526. <span>{this.state.companyName}</span>
  1527. </FormItem>
  1528. </div>
  1529. <div className="clearfix">
  1530. <FormItem
  1531. className="half-item"
  1532. {...formItemLayout}
  1533. label="单价(万元)"
  1534. >
  1535. <span>{this.state.unitPrice}</span>
  1536. </FormItem>
  1537. </div>
  1538. <div className="clearfix">
  1539. <FormItem
  1540. className="half-item"
  1541. {...formItemLayout}
  1542. label="数量(个)"
  1543. >
  1544. <span>{this.state.unitNumber}</span>
  1545. </FormItem>
  1546. </div>
  1547. <div className="clearfix">
  1548. <FormItem
  1549. className="half-item"
  1550. {...formItemLayout}
  1551. label="总金额(万元)"
  1552. >
  1553. <span>{this.state.amount}</span>
  1554. </FormItem>
  1555. </div>
  1556. <div className="clearfix">
  1557. <FormItem
  1558. className="half-item"
  1559. {...formItemLayout}
  1560. label="备注"
  1561. >
  1562. <span>{this.state.outsourceRemarks}</span>
  1563. </FormItem>
  1564. </div>
  1565. {/*<div className="clearfix">
  1566. <FormItem className="half-item"
  1567. {...formItemLayout}
  1568. label="上传协议文件" >
  1569. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1570. data={(e)=>{
  1571. return {
  1572. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1573. }
  1574. }}
  1575. fileList={this.state.attachmentUrl}
  1576. showUploadList={{showRemoveIcon:false}}
  1577. onPreview={(e)=>{
  1578. let url = window.location.href.substring(7)
  1579. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1580. }}>
  1581. </Upload>
  1582. </FormItem>
  1583. </div>*/}
  1584. <div className="clearfix">
  1585. <FormItem
  1586. labelCol={{ span: 4 }}
  1587. wrapperCol={{ span: 18 }}
  1588. label="合同/协议扫描件"
  1589. >
  1590. {/*<Upload*/}
  1591. {/* className="demandDetailShow-upload"*/}
  1592. {/* listType="picture-card"*/}
  1593. {/* fileList={this.state.pictureUrl}*/}
  1594. {/* onPreview={(file) => {*/}
  1595. {/* this.setState({*/}
  1596. {/* previewImage: file.url || file.thumbUrl,*/}
  1597. {/* previewVisible: true,*/}
  1598. {/* });*/}
  1599. {/* }}*/}
  1600. {/*/>*/}
  1601. {this.state.visible && this.state.modKey === "3" && this.state.pictureUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1602. <ImgList fileList={this.state.pictureUrl} domId={'outsourcingPaiDan3'}/>
  1603. </div> : <div/>}
  1604. <Modal
  1605. maskClosable={false}
  1606. footer={null}
  1607. visible={this.state.previewVisible}
  1608. onCancel={() => {
  1609. this.setState({ previewVisible: false });
  1610. }}
  1611. >
  1612. <img
  1613. alt=""
  1614. style={{ width: "100%" }}
  1615. src={this.state.previewImage || ""}
  1616. />
  1617. </Modal>
  1618. </FormItem>
  1619. </div>
  1620. <div className="clearfix">
  1621. <hr className="division" />
  1622. <div className="clearfix">
  1623. <FormItem
  1624. className="half-item"
  1625. {...formItemLayout}
  1626. label="审核意见"
  1627. >
  1628. <span>{this.state.remarks}</span>
  1629. </FormItem>
  1630. </div>
  1631. <div className="clearfix">
  1632. <FormItem
  1633. className="half-item"
  1634. {...formItemLayout}
  1635. label="审核结果"
  1636. >
  1637. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1638. </FormItem>
  1639. </div>
  1640. <div className="clearfix">
  1641. <FormItem
  1642. className="half-item"
  1643. {...formItemLayout}
  1644. label="审核时间"
  1645. >
  1646. <span>{this.state.auditTimes}</span>
  1647. </FormItem>
  1648. </div>
  1649. </div>
  1650. </TabPane>
  1651. </Tabs>
  1652. </Modal> : <div/>}
  1653. </div>
  1654. <Assign
  1655. title="订单"
  1656. selApi="/api/admin/financial/distributionFinance"
  1657. data={this.state.assignData}
  1658. fenpaiData={4}
  1659. showDesc={this.state.assignVisible}
  1660. closeDesc={this.closeAssign.bind(this)}
  1661. roleName={"财务专员"}
  1662. requestMethod={"post"}
  1663. />
  1664. <Modal
  1665. visible={this.state.boHuiVisible}
  1666. width="400px"
  1667. title="驳回备注"
  1668. footer=""
  1669. maskClosable={false}
  1670. onOk={this.boHuiOk}
  1671. onCancel={this.boHuiCancel}
  1672. >
  1673. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1674. <Spin spinning={this.state.loading}>
  1675. <FormItem
  1676. labelCol={{ span: 5 }}
  1677. wrapperCol={{ span: 16 }}
  1678. label={
  1679. <span>
  1680. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1681. </span>
  1682. }
  1683. >
  1684. <Input
  1685. type="textarea"
  1686. rows={4}
  1687. placeholder="请输入驳回原因"
  1688. value={this.state.content}
  1689. onChange={(e) => {
  1690. this.setState({ content: e.target.value });
  1691. }}
  1692. />
  1693. </FormItem>
  1694. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1695. <Button
  1696. type="primary"
  1697. htmlType="submit"
  1698. style={{ marginRight: 20 }}
  1699. >
  1700. 驳回
  1701. </Button>
  1702. <Button
  1703. type="default"
  1704. onClick={() => {
  1705. this.boHuiCancel();
  1706. }}
  1707. >
  1708. 取消
  1709. </Button>
  1710. </FormItem>
  1711. </Spin>
  1712. </Form>
  1713. </Modal>
  1714. </div>
  1715. );
  1716. },
  1717. });
  1718. export default outsourcingPaiDan;