outsourcingPro.jsx 72 KB

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