outsourcingPro.jsx 72 KB

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