addService.jsx 80 KB

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