addService.jsx 62 KB

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