addService.jsx 64 KB

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