reject.jsx 98 KB

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