checkOutsourcing.jsx 68 KB

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