projectAssignment.jsx 53 KB

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