outsourcingPro.jsx 56 KB

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