projectAssignment.jsx 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642
  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. officialCost: thisdata.officialCost,
  534. costReduction: thisdata.costReduction,
  535. type: thisdata.type,
  536. });
  537. }
  538. }
  539. this.setState({
  540. dataSourceX: theArr
  541. });
  542. }.bind(this)
  543. }).always(
  544. function() {
  545. this.setState({
  546. loading: false
  547. });
  548. }.bind(this)
  549. );
  550. },
  551. rizhi() {
  552. console.log(this.state.orderNo);
  553. this.setState({
  554. loading: true
  555. });
  556. $.ajax({
  557. method: "get",
  558. dataType: "json",
  559. crossDomain: false,
  560. url: "/api/admin/newOrder/selectOrderLog",
  561. data: {
  562. orderNo: this.state.orderNo
  563. },
  564. success: function(data) {
  565. let theArr = [];
  566. let thisData = data.data;
  567. if (!thisData.length) {
  568. if (data.error && data.error.length) {
  569. message.warning(data.error[0].message);
  570. }
  571. thisData = {};
  572. } else {
  573. for (let i = 0; i < data.data.length; i++) {
  574. let thisdata = data.data[i];
  575. theArr.push({
  576. processName: thisdata.processName,
  577. adminName: thisdata.adminName,
  578. createDate: thisdata.createDate,
  579. remarks: thisdata.remarks
  580. });
  581. }
  582. }
  583. this.setState({
  584. dataSourcerizhi: theArr
  585. });
  586. }.bind(this)
  587. }).always(
  588. function() {
  589. this.setState({
  590. loading: false
  591. });
  592. }.bind(this)
  593. );
  594. },
  595. //查看订单日志
  596. getOrderLog() {
  597. this.setState({
  598. rizhivisible: true
  599. });
  600. this.rizhi();
  601. },
  602. closeOrderLog() {
  603. this.setState({
  604. rizhivisible: false
  605. });
  606. },
  607. supervisor(e, state) {
  608. //客户名称与服务名称自动补全
  609. $.ajax({
  610. method: "get",
  611. dataType: "json",
  612. crossDomain: false,
  613. url: "/api/admin/order/getBusinessProjectByName",
  614. data: {
  615. businessName: e
  616. },
  617. success: function(data) {
  618. let thedata = data.data;
  619. if (!thedata) {
  620. if (data.error && data.error.length) {
  621. message.warning(data.error[0].message);
  622. }
  623. thedata = {};
  624. }
  625. this.setState({
  626. states: state,
  627. customerArr: thedata
  628. });
  629. }.bind(this)
  630. }).always(
  631. function() {
  632. this.setState({
  633. loading: false
  634. });
  635. }.bind(this)
  636. );
  637. },
  638. //服务值改变时请求客户名称
  639. httpChange(e) {
  640. this.state.gid = "";
  641. if (e.length >= 1) {
  642. this.supervisor(e, false);
  643. }
  644. this.setState({
  645. commodityName: e
  646. });
  647. },
  648. //新建项目明细保存
  649. nextSubmit(e) {
  650. e.preventDefault();
  651. if (this.state.gid == undefined || !this.state.gid) {
  652. message.warning("服务名称不匹配!");
  653. return false;
  654. }
  655. if (!this.state.commodityPrice) {
  656. message.warning("请输入金额!");
  657. this.refs.commodityPrice.focus();
  658. return false;
  659. }
  660. if (!this.state.commodityQuantity) {
  661. message.warning("请输入商品数量!");
  662. this.refs.commodityQuantity.focus();
  663. return false;
  664. }
  665. if (!this.state.main) {
  666. message.warning("请选择是否为主要项目!");
  667. this.refs.commodityQuantity.focus();
  668. return false;
  669. }
  670. this.setState({
  671. loading: true
  672. });
  673. let api = this.state.addState
  674. ? "/api/admin/newOrder/addOrderTask"
  675. : "/api/bianji";
  676. $.ajax({
  677. method: "POST",
  678. dataType: "json",
  679. crossDomain: false,
  680. url: globalConfig.context + api,
  681. data: {
  682. commodityId: this.state.gid, //商品ID
  683. orderNo: this.state.RowData.orderNo, //订单编号
  684. commodityName: this.state.commodityName, //商品名称
  685. commodityQuantity: this.state.commodityQuantity, //商品数量
  686. commodityPrice: this.state.commodityPrice, //签单总价
  687. taskComment: this.state.taskComment, //服务说明
  688. main: this.state.main //是否为主要项目
  689. }
  690. }).done(
  691. function(data) {
  692. this.setState({
  693. loading: false
  694. });
  695. if (!data.error.length) {
  696. message.success("保存成功!");
  697. this.nextCancel();
  698. //this.loaduser(this.props.datauser);
  699. this.xiangmu(this.state.RowData.orderNo);
  700. this.loadData();
  701. } else {
  702. message.warning(data.error[0].message);
  703. }
  704. }.bind(this)
  705. );
  706. },
  707. //上级主管输入框失去焦点是判断客户是否存在
  708. selectAuto(value) {
  709. let kid = [];
  710. let fwList = this.state.customerArr;
  711. fwList.map(function(item) {
  712. if (value == item.bname) {
  713. kid = item;
  714. }
  715. });
  716. this.setState({
  717. commodityName: value,
  718. gid: kid.id,
  719. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  720. commodityFirstPayment:
  721. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  722. });
  723. console.log(this.state.commodityName, "jjjj", this.state.gid);
  724. },
  725. //点击添加项目明细
  726. addDetailed() {
  727. this.setState({
  728. gid: "",
  729. customerArr: [],
  730. commodityName: "",
  731. commodityQuantity: "",
  732. commodityId: "",
  733. taskComment: "",
  734. main: undefined,
  735. commodityPrice: "",
  736. addState: 1,
  737. addserviceVisible: true
  738. });
  739. },
  740. //修改项目详情
  741. tabRowSave(e) {
  742. e.preventDefault();
  743. if (!this.state.commodityPrice) {
  744. message.warning("金额不能为空!");
  745. return false;
  746. }
  747. if (!this.state.commodityQuantity) {
  748. message.warning("数量不能为空!");
  749. return false;
  750. }
  751. if (!this.state.main) {
  752. message.warning("请选择是否为主要项目!");
  753. this.refs.commodityQuantity.focus();
  754. return false;
  755. }
  756. console.log(this.state.gid);
  757. $.ajax({
  758. method: "POST",
  759. dataType: "json",
  760. crossDomain: false,
  761. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  762. data: {
  763. id: this.state.jid, //项目ID
  764. commodityId: this.state.gid, //商品ID
  765. orderNo: this.state.RowData.orderNo, //订单编号
  766. main: this.state.main, //是否为主要
  767. commodityPrice: this.state.commodityPrice, //金额
  768. commodityQuantity: this.state.commodityQuantity, //数量
  769. taskComment: this.state.taskComment //备注
  770. }
  771. }).done(
  772. function(data) {
  773. this.setState({
  774. loading: false
  775. });
  776. if (!data.error.length) {
  777. message.success("保存成功!");
  778. this.nextCancel();
  779. //this.loaduser(this.props.datauser);
  780. this.loadData();
  781. } else {
  782. message.warning(data.error[0].message);
  783. }
  784. }.bind(this)
  785. );
  786. },
  787. //节点列表
  788. jiedian(orderNos) {
  789. $.ajax({
  790. method: "get",
  791. dataType: "json",
  792. crossDomain: false,
  793. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  794. data: {
  795. orderNo: orderNos
  796. },
  797. success: function(data) {
  798. let theArr = [];
  799. let thisData = [];
  800. if (data.error.length || data.data.list == "") {
  801. if (data.error && data.error.length) {
  802. message.warning(data.error[0].message);
  803. }
  804. } else {
  805. for (let i = 0; i < data.data.length; i++) {
  806. thisData = data.data[i];
  807. theArr.push({
  808. key: i,
  809. dunSubject: thisData.dunSubject
  810. ? thisData.dunSubject.toString()
  811. : "", //催款科目
  812. id: thisData.id, //节点Id
  813. money: thisData.money, //催款金额
  814. dunStatus: thisData.dunStatus //催款状态
  815. });
  816. }
  817. this.setState({
  818. contactList: theArr
  819. });
  820. }
  821. }.bind(this)
  822. }).always(
  823. function() {
  824. this.setState({
  825. loading: false
  826. });
  827. }.bind(this)
  828. );
  829. },
  830. closeDesc(e, s) {
  831. this.state.showDesc = e;
  832. if (s) {
  833. this.loadData(this.state.page);
  834. }
  835. },
  836. closeAssign(e, s) {
  837. this.state.assignVisible = e;
  838. if (s) {
  839. this.loadData(this.state.page);
  840. this.xiangqing(this.state.orderNo);
  841. this.xiangmu(this.state.orderNo);
  842. this.jiedian(this.state.orderNo);
  843. }
  844. },
  845. search() {
  846. this.loadData();
  847. },
  848. reset() {
  849. this.state.nameSearch = "";
  850. this.state.customerName = "";
  851. this.state.releaseDate = [];
  852. this.state.orderNoSearch = "";
  853. this.state.departmenttSearch = undefined;
  854. this.state.distribution = undefined;
  855. this.loadData(this.state.page);
  856. },
  857. nextCancel() {
  858. this.setState({
  859. addserviceVisible: false,
  860. displayFees: "none",
  861. officialCost: "", //是否有官费
  862. costReduction: "", //是否有费减
  863. addnextVisible: false,
  864. });
  865. },
  866. //点击打卡项目详情
  867. tableRowClickX(record) {
  868. if (record.type == "1") {
  869. this.setState({
  870. displayFees: "block",
  871. costReduction: record.costReduction,
  872. officialCost: record.officialCost,
  873. });
  874. }
  875. this.setState({
  876. jid: record.id, //项目ID
  877. kid: record.commodityId, //商品ID
  878. commodityName: record.commodityName, //金额
  879. commodityPrice: record.commodityPrice, //金额
  880. commodityQuantity: record.commodityQuantity, //数量
  881. taskComment: record.taskComment, //备注
  882. main: record.main.toString(), //是否为主要
  883. addnextVisible: true,
  884. addState: 0
  885. });
  886. },
  887. searchSwitch() {
  888. this.setState({
  889. searchMore: !this.state.searchMore
  890. });
  891. },
  892. //关闭详情
  893. visitCancel() {
  894. this.setState({
  895. visible: false
  896. });
  897. // this.reset();
  898. },
  899. visitOk() {
  900. this.setState({
  901. visible: false
  902. });
  903. this.reset();
  904. },
  905. resets() {
  906. this.state.orderNo = "";
  907. this.state.customerName = "";
  908. this.state.departmenttSearch = undefined;
  909. this.state.releaseDate[0] = undefined;
  910. this.state.releaseDate[1] = undefined;
  911. },
  912. //部门
  913. departmentList() {
  914. this.setState({
  915. loading: true
  916. });
  917. $.ajax({
  918. method: "get",
  919. dataType: "json",
  920. crossDomain: false,
  921. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  922. data: {},
  923. success: function(data) {
  924. let thedata = data.data;
  925. let theArr = [];
  926. if (!thedata) {
  927. if (data.error && data.error.length) {
  928. message.warning(data.error[0].message);
  929. }
  930. thedata = {};
  931. } else {
  932. thedata.map(function(item, index) {
  933. theArr.push({
  934. key: index,
  935. name: item.name,
  936. id: item.id
  937. });
  938. });
  939. }
  940. this.setState({
  941. departmentArr: theArr
  942. });
  943. }.bind(this)
  944. }).always(
  945. function() {
  946. this.setState({
  947. loading: false
  948. });
  949. }.bind(this)
  950. );
  951. },
  952. render() {
  953. const rowSelection = {
  954. selectedRowKeys: this.state.selectedRowKeys,
  955. onChange: (selectedRowKeys, selectedRows) => {
  956. this.setState({
  957. selectedRows: selectedRows.slice(-1),
  958. selectedRowKeys: selectedRowKeys.slice(-1)
  959. });
  960. }
  961. };
  962. const formItemLayout = {
  963. labelCol: { span: 8 },
  964. wrapperCol: { span: 14 }
  965. };
  966. const dataSources = this.state.customerArr || [];
  967. const options = dataSources.map((group, index) => (
  968. <Select.Option key={index} value={group.bname}>
  969. {group.bname}
  970. </Select.Option>
  971. ));
  972. const FormItem = Form.Item;
  973. const { RangePicker } = DatePicker;
  974. let departmentArr = this.state.departmentArr || [];
  975. return (
  976. <div className="user-content">
  977. {this.state.resVisible ? (
  978. <ResolutionDetail
  979. cancel={this.resCancel}
  980. detail={this.state.resRecord}
  981. visible={this.state.resVisible}
  982. id={this.state.resRecord.orderNo}
  983. />
  984. ) : (
  985. ""
  986. )}
  987. <ShowModalDiv ShowModal={this.state.showModal} />
  988. <div className="content-title">
  989. <span>项目派单管理</span>
  990. </div>
  991. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  992. <TabPane tab="搜索" key="1">
  993. <div className="user-search">
  994. <Input
  995. placeholder="客户名称"
  996. value={this.state.customerName}
  997. style={{ marginLeft: 10 }}
  998. onChange={(e) => {
  999. this.setState({ customerName: e.target.value });
  1000. }}
  1001. />
  1002. <Input
  1003. placeholder="订单编号"
  1004. value={this.state.orderNoSearch}
  1005. onChange={(e) => {
  1006. this.setState({ orderNoSearch: e.target.value });
  1007. }}
  1008. />
  1009. <Select
  1010. placeholder="选择部门"
  1011. style={{ width: 150, marginRight: "10px" }}
  1012. value={this.state.departmenttSearch}
  1013. onChange={(e) => {
  1014. this.setState({ departmenttSearch: e });
  1015. }}
  1016. >
  1017. {departmentArr.map(function (item) {
  1018. return (
  1019. <Select.Option key={item.id}>{item.name}</Select.Option>
  1020. );
  1021. })}
  1022. </Select>
  1023. <Select
  1024. onChange={(e) => {
  1025. this.setState({ distribution: e });
  1026. }}
  1027. style={{ width: 160, marginRight: 5 }}
  1028. placeholder="分派状态"
  1029. value={this.state.distribution}
  1030. >
  1031. <Option value="0">未分配</Option>
  1032. <Option value="1">部分分配</Option>
  1033. <Option value="2">全部分配</Option>
  1034. </Select>
  1035. <Button type="primary" onClick={this.search}>
  1036. 搜索
  1037. </Button>
  1038. <Button onClick={this.reset}>重置</Button>
  1039. <span>
  1040. 更多搜索
  1041. <Switch
  1042. defaultChecked={false}
  1043. onChange={this.searchSwitch.bind(this)}
  1044. />
  1045. </span>
  1046. <div
  1047. className="search-more"
  1048. style={this.state.searchMore ? { display: "none" } : {}}
  1049. >
  1050. <span>订单时间 :</span>
  1051. <RangePicker
  1052. value={[
  1053. this.state.releaseDate[0]
  1054. ? moment(this.state.releaseDate[0])
  1055. : null,
  1056. this.state.releaseDate[1]
  1057. ? moment(this.state.releaseDate[1])
  1058. : null,
  1059. ]}
  1060. onChange={(data, dataString) => {
  1061. this.setState({ releaseDate: dataString });
  1062. }}
  1063. />
  1064. </div>
  1065. </div>
  1066. </TabPane>
  1067. </Tabs>
  1068. <div className="patent-table">
  1069. <Spin spinning={this.state.loading}>
  1070. <Table
  1071. columns={this.state.columns}
  1072. dataSource={this.state.dataSource}
  1073. pagination={this.state.pagination}
  1074. onRowClick={this.tableRowClick.bind(this)}
  1075. bordered
  1076. size="small"
  1077. />
  1078. </Spin>
  1079. </div>
  1080. <Assign
  1081. title="项目"
  1082. selApi="/api/admin/orderProject/projectDistribution"
  1083. data={this.state.assignData}
  1084. showDesc={this.state.assignVisible}
  1085. closeDesc={this.closeAssign.bind(this)}
  1086. fenpaiData={8}
  1087. specially={1}
  1088. roleName={"咨询师经理"}
  1089. requestMethod={"post"}
  1090. reset={this.reset}
  1091. />
  1092. <Modal
  1093. className="customeDetails"
  1094. footer=""
  1095. title="订单详情"
  1096. width="900px"
  1097. visible={this.state.visible}
  1098. onOk={this.visitOk}
  1099. onCancel={this.visitCancel}
  1100. >
  1101. <Form
  1102. layout="horizontal"
  1103. onSubmit={this.handleSubmit}
  1104. id="demand-form"
  1105. style={{ paddingBottom: "40px" }}
  1106. >
  1107. <Spin spinning={this.state.loading}>
  1108. <div className="clearfix">
  1109. <FormItem
  1110. className="half-item"
  1111. {...formItemLayout}
  1112. label="订单编号"
  1113. >
  1114. <span>{this.state.orderNo}</span>
  1115. </FormItem>
  1116. <FormItem
  1117. className="half-item"
  1118. {...formItemLayout}
  1119. label="合同编号"
  1120. >
  1121. <span>{this.state.contractNo}</span>
  1122. </FormItem>
  1123. <FormItem
  1124. className="half-item"
  1125. {...formItemLayout}
  1126. label="客户名称"
  1127. >
  1128. <span>{this.state.userName}</span>
  1129. </FormItem>
  1130. <FormItem
  1131. className="half-item"
  1132. {...formItemLayout}
  1133. label="合同签订时间"
  1134. >
  1135. <span>{this.state.signDate}</span>
  1136. </FormItem>
  1137. <FormItem
  1138. className="half-item"
  1139. {...formItemLayout}
  1140. label="流程状态"
  1141. >
  1142. <span>{getProcessStatus(this.state.processStatus)}</span>
  1143. </FormItem>
  1144. <FormItem
  1145. className="half-item"
  1146. {...formItemLayout}
  1147. label="结算状态"
  1148. >
  1149. <span>
  1150. {getLiquidationStatus(this.state.liquidationStatus)}
  1151. </span>
  1152. </FormItem>
  1153. <FormItem
  1154. className="half-item"
  1155. {...formItemLayout}
  1156. label="企业联系人"
  1157. >
  1158. <span>{this.state.contacts}</span>
  1159. </FormItem>
  1160. <FormItem
  1161. className="half-item"
  1162. {...formItemLayout}
  1163. label="联系人电话"
  1164. >
  1165. <span>{this.state.contactMobile}</span>
  1166. </FormItem>
  1167. <FormItem
  1168. className="half-item"
  1169. {...formItemLayout}
  1170. label="企业法人"
  1171. >
  1172. <span>{this.state.legalPerson}</span>
  1173. </FormItem>
  1174. <FormItem
  1175. className="half-item"
  1176. {...formItemLayout}
  1177. label="法人电话"
  1178. >
  1179. <span>{this.state.legalPersonTel}</span>
  1180. </FormItem>
  1181. <FormItem
  1182. className="half-item"
  1183. {...formItemLayout}
  1184. label="签单金额(万元)"
  1185. >
  1186. <span>{this.state.totalAmount}</span>
  1187. </FormItem>
  1188. <FormItem
  1189. className="half-item"
  1190. {...formItemLayout}
  1191. label="首付金额(万元)"
  1192. >
  1193. <span>{this.state.firstAmount}</span>
  1194. </FormItem>
  1195. <FormItem
  1196. className="half-item"
  1197. {...formItemLayout}
  1198. label="特批立项"
  1199. >
  1200. <span>{getApprovedState(this.state.approval)}</span>
  1201. </FormItem>
  1202. <FormItem
  1203. className="half-item"
  1204. {...formItemLayout}
  1205. label="已收款项(万元)"
  1206. >
  1207. <span>{this.state.settlementAmount}</span>
  1208. </FormItem>
  1209. <div className="clearfix">
  1210. <FormItem
  1211. style={{ height: "auto" }}
  1212. labelCol={{ span: 4 }}
  1213. wrapperCol={{ span: 16 }}
  1214. label="订单留言"
  1215. >
  1216. <p style={{ width: 500, wordWrap: "break-word" }}>
  1217. {this.state.orderRemarks}
  1218. </p>
  1219. </FormItem>
  1220. <Button
  1221. style={{
  1222. float: "right",
  1223. marginRight: "140px",
  1224. marginTop: "20px",
  1225. }}
  1226. onClick={this.getOrderLog}
  1227. >
  1228. 查看订单 日志
  1229. </Button>
  1230. </div>
  1231. <div className="clearfix">
  1232. <FormItem
  1233. className="half-item"
  1234. {...formItemLayout}
  1235. label="订单负责人"
  1236. >
  1237. <span>{this.state.salesmanName}</span>
  1238. </FormItem>
  1239. <FormItem
  1240. className="half-item"
  1241. {...formItemLayout}
  1242. label="订单负责人电话"
  1243. >
  1244. <span>{this.state.salesmanMobile}</span>
  1245. </FormItem>
  1246. <FormItem
  1247. className="half-item"
  1248. {...formItemLayout}
  1249. label="订单部门"
  1250. >
  1251. <span>{this.state.depName}</span>
  1252. </FormItem>
  1253. </div>
  1254. <div className="clearfix">
  1255. <FormItem
  1256. className="half-item"
  1257. {...formItemLayout}
  1258. label="当前财务负责人"
  1259. >
  1260. <span>{this.state.nowFinance}</span>
  1261. </FormItem>
  1262. <FormItem
  1263. className="half-item"
  1264. {...formItemLayout}
  1265. label="当前财务负责人电话"
  1266. >
  1267. <span>{this.state.nowFinanceMobile}</span>
  1268. </FormItem>
  1269. </div>
  1270. <div className="clearfix">
  1271. <FormItem
  1272. className="half-item"
  1273. {...formItemLayout}
  1274. style={{ opacity: ".5" }}
  1275. label="原订单负责人"
  1276. >
  1277. <span>{this.state.oldSalesmanName}</span>
  1278. </FormItem>
  1279. <FormItem
  1280. className="half-item"
  1281. {...formItemLayout}
  1282. style={{ opacity: ".5" }}
  1283. label="原订单负责人电话"
  1284. >
  1285. <span>{this.state.oldSalesmanMobile}</span>
  1286. </FormItem>
  1287. </div>
  1288. <div className="clearfix">
  1289. <FormItem
  1290. className="half-item"
  1291. {...formItemLayout}
  1292. style={{ opacity: ".5" }}
  1293. label="实际财务操作人"
  1294. >
  1295. <span>{this.state.financeName}</span>
  1296. </FormItem>
  1297. <FormItem
  1298. className="half-item"
  1299. {...formItemLayout}
  1300. style={{ opacity: ".5" }}
  1301. label="实际财务操作人电话"
  1302. >
  1303. <span>{this.state.financeMobile}</span>
  1304. </FormItem>
  1305. </div>
  1306. {
  1307. <div>
  1308. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1309. 项目业务
  1310. </span>
  1311. {
  1312. <Button
  1313. type="primary"
  1314. onClick={this.addDetailed}
  1315. style={{ float: "right", marginRight: "50px" }}
  1316. >
  1317. 添加项目明细
  1318. </Button>
  1319. }
  1320. </div>
  1321. }
  1322. <div className="patent-table">
  1323. <Spin spinning={this.state.loading}>
  1324. <Table
  1325. columns={this.state.columnsX}
  1326. dataSource={this.state.dataSourceX}
  1327. pagination={this.state.paginations}
  1328. onRowClick={this.tableRowClickX}
  1329. bordered
  1330. size={"small"}
  1331. />
  1332. </Spin>
  1333. </div>
  1334. </div>
  1335. </Spin>
  1336. </Form>
  1337. </Modal>
  1338. <Modal
  1339. maskClosable={false}
  1340. visible={this.state.addnextVisible}
  1341. onOk={this.nextCancel}
  1342. onCancel={this.nextCancel}
  1343. width="800px"
  1344. title="项目任务详情"
  1345. footer=""
  1346. className="admin-desc-content"
  1347. >
  1348. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1349. <Spin spinning={this.state.loading}>
  1350. <div className="clearfix">
  1351. <FormItem
  1352. className="half-item"
  1353. {...formItemLayout}
  1354. label="项目名称"
  1355. >
  1356. <span>{this.state.commodityName}</span>
  1357. </FormItem>
  1358. <FormItem
  1359. className="half-item"
  1360. {...formItemLayout}
  1361. label="项目数量"
  1362. >
  1363. <span>{this.state.commodityQuantity}</span>
  1364. </FormItem>
  1365. <FormItem
  1366. className="half-item"
  1367. {...formItemLayout}
  1368. label="官费"
  1369. style={{ display: this.state.displayFees }}
  1370. >
  1371. <span>
  1372. {this.state.officialCost == 0 ? "无官费" : "有官费"}
  1373. </span>
  1374. </FormItem>
  1375. <FormItem
  1376. className="half-item"
  1377. {...formItemLayout}
  1378. label="费减"
  1379. style={{ display: this.state.displayFees }}
  1380. >
  1381. <span>
  1382. {this.state.costReduction == 0 ? "无费减" : "有费减"}
  1383. </span>
  1384. </FormItem>
  1385. <FormItem
  1386. className="half-item"
  1387. {...formItemLayout}
  1388. label="金额(万元)"
  1389. >
  1390. <span>{this.state.commodityPrice}</span>
  1391. </FormItem>
  1392. <FormItem
  1393. className="half-item"
  1394. {...formItemLayout}
  1395. label="主要项目"
  1396. >
  1397. <span>{getboutique(this.state.main)}</span>
  1398. </FormItem>
  1399. <div className="clearfix">
  1400. <FormItem
  1401. labelCol={{ span: 4 }}
  1402. wrapperCol={{ span: 16 }}
  1403. label="服务说明"
  1404. >
  1405. <span>{this.state.taskComment}</span>
  1406. </FormItem>
  1407. </div>
  1408. </div>
  1409. </Spin>
  1410. </Form>
  1411. </Modal>
  1412. <Modal
  1413. maskClosable={false}
  1414. visible={this.state.addserviceVisible}
  1415. onOk={this.nextCancel}
  1416. onCancel={this.nextCancel}
  1417. width="800px"
  1418. title={"添加项目明细"}
  1419. footer=""
  1420. className="admin-desc-content"
  1421. >
  1422. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1423. <Spin spinning={this.state.loading}>
  1424. <div className="clearfix">
  1425. <FormItem
  1426. className="half-item"
  1427. {...formItemLayout}
  1428. label="服务名称"
  1429. >
  1430. <AutoComplete
  1431. className="certain-category-search"
  1432. dropdownClassName="certain-category-search-dropdown"
  1433. dropdownMatchSelectWidth={false}
  1434. dropdownStyle={{ width: 200 }}
  1435. style={{ width: "200px" }}
  1436. placeholder="输入服务名称"
  1437. dataSource={options}
  1438. value={this.state.commodityName}
  1439. onChange={this.httpChange}
  1440. filterOption={true}
  1441. onSelect={this.selectAuto}
  1442. >
  1443. <Input />
  1444. </AutoComplete>
  1445. <span className="mandatory">*</span>
  1446. </FormItem>
  1447. <FormItem
  1448. className="half-item"
  1449. {...formItemLayout}
  1450. label="服务数量"
  1451. >
  1452. <Input
  1453. placeholder="请输入服务数量"
  1454. style={{ width: "200px" }}
  1455. value={this.state.commodityQuantity}
  1456. onChange={(e) => {
  1457. this.setState({ commodityQuantity: e.target.value });
  1458. }}
  1459. ref="commodityQuantity"
  1460. />
  1461. <span className="mandatory">*</span>
  1462. </FormItem>
  1463. <FormItem
  1464. className="half-item"
  1465. {...formItemLayout}
  1466. label="实签价格(万元)"
  1467. >
  1468. <Input
  1469. placeholder="请输入实签价格"
  1470. style={{ width: "200px" }}
  1471. value={this.state.commodityPrice}
  1472. onChange={(e) => {
  1473. this.setState({ commodityPrice: e.target.value });
  1474. }}
  1475. ref="commodityPrice"
  1476. />
  1477. <span className="mandatory">*</span>
  1478. </FormItem>
  1479. <FormItem
  1480. className="half-item"
  1481. {...formItemLayout}
  1482. label="主要业务"
  1483. >
  1484. <Select
  1485. placeholder="选择是否为主要业务"
  1486. style={{ width: "200px" }}
  1487. value={this.state.main}
  1488. onChange={(e) => {
  1489. this.setState({ main: e });
  1490. }}
  1491. >
  1492. {boutique.map(function (item) {
  1493. return (
  1494. <Select.Option key={item.value}>
  1495. {item.key}
  1496. </Select.Option>
  1497. );
  1498. })}
  1499. </Select>
  1500. <span className="mandatory">*</span>
  1501. </FormItem>
  1502. <div className="clearfix">
  1503. <FormItem
  1504. labelCol={{ span: 4 }}
  1505. wrapperCol={{ span: 16 }}
  1506. label="服务说明"
  1507. >
  1508. <Input
  1509. type="textarea"
  1510. placeholder="请输入服务说明"
  1511. value={this.state.taskComment}
  1512. onChange={(e) => {
  1513. this.setState({ taskComment: e.target.value });
  1514. }}
  1515. />
  1516. </FormItem>
  1517. </div>
  1518. <FormItem
  1519. wrapperCol={{ span: 12, offset: 4 }}
  1520. className="half-middle"
  1521. >
  1522. <Button
  1523. className="submitSave"
  1524. type="primary"
  1525. htmlType="submit"
  1526. >
  1527. 保存
  1528. </Button>
  1529. <Button
  1530. className="submitSave"
  1531. type="ghost"
  1532. onClick={this.nextCancel}
  1533. >
  1534. 取消
  1535. </Button>
  1536. </FormItem>
  1537. </div>
  1538. </Spin>
  1539. </Form>
  1540. </Modal>
  1541. <Modal
  1542. maskClosable={false}
  1543. visible={this.state.noVisible}
  1544. onOk={this.noCancel}
  1545. onCancel={this.noCancel}
  1546. width="400px"
  1547. title={"驳回理由"}
  1548. footer=""
  1549. className="admin-desc-content"
  1550. >
  1551. <Form layout="horizontal" id="demand-form">
  1552. <Spin spinning={this.state.loading}>
  1553. <div className="clearfix">
  1554. <FormItem
  1555. labelCol={{ span: 4 }}
  1556. wrapperCol={{ span: 16 }}
  1557. label="拒绝理由"
  1558. >
  1559. <Input
  1560. type="textarea"
  1561. placeholder="请输入拒绝理由"
  1562. rows={4}
  1563. value={this.state.reason}
  1564. onChange={(e) => {
  1565. this.setState({ reason: e.target.value });
  1566. }}
  1567. />
  1568. </FormItem>
  1569. </div>
  1570. <div className="clearfix">
  1571. <Button
  1572. className="cancel"
  1573. type="primary"
  1574. onClick={this.examOks}
  1575. style={{ marginLeft: "50px" }}
  1576. htmlType="submit"
  1577. >
  1578. 确定
  1579. </Button>
  1580. <Button
  1581. className="cancel"
  1582. type="ghost"
  1583. onClick={this.noCancel}
  1584. style={{ marginLeft: "50px" }}
  1585. >
  1586. 取消
  1587. </Button>
  1588. </div>
  1589. </Spin>
  1590. </Form>
  1591. </Modal>
  1592. {/* <Modal
  1593. visible={this.state.rizhivisible}
  1594. className="admin-desc-content"
  1595. width="800px"
  1596. maskClosable={false}
  1597. title="订单日志"
  1598. footer={null}
  1599. onCancel={this.closeOrderLog}
  1600. >
  1601. <div className="patent-table">
  1602. <Spin spinning={this.state.loading}>
  1603. <Table
  1604. columns={this.state.columnsrizhi}
  1605. dataSource={this.state.dataSourcerizhi}
  1606. pagination={false}
  1607. />
  1608. </Spin>
  1609. </div>
  1610. </Modal> */}
  1611. <OrderRiZi
  1612. dataSourcerizhi={this.state.dataSourcerizhi}
  1613. closeOrderLog={this.closeOrderLog}
  1614. visible={this.state.rizhivisible}
  1615. loading={this.state.loading}
  1616. />
  1617. </div>
  1618. );
  1619. }
  1620. });
  1621. export default PaiDan;