1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135 |
- <template>
- <div class="two-child">
- <Modal title="创建大会员订单" v-model="bShow" class-name="order-model member-model" :mask-closable="false"
- @on-visible-change="visibleChange">
- <Form ref="member" :model="member" :label-width="121">
- <FormItem label="基本信息" class="formTitle">
- </FormItem>
- <div class="flex-endbox">
- <FormItem label="合同性质" required>
- <!-- 订单状态为“已完成”,不支持修改。 -->
- <RadioGroup v-model="member.contract_nature" @on-change="contractChange">
- <Radio label="1" style="margin-right:30px">新签合同</Radio>
- <Radio label="2">续签合同</Radio>
- </RadioGroup>
- </FormItem>
- <FormItem label="购买主体" required>
- <RadioGroup v-model="member.buySubject" @on-change="radiosChange">
- <Radio label="1" style="margin-right:30px">个人(如有子账号,共享额度)</Radio>
- <Radio label="2">企业</Radio>
- </RadioGroup>
- </FormItem>
- </div>
- <!-- <FormItem label="订单时间" required>
- <date-sigle ref="sigleRef2" :dateType="'datetime'" :placeholderd="'请选择订单时间'" @startDate="orderDate" :overTime="0"></date-sigle>
- </FormItem> -->
- <FormItem label="公司名称" :required="member.buySubject == '2'">
- <Input v-model.trim="member.companyName" type="text" :maxlength="40" placeholder="请输入公司名称"></Input>
- </FormItem>
- <div class="flex-endbox">
- <FormItem label="开通权益手机号" required :class="{ 'big-stas': colr }">
- <Input class="ipt-inpt" v-model="member.phone" type="text" @on-change="pheHandler"
- @on-keyup="keyHandler" :maxlength="11" placeholder="请输入手机号" :readonly="pReadon"></Input>
- <Checkbox v-model="noPhone" @on-change="noPchange">无手机号</Checkbox>
- <Spin fix class="order-spin" v-if="spinShow">
- <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
- </Spin>
- <p v-html="colr" style="color:#e13d13"></p>
- </FormItem>
- <FormItem label="产品类型">
- <Select v-model="member.products" placeholder="请选择产品类型(暂不支持数据导出)" @on-change="proChange"
- :disabled="proDis">
- <!-- <Option v-for="item in bigPro" :value="item.v" :key="item.v">{{ item.n }}</Option> -->
- <Option value="1">大会员</Option>
- <Option value="2" :disabled="subaccountDis">大会员子账号</Option>
- <Option value="3" :disabled="member.buySubject != '1' || bigStas == 0">大会员补充包</Option>
- </Select>
- </FormItem>
- </div>
- <FormItem label="关联订单" required v-show="member.products == '2' && contactOrderList.length > 0">
- <div class="contactOrderTable">
- <Table border ref="selection" :columns="contactOrderColumns" :data="contactOrderList"></Table>
- </div>
- </FormItem>
- <!-- 选择大会员才展示 -->
- <FormItem label="会员套餐" v-if="creAuth == '1'" required>
- <RadioGroup v-model="member.level" @on-change="radiosChangelevel">
- <Radio :label="JSON.stringify(comVal)" :disabled="vipDis">自定义</Radio>
- <Radio :label="JSON.stringify(item)" v-for="(item, index) in levelDown"
- :value="JSON.stringify(item)" :key="index" :disabled="vipDis || downDis">{{ item.s_name }}
- </Radio>
- </RadioGroup>
- </FormItem>
- <!-- <FormItem label="会员套餐" v-if="creAuth == '1'" required>
- <Select v-model="member.level" placeholder="请选择会员套餐" @on-change="leChange" @on-select="leSelect">
- <Option :value="JSON.stringify(comVal)">自定义</Option>
- <Option v-for="(item,index) in levelDown" :value="JSON.stringify(item)" :key="index" :disabled="downDis">{{ item.s_name }}</Option>
- </Select>
- </FormItem> -->
- <!-- 仅大会员商机版2.0 支持购买单省版-->
- <!-- <FormItem label="规格" v-if="combo_id.id==6">
- <Radio v-model="member.single" ref="single" style="marginRight:30px" @click.native.prevent="areaCountClick(1)" >单省版</Radio>
- </FormItem> -->
- <!-- <FormItem label="计费模式" required>
- <Select v-model="member.billingMode" placeholder="请选择计费模式" @on-change="moneyChange">
- <Option v-for="item in chargeStatus" :value="item.v" :key="item.v">{{ item.n }}</Option>
- </Select>
- </FormItem> -->
- <!-- 大会员、子账号 -->
- <div v-if="nums !== '' && creAuth">
- <!-- nums == '0' 自定义 -->
- <!-- <FormItem required v-if="creAuth == '1' && nums == '0'">
- <RadioGroup v-model="member.createType" class="form-radio1" @on-change="serChange">
- <Radio label="1" :disabled="radioDis1">新建服务</Radio>
- <Radio label="2" :disabled="radioDis2">补充服务</Radio>
- <Radio label="3" :disabled="radioDis3">延长服务</Radio>
- </RadioGroup>
- </FormItem>
- <FormItem class="table-order1 table-order2" v-if="creAuth == '1' && nums == '0'">
- <Table class="sel-table" border ref="selection" :columns="columns3" :data="serData"
- @on-select="curChange" @on-select-cancel="canChange" @on-selection-change="selChage"
- @on-select-all="allChange" @on-select-all-cancel="allCancel" :summary-method="handleSummary"
- show-summary></Table>
- </FormItem> -->
- <FormItem required v-if="creAuth == '1' && nums == '0'" label="服务列表">
- <div class="servebox" v-for="(item, index) in newServedata" :key="index">
- <div class="one-group" v-show="!item.hide">
- <Checkbox v-model="item.choose" :disabled="item.disabled"
- @on-change="chooseChange($event, 'one', index)"></Checkbox><span
- class="serve-one">{{ item.ColumnName }}:</span>
- </div>
- <div class="serve-content">
- <div class="serve-two" v-show="!two.hide" v-for="(two, two_index) in item.lists"
- :key="two_index">
- <span v-if="two.id == 1">{{ two.name }}<span
- v-if="member.buySubject == '2'">+企业管理</span></span>
- <div class="servechildrenbox" v-else>
- <Checkbox v-model="two.choose" :disabled="two.disabled"
- @on-change="chooseChange($event, 'two', index)"></Checkbox>
- <span style="margin-right: 10px;">{{ two.name }}</span>
- <Select v-model="two.id" :disabled="two.disabled || !two.choose"
- placeholder="请选择产品" style="width:120px;margin-right:10px;"
- v-if="two.list.length > 1" @on-change="chooseChange($event, 'select')">
- <Option v-for="(three, three_index) in two.list" :key="three_index"
- :value="three.id" v-show="!three.hide" :disabled="three.disabled">{{ three.s_count_year + three.dw
- }}</Option>
- </Select>
- </div>
- </div>
- </div>
- </div>
- <div v-if="buyserveName"><span style="color: #e13d13;">注:服务到期时间:{{ serveEndtime }},</span><span
- style="font-weight:bold">该客户已购买:</span>{{ buyserveName }}</div>
- </FormItem>
- <FormItem label="购买数量" required v-if="!(creAuth == '3' && this.member.buySubject == '1')">
- <Input v-model="member.buyCount" type="tel" maxlength="4" @on-keyup="buyHandler"
- @on-change="payChange" placeholder="请填写购买数量"
- :disabled="vipDis && this.member.products != 2"></Input>
- <span v-if="member.products == '1'">(注:主账号+子账号数量之和)</span>
- </FormItem>
- <!-- <div v-if="creAuth !== '3'">
- <FormItem label="付费子账号数量">
- <Input
- v-model="member.paySub"
- type="tel"
- placeholder="请填写付费子账号数量"
- maxlength="4"
- @on-keyup="payHandler"
- @on-change="payChange"
- @on-blur="payBlur"
- ></Input>
- </FormItem>
- <FormItem label="免费子账号数量">
- <Input v-model="member.freeSub" type="tel" maxlength="4" @on-keyup="freeHandler" placeholder="请填写免费子账号数量"></Input>
- </FormItem>
- </div> -->
- <!-- 补充包 -->
- <div v-if="creAuth !== '2'">
- <FormItem class="table-order1" v-show="creAuth == '3'">
- <Table class="prei-table" border ref="selection" :columns="columns1" :data="pacData">
- </Table>
- </FormItem>
- <FormItem class="table-order1" v-show="creAuth == '3'">
- <Table class="prei-table" border ref="selection" :columns="columns2" :data="datas2"></Table>
- </FormItem>
- <!-- <div class="flex-endbox"> -->
- <FormItem label="有效周期" required v-if="creAuth == '1' && (repair != '2')">
- <div class="you-xiao" style="display:flex">
- <Input v-model="member.payCycle" type="tel" :maxlength="max_length"
- @on-keyup="cycleHandler" @on-change="peChange" :placeholder="placed"
- style="width:376px"></Input>
- <Select v-model="member.cycleType" placeholder="请选择单位" @on-change="unitChange"
- style="width:110px;margin-left:10px">
- <Option v-for="item in unitOptions" :value="item.v" :key="item.v">{{ item.n }}
- </Option>
- </Select>
- <Checkbox style="margin-left: 10px;"
- v-if="returnMyReceivable === false && ((member.buySubject == '1' && member.createType == '1') || member.buySubject == '2')"
- v-model="member.paybackOpenServer">全额回款当日自动开通</Checkbox>
- </div>
- <!-- 个人 延长服务 -->
- <span style="color: #e13d13;"
- v-if="member.buySubject == '1' && member.createType == '3'">全额回款后将自动续费开通权益,如若回款时间晚于原服务到期时间,则开始日期为回款日期。</span>
- </FormItem>
- <FormItem label="开始日期" v-if="creAuth == '1' && repair == '1' && showOrderStatus">
- <date-sigle ref="sigleRef1" :dateType="'date'" :placeholderd="'请选择开始日期'"
- @startDate="startDate" :disabledDateCallback="disabledDateForVIPCallback"
- :dateDis="!showOrderStatus || this.pReadon" class="no-pass"
- :beginDis="noPass"></date-sigle>
- <Checkbox v-model="noPass" @on-change="noTchange"
- :disabled="!showOrderStatus || this.pReadon">暂不开通</Checkbox>
- <Checkbox
- v-if="returnMyReceivable === true && ((member.buySubject == '1' && member.createType == '1') || member.buySubject == '2')"
- v-model="member.paybackOpenServer" :disabled="!noPass">全额回款当日自动开通</Checkbox>
- </FormItem>
- <!-- </div> -->
- </div>
- <div class="flex-endbox">
- <FormItem label="合同金额" required class="d-felx">
- <Input v-model="member.payMoney" type="text" @on-keyup="keyupSale('1')" :maxlength="9"
- placeholder="请填写合同金额" :disabled="shiDis"></Input>
- <span class="money-unit">元</span>
- </FormItem>
- <!-- <div v-if="creAuth == '1'">
- <FormItem label="大会员订单金额" :label-width="194">
- <span class="sum-jin">{{tipFunc(member.bigMoney)}}</span>
- </FormItem>
- <FormItem label="大会员子账号订单金额" :label-width="194">
- <span class="sum-jin">{{tipFunc(member.subMoney)}}</span>
- </FormItem>
- <FormItem label="大会员补充包订单金额" :label-width="194">
- <span class="sum-jin">{{tipFunc(member.supplyMoney)}}</span>
- </FormItem>
- </div> -->
- <!-- 中标企业预测 -->
- <FormItem label="标准售价" :label-width="creAuth !== '1' ? 110 : 194" v-if="creAuth !== '1'">
- <span class="sum-jin">{{ tipFunc(member.orderMoney) }}元</span>
- <span>(折扣率:<span style="color: #36a3f7">{{ member.payMoney && member.orderMoney ?
- ((member.payMoney / member.orderMoney) * 100).toFixed(2)
- + '%' : '--' }}</span>)</span>
- </FormItem>
- <FormItem label="标准售价" :label-width="194" v-else>
- <span class="sum-jin">{{ tipFunc(member.orderMoney) }}元</span>
- <span>(折扣率:<span style="color: #36a3f7">{{ member.payMoney && member.orderMoney ?
- ((member.payMoney / member.orderMoney) * 100).toFixed(2)
- + '%' : '--' }}</span>)</span>
- </FormItem>
- <!-- <FormItem label="大会员应付金额" :label-width="121" required v-show="creAuth == '1'">
- <Input
- v-model="member.bigPayMoney"
- type="text"
- @on-keyup="keyupSale('2')"
- :maxlength="9"
- placeholder="请输入大会员应付金额"
- :disabled="bigDis"
- ></Input>
- </FormItem>
- <FormItem label="子账号应付金额" required v-show="creAuth == '1'">
- <Input
- v-model="member.subPayMoney"
- type="text"
- @on-keyup="keyupSale('3')"
- :maxlength="9"
- placeholder="请输入子账号应付金额"
- :disabled="subDis"
- ></Input>
- </FormItem>
- <FormItem label="补充包应付金额" required v-show="creAuth == '1'">
- <Input
- v-model="member.supplyPayMoney"
- type="text"
- @on-keyup="keyupSale('4')"
- :maxlength="9"
- placeholder="请输入补充包应付金额"
- :disabled="supplyDis"
- ></Input>
- </FormItem> -->
- </div>
- <div class="flex-endbox">
- <FormItem label="佣金金额" class="d-felx" required>
- <Input v-model="member.commission" type="text" @on-keyup="keyupSale('5')" :maxlength="9"
- placeholder="请输入佣金金额"></Input>
- <span class="money-unit">元</span>
- </FormItem>
- <FormItem label="手续费" class="d-felx" required>
- <Input v-model="member.proceduresMoney" type="text" @on-keyup="keyupSale('6')"
- :maxlength="9" placeholder="请输入手续费"></Input>
- <span class="money-unit">元</span>
- </FormItem>
- </div>
- <FormItem label="协议信息" class="formTitle">
- </FormItem>
- <div class="flex-endbox">
- <FormItem label="协议状态" required>
- <RadioGroup v-model="member.agreementStatus" @on-change="agreementStatusChange">
- <Radio :label="item.v" v-for="(item, index) in agreeStatus" :value="item.v"
- :key="index">{{
- item.n }}</Radio>
- </RadioGroup>
- </FormItem>
- <FormItem label="签约主体" required>
- <v-cascader ref="casRef2" :initVal="'h01'" placeholderType="签约主体" reqType="签约主体"
- @levelChange="paybackChange" v-if="bShow"></v-cascader>
- </FormItem>
- </div>
- <div class="flex-endbox">
- <FormItem label="协议签订时间" v-show="member.agreementStatus == '1'">
- <date-sigle ref="sigleRef" :dateType="'date'" :placeholderd="'请选择协议签订时间'"
- @startDate="agreeDate" :overTime="0"></date-sigle>
- </FormItem>
- <FormItem label="协议编号" v-show="member.agreementStatus == '1' && !showOnlineContractForm">
- <Input v-model="member.agreementNumber" type="text" placeholder="请输入协议编号"></Input>
- </FormItem>
- </div>
- <!-- v-show="!showOnlineContractForm || showXieYi" -->
- <div class="showmore">
- <div class="flex-endbox">
- <FormItem label="协议归档状态" v-show="member.agreementStatus == '1'">
- <RadioGroup v-model="member.contract_archive_status">
- <Radio label="0">未归档</Radio>
- <Radio label="1">已归档</Radio>
- </RadioGroup>
- </FormItem>
- <FormItem label="归档时间"
- v-show="member.agreementStatus == '1' && member.contract_archive_status == '1'">
- <date-sigle ref="sigleRef4" :dateType="'date'" :placeholderd="'请选择归档时间'"
- @startDate="guiDate" :overTime="0"></date-sigle>
- </FormItem>
- </div>
- <div class="flex-endbox">
- <FormItem label="归档份数"
- v-show="member.agreementStatus == '1' && member.contract_archive_status == '1'">
- <Input v-model="member.contract_archive_num" type="tel" maxlength="4"
- @on-keyup="payHandler" placeholder="请输入归档份数"></Input>
- </FormItem>
- <FormItem label="归档协议" class="chuan-pay" v-show="member.contract_archive_status == '1'">
- <b-upload ref="uploadRef" @fileData="contractFile" :placeholdered="'请上传归档协议'"
- :accepted="'.doc,.pdf,.docx,.rar,.zip,.jpg,.png,.jpeg'"
- :formated="['doc', 'pdf', 'docx', 'rar', 'zip', 'jpg', 'png', 'jpeg']"
- :multipled="false" @onRemove="onRemoveUpload"></b-upload>
- </FormItem>
- </div>
- </div>
- <OnlineContractForm ref="onlineContractFormRef" v-if="showOnlineContractForm"
- :showMore="showXieYi && showOnlineContractForm" :buySubject="member.buySubject"
- :orderEntName="member.companyName" :e_contract_type.sync="member.e_contract_type"
- :e_contract_userA_type.sync="member.e_contract_userA_type"
- :e_contract_userA_name.sync="member.e_contract_userA_name"
- :e_contract_userA_contacts_name.sync="member.e_contract_userA_contacts_name"
- :e_contract_userA_contacts_tel.sync="member.e_contract_userA_contacts_tel"
- :e_contract_userA_contacts_address.sync="member.e_contract_userA_contacts_address"
- :e_contract_userB_contacts_name.sync="member.e_contract_userB_contacts_name"
- :e_contract_remark.sync="member.e_contract_remark" />
- <div style="display: flex;justify-content: center;" v-show="!showXieYi && showOnlineContractForm">
- <div @click="showXieYi = !showXieYi" style="color: #36a3f7;cursor: pointer; font-size: 14px;">
- <span>更多信息</span>
- <i class="el-icon-arrow-down"></i>
- </div>
- </div>
- <FormItem label="回款计划" class="formTitle"></FormItem>
- <FormItem label="回款次数" required>
- <Input v-model.trim="member.paybackNum" type="text" @on-keyup="keyupformat('paybackNum')"
- style="width: 80px"></Input><span style="margin-left: 5px;">次</span>
- </FormItem>
- <!-- 回款列表 -->
- <FormItem label="" v-show="member.paybackNum > 1">
- <Table border :columns="paybackTable" :data="paybackTableData">
- <template slot-scope="{ row }" slot="code">
- <strong>{{ row.code }}</strong>
- </template>
- <template slot-scope="{ row, index }" slot="time">
- <strong v-if="row.code == '合计'">-</strong>
- <date-sigle :ref="'paybackTime' + index" :dateType="'date'"
- :dataV="paybackTableData[index].time" :placeholderd="'请选择'"
- @startDate="paybackTableChange(row, index, 'time', $event)" :overTime="0"
- v-else></date-sigle>
- </template>
- <template slot-scope="{ row, index }" slot="money">
- <strong v-if="row.code == '合计'">{{ member.payMoney || '-' }}</strong>
- <Input v-model="paybackTableData[index].money"
- @on-keyup="paybackTableChange(row, index, 'money')" type="number"
- @mousewheel.native.prevent @DOMMouseScroll.native.prevent placeholder="请输入"
- :disabled="index + 1 == member.paybackNum" v-else></Input>
- </template>
- </Table>
- </FormItem>
- <!-- 回款工作日 -->
- <FormItem label=" " class="d-felx" :label-width="55" required v-show="member.paybackNum == 1">
- <span v-if="member.agreementStatus == '1'">自协议签订之日起</span>
- <span v-else>自订单创建之日起</span>
- <Input v-model.trim="member.paybackWorkDayNum" type="text"
- @on-keyup="keyupformat('paybackWorkDayNum')"
- style="width: 80px;margin-left:10px;margin-right: 10px;"></Input>
- <span> 个工作日回款,预计回款时间:<span style="color: #36a3f7">{{ member.paybackExpectDate ||
- '--' }}</span></span>
- </FormItem>
- <FormItem label="业绩归属" class="formTitle">
- </FormItem>
- <div class="flex-endbox">
- <FormItem label="业绩归属部门" required>
- <!-- <Cascader v-model="member.saleCodeModel" :data="saleDep" trigger="hover" @on-visible-change="saleDepClick" @on-change="saleDepChange"></Cascader> -->
- <cascaderMulti class="truecascader" v-model="member.saleCodeModel" :data="saleDep" multiple
- @on-change="saleDepChange"></cascaderMulti>
- </FormItem>
- <FormItem label="业绩统计时间">
- <date-sigle ref="sigleRef3" :dateType="'date'" :dataV="member.sale_time"
- :placeholderd="'请选择业绩统计时间'" @startDate="saleDate" :overTime="0"></date-sigle>
- </FormItem>
- </div>
- <FormItem label="销售人员">
- <sale-select ref="saleRef" @salePerson="salePerson"
- :setDefaultPerson="this.$store.getters.getAdminUser.username"></sale-select>
- </FormItem>
- <FormItem class="table-order1" v-show="saleTableData.length > 2">
- <Table border :columns="saleTable" :data="saleTableData">
- <template slot-scope="{ row }" slot="name">
- <strong>{{ row.name }}</strong>
- </template>
- <template slot-scope="{ row, index }" slot="money">
- <Input v-model="saleTableData[index].money" @on-keyup="saleTableChange(index)"
- type="number"></Input>
- </template>
- </Table>
- </FormItem>
- <FormItem label="销售渠道" required>
- <v-cascader ref="casRef" type="1" quType="1" placeholderType="请选择销售渠道" reqType="销售渠道"
- @levelChange="salesChange"></v-cascader>
- </FormItem>
- <FormItem label="其他信息" class="formTitle">
- </FormItem>
- <div class="flex-endbox">
- <FormItem label="约定支付方式" required>
- <Select v-model="member.payType" placeholder="请选择约定支付方式">
- <Option v-for="item in payTypes" :value="item.v" :key="item.v">{{ item.n }}</Option>
- </Select>
- </FormItem>
- <FormItem label="下单渠道" required>
- <v-cascader ref="casRef1" :initVal="'d01'" placeholderType="请选择下单渠道" reqType="下单渠道"
- @levelChange="channelChange" v-if="bShow"></v-cascader>
- </FormItem>
- </div>
- <!-- 修改为默认展示 -->
- <div v-show="!showOrderOther">
- <FormItem label="订单备注">
- <Input v-model="member.remark" type="text" :maxlength="40" placeholder="请输入订单备注"></Input>
- </FormItem>
- <FormItem label="订单状态" :required="showOrderStatus" v-if="showOrderStatus">
- <Select v-model="member.order_status" placeholder="请选择订单状态">
- <Option value="0">未完成</Option>
- <Option value="1">已完成</Option>
- </Select>
- </FormItem>
- </div>
- <!-- <div style="display: flex;justify-content: center;" v-show="!showOrderOther">
- <div @click="showOrderOther = !showOrderOther" style="color: #36a3f7;cursor: pointer; font-size: 14px;">
- <span>更多信息</span>
- <i class="el-icon-arrow-down"></i>
- </div>
- </div> -->
- </div>
- </Form>
- <div slot="footer">
- <Button type="primary" size="large" @click="ordConfirm({ save: '1' })" :disabled="isDisable">提交</Button>
- <Button type="primary" class="button-grey" size="large" @click="ordConfirm({ save: '2' })"
- :disabled="isDisable" v-if="!showOrderStatus">暂存</Button>
- <Button size="large" @click="ordCancel()">取消</Button>
- </div>
- </Modal>
- </div>
- </template>
- <script>
- import { dateFormatter } from '@/assets/js/date'
- import dateSigle from '@/components/dateSigle'
- import vCascader from '@/components/cascader'
- import bUpload from '@/components/uploadFile.vue'
- import OnlineContractForm from '@/components/OnlineContractForm'
- import saleSelect from './salesSelect.vue'
- import { getDateSub } from '@/assets/js/date'
- import { debounce } from '@/helper.js'
- import serveNames from '@/assets/js/serveName.js'
- export default {
- name: 'CreateBigOrderModal',
- components: {
- OnlineContractForm,
- vCascader,
- dateSigle,
- bUpload,
- saleSelect
- },
- props: {
- showOrderStatus: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- subaccountDis() {
- if (this.member.buySubject == '1' && (this.bigStas == 1 || this.bigStas == 2)) {
- return false
- } else if (this.member.buySubject == '2' && this.contactOrderList.length > 0) {
- return false
- } else {
- return true
- }
- },
- proDis: function () {
- if (this.member.phone == '') {
- return true
- } else {
- if (this.noPhone) {
- return false
- } else {
- if (!(/^1[03456789]\d{9}$/.test(this.member.phone))) {
- return true
- } else {
- return false
- }
- }
- }
- },
- vipDis() {
- if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 个人续签合同
- return true
- } else if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) { // 有大会员权限
- // this.member.level = JSON.stringify(this.comVal)
- return true
- } else if (!this.member.buySubject || !this.member.phone) {
- return true
- } else {
- return false
- }
- },
- showOnlineContractForm() {
- const paybackCompanyCheck = this.member.paybackCompany == 'h01' // 签约主体为:北京剑鱼信息技术有限公司/h01
- const contractStatusCheck = this.member.agreementStatus == '1' // 协议状态为签协议
- // 展示条件:
- // 1. 产品类型是超级订阅(且付费类型为“购买”、“续费”)才展示。
- // 2. 产品类型是“大会员”且会员套餐为“商机版2.0”、“专家版2.0”(且服务类型为“新购服务”、“延长服务”)
- // memberLevelMap.id:6'商机版2.0'、7'专家版2.0'
- const memberLevel = this.member.level
- if (!memberLevel || memberLevel == 'undefined') return false
- const memberLevelMap = JSON.parse(memberLevel)
- // console.log(memberLevelMap)
- // createType '1'新建 '2'补充 '3'延期
- const createType = this.nums == 0 ? this.member.createType : '1'
- // 这里的单省版 是商机版2.0单省版
- const bigmemberCheck = (memberLevelMap.id == 6 || memberLevelMap.id == 7 || memberLevelMap.s_name.indexOf('单省版') > -1) && (createType == '1' || createType == '3')
- const productTypeCheck = bigmemberCheck
- return paybackCompanyCheck && contractStatusCheck && productTypeCheck
- },
- vipval() { //收集多个参数变动 合同性质 购买主体 是否会员 产品
- return this.member.contract_nature + this.member.buySubject + this.bigStas + this.member.products + this.member.phone
- },
- priceChange() {
- return this.member.level + this.member.payCycle + this.member.cycleType + this.member.buySubject + String(this.form_serve.ids) + this.member.buyCount + this.member.phone + this.member.beginTime + this.member.createType
- },
- returnMyReceivable: function () {
- let rout = this.$route
- if (rout.path && rout.path.includes('myorderList')) {// 我的订单
- return false
- } else {
- return true
- }
- },
- },
- watch: {
- vipval() { // 监听变化多参数变动
- },
- priceChange() {
- this.$nextTick(() => {
- try {
- this.orderPriceCount()
- } catch (e) {
- // console.log(e)
- }
- })
- }
- },
- created() {
- },
- mounted() {
- // this.getNewservedata()
- },
- methods: {
- contractChange() {
- this.createdTypeChange()
- },
- orderPriceCount() { // 获取价格
- let obj = {}
- if (this.member.products == '1') {
- obj = {
- productType: '大会员',
- createType: this.member.buySubject == '2' ? '1' : this.member.createType || '',
- level: JSON.parse(this.member.level).id || 5,
- payCycle: this.member.payCycle || '',
- cycleType: this.member.cycleType == '0' ? 2 : 3 || '',
- startTime: this.member.createType == 2 || this.member.createType == 3 ? '' : this.member.beginTime || '',
- products: this.member.products + '', // 产品类型
- comboId: JSON.parse(this.member.level).id || 5,
- buySubject: this.member.buySubject,
- buyCount: this.member.buyCount,
- phone: this.member.phone
- }
- if (this.member.level && JSON.parse(this.member.level).i_ispreinstall == 0) {
- this.getserveIdAndname()
- obj.serversId = String(this.form_serve.ids)
- obj.level = 5
- obj.comboId = 5
- }
- }
- if (this.member.products == '3') { // 补充包
- obj = {
- products: this.member.products + '', // 产品类型
- productType: '大会员',
- buyCount: this.member.buyCount,
- phone: this.member.phone,
- buySubject: this.member.buySubject,
- createType: 1
- }
- let serveData = []
- this.datas2.forEach(v => {
- serveData.push({
- id: v.id,
- name: v.name,
- price: v.price,
- count: v.count * v.s_pkcount
- })
- })
- obj.serversArr = serveData
- }
- if (this.member.products == '2') { //子账号
- obj = {
- productType: '大会员',
- products: this.member.products + '', // 产品类型
- buyCount: this.member.buyCount,
- phone: this.member.phone,
- buySubject: this.member.buySubject,
- createType: 1
- }
- if (this.member.buySubject == '2') {
- obj.orderCode = this.member.contactOrderCode
- }
- }
- if (this.member.products == '1' && obj.phone && obj.buyCount && obj.buySubject) {
- if (this.member.createType == '1' && (!obj.payCycle || !obj.cycleType)) {
- return
- }
- this.getpriceAjax(obj)
- } else if (this.member.products == '2' && obj.phone && obj.buyCount && obj.buySubject) {
- if (this.member.buySubject == '2' && !obj.orderCode) {
- this.$Notice.warning({ title: '请选择关联订单' })
- return
- }
- this.getpriceAjax(obj)
- } else if (this.member.products == '3' && obj.phone && obj.buySubject && obj.serversArr && obj.serversArr.length > 0) {
- this.getpriceAjax(obj)
- }
- },
- createdTypeChange() { // 套餐自动勾选逻辑
- this.buyserveName = ''
- this.serveEndtime = ''
- try {
- if (!this.member.phone || !this.member.buySubject || !this.member.contract_nature) {
- return
- }
- this.newServedata = JSON.parse(JSON.stringify(this.initnewServedata)) // 初始化服务列表数据
- if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) { // 合同性质为“新签合同”,且开通权益手机号已有大会员权限,则会员套餐默认为“自定义版”,不支持修改。
- this.radiosChangelevel(JSON.stringify(this.comVal)) // 补充 勾选自定义
- this.member.level = JSON.stringify(this.comVal)
- if (this.nums == 0) {
- clearTimeout(timer)
- let timer = setTimeout(() => {
- if (this.member.phone) {
- this.currentServer(this.member.phone, (res) => {
- let ids = res.data.list
- this.currentServerid = res.data.list
- let time = dateFormatter(res.data.serviceEndTime, 'yyyy-MM-dd')
- this.echoServe(ids, 'hide', ids)
- this.Purchasedservices(time)
- this.getserveIdAndname()
- })
- }
- }, 200);
- }
- }
- if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 个人续签合同 延长
- if (this.i_member_status) {
- this.levelDown.forEach(ele => {
- if (this.areaCount > 0) {// 单省版
- if (ele && ele.s_name.indexOf('单省版') > -1) {
- this.radiosChangelevel(JSON.stringify(ele))
- this.member.level = JSON.stringify(ele)
- }
- } else {
- if (ele && ele.id == this.i_member_status) {
- this.radiosChangelevel(JSON.stringify(ele))
- this.member.level = JSON.stringify(ele)
- }
- }
- })
- if (this.i_member_status == 5) { // 自定义
- this.radiosChangelevel(JSON.stringify(this.comVal))
- this.member.level = JSON.stringify(this.comVal)
- clearTimeout(timer)
- let timer = setTimeout(() => {
- if (this.member.phone) {
- this.currentServer(this.member.phone, (res) => {
- let ids = res.data.list
- this.currentServerid = res.data.list
- this.echoServe(ids, 'allDis')
- this.getserveIdAndname()
- })
- }
- }, 200);
- }
- } else {
- this.member.level = ''
- }
- }
- this.modifycreateType()
- } catch (e) {
- // console.log(e)
- }
- },
- getpriceAjax(obj) {
- if (this.pricetimer) {
- clearTimeout(this.pricetimer)
- }
- this.pricetimer = setTimeout(() => {
- this.$request('/order/orderPriceCount').data(obj).success((res) => {
- // if(!res.data.price){
- // return
- // }
- this.member.orderMoney = res.data.price
- }).post()
- }, 200);
- },
- getNewservedata() {// 获取新服务列表
- this.$request('/order/getServerNew').data({ sType: 2 }).success((res) => { // 获取自定义套餐所有服务选项
- let data = res.data.lists
- // 处理为符合前端结构数据
- data.forEach(ele => {
- if (ele.Children.length > 0) {
- for (const key in serveNames) { // 服务名称替换
- ele.Children.forEach(item => {
- if (item.s_new_name == key) {
- item.s_new_name = serveNames[key]
- }
- })
- }
- ele.maps = groupByProperty(ele.Children, 's_new_name') // 相同名称分组
- }
- })
- // data.forEach(ele => {
- // for (const key in ele.maps) {
- // if(ele.maps[key].length>1){
- // if(key.indexOf('数据导出') == -1){
- // ele.maps[key].unshift({'s_new_name':ele.maps[key][0].s_new_name,id:'',s_count_year:10})
- // }
- // }
- // }
- // })
- data.forEach(ele => {
- ele.lists = []
- for (const key in ele.maps) {
- let obj = {}
- if (key.includes('市场分析定制报告') || key.includes('企业分析') || key.includes('业主分析')) {
- obj.name = key + ',报告下载:'
- } else {
- obj.name = key
- }
- obj.list = ele.maps[key]
- if (obj.list.length == 1) {
- obj.id = ele.maps[key][0].id
- }
- if (obj.list.length > 1) {
- obj.list.forEach(e => {
- if (e.s_new_name.indexOf('数据导出') > -1) {
- e.dw = '条/天'
- if (e.s_count_year == 200) {
- obj.id = e.id
- }
- } else if (e.s_new_name.includes('市场分析定制报告') || e.s_new_name.includes('企业分析') || e.s_new_name.includes('业主分析')) {
- if (!e.s_count_year || e.s_count_year == 500) { // 企业分析count500是基础产品与一份下载包重合因此隐藏,其他两种的基础产品count是null
- e.hide = true
- }
- // i_isserver 1 套餐下载包
- if(e.i_isserver == 1){ // 隐藏套餐下载包
- e.dw = '份/年' // 单位
- e.disabled = true
- e.hide = true
- }else{
- e.dw = '份' // 单位
- }
-
- if (e.s_count_year == 1 && e.i_isserver != 1) { // 默认1份 非套餐的选项
- obj.id = e.id // 勾选层级的ID赋值为规格为1的产品ID
- }
- } else {
- e.dw = '个'
- if (e.s_count_year == 100) {
- obj.id = e.id
- }
- }
- })
- }
- ele.lists.push(obj)
- }
- })
- // 初始勾选处理
- data.forEach(ele => {
- if (ele.ColumnName == '基础服务') { // 基础服务默认勾选且不可修改
- ele.choose = true
- ele.disabled = true
- } else {
- ele.choose = false
- ele.disabled = false
- }
- ele.lists.forEach(e => {
- if (e.id == 1) {
- e.choose = true
- e.disabled = true
- } else {
- e.choose = false
- e.disabled = false
- }
- })
- })
- data.forEach(ele => {
- ele.lists.forEach(e => {
- let newlist = e.list.sort((a, b) => a.s_count_year - b.s_count_year) // 按数量排序
- ele.list = newlist
- })
- })
- this.newServedata = data
- console.log(this.newServedata)
- this.initnewServedata = JSON.parse(JSON.stringify(this.newServedata))
- }).get()
- // 基础数据格式处理 下拉默认选中ID及单位处理
- function groupByProperty(arr, prop) {
- let groups = {};
- arr.forEach(item => {
- let group = groups[item[prop]];
- if (!group) {
- group = groups[item[prop]] = [];
- }
- group.push(item);
- });
- return groups;
- }
- },
- chooseChange(e, t, index) { // 多选框选择
- console.log(e, t)
- let data = this.newServedata
- if (t == 'one') {
- data[index].lists.forEach(e => {
- if (data[index].choose) {
- e.choose = true
- } else {
- e.choose = false
- }
- })
- } else if (t == 'two') {
- console.log(data[index])
- if (data[index].lists.every(item => item.choose === true)) {
- data[index].choose = true
- } else {
- data[index].choose = false
- }
- }
- this.getserveIdAndname()
- },
- getserveIdAndname(type) { // 获取服务id和name
- let key = 'choose' //已勾选服务
- if (type == 'getbuyserve') { // 已购服务(被隐藏的服务即为已购服务)
- key = 'hide'
- }
- let data = this.newServedata || []
- let ids = []
- let names = []
- data.forEach(ele => {
- ele.lists.forEach(e => {
- if (e[key]) {
- ids.push(e.id)
- if (e.id == 22 || e.id == 20 || e.id == 24) { // 项目进度监控 22=>100; 14=>500 企业情报监控20=>100 ;23=>500 业主监控 24=>100 ;25=>500
- names.push(e.name + '(100个)')
- } else if (e.id == 14 || e.id == 23 || e.id == 25) {
- names.push(e.name + '(500个)')
- } else if (e.id == 17) { //数据导出
- names.push(e.name + '(100条/天)')
- } else if (e.id == 18) {
- names.push(e.name + '(200条/天)')
- } else if (e.id == 1) {
- if (this.member.buySubject == '2') {
- names.push('基础服务' + '+企业管理')
- } else {
- names.push('基础服务')
- }
- } else if (e.name.includes('市场分析定制报告') || e.name.includes('企业分析') || e.name.includes('业主分析')) {
- e.list.forEach(item => {
- if(e.id == item.id){
- if (item.s_count_year) {
- if (item.s_new_name.includes('企业分析') && item.s_count_year == 500) {
- names.push(item.s_new_name)
- } else {
- names.push(item.s_new_name.replace(',报告下载:', '') + `(报告下载:${item.s_count_year}${item.dw})`)
- }
- } else {
- names.push(item.s_new_name)
- }
- }
- })
- } else {
- names.push(e.name)
- }
- }
- })
- })
- let names_str = names.join(',')
- // 基础服务: 服务id需要传1 3 企业情报监控包含:企业情报监控 20 23 企业情报监控传20的时候 企业中标动态传21 企业中标动态 21 13 企业情报监控传23的时候 企业中标动态传13
- if (ids.includes(1) && !ids.includes(3)) {
- ids.push(3)
- }
- if (ids.includes(20) && !ids.includes(21)) {
- ids.push(21)
- }
- if (ids.includes(23) && !ids.includes(13)) {
- ids.push(13)
- }
- if (names_str.includes('市场分析定制报告') && !ids.includes(26)) { // 选中下载包的ID时则存在没有基础产品的ID,这里补上 基础产品和下载包是绑定的,但是有两个ID
- ids.push(26)
- }
- if (names_str.includes('企业分析') && !ids.includes(4)) {
- ids.push(4)
- }
- if (names_str.includes('业主分析') && !ids.includes(5)) {
- ids.push(5)
- }
- // console.log(ids,names)
- if (type == 'getbuyserve') {
- return { ids, names }
- } else {
- this.form_serve = { ids, names }
- }
- },
- Purchasedservices(time) {
- let { names } = this.getserveIdAndname('getbuyserve') // 获取已购服务 已购服务会在服务勾选隐藏
- this.buyserveName = names.join('、')
- this.serveEndtime = time
- },
- echoServe(ids, type, hide_id) { // 回显服务 ids:勾选ID; type: dis禁用已勾选 allDis禁用全部 hide隐藏 hide_dis 隐藏指定禁用剩下的; hide_id: 需要隐藏的id
- let data = ids
- if (!data.includes(1)) { // 1 3 基础服务默认都有
- data.push(1)
- }
- if (!data.includes(3)) {
- data.push(3)
- }
- let hide = hide_id || []
- if (!hide.includes(1)) { // 1 3 基础服务默认都有
- hide.push(1)
- }
- if (!hide.includes(3)) { // 1 3 基础服务默认都有
- hide.push(3)
- }
- let servedata = this.newServedata
- servedata.forEach(ele => {
- ele.lists.forEach(e => {
- e.list.forEach(item => {
- if (data.includes(item.id)) {
- if(item.id != 4 && item.id != 5 && item.id != 26){ // 企业分析 业主分析 市场分析定制报告 这三个基础服务不选中ID (捆绑的有下载包 选中下载包的ID)
- e.id = item.id
- }
- e.choose = true
- if (type == 'dis') { // 禁用已勾选
- e.disabled = true
- item.disabled = true
- ele.disabled = true
- }
- }
- if (hide.includes(item.id)) {
- if (type == 'hide' || type == 'hide_dis') {
- e.hide = true
- item.hide = true
- ele.hide = true
- e.disabled = true
- item.disabled = true
- ele.disabled = true
- }
- }
- if (type == 'allDis' || type == 'hide_dis') { // 禁用全部选项
- e.disabled = true
- item.disabled = true
- ele.disabled = true
- }
- })
- })
- })
- servedata.forEach(ele => {
- if (ele.lists.every(item => item.choose === true)) {
- ele.choose = true
- } else {
- ele.choose = false
- }
- if ((type == 'hide' || type == 'hide_dis') && ele.lists.every(item => item.hide === true)) {
- ele.hide = true
- } else {
- ele.hide = false
- }
- })
- },
- modifycreateType() {
- this.member.createType = ''
- if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 当“合同性质”为“续签合同”时,购买主体为“个人”,默认为“延长服务”
- this.member.createType = '3'
- } else if (this.bigStas == 0) { // 没有大会员权限
- this.member.createType = '1'
- } else if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) { //当开通权益手机号已有大会员权限,购买主体为“个人”,“合同性质”为“新签合同”,默认为“补充服务”
- this.member.createType = '2'
- } else if (this.member.buySubject == '2') { // 企业走新建服务新建
- this.member.createType = '1'
- }
- this.repair = this.member.createType
- },
- initialized(conf = {}) {// 初始化
- // 排除某些字段不重置
- if (!conf) {
- conf = {}
- }
- this.member.contactOrderCode = ''
- this.member.entId = ''
- this.member.paybackWorkDayNum = ''
- this.member.paybackExpectDate = ''
- this.member.paybackOpenServer = false
- const excludeList = conf.excludeList || []
- this.member.bigMoney = 0
- this.member.subMoney = 0
- this.member.supplyMoney = 0
- this.member.orderMoney = 0
- this.member.payMoney = ''
- this.member.sums = 0
- this.member.paySub = ''
- this.member.freeSub = ''
- this.member.bigPayMoney = ''
- this.member.subPayMoney = ''
- this.member.supplyPayMoney = ''
- this.member.payCycle = ''
- this.member.contractUrl = ''
- if (!excludeList.includes('companyName')) {
- this.member.companyName = ''
- }
- this.member.remark = ''
- if (this.member.products == '2') {
- this.member.agreementStatus = '0'
- } else {
- this.member.agreementStatus = '1'
- }
- this.member.payType = ''
- this.member.agreementNumber = ''
- this.member.cycleType = '0'
- this.member.commission = '0'
- this.member.proceduresMoney = '0'
- this.member.contract_archive_status = '0'
- this.member.contract_archive_num = ''
- this.member.single = false
- this.member.areaCount = 0
- this.sumSel = []
- this.sPrice = 0
- this.strItems = []
- this.selData = []
- this.isAll = false
- this.member.beginTime = ''
- this.bigDis = true
- this.subDis = true
- this.supplyDis = true
- this.strItems1 = []
- this.strItems2 = []
- this.strItems3 = []
- this.strItems4 = []
- this.strItems5 = []
- this.optionDis1 = false
- this.optionDis2 = false
- this.optionDis3 = false
- this.optionDis4 = false
- this.optionDis5 = false
- this.optionDis6 = false
- this.combo_id = ''
- Object.keys(this.member).forEach(key => {
- if (key.startsWith('e_contract_')) {
- // 默认重置
- if (key !== 'e_contract_userB_contacts_name') { // 乙方联系人不重置
- this.member[key] = this.$options.data().member[key]
- }
- }
- })
- setTimeout(() => {
- let sigs = this.$refs.sigleRef
- let sigs1 = this.$refs.sigleRef3
- let sigs2 = this.$refs.sigleRef4
- let uploads = this.$refs.uploadRef
- if (sigs) {
- this.$refs.sigleRef.initd()
- this.$refs.sigleRef.dataVals = dateFormatter(new Date(), 'yyyy-MM-dd')
- this.member.agreementTime = dateFormatter(new Date(), 'yyyy-MM-dd')
- }
- if (sigs1) {
- this.$refs.sigleRef3.dataVals = dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00'
- this.member.sale_time = dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00'
- }
- if (sigs2) {
- this.$refs.sigleRef4.initd()
- }
- if (uploads) {
- this.$refs.uploadRef.uploadShow = false
- this.$refs.uploadRef.payHtml = ''
- }
- }, 200)
- },
- keyupSale(val) { // 正则格式化金额
- if (val === '1') { // 合同金额
- this.member.payMoney = this.moneyReg(this.member.payMoney)
- // 金额变动清空回款列表
- if (this.member.paybackNum > 1) {
- this.paybackTableDataClear()
- }
- } else if (val === '2') {
- this.member.bigPayMoney = this.moneyReg(this.member.bigPayMoney)
- } else if (val === '3') {
- this.member.subPayMoney = this.moneyReg(this.member.subPayMoney)
- } else if (val === '4') {
- this.member.supplyPayMoney = this.moneyReg(this.member.supplyPayMoney)
- } else if (val === '5') {
- this.member.commission = this.moneyReg(this.member.commission)
- } else if (val === '6') {
- this.member.proceduresMoney = this.moneyReg(this.member.proceduresMoney)
- }
- this.updateSaleMoney()
- },
- paybackTableDataClear() { // 初始化回款列表
- let num = this.member.paybackNum
- let arr = []
- for (let i = 0; i <= num; i++) {
- if (i == num) {
- arr.push({ code: '合计', time: '-', money: this.member.payMoney })
- } else {
- arr.push({ code: i + 1, time: '', money: '' })
- }
- }
- this.paybackTableData = arr
- this.$nextTick(() => {
- this.paybackTableData.forEach((ele, index) => {
- if (index < this.paybackTableData.length - 1) {
- this.$refs['paybackTime' + index].initd()
- }
- })
- })
- },
- keyupformat(val) { // 格式化输入框
- if (val === 'paybackWorkDayNum') {
- this.member.paybackWorkDayNum = this.filterNonPositiveIntegers(this.member.paybackWorkDayNum)
- this.getcollectionDate()
- } else if (val === 'paybackNum') { // 回款次数
- this.member.paybackNum = this.paybackNumReg(this.member.paybackNum)
- if (this.member.paybackNum > 1) {
- this.paybackTableDataClear()
- } else {
- // 切换一次重置数值
- this.member.paybackWorkDayNum = ''
- this.member.paybackExpectDate = ''
- }
- }
- },
- paybackTableChange(row, index, type, e) { // 回款计划表格 change
- if (type == 'money') {
- // 回款金额未录入时
- if (!this.member.payMoney) {
- this.$Notice.warning({ title: '请先输入合同金额' })
- this.paybackTableData[index].money = ''
- return
- }
- let num = 0
- if (this.paybackmoneyReg(this.paybackTableData[index].money)) {
- let money_ = this.paybackmoneyReg(this.paybackTableData[index].money)
- this.paybackTableData[index].money = Number(money_).fixed(2)
- } else {
- this.paybackTableData[index].money = ''
- }
- this.paybackTableData.forEach((ele, index) => {
- if (index < this.paybackTableData.length - 2) {
- num += Number(ele.money)
- }
- })
- if (num && this.member.payMoney) {
- if (Number(this.member.payMoney) - Number(num) > 0) {
- this.paybackTableData[this.member.paybackNum - 1].money = (Number(this.member.payMoney) - Number(num)).fixed(2)
- } else {
- this.$Notice.warning({ title: '需小于合同金额' })
- this.paybackTableData[index].money = ''
- // this.paybackTableData[this.member.paybackNum -1].money = ''
- }
- this.paybackTableData.forEach((ele) => {
- if (ele.code == '合计') {
- ele.money = Number(this.member.payMoney)
- }
- })
- } else {
- this.paybackTableData[this.member.paybackNum - 1].money = ''
- }
- } else if (type == 'time') {
- if (e) {
- this.paybackTableData[index].time = e
- }
- }
- console.log(this.paybackTableData)
- },
- paybackmoneyReg(val) {
- if (val) {
- let str = this.moneyReg(val + "")
- if (str == 0 && str !== '') {
- this.$Notice.warning({ title: '不可为0' })
- str = ''
- } else if (Number(str) >= Number(this.member.payMoney)) {
- this.$Notice.warning({ title: '需小于合同金额' })
- str = ''
- }
- return str
- } else {
- return ""
- }
- },
- paybackNumReg(val) {
- let str = val.toString().replace(/-\d+|[^\d\s,]+/g, '')
- if (str !== "" && str < 1) {
- this.$Notice.warning({ title: '最小值为1' })
- str = 1
- } else if (str > 5) {
- this.$Notice.warning({ title: '最大值为5' })
- str = 5
- }
- if (str && str > 0) {
- return Number(str)
- } else {
- return ''
- }
- },
- getcollectionDate: debounce(function () {
- if (this.member.paybackNum != 1) {
- return
- }
- let start = ''
- this.member.paybackExpectDate = ''
- if (this.member.paybackWorkDayNum === 0) {
- if (this.member.agreementStatus == '1') {
- this.member.paybackExpectDate = this.member.agreementTime
- } else {
- this.member.paybackExpectDate = dateFormatter(new Date(), 'yyyy-MM-dd')
- }
- return
- }
- if (this.member.agreementStatus == '1') { //签协议
- start = this.member.agreementTime
- } else {//不签协议
- start = dateFormatter(new Date(), 'yyyy-MM-dd')
- }
- if (this.member.paybackWorkDayNum === '' || !start) {
- return
- }
- let obj = {
- startDay: start,
- workDayNum: Number(this.member.paybackWorkDayNum),
- }
- this.$request('getWorkDay').contentType('application/json').data(obj).success((res) => {
- if (res.data) {
- this.member.paybackExpectDate = res.data
- }
- }).post('rewritePath')
- }, 200),
- filterNonPositiveIntegers(str) {
- let strs = str + ""
- let num = strs.replace(/-\d+|[^\d\s,]+/g, '')
- if (num && num >= 0) {
- return Number(num)
- } else {
- return ''
- }
- },
- saleTableChange(index) {
- let money = Number(this.saleTableData[index].money).fixed(2)
- this.saleTableData[index].money = money
- let moneys = 0
- this.saleTableData.forEach(v => {
- if (v.name !== '合计') {
- moneys += v.money
- }
- })
- this.saleTableData[this.saleTableData.length - 1].money = moneys
- },
- updateSaleMoney() {
- let money = Number(this.member.payMoney) + Number(this.member.bigPayMoney) + Number(this.member.subPayMoney) + Number(this.member.supplyPayMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
- let moneys = Number(money / (this.saleTableData.length - 1)).fixed(2)
- this.saleTableData.forEach(v => {
- if (v.name === '合计') {
- v.money = money
- } else {
- v.money = moneys
- }
- })
- },
- saleDepClick() {
- let url = '/order/getSalesChannelItem'
- this.$request(url).data({
- name: this.reqType
- }).success((res) => {
- if (res.data.dep) {
- this.saleDep = res.data.dep
- }
- if (res.data.displayMap) {
- if (res.data.displayMap.distribution_channel) {
- this.member.salesChannel = res.data.displayMap.distribution_channel
- }
- if (res.data.displayMap.saleDep) {
- this.member.saleCodeModel = res.data.displayMap.saleDep
- }
- }
- }).post()
- },
- saleDepChange: debounce(function (val) { // 业绩归属部门
- if (val && val.length > 0) {
- let valres = this.getMinLevelData(this.saleDep, val)
- this.saleCode = valres.join(',')
- if (val.indexOf('010100') > -1 || val.indexOf('010101') > -1 || val.indexOf('010102') > -1 || val.indexOf('010103') > -1 || val.indexOf('010104') > -1 || val.indexOf('050000') > -1) {
- this.$refs.casRef.getDictItem(() => {
- this.$refs.casRef.setDate('x020')
- })
- this.$refs.casRef.values = ['x02', 'x020'] //业绩归属部门为“销售一部/电销组”或“销售三部”,销售渠道默认为“线下直销/电销”
- this.member.salesChannel = 'x020'
- }
- } else {
- this.saleCode = ''
- }
- }, 200),
- removeElementFromArray(arr, value) {
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] === value) {
- arr.splice(i, 1)
- i--
- }
- }
- return arr
- },
- getMinLevelData(arrayA, arrayB) {
- const result = []
- const findItem = (arr) => {
- for (let i = 0; i < arr.length; i++) {
- if (arrayB.includes(arr[i].value)) {
- result.push(arr[i].value)
- }
- if (arr[i].children) {
- let arra = arr[i].children
- for (let a = 0; a < arra.length; a++) {
- if (arrayB.includes(arra[a].value)) {
- this.removeElementFromArray(result, arra[a].value.substring(0, 2) + '0000')
- result.push(arra[a].value)
- }
- if (arra[a].children) {
- let arrb = arra[a].children
- for (let b = 0; b < arrb.length; b++) {
- if (arrayB.includes(arrb[b].value)) {
- if (arrayB.includes(arrb[b].value.substring(0, 4) + '00')) {
- this.removeElementFromArray(result, arrb[b].value.substring(0, 4) + '00')
- }
- result.push(arrb[b].value)
- }
- }
- }
- }
- }
- }
- }
- findItem(arrayA)
- return result.reverse()
- },
- onRemoveUpload() {
- this.member.contractUrl = ''
- },
- moneyReg(val) {
- return val.replace(/[^\d^\.]+/g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
- },
- keyHandler() {
- this.member.phone = this.member.phone.replace(/[^\d]/g, '')
- if (this.member.level) {
- this.member.level = ''
- this.nums = ''
- }
- },
- noPchange(val) {
- if (val) {
- this.pReadon = true
- this.member.phone = 9 + String(Math.random()).substring(2, 12)
- this.overTime = 0
- this.pheHandler() // 手机号变动
- this.myNoTchange()
- } else {
- this.pReadon = false
- this.member.phone = ''
- }
- },
- salesChange(val) {
- //销售渠道兼容单个内容 或数组内容
- if (val instanceof Array) {
- this.member.salesChannel = String(val[1])
- } else if (typeof val === 'string') {
- this.member.salesChannel = val
- } else {
- this.member.salesChannel = String(val)
- }
- },
- channelChange(val) {
- this.member.orderChannel = String(val)
- },
- radiosChange(val) {
- this.member.buySubject = String(val)
- this.member.buyCount = ''
- this.creAuth = this.member.products
- if (val == 2) {
- this.member.products = '1'
- this.repair = '1'
- }
- this.datas2 = []
- this.member.paySub = ''
- this.member.freeSub = ''
- this.member.orderMoney = 0
- this.member.payMoney = ''
- this.nums = ''
- this.member.level = ''
- this.member.contractUrl = ''
- this.member.single = false
- this.member.areaCount = 0
- this.isAll = false
- setTimeout(() => {
- let uploads = this.$refs.uploadRef
- if (uploads) {
- this.$refs.uploadRef.uploadShow = false
- this.$refs.uploadRef.payHtml = ''
- }
- // 产品类型类型初始为大会员 获取套餐信息
- this.proChange(this.member.products)
- }, 200)
- this.reged()
- },
- paybackChange(val) {
- this.member.paybackCompany = String(val)
- },
- reged(type) {
- this.spinShow = true
- if (type == 'pheHandler') { //手机号变动调用此方法 不重置公司名称
- this.initialized({
- excludeList: ['companyName']
- })
- } else {
- this.initialized()
- }
- this.$request('/order/isOpenBig').data({// 验证手机号权限
- buySubject: this.member.buySubject,
- getContactOrder: 1,
- phone: this.member.phone,
- entName: (this.member.buySubject == '2') ? this.member.companyName : ''
- }).success((res) => {
- this.bigStas = res.data.Bigstatus
- this.subStas = res.data.isSub
- this.isYears = res.data.isYear // 0 开过大会员没超过一年,1 开过大会员超过一年, 2 没开过大会员
- this.overTime = res.data.endTime
- this.i_member_status = res.data.i_member_status || ''
- this.areaCount = res.data.areaCount || 0
- this.contactOrderList = res.data.contactOrder || [] // 关联订单列表
- if (this.contactOrderList.length == 1) {
- this.$set(this.contactOrderList[0], 'choose', true)
- this.contactOrderchoose = this.contactOrderList[0]
- this.member.contactOrderCode = this.contactOrderchoose.order_code
- this.member.entId = this.contactOrderchoose.ent_id
- }
- // 补充 或延长 回显购买数量
- if (this.member.products != 2 && (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) || (this.member.contract_nature == '2' && this.member.buySubject == '1')) {
- this.member.buyCount = res.data.buyCount || ''
- this.initbuyCount = res.data.buyCount || ''
- }
- this.stopTime = getDateSub('', res.data.endTime)
- this.serData = []
- this.pacData = []
- this.datas2 = []
- if (res.data.isYear == 0) {
- this.yearStas = 10
- } else if (res.data.isYear == 1) {
- this.yearStas = 12
- }
- this.currentServer()
- setTimeout(() => {
- this.spinShow = false
- if (this.member.buySubject != '2') {
- if (res.data.comingIntoEffective) {
- this.$Modal.warning({
- title: '警告提示',
- content: '该用户存在即将生效的大会员订单,无法创建新订单',
- okText: '我知道了',
- onOk: () => {
- this.bShow = false
- }
- })
- }
- }
- if (this.member.products == 1) {
- if (this.member.buySubject != '2') {//主体为个体走原有逻辑
- if (this.bigStas == 1) {
- if (this.subStas == 1) {
- this.colr = ''
- this.downDis = false
- if (this.nums == 0) {
- this.getServed('')
- this.sumSel = []
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = 1
- this.monthTime = 60
- }
- } else {
- this.downDis = true
- if (this.nums == 0) {
- this.getServed('')
- this.sumSel = []
- this.radioDis1 = true
- this.radioDis2 = false
- this.radioDis3 = false
- // this.member.createType = '2'
- if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) {
- this.repair = 2
- }
- this.monthTime = this.stopTime
- }
- }
- } else {
- this.colr = ''
- if (this.nums == 0) {
- this.creAuth = '1'
- }
- this.downDis = false
- this.getServed('')
- if (this.nums == 0) {
- this.sumSel = []
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = 1
- this.monthTime = 60
- }
- }
- } else { //企业直接按新用户购买处理
- this.colr = ''
- if (this.nums == 0) {
- this.creAuth = '1'
- }
- this.downDis = false
- this.getServed('')
- if (this.nums == 0) {
- this.sumSel = []
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = 1
- this.monthTime = 60
- }
- }
- this.createdTypeChange()
- } else if (this.member.products == 2) {
- if (this.bigStas == 0 && this.contactOrderList.length == 0) {
- if (this.subStas == 0) {
- this.colr = '此手机号无大会员权限'
- this.creAuth = ''
- }
- } else if (this.bigStas == 2) {
- this.colr = '此手机号已有大会员权限,无需再次创建'
- this.creAuth = ''
- } else {
- if (this.subStas == 1) {
- this.colr = '此手机号已是大会员子账号'
- this.creAuth = ''
- } else {
- this.colr = ''
- if (this.nums == 0) {
- this.creAuth = '2'
- this.getServed('')
- this.sumSel = []
- }
- }
- }
- } else if (this.member.products == 3) {
- if (this.bigStas == 0) {
- if (this.subStas == 0) {
- this.colr = '此手机号无大会员权限'
- this.creAuth = ''
- }
- } else if (this.bigStas == 2) {
- this.colr = '此手机号已有大会员权限,无需再次创建'
- this.creAuth = ''
- } else {
- if (this.subStas == 1) {
- this.colr = '此手机号已是大会员子账号'
- this.creAuth = ''
- } else {
- this.colr = ''
- if (this.nums == 0) {
- this.creAuth = '3'
- }
- this.getServed('')
- this.sumSel = []
- }
- }
- } else {
- this.member.products = ''
- }
- // this.modifycreateType()
- }, 500)
- }).post()
- },
- disabledDateForVIPCallback(date) {
- return date && date.valueOf() < Date.now() - 86400000;
- },
- pheHandler() {// 填写手机号并验证
- this.member.phone = this.member.phone.replace(/[^\d]/g, '')
- if (this.member.phone) {
- if (this.pReadon) {
- this.reged('pheHandler')
- } else {
- if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
- this.reged('pheHandler')
- }
- }
- }
- },
- proChange(val) {// 产品类型
- // alert(val)
- if (this.member.buySubject == '2' && val == '2' && !this.member.companyName) {
- this.member.products = '1'
- this.$Notice.warning({ title: '请输入公司名称' })
- return
- }
- this.creAuth = this.member.products
- this.datas2 = []
- this.proNums = val
- this.member.paySub = ''
- this.member.freeSub = ''
- this.member.orderMoney = 0
- this.member.payMoney = ''
- this.member.level = ''
- this.member.contractUrl = ''
- this.member.single = false
- this.member.areaCount = 0
- this.isAll = false
- setTimeout(() => {
- let uploads = this.$refs.uploadRef
- if (uploads) {
- this.$refs.uploadRef.uploadShow = false
- this.$refs.uploadRef.payHtml = ''
- }
- }, 200)
- if (val == 1) {
- if (this.initbuyCount && this.vipDis) {
- this.member.buyCount = this.initbuyCount
- }
- this.nums = ''
- this.$request('/order/getCombo').data().success((res) => {// 获取大会员套餐
- this.levelDown = []
- // let newobj = {}
- res.data.lists.forEach(v => {
- if (v.id !== 4) {// 试用版
- this.levelDown.push(v)
- }
- // if (v.id == 6) { // 商机版2.0
- // newobj = JSON.parse(JSON.stringify(v))
- // newobj.s_name = newobj.s_name + '(单省版)'
- // this.levelDown.push(newobj)
- // }
- })
- this.comVal = {
- i_ispreinstall: 0,
- i_price: '',
- id: '',
- l_createtime: "",
- s_name: "自定义",
- s_servers: ""
- }
- if (this.member.buySubject != '2') {//主体为个体走原有逻辑
- if (this.bigStas == 1) {
- if (this.subStas == 1) {
- this.colr = ''
- } else {
- this.downDis = true
- }
- } else {
- this.colr = ''
- this.downDis = false
- }
- } else { //主体为企业直接走新购买逻辑
- this.colr = ''
- this.downDis = false
- }
- if (this.member.products == '1') {
- this.createdTypeChange()
- }
- }).get()
- }
- if (val == 2 || val == 3) {
- this.member.buyCount = '' // 切换套餐重置数量
- this.nums = '2'
- if (this.bigStas == 0 && this.contactOrderList.length == 0) {
- if (this.subStas == 0) {
- this.colr = '此手机号无大会员权限'
- this.creAuth = ''
- }
- } else if (this.bigStas == 2) {
- this.colr = '此手机号已有大会员权限,无需再次创建'
- this.creAuth = ''
- } else {
- if (this.subStas == 1) {
- this.colr = '此手机号已是大会员子账号'
- this.creAuth = ''
- } else {
- this.colr = ''
- }
- }
- // 选择子账号货补充包回显销售渠道
- if (this.member.salesChannel) {
- this.$nextTick(() => {
- this.$refs.casRef.getDictItem(() => {
- this.$refs.casRef.setDate(this.member.salesChannel)
- })
- })
- }
- }
- if (val == 2) { // 选择子账号 默认为不签协议
- this.member.agreementStatus = '0'
- if (this.member.phone) {
- if (this.pReadon) {
- this.reged('pheHandler')
- } else {
- if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
- this.reged('pheHandler')
- }
- }
- }
- }
- if (val == 3) {
- this.getServed('')
- }
- },
- tipFunc(val) {
- return val.toLocaleString('zh', { style: 'currency', currency: 'CNY' })
- },
- currentServer(phone_, callback) {// 获取用户当前已享有的服务
- this.$request('/order/getCurrentServer').data({
- phone: phone_ ? phone_ : this.member.phone
- }).success((res) => {
- this.currentId = res.data.list
- try {
- if (callback) {
- callback(res)
- }
- } catch (e) {
- // console.log(e)
- }
- }).post()
- },
- unitChange(data) {// 有效周期选择单位
- if (data == 1) {
- this.placed = '请输入有效周期(单位 天)'
- this.max_length = 4
- } else {
- this.max_length = 2
- this.placed = '请输入有效周期(单位(月),最多输入' + this.monthTime + '个月)'
- }
- },
- leChange(val) {// 会员套餐
- console.log(val)
- if (!val) return
- this.initialized({
- excludeList: ['companyName']
- })
- val = JSON.parse(val)
- this.datas2 = []
- this.sArr = []
- this.combo_id = val
- this.nums = val.i_ispreinstall // 0
- if (this.pReadon) {
- this.myNoTchange()
- }
- if (val.i_ispreinstall == 0) {
- if (this.member.buySubject != '2') {//主体为个体走原有逻辑
- if (this.bigStas == 1) {
- if (this.subStas == 1) {
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = '1'
- this.monthTime = 60
- if (!this.showOrderStatus && !this.pReadon) {
- this.myNoTchange()
- }
- } else {
- this.radioDis1 = true
- this.radioDis2 = false
- this.radioDis3 = false
- // this.member.createType = '2'
- this.repair = '2'
- this.monthTime = this.stopTime
- }
- } else {
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = '1'
- this.monthTime = 60
- if (!this.showOrderStatus && !this.pReadon) {
- this.myNoTchange()
- }
- }
- } else {
- this.radioDis1 = false
- this.radioDis2 = true
- this.radioDis3 = true
- // this.member.createType = '1'
- this.repair = '1'
- this.monthTime = 60
- if (!this.showOrderStatus && !this.pReadon) {
- this.myNoTchange()
- }
- }
- this.getServed('')
- } else {
- // this.member.createType = ''
- if (!this.showOrderStatus && !this.pReadon) {
- this.myNoTchange()
- }
- }
- if (val.i_ispreinstall == 1 || val.i_ispreinstall == null) {
- this.getServed(val)
- // this.currentServer()
- this.valComs = val // 固定套餐
- this.monthTime = 60
- }
- // this.modifycreateType()
- },
- leSelect(e) {
- console.log(e)
- let val = JSON.parse(e.value)
- if (val.i_ispreinstall == 1) {
- this.datas1.splice(0, 1, {
- name: val.s_name,
- price: val.i_price,
- count: ''
- })
- } else {
- this.datas1[0] = {}
- }
- },
- radiosChangelevel(val) { // 单选会员套餐控件 change
- this.leSelect({ value: val })
- this.leChange(val)
- let obj = JSON.parse(val)
- if (obj.s_name && obj.s_name.indexOf('单省版') > -1) { // 商机2.0单省版 规格和地区数字段赋值
- this.member.single = true
- this.member.areaCount = 1
- } else {
- this.member.single = false
- this.member.areaCount = 0
- }
- if (this.firstOpen) {
- this.firstOpen = false
- if (this.member.salesChannel && this.nums !== '' && this.creAuth) {
- this.$nextTick(() => {
- this.$refs.casRef.getDictItem(() => {
- this.$refs.casRef.setDate(this.member.salesChannel)
- })
- })
- }
- }
- },
- serChange(val) {// 选择服务
- if (val == 1) {
- this.monthTime = 60
- } else if (val == 2) {
- this.monthTime = this.stopTime
- } else if (val == 3) {
- this.monthTime = 60 - this.stopTime
- }
- this.datas2 = []
- this.initialized()
- this.repair = val
- this.getServed('')
- },
- cycleTime() {
- let curTime = new Date().getTime()
- let cycTime = getDateSub(this.member.beginTime, this.overTime)
- if (this.repair == 2) {
- if (this.member.beginTime * 1000 > curTime) {
- this.monthTime = cycTime
- if (this.member.payCycle <= cycTime) {
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- } else {
- this.member.payCycle = ''
- }
- } else {
- this.monthTime = this.stopTime
- }
- }
- },
- peChange() {// 有效周期
- let arr2 = []
- if (this.nums == 0) {
- this.sumSel.forEach(v => {
- // if (v.id != 1) {
- arr2.push(v.id)
- // }
- })
- if (arr2.length != 0) {
- this.moneyFunc(this.valComs)// 大会员订单价格
- } else {
- this.member.bigMoney = 0
- }
- if (this.repair == '3') {
- this.moneyFunc(this.valComs)// 大会员订单价格
- }
- } else {
- this.moneyFunc(this.valComs)// 大会员订单价格
- }
- this.packsPrice() // 补充包价格
- },
- cycleHandler() {// 有效周期
- if (this.member.cycleType == '0') {//选择月保持原有逻辑
- if (this.nums == 0) {
- if (this.repair == 1) {
- if (this.member.payCycle <= 60) {
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- } else {
- this.member.payCycle = ''
- }
- } else if (this.repair == 2) {
- if (this.member.payCycle <= this.stopTime) {
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- } else {
- this.member.payCycle = ''
- }
- this.cycleTime()
- } else if (this.repair == 3) {
- if (this.member.payCycle <= 60 - this.stopTime) {
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- } else {
- this.member.payCycle = ''
- }
- }
- } else {
- if (this.member.payCycle <= 60) {
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- } else {
- this.member.payCycle = ''
- }
- }
- } else {//选择天只过滤字母
- this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
- }
- if (!this.member.payCycle) {
- this.member.bigMoney = 0
- }
- },
- timeReg(val) {
- return new Date(dateFormatter(val, 'yyyy-MM-dd') + ' 00:00:00').getTime() / 1000
- },
- moneyChange(num) {
- if (num == 0) {
- if (this.member.products != '1') {
- this.shiDis = true
- this.member.payMoney = ''
- } else {
- this.allDis = true
- }
- } else {
- if (this.member.products != '1') {
- this.shiDis = false
- } else {
- this.allDis = false
- }
- }
- if (this.member.bigMoney == 0 || this.allDis) {
- this.bigDis = true
- this.member.bigPayMoney = ''
- } else {
- this.bigDis = false
- }
- if (this.member.paySub == '' || this.allDis) {
- this.subDis = true
- this.member.subPayMoney = ''
- } else {
- this.subDis = false
- }
- if (this.member.supplyMoney == 0 || this.allDis) {
- this.supplyDis = true
- this.member.supplyPayMoney = ''
- } else {
- this.supplyDis = false
- }
- },
- startDate(val) {
- if (this.pReadon) {
- this.$nextTick(() => {
- if (this.$refs.sigleRef1 !== undefined) {
- this.$refs.sigleRef1.dataVals = '2099-01-01'
- this.member.beginTime = this.timeReg('2099-01-01')
- }
- })
- } else {
- if (val) {
- this.member.beginTime = this.timeReg(val)
- } else {
- this.member.beginTime = ''
- }
- this.cycleTime()
- }
- },
- orderDate(val) {
- this.member.createTime = val
- },
- agreeDate(val) {
- this.member.agreementTime = val
- this.keyupformat('paybackWorkDayNum')
- },
- agreementStatusChange() {
- this.keyupformat('paybackWorkDayNum')
- },
- noTchange(val) {
- if (val) {
- this.noPass = true
- this.$refs.sigleRef1.dataVals = '2099-01-01'
- this.member.beginTime = this.timeReg('2099-01-01')
- } else {
- this.$refs.sigleRef1.dataVals = ''
- this.member.beginTime = ''
- this.member.paybackOpenServer = false // 不勾选暂不开通 回款自动开通默认不勾选
- }
- },
- myNoTchange() {
- this.$nextTick(() => {
- this.noPass = true
- if (this.$refs.sigleRef1 !== undefined) {
- this.$refs.sigleRef1.dataVals = '2099-01-01'
- this.member.beginTime = this.timeReg('2099-01-01')
- }
- })
- },
- payBlur() {
- if (this.member.paySub) {
- this.datas1.splice(1, 1, {
- name: '子账号',
- price: 2000,
- count: this.member.paySub
- })
- }
- },
- payHandler() {// 子账号金额
- this.member.paySub = this.member.paySub.replace(/[^\d]+/g, '')
- },
- payChange() {
- if (this.member.buyCount) { // 子账号数量 为购买数量-1 主账号1个
- this.member.paySub = this.member.buyCount - 1
- }
- if (this.creAuth == 2) { // 子账号
- // this.member.orderMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
- }
- // this.member.subMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
- if (!this.member.paySub || this.allDis) {
- this.subDis = true
- this.member.subPayMoney = ''
- } else {
- this.subDis = false
- }
- this.allSum() // 总计
- },
- freeHandler() {
- this.member.freeSub = this.member.freeSub.replace(/[^\d]+/g, '')
- },
- buyHandler() {
- this.member.buyCount = this.member.buyCount.replace(/[^\d]+/g, '')
- },
- contractFile(val) {
- this.member.contractUrl = val
- },
- fixedNum(val) {
- return val ? Number(parseFloat(val * 100).toFixed(0)) : 0
- },
- saleDate(val) {
- this.member.sale_time = val + ' 00:00:00'
- },
- guiDate(val) {
- this.member.contract_archive_time = val + ' 00:00:00'
- },
- salePerson(val) {
- this.member.salesPerson = val
- let saleNameArr = []
- val.forEach(v => {
- let vjson = JSON.parse(v)
- saleNameArr.push({ name: vjson.username, money: 0 })
- })
- saleNameArr.push({ name: '合计' })
- this.saleTableData = saleNameArr
- this.updateSaleMoney()
- },
- urlReq(url, obj) {
- this.isDisable = true
- this.$request(url).data(
- obj
- ).success(() => {
- this.bShow = false
- if (obj.save === '1') {
- this.$Message.success({ content: '提交成功' })
- } else if (obj.save === '2') {
- this.$Message.success({ content: '暂存成功' })
- }
- // this.$Message.success({content: '提交成功'})
- this.$parent.reload()
- setTimeout(() => {
- this.isDisable = false
- }, 1000)
- }).error(() => {
- this.isDisable = false
- }).post()
- },
- ordConfirm(params) { //提交
- console.log(params)
- if (!this.member.salesChannel || this.member.salesChannel == undefined || this.member.salesChannel == 'undefined') {
- this.$Notice.warning({ title: '请选择销售渠道' })
- return
- }
- if (this.member.buySubject == '') {
- this.$Notice.warning({ title: '请选择购买主体' })
- return
- }
- if (!this.saleCode) {
- this.$Notice.warning({ title: '请选择业绩归属部门' })
- return
- }
- if (!this.member.payType) {
- this.$Notice.warning({ title: '请选择约定支付方式' })
- return
- }
- if (this.member.phone == '') {
- this.$Notice.warning({ title: '请输入手机号' })
- return
- }
- if (this.member.phone && !this.noPhone && !/^1[3456789]\d{9}$/.test(this.member.phone)) {
- this.$Notice.warning({ title: '手机号格式不正确' })
- return
- }
- if (this.member.products == '') {
- this.$Notice.warning({ title: '请选择产品类型' })
- return
- }
- if (!this.member.paybackCompany) {
- this.$Notice.warning({ title: '请选择签约主体' })
- return
- }
- // if(this.member.billingMode !== 0 && this.member.billingMode !== 1){
- // this.$Notice.warning({title: '请选择计费模式'})
- // return
- // }
- if (this.showOnlineContractForm) {
- // 如购买主体或甲方类型为“企业”,则公司名称必填
- const entMark = this.member.buySubject == '2' || this.member.e_contract_userA_type == 2
- if (entMark && !this.member.companyName) {
- this.$Notice.warning({ title: '公司名称必填' })
- return
- }
- if (!this.member.e_contract_type) {
- this.$Notice.warning({ title: '电子协议类型必填' })
- return
- }
- // if (!this.member.e_contract_userA_type) {
- // this.$Notice.warning({title: '协议甲方类型必填'})
- // return
- // }
- // if (!this.member.e_contract_userA_name) {
- // this.$Notice.warning({title: '协议甲方必填'})
- // return
- // }
- // if (!this.member.e_contract_userA_contacts_name) {
- // this.$Notice.warning({title: '协议甲方联系人必填'})
- // return
- // }
- // if (!this.member.e_contract_userA_contacts_tel) {
- // this.$Notice.warning({title: '协议甲方联系方式必填'})
- // return
- // }
- // if (!this.member.e_contract_userA_contacts_address) {
- // this.$Notice.warning({title: '协议甲方联系地址必填'})
- // return
- // }
- if (!this.member.e_contract_userB_contacts_name) {
- this.$Notice.warning({ title: '协议乙方联系人必填' })
- return
- }
- }
- if (this.member.buySubject == '2') {
- if (this.member.buyCount == '') {
- this.$Notice.warning({ title: '请输入购买数量' })
- return
- }
- if (this.member.buyCount <= 0) {
- this.$Notice.warning({ title: '请输入大于0的数量' })
- return
- }
- }
- if (this.member.paybackNum == '') {
- this.$Notice.warning({ title: '请输入回款次数' })
- return
- }
- console.log(this.paybackTableData)
- if (this.member.paybackNum > 1 && !this.paybackTableData.every(item => item.time && item.money)) {
- this.$Notice.warning({ title: '请填写完整回款计划' })
- return
- }
- if (this.member.paybackNum == 1 && !this.member.paybackExpectDate) {
- this.$Notice.warning({ title: '请输入回款计划工作日' })
- return
- }
- if (this.saleTableData) {
- let isOk = true
- this.saleTableData.forEach(v => {
- if (v.name === '合计') {
- // let money = Number(this.member.payMoney)+Number(this.member.bigPayMoney)+Number(this.member.subPayMoney)+Number(this.member.supplyPayMoney)-Number(this.member.commission)-Number(this.member.proceduresMoney)
- let money
- if (this.member.payMoney) {
- money = Number(this.member.payMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
- } else {
- money = Number(this.member.bigPayMoney) + Number(this.member.subPayMoney) + Number(this.member.supplyPayMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
- }
- if (Number(v.money) > money) {
- this.$Notice.warning({ title: '业绩金额大于合同金额' })
- isOk = false
- }
- }
- })
- if (!isOk) {
- return
- }
- }
- let serveData = []
- this.datas2.forEach(v => {
- serveData.push({
- id: v.id,
- name: v.name,
- price: v.price,
- count: v.count * v.s_pkcount
- })
- })
- // 服务列表参数处理
- let saleNameArr = []
- let saleIdArr = []
- this.member.salesPerson.forEach(v => {
- let vjson = JSON.parse(v)
- saleNameArr.push(vjson.username)
- saleIdArr.push(vjson.id)
- })
- let saleName = saleNameArr.join(',')
- let saleId = saleIdArr.join(',')
- // 回款列表参数处理
- this.member.paybackList = this.paybackTableData
- // 提交集合部分
- if (this.proNums == 1) {// 大会员
- if (this.nums == 0) {
- this.getserveIdAndname()
- var serId = this.form_serve.ids
- var serName = this.form_serve.names
- }
- // 服务ID获取旧逻辑
- // if (this.nums == 0) {
- // if (this.sumSel.length == 0) {
- // if (this.sArr.length == 0) {
- // // return
- // } else {
- // this.sArr.forEach(j => {
- // serId.push(j.id)
- // serName.push(j.s_name)
- // })
- // }
- // } else {
- // this.sumSel.forEach(k => {
- // serId.push(k.id)
- // serName.push(k.s_name)
- // })
- // }
- // }
- // 服务ID获取旧逻辑 结束
- if (!this.member.payMoney) { // 合同金额为0 则计费模式置为免费
- this.member.billingMode = 0
- } else {
- this.member.billingMode = 1
- }
- // 会员套餐参数处理
- let newlevel = ''
- if (this.member.single) {
- newlevel = 6
- } else {
- newlevel = JSON.parse(this.member.level).id ? JSON.parse(this.member.level).id : 5// 5自定义
- }
- let obj = {
- ...params,
- contract_nature: this.member.contract_nature,
- createTime: this.member.createTime,
- phone: this.member.phone,
- buySubject: this.member.buySubject,//主体
- buyCount: this.member.buyCount,//购买数量
- products: '',// 产品类型不需要传(传空)
- billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
- level: newlevel,
- // this.nums == 1 ? JSON.parse(this.member.level).id : 5,
- payCycle: this.member.payCycle,
- cycleType: this.member.cycleType,
- startTime: this.member.createType == 2 || this.member.createType == 3 ? '' : this.member.beginTime,
- paySub: this.member.paySub,
- freeSub: this.member.freeSub,
- bigMoney: this.fixedNum(this.member.bigMoney),
- subMoney: this.fixedNum(this.member.subMoney),
- supplyMoney: this.fixedNum(this.member.supplyMoney),
- orderMoney: this.fixedNum(this.member.orderMoney),
- contractUrl: this.member.contractUrl,
- isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
- bigPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.bigPayMoney),
- subPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.subPayMoney),
- supplyPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.supplyPayMoney),
- payMoney: this.fixedNum(this.member.payMoney),
- createType: this.member.createType,
- // this.nums == 0 ? this.member.createType : '1',
- comboId: this.member.single ? 6 : this.combo_id.id,
- serversId: this.nums == 0 ? String(serId) : '',
- serversName: this.nums == 0 ? String(serName) : '',
- serversArr: serveData,
- commission: this.fixedNum(this.member.commission),
- proceduresMoney: this.fixedNum(this.member.proceduresMoney),
- companyName: this.member.companyName,
- agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
- agreementTime: this.member.agreementStatus !== 0 ? this.timeReg(this.member.agreementTime) : '',
- agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
- salesChannel: this.member.salesChannel,
- orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
- paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
- remark: this.member.remark,
- order_status: this.member.order_status,
- sale_time: this.member.sale_time,
- contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
- contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
- contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
- areaCount: this.member.areaCount,
- salesPerson: saleName,
- salesPersonId: saleId,
- saleDep: this.saleCode,
- payType: this.member.payType,
- saleMoney: JSON.stringify({ data: this.saleTableData }),
- // 电子协议相关
- e_contract_type: this.member.e_contract_type, // 电子协议类型
- e_contract_userA_type: this.member.e_contract_userA_type, // 协议甲方类型
- e_contract_userA_name: this.member.e_contract_userA_name, // 协议甲方
- e_contract_userA_contacts_name: this.member.e_contract_userA_contacts_name, // 协议甲方联系人
- e_contract_userA_contacts_tel: this.member.e_contract_userA_contacts_tel, // 协议甲方联系方式
- e_contract_userA_contacts_address: this.member.e_contract_userA_contacts_address, // 协议甲方联系地址
- e_contract_userB_contacts_name: this.member.e_contract_userB_contacts_name, // 协议乙方联系人
- e_contract_remark: this.member.e_contract_remark, // 协议备注
- paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
- paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
- paybackOpenServer: this.member.paybackOpenServer, // 回款开通服务
- paybackNum: this.member.paybackNum, // 回款次数
- paybackList: this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
- oldSerName: this.buyserveName || ''
- }
- if (this.showOrderStatus) {
- this.urlReq('/order/createBigOrder', obj)
- } else {
- this.urlReq('/order/myCreateBigOrder', obj)
- }
- } else if (this.proNums == 2) {// 子账号
- let obj = {
- ...params,
- entId: this.member.entId,
- contactOrderCode: this.member.contactOrderCode || '',
- contract_nature: this.member.contract_nature,
- createTime: this.member.createTime,
- phone: this.member.phone,
- products: '',// 产品类型不需要传(传空)
- buySubject: this.member.buySubject,//主体
- buyCount: this.member.buyCount,//购买数量
- billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
- paySub: this.member.paySub,
- freeSub: this.member.freeSub,
- orderMoney: this.fixedNum(this.member.orderMoney),
- contractUrl: this.member.contractUrl,
- isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
- payMoney: this.fixedNum(this.member.payMoney),
- commission: this.fixedNum(this.member.commission),
- proceduresMoney: this.fixedNum(this.member.proceduresMoney),
- companyName: this.member.companyName,
- agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
- agreementTime: this.member.agreementStatus !== '' ? this.timeReg(this.member.agreementTime) : '',
- agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
- salesChannel: this.member.salesChannel,
- orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
- paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
- remark: this.member.remark,
- order_status: this.member.order_status,
- sale_time: this.member.sale_time,
- contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
- contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
- contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
- salesPerson: saleName,
- salesPersonId: saleId,
- saleDep: this.saleCode,
- payType: this.member.payType,
- saleMoney: JSON.stringify({ data: this.saleTableData }),
- paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
- paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
- paybackOpenServer: this.member.paybackOpenServer, // 回款开通服务
- paybackNum: this.member.paybackNum, // 回款次数
- paybackList: this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
- }
- if (!this.member.contactOrderCode) {
- this.$Notice.warning({ title: '请选择关联订单' })
- return
- }
- if (this.showOrderStatus) {
- this.urlReq('/order/createSubOrder', obj)
- } else {
- this.urlReq('/order/myCreateSubOrder', obj)
- }
- } else if (this.proNums == 3) {// 补充包
- let obj = {
- ...params,
- contract_nature: this.member.contract_nature,
- createTime: this.member.createTime,
- phone: this.member.phone,
- products: '',// 产品类型不需要传(传空)
- billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
- serversArr: serveData,
- orderMoney: this.fixedNum(this.member.orderMoney),
- buySubject: this.member.buySubject,//主体
- buyCount: this.member.buyCount,//购买数量
- contractUrl: this.member.contractUrl,
- isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
- payMoney: this.fixedNum(this.member.payMoney),
- commission: this.fixedNum(this.member.commission),
- proceduresMoney: this.fixedNum(this.member.proceduresMoney),
- companyName: this.member.companyName,
- agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
- agreementTime: this.member.agreementStatus !== '' ? this.timeReg(this.member.agreementTime) : '',
- agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
- salesChannel: this.member.salesChannel,
- orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
- paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
- remark: this.member.remark,
- order_status: this.member.order_status,
- sale_time: this.member.sale_time,
- contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
- contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
- contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
- salesPerson: saleName,
- salesPersonId: saleId,
- saleDep: this.saleCode,
- payType: this.member.payType,
- saleMoney: JSON.stringify({ data: this.saleTableData }),
- paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
- paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
- paybackOpenServer: this.member.paybackOpenServer, // 回款开通服务
- paybackNum: this.member.paybackNum, // 回款次数
- paybackList: this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
- }
- if (this.showOrderStatus) {
- this.urlReq('/order/createSupplyOrder', obj)
- } else {
- this.urlReq('/order/myCreateSupplyOrder', obj)
- }
- }
- },
- ordCancel() {
- // this.$refs.casRef.values = []
- this.member.saleCodeModel = []
- this.saleTableData = []
- this.bShow = false
- },
- visibleChange(val) { // 调起弹窗
- if (val == false) {
- setTimeout(() => {
- // 初始回款次数
- this.member.paybackNum = 1
- this.showXieYi = false
- this.colr = ''
- this.creAuth = ''
- // 产品类型类型初始为大会员
- this.member.products = '1'
- this.member.contract_nature = '1'
- this.member.phone = ''
- //this.member.salesPerson = ''
- this.member.billingMode = ''
- this.member.level = ''
- // this.member.createType = ''
- this.member.order_status = '1'
- this.member.buySubject = ''
- this.member.buyCount = ''
- this.nums = ''
- this.serData = []
- this.member.saleCodeModel = []
- this.saleTableData = []
- this.spinShow = false
- this.noPhone = false
- this.noPass = false
- this.pReadon = false
- this.member.salesChannel = ''
- this.member.orderChannel = 'd01'
- this.member.paybackCompany = 'h01'
- //this.$refs.saleRef.salePerson = ''
- // this.$refs.casRef.values = []
- let sigs2 = this.$refs.sigleRef2
- let sigs3 = this.$refs.casRef1
- let sigs4 = this.$refs.casRef2
- if (sigs2) {
- this.$refs.sigleRef2.initd()
- }
- if (sigs3) {
- this.$refs.casRef1.values = ['d01']
- }
- if (sigs4) {
- this.$refs.casRef2.values = ['h01']
- }
- this.initialized()
- }, 500)
- } else {
- this.firstOpen = true
- this.creAuth = ''
- this.isDisable = false
- //业绩部门
- this.saleDepClick()
- setTimeout(() => {
- if (this.$refs.saleRef) {
- this.$refs.saleRef.setDefaultPerson = this.$store.getters.getAdminUser.username
- this.$refs.saleRef.personData()
- }
- }, 1000)
- // 产品类型类型初始为大会员 获取套餐信息
- this.member.products = '1'
- this.proChange(this.member.products)
- this.getNewservedata()
- }
- },
- areaCountClick(val) { // 处理单省版 radio 选中后取消
- if (this.member.single) {
- this.member.single = false
- this.member.areaCount = 0
- } else {
- this.member.single = true
- this.member.areaCount = val
- }
- },
- packsPrice() {// 补充包总价
- let strs1 = 0, strs2 = 0
- this.datas2.forEach(v => {
- if (v.id == 11 || v.id == 15) {
- strs1 += v.price * v.count
- } else if (v.id == 14 || v.id == 16) {
- if (this.repair == 1) {
- strs2 += v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
- } else if (this.repair == 2) {
- let strNums = 0
- if (v.id == 14) {
- if (this.currentId.indexOf(v.id) > -1) {
- strNums = v.price / 12 * v.count * this.stopTime
- } else {
- strNums = v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
- }
- } else {
- if (this.currentId.indexOf(12) > -1 && this.currentId.indexOf(13) > -1) {
- strNums = v.price / 12 * v.count * this.stopTime
- } else {
- strNums = v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
- }
- }
- strs2 += strNums
- } else if (this.repair == 3) {
- strs2 += v.price / 12 * v.count * (this.stopTime + parseInt(this.member.payCycle ? this.member.payCycle : 0))
- }
- } else {
- strs1 += v.price * v.count
- }
- })
- this.member.supplyMoney = parseInt(strs1) + parseInt(strs2)
- if (this.member.supplyMoney == 0 || this.allDis) {
- this.supplyDis = true
- this.member.supplyPayMoney = ''
- } else {
- this.supplyDis = false
- }
- // this.member.orderMoney = this.member.supplyPayMoney
- },
- ordFunc() {// 订单金额
- let strs1 = 0, strs2 = 0
- this.datas2.forEach(v => {
- if (v.id == 11 || v.id == 15) {
- strs1 += parseInt(v.price) * v.count
- } else if (v.id == 14 || v.id == 16) {
- strs2 += parseInt(v.price) / 12 * v.count * this.stopTime
- }
- })
- // this.member.orderMoney = parseInt(strs1) + parseInt(strs2)
- },
- // 旧服务列表相关
- getServed(val) {
- this.serData = []
- this.pacData = []
- const resList = []
- this.resArr1 = []
- this.resArr2 = []
- this.resArr3 = []
- this.resArr4 = []
- this.resArr5 = []
- this.resArr6 = []
- this.$request('/order/getServer').data().success((res) => {// 获取自定义套餐所有服务选项
- this.servedData = res.data.lists
- res.data.lists.forEach(v => {
- if (v.i_isserver == 1) {
- if (this.repair == '1') {
- if (v.id == 17 || v.id == 18) {
- this.resArr1.push(v)
- } else if (v.id == 4 || v.id == 19) {
- this.resArr2.push(v)
- } else if (v.id == 20 || v.id == 23) {
- this.resArr3.push(v)
- } else if (v.id == 13 || v.id == 21) {
- this.resArr4.push(v)
- } else if (v.id == 14 || v.id == 22) {
- this.resArr5.push(v)
- } else if (v.id == 24 || v.id == 25) {
- this.resArr6.push(v)
- } else {
- if (v.id !== 12) {
- resList.push(v)
- }
- }
- }
- if (this.repair == '2') {
- if (v.id == 17 || v.id == 18) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(1, 0, v)
- } else {
- this.resArr1.push(v)
- }
- } else if (v.id == 4 || v.id == 19) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(4, 0, v)
- } else {
- this.resArr2.push(v)
- }
- } else if (v.id == 20 || v.id == 23) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(14, 0, v)
- } else {
- this.resArr3.push(v)
- }
- } else if (v.id == 13 || v.id == 21) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(16, 0, v)
- } else {
- this.resArr4.push(v)
- }
- } else if (v.id == 14 || v.id == 22) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(18, 0, v)
- } else {
- this.resArr5.push(v)
- }
- } else if (v.id == 24 || v.id == 25) {
- if (this.currentId.indexOf(v.id) > -1) {
- resList.splice(20, 0, v)
- } else {
- this.resArr6.push(v)
- }
- } else {
- if (v.id !== 12) {
- resList.push(v)
- }
- }
- }
- if (this.repair == '3') {
- if (v.id !== 12) {
- resList.push(v)
- }
- }
- }
- if (v.i_ispackage == 1) {
- this.pacData.push(v)
- }
- })
- let arr1 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9119,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- let arr2 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9120,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- let arr3 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9121,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- let arr4 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9122,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- let arr5 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9123,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- let arr6 = {
- i_ispackage: 0,
- i_isserver: 1,
- i_pkprice: null,
- i_price_month: null,
- i_price_year: null,
- s_count_year: null,
- id: 9124,
- s_name: '',
- s_pkcount: null,
- _checked: false
- }
- if (this.repair == '1') {
- resList.splice(1, 0, arr1)
- resList.splice(3, 0, arr2)
- resList.splice(13, 0, arr3)
- resList.splice(14, 0, arr4)
- resList.splice(15, 0, arr5)
- resList.splice(17, 0, arr6)
- } else if (this.repair == '2') {
- if (!(this.currentId.indexOf(17) > -1) && !(this.currentId.indexOf(18) > -1)) {
- resList.splice(1, 0, arr1)
- }
- if (!(this.currentId.indexOf(4) > -1) && !(this.currentId.indexOf(19) > -1)) {
- resList.splice(3, 0, arr2)
- }
- if (!(this.currentId.indexOf(20) > -1) && !(this.currentId.indexOf(23) > -1)) {
- resList.splice(13, 0, arr3)
- }
- if (!(this.currentId.indexOf(13) > -1) && !(this.currentId.indexOf(21) > -1)) {
- resList.splice(14, 0, arr4)
- }
- if (!(this.currentId.indexOf(14) > -1) && !(this.currentId.indexOf(22) > -1)) {
- resList.splice(15, 0, arr5)
- }
- if (!(this.currentId.indexOf(24) > -1) && !(this.currentId.indexOf(25) > -1)) {
- resList.splice(18, 0, arr6)
- }
- }
- this.serData = resList
- if (val) {
- this.checkedDis2(val)
- } else {
- this.checkedDis1()
- }
- }).get()
- },
- checkedDis1() {// 服务列表选中已享有服务
- this.serData.forEach(k => {
- if (this.repair == '1') {
- if (k.id == 1) {
- k._checked = true
- k._disabled = true
- this.sumSel.push(k)
- }
- } else if (this.repair == 2) {
- if (this.currentId.indexOf(k.id) > -1) {
- k._checked = true
- k._disabled = true
- }
- } else if (this.repair == '3') {
- if (this.currentId.indexOf(k.id) > -1) {
- k._checked = true
- k._disabled = true
- } else {
- k._disabled = true
- }
- }
- })
- this.pacData.forEach(j => {
- if (this.currentId.indexOf(j.id) > -1) {
- j._rowDis = false
- } else {
- if (j.id == 16) {
- if (this.currentId.indexOf(12) > -1 && this.currentId.indexOf(13) > -1 || this.currentId.indexOf(23) > -1 && this.currentId.indexOf(13) > -1 || this.currentId.indexOf(20) > -1 && this.currentId.indexOf(21) > -1) {
- j._rowDis = false
- } else {
- j._rowDis = true
- }
- } else {
- if (this.currentId.indexOf(j.id) > -1) {
- j._rowDis = false
- } else {
- j._rowDis = true
- }
- }
- }
- })
- },
- checkedDis2(val) {
- this.pacData.forEach(v => {
- if (v.id == 16) {
- if (val.s_servers.indexOf(12) > -1 && val.s_servers.indexOf(13) > -1 || val.s_servers.indexOf(23) > -1 && val.s_servers.indexOf(13) > -1 || val.s_servers.indexOf(20) > -1 && val.s_servers.indexOf(21) > -1) {
- v._rowDis = false
- } else {
- v._rowDis = true
- }
- } else {
- if (val.s_servers.indexOf(v.id) > -1) {
- v._rowDis = false
- } else {
- v._rowDis = true
- }
- }
- })
- },
- // 合计
- handleSummary({ columns, data }) {
- const sums = {}
- columns.forEach((column, index) => {
- const key = column.key
- if (index === 0) {
- sums[key] = {
- key,
- value: '合计'
- }
- return
- }
- let values = []
- if (this.repair == 3) {
- this.sArr = []
- data.forEach(v => {
- if (v._checked) {
- this.sArr.push(v)
- }
- })
- values = this.sArr.map(item => Number(item[key]))
- } else {
- values = this.sumSel.map(item => Number(item[key]))
- }
- if (!values.every(value => isNaN(value))) {
- const v = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- return prev + curr;
- } else {
- return prev;
- }
- }, 0)
- sums[key] = {
- key,
- value: v
- }
- // this.sPrice = sums.i_price_year.value
- if (this.nums == 0) {
- let arr2 = []
- this.sumSel.forEach(v => {
- if (v.id != 1) {
- arr2.push(v.id)
- }
- })
- if (arr2.length != 0) {
- this.moneyFunc()// 大会员订单价格
- }
- if (this.repair == '2') {
- this.member.payCycle = getDateSub('', this.overTime)
- this.moneyFunc(this.valComs)// 大会员订单价格
- }
- if (this.repair == '3') {
- this.moneyFunc(this.valComs)// 大会员订单价格
- }
- } else {
- if (this.member.payCycle) {
- this.moneyFunc()// 大会员订单价格
- }
- }
- } else {
- if (key == 's_name') {
- sums[key] = {
- key,
- value: '-'
- }
- } else {
- sums[key] = {
- key,
- value: 0
- }
- }
- }
- })
- return sums;
- },
- // 多选
- selChage(selection) {
- const arrs = [], arrs1 = [], strItems = []
- this.selData = selection
- selection.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id !== 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (!v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems6)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- if (this.sumSel.length == 0) {
- this.member.bigMoney = 0
- this.allSum()
- }
- this.moneyFunc(this.valComs)// 大会员订单价格
- },
- allChange() {// 选择全选
- this.pacData.forEach((t, i) => {
- document.getElementById('counts' + i).disabled = false
- })
- },
- allCancel() {// 取消全选
- this.pacData.forEach((t, i) => {
- if (t.id == 16) {
- if (this.currentId.indexOf(12) > -1 && this.currentId.indexOf(13) > -1) {
- document.getElementById('counts' + i).disabled = false
- } else {
- document.getElementById('counts' + i).disabled = true
- }
- } else {
- if (this.currentId.indexOf(t.id) > -1) {
- document.getElementById('counts' + i).disabled = false
- } else {
- document.getElementById('counts' + i).disabled = true
- }
- }
- document.getElementById('counts' + i).value = ''
- this.datas2.forEach((k, index) => {
- this.datas2[index].count = 0
- this.datas2.splice(index, 1)
- this.packsPrice()
- })
- })
- },
- curChange(selection, row) {// 选择单个
- let arr1 = []
- selection.forEach(l => {
- arr1.push(l.id)
- })
- if (arr1.indexOf(11) > -1) {
- document.getElementById('counts0').disabled = false
- }
- if (arr1.indexOf(15) > -1) {
- document.getElementById('counts2').disabled = false
- }
- if (arr1.indexOf(9121) > -1 && this.strItems3.id == 20 && arr1.indexOf(9122) > -1 && this.strItems4.id == 21) {
- document.getElementById('counts3').disabled = false
- }
- if (arr1.indexOf(9121) > -1 && this.strItems3.id == 23 && arr1.indexOf(9122) > -1 && this.strItems4.id == 13) {
- document.getElementById('counts3').disabled = false
- }
- if (arr1.indexOf(9123) > -1 && this.strItems5.id == 22) {
- document.getElementById('counts4').disabled = false
- }
- if (arr1.indexOf(9123) > -1 && this.strItems5.id == 14) {
- document.getElementById('counts1').disabled = false
- }
- if (arr1.indexOf(9124) > -1 && this.strItems5.id == 24) {
- document.getElementById('counts4').disabled = false
- }
- if (arr1.indexOf(9124) > -1 && this.strItems5.id == 25) {
- document.getElementById('counts1').disabled = false
- }
- },
- canChange(selection, row) {// 取消单个
- let arr2 = []
- this.pacData.forEach((t, i) => {
- if (row.id == t.id) {
- document.getElementById('counts' + i).disabled = true
- document.getElementById('counts' + i).value = ''
- this.datas2.forEach((k, index) => {
- if (k.id == row.id) {
- this.datas2[index].count = 0
- this.datas2.splice(index, 1)
- this.packsPrice()
- }
- })
- }
- })
- if (selection.length == 0) {
- this.datas2 = []
- }
- selection.forEach(l => {
- arr2.push(l.id)
- })
- if (arr2.indexOf(12) > -1 && arr2.indexOf(13) > -1) {
- document.getElementById('counts3').disabled = false
- } else {
- document.getElementById('counts3').disabled = true
- document.getElementById('counts3').value = ''
- }
- this.allSum()
- },
- allSum() {// 总计
- this.member.sums = this.member.bigMoney + this.member.subMoney + this.member.supplyMoney
- },
- moneyFunc(str) {// 大会员金额
- let sumd1 = 0, sumd2 = 0, sumd3 = 0
- const arrs3 = [], arrs5 = [], arrs6 = [], arrs7 = []
- if (this.repair == '3') {
- this.sumSel = []
- this.serData.map(v => {
- if (v._checked && v._disabled) {
- this.sumSel.push(v)
- }
- })
- }
- if (this.nums == 0) {
- this.sumSel.map(v => {
- arrs5.push(v.id)
- if (v.id == 17 || v.id == 18) {
- arrs3.push(v)
- } else {
- arrs6.push(v)
- }
- })
- } else {
- const sered = str.s_servers.split(',')
- this.servedData.forEach(c => {
- sered.forEach(r => {
- if (r == c.id) {
- arrs7.push(c)
- }
- })
- })
- this.nums == 0 ? this.sumSel : arrs7.map(v => {
- arrs5.push(v.id)
- if (v.id == 17 || v.id == 18) {
- arrs3.push(v)
- } else {
- arrs6.push(v)
- }
- })
- }
- if (this.member.payCycle >= 12) {
- if (arrs5.indexOf(17) > -1 || arrs5.indexOf(18) > -1) {
- const cycles1 = parseInt(this.member.payCycle / 12) // 取整
- const cycles2 = this.member.payCycle % 12 // 取余
- arrs3.forEach(p => {
- if (this.member.payCycle == 12) {
- sumd3 += parseInt(p.i_price_year * cycles1)
- } else {
- sumd1 += parseInt(p.i_price_year * cycles1 + p.i_price_month * cycles2)
- }
- })
- }
- arrs6.forEach(p => {
- sumd2 += parseInt(p.i_price_year / 12 * this.member.payCycle)
- })
- } else {
- if (arrs5.indexOf(17) > -1 || arrs5.indexOf(18) > -1) {
- arrs3.forEach(p => {
- sumd1 += parseInt(p.i_price_month * this.member.payCycle)
- })
- }
- arrs6.forEach(p => {
- sumd2 += parseInt(p.i_price_year / 10 * this.member.payCycle)
- })
- }
- this.member.bigMoney = sumd1 + sumd2 + sumd3
- if (this.member.bigMoney == 0 || this.allDis) {
- this.bigDis = true
- this.member.bigPayMoney = ''
- } else {
- this.bigDis = false
- }
- this.allSum() // 总计
- },
- //旧服务列表相关结束
- },
- data() {
- return {
- firstOpen: true,
- buyserveName: '',
- serveEndtime: '',
- paybackTable: [
- {
- title: '序号',
- slot: 'code'
- },
- {
- title: '预计回款时间',
- slot: 'time'
- },
- {
- title: '预计回款金额(元)',
- slot: 'money'
- }
- ],
- paybackTableData: [],
- contactOrderList: [],
- contactOrderchoose: {},
- contactOrderColumns: [
- {
- title: '请选择',
- align: 'center',
- key: 'choose',
- render: (h, params) => {
- return h('div', [
- h('Radio', {
- props: {
- value: params.row.choose,
- disabled: params.row.disabled
- },
- on: {
- 'on-change': (e) => {
- this.contactOrderList.forEach((items) => { //取消所有对象的勾选,choose设置为false
- this.$set(items, 'choose', false)
- });
- this.contactOrderList[params.index].choose = e; //将勾选的对象的choose设置为true
- this.contactOrderchoose = this.contactOrderList[params.index]
- this.member.contactOrderCode = this.contactOrderchoose.order_code
- this.member.entId = this.contactOrderchoose.ent_id
- console.log(e, this.contactOrderchoose)
- this.orderPriceCount()
- }
- }
- })
- ])
- }
- },
- {
- title: '订单编号',
- key: 'order_code',
- align: 'center',
- render: (h, { row }) => {
- return h('div', {
- style: {
- color: 'rgb(54, 163, 247)',
- cursor: 'pointer'
- },
- on: {
- click: () => {
- const news = this.$router.resolve({
- path: '/order/orderList/orderDetail',
- query: { id: row.id, proType: '大会员' }
- })
- window.open(news.href, '_blank')
- }
- }
- }, [
- h('span', row.order_code)
- ])
- }
- },
- {
- title: '创建时间',
- key: 'create_time',
- align: 'center',
- render: (h, { row }) => {
- return h('span', dateFormatter(row.create_time * 1000, 'yyyy-MM-dd'))
- }
- },
- {
- title: '产品类型',
- key: 'product_type',
- align: 'center'
- },
- {
- title: '到期时间',
- key: 'vip_endtime',
- align: 'center',
- render: (h, { row }) => {
- return h('span', dateFormatter(row.vip_endtime * 1000, 'yyyy-MM-dd'))
- }
- },
- ],
- pricetimer: null,
- initbuyCount: '',
- showOrderOther: false,
- showXieYi: false,
- initnewServedata: [], // 初始化自定义服务信息
- form_serve: {},
- newServedata: [],
- i_member_status: '',
- saleCode: '',
- saleDep: [],
- saleTable: [
- {
- title: '销售人员',
- slot: 'name'
- },
- {
- title: '销售业绩(元)',
- slot: 'money'
- }
- ],
- saleTableData: [],
- comingIntoEffective: false,
- max_length: 2, //默认为月
- serData: [],
- servedData: [],
- pacData: [],
- resArr1: [],
- resArr2: [],
- resArr3: [],
- resArr4: [],
- resArr5: [],
- resArr6: [],
- optionDis1: false,
- optionDis2: false,
- optionDis3: false,
- optionDis4: false,
- optionDis5: false,
- optionDis6: false,
- repair: '1',
- spinShow: false,
- bShow: false,
- downDis: false,
- shiDis: false,
- valComs: {},
- strs1: 0,
- strs2: 0,
- pArr1: [],
- pArr2: [],
- combo_id: {},
- allDis: false,
- bigDis: true,
- subDis: true,
- supplyDis: true,
- sArr: [],
- noPhone: false,
- noPass: false,
- pReadon: false,
- isDisable: false,
- selData: [],
- placed: '请输入有效周期',
- // placed: '请输入有效周期(单位(月),最多输入60个月)',
- member: {
- paybackList: [],
- paybackNum: 1,
- entId: '',
- paybackOpenServer: false,
- contactOrderCode: '',
- paybackExpectDate: '',
- paybackWorkDayNum: '',
- contract_nature: '1', // 合同性质
- phone: '',
- products: '',
- billingMode: '',
- salesPerson: '',
- level: '',
- createType: '1',
- payCycle: '',
- cycleType: '0',
- buyCount: '',
- beginTime: '',
- paySub: '',
- freeSub: '',
- bigMoney: 0,
- subMoney: 0,
- supplyMoney: 0,
- orderMoney: 0,
- sums: 0,
- agreementStatus: '1',
- agreementTime: dateFormatter(new Date(), 'yyyy-MM-dd'),
- agreementNumber: '',
- contractUrl: '',
- payMoney: '',
- bigPayMoney: '',
- subPayMoney: '',
- supplyPayMoney: '',
- commission: '0',
- proceduresMoney: '0',
- companyName: '',
- salesChannel: '',
- orderChannel: 'd01',
- paybackCompany: 'h01',
- remark: '',
- sale_time: dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00',
- order_status: '1',
- buySubject: '',
- contract_archive_status: '0',
- contract_archive_time: '',
- contract_archive_num: '',
- single: false, // 大会员商机版2.0-单省版 radio 选中状态
- areaCount: '0', // 大会员省份版-省份数量
- payType: '',
- saleCodeModel: [],
- // 电子协议相关
- e_contract_type: 1, // 电子协议类型
- e_contract_userA_type: 1, // 协议甲方类型
- e_contract_userA_name: '', // 协议甲方
- e_contract_userA_contacts_name: '', // 协议甲方联系人
- e_contract_userA_contacts_tel: '', // 协议甲方联系方式
- e_contract_userA_contacts_address: '', // 协议甲方联系地址
- e_contract_userB_contacts_name: '', // 协议乙方联系人
- e_contract_remark: '', // 协议备注
- },
- isAll: false,
- radioDis1: false,
- radioDis2: false,
- radioDis3: false,
- currentId: [],
- sPrice: 0,
- mPrice: 0,
- valNums: 0,
- rowArr: {},
- agreeStatus: [
- { v: '0', n: '不签协议' },
- { v: '1', n: '签协议' }
- ],
- payTypes: [
- { v: 'transferAccounts', n: '对公转账' },
- { v: 'wx', n: '微信' },
- { v: 'ali', n: '支付宝' }
- ],
- unitOptions: [
- { v: '0', n: '月' },
- { v: '1', n: '天' }
- ],
- columns1: [
- {
- title: '补充包名称',
- key: 's_name',
- width: 280,
- align: 'center',
- render: (h, { row }) => {
- return h('span', row.s_name ? row.s_name : '-')
- }
- },
- {
- title: '价格',
- key: 'i_pkprice',
- width: 130,
- align: 'center',
- render: (h, { row }) => {
- let arr1 = [11, 15]
- return h('span', row.i_pkprice ? row.s_pkcount ? row.s_pkcount + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_pkprice : row.i_pkprice : '-')
- }
- },
- {
- title: '购买数量',
- key: 's_pkcount',
- align: 'center',
- render: (h, { row, index }) => {
- return h('Input', {
- props: {
- placeholder: '请输入购买数量',
- // value: row.s_pkcount,
- disabled: row._rowDis,
- elementId: 'counts' + index
- },
- on: {
- 'on-change': (event) => {
- this.rowArr = row
- event.currentTarget.value = event.currentTarget.value.replace(/[^\d]+/g, '')
- this.valNums = event.currentTarget.value
- if (event.currentTarget.value) {
- if (this.datas2.length !== 0) {
- var isOk = false;
- this.datas2.forEach(v => {
- if (row.id == v.id) {
- isOk = true
- v.count = this.valNums
- }
- })
- if (!isOk) {
- this.datas2.push({
- id: row.id,
- name: row.s_name,
- price: row.i_pkprice,
- s_pkcount: row.s_pkcount,
- count: this.valNums
- })
- }
- } else {
- this.datas2.push({
- id: row.id,
- name: row.s_name,
- price: row.i_pkprice,
- s_pkcount: row.s_pkcount,
- count: this.valNums
- })
- }
- } else {
- this.datas2.forEach((v, i) => {
- if (row.id == v.id) {
- this.datas2.splice(i, 1)
- }
- })
- }
- this.packsPrice()
- this.ordFunc()
- this.allSum() // 总计
- this.orderPriceCount()// 接口计算价格
- },
- 'on-keyup': (event) => {
- event.currentTarget.value = event.currentTarget.value.replace(/[^\d]+/g, '')
- }
- }
- })
- }
- }
- ],
- datas1: [],
- datas2: [],
- selStr: '',
- strItems1: [],
- strItems2: [],
- strItems3: [],
- strItems4: [],
- strItems5: [],
- strItems6: [],
- value1: '',
- columns2: [
- {
- title: '金额明细',
- key: 'name',
- align: 'center',
- render: (h, { row }) => {
- return h('span', row.name ? row.name : '-')
- }
- },
- {
- title: '价格',
- key: 'price',
- width: 170,
- align: 'center',
- render: (h, { row }) => {
- return h('span', row.price ? row.count ? row.price + '*' + row.count : row.price : '-')
- }
- }
- ],
- // 服务列表相关
- columns3: [
- {
- type: 'selection',
- width: 40,
- align: 'center'
- },
- {
- title: '服务名称',
- key: 's_name',
- width: 260,
- align: 'center',
- render: (h, { row }) => {
- if (this.repair == '1' || this.repair == '2') {
- if (row.id == 9119) {
- return h('Select', {
- props: {
- placeholder: '请选择单日限量包',
- value: this.selStr,
- },
- on: {
- 'on-change': (val) => {
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems1 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems6)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- this.resArr1.map(item => {
- return h('Option', {
- props: {
- value: JSON.stringify(item)
- }
- }, item.s_name)
- })
- )
- } else if (row.id == 9120) {
- return h('Select', {
- props: {
- placeholder: '请选择企业全景分析',
- value: this.value1,
- },
- on: {
- 'on-change': (val) => {
- const ids = JSON.parse(val).id
- if (ids == 4) {
- this.optionDis3 = true
- this.optionDis4 = false
- this.optionDis5 = true
- this.optionDis6 = false
- } else if (ids == 19) {
- this.optionDis3 = false
- this.optionDis4 = true
- this.optionDis5 = false
- this.optionDis6 = true
- }
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems2 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems6)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- [
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr2[1]),
- disabled: this.optionDis1
- }
- }, this.resArr2[1].s_name),
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr2[0]),
- disabled: this.optionDis2
- }
- }, this.resArr2[0].s_name)
- ]
- )
- } else if (row.id == 9121) {
- return h('Select', {
- props: {
- placeholder: '请选择企业情报监控',
- value: '',
- },
- on: {
- 'on-change': (val) => {
- const ids = JSON.parse(val).id
- if (ids == 20) {
- this.optionDis1 = false
- this.optionDis2 = true
- this.optionDis5 = false
- this.optionDis6 = true
- } else if (ids == 23) {
- this.optionDis1 = true
- this.optionDis2 = false
- this.optionDis5 = true
- this.optionDis6 = false
- }
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems3 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems5)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- [
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr3[0]),
- disabled: this.optionDis3
- }
- }, this.resArr3[0].s_name),
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr3[1]),
- disabled: this.optionDis4
- }
- }, this.resArr3[1].s_name)
- ]
- )
- } else if (row.id == 9122) {
- return h('Select', {
- props: {
- placeholder: '请选择企业中标动态',
- value: '',
- },
- on: {
- 'on-change': (val) => {
- const ids = JSON.parse(val).id
- if (ids == 21) {
- this.optionDis1 = false
- this.optionDis2 = true
- this.optionDis3 = false
- this.optionDis4 = true
- } else if (ids == 13) {
- this.optionDis1 = true
- this.optionDis2 = false
- this.optionDis3 = true
- this.optionDis4 = false
- }
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems4 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems6)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- [
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr4[1]),
- disabled: this.optionDis5
- }
- }, this.resArr4[1].s_name),
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr4[0]),
- disabled: this.optionDis6
- }
- }, this.resArr4[0].s_name)
- ]
- )
- } else if (row.id == 9123) {
- return h('Select', {
- props: {
- placeholder: '请选择项目进度监控',
- value: '',
- },
- on: {
- 'on-change': (val) => {
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems5 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- [
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr5[1])
- }
- }, this.resArr5[1].s_name),
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr5[0])
- }
- }, this.resArr5[0].s_name)
- ]
- )
- } else if (row.id == 9124) {
- return h('Select', {
- props: {
- placeholder: '请选择业主监控',
- value: '',
- },
- on: {
- 'on-change': (val) => {
- row.i_price_year = JSON.parse(val).i_price_year
- row.i_price_month = JSON.parse(val).i_price_month
- },
- 'on-select': val => {
- this.strItems6 = JSON.parse(val.value)
- const arrs = [], arrs1 = [], strItems = []
- this.serData.forEach(s => {
- if (this.selData.length == 0) {
- if (this.repair == '1') {
- if (s.id == 1) {
- this.selData.push(s)
- }
- } else {
- if (!s._disabled) {
- this.selData.push(s)
- }
- }
- }
- })
- this.selData.map(v => {
- arrs1.push(v.id)
- if (this.repair == '1') {
- if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
- arrs.push(v)
- }
- } else {
- if (v.id != 9119 && !v._disabled) {
- arrs.push(v)
- }
- }
- if (v.id == 9119) {
- strItems.splice(1, 0, this.strItems1)
- } else if (v.id == 9120) {
- strItems.splice(1, 0, this.strItems2)
- } else if (v.id == 9121) {
- strItems.splice(1, 0, this.strItems3)
- } else if (v.id == 9122) {
- strItems.splice(1, 0, this.strItems4)
- } else if (v.id == 9123) {
- strItems.splice(1, 0, this.strItems5)
- } else if (v.id == 9124) {
- strItems.splice(1, 0, this.strItems6)
- }
- })
- if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
- this.sumSel = arrs.concat(strItems)
- } else {
- this.sumSel = arrs
- }
- }
- }
- },
- [
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr6[1])
- }
- }, this.resArr6[1].s_name),
- h('Option', {
- props: {
- value: JSON.stringify(this.resArr6[0])
- }
- }, this.resArr6[0].s_name)
- ]
- )
- } else {
- return h('span', row.s_name ? row.s_name : '-')
- }
- } else {
- return h('span', row.s_name ? row.s_name : '-')
- }
- }
- },
- {
- title: '年价格',
- key: 'i_price_year',
- align: 'center',
- render: (h, { row }) => {
- let arr1 = [11, 15]
- if (row.i_price_year) {
- if (row.s_count_year) {
- if (row.id == 17 || row.id == 18) {
- return h('span', row.i_price_year)
- } else {
- return h('span', row.s_count_year + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_price_year)
- }
- } else {
- return h('span', row.i_price_year)
- }
- } else {
- return h('span', '-')
- }
- }
- },
- {
- title: '月价格',
- key: 'i_price_month',
- align: 'center',
- render: (h, { row }) => {
- let arr1 = [11, 15]
- if (row.i_price_month) {
- if (row.s_count_month) {
- if (row.id == 17 || row.id == 18) {
- return h('span', row.i_price_month)
- } else {
- return h('span', row.s_count_month + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_price_month)
- }
- } else {
- return h('span', row.i_price_month)
- }
- } else {
- return h('span', '-')
- }
- }
- }
- ],
- // 结束
- sumSel: [],
- creAuth: '',
- bigStas: Number,
- subStas: Number,
- yearStas: Number,
- isYears: Number,
- stopTime: Number,
- monthTime: Number,
- colr: '',
- proNums: 0,
- comVal: {},
- bigPro: [
- { v: '1', n: '大会员' },
- { v: '2', n: '大会员子账号' },
- { v: '3', n: '大会员补充包' }
- ],
- levelDown: [],
- nums: '',
- chargeStatus: [
- { v: 0, n: '免费' },
- { v: 1, n: '收费' }
- ],
- currentServerid:''
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .servechildrenbox {
- display: flex;
- // margin-top: 15px;
- }
- .serve-one {
- font-weight: bold;
- }
- .servebox {
- overflow: hidden;
- display: block;
- }
- .serve-two {
- display: flex;
- margin: 5px 0;
- }
- .one-group {
- float: left;
- margin: 5px 0;
- }
- .serve-content {
- display: flex;
- flex-wrap: wrap;
- float: left;
- width: 650px;
- }
- .sel-table.ivu-table-wrapper {
- overflow: unset;
- }
- .button-grey {
- color: #000000db;
- background-color: #c6c5c5;
- border-color: grey;
- }
- .ivu-form-item {
- margin-bottom: 10px;
- }
- </style>
|