outsourcingPaiDan.jsx 55 KB

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