outsourcingPaiDan.jsx 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Button,
  7. Form,
  8. Input,
  9. Select,
  10. Spin,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Tabs,
  17. Tag
  18. } from "antd";
  19. import Assign from "@/manageCenter/publicComponent/assign";
  20. import ResolutionDetail from "@/resolutionDetail";
  21. import {
  22. getjiedian,
  23. getProcessStatus,
  24. getApproval,
  25. getNewOrderType,
  26. getLiquidationStatus,
  27. getProjectStatus,
  28. splitUrl,
  29. getprovince,
  30. getRefundStatus
  31. } from "@/tools";
  32. import ImgList from "../../../common/imgList";
  33. import {ChooseList} from "../../order/orderNew/chooseList";
  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 getProjectStatus(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 getProjectStatus(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. pagination={this.state.pagination}
  1119. onRowClick={this.tableRowClick.bind(this)}
  1120. />
  1121. </Spin>
  1122. </div>
  1123. <div className="patent-desc">
  1124. {this.state.visible ? <Modal
  1125. maskClosable={false}
  1126. visible={this.state.visible}
  1127. onCancel={this.closeModal}
  1128. width={this.state.width}
  1129. footer=""
  1130. className="admin-desc-content"
  1131. >
  1132. <Tabs
  1133. onChange={this.callBack}
  1134. type="card"
  1135. activeKey={this.state.modKey}
  1136. >
  1137. <TabPane tab="项目概况" key="1">
  1138. {this.state.modKey === "1" ? <Form layout="horizontal" id="demand-form">
  1139. <Spin spinning={this.state.loading}>
  1140. <div className="clearfix">
  1141. <FormItem
  1142. className="half-item"
  1143. {...formItemLayout}
  1144. label="订单编号"
  1145. >
  1146. <span>{this.state.orderNo}</span>
  1147. </FormItem>
  1148. <FormItem
  1149. className="half-item"
  1150. {...formItemLayout}
  1151. label="签单时间"
  1152. >
  1153. <span>{theData.signDate}</span>
  1154. </FormItem>
  1155. <FormItem
  1156. className="half-item"
  1157. {...formItemLayout}
  1158. label="客户名称"
  1159. >
  1160. <span>{theData.userName}</span>
  1161. </FormItem>
  1162. <FormItem
  1163. className="half-item"
  1164. {...formItemLayout}
  1165. label="流转状态"
  1166. >
  1167. <span>{getProcessStatus(theData.processStatus)}</span>
  1168. </FormItem>
  1169. <FormItem
  1170. className="half-item"
  1171. {...formItemLayout}
  1172. label="订单类型"
  1173. >
  1174. <span>{getNewOrderType(theData.orderType)}</span>
  1175. </FormItem>
  1176. <FormItem
  1177. className="half-item"
  1178. {...formItemLayout}
  1179. label="结算状态"
  1180. >
  1181. <span>
  1182. {getLiquidationStatus(theData.liquidationStatus)}
  1183. </span>
  1184. </FormItem>
  1185. <FormItem
  1186. className="half-item"
  1187. {...formItemLayout}
  1188. label="签单总金额(万元)"
  1189. >
  1190. <span>{theData.totalAmount}</span>
  1191. </FormItem>
  1192. <FormItem
  1193. className="half-item"
  1194. {...formItemLayout}
  1195. label="首付款(万元)"
  1196. >
  1197. <span>{theData.firstAmount}</span>
  1198. </FormItem>
  1199. <FormItem
  1200. className="half-item"
  1201. {...formItemLayout}
  1202. label="已收款(万元)"
  1203. >
  1204. <span>{theData.settlementAmount}</span>
  1205. </FormItem>
  1206. <FormItem
  1207. className="half-item"
  1208. {...formItemLayout}
  1209. label="是否特批"
  1210. >
  1211. <span>{getApproval(theData.approval)}</span>
  1212. </FormItem>
  1213. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1214. <span>{this.props.data.refundAmount}</span>
  1215. </FormItem>*/}
  1216. </div>
  1217. <div className="clearfix">
  1218. <FormItem
  1219. labelCol={{ span: 5 }}
  1220. wrapperCol={{ span: 18 }}
  1221. label="合同扫描件"
  1222. >
  1223. {/*<Upload*/}
  1224. {/* className="demandDetailShow-upload"*/}
  1225. {/* listType="picture-card"*/}
  1226. {/* fileList={this.state.orgCodeUrl}*/}
  1227. {/* onPreview={(file) => {*/}
  1228. {/* this.setState({*/}
  1229. {/* previewImage: file.url || file.thumbUrl,*/}
  1230. {/* previewVisible: true,*/}
  1231. {/* });*/}
  1232. {/* }}*/}
  1233. {/*/>*/}
  1234. {this.state.visible && this.state.modKey === "1" && this.state.orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1235. <ImgList fileList={this.state.orgCodeUrl} domId={'outsourcingPaiDan1'}/>
  1236. </div> : <div/>}
  1237. <Modal
  1238. maskClosable={false}
  1239. footer={null}
  1240. width={"50%"}
  1241. visible={this.state.previewVisible}
  1242. onCancel={() => {
  1243. this.setState({
  1244. previewVisible: false,
  1245. rotateDeg: 0,
  1246. });
  1247. }}
  1248. >
  1249. <img
  1250. alt=""
  1251. style={{
  1252. width: "100%",
  1253. transform: `rotate(${this.state.rotateDeg}deg)`,
  1254. }}
  1255. src={this.state.previewImage || ""}
  1256. />
  1257. <Button
  1258. onClick={this.rotate}
  1259. style={{
  1260. position: "relative",
  1261. left: "50%",
  1262. transform: "translateX(-50%)",
  1263. }}
  1264. >
  1265. 旋转
  1266. </Button>
  1267. <Button
  1268. onClick={this.upImg}
  1269. style={{
  1270. position: "absolute",
  1271. left: -81,
  1272. top: "50%",
  1273. transform: "translateY(-50%)",
  1274. }}
  1275. >
  1276. 上一张
  1277. </Button>
  1278. <Button
  1279. onClick={this.downImg}
  1280. style={{
  1281. position: "absolute",
  1282. right: -81,
  1283. top: "50%",
  1284. transform: "translateY(-50%)",
  1285. }}
  1286. >
  1287. 下一张
  1288. </Button>
  1289. </Modal>
  1290. <Button
  1291. style={{
  1292. float: "right",
  1293. marginRight: "140px",
  1294. marginTop: "20px",
  1295. }}
  1296. onClick={this.getOrderLog}
  1297. >
  1298. 查看订单日志
  1299. </Button>
  1300. </FormItem>
  1301. <FormItem
  1302. labelCol={{ span: 5 }}
  1303. wrapperCol={{ span: 18 }}
  1304. label="补充协议"
  1305. >
  1306. {/*<Upload*/}
  1307. {/* className="demandDetailShow-upload"*/}
  1308. {/* listType="picture-card"*/}
  1309. {/* fileList={this.state.replenishUrl}*/}
  1310. {/* onPreview={(file) => {*/}
  1311. {/* this.setState({*/}
  1312. {/* previewImage: file.url || file.thumbUrl,*/}
  1313. {/* previewVisibles: true,*/}
  1314. {/* });*/}
  1315. {/* }}*/}
  1316. {/*/>*/}
  1317. {this.state.visible && this.state.modKey === "1" && this.state.replenishUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1318. <ImgList fileList={this.state.replenishUrl} domId={'outsourcingPaiDan2'}/>
  1319. </div> : <div/>}
  1320. <Modal
  1321. maskClosable={false}
  1322. footer={null}
  1323. width={"50%"}
  1324. visible={this.state.previewVisibles}
  1325. onCancel={() => {
  1326. this.setState({
  1327. previewVisibles: false,
  1328. rotateDeg: 0,
  1329. });
  1330. }}
  1331. >
  1332. <img
  1333. alt=""
  1334. style={{
  1335. width: "100%",
  1336. transform: `rotate(${this.state.rotateDeg}deg)`,
  1337. }}
  1338. src={this.state.previewImage || ""}
  1339. />
  1340. <Button
  1341. onClick={this.rotates}
  1342. style={{
  1343. position: "relative",
  1344. left: "50%",
  1345. transform: "translateX(-50%)",
  1346. }}
  1347. >
  1348. 旋转
  1349. </Button>
  1350. <Button
  1351. onClick={this.upImgs}
  1352. style={{
  1353. position: "absolute",
  1354. left: -81,
  1355. top: "50%",
  1356. transform: "translateY(-50%)",
  1357. }}
  1358. >
  1359. 上一张
  1360. </Button>
  1361. <Button
  1362. onClick={this.downImgs}
  1363. style={{
  1364. position: "absolute",
  1365. right: -81,
  1366. top: "50%",
  1367. transform: "translateY(-50%)",
  1368. }}
  1369. >
  1370. 下一张
  1371. </Button>
  1372. </Modal>
  1373. </FormItem>
  1374. </div>
  1375. <div className="clearfix">
  1376. <FormItem
  1377. className="half-item"
  1378. {...formItemLayout}
  1379. label="合同编号"
  1380. >
  1381. <span>{theData.contractNo}</span>
  1382. </FormItem>
  1383. <FormItem
  1384. className="half-item"
  1385. {...formItemLayout}
  1386. label="订单部门"
  1387. >
  1388. <span>{theData.depName}</span>
  1389. </FormItem>
  1390. </div>
  1391. <div className="clearfix">
  1392. <FormItem
  1393. labelCol={{ span: 5 }}
  1394. wrapperCol={{ span: 18 }}
  1395. label="订单留言"
  1396. >
  1397. <p style={{ width: 500, wordWrap: "break-word" }}>
  1398. {this.state.orderRemarks}
  1399. </p>
  1400. </FormItem>
  1401. </div>
  1402. <div className="clearfix">
  1403. <FormItem
  1404. labelCol={{ span: 5 }}
  1405. wrapperCol={{ span: 18 }}
  1406. label="收款节点"
  1407. >
  1408. {jsDate.map((item) => {
  1409. return (
  1410. <p>
  1411. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1412. </p>
  1413. );
  1414. })}
  1415. </FormItem>
  1416. </div>
  1417. <div className="clearfix">
  1418. <FormItem
  1419. className="half-item"
  1420. {...formItemLayout}
  1421. label="订单负责人"
  1422. >
  1423. <span>{theData.salesmanName}</span>
  1424. </FormItem>
  1425. <FormItem
  1426. className="half-item"
  1427. {...formItemLayout}
  1428. label="订单负责人电话"
  1429. >
  1430. <span>{theData.salesmanMobile}</span>
  1431. </FormItem>
  1432. <FormItem
  1433. className="half-item"
  1434. {...formItemLayout}
  1435. label="财务负责人"
  1436. >
  1437. <span>{theData.financeName}</span>
  1438. </FormItem>
  1439. <FormItem
  1440. className="half-item"
  1441. {...formItemLayout}
  1442. label="财务负责人电话"
  1443. >
  1444. <span>{theData.financeMobile}</span>
  1445. </FormItem>
  1446. </div>
  1447. <Modal
  1448. visible={this.state.avisible}
  1449. className="admin-desc-content"
  1450. width="800px"
  1451. maskClosable={false}
  1452. title="订单日志"
  1453. footer={null}
  1454. onCancel={this.closeOrderLog}
  1455. >
  1456. <div className="patent-table">
  1457. <Spin spinning={this.state.loading}>
  1458. <Table
  1459. columns={this.state.columnsY}
  1460. size="small"
  1461. bordered
  1462. dataSource={this.state.dataSourceY}
  1463. pagination={false}
  1464. />
  1465. </Spin>
  1466. </div>
  1467. </Modal>
  1468. <div className="clearfix">
  1469. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1470. <div className="patent-table">
  1471. <Spin spinning={this.state.loading}>
  1472. <Table
  1473. columns={this.state.columnsX}
  1474. dataSource={this.state.dataSourceX}
  1475. pagination={false}
  1476. size="small"
  1477. bordered
  1478. onRowClick={this.tableRowClick}
  1479. />
  1480. </Spin>
  1481. </div>
  1482. </div>
  1483. </Spin>
  1484. </Form>:<div/>}
  1485. </TabPane>
  1486. <TabPane tab="外包详情" key="2">
  1487. <div className="clearfix">
  1488. <p style={{ color: "red" }}>
  1489. 提示:查看备注请点击表格左侧加号按钮~
  1490. </p>
  1491. <div className="patent-table">
  1492. <Spin spinning={this.state.loading}>
  1493. <Table
  1494. columns={this.state.columnsW}
  1495. dataSource={this.state.dataSourceW}
  1496. pagination={false}
  1497. expandedRowRender={(record) => (
  1498. <p style={{ margin: 0 }}>{record.remarks}</p>
  1499. )}
  1500. scroll={{ x: 300, y: 0 }}
  1501. />
  1502. </Spin>
  1503. </div>
  1504. </div>
  1505. </TabPane>
  1506. <TabPane tab="外包审核" key="3">
  1507. <div className="clearfix">
  1508. <FormItem
  1509. className="half-item"
  1510. {...formItemLayout}
  1511. label="外包公司"
  1512. >
  1513. <span>{this.state.companyName}</span>
  1514. </FormItem>
  1515. </div>
  1516. <div className="clearfix">
  1517. <FormItem
  1518. className="half-item"
  1519. {...formItemLayout}
  1520. label="单价(万元)"
  1521. >
  1522. <span>{this.state.unitPrice}</span>
  1523. </FormItem>
  1524. </div>
  1525. <div className="clearfix">
  1526. <FormItem
  1527. className="half-item"
  1528. {...formItemLayout}
  1529. label="数量(个)"
  1530. >
  1531. <span>{this.state.unitNumber}</span>
  1532. </FormItem>
  1533. </div>
  1534. <div className="clearfix">
  1535. <FormItem
  1536. className="half-item"
  1537. {...formItemLayout}
  1538. label="总金额(万元)"
  1539. >
  1540. <span>{this.state.amount}</span>
  1541. </FormItem>
  1542. </div>
  1543. <div className="clearfix">
  1544. <FormItem
  1545. className="half-item"
  1546. {...formItemLayout}
  1547. label="备注"
  1548. >
  1549. <span>{this.state.outsourceRemarks}</span>
  1550. </FormItem>
  1551. </div>
  1552. {/*<div className="clearfix">
  1553. <FormItem className="half-item"
  1554. {...formItemLayout}
  1555. label="上传协议文件" >
  1556. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1557. data={(e)=>{
  1558. return {
  1559. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1560. }
  1561. }}
  1562. fileList={this.state.attachmentUrl}
  1563. showUploadList={{showRemoveIcon:false}}
  1564. onPreview={(e)=>{
  1565. let url = window.location.href.substring(7)
  1566. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1567. }}>
  1568. </Upload>
  1569. </FormItem>
  1570. </div>*/}
  1571. <div className="clearfix">
  1572. <FormItem
  1573. labelCol={{ span: 4 }}
  1574. wrapperCol={{ span: 18 }}
  1575. label="合同/协议扫描件"
  1576. >
  1577. {/*<Upload*/}
  1578. {/* className="demandDetailShow-upload"*/}
  1579. {/* listType="picture-card"*/}
  1580. {/* fileList={this.state.pictureUrl}*/}
  1581. {/* onPreview={(file) => {*/}
  1582. {/* this.setState({*/}
  1583. {/* previewImage: file.url || file.thumbUrl,*/}
  1584. {/* previewVisible: true,*/}
  1585. {/* });*/}
  1586. {/* }}*/}
  1587. {/*/>*/}
  1588. {this.state.visible && this.state.modKey === "3" && this.state.pictureUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1589. <ImgList fileList={this.state.pictureUrl} domId={'outsourcingPaiDan3'}/>
  1590. </div> : <div/>}
  1591. <Modal
  1592. maskClosable={false}
  1593. footer={null}
  1594. visible={this.state.previewVisible}
  1595. onCancel={() => {
  1596. this.setState({ previewVisible: false });
  1597. }}
  1598. >
  1599. <img
  1600. alt=""
  1601. style={{ width: "100%" }}
  1602. src={this.state.previewImage || ""}
  1603. />
  1604. </Modal>
  1605. </FormItem>
  1606. </div>
  1607. <div className="clearfix">
  1608. <hr className="division" />
  1609. <div className="clearfix">
  1610. <FormItem
  1611. className="half-item"
  1612. {...formItemLayout}
  1613. label="审核意见"
  1614. >
  1615. <span>{this.state.remarks}</span>
  1616. </FormItem>
  1617. </div>
  1618. <div className="clearfix">
  1619. <FormItem
  1620. className="half-item"
  1621. {...formItemLayout}
  1622. label="审核结果"
  1623. >
  1624. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1625. </FormItem>
  1626. </div>
  1627. <div className="clearfix">
  1628. <FormItem
  1629. className="half-item"
  1630. {...formItemLayout}
  1631. label="审核时间"
  1632. >
  1633. <span>{this.state.auditTimes}</span>
  1634. </FormItem>
  1635. </div>
  1636. </div>
  1637. </TabPane>
  1638. </Tabs>
  1639. </Modal> : <div/>}
  1640. </div>
  1641. <Assign
  1642. title="订单"
  1643. selApi="/api/admin/financial/distributionFinance"
  1644. data={this.state.assignData}
  1645. fenpaiData={4}
  1646. showDesc={this.state.assignVisible}
  1647. closeDesc={this.closeAssign.bind(this)}
  1648. roleName={"财务专员"}
  1649. requestMethod={"post"}
  1650. />
  1651. <Modal
  1652. visible={this.state.boHuiVisible}
  1653. width="400px"
  1654. title="驳回备注"
  1655. footer=""
  1656. onOk={this.boHuiOk}
  1657. onCancel={this.boHuiCancel}
  1658. >
  1659. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1660. <Spin spinning={this.state.loading}>
  1661. <FormItem
  1662. labelCol={{ span: 5 }}
  1663. wrapperCol={{ span: 16 }}
  1664. label={
  1665. <span>
  1666. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1667. </span>
  1668. }
  1669. >
  1670. <Input
  1671. type="textarea"
  1672. rows={4}
  1673. placeholder="请输入驳回原因"
  1674. value={this.state.content}
  1675. onChange={(e) => {
  1676. this.setState({ content: e.target.value });
  1677. }}
  1678. />
  1679. </FormItem>
  1680. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1681. <Button
  1682. type="primary"
  1683. htmlType="submit"
  1684. style={{ marginRight: 20 }}
  1685. >
  1686. 驳回
  1687. </Button>
  1688. <Button
  1689. type="default"
  1690. onClick={() => {
  1691. this.boHuiCancel();
  1692. }}
  1693. >
  1694. 取消
  1695. </Button>
  1696. </FormItem>
  1697. </Spin>
  1698. </Form>
  1699. </Modal>
  1700. </div>
  1701. );
  1702. },
  1703. });
  1704. export default outsourcingPaiDan;