examinejl.jsx 87 KB

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