outsourcingList.jsx 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830
  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. });
  443. }
  444. }.bind(this)
  445. }).always(
  446. function() {
  447. this.setState({
  448. loading: false
  449. });
  450. }.bind(this)
  451. );
  452. },
  453. //项目列表
  454. xiangmu(orderNos) {
  455. $.ajax({
  456. method: "get",
  457. dataType: "json",
  458. crossDomain: false,
  459. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  460. data: {
  461. orderNo: orderNos
  462. },
  463. success: function(data) {
  464. let theArr = [];
  465. if (data.error.length || data.data.list == "") {
  466. if (data.error && data.error.length) {
  467. message.warning(data.error[0].message);
  468. }
  469. } else {
  470. for (let i = 0; i < data.data.length; i++) {
  471. let thisdata = data.data[i];
  472. theArr.push({
  473. key: i,
  474. id: thisdata.id,
  475. orderNo: thisdata.orderNo, //订单编号
  476. commodityId: thisdata.commodityId, //项目ID
  477. commodityName: thisdata.commodityName, //项目名称
  478. cname: thisdata.cname, //项目类别
  479. commodityPrice: thisdata.commodityPrice, //项目价格
  480. commodityQuantity: thisdata.commodityQuantity, //项目数量
  481. main: thisdata.main, //是否为主要任务
  482. taskComment: thisdata.taskComment, //任务说明
  483. contacts: thisdata.contacts, //联系人
  484. contactsMobile: thisdata.contactsMobile, //联系人电话
  485. projectStatus: thisdata.projectStatus //项目状态
  486. });
  487. }
  488. }
  489. this.setState({
  490. dataSourceX: theArr
  491. });
  492. }.bind(this)
  493. }).always(
  494. function() {
  495. this.setState({
  496. loading: false
  497. });
  498. }.bind(this)
  499. );
  500. },
  501. rizhi() {
  502. this.setState({
  503. loading: true
  504. });
  505. $.ajax({
  506. method: "get",
  507. dataType: "json",
  508. crossDomain: false,
  509. url: "/api/admin/newOrder/selectOrderLog",
  510. data: {
  511. orderNo: this.state.orderNo
  512. },
  513. success: function(data) {
  514. let theArr = [];
  515. let thisData = data.data;
  516. if (!thisData.length) {
  517. if (data.error && data.error.length) {
  518. message.warning(data.error[0].message);
  519. }
  520. thisData = {};
  521. } else {
  522. for (let i = 0; i < data.data.length; i++) {
  523. let thisdata = data.data[i];
  524. theArr.push({
  525. processName: thisdata.processName,
  526. adminName: thisdata.adminName,
  527. createDate: thisdata.createDate
  528. });
  529. }
  530. }
  531. this.setState({
  532. dataSourcerizhi: theArr
  533. });
  534. }.bind(this)
  535. }).always(
  536. function() {
  537. this.setState({
  538. loading: false
  539. });
  540. }.bind(this)
  541. );
  542. },
  543. getOrderLog() {
  544. this.setState({
  545. rizhivisible: true
  546. });
  547. this.rizhi();
  548. },
  549. closeOrderLog() {
  550. this.setState({
  551. rizhivisible: false
  552. });
  553. },
  554. //节点列表
  555. jiedian(orderNos) {
  556. $.ajax({
  557. method: "get",
  558. dataType: "json",
  559. crossDomain: false,
  560. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  561. data: {
  562. orderNo: orderNos
  563. },
  564. success: function(data) {
  565. let theArr = [];
  566. let thisData = [];
  567. if (data.error.length || data.data.list == "") {
  568. if (data.error && data.error.length) {
  569. message.warning(data.error[0].message);
  570. }
  571. } else {
  572. for (let i = 0; i < data.data.length; i++) {
  573. thisData = data.data[i];
  574. theArr.push({
  575. key: i,
  576. dunSubject: thisData.dunSubject
  577. ? thisData.dunSubject.toString()
  578. : "", //催款科目
  579. id: thisData.id, //节点Id
  580. money: thisData.money, //催款金额
  581. dunStatus: thisData.dunStatus //催款状态
  582. });
  583. }
  584. this.setState({
  585. contactList: theArr
  586. });
  587. }
  588. }.bind(this)
  589. }).always(
  590. function() {
  591. this.setState({
  592. loading: false
  593. });
  594. }.bind(this)
  595. );
  596. },
  597. //审核通过
  598. examOk() {
  599. $.ajax({
  600. method: "post",
  601. dataType: "json",
  602. crossDomain: false,
  603. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  604. data: {
  605. orderNo: this.state.orderNo,
  606. orderStatus: 2
  607. },
  608. success: function(data) {
  609. if (data.error.length || data.data.list == "") {
  610. if (data.error && data.error.length) {
  611. message.warning(data.error[0].message);
  612. }
  613. } else {
  614. message.success("该订单已通过审核~");
  615. this.setState({
  616. visible: false
  617. });
  618. this.reset();
  619. }
  620. }.bind(this)
  621. }).always(
  622. function() {
  623. this.setState({
  624. loading: false
  625. });
  626. }.bind(this)
  627. );
  628. },
  629. //通过发给外包
  630. outsourcing() {
  631. $.ajax({
  632. method: "post",
  633. dataType: "json",
  634. crossDomain: false,
  635. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  636. data: {
  637. orderNo: this.state.orderNo,
  638. orderStatus: 2,
  639. outsource: 1
  640. },
  641. success: function(data) {
  642. if (data.error.length || data.data.list == "") {
  643. if (data.error && data.error.length) {
  644. message.warning(data.error[0].message);
  645. }
  646. } else {
  647. message.success("该订单已通过审核~");
  648. this.setState({
  649. visible: false
  650. });
  651. this.reset();
  652. }
  653. }.bind(this)
  654. }).always(
  655. function() {
  656. this.setState({
  657. loading: false
  658. });
  659. }.bind(this)
  660. );
  661. },
  662. //审核不通过
  663. examOks() {
  664. this.setState({
  665. aloading: true
  666. });
  667. $.ajax({
  668. method: "post",
  669. dataType: "json",
  670. crossDomain: false,
  671. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  672. data: {
  673. orderNo: this.state.orderNo,
  674. orderStatus: 3,
  675. reason: this.state.reason
  676. },
  677. success: function(data) {
  678. if (data.error.length || data.data.list == "") {
  679. if (data.error && data.error.length) {
  680. message.warning(data.error[0].message);
  681. this.setState({
  682. aloading: true
  683. });
  684. }
  685. } else {
  686. message.success("该订单已被拒绝~");
  687. this.setState({
  688. visible: false,
  689. aloading: false,
  690. noVisible: false,
  691. reason: ""
  692. });
  693. this.reset();
  694. }
  695. }.bind(this)
  696. }).always(
  697. function() {
  698. this.setState({
  699. loading: false
  700. });
  701. }.bind(this)
  702. );
  703. },
  704. //点击拒绝
  705. examNo() {
  706. this.setState({
  707. noVisible: true
  708. });
  709. },
  710. load() {
  711. if (this.state.attachmentUrl) {
  712. let url = window.location.href.substring(7);
  713. this.state.fileUrl.forEach(e => {
  714. window.location.href =
  715. "http://" +
  716. url.substring(0, url.indexOf("/")) +
  717. "/api/admin/outsourceOrg//downloadFile?path=" +
  718. e.response.data;
  719. });
  720. } else {
  721. message.error("此订单无上传文件");
  722. }
  723. },
  724. callback(key) {
  725. let url = window.location.href.substring(7);
  726. this.setState({
  727. activeKey: key
  728. });
  729. if (this.state.pictureUrl.length) {
  730. let picArr = [];
  731. this.state.pictureUrl.map(function(item) {
  732. if (
  733. item.response &&
  734. item.response.data &&
  735. item.response.data.length
  736. ) {
  737. picArr.push(item.response.data);
  738. }
  739. });
  740. }
  741. if (key === "2") {
  742. this.setState({
  743. loading: true
  744. });
  745. $.ajax({
  746. method: "get",
  747. dataType: "json",
  748. crossDomain: false,
  749. url:
  750. globalConfig.context +
  751. "/api/admin/outsourceOrg/orderOutsourceDtails",
  752. data: {
  753. orderNo: this.state.orderNo
  754. },
  755. success: function(data) {
  756. let thisdata = data.data;
  757. this.setState({
  758. id: thisdata.id,
  759. createTimes: thisdata.createTimes,
  760. auditTimes: thisdata.auditTimes,
  761. remarks: thisdata.remarks,
  762. attachmentUrl: thisdata.attachmentUrl
  763. ? splitUrl(
  764. thisdata.attachmentUrl,
  765. ",",
  766. globalConfig.avatarHost + "/upload",
  767. url
  768. )
  769. : [],
  770. fileUrl: thisdata.attachmentUrl
  771. ? splitUrl(
  772. thisdata.attachmentUrl,
  773. ",",
  774. globalConfig.avatarHost + "/upload",
  775. url
  776. )
  777. : [],
  778. pictureUrl: thisdata.pictureUrl
  779. ? splitUrl(
  780. thisdata.pictureUrl,
  781. ",",
  782. globalConfig.avatarHost + "/upload",
  783. url
  784. )
  785. : [], //图片地址
  786. amount: thisdata.amount,
  787. companyName: thisdata.companyName,
  788. outsourceRemarks: thisdata.outsourceRemarks,
  789. unitNumber: thisdata.unitNumber,
  790. unitPrice: thisdata.unitPrice
  791. });
  792. }.bind(this)
  793. }).always(
  794. function() {
  795. this.setState({
  796. loading: false
  797. });
  798. }.bind(this)
  799. );
  800. }
  801. },
  802. getUrl(url) {
  803. let theorgCodeUrl = [];
  804. if (url.length) {
  805. let picArr = [];
  806. url.map(function(item) {
  807. if (
  808. item.response &&
  809. item.response.data &&
  810. item.response.data.length
  811. ) {
  812. picArr.push(item.response.data);
  813. }
  814. });
  815. theorgCodeUrl = picArr.join(",");
  816. }
  817. return theorgCodeUrl;
  818. },
  819. sureOut() {
  820. if (!this.state.companyName) {
  821. message.warning("公司名称不能为空");
  822. return;
  823. }
  824. if (!this.state.unitPrice) {
  825. message.warning("单价不能为空");
  826. return;
  827. }
  828. if (!this.state.unitNumber) {
  829. message.warning("数量不能为空");
  830. return;
  831. }
  832. if (!this.state.amount) {
  833. message.warning("总金额不能为空");
  834. return;
  835. }
  836. if (!this.state.outsourceRemarks) {
  837. message.warning("备注不能为空");
  838. return;
  839. }
  840. if (this.state.pictureUrl.length === 0) {
  841. message.warning("合同扫描件不能为空");
  842. return;
  843. }
  844. $.ajax({
  845. method: "POST",
  846. dataType: "json",
  847. crossDomain: false,
  848. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  849. data: {
  850. id: this.state.id,
  851. orderNo: this.state.orderNo,
  852. companyName: this.state.companyName,
  853. amount: this.state.amount,
  854. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  855. ? this.getUrl(this.state.attachmentUrl)
  856. : "",
  857. orderStatus: 2,
  858. pictureUrl: this.getUrl(this.state.pictureUrl).length
  859. ? this.getUrl(this.state.pictureUrl)
  860. : "",
  861. outsourceRemarks: this.state.outsourceRemarks,
  862. unitNumber: this.state.unitNumber,
  863. unitPrice: this.state.unitPrice
  864. }
  865. }).done(
  866. function(data) {
  867. this.setState({
  868. loading: false
  869. });
  870. if (!data.error.length) {
  871. message.success("提交成功!");
  872. this.visitCancel();
  873. } else {
  874. message.warning(data.error[0].message);
  875. }
  876. }.bind(this)
  877. );
  878. },
  879. //关闭输入理由框
  880. noCancel() {
  881. this.setState({
  882. noVisible: false,
  883. aloading: false,
  884. reason: ""
  885. });
  886. },
  887. //搜索
  888. search() {
  889. this.loadData();
  890. },
  891. //重置
  892. reset() {
  893. this.state.nameSearch = "";
  894. this.state.contractNoSearch = "";
  895. this.state.releaseDate[0] = undefined;
  896. this.state.releaseDate[1] = undefined;
  897. this.state.refundStatusSearch = undefined;
  898. this.loadData(1);
  899. },
  900. resets() {
  901. this.state.orderNo = "";
  902. this.state.customerName = "";
  903. this.state.releaseDate[0] = undefined;
  904. this.state.releaseDate[1] = undefined;
  905. },
  906. getOrgCodeUrl(e) {
  907. this.setState({ pictureUrl: e });
  908. },
  909. //关闭详情
  910. visitCancel() {
  911. this.setState(
  912. {
  913. visible: false
  914. },
  915. () => {
  916. this.setState({
  917. activeKey: "1"
  918. });
  919. }
  920. );
  921. this.resets();
  922. this.loadData();
  923. },
  924. visitOk() {
  925. this.setState({
  926. visible: false
  927. });
  928. this.resets();
  929. },
  930. render() {
  931. const formItemLayout = {
  932. labelCol: { span: 8 },
  933. wrapperCol: { span: 14 }
  934. };
  935. const FormItem = Form.Item;
  936. const { TextArea } = Input;
  937. const { TabPane } = Tabs;
  938. const { RangePicker } = DatePicker;
  939. return (
  940. <div className="user-content">
  941. <ShowModalDiv ShowModal={this.state.showModal} />
  942. <div className="content-title">
  943. <span>外包订单列表</span>
  944. </div>
  945. <div className="user-search">
  946. <Input
  947. placeholder="客户名称"
  948. style={{ width: "150px", marginBottom: "10px" }}
  949. value={this.state.nameSearch}
  950. onChange={e => {
  951. this.setState({ nameSearch: e.target.value });
  952. }}
  953. />
  954. <Input
  955. placeholder="合同编号"
  956. style={{ width: "150px" }}
  957. value={this.state.contractNoSearch}
  958. onChange={e => {
  959. this.setState({ contractNoSearch: e.target.value });
  960. }}
  961. />
  962. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  963. <RangePicker
  964. value={[
  965. this.state.releaseDate[0]
  966. ? moment(this.state.releaseDate[0])
  967. : null,
  968. this.state.releaseDate[1]
  969. ? moment(this.state.releaseDate[1])
  970. : null
  971. ]}
  972. onChange={(data, dataString) => {
  973. this.setState({ releaseDate: dataString });
  974. }}
  975. />
  976. <Select
  977. value={this.state.refundStatusSearch}
  978. style={{ width: 150, marginLeft: "10px" }}
  979. onChange={e => {
  980. this.setState({
  981. refundStatusSearch: e
  982. });
  983. }}
  984. placeholder="审核状态"
  985. >
  986. <Option value={0}>待审核</Option>
  987. <Option value={1}>审核通过</Option>
  988. <Option value={2}>审核驳回</Option>
  989. </Select>
  990. <Button
  991. type="primary"
  992. onClick={this.search}
  993. style={{ marginLeft: "10px" }}
  994. >
  995. 搜索
  996. </Button>
  997. <Button onClick={this.reset}>重置</Button>
  998. <div className="patent-table">
  999. <Spin spinning={this.state.loading}>
  1000. <Table
  1001. columns={this.state.columns}
  1002. dataSource={this.state.dataSource}
  1003. pagination={this.state.pagination}
  1004. onRowClick={this.tableRowClick}
  1005. />
  1006. </Spin>
  1007. </div>
  1008. <Modal
  1009. className="customeDetails"
  1010. footer=""
  1011. width="900px"
  1012. visible={this.state.visible}
  1013. onOk={this.visitOk}
  1014. onCancel={this.visitCancel}
  1015. >
  1016. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1017. <TabPane tab="订单详情" key="1">
  1018. <Form
  1019. layout="horizontal"
  1020. onSubmit={this.handleSubmit}
  1021. id="demand-form"
  1022. style={{ paddingBottom: "40px" }}
  1023. >
  1024. <Spin spinning={this.state.loading}>
  1025. <div className="clearfix">
  1026. <FormItem
  1027. className="half-item"
  1028. {...formItemLayout}
  1029. label="订单编号"
  1030. >
  1031. <span>{this.state.orderNo}</span>
  1032. </FormItem>
  1033. <FormItem
  1034. className="half-item"
  1035. {...formItemLayout}
  1036. label="合同编号"
  1037. >
  1038. <span>{this.state.contractNo}</span>
  1039. </FormItem>
  1040. <FormItem
  1041. className="half-item"
  1042. {...formItemLayout}
  1043. label="客户名称"
  1044. >
  1045. <span>{this.state.userName}</span>
  1046. </FormItem>
  1047. <FormItem
  1048. className="half-item"
  1049. {...formItemLayout}
  1050. label="合同签订时间"
  1051. >
  1052. <span>{this.state.signDate}</span>
  1053. </FormItem>
  1054. <FormItem
  1055. className="half-item"
  1056. {...formItemLayout}
  1057. label="流程状态"
  1058. >
  1059. <span>
  1060. {getProcessStatus(this.state.processStatus)}
  1061. </span>
  1062. </FormItem>
  1063. <FormItem
  1064. className="half-item"
  1065. {...formItemLayout}
  1066. label="结算状态"
  1067. >
  1068. <span>
  1069. {getLiquidationStatus(this.state.liquidationStatus)}
  1070. </span>
  1071. </FormItem>
  1072. <FormItem
  1073. className="half-item"
  1074. {...formItemLayout}
  1075. label="企业联系人"
  1076. >
  1077. <span>{this.state.contacts}</span>
  1078. </FormItem>
  1079. <FormItem
  1080. className="half-item"
  1081. {...formItemLayout}
  1082. label="联系人电话"
  1083. >
  1084. <span>{this.state.contactMobile}</span>
  1085. </FormItem>
  1086. <FormItem
  1087. className="half-item"
  1088. {...formItemLayout}
  1089. label="企业法人"
  1090. >
  1091. <span>{this.state.legalPerson}</span>
  1092. </FormItem>
  1093. <FormItem
  1094. className="half-item"
  1095. {...formItemLayout}
  1096. label="法人电话"
  1097. >
  1098. <span>{this.state.legalPersonTel}</span>
  1099. </FormItem>
  1100. <FormItem
  1101. className="half-item"
  1102. {...formItemLayout}
  1103. label="签单金额(万元)"
  1104. >
  1105. <span>{this.state.totalAmount}</span>
  1106. </FormItem>
  1107. <FormItem
  1108. className="half-item"
  1109. {...formItemLayout}
  1110. label="首付金额(万元)"
  1111. >
  1112. <span>{this.state.firstAmount}</span>
  1113. </FormItem>
  1114. <FormItem
  1115. className="half-item"
  1116. {...formItemLayout}
  1117. label="特批立项"
  1118. >
  1119. <span>{getApprovedState(this.state.approval)}</span>
  1120. </FormItem>
  1121. <FormItem
  1122. className="half-item"
  1123. {...formItemLayout}
  1124. label="已收款项(万元)"
  1125. >
  1126. <span>{this.state.settlementAmount}</span>
  1127. </FormItem>
  1128. <FormItem
  1129. className="half-item"
  1130. {...formItemLayout}
  1131. label="订单部门"
  1132. >
  1133. <span>{this.state.depName}</span>
  1134. </FormItem>
  1135. <div className="clearfix">
  1136. <FormItem
  1137. labelCol={{ span: 4 }}
  1138. wrapperCol={{ span: 16 }}
  1139. label="订单留言"
  1140. >
  1141. <p style={{ width: 500, wordWrap: "break-word" }}>
  1142. {this.state.orderRemarks}
  1143. </p>
  1144. </FormItem>
  1145. </div>
  1146. <div className="clearfix">
  1147. <FormItem
  1148. labelCol={{ span: 4 }}
  1149. wrapperCol={{ span: 18 }}
  1150. label="合同扫描件"
  1151. >
  1152. <Upload
  1153. className="demandDetailShow-upload"
  1154. listType="picture-card"
  1155. fileList={this.state.orgCodeUrl}
  1156. onPreview={file => {
  1157. this.setState({
  1158. previewImage: file.url || file.thumbUrl,
  1159. previewVisible: true
  1160. });
  1161. }}
  1162. ></Upload>
  1163. <Modal
  1164. maskClosable={false}
  1165. footer={null}
  1166. visible={this.state.previewVisible}
  1167. onCancel={() => {
  1168. this.setState({ previewVisible: false });
  1169. }}
  1170. >
  1171. <img
  1172. alt=""
  1173. style={{ width: "100%" }}
  1174. src={this.state.previewImage || ""}
  1175. />
  1176. </Modal>
  1177. <Button
  1178. style={{
  1179. float: "right",
  1180. marginRight: "140px",
  1181. marginTop: "20px"
  1182. }}
  1183. onClick={this.getOrderLog}
  1184. >
  1185. 查看订单日志
  1186. </Button>
  1187. </FormItem>
  1188. </div>
  1189. <div className="clearfix">
  1190. <FormItem
  1191. className="half-item"
  1192. {...formItemLayout}
  1193. label="订单负责人"
  1194. >
  1195. <span>{this.state.salesmanName}</span>
  1196. </FormItem>
  1197. <FormItem
  1198. className="half-item"
  1199. {...formItemLayout}
  1200. label="订单负责人电话"
  1201. >
  1202. <span>{this.state.salesmanMobile}</span>
  1203. </FormItem>
  1204. </div>
  1205. <div className="clearfix">
  1206. <FormItem
  1207. className="half-item"
  1208. {...formItemLayout}
  1209. label="当前财务负责人"
  1210. >
  1211. <span>{this.state.nowFinance}</span>
  1212. </FormItem>
  1213. <FormItem
  1214. className="half-item"
  1215. {...formItemLayout}
  1216. label="当前财务负责人电话"
  1217. >
  1218. <span>{this.state.nowFinanceMobile}</span>
  1219. </FormItem>
  1220. </div>
  1221. <div className="clearfix">
  1222. <FormItem
  1223. className="half-item"
  1224. {...formItemLayout}
  1225. style={{ opacity: ".5" }}
  1226. label="原订单负责人"
  1227. >
  1228. <span>{this.state.oldSalesmanName}</span>
  1229. </FormItem>
  1230. <FormItem
  1231. className="half-item"
  1232. {...formItemLayout}
  1233. style={{ opacity: ".5" }}
  1234. label="原订单负责人电话"
  1235. >
  1236. <span>{this.state.oldSalesmanMobile}</span>
  1237. </FormItem>
  1238. </div>
  1239. <div className="clearfix">
  1240. <FormItem
  1241. className="half-item"
  1242. style={{ opacity: ".5" }}
  1243. {...formItemLayout}
  1244. label="实际财务操作人"
  1245. >
  1246. <span>{this.state.financeName}</span>
  1247. </FormItem>
  1248. <FormItem
  1249. className="half-item"
  1250. {...formItemLayout}
  1251. style={{ opacity: ".5" }}
  1252. label="实际财务操作人电话"
  1253. >
  1254. <span>{this.state.financeMobile}</span>
  1255. </FormItem>
  1256. </div>
  1257. <div>
  1258. <span
  1259. style={{ marginLeft: "50px", fontSize: "20px" }}
  1260. >
  1261. 催款节点
  1262. </span>
  1263. {this.state.processStatus == 0 ? (
  1264. <Button
  1265. type="primary"
  1266. onClick={this.addcontact}
  1267. style={{
  1268. float: "right",
  1269. marginRight: "50px",
  1270. marginBottom: "15px"
  1271. }}
  1272. >
  1273. 添加催款节点
  1274. </Button>
  1275. ) : (
  1276. ""
  1277. )}
  1278. </div>
  1279. <div className="clearfix">
  1280. <Spin spinning={this.state.loading}>
  1281. <Form layout="horizontal" id="demand-form">
  1282. <Table
  1283. pagination={false}
  1284. columns={this.state.ContactsLists}
  1285. dataSource={this.state.contactList}
  1286. />
  1287. <Col
  1288. span={24}
  1289. offset={9}
  1290. style={{ marginTop: "15px" }}
  1291. ></Col>
  1292. </Form>
  1293. </Spin>
  1294. </div>
  1295. <div>
  1296. <span
  1297. style={{ marginLeft: "50px", fontSize: "20px" }}
  1298. >
  1299. 项目业务
  1300. </span>
  1301. {this.state.processStatus == 0 ? (
  1302. <Button
  1303. type="primary"
  1304. onClick={this.addDetailed}
  1305. style={{
  1306. float: "right",
  1307. marginRight: "50px",
  1308. marginBottom: "15px"
  1309. }}
  1310. >
  1311. 添加项目明细
  1312. </Button>
  1313. ) : (
  1314. ""
  1315. )}
  1316. </div>
  1317. <div className="patent-table">
  1318. <Spin spinning={this.state.loading}>
  1319. <Table
  1320. columns={this.state.columnsX}
  1321. dataSource={this.state.dataSourceX}
  1322. pagination={this.state.paginations}
  1323. onRowClick={this.tableRowClickX}
  1324. />
  1325. </Spin>
  1326. </div>
  1327. {this.state.refundStatus === 2 ? (
  1328. <div
  1329. className="addSave"
  1330. style={{ marginTop: "15px" }}
  1331. >
  1332. <Button
  1333. type="primary"
  1334. onClick={this.examOk}
  1335. style={{ marginLeft: "200px" }}
  1336. htmlType="submit"
  1337. >
  1338. 通过
  1339. </Button>
  1340. <Button
  1341. type="primary"
  1342. onClick={this.examNo}
  1343. style={{ marginLeft: "50px" }}
  1344. htmlType="submit"
  1345. >
  1346. 驳回
  1347. </Button>
  1348. <Button
  1349. type="ghost"
  1350. onClick={this.visitCancel}
  1351. style={{ marginLeft: "50px" }}
  1352. >
  1353. 取消
  1354. </Button>
  1355. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1356. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1357. </div>
  1358. ) : (
  1359. ""
  1360. )}
  1361. </div>
  1362. </Spin>
  1363. </Form>
  1364. </TabPane>
  1365. <TabPane tab="外包(不走总部)" key="2">
  1366. {this.state.refundStatus === 2 ? (
  1367. <div>
  1368. <div className="clearfix">
  1369. <FormItem
  1370. className="half-item"
  1371. {...formItemLayout}
  1372. label={
  1373. <span>
  1374. <strong style={{ color: "#f00" }}>*</strong>
  1375. 外包公司
  1376. </span>
  1377. }
  1378. >
  1379. <Input
  1380. value={this.state.companyName}
  1381. onChange={e => {
  1382. this.setState({
  1383. companyName: e.target.value
  1384. });
  1385. }}
  1386. placeholder="请填写外包公司名称"
  1387. />
  1388. </FormItem>
  1389. <span className="tip">如多个公司,请用间隔</span>
  1390. </div>
  1391. <div className="clearfix">
  1392. <FormItem
  1393. className="half-item"
  1394. {...formItemLayout}
  1395. label={
  1396. <span>
  1397. <strong style={{ color: "#f00" }}>*</strong>
  1398. 单价(万元)
  1399. </span>
  1400. }
  1401. >
  1402. <Input
  1403. value={this.state.unitPrice}
  1404. onChange={e => {
  1405. this.setState({
  1406. unitPrice: e.target.value
  1407. });
  1408. }}
  1409. placeholder="请填写本次外包公司的价格"
  1410. />
  1411. </FormItem>
  1412. </div>
  1413. <div className="clearfix">
  1414. <FormItem
  1415. className="half-item"
  1416. {...formItemLayout}
  1417. label={
  1418. <span>
  1419. <strong style={{ color: "#f00" }}>*</strong>
  1420. 数量(万元)
  1421. </span>
  1422. }
  1423. >
  1424. <Input
  1425. value={this.state.unitNumber}
  1426. onChange={e => {
  1427. this.setState({
  1428. unitNumber: e.target.value
  1429. });
  1430. }}
  1431. placeholder="请填写本次外包公司的价格"
  1432. />
  1433. </FormItem>
  1434. </div>
  1435. <div className="clearfix">
  1436. <FormItem
  1437. className="half-item"
  1438. {...formItemLayout}
  1439. label={
  1440. <span>
  1441. <strong style={{ color: "#f00" }}>*</strong>
  1442. 总金额(万元)
  1443. </span>
  1444. }
  1445. >
  1446. <Input
  1447. value={this.state.amount}
  1448. onChange={e => {
  1449. this.setState({
  1450. amount: e.target.value
  1451. });
  1452. }}
  1453. placeholder="请填写本次外包公司的价格"
  1454. />
  1455. </FormItem>
  1456. </div>
  1457. <div className="clearfix">
  1458. <FormItem
  1459. className="half-item"
  1460. {...formItemLayout}
  1461. label={
  1462. <span>
  1463. <strong style={{ color: "#f00" }}>*</strong>备注
  1464. </span>
  1465. }
  1466. >
  1467. <TextArea
  1468. rows={4}
  1469. value={this.state.outsourceRemarks}
  1470. onChange={e => {
  1471. this.setState({
  1472. outsourceRemarks: e.target.value
  1473. });
  1474. }}
  1475. placeholder="请输入备注"
  1476. />
  1477. </FormItem>
  1478. </div>
  1479. {/*<div className="clearfix">
  1480. <FormItem className="half-item"
  1481. {...formItemLayout}
  1482. label="上传协议文件" style={{height:"auto"}}>
  1483. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1484. data={(e)=>{
  1485. return {
  1486. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1487. }
  1488. }}
  1489. fileList={this.state.fileUrl}
  1490. onChange={(e)=>{
  1491. this.setState({
  1492. attachmentUrl:e.fileList,
  1493. fileUrl:e.fileList
  1494. })
  1495. }}>
  1496. {fileUrl.length>1?null:<Button>
  1497. <Icon type="upload" /> 点击上传
  1498. </Button>}
  1499. </Upload>
  1500. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1501. </FormItem>
  1502. </div>*/}
  1503. <p
  1504. className="tip"
  1505. style={{
  1506. paddingBottom: "12px",
  1507. width: "240px",
  1508. marginLeft: "145px"
  1509. }}
  1510. >
  1511. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1512. </p>
  1513. <div className="clearfix">
  1514. <FormItem
  1515. labelCol={{ span: 4 }}
  1516. wrapperCol={{ span: 18 }}
  1517. label={
  1518. <span>
  1519. <strong style={{ color: "#f00" }}>*</strong>
  1520. 合同/协议扫描件
  1521. </span>
  1522. }
  1523. >
  1524. <PicturesWall
  1525. fileList={this.getOrgCodeUrl}
  1526. pictureUrl={this.state.pictureUrl}
  1527. />
  1528. <p>图片建议:要清晰。</p>
  1529. </FormItem>
  1530. </div>
  1531. <div className="clearfix">
  1532. <div
  1533. style={{
  1534. display: "inline-black",
  1535. textAlign: "center"
  1536. }}
  1537. >
  1538. <Button type="primary" onClick={this.sureOut}>
  1539. 确认发起外包,不通过总部
  1540. </Button>
  1541. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1542. </div>
  1543. </div>
  1544. </div>
  1545. ) : (
  1546. <div>
  1547. <div className="clearfix">
  1548. <FormItem
  1549. className="half-item"
  1550. {...formItemLayout}
  1551. label="外包公司"
  1552. >
  1553. <span>{this.state.companyName}</span>
  1554. </FormItem>
  1555. </div>
  1556. <div className="clearfix">
  1557. <FormItem
  1558. className="half-item"
  1559. {...formItemLayout}
  1560. label="单价(万元)"
  1561. >
  1562. <span>{this.state.unitPrice}</span>
  1563. </FormItem>
  1564. </div>
  1565. <div className="clearfix">
  1566. <FormItem
  1567. className="half-item"
  1568. {...formItemLayout}
  1569. label="数量(个)"
  1570. >
  1571. <span>{this.state.unitNumber}</span>
  1572. </FormItem>
  1573. </div>
  1574. <div className="clearfix">
  1575. <FormItem
  1576. className="half-item"
  1577. {...formItemLayout}
  1578. label="总金额(万元)"
  1579. >
  1580. <span>{this.state.amount}</span>
  1581. </FormItem>
  1582. </div>
  1583. <div className="clearfix">
  1584. <FormItem
  1585. className="half-item"
  1586. {...formItemLayout}
  1587. label="备注"
  1588. >
  1589. <span>{this.state.outsourceRemarks}</span>
  1590. </FormItem>
  1591. </div>
  1592. {/*<div className="clearfix">
  1593. <FormItem className="half-item" style={{height:'auto'}}
  1594. {...formItemLayout}
  1595. label="上传协议文件" >
  1596. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1597. data={(e)=>{
  1598. return {
  1599. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1600. }
  1601. }}
  1602. fileList={this.state.fileUrl}
  1603. showUploadList={{showRemoveIcon:false}}
  1604. onPreview={(e)=>{
  1605. let url = window.location.href.substring(7)
  1606. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1607. }}
  1608. >
  1609. </Upload>
  1610. </FormItem>
  1611. </div>*/}
  1612. <div className="clearfix">
  1613. <FormItem
  1614. labelCol={{ span: 4 }}
  1615. wrapperCol={{ span: 18 }}
  1616. label="合同/协议扫描件"
  1617. >
  1618. <Upload
  1619. className="demandDetailShow-upload"
  1620. listType="picture-card"
  1621. fileList={this.state.pictureUrl}
  1622. onPreview={file => {
  1623. this.setState({
  1624. previewImage: file.url || file.thumbUrl,
  1625. previewVisible: true
  1626. });
  1627. }}
  1628. ></Upload>
  1629. <Modal
  1630. maskClosable={false}
  1631. footer={null}
  1632. visible={this.state.previewVisible}
  1633. onCancel={() => {
  1634. this.setState({ previewVisible: false });
  1635. }}
  1636. >
  1637. <img
  1638. alt=""
  1639. style={{ width: "100%" }}
  1640. src={this.state.previewImage || ""}
  1641. />
  1642. </Modal>
  1643. </FormItem>
  1644. </div>
  1645. </div>
  1646. )}
  1647. {this.state.refundStatus ? (
  1648. <div className="clearfix">
  1649. <hr className="division" />
  1650. <div className="clearfix">
  1651. <FormItem
  1652. className="half-item"
  1653. {...formItemLayout}
  1654. label="审核意见"
  1655. >
  1656. <span>{this.state.remarks}</span>
  1657. </FormItem>
  1658. </div>
  1659. <div className="clearfix">
  1660. <FormItem
  1661. className="half-item"
  1662. {...formItemLayout}
  1663. label="审核结果"
  1664. >
  1665. <span>
  1666. {getRefundStatus(this.state.refundStatus)}
  1667. </span>
  1668. </FormItem>
  1669. </div>
  1670. <div className="clearfix">
  1671. <FormItem
  1672. className="half-item"
  1673. {...formItemLayout}
  1674. label="审核时间"
  1675. >
  1676. <span>{this.state.auditTimes}</span>
  1677. </FormItem>
  1678. </div>
  1679. </div>
  1680. ) : (
  1681. ""
  1682. )}
  1683. </TabPane>
  1684. </Tabs>
  1685. </Modal>
  1686. <Modal
  1687. maskClosable={false}
  1688. visible={this.state.addnextVisible}
  1689. onOk={this.nextCancel}
  1690. onCancel={this.nextCancel}
  1691. confirmLoading={this.state.confirmLoading}
  1692. width="800px"
  1693. title={"项目任务详情"}
  1694. footer=""
  1695. className="admin-desc-content"
  1696. >
  1697. <Form layout="horizontal" id="demand-form">
  1698. <Spin spinning={this.state.loading}>
  1699. <div className="clearfix">
  1700. <FormItem
  1701. className="half-item"
  1702. {...formItemLayout}
  1703. label="项目名称"
  1704. >
  1705. <span>{this.state.commodityName}</span>
  1706. </FormItem>
  1707. <FormItem
  1708. className="half-item"
  1709. {...formItemLayout}
  1710. label="项目数量"
  1711. >
  1712. <span>{this.state.commodityQuantity}</span>
  1713. </FormItem>
  1714. <FormItem
  1715. className="half-item"
  1716. {...formItemLayout}
  1717. label="金额(万元)"
  1718. >
  1719. <span>{this.state.commodityPrice}</span>
  1720. </FormItem>
  1721. <FormItem
  1722. className="half-item"
  1723. {...formItemLayout}
  1724. label="主要项目"
  1725. >
  1726. <span>{getboutique(this.state.main)}</span>
  1727. </FormItem>
  1728. <div className="clearfix">
  1729. <FormItem
  1730. labelCol={{ span: 4 }}
  1731. wrapperCol={{ span: 16 }}
  1732. label="服务说明"
  1733. >
  1734. <span>{this.state.taskComment}</span>
  1735. </FormItem>
  1736. </div>
  1737. </div>
  1738. </Spin>
  1739. </Form>
  1740. </Modal>
  1741. <Modal
  1742. maskClosable={false}
  1743. visible={this.state.noVisible}
  1744. onOk={this.handleOk}
  1745. onCancel={this.noCancel}
  1746. width="400px"
  1747. title={"拒绝理由"}
  1748. footer=""
  1749. className="admin-desc-content"
  1750. confirmLoading={this.state.confirmLoading}
  1751. >
  1752. <Form layout="horizontal" id="demand-form">
  1753. <Spin spinning={this.state.loading}>
  1754. <div className="clearfix">
  1755. <FormItem
  1756. labelCol={{ span: 4 }}
  1757. wrapperCol={{ span: 16 }}
  1758. label="拒绝理由"
  1759. >
  1760. <Input
  1761. type="textarea"
  1762. placeholder="请输入拒绝理由"
  1763. rows={4}
  1764. value={this.state.reason}
  1765. onChange={e => {
  1766. this.setState({ reason: e.target.value });
  1767. }}
  1768. />
  1769. </FormItem>
  1770. </div>
  1771. <div className="clearfix">
  1772. <Button
  1773. className="cancel"
  1774. type="primary"
  1775. onClick={this.examOks}
  1776. style={{ marginLeft: "50px" }}
  1777. htmlType="submit"
  1778. loading={this.state.aloading}
  1779. >
  1780. 确定
  1781. </Button>
  1782. <Button
  1783. className="cancel"
  1784. type="ghost"
  1785. onClick={this.noCancel}
  1786. style={{ marginLeft: "50px" }}
  1787. >
  1788. 取消
  1789. </Button>
  1790. </div>
  1791. </Spin>
  1792. </Form>
  1793. </Modal>
  1794. <Modal
  1795. visible={this.state.rizhivisible}
  1796. className="admin-desc-content"
  1797. width="800px"
  1798. maskClosable={false}
  1799. title="订单日志"
  1800. footer={null}
  1801. onCancel={this.closeOrderLog}
  1802. >
  1803. <div className="patent-table">
  1804. <Spin spinning={this.state.loading}>
  1805. <Table
  1806. columns={this.state.columnsrizhi}
  1807. dataSource={this.state.dataSourcerizhi}
  1808. pagination={false}
  1809. />
  1810. </Spin>
  1811. </div>
  1812. </Modal>
  1813. </div>
  1814. </div>
  1815. );
  1816. }
  1817. })
  1818. );
  1819. export default outsourcingList;