examine.jsx 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623
  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. <span>{this.state.orderRemarks}</span>
  1129. </FormItem>
  1130. </div>
  1131. <div className="clearfix">
  1132. <FormItem
  1133. labelCol={{ span: 4 }}
  1134. wrapperCol={{ span: 18 }}
  1135. label="合同扫描件"
  1136. >
  1137. <Upload
  1138. className="demandDetailShow-upload"
  1139. listType="picture-card"
  1140. fileList={this.state.orgCodeUrl}
  1141. onPreview={file => {
  1142. this.setState({
  1143. previewImage: file.url || file.thumbUrl,
  1144. previewVisible: true
  1145. });
  1146. }}
  1147. ></Upload>
  1148. <Modal
  1149. maskClosable={false}
  1150. footer={null}
  1151. visible={this.state.previewVisible}
  1152. onCancel={() => {
  1153. this.setState({ previewVisible: false });
  1154. }}
  1155. >
  1156. <img
  1157. alt=""
  1158. style={{ width: "100%" }}
  1159. src={this.state.previewImage || ""}
  1160. />
  1161. </Modal>
  1162. <Button
  1163. style={{
  1164. float: "right",
  1165. marginRight: "140px",
  1166. marginTop: "20px"
  1167. }}
  1168. onClick={this.getOrderLog}
  1169. >
  1170. 查看订单日志
  1171. </Button>
  1172. </FormItem>
  1173. </div>
  1174. <div className="clearfix">
  1175. <FormItem
  1176. className="half-item"
  1177. {...formItemLayout}
  1178. label="订单负责人"
  1179. >
  1180. <span>{this.state.salesmanName}</span>
  1181. </FormItem>
  1182. <FormItem
  1183. className="half-item"
  1184. {...formItemLayout}
  1185. label="订单负责人电话"
  1186. >
  1187. <span>{this.state.salesmanMobile}</span>
  1188. </FormItem>
  1189. </div>
  1190. <div className="clearfix">
  1191. <FormItem
  1192. className="half-item"
  1193. {...formItemLayout}
  1194. label="财务负责人"
  1195. >
  1196. <span>{this.state.financeName}</span>
  1197. </FormItem>
  1198. <FormItem
  1199. className="half-item"
  1200. {...formItemLayout}
  1201. label="财务负责人电话"
  1202. >
  1203. <span>{this.state.financeMobile}</span>
  1204. </FormItem>
  1205. </div>
  1206. <div>
  1207. <span
  1208. style={{ marginLeft: "50px", fontSize: "20px" }}
  1209. >
  1210. 催款节点
  1211. </span>
  1212. {this.state.processStatus == 0 ? (
  1213. <Button
  1214. type="primary"
  1215. onClick={this.addcontact}
  1216. style={{
  1217. float: "right",
  1218. marginRight: "50px",
  1219. marginBottom: "15px"
  1220. }}
  1221. >
  1222. 添加催款节点
  1223. </Button>
  1224. ) : (
  1225. ""
  1226. )}
  1227. </div>
  1228. <div className="clearfix">
  1229. <Spin spinning={this.state.loading}>
  1230. <Form layout="horizontal" id="demand-form">
  1231. <Table
  1232. pagination={false}
  1233. columns={this.state.ContactsLists}
  1234. dataSource={this.state.contactList}
  1235. />
  1236. <Col
  1237. span={24}
  1238. offset={9}
  1239. style={{ marginTop: "15px" }}
  1240. ></Col>
  1241. </Form>
  1242. </Spin>
  1243. </div>
  1244. <div>
  1245. <span
  1246. style={{ marginLeft: "50px", fontSize: "20px" }}
  1247. >
  1248. 项目业务
  1249. </span>
  1250. {this.state.processStatus == 0 ? (
  1251. <Button
  1252. type="primary"
  1253. onClick={this.addDetailed}
  1254. style={{
  1255. float: "right",
  1256. marginRight: "50px",
  1257. marginBottom: "15px"
  1258. }}
  1259. >
  1260. 添加项目明细
  1261. </Button>
  1262. ) : (
  1263. ""
  1264. )}
  1265. </div>
  1266. <div className="patent-table">
  1267. <Spin spinning={this.state.loading}>
  1268. <Table
  1269. columns={this.state.columnsX}
  1270. dataSource={this.state.dataSourceX}
  1271. pagination={this.state.paginations}
  1272. onRowClick={this.tableRowClickX}
  1273. />
  1274. </Spin>
  1275. </div>
  1276. <div className="addSave" style={{ marginTop: "15px" }}>
  1277. <Button
  1278. type="primary"
  1279. onClick={this.examOk}
  1280. style={{ marginLeft: "200px" }}
  1281. htmlType="submit"
  1282. >
  1283. 通过
  1284. </Button>
  1285. <Button
  1286. type="primary"
  1287. onClick={this.examNo}
  1288. style={{ marginLeft: "50px" }}
  1289. htmlType="submit"
  1290. >
  1291. 驳回
  1292. </Button>
  1293. <Button
  1294. type="ghost"
  1295. onClick={this.visitCancel}
  1296. style={{ marginLeft: "50px" }}
  1297. >
  1298. 取消
  1299. </Button>
  1300. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1301. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1302. </div>
  1303. </div>
  1304. </Spin>
  1305. </Form>
  1306. </TabPane>
  1307. <TabPane tab="外包(不走总部)" key="2">
  1308. <div className="clearfix">
  1309. <FormItem
  1310. className="half-item"
  1311. {...formItemLayout}
  1312. label={
  1313. <span>
  1314. <strong style={{ color: "#f00" }}>*</strong>外包公司
  1315. </span>
  1316. }
  1317. >
  1318. <Input
  1319. value={this.state.companyName}
  1320. onChange={e => {
  1321. this.setState({
  1322. companyName: e.target.value
  1323. });
  1324. }}
  1325. placeholder="请填写外包公司名称"
  1326. />
  1327. </FormItem>
  1328. <span className="tip">如多个公司,请用间隔</span>
  1329. </div>
  1330. <div className="clearfix">
  1331. <FormItem
  1332. className="half-item"
  1333. {...formItemLayout}
  1334. label={
  1335. <span>
  1336. <strong style={{ color: "#f00" }}>*</strong>单价(万元)
  1337. </span>
  1338. }
  1339. >
  1340. <Input
  1341. value={this.state.unitPrice}
  1342. onChange={e => {
  1343. this.setState({
  1344. unitPrice: e.target.value
  1345. });
  1346. }}
  1347. placeholder="请填写单价"
  1348. />
  1349. </FormItem>
  1350. </div>
  1351. <div className="clearfix">
  1352. <FormItem
  1353. className="half-item"
  1354. {...formItemLayout}
  1355. label={
  1356. <span>
  1357. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  1358. </span>
  1359. }
  1360. >
  1361. <Input
  1362. value={this.state.unitNumber}
  1363. onChange={e => {
  1364. this.setState({
  1365. unitNumber: e.target.value
  1366. });
  1367. }}
  1368. placeholder="请填写数量"
  1369. />
  1370. </FormItem>
  1371. </div>
  1372. <div className="clearfix">
  1373. <FormItem
  1374. className="half-item"
  1375. {...formItemLayout}
  1376. label={
  1377. <span>
  1378. <strong style={{ color: "#f00" }}>*</strong>
  1379. 总金额(万元)
  1380. </span>
  1381. }
  1382. >
  1383. <Input
  1384. value={this.state.amount}
  1385. onChange={e => {
  1386. this.setState({
  1387. amount: e.target.value
  1388. });
  1389. }}
  1390. placeholder="请填写本次外包公司的价格"
  1391. />
  1392. </FormItem>
  1393. </div>
  1394. {/*<div className="clearfix">
  1395. <FormItem className="half-item"
  1396. {...formItemLayout}
  1397. label="上传协议文件" style={{height:"auto"}}>
  1398. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1399. data={(e)=>{
  1400. return {
  1401. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1402. }
  1403. }}
  1404. fileList={this.state.attachmentUrl}
  1405. onChange={(e)=>{
  1406. this.setState({attachmentUrl:e.fileList})
  1407. }}>
  1408. {this.state.attachmentUrl.length>1?null:<Button>
  1409. <Icon type="upload" /> 点击上传
  1410. </Button>}
  1411. </Upload>
  1412. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1413. </FormItem>
  1414. </div>*/}
  1415. <div className="clearfix">
  1416. <FormItem
  1417. className="half-item"
  1418. style={{ height: "auto" }}
  1419. {...formItemLayout}
  1420. label={
  1421. <span>
  1422. <strong style={{ color: "#f00" }}>*</strong>备注
  1423. </span>
  1424. }
  1425. >
  1426. <TextArea
  1427. rows={4}
  1428. value={this.state.outsourceRemarks}
  1429. onChange={e => {
  1430. this.setState({
  1431. outsourceRemarks: e.target.value
  1432. });
  1433. }}
  1434. placeholder="请输入备注"
  1435. />
  1436. </FormItem>
  1437. </div>
  1438. <p
  1439. className="tip"
  1440. style={{
  1441. paddingBottom: "12px",
  1442. width: "240px",
  1443. marginLeft: "145px"
  1444. }}
  1445. >
  1446. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1447. </p>
  1448. <div className="clearfix">
  1449. <FormItem
  1450. labelCol={{ span: 4 }}
  1451. wrapperCol={{ span: 18 }}
  1452. label={
  1453. <span>
  1454. <strong style={{ color: "#f00" }}>*</strong>
  1455. 合同/协议扫描件
  1456. <span style={{ color: "#f00" }}>(外包合同)</span>
  1457. </span>
  1458. }
  1459. >
  1460. <PicturesWall
  1461. fileList={this.getOrgCodeUrl}
  1462. pictureUrl={this.state.pictureUrl}
  1463. />
  1464. <p>请上传与外包公司签订的合同协议</p>
  1465. <p>图片建议:要清晰。</p>
  1466. </FormItem>
  1467. </div>
  1468. <div className="clearfix">
  1469. <div
  1470. style={{ display: "inline-black", textAlign: "center" }}
  1471. >
  1472. <Button type="primary" onClick={this.sureOut}>
  1473. 确认发起外包,不通过总部
  1474. </Button>
  1475. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1476. </div>
  1477. </div>
  1478. </TabPane>
  1479. </Tabs>
  1480. </Modal>
  1481. <Modal
  1482. maskClosable={false}
  1483. visible={this.state.addnextVisible}
  1484. onOk={this.nextCancel}
  1485. onCancel={this.nextCancel}
  1486. confirmLoading={this.state.confirmLoading}
  1487. width="800px"
  1488. title={"项目任务详情"}
  1489. footer=""
  1490. className="admin-desc-content"
  1491. >
  1492. <Form layout="horizontal" id="demand-form">
  1493. <Spin spinning={this.state.loading}>
  1494. <div className="clearfix">
  1495. <FormItem
  1496. className="half-item"
  1497. {...formItemLayout}
  1498. label="项目名称"
  1499. >
  1500. <span>{this.state.commodityName}</span>
  1501. </FormItem>
  1502. <FormItem
  1503. className="half-item"
  1504. {...formItemLayout}
  1505. label="项目数量"
  1506. >
  1507. <span>{this.state.commodityQuantity}</span>
  1508. </FormItem>
  1509. <FormItem
  1510. className="half-item"
  1511. {...formItemLayout}
  1512. label="金额(万元)"
  1513. >
  1514. <span>{this.state.commodityPrice}</span>
  1515. </FormItem>
  1516. <FormItem
  1517. className="half-item"
  1518. {...formItemLayout}
  1519. label="主要项目"
  1520. >
  1521. <span>{getboutique(this.state.main)}</span>
  1522. </FormItem>
  1523. <div className="clearfix">
  1524. <FormItem
  1525. labelCol={{ span: 4 }}
  1526. wrapperCol={{ span: 16 }}
  1527. label="服务说明"
  1528. >
  1529. <span>{this.state.taskComment}</span>
  1530. </FormItem>
  1531. </div>
  1532. </div>
  1533. </Spin>
  1534. </Form>
  1535. </Modal>
  1536. <Modal
  1537. maskClosable={false}
  1538. visible={this.state.noVisible}
  1539. onOk={this.handleOk}
  1540. onCancel={this.noCancel}
  1541. width="400px"
  1542. title={"拒绝理由"}
  1543. footer=""
  1544. className="admin-desc-content"
  1545. confirmLoading={this.state.confirmLoading}
  1546. >
  1547. <Form layout="horizontal" id="demand-form">
  1548. <Spin spinning={this.state.loading}>
  1549. <div className="clearfix">
  1550. <FormItem
  1551. labelCol={{ span: 4 }}
  1552. wrapperCol={{ span: 16 }}
  1553. label="拒绝理由"
  1554. >
  1555. <Input
  1556. type="textarea"
  1557. placeholder="请输入拒绝理由"
  1558. rows={4}
  1559. value={this.state.reason}
  1560. onChange={e => {
  1561. this.setState({ reason: e.target.value });
  1562. }}
  1563. />
  1564. </FormItem>
  1565. </div>
  1566. <div className="clearfix">
  1567. <Button
  1568. className="cancel"
  1569. type="primary"
  1570. onClick={this.examOks}
  1571. style={{ marginLeft: "50px" }}
  1572. htmlType="submit"
  1573. loading={this.state.aloading}
  1574. >
  1575. 确定
  1576. </Button>
  1577. <Button
  1578. className="cancel"
  1579. type="ghost"
  1580. onClick={this.noCancel}
  1581. style={{ marginLeft: "50px" }}
  1582. >
  1583. 取消
  1584. </Button>
  1585. </div>
  1586. </Spin>
  1587. </Form>
  1588. </Modal>
  1589. <Modal
  1590. visible={this.state.rizhivisible}
  1591. className="admin-desc-content"
  1592. width="800px"
  1593. maskClosable={false}
  1594. title="订单日志"
  1595. footer={null}
  1596. onCancel={this.closeOrderLog}
  1597. >
  1598. <div className="patent-table">
  1599. <Spin spinning={this.state.loading}>
  1600. <Table
  1601. columns={this.state.columnsrizhi}
  1602. dataSource={this.state.dataSourcerizhi}
  1603. pagination={false}
  1604. />
  1605. </Spin>
  1606. </div>
  1607. </Modal>
  1608. </div>
  1609. </div>
  1610. );
  1611. }
  1612. })
  1613. );
  1614. export default IntentionCustomer;