reject.jsx 85 KB

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