checkOutsourcing.jsx 67 KB

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