outsourcingPaiDan.jsx 54 KB

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