reject.jsx 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816
  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. } from "@/tools.js";
  13. import './customer.less';
  14. //图片组件
  15. const PicturesWall = React.createClass({
  16. getInitialState() {
  17. return {
  18. previewVisible: false,
  19. previewImage: '',
  20. fileList: [],
  21. }
  22. },
  23. handleCancel() {
  24. this.setState({
  25. previewVisible: false
  26. })
  27. },
  28. handlePreview(file) {
  29. this.setState({
  30. previewImage: file.url || file.thumbUrl,
  31. previewVisible: true,
  32. });
  33. },
  34. handleChange(info) {
  35. let fileList = info.fileList;
  36. this.setState({
  37. fileList
  38. });
  39. this.props.fileList(fileList);
  40. },
  41. componentWillReceiveProps(nextProps) {
  42. this.state.fileList = nextProps.pictureUrl;
  43. this.state.pojectApplicationUrl = undefined;
  44. },
  45. render() {
  46. const {
  47. previewVisible,
  48. previewImage,
  49. fileList
  50. } = this.state;
  51. const uploadButton = (
  52. <div>
  53. <Icon type="plus" />
  54. <div className="ant-upload-text">点击上传</div>
  55. </div>
  56. );
  57. return(
  58. <div style={{display:"inline-block"}}>
  59. <Upload
  60. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  61. data={{ 'sign': '' }}
  62. listType="picture-card"
  63. fileList={fileList}
  64. onPreview={this.handlePreview}
  65. onChange={this.handleChange} >
  66. {fileList.length >= 18 ? null : uploadButton}
  67. </Upload>
  68. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  69. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  70. </Modal>
  71. </div>
  72. );
  73. }
  74. });
  75. const IntentionCustomer = Form.create()(React.createClass({
  76. loadData(pageNo) {
  77. this.setState({
  78. visitModul:false,
  79. loading: true,
  80. ispage:pageNo,
  81. modalVisible:false
  82. });
  83. $.ajax({
  84. method: "get",
  85. dataType: "json",
  86. crossDomain: false,
  87. url: globalConfig.context +"/api/admin/newOrder/orderNewList",
  88. data: {
  89. pageNo: pageNo || 1,
  90. pageSize: this.state.pagination.pageSize,
  91. specially: 2,//审核列表
  92. name: this.state.customerName,//名称
  93. orderNo: this.state.orderNoSearch,//订单编号
  94. starTime: this.state.releaseDate[0],//开始时间
  95. endTime: this.state.releaseDate[1],//结束时间
  96. },
  97. success: function(data) {
  98. let theArr = [];
  99. if(data.error.length || data.data.list == "") {
  100. if(data.error && data.error.length) {
  101. message.warning(data.error[0].message);
  102. };
  103. } else {
  104. for(let i = 0; i < data.data.list.length; i++) {
  105. let thisdata = data.data.list[i];
  106. theArr.push({
  107. key: i,
  108. id: thisdata.id,//用户ID
  109. orderNo: thisdata.orderNo,//订单编号
  110. totalAmount:thisdata.totalAmount,//签单金额
  111. processStatus:thisdata.processStatus,//流程状态
  112. liquidationStatus:thisdata.liquidationStatus,//结算状态
  113. approval:thisdata.approval,//特批状态
  114. signDate:thisdata.signDate,//签单时间
  115. userName:thisdata.userName,//客户名称
  116. salesmanName:thisdata.salesmanName,//营销员名称
  117. financeName:thisdata.financeName,//财务名称
  118. createDate:thisdata.createDate,//下单时间
  119. initiateName:thisdata.initiateName,//驳回人
  120. reason:thisdata.reason,//驳回信息
  121. backDate:thisdata.backDate,//驳回日期
  122. backId:thisdata.backId,//驳回编号
  123. });
  124. };
  125. this.state.pagination.total = data.data.totalCount;
  126. this.state.pagination.current = data.data.pageNo;
  127. };
  128. if(data.data&&data.data.list&&!data.data.list.length){
  129. this.state.pagination.total=0
  130. }
  131. this.setState({
  132. dataSource: theArr,
  133. pageNo: pageNo,
  134. pagination: this.state.pagination,
  135. selectedRowKeys:[]
  136. });
  137. }.bind(this),
  138. }).always(function() {
  139. this.setState({
  140. loading: false
  141. });
  142. }.bind(this));
  143. },
  144. getInitialState() {
  145. return {
  146. page:1,
  147. releaseDate: [],
  148. selectedRowKeys: [],
  149. orgCodeUrl:[],
  150. customerArr:[],
  151. pagination: {
  152. defaultCurrent: 1,
  153. defaultPageSize: 10,
  154. showQuickJumper: true,
  155. pageSize: 10,
  156. onChange: function(page) {
  157. this.loadData(page);
  158. }.bind(this),
  159. showTotal: function(total) {
  160. return '共' + total + '条数据';
  161. }
  162. },
  163. columns: [
  164. {
  165. title: '驳回编号',
  166. dataIndex: 'backId',
  167. key: 'backId'
  168. },{
  169. title: '驳回日期',
  170. dataIndex: 'backDate',
  171. key: 'backDate'
  172. },{
  173. title: '下单时间',
  174. dataIndex: 'createDate',
  175. key: 'createDate'
  176. },{
  177. title: '订单编号',
  178. dataIndex: 'orderNo',
  179. key: 'orderNo'
  180. }, {
  181. title: '客户名称',
  182. dataIndex: 'userName',
  183. key: 'userName',
  184. render:(text)=>{
  185. return (text&&text.length>9?text.substr(0,9)+'...':text)
  186. }
  187. }, {
  188. title: '驳回人',
  189. dataIndex: 'initiateName',
  190. key: 'initiateName'
  191. },{
  192. title: '驳回原因',
  193. dataIndex: 'reason',
  194. key: 'reason',
  195. render:(text)=>{
  196. return (text&&text.length>24?text.substr(0,24)+'...':text)
  197. }
  198. }
  199. ],
  200. columnsrizhi:[
  201. {
  202. title:'流程',
  203. dataIndex: 'processName',
  204. key: 'processName'
  205. },
  206. {
  207. title:'操作人',
  208. dataIndex: 'adminName',
  209. key: 'adminName'
  210. },{
  211. title:'时间',
  212. dataIndex: 'createDate',
  213. key: 'createDate'
  214. }
  215. ],
  216. data: [],
  217. dataSource: [],
  218. columnsX: [
  219. {
  220. title: '业务项目名称',
  221. dataIndex: 'commodityName',
  222. key: 'commodityName'
  223. }, {
  224. title: '项目类别',
  225. dataIndex: 'cname',
  226. key: 'cname',
  227. },{
  228. title: '项目数量',
  229. dataIndex: 'commodityQuantity',
  230. key: 'commodityQuantity'
  231. }, {
  232. title: '金额(万元)',
  233. dataIndex: 'commodityPrice',
  234. key: 'commodityPrice'
  235. }, {
  236. title: '负责人',
  237. dataIndex: 'contacts',
  238. key: 'contacts'
  239. }, {
  240. title: '负责人电话',
  241. dataIndex: 'contactsMobile',
  242. key: 'contactsMobile'
  243. }, {
  244. title: '主要项目',
  245. dataIndex: 'main',
  246. key: 'main',
  247. render:(text)=>{
  248. return (text?'是':'否')
  249. }
  250. }, {
  251. title: '项目说明',
  252. dataIndex: 'taskComment',
  253. key: 'taskComment',
  254. render:(text)=>{
  255. return (text&&text.length>8?text.substr(0,8)+'…':text)
  256. }
  257. }, {
  258. title: '操作',
  259. dataIndex: 'ABC',
  260. key: 'ABC',
  261. render: (text, record) => {
  262. return <div>
  263. {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={()=>{this.delectRow(record)}} okText="是" cancelText="否">
  264. <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  265. </Popconfirm>:""}
  266. </div>
  267. }
  268. }
  269. ],
  270. dataSourceX: [],
  271. ContactsLists: [{
  272. title: '催款科目',
  273. dataIndex: 'dunSubject',
  274. key: 'dunSubject',
  275. render: (text, record) => {
  276. return <Select placeholder="请选择催款科目" value={record.dunSubject} style={{width:'150px'}}
  277. onChange={(e) => { record.dunSubject = e; this.setState({ contactList: this.state.contactList }); }}>
  278. {
  279. jiedian.map(function (item) {
  280. return <Select.Option key={item.value} >{item.key}</Select.Option>
  281. })
  282. }
  283. </Select>
  284. }
  285. },{
  286. title: '金额(万)',
  287. dataIndex: 'money',
  288. key: 'money',
  289. render: (text, record) => {
  290. return <Input value={record.money} placeholder="请输入金额(必填项)" key={record.id} required="required"
  291. onChange={(e) => { record.money = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  292. }
  293. }, {
  294. title: '催款状态',
  295. dataIndex: 'dunStatus',
  296. key: 'dunStatus',
  297. render:text=>{return getCuikuan(text)}
  298. },
  299. {
  300. title: '操作',
  301. dataIndex: 'dels',
  302. key: 'dels',
  303. render: (text, record) => {
  304. return <div>
  305. {<Popconfirm title="是否删除?" onConfirm={()=>{this.confirmDelet(record.key)}} okText="删除" cancelText="不删除">
  306. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  307. </Popconfirm>}
  308. {record.id?'': <Button type="primary" onClick={this.contactSave}>保存</Button>}
  309. </div>
  310. }
  311. }
  312. ],
  313. };
  314. },
  315. //删除
  316. delectRow(record) {
  317. this.setState({
  318. loading: true
  319. });
  320. $.ajax({
  321. method: "post",
  322. dataType: "json",
  323. crossDomain: false,
  324. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  325. data: {
  326. id:record.id
  327. }
  328. }).done(function (data) {
  329. if (!data.error.length) {
  330. message.success('删除成功!');
  331. this.setState({
  332. loading: false,
  333. });
  334. this.xiangmu(this.state.orderNo)
  335. this.loadData();
  336. } else {
  337. message.warning(data.error[0].message);
  338. };
  339. }.bind(this));
  340. },
  341. //页面加载函数
  342. componentWillMount() {
  343. this.loadData();
  344. },
  345. //整行点击
  346. tableRowClick(record) {
  347. this.setState({
  348. visible:true,
  349. });
  350. this.xiangqing(record.orderNo);
  351. this.xiangmu(record.orderNo);
  352. this.jiedian(record.orderNo);
  353. this.departmentList();
  354. },
  355. //点击打卡项目详情
  356. tableRowClickX(record) {
  357. this.setState({
  358. jid:record.id,//项目ID
  359. kid:record.commodityId,//商品ID
  360. commodityName:record.commodityName,//金额
  361. commodityPrice:record.commodityPrice,//金额
  362. commodityQuantity:record.commodityQuantity,//数量
  363. taskComment:record.taskComment,//备注
  364. main:record.main.toString(),//是否为主要
  365. addnextVisible:true,
  366. addState:0,
  367. });
  368. },
  369. //项目详情关闭
  370. nextCancel() {
  371. this.setState({
  372. addnextVisible: false
  373. })
  374. },
  375. //订单详情
  376. xiangqing(orderNos) {
  377. $.ajax({
  378. method: "get",
  379. dataType: "json",
  380. crossDomain: false,
  381. url: globalConfig.context +"/api/admin/newOrder/getOrderNewDetail",
  382. data: {
  383. orderNo:orderNos
  384. },
  385. success: function(data) {
  386. if(data.error.length || data.data.list == "") {
  387. if(data.error && data.error.length) {
  388. message.warning(data.error[0].message);
  389. };
  390. } else {
  391. let thisdata=data.data;
  392. this.setState({
  393. id: thisdata.id,
  394. kehuId: thisdata.buyerId,
  395. orderNo: thisdata.orderNo, //订单编号
  396. contractNo: thisdata.contractNo, //合同编号
  397. userName: thisdata.userName, //客户名称
  398. signDate: thisdata.signDate, //签单时间
  399. processStatus: thisdata.processStatus, //流程状态
  400. liquidationStatus: thisdata.liquidationStatus, //结算状态
  401. contacts: thisdata.contacts, //企业联系人
  402. contactMobile: thisdata.contactMobile, //联系人电话
  403. legalPerson: thisdata.legalPerson, //法人
  404. legalPersonTel: thisdata.legalPersonTel, //法人电话
  405. firstAmount: thisdata.firstAmount, //签单金额
  406. totalAmount: thisdata.totalAmount, //首付金额
  407. settlementAmount: thisdata.settlementAmount, //已收款项
  408. orderRemarks: thisdata.orderRemarks, //订单留言
  409. orgCodeUrl: thisdata.contractPictureUrl
  410. ? splitUrl(
  411. thisdata.contractPictureUrl,
  412. ",",
  413. globalConfig.avatarHost + "/upload"
  414. )
  415. : [], //图片地址
  416. salesmanName: thisdata.salesmanName, //营销员名称
  417. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  418. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  419. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  420. financeName: thisdata.financeName, //财务名称
  421. financeMobile: thisdata.financeMobile, //财务电话
  422. nowFinance: thisdata.nowFinance, //财务名称
  423. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  424. initiateName: thisdata.initiateName, //驳回人
  425. backDate: thisdata.backDate, //驳回时间
  426. reason: thisdata.reason, //驳回原因
  427. approval: thisdata.approval.toString(), //特批状态
  428. organizationSearch: thisdata.orderDep
  429. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  430. });
  431. };
  432. }.bind(this),
  433. }).always(function() {
  434. this.setState({
  435. loading: false
  436. });
  437. }.bind(this));
  438. },
  439. //项目列表
  440. xiangmu(orderNos) {
  441. $.ajax({
  442. method: "get",
  443. dataType: "json",
  444. crossDomain: false,
  445. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  446. data: {
  447. orderNo:orderNos
  448. },
  449. success: function(data) {
  450. let theArr = [];
  451. if(data.error.length || data.data.list == "") {
  452. if(data.error && data.error.length) {
  453. message.warning(data.error[0].message);
  454. };
  455. } else {
  456. for (let i = 0; i < data.data.length; i++) {
  457. let thisdata = data.data[i];
  458. theArr.push({
  459. key: i,
  460. id:thisdata.id,
  461. orderNo:thisdata.orderNo,//订单编号
  462. commodityId:thisdata.commodityId,//项目ID
  463. commodityName:thisdata.commodityName,//项目名称
  464. cname:thisdata.cname,//项目类别
  465. commodityPrice:thisdata.commodityPrice,//项目价格
  466. commodityQuantity:thisdata.commodityQuantity,//项目数量
  467. main:thisdata.main,//是否为主要任务
  468. taskComment:thisdata.taskComment,//任务说明
  469. contacts:thisdata.contacts,//联系人
  470. contactsMobile:thisdata.contactsMobile,//联系人电话
  471. });
  472. };
  473. };
  474. this.setState({
  475. dataSourceX: theArr,
  476. paginations: false,
  477. });
  478. }.bind(this),
  479. }).always(function() {
  480. this.setState({
  481. loading: false
  482. });
  483. }.bind(this));
  484. },
  485. //节点列表
  486. jiedian(orderNos) {
  487. $.ajax({
  488. method: "get",
  489. dataType: "json",
  490. crossDomain: false,
  491. url: globalConfig.context +"/api/admin/newOrder/selectOrderDun",
  492. data: {
  493. orderNo:orderNos
  494. },
  495. success: function(data) {
  496. let theArr = [];
  497. let thisData=[];
  498. if(data.error.length || data.data.list == "") {
  499. if(data.error && data.error.length) {
  500. message.warning(data.error[0].message);
  501. };
  502. } else {
  503. for(let i = 0; i < data.data.length; i++) {
  504. thisData= data.data[i];
  505. theArr.push({
  506. key:i,
  507. dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
  508. id:thisData.id,//节点Id
  509. money:thisData.money,//催款金额
  510. dunStatus:thisData.dunStatus,//催款状态
  511. orderNo:thisData.orderNo,
  512. })
  513. }
  514. this.setState({
  515. contactList:theArr
  516. })
  517. };
  518. }.bind(this),
  519. }).always(function() {
  520. this.setState({
  521. loading: false
  522. });
  523. }.bind(this));
  524. },
  525. //催款节点保存
  526. contactSave() {
  527. for(let i = 0; i < this.state.contactList.length; i++) {
  528. if(moneyVerify(this.state.contactList[i].money)) {
  529. return
  530. }
  531. }
  532. this.setState({
  533. loading: true
  534. });
  535. $.ajax({
  536. url: globalConfig.context + '/api/admin/newOrder/createOrderDun',
  537. method: 'post',
  538. data: {
  539. orderNo: this.state.orderNo,
  540. orderDun: JSON.stringify(this.state.contactList)
  541. }
  542. }).done(function(data) {
  543. this.setState({
  544. loading: false
  545. });
  546. if(!data.error.length) {
  547. message.success('保存成功!');
  548. this.jiedian(this.state.orderNo);
  549. } else {
  550. message.warning(data.error[0].message);
  551. }
  552. }.bind(this));
  553. },
  554. //点击新增催款节点
  555. addcontact() {
  556. this.state.contactList.push({
  557. key:this.state.contactList.length,
  558. money: '',
  559. dunSubject:undefined,
  560. orderNo: this.state.orderNo,
  561. dunTarget:this.state.kehuId,
  562. });
  563. this.setState({
  564. contactList: this.state.contactList
  565. })
  566. },
  567. //删除收款节点
  568. confirmDelet(index) {
  569. this.state.contactList.splice(index,1);
  570. this.setState({
  571. contactList: this.state.contactList
  572. })
  573. this.contactSave();
  574. },
  575. //重新提交
  576. examOk(){
  577. let theorgCodeUrl = [];
  578. if (this.state.orgCodeUrl.length) {
  579. let picArr = [];
  580. this.state.orgCodeUrl.map(function (item) {
  581. if ( item.response && item.response.data && item.response.data.length ){
  582. picArr.push(item.response.data);
  583. }
  584. });
  585. theorgCodeUrl = picArr.join(",");
  586. };
  587. if (moneyVerify(this.state.totalAmount)) {
  588. return
  589. }
  590. if (moneyVerify(this.state.firstAmount)) {
  591. return;
  592. }
  593. if (!this.state.totalAmount) {
  594. message.warning("签单金额不能为空");
  595. this.refs.signFirstPayment.focus();
  596. return false;
  597. };
  598. if(!this.state.firstAmount){
  599. message.warning('首付金额不能为空');
  600. this.refs.signFirstPayment.focus()
  601. return false;
  602. };
  603. if(!theorgCodeUrl){
  604. message.warning('企业负责人不能为空');
  605. this.refs.signFirstPayment.focus()
  606. return false;
  607. };
  608. $.ajax({
  609. method: "post",
  610. dataType: "json",
  611. crossDomain: false,
  612. url: globalConfig.context +"/api/admin/newOrder/updateServiceOrderNew",
  613. data: {
  614. orderNo: this.state.orderNo,//订单编号
  615. totalAmount: this.state.totalAmount,//总金额
  616. firstAmount: this.state.firstAmount,//首付
  617. isSubmit: 1,//保存草稿还是提交
  618. signDate: this.state.signDate,//签单日期
  619. contacts: this.state.contacts,//企业负责人
  620. contactMobile: this.state.contactMobile,//负责人联系方式
  621. legalPerson: this.state.legalPerson,//企业法人
  622. legalPersonTel: this.state.legalPersonTel,//企业法人联系电话
  623. approval: this.state.approval,//特批状态
  624. contractNo: this.state.contractNo,//合同编号
  625. orderRemarks: this.state.orderRemarks,//订单备注
  626. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  627. orderDep:this.state.organizationSearch
  628. },
  629. success: function(data) {
  630. if(data.error.length || data.data.list == "") {
  631. if(data.error && data.error.length) {
  632. message.warning(data.error[0].message);
  633. };
  634. } else {
  635. message.success("该订单已重新提交~");
  636. this.setState({
  637. visible:false,
  638. });
  639. this.resets();
  640. this.loadData();
  641. };
  642. }.bind(this),
  643. }).always(function() {
  644. this.setState({
  645. loading: false
  646. });
  647. }.bind(this));
  648. },
  649. //重新提交
  650. examOks(){
  651. $.ajax({
  652. method: "post",
  653. dataType: "json",
  654. crossDomain: false,
  655. url: globalConfig.context +"/api/admin/newOrder/deleteOrderNew",
  656. data: {
  657. orderNo: this.state.orderNo,//订单编号
  658. },
  659. success: function(data) {
  660. if(data.error.length || data.data.list == "") {
  661. if(data.error && data.error.length) {
  662. message.warning(data.error[0].message);
  663. };
  664. } else {
  665. message.success("该订单已作废~");
  666. this.setState({
  667. visible:false,
  668. });
  669. this.resets();
  670. this.loadData();
  671. };
  672. }.bind(this),
  673. }).always(function() {
  674. this.setState({
  675. loading: false
  676. });
  677. }.bind(this));
  678. },
  679. departmentList() {
  680. this.setState({
  681. loading: true
  682. });
  683. $.ajax({
  684. method: "get",
  685. dataType: "json",
  686. crossDomain: false,
  687. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  688. data: {
  689. },
  690. success: function(data) {
  691. let thedata = data.data;
  692. let theArr = [];
  693. if(!thedata) {
  694. if(data.error && data.error.length) {
  695. message.warning(data.error[0].message);
  696. };
  697. thedata = {};
  698. } else {
  699. thedata.map(function(item, index) {
  700. theArr.push({
  701. key: index,
  702. name: item.name,
  703. id: item.id,
  704. depNo: item.depNo
  705. })
  706. })
  707. }
  708. this.setState({
  709. departmentArr: theArr,
  710. })
  711. console.log(this.state.departmentArr)
  712. }.bind(this),
  713. }).always(function() {
  714. this.setState({
  715. loading: false
  716. });
  717. }.bind(this));
  718. },
  719. //新建项目明细保存
  720. nextSubmit(e) {
  721. e.preventDefault();
  722. if(this.state.gid==undefined||!this.state.gid){
  723. message.warning('服务名称不匹配!');
  724. return false;
  725. };
  726. if (moneyVerify(this.state.commodityPrice)) {
  727. return
  728. }
  729. if (!this.state.commodityPrice) {
  730. message.warning("请输入金额!");
  731. this.refs.commodityPrice.focus();
  732. return false;
  733. };
  734. if(!this.state.commodityQuantity){
  735. message.warning('请输入商品数量!');
  736. this.refs.commodityQuantity.focus();
  737. return false;
  738. };
  739. if(!this.state.main){
  740. message.warning('请选择是否为主要项目!');
  741. this.refs.commodityQuantity.focus();
  742. return false;
  743. };
  744. this.setState({
  745. loading: true
  746. });
  747. let api=this.state.addState?'/api/admin/newOrder/addOrderTask':'/api/bianji';
  748. $.ajax({
  749. method: "POST",
  750. dataType: "json",
  751. crossDomain: false,
  752. url: globalConfig.context +api ,
  753. data: {
  754. commodityId:this.state.gid,//商品ID
  755. orderNo:this.state.orderNo,//订单编号
  756. commodityName:this.state.commodityName,//商品名称
  757. commodityQuantity:this.state.commodityQuantity,//商品数量
  758. commodityPrice:this.state.commodityPrice,//签单总价
  759. taskComment:this.state.taskComment,//服务说明
  760. main:this.state.main,//是否为主要项目
  761. }
  762. }).done(function(data) {
  763. this.setState({
  764. loading: false
  765. });
  766. if(!data.error.length) {
  767. message.success('保存成功!');
  768. this.nextCancel()
  769. this.xiangmu(this.state.orderNo)
  770. } else {
  771. message.warning(data.error[0].message);
  772. }
  773. }.bind(this));
  774. },
  775. rizhi(){
  776. console.log(this.state.orderNo)
  777. this.setState({
  778. loading:true
  779. })
  780. $.ajax({
  781. method: "get",
  782. dataType: "json",
  783. crossDomain: false,
  784. url: '/api/admin/newOrder/selectOrderLog',
  785. data: {
  786. orderNo:this.state.orderNo
  787. },
  788. success: function (data) {
  789. let theArr = [];
  790. let thisData = data.data;
  791. if (!thisData.length) {
  792. if (data.error && data.error.length) {
  793. message.warning(data.error[0].message);
  794. };
  795. thisData = {};
  796. }else{
  797. for(let i = 0; i < data.data.length; i++) {
  798. let thisdata = data.data[i];
  799. theArr.push({
  800. processName:thisdata.processName,
  801. adminName:thisdata.adminName,
  802. createDate:thisdata.createDate,
  803. });
  804. };
  805. };
  806. this.setState({
  807. dataSourcerizhi: theArr
  808. })
  809. }.bind(this),
  810. }).always(function () {
  811. this.setState({
  812. loading: false
  813. });
  814. }.bind(this));
  815. },
  816. //查看订单日志
  817. getOrderLog(){
  818. this.setState({
  819. rizhivisible:true
  820. })
  821. this.rizhi()
  822. },
  823. closeOrderLog(){
  824. this.setState({
  825. rizhivisible:false
  826. })
  827. },
  828. //点击签单
  829. handleCancels() {
  830. this.setState({
  831. isSubmit:1
  832. })
  833. },
  834. //点击签单
  835. handleCancelq() {
  836. this.setState({
  837. isSubmit:0
  838. })
  839. },
  840. resets(){
  841. this.state.orderNo='';
  842. this.state.customerName='';
  843. this.state.releaseDate[0] = undefined;
  844. this.state.releaseDate[1] = undefined;
  845. },
  846. //点击添加项目明细
  847. addDetailed(){
  848. this.setState({
  849. gid:'',
  850. customerArr:[],
  851. commodityName:'',
  852. commodityQuantity:'',
  853. commodityId:'',
  854. taskComment:'',
  855. main:undefined,
  856. commodityPrice:'',
  857. addState:1,
  858. addnextVisible: true
  859. })
  860. },
  861. //修改项目详情
  862. tabRowSave(e){
  863. e.preventDefault();
  864. if(!this.state.commodityPrice){
  865. message.warning('金额不能为空!');
  866. return false;
  867. };
  868. if(!this.state.commodityQuantity){
  869. message.warning('数量不能为空!');
  870. return false;
  871. };
  872. if(!this.state.main){
  873. message.warning('请选择是否为主要项目!');
  874. this.refs.commodityQuantity.focus();
  875. return false;
  876. };
  877. $.ajax({
  878. method: "POST",
  879. dataType: "json",
  880. crossDomain: false,
  881. url: globalConfig.context +'/api/admin/newOrder/updateOrderTask' ,
  882. data: {
  883. id:this.state.jid,//项目ID
  884. commodityId:this.state.kid,//商品ID
  885. orderNo:this.state.orderNo,//订单编号
  886. main:this.state.main,//是否为主要
  887. commodityPrice:this.state.commodityPrice,//金额
  888. commodityQuantity:this.state.commodityQuantity,//数量
  889. taskComment:this.state.taskComment//备注
  890. }
  891. }).done(function(data) {
  892. this.setState({
  893. loading: false
  894. });
  895. if(!data.error.length) {
  896. message.success('保存成功!');
  897. this.nextCancel()
  898. this.xiangmu(this.state.orderNo)
  899. //this.loaduser(this.props.datauser);
  900. this.loadData();
  901. } else {
  902. message.warning(data.error[0].message);
  903. }
  904. }.bind(this));
  905. },
  906. //搜索
  907. search() {
  908. this.setState({
  909. //signBillVisible:false
  910. })
  911. this.loadData();
  912. },
  913. getOrgCodeUrl(e) {
  914. this.setState({ orgCodeUrl: e });
  915. },
  916. //关闭详情
  917. visitCancel(){
  918. this.setState({
  919. visible:false
  920. })
  921. this.resets();
  922. },
  923. visitOk(){
  924. this.setState({
  925. visible:false
  926. })
  927. this.resets();
  928. },
  929. //客户
  930. selectAutoCUT(value){
  931. let autoIds;
  932. let fwList=this.state.customerArr;
  933. fwList.map(function(item){
  934. if(value==item.name){
  935. autoIds=item.id
  936. }
  937. })
  938. this.setState({
  939. customerName:value,
  940. autoId:autoIds
  941. })
  942. },
  943. //加载(自动补全)
  944. supervisor(e,state){ //客户名称与服务名称自动补全
  945. let api=state?'/api/admin/customer/getCustomerByName':'/api/admin/order/getBusinessProjectByName';
  946. $.ajax({
  947. method: "get",
  948. dataType: "json",
  949. crossDomain: false,
  950. url: globalConfig.context + api,
  951. data:state?{
  952. name:e,
  953. type:this.state.customType
  954. }:{
  955. businessName:e
  956. },
  957. success: function (data) {
  958. let thedata=data.data;
  959. if (!thedata) {
  960. if (data.error && data.error.length) {
  961. message.warning(data.error[0].message);
  962. };
  963. thedata = {};
  964. };
  965. this.setState({
  966. states:state,
  967. customerArr:thedata,
  968. });
  969. }.bind(this),
  970. }).always(function () {
  971. this.setState({
  972. loading: false
  973. });
  974. }.bind(this));
  975. },
  976. //上级主管输入框失去焦点是判断客户是否存在
  977. selectAuto(value){
  978. let kid=[];
  979. let fwList=this.state.customerArr;
  980. fwList.map(function(item){
  981. if(value==item.bname){
  982. kid=item
  983. }
  984. })
  985. this.setState({
  986. commodityName:value,
  987. gid:kid.id,
  988. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  989. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  990. })
  991. },
  992. //服务值改变时请求客户名称
  993. httpChange(e){
  994. this.state.gid='';
  995. if(e.length>=1){
  996. this.supervisor(e,false);
  997. }
  998. this.setState({
  999. commodityName:e
  1000. })
  1001. },
  1002. render() {
  1003. const formItemLayout = {
  1004. labelCol: { span: 8 },
  1005. wrapperCol: { span: 14 },
  1006. };
  1007. const FormItem = Form.Item;
  1008. const { RangePicker } = DatePicker;
  1009. const rowSelection = {
  1010. selectedRowKeys: this.state.selectedRowKeys,
  1011. onChange: (selectedRowKeys, selectedRows) => {
  1012. this.setState({
  1013. modalVisible:false,
  1014. selectedRows: selectedRows.slice(-1),
  1015. selectedRowKeys: selectedRowKeys.slice(-1)
  1016. });
  1017. },
  1018. onSelect: (recordt) => {
  1019. this.setState({
  1020. modalVisible:false,
  1021. recordt: recordt.id
  1022. })
  1023. },
  1024. };
  1025. const dataSources=this.state.customerArr || [];
  1026. let departmentArr = this.state.departmentArr || [];
  1027. const options = this.state.states?dataSources.map((group) =>
  1028. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1029. ):dataSources.map((group,index) =>
  1030. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  1031. )
  1032. return (
  1033. <div className="user-content">
  1034. <div className="content-title">
  1035. <span>订单审核</span>
  1036. </div>
  1037. <div className="user-search">
  1038. <Input
  1039. placeholder="客户名称"
  1040. style={{ width: "150px", marginBottom: "10px" }}
  1041. value={this.state.customerName}
  1042. onChange={e => {
  1043. this.setState({ customerName: e.target.value });
  1044. }}
  1045. />
  1046. <Input
  1047. placeholder="订单编号"
  1048. style={{ width: "150px" }}
  1049. value={this.state.orderNoSearch}
  1050. onChange={e => {
  1051. this.setState({ orderNoSearch: e.target.value });
  1052. }}
  1053. />
  1054. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1055. <RangePicker
  1056. value={[
  1057. this.state.releaseDate[0]
  1058. ? moment(this.state.releaseDate[0])
  1059. : null,
  1060. this.state.releaseDate[1]
  1061. ? moment(this.state.releaseDate[1])
  1062. : null
  1063. ]}
  1064. onChange={(data, dataString) => {
  1065. this.setState({ releaseDate: dataString });
  1066. }}
  1067. />
  1068. <Button
  1069. type="primary"
  1070. onClick={this.search}
  1071. style={{ marginLeft: "10px" }}
  1072. >
  1073. 搜索
  1074. </Button>
  1075. <Button onClick={this.reset}>重置</Button>
  1076. <div className="patent-table">
  1077. <Spin spinning={this.state.loading}>
  1078. <Table
  1079. columns={this.state.columns}
  1080. dataSource={this.state.dataSource}
  1081. rowSelection={rowSelection}
  1082. pagination={this.state.pagination}
  1083. onRowClick={this.tableRowClick}
  1084. />
  1085. </Spin>
  1086. </div>
  1087. <Modal
  1088. className="customeDetails"
  1089. footer=""
  1090. title="订单详情"
  1091. width="900px"
  1092. visible={this.state.visible}
  1093. onOk={this.visitOk}
  1094. onCancel={this.visitCancel}
  1095. >
  1096. <Form
  1097. layout="horizontal"
  1098. onSubmit={this.handleSubmit}
  1099. id="demand-form"
  1100. style={{ paddingBottom: "40px" }}
  1101. >
  1102. <Spin spinning={this.state.loading}>
  1103. <div className="clearfix">
  1104. <FormItem
  1105. className="half-item"
  1106. {...formItemLayout}
  1107. label="订单编号"
  1108. >
  1109. <span>{this.state.orderNo}</span>
  1110. </FormItem>
  1111. <FormItem
  1112. className="half-item"
  1113. {...formItemLayout}
  1114. label="合同编号"
  1115. >
  1116. <span>{this.state.contractNo}</span>
  1117. </FormItem>
  1118. <FormItem
  1119. className="half-item"
  1120. {...formItemLayout}
  1121. label="客户名称"
  1122. >
  1123. <span>{this.state.userName}</span>
  1124. </FormItem>
  1125. <FormItem
  1126. className="half-item"
  1127. {...formItemLayout}
  1128. label="流程状态"
  1129. >
  1130. <span>{getProcessStatus(this.state.processStatus)}</span>
  1131. </FormItem>
  1132. <FormItem
  1133. className="half-item"
  1134. {...formItemLayout}
  1135. label="结算状态"
  1136. >
  1137. <span>
  1138. {getLiquidationStatus(this.state.liquidationStatus)}
  1139. </span>
  1140. </FormItem>
  1141. <FormItem
  1142. className="half-item"
  1143. {...formItemLayout}
  1144. label="已收款项(万元)"
  1145. >
  1146. <span>{this.state.settlementAmount}</span>
  1147. </FormItem>
  1148. <FormItem
  1149. className="half-item"
  1150. {...formItemLayout}
  1151. label="企业联系人"
  1152. >
  1153. <Input
  1154. placeholder="请输入联系人"
  1155. ref="signTotalAmount"
  1156. value={this.state.contacts}
  1157. onChange={e => {
  1158. this.setState({ contacts: e.target.value });
  1159. }}
  1160. style={{ width: "240px" }}
  1161. />
  1162. </FormItem>
  1163. <FormItem
  1164. className="half-item"
  1165. {...formItemLayout}
  1166. label="联系人电话"
  1167. >
  1168. <Input
  1169. placeholder="请输入联系人电话"
  1170. ref="signTotalAmount"
  1171. value={this.state.contactMobile}
  1172. onChange={e => {
  1173. this.setState({ contactMobile: e.target.value });
  1174. }}
  1175. style={{ width: "240px" }}
  1176. />
  1177. </FormItem>
  1178. <FormItem
  1179. className="half-item"
  1180. {...formItemLayout}
  1181. label="企业法人"
  1182. >
  1183. <Input
  1184. placeholder="请输入法人"
  1185. ref="signTotalAmount"
  1186. value={this.state.legalPerson}
  1187. onChange={e => {
  1188. this.setState({ legalPerson: e.target.value });
  1189. }}
  1190. style={{ width: "240px" }}
  1191. />
  1192. </FormItem>
  1193. <FormItem
  1194. className="half-item"
  1195. {...formItemLayout}
  1196. label="法人电话"
  1197. >
  1198. <Input
  1199. placeholder="请输入法人电话"
  1200. ref="signTotalAmount"
  1201. value={this.state.legalPersonTel}
  1202. onChange={e => {
  1203. this.setState({ legalPersonTel: e.target.value });
  1204. }}
  1205. style={{ width: "240px" }}
  1206. />
  1207. </FormItem>
  1208. <FormItem
  1209. className="half-item"
  1210. {...formItemLayout}
  1211. label="签单金额(万元)"
  1212. >
  1213. <Input
  1214. placeholder="签单金额"
  1215. ref="signTotalAmount"
  1216. value={this.state.totalAmount}
  1217. onChange={e => {
  1218. this.setState({ totalAmount: e.target.value });
  1219. }}
  1220. style={{ width: "240px" }}
  1221. />
  1222. <span className="mandatory">*</span>
  1223. </FormItem>
  1224. <FormItem
  1225. className="half-item"
  1226. {...formItemLayout}
  1227. label="首付金额(万元)"
  1228. >
  1229. <Input
  1230. placeholder="请输入实签首款金额"
  1231. ref="signFirstPayment"
  1232. value={this.state.firstAmount}
  1233. onChange={e => {
  1234. this.setState({ firstAmount: e.target.value });
  1235. }}
  1236. style={{ width: "240px" }}
  1237. />
  1238. <span className="mandatory">*</span>
  1239. </FormItem>
  1240. <FormItem
  1241. className="half-item"
  1242. {...formItemLayout}
  1243. label="特批立项"
  1244. >
  1245. <Select
  1246. placeholder="请选择客户所属类型"
  1247. style={{ width: "240px" }}
  1248. value={this.state.approval}
  1249. onChange={e => {
  1250. this.setState({ approval: e });
  1251. }}
  1252. >
  1253. {tepi.map(function(item) {
  1254. return (
  1255. <Select.Option key={item.value}>
  1256. {item.key}
  1257. </Select.Option>
  1258. );
  1259. })}
  1260. </Select>
  1261. </FormItem>
  1262. <FormItem
  1263. className="half-item"
  1264. {...formItemLayout}
  1265. label="合同签订时间"
  1266. >
  1267. <DatePicker
  1268. style={{
  1269. marginTop: "2px",
  1270. width: "240px",
  1271. height: "32px"
  1272. }}
  1273. showTime
  1274. format="YYYY-MM-DD"
  1275. onOk={() => {}}
  1276. value={
  1277. this.state.signDate ? moment(this.state.signDate) : null
  1278. }
  1279. onChange={(data, dataString) => {
  1280. this.setState({ signDate: dataString });
  1281. }}
  1282. />
  1283. </FormItem>
  1284. <FormItem
  1285. className="half-item"
  1286. {...formItemLayout}
  1287. label="订单部门"
  1288. >
  1289. <Select
  1290. placeholder="请输入订单部门"
  1291. style={{ width: 240 }}
  1292. value={this.state.organizationSearch}
  1293. onChange={e => {
  1294. this.setState({ organizationSearch: e });
  1295. }}
  1296. >
  1297. {departmentArr.map(function(item) {
  1298. return (
  1299. <Select.Option key={item.id}>
  1300. {item.name}
  1301. </Select.Option>
  1302. );
  1303. })}
  1304. </Select>
  1305. </FormItem>
  1306. <div className="clearfix">
  1307. <FormItem
  1308. labelCol={{ span: 4 }}
  1309. wrapperCol={{ span: 18 }}
  1310. label={
  1311. <span>
  1312. <strong style={{ color: "#f00" }}>*</strong>合同扫描件
  1313. </span>
  1314. }
  1315. >
  1316. <PicturesWall
  1317. fileList={this.getOrgCodeUrl}
  1318. pictureUrl={this.state.orgCodeUrl}
  1319. />
  1320. <p>图片建议:要清晰。</p>
  1321. <Button
  1322. style={{
  1323. float: "right",
  1324. marginRight: "140px",
  1325. marginTop: "20px"
  1326. }}
  1327. onClick={this.getOrderLog}
  1328. >
  1329. 查看订单 日志
  1330. </Button>
  1331. </FormItem>
  1332. </div>
  1333. <div className="clearfix">
  1334. <FormItem
  1335. labelCol={{ span: 4 }}
  1336. wrapperCol={{ span: 16 }}
  1337. label="订单留言"
  1338. >
  1339. <Input
  1340. type="textarea"
  1341. placeholder="请输入订单留言"
  1342. rows={4}
  1343. value={this.state.orderRemarks}
  1344. onChange={e => {
  1345. this.setState({ orderRemarks: e.target.value });
  1346. }}
  1347. />
  1348. </FormItem>
  1349. </div>
  1350. <div className="clearfix">
  1351. <FormItem
  1352. className="half-item"
  1353. {...formItemLayout}
  1354. label="订单负责人"
  1355. >
  1356. <span>{this.state.salesmanName}</span>
  1357. </FormItem>
  1358. <FormItem
  1359. className="half-item"
  1360. {...formItemLayout}
  1361. label="订单负责人电话"
  1362. >
  1363. <span>{this.state.salesmanMobile}</span>
  1364. </FormItem>
  1365. </div>
  1366. <div className="clearfix">
  1367. <FormItem
  1368. className="half-item"
  1369. {...formItemLayout}
  1370. label="当前财务负责人"
  1371. >
  1372. <span>{this.state.nowFinance}</span>
  1373. </FormItem>
  1374. <FormItem
  1375. className="half-item"
  1376. {...formItemLayout}
  1377. label="当前财务负责人电话"
  1378. >
  1379. <span>{this.state.nowFinanceMobile}</span>
  1380. </FormItem>
  1381. </div>
  1382. <div className="clearfix">
  1383. <FormItem
  1384. className="half-item"
  1385. {...formItemLayout}
  1386. style={{ opacity: ".5" }}
  1387. label="原订单负责人"
  1388. >
  1389. <span>{this.state.oldSalesmanName}</span>
  1390. </FormItem>
  1391. <FormItem
  1392. className="half-item"
  1393. {...formItemLayout}
  1394. style={{ opacity: ".5" }}
  1395. label="原订单负责人电话"
  1396. >
  1397. <span>{this.state.oldSalesmanMobile}</span>
  1398. </FormItem>
  1399. </div>
  1400. <div className="clearfix">
  1401. <FormItem
  1402. className="half-item"
  1403. style={{ opacity: ".5" }}
  1404. {...formItemLayout}
  1405. label="实际财务操作人"
  1406. >
  1407. <span>{this.state.financeName}</span>
  1408. </FormItem>
  1409. <FormItem
  1410. className="half-item"
  1411. {...formItemLayout}
  1412. style={{ opacity: ".5" }}
  1413. label="实际财务操作人电话"
  1414. >
  1415. <span>{this.state.financeMobile}</span>
  1416. </FormItem>
  1417. </div>
  1418. <div className="clearfix">
  1419. <FormItem
  1420. className="half-item"
  1421. {...formItemLayout}
  1422. label="驳回人"
  1423. >
  1424. <span>{this.state.initiateName}</span>
  1425. </FormItem>
  1426. <FormItem
  1427. className="half-item"
  1428. {...formItemLayout}
  1429. label="驳回时间"
  1430. >
  1431. <span>{this.state.backDate}</span>
  1432. </FormItem>
  1433. </div>
  1434. <div className="clearfix">
  1435. <FormItem
  1436. labelCol={{ span: 4 }}
  1437. wrapperCol={{ span: 16 }}
  1438. label="驳回原因"
  1439. >
  1440. <span>{this.state.reason}</span>
  1441. </FormItem>
  1442. </div>
  1443. <div>
  1444. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1445. 催款节点
  1446. </span>
  1447. <Button
  1448. type="primary"
  1449. onClick={this.addcontact}
  1450. style={{
  1451. float: "right",
  1452. marginRight: "50px",
  1453. marginBottom: "15px"
  1454. }}
  1455. >
  1456. 添加催款节点
  1457. </Button>
  1458. </div>
  1459. <div className="clearfix">
  1460. <Spin spinning={this.state.loading}>
  1461. <Form layout="horizontal" id="demand-form">
  1462. <Table
  1463. pagination={false}
  1464. columns={this.state.ContactsLists}
  1465. dataSource={this.state.contactList}
  1466. />
  1467. <Col
  1468. span={24}
  1469. offset={9}
  1470. style={{ marginTop: "15px" }}
  1471. ></Col>
  1472. </Form>
  1473. </Spin>
  1474. </div>
  1475. <div>
  1476. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1477. 项目业务
  1478. </span>
  1479. <Button
  1480. type="primary"
  1481. onClick={this.addDetailed}
  1482. style={{
  1483. float: "right",
  1484. marginRight: "50px",
  1485. marginBottom: "15px"
  1486. }}
  1487. >
  1488. 添加项目明细
  1489. </Button>
  1490. </div>
  1491. <div className="patent-table">
  1492. <Spin spinning={this.state.loading}>
  1493. <Table
  1494. columns={this.state.columnsX}
  1495. dataSource={this.state.dataSourceX}
  1496. pagination={this.state.paginations}
  1497. onRowClick={this.tableRowClickX}
  1498. />
  1499. </Spin>
  1500. </div>
  1501. <div className="addSave" style={{ marginTop: "15px" }}>
  1502. <Button
  1503. className="cancel"
  1504. type="primary"
  1505. onClick={this.examOk}
  1506. style={{ marginLeft: "200px" }}
  1507. htmlType="submit"
  1508. >
  1509. 重新提交
  1510. </Button>
  1511. <Button
  1512. className="cancel"
  1513. type="primary"
  1514. onClick={this.examOks}
  1515. style={{ marginLeft: "50px" }}
  1516. htmlType="submit"
  1517. >
  1518. 订单作废
  1519. </Button>
  1520. <Button
  1521. className="cancel"
  1522. type="ghost"
  1523. onClick={this.visitCancel}
  1524. style={{ marginLeft: "50px" }}
  1525. >
  1526. 取消
  1527. </Button>
  1528. </div>
  1529. </div>
  1530. </Spin>
  1531. </Form>
  1532. </Modal>
  1533. <Modal
  1534. maskClosable={false}
  1535. visible={this.state.addnextVisible}
  1536. onOk={this.nextCancel}
  1537. onCancel={this.nextCancel}
  1538. width="800px"
  1539. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  1540. footer=""
  1541. className="admin-desc-content"
  1542. >
  1543. <Form
  1544. layout="horizontal"
  1545. onSubmit={this.nextSubmit}
  1546. id="demand-form"
  1547. >
  1548. <Spin spinning={this.state.loading}>
  1549. {this.state.addState ? (
  1550. <div className="clearfix">
  1551. <FormItem
  1552. className="half-item"
  1553. {...formItemLayout}
  1554. label="服务名称"
  1555. >
  1556. <AutoComplete
  1557. className="certain-category-search"
  1558. dropdownClassName="certain-category-search-dropdown"
  1559. dropdownMatchSelectWidth={false}
  1560. dropdownStyle={{ width: 200 }}
  1561. style={{ width: "200px" }}
  1562. dataSource={options}
  1563. placeholder="输入服务名称"
  1564. value={this.state.commodityName}
  1565. onChange={this.httpChange}
  1566. filterOption={true}
  1567. onSelect={this.selectAuto}
  1568. >
  1569. <Input />
  1570. </AutoComplete>
  1571. <span className="mandatory">*</span>
  1572. </FormItem>
  1573. <FormItem
  1574. className="half-item"
  1575. {...formItemLayout}
  1576. label="服务数量"
  1577. >
  1578. <Input
  1579. placeholder="请输入服务数量"
  1580. value={this.state.commodityQuantity}
  1581. style={{ width: "200px" }}
  1582. onChange={e => {
  1583. this.setState({ commodityQuantity: e.target.value });
  1584. }}
  1585. ref="commodityQuantity"
  1586. />
  1587. <span className="mandatory">*</span>
  1588. </FormItem>
  1589. <FormItem
  1590. className="half-item"
  1591. {...formItemLayout}
  1592. label="实签价格(万元)"
  1593. >
  1594. <Input
  1595. placeholder="请输入实签价格"
  1596. value={this.state.commodityPrice}
  1597. style={{ width: "200px" }}
  1598. onChange={e => {
  1599. this.setState({ commodityPrice: e.target.value });
  1600. }}
  1601. ref="commodityPrice"
  1602. />
  1603. <span className="mandatory">*</span>
  1604. </FormItem>
  1605. <FormItem
  1606. className="half-item"
  1607. {...formItemLayout}
  1608. label="主要业务"
  1609. >
  1610. <Select
  1611. placeholder="选择是否为主要业务"
  1612. style={{ width: "200px" }}
  1613. value={this.state.main}
  1614. onChange={e => {
  1615. this.setState({ main: e });
  1616. }}
  1617. >
  1618. {boutique.map(function(item) {
  1619. return (
  1620. <Select.Option key={item.value}>
  1621. {item.key}
  1622. </Select.Option>
  1623. );
  1624. })}
  1625. </Select>
  1626. <span className="mandatory">*</span>
  1627. </FormItem>
  1628. <div className="clearfix">
  1629. <FormItem
  1630. labelCol={{ span: 4 }}
  1631. wrapperCol={{ span: 16 }}
  1632. label="服务说明"
  1633. >
  1634. <Input
  1635. type="textarea"
  1636. placeholder="请输入服务说明"
  1637. value={this.state.taskComment}
  1638. onChange={e => {
  1639. this.setState({ taskComment: e.target.value });
  1640. }}
  1641. />
  1642. </FormItem>
  1643. </div>
  1644. <FormItem
  1645. wrapperCol={{ span: 12, offset: 4 }}
  1646. className="half-middle"
  1647. >
  1648. <Button
  1649. className="submitSave"
  1650. type="primary"
  1651. htmlType="submit"
  1652. >
  1653. 保存
  1654. </Button>
  1655. <Button
  1656. className="submitSave"
  1657. type="ghost"
  1658. onClick={this.nextCancel}
  1659. >
  1660. 取消
  1661. </Button>
  1662. </FormItem>
  1663. </div>
  1664. ) : (
  1665. <div className="clearfix">
  1666. <FormItem
  1667. className="half-item"
  1668. {...formItemLayout}
  1669. label="项目名称"
  1670. >
  1671. <span>{this.state.commodityName}</span>
  1672. </FormItem>
  1673. <FormItem
  1674. className="half-item"
  1675. {...formItemLayout}
  1676. label="项目数量"
  1677. >
  1678. <Input
  1679. placeholder="请输入数量"
  1680. value={this.state.commodityQuantity}
  1681. style={{ width: "200px" }}
  1682. onChange={e => {
  1683. this.setState({ commodityQuantity: e.target.value });
  1684. }}
  1685. />
  1686. <span className="mandatory">*</span>
  1687. </FormItem>
  1688. <FormItem
  1689. className="half-item"
  1690. {...formItemLayout}
  1691. label="金额(万元)"
  1692. >
  1693. <Input
  1694. placeholder="请输入签单金额"
  1695. value={this.state.commodityPrice}
  1696. style={{ width: "200px" }}
  1697. onChange={e => {
  1698. this.setState({ commodityPrice: e.target.value });
  1699. }}
  1700. />
  1701. <span className="mandatory">*</span>
  1702. </FormItem>
  1703. <FormItem
  1704. className="half-item"
  1705. {...formItemLayout}
  1706. label="主要项目"
  1707. >
  1708. <Select
  1709. placeholder="选择是否为主要业务"
  1710. style={{ width: "200px" }}
  1711. value={this.state.main}
  1712. onChange={e => {
  1713. this.setState({ main: e });
  1714. }}
  1715. >
  1716. {boutique.map(function(item) {
  1717. return (
  1718. <Select.Option key={item.value}>
  1719. {item.key}
  1720. </Select.Option>
  1721. );
  1722. })}
  1723. </Select>
  1724. <span className="mandatory">*</span>
  1725. </FormItem>
  1726. <div className="clearfix">
  1727. <FormItem
  1728. labelCol={{ span: 4 }}
  1729. wrapperCol={{ span: 16 }}
  1730. label="服务说明"
  1731. >
  1732. <Input
  1733. type="textarea"
  1734. placeholder="请输入服务说明"
  1735. value={this.state.taskComment}
  1736. onChange={e => {
  1737. this.setState({ taskComment: e.target.value });
  1738. }}
  1739. />
  1740. </FormItem>
  1741. </div>
  1742. <FormItem
  1743. wrapperCol={{ span: 12, offset: 4 }}
  1744. className="half-middle"
  1745. >
  1746. <Button
  1747. className="submitSave"
  1748. type="primary"
  1749. onClick={this.tabRowSave}
  1750. >
  1751. 保存
  1752. </Button>
  1753. <Button
  1754. className="submitSave"
  1755. type="ghost"
  1756. onClick={this.nextCancel}
  1757. >
  1758. 取消
  1759. </Button>
  1760. </FormItem>
  1761. </div>
  1762. )}
  1763. </Spin>
  1764. </Form>
  1765. </Modal>
  1766. <Modal
  1767. visible={this.state.rizhivisible}
  1768. className="admin-desc-content"
  1769. width="800px"
  1770. maskClosable={false}
  1771. title="订单日志"
  1772. footer={null}
  1773. onCancel={this.closeOrderLog}
  1774. >
  1775. <div className="patent-table">
  1776. <Spin spinning={this.state.loading}>
  1777. <Table
  1778. columns={this.state.columnsrizhi}
  1779. dataSource={this.state.dataSourcerizhi}
  1780. pagination={false}
  1781. />
  1782. </Spin>
  1783. </div>
  1784. </Modal>
  1785. </div>
  1786. </div>
  1787. );
  1788. }
  1789. }));
  1790. export default IntentionCustomer;