businessProject.jsx 97 KB

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