addService.jsx 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  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. checkedKeys: [],
  118. editFw:[],
  119. lookState:false,
  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. handleSubmit(e) {
  210. e.preventDefault();
  211. let theorgCodeUrl = [];
  212. if (this.state.orgCodeUrl.length) {
  213. let picArr = [];
  214. this.state.orgCodeUrl.map(function (item) {
  215. if ( item.response && item.response.data && item.response.data.length ){
  216. picArr.push(item.response.data);
  217. }
  218. });
  219. theorgCodeUrl = picArr.join(",");
  220. };
  221. if(this.props.userDetaile){
  222. if(!this.state.signTotalAmount){
  223. message.warning('请输入实签订单金额!');
  224. this.refs.signFirstPayment.focus()
  225. return false;
  226. };
  227. if(!this.state.signFirstPayment){
  228. message.warning('实签首款金额不能为空');
  229. this.refs.signFirstPayment.focus()
  230. return false;
  231. };
  232. }else{
  233. if(this.state.orderType==undefined){
  234. message.warning('请选择订单类型');
  235. return false;
  236. }
  237. if(this.state.autoId==undefined||!this.state.autoId){
  238. message.warning('客户名称不匹配');
  239. return false;
  240. };
  241. }
  242. this.props.form.validateFields((err, values) => {
  243. if(!err) {
  244. this.setState({
  245. loading: true
  246. });
  247. let api=this.props.userDetaile?'/api/admin/order/updateServiceOrder':'/api/admin/order/createOrder';
  248. $.ajax({
  249. method: "POST",
  250. dataType: "json",
  251. crossDomain: false,
  252. url: globalConfig.context + api,
  253. data: !this.props.userDetaile?{
  254. uid:this.state.autoId,
  255. orderType:this.state.orderType
  256. }:{
  257. orderNo:this.props.datauser.orderNo,
  258. // firstPayment:this.state.firstPayment,
  259. // orderAmount:this.state.orderAmount,
  260. signTotalAmount:this.state.signTotalAmount,
  261. signFirstPayment:this.state.signFirstPayment,
  262. orderRemarks:this.state.orderRemarks,
  263. //headPortraitUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  264. }
  265. }).done(function(data) {
  266. this.setState({
  267. loading: false
  268. });
  269. if(!data.error.length) {
  270. message.success('保存成功!');
  271. this.handleOk()
  272. } else {
  273. message.warning(data.error[0].message);
  274. }
  275. }.bind(this));
  276. }
  277. });
  278. },
  279. //查看基本详情基本信息
  280. loaduser(record){
  281. if(record){
  282. this.state.orderList=[]
  283. $.ajax({
  284. method: "get",
  285. dataType: "json",
  286. crossDomain: false,
  287. url: globalConfig.context + '/api/admin/order/getServiceOrderDetail',
  288. data: {
  289. orderNo: record.orderNo
  290. },
  291. success: function (data) {
  292. let thisData = data.data;
  293. if (!thisData) {
  294. if (data.error && data.error.length) {
  295. message.warning(data.error[0].message);
  296. };
  297. thisData = {};
  298. };
  299. this.setState({
  300. id:thisData.id,
  301. orderList:thisData,
  302. orderAmount:thisData.orderAmount,
  303. firstPayment:thisData.firstPayment,
  304. signTotalAmount:thisData.signTotalAmount,
  305. signFirstPayment:thisData.signFirstPayment,
  306. approval:thisData.approval==0?thisData.approval.toString():thisData.approval,
  307. orderRemarks:thisData.orderRemarks,
  308. orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
  309. //签单
  310. orderNo:thisData.orderNo,//订单编号
  311. buyerName:thisData.buyerName,
  312. });
  313. }.bind(this),
  314. }).always(function () {
  315. this.setState({
  316. loading: false
  317. });
  318. }.bind(this));
  319. }
  320. },
  321. handleOk(e) {
  322. this.setState({
  323. visible: false,
  324. });
  325. this.props.closeDesc(false, true);
  326. },
  327. handleCancel(e) {
  328. this.setState({
  329. visible: false,
  330. });
  331. this.props.closeDesc(false);
  332. },
  333. //删除
  334. delectRow(record) {
  335. this.setState({
  336. loading: true
  337. });
  338. $.ajax({
  339. method: "get",
  340. dataType: "json",
  341. crossDomain: false,
  342. url: globalConfig.context + "/api/admin/order/deleteOrderCommodity",
  343. data: {
  344. detailId:record.id
  345. }
  346. }).done(function (data) {
  347. if (!data.error.length) {
  348. message.success('删除成功!');
  349. this.setState({
  350. loading: false,
  351. });
  352. } else {
  353. message.warning(data.error[0].message);
  354. };
  355. this.loadData();
  356. }.bind(this));
  357. },
  358. //添加明细
  359. addDetailed(){
  360. this.setState({
  361. customerArr:[],
  362. commodityName:'',
  363. commodityId:'',
  364. commodityMode:'',
  365. commodityQuantity:'',
  366. commodityPrice:'',
  367. discountPrice:'',
  368. commodityFirstPayment:'',
  369. discountFirstPayment:'',
  370. remarks:'',
  371. addState:1,
  372. addnextVisible: true
  373. })
  374. },
  375. nextCancel() {
  376. this.setState({
  377. addnextVisible: false
  378. })
  379. },
  380. tableRowClick(record, index) {
  381. this.setState({
  382. editFw:record,
  383. addnextVisible:true,
  384. addState:0,
  385. });
  386. },
  387. getOrgCodeUrl(e) {
  388. this.setState({ orgCodeUrl: e });
  389. },
  390. componentWillMount() {
  391. },
  392. //查看订单详情里面的各种骚操作
  393. //受理订单
  394. admissibleOrderOK(){
  395. let idArr=this.props.datauser;
  396. this.props.admissibleOrder(idArr,true)
  397. },
  398. //拒绝受理
  399. admissibleOrderCancel(){
  400. let idArr=this.props.datauser;
  401. this.props.admissibleOrder(idArr,false)
  402. },
  403. //取消订单
  404. cancelOrder(){
  405. let idArr=this.props.datauser;
  406. this.props.operation(idArr,'cancelOrder')
  407. },
  408. //作废订单
  409. scrapOrder(){
  410. let idArr=this.props.datauser;
  411. this.props.operation(idArr,'scrapOrder')
  412. },
  413. //锁定订单
  414. lockOrder(){
  415. let idArr=this.props.datauser;
  416. this.props.operation(idArr,'lockOrder')
  417. },
  418. //解锁订单
  419. unlockOrder(){
  420. let idArr=this.props.datauser;
  421. this.props.operation(idArr,'unlockOrder')
  422. },
  423. //签单
  424. signBitt(){
  425. this.setState({
  426. signVisible:true
  427. })
  428. },
  429. signBittOk(){
  430. this.setState({
  431. signVisible:false
  432. })
  433. },
  434. signBillOk(){
  435. this.setState({
  436. signBillVisible:false
  437. })
  438. },
  439. signBillCancel(e) {
  440. this.setState({
  441. signVisible:false,
  442. signBillVisible: false,
  443. });
  444. this.props.closeDesc(false, true);
  445. },
  446. //加载(自动补全)
  447. supervisor(e,state){ //客户名称与服务名称自动补全
  448. let api=state?'/api/admin/customer/findCustomerByName':'/api/admin/order/getBusinessProjectByName';
  449. $.ajax({
  450. method: "get",
  451. dataType: "json",
  452. crossDomain: false,
  453. url: globalConfig.context + api,
  454. data:state?{
  455. name:e
  456. }:{
  457. businessName:e
  458. },
  459. success: function (data) {
  460. let thedata=data.data;
  461. if (!thedata) {
  462. if (data.error && data.error.length) {
  463. message.warning(data.error[0].message);
  464. };
  465. thedata = {};
  466. };
  467. this.setState({
  468. states:state,
  469. customerArr:thedata,
  470. });
  471. }.bind(this),
  472. }).always(function () {
  473. this.setState({
  474. loading: false
  475. });
  476. }.bind(this));
  477. },
  478. //上级主管输入框失去焦点是判断客户是否存在
  479. selectAuto(value){
  480. let kid=[];
  481. let fwList=this.state.customerArr;
  482. fwList.map(function(item){
  483. if(value==item.bname){
  484. kid=item
  485. }
  486. })
  487. this.setState({
  488. commodityName:value,
  489. commodityPrice:kid.price==0?kid.price.toString():kid.price,
  490. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  491. })
  492. },
  493. blurState(value){
  494. let kid;
  495. let fwList=this.state.customerArr;
  496. fwList.map(function(item){
  497. if(value==item.bname){
  498. kid=item.id
  499. }else{
  500. kid=''
  501. }
  502. })
  503. this.setState({
  504. kid:kid,
  505. })
  506. },
  507. //客户
  508. selectAutoCUT(value,options){
  509. this.setState({
  510. customerName:value,
  511. })
  512. },
  513. blurCutor(value){
  514. let autoIds;
  515. let fwList=this.state.customerArr;
  516. fwList.map(function(item){
  517. if(value==item.name){
  518. autoIds=item.id
  519. }else{
  520. autoIds=''
  521. }
  522. })
  523. this.setState({
  524. autoId:autoIds
  525. })
  526. },
  527. //服务值改变时请求客户名称
  528. httpChange(e){
  529. if(e.length>=1){
  530. this.supervisor(e,false);
  531. }
  532. this.setState({
  533. kid:'',
  534. commodityName:e
  535. })
  536. },
  537. //客户名称自动补全
  538. customerChange(e){
  539. if(e.length>=1){
  540. this.supervisor(e,true);
  541. }
  542. this.setState({
  543. autoId:'',
  544. customerName:e
  545. })
  546. },
  547. //新建明细保存
  548. nextSubmit(e) {
  549. e.preventDefault();
  550. if(this.state.kid==undefined||!this.state.kid){
  551. message.warning('商品名称不匹配!');
  552. return false;
  553. };
  554. if(!this.state.commodityPrice){
  555. message.warning('请输入市场价格!');
  556. this.refs.commodityPrice.focus();
  557. return false;
  558. };
  559. if(!this.state.discountPrice){
  560. message.warning('请输入实签价格!');
  561. this.refs.discountPrice.focus();
  562. return false;
  563. };
  564. if(!this.state.commodityQuantity){
  565. message.warning('请输入商品数量!');
  566. this.refs.commodityQuantity.focus();
  567. return false;
  568. };
  569. if(!this.state.commodityFirstPayment){
  570. message.warning('请输入市场首付金额!');
  571. this.refs.commodityFirstPayment.focus();
  572. return false;
  573. };
  574. if(!this.state.discountFirstPayment){
  575. message.warning('请输入签单首付金额!');
  576. this.refs.discountFirstPayment.focus();
  577. return false;
  578. };
  579. this.setState({
  580. loading: true
  581. });
  582. let api=this.state.addState?'/api/admin/order/addOrderCommodity':'/api/bianji';
  583. $.ajax({
  584. method: "POST",
  585. dataType: "json",
  586. crossDomain: false,
  587. url: globalConfig.context +api ,
  588. data: {
  589. commodityId:this.state.kid,
  590. orderNo:this.props.datauser.orderNo,
  591. commodityName:this.state.commodityName,//商品名称
  592. commodityMode:this.state.commodityMode,//商品规格
  593. commodityQuantity:this.state.commodityQuantity,//商品数量
  594. commodityType:0,//商品类型
  595. commodityPrice:this.state.commodityPrice,//市场总价
  596. discountPrice:this.state.discountPrice,//签单总价
  597. commodityFirstPayment:this.state.commodityFirstPayment,//市场首付金额
  598. discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
  599. remarks:this.state.remarks,//服务说明
  600. }
  601. }).done(function(data) {
  602. this.setState({
  603. loading: false
  604. });
  605. if(!data.error.length) {
  606. message.success('保存成功!');
  607. this.nextCancel()
  608. this.loaduser(this.props.datauser);
  609. this.loadData();
  610. } else {
  611. message.warning(data.error[0].message);
  612. }
  613. }.bind(this));
  614. },
  615. //签单保存
  616. signOk(e){
  617. e.preventDefault();
  618. this.temporarySave(false)
  619. },
  620. //暂存信息
  621. temporary(){
  622. this.temporarySave(true)
  623. },
  624. signSub(e){
  625. e.preventDefault();
  626. this.setState({
  627. loading: true
  628. });
  629. $.ajax({
  630. method: "POST",
  631. dataType: "json",
  632. crossDomain: false,
  633. url: globalConfig.context +'/api/admin/order/signServiceOrder' ,
  634. data: {
  635. orderNo:this.props.datauser.orderNo,
  636. signTotalAmount:this.state.signTotalAmount,
  637. signFirstPayment:this.state.signFirstPayment,
  638. approval:this.state.approval,
  639. orderRemarks:this.state.orderRemarks,
  640. }
  641. }).done(function(data) {
  642. this.setState({
  643. loading: false
  644. });
  645. if(!data.error.length) {
  646. message.success('操作成功!');
  647. this.signBillCancel()
  648. } else {
  649. message.warning(data.error[0].message);
  650. }
  651. }.bind(this));
  652. },
  653. //签单保存与暂存函数
  654. temporarySave(e){
  655. if(!this.state.signTotalAmount){
  656. message.warning('实签款项不能为空!')
  657. return false;
  658. };
  659. if(!this.state.signTotalAmount){
  660. message.warning('实签首款不能为空!')
  661. return false;
  662. };
  663. if(this.state.approval==undefined){
  664. message.warning('实签首款不能为空!')
  665. return false;
  666. };
  667. this.setState({
  668. loading: true
  669. });
  670. let api=e?'/api/admin/order/updateServiceOrder':'/api/admin/order/signServiceOrder';
  671. $.ajax({
  672. method: "POST",
  673. dataType: "json",
  674. crossDomain: false,
  675. url: globalConfig.context +api ,
  676. data: {
  677. orderNo:this.props.uid?this.props.uid.orderNo:this.props.datauser.orderNo,
  678. signTotalAmount:this.state.signTotalAmount,
  679. signFirstPayment:this.state.signFirstPayment,
  680. approval:this.state.approval,
  681. orderRemarks:this.state.orderRemarks,
  682. }
  683. }).done(function(data) {
  684. this.setState({
  685. loading: false
  686. });
  687. if(!data.error.length) {
  688. message.success('操作成功!');
  689. this.signBillCancel()
  690. } else {
  691. message.warning(data.error[0].message);
  692. }
  693. }.bind(this));
  694. },
  695. //查看项目、查看流水
  696. lookProject(){
  697. this.setState({
  698. lookState:true,
  699. lookVisible:true,
  700. });
  701. this.lookSee(true);
  702. },
  703. lookflow(){
  704. this.setState({
  705. lookState:false,
  706. lookVisible:true,
  707. });
  708. this.lookSee(false);
  709. },
  710. lookCancel(){
  711. this.setState({
  712. lookVisible:false
  713. })
  714. },
  715. //查看流失。项目列表
  716. lookSee(state) {
  717. this.state.lookSource=[];
  718. this.setState({
  719. loading: true
  720. });
  721. let api=state?'/api/xiangmu':'/api/liushui'
  722. $.ajax({
  723. method: "get",
  724. dataType: "json",
  725. crossDomain: false,
  726. url: globalConfig.context + api,
  727. data: {
  728. orderNo:this.props.datauser.orderNo
  729. },
  730. success: function (data) {
  731. let theArr = [];
  732. if (!data.data) {
  733. if (data.error && data.error.length) {
  734. message.warning(data.error[0].message);
  735. };
  736. } else {
  737. for (let i = 0; i < data.data.length; i++) {
  738. let thisdata = data.data[i];
  739. theArr.push({
  740. key: i,
  741. id:thisdata.id,
  742. orderNo:thisdata.orderNo,
  743. commodityName:thisdata.commodityName,
  744. commodityType:thisdata.commodityType,
  745. commodityMode:thisdata.commodityMode,
  746. commodityQuantity:thisdata.commodityQuantity,
  747. commodityPrice:thisdata.commodityPrice,
  748. discountPrice:thisdata.discountPrice,
  749. commodityFirstPayment:thisdata.commodityFirstPayment,
  750. createTimes:thisdata.createTimes,
  751. discountFirstPayment:thisdata.discountFirstPayment,
  752. remarks:thisdata.remarks,
  753. });
  754. };
  755. }
  756. this.setState({
  757. lookSource: theArr,
  758. });
  759. }.bind(this),
  760. }).always(function () {
  761. this.setState({
  762. loading: false
  763. });
  764. }.bind(this));
  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;