outsourcingPaiDan.jsx 53 KB

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