outsourcingPaiDan.jsx 56 KB

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