reject.jsx 86 KB

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