addService.jsx 77 KB

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