zxsglyOutSourcingPaiDan.jsx 59 KB

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