addService.jsx 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027
  1. import React from 'react';
  2. import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,Popconfirm,AutoComplete,DatePicker,Radio} 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,getProjectState,getOrderState,getTransactionProject,getChangeState,getPaymentState,getOrderChannel,getApprovedState,getLock,getPaymentMethod,getTransactionChannel,beforeUploadFile} 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. getDefaultProps(){
  19. return{
  20. changeClick:this.modifyChange
  21. }
  22. },
  23. handleCancel() {
  24. this.setState({ previewVisible: false })
  25. },
  26. handlePreview(file) {
  27. this.setState({
  28. previewImage: file.url || file.thumbUrl,
  29. previewVisible: true,
  30. });
  31. },
  32. handleChange(info) {
  33. let fileList = info.fileList;
  34. this.setState({ fileList });
  35. this.props.fileList(fileList);
  36. },
  37. componentWillReceiveProps(nextProps) {
  38. this.state.fileList = nextProps.pictureUrl;
  39. },
  40. render() {
  41. const { previewVisible, previewImage, fileList } = this.state;
  42. const uploadButton = (
  43. <div>
  44. <Icon type="plus" />
  45. <div className="ant-upload-text">点击上传</div>
  46. </div>
  47. );
  48. return (
  49. <div style={{display:"inline-block"}}>
  50. <Upload
  51. beforeUpload={beforeUploadFile}
  52. action={globalConfig.context + "/api/admin/order/uploadOrderImg"}
  53. data={{ 'sign': '' }}
  54. listType="picture-card"
  55. fileList={fileList}
  56. onPreview={this.handlePreview}
  57. onChange={this.handleChange} >
  58. {fileList.length >= 18 ? null : uploadButton}
  59. </Upload>
  60. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  61. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  62. </Modal>
  63. </div>
  64. );
  65. }
  66. });
  67. const NewService = Form.create()(React.createClass({
  68. loadData(record) {
  69. this.state.data = [];
  70. this.setState({
  71. loading: true
  72. });
  73. $.ajax({
  74. method: "get",
  75. dataType: "json",
  76. crossDomain: false,
  77. url: globalConfig.context + '/api/admin/order/getOrderCommodity',
  78. data: {
  79. orderNo:record?record.orderNo:this.props.datauser.orderNo
  80. },
  81. success: function (data) {
  82. let theArr = [];
  83. if (!data.data) {
  84. if (data.error && data.error.length) {
  85. message.warning(data.error[0].message);
  86. };
  87. } else {
  88. for (let i = 0; i < data.data.length; i++) {
  89. let thisdata = data.data[i];
  90. theArr.push({
  91. key: i,
  92. id:thisdata.id,
  93. orderNo:thisdata.orderNo,
  94. commodityName:thisdata.commodityName,
  95. commodityType:thisdata.commodityType,
  96. commodityMode:thisdata.commodityMode,
  97. commodityQuantity:thisdata.commodityQuantity,
  98. commodityPrice:thisdata.commodityPrice,
  99. discountPrice:thisdata.discountPrice,
  100. commodityFirstPayment:thisdata.commodityFirstPayment,
  101. createTimes:thisdata.createTimes,
  102. discountFirstPayment:thisdata.discountFirstPayment,
  103. remarks:thisdata.remarks,
  104. commodityId:thisdata.commodityId,
  105. });
  106. };
  107. }
  108. this.setState({
  109. dataSource: theArr,
  110. pagination: false,
  111. });
  112. }.bind(this),
  113. }).always(function () {
  114. this.setState({
  115. loading: false
  116. });
  117. }.bind(this));
  118. },
  119. getInitialState() {
  120. return {
  121. loading: false,
  122. visible: false,
  123. orgCodeUrl:[],
  124. customerArr:[],
  125. bussStats:false,
  126. checkedKeys: [],
  127. lookflowList:[],
  128. active:{
  129. applySign:false
  130. },
  131. editFw:[],
  132. lookState:false,
  133. signBillVisible:false,
  134. commod:'',
  135. columns: [
  136. {
  137. title: '业务项目名称',
  138. dataIndex: 'commodityName',
  139. key: 'commodityName'
  140. }, {
  141. title: '项目类别',
  142. dataIndex: 'commodityType',
  143. key: 'commodityType',
  144. render:(text)=>{
  145. return (getOrderType(text))
  146. }
  147. },{
  148. title: '项目数量',
  149. dataIndex: 'commodityQuantity',
  150. key: 'commodityQuantity'
  151. }, {
  152. title: '服务市价(万元)',
  153. dataIndex: 'commodityPrice',
  154. key: 'commodityPrice'
  155. }, {
  156. title: '实签价格(万元)',
  157. dataIndex: 'discountPrice',
  158. key: 'discountPrice'
  159. }, {
  160. title: '下单时间',
  161. dataIndex: 'createTimes',
  162. key: 'createTimes'
  163. }, {
  164. title: '项目说明',
  165. dataIndex: 'remarks',
  166. key: 'remarks',
  167. render:(text)=>{
  168. return (text&&text.length>8?text.substr(0,8)+'…':text)
  169. }
  170. }, {
  171. title: '操作',
  172. dataIndex: 'ABC',
  173. key: 'ABC',
  174. render: (text, record, index) => {
  175. return <div style={{display:this.props.datauser.active.applySign||this.state.changeStatus==1?'block':'none'}}>
  176. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.delectRow(record)}} okText="是" cancelText="否">
  177. <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  178. </Popconfirm>
  179. </div>
  180. }
  181. },
  182. ],
  183. flowList:[
  184. {
  185. title: '平台流水号',
  186. dataIndex: 'billNo',
  187. key: 'billNo',
  188. }, {
  189. title: '平台流水时间',
  190. dataIndex: 'createTime',
  191. key: 'createTime'
  192. }, {
  193. title: '流水金额(万元)',
  194. dataIndex: 'transactionAmount',
  195. key: 'transactionAmount'
  196. },{
  197. title: '付款人名称',
  198. dataIndex: 'payerName',
  199. key: 'payerName'
  200. }, {
  201. title: '收款人名称',
  202. dataIndex: 'payeeName',
  203. key: 'payeeName'
  204. },
  205. {
  206. title: '流水科目',
  207. dataIndex: 'transactionSubject',
  208. key: 'transactionSubject',
  209. render:(text)=>{return getTransactionProject(text) }
  210. }, {
  211. title: '流水渠道',
  212. dataIndex: 'transactionChannel',
  213. key: 'transactionChannel',
  214. render:(text)=>{return getTransactionChannel(text) }
  215. },{
  216. title: '财务流水号',
  217. dataIndex: 'financialPayNo',
  218. key: 'financialPayNo',
  219. }, {
  220. title: '财务流水时间',
  221. dataIndex: 'financialPayTime',
  222. key: 'financialPayTime',
  223. }, {
  224. title: '流水确认',
  225. dataIndex: 'confirmSign',
  226. key: 'confirmSign',
  227. render:(text)=>{return text?'已确认':'待确认' }
  228. },{
  229. title: '确认时间',
  230. dataIndex: 'confirmTime',
  231. key: 'confirmTime',
  232. }
  233. ],
  234. columnsrizhi:[
  235. {
  236. title:'流程',
  237. dataIndex: 'processName',
  238. key: 'processName'
  239. },
  240. {
  241. title:'操作人',
  242. dataIndex: 'adminName',
  243. key: 'adminName'
  244. },{
  245. title:'时间',
  246. dataIndex: 'createDate',
  247. key: 'createDate'
  248. }
  249. ],
  250. };
  251. },
  252. //新建订单、编辑订单保存
  253. handleSubmit(e) {
  254. e.preventDefault();
  255. let theorgCodeUrl = [];
  256. if (this.state.orgCodeUrl.length) {
  257. let picArr = [];
  258. this.state.orgCodeUrl.map(function (item) {
  259. if ( item.response && item.response.data && item.response.data.length ){
  260. picArr.push(item.response.data);
  261. }
  262. });
  263. theorgCodeUrl = picArr.join(",");
  264. };
  265. if(this.props.userDetaile){
  266. if(!this.state.signTotalAmount){
  267. message.warning('请输入实签订单金额!');
  268. this.refs.signFirstPayment.focus()
  269. return false;
  270. };
  271. if(!this.state.signFirstPayment){
  272. message.warning('实签首款金额不能为空');
  273. this.refs.signFirstPayment.focus()
  274. return false;
  275. };
  276. }else{
  277. if(this.state.orderType==undefined){
  278. message.warning('请选择订单类型');
  279. return false;
  280. };
  281. if(this.state.contractType==undefined&&this.state.orderType==0){
  282. message.warning('请选择业务品类');
  283. return false;
  284. };
  285. if(!this.state.autoId){
  286. message.warning('客户名称不匹配');
  287. return false;
  288. };
  289. }
  290. this.props.form.validateFields((err, values) => {
  291. if(!err) {
  292. this.setState({
  293. loading: true
  294. });
  295. let api=this.props.userDetaile?'/api/admin/order/updateServiceOrder':'/api/admin/order/createOrder';
  296. $.ajax({
  297. method: "POST",
  298. dataType: "json",
  299. crossDomain: false,
  300. url: globalConfig.context + api,
  301. data: !this.props.userDetaile?{
  302. uid:this.state.autoId,
  303. orderType:this.state.orderType,
  304. contractType:this.state.contractType
  305. }:{
  306. orderNo:this.props.datauser.orderNo,
  307. signTotalAmount:this.state.signTotalAmount,
  308. signFirstPayment:this.state.signFirstPayment,
  309. orderRemarks:this.state.orderRemarks,
  310. contractNo:this.state.contractNo,
  311. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  312. }
  313. }).done(function(data) {
  314. this.setState({
  315. loading: false
  316. });
  317. if(!data.error.length) {
  318. message.success('保存成功!');
  319. this.handleOk()
  320. } else {
  321. message.warning(data.error[0].message);
  322. }
  323. }.bind(this));
  324. }
  325. });
  326. },
  327. //查看基本详情基本信息
  328. loaduser(record){
  329. this.state.orderList=[]
  330. $.ajax({
  331. method: "get",
  332. dataType: "json",
  333. crossDomain: false,
  334. url: globalConfig.context + '/api/admin/order/getServiceOrderDetail',
  335. data: {
  336. orderNo:record?record.orderNo:this.props.datauser.orderNo
  337. },
  338. success: function (data) {
  339. let thisData = data.data;
  340. if (!thisData) {
  341. if (data.error && data.error.length) {
  342. message.warning(data.error[0].message);
  343. };
  344. thisData = {};
  345. };
  346. this.setState({
  347. id:thisData.id,
  348. changeStatus:thisData.changeStatus,
  349. orderList:thisData,
  350. orderAmount:thisData.orderAmount,
  351. firstPayment:thisData.firstPayment,
  352. signTotalAmount:thisData.signTotalAmount,
  353. signFirstPayment:thisData.signFirstPayment,
  354. approval:thisData.approval==0?thisData.approval.toString():thisData.approval,
  355. orderRemarks:thisData.orderRemarks,
  356. orgCodeUrl: thisData.contractPictureUrl ? splitUrl(thisData.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  357. //签单
  358. orderNo:thisData.orderNo,//订单编号
  359. buyerName:thisData.buyerName,
  360. contractNo:thisData.contractNo,
  361. buyerId:thisData.buyerId,
  362. });
  363. }.bind(this),
  364. }).always(function () {
  365. this.setState({
  366. loading: false
  367. });
  368. }.bind(this));
  369. },
  370. handleOk(e) {
  371. this.setState({
  372. visible: false,
  373. });
  374. this.props.closeDesc(false, true);
  375. },
  376. handleCancel(e) {
  377. this.setState({
  378. visible: false,
  379. });
  380. this.props.closeDesc(false);
  381. },
  382. //删除
  383. delectRow(record) {
  384. this.setState({
  385. loading: true
  386. });
  387. $.ajax({
  388. method: "get",
  389. dataType: "json",
  390. crossDomain: false,
  391. url: globalConfig.context + "/api/admin/order/deleteOrderCommodity",
  392. data: {
  393. detailId:record.id
  394. }
  395. }).done(function (data) {
  396. if (!data.error.length) {
  397. message.success('删除成功!');
  398. this.setState({
  399. loading: false,
  400. });
  401. this.loaduser()
  402. this.loadData();
  403. } else {
  404. message.warning(data.error[0].message);
  405. };
  406. }.bind(this));
  407. },
  408. //添加明细
  409. addDetailed(){
  410. this.setState({
  411. gid:'',
  412. customerArr:[],
  413. commodityName:'',
  414. commodityId:'',
  415. commodityMode:'',
  416. commodityQuantity:'',
  417. commodityPrice:'',
  418. discountPrice:'',
  419. commodityFirstPayment:'',
  420. discountFirstPayment:'',
  421. remarks:'',
  422. addState:1,
  423. addnextVisible: true
  424. })
  425. },
  426. rizhi(){
  427. console.log(this.state.orderNo)
  428. this.setState({
  429. loading:true
  430. })
  431. $.ajax({
  432. method: "get",
  433. dataType: "json",
  434. crossDomain: false,
  435. url: '/api/admin/newOrder/selectOrderLog',
  436. data: {
  437. orderNo:this.props.datauser.orderNo
  438. },
  439. success: function (data) {
  440. let theArr = [];
  441. let thisData = data.data;
  442. if (!thisData.length) {
  443. if (data.error && data.error.length) {
  444. message.warning(data.error[0].message);
  445. };
  446. thisData = {};
  447. }else{
  448. for(let i = 0; i < data.data.length; i++) {
  449. let thisdata = data.data[i];
  450. theArr.push({
  451. processName:thisdata.processName,
  452. adminName:thisdata.adminName,
  453. createDate:thisdata.createDate,
  454. });
  455. };
  456. };
  457. this.setState({
  458. dataSourcerizhi: theArr
  459. })
  460. }.bind(this),
  461. }).always(function () {
  462. this.setState({
  463. loading: false
  464. });
  465. }.bind(this));
  466. },
  467. //查看订单日志
  468. getOrderLog(){
  469. this.setState({
  470. rizhivisible:true
  471. })
  472. this.rizhi()
  473. },
  474. closeOrderLog(){
  475. this.setState({
  476. rizhivisible:false
  477. })
  478. },
  479. nextCancel() {
  480. this.setState({
  481. addnextVisible: false
  482. })
  483. },
  484. tableRowClick(record, index) {
  485. this.setState({
  486. active:this.props.datauser.active,
  487. editFw:record,
  488. jid:record.id,
  489. discountFirstPayment:record.discountFirstPayment,
  490. discountPrice:record.discountPrice,
  491. addnextVisible:true,
  492. addState:0,
  493. });
  494. },
  495. getOrgCodeUrl(e) {
  496. this.setState({ orgCodeUrl: e });
  497. },
  498. componentWillMount() {
  499. },
  500. //查看订单详情里面的各种骚操作
  501. //受理订单
  502. admissibleOrderOK(){
  503. let idArr=this.props.datauser;
  504. this.props.admissibleOrder(idArr,true)
  505. },
  506. //拒绝受理
  507. admissibleOrderCancel(){
  508. let idArr=this.props.datauser;
  509. this.props.admissibleOrder(idArr,false)
  510. },
  511. //取消订单
  512. cancelOrder(){
  513. let idArr=this.props.datauser;
  514. this.props.operation(idArr,3)
  515. },
  516. //作废订单
  517. scrapOrder(){
  518. let idArr=this.props.datauser;
  519. this.props.operation(idArr,2)
  520. },
  521. //锁定订单
  522. lockOrder(){
  523. let idArr=this.props.datauser;
  524. this.props.operation(idArr,0)
  525. },
  526. //解锁订单
  527. unlockOrder(){
  528. let idArr=this.props.datauser;
  529. this.props.operation(idArr,1)
  530. },
  531. //签单
  532. signBitt(){
  533. this.setState({
  534. contractNo:this.state.contractNo,
  535. signVisible:true,
  536. entryTime:undefined,
  537. selTime:undefined
  538. })
  539. },
  540. signBittOk(){
  541. this.setState({
  542. signVisible:false
  543. })
  544. },
  545. signBillOk(){
  546. this.setState({
  547. signBillVisible:false
  548. })
  549. },
  550. signBillCancel(e) {
  551. this.setState({
  552. signVisible:false,
  553. signBillVisible: false,
  554. });
  555. this.props.closeDesc(false, true);
  556. },
  557. //加载(自动补全)
  558. supervisor(e,state){ //客户名称与服务名称自动补全
  559. let api=state?'/api/admin/customer/getCustomerByName':'/api/admin/order/getBusinessProjectByName';
  560. $.ajax({
  561. method: "get",
  562. dataType: "json",
  563. crossDomain: false,
  564. url: globalConfig.context + api,
  565. data:state?{
  566. name:e,
  567. type:this.state.customType
  568. }:{
  569. businessName:e
  570. },
  571. success: function (data) {
  572. let thedata=data.data;
  573. if (!thedata) {
  574. if (data.error && data.error.length) {
  575. message.warning(data.error[0].message);
  576. };
  577. thedata = {};
  578. };
  579. this.setState({
  580. states:state,
  581. customerArr:thedata,
  582. });
  583. }.bind(this),
  584. }).always(function () {
  585. this.setState({
  586. loading: false
  587. });
  588. }.bind(this));
  589. },
  590. //上级主管输入框失去焦点是判断客户是否存在
  591. selectAuto(value){
  592. let kid=[];
  593. let fwList=this.state.customerArr;
  594. fwList.map(function(item){
  595. if(value==item.bname){
  596. kid=item
  597. }
  598. })
  599. this.setState({
  600. commodityName:value,
  601. gid:kid.id,
  602. commodityPrice:kid.price==0?kid.price.toString():kid.price,
  603. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  604. })
  605. },
  606. //客户
  607. selectAutoCUT(value){
  608. let autoIds;
  609. let fwList=this.state.customerArr;
  610. fwList.map(function(item){
  611. if(value==item.name){
  612. autoIds=item.id
  613. }
  614. })
  615. this.setState({
  616. customerName:value,
  617. autoId:autoIds
  618. })
  619. },
  620. //服务值改变时请求客户名称
  621. httpChange(e){
  622. this.state.gid='';
  623. if(e.length>=1){
  624. this.supervisor(e,false);
  625. }
  626. this.setState({
  627. commodityName:e
  628. })
  629. },
  630. //客户名称自动补全
  631. customerChange(e){
  632. this.state.autoId='';
  633. if(e.length>=2){
  634. this.supervisor(e,true);
  635. }
  636. this.setState({
  637. customerName:e
  638. })
  639. },
  640. //新建明细保存
  641. nextSubmit(e) {
  642. e.preventDefault();
  643. if(this.state.gid==undefined||!this.state.gid){
  644. message.warning('服务名称不匹配!');
  645. return false;
  646. };
  647. if(!this.state.commodityPrice){
  648. message.warning('请输入市场价格!');
  649. this.refs.commodityPrice.focus();
  650. return false;
  651. };
  652. if(!this.state.discountPrice){
  653. message.warning('请输入实签价格!');
  654. this.refs.discountPrice.focus();
  655. return false;
  656. };
  657. if(!this.state.commodityQuantity){
  658. message.warning('请输入商品数量!');
  659. this.refs.commodityQuantity.focus();
  660. return false;
  661. };
  662. if(!this.state.commodityFirstPayment){
  663. message.warning('请输入市场首付金额!');
  664. this.refs.commodityFirstPayment.focus();
  665. return false;
  666. };
  667. if(!this.state.discountFirstPayment){
  668. message.warning('请输入签单首付金额!');
  669. this.refs.discountFirstPayment.focus();
  670. return false;
  671. };
  672. this.setState({
  673. loading: true
  674. });
  675. let api=this.state.addState?'/api/admin/order/addOrderCommodity':'/api/bianji';
  676. $.ajax({
  677. method: "POST",
  678. dataType: "json",
  679. crossDomain: false,
  680. url: globalConfig.context +api ,
  681. data: {
  682. commodityId:this.state.gid,
  683. orderNo:this.props.datauser.orderNo,
  684. commodityName:this.state.commodityName,//商品名称
  685. commodityMode:this.state.commodityMode,//商品规格
  686. commodityQuantity:this.state.commodityQuantity,//商品数量
  687. commodityType:0,//商品类型
  688. commodityPrice:this.state.commodityPrice,//市场总价
  689. discountPrice:this.state.discountPrice,//签单总价
  690. commodityFirstPayment:this.state.commodityFirstPayment,//市场首付金额
  691. discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
  692. remarks:this.state.remarks,//服务说明
  693. }
  694. }).done(function(data) {
  695. this.setState({
  696. loading: false
  697. });
  698. if(!data.error.length) {
  699. message.success('保存成功!');
  700. this.nextCancel()
  701. this.loaduser(this.props.datauser);
  702. this.loadData();
  703. } else {
  704. message.warning(data.error[0].message);
  705. }
  706. }.bind(this));
  707. },
  708. tabRowSave(e){
  709. e.preventDefault();
  710. if(!this.state.discountPrice){
  711. message.warning('实签价格不能为空!');
  712. return false;
  713. };
  714. if(!this.state.discountFirstPayment){
  715. message.warning('签单首付金额不能为空!');
  716. return false;
  717. };
  718. $.ajax({
  719. method: "POST",
  720. dataType: "json",
  721. crossDomain: false,
  722. url: globalConfig.context +'/api/admin/order/updateOrderCommodity' ,
  723. data: {
  724. detailId:this.state.jid,
  725. orderNo:this.props.datauser.orderNo,
  726. discountPrice:this.state.discountPrice,//签单总价
  727. discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
  728. commodityQuantity:this.state.editFw.commodityQuantity,
  729. remarks:this.state.editFw.remarks
  730. }
  731. }).done(function(data) {
  732. this.setState({
  733. loading: false
  734. });
  735. if(!data.error.length) {
  736. message.success('保存成功!');
  737. this.nextCancel()
  738. this.loaduser(this.props.datauser);
  739. this.loadData();
  740. } else {
  741. message.warning(data.error[0].message);
  742. }
  743. }.bind(this));
  744. },
  745. //签单保存
  746. signOk(e){
  747. e.preventDefault();
  748. this.temporarySave(false)
  749. },
  750. //暂存信息
  751. temporary(){
  752. this.temporarySave(true)
  753. },
  754. //签单时间选择
  755. selTime(e,index){
  756. this.setState({
  757. entryTime:e,
  758. selTime:index
  759. })
  760. },
  761. signSub(e){
  762. e.preventDefault();
  763. if(!this.state.selTime){
  764. message.warning("请选择签单时间!");
  765. return false;
  766. };
  767. let theorgCodeUrl = [];
  768. if (this.state.orgCodeUrl.length) {
  769. let picArr = [];
  770. this.state.orgCodeUrl.map(function (item) {
  771. if ( item.response && item.response.data && item.response.data.length ){
  772. picArr.push(item.response.data);
  773. }
  774. });
  775. theorgCodeUrl = picArr.join(",");
  776. };
  777. this.setState({
  778. loading: true
  779. });
  780. let dataList=this.state.dataSource,
  781. idsList=[];
  782. dataList.map((item,index) => {
  783. console.log(item);
  784. console.log(this.state.commodityId);
  785. idsList.push({
  786. businessId:'',
  787. businessProjectId:item.commodityId,
  788. customerStatus:"1",
  789. followSituation:"5",
  790. remarks:"签单-自动触发"
  791. })
  792. })
  793. $.ajax({
  794. method: "POST",
  795. dataType: "json",
  796. crossDomain: false,
  797. url: globalConfig.context +'/api/admin/order/signServiceOrder' ,
  798. data: {
  799. userBusinessList: JSON.stringify(idsList),
  800. uid:this.state.buyerId,
  801. orderNo:this.props.datauser.orderNo,
  802. signTotalAmount:this.state.signTotalAmount,
  803. signFirstPayment:this.state.signFirstPayment,
  804. approval:this.state.approval,
  805. orderRemarks:this.state.orderRemarks,
  806. contractNo:this.state.contractNo,
  807. signTime:this.state.selTime,
  808. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  809. }
  810. }).done(function(data) {
  811. this.setState({
  812. loading: false
  813. });
  814. if(!data.error.length) {
  815. message.success('操作成功!');
  816. this.signBillCancel()
  817. } else {
  818. message.warning(data.error[0].message);
  819. }
  820. }.bind(this));
  821. },
  822. //签单保存与暂存函数
  823. temporarySave(e){
  824. if(!this.state.signTotalAmount){
  825. message.warning('实签款项不能为空!')
  826. return false;
  827. };
  828. if(!this.state.signTotalAmount){
  829. message.warning('实签首款不能为空!')
  830. return false;
  831. };
  832. if(this.state.approval==undefined){
  833. message.warning('实签首款不能为空!')
  834. return false;
  835. };
  836. if(!this.state.contractNo){
  837. message.warning("请输入合同编号!");
  838. return false;
  839. }
  840. this.setState({
  841. loading: true
  842. });
  843. let theorgCodeUrl = [];
  844. if (this.state.orgCodeUrl.length) {
  845. let picArr = [];
  846. this.state.orgCodeUrl.map(function (item) {
  847. if ( item.response && item.response.data && item.response.data.length ){
  848. picArr.push(item.response.data);
  849. }
  850. });
  851. theorgCodeUrl = picArr.join(",");
  852. };
  853. let api=e?'/api/admin/order/updateServiceOrder':'/api/admin/order/signServiceOrder';
  854. $.ajax({
  855. method: "POST",
  856. dataType: "json",
  857. crossDomain: false,
  858. url: globalConfig.context +api ,
  859. data: {
  860. orderNo:this.props.uid?this.props.uid.orderNo:this.props.datauser.orderNo,
  861. signTotalAmount:this.state.signTotalAmount,
  862. signFirstPayment:this.state.signFirstPayment,
  863. approval:this.state.approval,
  864. orderRemarks:this.state.orderRemarks,
  865. contractNo:this.state.contractNo,
  866. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  867. }
  868. }).done(function(data) {
  869. this.setState({
  870. loading: false
  871. });
  872. if(!data.error.length) {
  873. message.success('操作成功!');
  874. this.signBillCancel()
  875. } else {
  876. message.warning(data.error[0].message);
  877. }
  878. }.bind(this));
  879. },
  880. lookflow(){
  881. this.setState({
  882. loading: true,
  883. lookVisible:true,
  884. })
  885. this.state.lookSource=[];
  886. $.ajax({
  887. method: "get",
  888. dataType: "json",
  889. crossDomain: false,
  890. url: globalConfig.context +'/api/admin/order/getBillByOrderNo',
  891. data: {
  892. orderNo:this.props.datauser.orderNo,
  893. },
  894. success: function (data) {
  895. let theArr = [];
  896. if (!data.data) {
  897. if (data.error && data.error.length) {
  898. message.warning(data.error[0].message);
  899. };
  900. } else {
  901. for (let i = 0; i < data.data.length; i++) {
  902. let thisdata = data.data[i];
  903. theArr.push({
  904. key: i,
  905. billNo: thisdata.billNo,
  906. transactionAmount:thisdata.transactionAmount,
  907. createTime:thisdata.createTime,
  908. transactionAmount:thisdata.transactionAmount,
  909. payerName:thisdata.payerName,
  910. payeeName:thisdata.payeeName,
  911. transactionSubject:thisdata.transactionSubject,
  912. transactionChannel:thisdata.transactionChannel,
  913. financialPayNo:thisdata.financialPayNo,
  914. financialPayTime:thisdata.financialPayTime,
  915. orderNo:thisdata.orderNo,
  916. departmentName:thisdata.departmentName,
  917. salesmanName:thisdata.salesmanName,
  918. financeName:thisdata.financeName,
  919. confirmSign:thisdata.confirmSign,
  920. deleteSign:thisdata.deleteSign,
  921. confirmTime:thisdata.confirmTime
  922. });
  923. };
  924. };
  925. this.setState({
  926. lookflowList: theArr,
  927. });
  928. }.bind(this),
  929. }).always(function () {
  930. this.setState({
  931. loading: false
  932. });
  933. }.bind(this));
  934. },
  935. lookCancel(){
  936. this.setState({
  937. lookVisible:false
  938. })
  939. },
  940. /* -----变更操作开始----- */
  941. //新建变更
  942. addChange(){
  943. this.setState({
  944. addChangeState:true,
  945. stateAdd:1,
  946. changeRemarks:''
  947. })
  948. },
  949. //产看变更记录
  950. lookChange(){
  951. this.setState({
  952. addChangeState:true,
  953. stateAdd:0
  954. })
  955. this.lookChangeData()
  956. },
  957. //查看变更列表修改变更
  958. modifyChangeCancel(){
  959. this.setState({
  960. modifyChangeState:false
  961. })
  962. },
  963. //获取变更记录
  964. lookChangeData(){
  965. this.setState({
  966. loading:true
  967. });
  968. $.ajax({
  969. method: "get",
  970. dataType: "json",
  971. crossDomain: false,
  972. url: globalConfig.context +'/api/admin/order/viewOrderChange',
  973. data: {
  974. orderNo:this.props.datauser.orderNo,
  975. },
  976. success: function (data) {
  977. let theArr = [];
  978. if (!data.data) {
  979. if (data.error && data.error.length) {
  980. message.warning(data.error[0].message);
  981. };
  982. } else {
  983. for (let i = 0; i < data.data.length; i++) {
  984. theArr = data.data;
  985. };
  986. };
  987. this.setState({
  988. changeHtml: theArr,
  989. });
  990. }.bind(this),
  991. }).always(function () {
  992. this.setState({
  993. loading: false
  994. });
  995. }.bind(this));
  996. },
  997. //添加变更状态
  998. addChangeCancel(){
  999. this.setState({
  1000. addChangeState:false
  1001. })
  1002. },
  1003. //新建变更
  1004. subChangeState(e){
  1005. e.preventDefault();
  1006. this.setState({
  1007. loading: true
  1008. });
  1009. $.ajax({
  1010. method: "POST",
  1011. dataType: "json",
  1012. crossDomain: false,
  1013. url: globalConfig.context +'/api/admin/order/addOrderChange' ,
  1014. data: {
  1015. orderNo:this.props.datauser.orderNo,
  1016. changeComment:this.state.changeRemarks
  1017. }
  1018. }).done(function(data) {
  1019. this.setState({
  1020. loading: false
  1021. });
  1022. if(!data.error.length) {
  1023. message.success('保存成功!');
  1024. this.addChangeCancel();
  1025. this.loaduser();
  1026. } else {
  1027. message.warning(data.error[0].message);
  1028. }
  1029. }.bind(this));
  1030. },
  1031. //查看修改变更
  1032. modifyChange(item){
  1033. this.setState({
  1034. modifyChangeState:true,
  1035. changePromoter:item.creater,
  1036. changeTime:item.createTime,
  1037. changeState:item.changeStatus,
  1038. changeRemarks:item.changeComment,
  1039. idt:item.changeId,
  1040. orderNot:item.orderNo
  1041. })
  1042. },
  1043. //删除变更
  1044. modifyDelete(item){
  1045. this.setState({
  1046. loading: true
  1047. });
  1048. $.ajax({
  1049. method: "get",
  1050. dataType: "json",
  1051. crossDomain: false,
  1052. url: globalConfig.context +'/api/admin/order/deleteOrderChange' ,
  1053. data: {
  1054. changeId:item.changeId,
  1055. }
  1056. }).done(function(data) {
  1057. this.setState({
  1058. loading: false
  1059. });
  1060. if(!data.error.length) {
  1061. message.success('删除成功!');
  1062. this.lookChangeData();
  1063. this.loaduser()
  1064. } else {
  1065. message.warning(data.error[0].message);
  1066. }
  1067. }.bind(this));
  1068. },
  1069. //修改变更保存
  1070. changeModify(e){
  1071. e.preventDefault();
  1072. this.setState({
  1073. loading: true
  1074. });
  1075. $.ajax({
  1076. method: "POST",
  1077. dataType: "json",
  1078. crossDomain: false,
  1079. url: globalConfig.context +'/api/admin/order/updateOrderChange' ,
  1080. data: {
  1081. changeId:this.state.idt,
  1082. changeStatus:this.state.changeState,
  1083. changeComment:this.state.changeRemarks
  1084. }
  1085. }).done(function(data) {
  1086. this.setState({
  1087. loading: false
  1088. });
  1089. if(!data.error.length) {
  1090. message.success('保存成功!');
  1091. this.modifyChangeCancel();
  1092. this.lookChangeData();
  1093. this.loaduser()
  1094. } else {
  1095. message.warning(data.error[0].message);
  1096. }
  1097. }.bind(this));
  1098. },
  1099. /*-----变更操作结束----*/
  1100. //查看流失。项目列表
  1101. lookSee(state) {
  1102. this.state.lookSource=[];
  1103. this.setState({
  1104. loading: true
  1105. });
  1106. let api=state?'/api/xiangmu':'/api/liushui'
  1107. $.ajax({
  1108. method: "get",
  1109. dataType: "json",
  1110. crossDomain: false,
  1111. url: globalConfig.context + api,
  1112. data: {
  1113. orderNo:this.props.datauser.orderNo
  1114. },
  1115. success: function (data) {
  1116. let theArr = [];
  1117. if (!data.data) {
  1118. if (data.error && data.error.length) {
  1119. message.warning(data.error[0].message);
  1120. };
  1121. } else {
  1122. for (let i = 0; i < data.data.length; i++) {
  1123. let thisdata = data.data[i];
  1124. theArr.push({
  1125. key: i,
  1126. id:thisdata.id,
  1127. orderNo:thisdata.orderNo,
  1128. commodityName:thisdata.commodityName,
  1129. commodityType:thisdata.commodityType,
  1130. commodityMode:thisdata.commodityMode,
  1131. commodityQuantity:thisdata.commodityQuantity,
  1132. commodityPrice:thisdata.commodityPrice,
  1133. discountPrice:thisdata.discountPrice,
  1134. commodityFirstPayment:thisdata.commodityFirstPayment,
  1135. createTimes:thisdata.createTimes,
  1136. discountFirstPayment:thisdata.discountFirstPayment,
  1137. remarks:thisdata.remarks,
  1138. });
  1139. };
  1140. }
  1141. this.setState({
  1142. lookSource: theArr,
  1143. });
  1144. }.bind(this),
  1145. }).always(function () {
  1146. this.setState({
  1147. loading: false
  1148. });
  1149. }.bind(this));
  1150. },
  1151. //开单选择订单类型骚操作
  1152. orderTypeFn(e){
  1153. if(e==0){
  1154. this.setState({
  1155. bussStats:true,
  1156. orderType:e
  1157. })
  1158. this.category();
  1159. }else{
  1160. this.setState({
  1161. contractType:undefined,
  1162. bussStats:false,
  1163. orderType:e
  1164. })
  1165. }
  1166. },
  1167. //品类数据获取
  1168. category(){
  1169. $.ajax({
  1170. method: "get",
  1171. dataType: "json",
  1172. crossDomain: false,
  1173. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  1174. data: {
  1175. },
  1176. success: function(data) {
  1177. let thedata = data.data;
  1178. let theArr=[];
  1179. if(!thedata) {
  1180. if(data.error && data.error.length) {
  1181. message.warning(data.error[0].message);
  1182. };
  1183. thedata = {};
  1184. }else{
  1185. thedata.map(function(item,index){
  1186. theArr.push({
  1187. key:index,
  1188. name:item.cname,
  1189. id:item.id,
  1190. })
  1191. })
  1192. }
  1193. this.setState({
  1194. contractType:undefined,
  1195. categoryArr:theArr,
  1196. })
  1197. }.bind(this),
  1198. });
  1199. },
  1200. componentWillReceiveProps(nextProps) { //props改变时触发
  1201. this.state.visible = nextProps.showDesc;
  1202. this.state.signBillVisible=nextProps.signBillVisible;
  1203. if(this.state.signBillVisible){
  1204. this.loaduser(nextProps.uid)
  1205. };
  1206. if(nextProps.userDetaile && nextProps.showDesc) {
  1207. this.loaduser(nextProps.datauser);
  1208. this.loadData(nextProps.datauser);
  1209. }else{
  1210. this.setState({
  1211. orderType:undefined,
  1212. customerName:'',
  1213. autoId:'',
  1214. customerArr:[],
  1215. contractType:undefined,
  1216. bussStats:false,
  1217. customType:0
  1218. })
  1219. }
  1220. },
  1221. render() {
  1222. const FormItem = Form.Item
  1223. const formItemLayout = {
  1224. labelCol: { span: 8 },
  1225. wrapperCol: { span: 14 },
  1226. };
  1227. const changeHtml=this.state.changeHtml ||[];
  1228. const editFws=this.state.editFw;
  1229. const categoryList=this.state.categoryArr ||[];
  1230. const orderDetaiel=this.state.orderList || [];
  1231. const dataSources=this.state.customerArr || [];
  1232. const options = this.state.states?dataSources.map((group,index) =>
  1233. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1234. ):dataSources.map((group,index) =>
  1235. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  1236. )
  1237. return(
  1238. <div>
  1239. <Modal maskClosable={false} visible={this.state.visible}
  1240. onOk={this.handleOk} onCancel={this.handleCancel}
  1241. width={!this.props.userDetaile?'600px':'1000px'}
  1242. title={!this.props.userDetaile?'创建订单':'编辑订单'}
  1243. footer=''
  1244. className="admin-desc-content">
  1245. <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
  1246. <Spin spinning={this.state.loading}>
  1247. <div className="clearfix">
  1248. {!this.props.userDetaile?
  1249. <div className="clearfix">
  1250. <div className="clearfix">
  1251. <FormItem
  1252. {...formItemLayout}
  1253. label="订单类型" >
  1254. <Select placeholder="请选择订单类型"
  1255. style={{ width:'200px'}}
  1256. value={this.state.orderType}
  1257. onChange={this.orderTypeFn}>
  1258. {
  1259. orderType.map(function (item) {
  1260. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1261. })
  1262. }
  1263. </Select>
  1264. <span className="mandatory">*</span>
  1265. </FormItem>
  1266. </div>
  1267. {this.state.bussStats&&<div className="clearfix">
  1268. <FormItem
  1269. {...formItemLayout}
  1270. label="业务品类" >
  1271. <Select placeholder="请选择业务品类"
  1272. style={{ width:'200px'}}
  1273. value={this.state.contractType}
  1274. onChange={(e)=>{this.setState({contractType:e})}}>
  1275. {
  1276. categoryList.map(function (item) {
  1277. return <Select.Option key={item.id} >{item.name}</Select.Option>
  1278. })
  1279. }
  1280. </Select>
  1281. <span className="mandatory">*</span>
  1282. </FormItem>
  1283. </div>}
  1284. <FormItem
  1285. {...formItemLayout}
  1286. label="客户所属类型" >
  1287. <Radio.Group onChange={(e)=>{this.setState({customType:e.target.value,customerArr:[]})}} value={this.state.customType}>
  1288. <Radio value={0}>私有客户</Radio>
  1289. <Radio value={1}>已签单客户</Radio>
  1290. </Radio.Group>
  1291. </FormItem>
  1292. <div className="clearfix">
  1293. <FormItem
  1294. {...formItemLayout}
  1295. label="客户名称" >
  1296. <AutoComplete
  1297. className="certain-category-search"
  1298. dropdownClassName="certain-category-search-dropdown"
  1299. dropdownMatchSelectWidth={false}
  1300. dropdownStyle={{ width: 200 }}
  1301. size="large"
  1302. style={{ width: '200px' }}
  1303. dataSource={options}
  1304. placeholder="输入名称"
  1305. value={this.state.customerName}
  1306. onChange={this.customerChange}
  1307. filterOption={true}
  1308. onSelect={this.selectAutoCUT}
  1309. >
  1310. <Input/>
  1311. </AutoComplete>
  1312. <span className="mandatory">*</span>
  1313. </FormItem>
  1314. </div>
  1315. </div>:<div className="clearfix">
  1316. <FormItem className="half-item"
  1317. {...formItemLayout}
  1318. label="订单编号" >
  1319. <span>{orderDetaiel.orderNo}</span>
  1320. </FormItem>
  1321. <FormItem className="half-item"
  1322. {...formItemLayout}
  1323. label="下单时间" >
  1324. <span>{orderDetaiel.createTime}</span>
  1325. </FormItem>
  1326. <FormItem className="half-item"
  1327. {...formItemLayout}
  1328. label="客户名称" >
  1329. <span>{orderDetaiel.buyerName}</span>
  1330. </FormItem>
  1331. <FormItem className="half-item"
  1332. {...formItemLayout}
  1333. label="订单类型" >
  1334. <span>{getOrderType(orderDetaiel.orderType)}</span>
  1335. </FormItem>
  1336. <FormItem className="half-item"
  1337. {...formItemLayout}
  1338. label="订单渠道" >
  1339. <span>{getOrderChannel(orderDetaiel.orderChannel)}</span>
  1340. </FormItem>
  1341. <FormItem className="half-item"
  1342. {...formItemLayout}
  1343. label="订单状态" >
  1344. <span>{getOrderState(orderDetaiel.orderStatus)}</span>
  1345. </FormItem>
  1346. <FormItem className="half-item"
  1347. {...formItemLayout}
  1348. label="已收款项" >
  1349. <span>{orderDetaiel.actuallyTotalAmount+'万元'}</span>
  1350. </FormItem>
  1351. <FormItem className="half-item"
  1352. {...formItemLayout}
  1353. label="结算状态" >
  1354. <span>{getPaymentState(orderDetaiel.liquidationStatus)}</span>
  1355. </FormItem>
  1356. <FormItem className="half-item"
  1357. {...formItemLayout}
  1358. label="市价订单金额" >
  1359. <span>{orderDetaiel.orderAmount+'万元'}</span>
  1360. </FormItem>
  1361. <FormItem className="half-item"
  1362. {...formItemLayout}
  1363. label="市价首款金额" >
  1364. <span>{orderDetaiel.firstPayment+'万元'}</span>
  1365. </FormItem>
  1366. {orderDetaiel.deleteSign==0&&orderDetaiel.orderStatus==2||orderDetaiel.changeStatus==1?
  1367. <div className='clearfix'>
  1368. <FormItem className="half-item"
  1369. {...formItemLayout}
  1370. label="实签订单金额(万元)" >
  1371. <Input placeholder="实签订单金额" ref='signTotalAmount' value={this.state.signTotalAmount} onChange={(e)=>{this.setState({signTotalAmount:e.target.value})}} style={{width:'240px'}} />
  1372. <span className="mandatory">*</span>
  1373. </FormItem>
  1374. <FormItem className="half-item"
  1375. {...formItemLayout}
  1376. label="实签首款金额(万元)" >
  1377. <Input placeholder="请输入实签首款金额" ref='signFirstPayment' value={this.state.signFirstPayment} onChange={(e)=>{this.setState({signFirstPayment:e.target.value})}} style={{width:'240px'}} />
  1378. <span className="mandatory">*</span>
  1379. </FormItem>
  1380. <FormItem className="half-item"
  1381. {...formItemLayout}
  1382. label="特批立项" >
  1383. <span>{getApprovedState(this.state.approval)}</span>
  1384. </FormItem>
  1385. <FormItem className="half-item"
  1386. {...formItemLayout}
  1387. label="合同编号" >
  1388. <Input placeholder="请输入合同编号" value={this.state.contractNo}
  1389. onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'240px'}} />
  1390. </FormItem>
  1391. <div className='clearfix'>
  1392. <FormItem
  1393. labelCol={{ span: 4 }}
  1394. wrapperCol={{ span: 18 }}
  1395. label={
  1396. <span>
  1397. <strong style={{ color: '#f00' }}>*</strong>合同扫描件
  1398. </span>
  1399. }
  1400. >
  1401. <PicturesWall
  1402. fileList={this.getOrgCodeUrl}
  1403. pictureUrl={this.state.orgCodeUrl} />
  1404. <p>图片建议:要清晰。</p>
  1405. <Button style={{ float:"right" , marginRight:'140px' , marginTop:'20px'}}
  1406. onClick={this.getOrderLog}
  1407. >查看订单 日志</Button>
  1408. </FormItem>
  1409. </div>
  1410. <div className='clearfix'>
  1411. <FormItem
  1412. labelCol={{ span: 4 }}
  1413. wrapperCol={{ span: 16 }}
  1414. label="订单留言" >
  1415. <Input type="textarea" placeholder="请输入订单留言" rows={4} value={this.state.orderRemarks}
  1416. onChange={(e)=>{this.setState({orderRemarks:e.target.value})}}/>
  1417. </FormItem>
  1418. </div>
  1419. <div className='clearfix'>
  1420. <div className="changeStatusTxt">
  1421. <FormItem className="half-item"
  1422. {...formItemLayout}
  1423. style={{color:'red'}}
  1424. label="变更状态" >
  1425. <span>{getChangeState(orderDetaiel.changeStatus)}</span>
  1426. </FormItem>
  1427. </div>
  1428. {orderDetaiel.orderStatus>=3&&<div className="clearfix">
  1429. <FormItem className="half-item"
  1430. {...formItemLayout}
  1431. label="变更操作" >
  1432. <Button onClick={this.addChange}>添加变更</Button>
  1433. </FormItem>
  1434. <FormItem className="half-item"
  1435. {...formItemLayout}
  1436. label="变更操作" >
  1437. <Button onClick={this.lookChange}>查看变更纪录</Button>
  1438. </FormItem>
  1439. </div>}
  1440. </div>
  1441. </div>:
  1442. <div className='clearfix'>
  1443. <FormItem className="half-item"
  1444. {...formItemLayout}
  1445. label="实签订单金额" >
  1446. <span>{orderDetaiel.signTotalAmount+'万元'}</span>
  1447. </FormItem>
  1448. <FormItem className="half-item"
  1449. {...formItemLayout}
  1450. label="实签首款金额" >
  1451. <span>{orderDetaiel.signFirstPayment+'万元'}</span>
  1452. </FormItem>
  1453. <FormItem className="half-item"
  1454. {...formItemLayout}
  1455. label="特批立项" >
  1456. <span>{getApprovedState(orderDetaiel.approval)}</span>
  1457. </FormItem>
  1458. <FormItem className="half-item"
  1459. {...formItemLayout}
  1460. label="合同编号" >
  1461. <span>{orderDetaiel.contractNo}</span>
  1462. </FormItem>
  1463. <div className="clearfix">
  1464. <FormItem
  1465. labelCol={{ span: 4 }}
  1466. wrapperCol={{ span: 18 }}
  1467. label="合同扫描件" >
  1468. <Upload className="demandDetailShow-upload"
  1469. beforeUpload={beforeUploadFile}
  1470. listType="picture-card"
  1471. fileList={this.state.orgCodeUrl}
  1472. onPreview={(file) => {
  1473. this.setState({
  1474. previewImage: file.url || file.thumbUrl,
  1475. previewVisible: true,
  1476. });
  1477. }} >
  1478. </Upload>
  1479. <Modal maskClosable={false} footer={null}
  1480. visible={this.state.previewVisible}
  1481. onCancel={() => { this.setState({ previewVisible: false }) }}>
  1482. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  1483. </Modal>
  1484. <Button style={{ float:"right" , marginRight:'140px' , marginTop:'20px'}}
  1485. onClick={this.getOrderLog}
  1486. >查看订单 日志</Button>
  1487. </FormItem>
  1488. </div>
  1489. <div className='clearfix'>
  1490. <FormItem
  1491. labelCol={{ span: 4 }}
  1492. wrapperCol={{ span: 16 }}
  1493. label="订单留言" >
  1494. <span>{orderDetaiel.orderRemarks}</span>
  1495. </FormItem>
  1496. </div>
  1497. <div className='clearfix changeStatusTxt'>
  1498. <FormItem className="half-item"
  1499. {...formItemLayout}
  1500. style={{color:'red'}}
  1501. label="变更状态" >
  1502. <span>{getChangeState(orderDetaiel.changeStatus)}</span>
  1503. </FormItem>
  1504. </div>
  1505. {orderDetaiel.orderStatus>=3&&<div className="clearfix">
  1506. <FormItem className="half-item"
  1507. {...formItemLayout}
  1508. label="变更操作" >
  1509. <Button onClick={this.addChange}>添加变更</Button>
  1510. </FormItem>
  1511. <FormItem className="half-item"
  1512. {...formItemLayout}
  1513. label="变更操作" >
  1514. <Button onClick={this.lookChange}>查看变更纪录</Button>
  1515. </FormItem>
  1516. </div>}
  1517. </div>}
  1518. <div className='clearfix'>
  1519. <FormItem className="half-item"
  1520. {...formItemLayout}
  1521. label="订单负责人" >
  1522. <span>{orderDetaiel.salesmanName}</span>
  1523. </FormItem>
  1524. <FormItem className="half-item"
  1525. {...formItemLayout}
  1526. label="业务品类" >
  1527. <span>{orderDetaiel.projectType}</span>
  1528. </FormItem>
  1529. </div>
  1530. <div className='clearfix'>
  1531. <FormItem className="half-item"
  1532. {...formItemLayout}
  1533. label="意向时间" >
  1534. <span>{orderDetaiel.createTime}</span>
  1535. </FormItem>
  1536. <FormItem className="half-item"
  1537. {...formItemLayout}
  1538. label="签单时间" >
  1539. <span>{orderDetaiel.signTime}</span>
  1540. </FormItem>
  1541. <FormItem className="half-item"
  1542. {...formItemLayout}
  1543. label="财务负责人" >
  1544. <span>{orderDetaiel.financeName}</span>
  1545. <Button onClick={this.lookflow} style={{float:'right'}}>查看流水</Button>
  1546. </FormItem>
  1547. <FormItem className="half-item"
  1548. {...formItemLayout}
  1549. label="项目负责人" >
  1550. <span>{orderDetaiel.technicianName}</span>
  1551. </FormItem>
  1552. <FormItem className="half-item"
  1553. {...formItemLayout}
  1554. label="立项时间" >
  1555. <span>{orderDetaiel.setUpTime}</span>
  1556. </FormItem>
  1557. <FormItem className="half-item"
  1558. {...formItemLayout}
  1559. label="项目状态" >
  1560. <span>{getProjectState(orderDetaiel.projectStage)}</span>
  1561. </FormItem>
  1562. </div>
  1563. <div>
  1564. <span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
  1565. {this.props.datauser.active.applySign||orderDetaiel.changeStatus==1?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加明细</Button>:''}
  1566. </div>
  1567. <div className="patent-table">
  1568. <Spin spinning={this.state.loading}>
  1569. <Table columns={this.state.columns}
  1570. dataSource={this.state.dataSource}
  1571. pagination={this.state.pagination}
  1572. onRowClick={this.tableRowClick}
  1573. />
  1574. </Spin>
  1575. </div>
  1576. </div>}
  1577. <div className='addSave' style={{marginTop:'15px'}}>
  1578. {!this.props.userDetaile||orderDetaiel.deleteSign==0&&orderDetaiel.orderStatus==2||orderDetaiel.changeStatus==1?<Button className="setSave" type="primary" htmlType="submit">保存</Button>:''}
  1579. {this.props.userDetaile?<div className='operations'>
  1580. {this.props.datauser.active.confirmIntention&&<Popconfirm title={'请确认您是否受理来自【'+this.props.datauser.buyerName+'】发起的服务意向订单?'} onConfirm={(e)=>{this.admissibleOrderOK()}} onCancel={(e)=>{this.admissibleOrderCancel()}} okText="同意" cancelText="拒绝">
  1581. <Button style={{marginRight:'15px',marginLeft:'200px'}} type="primary">受理意向</Button>
  1582. </Popconfirm>}
  1583. {this.props.datauser.active.applySign&&<Button style={{marginRight:'10px'}} onClick={(e) =>{this.signBitt()}} type="primary">签单</Button>}
  1584. {this.props.datauser.active.applyForCancel&&<Popconfirm title={'请确认您是否取消客户【'+this.props.datauser.buyerName+'】的服务订单,订单取消将导致业务终止!'} onConfirm={(e)=>{this.cancelOrder()}} okText="确认" cancelText="取消">
  1585. <Button style={{marginRight:'10px'}} type="danger">取消订单</Button>
  1586. </Popconfirm>}
  1587. {this.props.datauser.active.applyRevoke&&<Popconfirm title={'请确认您是否作废客户【'+this.props.datauser.buyerName+'】的服务订单,订单作废将导致订单失效!'} onConfirm={(e)=>{this.scrapOrder()}} okText="确认" cancelText="取消">
  1588. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">作废</Button>
  1589. </Popconfirm>}
  1590. {this.props.datauser.active.applyLock&&<Popconfirm title={'请确认您是否锁定客户【'+this.props.datauser.buyerName+'】的服务订单,订单锁定将导致订单暂停!'} onConfirm={(e)=>{this.lockOrder()}} okText="确认" cancelText="取消">
  1591. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">锁定</Button>
  1592. </Popconfirm>}
  1593. {this.props.datauser.active.applyUnLock&&<Popconfirm title={'请确认您是否解锁客户【'+this.props.datauser.buyerName+'】的服务订单,订单解锁将导致订单正常!'} onConfirm={(e)=>{this.unlockOrder()}} okText="确认" cancelText="取消">
  1594. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="primary">解锁</Button>
  1595. </Popconfirm>}
  1596. </div>:''}
  1597. <Button className="cancel" type="ghost" onClick={this.handleCancel} style={{float:'right',marginRight:'200px'}}>返回</Button>
  1598. </div>
  1599. </div>
  1600. </Spin>
  1601. </Form >
  1602. </Modal>
  1603. <Modal maskClosable={false} visible={this.state.addnextVisible}
  1604. onOk={this.nextCancel} onCancel={this.nextCancel}
  1605. width='800px'
  1606. title={this.state.addState?'添加服务':'服务详情'}
  1607. footer=''
  1608. className="admin-desc-content">
  1609. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1610. <Spin spinning={this.state.loading}>
  1611. {this.state.addState?<div className="clearfix">
  1612. <FormItem className="half-item"
  1613. {...formItemLayout}
  1614. label="服务名称" >
  1615. <AutoComplete
  1616. className="certain-category-search"
  1617. dropdownClassName="certain-category-search-dropdown"
  1618. dropdownMatchSelectWidth={false}
  1619. dropdownStyle={{ width: 200 }}
  1620. style={{ width: '200px' }}
  1621. dataSource={options}
  1622. placeholder="输入服务名称"
  1623. value={this.state.commodityName}
  1624. onChange={this.httpChange}
  1625. filterOption={true}
  1626. onSelect={this.selectAuto}
  1627. >
  1628. <Input/>
  1629. </AutoComplete>
  1630. <span className="mandatory">*</span>
  1631. </FormItem>
  1632. <FormItem className="half-item"
  1633. {...formItemLayout}
  1634. label="市场价格(万元)" >
  1635. <span>{this.state.commodityPrice}</span>
  1636. </FormItem>
  1637. <FormItem className="half-item"
  1638. {...formItemLayout}
  1639. label="实签价格(万元)" >
  1640. <Input placeholder="请输入实签价格" value={this.state.discountPrice} style={{width:'200px'}}
  1641. onChange={(e)=>{this.setState({discountPrice:e.target.value})}} ref="discountPrice"/>
  1642. <span className="mandatory">*</span>
  1643. </FormItem>
  1644. <FormItem className="half-item"
  1645. {...formItemLayout}
  1646. label="服务数量" >
  1647. <Input placeholder="请输入服务数量" value={this.state.commodityQuantity} style={{width:'200px'}}
  1648. onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} ref="commodityQuantity"/>
  1649. <span className="mandatory">*</span>
  1650. </FormItem>
  1651. <FormItem className="half-item"
  1652. {...formItemLayout}
  1653. label="市场首付金额(万元)" >
  1654. <span>{this.state.commodityFirstPayment}</span>
  1655. </FormItem>
  1656. <FormItem className="half-item"
  1657. {...formItemLayout}
  1658. label="签单首付金额(万元)" >
  1659. <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
  1660. onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} ref='discountFirstPayment'/>
  1661. <span className="mandatory">*</span>
  1662. </FormItem>
  1663. <div className='clearfix'>
  1664. <FormItem
  1665. labelCol={{ span: 4 }}
  1666. wrapperCol={{ span: 16 }}
  1667. label="服务说明" >
  1668. <Input type='textarea' placeholder="请输入服务说明" value={this.state.remarks}
  1669. onChange={(e)=>{this.setState({remarks:e.target.value})}} />
  1670. </FormItem>
  1671. </div>
  1672. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1673. <Button className="submitSave" type="primary" htmlType="submit">保存</Button>
  1674. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1675. </FormItem>
  1676. </div>:
  1677. <div className='clearfix'>
  1678. <FormItem className="half-item"
  1679. {...formItemLayout}
  1680. label="服务名称" >
  1681. <span>{editFws.commodityName}</span>
  1682. </FormItem>
  1683. <FormItem className="half-item"
  1684. {...formItemLayout}
  1685. label="市场价格" >
  1686. <span>{editFws.commodityPrice+'万元'}</span>
  1687. </FormItem>
  1688. <FormItem className="half-item"
  1689. {...formItemLayout}
  1690. label="市场首付金额" >
  1691. <span>{editFws.commodityFirstPayment+'万元'}</span>
  1692. </FormItem>
  1693. {this.state.active.applySign?<FormItem className="half-item"
  1694. {...formItemLayout}
  1695. label="实签价格(万元)" >
  1696. <Input placeholder="请输入签单首付金额" value={this.state.discountPrice} style={{width:'200px'}}
  1697. onChange={(e)=>{this.setState({discountPrice:e.target.value})}} />
  1698. <span className="mandatory">*</span>
  1699. </FormItem>:
  1700. <FormItem className="half-item"
  1701. {...formItemLayout}
  1702. label="实签价格" >
  1703. <span>{this.state.discountPrice+'万元'}</span>
  1704. </FormItem>}
  1705. <FormItem className="half-item"
  1706. {...formItemLayout}
  1707. label="服务数量" >
  1708. <span>{editFws.commodityQuantity}</span>
  1709. </FormItem>
  1710. {this.state.active.applySign?<FormItem className="half-item"
  1711. {...formItemLayout}
  1712. label="签单首付金额(万元)" >
  1713. <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
  1714. onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} />
  1715. <span className="mandatory">*</span>
  1716. </FormItem>:
  1717. <FormItem className="half-item"
  1718. {...formItemLayout}
  1719. label="签单首付金额" >
  1720. <span>{this.state.discountFirstPayment+'万元'}</span>
  1721. </FormItem>}
  1722. <div className='clearfix'>
  1723. <FormItem
  1724. labelCol={{ span: 4 }}
  1725. wrapperCol={{ span: 16 }}
  1726. label="服务说明" >
  1727. <span>{editFws.remarks}</span>
  1728. </FormItem>
  1729. </div>
  1730. {this.state.active.applySign&&<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1731. <Button className="submitSave" type="primary" onClick={this.tabRowSave}>保存</Button>
  1732. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1733. </FormItem>}
  1734. </div>}
  1735. </Spin>
  1736. </Form >
  1737. </Modal>
  1738. <Modal maskClosable={false} visible={this.state.signBillVisible}
  1739. onOk={this.signBillOk} onCancel={this.signBillOk}
  1740. width='800px'
  1741. title='签单信息'
  1742. footer=''
  1743. className="admin-desc-content">
  1744. <Form layout="horizontal" onSubmit={this.signOk} id="demand-form">
  1745. <Spin spinning={this.state.loading}>
  1746. <div className="clearfix">
  1747. <FormItem className="half-item"
  1748. {...formItemLayout}
  1749. label="订单编号" >
  1750. <span>{this.state.orderNo}</span>
  1751. </FormItem>
  1752. <FormItem className="half-item"
  1753. {...formItemLayout}
  1754. label="客户名称" >
  1755. <span>{this.state.buyerName}</span>
  1756. </FormItem>
  1757. <FormItem className="half-item"
  1758. {...formItemLayout}
  1759. label="实签款项(万元)" >
  1760. <Input placeholder="请输入实签款项" value={this.state.signTotalAmount} style={{width:'200px'}}
  1761. onChange={(e)=>{this.setState({signTotalAmount:e.target.value})}} />
  1762. <span className="mandatory">*</span>
  1763. </FormItem>
  1764. <FormItem className="half-item"
  1765. {...formItemLayout}
  1766. label="实签首款(万元)" >
  1767. <Input placeholder="请输入实签首款" value={this.state.signFirstPayment} style={{width:'200px'}}
  1768. onChange={(e)=>{this.setState({signFirstPayment:e.target.value})}} />
  1769. <span className="mandatory">*</span>
  1770. </FormItem>
  1771. <FormItem className="half-item"
  1772. {...formItemLayout}
  1773. label="特批立项" >
  1774. <Select placeholder="选择特批立项类型"
  1775. style={{ width:'200px'}}
  1776. value={this.state.approval}
  1777. onChange={(e) => { this.setState({ approval: e }) }}>
  1778. <Select.Option value='0'>不申请特批</Select.Option>
  1779. <Select.Option value='1'>申请特批</Select.Option>
  1780. </Select>
  1781. <span className="mandatory">*</span>
  1782. </FormItem>
  1783. <FormItem className="half-item"
  1784. {...formItemLayout}
  1785. label="合同编号" >
  1786. <Input placeholder="请输入合同编号" value={this.state.contractNo}
  1787. onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'200px'}} />
  1788. <span className="mandatory">*</span>
  1789. </FormItem>
  1790. <div className='clearfix'>
  1791. <FormItem
  1792. labelCol={{ span: 4 }}
  1793. wrapperCol={{ span: 16 }}
  1794. label="签单备注" >
  1795. <Input type="textarea" placeholder="请输入签单备注" rows={4} value={this.state.orderRemarks}
  1796. onChange={(e)=>{this.setState({orderRemarks:e.target.value})}}/>
  1797. </FormItem>
  1798. </div>
  1799. <div className='clearfix'>
  1800. <FormItem
  1801. labelCol={{ span: 4 }}
  1802. wrapperCol={{ span: 18 }}
  1803. label="合同扫描件" >
  1804. <PicturesWall
  1805. listType="picture-card"
  1806. fileList={this.getOrgCodeUrl}
  1807. pictureUrl={this.state.orgCodeUrl} />
  1808. <p>图片建议:要清晰。</p>
  1809. </FormItem>
  1810. </div>
  1811. </div>
  1812. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1813. <Button className="submitSave" type="primary" htmlType="submit">确定签单</Button>
  1814. <Button className="submitSave" type="ghost" onClick={this.signBillOk}>返回</Button>
  1815. </FormItem>
  1816. </Spin>
  1817. </Form >
  1818. </Modal>
  1819. <Modal maskClosable={false} visible={this.state.signVisible}
  1820. onOk={this.signBittOk} onCancel={this.signBittOk}
  1821. width='600px'
  1822. title='签单信息'
  1823. footer=''
  1824. className="admin-desc-content">
  1825. <Form layout="horizontal" onSubmit={this.signSub} id="demand-form">
  1826. <Spin spinning={this.state.loading}>
  1827. <div className="clearfix">
  1828. <FormItem
  1829. {...formItemLayout}
  1830. label="特批立项" >
  1831. <Select placeholder="选择特批立项类型"
  1832. style={{ width:'200px'}}
  1833. value={this.state.approval}
  1834. onChange={(e) => { this.setState({ approval: e }) }}>
  1835. <Select.Option value='0'>不申请特批</Select.Option>
  1836. <Select.Option value='1'>申请特批</Select.Option>
  1837. </Select>
  1838. <span className="mandatory">*</span>
  1839. </FormItem>
  1840. </div>
  1841. <div className="clearfix">
  1842. <FormItem
  1843. {...formItemLayout}
  1844. label="签单时间" >
  1845. <DatePicker
  1846. style={{marginTop:"2px"}}
  1847. showTime
  1848. format="YYYY-MM-DD"
  1849. placeholder="选择签单时间"
  1850. value={this.state.entryTime}
  1851. onChange={(e,time)=>{this.selTime(e,time)}}
  1852. />
  1853. <span className="mandatory">*</span>
  1854. </FormItem>
  1855. </div>
  1856. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1857. <Button className="submitSave" type="primary" htmlType="submit">确定签单</Button>
  1858. <Button className="submitSave" type="ghost" onClick={this.signBittOk}>返回</Button>
  1859. </FormItem>
  1860. </Spin>
  1861. </Form >
  1862. </Modal>
  1863. <Modal maskClosable={false} visible={this.state.lookVisible}
  1864. onOk={this.lookCancel} onCancel={this.lookCancel}
  1865. width='1300px'
  1866. title= '查看流水'
  1867. footer=''
  1868. className="admin-desc-content">
  1869. <Form layout="horizontal" id="demand-form">
  1870. <Spin spinning={this.state.loading}>
  1871. <div className="clearfix">
  1872. <Table columns={this.state.flowList}
  1873. dataSource={this.state.lookflowList}
  1874. pagination={false}
  1875. />
  1876. </div>
  1877. </Spin>
  1878. </Form >
  1879. </Modal>
  1880. <Modal maskClosable={false} visible={this.state.addChangeState}
  1881. onOk={this.addChangeCancel} onCancel={this.addChangeCancel}
  1882. width='800px'
  1883. title= {this.state.stateAdd?'添加变更':'查看变更记录'}
  1884. footer=''
  1885. className="admin-desc-content">
  1886. <Form layout="horizontal" id="demand-form">
  1887. <Spin spinning={this.state.loading}>
  1888. <div className="clearfix">
  1889. {this.state.stateAdd?<div className="clearfix">
  1890. <FormItem
  1891. labelCol={{ span: 4 }}
  1892. wrapperCol={{ span: 16 }}
  1893. label="变更说明" >
  1894. <Input type="textarea" placeholder="请输入变更说明" rows={4} value={this.state.changeRemarks}
  1895. onChange={(e)=>{this.setState({changeRemarks:e.target.value})}}/>
  1896. </FormItem>
  1897. <div className="clearfix">
  1898. <Button type="primary" onClick={this.subChangeState} style={{margin:"10px 50px 10px 128px"}}>保存</Button>
  1899. <Button onClick={this.addChangeCancel}>取消</Button>
  1900. </div>
  1901. </div>:
  1902. <div>
  1903. {
  1904. changeHtml.length?changeHtml.map(function(item,index){
  1905. return (<div className="changeBorder" key={index}>
  1906. <FormItem className="half-item"
  1907. {...formItemLayout}
  1908. label="变更发起人" >
  1909. <span>{item.creater}</span>
  1910. </FormItem>
  1911. <FormItem className="half-item"
  1912. {...formItemLayout}
  1913. label="变更申请时间" >
  1914. <span>{item.createTime}</span>
  1915. </FormItem>
  1916. <div className='clearfix'>
  1917. <FormItem className="half-item"
  1918. {...formItemLayout}
  1919. label="变更状态" >
  1920. <span>{getChangeState(item.changeStatus)}</span>
  1921. </FormItem>
  1922. <FormItem className="half-item"
  1923. {...formItemLayout}
  1924. label="变更操作" >
  1925. <Button onClick={(e)=>{this.modifyChange(item)}}>修改</Button>
  1926. {/*<Button type="danger" onClick={(e)=>{this.modifyDelete(item)}}>删除</Button>*/}
  1927. </FormItem>
  1928. </div>
  1929. <div className='clearfix changeRemark'>
  1930. <FormItem
  1931. labelCol={{ span: 4 }}
  1932. wrapperCol={{ span: 16 }}
  1933. label="变更说明" >
  1934. <p>{item.changeComment}</p>
  1935. </FormItem>
  1936. </div>
  1937. </div>)
  1938. },this):<p style={{textAlign:"center"}}>暂无变更记录</p>}
  1939. </div>
  1940. }
  1941. </div>
  1942. </Spin>
  1943. </Form >
  1944. </Modal>
  1945. <Modal maskClosable={false} visible={this.state.modifyChangeState}
  1946. onOk={this.modifyChangeCancel} onCancel={this.modifyChangeCancel}
  1947. width='600px'
  1948. title= "修改变更 "
  1949. footer=''
  1950. className="admin-desc-content">
  1951. <Form layout="horizontal" id="demand-form">
  1952. <Spin spinning={this.state.loading}>
  1953. <div className="clearfix">
  1954. <div className="clearfix">
  1955. <FormItem className="half-item"
  1956. {...formItemLayout}
  1957. label="变更发起人" >
  1958. <span>{this.state.changePromoter}</span>
  1959. </FormItem>
  1960. <FormItem className="half-item"
  1961. {...formItemLayout}
  1962. label="变更申请时间" >
  1963. <span>{this.state.changeTime}</span>
  1964. </FormItem>
  1965. <div className='clearfix'>
  1966. <FormItem
  1967. labelCol={{ span: 4 }}
  1968. wrapperCol={{ span: 16 }}
  1969. label="变更状态" >
  1970. <Radio.Group onChange={(e)=>{this.setState({changeState:e.target.value})}} value={this.state.changeState}>
  1971. <Radio value={1}>变更中</Radio>
  1972. <Radio value={2}>变更完成</Radio>
  1973. </Radio.Group>
  1974. </FormItem>
  1975. </div>
  1976. <div className='clearfix'>
  1977. <FormItem
  1978. labelCol={{ span: 4 }}
  1979. wrapperCol={{ span: 16 }}
  1980. label="变更说明" >
  1981. <Input type="textarea" placeholder="请输入变更说明" rows={4} value={this.state.changeRemarks}
  1982. onChange={(e)=>{this.setState({changeRemarks:e.target.value})}}/>
  1983. </FormItem>
  1984. </div>
  1985. <div className="clearfix">
  1986. <Button type="primary" onClick={this.changeModify} style={{margin:"10px 95px"}}>保存</Button>
  1987. <Button onClick={this.modifyChangeCancel}>取消</Button>
  1988. </div>
  1989. </div>
  1990. </div>
  1991. </Spin>
  1992. </Form >
  1993. </Modal>
  1994. <Modal visible={this.state.rizhivisible}
  1995. className="admin-desc-content"
  1996. width='800px'
  1997. maskClosable={false}
  1998. title='订单日志'
  1999. footer={null}
  2000. onCancel={this.closeOrderLog}>
  2001. <div className="patent-table">
  2002. <Spin spinning={this.state.loading}>
  2003. <Table columns={this.state.columnsrizhi}
  2004. dataSource={this.state.dataSourcerizhi}
  2005. pagination={false}
  2006. />
  2007. </Spin>
  2008. </div>
  2009. </Modal>
  2010. </div>
  2011. )
  2012. }
  2013. }));
  2014. export default NewService;