outsourcingPro.jsx 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919
  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,record) => {
  425. if (record.customizeName) {
  426. return text + record.customizeName;
  427. }
  428. return <span>{text}</span>;
  429. },
  430. },
  431. {
  432. title: "时间(天)",
  433. dataIndex: "waitDay",
  434. key: "waitDay",
  435. render: (text, record) => {
  436. if (record.dunTypeName) {
  437. if (record.customizeTimes) {
  438. return record.customizeTimes;
  439. }
  440. return <span>{text}</span>;
  441. }
  442. },
  443. },
  444. {
  445. title: "金额(万元)",
  446. dataIndex: "money",
  447. key: "money",
  448. render: (text, record) => {
  449. if (record.dunTypeName) {
  450. if (record.appropriationRatio && !record.money) {
  451. return <span>{record.appropriationRatio}(拨款比例)</span>;
  452. } else if (record.appropriationRatio && record.money) {
  453. return (
  454. <span>
  455. {text}(比例:{record.appropriationRatio})
  456. </span>
  457. );
  458. } else {
  459. return <span>{text}</span>;
  460. }
  461. }
  462. },
  463. },
  464. {
  465. title: "服务年限",
  466. dataIndex: "startDate",
  467. key: "startDate",
  468. render: (text, record) => {
  469. if (record.dunTypeName) {
  470. return <span>{text}</span>;
  471. }
  472. },
  473. },
  474. {
  475. title: "催款状态",
  476. dataIndex: "status",
  477. key: "status",
  478. render: (text) => {
  479. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  480. },
  481. },
  482. ],
  483. ContactsLists: [
  484. {
  485. title: "催款科目",
  486. dataIndex: "dunSubject",
  487. key: "dunSubject",
  488. render: (text) => {
  489. return getjiedian(text);
  490. },
  491. },
  492. {
  493. title: "金额(万元)",
  494. dataIndex: "money",
  495. key: "money",
  496. },
  497. {
  498. title: "催款状态",
  499. dataIndex: "dunStatus",
  500. key: "dunStatus",
  501. render: (text) => {
  502. return getCuikuan(text);
  503. },
  504. },
  505. ],
  506. };
  507. },
  508. cancel() {
  509. this.setState({
  510. visible: false,
  511. remarks: undefined,
  512. activeKey: "1",
  513. });
  514. },
  515. nextCancel() {
  516. this.setState({
  517. addnextVisible: false,
  518. });
  519. },
  520. //订单详情
  521. xiangqing(orderNos) {
  522. $.ajax({
  523. method: "get",
  524. dataType: "json",
  525. crossDomain: false,
  526. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  527. data: {
  528. orderNo: orderNos,
  529. },
  530. success: function (data) {
  531. if (data.error.length || data.data.list == "") {
  532. if (data.error && data.error.length) {
  533. message.warning(data.error[0].message);
  534. }
  535. } else {
  536. let thisdata = data.data;
  537. this.setState({
  538. orderNo: thisdata.orderNo, //订单编号
  539. contractNo: thisdata.contractNo, //合同编号
  540. userName: thisdata.userName, //客户名称
  541. signDate: thisdata.signDate, //签单时间
  542. processStatus: thisdata.processStatus, //流程状态
  543. liquidationStatus: thisdata.liquidationStatus, //结算状态
  544. contacts: thisdata.contacts, //企业联系人
  545. contactMobile: thisdata.contactMobile, //联系人电话
  546. legalPerson: thisdata.legalPerson, //法人
  547. legalPersonTel: thisdata.legalPersonTel, //法人电话
  548. firstAmount: thisdata.firstAmount, //签单金额
  549. totalAmount: thisdata.totalAmount, //首付金额
  550. approval: thisdata.approval, //特批状态
  551. settlementAmount: thisdata.settlementAmount, //已收款项
  552. orderRemarks: thisdata.orderRemarks, //订单留言
  553. orgCodeUrl: thisdata.contractPictureUrl
  554. ? splitUrl(
  555. thisdata.contractPictureUrl,
  556. ",",
  557. globalConfig.avatarHost + "/upload"
  558. )
  559. : [], //图片地址
  560. replenishUrl: thisdata.agreementUrl
  561. ? splitUrl(
  562. thisdata.agreementUrl,
  563. ",",
  564. globalConfig.avatarHost + "/upload"
  565. )
  566. : [], //图片地址
  567. salesmanName: thisdata.salesmanName, //营销员名称
  568. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  569. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  570. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  571. financeName: thisdata.financeName, //财务名称
  572. financeMobile: thisdata.financeMobile, //财务电话
  573. nowFinance: thisdata.nowFinance, //财务名称
  574. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  575. depName: thisdata.depName,
  576. outsource: thisdata.outsource == 0 ? "否" : "是",
  577. });
  578. }
  579. }.bind(this),
  580. }).always(
  581. function () {
  582. this.setState({
  583. loading: false,
  584. });
  585. }.bind(this)
  586. );
  587. },
  588. //项目列表
  589. xiangmu(orderNos) {
  590. $.ajax({
  591. method: "get",
  592. dataType: "json",
  593. crossDomain: false,
  594. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  595. data: {
  596. orderNo: orderNos,
  597. },
  598. success: function (data) {
  599. let theArr = [];
  600. if (data.error.length || data.data.list == "") {
  601. if (data.error && data.error.length) {
  602. message.warning(data.error[0].message);
  603. }
  604. } else {
  605. for (let i = 0; i < data.data.length; i++) {
  606. let thisdata = data.data[i];
  607. theArr.push({
  608. key: i,
  609. id: thisdata.id,
  610. orderNo: thisdata.orderNo, //订单编号
  611. commodityId: thisdata.commodityId, //项目ID
  612. commodityName: thisdata.commodityName, //项目名称
  613. cname: thisdata.cname, //项目类别
  614. commodityPrice: thisdata.commodityPrice, //项目价格
  615. commodityQuantity: thisdata.commodityQuantity, //项目数量
  616. main: thisdata.main, //是否为主要任务
  617. taskComment: thisdata.taskComment, //任务说明
  618. contacts: thisdata.contacts, //联系人
  619. contactsMobile: thisdata.contactsMobile, //联系人电话
  620. projectStatus: thisdata.projectStatus, //项目状态
  621. splitStatus: thisdata.splitStatus,
  622. sort: thisdata.cSort,
  623. });
  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. this.setState({
  652. loading: true,
  653. });
  654. $.ajax({
  655. method: "get",
  656. dataType: "json",
  657. crossDomain: false,
  658. url: "/api/admin/newOrder/selectOrderLog",
  659. data: {
  660. orderNo: this.state.orderNo,
  661. },
  662. success: function (data) {
  663. let theArr = [];
  664. let thisData = data.data;
  665. if (!thisData.length) {
  666. if (data.error && data.error.length) {
  667. message.warning(data.error[0].message);
  668. }
  669. thisData = {};
  670. } else {
  671. for (let i = 0; i < data.data.length; i++) {
  672. let thisdata = data.data[i];
  673. theArr.push({
  674. processName: thisdata.processName,
  675. adminName: thisdata.adminName,
  676. createDate: thisdata.createDate,
  677. remarks: thisdata.remarks,
  678. });
  679. }
  680. }
  681. this.setState({
  682. dataSourcerizhi: theArr,
  683. });
  684. }.bind(this),
  685. }).always(
  686. function () {
  687. this.setState({
  688. loading: false,
  689. });
  690. }.bind(this)
  691. );
  692. },
  693. getOrderLog() {
  694. this.setState({
  695. rizhivisible: true,
  696. });
  697. this.rizhi();
  698. },
  699. closeOrderLog() {
  700. this.setState({
  701. rizhivisible: false,
  702. });
  703. },
  704. //节点列表
  705. jiedian(orderNos) {
  706. $.ajax({
  707. method: "get",
  708. dataType: "json",
  709. crossDomain: false,
  710. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  711. data: {
  712. orderNo: orderNos,
  713. },
  714. success: function (data) {
  715. let theArr = [];
  716. let thisData = [];
  717. if (data.error.length || data.data.list == "") {
  718. if (data.error && data.error.length) {
  719. message.warning(data.error[0].message);
  720. }
  721. } else {
  722. for (let i = 0; i < data.data.length; i++) {
  723. thisData = data.data[i];
  724. theArr.push({
  725. key: i,
  726. dunSubject: thisData.dunSubject
  727. ? thisData.dunSubject.toString()
  728. : "", //催款科目
  729. id: thisData.id, //节点Id
  730. money: thisData.money, //催款金额
  731. dunStatus: thisData.dunStatus, //催款状态
  732. });
  733. }
  734. this.setState({
  735. contactList: theArr,
  736. });
  737. }
  738. }.bind(this),
  739. }).always(
  740. function () {
  741. this.setState({
  742. loading: false,
  743. });
  744. }.bind(this)
  745. );
  746. },
  747. jiedianNew(orderNos) {
  748. $.ajax({
  749. method: "get",
  750. dataType: "json",
  751. crossDomain: false,
  752. url:
  753. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  754. data: {
  755. orderNo: orderNos,
  756. },
  757. success: function (data) {
  758. if (data.error && data.error.length) {
  759. message.warning(data.error[0].message);
  760. } else {
  761. let theArr = [];
  762. let thisData = [];
  763. let arr = data.data || [];
  764. let totalCui = 0;
  765. for (let i = 0; i < arr.length; i++) {
  766. thisData = arr[i];
  767. totalCui += +thisData.money;
  768. theArr.push({
  769. key: i,
  770. dunSubject: thisData.dunSubject
  771. ? thisData.dunSubject.toString()
  772. : "", //催款科目
  773. id: thisData.id, //节点Id
  774. money: thisData.money, //催款金额
  775. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  776. commodityName: thisData.commodityName,
  777. projectType: thisData.projectType,
  778. dunTypeName: thisData.dunTypeName,
  779. status: thisData.status,
  780. waitDay: thisData.waitDay,
  781. effectiveCount: thisData.effectiveCount,
  782. startDate: thisData.startDate,
  783. dunType: thisData.dunType,
  784. appropriationRatio: thisData.appropriationRatio,
  785. customizeName: thisData.customizeName,
  786. customizeTimes: thisData.customizeTimes,
  787. });
  788. }
  789. if (!totalCui) {
  790. totalCui = 0;
  791. }
  792. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  793. this.setState({
  794. contactListNew: theArr,
  795. totalCui,
  796. });
  797. }
  798. }.bind(this),
  799. }).always(
  800. function () {
  801. this.setState({
  802. loading: false,
  803. });
  804. }.bind(this)
  805. );
  806. },
  807. tableRowClick(record) {
  808. this.setState(
  809. {
  810. visible: true,
  811. loading: true,
  812. refundStatus: record.refundStatus,
  813. tid: record.tid,
  814. },
  815. () => {
  816. console.log(this.state.tid);
  817. }
  818. );
  819. this.xiangqing(record.orderNo);
  820. this.xiangmu(record.orderNo);
  821. this.jiedian(record.orderNo);
  822. this.jiedianNew(record.orderNo);
  823. $.ajax({
  824. method: "get",
  825. dataType: "json",
  826. crossDomain: false,
  827. url:
  828. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  829. data: {
  830. orderNo: record.orderNo,
  831. tid: record.tid,
  832. },
  833. success: function (data) {
  834. if (data.error.length || data.data.list == "") {
  835. if (data.error && data.error.length) {
  836. message.warning(data.error[0].message);
  837. }
  838. } else {
  839. let thisdata = data.data;
  840. this.setState({
  841. id: thisdata.id,
  842. orderNo: thisdata.orderNo,
  843. createTimes: thisdata.createTimes,
  844. auditTimes: thisdata.auditTimes,
  845. remarks: thisdata.remarks,
  846. pictureUrl: thisdata.pictureUrl
  847. ? splitUrl(
  848. thisdata.pictureUrl,
  849. ",",
  850. globalConfig.avatarHost + "/upload"
  851. )
  852. : [], //图片地址
  853. amount: thisdata.amount,
  854. refundStatus: thisdata.refundStatus,
  855. companyName: thisdata.companyName,
  856. outsourceRemarks: thisdata.outsourceRemarks,
  857. unitNumber: thisdata.unitNumber,
  858. unitPrice: thisdata.unitPrice,
  859. });
  860. }
  861. }.bind(this),
  862. }).always(
  863. function () {
  864. this.setState({
  865. loading: false,
  866. });
  867. }.bind(this)
  868. );
  869. },
  870. //页面加载函数
  871. componentWillMount() {
  872. this.loadData();
  873. },
  874. //审核
  875. examOk() {
  876. if (this.state.remarks == "" || this.state.remarks == undefined) {
  877. message.warning("请填写备注信息!");
  878. return;
  879. }
  880. this.setState({
  881. loading: true,
  882. });
  883. $.ajax({
  884. method: "post",
  885. dataType: "json",
  886. crossDomain: false,
  887. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsourceNew",
  888. data: {
  889. id: this.state.id,
  890. orderNo: this.state.orderNo,
  891. tid: this.state.tid,
  892. remarks: this.state.remarks,
  893. refundStatus: 1,
  894. type: 1,
  895. },
  896. success: function (data) {
  897. if (data.error.length || data.data.list == "") {
  898. if (data.error && data.error.length) {
  899. message.warning(data.error[0].message);
  900. }
  901. } else {
  902. message.success("该订单已通过");
  903. this.setState({
  904. visible: false,
  905. });
  906. this.cancel();
  907. this.loadData();
  908. }
  909. }.bind(this),
  910. }).always(
  911. function () {
  912. this.setState({
  913. loading: false,
  914. });
  915. }.bind(this)
  916. );
  917. },
  918. examNo() {
  919. if (this.state.remarks == "" || this.state.remarks == undefined) {
  920. message.warning("请填写备注信息!");
  921. return;
  922. }
  923. this.setState({
  924. loading: true,
  925. });
  926. $.ajax({
  927. method: "post",
  928. dataType: "json",
  929. crossDomain: false,
  930. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsourceNew",
  931. data: {
  932. id: this.state.id,
  933. orderNo: this.state.orderNo,
  934. tid: this.state.tid,
  935. remarks: this.state.remarks,
  936. refundStatus: 2,
  937. type: 1,
  938. },
  939. success: function (data) {
  940. if (data.error.length || data.data.list == "") {
  941. if (data.error && data.error.length) {
  942. message.warning(data.error[0].message);
  943. }
  944. } else {
  945. message.success("该订单已驳回");
  946. this.setState({
  947. visible: false,
  948. });
  949. this.cancel();
  950. this.loadData();
  951. }
  952. }.bind(this),
  953. }).always(
  954. function () {
  955. this.setState({
  956. loading: false,
  957. });
  958. }.bind(this)
  959. );
  960. },
  961. //通过发给外包
  962. outsourcing() {
  963. if (this.state.flag) return;
  964. this.setState({
  965. flag: true,
  966. });
  967. $.ajax({
  968. method: "post",
  969. dataType: "json",
  970. crossDomain: false,
  971. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  972. data: {
  973. orderNo: this.state.orderNo,
  974. orderStatus: 2,
  975. outsource: 1,
  976. },
  977. success: function (data) {
  978. if (data.error.length || data.data.list == "") {
  979. if (data.error && data.error.length) {
  980. message.warning(data.error[0].message);
  981. }
  982. } else {
  983. message.success("该订单已通过审核~");
  984. this.setState({
  985. visible: false,
  986. flag: false,
  987. });
  988. this.reset();
  989. }
  990. }.bind(this),
  991. }).always(
  992. function () {
  993. this.setState({
  994. loading: false,
  995. });
  996. }.bind(this)
  997. );
  998. },
  999. getUrl(url) {
  1000. let theorgCodeUrl = [];
  1001. if (url.length) {
  1002. let picArr = [];
  1003. url.map(function (item) {
  1004. if (
  1005. item.response &&
  1006. item.response.data &&
  1007. item.response.data.length
  1008. ) {
  1009. picArr.push(item.response.data);
  1010. }
  1011. });
  1012. theorgCodeUrl = picArr.join(",");
  1013. }
  1014. return theorgCodeUrl;
  1015. },
  1016. //搜索
  1017. search() {
  1018. this.loadData();
  1019. },
  1020. //重置
  1021. reset() {
  1022. this.state.nameSearch = "";
  1023. this.state.contractNoSearch = "";
  1024. this.state.releaseDate[0] = undefined;
  1025. this.state.releaseDate[1] = undefined;
  1026. this.state.refundStatusSearch = undefined;
  1027. this.loadData(1);
  1028. },
  1029. resets() {
  1030. this.state.orderNo = "";
  1031. this.state.customerName = "";
  1032. this.state.releaseDate[0] = undefined;
  1033. this.state.releaseDate[1] = undefined;
  1034. },
  1035. getOrgCodeUrl(e) {
  1036. this.setState({ pictureUrl: e });
  1037. },
  1038. callback(e) {
  1039. this.setState({
  1040. activeKey: e,
  1041. });
  1042. },
  1043. downImg() {
  1044. let num = 0;
  1045. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1046. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1047. num = i;
  1048. }
  1049. }
  1050. if (num == this.state.orgCodeUrl.length - 1) {
  1051. return message.warning("已经是最后一张了哦");
  1052. }
  1053. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1054. this.setState({
  1055. previewImage: this.state.previewImage,
  1056. rotateDeg: 0,
  1057. });
  1058. },
  1059. upImg() {
  1060. let num = 0;
  1061. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1062. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1063. num = i;
  1064. }
  1065. }
  1066. if (num == 0) {
  1067. return message.warning("已经是第一张了哦");
  1068. }
  1069. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1070. this.setState({
  1071. previewImage: this.state.previewImage,
  1072. rotateDeg: 0,
  1073. });
  1074. },
  1075. rotate() {
  1076. let rotateDeg = this.state.rotateDeg + 90;
  1077. this.setState({
  1078. rotateDeg,
  1079. });
  1080. },
  1081. downImgs() {
  1082. let num = 0;
  1083. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1084. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1085. num = i;
  1086. }
  1087. }
  1088. if (num == this.state.replenishUrl.length - 1) {
  1089. return message.warning("已经是最后一张了哦");
  1090. }
  1091. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1092. this.setState({
  1093. previewImage: this.state.previewImage,
  1094. rotateDeg: 0,
  1095. });
  1096. },
  1097. upImgs() {
  1098. let num = 0;
  1099. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1100. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1101. num = i;
  1102. }
  1103. }
  1104. if (num == 0) {
  1105. return message.warning("已经是第一张了哦");
  1106. }
  1107. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  1108. this.setState({
  1109. previewImage: this.state.previewImage,
  1110. rotateDeg: 0,
  1111. });
  1112. },
  1113. rotates() {
  1114. let rotateDeg = this.state.rotateDeg + 90;
  1115. this.setState({
  1116. rotateDeg,
  1117. });
  1118. },
  1119. render() {
  1120. const formItemLayout = {
  1121. labelCol: { span: 8 },
  1122. wrapperCol: { span: 14 },
  1123. };
  1124. const FormItem = Form.Item;
  1125. const { TextArea } = Input;
  1126. const { TabPane } = Tabs;
  1127. const { RangePicker } = DatePicker;
  1128. const cuiDataList = this.state.contactList || [];
  1129. return (
  1130. <div className="user-content">
  1131. {this.state.resVisible ? (
  1132. <ResolutionDetail
  1133. cancel={this.resCancel}
  1134. detail={this.state.resRecord}
  1135. visible={this.state.resVisible}
  1136. id={this.state.resRecord.orderNo}
  1137. />
  1138. ) : (
  1139. ""
  1140. )}
  1141. <ShowModalDiv ShowModal={this.state.showModal} />
  1142. <div className="content-title" style={{ marginBottom: 10 }}>
  1143. <span style={{ fontWeight: 900, fontSize: 16 }}>外包项目列表</span>
  1144. </div>
  1145. <div className="user-search">
  1146. <Tabs
  1147. defaultActiveKey="1"
  1148. onChange={this.callback}
  1149. className="test"
  1150. >
  1151. <TabPane tab="搜索" key="1">
  1152. <Input
  1153. placeholder="客户名称"
  1154. style={{
  1155. width: "150px",
  1156. marginBottom: "10px",
  1157. marginLeft: 10,
  1158. marginRight: 10,
  1159. }}
  1160. value={this.state.nameSearch}
  1161. onChange={(e) => {
  1162. this.setState({ nameSearch: e.target.value });
  1163. }}
  1164. />
  1165. <Input
  1166. placeholder="合同编号"
  1167. style={{ width: "150px" }}
  1168. value={this.state.contractNoSearch}
  1169. onChange={(e) => {
  1170. this.setState({ contractNoSearch: e.target.value });
  1171. }}
  1172. />
  1173. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1174. <RangePicker
  1175. value={[
  1176. this.state.releaseDate[0]
  1177. ? moment(this.state.releaseDate[0])
  1178. : null,
  1179. this.state.releaseDate[1]
  1180. ? moment(this.state.releaseDate[1])
  1181. : null,
  1182. ]}
  1183. onChange={(data, dataString) => {
  1184. this.setState({ releaseDate: dataString });
  1185. }}
  1186. />
  1187. <Select
  1188. value={this.state.refundStatusSearch}
  1189. style={{ width: 150, marginLeft: "10px" }}
  1190. onChange={(e) => {
  1191. this.setState({
  1192. refundStatusSearch: e,
  1193. });
  1194. }}
  1195. placeholder="审核状态"
  1196. >
  1197. <Option value={0}>待审核</Option>
  1198. <Option value={1}>审核通过</Option>
  1199. <Option value={2}>审核驳回</Option>
  1200. </Select>
  1201. <Button
  1202. type="primary"
  1203. onClick={this.search}
  1204. style={{ marginLeft: "10px", marginRight: 10 }}
  1205. >
  1206. 搜索
  1207. </Button>
  1208. <Button onClick={this.reset}>重置</Button>
  1209. </TabPane>
  1210. </Tabs>
  1211. <div className="patent-table">
  1212. <Spin spinning={this.state.loading}>
  1213. <Table
  1214. columns={this.state.columns}
  1215. dataSource={this.state.dataSource}
  1216. pagination={this.state.pagination}
  1217. onRowClick={this.tableRowClick}
  1218. bordered
  1219. size="small"
  1220. />
  1221. </Spin>
  1222. </div>
  1223. <Modal
  1224. maskClosable={false}
  1225. visible={this.state.visible}
  1226. onCancel={this.cancel}
  1227. width="900px"
  1228. title={""}
  1229. footer=""
  1230. className="admin-desc-content"
  1231. confirmLoading={this.state.confirmLoading}
  1232. >
  1233. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1234. <TabPane tab="订单详情" key="1">
  1235. <Form
  1236. layout="horizontal"
  1237. onSubmit={this.handleSubmit}
  1238. id="demand-form"
  1239. style={{ paddingBottom: "40px" }}
  1240. >
  1241. <Spin spinning={this.state.loading}>
  1242. <div className="clearfix">
  1243. <FormItem
  1244. className="half-item"
  1245. {...formItemLayout}
  1246. label="订单编号"
  1247. >
  1248. <span>{this.state.orderNo}</span>
  1249. </FormItem>
  1250. <FormItem
  1251. className="half-item"
  1252. {...formItemLayout}
  1253. label="合同编号"
  1254. >
  1255. <span>{this.state.contractNo}</span>
  1256. </FormItem>
  1257. <FormItem
  1258. className="half-item"
  1259. {...formItemLayout}
  1260. label="客户名称"
  1261. >
  1262. <span>{this.state.userName}</span>
  1263. </FormItem>
  1264. <FormItem
  1265. className="half-item"
  1266. {...formItemLayout}
  1267. label="合同签订时间"
  1268. >
  1269. <span>{this.state.signDate}</span>
  1270. </FormItem>
  1271. <FormItem
  1272. className="half-item"
  1273. {...formItemLayout}
  1274. label="流程状态"
  1275. >
  1276. <span>
  1277. {getProcessStatus(this.state.processStatus)}
  1278. </span>
  1279. </FormItem>
  1280. <FormItem
  1281. className="half-item"
  1282. {...formItemLayout}
  1283. label="结算状态"
  1284. >
  1285. <span>
  1286. {getLiquidationStatus(this.state.liquidationStatus)}
  1287. </span>
  1288. </FormItem>
  1289. <FormItem
  1290. className="half-item"
  1291. {...formItemLayout}
  1292. label="企业联系人"
  1293. >
  1294. <span>{this.state.contacts}</span>
  1295. </FormItem>
  1296. <FormItem
  1297. className="half-item"
  1298. {...formItemLayout}
  1299. label="联系人电话"
  1300. >
  1301. <span>{this.state.contactMobile}</span>
  1302. </FormItem>
  1303. <FormItem
  1304. className="half-item"
  1305. {...formItemLayout}
  1306. label="企业法人"
  1307. >
  1308. <span>{this.state.legalPerson}</span>
  1309. </FormItem>
  1310. <FormItem
  1311. className="half-item"
  1312. {...formItemLayout}
  1313. label="法人电话"
  1314. >
  1315. <span>{this.state.legalPersonTel}</span>
  1316. </FormItem>
  1317. <FormItem
  1318. className="half-item"
  1319. {...formItemLayout}
  1320. label="签单金额(万元)"
  1321. >
  1322. <span>{this.state.totalAmount}</span>
  1323. </FormItem>
  1324. <FormItem
  1325. className="half-item"
  1326. {...formItemLayout}
  1327. label="首付金额(万元)"
  1328. >
  1329. <span>{this.state.firstAmount}</span>
  1330. </FormItem>
  1331. <FormItem
  1332. className="half-item"
  1333. {...formItemLayout}
  1334. label="特批立项"
  1335. >
  1336. <span>{getApprovedState(this.state.approval)}</span>
  1337. </FormItem>
  1338. <FormItem
  1339. className="half-item"
  1340. {...formItemLayout}
  1341. label="已收款项(万元)"
  1342. >
  1343. <span>{this.state.settlementAmount}</span>
  1344. </FormItem>
  1345. <FormItem
  1346. className="half-item"
  1347. {...formItemLayout}
  1348. label="订单部门"
  1349. >
  1350. <span>{this.state.depName}</span>
  1351. </FormItem>
  1352. <FormItem
  1353. className="half-item"
  1354. {...formItemLayout}
  1355. label="是否外包"
  1356. >
  1357. <span>{this.state.outsource}</span>
  1358. </FormItem>
  1359. <div className="clearfix">
  1360. <FormItem
  1361. labelCol={{ span: 4 }}
  1362. wrapperCol={{ span: 16 }}
  1363. label="订单留言"
  1364. >
  1365. <span>{this.state.orderRemarks}</span>
  1366. </FormItem>
  1367. </div>
  1368. <div className="clearfix">
  1369. <FormItem
  1370. labelCol={{ span: 4 }}
  1371. wrapperCol={{ span: 18 }}
  1372. label="合同扫描件"
  1373. >
  1374. <Upload
  1375. className="demandDetailShow-upload"
  1376. listType="picture-card"
  1377. fileList={this.state.orgCodeUrl}
  1378. onPreview={(file) => {
  1379. this.setState({
  1380. previewImage: file.url || file.thumbUrl,
  1381. previewVisible: true,
  1382. });
  1383. }}
  1384. ></Upload>
  1385. <Modal
  1386. maskClosable={false}
  1387. footer={null}
  1388. width={"70%"}
  1389. visible={this.state.previewVisible}
  1390. onCancel={() => {
  1391. this.setState({
  1392. previewVisible: false,
  1393. rotateDeg: 0,
  1394. });
  1395. }}
  1396. >
  1397. <img
  1398. alt=""
  1399. style={{
  1400. width: "100%",
  1401. transform: `rotate(${this.state.rotateDeg}deg)`,
  1402. }}
  1403. src={this.state.previewImage || ""}
  1404. />
  1405. <Button
  1406. onClick={this.rotate}
  1407. style={{
  1408. position: "relative",
  1409. left: "50%",
  1410. transform: "translateX(-50%)",
  1411. }}
  1412. >
  1413. 旋转
  1414. </Button>
  1415. <Button
  1416. onClick={this.upImg}
  1417. style={{
  1418. position: "absolute",
  1419. left: -81,
  1420. top: "50%",
  1421. transform: "translateY(-50%)",
  1422. }}
  1423. >
  1424. 上一张
  1425. </Button>
  1426. <Button
  1427. onClick={this.downImg}
  1428. style={{
  1429. position: "absolute",
  1430. right: -81,
  1431. top: "50%",
  1432. transform: "translateY(-50%)",
  1433. }}
  1434. >
  1435. 下一张
  1436. </Button>
  1437. </Modal>
  1438. <Button
  1439. style={{
  1440. float: "right",
  1441. marginRight: "140px",
  1442. marginTop: "20px",
  1443. }}
  1444. onClick={this.getOrderLog}
  1445. >
  1446. 查看订单日志
  1447. </Button>
  1448. </FormItem>
  1449. <FormItem
  1450. labelCol={{ span: 4 }}
  1451. wrapperCol={{ span: 18 }}
  1452. label="补充协议"
  1453. >
  1454. <Upload
  1455. className="demandDetailShow-upload"
  1456. listType="picture-card"
  1457. fileList={this.state.replenishUrl}
  1458. onPreview={(file) => {
  1459. this.setState({
  1460. previewImage: file.url || file.thumbUrl,
  1461. previewVisible: true,
  1462. });
  1463. }}
  1464. ></Upload>
  1465. <Modal
  1466. maskClosable={false}
  1467. footer={null}
  1468. width={"70%"}
  1469. visible={this.state.previewVisible}
  1470. onCancel={() => {
  1471. this.setState({
  1472. previewVisible: false,
  1473. rotateDeg: 0,
  1474. });
  1475. }}
  1476. >
  1477. <img
  1478. alt=""
  1479. style={{
  1480. width: "100%",
  1481. transform: `rotate(${this.state.rotateDeg}deg)`,
  1482. }}
  1483. src={this.state.previewImage || ""}
  1484. />
  1485. <Button
  1486. onClick={this.rotate}
  1487. style={{
  1488. position: "relative",
  1489. left: "50%",
  1490. transform: "translateX(-50%)",
  1491. }}
  1492. >
  1493. 旋转
  1494. </Button>
  1495. <Button
  1496. onClick={this.upImgs}
  1497. style={{
  1498. position: "absolute",
  1499. left: -81,
  1500. top: "50%",
  1501. transform: "translateY(-50%)",
  1502. }}
  1503. >
  1504. 上一张
  1505. </Button>
  1506. <Button
  1507. onClick={this.downImgs}
  1508. style={{
  1509. position: "absolute",
  1510. right: -81,
  1511. top: "50%",
  1512. transform: "translateY(-50%)",
  1513. }}
  1514. >
  1515. 下一张
  1516. </Button>
  1517. </Modal>
  1518. </FormItem>
  1519. </div>
  1520. <div className="clearfix">
  1521. <FormItem
  1522. className="half-item"
  1523. {...formItemLayout}
  1524. label="订单负责人"
  1525. >
  1526. <span>{this.state.salesmanName}</span>
  1527. </FormItem>
  1528. <FormItem
  1529. className="half-item"
  1530. {...formItemLayout}
  1531. label="订单负责人电话"
  1532. >
  1533. <span>{this.state.salesmanMobile}</span>
  1534. </FormItem>
  1535. </div>
  1536. <div className="clearfix">
  1537. <FormItem
  1538. className="half-item"
  1539. {...formItemLayout}
  1540. label="当前财务负责人"
  1541. >
  1542. <span>{this.state.nowFinance}</span>
  1543. </FormItem>
  1544. <FormItem
  1545. className="half-item"
  1546. {...formItemLayout}
  1547. label="当前财务负责人电话"
  1548. >
  1549. <span>{this.state.nowFinanceMobile}</span>
  1550. </FormItem>
  1551. </div>
  1552. <div className="clearfix">
  1553. <FormItem
  1554. className="half-item"
  1555. {...formItemLayout}
  1556. style={{ opacity: ".5" }}
  1557. label="原订单负责人"
  1558. >
  1559. <span>{this.state.oldSalesmanName}</span>
  1560. </FormItem>
  1561. <FormItem
  1562. className="half-item"
  1563. {...formItemLayout}
  1564. style={{ opacity: ".5" }}
  1565. label="原订单负责人电话"
  1566. >
  1567. <span>{this.state.oldSalesmanMobile}</span>
  1568. </FormItem>
  1569. </div>
  1570. <div className="clearfix">
  1571. <FormItem
  1572. className="half-item"
  1573. style={{ opacity: ".5" }}
  1574. {...formItemLayout}
  1575. label="实际财务操作人"
  1576. >
  1577. <span>{this.state.financeName}</span>
  1578. </FormItem>
  1579. <FormItem
  1580. className="half-item"
  1581. {...formItemLayout}
  1582. style={{ opacity: ".5" }}
  1583. label="实际财务操作人电话"
  1584. >
  1585. <span>{this.state.financeMobile}</span>
  1586. </FormItem>
  1587. </div>
  1588. <div>
  1589. <span
  1590. style={{ marginLeft: "50px", fontSize: "20px" }}
  1591. >
  1592. 项目业务
  1593. </span>
  1594. {this.state.processStatus == 0 ? (
  1595. <Button
  1596. type="primary"
  1597. onClick={this.addDetailed}
  1598. style={{
  1599. float: "right",
  1600. marginRight: "50px",
  1601. marginBottom: "15px",
  1602. }}
  1603. >
  1604. 添加项目明细
  1605. </Button>
  1606. ) : (
  1607. ""
  1608. )}
  1609. </div>
  1610. <div className="patent-table">
  1611. <Spin spinning={this.state.loading}>
  1612. <Table
  1613. columns={this.state.columnsX}
  1614. dataSource={this.state.dataSourceX}
  1615. pagination={this.state.paginations}
  1616. onRowClick={this.tableRowClickX}
  1617. bordered
  1618. size="small"
  1619. />
  1620. </Spin>
  1621. </div>
  1622. <div>
  1623. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  1624. 催款节点
  1625. </span>
  1626. <span
  1627. style={{
  1628. display: cuiDataList.length
  1629. ? "none"
  1630. : "inline-block",
  1631. marginLeft: 10,
  1632. color: "red",
  1633. }}
  1634. >
  1635. 金额总计(万元): {this.state.totalCui}
  1636. </span>
  1637. </div>
  1638. <div className="clearfix">
  1639. <Spin spinning={this.state.loading}>
  1640. <Form layout="horizontal" id="demand-form">
  1641. <Table
  1642. pagination={false}
  1643. bordered
  1644. size="small"
  1645. columns={
  1646. cuiDataList.length
  1647. ? this.state.ContactsLists
  1648. : this.state.ContactsListsNew
  1649. }
  1650. dataSource={
  1651. cuiDataList.length
  1652. ? this.state.contactList
  1653. : this.state.contactListNew
  1654. }
  1655. />
  1656. <Col
  1657. span={24}
  1658. offset={9}
  1659. style={{ marginTop: "15px" }}
  1660. ></Col>
  1661. </Form>
  1662. </Spin>
  1663. </div>
  1664. </div>
  1665. </Spin>
  1666. </Form>
  1667. </TabPane>
  1668. <TabPane tab="外包审核" key="2">
  1669. <Spin spinning={this.state.loading}>
  1670. <div className="clearfix">
  1671. <FormItem
  1672. className="half-item"
  1673. {...formItemLayout}
  1674. label="外包公司"
  1675. >
  1676. <span>{this.state.companyName}</span>
  1677. </FormItem>
  1678. </div>
  1679. <div className="clearfix">
  1680. <FormItem
  1681. className="half-item"
  1682. {...formItemLayout}
  1683. label="单价(万元)"
  1684. >
  1685. <span>{this.state.unitPrice}</span>
  1686. </FormItem>
  1687. </div>
  1688. <div className="clearfix">
  1689. <FormItem
  1690. className="half-item"
  1691. {...formItemLayout}
  1692. label="数量(个)"
  1693. >
  1694. <span>{this.state.unitNumber}</span>
  1695. </FormItem>
  1696. </div>
  1697. <div className="clearfix">
  1698. <FormItem
  1699. className="half-item"
  1700. {...formItemLayout}
  1701. label="总金额(万元)"
  1702. >
  1703. <span>{this.state.amount}</span>
  1704. </FormItem>
  1705. </div>
  1706. <div className="clearfix">
  1707. <FormItem
  1708. className="half-item"
  1709. {...formItemLayout}
  1710. label="备注"
  1711. >
  1712. <span>{this.state.outsourceRemarks}</span>
  1713. </FormItem>
  1714. </div>
  1715. <div className="clearfix">
  1716. <FormItem
  1717. labelCol={{ span: 4 }}
  1718. wrapperCol={{ span: 18 }}
  1719. label="合同/协议扫描件"
  1720. >
  1721. <Upload
  1722. className="demandDetailShow-upload"
  1723. listType="picture-card"
  1724. fileList={this.state.pictureUrl}
  1725. onPreview={(file) => {
  1726. this.setState({
  1727. previewImage: file.url || file.thumbUrl,
  1728. previewVisible: true,
  1729. });
  1730. }}
  1731. ></Upload>
  1732. <Modal
  1733. maskClosable={false}
  1734. footer={null}
  1735. width={"70%"}
  1736. visible={this.state.previewVisible}
  1737. onCancel={() => {
  1738. this.setState({ previewVisible: false,rotateDeg: 0 });
  1739. }}
  1740. >
  1741. <img
  1742. alt=""
  1743. style={{
  1744. width: "100%",
  1745. transform: `rotate(${this.state.rotateDeg}deg)`,
  1746. }}
  1747. src={this.state.previewImage || ""}
  1748. />
  1749. <Button
  1750. onClick={this.rotate}
  1751. style={{
  1752. position: "relative",
  1753. left: "50%",
  1754. transform: "translateX(-50%)",
  1755. }}
  1756. >
  1757. 旋转
  1758. </Button>
  1759. <Button
  1760. onClick={this.upImg}
  1761. style={{
  1762. position: "absolute",
  1763. left: -81,
  1764. top: "50%",
  1765. transform: "translateY(-50%)",
  1766. }}
  1767. >
  1768. 上一张
  1769. </Button>
  1770. <Button
  1771. onClick={this.downImg}
  1772. style={{
  1773. position: "absolute",
  1774. right: -81,
  1775. top: "50%",
  1776. transform: "translateY(-50%)",
  1777. }}
  1778. >
  1779. 下一张
  1780. </Button>
  1781. </Modal>
  1782. </FormItem>
  1783. </div>
  1784. {this.state.refundStatus == 0 ? (
  1785. <div>
  1786. <hr className="division" />
  1787. <div className="clearfix" style={{ marginTop: "20px" }}>
  1788. <FormItem
  1789. labelCol={{ span: 4 }}
  1790. wrapperCol={{ span: 18 }}
  1791. label={
  1792. <span>
  1793. <strong style={{ color: "#f00" }}>*</strong>
  1794. 审核意见
  1795. </span>
  1796. }
  1797. >
  1798. <Input
  1799. type="textarea"
  1800. placeholder="请输入备注"
  1801. rows={4}
  1802. value={this.state.remarks}
  1803. onChange={(e) => {
  1804. this.setState({ remarks: e.target.value });
  1805. }}
  1806. style={{ width: "440px" }}
  1807. />
  1808. <span
  1809. className="tip"
  1810. style={{
  1811. width: "160px",
  1812. verticalAlign: "top",
  1813. display: "inline-block",
  1814. marginLeft: "10px",
  1815. }}
  1816. >
  1817. 通过或驳回都必须填写审核意见!
  1818. </span>
  1819. </FormItem>
  1820. </div>
  1821. <div className="clearfix fa">
  1822. <Button
  1823. type="danger"
  1824. onClick={this.examNo}
  1825. loading={this.state.loading}
  1826. style={{
  1827. color: "#fff",
  1828. backgroundColor: "#f04134",
  1829. }}
  1830. >
  1831. 驳回
  1832. </Button>
  1833. <Button
  1834. type="primary"
  1835. loading={this.state.loading}
  1836. onClick={this.examOk}
  1837. >
  1838. 通过
  1839. </Button>
  1840. </div>
  1841. </div>
  1842. ) : (
  1843. <div className="clearfix">
  1844. <hr className="division" />
  1845. <div className="clearfix">
  1846. <FormItem
  1847. className="half-item"
  1848. {...formItemLayout}
  1849. label="审核意见"
  1850. >
  1851. <span>{this.state.remarks}</span>
  1852. </FormItem>
  1853. </div>
  1854. <div className="clearfix">
  1855. <FormItem
  1856. className="half-item"
  1857. {...formItemLayout}
  1858. label="审核结果"
  1859. >
  1860. <span>
  1861. {getRefundStatus(this.state.refundStatus)}
  1862. </span>
  1863. </FormItem>
  1864. </div>
  1865. <div className="clearfix">
  1866. <FormItem
  1867. className="half-item"
  1868. {...formItemLayout}
  1869. label="审核时间"
  1870. >
  1871. <span>{this.state.auditTimes}</span>
  1872. </FormItem>
  1873. </div>
  1874. </div>
  1875. )}
  1876. </Spin>
  1877. </TabPane>
  1878. </Tabs>
  1879. </Modal>
  1880. <Modal
  1881. visible={this.state.rizhivisible}
  1882. className="admin-desc-content"
  1883. width="800px"
  1884. maskClosable={false}
  1885. title="订单日志"
  1886. footer={null}
  1887. onCancel={this.closeOrderLog}
  1888. >
  1889. <div className="patent-table">
  1890. <Spin spinning={this.state.loading}>
  1891. <Table
  1892. columns={this.state.columnsrizhi}
  1893. dataSource={this.state.dataSourcerizhi}
  1894. pagination={false}
  1895. bordered
  1896. size="small"
  1897. />
  1898. </Spin>
  1899. </div>
  1900. </Modal>
  1901. </div>
  1902. </div>
  1903. );
  1904. },
  1905. })
  1906. );
  1907. export default outsourcingPro;