projectAssignment.jsx 62 KB

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