outsourcingPro.jsx 70 KB

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