checkOutsourcing.jsx 67 KB

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