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