outsourcingPro.jsx 72 KB

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