projectAssignment.jsx 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  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 (!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. }
  900. this.setState({
  901. jid: record.id, //项目ID
  902. kid: record.commodityId, //商品ID
  903. commodityName: record.commodityName, //金额
  904. commodityPrice: record.commodityPrice, //金额
  905. commodityQuantity: record.commodityQuantity, //数量
  906. taskComment: record.taskComment, //备注
  907. main: record.main.toString(), //是否为主要
  908. addnextVisible: true,
  909. addState: 0
  910. });
  911. },
  912. searchSwitch() {
  913. this.setState({
  914. searchMore: !this.state.searchMore
  915. });
  916. },
  917. //关闭详情
  918. visitCancel() {
  919. this.setState({
  920. visible: false
  921. });
  922. this.loadData(this.state.page);
  923. },
  924. visitOk() {
  925. this.setState({
  926. visible: false
  927. });
  928. this.loadData(this.state.page);
  929. },
  930. resets() {
  931. this.state.orderNo = "";
  932. this.state.customerName = "";
  933. this.state.departmenttSearch = undefined;
  934. this.state.releaseDate[0] = undefined;
  935. this.state.releaseDate[1] = undefined;
  936. },
  937. //部门
  938. departmentList() {
  939. this.setState({
  940. loading: true
  941. });
  942. $.ajax({
  943. method: "get",
  944. dataType: "json",
  945. crossDomain: false,
  946. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  947. data: {},
  948. success: function(data) {
  949. let thedata = data.data;
  950. let theArr = [];
  951. if (!thedata) {
  952. if (data.error && data.error.length) {
  953. message.warning(data.error[0].message);
  954. }
  955. thedata = {};
  956. } else {
  957. thedata.map(function(item, index) {
  958. theArr.push({
  959. key: index,
  960. name: item.name,
  961. id: item.id
  962. });
  963. });
  964. }
  965. this.setState({
  966. departmentArr: theArr
  967. });
  968. }.bind(this)
  969. }).always(
  970. function() {
  971. this.setState({
  972. loading: false
  973. });
  974. }.bind(this)
  975. );
  976. },
  977. render() {
  978. const rowSelection = {
  979. selectedRowKeys: this.state.selectedRowKeys,
  980. onChange: (selectedRowKeys, selectedRows) => {
  981. this.setState({
  982. selectedRows: selectedRows.slice(-1),
  983. selectedRowKeys: selectedRowKeys.slice(-1)
  984. });
  985. }
  986. };
  987. const formItemLayout = {
  988. labelCol: { span: 8 },
  989. wrapperCol: { span: 14 }
  990. };
  991. const dataSources = this.state.customerArr || [];
  992. const options = dataSources.map((group, index) => (
  993. <Select.Option key={index} value={group.bname}>
  994. {group.bname}
  995. </Select.Option>
  996. ));
  997. const FormItem = Form.Item;
  998. const { RangePicker } = DatePicker;
  999. let departmentArr = this.state.departmentArr || [];
  1000. return (
  1001. <div className="user-content">
  1002. {this.state.resVisible ? (
  1003. <ResolutionDetail
  1004. cancel={this.resCancel}
  1005. detail={this.state.resRecord}
  1006. visible={this.state.resVisible}
  1007. id={this.state.resRecord.orderNo}
  1008. />
  1009. ) : (
  1010. ""
  1011. )}
  1012. <ShowModalDiv ShowModal={this.state.showModal} />
  1013. <div className="content-title">
  1014. <span>项目派单管理</span>
  1015. </div>
  1016. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  1017. <TabPane tab="搜索" key="1">
  1018. <div className="user-search">
  1019. <Input
  1020. placeholder="客户名称"
  1021. value={this.state.customerName}
  1022. style={{ marginLeft: 10 }}
  1023. onChange={(e) => {
  1024. this.setState({ customerName: e.target.value });
  1025. }}
  1026. />
  1027. <Input
  1028. placeholder="订单编号"
  1029. value={this.state.orderNoSearch}
  1030. onChange={(e) => {
  1031. this.setState({ orderNoSearch: e.target.value });
  1032. }}
  1033. />
  1034. <Select
  1035. placeholder="选择部门"
  1036. style={{ width: 150, marginRight: "10px" }}
  1037. value={this.state.departmenttSearch}
  1038. onChange={(e) => {
  1039. this.setState({ departmenttSearch: e });
  1040. }}
  1041. >
  1042. {departmentArr.map(function (item) {
  1043. return (
  1044. <Select.Option key={item.id}>{item.name}</Select.Option>
  1045. );
  1046. })}
  1047. </Select>
  1048. <Select
  1049. onChange={(e) => {
  1050. this.setState({ distribution: e });
  1051. }}
  1052. style={{ width: 160, marginRight: 5 }}
  1053. placeholder="分派状态"
  1054. value={this.state.distribution}
  1055. >
  1056. <Option value="0">未分配</Option>
  1057. <Option value="1">部分分配</Option>
  1058. <Option value="2">全部分配</Option>
  1059. </Select>
  1060. <Button type="primary" onClick={this.search}>
  1061. 搜索
  1062. </Button>
  1063. <Button onClick={this.reset}>重置</Button>
  1064. <span>
  1065. 更多搜索
  1066. <Switch
  1067. defaultChecked={false}
  1068. onChange={this.searchSwitch.bind(this)}
  1069. />
  1070. </span>
  1071. <div
  1072. className="search-more"
  1073. style={this.state.searchMore ? { display: "none" } : {}}
  1074. >
  1075. <span>订单时间 :</span>
  1076. <RangePicker
  1077. value={[
  1078. this.state.releaseDate[0]
  1079. ? moment(this.state.releaseDate[0])
  1080. : null,
  1081. this.state.releaseDate[1]
  1082. ? moment(this.state.releaseDate[1])
  1083. : null,
  1084. ]}
  1085. onChange={(data, dataString) => {
  1086. this.setState({ releaseDate: dataString });
  1087. }}
  1088. />
  1089. </div>
  1090. </div>
  1091. </TabPane>
  1092. </Tabs>
  1093. <div className="patent-table">
  1094. <Spin spinning={this.state.loading}>
  1095. <Table
  1096. columns={this.state.columns}
  1097. dataSource={this.state.dataSource}
  1098. pagination={this.state.pagination}
  1099. onRowClick={this.tableRowClick.bind(this)}
  1100. bordered
  1101. size="small"
  1102. />
  1103. </Spin>
  1104. </div>
  1105. <Assign
  1106. title="项目"
  1107. selApi="/api/admin/orderProject/projectDistribution"
  1108. data={this.state.assignData}
  1109. showDesc={this.state.assignVisible}
  1110. closeDesc={this.closeAssign.bind(this)}
  1111. fenpaiData={8}
  1112. specially={1}
  1113. roleName={"咨询师经理"}
  1114. requestMethod={"post"}
  1115. reset={this.reset}
  1116. />
  1117. {this.state.visible ? <Modal
  1118. className="customeDetails"
  1119. footer=""
  1120. title="订单详情"
  1121. width="900px"
  1122. visible={this.state.visible}
  1123. onOk={this.visitOk}
  1124. onCancel={this.visitCancel}
  1125. >
  1126. <Form
  1127. layout="horizontal"
  1128. onSubmit={this.handleSubmit}
  1129. id="demand-form"
  1130. style={{ paddingBottom: "40px" }}
  1131. >
  1132. <Spin spinning={this.state.loading}>
  1133. <div className="clearfix">
  1134. <FormItem
  1135. className="half-item"
  1136. {...formItemLayout}
  1137. label="订单编号"
  1138. >
  1139. <span>{this.state.orderNo}</span>
  1140. </FormItem>
  1141. <FormItem
  1142. className="half-item"
  1143. {...formItemLayout}
  1144. label="合同编号"
  1145. >
  1146. <span>{this.state.contractNo}</span>
  1147. </FormItem>
  1148. <FormItem
  1149. className="half-item"
  1150. {...formItemLayout}
  1151. label="客户名称"
  1152. >
  1153. <span>{this.state.userName}</span>
  1154. </FormItem>
  1155. <FormItem
  1156. className="half-item"
  1157. {...formItemLayout}
  1158. label="合同签订时间"
  1159. >
  1160. <span>{this.state.signDate}</span>
  1161. </FormItem>
  1162. <FormItem
  1163. className="half-item"
  1164. {...formItemLayout}
  1165. label="流程状态"
  1166. >
  1167. <span>{getProcessStatus(this.state.processStatus)}</span>
  1168. </FormItem>
  1169. <FormItem
  1170. className="half-item"
  1171. {...formItemLayout}
  1172. label="结算状态"
  1173. >
  1174. <span>
  1175. {getLiquidationStatus(this.state.liquidationStatus)}
  1176. </span>
  1177. </FormItem>
  1178. <FormItem
  1179. className="half-item"
  1180. {...formItemLayout}
  1181. label="企业联系人"
  1182. >
  1183. <span>{this.state.contacts}</span>
  1184. </FormItem>
  1185. <FormItem
  1186. className="half-item"
  1187. {...formItemLayout}
  1188. label="联系人电话"
  1189. >
  1190. <span>{this.state.contactMobile}</span>
  1191. </FormItem>
  1192. <FormItem
  1193. className="half-item"
  1194. {...formItemLayout}
  1195. label="企业法人"
  1196. >
  1197. <span>{this.state.legalPerson}</span>
  1198. </FormItem>
  1199. <FormItem
  1200. className="half-item"
  1201. {...formItemLayout}
  1202. label="法人电话"
  1203. >
  1204. <span>{this.state.legalPersonTel}</span>
  1205. </FormItem>
  1206. <FormItem
  1207. className="half-item"
  1208. {...formItemLayout}
  1209. label="签单金额(万元)"
  1210. >
  1211. <span>{this.state.totalAmount}</span>
  1212. </FormItem>
  1213. <FormItem
  1214. className="half-item"
  1215. {...formItemLayout}
  1216. label="首付金额(万元)"
  1217. >
  1218. <span>{this.state.firstAmount}</span>
  1219. </FormItem>
  1220. <FormItem
  1221. className="half-item"
  1222. {...formItemLayout}
  1223. label="特批立项"
  1224. >
  1225. <span>{getApprovedState(this.state.approval)}</span>
  1226. </FormItem>
  1227. <FormItem
  1228. className="half-item"
  1229. {...formItemLayout}
  1230. label="已收款项(万元)"
  1231. >
  1232. <span>{this.state.settlementAmount}</span>
  1233. </FormItem>
  1234. <div className="clearfix">
  1235. <FormItem
  1236. style={{ height: "auto" }}
  1237. labelCol={{ span: 4 }}
  1238. wrapperCol={{ span: 16 }}
  1239. label="订单留言"
  1240. >
  1241. <p style={{ width: 500, wordWrap: "break-word" }}>
  1242. {this.state.orderRemarks}
  1243. </p>
  1244. </FormItem>
  1245. <Button
  1246. style={{
  1247. float: "right",
  1248. marginRight: "140px",
  1249. marginTop: "20px",
  1250. }}
  1251. onClick={this.getOrderLog}
  1252. >
  1253. 查看订单 日志
  1254. </Button>
  1255. </div>
  1256. <div className="clearfix">
  1257. <FormItem
  1258. className="half-item"
  1259. {...formItemLayout}
  1260. label="订单负责人"
  1261. >
  1262. <span>{this.state.salesmanName}</span>
  1263. </FormItem>
  1264. <FormItem
  1265. className="half-item"
  1266. {...formItemLayout}
  1267. label="订单负责人电话"
  1268. >
  1269. <span>{this.state.salesmanMobile}</span>
  1270. </FormItem>
  1271. <FormItem
  1272. className="half-item"
  1273. {...formItemLayout}
  1274. label="订单部门"
  1275. >
  1276. <span>{this.state.depName}</span>
  1277. </FormItem>
  1278. </div>
  1279. <div className="clearfix">
  1280. <FormItem
  1281. className="half-item"
  1282. {...formItemLayout}
  1283. label="当前财务负责人"
  1284. >
  1285. <span>{this.state.nowFinance}</span>
  1286. </FormItem>
  1287. <FormItem
  1288. className="half-item"
  1289. {...formItemLayout}
  1290. label="当前财务负责人电话"
  1291. >
  1292. <span>{this.state.nowFinanceMobile}</span>
  1293. </FormItem>
  1294. </div>
  1295. <div className="clearfix">
  1296. <FormItem
  1297. className="half-item"
  1298. {...formItemLayout}
  1299. style={{ opacity: ".5" }}
  1300. label="原订单负责人"
  1301. >
  1302. <span>{this.state.oldSalesmanName}</span>
  1303. </FormItem>
  1304. <FormItem
  1305. className="half-item"
  1306. {...formItemLayout}
  1307. style={{ opacity: ".5" }}
  1308. label="原订单负责人电话"
  1309. >
  1310. <span>{this.state.oldSalesmanMobile}</span>
  1311. </FormItem>
  1312. </div>
  1313. <div className="clearfix">
  1314. <FormItem
  1315. className="half-item"
  1316. {...formItemLayout}
  1317. style={{ opacity: ".5" }}
  1318. label="实际财务操作人"
  1319. >
  1320. <span>{this.state.financeName}</span>
  1321. </FormItem>
  1322. <FormItem
  1323. className="half-item"
  1324. {...formItemLayout}
  1325. style={{ opacity: ".5" }}
  1326. label="实际财务操作人电话"
  1327. >
  1328. <span>{this.state.financeMobile}</span>
  1329. </FormItem>
  1330. </div>
  1331. {
  1332. <div>
  1333. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1334. 项目业务
  1335. </span>
  1336. {
  1337. <Button
  1338. type="primary"
  1339. onClick={this.addDetailed}
  1340. style={{ float: "right", marginRight: "50px" }}
  1341. >
  1342. 添加项目明细
  1343. </Button>
  1344. }
  1345. </div>
  1346. }
  1347. <div className="patent-table">
  1348. <Spin spinning={this.state.loading}>
  1349. <Table
  1350. columns={this.state.columnsX}
  1351. dataSource={this.state.dataSourceX}
  1352. pagination={this.state.paginations}
  1353. onRowClick={this.tableRowClickX}
  1354. bordered
  1355. size={"small"}
  1356. />
  1357. </Spin>
  1358. </div>
  1359. </div>
  1360. </Spin>
  1361. </Form>
  1362. </Modal> : <div/>}
  1363. {this.state.addnextVisible ? <Modal
  1364. maskClosable={false}
  1365. visible={this.state.addnextVisible}
  1366. onOk={this.nextCancel}
  1367. onCancel={this.nextCancel}
  1368. width="800px"
  1369. title="项目任务详情"
  1370. footer=""
  1371. className="admin-desc-content"
  1372. >
  1373. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1374. <Spin spinning={this.state.loading}>
  1375. <div className="clearfix">
  1376. <FormItem
  1377. className="half-item"
  1378. {...formItemLayout}
  1379. label="项目名称"
  1380. >
  1381. <span>{this.state.commodityName}</span>
  1382. </FormItem>
  1383. <FormItem
  1384. className="half-item"
  1385. {...formItemLayout}
  1386. label="项目数量"
  1387. >
  1388. <span>{this.state.commodityQuantity}</span>
  1389. </FormItem>
  1390. <FormItem
  1391. className="half-item"
  1392. {...formItemLayout}
  1393. label="官费"
  1394. style={{ display: this.state.displayFees }}
  1395. >
  1396. <span>
  1397. {this.state.officialCost == 0 ? "无官费" : "有官费"}
  1398. </span>
  1399. </FormItem>
  1400. <FormItem
  1401. className="half-item"
  1402. {...formItemLayout}
  1403. label="费减"
  1404. style={{ display: this.state.displayFees }}
  1405. >
  1406. <span>
  1407. {this.state.costReduction == 0 ? "无费减" : "有费减"}
  1408. </span>
  1409. </FormItem>
  1410. <FormItem
  1411. className="half-item"
  1412. {...formItemLayout}
  1413. label="金额(万元)"
  1414. >
  1415. <span>{this.state.commodityPrice}</span>
  1416. </FormItem>
  1417. <FormItem
  1418. className="half-item"
  1419. {...formItemLayout}
  1420. label="主要项目"
  1421. >
  1422. <span>{getboutique(this.state.main)}</span>
  1423. </FormItem>
  1424. <div className="clearfix">
  1425. <FormItem
  1426. labelCol={{ span: 4 }}
  1427. wrapperCol={{ span: 16 }}
  1428. label="服务说明"
  1429. >
  1430. <span>{this.state.taskComment}</span>
  1431. </FormItem>
  1432. </div>
  1433. </div>
  1434. </Spin>
  1435. </Form>
  1436. </Modal> : <div/>}
  1437. {this.state.addserviceVisible ? <Modal
  1438. maskClosable={false}
  1439. visible={this.state.addserviceVisible}
  1440. onOk={this.nextCancel}
  1441. onCancel={this.nextCancel}
  1442. width="800px"
  1443. title={"添加项目明细"}
  1444. footer=""
  1445. className="admin-desc-content"
  1446. >
  1447. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1448. <Spin spinning={this.state.loading}>
  1449. <div className="clearfix">
  1450. <FormItem
  1451. className="half-item"
  1452. {...formItemLayout}
  1453. label="服务名称"
  1454. >
  1455. <AutoComplete
  1456. className="certain-category-search"
  1457. dropdownClassName="certain-category-search-dropdown"
  1458. dropdownMatchSelectWidth={false}
  1459. dropdownStyle={{ width: 200 }}
  1460. style={{ width: "200px" }}
  1461. placeholder="输入服务名称"
  1462. dataSource={options}
  1463. value={this.state.commodityName}
  1464. onChange={this.httpChange}
  1465. filterOption={true}
  1466. onSelect={this.selectAuto}
  1467. >
  1468. <Input />
  1469. </AutoComplete>
  1470. <span className="mandatory">*</span>
  1471. </FormItem>
  1472. <FormItem
  1473. className="half-item"
  1474. {...formItemLayout}
  1475. label="服务数量"
  1476. >
  1477. <Input
  1478. placeholder="请输入服务数量"
  1479. style={{ width: "200px" }}
  1480. value={this.state.commodityQuantity}
  1481. onChange={(e) => {
  1482. this.setState({ commodityQuantity: e.target.value });
  1483. }}
  1484. ref="commodityQuantity"
  1485. />
  1486. <span className="mandatory">*</span>
  1487. </FormItem>
  1488. <FormItem
  1489. className="half-item"
  1490. labelCol={{ span: 3 }}
  1491. wrapperCol={{ span: 14 }}
  1492. label="官费:"
  1493. style={{
  1494. display: this.state.displayFees,
  1495. marginLeft: "55px",
  1496. }}
  1497. >
  1498. <span style={{ color: "red", marginRight: "27px" }}>
  1499. *
  1500. </span>
  1501. <Radio.Group
  1502. value={this.state.officialCost}
  1503. onChange={(e) => {
  1504. this.setState({ officialCost: e.target.value });
  1505. }}
  1506. >
  1507. <Radio value="1">含官费</Radio>
  1508. <Radio value="0">不含官费</Radio>
  1509. </Radio.Group>
  1510. </FormItem>
  1511. <FormItem
  1512. className="half-item"
  1513. labelCol={{ span: 3 }}
  1514. wrapperCol={{ span: 14 }}
  1515. label="费减:"
  1516. style={{
  1517. display: this.state.displayFees,
  1518. marginLeft: "55px",
  1519. }}
  1520. >
  1521. <span style={{ color: "red", marginRight: "27px" }}>
  1522. *
  1523. </span>
  1524. <Radio.Group
  1525. value={this.state.costReduction}
  1526. onChange={(e) => {
  1527. this.setState({ costReduction: e.target.value });
  1528. }}
  1529. >
  1530. <Radio value="1">有费减</Radio>
  1531. <Radio value="0">无费减</Radio>
  1532. </Radio.Group>
  1533. </FormItem>
  1534. <FormItem
  1535. className="half-item"
  1536. {...formItemLayout}
  1537. label="实签价格(万元)"
  1538. >
  1539. <Input
  1540. placeholder="请输入实签价格"
  1541. style={{ width: "200px" }}
  1542. value={this.state.commodityPrice}
  1543. onChange={(e) => {
  1544. this.setState({ commodityPrice: e.target.value });
  1545. }}
  1546. ref="commodityPrice"
  1547. />
  1548. <span className="mandatory">*</span>
  1549. </FormItem>
  1550. <FormItem
  1551. className="half-item"
  1552. {...formItemLayout}
  1553. label="主要业务"
  1554. >
  1555. <Select
  1556. placeholder="选择是否为主要业务"
  1557. style={{ width: "200px" }}
  1558. value={this.state.main}
  1559. onChange={(e) => {
  1560. this.setState({ main: e });
  1561. }}
  1562. >
  1563. {boutique.map(function (item) {
  1564. return (
  1565. <Select.Option key={item.value}>
  1566. {item.key}
  1567. </Select.Option>
  1568. );
  1569. })}
  1570. </Select>
  1571. <span className="mandatory">*</span>
  1572. </FormItem>
  1573. <div className="clearfix">
  1574. <FormItem
  1575. labelCol={{ span: 4 }}
  1576. wrapperCol={{ span: 16 }}
  1577. label="服务说明"
  1578. >
  1579. <Input
  1580. type="textarea"
  1581. placeholder="请输入服务说明"
  1582. value={this.state.taskComment}
  1583. onChange={(e) => {
  1584. this.setState({ taskComment: e.target.value });
  1585. }}
  1586. />
  1587. </FormItem>
  1588. </div>
  1589. <FormItem
  1590. wrapperCol={{ span: 12, offset: 4 }}
  1591. className="half-middle"
  1592. >
  1593. <Button
  1594. className="submitSave"
  1595. type="primary"
  1596. htmlType="submit"
  1597. >
  1598. 保存
  1599. </Button>
  1600. <Button
  1601. className="submitSave"
  1602. type="ghost"
  1603. onClick={this.nextCancel}
  1604. >
  1605. 取消
  1606. </Button>
  1607. </FormItem>
  1608. </div>
  1609. </Spin>
  1610. </Form>
  1611. </Modal> : <div/>}
  1612. {this.state.noVisible ? <Modal
  1613. maskClosable={false}
  1614. visible={this.state.noVisible}
  1615. onOk={this.noCancel}
  1616. onCancel={this.noCancel}
  1617. width="400px"
  1618. title={"驳回理由"}
  1619. footer=""
  1620. className="admin-desc-content"
  1621. >
  1622. <Form layout="horizontal" id="demand-form">
  1623. <Spin spinning={this.state.loading}>
  1624. <div className="clearfix">
  1625. <FormItem
  1626. labelCol={{ span: 4 }}
  1627. wrapperCol={{ span: 16 }}
  1628. label="拒绝理由"
  1629. >
  1630. <Input
  1631. type="textarea"
  1632. placeholder="请输入拒绝理由"
  1633. rows={4}
  1634. value={this.state.reason}
  1635. onChange={(e) => {
  1636. this.setState({ reason: e.target.value });
  1637. }}
  1638. />
  1639. </FormItem>
  1640. </div>
  1641. <div className="clearfix">
  1642. <Button
  1643. className="cancel"
  1644. type="primary"
  1645. onClick={this.examOks}
  1646. style={{ marginLeft: "50px" }}
  1647. htmlType="submit"
  1648. >
  1649. 确定
  1650. </Button>
  1651. <Button
  1652. className="cancel"
  1653. type="ghost"
  1654. onClick={this.noCancel}
  1655. style={{ marginLeft: "50px" }}
  1656. >
  1657. 取消
  1658. </Button>
  1659. </div>
  1660. </Spin>
  1661. </Form>
  1662. </Modal> : <div/>}
  1663. {/* <Modal
  1664. visible={this.state.rizhivisible}
  1665. className="admin-desc-content"
  1666. width="800px"
  1667. maskClosable={false}
  1668. title="订单日志"
  1669. footer={null}
  1670. onCancel={this.closeOrderLog}
  1671. >
  1672. <div className="patent-table">
  1673. <Spin spinning={this.state.loading}>
  1674. <Table
  1675. columns={this.state.columnsrizhi}
  1676. dataSource={this.state.dataSourcerizhi}
  1677. pagination={false}
  1678. />
  1679. </Spin>
  1680. </div>
  1681. </Modal> */}
  1682. <OrderRiZi
  1683. dataSourcerizhi={this.state.dataSourcerizhi}
  1684. closeOrderLog={this.closeOrderLog}
  1685. visible={this.state.rizhivisible}
  1686. loading={this.state.loading}
  1687. />
  1688. </div>
  1689. );
  1690. }
  1691. });
  1692. export default PaiDan;