projectAssignment.jsx 61 KB

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