addService.jsx 51 KB

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