outsourcingPro.jsx 72 KB

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