reject.jsx 89 KB

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