outsourcingList.jsx 90 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590
  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. Popconfirm,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import moment from "moment";
  21. import {
  22. getLiquidationStatus,
  23. getApprovedState,
  24. getProcessStatus,
  25. splitUrl,
  26. getjiedian,
  27. getboutique,
  28. getCuikuan,
  29. getProjectStatus,
  30. getRefundStatus,
  31. ShowModal
  32. } from "@/tools.js";
  33. import "./customer.less";
  34. import ShowModalDiv from "@/showModal.jsx";
  35. import ResolutionDetail from "@/resolutionDetail";
  36. const confirm = Modal.confirm;
  37. import OrderRiZi from "@/orderRiZi.jsx";
  38. import ImgList from "../../../common/imgList";
  39. import {ChooseList} from "./chooseList";
  40. import {getProjectName} from "../../../tools";
  41. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  42. //图片组件
  43. const PicturesWall = React.createClass({
  44. getInitialState() {
  45. return {
  46. previewVisible: false,
  47. previewImage: "",
  48. declarationBatch: 1,
  49. dataInfor: {},
  50. fileList: []
  51. };
  52. },
  53. handleCancel() {
  54. this.setState({
  55. previewVisible: false
  56. });
  57. },
  58. handlePreview(file) {
  59. this.setState({
  60. previewImage: file.url || file.thumbUrl,
  61. previewVisible: true
  62. });
  63. },
  64. handleChange(info) {
  65. let fileList = info.fileList;
  66. this.setState({
  67. fileList
  68. });
  69. this.props.fileList(fileList);
  70. },
  71. componentWillReceiveProps(nextProps) {
  72. this.state.fileList = nextProps.pictureUrl;
  73. this.state.pojectApplicationUrl = undefined;
  74. },
  75. render() {
  76. const { previewVisible, previewImage, fileList } = this.state;
  77. const uploadButton = (
  78. <div>
  79. <Icon type="plus" />
  80. <div className="ant-upload-text">点击上传</div>
  81. </div>
  82. );
  83. return (
  84. <div style={{ display: "inline-block" }}>
  85. <Upload
  86. action={
  87. globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"
  88. }
  89. data={{ sign: "order_outsource" }}
  90. listType="picture-card"
  91. fileList={fileList}
  92. onPreview={this.handlePreview}
  93. onChange={this.handleChange}
  94. multiple={true}
  95. >
  96. {uploadButton}
  97. </Upload>
  98. <Modal
  99. maskClosable={false}
  100. visible={previewVisible}
  101. footer={null}
  102. onCancel={this.handleCancel}
  103. >
  104. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  105. </Modal>
  106. </div>
  107. );
  108. }
  109. });
  110. const outsourcingList = Form.create()(
  111. React.createClass({
  112. loadData(pageNo) {
  113. this.setState({
  114. visitModul: false,
  115. loading: true,
  116. ispage: pageNo,
  117. modalVisible: false,
  118. });
  119. $.ajax({
  120. method: "get",
  121. dataType: "json",
  122. crossDomain: false,
  123. url:
  124. globalConfig.context +
  125. "/api/admin/outsourceOrg/salesmanOrderOutsourceList",
  126. data: {
  127. pageNo: pageNo || 1,
  128. pageSize: this.state.pagination.pageSize,
  129. contractNo: this.state.contractNoSearch,
  130. name: this.state.nameSearch, //名称
  131. orderNo: this.state.orderNoSearch, //订单编号
  132. starTime: this.state.releaseDate[0], //开始时间
  133. endTime: this.state.releaseDate[1], //结束时间
  134. refundStatus: this.state.refundStatusSearch, //外包审核状态
  135. },
  136. success: function (data) {
  137. ShowModal(this);
  138. let theArr = [];
  139. if (data.error.length || data.data.list == "") {
  140. if (data.error && data.error.length) {
  141. message.warning(data.error[0].message);
  142. }
  143. } else {
  144. for (let i = 0; i < data.data.list.length; i++) {
  145. let thisdata = data.data.list[i];
  146. theArr.push({
  147. key: i,
  148. id: thisdata.id, //用户ID
  149. orderNo: thisdata.orderNo, //订单编号
  150. contractNo: thisdata.contractNo, //签单金额
  151. createTime: thisdata.createTime, //流程状态
  152. signTime: thisdata.signTime, //结算状态
  153. userName: thisdata.userName, //特批状态
  154. depName: thisdata.depName, //签单时间
  155. totalAmount: thisdata.totalAmount, //客户名称
  156. adminName: thisdata.adminName, //营销员名称
  157. financeName: thisdata.financeName, //财务名称
  158. liquidationStatus: thisdata.liquidationStatus, //下单时间
  159. refundStatus: thisdata.refundStatus,
  160. });
  161. }
  162. this.state.pagination.total = data.data.totalCount;
  163. this.state.pagination.current = data.data.pageNo;
  164. }
  165. if (data.data && data.data.list && !data.data.list.length) {
  166. this.state.pagination.total = 0;
  167. }
  168. this.setState({
  169. dataSource: theArr,
  170. pageNo: pageNo,
  171. pagination: this.state.pagination,
  172. selectedRowKeys: [],
  173. });
  174. }.bind(this),
  175. }).always(
  176. function () {
  177. this.setState({
  178. loading: false,
  179. });
  180. }.bind(this)
  181. );
  182. },
  183. getInitialState() {
  184. return {
  185. rotateDeg: 0,
  186. page: 1,
  187. releaseDate: [],
  188. selectedRowKeys: [],
  189. pictureUrl: [],
  190. fileUrl: [],
  191. attachmentUrl: [],
  192. paginations: false,
  193. resVisible: false,
  194. activeKey: "1",
  195. confirmLoading: false,
  196. aloading: false,
  197. pagination: {
  198. defaultCurrent: 1,
  199. defaultPageSize: 10,
  200. showQuickJumper: true,
  201. pageSize: 10,
  202. onChange: function (page) {
  203. this.loadData(page);
  204. }.bind(this),
  205. showTotal: function (total) {
  206. return "共" + total + "条数据";
  207. },
  208. },
  209. ContactsListsNew: [
  210. {
  211. title: "项目名称",
  212. dataIndex: "commodityName",
  213. key: "commodityName",
  214. render: (text, record, index) => {
  215. let dataArr = this.state.dataSourceX || [];
  216. if (text) {
  217. return <span>{text + "-" + record.tid}</span>;
  218. }
  219. return (
  220. <Select
  221. placeholder="请选择名称"
  222. style={{ width: "150px" }}
  223. disabled={
  224. this.state.getLoad && record.sortName ? true : false
  225. }
  226. onChange={(e) => {
  227. record.sortName = e;
  228. dataArr.forEach((item) => {
  229. if (item.commodityName == record.sortName) {
  230. record.cname = item.cname;
  231. record.tid = item.id;
  232. record.isSave = true;
  233. record.sort = item.sort;
  234. // console.log(record);
  235. cuiJieDian.forEach((item) => {
  236. if (item.value == record.sort) {
  237. record.arr = item.children;
  238. let yearFlag = true;
  239. if (record.sort == 6) {
  240. yearFlag = false;
  241. }
  242. this.setState({
  243. getLoad: true,
  244. yearFlag,
  245. });
  246. }
  247. });
  248. }
  249. });
  250. // console.log(e);
  251. }}
  252. >
  253. {dataArr.map((item) => {
  254. return (
  255. <Select.Option key={item.id} value={item.commodityName}>
  256. {item.commodityName}
  257. </Select.Option>
  258. );
  259. })}
  260. </Select>
  261. );
  262. },
  263. },
  264. {
  265. title: "项目分类",
  266. dataIndex: "projectType",
  267. key: "projectType",
  268. render: (text, record) => {
  269. // console.log("看分类", record);
  270. if (text) {
  271. let arr = this.state.dataSourceX || [];
  272. let str = "";
  273. for (let i = 0; i < arr.length; i++) {
  274. if (this.state.dataSourceX[i].sort == text) {
  275. str = this.state.dataSourceX[i].cname;
  276. return <span>{str}</span>;
  277. }
  278. }
  279. }
  280. if (this.state.getLoad) {
  281. return (
  282. <Select
  283. style={{ width: "150px" }}
  284. placeholder="请选择分类"
  285. value={record.cname}
  286. >
  287. <Select.Option key={record.sort} value={record.cname}>
  288. {record.cname}
  289. </Select.Option>
  290. </Select>
  291. );
  292. } else {
  293. return (
  294. <Select style={{ width: "150px" }} placeholder="请选择分类">
  295. <Select.Option key={record.sort} value={record.cname}>
  296. {record.cname}
  297. </Select.Option>
  298. </Select>
  299. );
  300. }
  301. },
  302. },
  303. {
  304. title: "催款科目",
  305. dataIndex: "dunTypeName",
  306. key: "dunTypeName",
  307. render: (text, record) => {
  308. if (text) {
  309. if (record.customizeName) {
  310. return text + record.customizeName;
  311. }
  312. return <span>{text}</span>;
  313. }
  314. if (this.state.getLoad) {
  315. let arr = record.arr || [];
  316. // console.log("arrrr", arr);
  317. return (
  318. <Select
  319. style={{ width: "150px" }}
  320. placeholder="请选择分类"
  321. onChange={(e) => {
  322. record.dunType = e;
  323. // console.log(e);
  324. }}
  325. >
  326. {arr.map((item) => {
  327. record;
  328. return (
  329. <Select.Option key={item.value} value={item.value}>
  330. {item.key}
  331. </Select.Option>
  332. );
  333. })}
  334. </Select>
  335. );
  336. } else {
  337. return (
  338. <Select style={{ width: "150px" }} placeholder="请选择分类">
  339. <Select.Option
  340. key={0}
  341. value={"请选择上一项"}
  342. ></Select.Option>
  343. </Select>
  344. );
  345. }
  346. },
  347. },
  348. {
  349. title: "时间(天)",
  350. dataIndex: "waitDay",
  351. key: "waitDay",
  352. render: (text, record) => {
  353. if (record.dunTypeName) {
  354. if (record.customizeTimes) {
  355. return record.customizeTimes;
  356. }
  357. return <span>{text}</span>;
  358. }
  359. return (
  360. <Select
  361. placeholder="请选择时间"
  362. style={{ width: "150px" }}
  363. disabled={this.state.approval == 0 ? true : false}
  364. onChange={(e) => {
  365. // console.log("ee", e);
  366. record.waitDay = e;
  367. // console.log("time", record);
  368. }}
  369. >
  370. <Select.Option key={3}>3天</Select.Option>
  371. <Select.Option key={5}>5天</Select.Option>
  372. <Select.Option key={7}>7天</Select.Option>
  373. <Select.Option key={15}>15天</Select.Option>
  374. </Select>
  375. );
  376. },
  377. },
  378. {
  379. title: "金额(万元)",
  380. dataIndex: "money",
  381. key: "money",
  382. render: (text, record) => {
  383. if (record.dunTypeName) {
  384. if (record.appropriationRatio && !record.money) {
  385. return <span>{record.appropriationRatio}(拨款比例)</span>;
  386. } else if (record.appropriationRatio && record.money) {
  387. return (
  388. <span>
  389. {text}(比例:{record.appropriationRatio})
  390. </span>
  391. );
  392. } else {
  393. return <span>{text}</span>;
  394. }
  395. }
  396. return (
  397. <div>
  398. {this.state.processStatus == 0 ? (
  399. <Input
  400. value={record.money}
  401. placeholder="请输入金额(必填项)"
  402. key={record.id}
  403. required="required"
  404. onChange={(e) => {
  405. record.money = e.target.value;
  406. this.setState({
  407. contactListNew: this.state.contactListNew,
  408. });
  409. }}
  410. style={{ width: "120px" }}
  411. />
  412. ) : (
  413. <span>{text}</span>
  414. )}
  415. </div>
  416. );
  417. },
  418. },
  419. {
  420. title: "服务年限",
  421. dataIndex: "startDate",
  422. key: "startDate",
  423. render: (text, record) => {
  424. if (record.dunTypeName) {
  425. return <span>{text}</span>;
  426. }
  427. return (
  428. <Select
  429. placeholder="请选择时间"
  430. style={{ width: "150px" }}
  431. disabled={this.state.yearFlag ? true : false}
  432. onChange={(e) => {
  433. // console.log("ee", e);
  434. record.effectiveCount = e;
  435. // console.log("year", record);
  436. }}
  437. >
  438. {/* <Select.Option key={null}>无</Select.Option> */}
  439. <Select.Option key={1}>一年</Select.Option>
  440. <Select.Option key={3}>两年</Select.Option>
  441. <Select.Option key={5}>三年</Select.Option>
  442. <Select.Option key={7}>四年</Select.Option>
  443. <Select.Option key={9}>五年</Select.Option>
  444. </Select>
  445. );
  446. },
  447. },
  448. {
  449. title: "催款状态",
  450. dataIndex: "status",
  451. key: "status",
  452. render: (text) => {
  453. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  454. },
  455. },
  456. {
  457. title: "操作",
  458. dataIndex: "dels",
  459. key: "dels",
  460. render: (text, record, index) => {
  461. return (
  462. <div>
  463. {/* {this.state.processStatus == 0 ? (
  464. <Popconfirm
  465. title="是否删除?"
  466. onConfirm={() => {
  467. this.confirmDeletNew(record);
  468. }}
  469. okText="删除"
  470. cancelText="不删除"
  471. >
  472. <Button
  473. style={{
  474. marginRight: "10px",
  475. color: "#ffffff",
  476. background: "#f00",
  477. border: "none"
  478. }}
  479. >
  480. 删除
  481. </Button>
  482. </Popconfirm>
  483. ) : (
  484. ""
  485. )}
  486. {record.isSave ? (
  487. <Button
  488. type="primary"
  489. onClick={e => {
  490. this.contactSaveNew(record);
  491. }}
  492. >
  493. 保存
  494. </Button>
  495. ) : (
  496. ""
  497. )} */}
  498. </div>
  499. );
  500. },
  501. },
  502. ],
  503. columns: [
  504. {
  505. title: "订单编号",
  506. dataIndex: "orderNo",
  507. key: "orderNo",
  508. },
  509. {
  510. title: "合同编号",
  511. dataIndex: "contractNo",
  512. key: "contractNo",
  513. },
  514. {
  515. title: "创建时间",
  516. dataIndex: "createTime",
  517. key: "createTime",
  518. },
  519. {
  520. title: "签单时间",
  521. dataIndex: "signTime",
  522. key: "signTime",
  523. },
  524. {
  525. title: "客户名称",
  526. dataIndex: "userName",
  527. key: "userName",
  528. },
  529. {
  530. title: "订单部门",
  531. dataIndex: "depName",
  532. key: "depName",
  533. },
  534. {
  535. title: "签单金额(万元)",
  536. dataIndex: "totalAmount",
  537. key: "totalAmount",
  538. },
  539. {
  540. title: "结算状态",
  541. dataIndex: "liquidationStatus",
  542. key: "liquidationStatus",
  543. render: (text) => {
  544. return getLiquidationStatus(text);
  545. },
  546. },
  547. {
  548. title: "外包审核",
  549. dataIndex: "refundStatus",
  550. key: "refundStatus",
  551. render: (text) => {
  552. return getRefundStatus(text);
  553. },
  554. },
  555. {
  556. title: "营销负责人",
  557. dataIndex: "adminName",
  558. key: "adminName",
  559. },
  560. {
  561. title: "财务负责人",
  562. dataIndex: "financeName",
  563. key: "financeName",
  564. },
  565. ],
  566. data: [],
  567. dataSource: [],
  568. columnsX: [
  569. {
  570. title: "业务项目名称",
  571. dataIndex: "commodityName",
  572. key: "commodityName",
  573. render: (text, record) => {
  574. return text + "-" + record.id
  575. }
  576. },
  577. {
  578. title: "项目类别",
  579. dataIndex: "cname",
  580. key: "cname",
  581. },
  582. {
  583. title: "项目数量",
  584. dataIndex: "commodityQuantity",
  585. key: "commodityQuantity",
  586. render: (text, record) => {
  587. if (record.splitStatus == 1) {
  588. return (
  589. <span>
  590. {text}{" "}
  591. <Tag
  592. color="#108ee9"
  593. onClick={(e) => {
  594. e.stopPropagation();
  595. this.showRes(record);
  596. }}
  597. >
  598. 已拆
  599. </Tag>
  600. </span>
  601. );
  602. } else {
  603. return text;
  604. }
  605. },
  606. },
  607. {
  608. title: "金额(万元)",
  609. dataIndex: "commodityPrice",
  610. key: "commodityPrice",
  611. },
  612. {
  613. title: "负责人",
  614. dataIndex: "contacts",
  615. key: "contacts",
  616. },
  617. {
  618. title: "负责人电话",
  619. dataIndex: "contactsMobile",
  620. key: "contactsMobile",
  621. },
  622. {
  623. title: "项目状态",
  624. dataIndex: "projectStatus",
  625. key: "projectStatus",
  626. render: (text) => {
  627. return getProjectName(text);
  628. },
  629. },
  630. {
  631. title: "主要项目",
  632. dataIndex: "main",
  633. key: "main",
  634. render: (text) => {
  635. return text ? "是" : "否";
  636. },
  637. },
  638. {
  639. title: "项目说明",
  640. dataIndex: "taskComment",
  641. key: "taskComment",
  642. render: (text) => {
  643. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  644. },
  645. },
  646. ],
  647. columnsrizhi: [
  648. {
  649. title: "流程",
  650. dataIndex: "processName",
  651. key: "processName",
  652. },
  653. {
  654. title: "操作人",
  655. dataIndex: "adminName",
  656. key: "adminName",
  657. },
  658. {
  659. title: "时间",
  660. dataIndex: "createDate",
  661. key: "createDate",
  662. },
  663. ],
  664. dataSourceX: [],
  665. ContactsLists: [
  666. {
  667. title: "催款科目",
  668. dataIndex: "dunSubject",
  669. key: "dunSubject",
  670. render: (text) => {
  671. return getjiedian(text);
  672. },
  673. },
  674. {
  675. title: "金额(万元)",
  676. dataIndex: "money",
  677. key: "money",
  678. },
  679. {
  680. title: "催款状态",
  681. dataIndex: "dunStatus",
  682. key: "dunStatus",
  683. render: (text) => {
  684. return getCuikuan(text);
  685. },
  686. },
  687. ],
  688. };
  689. },
  690. //页面加载函数
  691. componentWillMount() {
  692. this.loadData();
  693. },
  694. //整行点击
  695. tableRowClick(record) {
  696. this.setState({
  697. visible: true,
  698. refundStatus: record.refundStatus,
  699. });
  700. this.xiangqing(record.orderNo);
  701. this.xiangmu(record.orderNo);
  702. this.jiedian(record.orderNo);
  703. this.jiedianNew(record.orderNo);
  704. },
  705. //点击打卡项目详情
  706. tableRowClickX(record) {
  707. this.setState({
  708. jid: record.id, //项目ID
  709. kid: record.commodityId, //商品ID
  710. commodityName: record.commodityName, //金额
  711. commodityPrice: record.commodityPrice, //金额
  712. commodityQuantity: record.commodityQuantity, //数量
  713. taskComment: record.taskComment, //备注
  714. main: record.main.toString(), //是否为主要
  715. addnextVisible: true,
  716. dataInfor:record,
  717. addState: 0,
  718. });
  719. },
  720. //项目详情关闭
  721. nextCancel() {
  722. this.setState({
  723. addnextVisible: false,
  724. });
  725. },
  726. //订单详情
  727. xiangqing(orderNos) {
  728. $.ajax({
  729. method: "get",
  730. dataType: "json",
  731. crossDomain: false,
  732. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  733. data: {
  734. orderNo: orderNos,
  735. },
  736. success: function (data) {
  737. if (data.error.length || data.data.list == "") {
  738. if (data.error && data.error.length) {
  739. message.warning(data.error[0].message);
  740. }
  741. } else {
  742. let thisdata = data.data;
  743. this.setState({
  744. orderNo: thisdata.orderNo, //订单编号
  745. contractNo: thisdata.contractNo, //合同编号
  746. userName: thisdata.userName, //客户名称
  747. signDate: thisdata.signDate, //签单时间
  748. processStatus: thisdata.processStatus, //流程状态
  749. liquidationStatus: thisdata.liquidationStatus, //结算状态
  750. contacts: thisdata.contacts, //企业联系人
  751. contactMobile: thisdata.contactMobile, //联系人电话
  752. legalPerson: thisdata.legalPerson, //法人
  753. legalPersonTel: thisdata.legalPersonTel, //法人电话
  754. firstAmount: thisdata.firstAmount, //签单金额
  755. totalAmount: thisdata.totalAmount, //首付金额
  756. approval: thisdata.approval, //特批状态
  757. settlementAmount: thisdata.settlementAmount, //已收款项
  758. orderRemarks: thisdata.orderRemarks, //订单留言
  759. orgCodeUrl: thisdata.contractPictureUrl
  760. ? splitUrl(
  761. thisdata.contractPictureUrl,
  762. ",",
  763. globalConfig.avatarHost + "/upload"
  764. )
  765. : [], //图片地址
  766. replenishUrl: thisdata.agreementUrl
  767. ? splitUrl(
  768. thisdata.agreementUrl,
  769. ",",
  770. globalConfig.avatarHost + "/upload"
  771. )
  772. : [], //图片地址
  773. salesmanName: thisdata.salesmanName, //营销员名称
  774. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  775. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  776. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  777. financeName: thisdata.financeName, //财务名称
  778. financeMobile: thisdata.financeMobile, //财务电话
  779. nowFinance: thisdata.nowFinance, //财务名称
  780. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  781. depName: thisdata.depName,
  782. outsource: thisdata.outsource == 0 ? "否" : "是",
  783. });
  784. }
  785. }.bind(this),
  786. }).always(
  787. function () {
  788. this.setState({
  789. loading: false,
  790. });
  791. }.bind(this)
  792. );
  793. },
  794. //项目列表
  795. xiangmu(orderNos) {
  796. $.ajax({
  797. method: "get",
  798. dataType: "json",
  799. crossDomain: false,
  800. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  801. data: {
  802. orderNo: orderNos,
  803. },
  804. success: function (data) {
  805. let theArr = [];
  806. if (data.error.length || data.data.list == "") {
  807. if (data.error && data.error.length) {
  808. message.warning(data.error[0].message);
  809. }
  810. } else {
  811. for (let i = 0; i < data.data.length; i++) {
  812. let thisdata = data.data[i];
  813. thisdata.key = i;
  814. thisdata.sort = thisdata.cSort;
  815. theArr.push(thisdata);
  816. }
  817. }
  818. this.setState({
  819. dataSourceX: theArr,
  820. });
  821. }.bind(this),
  822. }).always(
  823. function () {
  824. this.setState({
  825. loading: false,
  826. });
  827. }.bind(this)
  828. );
  829. },
  830. // 拆分详细
  831. showRes(record) {
  832. this.setState({
  833. resVisible: true,
  834. resRecord: record,
  835. });
  836. },
  837. resCancel() {
  838. this.setState({
  839. resVisible: false,
  840. });
  841. },
  842. rizhi() {
  843. this.setState({
  844. loading: true,
  845. });
  846. $.ajax({
  847. method: "get",
  848. dataType: "json",
  849. crossDomain: false,
  850. url: "/api/admin/newOrder/selectOrderLog",
  851. data: {
  852. orderNo: this.state.orderNo,
  853. },
  854. success: function (data) {
  855. let theArr = [];
  856. let thisData = data.data;
  857. if (!thisData.length) {
  858. if (data.error && data.error.length) {
  859. message.warning(data.error[0].message);
  860. }
  861. thisData = {};
  862. } else {
  863. for (let i = 0; i < data.data.length; i++) {
  864. let thisdata = data.data[i];
  865. theArr.push({
  866. processName: thisdata.processName,
  867. adminName: thisdata.adminName,
  868. createDate: thisdata.createDate,
  869. remarks: thisdata.remarks,
  870. });
  871. }
  872. }
  873. this.setState({
  874. dataSourcerizhi: theArr,
  875. });
  876. }.bind(this),
  877. }).always(
  878. function () {
  879. this.setState({
  880. loading: false,
  881. });
  882. }.bind(this)
  883. );
  884. },
  885. getOrderLog() {
  886. this.setState({
  887. rizhivisible: true,
  888. });
  889. this.rizhi();
  890. },
  891. closeOrderLog() {
  892. this.setState({
  893. rizhivisible: false,
  894. });
  895. },
  896. //节点列表
  897. jiedian(orderNos) {
  898. $.ajax({
  899. method: "get",
  900. dataType: "json",
  901. crossDomain: false,
  902. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  903. data: {
  904. orderNo: orderNos,
  905. },
  906. success: function (data) {
  907. let theArr = [];
  908. let thisData = [];
  909. if (data.error.length || data.data.list == "") {
  910. if (data.error && data.error.length) {
  911. message.warning(data.error[0].message);
  912. }
  913. } else {
  914. for (let i = 0; i < data.data.length; i++) {
  915. thisData = data.data[i];
  916. theArr.push({
  917. key: i,
  918. dunSubject: thisData.dunSubject
  919. ? thisData.dunSubject.toString()
  920. : "", //催款科目
  921. id: thisData.id, //节点Id
  922. money: thisData.money, //催款金额
  923. dunStatus: thisData.dunStatus, //催款状态
  924. });
  925. }
  926. this.setState({
  927. contactList: theArr,
  928. });
  929. }
  930. }.bind(this),
  931. }).always(
  932. function () {
  933. this.setState({
  934. loading: false,
  935. });
  936. }.bind(this)
  937. );
  938. },
  939. jiedianNew(orderNos) {
  940. $.ajax({
  941. method: "get",
  942. dataType: "json",
  943. crossDomain: false,
  944. url:
  945. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  946. data: {
  947. orderNo: orderNos,
  948. },
  949. success: function (data) {
  950. if (data.error && data.error.length) {
  951. message.warning(data.error[0].message);
  952. } else {
  953. let theArr = [];
  954. let thisData = [];
  955. let arr = data.data || [];
  956. let totalCui = 0;
  957. for (let i = 0; i < arr.length; i++) {
  958. thisData = arr[i];
  959. totalCui += +thisData.money;
  960. theArr.push({
  961. key: i,
  962. dunSubject: thisData.dunSubject
  963. ? thisData.dunSubject.toString()
  964. : "", //催款科目
  965. id: thisData.id, //节点Id
  966. money: thisData.money, //催款金额
  967. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  968. commodityName: thisData.commodityName,
  969. projectType: thisData.projectType,
  970. dunTypeName: thisData.dunTypeName,
  971. status: thisData.status,
  972. waitDay: thisData.waitDay,
  973. effectiveCount: thisData.effectiveCount,
  974. startDate: thisData.startDate,
  975. dunType: thisData.dunType,
  976. appropriationRatio: thisData.appropriationRatio,
  977. customizeName: thisData.customizeName,
  978. customizeTimes: thisData.customizeTimes,
  979. tid: thisData.tid,
  980. });
  981. }
  982. if (!totalCui) {
  983. totalCui = 0;
  984. }
  985. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  986. this.setState({
  987. contactListNew: theArr,
  988. totalCui,
  989. });
  990. }
  991. }.bind(this),
  992. }).always(
  993. function () {
  994. this.setState({
  995. loading: false,
  996. });
  997. }.bind(this)
  998. );
  999. },
  1000. //审核通过
  1001. examOk() {
  1002. $.ajax({
  1003. method: "post",
  1004. dataType: "json",
  1005. crossDomain: false,
  1006. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1007. data: {
  1008. orderNo: this.state.orderNo,
  1009. orderStatus: 2,
  1010. },
  1011. success: function (data) {
  1012. if (data.error.length || data.data.list == "") {
  1013. if (data.error && data.error.length) {
  1014. message.warning(data.error[0].message);
  1015. }
  1016. } else {
  1017. message.success("该订单已通过审核~");
  1018. this.setState({
  1019. visible: false,
  1020. });
  1021. this.reset();
  1022. }
  1023. }.bind(this),
  1024. }).always(
  1025. function () {
  1026. this.setState({
  1027. loading: false,
  1028. });
  1029. }.bind(this)
  1030. );
  1031. },
  1032. //通过发给外包
  1033. outsourcing() {
  1034. if (this.state.flag) return;
  1035. this.setState({
  1036. flag: true,
  1037. });
  1038. $.ajax({
  1039. method: "post",
  1040. dataType: "json",
  1041. crossDomain: false,
  1042. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1043. data: {
  1044. orderNo: this.state.orderNo,
  1045. orderStatus: 2,
  1046. outsource: 1,
  1047. },
  1048. success: function (data) {
  1049. if (data.error.length || data.data.list == "") {
  1050. if (data.error && data.error.length) {
  1051. message.warning(data.error[0].message);
  1052. }
  1053. } else {
  1054. message.success("该订单已通过审核~");
  1055. this.setState({
  1056. visible: false,
  1057. flag: false,
  1058. });
  1059. this.reset();
  1060. }
  1061. }.bind(this),
  1062. }).always(
  1063. function () {
  1064. this.setState({
  1065. loading: false,
  1066. });
  1067. }.bind(this)
  1068. );
  1069. },
  1070. //审核不通过
  1071. examOks() {
  1072. this.setState({
  1073. aloading: true,
  1074. });
  1075. $.ajax({
  1076. method: "post",
  1077. dataType: "json",
  1078. crossDomain: false,
  1079. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1080. data: {
  1081. orderNo: this.state.orderNo,
  1082. orderStatus: 3,
  1083. reason: this.state.reason,
  1084. },
  1085. success: function (data) {
  1086. if (data.error.length || data.data.list == "") {
  1087. if (data.error && data.error.length) {
  1088. message.warning(data.error[0].message);
  1089. this.setState({
  1090. aloading: true,
  1091. });
  1092. }
  1093. } else {
  1094. message.success("该订单已被拒绝~");
  1095. this.setState({
  1096. visible: false,
  1097. aloading: false,
  1098. noVisible: false,
  1099. reason: "",
  1100. });
  1101. this.reset();
  1102. }
  1103. }.bind(this),
  1104. }).always(
  1105. function () {
  1106. this.setState({
  1107. loading: false,
  1108. });
  1109. }.bind(this)
  1110. );
  1111. },
  1112. //点击拒绝
  1113. examNo() {
  1114. this.setState({
  1115. noVisible: true,
  1116. });
  1117. },
  1118. load() {
  1119. if (this.state.attachmentUrl) {
  1120. let url = window.location.href.substring(7);
  1121. this.state.fileUrl.forEach((e) => {
  1122. window.location.href =
  1123. "http://" +
  1124. url.substring(0, url.indexOf("/")) +
  1125. "/api/admin/outsourceOrg//downloadFile?path=" +
  1126. e.response.data;
  1127. });
  1128. } else {
  1129. message.error("此订单无上传文件");
  1130. }
  1131. },
  1132. callback(key) {
  1133. let url = window.location.href.substring(7);
  1134. this.setState({
  1135. activeKey: key,
  1136. });
  1137. if (this.state.pictureUrl.length) {
  1138. let picArr = [];
  1139. this.state.pictureUrl.map(function (item) {
  1140. if (
  1141. item.response &&
  1142. item.response.data &&
  1143. item.response.data.length
  1144. ) {
  1145. picArr.push(item.response.data);
  1146. }
  1147. });
  1148. }
  1149. if (key === "2") {
  1150. this.setState({
  1151. loading: true,
  1152. });
  1153. $.ajax({
  1154. method: "get",
  1155. dataType: "json",
  1156. crossDomain: false,
  1157. url:
  1158. globalConfig.context +
  1159. "/api/admin/outsourceOrg/orderOutsourceDtails",
  1160. data: {
  1161. orderNo: this.state.orderNo,
  1162. },
  1163. success: function (data) {
  1164. let thisdata = data.data;
  1165. this.setState({
  1166. id: thisdata.id,
  1167. createTimes: thisdata.createTimes,
  1168. auditTimes: thisdata.auditTimes,
  1169. remarks: thisdata.remarks,
  1170. attachmentUrl: thisdata.attachmentUrl
  1171. ? splitUrl(
  1172. thisdata.attachmentUrl,
  1173. ",",
  1174. globalConfig.avatarHost + "/upload",
  1175. url
  1176. )
  1177. : [],
  1178. fileUrl: thisdata.attachmentUrl
  1179. ? splitUrl(
  1180. thisdata.attachmentUrl,
  1181. ",",
  1182. globalConfig.avatarHost + "/upload",
  1183. url
  1184. )
  1185. : [],
  1186. pictureUrl: thisdata.pictureUrl
  1187. ? splitUrl(
  1188. thisdata.pictureUrl,
  1189. ",",
  1190. globalConfig.avatarHost + "/upload",
  1191. url
  1192. )
  1193. : [], //图片地址
  1194. amount: thisdata.amount,
  1195. companyName: thisdata.companyName,
  1196. outsourceRemarks: thisdata.outsourceRemarks,
  1197. unitNumber: thisdata.unitNumber,
  1198. unitPrice: thisdata.unitPrice,
  1199. });
  1200. }.bind(this),
  1201. }).always(
  1202. function () {
  1203. this.setState({
  1204. loading: false,
  1205. });
  1206. }.bind(this)
  1207. );
  1208. }
  1209. },
  1210. downImg() {
  1211. let num = 0;
  1212. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1213. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1214. num = i;
  1215. }
  1216. }
  1217. if (num == this.state.orgCodeUrl.length - 1) {
  1218. return message.warning("已经是最后一张了哦");
  1219. }
  1220. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1221. this.setState({
  1222. previewImage: this.state.previewImage,
  1223. rotateDeg: 0,
  1224. });
  1225. },
  1226. upImg() {
  1227. let num = 0;
  1228. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1229. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1230. num = i;
  1231. }
  1232. }
  1233. if (num == 0) {
  1234. return message.warning("已经是第一张了哦");
  1235. }
  1236. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1237. this.setState({
  1238. previewImage: this.state.previewImage,
  1239. rotateDeg: 0,
  1240. });
  1241. },
  1242. rotate() {
  1243. let rotateDeg = this.state.rotateDeg + 90;
  1244. this.setState({
  1245. rotateDeg,
  1246. });
  1247. },
  1248. downImgs() {
  1249. let num = 0;
  1250. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1251. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1252. num = i;
  1253. }
  1254. }
  1255. if (num == this.state.replenishUrl.length - 1) {
  1256. return message.warning("已经是最后一张了哦");
  1257. }
  1258. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1259. this.setState({
  1260. previewImage: this.state.previewImage,
  1261. rotateDeg: 0,
  1262. });
  1263. },
  1264. upImgs() {
  1265. let num = 0;
  1266. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1267. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1268. num = i;
  1269. }
  1270. }
  1271. if (num == 0) {
  1272. return message.warning("已经是第一张了哦");
  1273. }
  1274. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  1275. this.setState({
  1276. previewImage: this.state.previewImage,
  1277. rotateDeg: 0,
  1278. });
  1279. },
  1280. rotates() {
  1281. let rotateDeg = this.state.rotateDeg + 90;
  1282. this.setState({
  1283. rotateDeg,
  1284. });
  1285. },
  1286. getUrl(url) {
  1287. let theorgCodeUrl = [];
  1288. if (url.length) {
  1289. let picArr = [];
  1290. url.map(function (item) {
  1291. if (
  1292. item.response &&
  1293. item.response.data &&
  1294. item.response.data.length
  1295. ) {
  1296. picArr.push(item.response.data);
  1297. }
  1298. });
  1299. theorgCodeUrl = picArr.join(",");
  1300. }
  1301. return theorgCodeUrl;
  1302. },
  1303. sureOut() {
  1304. if (!this.state.companyName) {
  1305. message.warning("公司名称不能为空");
  1306. return;
  1307. }
  1308. if (!this.state.unitPrice) {
  1309. message.warning("单价不能为空");
  1310. return;
  1311. }
  1312. if (!this.state.unitNumber) {
  1313. message.warning("数量不能为空");
  1314. return;
  1315. }
  1316. if (!this.state.amount) {
  1317. message.warning("总金额不能为空");
  1318. return;
  1319. }
  1320. if (!this.state.outsourceRemarks) {
  1321. message.warning("备注不能为空");
  1322. return;
  1323. }
  1324. if (this.state.pictureUrl.length === 0) {
  1325. message.warning("合同扫描件不能为空");
  1326. return;
  1327. }
  1328. $.ajax({
  1329. method: "POST",
  1330. dataType: "json",
  1331. crossDomain: false,
  1332. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1333. data: {
  1334. id: this.state.id,
  1335. orderNo: this.state.orderNo,
  1336. companyName: this.state.companyName,
  1337. amount: this.state.amount,
  1338. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1339. ? this.getUrl(this.state.attachmentUrl)
  1340. : "",
  1341. orderStatus: 2,
  1342. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1343. ? this.getUrl(this.state.pictureUrl)
  1344. : "",
  1345. outsourceRemarks: this.state.outsourceRemarks,
  1346. unitNumber: this.state.unitNumber,
  1347. unitPrice: this.state.unitPrice,
  1348. },
  1349. }).done(
  1350. function (data) {
  1351. this.setState({
  1352. loading: false,
  1353. });
  1354. if (!data.error.length) {
  1355. message.success("提交成功!");
  1356. this.visitCancel();
  1357. } else {
  1358. message.warning(data.error[0].message);
  1359. }
  1360. }.bind(this)
  1361. );
  1362. },
  1363. //关闭输入理由框
  1364. noCancel() {
  1365. this.setState({
  1366. noVisible: false,
  1367. aloading: false,
  1368. reason: "",
  1369. });
  1370. },
  1371. //搜索
  1372. search() {
  1373. this.loadData();
  1374. },
  1375. //重置
  1376. reset() {
  1377. this.state.nameSearch = "";
  1378. this.state.contractNoSearch = "";
  1379. this.state.releaseDate[0] = undefined;
  1380. this.state.releaseDate[1] = undefined;
  1381. this.state.refundStatusSearch = undefined;
  1382. this.loadData(1);
  1383. },
  1384. resets() {
  1385. this.state.orderNo = "";
  1386. this.state.customerName = "";
  1387. this.state.releaseDate[0] = undefined;
  1388. this.state.releaseDate[1] = undefined;
  1389. },
  1390. getOrgCodeUrl(e) {
  1391. this.setState({ pictureUrl: e });
  1392. },
  1393. //关闭详情
  1394. visitCancel() {
  1395. this.setState(
  1396. {
  1397. visible: false,
  1398. },
  1399. () => {
  1400. this.setState({
  1401. activeKey: "1",
  1402. });
  1403. }
  1404. );
  1405. this.resets();
  1406. this.loadData();
  1407. },
  1408. visitOk() {
  1409. this.setState({
  1410. visible: false,
  1411. });
  1412. this.resets();
  1413. },
  1414. showDeleteConfirm(fn) {
  1415. confirm({
  1416. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1417. content: (
  1418. <p style={{ fontWeight: 900, color: "red" }}>
  1419. 当前订单为外包单,您确定修改为普通订单?
  1420. </p>
  1421. ),
  1422. okText: "确定",
  1423. okType: "danger",
  1424. cancelText: "取消",
  1425. onOk() {
  1426. fn();
  1427. },
  1428. onCancel() {},
  1429. });
  1430. },
  1431. changeList(arr) {
  1432. const newArr = [];
  1433. this.state.columns.forEach(item => {
  1434. arr.forEach(val => {
  1435. if (val === item.title) {
  1436. newArr.push(item);
  1437. }
  1438. });
  1439. });
  1440. this.setState({
  1441. changeList: newArr
  1442. });
  1443. },
  1444. render() {
  1445. const formItemLayout = {
  1446. labelCol: { span: 8 },
  1447. wrapperCol: { span: 14 },
  1448. };
  1449. const FormItem = Form.Item;
  1450. const { TextArea } = Input;
  1451. const { TabPane } = Tabs;
  1452. const { RangePicker } = DatePicker;
  1453. const cuiDataList = this.state.contactList || [];
  1454. return (
  1455. <div className="user-content">
  1456. {this.state.resVisible ? (
  1457. <ResolutionDetail
  1458. cancel={this.resCancel}
  1459. detail={this.state.resRecord}
  1460. visible={this.state.resVisible}
  1461. id={this.state.resRecord.orderNo}
  1462. />
  1463. ) : (
  1464. ""
  1465. )}
  1466. <ShowModalDiv ShowModal={this.state.showModal} />
  1467. <div className="content-title">
  1468. <span>外包订单列表</span>
  1469. </div>
  1470. <div className="user-search">
  1471. <Tabs
  1472. defaultActiveKey="1"
  1473. onChange={this.callback}
  1474. className="test"
  1475. >
  1476. <TabPane tab="搜索" key="1">
  1477. <Input
  1478. placeholder="客户名称"
  1479. style={{
  1480. width: "150px",
  1481. marginBottom: "10px",
  1482. marginLeft: 10,
  1483. marginRight: 10,
  1484. }}
  1485. value={this.state.nameSearch}
  1486. onChange={(e) => {
  1487. this.setState({ nameSearch: e.target.value });
  1488. }}
  1489. />
  1490. <Input
  1491. placeholder="合同编号"
  1492. style={{ width: "150px" }}
  1493. value={this.state.contractNoSearch}
  1494. onChange={(e) => {
  1495. this.setState({ contractNoSearch: e.target.value });
  1496. }}
  1497. />
  1498. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1499. <RangePicker
  1500. value={[
  1501. this.state.releaseDate[0]
  1502. ? moment(this.state.releaseDate[0])
  1503. : null,
  1504. this.state.releaseDate[1]
  1505. ? moment(this.state.releaseDate[1])
  1506. : null,
  1507. ]}
  1508. onChange={(data, dataString) => {
  1509. this.setState({ releaseDate: dataString });
  1510. }}
  1511. />
  1512. <Select
  1513. value={this.state.refundStatusSearch}
  1514. style={{ width: 150, marginLeft: "10px" }}
  1515. onChange={(e) => {
  1516. this.setState({
  1517. refundStatusSearch: e,
  1518. });
  1519. }}
  1520. placeholder="审核状态"
  1521. >
  1522. <Option value={0}>待审核</Option>
  1523. <Option value={1}>审核通过</Option>
  1524. <Option value={2}>审核驳回</Option>
  1525. </Select>
  1526. <Button
  1527. type="primary"
  1528. onClick={this.search}
  1529. style={{ marginLeft: "10px", marginRight: 10 }}
  1530. >
  1531. 搜索
  1532. </Button>
  1533. <Button onClick={this.reset}>重置</Button>
  1534. </TabPane>
  1535. <TabPane tab="更改表格显示数据" key="ChooseList">
  1536. <div style={{ marginLeft: 10 }}>
  1537. <ChooseList
  1538. columns={this.state.columns}
  1539. changeFn={this.changeList}
  1540. changeList={this.state.changeList}
  1541. top={55}
  1542. margin={11}
  1543. />
  1544. </div>
  1545. </TabPane>
  1546. </Tabs>
  1547. <div className="patent-table">
  1548. <Spin spinning={this.state.loading}>
  1549. <Table
  1550. columns={
  1551. this.state.changeList
  1552. ? this.state.changeList
  1553. : this.state.columns
  1554. }
  1555. dataSource={this.state.dataSource}
  1556. pagination={this.state.pagination}
  1557. onRowClick={this.tableRowClick}
  1558. bordered
  1559. size="small"
  1560. />
  1561. </Spin>
  1562. </div>
  1563. {this.state.visible ? <Modal
  1564. className="customeDetails"
  1565. footer=""
  1566. width="900px"
  1567. visible={this.state.visible}
  1568. onOk={this.visitOk}
  1569. onCancel={this.visitCancel}
  1570. >
  1571. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1572. <TabPane tab="订单详情" key="1">
  1573. {this.state.activeKey === "1" ? <Form
  1574. layout="horizontal"
  1575. onSubmit={this.handleSubmit}
  1576. id="demand-form"
  1577. style={{ paddingBottom: "40px" }}
  1578. >
  1579. <Spin spinning={this.state.loading}>
  1580. <div className="clearfix">
  1581. <FormItem
  1582. className="half-item"
  1583. {...formItemLayout}
  1584. label="订单编号"
  1585. >
  1586. <span>{this.state.orderNo}</span>
  1587. </FormItem>
  1588. <FormItem
  1589. className="half-item"
  1590. {...formItemLayout}
  1591. label="合同编号"
  1592. >
  1593. <span>{this.state.contractNo}</span>
  1594. </FormItem>
  1595. <FormItem
  1596. className="half-item"
  1597. {...formItemLayout}
  1598. label="客户名称"
  1599. >
  1600. <span>{this.state.userName}</span>
  1601. </FormItem>
  1602. <FormItem
  1603. className="half-item"
  1604. {...formItemLayout}
  1605. label="合同签订时间"
  1606. >
  1607. <span>{this.state.signDate}</span>
  1608. </FormItem>
  1609. <FormItem
  1610. className="half-item"
  1611. {...formItemLayout}
  1612. label="流程状态"
  1613. >
  1614. <span>
  1615. {getProcessStatus(this.state.processStatus)}
  1616. </span>
  1617. </FormItem>
  1618. <FormItem
  1619. className="half-item"
  1620. {...formItemLayout}
  1621. label="结算状态"
  1622. >
  1623. <span>
  1624. {getLiquidationStatus(this.state.liquidationStatus)}
  1625. </span>
  1626. </FormItem>
  1627. <FormItem
  1628. className="half-item"
  1629. {...formItemLayout}
  1630. label="企业联系人"
  1631. >
  1632. <span>{this.state.contacts}</span>
  1633. </FormItem>
  1634. <FormItem
  1635. className="half-item"
  1636. {...formItemLayout}
  1637. label="联系人电话"
  1638. >
  1639. <span>{this.state.contactMobile}</span>
  1640. </FormItem>
  1641. <FormItem
  1642. className="half-item"
  1643. {...formItemLayout}
  1644. label="企业法人"
  1645. >
  1646. <span>{this.state.legalPerson}</span>
  1647. </FormItem>
  1648. <FormItem
  1649. className="half-item"
  1650. {...formItemLayout}
  1651. label="法人电话"
  1652. >
  1653. <span>{this.state.legalPersonTel}</span>
  1654. </FormItem>
  1655. <FormItem
  1656. className="half-item"
  1657. {...formItemLayout}
  1658. label="签单金额(万元)"
  1659. >
  1660. <span>{this.state.totalAmount}</span>
  1661. </FormItem>
  1662. <FormItem
  1663. className="half-item"
  1664. {...formItemLayout}
  1665. label="首付金额(万元)"
  1666. >
  1667. <span>{this.state.firstAmount}</span>
  1668. </FormItem>
  1669. <FormItem
  1670. className="half-item"
  1671. {...formItemLayout}
  1672. label="特批立项"
  1673. >
  1674. <span>{getApprovedState(this.state.approval)}</span>
  1675. </FormItem>
  1676. <FormItem
  1677. className="half-item"
  1678. {...formItemLayout}
  1679. label="已收款项(万元)"
  1680. >
  1681. <span>{this.state.settlementAmount}</span>
  1682. </FormItem>
  1683. <FormItem
  1684. className="half-item"
  1685. {...formItemLayout}
  1686. label="订单部门"
  1687. >
  1688. <span>{this.state.depName}</span>
  1689. </FormItem>
  1690. <FormItem
  1691. className="half-item"
  1692. {...formItemLayout}
  1693. label="是否外包"
  1694. >
  1695. {this.state.outsource}
  1696. </FormItem>
  1697. <div className="clearfix">
  1698. <FormItem
  1699. labelCol={{ span: 4 }}
  1700. wrapperCol={{ span: 16 }}
  1701. label="订单留言"
  1702. >
  1703. <p style={{ width: 500, wordWrap: "break-word" }}>
  1704. {this.state.orderRemarks}
  1705. </p>
  1706. </FormItem>
  1707. </div>
  1708. <div className="clearfix">
  1709. <FormItem
  1710. labelCol={{ span: 4 }}
  1711. wrapperCol={{ span: 18 }}
  1712. label="合同扫描件"
  1713. >
  1714. {/*<Upload*/}
  1715. {/* className="demandDetailShow-upload"*/}
  1716. {/* listType="picture-card"*/}
  1717. {/* fileList={this.state.orgCodeUrl}*/}
  1718. {/* onPreview={(file) => {*/}
  1719. {/* this.setState({*/}
  1720. {/* previewImage: file.url || file.thumbUrl,*/}
  1721. {/* previewVisible: true,*/}
  1722. {/* });*/}
  1723. {/* }}*/}
  1724. {/*/>*/}
  1725. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1726. {this.state.visible && this.state.activeKey === "1" ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  1727. </div>
  1728. <Modal
  1729. maskClosable={false}
  1730. footer={null}
  1731. width={"50%"}
  1732. visible={this.state.previewVisible}
  1733. onCancel={() => {
  1734. this.setState({
  1735. previewVisible: false,
  1736. rotateDeg: 0,
  1737. });
  1738. }}
  1739. >
  1740. <img
  1741. alt=""
  1742. style={{
  1743. width: "100%",
  1744. transform: `rotate(${this.state.rotateDeg}deg)`,
  1745. }}
  1746. src={this.state.previewImage || ""}
  1747. />
  1748. <Button
  1749. onClick={this.rotate}
  1750. style={{
  1751. position: "relative",
  1752. left: "50%",
  1753. transform: "translateX(-50%)",
  1754. }}
  1755. >
  1756. 旋转
  1757. </Button>
  1758. <Button
  1759. onClick={this.upImg}
  1760. style={{
  1761. position: "absolute",
  1762. left: -81,
  1763. top: "50%",
  1764. transform: "translateY(-50%)",
  1765. }}
  1766. >
  1767. 上一张
  1768. </Button>
  1769. <Button
  1770. onClick={this.downImg}
  1771. style={{
  1772. position: "absolute",
  1773. right: -81,
  1774. top: "50%",
  1775. transform: "translateY(-50%)",
  1776. }}
  1777. >
  1778. 下一张
  1779. </Button>
  1780. </Modal>
  1781. <Button
  1782. style={{
  1783. float: "right",
  1784. marginRight: "140px",
  1785. marginTop: "20px",
  1786. }}
  1787. onClick={this.getOrderLog}
  1788. >
  1789. 查看订单日志
  1790. </Button>
  1791. </FormItem>
  1792. <FormItem
  1793. labelCol={{ span: 4 }}
  1794. wrapperCol={{ span: 18 }}
  1795. label="补充协议"
  1796. >
  1797. {/*<Upload*/}
  1798. {/* className="demandDetailShow-upload"*/}
  1799. {/* listType="picture-card"*/}
  1800. {/* fileList={this.state.replenishUrl}*/}
  1801. {/* onPreview={(file) => {*/}
  1802. {/* this.setState({*/}
  1803. {/* previewImage: file.url || file.thumbUrl,*/}
  1804. {/* previewVisibles: true,*/}
  1805. {/* });*/}
  1806. {/* }}*/}
  1807. {/*/>*/}
  1808. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1809. {this.state.visible && this.state.activeKey === "1" && this.state.replenishUrl ? <ImgList domId={'outsourcingList1'} fileList={this.state.replenishUrl} ItemWidth={'96px'}/> : <div/>}
  1810. </div>
  1811. <Modal
  1812. maskClosable={false}
  1813. footer={null}
  1814. width={"50%"}
  1815. visible={this.state.previewVisibles}
  1816. onCancel={() => {
  1817. this.setState({
  1818. previewVisibles: false,
  1819. rotateDeg: 0,
  1820. });
  1821. }}
  1822. >
  1823. <img
  1824. alt=""
  1825. style={{
  1826. width: "100%",
  1827. transform: `rotate(${this.state.rotateDeg}deg)`,
  1828. }}
  1829. src={this.state.previewImage || ""}
  1830. />
  1831. <Button
  1832. onClick={this.rotate}
  1833. style={{
  1834. position: "relative",
  1835. left: "50%",
  1836. transform: "translateX(-50%)",
  1837. }}
  1838. >
  1839. 旋转
  1840. </Button>
  1841. <Button
  1842. onClick={this.upImgs}
  1843. style={{
  1844. position: "absolute",
  1845. left: -81,
  1846. top: "50%",
  1847. transform: "translateY(-50%)",
  1848. }}
  1849. >
  1850. 上一张
  1851. </Button>
  1852. <Button
  1853. onClick={this.downImgs}
  1854. style={{
  1855. position: "absolute",
  1856. right: -81,
  1857. top: "50%",
  1858. transform: "translateY(-50%)",
  1859. }}
  1860. >
  1861. 下一张
  1862. </Button>
  1863. </Modal>
  1864. </FormItem>
  1865. </div>
  1866. <div className="clearfix">
  1867. <FormItem
  1868. className="half-item"
  1869. {...formItemLayout}
  1870. label="订单负责人"
  1871. >
  1872. <span>{this.state.salesmanName}</span>
  1873. </FormItem>
  1874. <FormItem
  1875. className="half-item"
  1876. {...formItemLayout}
  1877. label="订单负责人电话"
  1878. >
  1879. <span>{this.state.salesmanMobile}</span>
  1880. </FormItem>
  1881. </div>
  1882. <div className="clearfix">
  1883. <FormItem
  1884. className="half-item"
  1885. {...formItemLayout}
  1886. label="当前财务负责人"
  1887. >
  1888. <span>{this.state.nowFinance}</span>
  1889. </FormItem>
  1890. <FormItem
  1891. className="half-item"
  1892. {...formItemLayout}
  1893. label="当前财务负责人电话"
  1894. >
  1895. <span>{this.state.nowFinanceMobile}</span>
  1896. </FormItem>
  1897. </div>
  1898. <div className="clearfix">
  1899. <FormItem
  1900. className="half-item"
  1901. {...formItemLayout}
  1902. style={{ opacity: ".5" }}
  1903. label="原订单负责人"
  1904. >
  1905. <span>{this.state.oldSalesmanName}</span>
  1906. </FormItem>
  1907. <FormItem
  1908. className="half-item"
  1909. {...formItemLayout}
  1910. style={{ opacity: ".5" }}
  1911. label="原订单负责人电话"
  1912. >
  1913. <span>{this.state.oldSalesmanMobile}</span>
  1914. </FormItem>
  1915. </div>
  1916. <div className="clearfix">
  1917. <FormItem
  1918. className="half-item"
  1919. style={{ opacity: ".5" }}
  1920. {...formItemLayout}
  1921. label="实际财务操作人"
  1922. >
  1923. <span>{this.state.financeName}</span>
  1924. </FormItem>
  1925. <FormItem
  1926. className="half-item"
  1927. {...formItemLayout}
  1928. style={{ opacity: ".5" }}
  1929. label="实际财务操作人电话"
  1930. >
  1931. <span>{this.state.financeMobile}</span>
  1932. </FormItem>
  1933. </div>
  1934. <div>
  1935. <span
  1936. style={{ marginLeft: "50px", fontSize: "20px" }}
  1937. >
  1938. 项目业务
  1939. </span>
  1940. {/* {this.state.processStatus == 0 ? (
  1941. <Button
  1942. type="primary"
  1943. onClick={this.addDetailed}
  1944. style={{
  1945. float: "right",
  1946. marginRight: "50px",
  1947. marginBottom: "15px"
  1948. }}
  1949. >
  1950. 添加项目明细
  1951. </Button>
  1952. ) : (
  1953. ""
  1954. )} */}
  1955. </div>
  1956. <div className="patent-table">
  1957. <Spin spinning={this.state.loading}>
  1958. <Table
  1959. columns={this.state.columnsX}
  1960. dataSource={this.state.dataSourceX}
  1961. pagination={this.state.paginations}
  1962. onRowClick={this.tableRowClickX}
  1963. bordered
  1964. size="small"
  1965. />
  1966. </Spin>
  1967. </div>
  1968. <div
  1969. style={{
  1970. display: cuiDataList.length ? "block" : "none",
  1971. }}
  1972. >
  1973. <span
  1974. style={{ marginLeft: "50px", fontSize: "20px" }}
  1975. >
  1976. 催款节点
  1977. </span>
  1978. {/* {this.state.processStatus == 0 ? (
  1979. <Button
  1980. type="primary"
  1981. onClick={this.addcontact}
  1982. disabled
  1983. style={{
  1984. float: "right",
  1985. marginRight: "50px",
  1986. marginBottom: "15px"
  1987. }}
  1988. >
  1989. 添加催款节点
  1990. </Button>
  1991. ) : (
  1992. ""
  1993. )} */}
  1994. </div>
  1995. <div
  1996. className="clearfix"
  1997. style={{
  1998. display: cuiDataList.length ? "block" : "none",
  1999. }}
  2000. >
  2001. <Spin spinning={this.state.loading}>
  2002. <Form layout="horizontal" id="demand-form">
  2003. <Table
  2004. pagination={false}
  2005. columns={this.state.ContactsLists}
  2006. dataSource={this.state.contactList}
  2007. bordered
  2008. size="small"
  2009. scroll={{ x: "max-content", y: 0 }}
  2010. />
  2011. <Col
  2012. span={24}
  2013. offset={9}
  2014. style={{ marginTop: "15px" }}
  2015. />
  2016. </Form>
  2017. </Spin>
  2018. </div>
  2019. <div
  2020. style={{
  2021. display: cuiDataList.length ? "none" : "block",
  2022. }}
  2023. >
  2024. <span
  2025. style={{ marginLeft: "50px", fontSize: "20px" }}
  2026. >
  2027. 催款节点
  2028. </span>
  2029. <span
  2030. style={{
  2031. display: cuiDataList.length
  2032. ? "none"
  2033. : "inline-block",
  2034. marginLeft: 10,
  2035. color: "red",
  2036. }}
  2037. >
  2038. 金额总计(万元): {this.state.totalCui}
  2039. </span>
  2040. {/* {this.state.processStatus == 0 ? (
  2041. <Button
  2042. type="primary"
  2043. onClick={this.addcontactNew}
  2044. disabled={cuiDataList.length ? true : false}
  2045. style={{
  2046. float: "right",
  2047. marginRight: "50px",
  2048. marginBottom: "15px"
  2049. }}
  2050. >
  2051. 添加催款节点
  2052. </Button>
  2053. ) : (
  2054. ""
  2055. )} */}
  2056. </div>
  2057. <div
  2058. className="clearfix"
  2059. style={{
  2060. display: cuiDataList.length ? "none" : "block",
  2061. }}
  2062. >
  2063. <Spin spinning={this.state.loading}>
  2064. <Form layout="horizontal" id="demand-form">
  2065. <Table
  2066. pagination={false}
  2067. columns={this.state.ContactsListsNew}
  2068. dataSource={this.state.contactListNew}
  2069. bordered
  2070. size="small"
  2071. scroll={{ x: "max-content", y: 0 }}
  2072. />
  2073. <Col
  2074. span={24}
  2075. offset={9}
  2076. style={{ marginTop: "15px" }}
  2077. />
  2078. </Form>
  2079. </Spin>
  2080. </div>
  2081. {this.state.refundStatus === 2 ? (
  2082. <div
  2083. className="addSave"
  2084. style={{ marginTop: "15px" }}
  2085. >
  2086. <Button
  2087. type="primary"
  2088. onClick={() => {
  2089. if (this.state.outsource == "是") {
  2090. this.showDeleteConfirm(this.examOk);
  2091. } else {
  2092. this.examOk();
  2093. }
  2094. }}
  2095. style={{ marginLeft: "200px" }}
  2096. htmlType="submit"
  2097. >
  2098. 通过
  2099. </Button>
  2100. <Button
  2101. type="primary"
  2102. onClick={this.examNo}
  2103. style={{ marginLeft: "50px" }}
  2104. htmlType="submit"
  2105. >
  2106. 驳回
  2107. </Button>
  2108. <Button
  2109. type="ghost"
  2110. onClick={this.visitCancel}
  2111. style={{ marginLeft: "50px" }}
  2112. >
  2113. 取消
  2114. </Button>
  2115. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  2116. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  2117. </div>
  2118. ) : (
  2119. ""
  2120. )}
  2121. </div>
  2122. </Spin>
  2123. </Form> : <div/>}
  2124. </TabPane>
  2125. <TabPane tab="外包(不走总部)" key="2">
  2126. {this.state.refundStatus === 2 ? (
  2127. <div>
  2128. <div className="clearfix">
  2129. <FormItem
  2130. className="half-item"
  2131. {...formItemLayout}
  2132. label={
  2133. <span>
  2134. <strong style={{ color: "#f00" }}>*</strong>
  2135. 外包公司
  2136. </span>
  2137. }
  2138. >
  2139. <Input
  2140. value={this.state.companyName}
  2141. onChange={(e) => {
  2142. this.setState({
  2143. companyName: e.target.value,
  2144. });
  2145. }}
  2146. placeholder="请填写外包公司名称"
  2147. />
  2148. </FormItem>
  2149. <span className="tip">如多个公司,请用间隔</span>
  2150. </div>
  2151. <div className="clearfix">
  2152. <FormItem
  2153. className="half-item"
  2154. {...formItemLayout}
  2155. label={
  2156. <span>
  2157. <strong style={{ color: "#f00" }}>*</strong>
  2158. 单价(万元)
  2159. </span>
  2160. }
  2161. >
  2162. <Input
  2163. value={this.state.unitPrice}
  2164. onChange={(e) => {
  2165. this.setState({
  2166. unitPrice: e.target.value,
  2167. });
  2168. }}
  2169. placeholder="请填写本次外包公司的价格"
  2170. />
  2171. </FormItem>
  2172. </div>
  2173. <div className="clearfix">
  2174. <FormItem
  2175. className="half-item"
  2176. {...formItemLayout}
  2177. label={
  2178. <span>
  2179. <strong style={{ color: "#f00" }}>*</strong>
  2180. 数量(个)
  2181. </span>
  2182. }
  2183. >
  2184. <Input
  2185. value={this.state.unitNumber}
  2186. onChange={(e) => {
  2187. this.setState({
  2188. unitNumber: e.target.value,
  2189. });
  2190. }}
  2191. placeholder="请填写本次外包公司的价格"
  2192. />
  2193. </FormItem>
  2194. </div>
  2195. <div className="clearfix">
  2196. <FormItem
  2197. className="half-item"
  2198. {...formItemLayout}
  2199. label={
  2200. <span>
  2201. <strong style={{ color: "#f00" }}>*</strong>
  2202. 总金额(万元)
  2203. </span>
  2204. }
  2205. >
  2206. <Input
  2207. value={this.state.amount}
  2208. onChange={(e) => {
  2209. this.setState({
  2210. amount: e.target.value,
  2211. });
  2212. }}
  2213. placeholder="请填写本次外包公司的价格"
  2214. />
  2215. </FormItem>
  2216. </div>
  2217. <div className="clearfix">
  2218. <FormItem
  2219. className="half-item"
  2220. {...formItemLayout}
  2221. label={
  2222. <span>
  2223. <strong style={{ color: "#f00" }}>*</strong>备注
  2224. </span>
  2225. }
  2226. >
  2227. <TextArea
  2228. rows={4}
  2229. value={this.state.outsourceRemarks}
  2230. onChange={(e) => {
  2231. this.setState({
  2232. outsourceRemarks: e.target.value,
  2233. });
  2234. }}
  2235. placeholder="请输入备注"
  2236. />
  2237. </FormItem>
  2238. </div>
  2239. {/*<div className="clearfix">
  2240. <FormItem className="half-item"
  2241. {...formItemLayout}
  2242. label="上传协议文件" style={{height:"auto"}}>
  2243. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2244. data={(e)=>{
  2245. return {
  2246. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2247. }
  2248. }}
  2249. fileList={this.state.fileUrl}
  2250. onChange={(e)=>{
  2251. this.setState({
  2252. attachmentUrl:e.fileList,
  2253. fileUrl:e.fileList
  2254. })
  2255. }}>
  2256. {fileUrl.length>1?null:<Button>
  2257. <Icon type="upload" /> 点击上传
  2258. </Button>}
  2259. </Upload>
  2260. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  2261. </FormItem>
  2262. </div>*/}
  2263. <p
  2264. className="tip"
  2265. style={{
  2266. paddingBottom: "12px",
  2267. width: "240px",
  2268. marginLeft: "145px",
  2269. }}
  2270. >
  2271. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  2272. </p>
  2273. <div className="clearfix">
  2274. <FormItem
  2275. labelCol={{ span: 4 }}
  2276. wrapperCol={{ span: 18 }}
  2277. label={
  2278. <span>
  2279. <strong style={{ color: "#f00" }}>*</strong>
  2280. 合同/协议扫描件
  2281. </span>
  2282. }
  2283. >
  2284. <PicturesWall
  2285. fileList={this.getOrgCodeUrl}
  2286. pictureUrl={this.state.pictureUrl}
  2287. />
  2288. <p>图片建议:要清晰。</p>
  2289. </FormItem>
  2290. </div>
  2291. <div className="clearfix">
  2292. <div
  2293. style={{
  2294. display: "inline-black",
  2295. textAlign: "center",
  2296. }}
  2297. >
  2298. <Button type="primary" onClick={this.sureOut}>
  2299. 确认发起外包,不通过总部
  2300. </Button>
  2301. <p className="tip">提示:高于总部价格,费用个人承担</p>
  2302. </div>
  2303. </div>
  2304. </div>
  2305. ) : (
  2306. <div>
  2307. <div className="clearfix">
  2308. <FormItem
  2309. className="half-item"
  2310. {...formItemLayout}
  2311. label="外包公司"
  2312. >
  2313. <span>{this.state.companyName}</span>
  2314. </FormItem>
  2315. </div>
  2316. <div className="clearfix">
  2317. <FormItem
  2318. className="half-item"
  2319. {...formItemLayout}
  2320. label="单价(万元)"
  2321. >
  2322. <span>{this.state.unitPrice}</span>
  2323. </FormItem>
  2324. </div>
  2325. <div className="clearfix">
  2326. <FormItem
  2327. className="half-item"
  2328. {...formItemLayout}
  2329. label="数量(个)"
  2330. >
  2331. <span>{this.state.unitNumber}</span>
  2332. </FormItem>
  2333. </div>
  2334. <div className="clearfix">
  2335. <FormItem
  2336. className="half-item"
  2337. {...formItemLayout}
  2338. label="总金额(万元)"
  2339. >
  2340. <span>{this.state.amount}</span>
  2341. </FormItem>
  2342. </div>
  2343. <div className="clearfix">
  2344. <FormItem
  2345. className="half-item"
  2346. {...formItemLayout}
  2347. label="备注"
  2348. >
  2349. <span>{this.state.outsourceRemarks}</span>
  2350. </FormItem>
  2351. </div>
  2352. {/*<div className="clearfix">
  2353. <FormItem className="half-item" style={{height:'auto'}}
  2354. {...formItemLayout}
  2355. label="上传协议文件" >
  2356. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2357. data={(e)=>{
  2358. return {
  2359. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2360. }
  2361. }}
  2362. fileList={this.state.fileUrl}
  2363. showUploadList={{showRemoveIcon:false}}
  2364. onPreview={(e)=>{
  2365. let url = window.location.href.substring(7)
  2366. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  2367. }}
  2368. >
  2369. </Upload>
  2370. </FormItem>
  2371. </div>*/}
  2372. <div className="clearfix">
  2373. <FormItem
  2374. labelCol={{ span: 4 }}
  2375. wrapperCol={{ span: 18 }}
  2376. label="合同/协议扫描件"
  2377. >
  2378. {/*<Upload*/}
  2379. {/* className="demandDetailShow-upload"*/}
  2380. {/* listType="picture-card"*/}
  2381. {/* fileList={this.state.pictureUrl}*/}
  2382. {/* onPreview={(file) => {*/}
  2383. {/* this.setState({*/}
  2384. {/* previewImage: file.url || file.thumbUrl,*/}
  2385. {/* previewVisible: true,*/}
  2386. {/* });*/}
  2387. {/* }}*/}
  2388. {/*/>*/}
  2389. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  2390. {this.state.visible && this.state.activeKey === "2" && this.state.pictureUrl ? <ImgList domId={'outsourcingList2'} fileList={this.state.pictureUrl} ItemWidth={'96px'}/> : <div/>}
  2391. </div>
  2392. <Modal
  2393. maskClosable={false}
  2394. footer={null}
  2395. width={"50%"}
  2396. visible={this.state.previewVisibless}
  2397. onCancel={() => {
  2398. this.setState({ previewVisibless: false });
  2399. }}
  2400. >
  2401. <img
  2402. alt=""
  2403. style={{
  2404. width: "100%",
  2405. transform: `rotate(${this.state.rotateDeg}deg)`,
  2406. }}
  2407. src={this.state.previewImage || ""}
  2408. />
  2409. <Button
  2410. onClick={this.rotate}
  2411. style={{
  2412. position: "relative",
  2413. left: "50%",
  2414. transform: "translateX(-50%)",
  2415. }}
  2416. >
  2417. 旋转
  2418. </Button>
  2419. <Button
  2420. onClick={this.upImg}
  2421. style={{
  2422. position: "absolute",
  2423. left: -81,
  2424. top: "50%",
  2425. transform: "translateY(-50%)",
  2426. }}
  2427. >
  2428. 上一张
  2429. </Button>
  2430. <Button
  2431. onClick={this.downImg}
  2432. style={{
  2433. position: "absolute",
  2434. right: -81,
  2435. top: "50%",
  2436. transform: "translateY(-50%)",
  2437. }}
  2438. >
  2439. 下一张
  2440. </Button>
  2441. </Modal>
  2442. </FormItem>
  2443. </div>
  2444. </div>
  2445. )}
  2446. {this.state.refundStatus ? (
  2447. <div className="clearfix">
  2448. <hr className="division" />
  2449. <div className="clearfix">
  2450. <FormItem
  2451. className="half-item"
  2452. {...formItemLayout}
  2453. label="审核意见"
  2454. >
  2455. <span>{this.state.remarks}</span>
  2456. </FormItem>
  2457. </div>
  2458. <div className="clearfix">
  2459. <FormItem
  2460. className="half-item"
  2461. {...formItemLayout}
  2462. label="审核结果"
  2463. >
  2464. <span>
  2465. {getRefundStatus(this.state.refundStatus)}
  2466. </span>
  2467. </FormItem>
  2468. </div>
  2469. <div className="clearfix">
  2470. <FormItem
  2471. className="half-item"
  2472. {...formItemLayout}
  2473. label="审核时间"
  2474. >
  2475. <span>{this.state.auditTimes}</span>
  2476. </FormItem>
  2477. </div>
  2478. </div>
  2479. ) : (
  2480. ""
  2481. )}
  2482. </TabPane>
  2483. </Tabs>
  2484. </Modal> : <div/>}
  2485. <Modal
  2486. maskClosable={false}
  2487. visible={this.state.noVisible}
  2488. onOk={this.handleOk}
  2489. onCancel={this.noCancel}
  2490. width="400px"
  2491. title={"拒绝理由"}
  2492. footer=""
  2493. className="admin-desc-content"
  2494. confirmLoading={this.state.confirmLoading}
  2495. >
  2496. <Form layout="horizontal" id="demand-form">
  2497. <Spin spinning={this.state.loading}>
  2498. <div className="clearfix">
  2499. <FormItem
  2500. labelCol={{ span: 4 }}
  2501. wrapperCol={{ span: 16 }}
  2502. label="拒绝理由"
  2503. >
  2504. <Input
  2505. type="textarea"
  2506. placeholder="请输入拒绝理由"
  2507. rows={4}
  2508. value={this.state.reason}
  2509. onChange={(e) => {
  2510. this.setState({ reason: e.target.value });
  2511. }}
  2512. />
  2513. </FormItem>
  2514. </div>
  2515. <div className="clearfix">
  2516. <Button
  2517. className="cancel"
  2518. type="primary"
  2519. onClick={this.examOks}
  2520. style={{ marginLeft: "50px" }}
  2521. htmlType="submit"
  2522. loading={this.state.aloading}
  2523. >
  2524. 确定
  2525. </Button>
  2526. <Button
  2527. className="cancel"
  2528. type="ghost"
  2529. onClick={this.noCancel}
  2530. style={{ marginLeft: "50px" }}
  2531. >
  2532. 取消
  2533. </Button>
  2534. </div>
  2535. </Spin>
  2536. </Form>
  2537. </Modal>
  2538. {/* <Modal
  2539. visible={this.state.rizhivisible}
  2540. className="admin-desc-content"
  2541. width="800px"
  2542. maskClosable={false}
  2543. title="订单日志"
  2544. footer={null}
  2545. onCancel={this.closeOrderLog}
  2546. >
  2547. <div className="patent-table">
  2548. <Spin spinning={this.state.loading}>
  2549. <Table
  2550. columns={this.state.columnsrizhi}
  2551. dataSource={this.state.dataSourcerizhi}
  2552. pagination={false}
  2553. />
  2554. </Spin>
  2555. </div>
  2556. </Modal> */}
  2557. <OrderRiZi
  2558. dataSourcerizhi={this.state.dataSourcerizhi}
  2559. closeOrderLog={this.closeOrderLog}
  2560. visible={this.state.rizhivisible}
  2561. loading={this.state.loading}
  2562. />
  2563. </div>
  2564. {this.state.addnextVisible && <ProjectDetailsReadOnly
  2565. infor={this.state.dataInfor}
  2566. visible={this.state.addnextVisible}
  2567. onCancel={this.nextCancel}
  2568. />}
  2569. </div>
  2570. );
  2571. },
  2572. })
  2573. );
  2574. export default outsourcingList;