outsourcingPro.jsx 68 KB

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