outsourcingPro.jsx 73 KB

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