businessProject.jsx 95 KB

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