outsourcingPro.jsx 70 KB

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