projectAssignment.jsx 51 KB

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