projectAssignment.jsx 52 KB

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