outsourcingPro.jsx 56 KB

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