businessProject.jsx 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447
  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 superText=nameText[parseInt(num)].id
  475. let isCountry=0;
  476. let pro='';
  477. let city='';
  478. let dis='';
  479. if(this.state.ProvinceCity==undefined||this.state.ProvinceCity.length==0){
  480. message.warning('请选择项目有效范围');
  481. this.setState({
  482. loading: false
  483. });
  484. return false;
  485. }else{
  486. switch(parseInt(this.state.ProvinceCity.length)){
  487. case 1:pro=this.state.ProvinceCity[0];break;
  488. case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
  489. case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
  490. }
  491. }
  492. if(pro==0){
  493. isCountry=1;
  494. pro='';
  495. }
  496. $.ajax({
  497. method: "post",
  498. dataType: "json",
  499. crossDomain: false,
  500. url:globalConfig.context + '/api/admin/ProjectSize/updateProject',
  501. data:{
  502. id:this.state.editId,//项目ID
  503. cid:superText,//项目业务品类
  504. bname:this.state.editName,//业务项目名称
  505. price:this.state.editPrice,//市场价
  506. firstPayment:this.state.firstPayment,//首付金额
  507. offset:offsetText,//最低折扣
  508. activityPrice:this.state.editActivityPrice,//活动价
  509. activityFlag:this.state.editActivityFlag,//活动生效标识
  510. memberPrice:this.state.editMemberPrice,//项目ID
  511. status:this.state.editStatus,//项目状态
  512. type: this.state.typeStatus,//项目分类
  513. country:isCountry,//是否全国
  514. province:pro?pro:'',//省
  515. city:city?city:'',//市
  516. district:dis?dis:'',//区
  517. minLogo:theorgCodeUrl,
  518. maxLogo:thecompanyLogoUrl,
  519. introduce:this.state.editIntroduce,//项目介绍
  520. projectUrl:this.state.editProjectUrl,//项目地址
  521. valueEffect:this.state.editValueEffect,//项目价值及作用
  522. clientSize:this.state.editClientSize,//项目基本条件
  523. boutique:this.state.editBoutique,
  524. }
  525. }).done(function (data) {
  526. this.setState({
  527. loading: false
  528. });
  529. if (!data.error.length) {
  530. message.success('保存成功!');
  531. this.edithandleCancel();
  532. this.selectSuperId();
  533. } else {
  534. message.warning(data.error[0].message);
  535. }
  536. }.bind(this));
  537. }
  538. })
  539. },
  540. //规格列表整行点击
  541. formatTableRowClick(record, index){
  542. this.editformatClick();
  543. this.state.RowData = record;
  544. this.setState({
  545. selectedRowKeys:[],
  546. formatId:record.formatId,//规格名称
  547. formatPname:record.formatPname,//规格名称
  548. formatPrice:record.formatPrice,//市场价
  549. formatOffset:record.formatOffset,//最低折扣
  550. formatActivityPrice:record.formatActivityPrice,//活动价
  551. formatActivityFlag:record.formatActivityFlag,//活动生效标识
  552. formatMemberPrice:record.formatMemberPrice,//会员价
  553. formatStatus:record.formatStatus.toString(),//项目状态
  554. });
  555. },
  556. //项目列表整行点击
  557. tableRowClick(record, index) {
  558. this.selectSuperId();
  559. this.state.RowData = record;
  560. this.setState({
  561. callnub:'1',
  562. editvisible: true,
  563. selectedRowKeys:[],
  564. rowId:record.businessId,
  565. });
  566. $.ajax({
  567. method: "get",
  568. dataType: "json",
  569. crossDomain: false,
  570. url: globalConfig.context +"/api/admin/ProjectSize/orgProject" ,
  571. data: {
  572. id: record.id
  573. },
  574. success: function (data) {
  575. let theArr = [];
  576. let ProvinceCity=[];
  577. let thisdata = data.data;
  578. if (!data) {
  579. if (data.error && data.error.length) {
  580. message.warning(data.error[0].message);
  581. };
  582. } else {
  583. if(thisdata.country==1){
  584. ProvinceCity.push(0);
  585. }else{
  586. ProvinceCity.push(parseInt(thisdata.province));
  587. ProvinceCity.push(parseInt(thisdata.city));
  588. ProvinceCity.push(parseInt(thisdata.district));
  589. }
  590. let str = ""
  591. if(thisdata.type == 0) {
  592. str = "通用"
  593. }else if(thisdata.type == 1) {
  594. str = "专利"
  595. }else if(thisdata.type == 2) {
  596. str = "软著"
  597. }else if(thisdata.type == 3) {
  598. str = "审计"
  599. }else if(thisdata.type == 4) {
  600. str = "双软"
  601. }else if(thisdata.type == 5) {
  602. str = "高新"
  603. }else if(thisdata.type == 6) {
  604. str = "商标"
  605. }
  606. theArr.push({
  607. editId: thisdata.id,//每一条记录的ID
  608. editName:thisdata.bname,//项目名称
  609. editCname: thisdata.cname,//项目分类
  610. editCid: thisdata.cid,//项目分类
  611. editCountry: thisdata.country,//是否全国
  612. editProvince: thisdata.province,//省
  613. editCity: thisdata.city,//市
  614. editDistrict: thisdata.district,//区
  615. editPrice: thisdata.price,//市场价
  616. firstPayment:thisdata.firstPayment,//首付金额
  617. editActivityPrice: thisdata.activityPrice,//活动价
  618. editOffset: thisdata.offset,//最低折扣
  619. editMemberPrice: thisdata.memberPrice,//会员价
  620. editActivityFlag:thisdata.activityFlag,//活动生效标识
  621. editStatus:thisdata.status,//品类状态
  622. typeStr: str,
  623. typeStatus: thisdata.type,
  624. editCreateId:thisdata.createName,//创建人
  625. editTime:thisdata.createTimeFormattedDate,//创建时间
  626. editIntroduce:thisdata.introduce,//服务内容
  627. editProjectUrl:thisdata.projectUrl,//项目地址
  628. editValueEffect:thisdata.valueEffect,//价值及作用
  629. editClientSize:thisdata.clientSize,//基本条件
  630. editBoutique:thisdata.boutique,//是否精品
  631. orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],
  632. cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],
  633. });
  634. };
  635. //0 正常 1专利 2软著 3审计 4双软 5高新 6商标
  636. let str = ""
  637. if(thisdata.type == 0) {
  638. str = "通用"
  639. }else if(thisdata.type == 1) {
  640. str = "专利"
  641. }else if(thisdata.type == 2) {
  642. str = "软著"
  643. }else if(thisdata.type == 3) {
  644. str = "审计"
  645. }else if(thisdata.type == 4) {
  646. str = "双软"
  647. }else if(thisdata.type == 5) {
  648. str = "高新"
  649. }else if(thisdata.type == 6) {
  650. str = "商标"
  651. }
  652. this.setState({
  653. editId: thisdata.id, //每一条记录的ID
  654. editName: thisdata.bname, //项目名称
  655. editCname: thisdata.cname, //项目分类
  656. editCid: thisdata.cid, //项目分类
  657. editCountry: thisdata.country, //是否全国
  658. editProvince: thisdata.province, //省
  659. editCity: thisdata.city, //市
  660. editDistrict: thisdata.district, //区
  661. editPrice: thisdata.price, //市场价
  662. firstPayment: thisdata.firstPayment,
  663. editActivityPrice: thisdata.activityPrice, //活动价
  664. editOffset: thisdata.offset, //最低折扣
  665. editMemberPrice: thisdata.memberPrice, //会员价
  666. editActivityFlag: thisdata.activityFlag, //活动生效标识
  667. editStatus: thisdata.status, //品类状态
  668. typeStr: str,
  669. typeStatus: thisdata.type,
  670. editCreateId: thisdata.createName, //创建人
  671. editTime: thisdata.createTimeFormattedDate, //创建时间
  672. editIntroduce: thisdata.introduce, //服务内容
  673. editProjectUrl: thisdata.projectUrl, //项目地址
  674. editValueEffect: thisdata.valueEffect, //价值及作用
  675. editClientSize: thisdata.clientSize, //基本条件
  676. editBoutique: thisdata.boutique, //是否精品
  677. orgCodeUrl: thisdata.minLogo
  678. ? splitUrl(
  679. thisdata.minLogo,
  680. ",",
  681. globalConfig.avatarHost + "/upload"
  682. )
  683. : [],
  684. companyLogoUrl: thisdata.maxLogo
  685. ? splitUrl(
  686. thisdata.maxLogo,
  687. ",",
  688. globalConfig.avatarHost + "/upload"
  689. )
  690. : [],
  691. editDataSource: theArr,
  692. ProvinceCity: ProvinceCity
  693. });
  694. }.bind(this),
  695. }).always(function () {
  696. this.setState({
  697. loading: false
  698. });
  699. }.bind(this));
  700. },
  701. //左侧图片地址
  702. getOrgCodeUrl(e) {
  703. this.setState({ orgCodeUrl: e });
  704. },
  705. //右侧图片地址
  706. getCompanyLogoUrl(e) {
  707. this.setState({ companyLogoUrl: e });
  708. },
  709. //编辑一个规格,保存
  710. editformathandleSubmit(e){
  711. e.preventDefault();
  712. let offsetText;
  713. if(this.state.formatOffset){
  714. if(this.state.formatOffset>10||this.state.formatOffset<0){
  715. message.warning('最低折扣请输入0到10之间的数字');
  716. return false;
  717. }else{
  718. offsetText=this.state.formatOffset;
  719. }
  720. }
  721. this.props.form.validateFields((err, values) => {
  722. if (!err) {
  723. this.setState({
  724. loading: true
  725. });
  726. $.ajax({
  727. method: "post",
  728. dataType: "json",
  729. crossDomain: false,
  730. url:globalConfig.context + '/api/admin/ProjectSize/orgProjectSize',
  731. data:{
  732. id:this.state.formatId,//项目ID
  733. pname:this.state.formatPname,//规格名称
  734. price:this.state.formatPrice,//市场价
  735. offset:offsetText,//最低折扣
  736. activityPrice:this.state.formatActivityPrice,//活动价
  737. activityFlag:this.state.formatActivityFlag,//活动生效标识
  738. memberPrice:this.state.formatMemberPrice,//会员价
  739. status:this.state.formatStatus,//项目状态
  740. }
  741. }).done(function (data) {
  742. this.setState({
  743. loading: false
  744. });
  745. if (!data.error.length) {
  746. message.success('修改规格成功!');
  747. this.formatLoadData();
  748. this.editformathandleCancel();
  749. } else {
  750. message.warning(data.error[0].message);
  751. }
  752. }.bind(this));
  753. }
  754. });
  755. },
  756. //新增一个规格,保存
  757. formathandleSubmit(e){
  758. e.preventDefault();
  759. let offsetText;
  760. if(this.state.formatOffset){
  761. if(this.state.formatOffset>10||this.state.formatOffset<0){
  762. message.warning('最低折扣请输入0到10之间的数字');
  763. return false;
  764. }else{
  765. offsetText=this.state.formatOffset;
  766. }
  767. }
  768. this.props.form.validateFields((err, values) => {
  769. if (!err) {
  770. this.setState({
  771. loading: true
  772. });
  773. $.ajax({
  774. method: "post",
  775. dataType: "json",
  776. crossDomain: false,
  777. url:globalConfig.context + '/api/admin/ProjectSize/addProjectSize',
  778. data:{
  779. pid:this.state.editId,//项目ID
  780. pname:this.state.formatPname,//规格名称
  781. price:this.state.formatPrice,//市场价
  782. offset:offsetText,//最低折扣
  783. activityPrice:this.state.formatActivityPrice,//活动价
  784. activityFlag:this.state.formatActivityFlag,//活动生效标识
  785. memberPrice:this.state.formatMemberPrice,//会员价
  786. status:this.state.formatStatus,//项目状态
  787. }
  788. }).done(function (data) {
  789. this.setState({
  790. loading: false
  791. });
  792. if (!data.error.length) {
  793. message.success('新增规格成功!');
  794. this.formathandleCancel();
  795. this.formatLoadData();
  796. } else {
  797. message.warning(data.error[0].message);
  798. }
  799. }.bind(this));
  800. }
  801. });
  802. },
  803. //新增一个项目,保存
  804. addhandleSubmit(e){
  805. e.preventDefault();
  806. if(!this.state.categoryName){
  807. message.warning('请输入项目名称');
  808. return false;
  809. }
  810. if(!this.state.addCid){
  811. message.warning('请选择项目品类');
  812. return false;
  813. }
  814. let isCountry=0;
  815. let pro='';
  816. let city='';
  817. let dis='';
  818. if(this.state.ProvinceCity==undefined){
  819. message.warning('请选择项目有效范围');
  820. return false;
  821. }else{
  822. switch(parseInt(this.state.ProvinceCity.length)){
  823. case 1:pro=this.state.ProvinceCity[0];break;
  824. case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
  825. case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
  826. }
  827. }
  828. if(pro==0){
  829. isCountry=1;
  830. pro='';
  831. }
  832. this.props.form.validateFields((err, values) => {
  833. if (!err) {
  834. this.setState({
  835. loading: true
  836. });
  837. //上级组织字典
  838. let nameText=this.state.SuperArr;
  839. let superText=nameText[parseInt(this.state.addCid)].id;
  840. $.ajax({
  841. method: "post",
  842. dataType: "json",
  843. crossDomain: false,
  844. url:globalConfig.context + '/api/admin/ProjectSize/addProject',
  845. data:{
  846. bname:this.state.categoryName,//项目名称
  847. cid:superText,//品类类ID
  848. boutique:this.state.boutique?this.state.boutique:'0',
  849. country:isCountry,//是否全国
  850. province:pro,//省
  851. city:city,//市
  852. district:dis,//区
  853. }
  854. }).done(function (data) {
  855. this.setState({
  856. loading: false
  857. });
  858. if (!data.error.length) {
  859. message.success('新增项目成功!');
  860. this.handleCancel();
  861. this.selectSuperId();
  862. } else {
  863. message.warning(data.error[0].message);
  864. }
  865. }.bind(this));
  866. }
  867. });
  868. },
  869. //项目整行删除
  870. delectRow() {
  871. let deletedIds = '';
  872. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  873. let rowItem = this.state.selectedRows[idx];
  874. if (rowItem.id) {
  875. deletedIds=rowItem.id;
  876. };
  877. };
  878. this.setState({
  879. selectedRowKeys: [],
  880. loading: deletedIds.length > 0
  881. });
  882. $.ajax({
  883. method: "get",
  884. dataType: "json",
  885. crossDomain: false,
  886. url: globalConfig.context + "/api/admin/ProjectSize/deleteProject",
  887. data: {
  888. id:deletedIds
  889. }
  890. }).done(function (data) {
  891. if (!data.error.length) {
  892. message.success('删除成功!');
  893. this.setState({
  894. loading: false,
  895. });
  896. } else {
  897. message.warning(data.error[0].message);
  898. };
  899. this.selectSuperId();
  900. }.bind(this));
  901. },
  902. //项目整行停用
  903. blockRow() {
  904. let deletedIds = '';
  905. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  906. let rowItem = this.state.selectedRows[idx];
  907. if (rowItem.id) {
  908. deletedIds=rowItem.id;
  909. };
  910. };
  911. this.setState({
  912. selectedRowKeys: [],
  913. loading: deletedIds.length > 0
  914. });
  915. $.ajax({
  916. method: "get",
  917. dataType: "json",
  918. crossDomain: false,
  919. url: globalConfig.context + "/api/admin/ProjectSize/stopProject",
  920. data: {
  921. id:deletedIds
  922. }
  923. }).done(function (data) {
  924. if (!data.error.length) {
  925. message.success('该项目已成功停用!');
  926. this.setState({
  927. loading: false,
  928. });
  929. } else {
  930. message.warning(data.error[0].message);
  931. };
  932. this.selectSuperId();
  933. }.bind(this));
  934. },
  935. //规格整行删除
  936. delectRowSize() {
  937. let deletedIds = '';
  938. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  939. let rowItem = this.state.selectedRows[idx];
  940. if (rowItem.formatId) {
  941. deletedIds=rowItem.formatId;
  942. };
  943. };
  944. this.setState({
  945. selectedRowKeys: [],
  946. loading: deletedIds.length > 0
  947. });
  948. $.ajax({
  949. method: "get",
  950. dataType: "json",
  951. crossDomain: false,
  952. url: globalConfig.context + "/api/admin/ProjectSize/deleteProjectSize",
  953. data: {
  954. id: deletedIds
  955. }
  956. }).done(function (data) {
  957. if (!data.error.length) {
  958. message.success('删除成功!');
  959. this.setState({
  960. loading: false,
  961. });
  962. } else {
  963. message.warning(data.error[0].message);
  964. };
  965. this.formatLoadData();
  966. }.bind(this));
  967. },
  968. //规格整行停用
  969. blockRowSize() {
  970. let deletedIds = '';
  971. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  972. let rowItem = this.state.selectedRows[idx];
  973. if (rowItem.formatId) {
  974. deletedIds=rowItem.formatId;
  975. };
  976. };
  977. this.setState({
  978. selectedRowKeys: [],
  979. loading: deletedIds.length > 0
  980. });
  981. $.ajax({
  982. method: "get",
  983. dataType: "json",
  984. crossDomain: false,
  985. url: globalConfig.context + "/api/admin/ProjectSize/stopProjectSize",
  986. data: {
  987. id: deletedIds
  988. }
  989. }).done(function (data) {
  990. if (!data.error.length) {
  991. message.success('该项目已成功停用!');
  992. this.setState({
  993. loading: false,
  994. });
  995. } else {
  996. message.warning(data.error[0].message);
  997. };
  998. this.formatLoadData();
  999. }.bind(this));
  1000. },
  1001. addClick() {
  1002. this.state.RowData = {};
  1003. this.setState({
  1004. visible: true
  1005. });
  1006. this.addReset();
  1007. },
  1008. editClick(e) {
  1009. this.state.RowData = {};
  1010. this.setState({
  1011. editvisible: true
  1012. });
  1013. },
  1014. formatClick(e) {
  1015. this.formatReset();
  1016. this.state.RowData = {};
  1017. this.setState({
  1018. formatvisible: true
  1019. });
  1020. },
  1021. editformatClick(e) {
  1022. this.state.RowData = {};
  1023. this.setState({
  1024. editformatvisible: true
  1025. });
  1026. },
  1027. handleCancel() {
  1028. this.setState({ visible: false })
  1029. },
  1030. edithandleCancel(e) {
  1031. this.setState({
  1032. editvisible: false
  1033. });
  1034. },
  1035. formathandleCancel(e) {
  1036. this.setState({
  1037. formatvisible: false
  1038. });
  1039. },
  1040. editformathandleCancel(e) {
  1041. this.setState({
  1042. editformatvisible: false
  1043. });
  1044. },
  1045. search() {
  1046. this.loadData();
  1047. },
  1048. //搜索部分的清零
  1049. reset() {
  1050. this.state.bname = '';//项目名称清零
  1051. this.state.cid = undefined;//品类名称清零
  1052. this.state.ressSearch= undefined;//省市区清零
  1053. this.state.activityFlag = undefined;//活动生效清零
  1054. this.state.status = undefined;//项目状态清零
  1055. this.state.type = undefined;//项目分类清零
  1056. this.loadData();
  1057. },
  1058. //新增部分的清零
  1059. addReset(){
  1060. this.state.categoryName='';//项目名称清零
  1061. this.state.ProvinceCity=undefined;
  1062. this.state.addCid=undefined;
  1063. this.state.boutique='';
  1064. },
  1065. //规格新增清零
  1066. formatReset() {
  1067. this.state.formatPname = '';//规格名称清零
  1068. this.state.formatPrice = '';//市场价清零
  1069. this.state.formatOffset = '';//最低折扣清零
  1070. this.state.formatActivityPrice = '';//活动价清零
  1071. this.state.formatMemberPrice = '';//会员价清零
  1072. this.state.formatActivityFlag = undefined;//活动生效标识清零
  1073. this.state.formatStatus= undefined;//项目状态清零
  1074. this.formatLoadData();
  1075. },
  1076. //详情tab切换数据处理
  1077. callback(e) {
  1078. this.setState({
  1079. callnub: e,
  1080. })
  1081. if(e == 1) {
  1082. }
  1083. if(e == 2) {
  1084. this.formatLoadData();
  1085. }
  1086. },
  1087. //更多搜索的显示与否
  1088. searchSwitch() {
  1089. this.setState({
  1090. searchMore: !this.state.searchMore
  1091. });
  1092. },
  1093. changeList(arr) {
  1094. const newArr = [];
  1095. this.state.columns.forEach(item => {
  1096. arr.forEach(val => {
  1097. if (val === item.title) {
  1098. newArr.push(item);
  1099. }
  1100. });
  1101. });
  1102. this.setState({
  1103. changeList: newArr
  1104. });
  1105. },
  1106. render() {
  1107. const FormItem = Form.Item
  1108. const rowSelection = {
  1109. selectedRowKeys: this.state.selectedRowKeys,
  1110. onChange: (selectedRowKeys, selectedRows) => {
  1111. this.setState({
  1112. selectedRows: selectedRows.slice(-1),
  1113. selectedRowKeys: selectedRowKeys.slice(-1)
  1114. });
  1115. }
  1116. };
  1117. const formItemLayout = {
  1118. labelCol: { span: 8 },
  1119. wrapperCol: { span: 14 },
  1120. };
  1121. const { getFieldDecorator } = this.props.form;
  1122. const hasSelected = this.state.selectedRowKeys.length > 0;
  1123. const { RangePicker } = DatePicker;
  1124. return (
  1125. <div className="user-content">
  1126. <div className="content-title">
  1127. <Tabs
  1128. defaultActiveKey="1"
  1129. onChange={this.callback}
  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. className="customeDetails"
  1872. title="业务项目"
  1873. width="1000px"
  1874. visible={this.state.editvisible}
  1875. onOk={this.edithandleCancel}
  1876. onCancel={this.edithandleCancel}
  1877. footer=""
  1878. >
  1879. <Tabs
  1880. defaultActiveKey="1"
  1881. onChange={this.callback}
  1882. activeKey={this.state.callnub}
  1883. >
  1884. <TabPane tab="业务项目基本资料" key="1">
  1885. <Form
  1886. horizontal
  1887. onSubmit={this.edithandleSubmit}
  1888. id="demand-form"
  1889. >
  1890. <Spin spinning={this.state.loading}>
  1891. <div
  1892. className="clearfix"
  1893. style={{ paddingLeft: "60px" }}
  1894. >
  1895. <FormItem
  1896. className="half-item"
  1897. labelCol={{ span: 4 }}
  1898. wrapperCol={{ span: 12 }}
  1899. label="项目名称"
  1900. >
  1901. <Input
  1902. placeholder="项目名称"
  1903. value={this.state.editName}
  1904. style={{ width: "94%" }}
  1905. onChange={(e) => {
  1906. this.setState({ editName: e.target.value });
  1907. }}
  1908. required="required"
  1909. />
  1910. <span
  1911. className="mandatory"
  1912. style={{ color: "red", marginLeft: "5px" }}
  1913. >
  1914. *
  1915. </span>
  1916. </FormItem>
  1917. <FormItem
  1918. className="half-item"
  1919. labelCol={{ span: 4 }}
  1920. wrapperCol={{ span: 12 }}
  1921. label="业务品类"
  1922. >
  1923. <Select
  1924. placeholder="请选择业务品类"
  1925. value={this.state.editCname}
  1926. onChange={(e) => {
  1927. this.setState({ editCname: e });
  1928. }}
  1929. notFoundContent="未获取到业务品类列表"
  1930. style={{ width: "94%" }}
  1931. required="required"
  1932. >
  1933. {this.state.contactsOption}
  1934. </Select>
  1935. <span
  1936. className="mandatory"
  1937. style={{ color: "red", marginLeft: "5px" }}
  1938. >
  1939. *
  1940. </span>
  1941. </FormItem>
  1942. </div>
  1943. <div
  1944. className="clearfix"
  1945. style={{ paddingLeft: "60px" }}
  1946. >
  1947. <FormItem
  1948. className="half-item"
  1949. labelCol={{ span: 4 }}
  1950. wrapperCol={{ span: 12 }}
  1951. label="省"
  1952. >
  1953. <Cascader
  1954. options={provinceSelect()}
  1955. value={this.state.ProvinceCity}
  1956. placeholder="选择省"
  1957. style={{ width: "94%" }}
  1958. onChange={(e, pre) => {
  1959. this.setState({ ProvinceCity: e });
  1960. }}
  1961. />
  1962. <span style={{ color: "red", marginLeft: "5px" }}>
  1963. *
  1964. </span>
  1965. </FormItem>
  1966. <FormItem
  1967. className="half-item"
  1968. labelCol={{ span: 4 }}
  1969. wrapperCol={{ span: 12 }}
  1970. label="省-市"
  1971. >
  1972. <Cascader
  1973. options={citySelect()}
  1974. value={this.state.ProvinceCity}
  1975. placeholder="选择市"
  1976. style={{ width: "94%" }}
  1977. onChange={(e, pre) => {
  1978. this.setState({ ProvinceCity: e });
  1979. }}
  1980. />
  1981. <span style={{ color: "red", marginLeft: "5px" }}>
  1982. *
  1983. </span>
  1984. </FormItem>
  1985. <FormItem
  1986. className="half-item"
  1987. labelCol={{ span: 4 }}
  1988. wrapperCol={{ span: 12 }}
  1989. label="省-市-区"
  1990. >
  1991. <Cascader
  1992. options={areaSelect()}
  1993. value={this.state.ProvinceCity}
  1994. placeholder="选择区"
  1995. style={{ width: "94%" }}
  1996. onChange={(e, pre) => {
  1997. this.setState({ ProvinceCity: e });
  1998. }}
  1999. />
  2000. <span style={{ color: "red", marginLeft: "5px" }}>
  2001. *
  2002. </span>
  2003. </FormItem>
  2004. <FormItem
  2005. className="half-item"
  2006. labelCol={{ span: 4 }}
  2007. wrapperCol={{ span: 12 }}
  2008. label="是否精品"
  2009. >
  2010. <Radio.Group
  2011. value={this.state.editBoutique}
  2012. onChange={(e) => {
  2013. this.setState({
  2014. editBoutique: e.target.value,
  2015. });
  2016. }}
  2017. >
  2018. <Radio value={1}>精品</Radio>
  2019. <Radio value={0}>非精品</Radio>
  2020. </Radio.Group>
  2021. </FormItem>
  2022. </div>
  2023. <div
  2024. className="clearfix"
  2025. style={{ paddingLeft: "60px" }}
  2026. >
  2027. <FormItem
  2028. className="half-item"
  2029. labelCol={{ span: 4 }}
  2030. wrapperCol={{ span: 12 }}
  2031. label="市场价"
  2032. >
  2033. <Input
  2034. placeholder="市场价"
  2035. value={this.state.editPrice}
  2036. style={{ width: "94%" }}
  2037. onChange={(e) => {
  2038. this.setState({ editPrice: e.target.value });
  2039. }}
  2040. required="required"
  2041. />
  2042. <span style={{ color: "red", marginLeft: "5px" }}>
  2043. *
  2044. </span>
  2045. </FormItem>
  2046. <FormItem
  2047. className="half-item"
  2048. labelCol={{ span: 4 }}
  2049. wrapperCol={{ span: 12 }}
  2050. label="首付金额"
  2051. >
  2052. <Input
  2053. placeholder="市场价"
  2054. value={this.state.firstPayment}
  2055. style={{ width: "94%" }}
  2056. onChange={(e) => {
  2057. this.setState({
  2058. firstPayment: e.target.value,
  2059. });
  2060. }}
  2061. required="required"
  2062. />
  2063. <span style={{ color: "red", marginLeft: "5px" }}>
  2064. *
  2065. </span>
  2066. </FormItem>
  2067. <FormItem
  2068. className="half-item"
  2069. labelCol={{ span: 4 }}
  2070. wrapperCol={{ span: 12 }}
  2071. label="活动价"
  2072. >
  2073. <Input
  2074. placeholder="活动价"
  2075. value={this.state.editActivityPrice}
  2076. style={{ width: "94%" }}
  2077. onChange={(e) => {
  2078. this.setState({
  2079. editActivityPrice: e.target.value,
  2080. });
  2081. }}
  2082. />
  2083. </FormItem>
  2084. <FormItem
  2085. className="half-item"
  2086. labelCol={{ span: 4 }}
  2087. wrapperCol={{ span: 12 }}
  2088. label="最低折扣"
  2089. >
  2090. <Input
  2091. placeholder="最低折扣"
  2092. value={this.state.editOffset}
  2093. style={{ width: "94%" }}
  2094. onChange={(e) => {
  2095. this.setState({ editOffset: e.target.value });
  2096. }}
  2097. />
  2098. </FormItem>
  2099. <FormItem
  2100. className="half-item"
  2101. labelCol={{ span: 4 }}
  2102. wrapperCol={{ span: 12 }}
  2103. label="会员价"
  2104. >
  2105. <Input
  2106. placeholder="会员价"
  2107. value={this.state.editMemberPrice}
  2108. style={{ width: "94%" }}
  2109. onChange={(e) => {
  2110. this.setState({
  2111. editMemberPrice: e.target.value,
  2112. });
  2113. }}
  2114. />
  2115. </FormItem>
  2116. <FormItem
  2117. className="half-item"
  2118. labelCol={{ span: 4 }}
  2119. wrapperCol={{ span: 12 }}
  2120. label="活动生效"
  2121. >
  2122. <Select
  2123. placeholder="活动生效"
  2124. value={this.state.editActivityFlag}
  2125. style={{ width: "94%" }}
  2126. onChange={(e) => {
  2127. this.setState({ editActivityFlag: e });
  2128. }}
  2129. >
  2130. {gameState.map(function (item) {
  2131. return (
  2132. <Select.Option key={item.value}>
  2133. {item.key}
  2134. </Select.Option>
  2135. );
  2136. })}
  2137. </Select>
  2138. </FormItem>
  2139. <FormItem
  2140. className="half-item"
  2141. labelCol={{ span: 4 }}
  2142. wrapperCol={{ span: 12 }}
  2143. label="项目状态"
  2144. >
  2145. <Select
  2146. placeholder="项目状态"
  2147. value={this.state.editStatus}
  2148. style={{ width: "94%" }}
  2149. onChange={(e) => {
  2150. this.setState({ editStatus: e });
  2151. }}
  2152. >
  2153. {conditionOrganization.map(function (item) {
  2154. return (
  2155. <Select.Option key={item.value}>
  2156. {item.key}
  2157. </Select.Option>
  2158. );
  2159. })}
  2160. </Select>
  2161. </FormItem>
  2162. <FormItem
  2163. className="half-item"
  2164. labelCol={{ span: 4 }}
  2165. wrapperCol={{ span: 12 }}
  2166. label="项目分类"
  2167. >
  2168. {/* 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
  2169. <Select
  2170. placeholder="项目分类"
  2171. value={this.state.typeStr}
  2172. style={{ width: "94%" }}
  2173. onChange={(e) => {
  2174. let str = "";
  2175. if (e == 0) {
  2176. str = "通用";
  2177. } else if (e == 1) {
  2178. str = "专利";
  2179. } else if (e == 2) {
  2180. str = "软著";
  2181. } else if (e == 3) {
  2182. str = "审计";
  2183. } else if (e == 4) {
  2184. str = "双软";
  2185. } else if (e == 5) {
  2186. str = "高新";
  2187. } else if (e == 6) {
  2188. str = "商标";
  2189. }
  2190. this.setState({
  2191. typeStatus: e,
  2192. typeStr: str,
  2193. });
  2194. }}
  2195. >
  2196. <Select.Option key={0}>通用</Select.Option>
  2197. <Select.Option key={1}>专利</Select.Option>
  2198. <Select.Option key={2}>软著</Select.Option>
  2199. <Select.Option key={3}>审计</Select.Option>
  2200. <Select.Option key={4}>双软</Select.Option>
  2201. <Select.Option key={5}>高新</Select.Option>
  2202. <Select.Option key={6}>商标</Select.Option>
  2203. </Select>
  2204. </FormItem>
  2205. <FormItem
  2206. className="half-item"
  2207. labelCol={{ span: 4 }}
  2208. wrapperCol={{ span: 12 }}
  2209. label="创建人"
  2210. >
  2211. <span style={{ width: "94%" }}>
  2212. {this.state.editCreateId}
  2213. </span>
  2214. </FormItem>
  2215. <FormItem
  2216. className="half-item"
  2217. labelCol={{ span: 4 }}
  2218. wrapperCol={{ span: 12 }}
  2219. label="创建时间"
  2220. >
  2221. <span style={{ width: "94%" }}>
  2222. {this.state.editTime}
  2223. </span>
  2224. </FormItem>
  2225. </div>
  2226. <div className="clearfix">
  2227. <FormItem
  2228. labelCol={{ span: 4 }}
  2229. wrapperCol={{ span: 12 }}
  2230. label="项目地址"
  2231. >
  2232. <Input
  2233. type="textarea"
  2234. rows={1}
  2235. placeholder="业务项目服务内容"
  2236. value={this.state.editProjectUrl}
  2237. onChange={(e) => {
  2238. this.setState({
  2239. editProjectUrl: e.target.value,
  2240. });
  2241. }}
  2242. />
  2243. </FormItem>
  2244. </div>
  2245. <div className="clearfix">
  2246. <FormItem
  2247. labelCol={{ span: 4 }}
  2248. wrapperCol={{ span: 12 }}
  2249. label="业务项目服务内容"
  2250. >
  2251. <Input
  2252. type="textarea"
  2253. rows={4}
  2254. placeholder="业务项目服务内容"
  2255. value={this.state.editIntroduce}
  2256. onChange={(e) => {
  2257. this.setState({
  2258. editIntroduce: e.target.value,
  2259. });
  2260. }}
  2261. />
  2262. </FormItem>
  2263. </div>
  2264. <div className="clearfix">
  2265. <FormItem
  2266. labelCol={{ span: 4 }}
  2267. wrapperCol={{ span: 12 }}
  2268. label="业务项目价值及作用"
  2269. >
  2270. <Input
  2271. type="textarea"
  2272. rows={4}
  2273. placeholder="业务项目价值及作用"
  2274. value={this.state.editValueEffect}
  2275. onChange={(e) => {
  2276. this.setState({
  2277. editValueEffect: e.target.value,
  2278. });
  2279. }}
  2280. />
  2281. </FormItem>
  2282. </div>
  2283. <div className="clearfix">
  2284. <FormItem
  2285. labelCol={{ span: 4 }}
  2286. wrapperCol={{ span: 12 }}
  2287. label="业务项目客户基本条件"
  2288. >
  2289. <Input
  2290. type="textarea"
  2291. rows={4}
  2292. placeholder="业务项目客户基本条件"
  2293. value={this.state.editClientSize}
  2294. onChange={(e) => {
  2295. this.setState({
  2296. editClientSize: e.target.value,
  2297. });
  2298. }}
  2299. />
  2300. </FormItem>
  2301. </div>
  2302. <div className="clearfix pictures">
  2303. <FormItem
  2304. className="half-item"
  2305. labelCol={{ span: 8 }}
  2306. wrapperCol={{ span: 10 }}
  2307. label="业务项目图标"
  2308. >
  2309. <PicturesWall
  2310. domId={'businessProject1'}
  2311. pictureSign="business_project_min_picture"
  2312. fileList={this.getOrgCodeUrl}
  2313. pictureUrl={this.state.orgCodeUrl}
  2314. />
  2315. <p>图片建议:图片要清晰。(35*35)</p>
  2316. </FormItem>
  2317. <FormItem
  2318. className="half-item"
  2319. labelCol={{ span: 4 }}
  2320. wrapperCol={{ span: 12 }}
  2321. label="业务项目图标"
  2322. >
  2323. <PicturesWall
  2324. domId={'businessProject2'}
  2325. pictureSign="business_project_max_picture"
  2326. fileList={this.getCompanyLogoUrl}
  2327. pictureUrl={this.state.companyLogoUrl}
  2328. />
  2329. <p>图片建议:图片要清晰。(200*200)</p>
  2330. </FormItem>
  2331. </div>
  2332. <Button
  2333. className="set-submit"
  2334. type="primary"
  2335. htmlType="submit"
  2336. style={{
  2337. marginLeft: "190px",
  2338. marginBottom: "20px",
  2339. marginTop: "110px",
  2340. }}
  2341. >
  2342. 保存
  2343. </Button>
  2344. <Button
  2345. className="set-submit"
  2346. type="ghost"
  2347. onClick={this.edithandleCancel}
  2348. style={{
  2349. marginLeft: "100px",
  2350. marginBottom: "20px",
  2351. }}
  2352. >
  2353. 取消
  2354. </Button>
  2355. </Spin>
  2356. </Form>
  2357. </TabPane>
  2358. <TabPane tab="业务项目规格" key="2">
  2359. <div className="clearfix">
  2360. <Popconfirm
  2361. title="是否删除?"
  2362. onConfirm={this.delectRowSize}
  2363. okText="是"
  2364. cancelText="否"
  2365. >
  2366. <Button
  2367. style={{
  2368. background: "#ea0862",
  2369. border: "none",
  2370. color: "#fff",
  2371. marginRight: "10px",
  2372. marginLeft: "10px",
  2373. }}
  2374. disabled={!hasSelected}
  2375. >
  2376. 删除
  2377. <Icon type="minus" />
  2378. </Button>
  2379. </Popconfirm>
  2380. <Popconfirm
  2381. title="是否停用?"
  2382. onConfirm={this.blockRowSize}
  2383. okText="是"
  2384. cancelText="否"
  2385. >
  2386. <Button
  2387. style={{
  2388. background: "#ea0862",
  2389. border: "none",
  2390. color: "#fff",
  2391. marginRight: "10px",
  2392. marginLeft: "10px",
  2393. display: "none",
  2394. }}
  2395. disabled={!hasSelected}
  2396. >
  2397. 停用
  2398. <Icon type="minus" />
  2399. </Button>
  2400. </Popconfirm>
  2401. <Button
  2402. className="ContactsList"
  2403. type="primary"
  2404. onClick={this.formatClick}
  2405. style={{ float: "right", marginBottom: "10px" }}
  2406. >
  2407. 新增
  2408. </Button>
  2409. </div>
  2410. <div className="clearfix">
  2411. <Spin spinning={this.state.loading}>
  2412. <Form
  2413. horizontal
  2414. id="demand-form"
  2415. onSubmit={this.contactSave}
  2416. >
  2417. <Table
  2418. size="middle"
  2419. pagination={this.state.formatPagination}
  2420. columns={this.state.ContactsLists}
  2421. dataSource={this.state.formatDataSource}
  2422. rowSelection={rowSelection}
  2423. onRowClick={this.formatTableRowClick}
  2424. />
  2425. </Form>
  2426. </Spin>
  2427. </div>
  2428. </TabPane>
  2429. </Tabs>
  2430. </Modal>
  2431. </div>
  2432. </div>
  2433. </div>
  2434. );
  2435. }
  2436. }));
  2437. export default BusinessProject;