outsourcingPro.jsx 70 KB

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