reject.jsx 105 KB

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