businessProject.jsx 96 KB

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