zxsglyOutSourcingPaiDan.jsx 51 KB

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