outsourcingPro.jsx 65 KB

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