addService.jsx 81 KB

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