12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471 |
- import React from 'react';
- import $ from 'jquery/src/ajax';
- import '../content.less';
- import { citySelect,areaSelect,provinceSelect} from '../../../NewDicProvinceListAll';
- import { Form,Radio, Icon, Button, Input,Tabs, Select, Spin, Table, Switch, message, DatePicker, Modal,Popconfirm,Cascader } from 'antd';
- import {conditionOrganization,gameState} from '../../../dataDic.js';
- import {getCategoryState,getGameState,splitUrl,getprovince} from '../../../tools.js';
- import ImgList from "../../../common/imgList";
- import {ChooseList} from "../../order/orderNew/chooseList";
- const TabPane = Tabs.TabPane;
- const RadioGroup = Radio.Group;
- //图片组件
- const PicturesWall = React.createClass({
- getInitialState() {
- return {
- previewVisible: false,
- previewImage: '',
- fileList: [],
- }
- },
- handleCancel() {
- this.setState({ previewVisible: false })
- },
- handlePreview(file) {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true,
- });
- },
- handleChange(info) {
- let fileList = info.fileList;
- this.setState({ fileList });
- this.props.fileList(fileList);
- },
- componentWillReceiveProps(nextProps) {
- this.state.fileList = nextProps.pictureUrl;
- },
- render() {
- const { previewVisible, previewImage, fileList } = this.state;
- const uploadButton = (
- <div>
- <Icon type="plus" />
- <div className="ant-upload-text">点击上传</div>
- </div>
- );
- return (
- <div style={{display:"inline-block"}}>
- <ImgList
- domId={this.props.domId}
- uploadConfig={{
- action:globalConfig.context + "/api/admin/ProjectSize/uploadPicture",
- data:{ 'sign': this.props.pictureSign },
- multiple:true,
- listType:"picture-card",
- }}
- onChange={(infor)=>{
- this.handleChange(infor)
- }}
- fileList={fileList}
- />
- </div>
- );
- }
- });
- //主体
- const BusinessProject=Form.create()(React.createClass({
- //搜索功能和初始列表加载
- loadData(pageNo, apiUrl) {
- this.state.data = [];
- this.setState({
- loading: true,
- ispage:pageNo,
- });
- let nameText=this.state.SuperArr;
- let superText=(this.state.cid)?nameText[parseInt(this.state.cid)].id:"";
- let isCountry='';
- let pro='';
- let city='';
- let dis='';
- if(this.state.ressSearch==undefined){
- }else{
- switch(parseInt(this.state.ressSearch.length)){
- case 1:pro=this.state.ressSearch[0];break;
- case 2:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];break;
- case 3:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];dis=this.state.ressSearch[2];break;
- }
- }
- if(pro===0){
- isCountry=1;
- pro='';
- }
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/listProject",
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- bname: this.state.bname, //项目名称
- cid: superText, //品类名称
- country: isCountry, //是否全国
- province: pro, //省
- city: city, //市
- district: dis, //区
- activityFlag: this.state.activityFlag, //活动生效标识
- status: this.state.status, //项目状态
- type: this.state.type,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- let ProvinceCity = [];
- let isCountry = "";
- if (thisdata.country == 1) {
- isCountry = "全国";
- } else {
- if (thisdata.city == null || thisdata.city == "") {
- isCountry += getprovince(parseInt(thisdata.province));
- } else if (
- thisdata.district == null ||
- thisdata.district == ""
- ) {
- isCountry += getprovince(parseInt(thisdata.province)) + "-";
- isCountry += getprovince(parseInt(thisdata.city));
- } else {
- isCountry += getprovince(parseInt(thisdata.province)) + "-";
- isCountry += getprovince(parseInt(thisdata.city)) + "-";
- isCountry += getprovince(parseInt(thisdata.district));
- }
- }
- theArr.push({
- key: i,
- id: thisdata.id, //业务名称
- bname: thisdata.bname, //业务名称
- cname: thisdata.cname, //业务品类
- area: isCountry ? isCountry : ProvinceCity,
- price: thisdata.price, //市场价
- offset: thisdata.offset, //最低折扣
- memberPrice: thisdata.memberPrice, //会员价
- activityPrice: thisdata.activityPrice, //活动价
- activityFlag: thisdata.activityFlag, //活动生效标识
- status: thisdata.status, //项目状态
- type: thisdata.type,
- arrProvinceCity: ProvinceCity,
- });
- }
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- }
- this.setState({
- dataSource: theArr,
- pagination: this.state.pagination,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //项目规格列表
- formatLoadData(pageNo, apiUrl){
- this.state.data = [];
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/ProjectSize/listProjectSize',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.formatPagination.pageSize,
- pid:this.state.editId,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: i,
- formatId:thisdata.id,//规格ID
- formatPname: thisdata.pname,//规格名称
- formatBname: thisdata.bname,//项目品类
- formatPrice: thisdata.price,//市场价
- formatOffset: thisdata.offset,//最低折扣
- formatActivityPrice: thisdata.activityPrice,//活动价
- formatActivityFlag:thisdata.activityFlag,//活动生效标识
- formatMemberPrice:thisdata.memberPrice,//会员价
- formatStatus:thisdata.status,//会员价
- });
- };
- this.state.formatPagination.current = data.data.pageNo;
- this.state.formatPagination.total = data.data.totalCount;
- };
- this.setState({
- formatDataSource: theArr,
- formatPagination: this.state.formatPagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- searchMore: true,
- selectedRowKeys: [],
- selectedRows: [],
- loading: false,
- orgCodeUrl: [],
- companyLogoUrl: [],
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return "共" + total + "条数据";
- },
- },
- formatPagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return "共" + total + "条数据";
- },
- },
- ContactsLists: [
- {
- title: "业务项目名称",
- dataIndex: "formatBname",
- key: "formatBname",
- },
- {
- title: "规格名称",
- dataIndex: "formatPname",
- key: "formatPname",
- },
- {
- title: "市场价",
- dataIndex: "formatPrice",
- key: "formatPrice",
- },
- {
- title: "最低折扣",
- dataIndex: "formatOffset",
- key: "formatOffset",
- },
- {
- title: "会员价",
- dataIndex: "formatMemberPrice",
- key: "formatMemberPrice",
- },
- {
- title: "活动价",
- dataIndex: "formatActivityPrice",
- key: "formatActivityPrice",
- },
- {
- title: "活动生效标识",
- dataIndex: "formatActivityFlag",
- key: "formatActivityFlag",
- render: (text) => {
- return getGameState(text);
- },
- },
- {
- title: "状态",
- dataIndex: "formatStatus",
- key: "formatStatus",
- render: (text) => {
- return getCategoryState(text.toString());
- },
- },
- ],
- formatDataSource: [],
- columns: [
- {
- title: "项目名称",
- dataIndex: "bname",
- key: "bname",
- },
- {
- title: "业务品类",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "业务地区",
- dataIndex: "area",
- key: "area",
- // render: text => { return getprovince(text); }
- },
- {
- title: "市场价",
- dataIndex: "price",
- key: "price",
- },
- {
- title: "最低折扣",
- dataIndex: "offset",
- key: "offset",
- },
- {
- title: "会员价",
- dataIndex: "memberPrice",
- key: "memberPrice",
- },
- {
- title: "活动价",
- dataIndex: "activityPrice",
- key: "activityPrice",
- },
- {
- title: "活动生效标识",
- dataIndex: "activityFlag",
- key: "activityFlag",
- render: (text) => {
- return getGameState(text);
- },
- },
- {
- title: "业务状态",
- dataIndex: "status",
- key: "status",
- render: (text) => {
- return getCategoryState(text);
- },
- },
- {
- title: "项目分类",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- if (record.type == 0) {
- return "通用";
- } else if (record.type == 1) {
- return "专利";
- } else if (record.type == 2) {
- return "软著";
- } else if (record.type == 3) {
- return "审计";
- }else if(record.type == 4) {
- return "双软"
- }else if(record.type == 5) {
- return "高新"
- }else if(record.type == 6) {
- return "商标"
- }
- },
- },
- ],
- dataSource: [],
- };
- },
- componentWillMount() {
- this.selectSuperId();
- },
- //获取上级品类
- selectSuperId() {
- this.state.data = []
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
- data:{
- flag:0,
- },
- success: function (data) {
- let theArr = [];
- let thedata=data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- var contactIds=[];
- for(var i=0;i<data.data.length;i++){
- let theData = data.data[i];
- theArr.push(
- <Select.Option value={i.toString()} key={theData.cname}>{theData.cname}</Select.Option>
- );
- };
- this.setState({
- SuperArr:thedata,
- contactsOption: theArr,
- orderStatusOptions:data.data,
- });
- console.log(theArr);
- }.bind(this),
- }).always(function () {
- this.loadData(this.state.ispage);
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //编辑部门,保存
- edithandleSubmit(e){
- e.preventDefault();
- let offsetText;
- if(this.state.editOffset){
- if(this.state.editOffset>10||this.state.editOffset<0){
- message.warning('最低折扣请输入0到10之间的数字');
- return false;
- }else{
- offsetText=this.state.editOffset;
- }
- }
- this.props.form.validateFields((err, values) => {
- let theorgCodeUrl = [];
- if(this.state.orgCodeUrl.length) {
- let picArr = [];
- this.state.orgCodeUrl.map(function(item) {
- if ( item.response && item.response.data && item.response.data.length ){
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(",");
- };
- let thecompanyLogoUrl = [];
- if(this.state.companyLogoUrl.length) {
- let picArr = [];
- this.state.companyLogoUrl.map(function(item) {
- if ( item.response && item.response.data && item.response.data.length ){
- picArr.push(item.response.data);
- }
- });
- thecompanyLogoUrl = picArr.join(",");
- };
- if(!err) {
- this.setState({
- loading: true
- });
- let nameText=this.state.SuperArr
- // let num = 0
- // nameText.forEach((item,index) => {
- // if(item.cname == this.state.editCname) {
- // num = index
- // }
- // })
- // let superText=(this.state.editCname.length==1)?nameText[parseInt(this.state.editCname)].id:this.state.editCid;
- // let superText=nameText[parseInt(this.state.editCname)].id
- let arr = nameText.filter((v,k)=>v.cname === this.state.editCname || String(k) === this.state.editCname)
- let superText=arr.length ? arr[0].id:"";
- let isCountry=0;
- let pro='';
- let city='';
- let dis='';
- if(this.state.ProvinceCity==undefined||this.state.ProvinceCity.length==0){
- message.warning('请选择项目有效范围');
- this.setState({
- loading: false
- });
- return false;
- }else{
- switch(parseInt(this.state.ProvinceCity.length)){
- case 1:pro=this.state.ProvinceCity[0];break;
- case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
- case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
- }
- }
- if(pro==0){
- isCountry=1;
- pro='';
- }
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/ProjectSize/updateProject',
- data:{
- id:this.state.editId,//项目ID
- cid:superText,//项目业务品类
- bname:this.state.editName,//业务项目名称
- price:this.state.editPrice,//市场价
- firstPayment:this.state.firstPayment,//首付金额
- offset:offsetText,//最低折扣
- activityPrice:this.state.editActivityPrice,//活动价
- activityFlag:this.state.editActivityFlag,//活动生效标识
- memberPrice:this.state.editMemberPrice,//项目ID
- status:this.state.editStatus,//项目状态
- patentTransfer: this.state.typeStatus == 1 ? this.state.patentTransfer : undefined,
- type: this.state.typeStatus,//项目分类
- country:isCountry,//是否全国
- province:pro?pro:'',//省
- city:city?city:'',//市
- district:dis?dis:'',//区
- minLogo:theorgCodeUrl,
- maxLogo:thecompanyLogoUrl,
- introduce:this.state.editIntroduce,//项目介绍
- projectUrl:this.state.editProjectUrl,//项目地址
- valueEffect:this.state.editValueEffect,//项目价值及作用
- clientSize:this.state.editClientSize,//项目基本条件
- boutique:this.state.editBoutique,
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('保存成功!');
- this.edithandleCancel();
- this.selectSuperId();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- })
- },
- //规格列表整行点击
- formatTableRowClick(record, index){
- this.editformatClick();
- this.state.RowData = record;
- this.setState({
- selectedRowKeys:[],
- formatId:record.formatId,//规格名称
- formatPname:record.formatPname,//规格名称
- formatPrice:record.formatPrice,//市场价
- formatOffset:record.formatOffset,//最低折扣
- formatActivityPrice:record.formatActivityPrice,//活动价
- formatActivityFlag:record.formatActivityFlag,//活动生效标识
- formatMemberPrice:record.formatMemberPrice,//会员价
- formatStatus:record.formatStatus.toString(),//项目状态
- });
- },
- //项目列表整行点击
- tableRowClick(record, index) {
- this.selectSuperId();
- this.state.RowData = record;
- this.setState({
- callnub:'1',
- editvisible: true,
- selectedRowKeys:[],
- rowId:record.businessId,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context +"/api/admin/ProjectSize/orgProject" ,
- data: {
- id: record.id
- },
- success: function (data) {
- let theArr = [];
- let ProvinceCity=[];
- let thisdata = data.data;
- if (!data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- if(thisdata.country==1){
- ProvinceCity.push(0);
- }else{
- ProvinceCity.push(parseInt(thisdata.province));
- ProvinceCity.push(parseInt(thisdata.city));
- ProvinceCity.push(parseInt(thisdata.district));
- }
- let str = ""
- if(thisdata.type == 0) {
- str = "通用"
- }else if(thisdata.type == 1) {
- str = "专利"
- }else if(thisdata.type == 2) {
- str = "软著"
- }else if(thisdata.type == 3) {
- str = "审计"
- }else if(thisdata.type == 4) {
- str = "双软"
- }else if(thisdata.type == 5) {
- str = "高新"
- }else if(thisdata.type == 6) {
- str = "商标"
- }
- theArr.push({
- editId: thisdata.id,//每一条记录的ID
- editName:thisdata.bname,//项目名称
- editCname: thisdata.cname,//项目分类
- editCid: thisdata.cid,//项目分类
- editCountry: thisdata.country,//是否全国
- editProvince: thisdata.province,//省
- editCity: thisdata.city,//市
- editDistrict: thisdata.district,//区
- editPrice: thisdata.price,//市场价
- firstPayment:thisdata.firstPayment,//首付金额
- editActivityPrice: thisdata.activityPrice,//活动价
- editOffset: thisdata.offset,//最低折扣
- editMemberPrice: thisdata.memberPrice,//会员价
- editActivityFlag:thisdata.activityFlag,//活动生效标识
- editStatus:thisdata.status,//品类状态
- patentTransfer: thisdata.patentTransfer ? 1 : 0,
- typeStr: str,
- typeStatus: thisdata.type,
- editCreateId:thisdata.createName,//创建人
- editTime:thisdata.createTimeFormattedDate,//创建时间
- editIntroduce:thisdata.introduce,//服务内容
- editProjectUrl:thisdata.projectUrl,//项目地址
- editValueEffect:thisdata.valueEffect,//价值及作用
- editClientSize:thisdata.clientSize,//基本条件
- editBoutique:thisdata.boutique,//是否精品
- orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],
- cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],
- });
- };
- //0 正常 1专利 2软著 3审计 4双软 5高新 6商标
- let str = ""
- if(thisdata.type == 0) {
- str = "通用"
- }else if(thisdata.type == 1) {
- str = "专利"
- }else if(thisdata.type == 2) {
- str = "软著"
- }else if(thisdata.type == 3) {
- str = "审计"
- }else if(thisdata.type == 4) {
- str = "双软"
- }else if(thisdata.type == 5) {
- str = "高新"
- }else if(thisdata.type == 6) {
- str = "商标"
- }
- this.setState({
- editId: thisdata.id, //每一条记录的ID
- editName: thisdata.bname, //项目名称
- editCname: thisdata.cname, //项目分类
- editCid: thisdata.cid, //项目分类
- editCountry: thisdata.country, //是否全国
- editProvince: thisdata.province, //省
- editCity: thisdata.city, //市
- editDistrict: thisdata.district, //区
- editPrice: thisdata.price, //市场价
- firstPayment: thisdata.firstPayment,
- editActivityPrice: thisdata.activityPrice, //活动价
- editOffset: thisdata.offset, //最低折扣
- editMemberPrice: thisdata.memberPrice, //会员价
- editActivityFlag: thisdata.activityFlag, //活动生效标识
- editStatus: thisdata.status, //品类状态
- patentTransfer: thisdata.patentTransfer ? 1 : 0,
- typeStr: str,
- typeStatus: thisdata.type,
- editCreateId: thisdata.createName, //创建人
- editTime: thisdata.createTimeFormattedDate, //创建时间
- editIntroduce: thisdata.introduce, //服务内容
- editProjectUrl: thisdata.projectUrl, //项目地址
- editValueEffect: thisdata.valueEffect, //价值及作用
- editClientSize: thisdata.clientSize, //基本条件
- editBoutique: thisdata.boutique, //是否精品
- orgCodeUrl: thisdata.minLogo
- ? splitUrl(
- thisdata.minLogo,
- ",",
- globalConfig.avatarHost + "/upload"
- )
- : [],
- companyLogoUrl: thisdata.maxLogo
- ? splitUrl(
- thisdata.maxLogo,
- ",",
- globalConfig.avatarHost + "/upload"
- )
- : [],
- editDataSource: theArr,
- ProvinceCity: ProvinceCity
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //左侧图片地址
- getOrgCodeUrl(e) {
- this.setState({ orgCodeUrl: e });
- },
- //右侧图片地址
- getCompanyLogoUrl(e) {
- this.setState({ companyLogoUrl: e });
- },
- //编辑一个规格,保存
- editformathandleSubmit(e){
- e.preventDefault();
- let offsetText;
- if(this.state.formatOffset){
- if(this.state.formatOffset>10||this.state.formatOffset<0){
- message.warning('最低折扣请输入0到10之间的数字');
- return false;
- }else{
- offsetText=this.state.formatOffset;
- }
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/ProjectSize/orgProjectSize',
- data:{
- id:this.state.formatId,//项目ID
- pname:this.state.formatPname,//规格名称
- price:this.state.formatPrice,//市场价
- offset:offsetText,//最低折扣
- activityPrice:this.state.formatActivityPrice,//活动价
- activityFlag:this.state.formatActivityFlag,//活动生效标识
- memberPrice:this.state.formatMemberPrice,//会员价
- status:this.state.formatStatus,//项目状态
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('修改规格成功!');
- this.formatLoadData();
- this.editformathandleCancel();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- //新增一个规格,保存
- formathandleSubmit(e){
- e.preventDefault();
- let offsetText;
- if(this.state.formatOffset){
- if(this.state.formatOffset>10||this.state.formatOffset<0){
- message.warning('最低折扣请输入0到10之间的数字');
- return false;
- }else{
- offsetText=this.state.formatOffset;
- }
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/ProjectSize/addProjectSize',
- data:{
- pid:this.state.editId,//项目ID
- pname:this.state.formatPname,//规格名称
- price:this.state.formatPrice,//市场价
- offset:offsetText,//最低折扣
- activityPrice:this.state.formatActivityPrice,//活动价
- activityFlag:this.state.formatActivityFlag,//活动生效标识
- memberPrice:this.state.formatMemberPrice,//会员价
- status:this.state.formatStatus,//项目状态
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('新增规格成功!');
- this.formathandleCancel();
- this.formatLoadData();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- //新增一个项目,保存
- addhandleSubmit(e){
- e.preventDefault();
- if(!this.state.categoryName){
- message.warning('请输入项目名称');
- return false;
- }
- if(!this.state.addCid){
- message.warning('请选择项目品类');
- return false;
- }
- let isCountry=0;
- let pro='';
- let city='';
- let dis='';
- if(this.state.ProvinceCity==undefined){
- message.warning('请选择项目有效范围');
- return false;
- }else{
- switch(parseInt(this.state.ProvinceCity.length)){
- case 1:pro=this.state.ProvinceCity[0];break;
- case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;
- case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;
- }
- }
- if(pro==0){
- isCountry=1;
- pro='';
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- //上级组织字典
- let nameText=this.state.SuperArr;
- let superText=nameText[parseInt(this.state.addCid)].id;
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/ProjectSize/addProject',
- data:{
- bname:this.state.categoryName,//项目名称
- cid:superText,//品类类ID
- boutique:this.state.boutique?this.state.boutique:'0',
- country:isCountry,//是否全国
- province:pro,//省
- city:city,//市
- district:dis,//区
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('新增项目成功!');
- this.handleCancel();
- this.selectSuperId();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- //项目整行删除
- delectRow() {
- let deletedIds = '';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- deletedIds=rowItem.id;
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/deleteProject",
- data: {
- id:deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.selectSuperId();
- }.bind(this));
- },
- //项目整行停用
- blockRow() {
- let deletedIds = '';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- deletedIds=rowItem.id;
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/stopProject",
- data: {
- id:deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('该项目已成功停用!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.selectSuperId();
- }.bind(this));
- },
- //规格整行删除
- delectRowSize() {
- let deletedIds = '';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.formatId) {
- deletedIds=rowItem.formatId;
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/deleteProjectSize",
- data: {
- id: deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.formatLoadData();
- }.bind(this));
- },
- //规格整行停用
- blockRowSize() {
- let deletedIds = '';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.formatId) {
- deletedIds=rowItem.formatId;
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/ProjectSize/stopProjectSize",
- data: {
- id: deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('该项目已成功停用!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.formatLoadData();
- }.bind(this));
- },
- addClick() {
- this.state.RowData = {};
- this.setState({
- visible: true
- });
- this.addReset();
- },
- editClick(e) {
- this.state.RowData = {};
- this.setState({
- editvisible: true
- });
- },
- formatClick(e) {
- this.formatReset();
- this.state.RowData = {};
- this.setState({
- formatvisible: true
- });
- },
- editformatClick(e) {
- this.state.RowData = {};
- this.setState({
- editformatvisible: true
- });
- },
- handleCancel() {
- this.setState({ visible: false })
- },
- edithandleCancel(e) {
- this.setState({
- editvisible: false
- });
- },
- formathandleCancel(e) {
- this.setState({
- formatvisible: false
- });
- },
- editformathandleCancel(e) {
- this.setState({
- editformatvisible: false
- });
- },
- search() {
- this.loadData();
- },
- //搜索部分的清零
- reset() {
- this.state.bname = '';//项目名称清零
- this.state.cid = undefined;//品类名称清零
- this.state.ressSearch= undefined;//省市区清零
- this.state.activityFlag = undefined;//活动生效清零
- this.state.status = undefined;//项目状态清零
- this.state.type = undefined;//项目分类清零
- this.loadData();
- },
- //新增部分的清零
- addReset(){
- this.state.categoryName='';//项目名称清零
- this.state.ProvinceCity=undefined;
- this.state.addCid=undefined;
- this.state.boutique='';
- },
- //规格新增清零
- formatReset() {
- this.state.formatPname = '';//规格名称清零
- this.state.formatPrice = '';//市场价清零
- this.state.formatOffset = '';//最低折扣清零
- this.state.formatActivityPrice = '';//活动价清零
- this.state.formatMemberPrice = '';//会员价清零
- this.state.formatActivityFlag = undefined;//活动生效标识清零
- this.state.formatStatus= undefined;//项目状态清零
- this.formatLoadData();
- },
- //详情tab切换数据处理
- callback(e) {
- this.setState({
- callnub: e,
- })
- if(e == 1) {
- }
- if(e == 2) {
- this.formatLoadData();
- }
- },
- //更多搜索的显示与否
- searchSwitch() {
- this.setState({
- searchMore: !this.state.searchMore
- });
- },
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach(item => {
- arr.forEach(val => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr
- });
- },
- render() {
- const FormItem = Form.Item
- const rowSelection = {
- selectedRowKeys: this.state.selectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows.slice(-1),
- selectedRowKeys: selectedRowKeys.slice(-1)
- });
- }
- };
- const formItemLayout = {
- labelCol: { span: 8 },
- wrapperCol: { span: 14 },
- };
- const { getFieldDecorator } = this.props.form;
- const hasSelected = this.state.selectedRowKeys.length > 0;
- const { RangePicker } = DatePicker;
- return (
- <div className="user-content">
- <div className="content-title">
- <Tabs
- defaultActiveKey="1"
- className="test"
- >
- <TabPane tab="搜索" key="1">
- <div className="user-search">
- <Input
- placeholder="业务项目名称"
- style={{
- width: "150px",
- marginRight: "10px",
- marginBottom: "10px",
- marginLeft: 10,
- }}
- value={this.state.bname}
- onChange={(e) => {
- this.setState({ bname: e.target.value });
- }}
- />
- <Select
- placeholder="业务品类"
- style={{ width: "200px", marginRight: "10px" }}
- value={this.state.cid}
- onChange={(e) => {
- this.setState({ cid: e });
- }}
- notFoundContent="未获取到上级品类列表"
- >
- {this.state.contactsOption}
- </Select>
- <Button
- type="primary"
- onClick={this.search}
- style={{ marginRight: "10px" }}
- >
- 搜索
- </Button>
- <Button
- onClick={this.reset}
- style={{ marginRight: "10px" }}
- >
- 重置
- </Button>
- <Popconfirm
- title="是否删除?"
- onConfirm={this.delectRow}
- okText="是"
- cancelText="否"
- >
- <Button
- style={{
- background: "#ea0862",
- border: "none",
- color: "#fff",
- marginRight: "10px",
- marginLeft: "10px",
- }}
- disabled={!hasSelected}
- >
- 删除
- <Icon type="minus" />
- </Button>
- </Popconfirm>
- <Popconfirm
- title="是否停用?"
- onConfirm={this.blockRow}
- okText="是"
- cancelText="否"
- >
- <Button
- style={{
- background: "#ea0862",
- border: "none",
- color: "#fff",
- marginRight: "10px",
- marginLeft: "10px",
- display: "none",
- }}
- disabled={!hasSelected}
- >
- 停用
- <Icon type="minus" />
- </Button>
- </Popconfirm>
- <span style={{ marginRight: "20px" }}>
- 更多搜索{" "}
- <Switch
- defaultChecked={false}
- onChange={this.searchSwitch}
- />
- </span>
- <div
- className="search-more"
- style={
- this.state.searchMore
- ? { display: "none" }
- : { display: "block" }
- }
- >
- <span
- style={{
- marginRight: "10px",
- marginBottom: "10px",
- marginLeft: 10,
- }}
- >
- <Cascader
- options={provinceSelect()}
- value={this.state.ressSearch}
- placeholder="选择省份"
- onChange={(e, pre) => {
- this.setState({ ressSearch: e });
- }}
- />
- </span>
- <span
- style={{ marginRight: "10px", marginBottom: "10px" }}
- >
- <Cascader
- options={citySelect()}
- value={this.state.ressSearch}
- placeholder="选择城市"
- onChange={(e, pre) => {
- this.setState({ ressSearch: e });
- }}
- />
- </span>
- <span style={{ marginRight: "10px" }}>
- <Cascader
- options={areaSelect()}
- value={this.state.ressSearch}
- placeholder="选择地区"
- onChange={(e, pre) => {
- this.setState({ ressSearch: e });
- }}
- />
- </span>
- <Select
- placeholder="活动生效标识"
- style={{
- width: "150px",
- marginRight: "10px",
- marginBottom: "10px",
- }}
- value={this.state.activityFlag}
- onChange={(e) => {
- this.setState({ activityFlag: e });
- }}
- >
- <Select.Option value="0">有效</Select.Option>
- <Select.Option value="1">无效</Select.Option>
- </Select>
- <Select
- placeholder="项目状态"
- style={{ width: "150px", marginRight: "10px" }}
- value={this.state.status}
- onChange={(e) => {
- this.setState({ status: e });
- }}
- >
- <Select.Option value="0">正常</Select.Option>
- <Select.Option value="1">停用</Select.Option>
- </Select>
- <Select
- placeholder="项目分类"
- style={{ width: "150px", marginRight: "10px" }}
- value={this.state.type}
- onChange={(e) => {
- this.setState({ type: e });
- }}
- >
- <Select.Option value="0">通用</Select.Option>
- <Select.Option value="1">专利</Select.Option>
- <Select.Option value="2">软著</Select.Option>
- <Select.Option value="3">审计</Select.Option>
- <Select.Option value="4">双软</Select.Option>
- <Select.Option value="5">高新</Select.Option>
- <Select.Option value="6">商标</Select.Option>
- </Select>
- </div>
- </div>
- </TabPane>
- <TabPane tab="新增项目" key="2">
- <Button
- type="primary"
- className="addButton"
- onClick={this.addClick}
- style={{
- float: "left",
- marginRight: "50px",
- marginLeft: 10,
- marginBottom: 10,
- }}
- >
- 新增项目
- <Icon type="plus" />
- </Button>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="3">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- </Tabs>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table
- size="middle"
- columns={
- this.state.changeList
- ? this.state.changeList
- : this.state.columns
- }
- dataSource={this.state.dataSource}
- rowSelection={rowSelection}
- pagination={this.state.pagination}
- onRowClick={this.tableRowClick}
- current={this.state.aa}
- />
- </Spin>
- </div>
- <div className="patent-desc">
- <Modal
- maskClosable={false}
- visible={this.state.visible}
- onOk={this.checkPatentProcess}
- onCancel={this.handleCancel}
- width="400px"
- title="新增业务项目"
- footer=""
- className="admin-desc-content"
- >
- <Form
- horizontal
- onSubmit={this.addhandleSubmit}
- id="demand-form"
- >
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="业务项目名称"
- >
- <Input
- placeholder="业务项目名称"
- value={this.state.categoryName}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ categoryName: e.target.value });
- }}
- required="required"
- />
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="业务品类"
- >
- <Select
- placeholder="请选择业务品类"
- value={this.state.addCid}
- onChange={(e) => {
- this.setState({ addCid: e });
- }}
- notFoundContent="未获取到业务品类列表"
- style={{ width: "94%" }}
- required="required"
- >
- {this.state.contactsOption}
- </Select>
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="是否精品"
- >
- <Radio.Group
- value={this.state.boutique}
- onChange={(e) => {
- this.setState({ boutique: e.target.value });
- }}
- >
- <Radio value={1}>精品</Radio>
- <Radio value={0}>非精品</Radio>
- </Radio.Group>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="省"
- >
- <Cascader
- options={provinceSelect()}
- value={this.state.ProvinceCity}
- placeholder="选择省"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="省-市"
- >
- <Cascader
- options={citySelect()}
- value={this.state.ProvinceCity}
- placeholder="选择市"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="省-市-区"
- >
- <Cascader
- options={areaSelect()}
- value={this.state.ProvinceCity}
- placeholder="选择区"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button
- className="set-submit"
- type="primary"
- htmlType="submit"
- >
- 保存
- </Button>
- <Button
- className="set-submit"
- type="ghost"
- onClick={this.handleCancel}
- style={{ marginLeft: "15px" }}
- >
- 取消
- </Button>
- </FormItem>
- </Spin>
- </Form>
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal
- maskClosable={false}
- visible={this.state.formatvisible}
- onOk={this.checkPatentProcess}
- onCancel={this.formathandleCancel}
- width="400px"
- title="新增项目规格"
- footer=""
- className="admin-desc-content"
- >
- <Form
- horizontal
- onSubmit={this.formathandleSubmit}
- id="demand-form"
- >
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="项目名称"
- >
- <span style={{ width: "94%" }}>
- {this.state.editName}
- </span>
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="规格名称"
- >
- <Input
- placeholder="规格名称"
- value={this.state.formatPname}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatPname: e.target.value });
- }}
- required="required"
- />
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="市场价"
- >
- <Input
- placeholder="市场价"
- value={this.state.formatPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatPrice: e.target.value });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="活动价"
- >
- <Input
- placeholder="活动价"
- value={this.state.formatActivityPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- formatActivityPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="最低折扣"
- >
- <Input
- placeholder="最低折扣"
- value={this.state.formatOffset}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatOffset: e.target.value });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="会员价"
- >
- <Input
- placeholder="会员价"
- value={this.state.formatMemberPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- formatMemberPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="活动生效"
- >
- <Select
- placeholder="活动生效"
- value={this.state.formatActivityFlag}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatActivityFlag: e });
- }}
- >
- {gameState.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="项目状态"
- >
- <Select
- placeholder="项目状态"
- value={this.state.formatStatus}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatStatus: e });
- }}
- >
- {conditionOrganization.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button
- className="set-submit"
- type="primary"
- htmlType="submit"
- >
- 保存
- </Button>
- <Button
- className="set-submit"
- type="ghost"
- onClick={this.formathandleCancel}
- style={{ marginLeft: "15px" }}
- >
- 取消
- </Button>
- </FormItem>
- </Spin>
- </Form>
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal
- maskClosable={false}
- visible={this.state.editformatvisible}
- onOk={this.checkPatentProcess}
- onCancel={this.editformathandleCancel}
- width="400px"
- title="编辑项目规格"
- footer=""
- className="admin-desc-content"
- >
- <Form
- horizontal
- onSubmit={this.editformathandleSubmit}
- id="demand-form"
- >
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="规格名称"
- >
- <Input
- placeholder="规格名称"
- value={this.state.formatPname}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatPname: e.target.value });
- }}
- required="required"
- />
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="创建人"
- >
- <span style={{ width: "94%" }}>
- {this.state.editCreateId}
- </span>
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="市场价"
- >
- <Input
- placeholder="市场价"
- value={this.state.formatPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatPrice: e.target.value });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="活动价"
- >
- <Input
- placeholder="活动价"
- value={this.state.formatActivityPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- formatActivityPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="最低折扣"
- >
- <Input
- placeholder="最低折扣"
- value={this.state.formatOffset}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatOffset: e.target.value });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="会员价"
- >
- <Input
- placeholder="会员价"
- value={this.state.formatMemberPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- formatMemberPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="活动生效"
- >
- <Select
- placeholder="活动生效"
- value={this.state.formatActivityFlag}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatActivityFlag: e });
- }}
- >
- {gameState.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- <FormItem
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="项目状态"
- >
- <Select
- placeholder="项目状态"
- value={this.state.formatStatus}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ formatStatus: e });
- }}
- >
- {conditionOrganization.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button
- className="set-submit"
- type="primary"
- htmlType="submit"
- >
- 保存
- </Button>
- <Button
- className="set-submit"
- type="ghost"
- onClick={this.editformathandleCancel}
- style={{ marginLeft: "15px" }}
- >
- 取消
- </Button>
- </FormItem>
- </Spin>
- </Form>
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal
- maskClosable={false}
- className="customeDetails"
- title="业务项目"
- width="1000px"
- visible={this.state.editvisible}
- onOk={this.edithandleCancel}
- onCancel={this.edithandleCancel}
- footer=""
- >
- <Tabs
- defaultActiveKey="1"
- onChange={this.callback}
- activeKey={this.state.callnub}
- >
- <TabPane tab="业务项目基本资料" key="1">
- <Form
- horizontal
- onSubmit={this.edithandleSubmit}
- id="demand-form"
- >
- <Spin spinning={this.state.loading}>
- <div
- className="clearfix"
- style={{ paddingLeft: "60px" }}
- >
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="项目名称"
- >
- <Input
- placeholder="项目名称"
- value={this.state.editName}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ editName: e.target.value });
- }}
- required="required"
- />
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="业务品类"
- >
- <Select
- placeholder="请选择业务品类"
- value={this.state.editCname}
- onChange={(e) => {
- console.log(e)
- this.setState({ editCname: e });
- }}
- notFoundContent="未获取到业务品类列表"
- style={{ width: "94%" }}
- required="required"
- >
- {this.state.contactsOption}
- </Select>
- <span
- className="mandatory"
- style={{ color: "red", marginLeft: "5px" }}
- >
- *
- </span>
- </FormItem>
- </div>
- <div
- className="clearfix"
- style={{ paddingLeft: "60px" }}
- >
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="省"
- >
- <Cascader
- options={provinceSelect()}
- value={this.state.ProvinceCity}
- placeholder="选择省"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="省-市"
- >
- <Cascader
- options={citySelect()}
- value={this.state.ProvinceCity}
- placeholder="选择市"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="省-市-区"
- >
- <Cascader
- options={areaSelect()}
- value={this.state.ProvinceCity}
- placeholder="选择区"
- style={{ width: "94%" }}
- onChange={(e, pre) => {
- this.setState({ ProvinceCity: e });
- }}
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="是否精品"
- >
- <Radio.Group
- value={this.state.editBoutique}
- onChange={(e) => {
- this.setState({
- editBoutique: e.target.value,
- });
- }}
- >
- <Radio value={1}>精品</Radio>
- <Radio value={0}>非精品</Radio>
- </Radio.Group>
- </FormItem>
- </div>
- <div
- className="clearfix"
- style={{ paddingLeft: "60px" }}
- >
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="市场价"
- >
- <Input
- placeholder="市场价"
- value={this.state.editPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ editPrice: e.target.value });
- }}
- required="required"
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="首付金额"
- >
- <Input
- placeholder="市场价"
- value={this.state.firstPayment}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- firstPayment: e.target.value,
- });
- }}
- required="required"
- />
- <span style={{ color: "red", marginLeft: "5px" }}>
- *
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="活动价"
- >
- <Input
- placeholder="活动价"
- value={this.state.editActivityPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- editActivityPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="最低折扣"
- >
- <Input
- placeholder="最低折扣"
- value={this.state.editOffset}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ editOffset: e.target.value });
- }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="会员价"
- >
- <Input
- placeholder="会员价"
- value={this.state.editMemberPrice}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({
- editMemberPrice: e.target.value,
- });
- }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="活动生效"
- >
- <Select
- placeholder="活动生效"
- value={this.state.editActivityFlag}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ editActivityFlag: e });
- }}
- >
- {gameState.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="项目状态"
- >
- <Select
- placeholder="项目状态"
- value={this.state.editStatus}
- style={{ width: "94%" }}
- onChange={(e) => {
- this.setState({ editStatus: e });
- }}
- >
- {conditionOrganization.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="项目分类"
- >
- {/* 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
- <Select
- placeholder="项目分类"
- value={this.state.typeStr}
- style={{ width: "94%" }}
- onChange={(e) => {
- let str = "";
- if (e == 0) {
- str = "通用";
- } else if (e == 1) {
- str = "专利";
- } else if (e == 2) {
- str = "软著";
- } else if (e == 3) {
- str = "审计";
- } else if (e == 4) {
- str = "双软";
- } else if (e == 5) {
- str = "高新";
- } else if (e == 6) {
- str = "商标";
- }
- this.setState({
- typeStatus: e,
- typeStr: str,
- });
- }}
- >
- <Select.Option key={0}>通用</Select.Option>
- <Select.Option key={1}>专利</Select.Option>
- <Select.Option key={2}>软著</Select.Option>
- <Select.Option key={3}>审计</Select.Option>
- <Select.Option key={4}>双软</Select.Option>
- <Select.Option key={5}>高新</Select.Option>
- <Select.Option key={6}>商标</Select.Option>
- </Select>
- </FormItem>
- {this.state.typeStatus == 1 && <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label=""
- />}
- {this.state.typeStatus == 1 && <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="是否是转让"
- >
- <RadioGroup value={this.state.patentTransfer} onChange={(e)=>{
- this.setState({
- patentTransfer:e.target.value
- })
- }}>
- <Radio value={0}>否</Radio>
- <Radio value={1}>是</Radio>
- </RadioGroup>
- </FormItem>}
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="创建人"
- >
- <span style={{ width: "94%" }}>
- {this.state.editCreateId}
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="创建时间"
- >
- <span style={{ width: "94%" }}>
- {this.state.editTime}
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="项目地址"
- >
- <Input
- type="textarea"
- rows={1}
- placeholder="业务项目服务内容"
- value={this.state.editProjectUrl}
- onChange={(e) => {
- this.setState({
- editProjectUrl: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="业务项目服务内容"
- >
- <Input
- type="textarea"
- rows={4}
- placeholder="业务项目服务内容"
- value={this.state.editIntroduce}
- onChange={(e) => {
- this.setState({
- editIntroduce: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="业务项目价值及作用"
- >
- <Input
- type="textarea"
- rows={4}
- placeholder="业务项目价值及作用"
- value={this.state.editValueEffect}
- onChange={(e) => {
- this.setState({
- editValueEffect: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="业务项目客户基本条件"
- >
- <Input
- type="textarea"
- rows={4}
- placeholder="业务项目客户基本条件"
- value={this.state.editClientSize}
- onChange={(e) => {
- this.setState({
- editClientSize: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix pictures">
- <FormItem
- className="half-item"
- labelCol={{ span: 8 }}
- wrapperCol={{ span: 10 }}
- label="业务项目图标"
- >
- <PicturesWall
- domId={'businessProject1'}
- pictureSign="business_project_min_picture"
- fileList={this.getOrgCodeUrl}
- pictureUrl={this.state.orgCodeUrl}
- />
- <p>图片建议:图片要清晰。(35*35)</p>
- </FormItem>
- <FormItem
- className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 12 }}
- label="业务项目图标"
- >
- <PicturesWall
- domId={'businessProject2'}
- pictureSign="business_project_max_picture"
- fileList={this.getCompanyLogoUrl}
- pictureUrl={this.state.companyLogoUrl}
- />
- <p>图片建议:图片要清晰。(200*200)</p>
- </FormItem>
- </div>
- <Button
- className="set-submit"
- type="primary"
- htmlType="submit"
- style={{
- marginLeft: "190px",
- marginBottom: "20px",
- marginTop: "110px",
- }}
- >
- 保存
- </Button>
- <Button
- className="set-submit"
- type="ghost"
- onClick={this.edithandleCancel}
- style={{
- marginLeft: "100px",
- marginBottom: "20px",
- }}
- >
- 取消
- </Button>
- </Spin>
- </Form>
- </TabPane>
- <TabPane tab="业务项目规格" key="2">
- <div className="clearfix">
- <Popconfirm
- title="是否删除?"
- onConfirm={this.delectRowSize}
- okText="是"
- cancelText="否"
- >
- <Button
- style={{
- background: "#ea0862",
- border: "none",
- color: "#fff",
- marginRight: "10px",
- marginLeft: "10px",
- }}
- disabled={!hasSelected}
- >
- 删除
- <Icon type="minus" />
- </Button>
- </Popconfirm>
- <Popconfirm
- title="是否停用?"
- onConfirm={this.blockRowSize}
- okText="是"
- cancelText="否"
- >
- <Button
- style={{
- background: "#ea0862",
- border: "none",
- color: "#fff",
- marginRight: "10px",
- marginLeft: "10px",
- display: "none",
- }}
- disabled={!hasSelected}
- >
- 停用
- <Icon type="minus" />
- </Button>
- </Popconfirm>
- <Button
- className="ContactsList"
- type="primary"
- onClick={this.formatClick}
- style={{ float: "right", marginBottom: "10px" }}
- >
- 新增
- </Button>
- </div>
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Form
- horizontal
- id="demand-form"
- onSubmit={this.contactSave}
- >
- <Table
- size="middle"
- pagination={this.state.formatPagination}
- columns={this.state.ContactsLists}
- dataSource={this.state.formatDataSource}
- rowSelection={rowSelection}
- onRowClick={this.formatTableRowClick}
- />
- </Form>
- </Spin>
- </div>
- </TabPane>
- </Tabs>
- </Modal>
- </div>
- </div>
- </div>
- );
- }
- }));
- export default BusinessProject;
|