outsourcingPro.jsx 71 KB

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