outsourcingPaiDan.jsx 54 KB

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