outsourcingList.jsx 63 KB

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