businessProject.jsx 88 KB

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