reject.jsx 60 KB

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