addService.jsx 81 KB

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