reject.jsx 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070
  1. import React from 'react';
  2. import {
  3. Tooltip,
  4. Button,
  5. AutoComplete,
  6. Input,
  7. Select,
  8. Spin,
  9. Popconfirm,
  10. Table,
  11. message,
  12. DatePicker,
  13. Upload,
  14. Form,
  15. Modal,
  16. Col,
  17. Tag,
  18. Tabs,
  19. Radio,
  20. Checkbox,
  21. } from 'antd';
  22. import $ from 'jquery/src/ajax';
  23. import moment from 'moment';
  24. import { boutique, tepi, jiedian, salesList, cuiJieDian } from '@/dataDic.js';
  25. import {
  26. getLiquidationStatus,
  27. getProcessStatus,
  28. splitUrl,
  29. getCuikuan,
  30. moneyVerify,
  31. ShowModal,
  32. getProjectName,
  33. getApprovedType,
  34. compare,
  35. } from "@/tools.js";
  36. import './customer.less';
  37. import ShowModalDiv from "@/showModal.jsx"
  38. import OrderRiZi from "@/orderRiZi.jsx";
  39. import ResolutionDetail from "@/resolutionDetail";
  40. import ImgList from "../../../common/imgList";
  41. import { ChooseList } from "./chooseList";
  42. import OrderItemStatus from "../../../common/orderItemStatus";
  43. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  44. import OrderCoor from './changeComponent/orderCoor';
  45. import ProjectOperation from "../../../common/projectOperation";
  46. import NewAddProject from "../../../common/projectOperation/newAddProject"
  47. import NewEditProject from "../../../common/projectOperation/newEditProject"
  48. import ContentUrl from './contentUrl';
  49. import UpdateSales from './updatesales';//修改销售类型
  50. import PicturesWall from "./changeComponent/picturesWall.js";
  51. import FlowChart from '../../../common/flowchart'; // 流程图
  52. import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
  53. import Property from '../../../common/orderDetail/property' // 知识产权情况
  54. const CheckboxGroup = Checkbox.Group;
  55. const IntentionCustomer = Form.create()(
  56. React.createClass({
  57. loadData(pageNo) {
  58. this.setState({
  59. visitModul: false,
  60. loading: true,
  61. ispage: pageNo,
  62. modalVisible: false,
  63. });
  64. $.ajax({
  65. method: "get",
  66. dataType: "json",
  67. crossDomain: false,
  68. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  69. data: {
  70. pageNo: pageNo || 1,
  71. pageSize: this.state.pagination.pageSize,
  72. specially: 2, //审核列表
  73. name: this.state.customerName, //名称
  74. orderNo: this.state.orderNoSearch, //订单编号
  75. starTime: this.state.releaseDate[0], //开始时间
  76. endTime: this.state.releaseDate[1], //结束时间
  77. },
  78. success: function (data) {
  79. ShowModal(this);
  80. let theArr = [];
  81. if (data.error.length || data.data.list == "") {
  82. if (data.error && data.error.length) {
  83. message.warning(data.error[0].message);
  84. }
  85. } else {
  86. for (let i = 0; i < data.data.list.length; i++) {
  87. let thisdata = data.data.list[i];
  88. thisdata.key = i;
  89. thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额
  90. theArr.push(thisdata);
  91. }
  92. this.state.pagination.total = data.data.totalCount;
  93. this.state.pagination.current = data.data.pageNo;
  94. }
  95. if (data.data && data.data.list && !data.data.list.length) {
  96. this.state.pagination.total = 0;
  97. }
  98. this.setState({
  99. dataSource: theArr,
  100. pageNo: pageNo,
  101. pagination: this.state.pagination,
  102. selectedRowKeys: [],
  103. });
  104. }.bind(this),
  105. }).always(
  106. function () {
  107. this.setState({
  108. loading: false,
  109. });
  110. }.bind(this)
  111. );
  112. },
  113. getInitialState() {
  114. return {
  115. approvaType: [],
  116. isShow: true, // 高新纯咨询合同默认填写
  117. page: 1,
  118. orderNos: '',
  119. patentTypeList: [],
  120. releaseDate: [],
  121. orderStatus: 0,
  122. processStatus: 0,
  123. selectedRowKeys: [],
  124. orgCodeUrl: [],
  125. replenishUrl: [],
  126. contentUrl: [],
  127. customerArr: [],
  128. resVisible: false,
  129. pagination: {
  130. defaultCurrent: 1,
  131. defaultPageSize: 10,
  132. showQuickJumper: true,
  133. pageSize: 10,
  134. onChange: function (page) {
  135. this.loadData(page);
  136. }.bind(this),
  137. showTotal: function (total) {
  138. return "共" + total + "条数据";
  139. },
  140. },
  141. columns: [
  142. {
  143. title: "驳回编号",
  144. dataIndex: "backId",
  145. key: "backId",
  146. },
  147. {
  148. title: "驳回日期",
  149. dataIndex: "backDate",
  150. key: "backDate",
  151. },
  152. {
  153. title: "下单时间",
  154. dataIndex: "createDate",
  155. key: "createDate",
  156. },
  157. {
  158. title: "订单编号",
  159. dataIndex: "orderNo",
  160. key: "orderNo",
  161. },
  162. {
  163. title: "客户名称",
  164. dataIndex: "userName",
  165. key: "userName",
  166. render: (text) => {
  167. return (
  168. <Tooltip title={text}>
  169. <div
  170. // style={{
  171. // maxWidth: '150px',
  172. // overflow: 'hidden',
  173. // textOverflow: "ellipsis",
  174. // whiteSpace: 'nowrap',
  175. // }}
  176. >{text}</div>
  177. </Tooltip>
  178. )
  179. },
  180. },
  181. {
  182. title: "驳回人",
  183. dataIndex: "initiateName",
  184. key: "initiateName",
  185. },
  186. {
  187. title: "驳回原因",
  188. dataIndex: "reason",
  189. key: "reason",
  190. render: (text) => {
  191. return text && text.length > 24
  192. ? text.substr(0, 24) + "..."
  193. : text;
  194. },
  195. },
  196. ],
  197. columnsrizhi: [
  198. {
  199. title: "流程",
  200. dataIndex: "processName",
  201. key: "processName",
  202. },
  203. {
  204. title: "操作人",
  205. dataIndex: "adminName",
  206. key: "adminName",
  207. },
  208. {
  209. title: "时间",
  210. dataIndex: "createDate",
  211. key: "createDate",
  212. },
  213. ],
  214. data: [],
  215. dataSource: [],
  216. columnsX: [
  217. {
  218. title: "业务项目名称",
  219. dataIndex: "commodityName",
  220. key: "commodityName",
  221. render: (text, record) => {
  222. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  223. }
  224. },
  225. {
  226. title: "项目类别",
  227. dataIndex: "cname",
  228. key: "cname",
  229. },
  230. {
  231. title: "项目数量",
  232. dataIndex: "commodityQuantity",
  233. key: "commodityQuantity",
  234. render: (text, record) => {
  235. if (record.splitStatus == 1) {
  236. return (
  237. <span>
  238. {text}{" "}
  239. {/* <Tag
  240. color="#108ee9"
  241. onClick={(e) => {
  242. e.stopPropagation();
  243. this.showRes(record);
  244. }}
  245. >
  246. 已拆
  247. </Tag> */}
  248. </span>
  249. );
  250. } else {
  251. return text;
  252. }
  253. },
  254. },
  255. {
  256. title: "金额(万元)",
  257. dataIndex: "commodityPrice",
  258. key: "commodityPrice",
  259. },
  260. {
  261. title: "负责人",
  262. dataIndex: "contacts",
  263. key: "contacts",
  264. },
  265. {
  266. title: "负责人电话",
  267. dataIndex: "contactsMobile",
  268. key: "contactsMobile",
  269. },
  270. {
  271. title: "主要项目",
  272. dataIndex: "main",
  273. key: "main",
  274. render: (text) => {
  275. return text ? "是" : "否";
  276. },
  277. },
  278. {
  279. title: "总年限",
  280. dataIndex: "yearSum",
  281. key: "yearSum",
  282. render: (text, record) => {
  283. return (
  284. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  285. );
  286. }
  287. },
  288. {
  289. title: "年限",
  290. dataIndex: "serviceLife",
  291. key: "serviceLife",
  292. render: (text, record) => {
  293. return (
  294. <div>{!!text && JSON.parse(text).toString()}</div>
  295. );
  296. }
  297. },
  298. {
  299. title: "本次派单",
  300. dataIndex: "serviceYear",
  301. key: "serviceYear",
  302. render: (text, record) => {
  303. return (
  304. <div>{!text ? "" : text}</div>
  305. );
  306. }
  307. },
  308. {
  309. title: "项目说明",
  310. dataIndex: "taskComment",
  311. key: "taskComment",
  312. render: (text) => {
  313. return (
  314. <Tooltip title={text}>
  315. <div
  316. style={{
  317. width: 100,
  318. overflow: "hidden",
  319. whiteSpace: "nowrap",
  320. textOverflow: "ellipsis",
  321. }}
  322. >{text}</div>
  323. </Tooltip>
  324. )
  325. },
  326. },
  327. {
  328. title: "操作",
  329. dataIndex: "ABC",
  330. key: "ABC",
  331. width: 80,
  332. render: (text, record) => {
  333. return (
  334. this.state.processStatus == 0 &&
  335. <div>
  336. <div>
  337. <Popconfirm
  338. title="是否要删除?如果删除此项目业务,对应的催款节点也会删除!"
  339. onConfirm={() => {
  340. this.delectRow(record);
  341. }}
  342. okText="是"
  343. cancelText="否"
  344. >
  345. <Button
  346. onClick={(e) => {
  347. e.stopPropagation();
  348. }}
  349. type="danger"
  350. >
  351. 删除
  352. </Button>
  353. </Popconfirm>
  354. </div>
  355. <div>
  356. <Button
  357. onClick={(e) => {
  358. e.stopPropagation();
  359. this.setState({
  360. editProjectOperationVisible: true,
  361. dataInfor: record,
  362. })
  363. }}
  364. >
  365. 编辑
  366. </Button>
  367. </div>
  368. </div>
  369. );
  370. },
  371. },
  372. ],
  373. dataSourceX: [],
  374. ContactsListsNew: [
  375. {
  376. title: "项目名称",
  377. dataIndex: "commodityName",
  378. key: "commodityName",
  379. render: (text, record, index) => {
  380. let dataArr = this.state.dataSourceX || [];
  381. if (text) {
  382. return <span>{text + "-" + record.tid}</span>;
  383. }
  384. return (
  385. <Select
  386. placeholder="请选择名称"
  387. style={{ width: "150px" }}
  388. disabled={
  389. this.state.getLoad && record.sortName ? true : false
  390. }
  391. onChange={(e) => {
  392. // record.sortName = e;
  393. // dataArr.forEach((item) => {
  394. // if (item.commodityName == record.sortName) {
  395. // record.cname = item.cname;
  396. // record.tid = item.id;
  397. // record.isSave = true;
  398. // record.sort = item.sort;
  399. // console.log(record);
  400. // cuiJieDian.forEach((item) => {
  401. // if (item.value == record.sort) {
  402. // record.arr = item.children;
  403. // let yearFlag = true;
  404. // if (record.sort == 6) {
  405. // yearFlag = false;
  406. // }
  407. // this.setState({
  408. // getLoad: true,
  409. // yearFlag,
  410. // });
  411. // }
  412. // });
  413. // }
  414. // });
  415. // console.log(e);
  416. let proData = dataArr[e];
  417. record.cname = proData.cname;
  418. record.tid = proData.id;
  419. record.isSave = true;
  420. record.sort = proData.sort;
  421. cuiJieDian.forEach((item) => {
  422. if (item.value == record.sort) {
  423. record.arr = item.children;
  424. let yearFlag = true;
  425. if (record.sort == 6) {
  426. yearFlag = false;
  427. }
  428. this.setState({
  429. getLoad: true,
  430. yearFlag,
  431. });
  432. }
  433. });
  434. }}
  435. >
  436. {dataArr.map((item) => {
  437. return (
  438. <Select.Option key={item.id} value={item.key}>
  439. {item.commodityName + "-" + item.id}
  440. </Select.Option>
  441. );
  442. })}
  443. </Select>
  444. );
  445. },
  446. },
  447. {
  448. title: "项目分类",
  449. dataIndex: "projectType",
  450. key: "projectType",
  451. render: (text, record) => {
  452. if (text) {
  453. let arr = this.state.dataSourceX || [];
  454. let str = "";
  455. for (let i = 0; i < arr.length; i++) {
  456. if (this.state.dataSourceX[i].sort == text) {
  457. str = this.state.dataSourceX[i].cname;
  458. return <span>{str}</span>;
  459. }
  460. }
  461. }
  462. if (this.state.getLoad) {
  463. return (
  464. <Select
  465. style={{ width: "150px" }}
  466. placeholder="请选择分类"
  467. value={record.cname}
  468. >
  469. <Select.Option key={record.sort} value={record.cname}>
  470. {record.cname}
  471. </Select.Option>
  472. </Select>
  473. );
  474. } else {
  475. return (
  476. <Select style={{ width: "150px" }} placeholder="请选择分类">
  477. <Select.Option key={record.sort} value={record.cname}>
  478. {record.cname}
  479. </Select.Option>
  480. </Select>
  481. );
  482. }
  483. },
  484. },
  485. {
  486. title: "催款科目",
  487. dataIndex: "dunTypeName",
  488. key: "dunTypeName",
  489. render: (text, record) => {
  490. if (text) {
  491. if (record.customizeName) {
  492. return record.customizeName;
  493. }
  494. return <span>{text}</span>;
  495. }
  496. if (this.state.getLoad) {
  497. let arr = record.arr || [];
  498. return (
  499. <div>
  500. <Select
  501. style={{ width: "150px" }}
  502. placeholder="请选择分类"
  503. onChange={(e) => {
  504. record.dunType = e;
  505. if (record.dunType == 0) {
  506. record.customizeTimes = "";
  507. record.customizeName = "";
  508. }
  509. if (e == 0) {
  510. record.dunTypeCustom = true;
  511. } else {
  512. record.dunTypeCustom = false;
  513. }
  514. if (e != 1) {
  515. this.setState({
  516. timeFlag: true,
  517. });
  518. } else {
  519. this.setState({
  520. timeFlag: false,
  521. });
  522. }
  523. if (e == 1 && record.sort == 6) {
  524. this.setState({
  525. yearFlag: true,
  526. });
  527. } else if (e != 1 && record.sort == 6) {
  528. this.setState({
  529. yearFlag: false,
  530. });
  531. }
  532. if (record.sort == 3 && e == 3) {
  533. this.setState({
  534. boFlag: true,
  535. });
  536. } else {
  537. this.setState({
  538. boFlag: false,
  539. });
  540. }
  541. }}
  542. >
  543. {arr.map((item) => {
  544. record;
  545. return (
  546. <Select.Option key={item.value} value={item.value}>
  547. {item.key}
  548. </Select.Option>
  549. );
  550. })}
  551. <Select.Option key={0} value={0}>
  552. 自定义
  553. </Select.Option>
  554. </Select>
  555. {record.dunType == 0 ? (
  556. <Input
  557. value={record.customizeName}
  558. placeholder="请输入自定义名称"
  559. required="required"
  560. onChange={(e) => {
  561. record.customizeName = e.target.value;
  562. this.setState({
  563. contactList: this.state.contactList,
  564. });
  565. }}
  566. style={{ width: "120px" }}
  567. />
  568. ) : (
  569. ""
  570. )}
  571. </div>
  572. );
  573. } else {
  574. return (
  575. <Select style={{ width: "150px" }} placeholder="请选择分类">
  576. <Select.Option
  577. key={0}
  578. value={"请选择上一项"}
  579. ></Select.Option>
  580. </Select>
  581. );
  582. }
  583. },
  584. },
  585. {
  586. title: "收款时间(特批需选择时间)",
  587. dataIndex: "waitDay",
  588. key: "waitDay",
  589. render: (text, record) => {
  590. if (record.dunTypeName) {
  591. if (record.customizeTimes) {
  592. return record.customizeTimes;
  593. }
  594. if (text == 0) {
  595. var str = "当天";
  596. } else if (!text) {
  597. var str = "";
  598. } else {
  599. var str = text + "天";
  600. }
  601. return <span>{str}</span>;
  602. }
  603. return (
  604. <div>
  605. {record.dunType == 0 ? (
  606. <DatePicker
  607. style={{ width: 150 }}
  608. onChange={(e, t) => {
  609. record.customizeTimes = t;
  610. }}
  611. />
  612. ) : (
  613. <Select
  614. placeholder="请选择时间"
  615. style={{ width: "160px" }}
  616. disabled={
  617. this.state.approval != 0 && !this.state.timeFlag
  618. ? false
  619. : true
  620. }
  621. onChange={(e) => {
  622. record.waitDay = e;
  623. }}
  624. >
  625. <Select.Option key={0}>当天</Select.Option>
  626. <Select.Option key={3}>3天</Select.Option>
  627. <Select.Option key={5}>5天</Select.Option>
  628. <Select.Option key={7}>7天</Select.Option>
  629. <Select.Option key={15}>15天</Select.Option>
  630. </Select>
  631. )}
  632. </div>
  633. );
  634. },
  635. },
  636. {
  637. title: "金额(万元)",
  638. dataIndex: "money",
  639. key: "money",
  640. render: (text, record) => {
  641. if (record.dunTypeName) {
  642. if (record.appropriationRatio) {
  643. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  644. percent += "%";
  645. return <span>{percent}(拨款比例)</span>;
  646. } else {
  647. return <span>{text}</span>;
  648. }
  649. }
  650. return (
  651. <div>
  652. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  653. <Select
  654. placeholder="选择"
  655. defaultValue={"金额"}
  656. onChange={(e) => {
  657. record.boStatus = e;
  658. }}
  659. >
  660. <Select.Option key={true}>比例</Select.Option>
  661. <Select.Option key={false}>金额</Select.Option>
  662. </Select>
  663. </div>
  664. <div style={{ float: "right" }}>
  665. <Input
  666. value={record.money}
  667. key={record.id}
  668. required="required"
  669. onChange={(e) => {
  670. record.money = e.target.value;
  671. this.setState({
  672. contactList: this.state.contactList,
  673. });
  674. }}
  675. style={{ width: "120px" }}
  676. />
  677. </div>
  678. </div>
  679. );
  680. // if (this.state.boFlag) {
  681. // return (
  682. // <div>
  683. // <div style={{ width: 70, float: "left", marginRight: 5 }}>
  684. // <Select
  685. // placeholder="选择"
  686. // defaultValue={"金额"}
  687. // onChange={(e) => {
  688. // record.boStatus = e;
  689. // }}
  690. // >
  691. // <Select.Option key={true}>比例</Select.Option>
  692. // <Select.Option key={false}>金额</Select.Option>
  693. // </Select>
  694. // </div>
  695. // <div style={{ float: "right" }}>
  696. // <Input
  697. // value={record.money}
  698. // key={record.id}
  699. // required="required"
  700. // onChange={(e) => {
  701. // record.money = e.target.value;
  702. // this.setState({
  703. // contactList: this.state.contactList,
  704. // });
  705. // }}
  706. // style={{ width: "120px" }}
  707. // />
  708. // </div>
  709. // </div>
  710. // );
  711. // } else {
  712. // return (
  713. // <div>
  714. // <Input
  715. // value={record.money}
  716. // placeholder="请输入金额(必填项)"
  717. // key={record.id}
  718. // required="required"
  719. // onChange={(e) => {
  720. // record.money = e.target.value;
  721. // this.setState({ contactList: this.state.contactList });
  722. // }}
  723. // style={{ width: "120px" }}
  724. // />
  725. // </div>
  726. // );
  727. // }
  728. },
  729. },
  730. {
  731. title: "服务年限",
  732. dataIndex: "startDate",
  733. key: "startDate",
  734. render: (text, record) => {
  735. if (record.dunTypeName) {
  736. return <span>{text}</span>;
  737. }
  738. return (
  739. <div>
  740. {
  741. record.dunType != 0 ?
  742. <Select
  743. placeholder="请选择年限"
  744. style={{ width: "150px" }}
  745. disabled={this.state.yearFlag ? true : false}
  746. onChange={(e) => {
  747. record.effectiveCount = e;
  748. }}
  749. >
  750. {/* <Select.Option key={null}>无</Select.Option> */}
  751. <Select.Option key={1}>一年</Select.Option>
  752. <Select.Option key={3}>两年</Select.Option>
  753. <Select.Option key={5}>三年</Select.Option>
  754. <Select.Option key={7}>四年</Select.Option>
  755. <Select.Option key={9}>五年</Select.Option>
  756. </Select> : <div />
  757. }
  758. </div>
  759. );
  760. },
  761. },
  762. {
  763. title: "催款状态",
  764. dataIndex: "status",
  765. key: "status",
  766. render: (text) => {
  767. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  768. },
  769. },
  770. {
  771. title: "操作",
  772. dataIndex: "dels",
  773. key: "dels",
  774. render: (text, record, index) => {
  775. return (
  776. <div>
  777. {this.state.processStatus == 0 ? (
  778. <Popconfirm
  779. title="是否删除?"
  780. onConfirm={() => {
  781. this.confirmDeletNew(record);
  782. }}
  783. okText="删除"
  784. cancelText="不删除"
  785. >
  786. <Button
  787. style={{
  788. marginRight: "10px",
  789. color: "#ffffff",
  790. background: "#f00",
  791. border: "none",
  792. }}
  793. >
  794. 删除
  795. </Button>
  796. </Popconfirm>
  797. ) : (
  798. ""
  799. )}
  800. {record.isSave ? (
  801. <Button
  802. type="primary"
  803. onClick={(e) => {
  804. this.contactSaveNew(record);
  805. this.setState({
  806. addFlag: false,
  807. });
  808. }}
  809. >
  810. 保存
  811. </Button>
  812. ) : (
  813. ""
  814. )}
  815. </div>
  816. );
  817. },
  818. },
  819. ],
  820. ContactsLists: [
  821. {
  822. title: "催款科目",
  823. dataIndex: "dunSubject",
  824. key: "dunSubject",
  825. render: (text, record) => {
  826. return (
  827. <Select
  828. placeholder="请选择催款科目"
  829. value={record.dunSubject}
  830. disabled
  831. style={{ width: "150px" }}
  832. onChange={(e) => {
  833. record.dunSubject = e;
  834. this.setState({ contactList: this.state.contactList });
  835. }}
  836. >
  837. {jiedian.map(function (item) {
  838. return (
  839. <Select.Option key={item.value}>{item.key}</Select.Option>
  840. );
  841. })}
  842. </Select>
  843. );
  844. },
  845. },
  846. {
  847. title: "金额(万元)",
  848. dataIndex: "money",
  849. key: "money",
  850. render: (text, record) => {
  851. return (
  852. <Input
  853. value={record.money}
  854. disabled
  855. placeholder="请输入金额(必填项)"
  856. key={record.id}
  857. required="required"
  858. onChange={(e) => {
  859. record.money = e.target.value;
  860. this.setState({ contactList: this.state.contactList });
  861. }}
  862. style={{ width: "120px" }}
  863. />
  864. );
  865. },
  866. },
  867. {
  868. title: "催款状态",
  869. dataIndex: "dunStatus",
  870. key: "dunStatus",
  871. render: (text) => {
  872. return getCuikuan(text);
  873. },
  874. },
  875. {
  876. title: "操作",
  877. dataIndex: "dels",
  878. key: "dels",
  879. render: (text, record) => {
  880. return (
  881. <div>
  882. {
  883. <Popconfirm
  884. title="是否删除?"
  885. onConfirm={() => {
  886. this.confirmDelet(record.key);
  887. }}
  888. okText="删除"
  889. cancelText="不删除"
  890. >
  891. <Button
  892. style={{
  893. marginRight: "10px",
  894. color: "#ffffff",
  895. background: "#f00",
  896. border: "none",
  897. }}
  898. >
  899. 删除
  900. </Button>
  901. </Popconfirm>
  902. }
  903. {record.id ? (
  904. ""
  905. ) : (
  906. <Button type="primary" onClick={this.contactSave} disabled>
  907. 保存
  908. </Button>
  909. )}
  910. </div>
  911. );
  912. },
  913. },
  914. ],
  915. updatas: {},
  916. };
  917. },
  918. //删除
  919. delectRow(record) {
  920. this.setState({
  921. loading: true,
  922. });
  923. $.ajax({
  924. method: "post",
  925. dataType: "json",
  926. crossDomain: false,
  927. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  928. data: {
  929. id: record.id,
  930. },
  931. }).done(
  932. function (data) {
  933. if (!data.error.length) {
  934. message.success("删除成功!");
  935. this.setState({
  936. loading: false,
  937. });
  938. this.xiangmu(this.state.orderNo);
  939. this.jiedianNew(this.state.orderNo);
  940. this.jiedian(this.state.orderNo);
  941. this.loadData(this.state.pageNo);
  942. } else {
  943. message.warning(data.error[0].message);
  944. }
  945. }.bind(this)
  946. );
  947. },
  948. //页面加载函数
  949. componentWillMount() {
  950. this.loadData();
  951. },
  952. //整行点击
  953. tableRowClick(record) {
  954. this.setState({
  955. visible: true,
  956. orderNos: record.orderNo,
  957. orderStatus: record.orderStatus,
  958. processStatus: record.orderStatus
  959. });
  960. this.xiangqing(record.orderNo);
  961. this.xiangmu(record.orderNo);
  962. this.jiedian(record.orderNo);
  963. this.jiedianNew(record.orderNo);
  964. this.departmentList();
  965. this.getpatentTypeList();
  966. },
  967. //点击打卡项目详情
  968. tableRowClickX(record) {
  969. this.setState({
  970. projectOperationVisible: true,
  971. dataInfor: record,
  972. })
  973. },
  974. //项目详情关闭
  975. nextCancel() {
  976. this.setState({
  977. projectOperationVisible: false,
  978. editProjectOperationVisible: false,
  979. gid: "",
  980. dataInfor: {},
  981. }, () => {
  982. this.xiangmu(this.state.orderNo);
  983. });
  984. },
  985. //订单详情
  986. xiangqing(orderNos) {
  987. $.ajax({
  988. method: "get",
  989. dataType: "json",
  990. crossDomain: false,
  991. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  992. data: {
  993. orderNo: orderNos,
  994. },
  995. success: function (data) {
  996. if (data.error.length || data.data.list == "") {
  997. if (data.error && data.error.length) {
  998. message.warning(data.error[0].message);
  999. }
  1000. } else {
  1001. let thisdata = data.data;
  1002. if (thisdata.approval == 0) {
  1003. thisdata.approval = 0;
  1004. } else {
  1005. thisdata.approval = 1;
  1006. }
  1007. // if (thisdata.approval == 2) {
  1008. // thisdata.approval = "特批通过";
  1009. // } else if (thisdata.approval == 3) {
  1010. // thisdata.approval = "特批驳回";
  1011. // }
  1012. this.setState({
  1013. id: thisdata.id,
  1014. orderUid: thisdata.uid,
  1015. kehuId: thisdata.buyerId,
  1016. orderNo: thisdata.orderNo, //订单编号
  1017. contractNo: thisdata.contractNo, //合同编号
  1018. userName: thisdata.userName, //客户名称
  1019. signDate: thisdata.signDate, //签单时间
  1020. examineName: thisdata.examineName,
  1021. processStatus: thisdata.processStatus, //流程状态
  1022. liquidationStatus: thisdata.liquidationStatus, //结算状态
  1023. contacts: thisdata.contacts, //企业联系人
  1024. contactMobile: thisdata.contactMobile, //联系人电话
  1025. legalPerson: thisdata.legalPerson, //法人
  1026. legalPersonTel: thisdata.legalPersonTel, //法人电话
  1027. firstAmount: thisdata.firstAmount + "", //签单金额
  1028. totalAmount: thisdata.totalAmount + "", //首付金额
  1029. settlementAmount: thisdata.settlementAmount, //已收款项
  1030. orderRemarks: thisdata.orderRemarks, //订单留言
  1031. orgCodeUrl: thisdata.contractPictureUrl
  1032. ? splitUrl(
  1033. thisdata.contractPictureUrl,
  1034. ",",
  1035. globalConfig.avatarHost + "/upload"
  1036. )
  1037. : [], //图片地址
  1038. replenishUrl: thisdata.agreementUrl
  1039. ? splitUrl(
  1040. thisdata.agreementUrl,
  1041. ",",
  1042. globalConfig.avatarHost + "/upload"
  1043. )
  1044. : [], //图片地址
  1045. contentUrl: thisdata.serviceContent
  1046. ? splitUrl(
  1047. thisdata.serviceContent,
  1048. ",",
  1049. globalConfig.avatarHost + "/upload"
  1050. )
  1051. : [], //图片地址
  1052. salesmanName: thisdata.salesmanName, //营销员名称
  1053. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1054. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1055. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1056. financeName: thisdata.financeName, //财务名称
  1057. financeMobile: thisdata.financeMobile, //财务电话
  1058. nowFinance: thisdata.nowFinance, //财务名称
  1059. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1060. initiateName: thisdata.initiateName, //驳回人
  1061. backDate: thisdata.backDate, //驳回时间
  1062. reason: thisdata.reason, //驳回原因
  1063. approval: thisdata.approval, //特批状态
  1064. organizationSearch: thisdata.orderDep,
  1065. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  1066. outsource: thisdata.outsource == 0 ? "否" : "是",
  1067. deleteSign: thisdata.deleteSign,
  1068. updatas: {
  1069. salesType: thisdata.salesType,//销售类型
  1070. userType: thisdata.userType,//客户所属类型
  1071. other: thisdata.other,//3渠道名 4,5描述
  1072. },
  1073. channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  1074. knowledgeServices: thisdata.knowledgeServices, //知识产权服务
  1075. auditServices: thisdata.auditServices, //审计服务
  1076. addDeductionServices: thisdata.addDeductionServices, //加计扣除服务
  1077. knowledgeOther: thisdata.knowledgeOther, //知识产权服务其他描述
  1078. auditOther: thisdata.auditOther, //审计服务其他描述
  1079. addDeductionOther: thisdata.addDeductionOther, //加计扣除服务其他描述
  1080. isShow: thisdata.knowledgeServices ? true : false, //无数据默认隐藏
  1081. patentStatus: thisdata.patentStatus, // 知识产权情况
  1082. isProperty: thisdata.patentStatus == null ? null : thisdata.patentStatus == 0 ? 1 : 2,
  1083. approvaType: thisdata.type ? thisdata.type.split(",").map(Number) : [], // 特批类型
  1084. typeExplain: thisdata.typeExplain,
  1085. });
  1086. }
  1087. }.bind(this),
  1088. }).always(
  1089. function () {
  1090. this.setState({
  1091. loading: false,
  1092. });
  1093. }.bind(this)
  1094. );
  1095. },
  1096. // 拆分详细
  1097. showRes(record) {
  1098. this.setState({
  1099. resVisible: true,
  1100. resRecord: record,
  1101. });
  1102. },
  1103. resCancel() {
  1104. this.setState({
  1105. resVisible: false,
  1106. });
  1107. },
  1108. //项目列表
  1109. xiangmu(orderNos) {
  1110. $.ajax({
  1111. method: "get",
  1112. dataType: "json",
  1113. crossDomain: false,
  1114. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1115. data: {
  1116. orderNo: orderNos,
  1117. },
  1118. success: function (data) {
  1119. let theArr = [];
  1120. if (data.error.length || data.data.list == "") {
  1121. if (data.error && data.error.length) {
  1122. message.warning(data.error[0].message);
  1123. }
  1124. } else {
  1125. for (let i = 0; i < data.data.length; i++) {
  1126. let thisdata = data.data[i];
  1127. thisdata.key = i;
  1128. thisdata.sort = thisdata.cSort;
  1129. theArr.push(thisdata);
  1130. }
  1131. }
  1132. this.setState({
  1133. dataSourceX: theArr,
  1134. paginations: false,
  1135. });
  1136. }.bind(this),
  1137. }).always(
  1138. function () {
  1139. this.setState({
  1140. loading: false,
  1141. });
  1142. }.bind(this)
  1143. );
  1144. },
  1145. //节点列表
  1146. jiedian(orderNos) {
  1147. $.ajax({
  1148. method: "get",
  1149. dataType: "json",
  1150. crossDomain: false,
  1151. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1152. data: {
  1153. orderNo: orderNos,
  1154. },
  1155. success: function (data) {
  1156. let theArr = [];
  1157. let thisData = [];
  1158. if (data.error.length || data.data.list == "") {
  1159. if (data.error && data.error.length) {
  1160. message.warning(data.error[0].message);
  1161. }
  1162. } else {
  1163. for (let i = 0; i < data.data.length; i++) {
  1164. thisData = data.data[i];
  1165. theArr.push({
  1166. key: i,
  1167. dunSubject: thisData.dunSubject
  1168. ? thisData.dunSubject.toString()
  1169. : "", //催款科目
  1170. id: thisData.id, //节点Id
  1171. money: thisData.money, //催款金额
  1172. dunStatus: thisData.dunStatus, //催款状态
  1173. orderNo: thisData.orderNo,
  1174. });
  1175. }
  1176. this.setState({
  1177. contactList: theArr,
  1178. });
  1179. }
  1180. }.bind(this),
  1181. }).always(
  1182. function () {
  1183. this.setState({
  1184. loading: false,
  1185. });
  1186. }.bind(this)
  1187. );
  1188. },
  1189. //查看催款节点
  1190. jiedianNew(orderNos) {
  1191. $.ajax({
  1192. method: "get",
  1193. dataType: "json",
  1194. crossDomain: false,
  1195. url:
  1196. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1197. data: {
  1198. orderNo: orderNos,
  1199. },
  1200. success: function (data) {
  1201. if (data.error && data.error.length) {
  1202. message.warning(data.error[0].message);
  1203. } else {
  1204. let theArr = [];
  1205. let thisData = [];
  1206. let arr = data.data || [];
  1207. let totalCui = 0;
  1208. for (let i = 0; i < arr.length; i++) {
  1209. thisData = arr[i];
  1210. totalCui += +thisData.money;
  1211. theArr.push({
  1212. key: i,
  1213. dunSubject: thisData.dunSubject
  1214. ? thisData.dunSubject.toString()
  1215. : "", //催款科目
  1216. id: thisData.id, //节点Id
  1217. money: thisData.money, //催款金额
  1218. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1219. commodityName: thisData.commodityName,
  1220. projectType: thisData.projectType,
  1221. dunTypeName: thisData.dunTypeName,
  1222. status: thisData.status,
  1223. waitDay: thisData.waitDay,
  1224. effectiveCount: thisData.effectiveCount,
  1225. startDate: thisData.startDate,
  1226. dunType: thisData.dunType,
  1227. appropriationRatio: thisData.appropriationRatio,
  1228. customizeName: thisData.customizeName,
  1229. customizeTimes: thisData.customizeTimes,
  1230. tid: thisData.tid,
  1231. });
  1232. }
  1233. if (!totalCui) {
  1234. totalCui = 0;
  1235. }
  1236. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1237. this.setState({
  1238. contactListNew: theArr,
  1239. totalCui: parseFloat(totalCui),
  1240. });
  1241. }
  1242. }.bind(this),
  1243. }).always(
  1244. function () {
  1245. this.setState({
  1246. loading: false,
  1247. });
  1248. }.bind(this)
  1249. );
  1250. },
  1251. //催款节点保存
  1252. contactSave() {
  1253. for (let i = 0; i < this.state.contactList.length; i++) {
  1254. if (moneyVerify(this.state.contactList[i].money)) {
  1255. return;
  1256. }
  1257. }
  1258. this.setState({
  1259. loading: true,
  1260. });
  1261. $.ajax({
  1262. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1263. method: "post",
  1264. data: {
  1265. orderNo: this.state.orderNo,
  1266. orderDun: JSON.stringify(this.state.contactList),
  1267. },
  1268. }).done(
  1269. function (data) {
  1270. this.setState({
  1271. loading: false,
  1272. });
  1273. if (!data.error.length) {
  1274. message.success("保存成功!");
  1275. this.jiedian(this.state.orderNo);
  1276. } else {
  1277. message.warning(data.error[0].message);
  1278. }
  1279. }.bind(this)
  1280. );
  1281. },
  1282. //催款节点保存
  1283. contactSaveNew(record) {
  1284. if (record.dunType == 0) {
  1285. if (!record.customizeTimes) {
  1286. message.warning("请输入自定义时间");
  1287. return;
  1288. } else if (!record.customizeName) {
  1289. message.warning("请输入自定义科目");
  1290. return;
  1291. }
  1292. }
  1293. if (
  1294. this.state.approval == 1 &&
  1295. record.dunType == 1 &&
  1296. !record.waitDay
  1297. ) {
  1298. message.warning("请填写收款时间");
  1299. return
  1300. }
  1301. if (record.boStatus == "false") {
  1302. record.boStatus = false;
  1303. } else if (record.boStatus == "true") {
  1304. record.boStatus = true;
  1305. }
  1306. if (!this.state.yearFlag) {
  1307. if (!record.effectiveCount && !record.dunTypeCustom) {
  1308. message.warning("请选择服务年限");
  1309. return;
  1310. }
  1311. } else {
  1312. record.effectiveCount = "";
  1313. }
  1314. if (record.money == "") {
  1315. message.warning("请填写金额");
  1316. return;
  1317. }
  1318. if (record.boStatus) {
  1319. if (
  1320. typeof +record.money == "number" &&
  1321. +record.money >= 0 &&
  1322. +record.money <= 1
  1323. ) {
  1324. record.appropriationRatio = record.money;
  1325. } else {
  1326. message.warning("金额比例填写错误,比例范围0~1");
  1327. return;
  1328. }
  1329. }
  1330. if (!record.dunType && record.dunType != 0) {
  1331. message.warning("请选择对应科目");
  1332. return;
  1333. }
  1334. if (record.dunType != 1) {
  1335. record.waitDay = "";
  1336. }
  1337. this.setState({
  1338. loading: true,
  1339. });
  1340. if (record.boStatus) {
  1341. $.ajax({
  1342. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1343. method: "post",
  1344. data: {
  1345. orderNo: record.orderNo,
  1346. tid: record.tid,
  1347. projectType: record.sort,
  1348. dunType: record.dunType,
  1349. appropriationRatio: record.appropriationRatio,
  1350. waitDay: record.waitDay,
  1351. effectiveCount: record.effectiveCount,
  1352. customizeTimes:
  1353. record.dunType == 0 ? record.customizeTimes : undefined,
  1354. customizeName:
  1355. record.dunType == 0 ? record.customizeName : undefined,
  1356. },
  1357. }).done(
  1358. function (data) {
  1359. this.setState({
  1360. loading: false,
  1361. });
  1362. if (!data.error.length) {
  1363. message.success("保存成功!");
  1364. this.setState({
  1365. cuiFlag: false,
  1366. boFlag: false,
  1367. });
  1368. this.jiedianNew(record.orderNo);
  1369. } else {
  1370. message.warning(data.error[0].message);
  1371. }
  1372. }.bind(this)
  1373. );
  1374. } else {
  1375. $.ajax({
  1376. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1377. method: "post",
  1378. data: {
  1379. orderNo: record.orderNo,
  1380. tid: record.tid,
  1381. projectType: record.sort,
  1382. dunType: record.dunType,
  1383. money: record.money,
  1384. waitDay: record.waitDay,
  1385. effectiveCount: record.effectiveCount,
  1386. customizeTimes:
  1387. record.dunType == 0 ? record.customizeTimes : undefined,
  1388. customizeName:
  1389. record.dunType == 0 ? record.customizeName : undefined,
  1390. },
  1391. }).done(
  1392. function (data) {
  1393. this.setState({
  1394. loading: false,
  1395. });
  1396. if (!data.error.length) {
  1397. message.success("保存成功!");
  1398. this.setState({
  1399. cuiFlag: false,
  1400. boFlag: false,
  1401. });
  1402. this.jiedianNew(record.orderNo);
  1403. } else {
  1404. message.warning(data.error[0].message);
  1405. }
  1406. }.bind(this)
  1407. );
  1408. }
  1409. },
  1410. //点击新增催款节点
  1411. addcontact() {
  1412. this.state.contactList.push({
  1413. key: this.state.contactList.length,
  1414. money: "",
  1415. dunSubject: undefined,
  1416. orderNo: this.state.orderNo,
  1417. dunTarget: this.state.kehuId,
  1418. });
  1419. this.setState({
  1420. contactList: this.state.contactList,
  1421. });
  1422. },
  1423. //点击新增催款节点
  1424. addcontactNew() {
  1425. this.state.contactListNew.push({
  1426. key: this.state.contactListNew.length,
  1427. money: "",
  1428. dunSubject: undefined,
  1429. orderNo: this.state.orderNo,
  1430. dunTarget: this.state.kehuId,
  1431. });
  1432. this.setState({
  1433. contactListNew: this.state.contactListNew,
  1434. cuiFlag: true,
  1435. });
  1436. },
  1437. //删除收款节点
  1438. confirmDelet(index) {
  1439. this.state.contactList.splice(index, 1);
  1440. this.setState({
  1441. contactList: this.state.contactList,
  1442. });
  1443. this.contactSave();
  1444. },
  1445. //删除收款节点
  1446. confirmDeletNew(index) {
  1447. if (index.id) {
  1448. this.state.contactListNew.splice(index.key, 1);
  1449. this.setState({
  1450. contactListNew: this.state.contactListNew,
  1451. cuiFlag: false,
  1452. addFlag: false,
  1453. boFlag: false,
  1454. });
  1455. $.ajax({
  1456. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1457. method: "post",
  1458. data: {
  1459. id: index.id,
  1460. },
  1461. }).done(
  1462. function (data) {
  1463. this.setState({
  1464. loading: false,
  1465. });
  1466. if (!data.error.length) {
  1467. message.success("删除成功!");
  1468. this.setState({
  1469. cuiFlag: false,
  1470. });
  1471. this.jiedianNew(this.state.orderNo);
  1472. } else {
  1473. message.warning(data.error[0].message);
  1474. }
  1475. }.bind(this)
  1476. );
  1477. } else {
  1478. this.state.contactListNew.splice(index.key, 1);
  1479. this.setState({
  1480. contactListNew: this.state.contactListNew,
  1481. cuiFlag: false,
  1482. addFlag: false,
  1483. boFlag: false,
  1484. });
  1485. }
  1486. },
  1487. //重新提交
  1488. examOk() {
  1489. let theorgCodeUrl = [];
  1490. if (this.state.orgCodeUrl.length) {
  1491. let picArr = [];
  1492. this.state.orgCodeUrl.map(function (item) {
  1493. if (
  1494. item.response &&
  1495. item.response.data &&
  1496. item.response.data.length
  1497. ) {
  1498. picArr.push(item.response.data);
  1499. }
  1500. });
  1501. theorgCodeUrl = picArr.join(",");
  1502. }
  1503. let theReplenishUrl = [];
  1504. if (this.state.replenishUrl.length) {
  1505. let picArr = [];
  1506. this.state.replenishUrl.map(function (item) {
  1507. if (
  1508. item.response &&
  1509. item.response.data &&
  1510. item.response.data.length
  1511. ) {
  1512. picArr.push(item.response.data);
  1513. }
  1514. });
  1515. theReplenishUrl = picArr.join(",");
  1516. }
  1517. // 服务内容上传图片
  1518. let contentUrl = [];
  1519. if (this.state.contentUrl.length) {
  1520. let picArr = [];
  1521. this.state.contentUrl.map(function (item) {
  1522. if (
  1523. item.response &&
  1524. item.response.data &&
  1525. item.response.data.length
  1526. ) {
  1527. picArr.push(item.response.data);
  1528. }
  1529. });
  1530. contentUrl = picArr.join(",");
  1531. } else {
  1532. message.warning("请上传服务内容图片")
  1533. return
  1534. }
  1535. if (moneyVerify(this.state.totalAmount)) {
  1536. return;
  1537. }
  1538. if (moneyVerify(this.state.firstAmount)) {
  1539. return;
  1540. }
  1541. if (!this.state.totalAmount) {
  1542. message.warning("签单金额不能为空");
  1543. this.refs.signFirstPayment.focus();
  1544. return false;
  1545. }
  1546. if (!this.state.firstAmount) {
  1547. message.warning("首付金额不能为空");
  1548. this.refs.signFirstPayment.focus();
  1549. return false;
  1550. }
  1551. if (!this.state.contacts) {
  1552. message.warning("企业联系人不能为空");
  1553. return
  1554. }
  1555. if (!this.state.contactMobile) {
  1556. message.warning("企业联系人电话不能为空");
  1557. return
  1558. }
  1559. var regeX1 = /^1[3456789]\d{9}$/;
  1560. var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
  1561. if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) {
  1562. message.warning("请输入正确的企业联系人电话");
  1563. return false;
  1564. }
  1565. if (this.state.isShow) {
  1566. if (this.state.knowledgeServices == null ||
  1567. this.state.auditServices == null ||
  1568. this.state.addDeductionServices == null) {
  1569. message.warn("请完善高新纯咨询合同说明!")
  1570. return
  1571. }
  1572. }
  1573. if (!this.state.isProperty) {
  1574. message.warn("请完善知识产权情况!")
  1575. return
  1576. }
  1577. if (this.state.isProperty == 2 && !this.state.patentStatus) {
  1578. message.warn("请完善知识产权情况!")
  1579. return
  1580. }
  1581. if (!this.state.orderRemarks) {
  1582. message.warning("订单留言不能为空");
  1583. return false;
  1584. }
  1585. if (this.state.approval == 1) {
  1586. if (this.state.approvaType && this.state.approvaType.length == 0) {
  1587. message.warning("请勾选特批状态!");
  1588. return false;
  1589. }
  1590. if (this.state.approvaType.indexOf(0) !== -1 && !this.state.typeExplain) {
  1591. message.warning("请填写特批其他说明!");
  1592. return false;
  1593. }
  1594. }
  1595. // if (!theorgCodeUrl) {
  1596. // message.warning("图片过大,上传失败");
  1597. // this.refs.signFirstPayment.focus();
  1598. // return false;
  1599. // }
  1600. // if (
  1601. // this.state.approval == "特批通过" ||
  1602. // this.state.approval == "特批驳回"
  1603. // ) {
  1604. // message.warning("特批状态不正确,请重新填写");
  1605. // return false;
  1606. // }
  1607. const arr = this.state.contactListNew || [];
  1608. for (let i = 0; i < arr.length; i++) {
  1609. if (
  1610. arr[i].dunType == 1 &&
  1611. arr[i].waitDay != null &&
  1612. this.state.approval == 0
  1613. ) {
  1614. message.warning(
  1615. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1616. );
  1617. return false;
  1618. } else if (
  1619. arr[i].dunType == 1 &&
  1620. arr[i].waitDay == null &&
  1621. this.state.approval == 1
  1622. ) {
  1623. message.warning(
  1624. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1625. );
  1626. return false;
  1627. }
  1628. if (!this.state.contactListNew[i].id) {
  1629. message.warning("请保存催款节点");
  1630. return false;
  1631. }
  1632. }
  1633. if (this.state.updatas.salesType == null) {
  1634. message.warning("请选择销售类型!");
  1635. return
  1636. }
  1637. this.setState({
  1638. flag: true,
  1639. });
  1640. $.ajax({
  1641. method: "post",
  1642. dataType: "json",
  1643. crossDomain: false,
  1644. // url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1645. url: globalConfig.context + "/api/admin/newOrder/submitOrder",
  1646. data: {
  1647. orderNo: this.state.orderNo, //订单编号
  1648. totalAmount: this.state.totalAmount, //总金额
  1649. firstAmount: this.state.firstAmount, //首付
  1650. isSubmit: 1, //保存草稿还是提交
  1651. signDate: this.state.signDate, //签单日期
  1652. contacts: this.state.contacts, //企业负责人
  1653. contactMobile: this.state.contactMobile, //负责人联系方式
  1654. legalPerson: this.state.legalPerson, //企业法人
  1655. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1656. approval: this.state.approval, //特批状态
  1657. contractNo: this.state.contractNo, //合同编号
  1658. orderRemarks: this.state.orderRemarks, //订单备注
  1659. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1660. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1661. serviceContent: contentUrl.length ? contentUrl : "",
  1662. orderDep: this.state.organizationSearch,
  1663. knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务
  1664. auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务
  1665. addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务
  1666. knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述
  1667. auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述
  1668. addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述
  1669. patentStatus: this.state.patentStatus, //知识产权情况
  1670. type: this.state.approvaType.sort(compare).toString(), // 特批类型
  1671. typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注
  1672. },
  1673. success: function (data) {
  1674. if (data.error.length || data.data.list == "") {
  1675. if (data.error && data.error.length) {
  1676. message.warning(data.error[0].message);
  1677. this.setState({
  1678. flag: false,
  1679. });
  1680. }
  1681. } else {
  1682. message.success("该订单已重新提交~");
  1683. this.setState({
  1684. visible: false,
  1685. flag: false,
  1686. });
  1687. this.loadData(this.state.pageNo);
  1688. }
  1689. }.bind(this),
  1690. }).always(
  1691. function () {
  1692. this.setState({
  1693. loading: false,
  1694. });
  1695. }.bind(this)
  1696. );
  1697. },
  1698. //订单作废
  1699. examOks() {
  1700. this.setState({
  1701. flag: true,
  1702. });
  1703. $.ajax({
  1704. method: "post",
  1705. dataType: "json",
  1706. crossDomain: false,
  1707. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1708. data: {
  1709. orderNo: this.state.orderNo, //订单编号
  1710. },
  1711. success: function (data) {
  1712. if (data.error.length || data.data.list == "") {
  1713. if (data.error && data.error.length) {
  1714. message.warning(data.error[0].message);
  1715. }
  1716. } else {
  1717. message.success("该订单已作废~");
  1718. this.setState({
  1719. visible: false,
  1720. flag: false,
  1721. });
  1722. this.loadData(this.state.pageNo);
  1723. }
  1724. }.bind(this),
  1725. }).always(
  1726. function () {
  1727. this.setState({
  1728. loading: false,
  1729. flag: false,
  1730. });
  1731. }.bind(this)
  1732. );
  1733. },
  1734. departmentList() {
  1735. this.setState({
  1736. loading: true,
  1737. });
  1738. $.ajax({
  1739. method: "get",
  1740. dataType: "json",
  1741. crossDomain: false,
  1742. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1743. data: {},
  1744. success: function (data) {
  1745. let thedata = data.data;
  1746. let theArr = [];
  1747. if (!thedata) {
  1748. if (data.error && data.error.length) {
  1749. message.warning(data.error[0].message);
  1750. }
  1751. thedata = {};
  1752. } else {
  1753. thedata.map(function (item, index) {
  1754. theArr.push({
  1755. key: index,
  1756. name: item.name,
  1757. id: item.id,
  1758. depNo: item.depNo,
  1759. });
  1760. });
  1761. }
  1762. this.setState({
  1763. departmentArr: theArr,
  1764. });
  1765. }.bind(this),
  1766. }).always(
  1767. function () {
  1768. this.setState({
  1769. loading: false,
  1770. });
  1771. }.bind(this)
  1772. );
  1773. },
  1774. rizhi() {
  1775. this.setState({
  1776. loading: true,
  1777. });
  1778. $.ajax({
  1779. method: "get",
  1780. dataType: "json",
  1781. crossDomain: false,
  1782. url: "/api/admin/newOrder/selectOrderLog",
  1783. data: {
  1784. orderNo: this.state.orderNo,
  1785. },
  1786. success: function (data) {
  1787. let theArr = [];
  1788. let thisData = data.data;
  1789. if (!thisData.length) {
  1790. if (data.error && data.error.length) {
  1791. message.warning(data.error[0].message);
  1792. }
  1793. thisData = {};
  1794. } else {
  1795. for (let i = 0; i < data.data.length; i++) {
  1796. let thisdata = data.data[i];
  1797. theArr.push({
  1798. processName: thisdata.processName,
  1799. adminName: thisdata.adminName,
  1800. createDate: thisdata.createDate,
  1801. remarks: thisdata.remarks,
  1802. });
  1803. }
  1804. }
  1805. this.setState({
  1806. dataSourcerizhi: theArr,
  1807. });
  1808. }.bind(this),
  1809. }).always(
  1810. function () {
  1811. this.setState({
  1812. loading: false,
  1813. });
  1814. }.bind(this)
  1815. );
  1816. },
  1817. //查看订单日志
  1818. getOrderLog() {
  1819. this.setState({
  1820. rizhivisible: true,
  1821. });
  1822. this.rizhi();
  1823. },
  1824. closeOrderLog() {
  1825. this.setState({
  1826. rizhivisible: false,
  1827. });
  1828. },
  1829. //点击签单
  1830. handleCancels() {
  1831. this.setState({
  1832. isSubmit: 1,
  1833. });
  1834. },
  1835. //点击签单
  1836. handleCancelq() {
  1837. this.setState({
  1838. isSubmit: 0,
  1839. });
  1840. },
  1841. resets() {
  1842. this.state.orderNoSearch = "";
  1843. this.state.customerName = "";
  1844. this.state.releaseDate[0] = undefined;
  1845. this.state.releaseDate[1] = undefined;
  1846. this.loadData();
  1847. },
  1848. //点击添加项目明细
  1849. addDetailed() {
  1850. const { dataSourceX = [] } = this.state
  1851. this.setState({
  1852. projectOperationVisible: true,
  1853. newData: dataSourceX,
  1854. });
  1855. },
  1856. //搜索
  1857. search() {
  1858. this.setState({
  1859. //signBillVisible:false
  1860. });
  1861. this.loadData();
  1862. },
  1863. getOrgCodeUrl(e) {
  1864. this.setState({ orgCodeUrl: e });
  1865. },
  1866. getReplenishUrl(e) {
  1867. this.setState({ replenishUrl: e });
  1868. },
  1869. getContentUrl(e) {
  1870. this.setState({ contentUrl: e });
  1871. },
  1872. //关闭详情
  1873. visitCancel() {
  1874. this.setState({
  1875. visible: false,
  1876. cuiFlag: false,
  1877. addFlag: false,
  1878. boFlag: false,
  1879. });
  1880. this.loadData(this.state.pageNo);
  1881. },
  1882. visitOk() {
  1883. this.setState({
  1884. visible: false,
  1885. });
  1886. this.resets();
  1887. },
  1888. //客户
  1889. selectAutoCUT(value) {
  1890. let autoIds;
  1891. let fwList = this.state.customerArr;
  1892. fwList.map(function (item) {
  1893. if (value == item.name) {
  1894. autoIds = item.id;
  1895. }
  1896. });
  1897. this.setState({
  1898. customerName: value,
  1899. autoId: autoIds,
  1900. });
  1901. },
  1902. getpatentTypeList() {
  1903. $.ajax({
  1904. method: "get",
  1905. dataType: "json",
  1906. crossDomain: false,
  1907. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  1908. success: function (data) {
  1909. if (data.error.length === 0) {
  1910. this.setState({
  1911. patentTypeList: data.data
  1912. })
  1913. } else {
  1914. message.warning(data.error[0].message);
  1915. };
  1916. }.bind(this)
  1917. });
  1918. },
  1919. //加载(自动补全)
  1920. supervisor(e, state) {
  1921. //客户名称与服务名称自动补全
  1922. let api = state
  1923. ? "/api/admin/customer/getCustomerByName"
  1924. : "/api/admin/order/getBusinessProjectByName";
  1925. $.ajax({
  1926. method: "get",
  1927. dataType: "json",
  1928. crossDomain: false,
  1929. url: globalConfig.context + api,
  1930. data: state
  1931. ? {
  1932. name: e,
  1933. type: this.state.customType,
  1934. }
  1935. : {
  1936. businessName: e,
  1937. },
  1938. success: function (data) {
  1939. let thedata = data.data;
  1940. if (!thedata) {
  1941. if (data.error && data.error.length) {
  1942. message.warning(data.error[0].message);
  1943. }
  1944. thedata = {};
  1945. }
  1946. this.setState({
  1947. states: state,
  1948. customerArr: thedata,
  1949. });
  1950. }.bind(this),
  1951. }).always(
  1952. function () {
  1953. this.setState({
  1954. loading: false,
  1955. });
  1956. }.bind(this)
  1957. );
  1958. },
  1959. //上级主管输入框失去焦点是判断客户是否存在
  1960. selectAuto(value) {
  1961. let kid = [];
  1962. let fwList = this.state.customerArr;
  1963. fwList.map(function (item) {
  1964. if (value == item.bname) {
  1965. kid = item;
  1966. }
  1967. });
  1968. if (kid.type == "1") {
  1969. this.setState({
  1970. displayFees: "block",
  1971. });
  1972. } else {
  1973. this.setState({
  1974. displayFees: "none",
  1975. });
  1976. }
  1977. this.setState({
  1978. commodityName: value,
  1979. gid: kid.id,
  1980. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1981. commodityFirstPayment:
  1982. kid.firstPayment == 0
  1983. ? kid.firstPayment.toString()
  1984. : kid.firstPayment,
  1985. });
  1986. },
  1987. //服务值改变时请求客户名称
  1988. httpChange(e) {
  1989. this.state.gid = "";
  1990. if (e.length >= 1) {
  1991. this.supervisor(e, false);
  1992. }
  1993. this.setState({
  1994. commodityName: e,
  1995. });
  1996. },
  1997. changeList(arr) {
  1998. const newArr = [];
  1999. this.state.columns.forEach(item => {
  2000. arr.forEach(val => {
  2001. if (val === item.title) {
  2002. newArr.push(item);
  2003. }
  2004. });
  2005. });
  2006. this.setState({
  2007. changeList: newArr
  2008. });
  2009. },
  2010. addRowColor(record) {
  2011. if (!!record.splitList && record.splitList.length > 0) {
  2012. return 'light'
  2013. } else {
  2014. return 'dark'
  2015. }
  2016. },
  2017. render() {
  2018. const expandedRowRenderVip = (e) => {
  2019. const data = e.splitList;
  2020. let columns = [];
  2021. if (data instanceof Array && data.length) {
  2022. if (e.cSort == 6) {
  2023. columns = [
  2024. {
  2025. title: "负责人",
  2026. dataIndex: "receiverName",
  2027. key: "receiverName",
  2028. },
  2029. {
  2030. title: "负责人电话",
  2031. dataIndex: "receiverMobile",
  2032. key: "receiverMobile",
  2033. },
  2034. {
  2035. title: "项目状态",
  2036. dataIndex: "projectStatus",
  2037. key: "projectStatus",
  2038. render: (text) => {
  2039. return getProjectName(text);
  2040. },
  2041. },
  2042. {
  2043. title: "本次派单",
  2044. dataIndex: "serviceYear",
  2045. key: "serviceYear",
  2046. },
  2047. {
  2048. title: "项目说明",
  2049. dataIndex: "taskComment",
  2050. key: "taskComment",
  2051. render: (text) => {
  2052. return (
  2053. <Tooltip title={text}>
  2054. <div
  2055. // style={{
  2056. // width: 100,
  2057. // overflow: "hidden",
  2058. // whiteSpace: "nowrap",
  2059. // textOverflow: "ellipsis",
  2060. // }}
  2061. >{text}</div>
  2062. </Tooltip>
  2063. )
  2064. },
  2065. },
  2066. ];
  2067. } else {
  2068. columns = [
  2069. {
  2070. title: "子项目名称",
  2071. dataIndex: "taskName",
  2072. key: "taskName"
  2073. },
  2074. {
  2075. title: "子项目数量",
  2076. dataIndex: "commodityQuantity",
  2077. key: "commodityQuantity"
  2078. },
  2079. {
  2080. title: "拆分操作人",
  2081. dataIndex: "splitAname",
  2082. key: "splitAname"
  2083. },
  2084. {
  2085. title: "项目负责人",
  2086. dataIndex: "receiverName",
  2087. key: "receiverName"
  2088. },
  2089. {
  2090. title: "拆分时间",
  2091. dataIndex: "splitTimes",
  2092. key: "splitTimes"
  2093. }
  2094. ]
  2095. }
  2096. return (
  2097. <Table
  2098. columns={columns}
  2099. dataSource={data}
  2100. pagination={false}
  2101. />
  2102. );
  2103. } else {
  2104. columns = [];
  2105. return (
  2106. <p
  2107. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  2108. >
  2109. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  2110. </p>
  2111. );
  2112. }
  2113. };
  2114. const formItemLayout = {
  2115. labelCol: { span: 10 },
  2116. wrapperCol: { span: 14 },
  2117. };
  2118. const FormItem = Form.Item;
  2119. const { RangePicker } = DatePicker;
  2120. const rowSelection = {
  2121. selectedRowKeys: this.state.selectedRowKeys,
  2122. onChange: (selectedRowKeys, selectedRows) => {
  2123. this.setState({
  2124. modalVisible: false,
  2125. selectedRows: selectedRows.slice(-1),
  2126. selectedRowKeys: selectedRowKeys.slice(-1),
  2127. });
  2128. },
  2129. onSelect: (recordt) => {
  2130. this.setState({
  2131. modalVisible: false,
  2132. recordt: recordt.id,
  2133. });
  2134. },
  2135. };
  2136. const cuiDataList = this.state.contactList || [];
  2137. const dataSources = this.state.customerArr || [];
  2138. let departmentArr = this.state.departmentArr || [];
  2139. const options = this.state.states
  2140. ? dataSources.map((group) => (
  2141. <Select.Option key={group.id} value={group.name}>
  2142. {group.name}
  2143. </Select.Option>
  2144. ))
  2145. : dataSources.map((group, index) => (
  2146. <Select.Option key={index} value={group.bname}>
  2147. {group.bname}
  2148. </Select.Option>
  2149. ));
  2150. const { TabPane } = Tabs;
  2151. let approvalOptions = [
  2152. { label: '无前期款', value: 1 },
  2153. { label: '暂无合同款', value: 2 },
  2154. { label: '含高风险条款', value: 3 },
  2155. { label: '新产品首单', value: 4 },
  2156. { label: '通过率低于80%', value: 5 },
  2157. { label: '3万以下会员', value: 6 },
  2158. { label: '认证首期5K以下', value: 7 },
  2159. {
  2160. label: <Input
  2161. type="text"
  2162. style={{ width: 150, borderStyle: "none none solid none" }}
  2163. value={this.state.typeExplain}
  2164. disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
  2165. placeholder="其他"
  2166. onChange={e => {
  2167. this.setState({
  2168. typeExplain: e.target.value
  2169. })
  2170. }}
  2171. />, value: 0
  2172. },
  2173. ];
  2174. return (
  2175. <div className="user-content">
  2176. {this.state.resVisible ? (
  2177. <ResolutionDetail
  2178. cancel={this.resCancel}
  2179. detail={this.state.resRecord}
  2180. visible={this.state.resVisible}
  2181. id={this.state.resRecord.orderNo}
  2182. />
  2183. ) : (
  2184. ""
  2185. )}
  2186. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  2187. <div className="content-title" style={{ marginBottom: 10 }}>
  2188. <span style={{ fontWeight: 900, fontSize: 16 }}>驳回订单列表</span>
  2189. </div>
  2190. <div className="user-search">
  2191. <Tabs
  2192. defaultActiveKey="1"
  2193. onChange={this.callback}
  2194. className="test"
  2195. >
  2196. <TabPane tab="搜索" key="1">
  2197. <div style={{ marginLeft: 10 }}>
  2198. <Input
  2199. placeholder="订单编号"
  2200. style={{ width: "150px", marginRight: 10 }}
  2201. value={this.state.orderNoSearch}
  2202. onChange={(e) => {
  2203. this.setState({ orderNoSearch: e.target.value });
  2204. }}
  2205. />
  2206. <Input
  2207. placeholder="客户名称"
  2208. style={{
  2209. width: "150px",
  2210. marginBottom: "10px",
  2211. marginTop: 10,
  2212. marginLeft: 10,
  2213. marginRight: 10,
  2214. }}
  2215. value={this.state.customerName}
  2216. onChange={(e) => {
  2217. this.setState({ customerName: e.target.value });
  2218. }}
  2219. />
  2220. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  2221. <RangePicker
  2222. value={[
  2223. this.state.releaseDate[0]
  2224. ? moment(this.state.releaseDate[0])
  2225. : null,
  2226. this.state.releaseDate[1]
  2227. ? moment(this.state.releaseDate[1])
  2228. : null,
  2229. ]}
  2230. onChange={(data, dataString) => {
  2231. this.setState({ releaseDate: dataString });
  2232. }}
  2233. />
  2234. <Button
  2235. type="primary"
  2236. onClick={this.search}
  2237. style={{ marginLeft: "10px", marginRight: 10 }}
  2238. >
  2239. 搜索
  2240. </Button>
  2241. <Button onClick={this.resets}>重置</Button>
  2242. </div>
  2243. </TabPane>
  2244. <TabPane tab="更改表格显示数据" key="2">
  2245. <div style={{ marginLeft: 10 }}>
  2246. <ChooseList
  2247. columns={this.state.columns}
  2248. changeFn={this.changeList}
  2249. changeList={this.state.changeList}
  2250. top={55}
  2251. margin={11}
  2252. />
  2253. </div>
  2254. </TabPane>
  2255. </Tabs>
  2256. <div className="patent-table">
  2257. <Spin spinning={this.state.loading}>
  2258. <Table
  2259. columns={
  2260. this.state.changeList
  2261. ? this.state.changeList
  2262. : this.state.columns
  2263. }
  2264. dataSource={this.state.dataSource}
  2265. rowSelection={rowSelection}
  2266. pagination={this.state.pagination}
  2267. onRowClick={this.tableRowClick}
  2268. bordered
  2269. size="small"
  2270. />
  2271. </Spin>
  2272. </div>
  2273. {this.state.visible ? <Modal
  2274. maskClosable={false}
  2275. className="customeDetails"
  2276. footer=""
  2277. title="订单详情"
  2278. width="1200px"
  2279. visible={this.state.visible}
  2280. onOk={this.visitOk}
  2281. onCancel={this.visitCancel}
  2282. >
  2283. <Form
  2284. layout="horizontal"
  2285. onSubmit={this.handleSubmit}
  2286. id="demand-form"
  2287. style={{ paddingBottom: "40px" }}
  2288. >
  2289. <Spin spinning={this.state.loading}>
  2290. <div className="clearfix">
  2291. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2292. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2293. </div>
  2294. <FormItem
  2295. className="half-item"
  2296. {...formItemLayout}
  2297. label="订单编号"
  2298. >
  2299. <span>{this.state.orderNo}</span>
  2300. </FormItem>
  2301. <FormItem
  2302. className="half-item"
  2303. {...formItemLayout}
  2304. label="合同编号"
  2305. >
  2306. <span>{this.state.contractNo}</span>
  2307. </FormItem>
  2308. <FormItem
  2309. className="half-item"
  2310. {...formItemLayout}
  2311. label="客户名称"
  2312. >
  2313. <span>{this.state.userName}</span>
  2314. <EnterpriseNameChange
  2315. type='journal'
  2316. style={{ marginLeft: 10 }}
  2317. enterpriseId={this.state.orderUid} />
  2318. </FormItem>
  2319. <FormItem
  2320. className="half-item"
  2321. {...formItemLayout}
  2322. label="销售类型"
  2323. >
  2324. <span>
  2325. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  2326. (salesList[this.state.updatas.salesType] || "")}
  2327. {/* {
  2328. this.state.updatas.other != null && this.state.updatas.other != "" &&
  2329. <Tooltip title={this.state.updatas.other}>
  2330. <span>
  2331. {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")}
  2332. </span>
  2333. </Tooltip>
  2334. } */}
  2335. </span>
  2336. <UpdateSales
  2337. orderNo={this.state.orderNo}
  2338. updatas={this.state.updatas}
  2339. onRefresh={
  2340. e => {
  2341. let ups = this.state.updatas
  2342. ups.salesType = e.salesType
  2343. if (e.salesType == "3") {
  2344. ups.channelId = e.channelId
  2345. ups.other = e.other
  2346. } else if (e.salesType == "4" || e.salesType == "5") {
  2347. ups.other = e.other
  2348. }
  2349. this.setState({
  2350. updatas: ups
  2351. })
  2352. }
  2353. //this.xiangqing.bind(this, this.state.orderNo)
  2354. }
  2355. />
  2356. </FormItem>
  2357. <FormItem
  2358. className="half-item"
  2359. {...formItemLayout}
  2360. label="流程状态"
  2361. >
  2362. <span>{getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}</span>
  2363. <FlowChart
  2364. orderNo={this.state.orderNo}
  2365. />
  2366. </FormItem>
  2367. <FormItem
  2368. className="half-item"
  2369. {...formItemLayout}
  2370. label="结算状态"
  2371. >
  2372. <span>
  2373. {getLiquidationStatus(this.state.liquidationStatus)}
  2374. </span>
  2375. </FormItem>
  2376. <FormItem
  2377. className="half-item"
  2378. {...formItemLayout}
  2379. label="已收款项(万元)"
  2380. >
  2381. <span>{this.state.settlementAmount}</span>
  2382. </FormItem>
  2383. <FormItem
  2384. className="half-item"
  2385. {...formItemLayout}
  2386. label={
  2387. <span>
  2388. <strong style={{ color: "#f00" }}>*</strong>
  2389. 企业联系人
  2390. </span>
  2391. }
  2392. >
  2393. <Input
  2394. placeholder="请输入联系人"
  2395. ref="signTotalAmount"
  2396. value={this.state.contacts}
  2397. onChange={(e) => {
  2398. this.setState({ contacts: e.target.value });
  2399. }}
  2400. style={{ width: "240px" }}
  2401. />
  2402. </FormItem>
  2403. <FormItem
  2404. className="half-item"
  2405. {...formItemLayout}
  2406. label={
  2407. <span>
  2408. <strong style={{ color: "#f00" }}>*</strong>
  2409. 联系人电话
  2410. </span>
  2411. }
  2412. >
  2413. <Input
  2414. placeholder="请输入联系人电话"
  2415. ref="signTotalAmount"
  2416. value={this.state.contactMobile}
  2417. onChange={(e) => {
  2418. this.setState({ contactMobile: e.target.value });
  2419. }}
  2420. style={{ width: "240px" }}
  2421. />
  2422. </FormItem>
  2423. <FormItem
  2424. className="half-item"
  2425. {...formItemLayout}
  2426. label="企业法人"
  2427. >
  2428. <Input
  2429. placeholder="请输入法人"
  2430. ref="signTotalAmount"
  2431. value={this.state.legalPerson}
  2432. onChange={(e) => {
  2433. this.setState({ legalPerson: e.target.value });
  2434. }}
  2435. style={{ width: "240px" }}
  2436. />
  2437. </FormItem>
  2438. <FormItem
  2439. className="half-item"
  2440. {...formItemLayout}
  2441. label="法人电话"
  2442. >
  2443. <Input
  2444. placeholder="请输入法人电话"
  2445. ref="signTotalAmount"
  2446. value={this.state.legalPersonTel}
  2447. onChange={(e) => {
  2448. this.setState({ legalPersonTel: e.target.value });
  2449. }}
  2450. style={{ width: "240px" }}
  2451. />
  2452. </FormItem>
  2453. <FormItem
  2454. className="half-item"
  2455. {...formItemLayout}
  2456. label={
  2457. <span>
  2458. <strong style={{ color: "#f00" }}>*</strong>
  2459. 签单金额(万元)
  2460. </span>
  2461. }
  2462. >
  2463. <Input
  2464. placeholder="签单金额"
  2465. ref="signTotalAmount"
  2466. value={this.state.totalAmount}
  2467. onChange={(e) => {
  2468. this.setState({ totalAmount: e.target.value });
  2469. }}
  2470. style={{ width: "240px" }}
  2471. />
  2472. </FormItem>
  2473. <FormItem
  2474. className="half-item"
  2475. {...formItemLayout}
  2476. label={
  2477. <span>
  2478. <strong style={{ color: "#f00" }}>*</strong>
  2479. 首付金额(万元)
  2480. </span>
  2481. }
  2482. >
  2483. <Input
  2484. placeholder="请输入实签首款金额"
  2485. ref="signFirstPayment"
  2486. value={this.state.firstAmount}
  2487. onChange={(e) => {
  2488. this.setState({ firstAmount: e.target.value });
  2489. }}
  2490. style={{ width: "240px" }}
  2491. />
  2492. </FormItem>
  2493. <div className="clearfix">
  2494. <FormItem
  2495. className="half-item"
  2496. {...formItemLayout}
  2497. label="特批立项"
  2498. >
  2499. <Select
  2500. placeholder="请选择客户所属类型"
  2501. style={{ width: "240px" }}
  2502. value={this.state.approval}
  2503. onChange={(e) => {
  2504. this.setState({ approval: e });
  2505. }}
  2506. >
  2507. {
  2508. [{ id: 0, name: "非特批" },
  2509. { id: 1, name: "特批" }].map(function (item) {
  2510. return (
  2511. <Select.Option key={item.id} value={item.id}>
  2512. {item.name}
  2513. </Select.Option>
  2514. );
  2515. })
  2516. }
  2517. </Select>
  2518. {
  2519. this.state.approval == 1 &&
  2520. <div>
  2521. <CheckboxGroup
  2522. options={approvalOptions}
  2523. value={this.state.approvaType}
  2524. onChange={e => {
  2525. this.setState({
  2526. approvaType: e
  2527. })
  2528. }}
  2529. />
  2530. </div>
  2531. }
  2532. </FormItem>
  2533. </div>
  2534. <FormItem
  2535. className="half-item"
  2536. {...formItemLayout}
  2537. label="合同签订时间"
  2538. >
  2539. <DatePicker
  2540. style={{
  2541. marginTop: "2px",
  2542. width: "240px",
  2543. height: "27px",
  2544. }}
  2545. showTime
  2546. format="YYYY-MM-DD"
  2547. onOk={() => { }}
  2548. value={
  2549. this.state.signDate
  2550. ? moment(this.state.signDate)
  2551. : null
  2552. }
  2553. onChange={(data, dataString) => {
  2554. this.setState({ signDate: dataString });
  2555. }}
  2556. />
  2557. </FormItem>
  2558. <FormItem
  2559. className="half-item"
  2560. {...formItemLayout}
  2561. label="订单部门"
  2562. >
  2563. <Select
  2564. placeholder="请输入订单部门"
  2565. style={{ width: 240 }}
  2566. value={this.state.organizationSearch}
  2567. onChange={(e) => {
  2568. this.setState({ organizationSearch: e });
  2569. }}
  2570. >
  2571. {departmentArr.map(function (item) {
  2572. return (
  2573. <Select.Option key={item.id}>
  2574. {item.name}
  2575. </Select.Option>
  2576. );
  2577. })}
  2578. </Select>
  2579. </FormItem>
  2580. <FormItem
  2581. className="half-item"
  2582. {...formItemLayout}
  2583. label="是否外包"
  2584. >
  2585. {this.state.outsource}
  2586. </FormItem>
  2587. <div className="clearfix">
  2588. <FormItem
  2589. labelCol={{ span: 5 }}
  2590. wrapperCol={{ span: 19 }}
  2591. label={
  2592. <span>
  2593. <strong style={{ color: "#f00" }}>*</strong>
  2594. 合同扫描件
  2595. </span>
  2596. }
  2597. >
  2598. <PicturesWall
  2599. domId={'reject1'}
  2600. fileList={this.getOrgCodeUrl}
  2601. pictureUrl={this.state.orgCodeUrl}
  2602. url="/api/admin/order/uploadOrderImg"
  2603. orderNo={this.state.orderNo}
  2604. sign="contract"
  2605. deleteApi="/api/admin/order/deleteOrderImg"
  2606. />
  2607. <p>图片建议:要清晰。</p>
  2608. </FormItem>
  2609. <FormItem
  2610. labelCol={{ span: 5 }}
  2611. wrapperCol={{ span: 19 }}
  2612. label={
  2613. <span>
  2614. 补充协议
  2615. </span>
  2616. }
  2617. >
  2618. <PicturesWall
  2619. domId={'reject2'}
  2620. fileList={this.getReplenishUrl}
  2621. pictureUrl={this.state.replenishUrl}
  2622. url="/api/admin/order/uploadOrderImg"
  2623. orderNo={this.state.orderNo}
  2624. sign="supplement"
  2625. deleteApi="/api/admin/order/deleteOrderImg"
  2626. />
  2627. <p>图片建议:要清晰。</p>
  2628. <Button
  2629. style={{
  2630. float: "right",
  2631. marginRight: "140px",
  2632. marginTop: "20px",
  2633. }}
  2634. onClick={this.getOrderLog}
  2635. >
  2636. 查看订单日志
  2637. </Button>
  2638. </FormItem>
  2639. </div>
  2640. <Gxczx
  2641. isShow={this.state.isShow}
  2642. isCreat={true}
  2643. knowledgeServices={this.state.knowledgeServices}
  2644. auditServices={this.state.auditServices}
  2645. addDeductionServices={this.state.addDeductionServices}
  2646. knowledgeOther={this.state.knowledgeOther}
  2647. auditOther={this.state.auditOther}
  2648. addDeductionOther={this.state.addDeductionOther}
  2649. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  2650. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  2651. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  2652. onSwitch={e => { this.setState({ isShow: e }) }}
  2653. />
  2654. {/* 服务内容 */}
  2655. {/* <ContentUrl
  2656. processStatus={this.state.processStatus}
  2657. domId={"rejectContent"}
  2658. contentUrl={this.state.contentUrl}
  2659. getContentUrl={this.getContentUrl}
  2660. imgId={"rejectImg1"}
  2661. /> */}
  2662. <div className="clearfix">
  2663. <FormItem
  2664. labelCol={{ span: 5 }}
  2665. wrapperCol={{ span: 19 }}
  2666. label={
  2667. <span>
  2668. <strong style={{ color: "#f00" }}>*</strong>
  2669. 服务内容
  2670. </span>
  2671. }
  2672. >
  2673. <PicturesWall
  2674. domId={'rejectContent'}
  2675. fileList={this.getContentUrl}
  2676. pictureUrl={this.state.contentUrl}
  2677. url="/api/admin/order/uploadOrderImg"
  2678. orderNo={this.state.orderNo}
  2679. sign="content"
  2680. deleteApi="/api/admin/order/deleteOrderImg"
  2681. />
  2682. <p><span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  2683. </FormItem>
  2684. <Property
  2685. isCreat={true}
  2686. isProperty={this.state.isProperty}
  2687. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  2688. patentStatus={this.state.patentStatus}
  2689. setPatentS={e => { this.setState({ patentStatus: e }) }}
  2690. />
  2691. <FormItem
  2692. labelCol={{ span: 5 }}
  2693. wrapperCol={{ span: 16 }}
  2694. label={
  2695. <span>
  2696. <strong style={{ color: "#f00" }}>*</strong>
  2697. 订单留言
  2698. </span>
  2699. }
  2700. >
  2701. <Input
  2702. type="textarea"
  2703. placeholder="请输入订单留言"
  2704. rows={4}
  2705. value={this.state.orderRemarks}
  2706. onChange={(e) => {
  2707. this.setState({ orderRemarks: e.target.value });
  2708. }}
  2709. />
  2710. </FormItem>
  2711. </div>
  2712. <div className="clearfix">
  2713. <FormItem
  2714. className="half-item"
  2715. {...formItemLayout}
  2716. label="订单负责人"
  2717. >
  2718. <span>{this.state.salesmanName}</span>
  2719. </FormItem>
  2720. <FormItem
  2721. className="half-item"
  2722. {...formItemLayout}
  2723. label="订单负责人电话"
  2724. >
  2725. <span>{this.state.salesmanMobile}</span>
  2726. </FormItem>
  2727. </div>
  2728. <div className="clearfix">
  2729. <FormItem
  2730. className="half-item"
  2731. {...formItemLayout}
  2732. label="当前财务负责人"
  2733. >
  2734. <span>{this.state.nowFinance}</span>
  2735. </FormItem>
  2736. <FormItem
  2737. className="half-item"
  2738. {...formItemLayout}
  2739. label="当前财务负责人电话"
  2740. >
  2741. <span>{this.state.nowFinanceMobile}</span>
  2742. </FormItem>
  2743. </div>
  2744. <div className="clearfix">
  2745. <FormItem
  2746. className="half-item"
  2747. {...formItemLayout}
  2748. style={{ opacity: ".5" }}
  2749. label="原订单负责人"
  2750. >
  2751. <span>{this.state.oldSalesmanName}</span>
  2752. </FormItem>
  2753. <FormItem
  2754. className="half-item"
  2755. {...formItemLayout}
  2756. style={{ opacity: ".5" }}
  2757. label="原订单负责人电话"
  2758. >
  2759. <span>{this.state.oldSalesmanMobile}</span>
  2760. </FormItem>
  2761. </div>
  2762. <div className="clearfix">
  2763. <FormItem
  2764. className="half-item"
  2765. style={{ opacity: ".5" }}
  2766. {...formItemLayout}
  2767. label="实际财务操作人"
  2768. >
  2769. <span>{this.state.financeName}</span>
  2770. </FormItem>
  2771. <FormItem
  2772. className="half-item"
  2773. {...formItemLayout}
  2774. style={{ opacity: ".5" }}
  2775. label="实际财务操作人电话"
  2776. >
  2777. <span>{this.state.financeMobile}</span>
  2778. </FormItem>
  2779. </div>
  2780. <div className="clearfix">
  2781. <FormItem
  2782. className="half-item"
  2783. {...formItemLayout}
  2784. label="驳回人"
  2785. >
  2786. <span>{this.state.initiateName}</span>
  2787. </FormItem>
  2788. <FormItem
  2789. className="half-item"
  2790. {...formItemLayout}
  2791. label="驳回时间"
  2792. >
  2793. <span>{this.state.backDate}</span>
  2794. </FormItem>
  2795. </div>
  2796. <div className="clearfix">
  2797. <FormItem
  2798. labelCol={{ span: 5 }}
  2799. wrapperCol={{ span: 16 }}
  2800. label="驳回原因"
  2801. >
  2802. <span>{this.state.reason}</span>
  2803. </FormItem>
  2804. </div>
  2805. {/* 协单人员 */}
  2806. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2807. <div>
  2808. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2809. 项目业务
  2810. </span>
  2811. <Button
  2812. type="primary"
  2813. onClick={this.addDetailed}
  2814. style={{
  2815. float: "right",
  2816. marginRight: "50px",
  2817. marginBottom: "15px",
  2818. }}
  2819. >
  2820. 添加项目明细
  2821. </Button>
  2822. </div>
  2823. <div className="patent-table">
  2824. <Spin spinning={this.state.loading}>
  2825. <Table
  2826. columns={this.state.columnsX}
  2827. dataSource={this.state.dataSourceX}
  2828. pagination={this.state.paginations}
  2829. // onRowClick={this.tableRowClickX}
  2830. expandedRowRender={expandedRowRenderVip}
  2831. rowClassName={this.addRowColor}
  2832. bordered
  2833. size="small"
  2834. />
  2835. </Spin>
  2836. </div>
  2837. <div
  2838. style={{ display: cuiDataList.length ? "block" : "none" }}
  2839. >
  2840. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2841. 旧催款节点
  2842. </span>
  2843. <Button
  2844. type="primary"
  2845. // onClick={this.addcontact}
  2846. disabled
  2847. onClick={(e) => {
  2848. cuiDataList.length
  2849. ? this.addcontact()
  2850. : this.addcontactNew();
  2851. }}
  2852. style={{
  2853. float: "right",
  2854. marginRight: "50px",
  2855. marginBottom: "15px",
  2856. }}
  2857. >
  2858. 添加催款节点
  2859. </Button>
  2860. </div>
  2861. <div
  2862. className="clearfix"
  2863. style={{ display: cuiDataList.length ? "block" : "none" }}
  2864. >
  2865. <Spin spinning={this.state.loading}>
  2866. <Form layout="horizontal" id="demand-form">
  2867. <Table
  2868. pagination={false}
  2869. columns={this.state.ContactsLists}
  2870. dataSource={this.state.contactList}
  2871. bordered
  2872. size="small"
  2873. scroll={{ x: "max-content", y: 0 }}
  2874. />
  2875. <Col
  2876. span={24}
  2877. offset={9}
  2878. style={{ marginTop: "15px" }}
  2879. ></Col>
  2880. </Form>
  2881. </Spin>
  2882. </div>
  2883. <div>
  2884. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2885. 新催款节点
  2886. </span>
  2887. <span
  2888. style={{
  2889. display: cuiDataList.length ? "none" : "inline-block",
  2890. marginLeft: 10,
  2891. color: "red",
  2892. }}
  2893. >
  2894. 金额总计(万元): {this.state.totalCui}
  2895. </span>
  2896. <Button
  2897. type="primary"
  2898. disabled={
  2899. cuiDataList.length || this.state.addFlag
  2900. ? true
  2901. : false
  2902. }
  2903. // onClick={this.addcontact}
  2904. onClick={(e) => {
  2905. this.setState({ addFlag: true });
  2906. this.addcontactNew();
  2907. }}
  2908. style={{
  2909. float: "right",
  2910. marginRight: "50px",
  2911. marginBottom: "15px",
  2912. }}
  2913. >
  2914. 添加催款节点
  2915. </Button>
  2916. </div>
  2917. <div className="clearfix">
  2918. <Spin spinning={this.state.loading}>
  2919. <Form layout="horizontal" id="demand-form">
  2920. <Table
  2921. pagination={false}
  2922. columns={this.state.ContactsListsNew}
  2923. dataSource={this.state.contactListNew}
  2924. scroll={{ x: "max-content", y: 0 }}
  2925. bordered
  2926. size="small"
  2927. />
  2928. <Col
  2929. span={24}
  2930. offset={9}
  2931. style={{ marginTop: "15px" }}
  2932. />
  2933. </Form>
  2934. </Spin>
  2935. </div>
  2936. <div className="addSave" style={{ display: "flex", justifyContent: "center" }}>
  2937. {
  2938. // 新需求 除湖南和内蒙古外 不让其他省操作
  2939. (adminData.province == "21" || adminData.province == "11") &&
  2940. <Button
  2941. className="cancel"
  2942. type="primary"
  2943. onClick={this.examOk}
  2944. style={{ margin: 25 }}
  2945. htmlType="submit"
  2946. loading={this.state.flag}
  2947. >
  2948. 重新提交
  2949. </Button>
  2950. }
  2951. <Popconfirm
  2952. title="请确认您是否作废此订单??"
  2953. onConfirm={(e) => {
  2954. this.examOks()
  2955. }}
  2956. okText="确认"
  2957. cancelText="取消"
  2958. >
  2959. <Button
  2960. className="cancel"
  2961. type="danger"
  2962. style={{ margin: 25 }}
  2963. loading={this.state.flag}
  2964. >
  2965. 订单作废
  2966. </Button>
  2967. </Popconfirm>
  2968. <Button
  2969. className="cancel"
  2970. type="ghost"
  2971. onClick={this.visitCancel}
  2972. style={{ margin: 25 }}
  2973. >
  2974. 取消
  2975. </Button>
  2976. </div>
  2977. </div>
  2978. </Spin>
  2979. </Form>
  2980. </Modal> : <div />}
  2981. {/* <Modal
  2982. visible={this.state.rizhivisible}
  2983. className="admin-desc-content"
  2984. width="800px"
  2985. maskClosable={false}
  2986. title="订单日志"
  2987. footer={null}
  2988. onCancel={this.closeOrderLog}
  2989. >
  2990. <div className="patent-table">
  2991. <Spin spinning={this.state.loading}>
  2992. <Table
  2993. columns={this.state.columnsrizhi}
  2994. dataSource={this.state.dataSourcerizhi}
  2995. pagination={false}
  2996. />
  2997. </Spin>
  2998. </div>
  2999. </Modal> */}
  3000. <OrderRiZi
  3001. dataSourcerizhi={this.state.dataSourcerizhi}
  3002. closeOrderLog={this.closeOrderLog}
  3003. visible={this.state.rizhivisible}
  3004. loading={this.state.loading}
  3005. />
  3006. </div>
  3007. {
  3008. // 添加项目
  3009. this.state.projectOperationVisible &&
  3010. <NewAddProject
  3011. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  3012. orderNo={this.state.orderNo}
  3013. visible={this.state.projectOperationVisible}
  3014. newData={this.state.newData}
  3015. onCancel={this.nextCancel}
  3016. />
  3017. }
  3018. {
  3019. // 编辑项目
  3020. this.state.editProjectOperationVisible &&
  3021. <NewEditProject
  3022. readOnly={
  3023. this.state.dataInfor &&
  3024. Object.keys(this.state.dataInfor).length > 0 &&
  3025. this.state.processStatus !== 0
  3026. }
  3027. orderNo={this.state.orderNo}
  3028. visible={this.state.editProjectOperationVisible}
  3029. dataInfor={this.state.dataInfor}
  3030. newData={this.state.newData}
  3031. onCancel={this.nextCancel}
  3032. />
  3033. }
  3034. </div>
  3035. );
  3036. },
  3037. })
  3038. );
  3039. export default IntentionCustomer;