addService.jsx 52 KB

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