checkOutsourcing.jsx 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062
  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. maskClosable={false}
  1245. footer=""
  1246. width="900px"
  1247. visible={this.state.visible}
  1248. onOk={this.visitOk}
  1249. onCancel={this.visitCancel}
  1250. >
  1251. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1252. <TabPane tab="订单详情" key="1">
  1253. {this.state.activeKey === '1' ? <Form
  1254. layout="horizontal"
  1255. onSubmit={this.handleSubmit}
  1256. id="demand-form"
  1257. style={{ paddingBottom: '40px' }}
  1258. >
  1259. <Spin spinning={this.state.loading}>
  1260. <div className="clearfix">
  1261. <FormItem
  1262. className="half-item"
  1263. {...formItemLayout}
  1264. label="订单编号"
  1265. >
  1266. <span>{this.state.orderNo}</span>
  1267. </FormItem>
  1268. <FormItem
  1269. className="half-item"
  1270. {...formItemLayout}
  1271. label="合同编号"
  1272. >
  1273. <span>{this.state.contractNo}</span>
  1274. </FormItem>
  1275. <FormItem
  1276. className="half-item"
  1277. {...formItemLayout}
  1278. label="客户名称"
  1279. >
  1280. <span>{this.state.userName}</span>
  1281. </FormItem>
  1282. <FormItem
  1283. className="half-item"
  1284. {...formItemLayout}
  1285. label="合同签订时间"
  1286. >
  1287. <span>{this.state.signDate}</span>
  1288. </FormItem>
  1289. <FormItem
  1290. className="half-item"
  1291. {...formItemLayout}
  1292. label="流程状态"
  1293. >
  1294. <span>
  1295. {getProcessStatus(this.state.processStatus)}
  1296. </span>
  1297. </FormItem>
  1298. <FormItem
  1299. className="half-item"
  1300. {...formItemLayout}
  1301. label="结算状态"
  1302. >
  1303. <span>
  1304. {getLiquidationStatus(this.state.liquidationStatus)}
  1305. </span>
  1306. </FormItem>
  1307. <FormItem
  1308. className="half-item"
  1309. {...formItemLayout}
  1310. label="企业联系人"
  1311. >
  1312. <span>{this.state.contacts}</span>
  1313. </FormItem>
  1314. <FormItem
  1315. className="half-item"
  1316. {...formItemLayout}
  1317. label="联系人电话"
  1318. >
  1319. <span>{this.state.contactMobile}</span>
  1320. </FormItem>
  1321. <FormItem
  1322. className="half-item"
  1323. {...formItemLayout}
  1324. label="企业法人"
  1325. >
  1326. <span>{this.state.legalPerson}</span>
  1327. </FormItem>
  1328. <FormItem
  1329. className="half-item"
  1330. {...formItemLayout}
  1331. label="法人电话"
  1332. >
  1333. <span>{this.state.legalPersonTel}</span>
  1334. </FormItem>
  1335. <FormItem
  1336. className="half-item"
  1337. {...formItemLayout}
  1338. label="签单金额(万元)"
  1339. >
  1340. <span>{this.state.totalAmount}</span>
  1341. </FormItem>
  1342. <FormItem
  1343. className="half-item"
  1344. {...formItemLayout}
  1345. label="首付金额(万元)"
  1346. >
  1347. <span>{this.state.firstAmount}</span>
  1348. </FormItem>
  1349. <FormItem
  1350. className="half-item"
  1351. {...formItemLayout}
  1352. label="特批立项"
  1353. >
  1354. <span>{getApprovedState(this.state.approval)}</span>
  1355. </FormItem>
  1356. <FormItem
  1357. className="half-item"
  1358. {...formItemLayout}
  1359. label="已收款项(万元)"
  1360. >
  1361. <span>{this.state.settlementAmount}</span>
  1362. </FormItem>
  1363. <FormItem
  1364. className="half-item"
  1365. {...formItemLayout}
  1366. label="订单部门"
  1367. >
  1368. <span>{this.state.depName}</span>
  1369. </FormItem>
  1370. <FormItem
  1371. className="half-item"
  1372. {...formItemLayout}
  1373. label="是否外包"
  1374. >
  1375. <span>{this.state.outsource}</span>
  1376. </FormItem>
  1377. <div className="clearfix">
  1378. <FormItem
  1379. labelCol={{ span: 4 }}
  1380. wrapperCol={{ span: 16 }}
  1381. label="订单留言"
  1382. >
  1383. <span>{this.state.orderRemarks}</span>
  1384. </FormItem>
  1385. </div>
  1386. <div className="clearfix">
  1387. <FormItem
  1388. labelCol={{ span: 4 }}
  1389. wrapperCol={{ span: 18 }}
  1390. label="合同扫描件"
  1391. >
  1392. {/*<Upload*/}
  1393. {/* className="demandDetailShow-upload"*/}
  1394. {/* listType="picture-card"*/}
  1395. {/* fileList={this.state.orgCodeUrl}*/}
  1396. {/* onPreview={(file) => {*/}
  1397. {/* this.setState({*/}
  1398. {/* previewImage: file.url || file.thumbUrl,*/}
  1399. {/* previewVisible: true,*/}
  1400. {/* })*/}
  1401. {/* }}*/}
  1402. {/*/>*/}
  1403. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1404. {this.state.orgCodeUrl && this.state.visible ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>: <div/>}
  1405. </div>
  1406. <Modal
  1407. maskClosable={false}
  1408. footer={null}
  1409. width={'50%'}
  1410. visible={this.state.previewVisible}
  1411. onCancel={() => {
  1412. this.setState({
  1413. previewVisible: false,
  1414. rotateDeg: 0,
  1415. })
  1416. }}
  1417. >
  1418. <img
  1419. alt=""
  1420. style={{
  1421. width: '100%',
  1422. transform: `rotate(${this.state.rotateDeg}deg)`,
  1423. }}
  1424. src={this.state.previewImage || ''}
  1425. />
  1426. <Button
  1427. onClick={this.rotate}
  1428. style={{
  1429. position: 'relative',
  1430. left: '50%',
  1431. transform: 'translateX(-50%)',
  1432. }}
  1433. >
  1434. 旋转
  1435. </Button>
  1436. <Button
  1437. onClick={this.upImg}
  1438. style={{
  1439. position: 'absolute',
  1440. left: -81,
  1441. top: '50%',
  1442. transform: 'translateY(-50%)',
  1443. }}
  1444. >
  1445. 上一张
  1446. </Button>
  1447. <Button
  1448. onClick={this.downImg}
  1449. style={{
  1450. position: 'absolute',
  1451. right: -81,
  1452. top: '50%',
  1453. transform: 'translateY(-50%)',
  1454. }}
  1455. >
  1456. 下一张
  1457. </Button>
  1458. </Modal>
  1459. <Button
  1460. style={{
  1461. float: 'right',
  1462. marginRight: '140px',
  1463. marginTop: '20px',
  1464. }}
  1465. onClick={this.getOrderLog}
  1466. >
  1467. 查看订单日志
  1468. </Button>
  1469. </FormItem>
  1470. <FormItem
  1471. labelCol={{ span: 4 }}
  1472. wrapperCol={{ span: 18 }}
  1473. label="补充协议"
  1474. >
  1475. {/*<Upload*/}
  1476. {/* className="demandDetailShow-upload"*/}
  1477. {/* listType="picture-card"*/}
  1478. {/* fileList={this.state.replenishUrl}*/}
  1479. {/* onPreview={(file) => {*/}
  1480. {/* this.setState({*/}
  1481. {/* previewImage: file.url || file.thumbUrl,*/}
  1482. {/* previewVisibles: true,*/}
  1483. {/* })*/}
  1484. {/* }}*/}
  1485. {/*/>*/}
  1486. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1487. {this.state.replenishUrl && this.state.visible ? <ImgList domId={'checkOutsourcing1'} fileList={this.state.replenishUrl} ItemWidth={'96px'}/>: <div/>}
  1488. </div>
  1489. <Modal
  1490. maskClosable={false}
  1491. footer={null}
  1492. width={'50%'}
  1493. visible={this.state.previewVisibles}
  1494. onCancel={() => {
  1495. this.setState({
  1496. previewVisibles: false,
  1497. rotateDeg: 0,
  1498. })
  1499. }}
  1500. >
  1501. <img
  1502. alt=""
  1503. style={{
  1504. width: '100%',
  1505. transform: `rotate(${this.state.rotateDeg}deg)`,
  1506. }}
  1507. src={this.state.previewImage || ''}
  1508. />
  1509. <Button
  1510. onClick={this.rotates}
  1511. style={{
  1512. position: 'relative',
  1513. left: '50%',
  1514. transform: 'translateX(-50%)',
  1515. }}
  1516. >
  1517. 旋转
  1518. </Button>
  1519. <Button
  1520. onClick={this.upImgs}
  1521. style={{
  1522. position: 'absolute',
  1523. left: -81,
  1524. top: '50%',
  1525. transform: 'translateY(-50%)',
  1526. }}
  1527. >
  1528. 上一张
  1529. </Button>
  1530. <Button
  1531. onClick={this.downImgs}
  1532. style={{
  1533. position: 'absolute',
  1534. right: -81,
  1535. top: '50%',
  1536. transform: 'translateY(-50%)',
  1537. }}
  1538. >
  1539. 下一张
  1540. </Button>
  1541. </Modal>
  1542. </FormItem>
  1543. </div>
  1544. <div className="clearfix">
  1545. <FormItem
  1546. className="half-item"
  1547. {...formItemLayout}
  1548. label="订单负责人"
  1549. >
  1550. <span>{this.state.salesmanName}</span>
  1551. </FormItem>
  1552. <FormItem
  1553. className="half-item"
  1554. {...formItemLayout}
  1555. label="订单负责人电话"
  1556. >
  1557. <span>{this.state.salesmanMobile}</span>
  1558. </FormItem>
  1559. </div>
  1560. <div className="clearfix">
  1561. <FormItem
  1562. className="half-item"
  1563. {...formItemLayout}
  1564. label="当前财务负责人"
  1565. >
  1566. <span>{this.state.nowFinance}</span>
  1567. </FormItem>
  1568. <FormItem
  1569. className="half-item"
  1570. {...formItemLayout}
  1571. label="当前财务负责人电话"
  1572. >
  1573. <span>{this.state.nowFinanceMobile}</span>
  1574. </FormItem>
  1575. </div>
  1576. <div className="clearfix">
  1577. <FormItem
  1578. className="half-item"
  1579. {...formItemLayout}
  1580. style={{ opacity: '.5' }}
  1581. label="原订单负责人"
  1582. >
  1583. <span>{this.state.oldSalesmanName}</span>
  1584. </FormItem>
  1585. <FormItem
  1586. className="half-item"
  1587. {...formItemLayout}
  1588. style={{ opacity: '.5' }}
  1589. label="原订单负责人电话"
  1590. >
  1591. <span>{this.state.oldSalesmanMobile}</span>
  1592. </FormItem>
  1593. </div>
  1594. <div className="clearfix">
  1595. <FormItem
  1596. className="half-item"
  1597. style={{ opacity: '.5' }}
  1598. {...formItemLayout}
  1599. label="实际财务操作人"
  1600. >
  1601. <span>{this.state.financeName}</span>
  1602. </FormItem>
  1603. <FormItem
  1604. className="half-item"
  1605. {...formItemLayout}
  1606. style={{ opacity: '.5' }}
  1607. label="实际财务操作人电话"
  1608. >
  1609. <span>{this.state.financeMobile}</span>
  1610. </FormItem>
  1611. </div>
  1612. <div>
  1613. <span style={{ marginLeft: '50px', fontSize: '20px' }}>
  1614. 项目业务
  1615. </span>
  1616. {this.state.processStatus == 0 ? (
  1617. <Button
  1618. type="primary"
  1619. onClick={this.addDetailed}
  1620. style={{
  1621. float: 'right',
  1622. marginRight: '50px',
  1623. marginBottom: '15px',
  1624. }}
  1625. >
  1626. 添加项目明细
  1627. </Button>
  1628. ) : (
  1629. ''
  1630. )}
  1631. </div>
  1632. <div className="patent-table">
  1633. <Spin spinning={this.state.loading}>
  1634. <Table
  1635. columns={this.state.columnsX}
  1636. dataSource={this.state.dataSourceX}
  1637. pagination={this.state.paginations}
  1638. onRowClick={this.tableRowClickX}
  1639. bordered
  1640. size="small"
  1641. />
  1642. </Spin>
  1643. </div>
  1644. <div>
  1645. <span style={{ marginLeft: 20, fontSize: '18px' }}>
  1646. 催款节点
  1647. </span>
  1648. <span
  1649. style={{
  1650. display: cuiDataList.length
  1651. ? 'none'
  1652. : 'inline-block',
  1653. marginLeft: 10,
  1654. color: 'red',
  1655. }}
  1656. >
  1657. 金额总计(万元): {this.state.totalCui}
  1658. </span>
  1659. </div>
  1660. <div className="clearfix">
  1661. <Spin spinning={this.state.loading}>
  1662. <Form layout="horizontal" id="demand-form">
  1663. <Table
  1664. pagination={false}
  1665. bordered
  1666. size="small"
  1667. columns={
  1668. cuiDataList.length
  1669. ? this.state.ContactsLists
  1670. : this.state.ContactsListsNew
  1671. }
  1672. dataSource={
  1673. cuiDataList.length
  1674. ? this.state.contactList
  1675. : this.state.contactListNew
  1676. }
  1677. />
  1678. <Col
  1679. span={24}
  1680. offset={9}
  1681. style={{ marginTop: '15px' }}
  1682. />
  1683. </Form>
  1684. </Spin>
  1685. </div>
  1686. </div>
  1687. </Spin>
  1688. </Form> : <div/>}
  1689. </TabPane>
  1690. <TabPane tab="外包(不走总部)" key="2">
  1691. {this.state.activeKey === '2' ? <div>
  1692. <div className="clearfix">
  1693. <FormItem
  1694. className="half-item"
  1695. {...formItemLayout}
  1696. label="外包公司"
  1697. >
  1698. <span>{this.state.companyName}</span>
  1699. </FormItem>
  1700. </div>
  1701. <div className="clearfix">
  1702. <FormItem
  1703. className="half-item"
  1704. {...formItemLayout}
  1705. label="单价(万元)"
  1706. >
  1707. <span>{this.state.unitPrice}</span>
  1708. </FormItem>
  1709. </div>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. className="half-item"
  1713. {...formItemLayout}
  1714. label="数量(个)"
  1715. >
  1716. <span>{this.state.unitNumber}</span>
  1717. </FormItem>
  1718. </div>
  1719. <div className="clearfix">
  1720. <FormItem
  1721. className="half-item"
  1722. {...formItemLayout}
  1723. label="总金额(万元)"
  1724. >
  1725. <span>{this.state.amount}</span>
  1726. </FormItem>
  1727. </div>
  1728. <div className="clearfix">
  1729. <FormItem
  1730. className="half-item"
  1731. {...formItemLayout}
  1732. label="备注"
  1733. >
  1734. <span>{this.state.outsourceRemarks}</span>
  1735. </FormItem>
  1736. </div>
  1737. {/*<div className="clearfix">
  1738. <FormItem className="half-item" style={{height:'auto'}}
  1739. {...formItemLayout}
  1740. label="上传协议文件" >
  1741. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1742. data={(e)=>{
  1743. return {
  1744. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1745. }
  1746. }}
  1747. fileList={this.state.attachmentUrl}
  1748. showUploadList={{showRemoveIcon:false}}
  1749. onPreview={(e)=>{
  1750. let url = window.location.href.substring(7)
  1751. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1752. }}
  1753. >
  1754. </Upload>
  1755. </FormItem>
  1756. </div>*/}
  1757. <div className="clearfix">
  1758. <FormItem
  1759. labelCol={{ span: 4 }}
  1760. wrapperCol={{ span: 18 }}
  1761. label="合同/协议扫描件"
  1762. >
  1763. {/*<Upload*/}
  1764. {/* className="demandDetailShow-upload"*/}
  1765. {/* listType="picture-card"*/}
  1766. {/* fileList={this.state.pictureUrl}*/}
  1767. {/* onPreview={(file) => {*/}
  1768. {/* this.setState({*/}
  1769. {/* previewImage: file.url || file.thumbUrl,*/}
  1770. {/* previewVisible: true,*/}
  1771. {/* })*/}
  1772. {/* }}*/}
  1773. {/*/>*/}
  1774. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1775. {this.state.pictureUrl && this.state.visible ? <ImgList domId={'checkOutsourcing2'} fileList={this.state.pictureUrl} ItemWidth={'96px'}/>: <div/>}
  1776. </div>
  1777. <Modal
  1778. maskClosable={false}
  1779. footer={null}
  1780. width={'50%'}
  1781. visible={this.state.previewVisible}
  1782. onCancel={() => {
  1783. this.setState({ previewVisible: false, rotateDeg: 0 })
  1784. }}
  1785. >
  1786. <img
  1787. alt=""
  1788. style={{
  1789. width: '100%',
  1790. transform: `rotate(${this.state.rotateDeg}deg)`,
  1791. }}
  1792. src={this.state.previewImage || ''}
  1793. />
  1794. <Button
  1795. onClick={this.rotate}
  1796. style={{
  1797. position: 'relative',
  1798. left: '50%',
  1799. transform: 'translateX(-50%)',
  1800. }}
  1801. >
  1802. 旋转
  1803. </Button>
  1804. <Button
  1805. onClick={this.upImg}
  1806. style={{
  1807. position: 'absolute',
  1808. left: -81,
  1809. top: '50%',
  1810. transform: 'translateY(-50%)',
  1811. }}
  1812. >
  1813. 上一张
  1814. </Button>
  1815. <Button
  1816. onClick={this.downImg}
  1817. style={{
  1818. position: 'absolute',
  1819. right: -81,
  1820. top: '50%',
  1821. transform: 'translateY(-50%)',
  1822. }}
  1823. >
  1824. 下一张
  1825. </Button>
  1826. </Modal>
  1827. </FormItem>
  1828. </div>
  1829. {!this.state.refundStatus ? (
  1830. <div>
  1831. <hr className="division" />
  1832. <div className="clearfix" style={{ marginTop: '20px' }}>
  1833. <FormItem
  1834. labelCol={{ span: 4 }}
  1835. wrapperCol={{ span: 18 }}
  1836. label={
  1837. <span>
  1838. <strong style={{ color: '#f00' }}>*</strong>
  1839. 审核意见
  1840. </span>
  1841. }
  1842. >
  1843. <Input
  1844. type="textarea"
  1845. placeholder="请输入备注"
  1846. rows={4}
  1847. value={this.state.remarks}
  1848. onChange={(e) => {
  1849. this.setState({ remarks: e.target.value })
  1850. }}
  1851. style={{ width: '440px' }}
  1852. />
  1853. <span
  1854. className="tip"
  1855. style={{
  1856. width: '160px',
  1857. verticalAlign: 'top',
  1858. display: 'inline-block',
  1859. marginLeft: '10px',
  1860. }}
  1861. >
  1862. 通过或驳回都必须填写审核意见!
  1863. </span>
  1864. </FormItem>
  1865. </div>
  1866. <div className="clearfix fa">
  1867. <Button
  1868. type="danger"
  1869. onClick={this.refuse}
  1870. style={{ color: '#fff', backgroundColor: '#f04134' }}
  1871. >
  1872. 驳回
  1873. </Button>
  1874. <Button type="primary" onClick={this.pass}>
  1875. 通过
  1876. </Button>
  1877. </div>
  1878. </div>
  1879. ) : (
  1880. <div className="clearfix">
  1881. <hr className="division" />
  1882. <div className="clearfix">
  1883. <FormItem
  1884. className="half-item"
  1885. {...formItemLayout}
  1886. label="审核意见"
  1887. >
  1888. <span>{this.state.remarks}</span>
  1889. </FormItem>
  1890. </div>
  1891. <div className="clearfix">
  1892. <FormItem
  1893. className="half-item"
  1894. {...formItemLayout}
  1895. label="审核结果"
  1896. >
  1897. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1898. </FormItem>
  1899. </div>
  1900. <div className="clearfix">
  1901. <FormItem
  1902. className="half-item"
  1903. {...formItemLayout}
  1904. label="审核时间"
  1905. >
  1906. <span>{this.state.auditTimes}</span>
  1907. </FormItem>
  1908. </div>
  1909. </div>
  1910. )}
  1911. </div> : <div/>}
  1912. </TabPane>
  1913. </Tabs>
  1914. </Modal> : <div/>}
  1915. <Modal
  1916. maskClosable={false}
  1917. visible={this.state.addnextVisible}
  1918. onOk={this.nextCancel}
  1919. onCancel={this.nextCancel}
  1920. confirmLoading={this.state.confirmLoading}
  1921. width="800px"
  1922. title={'项目任务详情'}
  1923. footer=""
  1924. className="admin-desc-content"
  1925. >
  1926. <Form layout="horizontal" id="demand-form">
  1927. <Spin spinning={this.state.loading}>
  1928. <div className="clearfix">
  1929. <FormItem
  1930. className="half-item"
  1931. {...formItemLayout}
  1932. label="项目名称"
  1933. >
  1934. <span>{this.state.commodityName}</span>
  1935. </FormItem>
  1936. <FormItem
  1937. className="half-item"
  1938. {...formItemLayout}
  1939. label="项目数量"
  1940. >
  1941. <span>{this.state.commodityQuantity}</span>
  1942. </FormItem>
  1943. <FormItem
  1944. className="half-item"
  1945. {...formItemLayout}
  1946. label="金额(万元)"
  1947. >
  1948. <span>{this.state.commodityPrice}</span>
  1949. </FormItem>
  1950. <FormItem
  1951. className="half-item"
  1952. {...formItemLayout}
  1953. label="主要项目"
  1954. >
  1955. <span>{getboutique(this.state.main)}</span>
  1956. </FormItem>
  1957. <div className="clearfix">
  1958. <FormItem
  1959. labelCol={{ span: 4 }}
  1960. wrapperCol={{ span: 16 }}
  1961. label="服务说明"
  1962. >
  1963. <span>{this.state.taskComment}</span>
  1964. </FormItem>
  1965. </div>
  1966. </div>
  1967. </Spin>
  1968. </Form>
  1969. </Modal>
  1970. <Modal
  1971. maskClosable={false}
  1972. visible={this.state.noVisible}
  1973. onOk={this.handleOk}
  1974. onCancel={this.noCancel}
  1975. width="400px"
  1976. title={'拒绝理由'}
  1977. footer=""
  1978. className="admin-desc-content"
  1979. confirmLoading={this.state.confirmLoading}
  1980. >
  1981. <Form layout="horizontal" id="demand-form">
  1982. <Spin spinning={this.state.loading}>
  1983. <div className="clearfix">
  1984. <FormItem
  1985. labelCol={{ span: 4 }}
  1986. wrapperCol={{ span: 16 }}
  1987. label="拒绝理由"
  1988. >
  1989. <Input
  1990. type="textarea"
  1991. placeholder="请输入拒绝理由"
  1992. rows={4}
  1993. value={this.state.reason}
  1994. onChange={(e) => {
  1995. this.setState({ reason: e.target.value })
  1996. }}
  1997. />
  1998. </FormItem>
  1999. </div>
  2000. <div className="clearfix">
  2001. <Button
  2002. className="cancel"
  2003. type="primary"
  2004. onClick={this.examOks}
  2005. style={{ marginLeft: '50px' }}
  2006. htmlType="submit"
  2007. loading={this.state.aloading}
  2008. >
  2009. 确定
  2010. </Button>
  2011. <Button
  2012. className="cancel"
  2013. type="ghost"
  2014. onClick={this.noCancel}
  2015. style={{ marginLeft: '50px' }}
  2016. >
  2017. 取消
  2018. </Button>
  2019. </div>
  2020. </Spin>
  2021. </Form>
  2022. </Modal>
  2023. {this.state.rizhivisible ? <Modal
  2024. visible={this.state.rizhivisible}
  2025. className="admin-desc-content"
  2026. width="800px"
  2027. maskClosable={false}
  2028. title="订单日志"
  2029. footer={null}
  2030. onCancel={this.closeOrderLog}
  2031. >
  2032. <div className="patent-table">
  2033. <Spin spinning={this.state.loading}>
  2034. <Table
  2035. columns={this.state.columnsrizhi}
  2036. dataSource={this.state.dataSourcerizhi}
  2037. pagination={false}
  2038. bordered
  2039. size="small"
  2040. />
  2041. </Spin>
  2042. </div>
  2043. </Modal> : <div/>}
  2044. </div>
  2045. )
  2046. },
  2047. })
  2048. )
  2049. export default checkOutsourcing