reject.jsx 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card ,Col} from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import Jquery from 'jquery/dist/jquery.js';
  6. import moment from 'moment';
  7. import {boutique ,tepi,jiedian} from '@/dataDic.js';
  8. import { getLiquidationStatus,getApprovedState,getProcessStatus,splitUrl,getjiedian,getboutique,getCuikuan} from '@/tools.js';
  9. import './customer.less';
  10. const TabPane = Tabs.TabPane;
  11. const Dragger = Upload.Dragger;
  12. //图片组件
  13. const PicturesWall = React.createClass({
  14. getInitialState() {
  15. return {
  16. previewVisible: false,
  17. previewImage: '',
  18. fileList: [],
  19. }
  20. },
  21. handleCancel() {
  22. this.setState({
  23. previewVisible: false
  24. })
  25. },
  26. handlePreview(file) {
  27. this.setState({
  28. previewImage: file.url || file.thumbUrl,
  29. previewVisible: true,
  30. });
  31. },
  32. handleChange(info) {
  33. let fileList = info.fileList;
  34. this.setState({
  35. fileList
  36. });
  37. this.props.fileList(fileList);
  38. },
  39. componentWillReceiveProps(nextProps) {
  40. this.state.fileList = nextProps.pictureUrl;
  41. this.state.pojectApplicationUrl = undefined;
  42. },
  43. render() {
  44. const {
  45. previewVisible,
  46. previewImage,
  47. fileList
  48. } = this.state;
  49. const uploadButton = (
  50. <div>
  51. <Icon type="plus" />
  52. <div className="ant-upload-text">点击上传</div>
  53. </div>
  54. );
  55. return(
  56. <div style={{display:"inline-block"}}>
  57. <Upload
  58. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  59. data={{ 'sign': '' }}
  60. listType="picture-card"
  61. fileList={fileList}
  62. onPreview={this.handlePreview}
  63. onChange={this.handleChange} >
  64. {fileList.length >= 8 ? null : uploadButton}
  65. </Upload>
  66. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  67. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  68. </Modal>
  69. </div>
  70. );
  71. }
  72. });
  73. const IntentionCustomer = Form.create()(React.createClass({
  74. loadData(pageNo, apiUrl) {
  75. this.setState({
  76. visitModul:false,
  77. loading: true,
  78. ispage:pageNo,
  79. modalVisible:false
  80. });
  81. $.ajax({
  82. method: "get",
  83. dataType: "json",
  84. crossDomain: false,
  85. url: globalConfig.context +"/api/admin/newOrder/orderNewList",
  86. data: {
  87. pageNo: pageNo || 1,
  88. pageSize: this.state.pagination.pageSize,
  89. specially: 2,//审核列表
  90. name: this.state.customerName,//名称
  91. orderNo: this.state.orderNo,//订单编号
  92. starTime: this.state.releaseDate[0],//开始时间
  93. endTime: this.state.releaseDate[1],//结束时间
  94. },
  95. success: function(data) {
  96. let theArr = [];
  97. if(data.error.length || data.data.list == "") {
  98. if(data.error && data.error.length) {
  99. message.warning(data.error[0].message);
  100. };
  101. } else {
  102. for(let i = 0; i < data.data.list.length; i++) {
  103. let thisdata = data.data.list[i];
  104. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  105. theArr.push({
  106. key: i,
  107. id: thisdata.id,//用户ID
  108. orderNo: thisdata.orderNo,//订单编号
  109. totalAmount:thisdata.totalAmount,//签单金额
  110. processStatus:thisdata.processStatus,//流程状态
  111. liquidationStatus:thisdata.liquidationStatus,//结算状态
  112. approval:thisdata.approval,//特批状态
  113. signDate:thisdata.signDate,//签单时间
  114. userName:thisdata.userName,//客户名称
  115. salesmanName:thisdata.salesmanName,//营销员名称
  116. financeName:thisdata.financeName,//财务名称
  117. createDate:thisdata.createDate,//下单时间
  118. initiateName:thisdata.initiateName,//驳回人
  119. reason:thisdata.reason,//驳回信息
  120. backDate:thisdata.backDate,//驳回日期
  121. backId:thisdata.backId,//驳回编号
  122. });
  123. };
  124. this.state.pagination.total = data.data.totalCount;
  125. this.state.pagination.current = data.data.pageNo;
  126. };
  127. if(data.data&&data.data.list&&!data.data.list.length){
  128. this.state.pagination.total=0
  129. }
  130. this.setState({
  131. dataSource: theArr,
  132. pageNo: pageNo,
  133. pagination: this.state.pagination,
  134. selectedRowKeys:[]
  135. });
  136. }.bind(this),
  137. }).always(function() {
  138. this.setState({
  139. loading: false
  140. });
  141. }.bind(this));
  142. },
  143. getInitialState() {
  144. return {
  145. page:1,
  146. releaseDate: [],
  147. selectedRowKeys: [],
  148. orgCodeUrl:[],
  149. customerArr:[],
  150. pagination: {
  151. defaultCurrent: 1,
  152. defaultPageSize: 10,
  153. showQuickJumper: true,
  154. pageSize: 10,
  155. onChange: function(page) {
  156. this.loadData(page);
  157. }.bind(this),
  158. showTotal: function(total) {
  159. return '共' + total + '条数据';
  160. }
  161. },
  162. columns: [
  163. {
  164. title: '驳回编号',
  165. dataIndex: 'backId',
  166. key: 'backId'
  167. },{
  168. title: '驳回日期',
  169. dataIndex: 'backDate',
  170. key: 'backDate'
  171. },{
  172. title: '下单时间',
  173. dataIndex: 'createDate',
  174. key: 'createDate'
  175. },{
  176. title: '订单编号',
  177. dataIndex: 'orderNo',
  178. key: 'orderNo'
  179. }, {
  180. title: '客户名称',
  181. dataIndex: 'userName',
  182. key: 'userName',
  183. render:(text)=>{
  184. return (text&&text.length>9?text.substr(0,9)+'...':text)
  185. }
  186. }, {
  187. title: '驳回人',
  188. dataIndex: 'initiateName',
  189. key: 'initiateName'
  190. },{
  191. title: '驳回原因',
  192. dataIndex: 'reason',
  193. key: 'reason',
  194. render:(text)=>{
  195. return (text&&text.length>24?text.substr(0,24)+'...':text)
  196. }
  197. }
  198. ],
  199. columnsrizhi:[
  200. {
  201. title:'流程',
  202. dataIndex: 'processName',
  203. key: 'processName'
  204. },
  205. {
  206. title:'操作人',
  207. dataIndex: 'adminName',
  208. key: 'adminName'
  209. },{
  210. title:'时间',
  211. dataIndex: 'createDate',
  212. key: 'createDate'
  213. }
  214. ],
  215. data: [],
  216. dataSource: [],
  217. columnsX: [
  218. {
  219. title: '业务项目名称',
  220. dataIndex: 'commodityName',
  221. key: 'commodityName'
  222. }, {
  223. title: '项目类别',
  224. dataIndex: 'cname',
  225. key: 'cname',
  226. },{
  227. title: '项目数量',
  228. dataIndex: 'commodityQuantity',
  229. key: 'commodityQuantity'
  230. }, {
  231. title: '金额(万元)',
  232. dataIndex: 'commodityPrice',
  233. key: 'commodityPrice'
  234. }, {
  235. title: '负责人',
  236. dataIndex: 'contacts',
  237. key: 'contacts'
  238. }, {
  239. title: '负责人电话',
  240. dataIndex: 'contactsMobile',
  241. key: 'contactsMobile'
  242. }, {
  243. title: '主要项目',
  244. dataIndex: 'main',
  245. key: 'main',
  246. render:(text)=>{
  247. return (text?'是':'否')
  248. }
  249. }, {
  250. title: '项目说明',
  251. dataIndex: 'taskComment',
  252. key: 'taskComment',
  253. render:(text)=>{
  254. return (text&&text.length>8?text.substr(0,8)+'…':text)
  255. }
  256. }, {
  257. title: '操作',
  258. dataIndex: 'ABC',
  259. key: 'ABC',
  260. render: (text, record, index) => {
  261. return <div>
  262. {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.delectRow(record)}} okText="是" cancelText="否">
  263. <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  264. </Popconfirm>:""}
  265. </div>
  266. }
  267. }
  268. ],
  269. dataSourceX: [],
  270. ContactsLists: [{
  271. title: '催款科目',
  272. dataIndex: 'dunSubject',
  273. key: 'dunSubject',
  274. render: (text, record, index) => {
  275. return <Select placeholder="请选择催款科目" value={record.dunSubject} style={{width:'150px'}}
  276. onChange={(e) => { record.dunSubject = e; this.setState({ contactList: this.state.contactList }); }}>
  277. {
  278. jiedian.map(function (item) {
  279. return <Select.Option key={item.value} >{item.key}</Select.Option>
  280. })
  281. }
  282. </Select>
  283. }
  284. },{
  285. title: '金额(万)',
  286. dataIndex: 'money',
  287. key: 'money',
  288. render: (text, record, index) => {
  289. return <Input value={record.money} placeholder="请输入金额(必填项)" key={record.id} required="required"
  290. onChange={(e) => { record.money = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  291. }
  292. }, {
  293. title: '催款状态',
  294. dataIndex: 'dunStatus',
  295. key: 'dunStatus',
  296. render:text=>{return getCuikuan(text)}
  297. },
  298. {
  299. title: '操作',
  300. dataIndex: 'dels',
  301. key: 'dels',
  302. render: (text, record, index) => {
  303. return <div>
  304. {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record.key)}} okText="删除" cancelText="不删除">
  305. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  306. </Popconfirm>
  307. :''}
  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, index) {
  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, index) {
  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. let theArr = [];
  387. if(data.error.length || data.data.list == "") {
  388. if(data.error && data.error.length) {
  389. message.warning(data.error[0].message);
  390. };
  391. } else {
  392. let thisdata=data.data;
  393. this.setState({
  394. id:thisdata.id,
  395. kehuId:thisdata.buyerId,
  396. orderNo: thisdata.orderNo,//订单编号
  397. contractNo: thisdata.contractNo,//合同编号
  398. userName:thisdata.userName,//客户名称
  399. signDate:thisdata.signDate,//签单时间
  400. processStatus:thisdata.processStatus,//流程状态
  401. liquidationStatus:thisdata.liquidationStatus,//结算状态
  402. contacts:thisdata.contacts,//企业联系人
  403. contactMobile:thisdata.contactMobile,//联系人电话
  404. legalPerson:thisdata.legalPerson,//法人
  405. legalPersonTel:thisdata.legalPersonTel,//法人电话
  406. firstAmount:thisdata.firstAmount,//签单金额
  407. totalAmount:thisdata.totalAmount,//首付金额
  408. settlementAmount:thisdata.settlementAmount,//已收款项
  409. orderRemarks:thisdata.orderRemarks,//订单留言
  410. orgCodeUrl: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],//图片地址
  411. salesmanName:thisdata.salesmanName,//营销员名称
  412. salesmanMobile:thisdata.salesmanMobile,//营销员电话
  413. financeName:thisdata.financeName,//财务名称
  414. financeMobile:thisdata.financeMobile,//财务电话
  415. initiateName:thisdata.initiateName,//驳回人
  416. backDate:thisdata.backDate,//驳回时间
  417. reason:thisdata.reason,//驳回原因
  418. approval:thisdata.approval.toString(),//特批状态
  419. organizationSearch:thisdata.orderDep
  420. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  421. })
  422. };
  423. }.bind(this),
  424. }).always(function() {
  425. this.setState({
  426. loading: false
  427. });
  428. }.bind(this));
  429. },
  430. //项目列表
  431. xiangmu(orderNos) {
  432. $.ajax({
  433. method: "get",
  434. dataType: "json",
  435. crossDomain: false,
  436. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  437. data: {
  438. orderNo:orderNos
  439. },
  440. success: function(data) {
  441. let theArr = [];
  442. if(data.error.length || data.data.list == "") {
  443. if(data.error && data.error.length) {
  444. message.warning(data.error[0].message);
  445. };
  446. } else {
  447. for (let i = 0; i < data.data.length; i++) {
  448. let thisdata = data.data[i];
  449. theArr.push({
  450. key: i,
  451. id:thisdata.id,
  452. orderNo:thisdata.orderNo,//订单编号
  453. commodityId:thisdata.commodityId,//项目ID
  454. commodityName:thisdata.commodityName,//项目名称
  455. cname:thisdata.cname,//项目类别
  456. commodityPrice:thisdata.commodityPrice,//项目价格
  457. commodityQuantity:thisdata.commodityQuantity,//项目数量
  458. main:thisdata.main,//是否为主要任务
  459. taskComment:thisdata.taskComment,//任务说明
  460. contacts:thisdata.contacts,//联系人
  461. contactsMobile:thisdata.contactsMobile,//联系人电话
  462. });
  463. };
  464. };
  465. this.setState({
  466. dataSourceX: theArr,
  467. paginations: false,
  468. });
  469. }.bind(this),
  470. }).always(function() {
  471. this.setState({
  472. loading: false
  473. });
  474. }.bind(this));
  475. },
  476. //节点列表
  477. jiedian(orderNos) {
  478. $.ajax({
  479. method: "get",
  480. dataType: "json",
  481. crossDomain: false,
  482. url: globalConfig.context +"/api/admin/newOrder/selectOrderDun",
  483. data: {
  484. orderNo:orderNos
  485. },
  486. success: function(data) {
  487. let theArr = [];
  488. let thisData=[];
  489. if(data.error.length || data.data.list == "") {
  490. if(data.error && data.error.length) {
  491. message.warning(data.error[0].message);
  492. };
  493. } else {
  494. for(let i = 0; i < data.data.length; i++) {
  495. thisData= data.data[i];
  496. theArr.push({
  497. key:i,
  498. dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
  499. id:thisData.id,//节点Id
  500. money:thisData.money,//催款金额
  501. dunStatus:thisData.dunStatus,//催款状态
  502. orderNo:thisData.orderNo,
  503. })
  504. }
  505. this.setState({
  506. contactList:theArr
  507. })
  508. };
  509. }.bind(this),
  510. }).always(function() {
  511. this.setState({
  512. loading: false
  513. });
  514. }.bind(this));
  515. },
  516. //催款节点保存
  517. contactSave(e) {
  518. this.setState({
  519. loading: true
  520. });
  521. $.ajax({
  522. url: globalConfig.context + '/api/admin/newOrder/createOrderDun',
  523. method: 'post',
  524. data: {
  525. orderNo: this.state.orderNo,
  526. orderDun: JSON.stringify(this.state.contactList)
  527. }
  528. }).done(function(data) {
  529. this.setState({
  530. loading: false
  531. });
  532. if(!data.error.length) {
  533. message.success('保存成功!');
  534. this.jiedian(this.state.orderNo);
  535. } else {
  536. message.warning(data.error[0].message);
  537. }
  538. }.bind(this));
  539. },
  540. //点击新增催款节点
  541. addcontact(record) {
  542. this.state.contactList.push({
  543. key:this.state.contactList.length,
  544. money: '',
  545. dunSubject:undefined,
  546. orderNo: this.state.orderNo,
  547. dunTarget:this.state.kehuId,
  548. });
  549. this.setState({
  550. contactList: this.state.contactList
  551. })
  552. },
  553. //删除收款节点
  554. confirmDelet(index) {
  555. this.state.contactList.splice(index,1);
  556. this.setState({
  557. contactList: this.state.contactList
  558. })
  559. this.contactSave();
  560. },
  561. //重新提交
  562. examOk(){
  563. let theorgCodeUrl = [];
  564. if (this.state.orgCodeUrl.length) {
  565. let picArr = [];
  566. this.state.orgCodeUrl.map(function (item) {
  567. if ( item.response && item.response.data && item.response.data.length ){
  568. picArr.push(item.response.data);
  569. }
  570. });
  571. theorgCodeUrl = picArr.join(",");
  572. };
  573. if(!this.state.totalAmount){
  574. message.warning('签单金额不能为空');
  575. this.refs.signFirstPayment.focus()
  576. return false;
  577. };
  578. if(!this.state.firstAmount){
  579. message.warning('首付金额不能为空');
  580. this.refs.signFirstPayment.focus()
  581. return false;
  582. };
  583. if(!theorgCodeUrl){
  584. message.warning('企业负责人不能为空');
  585. this.refs.signFirstPayment.focus()
  586. return false;
  587. };
  588. $.ajax({
  589. method: "post",
  590. dataType: "json",
  591. crossDomain: false,
  592. url: globalConfig.context +"/api/admin/newOrder/updateServiceOrderNew",
  593. data: {
  594. orderNo: this.state.orderNo,//订单编号
  595. totalAmount: this.state.totalAmount,//总金额
  596. firstAmount: this.state.firstAmount,//首付
  597. isSubmit: 1,//保存草稿还是提交
  598. signDate: this.state.signDate,//签单日期
  599. contacts: this.state.contacts,//企业负责人
  600. contactMobile: this.state.contactMobile,//负责人联系方式
  601. legalPerson: this.state.legalPerson,//企业法人
  602. legalPersonTel: this.state.legalPersonTel,//企业法人联系电话
  603. approval: this.state.approval,//特批状态
  604. contractNo: this.state.contractNo,//合同编号
  605. orderRemarks: this.state.orderRemarks,//订单备注
  606. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  607. },
  608. success: function(data) {
  609. if(data.error.length || data.data.list == "") {
  610. if(data.error && data.error.length) {
  611. message.warning(data.error[0].message);
  612. };
  613. } else {
  614. message.success("该订单已重新提交~");
  615. this.setState({
  616. visible:false,
  617. });
  618. this.resets();
  619. this.loadData();
  620. };
  621. }.bind(this),
  622. }).always(function() {
  623. this.setState({
  624. loading: false
  625. });
  626. }.bind(this));
  627. },
  628. //重新提交
  629. examOks(){
  630. $.ajax({
  631. method: "post",
  632. dataType: "json",
  633. crossDomain: false,
  634. url: globalConfig.context +"/api/admin/newOrder/deleteOrderNew",
  635. data: {
  636. orderNo: this.state.orderNo,//订单编号
  637. },
  638. success: function(data) {
  639. if(data.error.length || data.data.list == "") {
  640. if(data.error && data.error.length) {
  641. message.warning(data.error[0].message);
  642. };
  643. } else {
  644. message.success("该订单已作废~");
  645. this.setState({
  646. visible:false,
  647. });
  648. this.resets();
  649. this.loadData();
  650. };
  651. }.bind(this),
  652. }).always(function() {
  653. this.setState({
  654. loading: false
  655. });
  656. }.bind(this));
  657. },
  658. departmentList() {
  659. this.setState({
  660. loading: true
  661. });
  662. $.ajax({
  663. method: "get",
  664. dataType: "json",
  665. crossDomain: false,
  666. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  667. data: {
  668. },
  669. success: function(data) {
  670. let thedata = data.data;
  671. let theArr = [];
  672. if(!thedata) {
  673. if(data.error && data.error.length) {
  674. message.warning(data.error[0].message);
  675. };
  676. thedata = {};
  677. } else {
  678. thedata.map(function(item, index) {
  679. theArr.push({
  680. key: index,
  681. name: item.name,
  682. id: item.id,
  683. depNo: item.depNo
  684. })
  685. })
  686. }
  687. this.setState({
  688. departmentArr: theArr,
  689. })
  690. console.log(this.state.departmentArr)
  691. }.bind(this),
  692. }).always(function() {
  693. this.setState({
  694. loading: false
  695. });
  696. }.bind(this));
  697. },
  698. //新建项目明细保存
  699. nextSubmit(e) {
  700. e.preventDefault();
  701. if(this.state.gid==undefined||!this.state.gid){
  702. message.warning('服务名称不匹配!');
  703. return false;
  704. };
  705. if(!this.state.commodityPrice){
  706. message.warning('请输入金额!');
  707. this.refs.commodityPrice.focus();
  708. return false;
  709. };
  710. if(!this.state.commodityQuantity){
  711. message.warning('请输入商品数量!');
  712. this.refs.commodityQuantity.focus();
  713. return false;
  714. };
  715. if(!this.state.main){
  716. message.warning('请选择是否为主要项目!');
  717. this.refs.commodityQuantity.focus();
  718. return false;
  719. };
  720. this.setState({
  721. loading: true
  722. });
  723. let api=this.state.addState?'/api/admin/newOrder/addOrderTask':'/api/bianji';
  724. $.ajax({
  725. method: "POST",
  726. dataType: "json",
  727. crossDomain: false,
  728. url: globalConfig.context +api ,
  729. data: {
  730. commodityId:this.state.gid,//商品ID
  731. orderNo:this.state.orderNo,//订单编号
  732. commodityName:this.state.commodityName,//商品名称
  733. commodityQuantity:this.state.commodityQuantity,//商品数量
  734. commodityPrice:this.state.commodityPrice,//签单总价
  735. taskComment:this.state.taskComment,//服务说明
  736. main:this.state.main,//是否为主要项目
  737. }
  738. }).done(function(data) {
  739. this.setState({
  740. loading: false
  741. });
  742. if(!data.error.length) {
  743. message.success('保存成功!');
  744. this.nextCancel()
  745. this.xiangmu(this.state.orderNo)
  746. } else {
  747. message.warning(data.error[0].message);
  748. }
  749. }.bind(this));
  750. },
  751. rizhi(){
  752. console.log(this.state.orderNo)
  753. this.setState({
  754. loading:true
  755. })
  756. $.ajax({
  757. method: "get",
  758. dataType: "json",
  759. crossDomain: false,
  760. url: '/api/admin/newOrder/selectOrderLog',
  761. data: {
  762. orderNo:this.state.orderNo
  763. },
  764. success: function (data) {
  765. let theArr = [];
  766. let thisData = data.data;
  767. if (!thisData.length) {
  768. if (data.error && data.error.length) {
  769. message.warning(data.error[0].message);
  770. };
  771. thisData = {};
  772. }else{
  773. for(let i = 0; i < data.data.length; i++) {
  774. let thisdata = data.data[i];
  775. theArr.push({
  776. processName:thisdata.processName,
  777. adminName:thisdata.adminName,
  778. createDate:thisdata.createDate,
  779. });
  780. };
  781. };
  782. this.setState({
  783. dataSourcerizhi: theArr
  784. })
  785. }.bind(this),
  786. }).always(function () {
  787. this.setState({
  788. loading: false
  789. });
  790. }.bind(this));
  791. },
  792. //查看订单日志
  793. getOrderLog(){
  794. this.setState({
  795. rizhivisible:true
  796. })
  797. this.rizhi()
  798. },
  799. closeOrderLog(){
  800. this.setState({
  801. rizhivisible:false
  802. })
  803. },
  804. //点击签单
  805. handleCancels(e) {
  806. this.setState({
  807. isSubmit:1
  808. })
  809. },
  810. //点击签单
  811. handleCancelq(e) {
  812. this.setState({
  813. isSubmit:0
  814. })
  815. },
  816. resets(){
  817. this.state.orderNo='';
  818. this.state.customerName='';
  819. this.state.releaseDate[0] = undefined;
  820. this.state.releaseDate[1] = undefined;
  821. },
  822. //点击添加项目明细
  823. addDetailed(){
  824. this.setState({
  825. gid:'',
  826. customerArr:[],
  827. commodityName:'',
  828. commodityQuantity:'',
  829. commodityId:'',
  830. taskComment:'',
  831. main:undefined,
  832. commodityPrice:'',
  833. addState:1,
  834. addnextVisible: true
  835. })
  836. },
  837. //搜索
  838. search() {
  839. this.setState({
  840. //signBillVisible:false
  841. })
  842. this.loadData();
  843. },
  844. getOrgCodeUrl(e) {
  845. this.setState({ orgCodeUrl: e });
  846. },
  847. //关闭详情
  848. visitCancel(e){
  849. this.setState({
  850. visible:false
  851. })
  852. this.resets();
  853. },
  854. visitOk(e){
  855. this.setState({
  856. visible:false
  857. })
  858. this.resets();
  859. },
  860. //客户
  861. selectAutoCUT(value){
  862. let autoIds;
  863. let fwList=this.state.customerArr;
  864. fwList.map(function(item){
  865. if(value==item.name){
  866. autoIds=item.id
  867. }
  868. })
  869. this.setState({
  870. customerName:value,
  871. autoId:autoIds
  872. })
  873. },
  874. //加载(自动补全)
  875. supervisor(e,state){ //客户名称与服务名称自动补全
  876. let api=state?'/api/admin/customer/getCustomerByName':'/api/admin/order/getBusinessProjectByName';
  877. $.ajax({
  878. method: "get",
  879. dataType: "json",
  880. crossDomain: false,
  881. url: globalConfig.context + api,
  882. data:state?{
  883. name:e,
  884. type:this.state.customType
  885. }:{
  886. businessName:e
  887. },
  888. success: function (data) {
  889. let thedata=data.data;
  890. if (!thedata) {
  891. if (data.error && data.error.length) {
  892. message.warning(data.error[0].message);
  893. };
  894. thedata = {};
  895. };
  896. this.setState({
  897. states:state,
  898. customerArr:thedata,
  899. });
  900. }.bind(this),
  901. }).always(function () {
  902. this.setState({
  903. loading: false
  904. });
  905. }.bind(this));
  906. },
  907. //上级主管输入框失去焦点是判断客户是否存在
  908. selectAuto(value){
  909. let kid=[];
  910. let fwList=this.state.customerArr;
  911. fwList.map(function(item){
  912. if(value==item.bname){
  913. kid=item
  914. }
  915. })
  916. this.setState({
  917. commodityName:value,
  918. gid:kid.id,
  919. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  920. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  921. })
  922. },
  923. //服务值改变时请求客户名称
  924. httpChange(e){
  925. this.state.gid='';
  926. if(e.length>=1){
  927. this.supervisor(e,false);
  928. }
  929. this.setState({
  930. commodityName:e
  931. })
  932. },
  933. render() {
  934. const formItemLayout = {
  935. labelCol: { span: 8 },
  936. wrapperCol: { span: 14 },
  937. };
  938. const FormItem = Form.Item;
  939. const { RangePicker } = DatePicker;
  940. const rowSelection = {
  941. selectedRowKeys: this.state.selectedRowKeys,
  942. onChange: (selectedRowKeys, selectedRows) => {
  943. this.setState({
  944. modalVisible:false,
  945. selectedRows: selectedRows.slice(-1),
  946. selectedRowKeys: selectedRowKeys.slice(-1)
  947. });
  948. },
  949. onSelect: (recordt, selected, selectedRows) => {
  950. this.setState({
  951. modalVisible:false,
  952. recordt: recordt.id
  953. })
  954. },
  955. };
  956. const dataSources=this.state.customerArr || [];
  957. let departmentArr = this.state.departmentArr || [];
  958. const options = this.state.states?dataSources.map((group,index) =>
  959. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  960. ):dataSources.map((group,index) =>
  961. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  962. )
  963. const hasSelected = this.state.selectedRowKeys.length > 0;
  964. return(
  965. <div className="user-content">
  966. <div className="content-title">
  967. <span>订单审核</span>
  968. </div>
  969. <div className="user-search">
  970. <Input placeholder="客户名称" style={{width:'150px',marginBottom:'10px'}}
  971. value={this.state.customerName}
  972. onChange={(e) => { this.setState({ customerName: e.target.value }); }} />
  973. <Input placeholder="订单编号" style={{width:'150px'}}
  974. value={this.state.orderNo}
  975. onChange={(e) => { this.setState({ orderNo: e.target.value }); }} />
  976. <span style={{marginRight:"10px"}}>下单时间 :</span>
  977. <RangePicker
  978. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  979. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  980. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  981. <Button type="primary" onClick={this.search} style={{marginLeft:'10px'}}>搜索</Button>
  982. <Button onClick={this.reset}>重置</Button>
  983. <div className="patent-table">
  984. <Spin spinning={this.state.loading}>
  985. <Table columns={this.state.columns}
  986. dataSource={this.state.dataSource}
  987. rowSelection={rowSelection}
  988. pagination={this.state.pagination}
  989. onRowClick={this.tableRowClick}
  990. />
  991. </Spin>
  992. </div>
  993. <Modal
  994. className="customeDetails"
  995. footer=''
  996. title="订单详情"
  997. width='900px'
  998. visible={this.state.visible}
  999. onOk={this.visitOk}
  1000. onCancel={this.visitCancel}
  1001. >
  1002. <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
  1003. <Spin spinning={this.state.loading}>
  1004. <div className="clearfix">
  1005. <FormItem className="half-item"
  1006. {...formItemLayout}
  1007. label="订单编号" >
  1008. <span>{this.state.orderNo}</span>
  1009. </FormItem>
  1010. <FormItem className="half-item"
  1011. {...formItemLayout}
  1012. label="合同编号" >
  1013. <Input placeholder="请输入合同编号" value={this.state.contractNo}
  1014. onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'240px'}} />
  1015. </FormItem>
  1016. <FormItem className="half-item"
  1017. {...formItemLayout}
  1018. label="客户名称" >
  1019. <span>{this.state.userName}</span>
  1020. </FormItem>
  1021. <FormItem className="half-item"
  1022. {...formItemLayout}
  1023. label="流程状态" >
  1024. <span>{getProcessStatus(this.state.processStatus)}</span>
  1025. </FormItem>
  1026. <FormItem className="half-item"
  1027. {...formItemLayout}
  1028. label="结算状态" >
  1029. <span>{getLiquidationStatus(this.state.liquidationStatus)}</span>
  1030. </FormItem>
  1031. <FormItem className="half-item"
  1032. {...formItemLayout}
  1033. label="已收款项(万元)" >
  1034. <span>{this.state.settlementAmount}</span>
  1035. </FormItem>
  1036. <FormItem className="half-item"
  1037. {...formItemLayout}
  1038. label="企业联系人" >
  1039. <Input placeholder="请输入联系人" ref='signTotalAmount' value={this.state.contacts} onChange={(e)=>{this.setState({contacts:e.target.value})}} style={{width:'240px'}} />
  1040. </FormItem>
  1041. <FormItem className="half-item"
  1042. {...formItemLayout}
  1043. label="联系人电话" >
  1044. <Input placeholder="请输入联系人电话" ref='signTotalAmount' value={this.state.contactMobile} onChange={(e)=>{this.setState({contactMobile:e.target.value})}} style={{width:'240px'}} />
  1045. </FormItem>
  1046. <FormItem className="half-item"
  1047. {...formItemLayout}
  1048. label="企业法人" >
  1049. <Input placeholder="请输入法人" ref='signTotalAmount' value={this.state.legalPerson} onChange={(e)=>{this.setState({legalPerson:e.target.value})}} style={{width:'240px'}} />
  1050. </FormItem>
  1051. <FormItem className="half-item"
  1052. {...formItemLayout}
  1053. label="法人电话" >
  1054. <Input placeholder="请输入法人电话" ref='signTotalAmount' value={this.state.legalPersonTel} onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}} style={{width:'240px'}} />
  1055. </FormItem>
  1056. <FormItem className="half-item"
  1057. {...formItemLayout}
  1058. label="签单金额(万元)" >
  1059. <Input placeholder="签单金额" ref='signTotalAmount' value={this.state.totalAmount} onChange={(e)=>{this.setState({totalAmount:e.target.value})}} style={{width:'240px'}} />
  1060. <span className="mandatory">*</span>
  1061. </FormItem>
  1062. <FormItem className="half-item"
  1063. {...formItemLayout}
  1064. label="首付金额(万元)" >
  1065. <Input placeholder="请输入实签首款金额" ref='signFirstPayment' value={this.state.firstAmount} onChange={(e)=>{this.setState({firstAmount:e.target.value})}} style={{width:'240px'}} />
  1066. <span className="mandatory">*</span>
  1067. </FormItem>
  1068. <FormItem className="half-item"
  1069. {...formItemLayout}
  1070. label="特批立项" >
  1071. <Select placeholder="请选择客户所属类型"
  1072. style={{ width:'240px'}}
  1073. value={this.state.approval}
  1074. onChange={(e)=>{this.setState({approval:e})}}>
  1075. {
  1076. tepi.map(function (item) {
  1077. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1078. })
  1079. }
  1080. </Select>
  1081. </FormItem>
  1082. <FormItem className="half-item" {...formItemLayout} label="合同签订时间">
  1083. <DatePicker
  1084. style={{marginTop:"2px",width: '240px',height:"32px" }}
  1085. showTime
  1086. format="YYYY-MM-DD"
  1087. onOk={(e)=>{}}
  1088. value={this.state.signDate ? moment(this.state.signDate) : null}
  1089. onChange={(data, dataString) => { this.setState({ signDate: dataString }); }} />
  1090. </FormItem>
  1091. <FormItem className="half-item"
  1092. {...formItemLayout}
  1093. label="订单部门" >
  1094. <Select placeholder="请输入订单部门"
  1095. style={{ width: 240 }}
  1096. value={this.state.organizationSearch}
  1097. onChange={(e) => { this.setState({ organizationSearch: e }) }}>
  1098. {
  1099. departmentArr.map(function (item) {
  1100. return <Select.Option key={item.id} >{item.name}</Select.Option>
  1101. })
  1102. }
  1103. </Select>
  1104. </FormItem>
  1105. <div className='clearfix'>
  1106. <FormItem
  1107. labelCol={{ span: 4 }}
  1108. wrapperCol={{ span: 18 }}
  1109. label={
  1110. <span>
  1111. <strong style={{ color: '#f00' }}>*</strong>合同扫描件
  1112. </span>
  1113. }
  1114. >
  1115. <PicturesWall
  1116. fileList={this.getOrgCodeUrl}
  1117. pictureUrl={this.state.orgCodeUrl} />
  1118. <p>图片建议:要清晰。</p>
  1119. <Button style={{ float:"right" , marginRight:'140px' , marginTop:'20px'}}
  1120. onClick={this.getOrderLog}
  1121. >查看订单 日志</Button>
  1122. </FormItem>
  1123. </div>
  1124. <div className='clearfix'>
  1125. <FormItem
  1126. labelCol={{ span: 4 }}
  1127. wrapperCol={{ span: 16 }}
  1128. label="订单留言" >
  1129. <Input type="textarea" placeholder="请输入订单留言" rows={4} value={this.state.orderRemarks}
  1130. onChange={(e)=>{this.setState({orderRemarks:e.target.value})}}/>
  1131. </FormItem>
  1132. </div>
  1133. <div className='clearfix'>
  1134. <FormItem className="half-item"
  1135. {...formItemLayout}
  1136. label="订单负责人" >
  1137. <span>{this.state.salesmanName}</span>
  1138. </FormItem>
  1139. <FormItem className="half-item"
  1140. {...formItemLayout}
  1141. label="订单负责人电话" >
  1142. <span>{this.state.salesmanMobile}</span>
  1143. </FormItem>
  1144. </div>
  1145. <div className='clearfix'>
  1146. <FormItem className="half-item"
  1147. {...formItemLayout}
  1148. label="财务负责人" >
  1149. <span>{this.state.financeName}</span>
  1150. </FormItem>
  1151. <FormItem className="half-item"
  1152. {...formItemLayout}
  1153. label="财务负责人电话" >
  1154. <span>{this.state.financeMobile}</span>
  1155. </FormItem>
  1156. </div>
  1157. <div className='clearfix'>
  1158. <FormItem className="half-item"
  1159. {...formItemLayout}
  1160. label="驳回人" >
  1161. <span>{this.state.initiateName}</span>
  1162. </FormItem>
  1163. <FormItem className="half-item"
  1164. {...formItemLayout}
  1165. label="驳回时间" >
  1166. <span>{this.state.backDate}</span>
  1167. </FormItem>
  1168. </div>
  1169. <div className='clearfix'>
  1170. <FormItem
  1171. labelCol={{ span: 4 }}
  1172. wrapperCol={{ span: 16 }}
  1173. label="驳回原因" >
  1174. <span>{this.state.reason}</span>
  1175. </FormItem>
  1176. </div>
  1177. <div>
  1178. <span style={{marginLeft:'50px',fontSize:'20px'}}>催款节点</span>
  1179. <Button type='primary' onClick={this.addcontact} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加催款节点</Button>
  1180. </div>
  1181. <div className="clearfix">
  1182. <Spin spinning={this.state.loading}>
  1183. <Form layout="horizontal" id="demand-form" >
  1184. <Table
  1185. pagination={false}
  1186. columns={this.state.ContactsLists}
  1187. dataSource={this.state.contactList}
  1188. />
  1189. <Col span={24} offset={9} style={{marginTop:'15px'}}>
  1190. </Col>
  1191. </Form>
  1192. </Spin>
  1193. </div>
  1194. <div>
  1195. <span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
  1196. <Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加项目明细</Button>
  1197. </div>
  1198. <div className="patent-table">
  1199. <Spin spinning={this.state.loading}>
  1200. <Table columns={this.state.columnsX}
  1201. dataSource={this.state.dataSourceX}
  1202. pagination={this.state.paginations}
  1203. onRowClick={this.tableRowClickX}
  1204. />
  1205. </Spin>
  1206. </div>
  1207. <div className='addSave' style={{marginTop:'15px'}}>
  1208. <Button className="cancel" type="primary" onClick={this.examOk} style={{marginLeft:"200px"}} htmlType="submit">重新提交</Button>
  1209. <Button className="cancel" type="primary" onClick={this.examOks} style={{marginLeft:"50px"}} htmlType="submit">订单作废</Button>
  1210. <Button className="cancel" type="ghost" onClick={this.visitCancel} style={{marginLeft:"50px"}}>取消</Button>
  1211. </div>
  1212. </div>
  1213. </Spin>
  1214. </Form>
  1215. </Modal>
  1216. <Modal maskClosable={false} visible={this.state.addnextVisible}
  1217. onOk={this.nextCancel} onCancel={this.nextCancel}
  1218. width='800px'
  1219. title={this.state.addState?'添加项目任务':'项目任务详情'}
  1220. footer=''
  1221. className="admin-desc-content">
  1222. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1223. <Spin spinning={this.state.loading}>
  1224. {this.state.addState?<div className="clearfix">
  1225. <FormItem className="half-item"
  1226. {...formItemLayout}
  1227. label="服务名称" >
  1228. <AutoComplete
  1229. className="certain-category-search"
  1230. dropdownClassName="certain-category-search-dropdown"
  1231. dropdownMatchSelectWidth={false}
  1232. dropdownStyle={{ width: 200 }}
  1233. style={{ width: '200px' }}
  1234. dataSource={options}
  1235. placeholder="输入服务名称"
  1236. value={this.state.commodityName}
  1237. onChange={this.httpChange}
  1238. filterOption={true}
  1239. onSelect={this.selectAuto}
  1240. >
  1241. <Input/>
  1242. </AutoComplete>
  1243. <span className="mandatory">*</span>
  1244. </FormItem>
  1245. <FormItem className="half-item"
  1246. {...formItemLayout}
  1247. label="服务数量" >
  1248. <Input placeholder="请输入服务数量" value={this.state.commodityQuantity} style={{width:'200px'}}
  1249. onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} ref="commodityQuantity"/>
  1250. <span className="mandatory">*</span>
  1251. </FormItem>
  1252. <FormItem className="half-item"
  1253. {...formItemLayout}
  1254. label="实签价格(万元)" >
  1255. <Input placeholder="请输入实签价格" value={this.state.commodityPrice} style={{width:'200px'}}
  1256. onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} ref="commodityPrice"/>
  1257. <span className="mandatory">*</span>
  1258. </FormItem>
  1259. <FormItem className="half-item"
  1260. {...formItemLayout}
  1261. label="主要业务" >
  1262. <Select placeholder="选择是否为主要业务"
  1263. style={{ width:'200px'}}
  1264. value={this.state.main}
  1265. onChange={(e)=>{this.setState({main:e})}}>
  1266. {
  1267. boutique.map(function (item) {
  1268. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1269. })
  1270. }
  1271. </Select>
  1272. <span className="mandatory">*</span>
  1273. </FormItem>
  1274. <div className='clearfix'>
  1275. <FormItem
  1276. labelCol={{ span: 4 }}
  1277. wrapperCol={{ span: 16 }}
  1278. label="服务说明" >
  1279. <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment}
  1280. onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
  1281. </FormItem>
  1282. </div>
  1283. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1284. <Button className="submitSave" type="primary" htmlType="submit">保存</Button>
  1285. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1286. </FormItem>
  1287. </div>:
  1288. <div className='clearfix'>
  1289. <FormItem className="half-item"
  1290. {...formItemLayout}
  1291. label="项目名称" >
  1292. <span>{this.state.commodityName}</span>
  1293. </FormItem>
  1294. <FormItem className="half-item"
  1295. {...formItemLayout}
  1296. label="项目数量" >
  1297. <Input placeholder="请输入数量" value={this.state.commodityQuantity} style={{width:'200px'}}
  1298. onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} />
  1299. <span className="mandatory">*</span>
  1300. </FormItem>
  1301. <FormItem className="half-item"
  1302. {...formItemLayout}
  1303. label="金额(万元)" >
  1304. <Input placeholder="请输入签单金额" value={this.state.commodityPrice} style={{width:'200px'}}
  1305. onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} />
  1306. <span className="mandatory">*</span>
  1307. </FormItem>
  1308. <FormItem className="half-item"
  1309. {...formItemLayout}
  1310. label="主要项目" >
  1311. <Select placeholder="选择是否为主要业务"
  1312. style={{ width:'200px'}}
  1313. value={this.state.main}
  1314. onChange={(e)=>{this.setState({main:e})}}>
  1315. {
  1316. boutique.map(function (item) {
  1317. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1318. })
  1319. }
  1320. </Select>
  1321. <span className="mandatory">*</span>
  1322. </FormItem>
  1323. <div className='clearfix'>
  1324. <FormItem
  1325. labelCol={{ span: 4 }}
  1326. wrapperCol={{ span: 16 }}
  1327. label="服务说明" >
  1328. <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment}
  1329. onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
  1330. </FormItem>
  1331. </div>
  1332. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1333. <Button className="submitSave" type="primary" onClick={this.tabRowSave}>保存</Button>
  1334. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1335. </FormItem>
  1336. </div>}
  1337. </Spin>
  1338. </Form >
  1339. </Modal>
  1340. <Modal visible={this.state.rizhivisible}
  1341. className="admin-desc-content"
  1342. width='800px'
  1343. maskClosable={false}
  1344. title='订单日志'
  1345. footer={null}
  1346. onCancel={this.closeOrderLog}>
  1347. <div className="patent-table">
  1348. <Spin spinning={this.state.loading}>
  1349. <Table columns={this.state.columnsrizhi}
  1350. dataSource={this.state.dataSourcerizhi}
  1351. pagination={false}
  1352. />
  1353. </Spin>
  1354. </div>
  1355. </Modal>
  1356. </div>
  1357. </div>
  1358. );
  1359. }
  1360. }));
  1361. export default IntentionCustomer;