addService.jsx 64 KB

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