projectAssignment.jsx 48 KB

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