examine.jsx 53 KB

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