zxsglyOutSourcingPaiDan.jsx 58 KB

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