businessProject.jsx 98 KB

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