reject.jsx 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702
  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. } from "@/tools.js";
  32. import './customer.less';
  33. import ShowModalDiv from "@/showModal.jsx"
  34. import OrderRiZi from "@/orderRiZi.jsx";
  35. import ResolutionDetail from "@/resolutionDetail";
  36. import ImgList from "../../../common/imgList";
  37. import { ChooseList } from "./chooseList";
  38. import OrderItemStatus from "../../../common/orderItemStatus";
  39. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  40. import OrderCoor from './changeComponent/orderCoor';
  41. import ProjectOperation from "../../../common/projectOperation";
  42. import ContentUrl from './contentUrl';
  43. import UpdateSales from './updatesales';//修改销售类型
  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 <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  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. updatas: {},
  854. };
  855. },
  856. //删除
  857. delectRow(record) {
  858. this.setState({
  859. loading: true,
  860. });
  861. $.ajax({
  862. method: "post",
  863. dataType: "json",
  864. crossDomain: false,
  865. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  866. data: {
  867. id: record.id,
  868. },
  869. }).done(
  870. function (data) {
  871. if (!data.error.length) {
  872. message.success("删除成功!");
  873. this.setState({
  874. loading: false,
  875. });
  876. this.xiangmu(this.state.orderNo);
  877. this.jiedianNew(this.state.orderNo);
  878. this.jiedian(this.state.orderNo);
  879. this.loadData(this.state.pageNo);
  880. } else {
  881. message.warning(data.error[0].message);
  882. }
  883. }.bind(this)
  884. );
  885. },
  886. //页面加载函数
  887. componentWillMount() {
  888. this.loadData();
  889. },
  890. //整行点击
  891. tableRowClick(record) {
  892. this.setState({
  893. visible: true,
  894. orderNos: record.orderNo,
  895. orderStatus: record.orderStatus,
  896. processStatus: record.orderStatus
  897. });
  898. this.xiangqing(record.orderNo);
  899. this.xiangmu(record.orderNo);
  900. this.jiedian(record.orderNo);
  901. this.jiedianNew(record.orderNo);
  902. this.departmentList();
  903. this.getpatentTypeList();
  904. },
  905. //点击打卡项目详情
  906. tableRowClickX(record) {
  907. this.setState({
  908. projectOperationVisible: true,
  909. dataInfor: record,
  910. })
  911. },
  912. //项目详情关闭
  913. nextCancel() {
  914. this.setState({
  915. projectOperationVisible: false,
  916. gid: "",
  917. dataInfor: {},
  918. }, () => {
  919. this.xiangmu(this.state.orderNo);
  920. });
  921. },
  922. //订单详情
  923. xiangqing(orderNos) {
  924. $.ajax({
  925. method: "get",
  926. dataType: "json",
  927. crossDomain: false,
  928. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  929. data: {
  930. orderNo: orderNos,
  931. },
  932. success: function (data) {
  933. if (data.error.length || data.data.list == "") {
  934. if (data.error && data.error.length) {
  935. message.warning(data.error[0].message);
  936. }
  937. } else {
  938. let thisdata = data.data;
  939. if (thisdata.approval == 0) {
  940. thisdata.approval = 0;
  941. } else {
  942. thisdata.approval = 1;
  943. }
  944. // if (thisdata.approval == 2) {
  945. // thisdata.approval = "特批通过";
  946. // } else if (thisdata.approval == 3) {
  947. // thisdata.approval = "特批驳回";
  948. // }
  949. this.setState({
  950. id: thisdata.id,
  951. orderUid: thisdata.uid,
  952. kehuId: thisdata.buyerId,
  953. orderNo: thisdata.orderNo, //订单编号
  954. contractNo: thisdata.contractNo, //合同编号
  955. userName: thisdata.userName, //客户名称
  956. signDate: thisdata.signDate, //签单时间
  957. processStatus: thisdata.processStatus, //流程状态
  958. liquidationStatus: thisdata.liquidationStatus, //结算状态
  959. contacts: thisdata.contacts, //企业联系人
  960. contactMobile: thisdata.contactMobile, //联系人电话
  961. legalPerson: thisdata.legalPerson, //法人
  962. legalPersonTel: thisdata.legalPersonTel, //法人电话
  963. firstAmount: thisdata.firstAmount + "", //签单金额
  964. totalAmount: thisdata.totalAmount + "", //首付金额
  965. settlementAmount: thisdata.settlementAmount, //已收款项
  966. orderRemarks: thisdata.orderRemarks, //订单留言
  967. orgCodeUrl: thisdata.contractPictureUrl
  968. ? splitUrl(
  969. thisdata.contractPictureUrl,
  970. ",",
  971. globalConfig.avatarHost + "/upload"
  972. )
  973. : [], //图片地址
  974. replenishUrl: thisdata.agreementUrl
  975. ? splitUrl(
  976. thisdata.agreementUrl,
  977. ",",
  978. globalConfig.avatarHost + "/upload"
  979. )
  980. : [], //图片地址
  981. contentUrl: thisdata.serviceContent
  982. ? splitUrl(
  983. thisdata.serviceContent,
  984. ",",
  985. globalConfig.avatarHost + "/upload"
  986. )
  987. : [], //图片地址
  988. salesmanName: thisdata.salesmanName, //营销员名称
  989. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  990. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  991. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  992. financeName: thisdata.financeName, //财务名称
  993. financeMobile: thisdata.financeMobile, //财务电话
  994. nowFinance: thisdata.nowFinance, //财务名称
  995. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  996. initiateName: thisdata.initiateName, //驳回人
  997. backDate: thisdata.backDate, //驳回时间
  998. reason: thisdata.reason, //驳回原因
  999. approval: thisdata.approval, //特批状态
  1000. organizationSearch: thisdata.orderDep,
  1001. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  1002. outsource: thisdata.outsource == 0 ? "否" : "是",
  1003. deleteSign: thisdata.deleteSign,
  1004. updatas: {
  1005. salesType: thisdata.salesType,//销售类型
  1006. userType: thisdata.userType,//客户所属类型
  1007. other: thisdata.other,//3渠道名 4,5描述
  1008. },
  1009. channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  1010. });
  1011. }
  1012. }.bind(this),
  1013. }).always(
  1014. function () {
  1015. this.setState({
  1016. loading: false,
  1017. });
  1018. }.bind(this)
  1019. );
  1020. },
  1021. // 拆分详细
  1022. showRes(record) {
  1023. this.setState({
  1024. resVisible: true,
  1025. resRecord: record,
  1026. });
  1027. },
  1028. resCancel() {
  1029. this.setState({
  1030. resVisible: false,
  1031. });
  1032. },
  1033. //项目列表
  1034. xiangmu(orderNos) {
  1035. $.ajax({
  1036. method: "get",
  1037. dataType: "json",
  1038. crossDomain: false,
  1039. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1040. data: {
  1041. orderNo: orderNos,
  1042. },
  1043. success: function (data) {
  1044. let theArr = [];
  1045. if (data.error.length || data.data.list == "") {
  1046. if (data.error && data.error.length) {
  1047. message.warning(data.error[0].message);
  1048. }
  1049. } else {
  1050. for (let i = 0; i < data.data.length; i++) {
  1051. let thisdata = data.data[i];
  1052. thisdata.key = i;
  1053. thisdata.sort = thisdata.cSort;
  1054. theArr.push(thisdata);
  1055. }
  1056. }
  1057. this.setState({
  1058. dataSourceX: theArr,
  1059. paginations: false,
  1060. });
  1061. }.bind(this),
  1062. }).always(
  1063. function () {
  1064. this.setState({
  1065. loading: false,
  1066. });
  1067. }.bind(this)
  1068. );
  1069. },
  1070. //节点列表
  1071. jiedian(orderNos) {
  1072. $.ajax({
  1073. method: "get",
  1074. dataType: "json",
  1075. crossDomain: false,
  1076. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1077. data: {
  1078. orderNo: orderNos,
  1079. },
  1080. success: function (data) {
  1081. let theArr = [];
  1082. let thisData = [];
  1083. if (data.error.length || data.data.list == "") {
  1084. if (data.error && data.error.length) {
  1085. message.warning(data.error[0].message);
  1086. }
  1087. } else {
  1088. for (let i = 0; i < data.data.length; i++) {
  1089. thisData = data.data[i];
  1090. theArr.push({
  1091. key: i,
  1092. dunSubject: thisData.dunSubject
  1093. ? thisData.dunSubject.toString()
  1094. : "", //催款科目
  1095. id: thisData.id, //节点Id
  1096. money: thisData.money, //催款金额
  1097. dunStatus: thisData.dunStatus, //催款状态
  1098. orderNo: thisData.orderNo,
  1099. });
  1100. }
  1101. this.setState({
  1102. contactList: theArr,
  1103. });
  1104. }
  1105. }.bind(this),
  1106. }).always(
  1107. function () {
  1108. this.setState({
  1109. loading: false,
  1110. });
  1111. }.bind(this)
  1112. );
  1113. },
  1114. //查看催款节点
  1115. jiedianNew(orderNos) {
  1116. $.ajax({
  1117. method: "get",
  1118. dataType: "json",
  1119. crossDomain: false,
  1120. url:
  1121. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1122. data: {
  1123. orderNo: orderNos,
  1124. },
  1125. success: function (data) {
  1126. if (data.error && data.error.length) {
  1127. message.warning(data.error[0].message);
  1128. } else {
  1129. let theArr = [];
  1130. let thisData = [];
  1131. let arr = data.data || [];
  1132. let totalCui = 0;
  1133. for (let i = 0; i < arr.length; i++) {
  1134. thisData = arr[i];
  1135. totalCui += +thisData.money;
  1136. theArr.push({
  1137. key: i,
  1138. dunSubject: thisData.dunSubject
  1139. ? thisData.dunSubject.toString()
  1140. : "", //催款科目
  1141. id: thisData.id, //节点Id
  1142. money: thisData.money, //催款金额
  1143. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1144. commodityName: thisData.commodityName,
  1145. projectType: thisData.projectType,
  1146. dunTypeName: thisData.dunTypeName,
  1147. status: thisData.status,
  1148. waitDay: thisData.waitDay,
  1149. effectiveCount: thisData.effectiveCount,
  1150. startDate: thisData.startDate,
  1151. dunType: thisData.dunType,
  1152. appropriationRatio: thisData.appropriationRatio,
  1153. customizeName: thisData.customizeName,
  1154. customizeTimes: thisData.customizeTimes,
  1155. tid: thisData.tid,
  1156. });
  1157. }
  1158. if (!totalCui) {
  1159. totalCui = 0;
  1160. }
  1161. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1162. this.setState({
  1163. contactListNew: theArr,
  1164. totalCui: parseFloat(totalCui),
  1165. });
  1166. }
  1167. }.bind(this),
  1168. }).always(
  1169. function () {
  1170. this.setState({
  1171. loading: false,
  1172. });
  1173. }.bind(this)
  1174. );
  1175. },
  1176. //催款节点保存
  1177. contactSave() {
  1178. for (let i = 0; i < this.state.contactList.length; i++) {
  1179. if (moneyVerify(this.state.contactList[i].money)) {
  1180. return;
  1181. }
  1182. }
  1183. this.setState({
  1184. loading: true,
  1185. });
  1186. $.ajax({
  1187. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1188. method: "post",
  1189. data: {
  1190. orderNo: this.state.orderNo,
  1191. orderDun: JSON.stringify(this.state.contactList),
  1192. },
  1193. }).done(
  1194. function (data) {
  1195. this.setState({
  1196. loading: false,
  1197. });
  1198. if (!data.error.length) {
  1199. message.success("保存成功!");
  1200. this.jiedian(this.state.orderNo);
  1201. } else {
  1202. message.warning(data.error[0].message);
  1203. }
  1204. }.bind(this)
  1205. );
  1206. },
  1207. //催款节点保存
  1208. contactSaveNew(record) {
  1209. if (record.dunType == 0) {
  1210. if (!record.customizeTimes) {
  1211. message.warning("请输入自定义时间");
  1212. return;
  1213. } else if (!record.customizeName) {
  1214. message.warning("请输入自定义科目");
  1215. return;
  1216. }
  1217. }
  1218. if (record.boStatus == "false") {
  1219. record.boStatus = false;
  1220. } else if (record.boStatus == "true") {
  1221. record.boStatus = true;
  1222. }
  1223. if (!this.state.yearFlag) {
  1224. if (!record.effectiveCount && !record.dunTypeCustom) {
  1225. message.warning("请选择服务年限");
  1226. return;
  1227. }
  1228. } else {
  1229. record.effectiveCount = "";
  1230. }
  1231. if (record.money == "") {
  1232. message.warning("请填写金额");
  1233. return;
  1234. }
  1235. if (record.boStatus) {
  1236. if (
  1237. typeof +record.money == "number" &&
  1238. +record.money >= 0 &&
  1239. +record.money <= 1
  1240. ) {
  1241. record.appropriationRatio = record.money;
  1242. } else {
  1243. message.warning("金额比例填写错误,比例范围0~1");
  1244. return;
  1245. }
  1246. }
  1247. if (!record.dunType && record.dunType != 0) {
  1248. message.warning("请选择对应科目");
  1249. return;
  1250. }
  1251. if (record.dunType != 1) {
  1252. record.waitDay = "";
  1253. }
  1254. this.setState({
  1255. loading: true,
  1256. });
  1257. if (record.boStatus) {
  1258. $.ajax({
  1259. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1260. method: "post",
  1261. data: {
  1262. orderNo: record.orderNo,
  1263. tid: record.tid,
  1264. projectType: record.sort,
  1265. dunType: record.dunType,
  1266. appropriationRatio: record.appropriationRatio,
  1267. waitDay: record.waitDay,
  1268. effectiveCount: record.effectiveCount,
  1269. customizeTimes:
  1270. record.dunType == 0 ? record.customizeTimes : undefined,
  1271. customizeName:
  1272. record.dunType == 0 ? record.customizeName : undefined,
  1273. },
  1274. }).done(
  1275. function (data) {
  1276. this.setState({
  1277. loading: false,
  1278. });
  1279. if (!data.error.length) {
  1280. message.success("保存成功!");
  1281. this.setState({
  1282. cuiFlag: false,
  1283. boFlag: false,
  1284. });
  1285. this.jiedianNew(record.orderNo);
  1286. } else {
  1287. message.warning(data.error[0].message);
  1288. }
  1289. }.bind(this)
  1290. );
  1291. } else {
  1292. $.ajax({
  1293. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1294. method: "post",
  1295. data: {
  1296. orderNo: record.orderNo,
  1297. tid: record.tid,
  1298. projectType: record.sort,
  1299. dunType: record.dunType,
  1300. money: record.money,
  1301. waitDay: record.waitDay,
  1302. effectiveCount: record.effectiveCount,
  1303. customizeTimes:
  1304. record.dunType == 0 ? record.customizeTimes : undefined,
  1305. customizeName:
  1306. record.dunType == 0 ? record.customizeName : undefined,
  1307. },
  1308. }).done(
  1309. function (data) {
  1310. this.setState({
  1311. loading: false,
  1312. });
  1313. if (!data.error.length) {
  1314. message.success("保存成功!");
  1315. this.setState({
  1316. cuiFlag: false,
  1317. boFlag: false,
  1318. });
  1319. this.jiedianNew(record.orderNo);
  1320. } else {
  1321. message.warning(data.error[0].message);
  1322. }
  1323. }.bind(this)
  1324. );
  1325. }
  1326. },
  1327. //点击新增催款节点
  1328. addcontact() {
  1329. this.state.contactList.push({
  1330. key: this.state.contactList.length,
  1331. money: "",
  1332. dunSubject: undefined,
  1333. orderNo: this.state.orderNo,
  1334. dunTarget: this.state.kehuId,
  1335. });
  1336. this.setState({
  1337. contactList: this.state.contactList,
  1338. });
  1339. },
  1340. //点击新增催款节点
  1341. addcontactNew() {
  1342. this.state.contactListNew.push({
  1343. key: this.state.contactListNew.length,
  1344. money: "",
  1345. dunSubject: undefined,
  1346. orderNo: this.state.orderNo,
  1347. dunTarget: this.state.kehuId,
  1348. });
  1349. this.setState({
  1350. contactListNew: this.state.contactListNew,
  1351. cuiFlag: true,
  1352. });
  1353. },
  1354. //删除收款节点
  1355. confirmDelet(index) {
  1356. this.state.contactList.splice(index, 1);
  1357. this.setState({
  1358. contactList: this.state.contactList,
  1359. });
  1360. this.contactSave();
  1361. },
  1362. //删除收款节点
  1363. confirmDeletNew(index) {
  1364. if (index.id) {
  1365. this.state.contactListNew.splice(index.key, 1);
  1366. this.setState({
  1367. contactListNew: this.state.contactListNew,
  1368. cuiFlag: false,
  1369. addFlag: false,
  1370. boFlag: false,
  1371. });
  1372. $.ajax({
  1373. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1374. method: "post",
  1375. data: {
  1376. id: index.id,
  1377. },
  1378. }).done(
  1379. function (data) {
  1380. this.setState({
  1381. loading: false,
  1382. });
  1383. if (!data.error.length) {
  1384. message.success("删除成功!");
  1385. this.setState({
  1386. cuiFlag: false,
  1387. });
  1388. this.jiedianNew(this.state.orderNo);
  1389. } else {
  1390. message.warning(data.error[0].message);
  1391. }
  1392. }.bind(this)
  1393. );
  1394. } else {
  1395. this.state.contactListNew.splice(index.key, 1);
  1396. this.setState({
  1397. contactListNew: this.state.contactListNew,
  1398. cuiFlag: false,
  1399. addFlag: false,
  1400. boFlag: false,
  1401. });
  1402. }
  1403. },
  1404. //重新提交
  1405. examOk() {
  1406. let theorgCodeUrl = [];
  1407. if (this.state.orgCodeUrl.length) {
  1408. let picArr = [];
  1409. this.state.orgCodeUrl.map(function (item) {
  1410. if (
  1411. item.response &&
  1412. item.response.data &&
  1413. item.response.data.length
  1414. ) {
  1415. picArr.push(item.response.data);
  1416. }
  1417. });
  1418. theorgCodeUrl = picArr.join(",");
  1419. }
  1420. let theReplenishUrl = [];
  1421. if (this.state.replenishUrl.length) {
  1422. let picArr = [];
  1423. this.state.replenishUrl.map(function (item) {
  1424. if (
  1425. item.response &&
  1426. item.response.data &&
  1427. item.response.data.length
  1428. ) {
  1429. picArr.push(item.response.data);
  1430. }
  1431. });
  1432. theReplenishUrl = picArr.join(",");
  1433. }
  1434. // 服务内容上传图片
  1435. let contentUrl = [];
  1436. if (this.state.contentUrl.length) {
  1437. let picArr = [];
  1438. this.state.contentUrl.map(function (item) {
  1439. if (
  1440. item.response &&
  1441. item.response.data &&
  1442. item.response.data.length
  1443. ) {
  1444. picArr.push(item.response.data);
  1445. }
  1446. });
  1447. contentUrl = picArr.join(",");
  1448. } else {
  1449. message.warning("请上传服务内容图片")
  1450. return
  1451. }
  1452. if (moneyVerify(this.state.totalAmount)) {
  1453. return;
  1454. }
  1455. if (moneyVerify(this.state.firstAmount)) {
  1456. return;
  1457. }
  1458. if (!this.state.totalAmount) {
  1459. message.warning("签单金额不能为空");
  1460. this.refs.signFirstPayment.focus();
  1461. return false;
  1462. }
  1463. if (!this.state.firstAmount) {
  1464. message.warning("首付金额不能为空");
  1465. this.refs.signFirstPayment.focus();
  1466. return false;
  1467. }
  1468. if (!theorgCodeUrl) {
  1469. message.warning("企业负责人不能为空");
  1470. this.refs.signFirstPayment.focus();
  1471. return false;
  1472. }
  1473. if (
  1474. this.state.approval == "特批通过" ||
  1475. this.state.approval == "特批驳回"
  1476. ) {
  1477. message.warning("特批状态不正确,请重新填写");
  1478. return false;
  1479. }
  1480. const arr = this.state.contactListNew || [];
  1481. for (let i = 0; i < arr.length; i++) {
  1482. if (
  1483. arr[i].dunType == 1 &&
  1484. arr[i].waitDay != null &&
  1485. this.state.approval == 0
  1486. ) {
  1487. message.warning(
  1488. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1489. );
  1490. return false;
  1491. } else if (
  1492. arr[i].dunType == 1 &&
  1493. arr[i].waitDay == null &&
  1494. this.state.approval == 1
  1495. ) {
  1496. message.warning(
  1497. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1498. );
  1499. return false;
  1500. }
  1501. if (!this.state.contactListNew[i].id) {
  1502. message.warning("请保存催款节点");
  1503. return false;
  1504. }
  1505. }
  1506. if (this.state.updatas.salesType == null) {
  1507. message.warning("请选择销售类型!");
  1508. return
  1509. }
  1510. this.setState({
  1511. flag: true,
  1512. });
  1513. $.ajax({
  1514. method: "post",
  1515. dataType: "json",
  1516. crossDomain: false,
  1517. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1518. data: {
  1519. orderNo: this.state.orderNo, //订单编号
  1520. totalAmount: this.state.totalAmount, //总金额
  1521. firstAmount: this.state.firstAmount, //首付
  1522. isSubmit: 1, //保存草稿还是提交
  1523. signDate: this.state.signDate, //签单日期
  1524. contacts: this.state.contacts, //企业负责人
  1525. contactMobile: this.state.contactMobile, //负责人联系方式
  1526. legalPerson: this.state.legalPerson, //企业法人
  1527. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1528. approval: this.state.approval, //特批状态
  1529. contractNo: this.state.contractNo, //合同编号
  1530. orderRemarks: this.state.orderRemarks, //订单备注
  1531. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1532. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1533. serviceContent: contentUrl.length ? contentUrl : "",
  1534. orderDep: this.state.organizationSearch,
  1535. },
  1536. success: function (data) {
  1537. if (data.error.length || data.data.list == "") {
  1538. if (data.error && data.error.length) {
  1539. message.warning(data.error[0].message);
  1540. this.setState({
  1541. flag: false,
  1542. });
  1543. }
  1544. } else {
  1545. message.success("该订单已重新提交~");
  1546. this.setState({
  1547. visible: false,
  1548. flag: false,
  1549. });
  1550. this.loadData(this.state.pageNo);
  1551. }
  1552. }.bind(this),
  1553. }).always(
  1554. function () {
  1555. this.setState({
  1556. loading: false,
  1557. });
  1558. }.bind(this)
  1559. );
  1560. },
  1561. //订单作废
  1562. examOks() {
  1563. this.setState({
  1564. flag: true,
  1565. });
  1566. $.ajax({
  1567. method: "post",
  1568. dataType: "json",
  1569. crossDomain: false,
  1570. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1571. data: {
  1572. orderNo: this.state.orderNo, //订单编号
  1573. },
  1574. success: function (data) {
  1575. if (data.error.length || data.data.list == "") {
  1576. if (data.error && data.error.length) {
  1577. message.warning(data.error[0].message);
  1578. }
  1579. } else {
  1580. message.success("该订单已作废~");
  1581. this.setState({
  1582. visible: false,
  1583. flag: false,
  1584. });
  1585. this.loadData(this.state.pageNo);
  1586. }
  1587. }.bind(this),
  1588. }).always(
  1589. function () {
  1590. this.setState({
  1591. loading: false,
  1592. flag: false,
  1593. });
  1594. }.bind(this)
  1595. );
  1596. },
  1597. departmentList() {
  1598. this.setState({
  1599. loading: true,
  1600. });
  1601. $.ajax({
  1602. method: "get",
  1603. dataType: "json",
  1604. crossDomain: false,
  1605. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1606. data: {},
  1607. success: function (data) {
  1608. let thedata = data.data;
  1609. let theArr = [];
  1610. if (!thedata) {
  1611. if (data.error && data.error.length) {
  1612. message.warning(data.error[0].message);
  1613. }
  1614. thedata = {};
  1615. } else {
  1616. thedata.map(function (item, index) {
  1617. theArr.push({
  1618. key: index,
  1619. name: item.name,
  1620. id: item.id,
  1621. depNo: item.depNo,
  1622. });
  1623. });
  1624. }
  1625. this.setState({
  1626. departmentArr: theArr,
  1627. });
  1628. }.bind(this),
  1629. }).always(
  1630. function () {
  1631. this.setState({
  1632. loading: false,
  1633. });
  1634. }.bind(this)
  1635. );
  1636. },
  1637. rizhi() {
  1638. this.setState({
  1639. loading: true,
  1640. });
  1641. $.ajax({
  1642. method: "get",
  1643. dataType: "json",
  1644. crossDomain: false,
  1645. url: "/api/admin/newOrder/selectOrderLog",
  1646. data: {
  1647. orderNo: this.state.orderNo,
  1648. },
  1649. success: function (data) {
  1650. let theArr = [];
  1651. let thisData = data.data;
  1652. if (!thisData.length) {
  1653. if (data.error && data.error.length) {
  1654. message.warning(data.error[0].message);
  1655. }
  1656. thisData = {};
  1657. } else {
  1658. for (let i = 0; i < data.data.length; i++) {
  1659. let thisdata = data.data[i];
  1660. theArr.push({
  1661. processName: thisdata.processName,
  1662. adminName: thisdata.adminName,
  1663. createDate: thisdata.createDate,
  1664. remarks: thisdata.remarks,
  1665. });
  1666. }
  1667. }
  1668. this.setState({
  1669. dataSourcerizhi: theArr,
  1670. });
  1671. }.bind(this),
  1672. }).always(
  1673. function () {
  1674. this.setState({
  1675. loading: false,
  1676. });
  1677. }.bind(this)
  1678. );
  1679. },
  1680. //查看订单日志
  1681. getOrderLog() {
  1682. this.setState({
  1683. rizhivisible: true,
  1684. });
  1685. this.rizhi();
  1686. },
  1687. closeOrderLog() {
  1688. this.setState({
  1689. rizhivisible: false,
  1690. });
  1691. },
  1692. //点击签单
  1693. handleCancels() {
  1694. this.setState({
  1695. isSubmit: 1,
  1696. });
  1697. },
  1698. //点击签单
  1699. handleCancelq() {
  1700. this.setState({
  1701. isSubmit: 0,
  1702. });
  1703. },
  1704. resets() {
  1705. this.state.orderNoSearch = "";
  1706. this.state.customerName = "";
  1707. this.state.releaseDate[0] = undefined;
  1708. this.state.releaseDate[1] = undefined;
  1709. this.loadData();
  1710. },
  1711. //点击添加项目明细
  1712. addDetailed() {
  1713. this.setState({
  1714. projectOperationVisible: true,
  1715. });
  1716. },
  1717. //搜索
  1718. search() {
  1719. this.setState({
  1720. //signBillVisible:false
  1721. });
  1722. this.loadData();
  1723. },
  1724. getOrgCodeUrl(e) {
  1725. this.setState({ orgCodeUrl: e });
  1726. },
  1727. getReplenishUrl(e) {
  1728. this.setState({ replenishUrl: e });
  1729. },
  1730. getContentUrl(e) {
  1731. this.setState({ contentUrl: e });
  1732. },
  1733. //关闭详情
  1734. visitCancel() {
  1735. this.setState({
  1736. visible: false,
  1737. cuiFlag: false,
  1738. addFlag: false,
  1739. boFlag: false,
  1740. });
  1741. this.loadData(this.state.pageNo);
  1742. },
  1743. visitOk() {
  1744. this.setState({
  1745. visible: false,
  1746. });
  1747. this.resets();
  1748. },
  1749. //客户
  1750. selectAutoCUT(value) {
  1751. let autoIds;
  1752. let fwList = this.state.customerArr;
  1753. fwList.map(function (item) {
  1754. if (value == item.name) {
  1755. autoIds = item.id;
  1756. }
  1757. });
  1758. this.setState({
  1759. customerName: value,
  1760. autoId: autoIds,
  1761. });
  1762. },
  1763. getpatentTypeList() {
  1764. $.ajax({
  1765. method: "get",
  1766. dataType: "json",
  1767. crossDomain: false,
  1768. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  1769. success: function (data) {
  1770. if (data.error.length === 0) {
  1771. this.setState({
  1772. patentTypeList: data.data
  1773. })
  1774. } else {
  1775. message.warning(data.error[0].message);
  1776. };
  1777. }.bind(this)
  1778. });
  1779. },
  1780. //加载(自动补全)
  1781. supervisor(e, state) {
  1782. //客户名称与服务名称自动补全
  1783. let api = state
  1784. ? "/api/admin/customer/getCustomerByName"
  1785. : "/api/admin/order/getBusinessProjectByName";
  1786. $.ajax({
  1787. method: "get",
  1788. dataType: "json",
  1789. crossDomain: false,
  1790. url: globalConfig.context + api,
  1791. data: state
  1792. ? {
  1793. name: e,
  1794. type: this.state.customType,
  1795. }
  1796. : {
  1797. businessName: e,
  1798. },
  1799. success: function (data) {
  1800. let thedata = data.data;
  1801. if (!thedata) {
  1802. if (data.error && data.error.length) {
  1803. message.warning(data.error[0].message);
  1804. }
  1805. thedata = {};
  1806. }
  1807. this.setState({
  1808. states: state,
  1809. customerArr: thedata,
  1810. });
  1811. }.bind(this),
  1812. }).always(
  1813. function () {
  1814. this.setState({
  1815. loading: false,
  1816. });
  1817. }.bind(this)
  1818. );
  1819. },
  1820. //上级主管输入框失去焦点是判断客户是否存在
  1821. selectAuto(value) {
  1822. let kid = [];
  1823. let fwList = this.state.customerArr;
  1824. fwList.map(function (item) {
  1825. if (value == item.bname) {
  1826. kid = item;
  1827. }
  1828. });
  1829. if (kid.type == "1") {
  1830. this.setState({
  1831. displayFees: "block",
  1832. });
  1833. } else {
  1834. this.setState({
  1835. displayFees: "none",
  1836. });
  1837. }
  1838. this.setState({
  1839. commodityName: value,
  1840. gid: kid.id,
  1841. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1842. commodityFirstPayment:
  1843. kid.firstPayment == 0
  1844. ? kid.firstPayment.toString()
  1845. : kid.firstPayment,
  1846. });
  1847. },
  1848. //服务值改变时请求客户名称
  1849. httpChange(e) {
  1850. this.state.gid = "";
  1851. if (e.length >= 1) {
  1852. this.supervisor(e, false);
  1853. }
  1854. this.setState({
  1855. commodityName: e,
  1856. });
  1857. },
  1858. changeList(arr) {
  1859. const newArr = [];
  1860. this.state.columns.forEach(item => {
  1861. arr.forEach(val => {
  1862. if (val === item.title) {
  1863. newArr.push(item);
  1864. }
  1865. });
  1866. });
  1867. this.setState({
  1868. changeList: newArr
  1869. });
  1870. },
  1871. render() {
  1872. const formItemLayout = {
  1873. labelCol: { span: 8 },
  1874. wrapperCol: { span: 14 },
  1875. };
  1876. const FormItem = Form.Item;
  1877. const { RangePicker } = DatePicker;
  1878. const rowSelection = {
  1879. selectedRowKeys: this.state.selectedRowKeys,
  1880. onChange: (selectedRowKeys, selectedRows) => {
  1881. this.setState({
  1882. modalVisible: false,
  1883. selectedRows: selectedRows.slice(-1),
  1884. selectedRowKeys: selectedRowKeys.slice(-1),
  1885. });
  1886. },
  1887. onSelect: (recordt) => {
  1888. this.setState({
  1889. modalVisible: false,
  1890. recordt: recordt.id,
  1891. });
  1892. },
  1893. };
  1894. const cuiDataList = this.state.contactList || [];
  1895. const dataSources = this.state.customerArr || [];
  1896. let departmentArr = this.state.departmentArr || [];
  1897. const options = this.state.states
  1898. ? dataSources.map((group) => (
  1899. <Select.Option key={group.id} value={group.name}>
  1900. {group.name}
  1901. </Select.Option>
  1902. ))
  1903. : dataSources.map((group, index) => (
  1904. <Select.Option key={index} value={group.bname}>
  1905. {group.bname}
  1906. </Select.Option>
  1907. ));
  1908. const { TabPane } = Tabs;
  1909. return (
  1910. <div className="user-content">
  1911. {this.state.resVisible ? (
  1912. <ResolutionDetail
  1913. cancel={this.resCancel}
  1914. detail={this.state.resRecord}
  1915. visible={this.state.resVisible}
  1916. id={this.state.resRecord.orderNo}
  1917. />
  1918. ) : (
  1919. ""
  1920. )}
  1921. <ShowModalDiv ShowModal={this.state.showModal} />
  1922. <div className="content-title" style={{ marginBottom: 10 }}>
  1923. <span style={{ fontWeight: 900, fontSize: 16 }}>驳回订单列表</span>
  1924. </div>
  1925. <div className="user-search">
  1926. <Tabs
  1927. defaultActiveKey="1"
  1928. onChange={this.callback}
  1929. className="test"
  1930. >
  1931. <TabPane tab="搜索" key="1">
  1932. <Input
  1933. placeholder="客户名称"
  1934. style={{
  1935. width: "150px",
  1936. marginBottom: "10px",
  1937. marginTop: 10,
  1938. marginLeft: 10,
  1939. marginRight: 10,
  1940. }}
  1941. value={this.state.customerName}
  1942. onChange={(e) => {
  1943. this.setState({ customerName: e.target.value });
  1944. }}
  1945. />
  1946. <Input
  1947. placeholder="订单编号"
  1948. style={{ width: "150px", marginRight: 10 }}
  1949. value={this.state.orderNoSearch}
  1950. onChange={(e) => {
  1951. this.setState({ orderNoSearch: e.target.value });
  1952. }}
  1953. />
  1954. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1955. <RangePicker
  1956. value={[
  1957. this.state.releaseDate[0]
  1958. ? moment(this.state.releaseDate[0])
  1959. : null,
  1960. this.state.releaseDate[1]
  1961. ? moment(this.state.releaseDate[1])
  1962. : null,
  1963. ]}
  1964. onChange={(data, dataString) => {
  1965. this.setState({ releaseDate: dataString });
  1966. }}
  1967. />
  1968. <Button
  1969. type="primary"
  1970. onClick={this.search}
  1971. style={{ marginLeft: "10px", marginRight: 10 }}
  1972. >
  1973. 搜索
  1974. </Button>
  1975. <Button onClick={this.resets}>重置</Button>
  1976. </TabPane>
  1977. <TabPane tab="更改表格显示数据" key="2">
  1978. <div style={{ marginLeft: 10 }}>
  1979. <ChooseList
  1980. columns={this.state.columns}
  1981. changeFn={this.changeList}
  1982. changeList={this.state.changeList}
  1983. top={55}
  1984. margin={11}
  1985. />
  1986. </div>
  1987. </TabPane>
  1988. </Tabs>
  1989. <div className="patent-table">
  1990. <Spin spinning={this.state.loading}>
  1991. <Table
  1992. columns={
  1993. this.state.changeList
  1994. ? this.state.changeList
  1995. : this.state.columns
  1996. }
  1997. dataSource={this.state.dataSource}
  1998. rowSelection={rowSelection}
  1999. pagination={this.state.pagination}
  2000. onRowClick={this.tableRowClick}
  2001. bordered
  2002. size="small"
  2003. />
  2004. </Spin>
  2005. </div>
  2006. {this.state.visible ? <Modal
  2007. maskClosable={false}
  2008. className="customeDetails"
  2009. footer=""
  2010. title="订单详情"
  2011. width="1000px"
  2012. visible={this.state.visible}
  2013. onOk={this.visitOk}
  2014. onCancel={this.visitCancel}
  2015. >
  2016. <Form
  2017. layout="horizontal"
  2018. onSubmit={this.handleSubmit}
  2019. id="demand-form"
  2020. style={{ paddingBottom: "40px" }}
  2021. >
  2022. <Spin spinning={this.state.loading}>
  2023. <div className="clearfix">
  2024. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2025. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2026. </div>
  2027. <FormItem
  2028. className="half-item"
  2029. {...formItemLayout}
  2030. label="订单编号"
  2031. >
  2032. <span>{this.state.orderNo}</span>
  2033. </FormItem>
  2034. <FormItem
  2035. className="half-item"
  2036. {...formItemLayout}
  2037. label="合同编号"
  2038. >
  2039. <span>{this.state.contractNo}</span>
  2040. </FormItem>
  2041. <FormItem
  2042. className="half-item"
  2043. {...formItemLayout}
  2044. label="客户名称"
  2045. >
  2046. <span>{this.state.userName}</span>
  2047. <EnterpriseNameChange
  2048. type='journal'
  2049. style={{ marginLeft: 10 }}
  2050. enterpriseId={this.state.orderUid} />
  2051. </FormItem>
  2052. <FormItem
  2053. className="half-item"
  2054. {...formItemLayout}
  2055. label="销售类型"
  2056. >
  2057. <span>
  2058. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  2059. (salesList[this.state.updatas.salesType] || "")}
  2060. {/* {
  2061. this.state.updatas.other != null && this.state.updatas.other != "" &&
  2062. <Tooltip title={this.state.updatas.other}>
  2063. <span>
  2064. {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")}
  2065. </span>
  2066. </Tooltip>
  2067. } */}
  2068. </span>
  2069. <UpdateSales
  2070. orderNo={this.state.orderNo}
  2071. updatas={this.state.updatas}
  2072. onRefresh={
  2073. e => {
  2074. let ups = this.state.updatas
  2075. ups.salesType = e.salesType
  2076. if (e.salesType == "3") {
  2077. ups.channelId = e.channelId
  2078. ups.other = e.other
  2079. } else if (e.salesType == "4" || e.salesType == "5") {
  2080. ups.other = e.other
  2081. }
  2082. this.setState({
  2083. updatas: ups
  2084. })
  2085. }
  2086. //this.xiangqing.bind(this, this.state.orderNo)
  2087. }
  2088. />
  2089. </FormItem>
  2090. <FormItem
  2091. className="half-item"
  2092. {...formItemLayout}
  2093. label="流程状态"
  2094. >
  2095. <span>{getProcessStatus(this.state.processStatus)}</span>
  2096. </FormItem>
  2097. <FormItem
  2098. className="half-item"
  2099. {...formItemLayout}
  2100. label="结算状态"
  2101. >
  2102. <span>
  2103. {getLiquidationStatus(this.state.liquidationStatus)}
  2104. </span>
  2105. </FormItem>
  2106. <FormItem
  2107. className="half-item"
  2108. {...formItemLayout}
  2109. label="已收款项(万元)"
  2110. >
  2111. <span>{this.state.settlementAmount}</span>
  2112. </FormItem>
  2113. <FormItem
  2114. className="half-item"
  2115. {...formItemLayout}
  2116. label="企业联系人"
  2117. >
  2118. <Input
  2119. placeholder="请输入联系人"
  2120. ref="signTotalAmount"
  2121. value={this.state.contacts}
  2122. onChange={(e) => {
  2123. this.setState({ contacts: e.target.value });
  2124. }}
  2125. style={{ width: "240px" }}
  2126. />
  2127. </FormItem>
  2128. <FormItem
  2129. className="half-item"
  2130. {...formItemLayout}
  2131. label="联系人电话"
  2132. >
  2133. <Input
  2134. placeholder="请输入联系人电话"
  2135. ref="signTotalAmount"
  2136. value={this.state.contactMobile}
  2137. onChange={(e) => {
  2138. this.setState({ contactMobile: e.target.value });
  2139. }}
  2140. style={{ width: "240px" }}
  2141. />
  2142. </FormItem>
  2143. <FormItem
  2144. className="half-item"
  2145. {...formItemLayout}
  2146. label="企业法人"
  2147. >
  2148. <Input
  2149. placeholder="请输入法人"
  2150. ref="signTotalAmount"
  2151. value={this.state.legalPerson}
  2152. onChange={(e) => {
  2153. this.setState({ legalPerson: e.target.value });
  2154. }}
  2155. style={{ width: "240px" }}
  2156. />
  2157. </FormItem>
  2158. <FormItem
  2159. className="half-item"
  2160. {...formItemLayout}
  2161. label="法人电话"
  2162. >
  2163. <Input
  2164. placeholder="请输入法人电话"
  2165. ref="signTotalAmount"
  2166. value={this.state.legalPersonTel}
  2167. onChange={(e) => {
  2168. this.setState({ legalPersonTel: e.target.value });
  2169. }}
  2170. style={{ width: "240px" }}
  2171. />
  2172. </FormItem>
  2173. <FormItem
  2174. className="half-item"
  2175. {...formItemLayout}
  2176. label={
  2177. <span>
  2178. <strong style={{ color: "#f00" }}>*</strong>
  2179. 签单金额(万元)
  2180. </span>
  2181. }
  2182. >
  2183. <Input
  2184. placeholder="签单金额"
  2185. ref="signTotalAmount"
  2186. value={this.state.totalAmount}
  2187. onChange={(e) => {
  2188. this.setState({ totalAmount: e.target.value });
  2189. }}
  2190. style={{ width: "240px" }}
  2191. />
  2192. </FormItem>
  2193. <FormItem
  2194. className="half-item"
  2195. {...formItemLayout}
  2196. label={
  2197. <span>
  2198. <strong style={{ color: "#f00" }}>*</strong>
  2199. 首付金额(万元)
  2200. </span>
  2201. }
  2202. >
  2203. <Input
  2204. placeholder="请输入实签首款金额"
  2205. ref="signFirstPayment"
  2206. value={this.state.firstAmount}
  2207. onChange={(e) => {
  2208. this.setState({ firstAmount: e.target.value });
  2209. }}
  2210. style={{ width: "240px" }}
  2211. />
  2212. </FormItem>
  2213. <FormItem
  2214. className="half-item"
  2215. {...formItemLayout}
  2216. label="特批立项"
  2217. >
  2218. <Select
  2219. placeholder="请选择客户所属类型"
  2220. style={{ width: "240px" }}
  2221. value={this.state.approval}
  2222. onChange={(e) => {
  2223. this.setState({ approval: e });
  2224. }}
  2225. >
  2226. {
  2227. [{ id: 0, name: "非特批" },
  2228. { id: 1, name: "特批" }].map(function (item) {
  2229. return (
  2230. <Select.Option key={item.id} value={item.id}>
  2231. {item.name}
  2232. </Select.Option>
  2233. );
  2234. })
  2235. }
  2236. </Select>
  2237. </FormItem>
  2238. <FormItem
  2239. className="half-item"
  2240. {...formItemLayout}
  2241. label="合同签订时间"
  2242. >
  2243. <DatePicker
  2244. style={{
  2245. marginTop: "2px",
  2246. width: "240px",
  2247. height: "32px",
  2248. }}
  2249. showTime
  2250. format="YYYY-MM-DD"
  2251. onOk={() => { }}
  2252. value={
  2253. this.state.signDate
  2254. ? moment(this.state.signDate)
  2255. : null
  2256. }
  2257. onChange={(data, dataString) => {
  2258. this.setState({ signDate: dataString });
  2259. }}
  2260. />
  2261. </FormItem>
  2262. <FormItem
  2263. className="half-item"
  2264. {...formItemLayout}
  2265. label="订单部门"
  2266. >
  2267. <Select
  2268. placeholder="请输入订单部门"
  2269. style={{ width: 240 }}
  2270. value={this.state.organizationSearch}
  2271. onChange={(e) => {
  2272. this.setState({ organizationSearch: e });
  2273. }}
  2274. >
  2275. {departmentArr.map(function (item) {
  2276. return (
  2277. <Select.Option key={item.id}>
  2278. {item.name}
  2279. </Select.Option>
  2280. );
  2281. })}
  2282. </Select>
  2283. </FormItem>
  2284. <FormItem
  2285. className="half-item"
  2286. {...formItemLayout}
  2287. label="是否外包"
  2288. >
  2289. {this.state.outsource}
  2290. </FormItem>
  2291. <div className="clearfix">
  2292. <FormItem
  2293. labelCol={{ span: 4 }}
  2294. wrapperCol={{ span: 18 }}
  2295. label={
  2296. <span>
  2297. <strong style={{ color: "#f00" }}>*</strong>
  2298. 合同扫描件
  2299. </span>
  2300. }
  2301. >
  2302. <PicturesWall
  2303. domId={'reject1'}
  2304. fileList={this.getOrgCodeUrl}
  2305. pictureUrl={this.state.orgCodeUrl}
  2306. />
  2307. <p>图片建议:要清晰。</p>
  2308. </FormItem>
  2309. <FormItem
  2310. labelCol={{ span: 4 }}
  2311. wrapperCol={{ span: 18 }}
  2312. label={
  2313. <span>
  2314. 补充协议
  2315. </span>
  2316. }
  2317. >
  2318. <PicturesWall
  2319. domId={'reject2'}
  2320. fileList={this.getReplenishUrl}
  2321. pictureUrl={this.state.replenishUrl}
  2322. />
  2323. <p>图片建议:要清晰。</p>
  2324. <Button
  2325. style={{
  2326. float: "right",
  2327. marginRight: "140px",
  2328. marginTop: "20px",
  2329. }}
  2330. onClick={this.getOrderLog}
  2331. >
  2332. 查看订单 日志
  2333. </Button>
  2334. </FormItem>
  2335. </div>
  2336. {/* 服务内容 */}
  2337. {/* <ContentUrl
  2338. processStatus={this.state.processStatus}
  2339. domId={"rejectContent"}
  2340. contentUrl={this.state.contentUrl}
  2341. getContentUrl={this.getContentUrl}
  2342. imgId={"rejectImg1"}
  2343. /> */}
  2344. <div className="clearfix">
  2345. <FormItem
  2346. labelCol={{ span: 4 }}
  2347. wrapperCol={{ span: 18 }}
  2348. label={
  2349. <span>
  2350. <strong style={{ color: "#f00" }}>*</strong>
  2351. 服务内容
  2352. </span>
  2353. }
  2354. >
  2355. <PicturesWall
  2356. domId={'rejectContent'}
  2357. fileList={this.getContentUrl}
  2358. pictureUrl={this.state.contentUrl}
  2359. />
  2360. <p><span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  2361. </FormItem>
  2362. <FormItem
  2363. labelCol={{ span: 4 }}
  2364. wrapperCol={{ span: 16 }}
  2365. label={
  2366. <span>
  2367. <strong style={{ color: "#f00" }}>*</strong>
  2368. 订单留言
  2369. </span>
  2370. }
  2371. >
  2372. <Input
  2373. type="textarea"
  2374. placeholder="请输入订单留言"
  2375. rows={4}
  2376. value={this.state.orderRemarks}
  2377. onChange={(e) => {
  2378. this.setState({ orderRemarks: e.target.value });
  2379. }}
  2380. />
  2381. </FormItem>
  2382. </div>
  2383. <div className="clearfix">
  2384. <FormItem
  2385. className="half-item"
  2386. {...formItemLayout}
  2387. label="订单负责人"
  2388. >
  2389. <span>{this.state.salesmanName}</span>
  2390. </FormItem>
  2391. <FormItem
  2392. className="half-item"
  2393. {...formItemLayout}
  2394. label="订单负责人电话"
  2395. >
  2396. <span>{this.state.salesmanMobile}</span>
  2397. </FormItem>
  2398. </div>
  2399. <div className="clearfix">
  2400. <FormItem
  2401. className="half-item"
  2402. {...formItemLayout}
  2403. label="当前财务负责人"
  2404. >
  2405. <span>{this.state.nowFinance}</span>
  2406. </FormItem>
  2407. <FormItem
  2408. className="half-item"
  2409. {...formItemLayout}
  2410. label="当前财务负责人电话"
  2411. >
  2412. <span>{this.state.nowFinanceMobile}</span>
  2413. </FormItem>
  2414. </div>
  2415. <div className="clearfix">
  2416. <FormItem
  2417. className="half-item"
  2418. {...formItemLayout}
  2419. style={{ opacity: ".5" }}
  2420. label="原订单负责人"
  2421. >
  2422. <span>{this.state.oldSalesmanName}</span>
  2423. </FormItem>
  2424. <FormItem
  2425. className="half-item"
  2426. {...formItemLayout}
  2427. style={{ opacity: ".5" }}
  2428. label="原订单负责人电话"
  2429. >
  2430. <span>{this.state.oldSalesmanMobile}</span>
  2431. </FormItem>
  2432. </div>
  2433. <div className="clearfix">
  2434. <FormItem
  2435. className="half-item"
  2436. style={{ opacity: ".5" }}
  2437. {...formItemLayout}
  2438. label="实际财务操作人"
  2439. >
  2440. <span>{this.state.financeName}</span>
  2441. </FormItem>
  2442. <FormItem
  2443. className="half-item"
  2444. {...formItemLayout}
  2445. style={{ opacity: ".5" }}
  2446. label="实际财务操作人电话"
  2447. >
  2448. <span>{this.state.financeMobile}</span>
  2449. </FormItem>
  2450. </div>
  2451. <div className="clearfix">
  2452. <FormItem
  2453. className="half-item"
  2454. {...formItemLayout}
  2455. label="驳回人"
  2456. >
  2457. <span>{this.state.initiateName}</span>
  2458. </FormItem>
  2459. <FormItem
  2460. className="half-item"
  2461. {...formItemLayout}
  2462. label="驳回时间"
  2463. >
  2464. <span>{this.state.backDate}</span>
  2465. </FormItem>
  2466. </div>
  2467. <div className="clearfix">
  2468. <FormItem
  2469. labelCol={{ span: 4 }}
  2470. wrapperCol={{ span: 16 }}
  2471. label="驳回原因"
  2472. >
  2473. <span>{this.state.reason}</span>
  2474. </FormItem>
  2475. </div>
  2476. {/* 协单人员 */}
  2477. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2478. <div>
  2479. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2480. 项目业务
  2481. </span>
  2482. <Button
  2483. type="primary"
  2484. onClick={this.addDetailed}
  2485. style={{
  2486. float: "right",
  2487. marginRight: "50px",
  2488. marginBottom: "15px",
  2489. }}
  2490. >
  2491. 添加项目明细
  2492. </Button>
  2493. </div>
  2494. <div className="patent-table">
  2495. <Spin spinning={this.state.loading}>
  2496. <Table
  2497. columns={this.state.columnsX}
  2498. dataSource={this.state.dataSourceX}
  2499. pagination={this.state.paginations}
  2500. onRowClick={this.tableRowClickX}
  2501. bordered
  2502. size="small"
  2503. />
  2504. </Spin>
  2505. </div>
  2506. <div
  2507. style={{ display: cuiDataList.length ? "block" : "none" }}
  2508. >
  2509. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2510. 旧催款节点
  2511. </span>
  2512. <Button
  2513. type="primary"
  2514. // onClick={this.addcontact}
  2515. disabled
  2516. onClick={(e) => {
  2517. cuiDataList.length
  2518. ? this.addcontact()
  2519. : this.addcontactNew();
  2520. }}
  2521. style={{
  2522. float: "right",
  2523. marginRight: "50px",
  2524. marginBottom: "15px",
  2525. }}
  2526. >
  2527. 添加催款节点
  2528. </Button>
  2529. </div>
  2530. <div
  2531. className="clearfix"
  2532. style={{ display: cuiDataList.length ? "block" : "none" }}
  2533. >
  2534. <Spin spinning={this.state.loading}>
  2535. <Form layout="horizontal" id="demand-form">
  2536. <Table
  2537. pagination={false}
  2538. columns={this.state.ContactsLists}
  2539. dataSource={this.state.contactList}
  2540. bordered
  2541. size="small"
  2542. scroll={{ x: "max-content", y: 0 }}
  2543. />
  2544. <Col
  2545. span={24}
  2546. offset={9}
  2547. style={{ marginTop: "15px" }}
  2548. ></Col>
  2549. </Form>
  2550. </Spin>
  2551. </div>
  2552. <div>
  2553. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2554. 新催款节点
  2555. </span>
  2556. <span
  2557. style={{
  2558. display: cuiDataList.length ? "none" : "inline-block",
  2559. marginLeft: 10,
  2560. color: "red",
  2561. }}
  2562. >
  2563. 金额总计(万元): {this.state.totalCui}
  2564. </span>
  2565. <Button
  2566. type="primary"
  2567. disabled={
  2568. cuiDataList.length || this.state.addFlag
  2569. ? true
  2570. : false
  2571. }
  2572. // onClick={this.addcontact}
  2573. onClick={(e) => {
  2574. this.setState({ addFlag: true });
  2575. this.addcontactNew();
  2576. }}
  2577. style={{
  2578. float: "right",
  2579. marginRight: "50px",
  2580. marginBottom: "15px",
  2581. }}
  2582. >
  2583. 添加催款节点
  2584. </Button>
  2585. </div>
  2586. <div className="clearfix">
  2587. <Spin spinning={this.state.loading}>
  2588. <Form layout="horizontal" id="demand-form">
  2589. <Table
  2590. pagination={false}
  2591. columns={this.state.ContactsListsNew}
  2592. dataSource={this.state.contactListNew}
  2593. scroll={{ x: "max-content", y: 0 }}
  2594. bordered
  2595. size="small"
  2596. />
  2597. <Col
  2598. span={24}
  2599. offset={9}
  2600. style={{ marginTop: "15px" }}
  2601. />
  2602. </Form>
  2603. </Spin>
  2604. </div>
  2605. <div className="addSave" style={{ marginTop: "15px" }}>
  2606. <Button
  2607. className="cancel"
  2608. type="primary"
  2609. onClick={this.examOk}
  2610. style={{ marginLeft: "200px" }}
  2611. htmlType="submit"
  2612. loading={this.state.flag}
  2613. >
  2614. 重新提交
  2615. </Button>
  2616. <Popconfirm
  2617. title="请确认您是否作废此订单??"
  2618. onConfirm={(e) => {
  2619. this.examOks()
  2620. }}
  2621. okText="确认"
  2622. cancelText="取消"
  2623. >
  2624. <Button
  2625. className="cancel"
  2626. type="danger"
  2627. // onClick={this.examOks}
  2628. style={{ marginLeft: "50px" }}
  2629. loading={this.state.flag}
  2630. >
  2631. 订单作废
  2632. </Button>
  2633. </Popconfirm>
  2634. <Button
  2635. className="cancel"
  2636. type="ghost"
  2637. onClick={this.visitCancel}
  2638. style={{ marginLeft: "50px" }}
  2639. >
  2640. 取消
  2641. </Button>
  2642. </div>
  2643. </div>
  2644. </Spin>
  2645. </Form>
  2646. </Modal> : <div />}
  2647. {/* <Modal
  2648. visible={this.state.rizhivisible}
  2649. className="admin-desc-content"
  2650. width="800px"
  2651. maskClosable={false}
  2652. title="订单日志"
  2653. footer={null}
  2654. onCancel={this.closeOrderLog}
  2655. >
  2656. <div className="patent-table">
  2657. <Spin spinning={this.state.loading}>
  2658. <Table
  2659. columns={this.state.columnsrizhi}
  2660. dataSource={this.state.dataSourcerizhi}
  2661. pagination={false}
  2662. />
  2663. </Spin>
  2664. </div>
  2665. </Modal> */}
  2666. <OrderRiZi
  2667. dataSourcerizhi={this.state.dataSourcerizhi}
  2668. closeOrderLog={this.closeOrderLog}
  2669. visible={this.state.rizhivisible}
  2670. loading={this.state.loading}
  2671. />
  2672. </div>
  2673. {this.state.projectOperationVisible ? <ProjectOperation
  2674. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  2675. orderNo={this.state.orderNo}
  2676. visible={this.state.projectOperationVisible}
  2677. dataInfor={this.state.dataInfor}
  2678. onCancel={this.nextCancel}
  2679. /> : null}
  2680. </div>
  2681. );
  2682. },
  2683. })
  2684. );
  2685. export default IntentionCustomer;