outsourcingPaiDan.jsx 51 KB

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