addService.jsx 99 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030
  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. this.setState({
  715. loading: true
  716. });
  717. $.ajax({
  718. method: "POST",
  719. dataType: "json",
  720. crossDomain: false,
  721. url: globalConfig.context +'/api/admin/order/updateOrderCommodity' ,
  722. data: {
  723. detailId:this.state.jid,
  724. orderNo:this.props.datauser.orderNo,
  725. discountPrice:this.state.discountPrice,//签单总价
  726. discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
  727. commodityQuantity:this.state.editFw.commodityQuantity,
  728. remarks:this.state.editFw.remarks
  729. }
  730. }).done(function(data) {
  731. this.setState({
  732. loading: false
  733. });
  734. if(!data.error.length) {
  735. message.success('保存成功!');
  736. this.nextCancel()
  737. this.loaduser(this.props.datauser);
  738. this.loadData();
  739. } else {
  740. message.warning(data.error[0].message);
  741. }
  742. }.bind(this));
  743. },
  744. //签单保存
  745. signOk(e){
  746. e.preventDefault();
  747. this.temporarySave(false)
  748. },
  749. //暂存信息
  750. temporary(){
  751. this.temporarySave(true)
  752. },
  753. //签单时间选择
  754. selTime(e,index){
  755. this.setState({
  756. entryTime:e,
  757. selTime:index
  758. })
  759. },
  760. signSub(e){
  761. e.preventDefault();
  762. if(!this.state.selTime){
  763. message.warning("请选择签单时间!");
  764. return false;
  765. };
  766. let theorgCodeUrl = [];
  767. if (this.state.orgCodeUrl.length) {
  768. let picArr = [];
  769. this.state.orgCodeUrl.map(function (item) {
  770. if ( item.response && item.response.data && item.response.data.length ){
  771. picArr.push(item.response.data);
  772. }
  773. });
  774. theorgCodeUrl = picArr.join(",");
  775. };
  776. this.setState({
  777. loading: true
  778. });
  779. let dataList=this.state.dataSource,
  780. idsList=[];
  781. dataList.map((item,index) => {
  782. console.log(item);
  783. console.log(this.state.commodityId);
  784. idsList.push({
  785. businessId:'',
  786. businessProjectId:item.commodityId,
  787. customerStatus:"1",
  788. followSituation:"5",
  789. remarks:"签单-自动触发"
  790. })
  791. })
  792. $.ajax({
  793. method: "POST",
  794. dataType: "json",
  795. crossDomain: false,
  796. url: globalConfig.context +'/api/admin/order/signServiceOrder' ,
  797. data: {
  798. userBusinessList: JSON.stringify(idsList),
  799. uid:this.state.buyerId,
  800. orderNo:this.props.datauser.orderNo,
  801. signTotalAmount:this.state.signTotalAmount,
  802. signFirstPayment:this.state.signFirstPayment,
  803. approval:this.state.approval,
  804. orderRemarks:this.state.orderRemarks,
  805. contractNo:this.state.contractNo,
  806. signTime:this.state.selTime,
  807. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  808. }
  809. }).done(function(data) {
  810. this.setState({
  811. loading: false
  812. });
  813. if(!data.error.length) {
  814. message.success('操作成功!');
  815. this.signBillCancel()
  816. } else {
  817. message.warning(data.error[0].message);
  818. }
  819. }.bind(this));
  820. },
  821. //签单保存与暂存函数
  822. temporarySave(e){
  823. if(!this.state.signTotalAmount){
  824. message.warning('实签款项不能为空!')
  825. return false;
  826. };
  827. if(!this.state.signTotalAmount){
  828. message.warning('实签首款不能为空!')
  829. return false;
  830. };
  831. if(this.state.approval==undefined){
  832. message.warning('实签首款不能为空!')
  833. return false;
  834. };
  835. if(!this.state.contractNo){
  836. message.warning("请输入合同编号!");
  837. return false;
  838. }
  839. this.setState({
  840. loading: true
  841. });
  842. let theorgCodeUrl = [];
  843. if (this.state.orgCodeUrl.length) {
  844. let picArr = [];
  845. this.state.orgCodeUrl.map(function (item) {
  846. if ( item.response && item.response.data && item.response.data.length ){
  847. picArr.push(item.response.data);
  848. }
  849. });
  850. theorgCodeUrl = picArr.join(",");
  851. };
  852. let api=e?'/api/admin/order/updateServiceOrder':'/api/admin/order/signServiceOrder';
  853. $.ajax({
  854. method: "POST",
  855. dataType: "json",
  856. crossDomain: false,
  857. url: globalConfig.context +api ,
  858. data: {
  859. orderNo:this.props.uid?this.props.uid.orderNo:this.props.datauser.orderNo,
  860. signTotalAmount:this.state.signTotalAmount,
  861. signFirstPayment:this.state.signFirstPayment,
  862. approval:this.state.approval,
  863. orderRemarks:this.state.orderRemarks,
  864. contractNo:this.state.contractNo,
  865. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  866. }
  867. }).done(function(data) {
  868. this.setState({
  869. loading: false
  870. });
  871. if(!data.error.length) {
  872. message.success('操作成功!');
  873. this.signBillCancel()
  874. } else {
  875. message.warning(data.error[0].message);
  876. }
  877. }.bind(this));
  878. },
  879. lookflow(){
  880. this.setState({
  881. loading: true,
  882. lookVisible:true,
  883. })
  884. this.state.lookSource=[];
  885. $.ajax({
  886. method: "get",
  887. dataType: "json",
  888. crossDomain: false,
  889. url: globalConfig.context +'/api/admin/order/getBillByOrderNo',
  890. data: {
  891. orderNo:this.props.datauser.orderNo,
  892. },
  893. success: function (data) {
  894. let theArr = [];
  895. if (!data.data) {
  896. if (data.error && data.error.length) {
  897. message.warning(data.error[0].message);
  898. };
  899. } else {
  900. for (let i = 0; i < data.data.length; i++) {
  901. let thisdata = data.data[i];
  902. theArr.push({
  903. key: i,
  904. billNo: thisdata.billNo,
  905. transactionAmount:thisdata.transactionAmount,
  906. createTime:thisdata.createTime,
  907. payerName:thisdata.payerName,
  908. payeeName:thisdata.payeeName,
  909. transactionSubject:thisdata.transactionSubject,
  910. transactionChannel:thisdata.transactionChannel,
  911. financialPayNo:thisdata.financialPayNo,
  912. financialPayTime:thisdata.financialPayTime,
  913. orderNo:thisdata.orderNo,
  914. departmentName:thisdata.departmentName,
  915. salesmanName:thisdata.salesmanName,
  916. financeName:thisdata.financeName,
  917. confirmSign:thisdata.confirmSign,
  918. deleteSign:thisdata.deleteSign,
  919. confirmTime:thisdata.confirmTime
  920. });
  921. };
  922. };
  923. this.setState({
  924. lookflowList: theArr,
  925. });
  926. }.bind(this),
  927. }).always(function () {
  928. this.setState({
  929. loading: false
  930. });
  931. }.bind(this));
  932. },
  933. lookCancel(){
  934. this.setState({
  935. lookVisible:false
  936. })
  937. },
  938. /* -----变更操作开始----- */
  939. //新建变更
  940. addChange(){
  941. this.setState({
  942. addChangeState:true,
  943. stateAdd:1,
  944. changeRemarks:''
  945. })
  946. },
  947. //产看变更记录
  948. lookChange(){
  949. this.setState({
  950. addChangeState:true,
  951. stateAdd:0
  952. })
  953. this.lookChangeData()
  954. },
  955. //查看变更列表修改变更
  956. modifyChangeCancel(){
  957. this.setState({
  958. modifyChangeState:false
  959. })
  960. },
  961. //获取变更记录
  962. lookChangeData(){
  963. this.setState({
  964. loading:true
  965. });
  966. $.ajax({
  967. method: "get",
  968. dataType: "json",
  969. crossDomain: false,
  970. url: globalConfig.context +'/api/admin/order/viewOrderChange',
  971. data: {
  972. orderNo:this.props.datauser.orderNo,
  973. },
  974. success: function (data) {
  975. let theArr = [];
  976. if (!data.data) {
  977. if (data.error && data.error.length) {
  978. message.warning(data.error[0].message);
  979. };
  980. } else {
  981. for (let i = 0; i < data.data.length; i++) {
  982. theArr = data.data;
  983. };
  984. };
  985. this.setState({
  986. changeHtml: theArr,
  987. });
  988. }.bind(this),
  989. }).always(function () {
  990. this.setState({
  991. loading: false
  992. });
  993. }.bind(this));
  994. },
  995. //添加变更状态
  996. addChangeCancel(){
  997. this.setState({
  998. addChangeState:false
  999. })
  1000. },
  1001. //新建变更
  1002. subChangeState(e){
  1003. e.preventDefault();
  1004. this.setState({
  1005. loading: true
  1006. });
  1007. $.ajax({
  1008. method: "POST",
  1009. dataType: "json",
  1010. crossDomain: false,
  1011. url: globalConfig.context +'/api/admin/order/addOrderChange' ,
  1012. data: {
  1013. orderNo:this.props.datauser.orderNo,
  1014. changeComment:this.state.changeRemarks
  1015. }
  1016. }).done(function(data) {
  1017. this.setState({
  1018. loading: false
  1019. });
  1020. if(!data.error.length) {
  1021. message.success('保存成功!');
  1022. this.addChangeCancel();
  1023. this.loaduser();
  1024. } else {
  1025. message.warning(data.error[0].message);
  1026. }
  1027. }.bind(this));
  1028. },
  1029. //查看修改变更
  1030. modifyChange(item){
  1031. this.setState({
  1032. modifyChangeState:true,
  1033. changePromoter:item.creater,
  1034. changeTime:item.createTime,
  1035. changeState:item.changeStatus,
  1036. changeRemarks:item.changeComment,
  1037. idt:item.changeId,
  1038. orderNot:item.orderNo
  1039. })
  1040. },
  1041. //删除变更
  1042. modifyDelete(item){
  1043. this.setState({
  1044. loading: true
  1045. });
  1046. $.ajax({
  1047. method: "get",
  1048. dataType: "json",
  1049. crossDomain: false,
  1050. url: globalConfig.context +'/api/admin/order/deleteOrderChange' ,
  1051. data: {
  1052. changeId:item.changeId,
  1053. }
  1054. }).done(function(data) {
  1055. this.setState({
  1056. loading: false
  1057. });
  1058. if(!data.error.length) {
  1059. message.success('删除成功!');
  1060. this.lookChangeData();
  1061. this.loaduser()
  1062. } else {
  1063. message.warning(data.error[0].message);
  1064. }
  1065. }.bind(this));
  1066. },
  1067. //修改变更保存
  1068. changeModify(e){
  1069. e.preventDefault();
  1070. this.setState({
  1071. loading: true
  1072. });
  1073. $.ajax({
  1074. method: "POST",
  1075. dataType: "json",
  1076. crossDomain: false,
  1077. url: globalConfig.context +'/api/admin/order/updateOrderChange' ,
  1078. data: {
  1079. changeId:this.state.idt,
  1080. changeStatus:this.state.changeState,
  1081. changeComment:this.state.changeRemarks
  1082. }
  1083. }).done(function(data) {
  1084. this.setState({
  1085. loading: false
  1086. });
  1087. if(!data.error.length) {
  1088. message.success('保存成功!');
  1089. this.modifyChangeCancel();
  1090. this.lookChangeData();
  1091. this.loaduser()
  1092. } else {
  1093. message.warning(data.error[0].message);
  1094. }
  1095. }.bind(this));
  1096. },
  1097. /*-----变更操作结束----*/
  1098. //查看流失。项目列表
  1099. lookSee(state) {
  1100. this.state.lookSource=[];
  1101. this.setState({
  1102. loading: true
  1103. });
  1104. let api=state?'/api/xiangmu':'/api/liushui'
  1105. $.ajax({
  1106. method: "get",
  1107. dataType: "json",
  1108. crossDomain: false,
  1109. url: globalConfig.context + api,
  1110. data: {
  1111. orderNo:this.props.datauser.orderNo
  1112. },
  1113. success: function (data) {
  1114. let theArr = [];
  1115. if (!data.data) {
  1116. if (data.error && data.error.length) {
  1117. message.warning(data.error[0].message);
  1118. };
  1119. } else {
  1120. for (let i = 0; i < data.data.length; i++) {
  1121. let thisdata = data.data[i];
  1122. theArr.push({
  1123. key: i,
  1124. id:thisdata.id,
  1125. orderNo:thisdata.orderNo,
  1126. commodityName:thisdata.commodityName,
  1127. commodityType:thisdata.commodityType,
  1128. commodityMode:thisdata.commodityMode,
  1129. commodityQuantity:thisdata.commodityQuantity,
  1130. commodityPrice:thisdata.commodityPrice,
  1131. discountPrice:thisdata.discountPrice,
  1132. commodityFirstPayment:thisdata.commodityFirstPayment,
  1133. createTimes:thisdata.createTimes,
  1134. discountFirstPayment:thisdata.discountFirstPayment,
  1135. remarks:thisdata.remarks,
  1136. });
  1137. };
  1138. }
  1139. this.setState({
  1140. lookSource: theArr,
  1141. });
  1142. }.bind(this),
  1143. }).always(function () {
  1144. this.setState({
  1145. loading: false
  1146. });
  1147. }.bind(this));
  1148. },
  1149. //开单选择订单类型骚操作
  1150. orderTypeFn(e){
  1151. if(e==0){
  1152. this.setState({
  1153. bussStats:true,
  1154. orderType:e
  1155. })
  1156. this.category();
  1157. }else{
  1158. this.setState({
  1159. contractType:undefined,
  1160. bussStats:false,
  1161. orderType:e
  1162. })
  1163. }
  1164. },
  1165. //品类数据获取
  1166. category(){
  1167. $.ajax({
  1168. method: "get",
  1169. dataType: "json",
  1170. crossDomain: false,
  1171. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  1172. data: {
  1173. },
  1174. success: function(data) {
  1175. let thedata = data.data;
  1176. let theArr=[];
  1177. if(!thedata) {
  1178. if(data.error && data.error.length) {
  1179. message.warning(data.error[0].message);
  1180. };
  1181. thedata = {};
  1182. }else{
  1183. thedata.map(function(item,index){
  1184. theArr.push({
  1185. key:index,
  1186. name:item.cname,
  1187. id:item.id,
  1188. })
  1189. })
  1190. }
  1191. this.setState({
  1192. contractType:undefined,
  1193. categoryArr:theArr,
  1194. })
  1195. }.bind(this),
  1196. });
  1197. },
  1198. componentWillReceiveProps(nextProps) { //props改变时触发
  1199. this.state.visible = nextProps.showDesc;
  1200. this.state.signBillVisible=nextProps.signBillVisible;
  1201. if(this.state.signBillVisible){
  1202. this.loaduser(nextProps.uid)
  1203. };
  1204. if(nextProps.userDetaile && nextProps.showDesc) {
  1205. this.loaduser(nextProps.datauser);
  1206. this.loadData(nextProps.datauser);
  1207. }else{
  1208. this.setState({
  1209. orderType:undefined,
  1210. customerName:'',
  1211. autoId:'',
  1212. customerArr:[],
  1213. contractType:undefined,
  1214. bussStats:false,
  1215. customType:0
  1216. })
  1217. }
  1218. },
  1219. render() {
  1220. const FormItem = Form.Item
  1221. const formItemLayout = {
  1222. labelCol: { span: 8 },
  1223. wrapperCol: { span: 14 },
  1224. };
  1225. const changeHtml=this.state.changeHtml ||[];
  1226. const editFws=this.state.editFw;
  1227. const categoryList=this.state.categoryArr ||[];
  1228. const orderDetaiel=this.state.orderList || [];
  1229. const dataSources=this.state.customerArr || [];
  1230. const options = this.state.states?dataSources.map((group,index) =>
  1231. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1232. ):dataSources.map((group,index) =>
  1233. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  1234. )
  1235. return(
  1236. <div>
  1237. {this.state.visible ? <Modal maskClosable={false} visible={this.state.visible}
  1238. onOk={this.handleOk} onCancel={this.handleCancel}
  1239. width={!this.props.userDetaile?'600px':'1000px'}
  1240. title={!this.props.userDetaile?'创建订单':'编辑订单'}
  1241. footer=''
  1242. className="admin-desc-content">
  1243. <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
  1244. <Spin spinning={this.state.loading}>
  1245. <div className="clearfix">
  1246. {!this.props.userDetaile?
  1247. <div className="clearfix">
  1248. <div className="clearfix">
  1249. <FormItem
  1250. {...formItemLayout}
  1251. label="订单类型" >
  1252. <Select placeholder="请选择订单类型"
  1253. style={{ width:'200px'}}
  1254. value={this.state.orderType}
  1255. onChange={this.orderTypeFn}>
  1256. {
  1257. orderType.map(function (item) {
  1258. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1259. })
  1260. }
  1261. </Select>
  1262. <span className="mandatory">*</span>
  1263. </FormItem>
  1264. </div>
  1265. {this.state.bussStats&&<div className="clearfix">
  1266. <FormItem
  1267. {...formItemLayout}
  1268. label="业务品类" >
  1269. <Select placeholder="请选择业务品类"
  1270. style={{ width:'200px'}}
  1271. value={this.state.contractType}
  1272. onChange={(e)=>{this.setState({contractType:e})}}>
  1273. {
  1274. categoryList.map(function (item) {
  1275. return <Select.Option key={item.id} >{item.name}</Select.Option>
  1276. })
  1277. }
  1278. </Select>
  1279. <span className="mandatory">*</span>
  1280. </FormItem>
  1281. </div>}
  1282. <FormItem
  1283. {...formItemLayout}
  1284. label="客户所属类型" >
  1285. <Radio.Group onChange={(e)=>{this.setState({customType:e.target.value,customerArr:[]})}} value={this.state.customType}>
  1286. <Radio value={0}>私有客户</Radio>
  1287. <Radio value={1}>已签单客户</Radio>
  1288. </Radio.Group>
  1289. </FormItem>
  1290. <div className="clearfix">
  1291. <FormItem
  1292. {...formItemLayout}
  1293. label="客户名称" >
  1294. <AutoComplete
  1295. className="certain-category-search"
  1296. dropdownClassName="certain-category-search-dropdown"
  1297. dropdownMatchSelectWidth={false}
  1298. dropdownStyle={{ width: 200 }}
  1299. size="large"
  1300. style={{ width: '200px' }}
  1301. dataSource={options}
  1302. placeholder="输入名称"
  1303. value={this.state.customerName}
  1304. onChange={this.customerChange}
  1305. filterOption={true}
  1306. onSelect={this.selectAutoCUT}
  1307. >
  1308. <Input/>
  1309. </AutoComplete>
  1310. <span className="mandatory">*</span>
  1311. </FormItem>
  1312. </div>
  1313. </div>:<div className="clearfix">
  1314. <FormItem className="half-item"
  1315. {...formItemLayout}
  1316. label="订单编号" >
  1317. <span>{orderDetaiel.orderNo}</span>
  1318. </FormItem>
  1319. <FormItem className="half-item"
  1320. {...formItemLayout}
  1321. label="下单时间" >
  1322. <span>{orderDetaiel.createTime}</span>
  1323. </FormItem>
  1324. <FormItem className="half-item"
  1325. {...formItemLayout}
  1326. label="客户名称" >
  1327. <span>{orderDetaiel.buyerName}</span>
  1328. </FormItem>
  1329. <FormItem className="half-item"
  1330. {...formItemLayout}
  1331. label="订单类型" >
  1332. <span>{getOrderType(orderDetaiel.orderType)}</span>
  1333. </FormItem>
  1334. <FormItem className="half-item"
  1335. {...formItemLayout}
  1336. label="订单渠道" >
  1337. <span>{getOrderChannel(orderDetaiel.orderChannel)}</span>
  1338. </FormItem>
  1339. <FormItem className="half-item"
  1340. {...formItemLayout}
  1341. label="订单状态" >
  1342. <span>{getOrderState(orderDetaiel.orderStatus)}</span>
  1343. </FormItem>
  1344. <FormItem className="half-item"
  1345. {...formItemLayout}
  1346. label="已收款项" >
  1347. <span>{orderDetaiel.actuallyTotalAmount+'万元'}</span>
  1348. </FormItem>
  1349. <FormItem className="half-item"
  1350. {...formItemLayout}
  1351. label="结算状态" >
  1352. <span>{getPaymentState(orderDetaiel.liquidationStatus)}</span>
  1353. </FormItem>
  1354. <FormItem className="half-item"
  1355. {...formItemLayout}
  1356. label="市价订单金额" >
  1357. <span>{orderDetaiel.orderAmount+'万元'}</span>
  1358. </FormItem>
  1359. <FormItem className="half-item"
  1360. {...formItemLayout}
  1361. label="市价首款金额" >
  1362. <span>{orderDetaiel.firstPayment+'万元'}</span>
  1363. </FormItem>
  1364. {orderDetaiel.deleteSign==0&&orderDetaiel.orderStatus==2||orderDetaiel.changeStatus==1?
  1365. <div className='clearfix'>
  1366. <FormItem className="half-item"
  1367. {...formItemLayout}
  1368. label="实签订单金额(万元)" >
  1369. <Input placeholder="实签订单金额" ref='signTotalAmount' value={this.state.signTotalAmount} onChange={(e)=>{this.setState({signTotalAmount:e.target.value})}} style={{width:'240px'}} />
  1370. <span className="mandatory">*</span>
  1371. </FormItem>
  1372. <FormItem className="half-item"
  1373. {...formItemLayout}
  1374. label="实签首款金额(万元)" >
  1375. <Input placeholder="请输入实签首款金额" ref='signFirstPayment' value={this.state.signFirstPayment} onChange={(e)=>{this.setState({signFirstPayment:e.target.value})}} style={{width:'240px'}} />
  1376. <span className="mandatory">*</span>
  1377. </FormItem>
  1378. <FormItem className="half-item"
  1379. {...formItemLayout}
  1380. label="特批立项" >
  1381. <span>{getApprovedState(this.state.approval)}</span>
  1382. </FormItem>
  1383. <FormItem className="half-item"
  1384. {...formItemLayout}
  1385. label="合同编号" >
  1386. <Input placeholder="请输入合同编号" value={this.state.contractNo}
  1387. onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'240px'}} />
  1388. </FormItem>
  1389. <div className='clearfix'>
  1390. <FormItem
  1391. labelCol={{ span: 4 }}
  1392. wrapperCol={{ span: 18 }}
  1393. label={
  1394. <span>
  1395. <strong style={{ color: '#f00' }}>*</strong>合同扫描件
  1396. </span>
  1397. }
  1398. >
  1399. <PicturesWall
  1400. domId={'addService1'}
  1401. fileList={this.getOrgCodeUrl}
  1402. pictureUrl={this.state.orgCodeUrl} />
  1403. <p>图片建议:要清晰。</p>
  1404. <Button style={{ float:"right" , marginRight:'140px' , marginTop:'20px'}}
  1405. onClick={this.getOrderLog}
  1406. >查看订单 日志</Button>
  1407. </FormItem>
  1408. </div>
  1409. <div className='clearfix'>
  1410. <FormItem
  1411. labelCol={{ span: 4 }}
  1412. wrapperCol={{ span: 16 }}
  1413. label="订单留言" >
  1414. <Input type="textarea" placeholder="请输入订单留言" rows={4} value={this.state.orderRemarks}
  1415. onChange={(e)=>{this.setState({orderRemarks:e.target.value})}}/>
  1416. </FormItem>
  1417. </div>
  1418. <div className='clearfix'>
  1419. <div className="changeStatusTxt">
  1420. <FormItem className="half-item"
  1421. {...formItemLayout}
  1422. style={{color:'red'}}
  1423. label="变更状态" >
  1424. <span>{getChangeState(orderDetaiel.changeStatus)}</span>
  1425. </FormItem>
  1426. </div>
  1427. {orderDetaiel.orderStatus>=3&&<div className="clearfix">
  1428. <FormItem className="half-item"
  1429. {...formItemLayout}
  1430. label="变更操作" >
  1431. <Button onClick={this.addChange}>添加变更</Button>
  1432. </FormItem>
  1433. <FormItem className="half-item"
  1434. {...formItemLayout}
  1435. label="变更操作" >
  1436. <Button onClick={this.lookChange}>查看变更纪录</Button>
  1437. </FormItem>
  1438. </div>}
  1439. </div>
  1440. </div>:
  1441. <div className='clearfix'>
  1442. <FormItem className="half-item"
  1443. {...formItemLayout}
  1444. label="实签订单金额" >
  1445. <span>{orderDetaiel.signTotalAmount+'万元'}</span>
  1446. </FormItem>
  1447. <FormItem className="half-item"
  1448. {...formItemLayout}
  1449. label="实签首款金额" >
  1450. <span>{orderDetaiel.signFirstPayment+'万元'}</span>
  1451. </FormItem>
  1452. <FormItem className="half-item"
  1453. {...formItemLayout}
  1454. label="特批立项" >
  1455. <span>{getApprovedState(orderDetaiel.approval)}</span>
  1456. </FormItem>
  1457. <FormItem className="half-item"
  1458. {...formItemLayout}
  1459. label="合同编号" >
  1460. <span>{orderDetaiel.contractNo}</span>
  1461. </FormItem>
  1462. <div className="clearfix">
  1463. <FormItem
  1464. labelCol={{ span: 4 }}
  1465. wrapperCol={{ span: 18 }}
  1466. label="合同扫描件" >
  1467. {/*<Upload className="demandDetailShow-upload"*/}
  1468. {/* beforeUpload={beforeUploadFile}*/}
  1469. {/* listType="picture-card"*/}
  1470. {/* fileList={this.state.orgCodeUrl}*/}
  1471. {/* onPreview={(file) => {*/}
  1472. {/* this.setState({*/}
  1473. {/* previewImage: file.url || file.thumbUrl,*/}
  1474. {/* previewVisible: true,*/}
  1475. {/* });*/}
  1476. {/* }} />*/}
  1477. {this.state.orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1478. <ImgList domId={'addService3'} fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>
  1479. </div> : <div/>}
  1480. <Modal maskClosable={false} footer={null}
  1481. visible={this.state.previewVisible}
  1482. onCancel={() => { this.setState({ previewVisible: false }) }}>
  1483. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  1484. </Modal>
  1485. <Button style={{ float:"right" , marginRight:'140px' , marginTop:'20px'}}
  1486. onClick={this.getOrderLog}
  1487. >查看订单 日志</Button>
  1488. </FormItem>
  1489. </div>
  1490. <div className='clearfix'>
  1491. <FormItem
  1492. labelCol={{ span: 4 }}
  1493. wrapperCol={{ span: 16 }}
  1494. label="订单留言" >
  1495. <span>{orderDetaiel.orderRemarks}</span>
  1496. </FormItem>
  1497. </div>
  1498. <div className='clearfix changeStatusTxt'>
  1499. <FormItem className="half-item"
  1500. {...formItemLayout}
  1501. style={{color:'red'}}
  1502. label="变更状态" >
  1503. <span>{getChangeState(orderDetaiel.changeStatus)}</span>
  1504. </FormItem>
  1505. </div>
  1506. {orderDetaiel.orderStatus>=3&&<div className="clearfix">
  1507. <FormItem className="half-item"
  1508. {...formItemLayout}
  1509. label="变更操作" >
  1510. <Button onClick={this.addChange}>添加变更</Button>
  1511. </FormItem>
  1512. <FormItem className="half-item"
  1513. {...formItemLayout}
  1514. label="变更操作" >
  1515. <Button onClick={this.lookChange}>查看变更纪录</Button>
  1516. </FormItem>
  1517. </div>}
  1518. </div>}
  1519. <div className='clearfix'>
  1520. <FormItem className="half-item"
  1521. {...formItemLayout}
  1522. label="订单负责人" >
  1523. <span>{orderDetaiel.salesmanName}</span>
  1524. </FormItem>
  1525. <FormItem className="half-item"
  1526. {...formItemLayout}
  1527. label="业务品类" >
  1528. <span>{orderDetaiel.projectType}</span>
  1529. </FormItem>
  1530. </div>
  1531. <div className='clearfix'>
  1532. <FormItem className="half-item"
  1533. {...formItemLayout}
  1534. label="意向时间" >
  1535. <span>{orderDetaiel.createTime}</span>
  1536. </FormItem>
  1537. <FormItem className="half-item"
  1538. {...formItemLayout}
  1539. label="签单时间" >
  1540. <span>{orderDetaiel.signTime}</span>
  1541. </FormItem>
  1542. <FormItem className="half-item"
  1543. {...formItemLayout}
  1544. label="财务负责人" >
  1545. <span>{orderDetaiel.financeName}</span>
  1546. <Button onClick={this.lookflow} style={{float:'right'}}>查看流水</Button>
  1547. </FormItem>
  1548. <FormItem className="half-item"
  1549. {...formItemLayout}
  1550. label="项目负责人" >
  1551. <span>{orderDetaiel.technicianName}</span>
  1552. </FormItem>
  1553. <FormItem className="half-item"
  1554. {...formItemLayout}
  1555. label="立项时间" >
  1556. <span>{orderDetaiel.setUpTime}</span>
  1557. </FormItem>
  1558. <FormItem className="half-item"
  1559. {...formItemLayout}
  1560. label="项目状态" >
  1561. <span>{getProjectState(orderDetaiel.projectStage)}</span>
  1562. </FormItem>
  1563. </div>
  1564. <div>
  1565. <span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
  1566. {this.props.datauser.active.applySign||orderDetaiel.changeStatus==1?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加明细</Button>:''}
  1567. </div>
  1568. <div className="patent-table">
  1569. <Spin spinning={this.state.loading}>
  1570. <Table columns={this.state.columns}
  1571. dataSource={this.state.dataSource}
  1572. pagination={this.state.pagination}
  1573. onRowClick={this.tableRowClick}
  1574. />
  1575. </Spin>
  1576. </div>
  1577. </div>}
  1578. <div className='addSave' style={{marginTop:'15px'}}>
  1579. {!this.props.userDetaile||orderDetaiel.deleteSign==0&&orderDetaiel.orderStatus==2||orderDetaiel.changeStatus==1?<Button className="setSave" type="primary" htmlType="submit" loading={this.state.loading}>保存</Button>:''}
  1580. {this.props.userDetaile?<div className='operations'>
  1581. {this.props.datauser.active.confirmIntention&&<Popconfirm title={'请确认您是否受理来自【'+this.props.datauser.buyerName+'】发起的服务意向订单?'} onConfirm={(e)=>{this.admissibleOrderOK()}} onCancel={(e)=>{this.admissibleOrderCancel()}} okText="同意" cancelText="拒绝">
  1582. <Button style={{marginRight:'15px',marginLeft:'200px'}} type="primary">受理意向</Button>
  1583. </Popconfirm>}
  1584. {this.props.datauser.active.applySign&&<Button style={{marginRight:'10px'}} onClick={(e) =>{this.signBitt()}} type="primary">签单</Button>}
  1585. {this.props.datauser.active.applyForCancel&&<Popconfirm title={'请确认您是否取消客户【'+this.props.datauser.buyerName+'】的服务订单,订单取消将导致业务终止!'} onConfirm={(e)=>{this.cancelOrder()}} okText="确认" cancelText="取消">
  1586. <Button style={{marginRight:'10px'}} type="danger">取消订单</Button>
  1587. </Popconfirm>}
  1588. {this.props.datauser.active.applyRevoke&&<Popconfirm title={'请确认您是否作废客户【'+this.props.datauser.buyerName+'】的服务订单,订单作废将导致订单失效!'} onConfirm={(e)=>{this.scrapOrder()}} okText="确认" cancelText="取消">
  1589. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">作废</Button>
  1590. </Popconfirm>}
  1591. {this.props.datauser.active.applyLock&&<Popconfirm title={'请确认您是否锁定客户【'+this.props.datauser.buyerName+'】的服务订单,订单锁定将导致订单暂停!'} onConfirm={(e)=>{this.lockOrder()}} okText="确认" cancelText="取消">
  1592. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">锁定</Button>
  1593. </Popconfirm>}
  1594. {this.props.datauser.active.applyUnLock&&<Popconfirm title={'请确认您是否解锁客户【'+this.props.datauser.buyerName+'】的服务订单,订单解锁将导致订单正常!'} onConfirm={(e)=>{this.unlockOrder()}} okText="确认" cancelText="取消">
  1595. <Button style={{marginRight:'10px',marginLeft:'200px'}} type="primary">解锁</Button>
  1596. </Popconfirm>}
  1597. </div>:''}
  1598. <Button className="cancel" type="ghost" onClick={this.handleCancel} style={{float:'right',marginRight:'200px'}}>返回</Button>
  1599. </div>
  1600. </div>
  1601. </Spin>
  1602. </Form >
  1603. </Modal> : <div/>}
  1604. <Modal maskClosable={false} visible={this.state.addnextVisible}
  1605. onOk={this.nextCancel} onCancel={this.nextCancel}
  1606. width='800px'
  1607. title={this.state.addState?'添加服务':'服务详情'}
  1608. footer=''
  1609. className="admin-desc-content">
  1610. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1611. <Spin spinning={this.state.loading}>
  1612. {this.state.addState?<div className="clearfix">
  1613. <FormItem className="half-item"
  1614. {...formItemLayout}
  1615. label="服务名称" >
  1616. <AutoComplete
  1617. className="certain-category-search"
  1618. dropdownClassName="certain-category-search-dropdown"
  1619. dropdownMatchSelectWidth={false}
  1620. dropdownStyle={{ width: 200 }}
  1621. style={{ width: '200px' }}
  1622. dataSource={options}
  1623. placeholder="输入服务名称"
  1624. value={this.state.commodityName}
  1625. onChange={this.httpChange}
  1626. filterOption={true}
  1627. onSelect={this.selectAuto}
  1628. >
  1629. <Input/>
  1630. </AutoComplete>
  1631. <span className="mandatory">*</span>
  1632. </FormItem>
  1633. <FormItem className="half-item"
  1634. {...formItemLayout}
  1635. label="市场价格(万元)" >
  1636. <span>{this.state.commodityPrice}</span>
  1637. </FormItem>
  1638. <FormItem className="half-item"
  1639. {...formItemLayout}
  1640. label="实签价格(万元)" >
  1641. <Input placeholder="请输入实签价格" value={this.state.discountPrice} style={{width:'200px'}}
  1642. onChange={(e)=>{this.setState({discountPrice:e.target.value})}} ref="discountPrice"/>
  1643. <span className="mandatory">*</span>
  1644. </FormItem>
  1645. <FormItem className="half-item"
  1646. {...formItemLayout}
  1647. label="服务数量" >
  1648. <Input placeholder="请输入服务数量" value={this.state.commodityQuantity} style={{width:'200px'}}
  1649. onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} ref="commodityQuantity"/>
  1650. <span className="mandatory">*</span>
  1651. </FormItem>
  1652. <FormItem className="half-item"
  1653. {...formItemLayout}
  1654. label="市场首付金额(万元)" >
  1655. <span>{this.state.commodityFirstPayment}</span>
  1656. </FormItem>
  1657. <FormItem className="half-item"
  1658. {...formItemLayout}
  1659. label="签单首付金额(万元)" >
  1660. <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
  1661. onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} ref='discountFirstPayment'/>
  1662. <span className="mandatory">*</span>
  1663. </FormItem>
  1664. <div className='clearfix'>
  1665. <FormItem
  1666. labelCol={{ span: 4 }}
  1667. wrapperCol={{ span: 16 }}
  1668. label="服务说明" >
  1669. <Input type='textarea' placeholder="请输入服务说明" value={this.state.remarks}
  1670. onChange={(e)=>{this.setState({remarks:e.target.value})}} />
  1671. </FormItem>
  1672. </div>
  1673. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1674. <Button className="submitSave" type="primary" htmlType="submit" loading={this.state.loading}>保存</Button>
  1675. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1676. </FormItem>
  1677. </div>:
  1678. <div className='clearfix'>
  1679. <FormItem className="half-item"
  1680. {...formItemLayout}
  1681. label="服务名称" >
  1682. <span>{editFws.commodityName}</span>
  1683. </FormItem>
  1684. <FormItem className="half-item"
  1685. {...formItemLayout}
  1686. label="市场价格" >
  1687. <span>{editFws.commodityPrice+'万元'}</span>
  1688. </FormItem>
  1689. <FormItem className="half-item"
  1690. {...formItemLayout}
  1691. label="市场首付金额" >
  1692. <span>{editFws.commodityFirstPayment+'万元'}</span>
  1693. </FormItem>
  1694. {this.state.active.applySign?<FormItem className="half-item"
  1695. {...formItemLayout}
  1696. label="实签价格(万元)" >
  1697. <Input placeholder="请输入签单首付金额" value={this.state.discountPrice} style={{width:'200px'}}
  1698. onChange={(e)=>{this.setState({discountPrice:e.target.value})}} />
  1699. <span className="mandatory">*</span>
  1700. </FormItem>:
  1701. <FormItem className="half-item"
  1702. {...formItemLayout}
  1703. label="实签价格" >
  1704. <span>{this.state.discountPrice+'万元'}</span>
  1705. </FormItem>}
  1706. <FormItem className="half-item"
  1707. {...formItemLayout}
  1708. label="服务数量" >
  1709. <span>{editFws.commodityQuantity}</span>
  1710. </FormItem>
  1711. {this.state.active.applySign?<FormItem className="half-item"
  1712. {...formItemLayout}
  1713. label="签单首付金额(万元)" >
  1714. <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
  1715. onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} />
  1716. <span className="mandatory">*</span>
  1717. </FormItem>:
  1718. <FormItem className="half-item"
  1719. {...formItemLayout}
  1720. label="签单首付金额" >
  1721. <span>{this.state.discountFirstPayment+'万元'}</span>
  1722. </FormItem>}
  1723. <div className='clearfix'>
  1724. <FormItem
  1725. labelCol={{ span: 4 }}
  1726. wrapperCol={{ span: 16 }}
  1727. label="服务说明" >
  1728. <span>{editFws.remarks}</span>
  1729. </FormItem>
  1730. </div>
  1731. {this.state.active.applySign&&<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1732. <Button className="submitSave" type="primary" onClick={this.tabRowSave} loading={this.state.loading}>保存</Button>
  1733. <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
  1734. </FormItem>}
  1735. </div>}
  1736. </Spin>
  1737. </Form >
  1738. </Modal>
  1739. <Modal maskClosable={false} visible={this.state.signBillVisible}
  1740. onOk={this.signBillOk} onCancel={this.signBillOk}
  1741. width='800px'
  1742. title='签单信息'
  1743. footer=''
  1744. className="admin-desc-content">
  1745. <Form layout="horizontal" onSubmit={this.signOk} id="demand-form">
  1746. <Spin spinning={this.state.loading}>
  1747. <div className="clearfix">
  1748. <FormItem className="half-item"
  1749. {...formItemLayout}
  1750. label="订单编号" >
  1751. <span>{this.state.orderNo}</span>
  1752. </FormItem>
  1753. <FormItem className="half-item"
  1754. {...formItemLayout}
  1755. label="客户名称" >
  1756. <span>{this.state.buyerName}</span>
  1757. </FormItem>
  1758. <FormItem className="half-item"
  1759. {...formItemLayout}
  1760. label="实签款项(万元)" >
  1761. <Input placeholder="请输入实签款项" value={this.state.signTotalAmount} style={{width:'200px'}}
  1762. onChange={(e)=>{this.setState({signTotalAmount:e.target.value})}} />
  1763. <span className="mandatory">*</span>
  1764. </FormItem>
  1765. <FormItem className="half-item"
  1766. {...formItemLayout}
  1767. label="实签首款(万元)" >
  1768. <Input placeholder="请输入实签首款" value={this.state.signFirstPayment} style={{width:'200px'}}
  1769. onChange={(e)=>{this.setState({signFirstPayment:e.target.value})}} />
  1770. <span className="mandatory">*</span>
  1771. </FormItem>
  1772. <FormItem className="half-item"
  1773. {...formItemLayout}
  1774. label="特批立项" >
  1775. <Select placeholder="选择特批立项类型"
  1776. style={{ width:'200px'}}
  1777. value={this.state.approval}
  1778. onChange={(e) => { this.setState({ approval: e }) }}>
  1779. <Select.Option value='0'>不申请特批</Select.Option>
  1780. <Select.Option value='1'>申请特批</Select.Option>
  1781. </Select>
  1782. <span className="mandatory">*</span>
  1783. </FormItem>
  1784. <FormItem className="half-item"
  1785. {...formItemLayout}
  1786. label="合同编号" >
  1787. <Input placeholder="请输入合同编号" value={this.state.contractNo}
  1788. onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'200px'}} />
  1789. <span className="mandatory">*</span>
  1790. </FormItem>
  1791. <div className='clearfix'>
  1792. <FormItem
  1793. labelCol={{ span: 4 }}
  1794. wrapperCol={{ span: 16 }}
  1795. label="签单备注" >
  1796. <Input type="textarea" placeholder="请输入签单备注" rows={4} value={this.state.orderRemarks}
  1797. onChange={(e)=>{this.setState({orderRemarks:e.target.value})}}/>
  1798. </FormItem>
  1799. </div>
  1800. <div className='clearfix'>
  1801. <FormItem
  1802. labelCol={{ span: 4 }}
  1803. wrapperCol={{ span: 18 }}
  1804. label="合同扫描件" >
  1805. <PicturesWall
  1806. domId={'addService2'}
  1807. listType="picture-card"
  1808. fileList={this.getOrgCodeUrl}
  1809. pictureUrl={this.state.orgCodeUrl} />
  1810. <p>图片建议:要清晰。</p>
  1811. </FormItem>
  1812. </div>
  1813. </div>
  1814. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1815. <Button className="submitSave" type="primary" htmlType="submit">确定签单</Button>
  1816. <Button className="submitSave" type="ghost" onClick={this.signBillOk}>返回</Button>
  1817. </FormItem>
  1818. </Spin>
  1819. </Form >
  1820. </Modal>
  1821. <Modal maskClosable={false} visible={this.state.signVisible}
  1822. onOk={this.signBittOk} onCancel={this.signBittOk}
  1823. width='600px'
  1824. title='签单信息'
  1825. footer=''
  1826. className="admin-desc-content">
  1827. <Form layout="horizontal" onSubmit={this.signSub} id="demand-form">
  1828. <Spin spinning={this.state.loading}>
  1829. <div className="clearfix">
  1830. <FormItem
  1831. {...formItemLayout}
  1832. label="特批立项" >
  1833. <Select placeholder="选择特批立项类型"
  1834. style={{ width:'200px'}}
  1835. value={this.state.approval}
  1836. onChange={(e) => { this.setState({ approval: e }) }}>
  1837. <Select.Option value='0'>不申请特批</Select.Option>
  1838. <Select.Option value='1'>申请特批</Select.Option>
  1839. </Select>
  1840. <span className="mandatory">*</span>
  1841. </FormItem>
  1842. </div>
  1843. <div className="clearfix">
  1844. <FormItem
  1845. {...formItemLayout}
  1846. label="签单时间" >
  1847. <DatePicker
  1848. style={{marginTop:"2px"}}
  1849. showTime
  1850. format="YYYY-MM-DD"
  1851. placeholder="选择签单时间"
  1852. value={this.state.entryTime}
  1853. onChange={(e,time)=>{this.selTime(e,time)}}
  1854. />
  1855. <span className="mandatory">*</span>
  1856. </FormItem>
  1857. </div>
  1858. <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
  1859. <Button className="submitSave" type="primary" htmlType="submit">确定签单</Button>
  1860. <Button className="submitSave" type="ghost" onClick={this.signBittOk}>返回</Button>
  1861. </FormItem>
  1862. </Spin>
  1863. </Form >
  1864. </Modal>
  1865. <Modal maskClosable={false} visible={this.state.lookVisible}
  1866. onOk={this.lookCancel} onCancel={this.lookCancel}
  1867. width='1300px'
  1868. title= '查看流水'
  1869. footer=''
  1870. className="admin-desc-content">
  1871. <Form layout="horizontal" id="demand-form">
  1872. <Spin spinning={this.state.loading}>
  1873. <div className="clearfix">
  1874. <Table columns={this.state.flowList}
  1875. dataSource={this.state.lookflowList}
  1876. pagination={false}
  1877. />
  1878. </div>
  1879. </Spin>
  1880. </Form >
  1881. </Modal>
  1882. <Modal maskClosable={false} visible={this.state.addChangeState}
  1883. onOk={this.addChangeCancel} onCancel={this.addChangeCancel}
  1884. width='800px'
  1885. title= {this.state.stateAdd?'添加变更':'查看变更记录'}
  1886. footer=''
  1887. className="admin-desc-content">
  1888. <Form layout="horizontal" id="demand-form">
  1889. <Spin spinning={this.state.loading}>
  1890. <div className="clearfix">
  1891. {this.state.stateAdd?<div className="clearfix">
  1892. <FormItem
  1893. labelCol={{ span: 4 }}
  1894. wrapperCol={{ span: 16 }}
  1895. label="变更说明" >
  1896. <Input type="textarea" placeholder="请输入变更说明" rows={4} value={this.state.changeRemarks}
  1897. onChange={(e)=>{this.setState({changeRemarks:e.target.value})}}/>
  1898. </FormItem>
  1899. <div className="clearfix">
  1900. <Button type="primary" onClick={this.subChangeState} style={{margin:"10px 50px 10px 128px"}} loading={this.state.loading}>保存</Button>
  1901. <Button onClick={this.addChangeCancel}>取消</Button>
  1902. </div>
  1903. </div>:
  1904. <div>
  1905. {
  1906. changeHtml.length?changeHtml.map(function(item,index){
  1907. return (<div className="changeBorder" key={index}>
  1908. <FormItem className="half-item"
  1909. {...formItemLayout}
  1910. label="变更发起人" >
  1911. <span>{item.creater}</span>
  1912. </FormItem>
  1913. <FormItem className="half-item"
  1914. {...formItemLayout}
  1915. label="变更申请时间" >
  1916. <span>{item.createTime}</span>
  1917. </FormItem>
  1918. <div className='clearfix'>
  1919. <FormItem className="half-item"
  1920. {...formItemLayout}
  1921. label="变更状态" >
  1922. <span>{getChangeState(item.changeStatus)}</span>
  1923. </FormItem>
  1924. <FormItem className="half-item"
  1925. {...formItemLayout}
  1926. label="变更操作" >
  1927. <Button onClick={(e)=>{this.modifyChange(item)}}>修改</Button>
  1928. {/*<Button type="danger" onClick={(e)=>{this.modifyDelete(item)}}>删除</Button>*/}
  1929. </FormItem>
  1930. </div>
  1931. <div className='clearfix changeRemark'>
  1932. <FormItem
  1933. labelCol={{ span: 4 }}
  1934. wrapperCol={{ span: 16 }}
  1935. label="变更说明" >
  1936. <p>{item.changeComment}</p>
  1937. </FormItem>
  1938. </div>
  1939. </div>)
  1940. },this):<p style={{textAlign:"center"}}>暂无变更记录</p>}
  1941. </div>
  1942. }
  1943. </div>
  1944. </Spin>
  1945. </Form >
  1946. </Modal>
  1947. <Modal maskClosable={false} visible={this.state.modifyChangeState}
  1948. onOk={this.modifyChangeCancel} onCancel={this.modifyChangeCancel}
  1949. width='600px'
  1950. title= "修改变更 "
  1951. footer=''
  1952. className="admin-desc-content">
  1953. <Form layout="horizontal" id="demand-form">
  1954. <Spin spinning={this.state.loading}>
  1955. <div className="clearfix">
  1956. <div className="clearfix">
  1957. <FormItem className="half-item"
  1958. {...formItemLayout}
  1959. label="变更发起人" >
  1960. <span>{this.state.changePromoter}</span>
  1961. </FormItem>
  1962. <FormItem className="half-item"
  1963. {...formItemLayout}
  1964. label="变更申请时间" >
  1965. <span>{this.state.changeTime}</span>
  1966. </FormItem>
  1967. <div className='clearfix'>
  1968. <FormItem
  1969. labelCol={{ span: 4 }}
  1970. wrapperCol={{ span: 16 }}
  1971. label="变更状态" >
  1972. <Radio.Group onChange={(e)=>{this.setState({changeState:e.target.value})}} value={this.state.changeState}>
  1973. <Radio value={1}>变更中</Radio>
  1974. <Radio value={2}>变更完成</Radio>
  1975. </Radio.Group>
  1976. </FormItem>
  1977. </div>
  1978. <div className='clearfix'>
  1979. <FormItem
  1980. labelCol={{ span: 4 }}
  1981. wrapperCol={{ span: 16 }}
  1982. label="变更说明" >
  1983. <Input type="textarea" placeholder="请输入变更说明" rows={4} value={this.state.changeRemarks}
  1984. onChange={(e)=>{this.setState({changeRemarks:e.target.value})}}/>
  1985. </FormItem>
  1986. </div>
  1987. <div className="clearfix">
  1988. <Button type="primary" onClick={this.changeModify} style={{margin:"10px 95px"}} loading={this.state.loading}>保存</Button>
  1989. <Button onClick={this.modifyChangeCancel}>取消</Button>
  1990. </div>
  1991. </div>
  1992. </div>
  1993. </Spin>
  1994. </Form >
  1995. </Modal>
  1996. <Modal visible={this.state.rizhivisible}
  1997. className="admin-desc-content"
  1998. width='800px'
  1999. maskClosable={false}
  2000. title='订单日志'
  2001. footer={null}
  2002. onCancel={this.closeOrderLog}>
  2003. <div className="patent-table">
  2004. <Spin spinning={this.state.loading}>
  2005. <Table columns={this.state.columnsrizhi}
  2006. dataSource={this.state.dataSourcerizhi}
  2007. pagination={false}
  2008. />
  2009. </Spin>
  2010. </div>
  2011. </Modal>
  2012. </div>
  2013. )
  2014. }
  2015. }));
  2016. export default NewService;