outsourcingList.jsx 60 KB

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