outsourcingPro.jsx 71 KB

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