businessProject.jsx 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449
  1. import React from 'react';
  2. import ReactDom from 'react-dom';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import '../content.less';
  7. import { citySelect,provinceList,areaSelect,provinceSelect} from '../../../NewDicProvinceListAll';
  8. import { Form,Radio, Icon, Button, Input,Tabs, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm,TimePicker,Cascader } from 'antd';
  9. import {categoryState,industry,conditionOrganization,gameState} from '../../../dataDic.js';
  10. import {getCategoryState,getGameState,splitUrl,getprovince} from '../../../tools.js';
  11. import ImgList from "../../../common/imgList";
  12. import {ChooseList} from "../../order/orderNew/chooseList";
  13. const TabPane = Tabs.TabPane;
  14. //图片组件
  15. const PicturesWall = React.createClass({
  16. getInitialState() {
  17. return {
  18. previewVisible: false,
  19. previewImage: '',
  20. fileList: [],
  21. }
  22. },
  23. handleCancel() {
  24. this.setState({ previewVisible: false })
  25. },
  26. handlePreview(file) {
  27. this.setState({
  28. previewImage: file.url || file.thumbUrl,
  29. previewVisible: true,
  30. });
  31. },
  32. handleChange(info) {
  33. let fileList = info.fileList;
  34. this.setState({ fileList });
  35. this.props.fileList(fileList);
  36. },
  37. componentWillReceiveProps(nextProps) {
  38. this.state.fileList = nextProps.pictureUrl;
  39. },
  40. render() {
  41. const { previewVisible, previewImage, fileList } = this.state;
  42. const uploadButton = (
  43. <div>
  44. <Icon type="plus" />
  45. <div className="ant-upload-text">点击上传</div>
  46. </div>
  47. );
  48. return (
  49. <div style={{display:"inline-block"}}>
  50. <ImgList
  51. domId={this.props.domId}
  52. uploadConfig={{
  53. action:globalConfig.context + "/api/admin/ProjectSize/uploadPicture",
  54. data:{ 'sign': this.props.pictureSign },
  55. multiple:true,
  56. listType:"picture-card",
  57. }}
  58. onChange={(infor)=>{
  59. this.handleChange(infor)
  60. }}
  61. fileList={fileList}
  62. />
  63. </div>
  64. );
  65. }
  66. });
  67. //主体
  68. const BusinessProject=Form.create()(React.createClass({
  69. //搜索功能和初始列表加载
  70. loadData(pageNo, apiUrl) {
  71. this.state.data = [];
  72. this.setState({
  73. loading: true,
  74. ispage:pageNo,
  75. });
  76. let nameText=this.state.SuperArr;
  77. let superText=(this.state.cid)?nameText[parseInt(this.state.cid)].id:"";
  78. let isCountry='';
  79. let pro='';
  80. let city='';
  81. let dis='';
  82. if(this.state.ressSearch==undefined){
  83. }else{
  84. switch(parseInt(this.state.ressSearch.length)){
  85. case 1:pro=this.state.ressSearch[0];break;
  86. case 2:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];break;
  87. case 3:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];dis=this.state.ressSearch[2];break;
  88. }
  89. }
  90. if(pro===0){
  91. isCountry=1;
  92. pro='';
  93. }
  94. $.ajax({
  95. method: "post",
  96. dataType: "json",
  97. crossDomain: false,
  98. url: globalConfig.context + "/api/admin/ProjectSize/listProject",
  99. data: {
  100. pageNo: pageNo || 1,
  101. pageSize: this.state.pagination.pageSize,
  102. bname: this.state.bname, //项目名称
  103. cid: superText, //品类名称
  104. country: isCountry, //是否全国
  105. province: pro, //省
  106. city: city, //市
  107. district: dis, //区
  108. activityFlag: this.state.activityFlag, //活动生效标识
  109. status: this.state.status, //项目状态
  110. type: this.state.type,
  111. },
  112. success: function (data) {
  113. let theArr = [];
  114. if (!data.data || !data.data.list) {
  115. if (data.error && data.error.length) {
  116. message.warning(data.error[0].message);
  117. }
  118. } else {
  119. for (let i = 0; i < data.data.list.length; i++) {
  120. let thisdata = data.data.list[i];
  121. let ProvinceCity = [];
  122. let isCountry = "";
  123. if (thisdata.country == 1) {
  124. isCountry = "全国";
  125. } else {
  126. if (thisdata.city == null || thisdata.city == "") {
  127. isCountry += getprovince(parseInt(thisdata.province));
  128. } else if (
  129. thisdata.district == null ||
  130. thisdata.district == ""
  131. ) {
  132. isCountry += getprovince(parseInt(thisdata.province)) + "-";
  133. isCountry += getprovince(parseInt(thisdata.city));
  134. } else {
  135. isCountry += getprovince(parseInt(thisdata.province)) + "-";
  136. isCountry += getprovince(parseInt(thisdata.city)) + "-";
  137. isCountry += getprovince(parseInt(thisdata.district));
  138. }
  139. }
  140. theArr.push({
  141. key: i,
  142. id: thisdata.id, //业务名称
  143. bname: thisdata.bname, //业务名称
  144. cname: thisdata.cname, //业务品类
  145. area: isCountry ? isCountry : ProvinceCity,
  146. price: thisdata.price, //市场价
  147. offset: thisdata.offset, //最低折扣
  148. memberPrice: thisdata.memberPrice, //会员价
  149. activityPrice: thisdata.activityPrice, //活动价
  150. activityFlag: thisdata.activityFlag, //活动生效标识
  151. status: thisdata.status, //项目状态
  152. type: thisdata.type,
  153. arrProvinceCity: ProvinceCity,
  154. });
  155. }
  156. this.state.pagination.current = data.data.pageNo;
  157. this.state.pagination.total = data.data.totalCount;
  158. }
  159. this.setState({
  160. dataSource: theArr,
  161. pagination: this.state.pagination,
  162. });
  163. }.bind(this),
  164. }).always(
  165. function () {
  166. this.setState({
  167. loading: false,
  168. });
  169. }.bind(this)
  170. );
  171. },
  172. //项目规格列表
  173. formatLoadData(pageNo, apiUrl){
  174. this.state.data = [];
  175. this.setState({
  176. loading: true,
  177. });
  178. $.ajax({
  179. method: "get",
  180. dataType: "json",
  181. crossDomain: false,
  182. url: globalConfig.context + '/api/admin/ProjectSize/listProjectSize',
  183. data: {
  184. pageNo: pageNo || 1,
  185. pageSize: this.state.formatPagination.pageSize,
  186. pid:this.state.editId,
  187. },
  188. success: function (data) {
  189. let theArr = [];
  190. if (!data.data || !data.data.list) {
  191. if (data.error && data.error.length) {
  192. message.warning(data.error[0].message);
  193. };
  194. } else {
  195. for (let i = 0; i < data.data.list.length; i++) {
  196. let thisdata = data.data.list[i];
  197. theArr.push({
  198. key: i,
  199. formatId:thisdata.id,//规格ID
  200. formatPname: thisdata.pname,//规格名称
  201. formatBname: thisdata.bname,//项目品类
  202. formatPrice: thisdata.price,//市场价
  203. formatOffset: thisdata.offset,//最低折扣
  204. formatActivityPrice: thisdata.activityPrice,//活动价
  205. formatActivityFlag:thisdata.activityFlag,//活动生效标识
  206. formatMemberPrice:thisdata.memberPrice,//会员价
  207. formatStatus:thisdata.status,//会员价
  208. });
  209. };
  210. this.state.formatPagination.current = data.data.pageNo;
  211. this.state.formatPagination.total = data.data.totalCount;
  212. };
  213. this.setState({
  214. formatDataSource: theArr,
  215. formatPagination: this.state.formatPagination
  216. });
  217. }.bind(this),
  218. }).always(function () {
  219. this.setState({
  220. loading: false
  221. });
  222. }.bind(this));
  223. },
  224. getInitialState() {
  225. return {
  226. searchMore: true,
  227. selectedRowKeys: [],
  228. selectedRows: [],
  229. loading: false,
  230. orgCodeUrl: [],
  231. companyLogoUrl: [],
  232. pagination: {
  233. defaultCurrent: 1,
  234. defaultPageSize: 10,
  235. showQuickJumper: true,
  236. pageSize: 10,
  237. onChange: function (page) {
  238. this.loadData(page);
  239. }.bind(this),
  240. showTotal: function (total) {
  241. return "共" + total + "条数据";
  242. },
  243. },
  244. formatPagination: {
  245. defaultCurrent: 1,
  246. defaultPageSize: 10,
  247. showQuickJumper: true,
  248. pageSize: 10,
  249. onChange: function (page) {
  250. this.loadData(page);
  251. }.bind(this),
  252. showTotal: function (total) {
  253. return "共" + total + "条数据";
  254. },
  255. },
  256. ContactsLists: [
  257. {
  258. title: "业务项目名称",
  259. dataIndex: "formatBname",
  260. key: "formatBname",
  261. },
  262. {
  263. title: "规格名称",
  264. dataIndex: "formatPname",
  265. key: "formatPname",
  266. },
  267. {
  268. title: "市场价",
  269. dataIndex: "formatPrice",
  270. key: "formatPrice",
  271. },
  272. {
  273. title: "最低折扣",
  274. dataIndex: "formatOffset",
  275. key: "formatOffset",
  276. },
  277. {
  278. title: "会员价",
  279. dataIndex: "formatMemberPrice",
  280. key: "formatMemberPrice",
  281. },
  282. {
  283. title: "活动价",
  284. dataIndex: "formatActivityPrice",
  285. key: "formatActivityPrice",
  286. },
  287. {
  288. title: "活动生效标识",
  289. dataIndex: "formatActivityFlag",
  290. key: "formatActivityFlag",
  291. render: (text) => {
  292. return getGameState(text);
  293. },
  294. },
  295. {
  296. title: "状态",
  297. dataIndex: "formatStatus",
  298. key: "formatStatus",
  299. render: (text) => {
  300. return getCategoryState(text.toString());
  301. },
  302. },
  303. ],
  304. formatDataSource: [],
  305. columns: [
  306. {
  307. title: "项目名称",
  308. dataIndex: "bname",
  309. key: "bname",
  310. },
  311. {
  312. title: "业务品类",
  313. dataIndex: "cname",
  314. key: "cname",
  315. },
  316. {
  317. title: "业务地区",
  318. dataIndex: "area",
  319. key: "area",
  320. // render: text => { return getprovince(text); }
  321. },
  322. {
  323. title: "市场价",
  324. dataIndex: "price",
  325. key: "price",
  326. },
  327. {
  328. title: "最低折扣",
  329. dataIndex: "offset",
  330. key: "offset",
  331. },
  332. {
  333. title: "会员价",
  334. dataIndex: "memberPrice",
  335. key: "memberPrice",
  336. },
  337. {
  338. title: "活动价",
  339. dataIndex: "activityPrice",
  340. key: "activityPrice",
  341. },
  342. {
  343. title: "活动生效标识",
  344. dataIndex: "activityFlag",
  345. key: "activityFlag",
  346. render: (text) => {
  347. return getGameState(text);
  348. },
  349. },
  350. {
  351. title: "业务状态",
  352. dataIndex: "status",
  353. key: "status",
  354. render: (text) => {
  355. return getCategoryState(text);
  356. },
  357. },
  358. {
  359. title: "项目分类",
  360. dataIndex: "type",
  361. key: "type",
  362. render: (text, record) => {
  363. if (record.type == 0) {
  364. return "通用";
  365. } else if (record.type == 1) {
  366. return "专利";
  367. } else if (record.type == 2) {
  368. return "软著";
  369. } else if (record.type == 3) {
  370. return "审计";
  371. }else if(record.type == 4) {
  372. return "双软"
  373. }else if(record.type == 5) {
  374. return "高新"
  375. }else if(record.type == 6) {
  376. return "商标"
  377. }
  378. },
  379. },
  380. ],
  381. dataSource: [],
  382. };
  383. },
  384. componentWillMount() {
  385. this.selectSuperId();
  386. },
  387. //获取上级品类
  388. selectSuperId() {
  389. this.state.data = []
  390. $.ajax({
  391. method: "get",
  392. dataType: "json",
  393. crossDomain: false,
  394. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  395. data:{
  396. flag:0,
  397. },
  398. success: function (data) {
  399. let theArr = [];
  400. let thedata=data.data;
  401. if (!thedata) {
  402. if (data.error && data.error.length) {
  403. message.warning(data.error[0].message);
  404. };
  405. thedata = {};
  406. };
  407. var contactIds=[];
  408. for(var i=0;i<data.data.length;i++){
  409. let theData = data.data[i];
  410. theArr.push(
  411. <Select.Option value={i.toString()} key={theData.cname}>{theData.cname}</Select.Option>
  412. );
  413. };
  414. this.setState({
  415. SuperArr:thedata,
  416. contactsOption: theArr,
  417. orderStatusOptions:data.data,
  418. });
  419. console.log(theArr);
  420. }.bind(this),
  421. }).always(function () {
  422. this.loadData(this.state.ispage);
  423. this.setState({
  424. loading: false
  425. });
  426. }.bind(this));
  427. },
  428. //编辑部门,保存
  429. edithandleSubmit(e){
  430. e.preventDefault();
  431. let offsetText;
  432. if(this.state.editOffset){
  433. if(this.state.editOffset>10||this.state.editOffset<0){
  434. message.warning('最低折扣请输入0到10之间的数字');
  435. return false;
  436. }else{
  437. offsetText=this.state.editOffset;
  438. }
  439. }
  440. this.props.form.validateFields((err, values) => {
  441. let theorgCodeUrl = [];
  442. if(this.state.orgCodeUrl.length) {
  443. let picArr = [];
  444. this.state.orgCodeUrl.map(function(item) {
  445. if ( item.response && item.response.data && item.response.data.length ){
  446. picArr.push(item.response.data);
  447. }
  448. });
  449. theorgCodeUrl = picArr.join(",");
  450. };
  451. let thecompanyLogoUrl = [];
  452. if(this.state.companyLogoUrl.length) {
  453. let picArr = [];
  454. this.state.companyLogoUrl.map(function(item) {
  455. if ( item.response && item.response.data && item.response.data.length ){
  456. picArr.push(item.response.data);
  457. }
  458. });
  459. thecompanyLogoUrl = picArr.join(",");
  460. };
  461. if(!err) {
  462. this.setState({
  463. loading: true
  464. });
  465. let nameText=this.state.SuperArr
  466. // let num = 0
  467. // nameText.forEach((item,index) => {
  468. // if(item.cname == this.state.editCname) {
  469. // num = index
  470. // }
  471. // })
  472. // let superText=(this.state.editCname.length==1)?nameText[parseInt(this.state.editCname)].id:this.state.editCid;
  473. // let superText=nameText[parseInt(this.state.editCname)].id
  474. let arr = nameText.filter((v,k)=>v.cname === this.state.editCname || String(k) === this.state.editCname)
  475. let superText=arr.length ? arr[0].id:"";
  476. let isCountry=0;
  477. let pro='';
  478. let city='';
  479. let dis='';
  480. if(this.state.ProvinceCity==undefined||this.state.ProvinceCity.length==0){
  481. message.warning('请选择项目有效范围');
  482. this.setState({
  483. loading: false
  484. });
  485. return false;
  486. }else{
  487. switch(parseInt(this.state.ProvinceCity.length)){
  488. case 1:pro=this.state.ProvinceCity[0];break;
  489. case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
  490. case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
  491. }
  492. }
  493. if(pro==0){
  494. isCountry=1;
  495. pro='';
  496. }
  497. $.ajax({
  498. method: "post",
  499. dataType: "json",
  500. crossDomain: false,
  501. url:globalConfig.context + '/api/admin/ProjectSize/updateProject',
  502. data:{
  503. id:this.state.editId,//项目ID
  504. cid:superText,//项目业务品类
  505. bname:this.state.editName,//业务项目名称
  506. price:this.state.editPrice,//市场价
  507. firstPayment:this.state.firstPayment,//首付金额
  508. offset:offsetText,//最低折扣
  509. activityPrice:this.state.editActivityPrice,//活动价
  510. activityFlag:this.state.editActivityFlag,//活动生效标识
  511. memberPrice:this.state.editMemberPrice,//项目ID
  512. status:this.state.editStatus,//项目状态
  513. type: this.state.typeStatus,//项目分类
  514. country:isCountry,//是否全国
  515. province:pro?pro:'',//省
  516. city:city?city:'',//市
  517. district:dis?dis:'',//区
  518. minLogo:theorgCodeUrl,
  519. maxLogo:thecompanyLogoUrl,
  520. introduce:this.state.editIntroduce,//项目介绍
  521. projectUrl:this.state.editProjectUrl,//项目地址
  522. valueEffect:this.state.editValueEffect,//项目价值及作用
  523. clientSize:this.state.editClientSize,//项目基本条件
  524. boutique:this.state.editBoutique,
  525. }
  526. }).done(function (data) {
  527. this.setState({
  528. loading: false
  529. });
  530. if (!data.error.length) {
  531. message.success('保存成功!');
  532. this.edithandleCancel();
  533. this.selectSuperId();
  534. } else {
  535. message.warning(data.error[0].message);
  536. }
  537. }.bind(this));
  538. }
  539. })
  540. },
  541. //规格列表整行点击
  542. formatTableRowClick(record, index){
  543. this.editformatClick();
  544. this.state.RowData = record;
  545. this.setState({
  546. selectedRowKeys:[],
  547. formatId:record.formatId,//规格名称
  548. formatPname:record.formatPname,//规格名称
  549. formatPrice:record.formatPrice,//市场价
  550. formatOffset:record.formatOffset,//最低折扣
  551. formatActivityPrice:record.formatActivityPrice,//活动价
  552. formatActivityFlag:record.formatActivityFlag,//活动生效标识
  553. formatMemberPrice:record.formatMemberPrice,//会员价
  554. formatStatus:record.formatStatus.toString(),//项目状态
  555. });
  556. },
  557. //项目列表整行点击
  558. tableRowClick(record, index) {
  559. this.selectSuperId();
  560. this.state.RowData = record;
  561. this.setState({
  562. callnub:'1',
  563. editvisible: true,
  564. selectedRowKeys:[],
  565. rowId:record.businessId,
  566. });
  567. $.ajax({
  568. method: "get",
  569. dataType: "json",
  570. crossDomain: false,
  571. url: globalConfig.context +"/api/admin/ProjectSize/orgProject" ,
  572. data: {
  573. id: record.id
  574. },
  575. success: function (data) {
  576. let theArr = [];
  577. let ProvinceCity=[];
  578. let thisdata = data.data;
  579. if (!data) {
  580. if (data.error && data.error.length) {
  581. message.warning(data.error[0].message);
  582. };
  583. } else {
  584. if(thisdata.country==1){
  585. ProvinceCity.push(0);
  586. }else{
  587. ProvinceCity.push(parseInt(thisdata.province));
  588. ProvinceCity.push(parseInt(thisdata.city));
  589. ProvinceCity.push(parseInt(thisdata.district));
  590. }
  591. let str = ""
  592. if(thisdata.type == 0) {
  593. str = "通用"
  594. }else if(thisdata.type == 1) {
  595. str = "专利"
  596. }else if(thisdata.type == 2) {
  597. str = "软著"
  598. }else if(thisdata.type == 3) {
  599. str = "审计"
  600. }else if(thisdata.type == 4) {
  601. str = "双软"
  602. }else if(thisdata.type == 5) {
  603. str = "高新"
  604. }else if(thisdata.type == 6) {
  605. str = "商标"
  606. }
  607. theArr.push({
  608. editId: thisdata.id,//每一条记录的ID
  609. editName:thisdata.bname,//项目名称
  610. editCname: thisdata.cname,//项目分类
  611. editCid: thisdata.cid,//项目分类
  612. editCountry: thisdata.country,//是否全国
  613. editProvince: thisdata.province,//省
  614. editCity: thisdata.city,//市
  615. editDistrict: thisdata.district,//区
  616. editPrice: thisdata.price,//市场价
  617. firstPayment:thisdata.firstPayment,//首付金额
  618. editActivityPrice: thisdata.activityPrice,//活动价
  619. editOffset: thisdata.offset,//最低折扣
  620. editMemberPrice: thisdata.memberPrice,//会员价
  621. editActivityFlag:thisdata.activityFlag,//活动生效标识
  622. editStatus:thisdata.status,//品类状态
  623. typeStr: str,
  624. typeStatus: thisdata.type,
  625. editCreateId:thisdata.createName,//创建人
  626. editTime:thisdata.createTimeFormattedDate,//创建时间
  627. editIntroduce:thisdata.introduce,//服务内容
  628. editProjectUrl:thisdata.projectUrl,//项目地址
  629. editValueEffect:thisdata.valueEffect,//价值及作用
  630. editClientSize:thisdata.clientSize,//基本条件
  631. editBoutique:thisdata.boutique,//是否精品
  632. orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],
  633. cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],
  634. });
  635. };
  636. //0 正常 1专利 2软著 3审计 4双软 5高新 6商标
  637. let str = ""
  638. if(thisdata.type == 0) {
  639. str = "通用"
  640. }else if(thisdata.type == 1) {
  641. str = "专利"
  642. }else if(thisdata.type == 2) {
  643. str = "软著"
  644. }else if(thisdata.type == 3) {
  645. str = "审计"
  646. }else if(thisdata.type == 4) {
  647. str = "双软"
  648. }else if(thisdata.type == 5) {
  649. str = "高新"
  650. }else if(thisdata.type == 6) {
  651. str = "商标"
  652. }
  653. this.setState({
  654. editId: thisdata.id, //每一条记录的ID
  655. editName: thisdata.bname, //项目名称
  656. editCname: thisdata.cname, //项目分类
  657. editCid: thisdata.cid, //项目分类
  658. editCountry: thisdata.country, //是否全国
  659. editProvince: thisdata.province, //省
  660. editCity: thisdata.city, //市
  661. editDistrict: thisdata.district, //区
  662. editPrice: thisdata.price, //市场价
  663. firstPayment: thisdata.firstPayment,
  664. editActivityPrice: thisdata.activityPrice, //活动价
  665. editOffset: thisdata.offset, //最低折扣
  666. editMemberPrice: thisdata.memberPrice, //会员价
  667. editActivityFlag: thisdata.activityFlag, //活动生效标识
  668. editStatus: thisdata.status, //品类状态
  669. typeStr: str,
  670. typeStatus: thisdata.type,
  671. editCreateId: thisdata.createName, //创建人
  672. editTime: thisdata.createTimeFormattedDate, //创建时间
  673. editIntroduce: thisdata.introduce, //服务内容
  674. editProjectUrl: thisdata.projectUrl, //项目地址
  675. editValueEffect: thisdata.valueEffect, //价值及作用
  676. editClientSize: thisdata.clientSize, //基本条件
  677. editBoutique: thisdata.boutique, //是否精品
  678. orgCodeUrl: thisdata.minLogo
  679. ? splitUrl(
  680. thisdata.minLogo,
  681. ",",
  682. globalConfig.avatarHost + "/upload"
  683. )
  684. : [],
  685. companyLogoUrl: thisdata.maxLogo
  686. ? splitUrl(
  687. thisdata.maxLogo,
  688. ",",
  689. globalConfig.avatarHost + "/upload"
  690. )
  691. : [],
  692. editDataSource: theArr,
  693. ProvinceCity: ProvinceCity
  694. });
  695. }.bind(this),
  696. }).always(function () {
  697. this.setState({
  698. loading: false
  699. });
  700. }.bind(this));
  701. },
  702. //左侧图片地址
  703. getOrgCodeUrl(e) {
  704. this.setState({ orgCodeUrl: e });
  705. },
  706. //右侧图片地址
  707. getCompanyLogoUrl(e) {
  708. this.setState({ companyLogoUrl: e });
  709. },
  710. //编辑一个规格,保存
  711. editformathandleSubmit(e){
  712. e.preventDefault();
  713. let offsetText;
  714. if(this.state.formatOffset){
  715. if(this.state.formatOffset>10||this.state.formatOffset<0){
  716. message.warning('最低折扣请输入0到10之间的数字');
  717. return false;
  718. }else{
  719. offsetText=this.state.formatOffset;
  720. }
  721. }
  722. this.props.form.validateFields((err, values) => {
  723. if (!err) {
  724. this.setState({
  725. loading: true
  726. });
  727. $.ajax({
  728. method: "post",
  729. dataType: "json",
  730. crossDomain: false,
  731. url:globalConfig.context + '/api/admin/ProjectSize/orgProjectSize',
  732. data:{
  733. id:this.state.formatId,//项目ID
  734. pname:this.state.formatPname,//规格名称
  735. price:this.state.formatPrice,//市场价
  736. offset:offsetText,//最低折扣
  737. activityPrice:this.state.formatActivityPrice,//活动价
  738. activityFlag:this.state.formatActivityFlag,//活动生效标识
  739. memberPrice:this.state.formatMemberPrice,//会员价
  740. status:this.state.formatStatus,//项目状态
  741. }
  742. }).done(function (data) {
  743. this.setState({
  744. loading: false
  745. });
  746. if (!data.error.length) {
  747. message.success('修改规格成功!');
  748. this.formatLoadData();
  749. this.editformathandleCancel();
  750. } else {
  751. message.warning(data.error[0].message);
  752. }
  753. }.bind(this));
  754. }
  755. });
  756. },
  757. //新增一个规格,保存
  758. formathandleSubmit(e){
  759. e.preventDefault();
  760. let offsetText;
  761. if(this.state.formatOffset){
  762. if(this.state.formatOffset>10||this.state.formatOffset<0){
  763. message.warning('最低折扣请输入0到10之间的数字');
  764. return false;
  765. }else{
  766. offsetText=this.state.formatOffset;
  767. }
  768. }
  769. this.props.form.validateFields((err, values) => {
  770. if (!err) {
  771. this.setState({
  772. loading: true
  773. });
  774. $.ajax({
  775. method: "post",
  776. dataType: "json",
  777. crossDomain: false,
  778. url:globalConfig.context + '/api/admin/ProjectSize/addProjectSize',
  779. data:{
  780. pid:this.state.editId,//项目ID
  781. pname:this.state.formatPname,//规格名称
  782. price:this.state.formatPrice,//市场价
  783. offset:offsetText,//最低折扣
  784. activityPrice:this.state.formatActivityPrice,//活动价
  785. activityFlag:this.state.formatActivityFlag,//活动生效标识
  786. memberPrice:this.state.formatMemberPrice,//会员价
  787. status:this.state.formatStatus,//项目状态
  788. }
  789. }).done(function (data) {
  790. this.setState({
  791. loading: false
  792. });
  793. if (!data.error.length) {
  794. message.success('新增规格成功!');
  795. this.formathandleCancel();
  796. this.formatLoadData();
  797. } else {
  798. message.warning(data.error[0].message);
  799. }
  800. }.bind(this));
  801. }
  802. });
  803. },
  804. //新增一个项目,保存
  805. addhandleSubmit(e){
  806. e.preventDefault();
  807. if(!this.state.categoryName){
  808. message.warning('请输入项目名称');
  809. return false;
  810. }
  811. if(!this.state.addCid){
  812. message.warning('请选择项目品类');
  813. return false;
  814. }
  815. let isCountry=0;
  816. let pro='';
  817. let city='';
  818. let dis='';
  819. if(this.state.ProvinceCity==undefined){
  820. message.warning('请选择项目有效范围');
  821. return false;
  822. }else{
  823. switch(parseInt(this.state.ProvinceCity.length)){
  824. case 1:pro=this.state.ProvinceCity[0];break;
  825. case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
  826. case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
  827. }
  828. }
  829. if(pro==0){
  830. isCountry=1;
  831. pro='';
  832. }
  833. this.props.form.validateFields((err, values) => {
  834. if (!err) {
  835. this.setState({
  836. loading: true
  837. });
  838. //上级组织字典
  839. let nameText=this.state.SuperArr;
  840. let superText=nameText[parseInt(this.state.addCid)].id;
  841. $.ajax({
  842. method: "post",
  843. dataType: "json",
  844. crossDomain: false,
  845. url:globalConfig.context + '/api/admin/ProjectSize/addProject',
  846. data:{
  847. bname:this.state.categoryName,//项目名称
  848. cid:superText,//品类类ID
  849. boutique:this.state.boutique?this.state.boutique:'0',
  850. country:isCountry,//是否全国
  851. province:pro,//省
  852. city:city,//市
  853. district:dis,//区
  854. }
  855. }).done(function (data) {
  856. this.setState({
  857. loading: false
  858. });
  859. if (!data.error.length) {
  860. message.success('新增项目成功!');
  861. this.handleCancel();
  862. this.selectSuperId();
  863. } else {
  864. message.warning(data.error[0].message);
  865. }
  866. }.bind(this));
  867. }
  868. });
  869. },
  870. //项目整行删除
  871. delectRow() {
  872. let deletedIds = '';
  873. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  874. let rowItem = this.state.selectedRows[idx];
  875. if (rowItem.id) {
  876. deletedIds=rowItem.id;
  877. };
  878. };
  879. this.setState({
  880. selectedRowKeys: [],
  881. loading: deletedIds.length > 0
  882. });
  883. $.ajax({
  884. method: "get",
  885. dataType: "json",
  886. crossDomain: false,
  887. url: globalConfig.context + "/api/admin/ProjectSize/deleteProject",
  888. data: {
  889. id:deletedIds
  890. }
  891. }).done(function (data) {
  892. if (!data.error.length) {
  893. message.success('删除成功!');
  894. this.setState({
  895. loading: false,
  896. });
  897. } else {
  898. message.warning(data.error[0].message);
  899. };
  900. this.selectSuperId();
  901. }.bind(this));
  902. },
  903. //项目整行停用
  904. blockRow() {
  905. let deletedIds = '';
  906. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  907. let rowItem = this.state.selectedRows[idx];
  908. if (rowItem.id) {
  909. deletedIds=rowItem.id;
  910. };
  911. };
  912. this.setState({
  913. selectedRowKeys: [],
  914. loading: deletedIds.length > 0
  915. });
  916. $.ajax({
  917. method: "get",
  918. dataType: "json",
  919. crossDomain: false,
  920. url: globalConfig.context + "/api/admin/ProjectSize/stopProject",
  921. data: {
  922. id:deletedIds
  923. }
  924. }).done(function (data) {
  925. if (!data.error.length) {
  926. message.success('该项目已成功停用!');
  927. this.setState({
  928. loading: false,
  929. });
  930. } else {
  931. message.warning(data.error[0].message);
  932. };
  933. this.selectSuperId();
  934. }.bind(this));
  935. },
  936. //规格整行删除
  937. delectRowSize() {
  938. let deletedIds = '';
  939. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  940. let rowItem = this.state.selectedRows[idx];
  941. if (rowItem.formatId) {
  942. deletedIds=rowItem.formatId;
  943. };
  944. };
  945. this.setState({
  946. selectedRowKeys: [],
  947. loading: deletedIds.length > 0
  948. });
  949. $.ajax({
  950. method: "get",
  951. dataType: "json",
  952. crossDomain: false,
  953. url: globalConfig.context + "/api/admin/ProjectSize/deleteProjectSize",
  954. data: {
  955. id: deletedIds
  956. }
  957. }).done(function (data) {
  958. if (!data.error.length) {
  959. message.success('删除成功!');
  960. this.setState({
  961. loading: false,
  962. });
  963. } else {
  964. message.warning(data.error[0].message);
  965. };
  966. this.formatLoadData();
  967. }.bind(this));
  968. },
  969. //规格整行停用
  970. blockRowSize() {
  971. let deletedIds = '';
  972. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  973. let rowItem = this.state.selectedRows[idx];
  974. if (rowItem.formatId) {
  975. deletedIds=rowItem.formatId;
  976. };
  977. };
  978. this.setState({
  979. selectedRowKeys: [],
  980. loading: deletedIds.length > 0
  981. });
  982. $.ajax({
  983. method: "get",
  984. dataType: "json",
  985. crossDomain: false,
  986. url: globalConfig.context + "/api/admin/ProjectSize/stopProjectSize",
  987. data: {
  988. id: deletedIds
  989. }
  990. }).done(function (data) {
  991. if (!data.error.length) {
  992. message.success('该项目已成功停用!');
  993. this.setState({
  994. loading: false,
  995. });
  996. } else {
  997. message.warning(data.error[0].message);
  998. };
  999. this.formatLoadData();
  1000. }.bind(this));
  1001. },
  1002. addClick() {
  1003. this.state.RowData = {};
  1004. this.setState({
  1005. visible: true
  1006. });
  1007. this.addReset();
  1008. },
  1009. editClick(e) {
  1010. this.state.RowData = {};
  1011. this.setState({
  1012. editvisible: true
  1013. });
  1014. },
  1015. formatClick(e) {
  1016. this.formatReset();
  1017. this.state.RowData = {};
  1018. this.setState({
  1019. formatvisible: true
  1020. });
  1021. },
  1022. editformatClick(e) {
  1023. this.state.RowData = {};
  1024. this.setState({
  1025. editformatvisible: true
  1026. });
  1027. },
  1028. handleCancel() {
  1029. this.setState({ visible: false })
  1030. },
  1031. edithandleCancel(e) {
  1032. this.setState({
  1033. editvisible: false
  1034. });
  1035. },
  1036. formathandleCancel(e) {
  1037. this.setState({
  1038. formatvisible: false
  1039. });
  1040. },
  1041. editformathandleCancel(e) {
  1042. this.setState({
  1043. editformatvisible: false
  1044. });
  1045. },
  1046. search() {
  1047. this.loadData();
  1048. },
  1049. //搜索部分的清零
  1050. reset() {
  1051. this.state.bname = '';//项目名称清零
  1052. this.state.cid = undefined;//品类名称清零
  1053. this.state.ressSearch= undefined;//省市区清零
  1054. this.state.activityFlag = undefined;//活动生效清零
  1055. this.state.status = undefined;//项目状态清零
  1056. this.state.type = undefined;//项目分类清零
  1057. this.loadData();
  1058. },
  1059. //新增部分的清零
  1060. addReset(){
  1061. this.state.categoryName='';//项目名称清零
  1062. this.state.ProvinceCity=undefined;
  1063. this.state.addCid=undefined;
  1064. this.state.boutique='';
  1065. },
  1066. //规格新增清零
  1067. formatReset() {
  1068. this.state.formatPname = '';//规格名称清零
  1069. this.state.formatPrice = '';//市场价清零
  1070. this.state.formatOffset = '';//最低折扣清零
  1071. this.state.formatActivityPrice = '';//活动价清零
  1072. this.state.formatMemberPrice = '';//会员价清零
  1073. this.state.formatActivityFlag = undefined;//活动生效标识清零
  1074. this.state.formatStatus= undefined;//项目状态清零
  1075. this.formatLoadData();
  1076. },
  1077. //详情tab切换数据处理
  1078. callback(e) {
  1079. this.setState({
  1080. callnub: e,
  1081. })
  1082. if(e == 1) {
  1083. }
  1084. if(e == 2) {
  1085. this.formatLoadData();
  1086. }
  1087. },
  1088. //更多搜索的显示与否
  1089. searchSwitch() {
  1090. this.setState({
  1091. searchMore: !this.state.searchMore
  1092. });
  1093. },
  1094. changeList(arr) {
  1095. const newArr = [];
  1096. this.state.columns.forEach(item => {
  1097. arr.forEach(val => {
  1098. if (val === item.title) {
  1099. newArr.push(item);
  1100. }
  1101. });
  1102. });
  1103. this.setState({
  1104. changeList: newArr
  1105. });
  1106. },
  1107. render() {
  1108. const FormItem = Form.Item
  1109. const rowSelection = {
  1110. selectedRowKeys: this.state.selectedRowKeys,
  1111. onChange: (selectedRowKeys, selectedRows) => {
  1112. this.setState({
  1113. selectedRows: selectedRows.slice(-1),
  1114. selectedRowKeys: selectedRowKeys.slice(-1)
  1115. });
  1116. }
  1117. };
  1118. const formItemLayout = {
  1119. labelCol: { span: 8 },
  1120. wrapperCol: { span: 14 },
  1121. };
  1122. const { getFieldDecorator } = this.props.form;
  1123. const hasSelected = this.state.selectedRowKeys.length > 0;
  1124. const { RangePicker } = DatePicker;
  1125. return (
  1126. <div className="user-content">
  1127. <div className="content-title">
  1128. <Tabs
  1129. defaultActiveKey="1"
  1130. className="test"
  1131. >
  1132. <TabPane tab="搜索" key="1">
  1133. <div className="user-search">
  1134. <Input
  1135. placeholder="业务项目名称"
  1136. style={{
  1137. width: "150px",
  1138. marginRight: "10px",
  1139. marginBottom: "10px",
  1140. marginLeft: 10,
  1141. }}
  1142. value={this.state.bname}
  1143. onChange={(e) => {
  1144. this.setState({ bname: e.target.value });
  1145. }}
  1146. />
  1147. <Select
  1148. placeholder="业务品类"
  1149. style={{ width: "200px", marginRight: "10px" }}
  1150. value={this.state.cid}
  1151. onChange={(e) => {
  1152. this.setState({ cid: e });
  1153. }}
  1154. notFoundContent="未获取到上级品类列表"
  1155. >
  1156. {this.state.contactsOption}
  1157. </Select>
  1158. <Button
  1159. type="primary"
  1160. onClick={this.search}
  1161. style={{ marginRight: "10px" }}
  1162. >
  1163. 搜索
  1164. </Button>
  1165. <Button
  1166. onClick={this.reset}
  1167. style={{ marginRight: "10px" }}
  1168. >
  1169. 重置
  1170. </Button>
  1171. <Popconfirm
  1172. title="是否删除?"
  1173. onConfirm={this.delectRow}
  1174. okText="是"
  1175. cancelText="否"
  1176. >
  1177. <Button
  1178. style={{
  1179. background: "#ea0862",
  1180. border: "none",
  1181. color: "#fff",
  1182. marginRight: "10px",
  1183. marginLeft: "10px",
  1184. }}
  1185. disabled={!hasSelected}
  1186. >
  1187. 删除
  1188. <Icon type="minus" />
  1189. </Button>
  1190. </Popconfirm>
  1191. <Popconfirm
  1192. title="是否停用?"
  1193. onConfirm={this.blockRow}
  1194. okText="是"
  1195. cancelText="否"
  1196. >
  1197. <Button
  1198. style={{
  1199. background: "#ea0862",
  1200. border: "none",
  1201. color: "#fff",
  1202. marginRight: "10px",
  1203. marginLeft: "10px",
  1204. display: "none",
  1205. }}
  1206. disabled={!hasSelected}
  1207. >
  1208. 停用
  1209. <Icon type="minus" />
  1210. </Button>
  1211. </Popconfirm>
  1212. <span style={{ marginRight: "20px" }}>
  1213. 更多搜索{" "}
  1214. <Switch
  1215. defaultChecked={false}
  1216. onChange={this.searchSwitch}
  1217. />
  1218. </span>
  1219. <div
  1220. className="search-more"
  1221. style={
  1222. this.state.searchMore
  1223. ? { display: "none" }
  1224. : { display: "block" }
  1225. }
  1226. >
  1227. <span
  1228. style={{
  1229. marginRight: "10px",
  1230. marginBottom: "10px",
  1231. marginLeft: 10,
  1232. }}
  1233. >
  1234. <Cascader
  1235. options={provinceSelect()}
  1236. value={this.state.ressSearch}
  1237. placeholder="选择省份"
  1238. onChange={(e, pre) => {
  1239. this.setState({ ressSearch: e });
  1240. }}
  1241. />
  1242. </span>
  1243. <span
  1244. style={{ marginRight: "10px", marginBottom: "10px" }}
  1245. >
  1246. <Cascader
  1247. options={citySelect()}
  1248. value={this.state.ressSearch}
  1249. placeholder="选择城市"
  1250. onChange={(e, pre) => {
  1251. this.setState({ ressSearch: e });
  1252. }}
  1253. />
  1254. </span>
  1255. <span style={{ marginRight: "10px" }}>
  1256. <Cascader
  1257. options={areaSelect()}
  1258. value={this.state.ressSearch}
  1259. placeholder="选择地区"
  1260. onChange={(e, pre) => {
  1261. this.setState({ ressSearch: e });
  1262. }}
  1263. />
  1264. </span>
  1265. <Select
  1266. placeholder="活动生效标识"
  1267. style={{
  1268. width: "150px",
  1269. marginRight: "10px",
  1270. marginBottom: "10px",
  1271. }}
  1272. value={this.state.activityFlag}
  1273. onChange={(e) => {
  1274. this.setState({ activityFlag: e });
  1275. }}
  1276. >
  1277. <Select.Option value="0">有效</Select.Option>
  1278. <Select.Option value="1">无效</Select.Option>
  1279. </Select>
  1280. <Select
  1281. placeholder="项目状态"
  1282. style={{ width: "150px", marginRight: "10px" }}
  1283. value={this.state.status}
  1284. onChange={(e) => {
  1285. this.setState({ status: e });
  1286. }}
  1287. >
  1288. <Select.Option value="0">正常</Select.Option>
  1289. <Select.Option value="1">停用</Select.Option>
  1290. </Select>
  1291. <Select
  1292. placeholder="项目分类"
  1293. style={{ width: "150px", marginRight: "10px" }}
  1294. value={this.state.type}
  1295. onChange={(e) => {
  1296. this.setState({ type: e });
  1297. }}
  1298. >
  1299. <Select.Option value="0">通用</Select.Option>
  1300. <Select.Option value="1">专利</Select.Option>
  1301. <Select.Option value="2">软著</Select.Option>
  1302. <Select.Option value="3">审计</Select.Option>
  1303. <Select.Option value="4">双软</Select.Option>
  1304. <Select.Option value="5">高新</Select.Option>
  1305. <Select.Option value="6">商标</Select.Option>
  1306. </Select>
  1307. </div>
  1308. </div>
  1309. </TabPane>
  1310. <TabPane tab="新增项目" key="2">
  1311. <Button
  1312. type="primary"
  1313. className="addButton"
  1314. onClick={this.addClick}
  1315. style={{
  1316. float: "left",
  1317. marginRight: "50px",
  1318. marginLeft: 10,
  1319. marginBottom: 10,
  1320. }}
  1321. >
  1322. 新增项目
  1323. <Icon type="plus" />
  1324. </Button>
  1325. </TabPane>
  1326. <TabPane tab="更改表格显示数据" key="3">
  1327. <div style={{ marginLeft: 10 }}>
  1328. <ChooseList
  1329. columns={this.state.columns}
  1330. changeFn={this.changeList}
  1331. changeList={this.state.changeList}
  1332. top={55}
  1333. margin={11}
  1334. />
  1335. </div>
  1336. </TabPane>
  1337. </Tabs>
  1338. <div className="patent-table">
  1339. <Spin spinning={this.state.loading}>
  1340. <Table
  1341. size="middle"
  1342. columns={
  1343. this.state.changeList
  1344. ? this.state.changeList
  1345. : this.state.columns
  1346. }
  1347. dataSource={this.state.dataSource}
  1348. rowSelection={rowSelection}
  1349. pagination={this.state.pagination}
  1350. onRowClick={this.tableRowClick}
  1351. current={this.state.aa}
  1352. />
  1353. </Spin>
  1354. </div>
  1355. <div className="patent-desc">
  1356. <Modal
  1357. maskClosable={false}
  1358. visible={this.state.visible}
  1359. onOk={this.checkPatentProcess}
  1360. onCancel={this.handleCancel}
  1361. width="400px"
  1362. title="新增业务项目"
  1363. footer=""
  1364. className="admin-desc-content"
  1365. >
  1366. <Form
  1367. horizontal
  1368. onSubmit={this.addhandleSubmit}
  1369. id="demand-form"
  1370. >
  1371. <Spin spinning={this.state.loading}>
  1372. <div className="clearfix">
  1373. <FormItem
  1374. labelCol={{ span: 7 }}
  1375. wrapperCol={{ span: 12 }}
  1376. label="业务项目名称"
  1377. >
  1378. <Input
  1379. placeholder="业务项目名称"
  1380. value={this.state.categoryName}
  1381. style={{ width: "94%" }}
  1382. onChange={(e) => {
  1383. this.setState({ categoryName: e.target.value });
  1384. }}
  1385. required="required"
  1386. />
  1387. <span
  1388. className="mandatory"
  1389. style={{ color: "red", marginLeft: "5px" }}
  1390. >
  1391. *
  1392. </span>
  1393. </FormItem>
  1394. </div>
  1395. <div className="clearfix">
  1396. <FormItem
  1397. labelCol={{ span: 7 }}
  1398. wrapperCol={{ span: 12 }}
  1399. label="业务品类"
  1400. >
  1401. <Select
  1402. placeholder="请选择业务品类"
  1403. value={this.state.addCid}
  1404. onChange={(e) => {
  1405. this.setState({ addCid: e });
  1406. }}
  1407. notFoundContent="未获取到业务品类列表"
  1408. style={{ width: "94%" }}
  1409. required="required"
  1410. >
  1411. {this.state.contactsOption}
  1412. </Select>
  1413. <span
  1414. className="mandatory"
  1415. style={{ color: "red", marginLeft: "5px" }}
  1416. >
  1417. *
  1418. </span>
  1419. </FormItem>
  1420. </div>
  1421. <div className="clearfix">
  1422. <FormItem
  1423. labelCol={{ span: 7 }}
  1424. wrapperCol={{ span: 12 }}
  1425. label="是否精品"
  1426. >
  1427. <Radio.Group
  1428. value={this.state.boutique}
  1429. onChange={(e) => {
  1430. this.setState({ boutique: e.target.value });
  1431. }}
  1432. >
  1433. <Radio value={1}>精品</Radio>
  1434. <Radio value={0}>非精品</Radio>
  1435. </Radio.Group>
  1436. </FormItem>
  1437. </div>
  1438. <div className="clearfix">
  1439. <FormItem
  1440. labelCol={{ span: 7 }}
  1441. wrapperCol={{ span: 12 }}
  1442. label="省"
  1443. >
  1444. <Cascader
  1445. options={provinceSelect()}
  1446. value={this.state.ProvinceCity}
  1447. placeholder="选择省"
  1448. style={{ width: "94%" }}
  1449. onChange={(e, pre) => {
  1450. this.setState({ ProvinceCity: e });
  1451. }}
  1452. />
  1453. <span style={{ color: "red", marginLeft: "5px" }}>
  1454. *
  1455. </span>
  1456. </FormItem>
  1457. </div>
  1458. <div className="clearfix">
  1459. <FormItem
  1460. labelCol={{ span: 7 }}
  1461. wrapperCol={{ span: 12 }}
  1462. label="省-市"
  1463. >
  1464. <Cascader
  1465. options={citySelect()}
  1466. value={this.state.ProvinceCity}
  1467. placeholder="选择市"
  1468. style={{ width: "94%" }}
  1469. onChange={(e, pre) => {
  1470. this.setState({ ProvinceCity: e });
  1471. }}
  1472. />
  1473. <span style={{ color: "red", marginLeft: "5px" }}>
  1474. *
  1475. </span>
  1476. </FormItem>
  1477. </div>
  1478. <div className="clearfix">
  1479. <FormItem
  1480. labelCol={{ span: 7 }}
  1481. wrapperCol={{ span: 12 }}
  1482. label="省-市-区"
  1483. >
  1484. <Cascader
  1485. options={areaSelect()}
  1486. value={this.state.ProvinceCity}
  1487. placeholder="选择区"
  1488. style={{ width: "94%" }}
  1489. onChange={(e, pre) => {
  1490. this.setState({ ProvinceCity: e });
  1491. }}
  1492. />
  1493. <span style={{ color: "red", marginLeft: "5px" }}>
  1494. *
  1495. </span>
  1496. </FormItem>
  1497. </div>
  1498. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1499. <Button
  1500. className="set-submit"
  1501. type="primary"
  1502. htmlType="submit"
  1503. >
  1504. 保存
  1505. </Button>
  1506. <Button
  1507. className="set-submit"
  1508. type="ghost"
  1509. onClick={this.handleCancel}
  1510. style={{ marginLeft: "15px" }}
  1511. >
  1512. 取消
  1513. </Button>
  1514. </FormItem>
  1515. </Spin>
  1516. </Form>
  1517. </Modal>
  1518. </div>
  1519. <div className="patent-desc">
  1520. <Modal
  1521. maskClosable={false}
  1522. visible={this.state.formatvisible}
  1523. onOk={this.checkPatentProcess}
  1524. onCancel={this.formathandleCancel}
  1525. width="400px"
  1526. title="新增项目规格"
  1527. footer=""
  1528. className="admin-desc-content"
  1529. >
  1530. <Form
  1531. horizontal
  1532. onSubmit={this.formathandleSubmit}
  1533. id="demand-form"
  1534. >
  1535. <Spin spinning={this.state.loading}>
  1536. <div className="clearfix">
  1537. <FormItem
  1538. labelCol={{ span: 7 }}
  1539. wrapperCol={{ span: 12 }}
  1540. label="项目名称"
  1541. >
  1542. <span style={{ width: "94%" }}>
  1543. {this.state.editName}
  1544. </span>
  1545. </FormItem>
  1546. <FormItem
  1547. labelCol={{ span: 7 }}
  1548. wrapperCol={{ span: 12 }}
  1549. label="规格名称"
  1550. >
  1551. <Input
  1552. placeholder="规格名称"
  1553. value={this.state.formatPname}
  1554. style={{ width: "94%" }}
  1555. onChange={(e) => {
  1556. this.setState({ formatPname: e.target.value });
  1557. }}
  1558. required="required"
  1559. />
  1560. <span
  1561. className="mandatory"
  1562. style={{ color: "red", marginLeft: "5px" }}
  1563. >
  1564. *
  1565. </span>
  1566. </FormItem>
  1567. <FormItem
  1568. labelCol={{ span: 7 }}
  1569. wrapperCol={{ span: 12 }}
  1570. label="市场价"
  1571. >
  1572. <Input
  1573. placeholder="市场价"
  1574. value={this.state.formatPrice}
  1575. style={{ width: "94%" }}
  1576. onChange={(e) => {
  1577. this.setState({ formatPrice: e.target.value });
  1578. }}
  1579. />
  1580. </FormItem>
  1581. <FormItem
  1582. labelCol={{ span: 7 }}
  1583. wrapperCol={{ span: 12 }}
  1584. label="活动价"
  1585. >
  1586. <Input
  1587. placeholder="活动价"
  1588. value={this.state.formatActivityPrice}
  1589. style={{ width: "94%" }}
  1590. onChange={(e) => {
  1591. this.setState({
  1592. formatActivityPrice: e.target.value,
  1593. });
  1594. }}
  1595. />
  1596. </FormItem>
  1597. <FormItem
  1598. labelCol={{ span: 7 }}
  1599. wrapperCol={{ span: 12 }}
  1600. label="最低折扣"
  1601. >
  1602. <Input
  1603. placeholder="最低折扣"
  1604. value={this.state.formatOffset}
  1605. style={{ width: "94%" }}
  1606. onChange={(e) => {
  1607. this.setState({ formatOffset: e.target.value });
  1608. }}
  1609. />
  1610. </FormItem>
  1611. <FormItem
  1612. labelCol={{ span: 7 }}
  1613. wrapperCol={{ span: 12 }}
  1614. label="会员价"
  1615. >
  1616. <Input
  1617. placeholder="会员价"
  1618. value={this.state.formatMemberPrice}
  1619. style={{ width: "94%" }}
  1620. onChange={(e) => {
  1621. this.setState({
  1622. formatMemberPrice: e.target.value,
  1623. });
  1624. }}
  1625. />
  1626. </FormItem>
  1627. <FormItem
  1628. labelCol={{ span: 7 }}
  1629. wrapperCol={{ span: 12 }}
  1630. label="活动生效"
  1631. >
  1632. <Select
  1633. placeholder="活动生效"
  1634. value={this.state.formatActivityFlag}
  1635. style={{ width: "94%" }}
  1636. onChange={(e) => {
  1637. this.setState({ formatActivityFlag: e });
  1638. }}
  1639. >
  1640. {gameState.map(function (item) {
  1641. return (
  1642. <Select.Option key={item.value}>
  1643. {item.key}
  1644. </Select.Option>
  1645. );
  1646. })}
  1647. </Select>
  1648. </FormItem>
  1649. <FormItem
  1650. labelCol={{ span: 7 }}
  1651. wrapperCol={{ span: 12 }}
  1652. label="项目状态"
  1653. >
  1654. <Select
  1655. placeholder="项目状态"
  1656. value={this.state.formatStatus}
  1657. style={{ width: "94%" }}
  1658. onChange={(e) => {
  1659. this.setState({ formatStatus: e });
  1660. }}
  1661. >
  1662. {conditionOrganization.map(function (item) {
  1663. return (
  1664. <Select.Option key={item.value}>
  1665. {item.key}
  1666. </Select.Option>
  1667. );
  1668. })}
  1669. </Select>
  1670. </FormItem>
  1671. </div>
  1672. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1673. <Button
  1674. className="set-submit"
  1675. type="primary"
  1676. htmlType="submit"
  1677. >
  1678. 保存
  1679. </Button>
  1680. <Button
  1681. className="set-submit"
  1682. type="ghost"
  1683. onClick={this.formathandleCancel}
  1684. style={{ marginLeft: "15px" }}
  1685. >
  1686. 取消
  1687. </Button>
  1688. </FormItem>
  1689. </Spin>
  1690. </Form>
  1691. </Modal>
  1692. </div>
  1693. <div className="patent-desc">
  1694. <Modal
  1695. maskClosable={false}
  1696. visible={this.state.editformatvisible}
  1697. onOk={this.checkPatentProcess}
  1698. onCancel={this.editformathandleCancel}
  1699. width="400px"
  1700. title="编辑项目规格"
  1701. footer=""
  1702. className="admin-desc-content"
  1703. >
  1704. <Form
  1705. horizontal
  1706. onSubmit={this.editformathandleSubmit}
  1707. id="demand-form"
  1708. >
  1709. <Spin spinning={this.state.loading}>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. labelCol={{ span: 7 }}
  1713. wrapperCol={{ span: 12 }}
  1714. label="规格名称"
  1715. >
  1716. <Input
  1717. placeholder="规格名称"
  1718. value={this.state.formatPname}
  1719. style={{ width: "94%" }}
  1720. onChange={(e) => {
  1721. this.setState({ formatPname: e.target.value });
  1722. }}
  1723. required="required"
  1724. />
  1725. <span
  1726. className="mandatory"
  1727. style={{ color: "red", marginLeft: "5px" }}
  1728. >
  1729. *
  1730. </span>
  1731. </FormItem>
  1732. </div>
  1733. <div className="clearfix">
  1734. <FormItem
  1735. labelCol={{ span: 7 }}
  1736. wrapperCol={{ span: 12 }}
  1737. label="创建人"
  1738. >
  1739. <span style={{ width: "94%" }}>
  1740. {this.state.editCreateId}
  1741. </span>
  1742. </FormItem>
  1743. <FormItem
  1744. labelCol={{ span: 7 }}
  1745. wrapperCol={{ span: 12 }}
  1746. label="市场价"
  1747. >
  1748. <Input
  1749. placeholder="市场价"
  1750. value={this.state.formatPrice}
  1751. style={{ width: "94%" }}
  1752. onChange={(e) => {
  1753. this.setState({ formatPrice: e.target.value });
  1754. }}
  1755. />
  1756. </FormItem>
  1757. <FormItem
  1758. labelCol={{ span: 7 }}
  1759. wrapperCol={{ span: 12 }}
  1760. label="活动价"
  1761. >
  1762. <Input
  1763. placeholder="活动价"
  1764. value={this.state.formatActivityPrice}
  1765. style={{ width: "94%" }}
  1766. onChange={(e) => {
  1767. this.setState({
  1768. formatActivityPrice: e.target.value,
  1769. });
  1770. }}
  1771. />
  1772. </FormItem>
  1773. <FormItem
  1774. labelCol={{ span: 7 }}
  1775. wrapperCol={{ span: 12 }}
  1776. label="最低折扣"
  1777. >
  1778. <Input
  1779. placeholder="最低折扣"
  1780. value={this.state.formatOffset}
  1781. style={{ width: "94%" }}
  1782. onChange={(e) => {
  1783. this.setState({ formatOffset: e.target.value });
  1784. }}
  1785. />
  1786. </FormItem>
  1787. <FormItem
  1788. labelCol={{ span: 7 }}
  1789. wrapperCol={{ span: 12 }}
  1790. label="会员价"
  1791. >
  1792. <Input
  1793. placeholder="会员价"
  1794. value={this.state.formatMemberPrice}
  1795. style={{ width: "94%" }}
  1796. onChange={(e) => {
  1797. this.setState({
  1798. formatMemberPrice: e.target.value,
  1799. });
  1800. }}
  1801. />
  1802. </FormItem>
  1803. <FormItem
  1804. labelCol={{ span: 7 }}
  1805. wrapperCol={{ span: 12 }}
  1806. label="活动生效"
  1807. >
  1808. <Select
  1809. placeholder="活动生效"
  1810. value={this.state.formatActivityFlag}
  1811. style={{ width: "94%" }}
  1812. onChange={(e) => {
  1813. this.setState({ formatActivityFlag: e });
  1814. }}
  1815. >
  1816. {gameState.map(function (item) {
  1817. return (
  1818. <Select.Option key={item.value}>
  1819. {item.key}
  1820. </Select.Option>
  1821. );
  1822. })}
  1823. </Select>
  1824. </FormItem>
  1825. <FormItem
  1826. labelCol={{ span: 7 }}
  1827. wrapperCol={{ span: 12 }}
  1828. label="项目状态"
  1829. >
  1830. <Select
  1831. placeholder="项目状态"
  1832. value={this.state.formatStatus}
  1833. style={{ width: "94%" }}
  1834. onChange={(e) => {
  1835. this.setState({ formatStatus: e });
  1836. }}
  1837. >
  1838. {conditionOrganization.map(function (item) {
  1839. return (
  1840. <Select.Option key={item.value}>
  1841. {item.key}
  1842. </Select.Option>
  1843. );
  1844. })}
  1845. </Select>
  1846. </FormItem>
  1847. </div>
  1848. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1849. <Button
  1850. className="set-submit"
  1851. type="primary"
  1852. htmlType="submit"
  1853. >
  1854. 保存
  1855. </Button>
  1856. <Button
  1857. className="set-submit"
  1858. type="ghost"
  1859. onClick={this.editformathandleCancel}
  1860. style={{ marginLeft: "15px" }}
  1861. >
  1862. 取消
  1863. </Button>
  1864. </FormItem>
  1865. </Spin>
  1866. </Form>
  1867. </Modal>
  1868. </div>
  1869. <div className="patent-desc">
  1870. <Modal
  1871. maskClosable={false}
  1872. className="customeDetails"
  1873. title="业务项目"
  1874. width="1000px"
  1875. visible={this.state.editvisible}
  1876. onOk={this.edithandleCancel}
  1877. onCancel={this.edithandleCancel}
  1878. footer=""
  1879. >
  1880. <Tabs
  1881. defaultActiveKey="1"
  1882. onChange={this.callback}
  1883. activeKey={this.state.callnub}
  1884. >
  1885. <TabPane tab="业务项目基本资料" key="1">
  1886. <Form
  1887. horizontal
  1888. onSubmit={this.edithandleSubmit}
  1889. id="demand-form"
  1890. >
  1891. <Spin spinning={this.state.loading}>
  1892. <div
  1893. className="clearfix"
  1894. style={{ paddingLeft: "60px" }}
  1895. >
  1896. <FormItem
  1897. className="half-item"
  1898. labelCol={{ span: 4 }}
  1899. wrapperCol={{ span: 12 }}
  1900. label="项目名称"
  1901. >
  1902. <Input
  1903. placeholder="项目名称"
  1904. value={this.state.editName}
  1905. style={{ width: "94%" }}
  1906. onChange={(e) => {
  1907. this.setState({ editName: e.target.value });
  1908. }}
  1909. required="required"
  1910. />
  1911. <span
  1912. className="mandatory"
  1913. style={{ color: "red", marginLeft: "5px" }}
  1914. >
  1915. *
  1916. </span>
  1917. </FormItem>
  1918. <FormItem
  1919. className="half-item"
  1920. labelCol={{ span: 4 }}
  1921. wrapperCol={{ span: 12 }}
  1922. label="业务品类"
  1923. >
  1924. <Select
  1925. placeholder="请选择业务品类"
  1926. value={this.state.editCname}
  1927. onChange={(e) => {
  1928. console.log(e)
  1929. this.setState({ editCname: e });
  1930. }}
  1931. notFoundContent="未获取到业务品类列表"
  1932. style={{ width: "94%" }}
  1933. required="required"
  1934. >
  1935. {this.state.contactsOption}
  1936. </Select>
  1937. <span
  1938. className="mandatory"
  1939. style={{ color: "red", marginLeft: "5px" }}
  1940. >
  1941. *
  1942. </span>
  1943. </FormItem>
  1944. </div>
  1945. <div
  1946. className="clearfix"
  1947. style={{ paddingLeft: "60px" }}
  1948. >
  1949. <FormItem
  1950. className="half-item"
  1951. labelCol={{ span: 4 }}
  1952. wrapperCol={{ span: 12 }}
  1953. label="省"
  1954. >
  1955. <Cascader
  1956. options={provinceSelect()}
  1957. value={this.state.ProvinceCity}
  1958. placeholder="选择省"
  1959. style={{ width: "94%" }}
  1960. onChange={(e, pre) => {
  1961. this.setState({ ProvinceCity: e });
  1962. }}
  1963. />
  1964. <span style={{ color: "red", marginLeft: "5px" }}>
  1965. *
  1966. </span>
  1967. </FormItem>
  1968. <FormItem
  1969. className="half-item"
  1970. labelCol={{ span: 4 }}
  1971. wrapperCol={{ span: 12 }}
  1972. label="省-市"
  1973. >
  1974. <Cascader
  1975. options={citySelect()}
  1976. value={this.state.ProvinceCity}
  1977. placeholder="选择市"
  1978. style={{ width: "94%" }}
  1979. onChange={(e, pre) => {
  1980. this.setState({ ProvinceCity: e });
  1981. }}
  1982. />
  1983. <span style={{ color: "red", marginLeft: "5px" }}>
  1984. *
  1985. </span>
  1986. </FormItem>
  1987. <FormItem
  1988. className="half-item"
  1989. labelCol={{ span: 4 }}
  1990. wrapperCol={{ span: 12 }}
  1991. label="省-市-区"
  1992. >
  1993. <Cascader
  1994. options={areaSelect()}
  1995. value={this.state.ProvinceCity}
  1996. placeholder="选择区"
  1997. style={{ width: "94%" }}
  1998. onChange={(e, pre) => {
  1999. this.setState({ ProvinceCity: e });
  2000. }}
  2001. />
  2002. <span style={{ color: "red", marginLeft: "5px" }}>
  2003. *
  2004. </span>
  2005. </FormItem>
  2006. <FormItem
  2007. className="half-item"
  2008. labelCol={{ span: 4 }}
  2009. wrapperCol={{ span: 12 }}
  2010. label="是否精品"
  2011. >
  2012. <Radio.Group
  2013. value={this.state.editBoutique}
  2014. onChange={(e) => {
  2015. this.setState({
  2016. editBoutique: e.target.value,
  2017. });
  2018. }}
  2019. >
  2020. <Radio value={1}>精品</Radio>
  2021. <Radio value={0}>非精品</Radio>
  2022. </Radio.Group>
  2023. </FormItem>
  2024. </div>
  2025. <div
  2026. className="clearfix"
  2027. style={{ paddingLeft: "60px" }}
  2028. >
  2029. <FormItem
  2030. className="half-item"
  2031. labelCol={{ span: 4 }}
  2032. wrapperCol={{ span: 12 }}
  2033. label="市场价"
  2034. >
  2035. <Input
  2036. placeholder="市场价"
  2037. value={this.state.editPrice}
  2038. style={{ width: "94%" }}
  2039. onChange={(e) => {
  2040. this.setState({ editPrice: e.target.value });
  2041. }}
  2042. required="required"
  2043. />
  2044. <span style={{ color: "red", marginLeft: "5px" }}>
  2045. *
  2046. </span>
  2047. </FormItem>
  2048. <FormItem
  2049. className="half-item"
  2050. labelCol={{ span: 4 }}
  2051. wrapperCol={{ span: 12 }}
  2052. label="首付金额"
  2053. >
  2054. <Input
  2055. placeholder="市场价"
  2056. value={this.state.firstPayment}
  2057. style={{ width: "94%" }}
  2058. onChange={(e) => {
  2059. this.setState({
  2060. firstPayment: e.target.value,
  2061. });
  2062. }}
  2063. required="required"
  2064. />
  2065. <span style={{ color: "red", marginLeft: "5px" }}>
  2066. *
  2067. </span>
  2068. </FormItem>
  2069. <FormItem
  2070. className="half-item"
  2071. labelCol={{ span: 4 }}
  2072. wrapperCol={{ span: 12 }}
  2073. label="活动价"
  2074. >
  2075. <Input
  2076. placeholder="活动价"
  2077. value={this.state.editActivityPrice}
  2078. style={{ width: "94%" }}
  2079. onChange={(e) => {
  2080. this.setState({
  2081. editActivityPrice: e.target.value,
  2082. });
  2083. }}
  2084. />
  2085. </FormItem>
  2086. <FormItem
  2087. className="half-item"
  2088. labelCol={{ span: 4 }}
  2089. wrapperCol={{ span: 12 }}
  2090. label="最低折扣"
  2091. >
  2092. <Input
  2093. placeholder="最低折扣"
  2094. value={this.state.editOffset}
  2095. style={{ width: "94%" }}
  2096. onChange={(e) => {
  2097. this.setState({ editOffset: e.target.value });
  2098. }}
  2099. />
  2100. </FormItem>
  2101. <FormItem
  2102. className="half-item"
  2103. labelCol={{ span: 4 }}
  2104. wrapperCol={{ span: 12 }}
  2105. label="会员价"
  2106. >
  2107. <Input
  2108. placeholder="会员价"
  2109. value={this.state.editMemberPrice}
  2110. style={{ width: "94%" }}
  2111. onChange={(e) => {
  2112. this.setState({
  2113. editMemberPrice: e.target.value,
  2114. });
  2115. }}
  2116. />
  2117. </FormItem>
  2118. <FormItem
  2119. className="half-item"
  2120. labelCol={{ span: 4 }}
  2121. wrapperCol={{ span: 12 }}
  2122. label="活动生效"
  2123. >
  2124. <Select
  2125. placeholder="活动生效"
  2126. value={this.state.editActivityFlag}
  2127. style={{ width: "94%" }}
  2128. onChange={(e) => {
  2129. this.setState({ editActivityFlag: e });
  2130. }}
  2131. >
  2132. {gameState.map(function (item) {
  2133. return (
  2134. <Select.Option key={item.value}>
  2135. {item.key}
  2136. </Select.Option>
  2137. );
  2138. })}
  2139. </Select>
  2140. </FormItem>
  2141. <FormItem
  2142. className="half-item"
  2143. labelCol={{ span: 4 }}
  2144. wrapperCol={{ span: 12 }}
  2145. label="项目状态"
  2146. >
  2147. <Select
  2148. placeholder="项目状态"
  2149. value={this.state.editStatus}
  2150. style={{ width: "94%" }}
  2151. onChange={(e) => {
  2152. this.setState({ editStatus: e });
  2153. }}
  2154. >
  2155. {conditionOrganization.map(function (item) {
  2156. return (
  2157. <Select.Option key={item.value}>
  2158. {item.key}
  2159. </Select.Option>
  2160. );
  2161. })}
  2162. </Select>
  2163. </FormItem>
  2164. <FormItem
  2165. className="half-item"
  2166. labelCol={{ span: 4 }}
  2167. wrapperCol={{ span: 12 }}
  2168. label="项目分类"
  2169. >
  2170. {/* 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
  2171. <Select
  2172. placeholder="项目分类"
  2173. value={this.state.typeStr}
  2174. style={{ width: "94%" }}
  2175. onChange={(e) => {
  2176. let str = "";
  2177. if (e == 0) {
  2178. str = "通用";
  2179. } else if (e == 1) {
  2180. str = "专利";
  2181. } else if (e == 2) {
  2182. str = "软著";
  2183. } else if (e == 3) {
  2184. str = "审计";
  2185. } else if (e == 4) {
  2186. str = "双软";
  2187. } else if (e == 5) {
  2188. str = "高新";
  2189. } else if (e == 6) {
  2190. str = "商标";
  2191. }
  2192. this.setState({
  2193. typeStatus: e,
  2194. typeStr: str,
  2195. });
  2196. }}
  2197. >
  2198. <Select.Option key={0}>通用</Select.Option>
  2199. <Select.Option key={1}>专利</Select.Option>
  2200. <Select.Option key={2}>软著</Select.Option>
  2201. <Select.Option key={3}>审计</Select.Option>
  2202. <Select.Option key={4}>双软</Select.Option>
  2203. <Select.Option key={5}>高新</Select.Option>
  2204. <Select.Option key={6}>商标</Select.Option>
  2205. </Select>
  2206. </FormItem>
  2207. <FormItem
  2208. className="half-item"
  2209. labelCol={{ span: 4 }}
  2210. wrapperCol={{ span: 12 }}
  2211. label="创建人"
  2212. >
  2213. <span style={{ width: "94%" }}>
  2214. {this.state.editCreateId}
  2215. </span>
  2216. </FormItem>
  2217. <FormItem
  2218. className="half-item"
  2219. labelCol={{ span: 4 }}
  2220. wrapperCol={{ span: 12 }}
  2221. label="创建时间"
  2222. >
  2223. <span style={{ width: "94%" }}>
  2224. {this.state.editTime}
  2225. </span>
  2226. </FormItem>
  2227. </div>
  2228. <div className="clearfix">
  2229. <FormItem
  2230. labelCol={{ span: 4 }}
  2231. wrapperCol={{ span: 12 }}
  2232. label="项目地址"
  2233. >
  2234. <Input
  2235. type="textarea"
  2236. rows={1}
  2237. placeholder="业务项目服务内容"
  2238. value={this.state.editProjectUrl}
  2239. onChange={(e) => {
  2240. this.setState({
  2241. editProjectUrl: e.target.value,
  2242. });
  2243. }}
  2244. />
  2245. </FormItem>
  2246. </div>
  2247. <div className="clearfix">
  2248. <FormItem
  2249. labelCol={{ span: 4 }}
  2250. wrapperCol={{ span: 12 }}
  2251. label="业务项目服务内容"
  2252. >
  2253. <Input
  2254. type="textarea"
  2255. rows={4}
  2256. placeholder="业务项目服务内容"
  2257. value={this.state.editIntroduce}
  2258. onChange={(e) => {
  2259. this.setState({
  2260. editIntroduce: e.target.value,
  2261. });
  2262. }}
  2263. />
  2264. </FormItem>
  2265. </div>
  2266. <div className="clearfix">
  2267. <FormItem
  2268. labelCol={{ span: 4 }}
  2269. wrapperCol={{ span: 12 }}
  2270. label="业务项目价值及作用"
  2271. >
  2272. <Input
  2273. type="textarea"
  2274. rows={4}
  2275. placeholder="业务项目价值及作用"
  2276. value={this.state.editValueEffect}
  2277. onChange={(e) => {
  2278. this.setState({
  2279. editValueEffect: e.target.value,
  2280. });
  2281. }}
  2282. />
  2283. </FormItem>
  2284. </div>
  2285. <div className="clearfix">
  2286. <FormItem
  2287. labelCol={{ span: 4 }}
  2288. wrapperCol={{ span: 12 }}
  2289. label="业务项目客户基本条件"
  2290. >
  2291. <Input
  2292. type="textarea"
  2293. rows={4}
  2294. placeholder="业务项目客户基本条件"
  2295. value={this.state.editClientSize}
  2296. onChange={(e) => {
  2297. this.setState({
  2298. editClientSize: e.target.value,
  2299. });
  2300. }}
  2301. />
  2302. </FormItem>
  2303. </div>
  2304. <div className="clearfix pictures">
  2305. <FormItem
  2306. className="half-item"
  2307. labelCol={{ span: 8 }}
  2308. wrapperCol={{ span: 10 }}
  2309. label="业务项目图标"
  2310. >
  2311. <PicturesWall
  2312. domId={'businessProject1'}
  2313. pictureSign="business_project_min_picture"
  2314. fileList={this.getOrgCodeUrl}
  2315. pictureUrl={this.state.orgCodeUrl}
  2316. />
  2317. <p>图片建议:图片要清晰。(35*35)</p>
  2318. </FormItem>
  2319. <FormItem
  2320. className="half-item"
  2321. labelCol={{ span: 4 }}
  2322. wrapperCol={{ span: 12 }}
  2323. label="业务项目图标"
  2324. >
  2325. <PicturesWall
  2326. domId={'businessProject2'}
  2327. pictureSign="business_project_max_picture"
  2328. fileList={this.getCompanyLogoUrl}
  2329. pictureUrl={this.state.companyLogoUrl}
  2330. />
  2331. <p>图片建议:图片要清晰。(200*200)</p>
  2332. </FormItem>
  2333. </div>
  2334. <Button
  2335. className="set-submit"
  2336. type="primary"
  2337. htmlType="submit"
  2338. style={{
  2339. marginLeft: "190px",
  2340. marginBottom: "20px",
  2341. marginTop: "110px",
  2342. }}
  2343. >
  2344. 保存
  2345. </Button>
  2346. <Button
  2347. className="set-submit"
  2348. type="ghost"
  2349. onClick={this.edithandleCancel}
  2350. style={{
  2351. marginLeft: "100px",
  2352. marginBottom: "20px",
  2353. }}
  2354. >
  2355. 取消
  2356. </Button>
  2357. </Spin>
  2358. </Form>
  2359. </TabPane>
  2360. <TabPane tab="业务项目规格" key="2">
  2361. <div className="clearfix">
  2362. <Popconfirm
  2363. title="是否删除?"
  2364. onConfirm={this.delectRowSize}
  2365. okText="是"
  2366. cancelText="否"
  2367. >
  2368. <Button
  2369. style={{
  2370. background: "#ea0862",
  2371. border: "none",
  2372. color: "#fff",
  2373. marginRight: "10px",
  2374. marginLeft: "10px",
  2375. }}
  2376. disabled={!hasSelected}
  2377. >
  2378. 删除
  2379. <Icon type="minus" />
  2380. </Button>
  2381. </Popconfirm>
  2382. <Popconfirm
  2383. title="是否停用?"
  2384. onConfirm={this.blockRowSize}
  2385. okText="是"
  2386. cancelText="否"
  2387. >
  2388. <Button
  2389. style={{
  2390. background: "#ea0862",
  2391. border: "none",
  2392. color: "#fff",
  2393. marginRight: "10px",
  2394. marginLeft: "10px",
  2395. display: "none",
  2396. }}
  2397. disabled={!hasSelected}
  2398. >
  2399. 停用
  2400. <Icon type="minus" />
  2401. </Button>
  2402. </Popconfirm>
  2403. <Button
  2404. className="ContactsList"
  2405. type="primary"
  2406. onClick={this.formatClick}
  2407. style={{ float: "right", marginBottom: "10px" }}
  2408. >
  2409. 新增
  2410. </Button>
  2411. </div>
  2412. <div className="clearfix">
  2413. <Spin spinning={this.state.loading}>
  2414. <Form
  2415. horizontal
  2416. id="demand-form"
  2417. onSubmit={this.contactSave}
  2418. >
  2419. <Table
  2420. size="middle"
  2421. pagination={this.state.formatPagination}
  2422. columns={this.state.ContactsLists}
  2423. dataSource={this.state.formatDataSource}
  2424. rowSelection={rowSelection}
  2425. onRowClick={this.formatTableRowClick}
  2426. />
  2427. </Form>
  2428. </Spin>
  2429. </div>
  2430. </TabPane>
  2431. </Tabs>
  2432. </Modal>
  2433. </div>
  2434. </div>
  2435. </div>
  2436. );
  2437. }
  2438. }));
  2439. export default BusinessProject;