addService.jsx 56 KB

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