businessProject.jsx 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444
  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>
  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. placeholder="业务项目名称"
  1377. value={this.state.categoryName}
  1378. style={{ width: "94%" }}
  1379. onChange={(e) => {
  1380. this.setState({ categoryName: e.target.value });
  1381. }}
  1382. required="required"
  1383. />
  1384. <span
  1385. className="mandatory"
  1386. style={{ color: "red", marginLeft: "5px" }}
  1387. >
  1388. *
  1389. </span>
  1390. </FormItem>
  1391. </div>
  1392. <div className="clearfix">
  1393. <FormItem
  1394. labelCol={{ span: 7 }}
  1395. wrapperCol={{ span: 12 }}
  1396. label="业务品类"
  1397. >
  1398. <Select
  1399. placeholder="请选择业务品类"
  1400. value={this.state.addCid}
  1401. onChange={(e) => {
  1402. this.setState({ addCid: e });
  1403. }}
  1404. notFoundContent="未获取到业务品类列表"
  1405. style={{ width: "94%" }}
  1406. required="required"
  1407. >
  1408. {this.state.contactsOption}
  1409. </Select>
  1410. <span
  1411. className="mandatory"
  1412. style={{ color: "red", marginLeft: "5px" }}
  1413. >
  1414. *
  1415. </span>
  1416. </FormItem>
  1417. </div>
  1418. <div className="clearfix">
  1419. <FormItem
  1420. labelCol={{ span: 7 }}
  1421. wrapperCol={{ span: 12 }}
  1422. label="是否精品"
  1423. >
  1424. <Radio.Group
  1425. value={this.state.boutique}
  1426. onChange={(e) => {
  1427. this.setState({ boutique: e.target.value });
  1428. }}
  1429. >
  1430. <Radio value={1}>精品</Radio>
  1431. <Radio value={0}>非精品</Radio>
  1432. </Radio.Group>
  1433. </FormItem>
  1434. </div>
  1435. <div className="clearfix">
  1436. <FormItem
  1437. labelCol={{ span: 7 }}
  1438. wrapperCol={{ span: 12 }}
  1439. label="省"
  1440. >
  1441. <Cascader
  1442. options={provinceSelect()}
  1443. value={this.state.ProvinceCity}
  1444. placeholder="选择省"
  1445. style={{ width: "94%" }}
  1446. onChange={(e, pre) => {
  1447. this.setState({ ProvinceCity: e });
  1448. }}
  1449. />
  1450. <span style={{ color: "red", marginLeft: "5px" }}>
  1451. *
  1452. </span>
  1453. </FormItem>
  1454. </div>
  1455. <div className="clearfix">
  1456. <FormItem
  1457. labelCol={{ span: 7 }}
  1458. wrapperCol={{ span: 12 }}
  1459. label="省-市"
  1460. >
  1461. <Cascader
  1462. options={citySelect()}
  1463. value={this.state.ProvinceCity}
  1464. placeholder="选择市"
  1465. style={{ width: "94%" }}
  1466. onChange={(e, pre) => {
  1467. this.setState({ ProvinceCity: e });
  1468. }}
  1469. />
  1470. <span style={{ color: "red", marginLeft: "5px" }}>
  1471. *
  1472. </span>
  1473. </FormItem>
  1474. </div>
  1475. <div className="clearfix">
  1476. <FormItem
  1477. labelCol={{ span: 7 }}
  1478. wrapperCol={{ span: 12 }}
  1479. label="省-市-区"
  1480. >
  1481. <Cascader
  1482. options={areaSelect()}
  1483. value={this.state.ProvinceCity}
  1484. placeholder="选择区"
  1485. style={{ width: "94%" }}
  1486. onChange={(e, pre) => {
  1487. this.setState({ ProvinceCity: e });
  1488. }}
  1489. />
  1490. <span style={{ color: "red", marginLeft: "5px" }}>
  1491. *
  1492. </span>
  1493. </FormItem>
  1494. </div>
  1495. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1496. <Button
  1497. className="set-submit"
  1498. type="primary"
  1499. htmlType="submit"
  1500. >
  1501. 保存
  1502. </Button>
  1503. <Button
  1504. className="set-submit"
  1505. type="ghost"
  1506. onClick={this.handleCancel}
  1507. style={{ marginLeft: "15px" }}
  1508. >
  1509. 取消
  1510. </Button>
  1511. </FormItem>
  1512. </Spin>
  1513. </Form>
  1514. </Modal>
  1515. </div>
  1516. <div className="patent-desc">
  1517. <Modal
  1518. maskClosable={false}
  1519. visible={this.state.formatvisible}
  1520. onOk={this.checkPatentProcess}
  1521. onCancel={this.formathandleCancel}
  1522. width="400px"
  1523. title="新增项目规格"
  1524. footer=""
  1525. className="admin-desc-content"
  1526. >
  1527. <Form
  1528. horizontal
  1529. onSubmit={this.formathandleSubmit}
  1530. id="demand-form"
  1531. >
  1532. <Spin spinning={this.state.loading}>
  1533. <div className="clearfix">
  1534. <FormItem
  1535. labelCol={{ span: 7 }}
  1536. wrapperCol={{ span: 12 }}
  1537. label="项目名称"
  1538. >
  1539. <span style={{ width: "94%" }}>
  1540. {this.state.editName}
  1541. </span>
  1542. </FormItem>
  1543. <FormItem
  1544. labelCol={{ span: 7 }}
  1545. wrapperCol={{ span: 12 }}
  1546. label="规格名称"
  1547. >
  1548. <Input
  1549. placeholder="规格名称"
  1550. value={this.state.formatPname}
  1551. style={{ width: "94%" }}
  1552. onChange={(e) => {
  1553. this.setState({ formatPname: e.target.value });
  1554. }}
  1555. required="required"
  1556. />
  1557. <span
  1558. className="mandatory"
  1559. style={{ color: "red", marginLeft: "5px" }}
  1560. >
  1561. *
  1562. </span>
  1563. </FormItem>
  1564. <FormItem
  1565. labelCol={{ span: 7 }}
  1566. wrapperCol={{ span: 12 }}
  1567. label="市场价"
  1568. >
  1569. <Input
  1570. placeholder="市场价"
  1571. value={this.state.formatPrice}
  1572. style={{ width: "94%" }}
  1573. onChange={(e) => {
  1574. this.setState({ formatPrice: e.target.value });
  1575. }}
  1576. />
  1577. </FormItem>
  1578. <FormItem
  1579. labelCol={{ span: 7 }}
  1580. wrapperCol={{ span: 12 }}
  1581. label="活动价"
  1582. >
  1583. <Input
  1584. placeholder="活动价"
  1585. value={this.state.formatActivityPrice}
  1586. style={{ width: "94%" }}
  1587. onChange={(e) => {
  1588. this.setState({
  1589. formatActivityPrice: e.target.value,
  1590. });
  1591. }}
  1592. />
  1593. </FormItem>
  1594. <FormItem
  1595. labelCol={{ span: 7 }}
  1596. wrapperCol={{ span: 12 }}
  1597. label="最低折扣"
  1598. >
  1599. <Input
  1600. placeholder="最低折扣"
  1601. value={this.state.formatOffset}
  1602. style={{ width: "94%" }}
  1603. onChange={(e) => {
  1604. this.setState({ formatOffset: e.target.value });
  1605. }}
  1606. />
  1607. </FormItem>
  1608. <FormItem
  1609. labelCol={{ span: 7 }}
  1610. wrapperCol={{ span: 12 }}
  1611. label="会员价"
  1612. >
  1613. <Input
  1614. placeholder="会员价"
  1615. value={this.state.formatMemberPrice}
  1616. style={{ width: "94%" }}
  1617. onChange={(e) => {
  1618. this.setState({
  1619. formatMemberPrice: e.target.value,
  1620. });
  1621. }}
  1622. />
  1623. </FormItem>
  1624. <FormItem
  1625. labelCol={{ span: 7 }}
  1626. wrapperCol={{ span: 12 }}
  1627. label="活动生效"
  1628. >
  1629. <Select
  1630. placeholder="活动生效"
  1631. value={this.state.formatActivityFlag}
  1632. style={{ width: "94%" }}
  1633. onChange={(e) => {
  1634. this.setState({ formatActivityFlag: e });
  1635. }}
  1636. >
  1637. {gameState.map(function (item) {
  1638. return (
  1639. <Select.Option key={item.value}>
  1640. {item.key}
  1641. </Select.Option>
  1642. );
  1643. })}
  1644. </Select>
  1645. </FormItem>
  1646. <FormItem
  1647. labelCol={{ span: 7 }}
  1648. wrapperCol={{ span: 12 }}
  1649. label="项目状态"
  1650. >
  1651. <Select
  1652. placeholder="项目状态"
  1653. value={this.state.formatStatus}
  1654. style={{ width: "94%" }}
  1655. onChange={(e) => {
  1656. this.setState({ formatStatus: e });
  1657. }}
  1658. >
  1659. {conditionOrganization.map(function (item) {
  1660. return (
  1661. <Select.Option key={item.value}>
  1662. {item.key}
  1663. </Select.Option>
  1664. );
  1665. })}
  1666. </Select>
  1667. </FormItem>
  1668. </div>
  1669. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1670. <Button
  1671. className="set-submit"
  1672. type="primary"
  1673. htmlType="submit"
  1674. >
  1675. 保存
  1676. </Button>
  1677. <Button
  1678. className="set-submit"
  1679. type="ghost"
  1680. onClick={this.formathandleCancel}
  1681. style={{ marginLeft: "15px" }}
  1682. >
  1683. 取消
  1684. </Button>
  1685. </FormItem>
  1686. </Spin>
  1687. </Form>
  1688. </Modal>
  1689. </div>
  1690. <div className="patent-desc">
  1691. <Modal
  1692. maskClosable={false}
  1693. visible={this.state.editformatvisible}
  1694. onOk={this.checkPatentProcess}
  1695. onCancel={this.editformathandleCancel}
  1696. width="400px"
  1697. title="编辑项目规格"
  1698. footer=""
  1699. className="admin-desc-content"
  1700. >
  1701. <Form
  1702. horizontal
  1703. onSubmit={this.editformathandleSubmit}
  1704. id="demand-form"
  1705. >
  1706. <Spin spinning={this.state.loading}>
  1707. <div className="clearfix">
  1708. <FormItem
  1709. labelCol={{ span: 7 }}
  1710. wrapperCol={{ span: 12 }}
  1711. label="规格名称"
  1712. >
  1713. <Input
  1714. placeholder="规格名称"
  1715. value={this.state.formatPname}
  1716. style={{ width: "94%" }}
  1717. onChange={(e) => {
  1718. this.setState({ formatPname: e.target.value });
  1719. }}
  1720. required="required"
  1721. />
  1722. <span
  1723. className="mandatory"
  1724. style={{ color: "red", marginLeft: "5px" }}
  1725. >
  1726. *
  1727. </span>
  1728. </FormItem>
  1729. </div>
  1730. <div className="clearfix">
  1731. <FormItem
  1732. labelCol={{ span: 7 }}
  1733. wrapperCol={{ span: 12 }}
  1734. label="创建人"
  1735. >
  1736. <span style={{ width: "94%" }}>
  1737. {this.state.editCreateId}
  1738. </span>
  1739. </FormItem>
  1740. <FormItem
  1741. labelCol={{ span: 7 }}
  1742. wrapperCol={{ span: 12 }}
  1743. label="市场价"
  1744. >
  1745. <Input
  1746. placeholder="市场价"
  1747. value={this.state.formatPrice}
  1748. style={{ width: "94%" }}
  1749. onChange={(e) => {
  1750. this.setState({ formatPrice: e.target.value });
  1751. }}
  1752. />
  1753. </FormItem>
  1754. <FormItem
  1755. labelCol={{ span: 7 }}
  1756. wrapperCol={{ span: 12 }}
  1757. label="活动价"
  1758. >
  1759. <Input
  1760. placeholder="活动价"
  1761. value={this.state.formatActivityPrice}
  1762. style={{ width: "94%" }}
  1763. onChange={(e) => {
  1764. this.setState({
  1765. formatActivityPrice: e.target.value,
  1766. });
  1767. }}
  1768. />
  1769. </FormItem>
  1770. <FormItem
  1771. labelCol={{ span: 7 }}
  1772. wrapperCol={{ span: 12 }}
  1773. label="最低折扣"
  1774. >
  1775. <Input
  1776. placeholder="最低折扣"
  1777. value={this.state.formatOffset}
  1778. style={{ width: "94%" }}
  1779. onChange={(e) => {
  1780. this.setState({ formatOffset: e.target.value });
  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.formatMemberPrice}
  1792. style={{ width: "94%" }}
  1793. onChange={(e) => {
  1794. this.setState({
  1795. formatMemberPrice: e.target.value,
  1796. });
  1797. }}
  1798. />
  1799. </FormItem>
  1800. <FormItem
  1801. labelCol={{ span: 7 }}
  1802. wrapperCol={{ span: 12 }}
  1803. label="活动生效"
  1804. >
  1805. <Select
  1806. placeholder="活动生效"
  1807. value={this.state.formatActivityFlag}
  1808. style={{ width: "94%" }}
  1809. onChange={(e) => {
  1810. this.setState({ formatActivityFlag: e });
  1811. }}
  1812. >
  1813. {gameState.map(function (item) {
  1814. return (
  1815. <Select.Option key={item.value}>
  1816. {item.key}
  1817. </Select.Option>
  1818. );
  1819. })}
  1820. </Select>
  1821. </FormItem>
  1822. <FormItem
  1823. labelCol={{ span: 7 }}
  1824. wrapperCol={{ span: 12 }}
  1825. label="项目状态"
  1826. >
  1827. <Select
  1828. placeholder="项目状态"
  1829. value={this.state.formatStatus}
  1830. style={{ width: "94%" }}
  1831. onChange={(e) => {
  1832. this.setState({ formatStatus: e });
  1833. }}
  1834. >
  1835. {conditionOrganization.map(function (item) {
  1836. return (
  1837. <Select.Option key={item.value}>
  1838. {item.key}
  1839. </Select.Option>
  1840. );
  1841. })}
  1842. </Select>
  1843. </FormItem>
  1844. </div>
  1845. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1846. <Button
  1847. className="set-submit"
  1848. type="primary"
  1849. htmlType="submit"
  1850. >
  1851. 保存
  1852. </Button>
  1853. <Button
  1854. className="set-submit"
  1855. type="ghost"
  1856. onClick={this.editformathandleCancel}
  1857. style={{ marginLeft: "15px" }}
  1858. >
  1859. 取消
  1860. </Button>
  1861. </FormItem>
  1862. </Spin>
  1863. </Form>
  1864. </Modal>
  1865. </div>
  1866. <div className="patent-desc">
  1867. <Modal
  1868. className="customeDetails"
  1869. title="业务项目"
  1870. width="1000px"
  1871. visible={this.state.editvisible}
  1872. onOk={this.edithandleCancel}
  1873. onCancel={this.edithandleCancel}
  1874. footer=""
  1875. >
  1876. <Tabs
  1877. defaultActiveKey="1"
  1878. onChange={this.callback}
  1879. activeKey={this.state.callnub}
  1880. >
  1881. <TabPane tab="业务项目基本资料" key="1">
  1882. <Form
  1883. horizontal
  1884. onSubmit={this.edithandleSubmit}
  1885. id="demand-form"
  1886. >
  1887. <Spin spinning={this.state.loading}>
  1888. <div
  1889. className="clearfix"
  1890. style={{ paddingLeft: "60px" }}
  1891. >
  1892. <FormItem
  1893. className="half-item"
  1894. labelCol={{ span: 4 }}
  1895. wrapperCol={{ span: 12 }}
  1896. label="项目名称"
  1897. >
  1898. <Input
  1899. placeholder="项目名称"
  1900. value={this.state.editName}
  1901. style={{ width: "94%" }}
  1902. onChange={(e) => {
  1903. this.setState({ editName: e.target.value });
  1904. }}
  1905. required="required"
  1906. />
  1907. <span
  1908. className="mandatory"
  1909. style={{ color: "red", marginLeft: "5px" }}
  1910. >
  1911. *
  1912. </span>
  1913. </FormItem>
  1914. <FormItem
  1915. className="half-item"
  1916. labelCol={{ span: 4 }}
  1917. wrapperCol={{ span: 12 }}
  1918. label="业务品类"
  1919. >
  1920. <Select
  1921. placeholder="请选择业务品类"
  1922. value={this.state.editCname}
  1923. onChange={(e) => {
  1924. this.setState({ editCname: e });
  1925. }}
  1926. notFoundContent="未获取到业务品类列表"
  1927. style={{ width: "94%" }}
  1928. required="required"
  1929. >
  1930. {this.state.contactsOption}
  1931. </Select>
  1932. <span
  1933. className="mandatory"
  1934. style={{ color: "red", marginLeft: "5px" }}
  1935. >
  1936. *
  1937. </span>
  1938. </FormItem>
  1939. </div>
  1940. <div
  1941. className="clearfix"
  1942. style={{ paddingLeft: "60px" }}
  1943. >
  1944. <FormItem
  1945. className="half-item"
  1946. labelCol={{ span: 4 }}
  1947. wrapperCol={{ span: 12 }}
  1948. label="省"
  1949. >
  1950. <Cascader
  1951. options={provinceSelect()}
  1952. value={this.state.ProvinceCity}
  1953. placeholder="选择省"
  1954. style={{ width: "94%" }}
  1955. onChange={(e, pre) => {
  1956. this.setState({ ProvinceCity: e });
  1957. }}
  1958. />
  1959. <span style={{ color: "red", marginLeft: "5px" }}>
  1960. *
  1961. </span>
  1962. </FormItem>
  1963. <FormItem
  1964. className="half-item"
  1965. labelCol={{ span: 4 }}
  1966. wrapperCol={{ span: 12 }}
  1967. label="省-市"
  1968. >
  1969. <Cascader
  1970. options={citySelect()}
  1971. value={this.state.ProvinceCity}
  1972. placeholder="选择市"
  1973. style={{ width: "94%" }}
  1974. onChange={(e, pre) => {
  1975. this.setState({ ProvinceCity: e });
  1976. }}
  1977. />
  1978. <span style={{ color: "red", marginLeft: "5px" }}>
  1979. *
  1980. </span>
  1981. </FormItem>
  1982. <FormItem
  1983. className="half-item"
  1984. labelCol={{ span: 4 }}
  1985. wrapperCol={{ span: 12 }}
  1986. label="省-市-区"
  1987. >
  1988. <Cascader
  1989. options={areaSelect()}
  1990. value={this.state.ProvinceCity}
  1991. placeholder="选择区"
  1992. style={{ width: "94%" }}
  1993. onChange={(e, pre) => {
  1994. this.setState({ ProvinceCity: e });
  1995. }}
  1996. />
  1997. <span style={{ color: "red", marginLeft: "5px" }}>
  1998. *
  1999. </span>
  2000. </FormItem>
  2001. <FormItem
  2002. className="half-item"
  2003. labelCol={{ span: 4 }}
  2004. wrapperCol={{ span: 12 }}
  2005. label="是否精品"
  2006. >
  2007. <Radio.Group
  2008. value={this.state.editBoutique}
  2009. onChange={(e) => {
  2010. this.setState({
  2011. editBoutique: e.target.value,
  2012. });
  2013. }}
  2014. >
  2015. <Radio value={1}>精品</Radio>
  2016. <Radio value={0}>非精品</Radio>
  2017. </Radio.Group>
  2018. </FormItem>
  2019. </div>
  2020. <div
  2021. className="clearfix"
  2022. style={{ paddingLeft: "60px" }}
  2023. >
  2024. <FormItem
  2025. className="half-item"
  2026. labelCol={{ span: 4 }}
  2027. wrapperCol={{ span: 12 }}
  2028. label="市场价"
  2029. >
  2030. <Input
  2031. placeholder="市场价"
  2032. value={this.state.editPrice}
  2033. style={{ width: "94%" }}
  2034. onChange={(e) => {
  2035. this.setState({ editPrice: e.target.value });
  2036. }}
  2037. required="required"
  2038. />
  2039. <span style={{ color: "red", marginLeft: "5px" }}>
  2040. *
  2041. </span>
  2042. </FormItem>
  2043. <FormItem
  2044. className="half-item"
  2045. labelCol={{ span: 4 }}
  2046. wrapperCol={{ span: 12 }}
  2047. label="首付金额"
  2048. >
  2049. <Input
  2050. placeholder="市场价"
  2051. value={this.state.firstPayment}
  2052. style={{ width: "94%" }}
  2053. onChange={(e) => {
  2054. this.setState({
  2055. firstPayment: e.target.value,
  2056. });
  2057. }}
  2058. required="required"
  2059. />
  2060. <span style={{ color: "red", marginLeft: "5px" }}>
  2061. *
  2062. </span>
  2063. </FormItem>
  2064. <FormItem
  2065. className="half-item"
  2066. labelCol={{ span: 4 }}
  2067. wrapperCol={{ span: 12 }}
  2068. label="活动价"
  2069. >
  2070. <Input
  2071. placeholder="活动价"
  2072. value={this.state.editActivityPrice}
  2073. style={{ width: "94%" }}
  2074. onChange={(e) => {
  2075. this.setState({
  2076. editActivityPrice: e.target.value,
  2077. });
  2078. }}
  2079. />
  2080. </FormItem>
  2081. <FormItem
  2082. className="half-item"
  2083. labelCol={{ span: 4 }}
  2084. wrapperCol={{ span: 12 }}
  2085. label="最低折扣"
  2086. >
  2087. <Input
  2088. placeholder="最低折扣"
  2089. value={this.state.editOffset}
  2090. style={{ width: "94%" }}
  2091. onChange={(e) => {
  2092. this.setState({ editOffset: e.target.value });
  2093. }}
  2094. />
  2095. </FormItem>
  2096. <FormItem
  2097. className="half-item"
  2098. labelCol={{ span: 4 }}
  2099. wrapperCol={{ span: 12 }}
  2100. label="会员价"
  2101. >
  2102. <Input
  2103. placeholder="会员价"
  2104. value={this.state.editMemberPrice}
  2105. style={{ width: "94%" }}
  2106. onChange={(e) => {
  2107. this.setState({
  2108. editMemberPrice: e.target.value,
  2109. });
  2110. }}
  2111. />
  2112. </FormItem>
  2113. <FormItem
  2114. className="half-item"
  2115. labelCol={{ span: 4 }}
  2116. wrapperCol={{ span: 12 }}
  2117. label="活动生效"
  2118. >
  2119. <Select
  2120. placeholder="活动生效"
  2121. value={this.state.editActivityFlag}
  2122. style={{ width: "94%" }}
  2123. onChange={(e) => {
  2124. this.setState({ editActivityFlag: e });
  2125. }}
  2126. >
  2127. {gameState.map(function (item) {
  2128. return (
  2129. <Select.Option key={item.value}>
  2130. {item.key}
  2131. </Select.Option>
  2132. );
  2133. })}
  2134. </Select>
  2135. </FormItem>
  2136. <FormItem
  2137. className="half-item"
  2138. labelCol={{ span: 4 }}
  2139. wrapperCol={{ span: 12 }}
  2140. label="项目状态"
  2141. >
  2142. <Select
  2143. placeholder="项目状态"
  2144. value={this.state.editStatus}
  2145. style={{ width: "94%" }}
  2146. onChange={(e) => {
  2147. this.setState({ editStatus: e });
  2148. }}
  2149. >
  2150. {conditionOrganization.map(function (item) {
  2151. return (
  2152. <Select.Option key={item.value}>
  2153. {item.key}
  2154. </Select.Option>
  2155. );
  2156. })}
  2157. </Select>
  2158. </FormItem>
  2159. <FormItem
  2160. className="half-item"
  2161. labelCol={{ span: 4 }}
  2162. wrapperCol={{ span: 12 }}
  2163. label="项目分类"
  2164. >
  2165. {/* 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
  2166. <Select
  2167. placeholder="项目分类"
  2168. value={this.state.typeStr}
  2169. style={{ width: "94%" }}
  2170. onChange={(e) => {
  2171. let str = "";
  2172. if (e == 0) {
  2173. str = "通用";
  2174. } else if (e == 1) {
  2175. str = "专利";
  2176. } else if (e == 2) {
  2177. str = "软著";
  2178. } else if (e == 3) {
  2179. str = "审计";
  2180. } else if (e == 4) {
  2181. str = "双软";
  2182. } else if (e == 5) {
  2183. str = "高新";
  2184. } else if (e == 6) {
  2185. str = "商标";
  2186. }
  2187. this.setState({
  2188. typeStatus: e,
  2189. typeStr: str,
  2190. });
  2191. }}
  2192. >
  2193. <Select.Option key={0}>通用</Select.Option>
  2194. <Select.Option key={1}>专利</Select.Option>
  2195. <Select.Option key={2}>软著</Select.Option>
  2196. <Select.Option key={3}>审计</Select.Option>
  2197. <Select.Option key={4}>双软</Select.Option>
  2198. <Select.Option key={5}>高新</Select.Option>
  2199. <Select.Option key={6}>商标</Select.Option>
  2200. </Select>
  2201. </FormItem>
  2202. <FormItem
  2203. className="half-item"
  2204. labelCol={{ span: 4 }}
  2205. wrapperCol={{ span: 12 }}
  2206. label="创建人"
  2207. >
  2208. <span style={{ width: "94%" }}>
  2209. {this.state.editCreateId}
  2210. </span>
  2211. </FormItem>
  2212. <FormItem
  2213. className="half-item"
  2214. labelCol={{ span: 4 }}
  2215. wrapperCol={{ span: 12 }}
  2216. label="创建时间"
  2217. >
  2218. <span style={{ width: "94%" }}>
  2219. {this.state.editTime}
  2220. </span>
  2221. </FormItem>
  2222. </div>
  2223. <div className="clearfix">
  2224. <FormItem
  2225. labelCol={{ span: 4 }}
  2226. wrapperCol={{ span: 12 }}
  2227. label="项目地址"
  2228. >
  2229. <Input
  2230. type="textarea"
  2231. rows={1}
  2232. placeholder="业务项目服务内容"
  2233. value={this.state.editProjectUrl}
  2234. onChange={(e) => {
  2235. this.setState({
  2236. editProjectUrl: e.target.value,
  2237. });
  2238. }}
  2239. />
  2240. </FormItem>
  2241. </div>
  2242. <div className="clearfix">
  2243. <FormItem
  2244. labelCol={{ span: 4 }}
  2245. wrapperCol={{ span: 12 }}
  2246. label="业务项目服务内容"
  2247. >
  2248. <Input
  2249. type="textarea"
  2250. rows={4}
  2251. placeholder="业务项目服务内容"
  2252. value={this.state.editIntroduce}
  2253. onChange={(e) => {
  2254. this.setState({
  2255. editIntroduce: e.target.value,
  2256. });
  2257. }}
  2258. />
  2259. </FormItem>
  2260. </div>
  2261. <div className="clearfix">
  2262. <FormItem
  2263. labelCol={{ span: 4 }}
  2264. wrapperCol={{ span: 12 }}
  2265. label="业务项目价值及作用"
  2266. >
  2267. <Input
  2268. type="textarea"
  2269. rows={4}
  2270. placeholder="业务项目价值及作用"
  2271. value={this.state.editValueEffect}
  2272. onChange={(e) => {
  2273. this.setState({
  2274. editValueEffect: e.target.value,
  2275. });
  2276. }}
  2277. />
  2278. </FormItem>
  2279. </div>
  2280. <div className="clearfix">
  2281. <FormItem
  2282. labelCol={{ span: 4 }}
  2283. wrapperCol={{ span: 12 }}
  2284. label="业务项目客户基本条件"
  2285. >
  2286. <Input
  2287. type="textarea"
  2288. rows={4}
  2289. placeholder="业务项目客户基本条件"
  2290. value={this.state.editClientSize}
  2291. onChange={(e) => {
  2292. this.setState({
  2293. editClientSize: e.target.value,
  2294. });
  2295. }}
  2296. />
  2297. </FormItem>
  2298. </div>
  2299. <div className="clearfix pictures">
  2300. <FormItem
  2301. className="half-item"
  2302. labelCol={{ span: 8 }}
  2303. wrapperCol={{ span: 10 }}
  2304. label="业务项目图标"
  2305. >
  2306. <PicturesWall
  2307. domId={'businessProject1'}
  2308. pictureSign="business_project_min_picture"
  2309. fileList={this.getOrgCodeUrl}
  2310. pictureUrl={this.state.orgCodeUrl}
  2311. />
  2312. <p>图片建议:图片要清晰。(35*35)</p>
  2313. </FormItem>
  2314. <FormItem
  2315. className="half-item"
  2316. labelCol={{ span: 4 }}
  2317. wrapperCol={{ span: 12 }}
  2318. label="业务项目图标"
  2319. >
  2320. <PicturesWall
  2321. domId={'businessProject2'}
  2322. pictureSign="business_project_max_picture"
  2323. fileList={this.getCompanyLogoUrl}
  2324. pictureUrl={this.state.companyLogoUrl}
  2325. />
  2326. <p>图片建议:图片要清晰。(200*200)</p>
  2327. </FormItem>
  2328. </div>
  2329. <Button
  2330. className="set-submit"
  2331. type="primary"
  2332. htmlType="submit"
  2333. style={{
  2334. marginLeft: "190px",
  2335. marginBottom: "20px",
  2336. marginTop: "110px",
  2337. }}
  2338. >
  2339. 保存
  2340. </Button>
  2341. <Button
  2342. className="set-submit"
  2343. type="ghost"
  2344. onClick={this.edithandleCancel}
  2345. style={{
  2346. marginLeft: "100px",
  2347. marginBottom: "20px",
  2348. }}
  2349. >
  2350. 取消
  2351. </Button>
  2352. </Spin>
  2353. </Form>
  2354. </TabPane>
  2355. <TabPane tab="业务项目规格" key="2">
  2356. <div className="clearfix">
  2357. <Popconfirm
  2358. title="是否删除?"
  2359. onConfirm={this.delectRowSize}
  2360. okText="是"
  2361. cancelText="否"
  2362. >
  2363. <Button
  2364. style={{
  2365. background: "#ea0862",
  2366. border: "none",
  2367. color: "#fff",
  2368. marginRight: "10px",
  2369. marginLeft: "10px",
  2370. }}
  2371. disabled={!hasSelected}
  2372. >
  2373. 删除
  2374. <Icon type="minus" />
  2375. </Button>
  2376. </Popconfirm>
  2377. <Popconfirm
  2378. title="是否停用?"
  2379. onConfirm={this.blockRowSize}
  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. display: "none",
  2391. }}
  2392. disabled={!hasSelected}
  2393. >
  2394. 停用
  2395. <Icon type="minus" />
  2396. </Button>
  2397. </Popconfirm>
  2398. <Button
  2399. className="ContactsList"
  2400. type="primary"
  2401. onClick={this.formatClick}
  2402. style={{ float: "right", marginBottom: "10px" }}
  2403. >
  2404. 新增
  2405. </Button>
  2406. </div>
  2407. <div className="clearfix">
  2408. <Spin spinning={this.state.loading}>
  2409. <Form
  2410. horizontal
  2411. id="demand-form"
  2412. onSubmit={this.contactSave}
  2413. >
  2414. <Table
  2415. size="middle"
  2416. pagination={this.state.formatPagination}
  2417. columns={this.state.ContactsLists}
  2418. dataSource={this.state.formatDataSource}
  2419. rowSelection={rowSelection}
  2420. onRowClick={this.formatTableRowClick}
  2421. />
  2422. </Form>
  2423. </Spin>
  2424. </div>
  2425. </TabPane>
  2426. </Tabs>
  2427. </Modal>
  2428. </div>
  2429. </div>
  2430. </div>
  2431. );
  2432. }
  2433. }));
  2434. export default BusinessProject;