outsourcingList.jsx 63 KB

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