examine.jsx 87 KB

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