zxsglyOutSourcingPaiDan.jsx 60 KB

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