examine.jsx 90 KB

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