projectAssignment.jsx 63 KB

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