outsourcingPro.jsx 63 KB

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