contractCwzy.js 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731
  1. import React from "react";
  2. import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip } from "antd";
  3. import $ from "jquery/src/ajax";
  4. import {
  5. getNewOrderStatus,
  6. getProcessStatusNew,
  7. splitUrl,
  8. getjiedian,
  9. getboutique,
  10. getCuikuan,
  11. getProjectStatus,
  12. ShowModal,
  13. getType
  14. } from "@/tools.js";
  15. import "./customer.less";
  16. import { ChangeDetail } from "./changeComponent/changeDetailCwzy.js";
  17. import { SearchInput } from "./changeComponent/searchInput.js";
  18. import OrderDetail from "./changeComponent/orderDetail";
  19. import { ChooseList } from "./chooseList.jsx";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. const { RangePicker } = DatePicker;
  22. import ReactToPrint from "react-to-print";
  23. import OrderRiZi from "@/orderRiZi.jsx";
  24. import { getProjectName } from "../../../tools";
  25. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  26. import NewEditProject from "../../../common/projectOperation/newEditProject";
  27. const contractChange = Form.create()(
  28. React.createClass({
  29. loadData(pageNo) {
  30. this.setState({
  31. loading: true
  32. });
  33. $.ajax({
  34. method: "get",
  35. dataType: "json",
  36. crossDomain: false,
  37. url: globalConfig.context + "/api/admin/orderChange/orderChangeList",
  38. data: {
  39. pageNo: pageNo || 1,
  40. pageSize: this.state.pagination.pageSize,
  41. userName: this.state.searchData.userNameSearch,
  42. processState: this.props.processState,
  43. timeType: this.state.searchData.timeTypeSearch,
  44. startTime: this.state.searchData.releaseDate[0],
  45. endTime: this.state.searchData.releaseDate[1],
  46. salesmanName: this.state.searchData.salesmanNameSearch,
  47. complete: this.state.searchData.completeSearch || 1,
  48. deps: this.state.searchData.deps,
  49. orderNo: this.state.searchData.orderNoSearch,
  50. contractNo: this.state.searchData.contractNoSearch,
  51. type: this.state.searchData.changeSearch
  52. },
  53. success: function (data) {
  54. ShowModal(this);
  55. let theArr = [];
  56. if (data.error.length || data.data.list == "") {
  57. if (data.error && data.error.length) {
  58. message.warning(data.error[0].message);
  59. }
  60. } else {
  61. for (let i = 0; i < data.data.list.length; i++) {
  62. let thisdata = data.data.list[i];
  63. theArr.push({
  64. key: i,
  65. orderNo: thisdata.orderNo,
  66. createTimes: thisdata.createTimes,
  67. nickname: thisdata.nickname,
  68. orderType: thisdata.orderType,
  69. establishTimes: thisdata.establishTimes,
  70. orderStatus: thisdata.orderStatus,
  71. totalAmount: thisdata.totalAmount,
  72. settlementAmount: thisdata.settlementAmount,
  73. arrears: thisdata.arrears,
  74. salesmanName: thisdata.salesmanName,
  75. depName: thisdata.depName,
  76. processState: thisdata.processState,
  77. type: thisdata.type,
  78. status: thisdata.status,
  79. id: thisdata.id,
  80. contractNo: thisdata.contractNo,
  81. processStateText: getProcessStatusNew(
  82. thisdata.examineName,
  83. thisdata.processState,
  84. thisdata.status
  85. )
  86. });
  87. }
  88. this.state.pagination.total = data.data.totalCount;
  89. this.state.pagination.current = data.data.pageNo;
  90. }
  91. if (data.data && data.data.list && !data.data.list.length) {
  92. this.state.pagination.total = 0;
  93. }
  94. this.setState({
  95. dataSource: theArr,
  96. pageNo: pageNo,
  97. pagination: this.state.pagination
  98. });
  99. }.bind(this)
  100. }).always(
  101. function () {
  102. this.setState({
  103. loading: false
  104. });
  105. }.bind(this)
  106. );
  107. },
  108. getInitialState() {
  109. return {
  110. dvisible: false,
  111. page: 1,
  112. searchData: {
  113. releaseDate: []
  114. },
  115. declarationBatch: 1,
  116. dataInfor: {},
  117. primaryOrderData: {}, //原订单数据
  118. orderData: {}, //现订单数据
  119. pictureUrl: [],
  120. voucherUrl: [],
  121. attachment: [],
  122. attachmentUrl: [],
  123. //收款数据
  124. proceedsData: {},
  125. proTotal: 0,
  126. invTotal: 0,
  127. contractData: {},
  128. // 回收退票数据
  129. refundInvoice: [],
  130. RefundInvoice: [],
  131. additionalOrderData: {},
  132. paginations: false,
  133. activeKey: "a",
  134. confirmLoading: false,
  135. aloading: false,
  136. pagination: {
  137. defaultCurrent: 1,
  138. defaultPageSize: 10,
  139. showQuickJumper: true,
  140. pageSize: 10,
  141. onChange: function (page) {
  142. this.loadData(page);
  143. }.bind(this),
  144. showTotal: function (total) {
  145. return "共" + total + "条数据";
  146. }
  147. },
  148. columns: [
  149. {
  150. title: "合同编号",
  151. dataIndex: "contractNo",
  152. key: "contractNo"
  153. },
  154. {
  155. title: "订单编号",
  156. dataIndex: "orderNo",
  157. key: "orderNo"
  158. },
  159. {
  160. title: "客户名称",
  161. dataIndex: "nickname",
  162. key: "nickname",
  163. width: 150,
  164. render: (text) => {
  165. return (
  166. <Tooltip title={text}>
  167. <div
  168. // style={{
  169. // maxWidth: '150px',
  170. // overflow: 'hidden',
  171. // textOverflow: "ellipsis",
  172. // whiteSpace: 'nowrap',
  173. // }}
  174. >{text}</div>
  175. </Tooltip>
  176. )
  177. },
  178. },
  179. {
  180. title: "订单部门",
  181. dataIndex: "depName",
  182. key: "depName"
  183. },
  184. {
  185. title: "订单类型",
  186. dataIndex: "orderType",
  187. key: "orderType",
  188. render: text => {
  189. return text ? "科技项目" : "认证项目";
  190. }
  191. },
  192. {
  193. title: "下单时间",
  194. dataIndex: "establishTimes",
  195. key: "establishTimes"
  196. },
  197. {
  198. title: "订单状态",
  199. dataIndex: "orderStatus",
  200. key: "orderStatus",
  201. render: text => {
  202. return getNewOrderStatus(text);
  203. }
  204. },
  205. {
  206. title: "合同额(万元)",
  207. dataIndex: "totalAmount",
  208. key: "totalAmount"
  209. },
  210. {
  211. title: "已付额(万元)",
  212. dataIndex: "settlementAmount",
  213. key: "settlementAmount"
  214. },
  215. {
  216. title: "欠款(万元)",
  217. dataIndex: "arrears",
  218. key: "arrears"
  219. },
  220. {
  221. title: "订单负责人",
  222. dataIndex: "salesmanName",
  223. key: "salesmanName"
  224. },
  225. {
  226. title: "变更类型",
  227. dataIndex: "type",
  228. key: "type",
  229. render: text => {
  230. return getType(text);
  231. }
  232. },
  233. {
  234. title: "审核状态",
  235. dataIndex: "processStateText",
  236. key: "processStateText"
  237. },
  238. {
  239. title: "提交时间",
  240. dataIndex: "createTimes",
  241. key: "createTimes"
  242. }
  243. ],
  244. dataSource: [],
  245. // 传递给子组件的
  246. dataProps: [],
  247. columnsX: [
  248. {
  249. title: "业务项目名称",
  250. dataIndex: "commodityName",
  251. key: "commodityName",
  252. render: (text, record) => {
  253. return <span>
  254. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  255. <div>
  256. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  257. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  258. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  259. {record.cSort == 3 && <span>{record.technologyProjectType==0?'(简易项目)':record.technologyProjectType==1?'(市区级)':record.technologyProjectType==2?'(省级)':record.technologyProjectType==3?'(国家级)':''}</span>}
  260. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  261. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  262. </div>
  263. </span>
  264. }
  265. },
  266. {
  267. title: "项目类别",
  268. dataIndex: "cname",
  269. key: "cname"
  270. },
  271. {
  272. title: "项目数量",
  273. dataIndex: "commodityQuantity",
  274. key: "commodityQuantity"
  275. },
  276. {
  277. title: "金额(万元)",
  278. dataIndex: "commodityPrice",
  279. key: "commodityPrice"
  280. },
  281. {
  282. title: "负责人",
  283. dataIndex: "contacts",
  284. key: "contacts"
  285. },
  286. {
  287. title: "负责人电话",
  288. dataIndex: "contactsMobile",
  289. key: "contactsMobile"
  290. },
  291. {
  292. title: "项目状态",
  293. dataIndex: "projectStatus",
  294. key: "projectStatus",
  295. render: text => {
  296. return getProjectName(text);
  297. }
  298. },
  299. {
  300. title: "主要项目",
  301. dataIndex: "main",
  302. key: "main",
  303. render: text => {
  304. return text ? "是" : "否";
  305. }
  306. },
  307. {
  308. title: "总年限",
  309. dataIndex: "yearSum",
  310. key: "yearSum",
  311. render: (text, record) => {
  312. return (
  313. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  314. );
  315. }
  316. },
  317. {
  318. title: "年限",
  319. dataIndex: "serviceLife",
  320. key: "serviceLife",
  321. render: (text, record) => {
  322. return (
  323. <div>{!!text && JSON.parse(text).toString()}</div>
  324. );
  325. }
  326. },
  327. {
  328. title: "本次派单",
  329. dataIndex: "serviceYear",
  330. key: "serviceYear",
  331. render: (text, record) => {
  332. return (
  333. <div>{!text ? "" : text}</div>
  334. );
  335. }
  336. },
  337. {
  338. title: "项目说明",
  339. dataIndex: "taskComment",
  340. key: "taskComment",
  341. render: text => {
  342. return (
  343. <Tooltip title={text}>
  344. <div
  345. style={{
  346. width: 100,
  347. overflow: "hidden",
  348. whiteSpace: "nowrap",
  349. textOverflow: "ellipsis",
  350. }}
  351. >{text}</div>
  352. </Tooltip>
  353. )
  354. }
  355. }
  356. ],
  357. // 子组件改变的表格title数组
  358. changeList: undefined,
  359. columnsrizhi: [
  360. {
  361. title: "流程",
  362. dataIndex: "processName",
  363. key: "processName"
  364. },
  365. {
  366. title: "操作人",
  367. dataIndex: "adminName",
  368. key: "adminName"
  369. },
  370. {
  371. title: "时间",
  372. dataIndex: "createDate",
  373. key: "createDate"
  374. }
  375. ],
  376. dataSourceX: [],
  377. ContactsLists: [
  378. {
  379. title: "催款科目",
  380. dataIndex: "dunSubject",
  381. key: "dunSubject",
  382. render: text => {
  383. return getjiedian(text);
  384. }
  385. },
  386. {
  387. title: "金额(万元)",
  388. dataIndex: "money",
  389. key: "money"
  390. },
  391. {
  392. title: "催款状态",
  393. dataIndex: "dunStatus",
  394. key: "dunStatus",
  395. render: text => {
  396. return getCuikuan(text);
  397. }
  398. }
  399. ]
  400. };
  401. },
  402. departmentList() {
  403. this.setState({
  404. loading: true
  405. });
  406. $.ajax({
  407. method: "get",
  408. dataType: "json",
  409. crossDomain: false,
  410. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  411. data: {},
  412. success: function (data) {
  413. let thedata = data.data;
  414. let theArr = [];
  415. if (!thedata) {
  416. if (data.error && data.error.length) {
  417. message.warning(data.error[0].message);
  418. }
  419. } else {
  420. thedata.map(function (item, index) {
  421. theArr.push({
  422. key: index,
  423. name: item.name,
  424. id: item.id
  425. });
  426. });
  427. }
  428. this.setState({
  429. departmentArr: theArr
  430. });
  431. }.bind(this)
  432. }).always(
  433. function () {
  434. this.setState({
  435. loading: false
  436. });
  437. }.bind(this)
  438. );
  439. },
  440. //页面加载函数
  441. componentWillMount() {
  442. const data = localStorage.getItem('typeCw') || "";
  443. /**
  444. * 统计页点击跳转,将参数存在缓存中(缓存中有数据就给筛选项添加默认值)
  445. */
  446. if (!data) {
  447. this.loadData()
  448. } else {
  449. this.state.searchData.completeSearch = data
  450. this.loadData()
  451. }
  452. this.loadData();
  453. },
  454. componentDidMount() {
  455. localStorage.removeItem('typeCw') // 组件挂载完清除缓存
  456. },
  457. componentWillUnmount() {
  458. localStorage.removeItem('typeCw') // 组件销毁时清除缓存
  459. },
  460. //整行点击
  461. tableRowClick(record) {
  462. this.setState(
  463. {
  464. visible: true,
  465. type: record.type,
  466. status: record.status,
  467. buttonStatus: true,
  468. orderStatus: record.orderStatus,
  469. processStateText: record.processStateText,
  470. id: record.id,
  471. orderNo: record.orderNo
  472. },
  473. () => {
  474. this.xiangqing(record.orderNo);
  475. this.xiangmu(record.orderNo);
  476. this.jiedian(record.orderNo);
  477. this.jiedianNew(record.orderNo);
  478. this.createTabs();
  479. }
  480. );
  481. },
  482. //点击打卡项目详情
  483. tableRowClickX(record) {
  484. this.setState({
  485. jid: record.id, //项目ID
  486. kid: record.commodityId, //商品ID
  487. commodityName: record.commodityName, //金额
  488. commodityPrice: record.commodityPrice, //金额
  489. commodityQuantity: record.commodityQuantity, //数量
  490. taskComment: record.taskComment, //备注
  491. main: record.main.toString(), //是否为主要
  492. addnextVisible: true,
  493. dataInfor: record,
  494. addState: 0
  495. });
  496. },
  497. //项目详情关闭
  498. nextCancel() {
  499. this.setState({
  500. addnextVisible: false
  501. });
  502. },
  503. // 合同变更详情
  504. ChangeDetail(id) {
  505. let url = window.location.href.substring(7);
  506. $.ajax({
  507. method: "get",
  508. dataType: "json",
  509. crossDomain: false,
  510. url:
  511. globalConfig.context +
  512. "/api/admin/orderChange/orderChangeDetailsById",
  513. data: {
  514. id: id
  515. },
  516. success: function (data) {
  517. if (data.data) {
  518. let thisdata = data.data;
  519. Object.assign(thisdata, {
  520. processStateText: this.state.processStateText,
  521. userName: this.state.userName,
  522. contractNo: this.state.contractNo
  523. });
  524. this.setState({
  525. contractData: thisdata,
  526. voucherUrl: thisdata.voucherUrl
  527. ? splitUrl(
  528. thisdata.voucherUrl,
  529. ",",
  530. globalConfig.avatarHost + "/upload",
  531. url
  532. )
  533. : [],
  534. attachment: thisdata.attachmentUrl
  535. ? splitUrl(
  536. thisdata.attachmentUrl,
  537. ",",
  538. globalConfig.avatarHost + "/upload",
  539. url
  540. )
  541. : [],
  542. contractPictureUrl: thisdata.contractPictureUrl
  543. ? splitUrl(
  544. thisdata.contractPictureUrl,
  545. ",",
  546. globalConfig.avatarHost + "/upload",
  547. url
  548. )
  549. : []
  550. });
  551. }
  552. }.bind(this)
  553. });
  554. $.ajax({
  555. method: "get",
  556. dataType: "json",
  557. crossDomain: false,
  558. url:
  559. globalConfig.context +
  560. "/api/admin/orderChange/listOrderInvoiceAndBill",
  561. data: {
  562. orderNo: this.state.orderNo
  563. },
  564. success: function (data) {
  565. if (!data.data) return;
  566. let proTotal = 0;
  567. let invTotal = 0;
  568. data.data.bill.forEach(item => {
  569. proTotal += item.transactionAmount;
  570. });
  571. data.data.invoice.forEach(item => {
  572. invTotal += item.amount;
  573. });
  574. this.setState({
  575. proceedsData: data.data,
  576. proTotal: (Math.round(proTotal * 1000000) / 1000000).toFixed(6),
  577. invTotal: (Math.round(invTotal * 1000000) / 1000000).toFixed(6),
  578. });
  579. }.bind(this)
  580. });
  581. $.ajax({
  582. method: "get",
  583. dataType: "json",
  584. crossDomain: false,
  585. url:
  586. globalConfig.context +
  587. "/api/admin/orderChange/listOrderRefundInvoice",
  588. data: {
  589. orderNo: this.state.orderNo
  590. },
  591. success: data => {
  592. if (!data) return;
  593. data.data.forEach(item => {
  594. item.load = true;
  595. });
  596. this.setState({
  597. refundInvoice: data.data
  598. });
  599. }
  600. });
  601. },
  602. //订单详情
  603. xiangqing(orderNos) {
  604. $.ajax({
  605. method: "get",
  606. dataType: "json",
  607. crossDomain: false,
  608. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  609. data: {
  610. orderNo: orderNos
  611. },
  612. success: function (data) {
  613. if (data.error.length || data.data.list == "") {
  614. if (data.error && data.error.length) {
  615. message.warning(data.error[0].message);
  616. }
  617. } else {
  618. let thisdata = data.data;
  619. this.setState({
  620. userName: thisdata.userName,
  621. primaryOrderNo: thisdata.primaryOrder,
  622. additionalOrder: thisdata.additionalOrder,
  623. contractNo: thisdata.contractNo,
  624. // arrears: thisdata.arrears,
  625. orderData: thisdata,
  626. isAddition: thisdata.additionalOrder ? true : false,
  627. contractPictureUrl: thisdata.contractPictureUrl
  628. ? splitUrl(
  629. thisdata.contractPictureUrl,
  630. ",",
  631. globalConfig.avatarHost + "/upload"
  632. )
  633. : []
  634. });
  635. // console.log(thisdata.contractPictureUrl);
  636. }
  637. }.bind(this)
  638. });
  639. },
  640. // 原订单数据
  641. primaryOrder(primaryOrder) {
  642. $.ajax({
  643. method: "get",
  644. dataType: "json",
  645. crossDomain: false,
  646. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  647. data: {
  648. orderNo: primaryOrder
  649. },
  650. success: function (data) {
  651. if (data.error.length || data.data.list == "") {
  652. if (data.error && data.error.length) {
  653. message.warning(data.error[0].message);
  654. }
  655. } else {
  656. let thisdata = data.data;
  657. this.setState({
  658. primaryOrderData: thisdata
  659. });
  660. }
  661. }.bind(this)
  662. });
  663. },
  664. // 附加订单数据
  665. additionalOrder(additionalOrder) {
  666. $.ajax({
  667. method: "get",
  668. dataType: "json",
  669. crossDomain: false,
  670. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  671. data: {
  672. orderNo: additionalOrder
  673. },
  674. success: function (data) {
  675. if (data.error.length || data.data.list == "") {
  676. if (data.error && data.error.length) {
  677. message.warning(data.error[0].message);
  678. }
  679. } else {
  680. let thisdata = data.data;
  681. this.setState({
  682. additionalOrderData: thisdata
  683. });
  684. }
  685. }.bind(this)
  686. });
  687. },
  688. //项目列表
  689. xiangmu(orderNos) {
  690. $.ajax({
  691. method: "get",
  692. dataType: "json",
  693. crossDomain: false,
  694. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  695. data: {
  696. orderNo: orderNos
  697. },
  698. success: function (data) {
  699. let theArr = [];
  700. if (data.error.length || data.data.list == "") {
  701. if (data.error && data.error.length) {
  702. message.warning(data.error[0].message);
  703. }
  704. } else {
  705. for (let i = 0; i < data.data.length; i++) {
  706. let thisdata = data.data[i];
  707. thisdata.key = i;
  708. thisdata.sort = thisdata.cSort;
  709. theArr.push(thisdata);
  710. }
  711. }
  712. this.setState({
  713. dataSourceX: theArr
  714. });
  715. }.bind(this)
  716. });
  717. },
  718. // 查看收款金额
  719. getProceeds(id) {
  720. $.ajax({
  721. method: "get",
  722. dataType: "json",
  723. crossDomain: false,
  724. url:
  725. globalConfig.context +
  726. "/api/admin/orderChange/orderChangeDetailsById",
  727. data: {
  728. id: id
  729. },
  730. success: function (data) {
  731. if (data.error.length || data.data.list == "") {
  732. if (data.error && data.error.length) {
  733. message.warning(data.error[0].message);
  734. }
  735. } else {
  736. // let thisdata = data.data;
  737. }
  738. }.bind(this)
  739. });
  740. },
  741. search(obj) {
  742. this.setState({
  743. searchData: obj
  744. }, () => {
  745. this.loadData(1);
  746. })
  747. },
  748. rizhi(orderNo) {
  749. $.ajax({
  750. method: "get",
  751. dataType: "json",
  752. crossDomain: false,
  753. url: "/api/admin/newOrder/selectOrderLog",
  754. data: {
  755. orderNo: orderNo
  756. },
  757. success: function (data) {
  758. let theArr = [];
  759. let thisData = data.data;
  760. if (!thisData.length) {
  761. if (data.error && data.error.length) {
  762. message.warning(data.error[0].message);
  763. }
  764. thisData = {};
  765. } else {
  766. for (let i = 0; i < data.data.length; i++) {
  767. let thisdata = data.data[i];
  768. theArr.push({
  769. processName: thisdata.processName,
  770. adminName: thisdata.adminName,
  771. createDate: thisdata.createDate,
  772. remarks: thisdata.remarks
  773. });
  774. }
  775. }
  776. this.setState({
  777. dataSourcerizhi: theArr
  778. });
  779. }.bind(this)
  780. });
  781. },
  782. getOrderLog(orderNo) {
  783. this.setState({
  784. rizhivisible: true
  785. });
  786. this.rizhi(orderNo);
  787. },
  788. closeOrderLog() {
  789. this.setState({
  790. rizhivisible: false
  791. });
  792. },
  793. //节点列表
  794. jiedian(orderNos) {
  795. $.ajax({
  796. method: "get",
  797. dataType: "json",
  798. crossDomain: false,
  799. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  800. data: {
  801. orderNo: orderNos
  802. },
  803. success: function (data) {
  804. let theArr = [];
  805. let thisData = [];
  806. if (data.error.length || data.data.list == "") {
  807. if (data.error && data.error.length) {
  808. message.warning(data.error[0].message);
  809. }
  810. } else {
  811. for (let i = 0; i < data.data.length; i++) {
  812. thisData = data.data[i];
  813. theArr.push({
  814. key: i,
  815. dunSubject: thisData.dunSubject
  816. ? thisData.dunSubject.toString()
  817. : "", //催款科目
  818. id: thisData.id, //节点Id
  819. money: thisData.money, //催款金额
  820. dunStatus: thisData.dunStatus //催款状态
  821. });
  822. }
  823. this.setState({
  824. contactList: theArr
  825. });
  826. }
  827. }.bind(this)
  828. });
  829. },
  830. jiedianNew(orderNos) {
  831. $.ajax({
  832. method: "get",
  833. dataType: "json",
  834. crossDomain: false,
  835. url:
  836. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  837. data: {
  838. orderNo: orderNos
  839. },
  840. success: function (data) {
  841. if (data.error && data.error.length) {
  842. message.warning(data.error[0].message);
  843. } else {
  844. let theArr = [];
  845. let thisData = [];
  846. let arr = data.data || [];
  847. let totalCui = 0;
  848. for (let i = 0; i < arr.length; i++) {
  849. thisData = arr[i];
  850. totalCui += +thisData.money;
  851. theArr.push({
  852. key: i,
  853. dunSubject: thisData.dunSubject
  854. ? thisData.dunSubject.toString()
  855. : "", //催款科目
  856. id: thisData.id, //节点Id
  857. money: thisData.money, //催款金额
  858. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  859. commodityName: thisData.commodityName,
  860. projectType: thisData.projectType,
  861. dunTypeName: thisData.dunTypeName,
  862. status: thisData.status,
  863. waitDay: thisData.waitDay,
  864. effectiveCount: thisData.effectiveCount,
  865. startDate: thisData.startDate,
  866. dunType: thisData.dunType,
  867. appropriationRatio: thisData.appropriationRatio,
  868. customizeName: thisData.customizeName,
  869. customizeTimes: thisData.customizeTimes,
  870. tid: thisData.tid,
  871. });
  872. }
  873. if (!totalCui) {
  874. totalCui = 0;
  875. }
  876. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  877. this.setState({
  878. contactListNew: theArr,
  879. totalCui
  880. });
  881. }
  882. }.bind(this)
  883. }).always(
  884. function () {
  885. this.setState({
  886. loading: false
  887. });
  888. }.bind(this)
  889. );
  890. },
  891. //审核通过
  892. examOk() {
  893. $.ajax({
  894. method: "post",
  895. dataType: "json",
  896. crossDomain: false,
  897. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  898. data: {
  899. orderNo: this.state.orderNo,
  900. orderStatus: 2
  901. },
  902. success: function (data) {
  903. if (data.error.length || data.data.list == "") {
  904. if (data.error && data.error.length) {
  905. message.warning(data.error[0].message);
  906. }
  907. } else {
  908. message.success("该订单已通过审核~");
  909. this.setState({
  910. visible: false
  911. });
  912. this.reset();
  913. }
  914. }.bind(this)
  915. }).always(
  916. function () {
  917. this.setState({
  918. loading: false
  919. });
  920. }.bind(this)
  921. );
  922. },
  923. //通过发给外包
  924. outsourcing() {
  925. $.ajax({
  926. method: "post",
  927. dataType: "json",
  928. crossDomain: false,
  929. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  930. data: {
  931. orderNo: this.state.orderNo,
  932. orderStatus: 2,
  933. outsource: 1
  934. },
  935. success: function (data) {
  936. if (data.error.length || data.data.list == "") {
  937. if (data.error && data.error.length) {
  938. message.warning(data.error[0].message);
  939. }
  940. } else {
  941. message.success("该订单已通过审核~");
  942. this.setState({
  943. visible: false
  944. });
  945. this.reset();
  946. }
  947. }.bind(this)
  948. }).always(
  949. function () {
  950. this.setState({
  951. loading: false
  952. });
  953. }.bind(this)
  954. );
  955. },
  956. //审核不通过
  957. examOks() {
  958. this.setState({
  959. aloading: true
  960. });
  961. $.ajax({
  962. method: "post",
  963. dataType: "json",
  964. crossDomain: false,
  965. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  966. data: {
  967. orderNo: this.state.orderNo,
  968. orderStatus: 3,
  969. reason: this.state.reason
  970. },
  971. success: function (data) {
  972. if (data.error.length || data.data.list == "") {
  973. if (data.error && data.error.length) {
  974. message.warning(data.error[0].message);
  975. this.setState({
  976. aloading: true
  977. });
  978. }
  979. } else {
  980. message.success("该订单已被拒绝~");
  981. this.setState({
  982. visible: false,
  983. aloading: false,
  984. noVisible: false,
  985. reason: ""
  986. });
  987. this.reset();
  988. }
  989. }.bind(this)
  990. }).always(
  991. function () {
  992. this.setState({
  993. loading: false
  994. });
  995. }.bind(this)
  996. );
  997. },
  998. //点击拒绝
  999. examNo() {
  1000. this.setState({
  1001. noVisible: true
  1002. });
  1003. },
  1004. loadDataChange(key) {
  1005. $.ajax({
  1006. method: "get",
  1007. dataType: "json",
  1008. async: false,
  1009. crossDomain: false,
  1010. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  1011. data: {
  1012. changeId: key
  1013. },
  1014. success: function (data) {
  1015. if (data.error.length || data.data.list == "") {
  1016. if (data.error && data.error.length) {
  1017. message.warning(data.error[0].message);
  1018. }
  1019. } else {
  1020. // console.log("拿到历史", data);
  1021. this.setState({
  1022. dataProps: data.data
  1023. });
  1024. }
  1025. }.bind(this)
  1026. });
  1027. },
  1028. callback(key) {
  1029. this.setState(
  1030. {
  1031. activeKey: key
  1032. },
  1033. () => {
  1034. if (key != "a" && key != "c" && key.length < 10) {
  1035. this.ChangeDetail(key);
  1036. this.loadDataChange(key);
  1037. this.getProceeds(key);
  1038. } else if (key != "a" && key != "c" && key.length > 10) {
  1039. this.primaryOrder(key);
  1040. this.xiangmu(key);
  1041. this.jiedian(key);
  1042. this.jiedianNew(key);
  1043. this.loadDataChange(key);
  1044. }
  1045. }
  1046. );
  1047. if (key === "a") {
  1048. this.xiangmu(this.state.orderNo);
  1049. this.jiedian(this.state.orderNo);
  1050. this.jiedianNew(this.state.orderNo);
  1051. }
  1052. // if (key === "2") {
  1053. // this.ChangeDetail(this.state.id);
  1054. // this.loadDataChange();
  1055. // this.getProceeds(this.state.id);
  1056. // }
  1057. // if (key === "3") {
  1058. // this.primaryOrder(this.state.primaryOrderNo);
  1059. // this.xiangmu(this.state.primaryOrderNo);
  1060. // this.jiedian(this.state.primaryOrderNo);
  1061. // this.jiedianNew(this.state.primaryOrderNo);
  1062. // }
  1063. if (key === "c") {
  1064. this.additionalOrder(this.state.additionalOrder);
  1065. this.xiangmu(this.state.additionalOrder);
  1066. this.jiedian(this.state.additionalOrder);
  1067. this.jiedianNew(this.state.additionalOrder);
  1068. this.setState({
  1069. buttonStatusA: false
  1070. });
  1071. } else {
  1072. this.setState({
  1073. buttonStatusA: true
  1074. });
  1075. }
  1076. },
  1077. closeDesc(e, s) {
  1078. this.state.activeKey = "a";
  1079. this.state.userDetaile = false;
  1080. this.state.signBillVisible = false;
  1081. this.state.visible = e;
  1082. if (s) {
  1083. this.loadData(this.state.pageNo);
  1084. }
  1085. },
  1086. // 获取原订单编号
  1087. getPrimaryOrder(value) {
  1088. this.setState({
  1089. primaryOrder: value
  1090. });
  1091. },
  1092. getAdditionalOrder(value) {
  1093. this.setState({
  1094. additionalOrder: value
  1095. });
  1096. },
  1097. getUrl(url) {
  1098. let theorgCodeUrl = [];
  1099. if (url.length) {
  1100. let picArr = [];
  1101. url.map(function (item) {
  1102. if (
  1103. item.response &&
  1104. item.response.data &&
  1105. item.response.data.length
  1106. ) {
  1107. picArr.push(item.response.data);
  1108. }
  1109. });
  1110. theorgCodeUrl = picArr.join(",");
  1111. }
  1112. return theorgCodeUrl;
  1113. },
  1114. sureOut() {
  1115. if (!this.state.companyName) {
  1116. message.warning("公司名称不能为空");
  1117. return;
  1118. }
  1119. if (!this.state.unitPrice) {
  1120. message.warning("单价不能为空");
  1121. return;
  1122. }
  1123. if (!this.state.unitNumber) {
  1124. message.warning("数量不能为空");
  1125. return;
  1126. }
  1127. if (!this.state.amount) {
  1128. message.warning("总金额不能为空");
  1129. return;
  1130. }
  1131. if (!this.state.outsourceRemarks) {
  1132. message.warning("备注不能为空");
  1133. return;
  1134. }
  1135. if (this.state.pictureUrl.length === 0) {
  1136. message.warning("合同扫描件不能为空");
  1137. return;
  1138. }
  1139. $.ajax({
  1140. method: "POST",
  1141. dataType: "json",
  1142. crossDomain: false,
  1143. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1144. data: {
  1145. id: this.state.id,
  1146. orderNo: this.state.orderNo,
  1147. companyName: this.state.companyName,
  1148. amount: this.state.amount,
  1149. outsourceRemarks: this.state.outsourceRemarks,
  1150. unitNumber: this.state.unitNumber,
  1151. unitPrice: this.state.unitPrice,
  1152. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1153. ? this.getUrl(this.state.attachmentUrl)
  1154. : "",
  1155. orderStatus: 2,
  1156. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1157. ? this.getUrl(this.state.pictureUrl)
  1158. : ""
  1159. }
  1160. }).done(
  1161. function (data) {
  1162. this.setState({
  1163. loading: false
  1164. });
  1165. if (!data.error.length) {
  1166. message.success("发起成功!");
  1167. this.outReset();
  1168. this.visitCancel();
  1169. } else {
  1170. message.warning(data.error[0].message);
  1171. }
  1172. }.bind(this)
  1173. );
  1174. },
  1175. //关闭输入理由框
  1176. noCancel() {
  1177. this.setState({
  1178. noVisible: false,
  1179. aloading: false,
  1180. reason: ""
  1181. });
  1182. },
  1183. //重置
  1184. reset() {
  1185. this.setState({
  1186. signBillVisible: false
  1187. });
  1188. this.state.orderNo = "";
  1189. this.state.customerName = "";
  1190. this.state.releaseDate[0] = undefined;
  1191. this.state.releaseDate[1] = undefined;
  1192. this.state.approval = undefined;
  1193. this.loadData(1);
  1194. },
  1195. outReset() {
  1196. this.setState({
  1197. companyName: "",
  1198. amount: "",
  1199. unitPrice: "",
  1200. unitNumber: "",
  1201. outsourceRemarks: "",
  1202. attachmentUrl: [],
  1203. pictureUrl: []
  1204. });
  1205. },
  1206. getOrgCodeUrl(e) {
  1207. this.setState({ pictureUrl: e });
  1208. },
  1209. //关闭详情
  1210. visitCancel() {
  1211. this.setState(
  1212. {
  1213. activeKey: "a"
  1214. },
  1215. () => {
  1216. this.setState({
  1217. visible: false
  1218. });
  1219. }
  1220. );
  1221. this.loadData(this.state.pageNo);
  1222. },
  1223. visitOk() {
  1224. this.setState({
  1225. visible: false
  1226. });
  1227. },
  1228. changeList(arr) {
  1229. const newArr = [];
  1230. this.state.columns.forEach(item => {
  1231. arr.forEach(val => {
  1232. if (val === item.title) {
  1233. newArr.push(item);
  1234. }
  1235. });
  1236. });
  1237. this.setState({
  1238. changeList: newArr
  1239. });
  1240. },
  1241. printAll() {
  1242. this.setState({
  1243. dvisible: true
  1244. // loading: true
  1245. });
  1246. this.state.pagination.pageSize = 9999999;
  1247. this.setState({
  1248. pagination: this.state.pagination
  1249. });
  1250. this.loadData();
  1251. },
  1252. exportAll() {
  1253. window.location.href =
  1254. globalConfig.context +
  1255. "/api/admin/orderChange/exportMyChange?" +
  1256. `orderNo=${this.state.searchData.orderNoSearch
  1257. ? this.state.searchData.orderNoSearch
  1258. : ""
  1259. }&processState=${this.props.processState ? this.props.processState : ""
  1260. }&userName=${this.state.searchData.userNameSearch
  1261. ? this.state.searchData.userNameSearch
  1262. : ""
  1263. }&contractNo=${this.state.searchData.contractNoSearch
  1264. ? this.state.searchData.contractNoSearch
  1265. : ""
  1266. }
  1267. &timeType=${this.state.searchData.timeTypeSearch
  1268. ? this.state.searchData.timeTypeSearch
  1269. : ""
  1270. }
  1271. &startTime=${this.state.searchData.releaseDate[0]
  1272. ? this.state.searchData.releaseDate[0]
  1273. : ""
  1274. }
  1275. &endTime=${this.state.searchData.releaseDate[1]
  1276. ? this.state.searchData.releaseDate[1]
  1277. : ""
  1278. }
  1279. &salesmanName=${this.state.searchData.salesmanNameSearch
  1280. ? this.state.searchData.salesmanNameSearch
  1281. : ""
  1282. }
  1283. &complete=${this.state.searchData.completeSearch || 1}
  1284. &depId=${this.state.searchData.depIdSearch
  1285. ? this.state.searchData.depIdSearch
  1286. : ""
  1287. }
  1288. &type=${this.state.searchData.changeSearch
  1289. ? this.state.searchData.changeSearch
  1290. : ""
  1291. }`;
  1292. },
  1293. createTabs() {
  1294. $.ajax({
  1295. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1296. method: "get",
  1297. data: {
  1298. orderNo: this.state.orderNo
  1299. },
  1300. success: data => {
  1301. if (data.error && data.error.length) {
  1302. message.warning(data.error[0].message);
  1303. } else {
  1304. this.setState({
  1305. tabList: data.data
  1306. });
  1307. }
  1308. }
  1309. });
  1310. },
  1311. render() {
  1312. const data = localStorage.getItem('typeCw') || "";
  1313. const tabList = this.state.tabList || [];
  1314. const formItemLayout = {
  1315. labelCol: { span: 8 },
  1316. wrapperCol: { span: 14 }
  1317. };
  1318. const FormItem = Form.Item;
  1319. const { TabPane } = Tabs;
  1320. const departmentArr = this.state.departmentArr || [];
  1321. return (
  1322. <div className="user-content" style={{ position: "relative" }}>
  1323. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  1324. <div className="content-title" style={{ marginBottom: 10 }}>
  1325. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1326. 合同变更审核订单
  1327. </span>
  1328. </div>
  1329. <div className="user-search">
  1330. {/* <SearchInput search={this.search} /> */}
  1331. {/* <ChooseList
  1332. columns={this.state.columns}
  1333. changeFn={this.changeList}
  1334. changeList={this.state.changeList}
  1335. top={55}
  1336. /> */}
  1337. <Tabs
  1338. defaultActiveKey="2"
  1339. onChange={this.callbackTab}
  1340. className="test"
  1341. >
  1342. <TabPane tab="更改表格显示数据" key="1">
  1343. <div style={{ marginLeft: 10 }}>
  1344. <ChooseList
  1345. columns={this.state.columns}
  1346. changeFn={this.changeList}
  1347. changeList={this.state.changeList}
  1348. top={55}
  1349. margin={11}
  1350. />
  1351. </div>
  1352. </TabPane>
  1353. <TabPane tab="搜索" key="2">
  1354. <div style={{ marginLeft: 10 }}>
  1355. <SearchInput search={this.search} default={data || '1'} />
  1356. </div>
  1357. </TabPane>
  1358. <TabPane tab="打印" key="3">
  1359. <Button
  1360. type="primary"
  1361. style={{ margin: "11px 0px 10px 10px" }}
  1362. onClick={this.printAll}
  1363. disabled={!this.state.dataSource.length}
  1364. >
  1365. 打印所有列表信息
  1366. </Button>
  1367. </TabPane>
  1368. <TabPane tab="导出Excel" key="4">
  1369. <Button
  1370. type="primary"
  1371. style={{ margin: "11px 0px 10px 10px" }}
  1372. onClick={this.exportAll}
  1373. >
  1374. 导出当前列表
  1375. </Button>
  1376. </TabPane>
  1377. {/* <TabPane tab="批量操作" key="6">
  1378. <Button
  1379. type="primary"
  1380. disabled={this.state.selectedRowKeys.length == 0}
  1381. style={{ margin: "0px 0px 10px 10px" }}
  1382. onClick={e => {
  1383. e.stopPropagation(),
  1384. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1385. }}
  1386. >
  1387. 转交
  1388. </Button>
  1389. </TabPane> */}
  1390. </Tabs>
  1391. <div className="patent-table">
  1392. <Spin spinning={this.state.loading}>
  1393. <Table
  1394. bordered
  1395. columns={
  1396. this.state.changeList == undefined
  1397. ? this.state.columns
  1398. : this.state.changeList
  1399. }
  1400. scroll={{ x: "max-content", y: 0 }}
  1401. dataSource={this.state.dataSource}
  1402. pagination={this.state.pagination}
  1403. onRowClick={this.tableRowClick}
  1404. // scroll={{ y: 140 }}
  1405. size="small"
  1406. />
  1407. </Spin>
  1408. </div>
  1409. {
  1410. this.state.visible &&
  1411. <Modal
  1412. className="customeDetails"
  1413. footer=""
  1414. maskClosable={false}
  1415. width="1200px"
  1416. visible={this.state.visible}
  1417. onOk={this.visitOk}
  1418. onCancel={this.visitCancel}
  1419. >
  1420. <Tabs
  1421. activeKey={this.state.activeKey}
  1422. onChange={this.callback}
  1423. type="card"
  1424. >
  1425. <TabPane tab="订单详情" key="a">
  1426. <Form
  1427. layout="horizontal"
  1428. onSubmit={this.handleSubmit}
  1429. id="demand-form"
  1430. style={{ paddingBottom: "40px" }}
  1431. >
  1432. <Spin spinning={this.state.loading}>
  1433. {
  1434. this.state.activeKey == "a" &&
  1435. <OrderDetail
  1436. domId='dingdanxiangqing'
  1437. orderData={this.state.orderData}
  1438. getOrderLog={this.getOrderLog}
  1439. dataSourceX={this.state.dataSourceX}
  1440. contactList={this.state.contactList}
  1441. orderNo={this.state.orderNo}
  1442. totalCui={this.state.totalCui}
  1443. contactListNew={this.state.contactListNew}
  1444. pictureUrl={this.state.contractPictureUrl}
  1445. isCaiWu={true}
  1446. />
  1447. }
  1448. </Spin>
  1449. </Form>
  1450. </TabPane>
  1451. {tabList.map((item, index, arr) => {
  1452. return (
  1453. <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
  1454. {
  1455. this.state.activeKey == item.id &&
  1456. <ChangeDetail
  1457. domId={'hetongbiangenjilu' + (index + 1)}
  1458. id={item.id}
  1459. money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
  1460. data={this.state.contractData}
  1461. // loadData={this.ChangeDetail}
  1462. txt={this.state.processStateText}
  1463. pictureUrl={this.state.voucherUrl}
  1464. contractPictureUrl={this.state.contractPictureUrl}
  1465. attachment={this.state.attachment}
  1466. processState={this.props.processState}
  1467. loadData={this.callback}
  1468. reset={this.state.visible}
  1469. dataSource={this.state.dataProps}
  1470. proceedsData={this.state.proceedsData}
  1471. proceedsTotal={this.state.proTotal}
  1472. invoiceTotal={this.state.invTotal}
  1473. contactList={this.state.refundInvoice}
  1474. onCancel={this.visitCancel}
  1475. />
  1476. }
  1477. </TabPane>
  1478. );
  1479. })}
  1480. {tabList.map((item, index) => {
  1481. if (item.usedOrder) {
  1482. return (
  1483. <TabPane
  1484. tab={"原订单" + (tabList.length - index)}
  1485. key={item.usedOrder}
  1486. >
  1487. {
  1488. this.state.activeKey == item.usedOrder &&
  1489. <Form
  1490. layout="horizontal"
  1491. onSubmit={this.handleSubmit}
  1492. id="demand-form"
  1493. style={{ paddingBottom: "40px" }}
  1494. >
  1495. <Spin spinning={this.state.loading}>
  1496. {
  1497. this.state.activeKey == item.usedOrder &&
  1498. <OrderDetail
  1499. domId={'yuandingdan' + (index + 1)}
  1500. orderData={this.state.primaryOrderData}
  1501. getOrderLog={this.getOrderLog}
  1502. dataSourceX={this.state.dataSourceX}
  1503. contactList={this.state.contactList}
  1504. orderNo={this.state.primaryOrderNo}
  1505. totalCui={this.state.totalCui}
  1506. contactListNew={this.state.contactListNew}
  1507. isCaiWu={true}
  1508. />
  1509. }
  1510. </Spin>
  1511. </Form>
  1512. }
  1513. </TabPane>
  1514. );
  1515. } else {
  1516. return "";
  1517. }
  1518. })}
  1519. {this.state.status === 4 && this.state.isAddition ? (
  1520. this.state.type === 4 || this.state.type === 5 ? (
  1521. <TabPane tab="附加订单" key="c">
  1522. <OrderDetail
  1523. domId='fujiadingdan'
  1524. orderData={this.state.additionalOrderData}
  1525. getOrderLog={this.getOrderLog}
  1526. dataSourceX={this.state.dataSourceX}
  1527. contactList={this.state.contactList}
  1528. totalCui={this.state.totalCui}
  1529. contactListNew={this.state.contactListNew}
  1530. orderNo={this.state.additionalOrder}
  1531. isCaiWu={true}
  1532. />
  1533. </TabPane>
  1534. ) : (
  1535. ""
  1536. )
  1537. ) : (
  1538. ""
  1539. )}
  1540. </Tabs>
  1541. </Modal>
  1542. }
  1543. <Modal
  1544. maskClosable={false}
  1545. visible={this.state.noVisible}
  1546. onOk={this.handleOk}
  1547. onCancel={this.noCancel}
  1548. width="400px"
  1549. title={"拒绝理由"}
  1550. footer=""
  1551. className="admin-desc-content"
  1552. confirmLoading={this.state.confirmLoading}
  1553. >
  1554. <Form layout="horizontal" id="demand-form">
  1555. <Spin spinning={this.state.loading}>
  1556. <div className="clearfix">
  1557. <FormItem
  1558. labelCol={{ span: 4 }}
  1559. wrapperCol={{ span: 16 }}
  1560. label="拒绝理由"
  1561. >
  1562. <Input
  1563. type="textarea"
  1564. placeholder="请输入拒绝理由"
  1565. rows={4}
  1566. value={this.state.reason}
  1567. onChange={e => {
  1568. this.setState({ reason: e.target.value });
  1569. }}
  1570. />
  1571. </FormItem>
  1572. </div>
  1573. <div className="clearfix">
  1574. <Button
  1575. className="cancel"
  1576. type="primary"
  1577. onClick={this.examOks}
  1578. style={{ marginLeft: "50px" }}
  1579. htmlType="submit"
  1580. loading={this.state.aloading}
  1581. >
  1582. 确定
  1583. </Button>
  1584. <Button
  1585. className="cancel"
  1586. type="ghost"
  1587. onClick={this.noCancel}
  1588. style={{ marginLeft: "50px" }}
  1589. >
  1590. 取消
  1591. </Button>
  1592. </div>
  1593. </Spin>
  1594. </Form>
  1595. </Modal>
  1596. {/* <Modal
  1597. visible={this.state.rizhivisible}
  1598. className="admin-desc-content"
  1599. width="800px"
  1600. maskClosable={false}
  1601. title="订单日志"
  1602. footer={null}
  1603. onCancel={this.closeOrderLog}
  1604. >
  1605. <div className="patent-table">
  1606. <Spin spinning={this.state.loading}>
  1607. <Table
  1608. bordered
  1609. columns={this.state.columnsrizhi}
  1610. dataSource={this.state.dataSourcerizhi}
  1611. pagination={false}
  1612. />
  1613. </Spin>
  1614. </div>
  1615. </Modal> */}
  1616. <OrderRiZi
  1617. dataSourcerizhi={this.state.dataSourcerizhi}
  1618. closeOrderLog={this.closeOrderLog}
  1619. visible={this.state.rizhivisible}
  1620. loading={this.state.loading}
  1621. />
  1622. <Modal
  1623. visible={this.state.dvisible}
  1624. footer=""
  1625. title="所有列表信息"
  1626. className="admin-desc-content"
  1627. width="1300px"
  1628. onCancel={() => {
  1629. this.setState({
  1630. dvisible: false
  1631. });
  1632. this.state.pagination.pageSize = 10;
  1633. this.setState({
  1634. pagination: this.state.pagination
  1635. });
  1636. this.loadData();
  1637. }}
  1638. >
  1639. <Spin spinning={this.state.loading}>
  1640. <div
  1641. className="patent-table"
  1642. style={{
  1643. // width: 900,
  1644. // position: "relative",
  1645. // left: "50%",
  1646. // transform: "translate(-50%)",
  1647. padding: "25px 30px 30px 30px"
  1648. }}
  1649. ref={e => {
  1650. this.refs.all = e;
  1651. }}
  1652. >
  1653. <Table
  1654. columns={this.state.columns}
  1655. dataSource={this.state.dataSource}
  1656. pagination={false}
  1657. bordered
  1658. size="small"
  1659. />
  1660. </div>
  1661. </Spin>
  1662. <ReactToPrint
  1663. trigger={() => (
  1664. <Button
  1665. type="primary"
  1666. style={{
  1667. float: "right",
  1668. marginTop: 10,
  1669. position: "absolute",
  1670. top: 0,
  1671. right: 30
  1672. }}
  1673. >
  1674. 打印
  1675. </Button>
  1676. )}
  1677. content={() => this.refs.all}
  1678. />
  1679. </Modal>
  1680. </div>
  1681. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1682. infor={this.state.dataInfor}
  1683. visible={this.state.addnextVisible}
  1684. onCancel={this.nextCancel}
  1685. />} */}
  1686. {
  1687. // 项目业务详情
  1688. this.state.addnextVisible &&
  1689. <NewEditProject
  1690. readOnly={true}
  1691. visible={this.state.addnextVisible}
  1692. dataInfor={this.state.dataInfor}
  1693. onCancel={this.nextCancel}
  1694. />
  1695. }
  1696. </div>
  1697. );
  1698. }
  1699. })
  1700. );
  1701. export default contractChange;