bigOrderEdit.vue 174 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555
  1. <template>
  2. <div class="two-child">
  3. <Modal :title="title" v-model="bShow" :class-name="'order-model member-model ' + (readonly ? 'disabled-modal' : '')"
  4. :mask-closable="false" @on-cancel="clearReview">
  5. <reviewRecord v-if="title === '创建订单审核'" ref="othersReviewRecord"></reviewRecord>
  6. <h3 style="margin-bottom: 10px" v-if="title === '创建订单审核'">订单信息</h3>
  7. <div :class="{ 'readonly-scroll': readonly }">
  8. <Form ref="member" class="mainDetail" :model="member" :rules="ruleValidate" :show-message="false"
  9. :label-width="121">
  10. <FormItem label="基本信息" class="formTitle">
  11. </FormItem>
  12. <div class="flex-endbox">
  13. <FormItem label="合同性质" required>
  14. <!-- 订单状态为“已完成”,不支持修改。 -->
  15. <RadioGroup v-model="member.contract_nature" @on-change="contractChange">
  16. <Radio label="1" style="margin-right:30px"
  17. :disabled="member.order_status == '1' || pass_all_incomplete_dis">新签合同</Radio>
  18. <Radio label="2" :disabled="member.order_status == '1' || pass_all_incomplete_dis">续签合同</Radio>
  19. </RadioGroup>
  20. </FormItem>
  21. <FormItem label="购买主体" required>
  22. <RadioGroup v-model="member.buySubject" @on-change="radiosChange">
  23. <Radio label="1" style="margin-right:30px"
  24. :disabled="radio_dis || finish_dis || pass_all_incomplete_dis">个人(如有子账号,共享额度)</Radio>
  25. <Radio label="2" :disabled="radio_dis || finish_dis || pass_all_incomplete_dis">企业</Radio>
  26. </RadioGroup>
  27. </FormItem>
  28. </div>
  29. <!-- <FormItem label="订单时间" prop="createTime">
  30. <date-sigle ref="sigleRef2" :dateType="'datetime'" :placeholderd="'请选择订单时间'" @startDate="orderDate" :overTime="0"></date-sigle>
  31. </FormItem> -->
  32. <FormItem label="公司名称" prop="" :required="member.buySubject == '2'">
  33. <Input v-model.trim="member.companyName" type="text" :maxlength="40"
  34. :disabled="finish_dis || pass_all_incomplete_dis" placeholder="请输入公司名称"></Input>
  35. </FormItem>
  36. <div class="flex-endbox">
  37. <FormItem label="开通权益手机号" prop="phone" :class="{ 'big-stas': colr }">
  38. <Input class="ipt-inpt" v-model="member.phone" type="text" @on-change="pheHandler" @on-keyup="keyHandler"
  39. :maxlength="11" placeholder="请输入手机号" :readonly="pReadon || returnmoney"></Input>
  40. <Checkbox v-model="noPhone" @on-change="noPchange">无手机号</Checkbox>
  41. <Spin fix class="order-spin" v-if="spinShow">
  42. <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
  43. </Spin>
  44. <p v-html="colr" style="color:#e13d13"></p>
  45. </FormItem>
  46. <FormItem label="产品类型">
  47. <!-- <Select v-model="member.products" placeholder="请选择产品类型(暂不支持数据导出)" @on-change="proChange" :disabled="proDis || interested"></Select> -->
  48. <!-- 我的订单不支持编辑产品类型 -->
  49. <Select v-model="member.products" placeholder="请选择产品类型(暂不支持数据导出)" @on-change="proChange"
  50. :disabled="proDis || interested || typeRestriction">
  51. <!-- <Option v-for="item in bigPro" :value="item.v" :key="item.v">{{ item.n }}</Option> -->
  52. <Option value="1">大会员</Option>
  53. <Option value="2" :disabled="subaccountDis">大会员子账号</Option>
  54. <Option value="3" :disabled="member.buySubject != '1' || bigStas == 0">大会员补充包</Option>
  55. </Select>
  56. </FormItem>
  57. </div>
  58. <FormItem label="关联订单" required v-show="member.products == '2' && contactOrderList.length > 0">
  59. <div class="contactOrderTable">
  60. <Table border ref="selection" :columns="contactOrderColumns" :data="contactOrderList"></Table>
  61. </div>
  62. </FormItem>
  63. <!-- <FormItem label="会员套餐" v-if="creAuth == '1'" prop="level">
  64. <Select v-model="member.level" placeholder="请选择会员套餐" @on-change="leChange" @on-select="leSelect"
  65. :disabled="interested">
  66. <Option :value="JSON.stringify(comVal)">自定义</Option>
  67. <Option v-for="(item,index) in levelDown" :value="JSON.stringify(item)" :key="index" :disabled="downDis">
  68. {{ item.s_name }}
  69. </Option>
  70. </Select>
  71. </FormItem> -->
  72. <!-- 仅大会员商机版2.0 支持购买单省版-->
  73. <!-- <FormItem label="规格" v-if="combo_id.id==6" >
  74. <Radio v-model="member.single" ref="single" style="marginRight:30px" @click.native.prevent="areaCountClick(1)" :disabled="interested" >单省版</Radio>
  75. </FormItem> -->
  76. <FormItem label="会员套餐" v-if="creAuth == '1'" prop="level">
  77. <RadioGroup v-model="member.level" @on-change="radiosChangelevel" v-if="levelShow">
  78. <Radio :label="JSON.stringify(comVal)" :disabled="vipDis || interested || pass_all_incomplete_dis">自定义
  79. </Radio>
  80. <Radio :label="JSON.stringify(item)" v-for="(item, index) in levelDown" :key="index"
  81. :disabled="(vipDis) || downDis || interested || pass_all_incomplete_dis">{{ item.s_name }}</Radio>
  82. </RadioGroup>
  83. </FormItem>
  84. <!-- 大会员、子账号 -->
  85. <div v-show="bigMemberModuleShow">
  86. <!-- <FormItem prop="createType" v-if="creAuth == '1'&&nums == '0'">
  87. <RadioGroup v-model="member.createType" class="form-radio1" @on-change="serChange">
  88. <Radio label="1" :disabled="radioDis1 || interested">新建服务</Radio>
  89. <Radio label="2" :disabled="radioDis2 || interested">补充服务</Radio>
  90. <Radio label="3" :disabled="radioDis3 || interested">延长服务</Radio>
  91. </RadioGroup>
  92. </FormItem>
  93. <FormItem class="table-order1 table-order2" v-if="creAuth == '1'&&nums == '0'">
  94. <Table
  95. class="sel-table"
  96. border
  97. ref="selection"
  98. :columns="columns3"
  99. :data="serData"
  100. @on-select="curChange"
  101. @on-select-cancel="canChange"
  102. @on-selection-change="selChage"
  103. @on-select-all="allChange"
  104. @on-select-all-cancel="allCancel"
  105. :summary-method="handleSummary"
  106. show-summary
  107. ></Table>
  108. </FormItem> -->
  109. <FormItem required v-if="creAuth == '1' && nums == '0'" label="服务列表">
  110. <div class="servebox" v-for="(item, index) in newServedata" :key="index">
  111. <div class="one-group" v-show="!item.hide">
  112. <Checkbox v-model="item.choose" :disabled="item.disabled"
  113. @on-change="chooseChange($event, 'one', index)"></Checkbox><span class="serve-one">{{item.ColumnName}}:</span>
  114. </div>
  115. <div class="serve-content">
  116. <div class="serve-two" v-show="!two.hide" v-for="(two, two_index) in item.lists" :key="two_index">
  117. <span v-if="two.id == 1">{{ two.name }}<span v-if="member.buySubject == '2'">+企业管理</span></span>
  118. <div class="servechildrenbox" v-else>
  119. <Checkbox v-model="two.choose" :disabled="two.disabled"
  120. @on-change="chooseChange($event, 'two', index)"></Checkbox>
  121. <span style="margin-right: 10px;">{{ two.name }}</span>
  122. <Select v-model="two.id" :disabled="two.disabled" placeholder="请选择产品类型(暂不支持数据导出)"
  123. style="width:120px;margin-right:10px;" v-if="two.list.length > 1"
  124. @on-change="chooseChange($event, 'select')">
  125. <Option v-for="(three, three_index) in two.list" :key="three_index" :value="three.id">
  126. {{ three.s_count_year + three.dw }}</Option>
  127. </Select>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. <div v-if="buyserveName"><span style="color: #e13d13;">注:服务到期时间:{{ serveEndtime }},</span><span
  133. style="font-weight:bold">该客户已购买:</span>{{ buyserveName }}</div>
  134. </FormItem>
  135. <!-- <div v-if="creAuth !== '3'">
  136. <FormItem label="付费子账号数量">
  137. <Input
  138. v-model="member.paySub"
  139. type="tel"
  140. placeholder="请填写付费子账号数量"
  141. maxlength="4"
  142. @on-keyup="payHandler"
  143. @on-change="payChange"
  144. @on-blur="payBlur"
  145. :readonly="interested"
  146. ></Input>
  147. </FormItem>
  148. <FormItem label="免费子账号数量">
  149. <Input v-model="member.freeSub" type="tel" maxlength="4" @on-keyup="freeHandler"
  150. placeholder="请填写免费子账号数量"
  151. :readonly="interested"></Input>
  152. </FormItem>
  153. </div> -->
  154. <FormItem label="购买数量" required v-if="!(creAuth == '3' && this.member.buySubject == '1')">
  155. <Input v-model="member.buyCount" type="tel" maxlength="4" @on-keyup="buyHandler" @on-change="payChange"
  156. placeholder="请填写购买数量"
  157. :disabled="finish_dis || (vipDis && this.member.products != 2) || pass_all_incomplete_dis"></Input>
  158. <span v-if="member.products == '1'">(注:主账号+子账号数量之和)</span>
  159. </FormItem>
  160. <div v-if="creAuth !== '2'">
  161. <!-- 补充包 -->
  162. <FormItem class="table-order1" v-show="creAuth == '3'">
  163. <Table class="prei-table" border ref="selection" :columns="columns1" :data="pacData"></Table>
  164. </FormItem>
  165. <FormItem class="table-order1" v-show="creAuth == '3'">
  166. <Table class="prei-table" border ref="selection" :columns="columns2" :data="datas2"></Table>
  167. </FormItem>
  168. <!-- <div class="flex-endbox"> -->
  169. <FormItem label="有效周期" prop="payCycle" v-if="creAuth == '1' && (repair != '2')">
  170. <div class="you-xiao" style="display:flex">
  171. <Input v-model="member.payCycle" type="tel" :maxlength="max_length" @on-keyup="cycleHandler"
  172. @on-change="peChange" :placeholder="placed" :disabled="interested || pass_all_incomplete_dis"
  173. style="width:376px"></Input>
  174. <Select v-model="member.cycleType" placeholder="请选择单位" @on-change="unitChange"
  175. :disabled="interested || pass_all_incomplete_dis" style="width:110px;margin-left:10px">
  176. <Option v-for="item in unitOptions" :value="item.v" :key="item.v">{{ item.n }}</Option>
  177. </Select>
  178. <Checkbox style="margin-left: 10px;" :disabled="pass_all_incomplete_dis"
  179. v-if="!returnMyReceivable && ((member.buySubject == '1' && member.createType == '1') || member.buySubject == '2')"
  180. v-model="member.paybackOpenServer">全额回款当日自动开通</Checkbox>
  181. </div>
  182. </FormItem>
  183. <FormItem label="开始日期" v-show="creAuth == '1' && repair == '1'">
  184. <date-sigle ref="sigleRef1" :dateType="'date'" :placeholderd="startDate_p" @startDate="startDate"
  185. :disabledDateCallback="disabledDateForVIPCallback" class="no-pass" :beginDis="noPass"
  186. :dateDis="returnmoney || !returnMyReceivable || this.noPhone"></date-sigle>
  187. <Checkbox v-model="noPass" @on-change="noTchange"
  188. :disabled="returnmoney || !returnMyReceivable || this.noPhone">暂不开通
  189. </Checkbox>
  190. <Checkbox
  191. v-if="returnMyReceivable && ((member.buySubject == '1' && member.createType == '1') || member.buySubject == '2')"
  192. v-model="member.paybackOpenServer" :disabled="!noPass || pass_all_incomplete_dis">全额回款当日自动开通
  193. </Checkbox>
  194. </FormItem>
  195. <!-- </div> -->
  196. </div>
  197. <!-- <div v-if="creAuth == '1'">
  198. <FormItem label="大会员订单金额" :label-width="194">
  199. <span class="sum-jin">{{ tipFunc(member.bigMoney) }}</span>
  200. </FormItem>
  201. <FormItem label="大会员子账号订单金额" :label-width="194">
  202. <span class="sum-jin">{{ tipFunc(member.subMoney) }}</span>
  203. </FormItem>
  204. <FormItem label="大会员补充包订单金额" :label-width="194">
  205. <span class="sum-jin">{{ tipFunc(member.supplyMoney) }}</span>
  206. </FormItem>
  207. </div> -->
  208. <div class="flex-endbox">
  209. <FormItem label="合同金额" prop="payMoney" class="d-felx" required>
  210. <Input v-model="member.payMoney" type="text" @on-keyup="keyupSale('1')" :maxlength="9"
  211. placeholder="请填写合同金额" :disabled="shiDis || finish_dis || pass_all_incomplete_dis"></Input>
  212. <span class="money-unit">元</span>
  213. </FormItem>
  214. <!-- 中标企业预测 -->
  215. <FormItem label="标准售价" :label-width="creAuth !== '1' ? 110 : 194" v-if="creAuth !== '1'">
  216. <span class="sum-jin" :aria-disabled="finish_dis">{{ tipFunc(member.orderMoney) }}元</span>
  217. <span>(折扣率:<span style="color: #36a3f7">{{ member.payMoney && member.orderMoney ? ((member.payMoney /
  218. member.orderMoney) * 100).toFixed(2)
  219. + '%' : '--' }}</span>)</span>
  220. </FormItem>
  221. <FormItem label="标准售价" :label-width="194" v-else>
  222. <span class="sum-jin">{{ tipFunc(member.orderMoney) }}元</span>
  223. <span>(折扣率:<span style="color: #36a3f7">{{ member.payMoney && member.orderMoney ? ((member.payMoney /
  224. member.orderMoney) * 100).toFixed(2)
  225. + '%' : '--' }}</span>)</span>
  226. </FormItem>
  227. </div>
  228. <!-- <FormItem label="计费模式" prop="billingMode">
  229. <Select v-model="member.billingMode" placeholder="请选择计费模式" @on-change="moneyChange">
  230. <Option v-for="item in chargeStatus" :value="item.v" :key="item.v">{{ item.n }}</Option>
  231. </Select>
  232. </FormItem> -->
  233. <!-- <FormItem label="大会员应付金额" :label-width="121" prop="bigPayMoney" v-show="creAuth == '1'">
  234. <Input
  235. v-model="member.bigPayMoney"
  236. type="text"
  237. @on-keyup="keyupSale('2')"
  238. :maxlength="9"
  239. placeholder="请输入大会员应付金额"
  240. :disabled="bigDis || finish_dis"
  241. ></Input>
  242. </FormItem>
  243. <FormItem label="子账号应付金额" prop="subPayMoney" v-show="creAuth == '1'">
  244. <Input
  245. v-model="member.subPayMoney"
  246. type="text"
  247. @on-keyup="keyupSale('3')"
  248. :maxlength="9"
  249. placeholder="请输入子账号应付金额"
  250. :disabled="subDis || finish_dis"
  251. ></Input>
  252. </FormItem>
  253. <FormItem label="补充包应付金额" prop="supplyPayMoney" v-show="creAuth == '1'">
  254. <Input
  255. v-model="member.supplyPayMoney"
  256. type="text"
  257. @on-keyup="keyupSale('4')"
  258. :maxlength="9"
  259. placeholder="请输入补充包应付金额"
  260. :disabled="supplyDis || finish_dis"
  261. ></Input>
  262. </FormItem> -->
  263. <div class="flex-endbox">
  264. <FormItem label="佣金金额" prop="commission" class="d-felx">
  265. <Input v-model="member.commission" type="text" @on-keyup="keyupSale('5')" :maxlength="9"
  266. placeholder="请输入佣金金额" :disabled="finish_dis || pass_all_incomplete_dis"></Input>
  267. <span class="money-unit">元</span>
  268. </FormItem>
  269. <FormItem label="手续费" prop="proceduresMoney" class="d-felx">
  270. <Input v-model="member.proceduresMoney" type="text" @on-keyup="keyupSale('6')" :maxlength="9"
  271. placeholder="请输入手续费" :disabled="finish_dis || pass_all_incomplete_dis"></Input>
  272. <span class="money-unit">元</span>
  273. </FormItem>
  274. </div>
  275. <FormItem label="协议信息" class="formTitle">
  276. </FormItem>
  277. <div class="flex-endbox">
  278. <FormItem label="协议状态" prop="agreementStatus">
  279. <RadioGroup v-model="member.agreementStatus" @on-change="agreementStatusChange">
  280. <Radio :label="item.v" v-for="(item, index) in agreeStatus" :value="item.v" :key="index">{{ item.n }}
  281. </Radio>
  282. </RadioGroup>
  283. </FormItem>
  284. <FormItem label="签约主体">
  285. <v-cascader ref="casRef2" :initVal="'h01'" placeholderType="签约主体" reqType="签约主体"
  286. @levelChange="paybackChange" :disabled="finish_dis" v-if="bShow"></v-cascader>
  287. </FormItem>
  288. </div>
  289. <div class="flex-endbox">
  290. <FormItem label="协议签订时间" v-show="member.agreementStatus == '1'">
  291. <date-sigle ref="sigleRef" :dateType="'date'" :placeholderd="'请选择协议签订时间'" @startDate="agreeDate"
  292. :overTime="0"></date-sigle>
  293. </FormItem>
  294. <FormItem label="协议编号" v-show="member.agreementStatus == '1' && !showOnlineContractForm">
  295. <Input v-model="member.agreementNumber" type="text" placeholder="请输入协议编号"></Input>
  296. </FormItem>
  297. </div>
  298. <!-- v-show="showOpenXieYi" -->
  299. <div class="showmore">
  300. <div class="flex-endbox">
  301. <FormItem label="协议归档状态" v-show="member.agreementStatus == '1'">
  302. <RadioGroup v-model="member.contract_archive_status">
  303. <Radio label="0">未归档</Radio>
  304. <Radio label="1">已归档</Radio>
  305. </RadioGroup>
  306. </FormItem>
  307. <FormItem label="归档时间" v-show="member.agreementStatus == '1' && member.contract_archive_status == '1'">
  308. <date-sigle ref="sigleRef4" :dateType="'date'" :placeholderd="'请选择归档时间'" @startDate="guiDate"
  309. :overTime="0"></date-sigle>
  310. </FormItem>
  311. </div>
  312. <div class="flex-endbox">
  313. <FormItem label="归档份数" v-show="member.agreementStatus == '1' && member.contract_archive_status == '1'">
  314. <Input v-model="member.contract_archive_num" type="tel" maxlength="4" @on-keyup="payHandler"
  315. placeholder="请输入归档份数"></Input>
  316. </FormItem>
  317. <FormItem label="归档协议" class="chuan-pay" v-show="member.contract_archive_status == '1'">
  318. <b-upload ref="uploadRef" @fileData="contractFile" :placeholdered="'请上传归档协议'"
  319. :accepted="'.doc,.pdf,.docx,.rar,.zip,.jpg,.png,.jpeg'"
  320. :formated="['doc', 'pdf', 'docx', 'rar', 'zip', 'jpg', 'png', 'jpeg']" :multipled="false"
  321. @onRemove="onRemoveUpload"></b-upload>
  322. </FormItem>
  323. </div>
  324. </div>
  325. <OnlineContractForm ref="onlineContractFormRef" :has-disabled="pass_all_incomplete_dis"
  326. :disabled-filed="['e_contract_remark']" :showMore="showOpenXieYi" v-if="showOnlineContractForm"
  327. :buySubject="member.buySubject" :orderEntName="member.companyName"
  328. :e_contract_type.sync="member.e_contract_type" :e_contract_userA_type.sync="member.e_contract_userA_type"
  329. :e_contract_userA_name.sync="member.e_contract_userA_name"
  330. :e_contract_userA_contacts_name.sync="member.e_contract_userA_contacts_name"
  331. :e_contract_userA_contacts_tel.sync="member.e_contract_userA_contacts_tel"
  332. :e_contract_userA_contacts_address.sync="member.e_contract_userA_contacts_address"
  333. :e_contract_userB_contacts_name.sync="member.e_contract_userB_contacts_name"
  334. :e_contract_remark.sync="member.e_contract_remark" />
  335. <div style="display: flex;justify-content: center;" v-show="!showOpenXieYi">
  336. <div @click="showXieYi = !showXieYi" style="color: #36a3f7;cursor: pointer; font-size: 14px;">
  337. <span>更多信息</span>
  338. <i class="el-icon-arrow-down"></i>
  339. </div>
  340. </div>
  341. <FormItem label="回款计划" class="formTitle"></FormItem>
  342. <FormItem label="回款次数" required>
  343. <Input v-model.trim="member.paybackNum" type="text" @on-keyup="keyupformat('paybackNum')"
  344. style="width: 80px" :disabled="pass_all_incomplete_dis"></Input><span style="margin-left: 5px;">次</span>
  345. </FormItem>
  346. <!-- 回款列表 -->
  347. <FormItem label="" v-show="member.paybackNum > 1">
  348. <Table border :columns="paybackTable" :data="paybackTableData">
  349. <template slot-scope="{ row }" slot="code">
  350. <strong>{{ row.code }}</strong>
  351. </template>
  352. <template slot-scope="{ row, index }" slot="time">
  353. <strong v-if="row.code == '合计'">-</strong>
  354. <date-sigle :ref="'paybackTime' + index" :dateType="'date'" :dataV="paybackTableData[index].time"
  355. :placeholderd="'请选择'" @startDate="paybackTableChange(row, index, 'time', $event)" :overTime="0"
  356. :disabled="pass_all_incomplete_dis" v-else></date-sigle>
  357. </template>
  358. <template slot-scope="{ row, index }" slot="money">
  359. <strong v-if="row.code == '合计'">{{ member.payMoney || '-' }}</strong>
  360. <Input v-model.trim="paybackTableData[index].money" @on-keyup="paybackTableChange(row, index, 'money')"
  361. type="number" @mousewheel.native.prevent @DOMMouseScroll.native.prevent placeholder="请输入"
  362. :disabled="index + 1 == member.paybackNum || pass_all_incomplete_dis" v-else></Input>
  363. </template>
  364. </Table>
  365. </FormItem>
  366. <FormItem label=" " :label-width="55" class="d-felx" required v-show="member.paybackNum == 1">
  367. <span v-if="member.agreementStatus == '1'">自协议签订之日起</span>
  368. <span v-else>自订单创建之日起</span>
  369. <Input v-model.trim="member.paybackWorkDayNum" type="text" @on-keyup="keyupformat('paybackWorkDayNum')"
  370. style="width: 60px;margin-left:10px;margin-right: 10px;" :disabled="pass_all_incomplete_dis"></Input>
  371. <span> 个工作日回款,预计回款时间:<span style="color: #36a3f7">{{ member.paybackExpectDate }}</span></span>
  372. </FormItem>
  373. <FormItem label="业绩归属" class="formTitle">
  374. </FormItem>
  375. <div class="flex-endbox">
  376. <FormItem label="业绩归属部门" required>
  377. <!-- <Cascader v-model="member.saleCodeModel" change-on-select :data="saleDep" trigger="hover" @on-change="saleDepChange"></Cascader> -->
  378. <cascaderMulti class="truecascader" v-model="member.saleCodeModel" :data="saleDep" multiple
  379. @on-change="saleDepChange"></cascaderMulti>
  380. </FormItem>
  381. <FormItem label="业绩统计时间">
  382. <date-sigle ref="sigleRef3" :dateType="'date'" :dataV="member.sale_time" :placeholderd="'请选择业绩统计时间'"
  383. @startDate="saleDate" :overTime="0"></date-sigle>
  384. </FormItem>
  385. </div>
  386. <FormItem label="销售人员">
  387. <sale-select ref="saleRef" :saleType="'1'" @salePerson="salePerson" v-if="bShow"></sale-select>
  388. </FormItem>
  389. <FormItem class="table-order1" v-show="saleTableData.length > 2">
  390. <Table border :columns="saleTable" :data="saleTableData">
  391. <template slot-scope="{ row }" slot="name">
  392. <strong>{{ row.name }}</strong>
  393. </template>
  394. <template slot-scope="{ row, index }" slot="money">
  395. <Input v-model="saleTableData[index].money" @on-keyup="saleTableChange(index)" type="number"></Input>
  396. </template>
  397. </Table>
  398. </FormItem>
  399. <FormItem label="销售渠道" prop="salesChannel">
  400. <v-cascader ref="casRef" type="1" quType="1" placeholderType="请选择销售渠道" reqType="销售渠道"
  401. @levelChange="salesChange" v-if="bShow"></v-cascader>
  402. </FormItem>
  403. <FormItem label="其他信息" class="formTitle">
  404. </FormItem>
  405. <div class="flex-endbox">
  406. <FormItem label="约定支付方式" required>
  407. <Select v-model="member.payType" placeholder="请选择约定支付方式" :disabled="finish_dis">
  408. <Option v-for="item in payTypes" :value="item.v" :key="item.v">{{ item.n }}</Option>
  409. </Select>
  410. </FormItem>
  411. <FormItem label="下单渠道" prop="orderChannel">
  412. <v-cascader ref="casRef1" :initVal="'d01'" placeholderType="请选择下单渠道" reqType="下单渠道"
  413. @levelChange="channelChange" v-if="bShow"></v-cascader>
  414. </FormItem>
  415. </div>
  416. <div>
  417. <FormItem label="订单备注">
  418. <Input v-model="member.remark" type="text" :maxlength="40" placeholder="请输入订单备注"></Input>
  419. </FormItem>
  420. <!-- p504 编辑订单我的订单状态不在隐藏 隐藏已完成选项-->
  421. <FormItem label="订单状态" prop="order_status">
  422. <Select v-model="member.order_status" placeholder="请选择订单状态">
  423. <Option value="0" :disabled="noFinishDis || finish_dis">未完成</Option>
  424. <Option value="1" :disabled="finishDis || finish_dis" v-if="returnMyReceivable">已完成</Option>
  425. <Option value="-2" :disabled="cancelDis || interested || finish_dis">已取消</Option>
  426. </Select>
  427. </FormItem>
  428. </div>
  429. <!-- <div style="display: flex;justify-content: center;" v-show="!showOrderOther">
  430. <div @click="showOrderOther = !showOrderOther" style="color: #36a3f7;cursor: pointer; font-size: 14px;">
  431. <span>更多信息</span>
  432. <i class="el-icon-arrow-down"></i>
  433. </div>
  434. </div> -->
  435. </div>
  436. </Form>
  437. </div>
  438. <div slot="footer" style="width: 100%">
  439. <!--修改订单-->
  440. <div v-if="!readonly">
  441. <Button type="primary" size="large" @click="ordConfirm()" :disabled="isDisable">提交</Button>
  442. <Button size="large" @click="ordCancel()">取消</Button>
  443. </div>
  444. <!--审核订单-->
  445. <div v-else-if="readonly && doReview" style="width: 90%">
  446. <Form :show-message="false" :label-width="110">
  447. <FormItem label="审核结论">
  448. <RadioGroup v-model="orderReview.pass">
  449. <Radio label="通过"></Radio>
  450. <Radio label="退回"></Radio>
  451. </RadioGroup>
  452. </FormItem>
  453. <FormItem label="审核备注">
  454. <Input v-model="orderReview.reason" type="textarea" :autosize="{ minRows: 2, maxRows: 5 }"
  455. placeholder="请输入审核备注" maxlength="200" />
  456. </FormItem>
  457. </Form>
  458. <div style="width: 100%;display: flex;justify-content: center;flex-direction: row;">
  459. <Button size="large" type="primary" @click="commitReview()"
  460. :disabled="(orderReview.pass === '退回' && orderReview.reason === '') || this.cancel">提交
  461. </Button>
  462. <Button size="large" :disabled="this.cancel" @click="clearReview">取消</Button>
  463. </div>
  464. </div>
  465. </div>
  466. </Modal>
  467. </div>
  468. </template>
  469. <script>
  470. import { dateFormatter, getDateSub } from '@/assets/js/date'
  471. import dateSigle from '@/components/dateSigle'
  472. import vCascader from '@/components/cascader'
  473. import OnlineContractForm from '@/components/OnlineContractForm'
  474. import bUpload from '@/components/uploadFile.vue'
  475. import saleSelect from './salesSelect.vue'
  476. import reviewRecord from './reviewRecord.vue'
  477. import { debounce } from '@/helper.js'
  478. export default {
  479. name: 'EditBigOrderModal',
  480. components: {
  481. OnlineContractForm,
  482. vCascader,
  483. dateSigle,
  484. bUpload,
  485. saleSelect,
  486. reviewRecord
  487. },
  488. props: {
  489. readonly: {
  490. type: Boolean,
  491. default: false
  492. },
  493. title: {
  494. type: String,
  495. default: '编辑大会员订单'
  496. }
  497. },
  498. computed: {
  499. pass_all_incomplete_dis() { //全部订单-编辑大会员,“订单审核状态”为已通过,订单状态为“未完成”时
  500. return this.returnMyReceivable && this.member.order_status == '0' && this.audit_status == 3
  501. },
  502. subaccountDis() {
  503. if (this.member.buySubject == '1' && (this.bigStas == 1 || this.bigStas == 2)) {
  504. return false
  505. } else if (this.member.buySubject == '2' && this.contactOrderList.length > 0) {
  506. return false
  507. } else {
  508. return true
  509. }
  510. },
  511. proDis: function () {
  512. if (this.member.phone == '') {
  513. return true
  514. } else {
  515. if (this.noPhone) {
  516. return false
  517. } else {
  518. if (!(/^1[3456789]\d{9}$/.test(this.member.phone))) {
  519. return true
  520. } else {
  521. return false
  522. }
  523. }
  524. }
  525. },
  526. bigMemberModuleShow() {
  527. return this.nums !== '' && this.creAuth
  528. },
  529. returnMyReceivable: function () {
  530. let rout = this.$route.query
  531. if (rout.path && rout.path == 'my') {// 我的订单
  532. return false
  533. } else {
  534. return true
  535. }
  536. },
  537. showOnlineContractForm() {
  538. const paybackCompanyCheck = this.member.paybackCompany == 'h01' // 签约主体为:北京剑鱼信息技术有限公司/h01
  539. const contractStatusCheck = this.member.agreementStatus == '1' // 协议状态为签协议
  540. // 展示条件:
  541. // 1. 产品类型是超级订阅(且付费类型为“购买”、“续费”)才展示。
  542. // 2. 产品类型是“大会员”且会员套餐为“商机版2.0”、“专家版2.0”(且服务类型为“新购服务”、“延长服务”)
  543. // memberLevelMap.id:6'商机版2.0'、7'专家版2.0'
  544. const memberLevel = this.member.level
  545. if (!memberLevel || memberLevel == 'undefined') return false
  546. const memberLevelMap = JSON.parse(memberLevel)
  547. // console.log(memberLevelMap)
  548. // createType '1'新建 '2'补充 '3'延期
  549. const createType = this.nums == 0 ? this.member.createType : '1'
  550. // 这里的单省版 是商机版2.0单省版
  551. const bigmemberCheck = (memberLevelMap.id == 6 || memberLevelMap.id == 7 || memberLevelMap.s_name.indexOf('单省版') > -1) && (createType == '1' || createType == '3')
  552. const productTypeCheck = bigmemberCheck
  553. return paybackCompanyCheck && contractStatusCheck && productTypeCheck
  554. },
  555. showOpenXieYi() {
  556. const { e_contract_remark, e_contract_type, e_contract_userA_type, e_contract_userA_name, e_contract_userA_contacts_name, e_contract_userA_contacts_tel, e_contract_userA_contacts_address, contract_archive_status, contract_archive_time, contract_archive_num, contract_file_url } = this.member
  557. const hasEmpty = !e_contract_remark || 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 || contract_archive_status == '0' || !contract_archive_time || !contract_archive_num || !contract_file_url
  558. if (this.title === '创建订单审核') {
  559. return true
  560. } else {
  561. return this.showXieYi || !hasEmpty
  562. }
  563. },
  564. vipval() { //收集多个参数变动 合同性质 购买主体 是否会员 产品
  565. return this.member.contract_nature + this.member.buySubject + this.bigStas + this.member.products + this.member.phone
  566. },
  567. priceChange() {
  568. 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.cycleType
  569. },
  570. vipDis() {
  571. if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 个人续签合同
  572. return true
  573. } else if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) {
  574. // this.member.level = JSON.stringify(this.comVal)
  575. return true
  576. } else if (!this.member.buySubject || !this.member.phone) {
  577. return true
  578. } else {
  579. return false
  580. }
  581. },
  582. },
  583. watch: {
  584. // bigMemberModuleShow (n) {
  585. // if (n) {
  586. // this.$nextTick(() => {
  587. // const { res } = this.olddata
  588. // setTimeout( ()=>{
  589. // if (res.salesperson && res.salesperson_id) {
  590. // let sarr = []
  591. // let sidarr = res.salesperson_id.split(',')
  592. // let saarr = res.salesperson.split(',')
  593. // for (let i = 0; i < saarr.length; i++) {
  594. // sarr.push(JSON.stringify({
  595. // id: Number(sidarr[i]),
  596. // username: saarr[i]
  597. // }))
  598. // }
  599. // console.log(sarr)
  600. // this.$refs.saleRef.salePerson = sarr
  601. // }
  602. // //业绩统计时间
  603. // this.$refs.sigleRef3.dataVals = new Date(res.sale_time)
  604. // },1000)
  605. // setTimeout(()=>{
  606. // if (res.saleMoney&&res.salesperson) {
  607. // this.saleTableData = JSON.parse(res.saleMoney).data
  608. // }
  609. // },2000)
  610. // })
  611. // }
  612. // },
  613. 'member.billingMode': {
  614. handler(val) {
  615. if (this.member.bigMoney == 0 || this.allDis) {
  616. this.bigDis = true
  617. this.member.bigPayMoney = ''
  618. } else {
  619. this.bigDis = false
  620. }
  621. if (this.member.paySub == '' || this.allDis) {
  622. this.subDis = true
  623. this.member.subPayMoney = ''
  624. } else {
  625. this.subDis = false
  626. }
  627. if (this.member.supplyMoney == 0 || this.allDis) {
  628. this.supplyDis = true
  629. this.member.supplyPayMoney = ''
  630. } else {
  631. this.supplyDis = false
  632. }
  633. }
  634. },
  635. vipval() { // 监听变化多参数变动
  636. },
  637. priceChange() {
  638. this.$nextTick(() => {
  639. try {
  640. this.orderPriceCount()
  641. } catch (e) {
  642. // console.log(e)
  643. }
  644. })
  645. },
  646. 'member.remark': {
  647. handler(val) {
  648. if (this.title === '创建订单审核' || val) {
  649. this.showOrderOther = true
  650. }
  651. },
  652. immediate: true
  653. }
  654. },
  655. created() {
  656. this.getSalesChannelItem()
  657. this.getComboList()
  658. },
  659. methods: {
  660. contractChange() {
  661. this.createdTypeChange()
  662. },
  663. orderPriceCount() { // 获取价格
  664. let obj = {}
  665. if (this.member.products == '1') {
  666. obj = {
  667. productType: '大会员',
  668. createType: this.member.buySubject == '2' ? 1 : this.member.createType || '',
  669. level: JSON.parse(this.member.level).id || 5,
  670. payCycle: this.member.payCycle || '',
  671. cycleType: this.member.cycleType == '0' ? 2 : 3 || '',
  672. startTime: this.member.createType == 2 || this.member.createType == 3 ? '' : this.member.beginTime || '',
  673. products: this.member.products + '', // 产品类型
  674. comboId: JSON.parse(this.member.level).id || 5,
  675. buySubject: this.member.buySubject,
  676. buyCount: this.member.buyCount,
  677. phone: this.member.phone
  678. }
  679. // if(this.member.createType == '3'){
  680. // obj.comboId = this.i_member_status
  681. // }
  682. if (this.member.level && JSON.parse(this.member.level).i_ispreinstall == 0) {
  683. obj.serversId = String(this.form_serve.ids)
  684. obj.level = 5
  685. obj.comboId = 5
  686. }
  687. }
  688. if (this.member.products == '3') { // 补充包
  689. obj = {
  690. products: this.member.products + '', // 产品类型
  691. productType: '大会员',
  692. buyCount: this.member.buyCount,
  693. phone: this.member.phone,
  694. buySubject: this.member.buySubject,
  695. createType: 1
  696. }
  697. if (this.datas2.length > 0) {
  698. let serveData = []
  699. this.datas2.forEach(v => {
  700. serveData.push({
  701. id: v.id,
  702. name: v.name,
  703. price: v.price,
  704. count: v.count * v.s_pkcount
  705. })
  706. })
  707. this.serveDatawrap = serveData
  708. }
  709. obj.serversArr = this.serveDatawrap
  710. }
  711. if (this.member.products == '2') { //子账号
  712. obj = {
  713. products: this.member.products + '', // 产品类型
  714. productType: '大会员',
  715. buyCount: this.member.buyCount,
  716. phone: this.member.phone,
  717. buySubject: this.member.buySubject,
  718. createType: 1
  719. }
  720. if (this.member.buySubject == '2') {
  721. obj.orderCode = this.member.contactOrderCode
  722. }
  723. }
  724. if (!obj.createType) {
  725. obj.createType = '1'
  726. }
  727. if (this.member.products == '1' && obj.phone && obj.buyCount && obj.buySubject) {
  728. if (this.member.createType == '1' && (!obj.payCycle || !obj.cycleType)) {
  729. return
  730. }
  731. this.getpriceAjax(obj)
  732. } else if (this.member.products == '2' && obj.phone && obj.buyCount && obj.buySubject) {
  733. if (this.member.buySubject == '2' && !obj.orderCode) {
  734. this.$Notice.warning({ title: '请选择关联订单' })
  735. return
  736. }
  737. this.getpriceAjax(obj)
  738. } else if (this.member.products == '3' && obj.phone && obj.buySubject && obj.serversArr && obj.serversArr.length > 0) {
  739. this.getpriceAjax(obj)
  740. }
  741. },
  742. getpriceAjax(obj) {
  743. if (this.pricetimer) {
  744. clearTimeout(this.pricetimer)
  745. }
  746. this.pricetimer = setTimeout(() => {
  747. this.$request('/order/orderPriceCount').data(obj).success((res) => {
  748. // if(!res.data.price){
  749. // return
  750. // }
  751. this.member.orderMoney = res.data.price
  752. }).post()
  753. }, 200);
  754. },
  755. createdTypeChange() { // 套餐自动勾选逻辑
  756. try {
  757. if (!this.member.phone || !this.member.buySubject || !this.member.contract_nature) {
  758. return
  759. }
  760. if (this.member.buySubject == '2') {
  761. return
  762. }
  763. if (this.audit_status === 0) {
  764. this.newServedata = JSON.parse(JSON.stringify(this.initnewServedata))
  765. }
  766. if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) { // 合同性质为“新签合同”,且开通权益手机号已有大会员权限,则会员套餐默认为“自定义版”,不支持修改。
  767. this.newServedata = JSON.parse(JSON.stringify(this.initnewServedata)) // 初始化服务列表数据
  768. this.radiosChangelevel(JSON.stringify(this.comVal))
  769. this.member.level = JSON.stringify(this.comVal)
  770. if (this.nums == 0) {
  771. clearTimeout(timer)
  772. let timer = setTimeout(() => {
  773. if (this.member.phone) {
  774. this.currentServer(this.member.phone, (res) => {
  775. let ids = res.data.list
  776. this.echoServe(ids, 'hide', ids)
  777. let time = dateFormatter(res.data.serviceEndTime, 'yyyy-MM-dd') || '-'
  778. this.Purchasedservices(time)
  779. this.getserveIdAndname()
  780. })
  781. }
  782. }, 200);
  783. }
  784. }
  785. if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 个人续签合同
  786. if (this.i_member_status) {
  787. this.newServedata = JSON.parse(JSON.stringify(this.initnewServedata)) // 初始化服务列表数据
  788. this.levelDown.forEach(ele => {
  789. if (this.areaCount > 0 || this.member.areaCount > 0) {// 单省版
  790. if (ele && ele.s_name.indexOf('单省版') > -1) {
  791. this.radiosChangelevel(JSON.stringify(ele))
  792. this.member.level = JSON.stringify(ele)
  793. }
  794. } else {
  795. if (ele && ele.id == this.i_member_status) {
  796. this.radiosChangelevel(JSON.stringify(ele))
  797. this.member.level = JSON.stringify(ele)
  798. }
  799. }
  800. })
  801. if (this.i_member_status == 5) { // 自定义
  802. this.radiosChangelevel(JSON.stringify(this.comVal))
  803. this.member.level = JSON.stringify(this.comVal)
  804. clearTimeout(timer)
  805. let timer = setTimeout(() => {
  806. if (this.member.phone) {
  807. this.currentServer(this.member.phone, (res) => {
  808. let ids = res.data.list
  809. this.echoServe(ids, 'allDis')
  810. this.getserveIdAndname()
  811. })
  812. }
  813. }, 200);
  814. }
  815. } else {
  816. this.member.level = ''
  817. }
  818. }
  819. this.modifycreateType()
  820. } catch (e) {
  821. // console.log(e)
  822. }
  823. },
  824. getNewservedata(status) {
  825. this.$request('/order/getServerNew').data().success((res) => { // 获取自定义套餐所有服务选项
  826. let data = res.data.lists
  827. data.forEach(ele => {
  828. if (ele.Children.length > 0) {
  829. ele.maps = groupByProperty(ele.Children, 's_new_name')
  830. }
  831. })
  832. // data.forEach(ele => {
  833. // for (const key in ele.maps) {
  834. // if(ele.maps[key].length>1){
  835. // if(key.indexOf('数据导出') == -1){
  836. // ele.maps[key].unshift({'s_new_name':ele.maps[key][0].s_new_name,id:'',s_count_year:10})
  837. // }
  838. // }
  839. // }
  840. // })
  841. data.forEach(ele => {
  842. ele.lists = []
  843. for (const key in ele.maps) {
  844. let obj = {}
  845. obj.name = key
  846. obj.list = ele.maps[key]
  847. if (obj.list.length == 1) {
  848. obj.id = ele.maps[key][0].id
  849. }
  850. if (obj.list.length > 1) {
  851. obj.list.forEach(e => {
  852. if (e.s_new_name.indexOf('数据导出') > -1) {
  853. e.dw = '条/天'
  854. if (e.s_count_year == 200) {
  855. obj.id = e.id
  856. }
  857. } else {
  858. e.dw = '个'
  859. if (e.s_count_year == 100) {
  860. obj.id = e.id
  861. }
  862. }
  863. })
  864. }
  865. ele.lists.push(obj)
  866. }
  867. })
  868. // 初始勾选处理
  869. data.forEach(ele => {
  870. if (ele.ColumnName == '基础服务') { // 基础服务默认勾选且不可修改
  871. ele.choose = true
  872. ele.disabled = true
  873. } else {
  874. ele.choose = false
  875. ele.disabled = false
  876. }
  877. ele.lists.forEach(e => {
  878. if (e.id == 1) {
  879. e.choose = true
  880. e.disabled = true
  881. } else {
  882. e.choose = false
  883. e.disabled = false
  884. }
  885. })
  886. })
  887. data.forEach(ele => {
  888. ele.lists.forEach(e => {
  889. let newlist = e.list.sort((a, b) => a.s_count_year - b.s_count_year)
  890. ele.list = newlist
  891. })
  892. })
  893. this.newServedata = data
  894. this.initnewServedata = JSON.parse(JSON.stringify(this.newServedata))
  895. console.log(this.newServedata)
  896. if (status === 0) { // 订单状态 待提交
  897. if (this.member.createType == '2') { // 补充服务
  898. this.currentServer(this.member.phone, (res) => {
  899. let ids = res.data.list
  900. this.echoServe(this.curIds, 'hide', ids)
  901. let time = dateFormatter(res.data.serviceEndTime, 'yyyy-MM-dd') || '-'
  902. this.Purchasedservices(time)
  903. })
  904. } else if (this.member.createType == '3') { // 延长服务
  905. this.echoServe(this.curIds, 'allDis') // 服务回显
  906. } else {
  907. this.echoServe(this.curIds) // 服务回显
  908. }
  909. } else {
  910. if (this.member.createType == '2') { // 补充服务
  911. this.currentServer(this.member.phone, (res) => {
  912. let ids = res.data.list
  913. let time = dateFormatter(res.data.serviceEndTime, 'yyyy-MM-dd') || '-'
  914. this.echoServe(this.curIds, 'hide_dis', ids)
  915. this.Purchasedservices(time)
  916. })
  917. } else {
  918. this.echoServe(this.curIds, 'allDis') // 服务回显
  919. }
  920. }
  921. }).get()
  922. // 基础数据格式处理 下拉默认选中ID及单位处理
  923. function groupByProperty(arr, prop) {
  924. let groups = {};
  925. arr.forEach(item => {
  926. let group = groups[item[prop]];
  927. if (!group) {
  928. group = groups[item[prop]] = [];
  929. }
  930. group.push(item);
  931. });
  932. return groups;
  933. }
  934. },
  935. chooseChange(e, t, index) {
  936. console.log(e, t)
  937. let data = this.newServedata
  938. if (t == 'one') {
  939. data[index].lists.forEach(e => {
  940. if (data[index].choose) {
  941. e.choose = true
  942. } else {
  943. e.choose = false
  944. }
  945. })
  946. } else if (t == 'two') {
  947. console.log(data[index])
  948. if (data[index].lists.every(item => item.choose === true)) {
  949. data[index].choose = true
  950. } else {
  951. data[index].choose = false
  952. }
  953. }
  954. this.getserveIdAndname()
  955. },
  956. getserveIdAndname(type) { // 获取服务id和name
  957. let key = 'choose'
  958. if (type == 'getbuyserve') {
  959. key = 'hide'
  960. }
  961. let data = this.newServedata || []
  962. let ids = []
  963. let names = []
  964. data.forEach(ele => {
  965. ele.lists.forEach(e => {
  966. if (e[key]) {
  967. ids.push(e.id)
  968. if (e.id == 22 || e.id == 20 || e.id == 24) { // 项目进度监控 22 100 14 500 企业情报监控20 100 23 500 业主监控 24 100 25 500
  969. names.push(e.name + '(100个)')
  970. } else if (e.id == 14 || e.id == 23 || e.id == 25) {
  971. names.push(e.name + '(500个)')
  972. } else if (e.id == 17) { //数据导出
  973. names.push(e.name + '(100条/天)')
  974. } else if (e.id == 18) {
  975. names.push(e.name + '(200条/天)')
  976. } else if (e.id == 1) {
  977. if (this.member.buySubject == '2') {
  978. names.push('基础服务' + '+企业管理')
  979. } else {
  980. names.push('基础服务')
  981. }
  982. } else {
  983. names.push(e.name)
  984. }
  985. }
  986. })
  987. })
  988. // 基础服务: 服务id需要传1 3 企业情报监控包含:企业情报监控 20 23 企业情报监控传20的时候 企业中标动态传21 企业中标动态 21 13 企业情报监控传23的时候 企业中标动态传13
  989. if (ids.includes(1) && !ids.includes(3)) {
  990. ids.push(3)
  991. }
  992. if (ids.includes(20) && !ids.includes(21)) {
  993. ids.push(21)
  994. }
  995. if (ids.includes(23) && !ids.includes(13)) {
  996. ids.push(13)
  997. }
  998. // console.log(ids,names)
  999. if (type == 'getbuyserve') {
  1000. return { ids, names }
  1001. } else {
  1002. this.form_serve = { ids, names }
  1003. }
  1004. },
  1005. Purchasedservices(time) { // 回显已买服务
  1006. let { names } = this.getserveIdAndname('getbuyserve')
  1007. this.buyserveName = names.join('、')
  1008. this.serveEndtime = time
  1009. },
  1010. echoServe(ids, type, hide_id) { // 回显服务 dis禁用已勾选 allDis禁用全部 hide隐藏 hide_dis 隐藏指定禁用剩下的
  1011. let data = ids
  1012. if (!data.includes(1)) { // 1 3 基础服务默认都有
  1013. data.push(1)
  1014. }
  1015. if (!data.includes(3)) {
  1016. data.push(3)
  1017. }
  1018. let hide = hide_id || []
  1019. if (!hide.includes(1)) { // 1 3 基础服务默认都有
  1020. hide.push(1)
  1021. }
  1022. if (!hide.includes(3)) { // 1 3 基础服务默认都有
  1023. hide.push(3)
  1024. }
  1025. let servedata = this.newServedata
  1026. servedata.forEach(ele => {
  1027. ele.lists.forEach(e => {
  1028. e.list.forEach(item => {
  1029. if (data.includes(item.id)) {
  1030. e.id = item.id
  1031. e.choose = true
  1032. if (type == 'dis') { // 禁用已勾选
  1033. e.disabled = true
  1034. item.disabled = true
  1035. ele.disabled = true
  1036. }
  1037. }
  1038. if (hide.includes(item.id)) {
  1039. if (type == 'hide' || type == 'hide_dis') {
  1040. e.hide = true
  1041. item.hide = true
  1042. ele.hide = true
  1043. e.disabled = true
  1044. item.disabled = true
  1045. ele.disabled = true
  1046. }
  1047. }
  1048. if (type == 'allDis' || type == 'hide_dis') { // 禁用全部选项
  1049. e.disabled = true
  1050. item.disabled = true
  1051. ele.disabled = true
  1052. }
  1053. })
  1054. })
  1055. })
  1056. servedata.forEach(ele => {
  1057. if (ele.lists.every(item => item.choose === true)) {
  1058. ele.choose = true
  1059. } else {
  1060. ele.choose = false
  1061. }
  1062. if ((type == 'hide' || type == 'hide_dis') && ele.lists.every(item => item.hide === true)) {
  1063. ele.hide = true
  1064. } else {
  1065. ele.hide = false
  1066. }
  1067. })
  1068. },
  1069. modifycreateType() { // createType赋值
  1070. this.member.createType = ''
  1071. if (this.member.contract_nature == '2' && this.member.buySubject == '1') { // 当“合同性质”为“续签合同”时,购买主体为“个人”,默认为“延长服务”
  1072. this.member.createType = '3'
  1073. } else if (this.bigStas == 0) { // 没有大会员权限
  1074. this.member.createType = '1'
  1075. } else if (this.member.contract_nature == '1' && this.member.buySubject == '1' && (this.bigStas == 2 || this.bigStas == 1)) { //当开通权益手机号已有大会员权限,购买主体为“个人”,“合同性质”为“新签合同”,默认为“补充服务”
  1076. this.member.createType = '2'
  1077. } else if (this.member.buySubject == '2') {
  1078. this.member.createType = '1'
  1079. }
  1080. this.repair = this.member.createType
  1081. console.log(this.member.createType)
  1082. },
  1083. getComboList() { // 获取会员套餐
  1084. const levelDown = []
  1085. this.$request('/order/getCombo').data().success((res) => {
  1086. // let newobj = {}
  1087. res.data.lists.forEach(v => {
  1088. if (v.id !== 4) {// 试用版
  1089. levelDown.push(v)
  1090. }
  1091. // if(v.id == 6){ // 商机版2.0
  1092. // newobj = JSON.parse(JSON.stringify(v))
  1093. // newobj.s_name = newobj.s_name+'(单省版)'
  1094. // this.levelDown.push(newobj)
  1095. // }
  1096. })
  1097. this.levelDown = levelDown
  1098. }).get()
  1099. },
  1100. getSalesChannelItem() {
  1101. this.$request('/order/getSalesChannelItem').data({
  1102. name: this.reqType
  1103. }).success((resdata) => {
  1104. if (resdata.data.dep) {
  1105. this.saleDep = resdata.data.dep
  1106. }
  1107. }).post()
  1108. },
  1109. commitReview() { // 审核
  1110. if (this.cancel) {
  1111. return
  1112. }
  1113. this.cancel = true
  1114. this.$request('/order/ordersExamine').data({
  1115. orderCode: this.orderCode,
  1116. state: this.orderReview.pass === '通过' ? 1 : -1,
  1117. reason: this.orderReview.reason,
  1118. // this.orderReview.pass === '通过' ? '' : this.orderReview.reason,
  1119. }).success((r) => {
  1120. if (r.status === "success") {
  1121. this.$Notice.success({ title: '审核成功' })
  1122. this.bShow = false
  1123. this.$parent.flushList()
  1124. this.orderReview = {
  1125. pass: "通过",
  1126. reason: ""
  1127. }
  1128. }
  1129. setTimeout(() => {
  1130. this.cancel = false
  1131. }, 500)
  1132. }).post()
  1133. },
  1134. keyupSale(val) { // 格式化金额
  1135. if (val === '1') {
  1136. this.member.payMoney = this.moneyReg(this.member.payMoney)
  1137. if (this.member.paybackNum > 1) {
  1138. this.paybackTableDataClear()
  1139. }
  1140. } else if (val === '2') {
  1141. this.member.bigPayMoney = this.moneyReg(this.member.bigPayMoney)
  1142. } else if (val === '3') {
  1143. this.member.subPayMoney = this.moneyReg(this.member.subPayMoney)
  1144. } else if (val === '4') {
  1145. this.member.supplyPayMoney = this.moneyReg(this.member.supplyPayMoney)
  1146. } else if (val === '5') {
  1147. this.member.commission = this.moneyReg(this.member.commission)
  1148. } else if (val === '6') {
  1149. this.member.proceduresMoney = this.moneyReg(this.member.proceduresMoney)
  1150. }
  1151. this.updateSaleMoney()
  1152. },
  1153. paybackTableDataClear(){ // 初始化回款列表
  1154. let num = this.member.paybackNum
  1155. let arr = []
  1156. for (let i = 0; i <= num; i++) {
  1157. if(i == num){
  1158. arr.push({code:'合计',time:'-',money:this.member.payMoney})
  1159. }else{
  1160. arr.push({code:i + 1,time:'',money:''})
  1161. }
  1162. }
  1163. this.paybackTableData = arr
  1164. this.$nextTick(()=>{
  1165. this.paybackTableData.forEach((ele,index)=>{
  1166. if(index < this.paybackTableData.length - 1 ){
  1167. this.$refs['paybackTime'+index].initd()
  1168. }
  1169. })
  1170. })
  1171. },
  1172. keyupformat(val) { // 格式化输入框
  1173. if (val === 'paybackWorkDayNum') {
  1174. this.member.paybackWorkDayNum = this.filterNonPositiveIntegers(this.member.paybackWorkDayNum)
  1175. this.getcollectionDate()
  1176. } else if (val === 'paybackNum') { // 回款次数
  1177. this.member.paybackNum = this.paybackNumReg(this.member.paybackNum)
  1178. if (this.member.paybackNum > 1) {
  1179. this.paybackTableDataClear()
  1180. } else {
  1181. // 切换一次重置数值
  1182. this.member.paybackWorkDayNum = ''
  1183. this.member.paybackExpectDate = ''
  1184. }
  1185. }
  1186. },
  1187. paybackTableChange(row, index, type, e) { // 回款计划表格 change
  1188. if (type == 'money') {
  1189. // 回款金额未录入时
  1190. if (!this.member.payMoney) {
  1191. this.$Notice.warning({ title: '请先输入合同金额' })
  1192. this.paybackTableData[index].money = ''
  1193. return
  1194. }
  1195. let num = 0
  1196. if (this.paybackmoneyReg(this.paybackTableData[index].money)) {
  1197. let money_ = this.paybackmoneyReg(this.paybackTableData[index].money)
  1198. this.paybackTableData[index].money = Number(money_).fixed(2)
  1199. } else {
  1200. this.paybackTableData[index].money = ''
  1201. }
  1202. this.paybackTableData.forEach((ele, index) => {
  1203. if (index < this.paybackTableData.length - 2) {
  1204. num += Number(ele.money)
  1205. }
  1206. })
  1207. if (num && this.member.payMoney) {
  1208. if(Number(this.member.payMoney ) - Number(num) > 0){
  1209. this.paybackTableData[this.member.paybackNum -1].money = (Number(this.member.payMoney ) - Number(num)).fixed(2)
  1210. }else{
  1211. this.$Notice.warning({ title: '需小于合同金额' })
  1212. this.paybackTableData[index].money= ''
  1213. }
  1214. this.paybackTableData.forEach((ele)=>{
  1215. if(ele.code == '合计' ){
  1216. ele.money = Number(this.member.payMoney )
  1217. }
  1218. })
  1219. } else {
  1220. this.paybackTableData[this.member.paybackNum - 1].money = ''
  1221. }
  1222. } else if (type == 'time') {
  1223. if (e) {
  1224. this.paybackTableData[index].time = e
  1225. }
  1226. }
  1227. console.log(this.paybackTableData)
  1228. },
  1229. paybackmoneyReg(val) {
  1230. if(val){
  1231. let str = this.moneyReg(val + "")
  1232. if (str == 0 && str !== '') {
  1233. this.$Notice.warning({ title: '不可为0' })
  1234. str = ''
  1235. } else if (Number(str) >= Number(this.member.payMoney)) {
  1236. this.$Notice.warning({ title: '需小于合同金额' })
  1237. str = ''
  1238. }
  1239. return str
  1240. }else{
  1241. return ""
  1242. }
  1243. },
  1244. paybackNumReg(val) {
  1245. let str = val.toString().replace(/-\d+|[^\d\s,]+/g, '')
  1246. if (str !== "" && str < 1) {
  1247. this.$Notice.warning({ title: '最小值为1' })
  1248. str = 1
  1249. } else if (str > 5) {
  1250. this.$Notice.warning({ title: '最大值为5' })
  1251. str = 5
  1252. }
  1253. if (str && str > 0) {
  1254. return Number(str)
  1255. } else {
  1256. return ''
  1257. }
  1258. },
  1259. getcollectionDate: debounce(function () {
  1260. if(this.member.paybackNum != 1){
  1261. return
  1262. }
  1263. let start = ''
  1264. this.member.paybackExpectDate = ''
  1265. if (this.member.paybackWorkDayNum === 0) {
  1266. if (this.member.agreementStatus == '1') {
  1267. this.member.paybackExpectDate = dateFormatter(this.member.agreementTime * 1000, 'yyyy-MM-dd')
  1268. } else {
  1269. this.member.paybackExpectDate = dateFormatter(this.member.createTime, 'yyyy-MM-dd')
  1270. }
  1271. return
  1272. }
  1273. if (this.member.agreementStatus == '1') { //签协议
  1274. start = dateFormatter(this.member.agreementTime * 1000, 'yyyy-MM-dd')
  1275. } else {//不签协议
  1276. // start = dateFormatter(new Date(), 'yyyy-MM-dd')
  1277. start = dateFormatter(this.member.createTime, 'yyyy-MM-dd')
  1278. }
  1279. if (this.member.paybackWorkDayNum === "" || !start) {
  1280. return
  1281. }
  1282. let obj = {
  1283. startDay: start,
  1284. workDayNum: Number(this.member.paybackWorkDayNum),
  1285. }
  1286. this.$request('getWorkDay').contentType('application/json').data(obj).success((res) => {
  1287. if (res.data) {
  1288. this.member.paybackExpectDate = res.data
  1289. }
  1290. }).post('rewritePath')
  1291. }, 200),
  1292. filterNonPositiveIntegers(str) {
  1293. let strs = str + ""
  1294. let num = strs.replace(/-\d+|[^\d\s,]+/g, '')
  1295. if (num && num >= 0) {
  1296. return Number(num)
  1297. } else {
  1298. return ''
  1299. }
  1300. },
  1301. saleTableChange(index) { // 销售人员 金额变动
  1302. let money = Number(this.saleTableData[index].money).fixed(2)
  1303. this.saleTableData[index].money = money
  1304. let moneys = 0
  1305. this.saleTableData.forEach(v => {
  1306. if (v.name !== '合计') {
  1307. moneys += v.money
  1308. }
  1309. })
  1310. this.saleTableData[this.saleTableData.length - 1].money = moneys
  1311. },
  1312. updateSaleMoney() {
  1313. let money = Number(this.member.bigPayMoney) + Number(this.member.subPayMoney) + Number(this.member.supplyPayMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
  1314. let moneys = Number(money / (this.saleTableData.length - 1)).fixed(2)
  1315. this.saleTableData.forEach(v => {
  1316. if (v.name === '合计') {
  1317. v.money = money
  1318. } else {
  1319. v.money = moneys
  1320. }
  1321. })
  1322. },
  1323. saleDepChange:debounce(function(val) { // 业绩归属部门
  1324. if (val && val.length > 0) {
  1325. let valres = this.getMinLevelData(this.saleDep, val)
  1326. this.saleCode = valres.join(',')
  1327. 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) {
  1328. this.$refs.casRef.getDictItem(() => {
  1329. this.$refs.casRef.setDate('x020')
  1330. })
  1331. this.$refs.casRef.values = ['x02', 'x020'] //业绩归属部门为“销售一部/电销组”或“销售三部”,销售渠道默认为“线下直销/电销”
  1332. this.member.salesChannel = 'x020'
  1333. }
  1334. } else {
  1335. this.saleCode = ''
  1336. }
  1337. },200),
  1338. removeElementFromArray(arr, value) {
  1339. for (let i = 0; i < arr.length; i++) {
  1340. if (arr[i] === value) {
  1341. arr.splice(i, 1)
  1342. i--
  1343. }
  1344. }
  1345. return arr
  1346. },
  1347. getMinLevelData(arrayA, arrayB) {
  1348. const result = []
  1349. const findItem = (arr) => {
  1350. for (let i = 0; i < arr.length; i++) {
  1351. if (arrayB.includes(arr[i].value)) {
  1352. result.push(arr[i].value)
  1353. }
  1354. if (arr[i].children) {
  1355. let arra = arr[i].children
  1356. for (let a = 0; a < arra.length; a++) {
  1357. if (arrayB.includes(arra[a].value)) {
  1358. this.removeElementFromArray(result, arra[a].value.substring(0, 2) + '0000')
  1359. result.push(arra[a].value)
  1360. }
  1361. if (arra[a].children) {
  1362. let arrb = arra[a].children
  1363. for (let b = 0; b < arrb.length; b++) {
  1364. if (arrayB.includes(arrb[b].value)) {
  1365. if (arrayB.includes(arrb[b].value.substring(0, 4) + '00')) {
  1366. this.removeElementFromArray(result, arrb[b].value.substring(0, 4) + '00')
  1367. }
  1368. result.push(arrb[b].value)
  1369. }
  1370. }
  1371. }
  1372. }
  1373. }
  1374. }
  1375. }
  1376. findItem(arrayA)
  1377. return result.reverse()
  1378. },
  1379. radiosChange(val) {
  1380. this.member.buySubject = String(val)
  1381. this.member.buyCount = ''
  1382. this.creAuth = this.member.products
  1383. if (val == 2) {
  1384. this.member.products = '1'
  1385. this.repair = '1'
  1386. this.member.createType = '1'
  1387. this.member.subPayMoney = 0
  1388. }
  1389. this.member.level = ''
  1390. this.nums = ''
  1391. this.datas2 = []
  1392. this.combo_id = ''
  1393. this.member.single = false
  1394. this.member.areaCount = 0
  1395. this.reged()
  1396. if (this.member.buySubject == this.show_buy_subject) {
  1397. this.show(this.olddata)
  1398. }
  1399. },
  1400. buyHandler() {
  1401. this.member.buyCount = this.member.buyCount.replace(/[^\d]+/g, '')
  1402. },
  1403. clearReview() {
  1404. this.bShow = false
  1405. this.orderReview.pass = '通过'
  1406. this.orderReview.reason = ''
  1407. },
  1408. initialized(conf = {}) {// 初始化
  1409. // 排除某些字段不重置
  1410. if (!conf) {
  1411. conf = {}
  1412. }
  1413. const excludeList = conf.excludeList || []
  1414. this.member.bigMoney = 0
  1415. this.member.subMoney = 0
  1416. this.member.supplyMoney = 0
  1417. this.member.orderMoney = 0
  1418. this.member.payMoney = 0
  1419. this.member.sums = 0
  1420. this.member.paySub = ''
  1421. this.member.freeSub = ''
  1422. this.member.bigPayMoney = ''
  1423. this.member.subPayMoney = ''
  1424. this.member.supplyPayMoney = ''
  1425. this.member.payCycle = ''
  1426. this.member.contractUrl = ''
  1427. if (!excludeList.includes('companyName')) {
  1428. this.member.companyName = ''
  1429. }
  1430. this.member.remark = ''
  1431. this.member.agreementStatus = ''
  1432. this.member.agreementNumber = ''
  1433. this.member.cycleType = '0'
  1434. this.member.commission = '0'
  1435. this.member.proceduresMoney = '0'
  1436. this.member.order_status = '1'
  1437. this.member.contract_archive_status = '0'
  1438. this.member.contract_archive_num = ''
  1439. this.sumSel = []
  1440. this.sPrice = 0
  1441. this.strItems = []
  1442. this.selData = []
  1443. this.isAll = false
  1444. this.member.beginTime = ''
  1445. this.bigDis = true
  1446. this.subDis = true
  1447. this.supplyDis = true
  1448. this.cancel = false
  1449. this.strItems1 = []
  1450. this.strItems2 = []
  1451. this.strItems3 = []
  1452. this.strItems4 = []
  1453. this.strItems5 = []
  1454. this.optionDis1 = false
  1455. this.optionDis2 = false
  1456. this.optionDis3 = false
  1457. this.optionDis4 = false
  1458. this.optionDis5 = false
  1459. this.optionDis6 = false
  1460. Object.keys(this.member).forEach(key => {
  1461. if (key.startsWith('e_contract_')) {
  1462. // 默认重置
  1463. if (key !== 'e_contract_userB_contacts_name') { // 乙方联系人不重置
  1464. this.member[key] = this.$options.data().member[key]
  1465. }
  1466. }
  1467. })
  1468. setTimeout(() => {
  1469. // this.$refs.saleRef.salePerson = ''
  1470. let sigs = this.$refs.sigleRef
  1471. let sigs1 = this.$refs.sigleRef3
  1472. let sigs2 = this.$refs.sigleRef4
  1473. let uploads = this.$refs.uploadRef
  1474. if (sigs) {
  1475. this.$refs.sigleRef.initd()
  1476. this.$refs.sigleRef.dataVals = dateFormatter(new Date(), 'yyyy-MM-dd')
  1477. }
  1478. if (sigs1) {
  1479. this.$refs.sigleRef3.dataVals = dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00'
  1480. this.member.sale_time = dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00'
  1481. }
  1482. if (sigs2) {
  1483. this.$refs.sigleRef4.initd()
  1484. }
  1485. if (uploads) {
  1486. this.$refs.uploadRef.uploadShow = false
  1487. this.$refs.uploadRef.payHtml = ''
  1488. }
  1489. }, 200)
  1490. },
  1491. intered(time, phone, money) {// 判断权益是否开通
  1492. if (money > 0) {// 已回款金额
  1493. this.member.order_status = 1
  1494. this.noFinishDis = true
  1495. this.cancelDis = true
  1496. }
  1497. if (time == '2099-01-01 00:00:00' || phone.substr(0, 1) == '9') {// 权益未开通
  1498. this.equity = false
  1499. if (!money || money == 0) {
  1500. this.noFinishDis = false
  1501. this.finishDis = false
  1502. this.cancelDis = false
  1503. } else {
  1504. this.interested = false
  1505. this.returnmoney = false
  1506. }
  1507. } else {// 权益开通
  1508. this.equity = true
  1509. if (this.returnMyReceivable) {
  1510. // this.interested = true
  1511. }
  1512. if (!money || money == 0) {
  1513. this.noFinishDis = false
  1514. this.finishDis = false
  1515. this.cancelDis = true
  1516. } else {
  1517. this.interested = true
  1518. this.returnmoney = true
  1519. }
  1520. }
  1521. },
  1522. moneyReg(val) {
  1523. return val.replace(/[^\d^\.]+/g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
  1524. },
  1525. keyHandler() {
  1526. this.member.phone = this.member.phone.replace(/[^\d]/g, '')
  1527. },
  1528. noPchange(val) {
  1529. if (val) {
  1530. this.pReadon = true
  1531. this.member.phone = 9 + String(Math.random()).substring(2, 12)
  1532. this.overTime = 0
  1533. this.pheHandler()
  1534. if (!this.initialized) {
  1535. this.myNoTchange()
  1536. }
  1537. } else {
  1538. this.pReadon = false
  1539. this.member.phone = ''
  1540. }
  1541. },
  1542. salesChange(val) {
  1543. //销售渠道兼容单个内容 或数组内容
  1544. if (val instanceof Array) {
  1545. this.member.salesChannel = String(val[1])
  1546. } else if (typeof val === 'string') {
  1547. this.member.salesChannel = val
  1548. } else {
  1549. this.member.salesChannel = String(val)
  1550. }
  1551. },
  1552. channelChange(val) {
  1553. this.member.orderChannel = String(val)
  1554. },
  1555. paybackChange(val) {
  1556. this.member.paybackCompany = String(val)
  1557. },
  1558. contactOrderEcho(callback) { // 用来回显关联订单列表 reged函数旧逻辑过多,调用场景不明确
  1559. this.$request('/order/isOpenBig').data({// 验证手机号权限
  1560. phone: this.member.phone,
  1561. orderCode: this.member.orderCode,
  1562. buySubject: this.member.buySubject,
  1563. getContactOrder: 1,
  1564. entName: (this.member.buySubject == '2') ? this.member.companyName : ''
  1565. }).success((res) => {
  1566. this.contactOrderList = res.data.contactOrder || [] //{} 关联订单列表
  1567. if (this.contactOrderList.length == 1) {
  1568. this.$set(this.contactOrderList[0], 'choose', true)
  1569. this.contactOrderchoose = this.contactOrderList[0]
  1570. this.member.contactOrderCode = this.contactOrderchoose.order_code
  1571. this.member.entId = this.contactOrderchoose.ent_id
  1572. }
  1573. if (this.contactOrderList.length > 1 && this.member.contactOrderCode) { // 回显调用此函数时
  1574. this.contactOrderList.forEach(ele => {
  1575. if (this.member.order_status == '1') {//订单为已完成
  1576. this.$set(ele, 'disabled', true)
  1577. }
  1578. if (ele.order_code == this.member.contactOrderCode) { // 回显关联订单勾选
  1579. this.$set(ele, 'choose', true)
  1580. }
  1581. })
  1582. }
  1583. try {
  1584. if (callback) {
  1585. callback(res)
  1586. }
  1587. } catch (e) {
  1588. // console.log(e)
  1589. }
  1590. }).post()
  1591. },
  1592. reged(val, type) {
  1593. this.spinShow = true
  1594. // this.initialized()
  1595. this.$request('/order/isOpenBig').data({// 验证手机号权限
  1596. phone: this.member.phone,
  1597. orderCode: this.member.orderCode,
  1598. buySubject: this.member.buySubject,
  1599. getContactOrder: 1,
  1600. entName: (this.member.buySubject == '2') ? this.member.companyName : ''
  1601. }).success((res) => {
  1602. this.bigStas = res.data.Bigstatus
  1603. this.subStas = res.data.isSub
  1604. this.isYears = res.data.isYear // 0 开过大会员没超过一年,1 开过大会员超过一年, 2 没开过大会员
  1605. this.overTime = res.data.endTime
  1606. this.i_member_status = res.data.i_member_status || ''
  1607. this.areaCount = res.data.areaCount || 0
  1608. this.contactOrderList = res.data.contactOrder || [] //{} 关联订单列表
  1609. if (this.contactOrderList.length == 1) {
  1610. this.$set(this.contactOrderList[0], 'choose', true)
  1611. this.contactOrderchoose = this.contactOrderList[0]
  1612. this.member.contactOrderCode = this.contactOrderchoose.order_code
  1613. this.member.entId = this.contactOrderchoose.ent_id
  1614. }
  1615. if (type === 'initshow' && this.contactOrderList.length > 1 && this.member.contactOrderCode) { // 回显调用此函数时
  1616. this.contactOrderList.forEach(ele => {
  1617. if (this.member.order_status == '1') {//订单为已完成
  1618. this.$set(ele, 'disabled', true)
  1619. }
  1620. if (ele.order_code == this.member.contactOrderCode) { // 回显关联订单勾选
  1621. this.$set(ele, 'choose', true)
  1622. }
  1623. })
  1624. }
  1625. this.stopTime = getDateSub('', res.data.endTime)
  1626. this.serData = []
  1627. this.pacData = []
  1628. // this.datas2 = []
  1629. if (res.data.isYear == 0) {
  1630. this.yearStas = 10
  1631. } else if (res.data.isYear == 1) {
  1632. this.yearStas = 12
  1633. }
  1634. this.currentServer()
  1635. setTimeout(() => {
  1636. this.spinShow = false
  1637. if (res.data.comingIntoEffective && !this.readonly) {
  1638. if (this.member.buySubject != '2') {//主体为个体走原有逻辑
  1639. this.$Modal.warning({
  1640. title: '警告提示',
  1641. content: '该用户存在即将生效的大会员订单,无法编辑订单',
  1642. okText: '我知道了',
  1643. onOk: () => {
  1644. this.bShow = false
  1645. }
  1646. })
  1647. }
  1648. }
  1649. if (this.member.products == 1) {
  1650. if (this.member.buySubject != '2') {//主体为个体走原有逻辑
  1651. if (this.bigStas == 1) {
  1652. if (this.subStas == 1) {
  1653. this.colr = ''
  1654. this.downDis = false
  1655. if (this.nums == 0) {
  1656. this.getServed('')
  1657. this.sumSel = []
  1658. this.radioDis1 = false
  1659. this.radioDis2 = true
  1660. this.radioDis3 = true
  1661. //避免初始化权益修改自定义内容
  1662. if (this.member.oldPhone !== this.member.phone) {
  1663. this.member.createType = '1'
  1664. } else {
  1665. this.member.createType = this.member.oldCreateType
  1666. }
  1667. this.repair = this.member.createType
  1668. this.monthTime = 60
  1669. }
  1670. } else {
  1671. this.downDis = true
  1672. if (this.nums == 0) {
  1673. this.getServed('')
  1674. this.sumSel = []
  1675. if (this.equity) {
  1676. this.radioDis1 = true
  1677. this.radioDis2 = true
  1678. this.radioDis3 = true
  1679. } else {
  1680. this.radioDis1 = false
  1681. this.radioDis2 = true
  1682. this.radioDis3 = true
  1683. }
  1684. //避免初始化权益修改自定义内容
  1685. if (this.member.oldPhone !== this.member.phone) {
  1686. this.member.createType = '2'
  1687. } else {
  1688. this.member.createType = this.member.oldCreateType
  1689. }
  1690. this.repair = this.member.createType
  1691. this.monthTime = this.stopTime
  1692. }
  1693. }
  1694. } else {
  1695. this.colr = ''
  1696. if (this.nums == 0) {
  1697. this.creAuth = '1'
  1698. }
  1699. this.downDis = false
  1700. this.getServed('')
  1701. if (this.nums == 0) {
  1702. this.sumSel = []
  1703. this.radioDis1 = false
  1704. this.radioDis2 = true
  1705. this.radioDis3 = true
  1706. //编辑订单时手机号修改建通自定义跳转
  1707. if (this.member.oldPhone !== this.member.phone) {
  1708. this.member.createType = '1'
  1709. } else {
  1710. this.member.createType = this.member.oldCreateType
  1711. }
  1712. this.repair = this.member.createType
  1713. this.monthTime = 60
  1714. }
  1715. }
  1716. } else {
  1717. this.colr = ''
  1718. if (this.nums == 0) {
  1719. this.creAuth = '1'
  1720. }
  1721. this.downDis = false
  1722. this.getServed('')
  1723. if (this.nums == 0) {
  1724. this.sumSel = []
  1725. this.radioDis1 = false
  1726. this.radioDis2 = true
  1727. this.radioDis3 = true
  1728. //编辑订单时手机号修改建通自定义跳转
  1729. // if (this.member.oldPhone !== this.member.phone) {
  1730. // this.member.createType = '1'
  1731. // } else {
  1732. // this.member.createType = this.member.oldCreateType
  1733. // }
  1734. // this.repair = this.member.createType
  1735. //企业自定义走新建
  1736. this.member.createType = '1'
  1737. this.repair = '1'
  1738. this.monthTime = 60
  1739. }
  1740. }
  1741. if (this.member.createType == '3') {
  1742. this.monthTime = 60 - this.stopTime
  1743. }
  1744. if (type !== 'initshow') {
  1745. this.createdTypeChange()
  1746. }
  1747. } else if (this.member.products == 2) {
  1748. if (this.bigStas == 0 && this.contactOrderList.length == 0) {
  1749. if (this.subStas == 0) {
  1750. this.colr = '此手机号无大会员权限'
  1751. this.creAuth = ''
  1752. }
  1753. } else if (this.bigStas == 2) {
  1754. this.colr = '此手机号已有大会员权限,无需再次创建'
  1755. this.creAuth = ''
  1756. } else {
  1757. if (this.subStas == 1) {
  1758. this.colr = '此手机号已是大会员子账号'
  1759. this.creAuth = ''
  1760. } else {
  1761. this.colr = ''
  1762. if (this.nums == 0) {
  1763. this.creAuth = '2'
  1764. this.getServed('')
  1765. this.sumSel = []
  1766. }
  1767. }
  1768. }
  1769. } else if (this.member.products == 3) {
  1770. if (this.bigStas == 0) {
  1771. if (this.subStas == 0) {
  1772. this.colr = '此手机号无大会员权限'
  1773. this.creAuth = ''
  1774. }
  1775. } else if (this.bigStas == 2) {
  1776. this.colr = '此手机号已有大会员权限,无需再次创建'
  1777. this.creAuth = ''
  1778. } else {
  1779. if (this.subStas == 1) {
  1780. this.colr = '此手机号已是大会员子账号'
  1781. this.creAuth = ''
  1782. } else {
  1783. this.colr = ''
  1784. if (this.nums == 0) {
  1785. this.creAuth = '3'
  1786. }
  1787. this.getServed('')
  1788. this.sumSel = []
  1789. }
  1790. }
  1791. } else {
  1792. this.member.products = ''
  1793. }
  1794. }, 500)
  1795. }).post()
  1796. },
  1797. pheHandler() {// 填写手机号并验证
  1798. this.typeRestriction = false
  1799. this.member.phone = this.member.phone.replace(/[^\d]/g, '')
  1800. if (this.member.phone) {
  1801. if (this.pReadon) {
  1802. this.reged('pheHandler')
  1803. } else {
  1804. if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
  1805. this.reged('pheHandler')
  1806. }
  1807. }
  1808. }
  1809. },
  1810. proChange(val, type) {// 产品类型
  1811. if (this.member.buySubject == '2' && val == '2' && !this.member.companyName) {
  1812. this.member.products = '1'
  1813. this.$Notice.warning({ title: '请输入公司名称' })
  1814. return
  1815. }
  1816. // this.reged()
  1817. this.creAuth = this.member.products
  1818. // this.datas2 = []
  1819. this.proNums = val
  1820. // this.member.paySub = ''
  1821. // this.member.freeSub = ''
  1822. // this.member.orderMoney = 0
  1823. // this.member.payMoney = ''
  1824. // this.member.level = ''
  1825. // this.member.contractUrl = ''
  1826. this.isAll = false
  1827. setTimeout(() => {
  1828. let uploads = this.$refs.uploadRef
  1829. if (uploads) {
  1830. this.$refs.uploadRef.uploadShow = false
  1831. this.$refs.uploadRef.payHtml = ''
  1832. }
  1833. }, 200)
  1834. if (val == 1) {
  1835. this.nums = ''
  1836. this.$request('/order/getCombo').data().success((res) => {// 获取大会员套餐
  1837. this.levelDown = []
  1838. // let newobj = {}
  1839. res.data.lists.forEach(v => {
  1840. if (v.id !== 4) {// 试用版
  1841. this.levelDown.push(v)
  1842. }
  1843. // if(v.id == 6){ // 商机版2.0
  1844. // newobj = JSON.parse(JSON.stringify(v))
  1845. // newobj.s_name = newobj.s_name+'(单省版)'
  1846. // this.levelDown.push(newobj)
  1847. // }
  1848. })
  1849. this.comVal = {
  1850. i_ispreinstall: 0,
  1851. i_price: '',
  1852. id: '',
  1853. l_createtime: "",
  1854. s_name: "自定义",
  1855. s_servers: ""
  1856. }
  1857. if (this.member.buySubject != '2') {//主体为个体走原有逻辑
  1858. if (this.bigStas == 1) {
  1859. if (this.subStas == 1) {
  1860. this.colr = ''
  1861. } else {
  1862. // this.downDis = true
  1863. }
  1864. } else {
  1865. this.colr = ''
  1866. this.downDis = false
  1867. }
  1868. } else {
  1869. this.colr = ''
  1870. this.downDis = false
  1871. }
  1872. if (this.member.products == '1') {
  1873. if (type !== 'initshow') {
  1874. this.createdTypeChange()
  1875. }
  1876. }
  1877. // 触发一次change事件
  1878. this.leChange(this.member.level)
  1879. }).get()
  1880. }
  1881. if (val == 2 || val == 3) {
  1882. if (type !== 'initshow') {
  1883. this.member.buyCount = '' // 切换套餐重置数量
  1884. }
  1885. this.nums = '2'
  1886. if (this.bigStas == 0 && this.contactOrderList.length == 0) {
  1887. if (this.subStas == 0) {
  1888. this.colr = '此手机号无大会员权限'
  1889. this.creAuth = ''
  1890. }
  1891. } else if (this.bigStas == 2) {
  1892. this.colr = '此手机号已有大会员权限,无需再次创建'
  1893. this.creAuth = ''
  1894. } else {
  1895. if (this.subStas == 1) {
  1896. this.colr = '此手机号已是大会员子账号'
  1897. this.creAuth = ''
  1898. } else {
  1899. this.colr = ''
  1900. }
  1901. }
  1902. }
  1903. if (type !== 'initshow' && val == 2) { // 选择子账号 默认为不签协议 初始回显调用此函数时避免覆盖回显值
  1904. this.member.agreementStatus = '0'
  1905. if (this.member.phone) {
  1906. if (this.pReadon) {
  1907. this.reged('pheHandler')
  1908. } else {
  1909. if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
  1910. this.reged('pheHandler')
  1911. }
  1912. }
  1913. }
  1914. }
  1915. if (val == 3 && type !== 'initshow') {
  1916. this.getServed('')
  1917. }
  1918. },
  1919. tipFunc(val) {
  1920. return val.toLocaleString('zh', { style: 'currency', currency: 'CNY' })
  1921. },
  1922. currentServer(phone_, callback) {// 获取用户当前已享有的服务
  1923. this.currentId = this.curIds
  1924. this.$request('/order/getCurrentServer').data({
  1925. phone: phone_ ? phone_ : this.member.phone
  1926. }).success((res) => {
  1927. this.oldCurrentId = res.data.list
  1928. try {
  1929. if (callback) {
  1930. callback(res)
  1931. }
  1932. } catch (e) {
  1933. // console.log(e)
  1934. }
  1935. }).post()
  1936. },
  1937. unique(arr) {// 去重
  1938. const res = new Map()
  1939. return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
  1940. },
  1941. unitChange(data) {// 有效周期选择单位
  1942. if (data == 1) {
  1943. this.placed = '请输入有效周期(单位 天)'
  1944. this.max_length = 4
  1945. } else {
  1946. this.placed = '请输入有效周期(单位(月),最多输入' + this.monthTime + '个月)'
  1947. this.max_length = 2
  1948. }
  1949. },
  1950. leChange(val, check = true) {// 会员套餐
  1951. // console.log("会员套餐", val, check)
  1952. if (!val) return
  1953. val = val ? JSON.parse(val) : ''
  1954. this.sArr = []
  1955. this.combo_id = val
  1956. this.nums = val.i_ispreinstall
  1957. if (this.pReadon) {
  1958. this.myNoTchange()
  1959. }
  1960. if (val.i_ispreinstall == 0) { //自定义套餐
  1961. if (this.member.buySubject != '2') {//主体为个体走原有逻辑
  1962. if (this.bigStas == 1) {
  1963. if (this.subStas == 1) {
  1964. this.radioDis1 = false
  1965. this.radioDis2 = true
  1966. this.radioDis3 = true
  1967. //避免初始化权益修改自定义内容
  1968. if (this.member.oldPhone !== this.member.phone) {
  1969. this.member.createType = '1'
  1970. this.repair = '1'
  1971. } else {
  1972. this.member.createType = this.member.oldCreateType
  1973. }
  1974. this.monthTime = 60
  1975. if (!this.returnMyReceivable && !this.pReadon) {
  1976. this.myNoTchange()
  1977. }
  1978. } else {
  1979. if (this.equity) {
  1980. this.radioDis1 = true
  1981. } else {
  1982. this.radioDis1 = false
  1983. }
  1984. this.radioDis2 = false
  1985. this.radioDis3 = false
  1986. //避免初始化权益修改自定义内容
  1987. if (this.member.oldPhone !== this.member.phone) {
  1988. this.member.createType = '2'
  1989. this.repair = '2'
  1990. } else {
  1991. this.member.createType = this.member.oldCreateType
  1992. }
  1993. // this.member.createType = '2'
  1994. this.monthTime = this.stopTime
  1995. }
  1996. } else {
  1997. this.radioDis1 = false
  1998. this.radioDis2 = true
  1999. this.radioDis3 = true
  2000. //避免初始化权益修改自定义内容
  2001. if (this.member.oldPhone !== this.member.phone) {
  2002. this.member.createType = '1'
  2003. this.repair = '1'
  2004. } else {
  2005. this.member.createType = this.member.oldCreateType
  2006. }
  2007. // this.member.createType = '1'
  2008. this.monthTime = 60
  2009. if (!this.returnMyReceivable && !this.pReadon) {
  2010. this.myNoTchange()
  2011. }
  2012. }
  2013. } else {
  2014. this.radioDis1 = false
  2015. this.radioDis2 = true
  2016. this.radioDis3 = true
  2017. //避免初始化权益修改自定义内容
  2018. // if (this.member.oldPhone !== this.member.phone) {
  2019. // this.member.createType = '1'
  2020. // this.repair = '1'
  2021. // } else {
  2022. // this.member.createType = this.member.oldCreateType
  2023. // }
  2024. //企业固定为购买
  2025. this.repair = '1'
  2026. this.member.createType = '1'
  2027. this.monthTime = 60
  2028. if (!this.returnMyReceivable && !this.pReadon) {
  2029. this.myNoTchange()
  2030. }
  2031. }
  2032. if (this.member.createType == '3') {
  2033. this.monthTime = 60 - this.stopTime
  2034. this.repair = '3'
  2035. }
  2036. if (this.equity) {
  2037. this.getServed('')
  2038. }
  2039. } else {
  2040. if (this.member.oldPhone !== this.member.phone) {
  2041. this.member.createType = ''
  2042. } else {
  2043. this.member.createType = this.member.oldCreateType
  2044. }
  2045. if (!this.returnMyReceivable && !this.pReadon) {
  2046. this.myNoTchange()
  2047. }
  2048. }
  2049. if (val.i_ispreinstall == 1 || val.i_ispreinstall == null) {
  2050. if (this.equity) {
  2051. this.getServed(val)
  2052. }
  2053. this.valComs = val // 固定套餐
  2054. this.monthTime = 60
  2055. }
  2056. },
  2057. leSelect(e) {
  2058. let val = JSON.parse(e.value)
  2059. if (val.i_ispreinstall == 1) {
  2060. this.datas1.splice(0, 1, {
  2061. name: val.s_name,
  2062. price: val.i_price,
  2063. count: ''
  2064. })
  2065. } else {
  2066. this.datas1[0] = {}
  2067. }
  2068. },
  2069. radiosChangelevel(val) { // 单选会员套餐控件 change
  2070. console.log(val)
  2071. this.leSelect({ value: val })
  2072. this.leChange(val)
  2073. let obj = JSON.parse(val)
  2074. if (obj.s_name && obj.s_name.indexOf('单省版') > -1) { // 商机2.0单省版 规格和地区数字段赋值
  2075. this.member.single = true
  2076. this.member.areaCount = 1
  2077. } else {
  2078. this.member.single = false
  2079. this.member.areaCount = 0
  2080. }
  2081. },
  2082. cycleTime() {
  2083. let curTime = new Date().getTime()
  2084. let cycTime = getDateSub(this.member.beginTime, this.overTime)
  2085. if (this.repair == 2) {
  2086. if (this.member.beginTime * 1000 > curTime) {
  2087. this.monthTime = cycTime
  2088. if (this.member.payCycle <= cycTime) {
  2089. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2090. } else {
  2091. this.member.payCycle = ''
  2092. }
  2093. } else {
  2094. this.monthTime = this.stopTime
  2095. }
  2096. }
  2097. },
  2098. peChange() {// 有效周期
  2099. let arr2 = []
  2100. if (this.nums == 0) {
  2101. this.sumSel.forEach(v => {
  2102. // if (v.id != 1) {
  2103. arr2.push(v.id)
  2104. // }
  2105. })
  2106. if (arr2.length != 0) {
  2107. this.moneyFunc(this.valComs)// 大会员订单价格
  2108. } else {
  2109. this.member.bigMoney = 0
  2110. }
  2111. if (this.repair == '3') {
  2112. this.moneyFunc(this.valComs)// 大会员订单价格
  2113. }
  2114. } else {
  2115. this.moneyFunc(this.valComs)// 大会员订单价格
  2116. }
  2117. this.packsPrice() // 补充包价格
  2118. },
  2119. cycleHandler() {// 有效周期
  2120. if (this.member.cycleType == '0') {//选择月保持原有逻辑
  2121. if (this.nums == 0) {
  2122. if (this.repair == 1) {
  2123. if (this.member.payCycle <= 60) {
  2124. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2125. } else {
  2126. this.member.payCycle = ''
  2127. }
  2128. } else if (this.repair == 2) {
  2129. if (this.member.payCycle <= this.stopTime) {
  2130. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2131. } else {
  2132. this.member.payCycle = ''
  2133. }
  2134. this.cycleTime()
  2135. } else if (this.repair == 3) {
  2136. if (this.member.payCycle <= 60 - this.stopTime) {
  2137. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2138. } else {
  2139. this.member.payCycle = ''
  2140. }
  2141. }
  2142. } else {
  2143. if (this.member.payCycle <= 60) {
  2144. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2145. } else {
  2146. this.member.payCycle = ''
  2147. }
  2148. }
  2149. } else {//选择天只过滤字母
  2150. this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g, '')
  2151. }
  2152. if (!this.member.payCycle) {
  2153. this.member.bigMoney = 0
  2154. }
  2155. },
  2156. timeReg(val) {
  2157. return new Date(dateFormatter(val, 'yyyy-MM-dd') + ' 00:00:00').getTime() / 1000
  2158. },
  2159. moneyChange(num) {
  2160. if (num == 0) {
  2161. if (this.member.products != '1') {
  2162. this.shiDis = true
  2163. this.member.payMoney = ''
  2164. } else {
  2165. this.allDis = true
  2166. }
  2167. } else {
  2168. if (this.member.products != '1') {
  2169. this.shiDis = false
  2170. } else {
  2171. this.allDis = false
  2172. }
  2173. }
  2174. },
  2175. disabledDateForVIPCallback(date) {
  2176. return date && date.valueOf() < Date.now() - 86400000;
  2177. },
  2178. startDate(val) {// 开始时间
  2179. if (val) {
  2180. this.member.beginTime = this.timeReg(val)
  2181. } else {
  2182. this.member.beginTime = ''
  2183. }
  2184. this.cycleTime()
  2185. },
  2186. orderDate(val) {
  2187. this.member.createTime = val
  2188. },
  2189. agreeDate(val) {
  2190. this.member.agreementTime = this.timeReg(val)
  2191. this.keyupformat('paybackWorkDayNum')
  2192. },
  2193. agreementStatusChange() {
  2194. this.keyupformat('paybackWorkDayNum')
  2195. },
  2196. noTchange(val) {
  2197. if (val) {
  2198. this.$refs.sigleRef1.dataVals = '2099-01-01'
  2199. this.member.beginTime = this.timeReg('2099-01-01')
  2200. } else {
  2201. this.$refs.sigleRef1.dataVals = ''
  2202. this.member.beginTime = ''
  2203. this.member.paybackOpenServer = false // 不勾选暂不开通 回款自动开通默认不勾选
  2204. }
  2205. },
  2206. myNoTchange() {
  2207. this.$nextTick(() => {
  2208. this.noPass = true
  2209. if (this.$refs.sigleRef1 !== undefined) {
  2210. this.$refs.sigleRef1.dataVals = '2099-01-01'
  2211. this.member.beginTime = this.timeReg('2099-01-01')
  2212. }
  2213. })
  2214. },
  2215. payBlur() {
  2216. if (this.member.paySub) {
  2217. this.datas1.splice(1, 1, {
  2218. name: '子账号',
  2219. price: 2000,
  2220. count: this.member.paySub
  2221. })
  2222. }
  2223. },
  2224. payHandler() {// 子账号金额
  2225. this.member.paySub = this.member.paySub.replace(/[^\d]+/g, '')
  2226. },
  2227. payChange() {
  2228. if (this.member.buyCount) { // 子账号数量 为购买数量-1 主账号1个
  2229. this.member.paySub = this.member.buyCount - 1
  2230. }
  2231. if (this.creAuth == 2) {
  2232. // this.member.orderMoney = parseInt(this.member.paySub == '' ? 0 : this.member.paySub) * 2000
  2233. }
  2234. // this.member.subMoney = parseInt(this.member.paySub == '' ? 0 : this.member.paySub) * 2000
  2235. if (this.member.paySub == '' || this.allDis) {
  2236. this.subDis = true
  2237. this.member.subPayMoney = ''
  2238. } else {
  2239. this.subDis = false
  2240. }
  2241. this.allSum() // 总计
  2242. },
  2243. freeHandler() {
  2244. this.member.freeSub = this.member.freeSub.replace(/[^\d]+/g, '')
  2245. },
  2246. contractFile(val) {
  2247. this.member.contractUrl = val
  2248. },
  2249. onRemoveUpload() {
  2250. this.member.contractUrl = ''
  2251. },
  2252. fixedNum(val) {
  2253. return val ? Number(parseFloat(val * 100).toFixed(0)) : 0
  2254. },
  2255. saleDate(val) {
  2256. this.member.sale_time = val + ' 00:00:00'
  2257. },
  2258. guiDate(val) {
  2259. this.member.contract_archive_time = val + ' 00:00:00'
  2260. },
  2261. salePerson(val) {
  2262. this.member.salesPerson = val
  2263. let saleNameArr = []
  2264. val.forEach(v => {
  2265. let vjson = JSON.parse(v)
  2266. saleNameArr.push({ name: vjson.username, money: 0 })
  2267. })
  2268. saleNameArr.push({ name: '合计' })
  2269. this.saleTableData = saleNameArr
  2270. this.updateSaleMoney()
  2271. },
  2272. urlReq(url, obj) {
  2273. this.isDisable = true
  2274. this.$request(url).data(
  2275. obj
  2276. ).success(() => {
  2277. this.bShow = false
  2278. this.$Message.success({ content: '提交成功' })
  2279. this.$parent.ordered()
  2280. setTimeout(() => {
  2281. this.isDisable = false
  2282. }, 1000)
  2283. }).error(() => {
  2284. this.isDisable = false
  2285. }).post()
  2286. },
  2287. ordConfirm() { //编辑提交
  2288. if (!this.member.salesChannel || this.member.salesChannel == undefined || this.member.salesChannel == 'undefined') {
  2289. this.$Notice.warning({ title: '请选择销售渠道' })
  2290. return
  2291. }
  2292. //编辑存在老数据为空 前端不校验 提交后端接口 再至为1
  2293. // if (this.member.buySubject == '') {
  2294. // this.$Notice.warning({title: '请选择购买主体'})
  2295. // return
  2296. // }
  2297. if (this.member.phone == '') {
  2298. this.$Notice.warning({ title: '请输入手机号' })
  2299. return
  2300. }
  2301. if (!this.member.paybackCompany) {
  2302. this.$Notice.warning({ title: '签约主体不能为空' })
  2303. return
  2304. }
  2305. if (this.member.phone && !this.noPhone && !/^1[3456789]\d{9}$/.test(this.member.phone)) {
  2306. this.$Notice.warning({ title: '手机号格式不正确' })
  2307. return
  2308. }
  2309. if (!this.member.payType) {
  2310. this.$Notice.warning({ title: '请选择约定支付方式' })
  2311. return
  2312. }
  2313. if (!this.saleCode) {
  2314. this.$Notice.warning({ title: '请选择业绩归属部门' })
  2315. return
  2316. }
  2317. if (this.member.products == '') {
  2318. this.$Notice.warning({ title: '请选择产品类型' })
  2319. return
  2320. }
  2321. // if(this.member.billingMode !== 0 && this.member.billingMode !== 1){
  2322. // this.$Notice.warning({title: '请选择计费模式'})
  2323. // return
  2324. // }
  2325. if (this.showOnlineContractForm) {
  2326. // 如购买主体或甲方类型为“企业”,则公司名称必填
  2327. const entMark = this.member.buySubject == '2' || this.member.e_contract_userA_type == 2
  2328. if (entMark && !this.member.companyName) {
  2329. this.$Notice.warning({ title: '公司名称必填' })
  2330. return
  2331. }
  2332. if (!this.member.e_contract_type) {
  2333. this.$Notice.warning({ title: '电子协议类型必填' })
  2334. return
  2335. }
  2336. // if (!this.member.e_contract_userA_type) {
  2337. // this.$Notice.warning({title: '协议甲方类型必填'})
  2338. // return
  2339. // }
  2340. // if (!this.member.e_contract_userA_name) {
  2341. // this.$Notice.warning({title: '协议甲方必填'})
  2342. // return
  2343. // }
  2344. // if (!this.member.e_contract_userA_contacts_name) {
  2345. // this.$Notice.warning({title: '协议甲方联系人必填'})
  2346. // return
  2347. // }
  2348. // if (!this.member.e_contract_userA_contacts_tel) {
  2349. // this.$Notice.warning({title: '协议甲方联系方式必填'})
  2350. // return
  2351. // }
  2352. // if (!this.member.e_contract_userA_contacts_address) {
  2353. // this.$Notice.warning({title: '协议甲方联系地址必填'})
  2354. // return
  2355. // }
  2356. if (!this.member.e_contract_userB_contacts_name) {
  2357. this.$Notice.warning({ title: '协议乙方联系人必填' })
  2358. return
  2359. }
  2360. }
  2361. if (this.member.buySubject == '2') {
  2362. if (this.member.buyCount == '') {
  2363. this.$Notice.warning({ title: '请输入购买数量' })
  2364. return
  2365. }
  2366. if (this.member.buyCount <= 0) {
  2367. this.$Notice.warning({ title: '请输入大于0的数量' })
  2368. return
  2369. }
  2370. }
  2371. if(this.member.paybackNum == ''){
  2372. this.$Notice.warning({ title: '请输入回款次数' })
  2373. return
  2374. }
  2375. if(this.member.paybackNum > 1 && !this.paybackTableData.every(item => item.time && item.money)){
  2376. this.$Notice.warning({ title: '请填写完整回款计划' })
  2377. return
  2378. }
  2379. if(this.member.paybackNum == 1 && !this.member.paybackExpectDate){
  2380. this.$Notice.warning({ title: '请输入回款计划工作日' })
  2381. return
  2382. }
  2383. if (this.saleTableData) {
  2384. let isOk = true
  2385. this.saleTableData.forEach(v => {
  2386. if (v.name === '合计') {
  2387. // 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)
  2388. let money
  2389. if (this.member.payMoney) {
  2390. money = Number(this.member.payMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
  2391. } else {
  2392. money = Number(this.member.bigPayMoney) + Number(this.member.subPayMoney) + Number(this.member.supplyPayMoney) - Number(this.member.commission) - Number(this.member.proceduresMoney)
  2393. }
  2394. if (Number(v.money) > money) {
  2395. this.$Notice.warning({ title: '业绩金额大于合同金额' })
  2396. isOk = false
  2397. }
  2398. }
  2399. })
  2400. if (!isOk) {
  2401. return
  2402. }
  2403. }
  2404. let serveData = []
  2405. this.datas2.forEach(v => {
  2406. serveData.push({
  2407. id: v.id,
  2408. name: v.name,
  2409. price: v.price,
  2410. count: v.count * v.s_pkcount
  2411. })
  2412. })
  2413. let saleNameArr = []
  2414. let saleIdArr = []
  2415. if (this.member.salesPerson && this.member.salesPerson.length > 0) {
  2416. this.member.salesPerson.forEach(v => {
  2417. let vjson = JSON.parse(v)
  2418. saleNameArr.push(vjson.username)
  2419. saleIdArr.push(vjson.id)
  2420. })
  2421. }
  2422. let saleName = saleNameArr.join(',')
  2423. let saleId = saleIdArr.join(',')
  2424. // 回款列表参数处理
  2425. this.member.paybackList = this.paybackTableData
  2426. // 提交集合部分
  2427. if (this.proNums == 1) {// 大会员
  2428. if (this.nums == 0) {
  2429. this.getserveIdAndname()
  2430. var serId = this.form_serve.ids
  2431. var serName = this.form_serve.names
  2432. }
  2433. // if (this.nums == 0) {
  2434. // if (this.sumSel.length == 0 || this.sumSel.length == 1) {
  2435. // if (this.sArr.length == 0) {
  2436. // // return
  2437. // } else {
  2438. // this.sArr.forEach(j => {
  2439. // //扩充服务 不重复开启服务
  2440. // if (this.member.createType != '2') {
  2441. // serId.push(j.id)
  2442. // serName.push(j.s_name)
  2443. // } else if (this.oldCurrentId.indexOf(j.id) <= -1) {
  2444. // serId.push(j.id)
  2445. // serName.push(j.s_name)
  2446. // }
  2447. // })
  2448. // }
  2449. // } else {
  2450. // this.sumSel.forEach(k => {
  2451. // //扩充服务 不重复开启服务
  2452. // if (this.member.createType != '2') {
  2453. // serId.push(k.id)
  2454. // serName.push(k.s_name)
  2455. // } else if (this.oldCurrentId.indexOf(j.id) <= -1) {
  2456. // serId.push(k.id)
  2457. // serName.push(k.s_name)
  2458. // }
  2459. // })
  2460. // }
  2461. // }
  2462. if (this.member.payMoney == 0) { // 合同金额为0 则计费模式置为免费
  2463. this.member.billingMode = 0
  2464. } else {
  2465. this.member.billingMode = 1
  2466. }
  2467. // let trueMoney = this.fixedNum(this.member.payMoney - this.member.commission - this.member.proceduresMoney)
  2468. // if (trueMoney < this.returnBoll) {
  2469. // this.$Notice.warning({title: '警告提示', desc: ' 应收金额小于已回款金额,不允许提交!'})
  2470. // return
  2471. // }
  2472. let newlevel = ''
  2473. if (this.member.single) {
  2474. newlevel = 6 // 商机版2.0 单省版 创建订单 id 按照商机版2.0
  2475. } else {
  2476. newlevel = JSON.parse(this.member.level).id ? JSON.parse(this.member.level).id : 5// 5自定义
  2477. }
  2478. let obj = {
  2479. contract_nature: this.member.contract_nature,
  2480. orderCode: this.member.orderCode,
  2481. createTime: this.member.createTime,
  2482. phone: this.member.phone,
  2483. products: '',// 产品类型不需要传(传空)
  2484. buySubject: this.member.buySubject ? this.member.buySubject : '1',//主体 老数据编辑回显为空 提交默认为个体
  2485. buyCount: this.member.buyCount,//购买数量
  2486. billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
  2487. level: newlevel,
  2488. payCycle: this.member.payCycle,
  2489. cycleType: this.member.cycleType,
  2490. startTime: this.member.createType == 2 || this.member.createType == 3 ? '' : this.member.beginTime,
  2491. paySub: this.member.paySub,
  2492. freeSub: this.member.freeSub,
  2493. bigMoney: this.fixedNum(this.member.bigMoney), //弃用 大会员订单金额
  2494. subMoney: this.fixedNum(this.member.subMoney), // 弃用 // 子账号订单金额
  2495. supplyMoney: this.fixedNum(this.member.supplyMoney), // 补充包
  2496. orderMoney: this.fixedNum(this.member.orderMoney), // 标准售价 大会员+补充包
  2497. payMoney: this.fixedNum(this.member.payMoney), // 合同售价 实付
  2498. contractUrl: this.member.contractUrl,
  2499. isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
  2500. bigPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.bigPayMoney),
  2501. subPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.subPayMoney),
  2502. supplyPayMoney: this.member.billingMode == 0 ? 0 : this.fixedNum(this.member.supplyPayMoney),
  2503. createType: this.nums == 0 ? this.member.createType : 1,
  2504. comboId: this.member.single ? 6 : this.combo_id.id,
  2505. serversId: this.nums == 0 ? String(serId) : '',
  2506. serversName: this.nums == 0 ? String(serName) : '',
  2507. serversArr: serveData,
  2508. commission: this.fixedNum(this.member.commission),
  2509. proceduresMoney: this.fixedNum(this.member.proceduresMoney),
  2510. companyName: this.member.companyName,
  2511. agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
  2512. agreementTime: this.member.agreementStatus !== 0 ? this.member.agreementTime : '',
  2513. agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
  2514. salesChannel: this.member.salesChannel,
  2515. orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
  2516. paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
  2517. remark: this.member.remark,
  2518. order_status: this.member.order_status,
  2519. sale_time: this.member.sale_time,
  2520. contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
  2521. contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
  2522. contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
  2523. areaCount: this.member.single && (this.combo_id.id == 6 || this.combo_id.s_name.includes('单省版')) ? this.member.areaCount : 0,// 仅大会员商机版2.0时 单省版才有效
  2524. updateType: this.noPass1 ? 0 : 1,
  2525. salesPerson: saleName,
  2526. salesPersonId: saleId,
  2527. payType: this.member.payType,
  2528. saleDep: this.saleCode,
  2529. saleMoney: JSON.stringify({ data: this.saleTableData }),
  2530. // 电子协议相关
  2531. e_contract_type: this.member.e_contract_type, // 电子协议类型
  2532. e_contract_userA_type: this.member.e_contract_userA_type, // 协议甲方类型
  2533. e_contract_userA_name: this.member.e_contract_userA_name, // 协议甲方
  2534. e_contract_userA_contacts_name: this.member.e_contract_userA_contacts_name, // 协议甲方联系人
  2535. e_contract_userA_contacts_tel: this.member.e_contract_userA_contacts_tel, // 协议甲方联系方式
  2536. e_contract_userA_contacts_address: this.member.e_contract_userA_contacts_address, // 协议甲方联系地址
  2537. e_contract_userB_contacts_name: this.member.e_contract_userB_contacts_name, // 协议乙方联系人
  2538. e_contract_remark: this.member.e_contract_remark, // 协议备注
  2539. paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
  2540. paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
  2541. paybackOpenServer:this.member.paybackOpenServer, // 回款开通服务
  2542. paybackNum:this.member.paybackNum, // 回款次数
  2543. paybackList:this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
  2544. }
  2545. if (this.returnMyReceivable) {
  2546. this.urlReq('/order/updateBigOrder', obj)
  2547. } else {
  2548. this.urlReq('/order/myUpdateBigOrder', obj)
  2549. }
  2550. } else if (this.proNums == 2) {// 子账号
  2551. let obj = {
  2552. entId: this.member.entId,
  2553. contactOrderCode: this.member.contactOrderCode || '',
  2554. contract_nature: this.member.contract_nature,
  2555. orderCode: this.member.orderCode,
  2556. createTime: this.member.createTime,
  2557. updateProductType: 1,
  2558. phone: this.member.phone,
  2559. products: '',// 产品类型不需要传(传空)
  2560. buySubject: this.member.buySubject ? this.member.buySubject : '1',//主体 老数据编辑回显为空 提交默认为个体
  2561. buyCount: this.member.buyCount,//购买数量
  2562. billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
  2563. paySub: this.member.paySub,
  2564. freeSub: this.member.freeSub,
  2565. orderMoney: this.fixedNum(this.member.orderMoney),
  2566. contractUrl: this.member.contractUrl,
  2567. isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
  2568. payMoney: this.fixedNum(this.member.payMoney),
  2569. commission: this.fixedNum(this.member.commission),
  2570. proceduresMoney: this.fixedNum(this.member.proceduresMoney),
  2571. companyName: this.member.companyName,
  2572. agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
  2573. agreementTime: this.member.agreementStatus !== 0 ? this.member.agreementTime : '',
  2574. agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
  2575. salesChannel: this.member.salesChannel,
  2576. orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
  2577. paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
  2578. remark: this.member.remark,
  2579. order_status: this.member.order_status,
  2580. sale_time: this.member.sale_time,
  2581. contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
  2582. contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
  2583. contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
  2584. updateType: this.noPass1 ? 0 : 1,
  2585. salesPerson: saleName,
  2586. salesPersonId: saleId,
  2587. payType: this.member.payType,
  2588. saleDep: this.saleCode,
  2589. saleMoney: JSON.stringify({ data: this.saleTableData }),
  2590. paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
  2591. paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
  2592. paybackOpenServer:this.member.paybackOpenServer, // 回款开通服务
  2593. paybackNum:this.member.paybackNum, // 回款次数
  2594. paybackList:this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
  2595. }
  2596. if (!this.member.contactOrderCode) {
  2597. this.$Notice.warning({ title: '请选择关联订单' })
  2598. return
  2599. }
  2600. if (this.returnMyReceivable) {
  2601. this.urlReq('/order/updateSubOrder', obj)
  2602. } else {
  2603. this.urlReq('/order/myUpdateSupplySubOrder', obj)
  2604. }
  2605. } else if (this.proNums == 3) {// 补充包
  2606. let obj = {
  2607. contract_nature: this.member.contract_nature,
  2608. orderCode: this.member.orderCode,
  2609. createTime: this.member.createTime,
  2610. updateProductType: 2,
  2611. phone: this.member.phone,
  2612. products: '',// 产品类型不需要传(传空)
  2613. buySubject: this.member.buySubject ? this.member.buySubject : '1',//主体 老数据编辑回显为空 提交默认为个体
  2614. buyCount: this.member.buyCount,//购买数量
  2615. billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
  2616. serversArr: serveData,
  2617. orderMoney: this.fixedNum(this.member.orderMoney),
  2618. contractUrl: this.member.contractUrl,
  2619. isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
  2620. payMoney: this.fixedNum(this.member.payMoney),
  2621. commission: this.fixedNum(this.member.commission),
  2622. proceduresMoney: this.fixedNum(this.member.proceduresMoney),
  2623. companyName: this.member.companyName,
  2624. agreementStatus: this.member.agreementStatus == '0' || this.member.agreementStatus == '1' ? this.member.agreementStatus : 999,
  2625. agreementTime: this.member.agreementStatus !== 0 ? this.member.agreementTime : '',
  2626. agreementNumber: this.member.agreementStatus !== '' ? this.member.agreementNumber : '',
  2627. salesChannel: this.member.salesChannel,
  2628. orderChannel: this.member.orderChannel ? this.member.orderChannel : 'd01',
  2629. paybackCompany: this.member.paybackCompany ? this.member.paybackCompany : 'h01',
  2630. remark: this.member.remark,
  2631. order_status: this.member.order_status,
  2632. sale_time: this.member.sale_time,
  2633. contract_archive_status: this.member.agreementStatus == '1' ? this.member.contract_archive_status : '',
  2634. contract_archive_time: this.member.agreementStatus == '1' ? this.member.contract_archive_time : '',
  2635. contract_archive_num: this.member.agreementStatus == '1' ? this.member.contract_archive_num : '',
  2636. updateType: this.noPass1 ? 0 : 1,
  2637. salesPerson: saleName,
  2638. salesPersonId: saleId,
  2639. payType: this.member.payType,
  2640. saleDep: this.saleCode,
  2641. saleMoney: JSON.stringify({ data: this.saleTableData }),
  2642. paybackExpectDate: this.member.paybackNum == 1 ? this.member.paybackExpectDate : "", // 回款日期
  2643. paybackWorkDayNum: this.member.paybackNum == 1 ? this.member.paybackWorkDayNum : "", // 回款天数
  2644. paybackOpenServer:this.member.paybackOpenServer, // 回款开通服务
  2645. paybackNum:this.member.paybackNum, // 回款次数
  2646. paybackList:this.member.paybackNum > 1 ? JSON.stringify(this.member.paybackList) : '', // 回款列表
  2647. }
  2648. if (this.returnMyReceivable) {
  2649. this.urlReq('/order/updateSupplyOrder', obj)
  2650. } else {
  2651. this.urlReq('/order/myUpdateSupplySubOrder', obj)
  2652. }
  2653. }
  2654. },
  2655. ordCancel() {
  2656. this.bShow = false
  2657. },
  2658. /*处理单省版 radio 选中后取消*/
  2659. areaCountClick(val) {
  2660. if (this.interested) { // 单选按钮置灰时点击事件不要响应
  2661. return
  2662. }
  2663. if (this.member.single) {
  2664. this.member.single = false
  2665. this.member.areaCount = 0
  2666. } else {
  2667. this.member.single = true
  2668. this.member.areaCount = val
  2669. }
  2670. },
  2671. //回显
  2672. show(data) {
  2673. this.olddata = data
  2674. this.typeRestriction = true,
  2675. this.colr = ''
  2676. setTimeout(() => {
  2677. const { contractRes, filterData, refundRes, res, returnInfo, returnRes, audit } = data
  2678. console.log(filterData)
  2679. this.orderCode = res.order_code
  2680. if (this.$refs.othersReviewRecord) {
  2681. this.$refs.othersReviewRecord.recordList = audit
  2682. }
  2683. this.returnBoll = returnInfo ? returnInfo[0].money : []
  2684. //产品类型
  2685. let products = ''
  2686. if (res.productType == '大会员-补充包' || res.productType == '大会员-AI中标预测包' || res.productType == '大会员-招标文件解读') {
  2687. products = '3'
  2688. } else if (res.productType == '大会员-子账号') {
  2689. products = '2'
  2690. } else {
  2691. products = '1'
  2692. }
  2693. this.intered(res.vip_starttime, res.user_phone, returnInfo ? returnInfo[0].money : []) // 权益是否开通
  2694. // 有无手机号
  2695. if (res.user_phone.substr(0, 1) == '9') {
  2696. this.noPhone = true
  2697. } else {
  2698. this.noPhone = false
  2699. }
  2700. //创建时间
  2701. // this.$refs.sigleRef2.dataVals = new Date(res.create_time)
  2702. //开始时间
  2703. setTimeout(() => {
  2704. if (products == '1') {
  2705. if (res.return_status == 0) { // 未回款
  2706. this.startDate_p = '-'
  2707. this.$refs.sigleRef1.dataVals = ''
  2708. } else {
  2709. this.$refs.sigleRef1.dataVals = new Date(res.vip_starttime)
  2710. }
  2711. if (res.vip_starttime == '2099-01-01 00:00:00' || res.user_phone.substr(0, 1) == '9') {
  2712. this.noPass = true
  2713. } else {
  2714. this.noPass = false
  2715. }
  2716. if (res.vip_starttime == '2099-01-01 00:00:00' || res.user_phone.substr(0, 1) == '9' || res.orderStatus != 1) {
  2717. this.noPass1 = true
  2718. } else {
  2719. this.noPass1 = false
  2720. }
  2721. }
  2722. }, 200);
  2723. //协议签订时间
  2724. if (contractRes.contract_status == 1 && contractRes.contract_time) {
  2725. this.$nextTick(() => {
  2726. this.$refs.sigleRef.dataVals = new Date(contractRes.contract_time)
  2727. })
  2728. }
  2729. //归档时间
  2730. if (contractRes.contract_status == 1 && contractRes.contract_archive_time) {
  2731. this.$nextTick(() => {
  2732. this.$refs.sigleRef4.dataVals = new Date(contractRes.contract_archive_time)
  2733. })
  2734. }
  2735. //销售渠道
  2736. // 恢复销售渠道文字
  2737. this.$refs.casRef.getDictItem(() => {
  2738. this.$refs.casRef.setDate(res.distribution_channel)
  2739. })
  2740. //签约主体
  2741. setTimeout(() => {
  2742. if (this.$refs.casRef2) {
  2743. this.$refs.casRef2.values = [res.signing_subject]
  2744. }
  2745. //归档协议地址
  2746. this.$refs.uploadRef.contractData(contractRes.contract_file_name)
  2747. }, 200)
  2748. this.member.contractUrl = contractRes.contract_file_url
  2749. this.curIds = filterData.serversId ? filterData.serversId.split(',').map(Number) : []
  2750. this.form_serve.ids = filterData.serversId ? filterData.serversId.split(',').map(Number) : [] // 服务ID集合
  2751. this.i_member_status = filterData.comboId // 套餐ID
  2752. this.proNums = products
  2753. if (!res.buy_subject) { //老数据购买主体无值 禁用购买主体选项
  2754. this.radio_dis = true
  2755. } else {
  2756. this.radio_dis = false
  2757. }
  2758. this.show_buy_subject = res.buy_subject
  2759. if (res.orderStatus == 1) {//回显订单已完成禁用购买主体
  2760. this.finish_dis = true
  2761. } else {
  2762. this.finish_dis = false
  2763. }
  2764. // 补充包列表
  2765. this.supplys = filterData.supplys
  2766. this.serveDatawrap = filterData.supplys || []
  2767. let saleMoney = {}
  2768. if (res.salesperson && res.saleMoney) {
  2769. saleMoney = JSON.parse(res.saleMoney)
  2770. }
  2771. // if (res.salesperson && res.saleMoney) {
  2772. // this.saleTableData = JSON.parse(res.saleMoney).data
  2773. // }
  2774. // console.log(this.saleTableData)
  2775. this.member = {
  2776. paybackNum:filterData.paybackNum ? filterData.paybackNum : 1,
  2777. paybackList:filterData.paybackList ? JSON.parse(filterData.paybackList) : [],
  2778. entId: res.ent_id || '',
  2779. paybackExpectDate: filterData.paybackExpectDate, // 回款日期
  2780. paybackWorkDayNum: filterData.paybackWorkDayNum, // 回款天数
  2781. paybackOpenServer: filterData.paybackOpenServer, // 回款开通服务
  2782. contactOrderCode: filterData.contactOrderCode, // 关联订单编号
  2783. contract_nature: res.contract_nature + "", // 合同性质
  2784. orderCode: res.order_code, //
  2785. createTime: res.create_time, //
  2786. phone: res.user_phone, //
  2787. oldPhone: res.user_phone,
  2788. oldCreateType: filterData.createType + '', //
  2789. products: products, //
  2790. buySubject: res.buy_subject ? res.buy_subject + "" : '',//购买主体 回显无值默认为个体
  2791. buyCount: res.buy_count ? res.buy_count : '',//购买数量
  2792. billingMode: res.billingMode, //
  2793. salesPerson: JSON.stringify({
  2794. id: res.salesperson_id,
  2795. username: res.salesperson
  2796. }), //
  2797. level: filterData.comboId, //
  2798. createType: filterData.createType + '', //
  2799. payCycle: filterData.cycle + '' | 0, //
  2800. cycleType: filterData.cycleType + '' | '', //
  2801. beginTime: res.vip_starttime ? this.timeReg(res.vip_starttime) : '',
  2802. paySub: filterData.pay_sub_num + '' | 0, //
  2803. freeSub: filterData.free_sub_num + '' | 0, //
  2804. bigMoney: filterData.bigMoney / 100 || '0', //
  2805. subMoney: filterData.subMoney / 100 || '0', //
  2806. supplyMoney: filterData.supplyMoney / 100 || '0', //
  2807. orderMoney: res.order_money, //
  2808. sums: (filterData.bigMoney + filterData.subMoney + filterData.supplyMoney) / 100 || '0', //
  2809. agreementStatus: contractRes.contract_status + '', //
  2810. agreementTime: contractRes.contract_time ? this.timeReg(contractRes.contract_time) : '', //
  2811. agreementNumber: contractRes.contract_code, //
  2812. contractUrl: contractRes.contract_file_url, //
  2813. payMoney: res.pay_money ? res.pay_money / 100 : 0, //
  2814. bigPayMoney: filterData.bigPayMoney ? filterData.bigPayMoney / 100 : 0, //
  2815. subPayMoney: filterData.subPayMoney ? filterData.subPayMoney / 100 : 0, //
  2816. supplyPayMoney: filterData.supplyPayMoney ? filterData.supplyPayMoney / 100 : 0, //
  2817. commission: res.commission / 100, //
  2818. proceduresMoney: res.procedures_money / 100, //
  2819. companyName: res.company_name, //
  2820. salesChannel: res.distribution_channel, //
  2821. orderChannel: res.order_channel, //
  2822. paybackCompany: res.signing_subject, //
  2823. remark: filterData.remark, //
  2824. sale_time: res.sale_time, //
  2825. order_status: res.orderStatus + '', //
  2826. contract_archive_status: contractRes.contract_archive_status == null ? '0' : contractRes.contract_archive_status + '', //
  2827. contract_archive_time: contractRes.contract_archive_time, //
  2828. contract_archive_num: contractRes.contract_archive_num == 0 ? '' : contractRes.contract_archive_num,//
  2829. single: filterData.areaCount > 0 ? true : false,
  2830. areaCount: filterData.areaCount,
  2831. payType: res.payTypes,
  2832. saleCodeModel: res.saleDep,
  2833. saleMoney: saleMoney,
  2834. // 电子协议相关
  2835. e_contract_type: contractRes.seal_type || 1, // 电子协议类型
  2836. e_contract_userA_type: contractRes.partyA_type || 1, // 协议甲方类型
  2837. e_contract_userA_name: contractRes.partyA_name, // 协议甲方
  2838. e_contract_userA_contacts_name: contractRes.partyA_person, // 协议甲方联系人
  2839. e_contract_userA_contacts_tel: contractRes.partyA_tel, // 协议甲方联系方式
  2840. e_contract_userA_contacts_address: contractRes.partyA_address, // 协议甲方联系地址
  2841. e_contract_userB_contacts_name: contractRes.partyB_person, // 协议乙方联系人
  2842. e_contract_remark: contractRes.remark, // 协议备注
  2843. }
  2844. // 回款计划列表回显
  2845. this.paybackTableData = filterData.paybackList ? JSON.parse(filterData.paybackList) : []
  2846. if(this.paybackTableData.length > 0){
  2847. this.$nextTick(()=>{
  2848. this.paybackTableData.forEach((ele,index)=>{
  2849. if(index < this.paybackTableData.length - 1 ){
  2850. this.$refs['paybackTime'+index].dataVals = ele.time
  2851. }
  2852. })
  2853. })
  2854. }
  2855. // 日期单位
  2856. if (this.member.cycleType === 1) {
  2857. this.max_length = 4
  2858. }
  2859. // 销售人员
  2860. setTimeout(() => {
  2861. if (res.salesperson && res.salesperson_id) {
  2862. let sarr = []
  2863. let sidarr = res.salesperson_id.split(',')
  2864. let saarr = res.salesperson.split(',')
  2865. for (let i = 0; i < saarr.length; i++) {
  2866. sarr.push(JSON.stringify({
  2867. id: Number(sidarr[i]),
  2868. username: saarr[i]
  2869. }))
  2870. }
  2871. // console.log(sarr)
  2872. this.$refs.saleRef.salePerson = sarr
  2873. }
  2874. }, 1000)
  2875. setTimeout(() => {
  2876. if (res.salesperson && res.salesperson_id) {
  2877. let sarr = []
  2878. let sidarr = res.salesperson_id.split(',')
  2879. let saarr = res.salesperson.split(',')
  2880. for (let i = 0; i < saarr.length; i++) {
  2881. sarr.push(JSON.stringify({
  2882. id: Number(sidarr[i]),
  2883. username: saarr[i]
  2884. }))
  2885. }
  2886. // console.log(sarr)
  2887. this.$refs.saleRef.salePerson = sarr
  2888. }
  2889. //业绩统计时间
  2890. this.$refs.sigleRef3.dataVals = new Date(res.sale_time)
  2891. }, 1000)
  2892. setTimeout(() => {
  2893. if (res.saleMoney && res.salesperson) {
  2894. this.saleTableData = JSON.parse(res.saleMoney).data
  2895. }
  2896. }, 2000)
  2897. //会员套餐
  2898. this.proChange(Number(products), 'initshow')
  2899. if (this.equity) {
  2900. this.reged('', 'initshow') //验证手机号权限
  2901. } else {
  2902. this.contactOrderEcho() // 权限未开通时
  2903. this.currentId = this.curIds
  2904. // this.currentServer()
  2905. this.getServed('')
  2906. this.radioDis1 = false
  2907. this.radioDis2 = true
  2908. this.radioDis3 = true
  2909. }
  2910. if (filterData.level !== '自定义') {
  2911. this.creAuth = this.member.products
  2912. this.proNums = Number(products)
  2913. this.isAll = false
  2914. setTimeout(() => {
  2915. let uploads = this.$refs.uploadRef
  2916. if (uploads) {
  2917. this.$refs.uploadRef.uploadShow = false
  2918. this.$refs.uploadRef.payHtml = ''
  2919. }
  2920. }, 200)
  2921. console.log(this.member.single, filterData.areaCount, '单省版')
  2922. if (this.member.single) { // 单省版
  2923. const currentLevel = this.levelDown.find(e => e.s_name && e.s_name.indexOf('单省版') > -1)
  2924. if (currentLevel) {
  2925. this.member.level = JSON.stringify(currentLevel)
  2926. this.leChange(JSON.stringify(currentLevel), false)
  2927. }else{
  2928. this.member.level =''
  2929. }
  2930. } else {
  2931. const currentLevel = this.levelDown.find(e => e.id == filterData.comboId)
  2932. if (currentLevel) {
  2933. this.member.level = JSON.stringify(currentLevel)
  2934. this.leChange(JSON.stringify(currentLevel), false)
  2935. }else{
  2936. this.member.level =''
  2937. }
  2938. }
  2939. } else {
  2940. let obj = {
  2941. i_ispreinstall: 0,
  2942. i_price: '',
  2943. id: '',
  2944. l_createtime: "",
  2945. s_name: "自定义",
  2946. s_servers: ""
  2947. }
  2948. this.member.level = JSON.stringify(obj)
  2949. this.levelShow = false
  2950. }
  2951. this.nums = 0
  2952. })
  2953. setTimeout(() => {
  2954. this.levelShow = true //单选组件数据无法回显 销毁延时重建处理(临时方法)
  2955. this.audit_status = data.res.audit_status
  2956. this.getNewservedata(data.res.audit_status)
  2957. }, 600);
  2958. this.bShow = true
  2959. },
  2960. packsPrice() {// 补充包总价
  2961. let strs1 = 0, strs2 = 0
  2962. this.datas2.forEach(v => {
  2963. if (v.id == 11 || v.id == 15) {
  2964. strs1 += v.price * v.count
  2965. } else if (v.id == 14 || v.id == 16) {
  2966. if (this.repair == 1) {
  2967. strs2 += v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
  2968. } else if (this.repair == 2) {
  2969. let strNums = 0
  2970. if (v.id == 14) {
  2971. if (this.currentId.indexOf(v.id) > -1) {
  2972. strNums = v.price / 12 * v.count * this.stopTime
  2973. } else {
  2974. strNums = v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
  2975. }
  2976. } else {
  2977. if (this.currentId.indexOf(12) > -1 && this.currentId.indexOf(13) > -1) {
  2978. strNums = v.price / 12 * v.count * this.stopTime
  2979. } else {
  2980. strNums = v.price / 12 * v.count * parseInt(this.member.payCycle ? this.member.payCycle : 0)
  2981. }
  2982. }
  2983. strs2 += strNums
  2984. } else if (this.repair == 3) {
  2985. strs2 += v.price / 12 * v.count * (this.stopTime + parseInt(this.member.payCycle ? this.member.payCycle : 0))
  2986. }
  2987. } else {
  2988. strs1 += v.price * v.count
  2989. }
  2990. })
  2991. this.member.supplyMoney = parseInt(strs1) + parseInt(strs2)
  2992. // this.member.orderMoney = this.member.supplyPayMoney
  2993. },
  2994. ordFunc() {// 订单金额
  2995. let strs1 = 0, strs2 = 0
  2996. this.datas2.forEach(v => {
  2997. if (v.id == 11 || v.id == 15) {
  2998. strs1 += parseInt(v.price) * v.count
  2999. } else if (v.id == 14 || v.id == 16) {
  3000. strs2 += parseInt(v.price) / 12 * v.count * this.stopTime
  3001. }
  3002. })
  3003. // this.member.orderMoney = parseInt(strs1) + parseInt(strs2)
  3004. },
  3005. // 旧服务列表相关
  3006. getServed(val) { // 旧服务列表获取
  3007. this.serData = []
  3008. this.pacData = []
  3009. const resList = []
  3010. this.resArr1 = []
  3011. this.resArr2 = []
  3012. this.resArr3 = []
  3013. this.resArr4 = []
  3014. this.resArr5 = []
  3015. this.datas2 = []
  3016. this.$request('/order/getServer').data().success((res) => {// 获取自定义套餐所有服务选项
  3017. this.servedData = res.data.lists
  3018. res.data.lists.forEach(v => {
  3019. if (v.i_isserver == 1) {
  3020. if (this.repair == '1' || this.repair == '2') {
  3021. if (v.id == 17 || v.id == 18) {
  3022. if (this.currentId.indexOf(v.id) > -1) {
  3023. resList.splice(1, 0, v)
  3024. } else {
  3025. this.resArr1.push(v)
  3026. }
  3027. } else if (v.id == 4 || v.id == 19) {
  3028. if (this.currentId.indexOf(v.id) > -1) {
  3029. resList.splice(4, 0, v)
  3030. } else {
  3031. this.resArr2.push(v)
  3032. }
  3033. } else if (v.id == 20 || v.id == 23) {
  3034. if (this.currentId.indexOf(v.id) > -1) {
  3035. resList.splice(14, 0, v)
  3036. } else {
  3037. this.resArr3.push(v)
  3038. }
  3039. } else if (v.id == 13 || v.id == 21) {
  3040. if (this.currentId.indexOf(v.id) > -1) {
  3041. resList.splice(16, 0, v)
  3042. } else {
  3043. this.resArr4.push(v)
  3044. }
  3045. } else if (v.id == 14 || v.id == 22) {
  3046. if (this.currentId.indexOf(v.id) > -1) {
  3047. resList.splice(18, 0, v)
  3048. } else {
  3049. this.resArr5.push(v)
  3050. }
  3051. } else {
  3052. if (v.id !== 12) {
  3053. resList.push(v)
  3054. }
  3055. }
  3056. }
  3057. if (this.repair == '3') {
  3058. if (v.id !== 12) {
  3059. resList.push(v)
  3060. }
  3061. }
  3062. }
  3063. if (v.i_ispackage == 1) {
  3064. let countStr = this.supplys ? this.supplys.filter(s => {
  3065. return Number(s.id) == v.id
  3066. }).map(t => {
  3067. return t.count
  3068. }) : []
  3069. if (this.member.buySubject != this.show_buy_subject) {
  3070. this.pacData.push({
  3071. id: v.id,
  3072. s_name: v.s_name,
  3073. i_pkprice: v.i_pkprice,
  3074. s_pkcount: v.s_pkcount,
  3075. b_pkcount: '',
  3076. count: Number(String(countStr))
  3077. })
  3078. this.member.supplyMoney = '0'
  3079. this.member.sums = '0'
  3080. this.member.supplyPayMoney = 0
  3081. } else {
  3082. this.pacData.push({
  3083. id: v.id,
  3084. s_name: v.s_name,
  3085. i_pkprice: v.i_pkprice,
  3086. s_pkcount: v.s_pkcount,
  3087. b_pkcount: Number(String(countStr)) / v.s_pkcount ? Number(String(countStr)) / v.s_pkcount : '',
  3088. count: Number(String(countStr))
  3089. })
  3090. if (Number(String(countStr)) / v.s_pkcount) {
  3091. this.datas2.push({
  3092. id: v.id,
  3093. name: v.s_name,
  3094. price: v.i_pkprice,
  3095. s_pkcount: v.s_pkcount,
  3096. count: Number(String(countStr)) / v.s_pkcount ? Number(String(countStr)) / v.s_pkcount : ''
  3097. })
  3098. }
  3099. }
  3100. }
  3101. })
  3102. let arr1 = {
  3103. i_ispackage: 0,
  3104. i_isserver: 1,
  3105. i_pkprice: null,
  3106. i_price_month: null,
  3107. i_price_year: null,
  3108. s_count_year: null,
  3109. id: 9119,
  3110. s_name: '',
  3111. s_pkcount: null,
  3112. _checked: false
  3113. }
  3114. let arr2 = {
  3115. i_ispackage: 0,
  3116. i_isserver: 1,
  3117. i_pkprice: null,
  3118. i_price_month: null,
  3119. i_price_year: null,
  3120. s_count_year: null,
  3121. id: 9120,
  3122. s_name: '',
  3123. s_pkcount: null,
  3124. _checked: false
  3125. }
  3126. let arr3 = {
  3127. i_ispackage: 0,
  3128. i_isserver: 1,
  3129. i_pkprice: null,
  3130. i_price_month: null,
  3131. i_price_year: null,
  3132. s_count_year: null,
  3133. id: 9121,
  3134. s_name: '',
  3135. s_pkcount: null,
  3136. _checked: false
  3137. }
  3138. let arr4 = {
  3139. i_ispackage: 0,
  3140. i_isserver: 1,
  3141. i_pkprice: null,
  3142. i_price_month: null,
  3143. i_price_year: null,
  3144. s_count_year: null,
  3145. id: 9122,
  3146. s_name: '',
  3147. s_pkcount: null,
  3148. _checked: false
  3149. }
  3150. let arr5 = {
  3151. i_ispackage: 0,
  3152. i_isserver: 1,
  3153. i_pkprice: null,
  3154. i_price_month: null,
  3155. i_price_year: null,
  3156. s_count_year: null,
  3157. id: 9123,
  3158. s_name: '',
  3159. s_pkcount: null,
  3160. _checked: false
  3161. }
  3162. if (this.repair == '1' || this.repair == '2') {
  3163. if (!(this.currentId.indexOf(17) > -1) && !(this.currentId.indexOf(18) > -1)) {
  3164. resList.splice(1, 0, arr1)
  3165. }
  3166. if (!(this.currentId.indexOf(4) > -1) && !(this.currentId.indexOf(19) > -1)) {
  3167. resList.splice(3, 0, arr2)
  3168. }
  3169. if (!(this.currentId.indexOf(20) > -1) && !(this.currentId.indexOf(23) > -1)) {
  3170. resList.splice(13, 0, arr3)
  3171. }
  3172. if (!(this.currentId.indexOf(13) > -1) && !(this.currentId.indexOf(21) > -1)) {
  3173. resList.splice(14, 0, arr4)
  3174. }
  3175. if (!(this.currentId.indexOf(14) > -1) && !(this.currentId.indexOf(22) > -1)) {
  3176. resList.splice(15, 0, arr5)
  3177. }
  3178. }
  3179. this.serData = resList
  3180. if (val) {
  3181. this.checkedDis2(val)
  3182. } else {
  3183. this.checkedDis1()
  3184. }
  3185. }).get()
  3186. },
  3187. checkedDis1() {// 服务列表选中已享有服务
  3188. this.sumSel = []
  3189. this.serData.forEach(k => {
  3190. if (this.repair == '1') {
  3191. if (k.id == 1) {
  3192. k._checked = true
  3193. k._disabled = true
  3194. }
  3195. if (this.currentId.indexOf(k.id) > -1) {
  3196. k._checked = true
  3197. }
  3198. if (k._checked) {
  3199. this.sumSel.push(k)
  3200. }
  3201. } else if (this.repair == 2) {
  3202. if (this.interested) {
  3203. k._disabled = true
  3204. if (this.currentId.indexOf(k.id) > -1 || this.oldCurrentId.indexOf(k.id) > -1) {
  3205. k._checked = true
  3206. }
  3207. } else {
  3208. if (this.currentId.indexOf(k.id) > -1 || this.oldCurrentId.indexOf(k.id) > -1) {
  3209. k._checked = true
  3210. k._disabled = true
  3211. }
  3212. }
  3213. } else if (this.repair == '3') {
  3214. if (this.currentId.indexOf(k.id) > -1) {
  3215. k._checked = true
  3216. k._disabled = true
  3217. } else {
  3218. k._disabled = true
  3219. }
  3220. }
  3221. })
  3222. this.pacData.forEach(j => {
  3223. if (this.interested) {
  3224. j._rowDis = true
  3225. } else {
  3226. if (this.currentId.indexOf(j.id) > -1) {
  3227. j._rowDis = false
  3228. } else {
  3229. if (j.id == 16) {
  3230. 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) {
  3231. j._rowDis = false
  3232. } else {
  3233. j._rowDis = true
  3234. }
  3235. } else {
  3236. if (this.currentId.indexOf(j.id) > -1) {
  3237. j._rowDis = false
  3238. } else {
  3239. j._rowDis = true
  3240. }
  3241. }
  3242. }
  3243. }
  3244. })
  3245. },
  3246. checkedDis2(val) {
  3247. this.pacData.forEach(v => {
  3248. if (this.interested) {
  3249. v._rowDis = true
  3250. } else {
  3251. if (v.id == 16) {
  3252. 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) {
  3253. v._rowDis = false
  3254. } else {
  3255. v._rowDis = true
  3256. }
  3257. } else {
  3258. if (val.s_servers.indexOf(v.id) > -1) {
  3259. v._rowDis = false
  3260. } else {
  3261. v._rowDis = true
  3262. }
  3263. }
  3264. }
  3265. })
  3266. },
  3267. // 合计
  3268. handleSummary({ columns, data }) {
  3269. const sums = {}
  3270. columns.forEach((column, index) => {
  3271. const key = column.key
  3272. if (index === 0) {
  3273. sums[key] = {
  3274. key,
  3275. value: '合计'
  3276. }
  3277. return
  3278. }
  3279. let values = []
  3280. if (this.sumSel.length == 0 || this.sumSel.length == 1) {
  3281. this.sArr = []
  3282. data.forEach(v => {
  3283. if (v._checked) {
  3284. this.sArr.push(v)
  3285. }
  3286. })
  3287. values = this.sArr.map(item => Number(item[key]))
  3288. } else {
  3289. values = this.sumSel.map(item => Number(item[key]))
  3290. }
  3291. if (!values.every(value => isNaN(value))) {
  3292. const v = values.reduce((prev, curr) => {
  3293. const value = Number(curr);
  3294. if (!isNaN(value)) {
  3295. return prev + curr;
  3296. } else {
  3297. return prev;
  3298. }
  3299. }, 0)
  3300. sums[key] = {
  3301. key,
  3302. value: v
  3303. }
  3304. // this.sPrice = sums.i_price_year.value
  3305. if (this.nums == 0) {
  3306. let arr2 = []
  3307. this.sumSel.forEach(v => {
  3308. if (v.id != 1) {
  3309. arr2.push(v.id)
  3310. }
  3311. })
  3312. if (arr2.length != 0) {
  3313. this.moneyFunc()// 大会员订单价格
  3314. }
  3315. if (this.repair == '3') {
  3316. this.moneyFunc(this.valComs)// 大会员订单价格
  3317. }
  3318. } else {
  3319. if (this.member.payCycle) {
  3320. this.moneyFunc()// 大会员订单价格
  3321. }
  3322. }
  3323. } else {
  3324. if (key == 's_name') {
  3325. sums[key] = {
  3326. key,
  3327. value: '-'
  3328. }
  3329. } else {
  3330. sums[key] = {
  3331. key,
  3332. value: 0
  3333. }
  3334. }
  3335. }
  3336. })
  3337. return sums;
  3338. },
  3339. // 多选
  3340. selChage(selection) {
  3341. const arrs = [], arrs1 = [], strItems = []
  3342. this.selData = selection
  3343. selection.map(v => {
  3344. arrs1.push(v.id)
  3345. // if (this.repair == '1') {
  3346. if (v.id !== 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  3347. arrs.push(v)
  3348. }
  3349. // } else {
  3350. // if (!v._disabled) {
  3351. // arrs.push(v)
  3352. // }
  3353. // }
  3354. if (v.id == 9119) {
  3355. strItems.splice(1, 0, this.strItems1)
  3356. } else if (v.id == 9120) {
  3357. strItems.splice(1, 0, this.strItems2)
  3358. } else if (v.id == 9121) {
  3359. strItems.splice(1, 0, this.strItems3)
  3360. } else if (v.id == 9122) {
  3361. strItems.splice(1, 0, this.strItems4)
  3362. } else if (v.id == 9123) {
  3363. strItems.splice(1, 0, this.strItems5)
  3364. }
  3365. })
  3366. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  3367. this.sumSel = arrs.concat(strItems)
  3368. } else {
  3369. this.sumSel = arrs
  3370. }
  3371. if (this.sumSel.length == 0) {
  3372. // this.member.bigMoney = 0
  3373. this.allSum()
  3374. }
  3375. this.moneyFunc(this.valComs)// 大会员订单价格
  3376. },
  3377. allChange() {// 选择全选
  3378. this.pacData.forEach((t, i) => {
  3379. document.getElementById('counts' + i).disabled = false
  3380. })
  3381. },
  3382. allCancel() {// 取消全选
  3383. this.pacData.forEach((t, i) => {
  3384. if (t.id == 16) {
  3385. if (this.currentId.indexOf(12) > -1 && this.currentId.indexOf(13) > -1) {
  3386. document.getElementById('counts' + i).disabled = false
  3387. } else {
  3388. document.getElementById('counts' + i).disabled = true
  3389. }
  3390. } else {
  3391. if (this.currentId.indexOf(t.id) > -1) {
  3392. document.getElementById('counts' + i).disabled = false
  3393. } else {
  3394. document.getElementById('counts' + i).disabled = true
  3395. }
  3396. }
  3397. document.getElementById('counts' + i).value = ''
  3398. this.datas2.forEach((k, index) => {
  3399. this.datas2[index].count = 0
  3400. this.datas2.splice(index, 1)
  3401. this.packsPrice()
  3402. })
  3403. })
  3404. },
  3405. curChange(selection, row) {// 选择单个
  3406. let arr1 = []
  3407. selection.forEach(l => {
  3408. arr1.push(l.id)
  3409. })
  3410. if (arr1.indexOf(11) > -1) {
  3411. document.getElementById('counts0').disabled = false
  3412. }
  3413. if (arr1.indexOf(15) > -1) {
  3414. document.getElementById('counts2').disabled = false
  3415. }
  3416. if (arr1.indexOf(9121) > -1 && this.strItems3.id == 20 && arr1.indexOf(9122) > -1 && this.strItems4.id == 21) {
  3417. document.getElementById('counts3').disabled = false
  3418. }
  3419. if (arr1.indexOf(9121) > -1 && this.strItems3.id == 23 && arr1.indexOf(9122) > -1 && this.strItems4.id == 13) {
  3420. document.getElementById('counts3').disabled = false
  3421. }
  3422. if (arr1.indexOf(9123) > -1 && this.strItems5.id == 22) {
  3423. document.getElementById('counts4').disabled = false
  3424. }
  3425. if (arr1.indexOf(9123) > -1 && this.strItems5.id == 14) {
  3426. document.getElementById('counts1').disabled = false
  3427. }
  3428. },
  3429. canChange(selection, row) {// 取消单个
  3430. let arr2 = []
  3431. this.pacData.forEach((t, i) => {
  3432. if (row.id == t.id) {
  3433. document.getElementById('counts' + i).disabled = true
  3434. document.getElementById('counts' + i).value = ''
  3435. this.datas2.forEach((k, index) => {
  3436. if (k.id == row.id) {
  3437. this.datas2[index].count = 0
  3438. this.datas2.splice(index, 1)
  3439. this.packsPrice()
  3440. }
  3441. })
  3442. }
  3443. })
  3444. if (selection.length == 0) {
  3445. this.datas2 = []
  3446. }
  3447. selection.forEach(l => {
  3448. arr2.push(l.id)
  3449. })
  3450. // if (arr2.indexOf(12) > -1 && arr2.indexOf(13) > -1) {
  3451. // document.getElementById('counts3').disabled = false
  3452. // } else {
  3453. // document.getElementById('counts3').disabled = true
  3454. // document.getElementById('counts3').value = ''
  3455. // }
  3456. this.allSum()
  3457. },
  3458. moneyFunc(str) {// 大会员金额
  3459. let sumd1 = 0, sumd2 = 0, sumd3 = 0
  3460. const arrs3 = [], arrs5 = [], arrs6 = [], arrs7 = []
  3461. if (this.repair == '3') {
  3462. this.sumSel = []
  3463. this.serData.map(v => {
  3464. if (v._checked && v._disabled) {
  3465. this.sumSel.push(v)
  3466. }
  3467. })
  3468. }
  3469. if (this.nums == 0) {
  3470. this.sumSel.map(v => {
  3471. arrs5.push(v.id)
  3472. if (v.id == 17 || v.id == 18) {
  3473. arrs3.push(v)
  3474. } else {
  3475. arrs6.push(v)
  3476. }
  3477. })
  3478. } else {
  3479. const sered = str.s_servers.split(',')
  3480. this.servedData.forEach(c => {
  3481. sered.forEach(r => {
  3482. if (r == c.id) {
  3483. arrs7.push(c)
  3484. }
  3485. })
  3486. })
  3487. this.nums == 0 ? this.sumSel : arrs7.map(v => {
  3488. arrs5.push(v.id)
  3489. if (v.id == 17 || v.id == 18) {
  3490. arrs3.push(v)
  3491. } else {
  3492. arrs6.push(v)
  3493. }
  3494. })
  3495. }
  3496. if (this.member.payCycle >= 12) {
  3497. if (arrs5.indexOf(17) > -1 || arrs5.indexOf(18) > -1) {
  3498. const cycles1 = parseInt(this.member.payCycle / 12) // 取整
  3499. const cycles2 = this.member.payCycle % 12 // 取余
  3500. arrs3.forEach(p => {
  3501. if (this.member.payCycle == 12) {
  3502. sumd3 += parseInt(p.i_price_year * cycles1)
  3503. } else {
  3504. sumd1 += parseInt(p.i_price_year * cycles1 + p.i_price_month * cycles2)
  3505. }
  3506. })
  3507. }
  3508. arrs6.forEach(p => {
  3509. sumd2 += parseInt(p.i_price_year / 12 * this.member.payCycle)
  3510. })
  3511. } else {
  3512. if (arrs5.indexOf(17) > -1 || arrs5.indexOf(18) > -1) {
  3513. arrs3.forEach(p => {
  3514. sumd1 += parseInt(p.i_price_month * this.member.payCycle)
  3515. })
  3516. }
  3517. arrs6.forEach(p => {
  3518. sumd2 += parseInt(p.i_price_year / 10 * this.member.payCycle)
  3519. })
  3520. }
  3521. this.member.bigMoney = sumd1 + sumd2 + sumd3
  3522. if (this.member.bigMoney == 0 || this.allDis) {
  3523. this.bigDis = true
  3524. this.member.bigPayMoney = ''
  3525. } else {
  3526. this.bigDis = false
  3527. }
  3528. this.allSum() // 总计
  3529. },
  3530. serChange(val) {// 选择服务
  3531. if (val == 1) {
  3532. this.monthTime = 60
  3533. } else if (val == 2) {
  3534. this.monthTime = this.stopTime
  3535. } else if (val == 3) {
  3536. this.monthTime = 60 - this.stopTime
  3537. }
  3538. // this.datas2 = []
  3539. // this.initialized()
  3540. this.repair = val
  3541. this.getServed('')
  3542. },
  3543. allSum() {// 总计
  3544. this.member.sums = Number(this.member.bigMoney) + Number(this.member.subMoney) + Number(this.member.supplyMoney)
  3545. }
  3546. // 旧服务列表相关 结束
  3547. },
  3548. data() {
  3549. return {
  3550. startDate_p: '请选择开始时间',
  3551. returnmoney: false,
  3552. serveEndtime: '',
  3553. buyserveName: '',
  3554. paybackTable:[
  3555. {
  3556. title: '序号',
  3557. slot: 'code'
  3558. },
  3559. {
  3560. title: '预计回款时间',
  3561. slot: 'time'
  3562. },
  3563. {
  3564. title: '预计回款金额(元)',
  3565. slot: 'money'
  3566. }
  3567. ],
  3568. paybackTableData:[],
  3569. contactOrderList: [],
  3570. contactOrderchoose: {},
  3571. contactOrderColumns: [
  3572. {
  3573. title: '请选择',
  3574. align: 'center',
  3575. key: 'choose',
  3576. render: (h, params) => {
  3577. return h('div', [
  3578. h('Radio', {
  3579. props: {
  3580. value: params.row.choose,
  3581. disabled: params.row.disabled
  3582. },
  3583. on: {
  3584. 'on-change': (e) => {
  3585. this.contactOrderList.forEach((items) => { //取消所有对象的勾选,choose设置为false
  3586. this.$set(items, 'choose', false)
  3587. });
  3588. this.contactOrderList[params.index].choose = e; //将勾选的对象的choose设置为true
  3589. this.contactOrderchoose = this.contactOrderList[params.index]
  3590. this.member.contactOrderCode = this.contactOrderchoose.order_code
  3591. this.member.entId = this.contactOrderchoose.ent_id
  3592. console.log(e, this.contactOrderchoose)
  3593. this.orderPriceCount()
  3594. }
  3595. }
  3596. })
  3597. ])
  3598. }
  3599. },
  3600. {
  3601. title: '订单编号',
  3602. key: 'order_code',
  3603. align: 'center',
  3604. render: (h, { row }) => {
  3605. return h('div', {
  3606. style: {
  3607. color: 'rgb(54, 163, 247)',
  3608. cursor: 'pointer'
  3609. },
  3610. on: {
  3611. click: () => {
  3612. const news = this.$router.resolve({
  3613. path: '/order/orderList/orderDetail',
  3614. query: { id: row.id, proType: '大会员' }
  3615. })
  3616. window.open(news.href, '_blank')
  3617. }
  3618. }
  3619. }, [
  3620. h('span', row.order_code)
  3621. ])
  3622. }
  3623. },
  3624. {
  3625. title: '创建时间',
  3626. key: 'create_time',
  3627. align: 'center',
  3628. render: (h, { row }) => {
  3629. return h('span', dateFormatter(row.create_time * 1000, 'yyyy-MM-dd'))
  3630. }
  3631. },
  3632. {
  3633. title: '产品类型',
  3634. key: 'product_type',
  3635. align: 'center'
  3636. },
  3637. {
  3638. title: '到期时间',
  3639. key: 'vip_endtime',
  3640. align: 'center',
  3641. render: (h, { row }) => {
  3642. return h('span', dateFormatter(row.vip_endtime * 1000, 'yyyy-MM-dd'))
  3643. }
  3644. },
  3645. ],
  3646. audit_status: '',
  3647. pricetimer: null,
  3648. showXieYi: false,
  3649. showOrderOther: false,
  3650. areaCount: 0,
  3651. form_serve: {},
  3652. newServedata: [],
  3653. i_member_status: '',
  3654. saleTable: [
  3655. {
  3656. title: '销售人员',
  3657. slot: 'name'
  3658. },
  3659. {
  3660. title: '销售业绩(元)',
  3661. slot: 'money'
  3662. }
  3663. ],
  3664. saleTableData: [],
  3665. saleCode: '',
  3666. saleDep: [],
  3667. olddata: null,
  3668. show_buy_subject: '',
  3669. max_length: 2,
  3670. doReview: false,
  3671. orderCode: '',
  3672. orderReview: {
  3673. pass: "通过",
  3674. reason: ""
  3675. },
  3676. radio_dis: false,
  3677. finish_dis: false,
  3678. overTime: 0,
  3679. serData: [],
  3680. servedData: [],
  3681. pacData: [],
  3682. resArr1: [],
  3683. resArr2: [],
  3684. resArr3: [],
  3685. resArr4: [],
  3686. resArr5: [],
  3687. equity: false,
  3688. optionDis1: false,
  3689. optionDis2: false,
  3690. optionDis3: false,
  3691. optionDis4: false,
  3692. optionDis5: false,
  3693. typeRestriction: true,
  3694. optionDis6: false,
  3695. repair: '1',
  3696. spinShow: false,
  3697. interested: false,
  3698. bShow: false,
  3699. downDis: false,
  3700. shiDis: false,
  3701. valComs: {},
  3702. strs1: 0,
  3703. strs2: 0,
  3704. pArr1: [],
  3705. pArr2: [],
  3706. supplys: [],
  3707. combo_id: {},
  3708. noFinishDis: false,
  3709. finishDis: false,
  3710. cancelDis: false,
  3711. allDis: false,
  3712. bigDis: true,
  3713. subDis: true,
  3714. supplyDis: true,
  3715. sArr: [],
  3716. cancel: false,
  3717. noPhone: false,
  3718. noPass: false,
  3719. noPass1: false,
  3720. pReadon: false,
  3721. isDisable: false,
  3722. returnBoll: 0,
  3723. selData: [],
  3724. placed: '请输入有效周期',
  3725. member: {
  3726. paybackList:[],
  3727. paybackNum:1,
  3728. entId: '',
  3729. paybackOpenServer: false,
  3730. contactOrderCode: '',
  3731. paybackWorkDayNum: '',
  3732. paybackExpectDate: '',
  3733. contract_nature: '1', // 合同性质
  3734. phone: '',
  3735. products: '',
  3736. buySubject: '',//购买主体
  3737. buyCount: '',//购买数量
  3738. billingMode: '',
  3739. salesPerson: '',
  3740. level: '',
  3741. createType: '1',
  3742. oldCreateType: '1',
  3743. oldPhone: '',
  3744. payCycle: '',
  3745. cycleType: '0',
  3746. beginTime: '',
  3747. paySub: '',
  3748. freeSub: '',
  3749. bigMoney: 0,
  3750. subMoney: 0,
  3751. supplyMoney: 0,
  3752. orderMoney: 0,
  3753. sums: 0,
  3754. agreementStatus: '',
  3755. agreementTime: '',
  3756. agreementNumber: '',
  3757. contractUrl: '',
  3758. payMoney: '',
  3759. bigPayMoney: '',
  3760. subPayMoney: '',
  3761. supplyPayMoney: '',
  3762. commission: '0',
  3763. proceduresMoney: '0',
  3764. companyName: '',
  3765. salesChannel: '',
  3766. orderChannel: 'd01',
  3767. paybackCompany: 'h01',
  3768. remark: '',
  3769. sale_time: dateFormatter(new Date(), 'yyyy-MM-dd') + ' 00:00:00',
  3770. order_status: '1',
  3771. contract_archive_status: '0',
  3772. contract_archive_time: '',
  3773. contract_archive_num: '',
  3774. single: false, // 大会员商机版2.0-单省版 radio 选中状态
  3775. areaCount: '0', // 大会员省份版-省份数量
  3776. payType: '',
  3777. saleCodeModel: [],
  3778. // 电子协议相关
  3779. e_contract_type: 1, // 电子协议类型
  3780. e_contract_userA_type: 1, // 协议甲方类型
  3781. e_contract_userA_name: '', // 协议甲方
  3782. e_contract_userA_contacts_name: '', // 协议甲方联系人
  3783. e_contract_userA_contacts_tel: '', // 协议甲方联系方式
  3784. e_contract_userA_contacts_address: '', // 协议甲方联系地址
  3785. e_contract_userB_contacts_name: '', // 协议乙方联系人
  3786. e_contract_remark: '', // 协议备注
  3787. },
  3788. isAll: false,
  3789. radioDis1: false,
  3790. radioDis2: false,
  3791. radioDis3: false,
  3792. currentId: [],
  3793. oldCurrentId: [],
  3794. curIds: [],
  3795. sPrice: 0,
  3796. mPrice: 0,
  3797. valNums: 0,
  3798. rowArr: {},
  3799. agreeStatus: [
  3800. { v: '0', n: '不签协议' },
  3801. { v: '1', n: '签协议' }
  3802. ],
  3803. payTypes: [
  3804. { v: 'transferAccounts', n: '对公转账' },
  3805. { v: 'wx', n: '微信' },
  3806. { v: 'ali', n: '支付宝' }
  3807. ],
  3808. unitOptions: [
  3809. { v: 0, n: '月' },
  3810. { v: 1, n: '天' }
  3811. ],
  3812. ruleValidate: {
  3813. salesChannel: [{ required: true }],
  3814. orderChannel: [{ required: true }],
  3815. paybackCompany: [{ required: true }],
  3816. phone: [{ required: true }],
  3817. level: [{ required: true }],
  3818. billingMode: [{ required: true }],
  3819. createType: [{ required: true }],
  3820. payCycle: [{ required: true }],
  3821. agreementStatus: [{ required: true }],
  3822. bigPayMoney: [{ required: true }],
  3823. subPayMoney: [{ required: true }],
  3824. payMoney: [{ required: true }],
  3825. supplyPayMoney: [{ required: true }],
  3826. createTime: [{ required: true }],
  3827. companyName: [{ required: true }],
  3828. order_status: [{ required: true }]
  3829. },
  3830. columns1: [
  3831. {
  3832. title: '补充包名称',
  3833. key: 's_name',
  3834. width: 280,
  3835. align: 'center',
  3836. render: (h, { row }) => {
  3837. return h('span', row.s_name ? row.s_name : '-')
  3838. }
  3839. },
  3840. {
  3841. title: '价格',
  3842. key: 'i_pkprice',
  3843. width: 130,
  3844. align: 'center',
  3845. render: (h, { row }) => {
  3846. let arr1 = [11, 15]
  3847. return h('span', row.i_pkprice ? row.s_pkcount ? row.s_pkcount + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_pkprice : row.i_pkprice : '-')
  3848. }
  3849. },
  3850. {
  3851. title: '购买数量',
  3852. key: 'b_pkcount',
  3853. align: 'center',
  3854. render: (h, { row, index }) => {
  3855. return h('Input', {
  3856. props: {
  3857. placeholder: '请输入购买数量',
  3858. value: row.b_pkcount,
  3859. disabled: row._rowDis,
  3860. elementId: 'counts' + index
  3861. },
  3862. on: {
  3863. 'on-change': (event) => {
  3864. this.rowArr = row
  3865. event.currentTarget.value = event.currentTarget.value.replace(/[^\d]+/g, '')
  3866. this.valNums = event.currentTarget.value
  3867. if (event.currentTarget.value) {
  3868. if (this.datas2.length !== 0) {
  3869. var isOk = false;
  3870. this.datas2.forEach(v => {
  3871. if (row.id == v.id) {
  3872. isOk = true
  3873. v.count = this.valNums
  3874. }
  3875. })
  3876. if (!isOk) {
  3877. this.datas2.push({
  3878. id: row.id,
  3879. name: row.s_name,
  3880. price: row.i_pkprice,
  3881. s_pkcount: row.s_pkcount,
  3882. count: this.valNums
  3883. })
  3884. }
  3885. } else {
  3886. this.datas2.push({
  3887. id: row.id,
  3888. name: row.s_name,
  3889. price: row.i_pkprice,
  3890. s_pkcount: row.s_pkcount,
  3891. count: this.valNums
  3892. })
  3893. }
  3894. } else {
  3895. this.datas2.forEach((v, i) => {
  3896. if (row.id == v.id) {
  3897. this.datas2.splice(i, 1)
  3898. }
  3899. })
  3900. }
  3901. this.packsPrice()
  3902. this.ordFunc()
  3903. this.allSum() // 总计
  3904. this.orderPriceCount()
  3905. },
  3906. 'on-keyup': (event) => {
  3907. event.currentTarget.value = event.currentTarget.value.replace(/[^\d]+/g, '')
  3908. }
  3909. }
  3910. })
  3911. }
  3912. }
  3913. ],
  3914. datas1: [],
  3915. datas2: [],
  3916. selStr: '',
  3917. strItems1: [],
  3918. strItems2: [],
  3919. strItems3: [],
  3920. strItems4: [],
  3921. strItems5: [],
  3922. value1: '',
  3923. columns2: [
  3924. {
  3925. title: '金额明细',
  3926. key: 'name',
  3927. align: 'center',
  3928. render: (h, { row }) => {
  3929. return h('span', row.name ? row.name : '-')
  3930. }
  3931. },
  3932. {
  3933. title: '价格',
  3934. key: 'price',
  3935. width: 170,
  3936. align: 'center',
  3937. render: (h, { row }) => {
  3938. return h('span', row.price ? row.count ? row.price + '*' + row.count : row.price : '-')
  3939. }
  3940. }
  3941. ],
  3942. // 旧服务列表
  3943. columns3: [
  3944. {
  3945. type: 'selection',
  3946. width: 40,
  3947. align: 'center'
  3948. },
  3949. {
  3950. title: '服务名称',
  3951. key: 's_name',
  3952. width: 260,
  3953. align: 'center',
  3954. render: (h, { row }) => {
  3955. if (this.repair == '1' || this.repair == '2') {
  3956. if (row.id == 9119) {
  3957. return h('Select', {
  3958. props: {
  3959. placeholder: '请选择单日限量包',
  3960. value: this.selStr,
  3961. },
  3962. on: {
  3963. 'on-change': (val) => {
  3964. row.i_price_year = JSON.parse(val).i_price_year
  3965. row.i_price_month = JSON.parse(val).i_price_month
  3966. },
  3967. 'on-select': val => {
  3968. this.strItems1 = JSON.parse(val.value)
  3969. const arrs = [], arrs1 = [], strItems = []
  3970. this.serData.forEach(s => {
  3971. if (this.selData.length == 0) {
  3972. if (this.repair == '1') {
  3973. if (s.id == 1) {
  3974. this.selData.push(s)
  3975. }
  3976. } else {
  3977. if (!s._disabled) {
  3978. this.selData.push(s)
  3979. }
  3980. }
  3981. }
  3982. })
  3983. this.selData.map(v => {
  3984. arrs1.push(v.id)
  3985. if (this.repair == '1') {
  3986. if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  3987. arrs.push(v)
  3988. }
  3989. } else {
  3990. if (v.id != 9119 && !v._disabled) {
  3991. arrs.push(v)
  3992. }
  3993. }
  3994. if (v.id == 9119) {
  3995. strItems.splice(1, 0, this.strItems1)
  3996. } else if (v.id == 9120) {
  3997. strItems.splice(1, 0, this.strItems2)
  3998. } else if (v.id == 9121) {
  3999. strItems.splice(1, 0, this.strItems3)
  4000. } else if (v.id == 9122) {
  4001. strItems.splice(1, 0, this.strItems4)
  4002. } else if (v.id == 9123) {
  4003. strItems.splice(1, 0, this.strItems5)
  4004. }
  4005. })
  4006. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  4007. this.sumSel = arrs.concat(strItems)
  4008. } else {
  4009. this.sumSel = arrs
  4010. }
  4011. }
  4012. }
  4013. },
  4014. this.resArr1.map(item => {
  4015. return h('Option', {
  4016. props: {
  4017. value: JSON.stringify(item)
  4018. }
  4019. }, item.s_name)
  4020. })
  4021. )
  4022. } else if (row.id == 9120) {
  4023. return h('Select', {
  4024. props: {
  4025. placeholder: '请选择企业全景分析',
  4026. value: this.value1,
  4027. },
  4028. on: {
  4029. 'on-change': (val) => {
  4030. const ids = JSON.parse(val).id
  4031. if (ids == 4) {
  4032. this.optionDis3 = true
  4033. this.optionDis4 = false
  4034. this.optionDis5 = true
  4035. this.optionDis6 = false
  4036. } else if (ids == 19) {
  4037. this.optionDis3 = false
  4038. this.optionDis4 = true
  4039. this.optionDis5 = false
  4040. this.optionDis6 = true
  4041. }
  4042. row.i_price_year = JSON.parse(val).i_price_year
  4043. row.i_price_month = JSON.parse(val).i_price_month
  4044. },
  4045. 'on-select': val => {
  4046. this.strItems2 = JSON.parse(val.value)
  4047. const arrs = [], arrs1 = [], strItems = []
  4048. this.serData.forEach(s => {
  4049. if (this.selData.length == 0) {
  4050. if (this.repair == '1') {
  4051. if (s.id == 1) {
  4052. this.selData.push(s)
  4053. }
  4054. } else {
  4055. if (!s._disabled) {
  4056. this.selData.push(s)
  4057. }
  4058. }
  4059. }
  4060. })
  4061. this.selData.map(v => {
  4062. arrs1.push(v.id)
  4063. if (this.repair == '1') {
  4064. if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  4065. arrs.push(v)
  4066. }
  4067. } else {
  4068. if (v.id != 9119 && !v._disabled) {
  4069. arrs.push(v)
  4070. }
  4071. }
  4072. if (v.id == 9119) {
  4073. strItems.splice(1, 0, this.strItems1)
  4074. } else if (v.id == 9120) {
  4075. strItems.splice(1, 0, this.strItems2)
  4076. } else if (v.id == 9121) {
  4077. strItems.splice(1, 0, this.strItems3)
  4078. } else if (v.id == 9122) {
  4079. strItems.splice(1, 0, this.strItems4)
  4080. } else if (v.id == 9123) {
  4081. strItems.splice(1, 0, this.strItems5)
  4082. }
  4083. })
  4084. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  4085. this.sumSel = arrs.concat(strItems)
  4086. } else {
  4087. this.sumSel = arrs
  4088. }
  4089. }
  4090. }
  4091. },
  4092. [
  4093. h('Option', {
  4094. props: {
  4095. value: JSON.stringify(this.resArr2[1]),
  4096. disabled: this.optionDis1
  4097. }
  4098. }, this.resArr2[1].s_name),
  4099. h('Option', {
  4100. props: {
  4101. value: JSON.stringify(this.resArr2[0]),
  4102. disabled: this.optionDis2
  4103. }
  4104. }, this.resArr2[0].s_name)
  4105. ]
  4106. )
  4107. } else if (row.id == 9121) {
  4108. return h('Select', {
  4109. props: {
  4110. placeholder: '请选择企业情报监控',
  4111. value: '',
  4112. },
  4113. on: {
  4114. 'on-change': (val) => {
  4115. const ids = JSON.parse(val).id
  4116. if (ids == 20) {
  4117. this.optionDis1 = false
  4118. this.optionDis2 = true
  4119. this.optionDis5 = false
  4120. this.optionDis6 = true
  4121. } else if (ids == 23) {
  4122. this.optionDis1 = true
  4123. this.optionDis2 = false
  4124. this.optionDis5 = true
  4125. this.optionDis6 = false
  4126. }
  4127. row.i_price_year = JSON.parse(val).i_price_year
  4128. row.i_price_month = JSON.parse(val).i_price_month
  4129. },
  4130. 'on-select': val => {
  4131. this.strItems3 = JSON.parse(val.value)
  4132. const arrs = [], arrs1 = [], strItems = []
  4133. this.serData.forEach(s => {
  4134. if (this.selData.length == 0) {
  4135. if (this.repair == '1') {
  4136. if (s.id == 1) {
  4137. this.selData.push(s)
  4138. }
  4139. } else {
  4140. if (!s._disabled) {
  4141. this.selData.push(s)
  4142. }
  4143. }
  4144. }
  4145. })
  4146. this.selData.map(v => {
  4147. arrs1.push(v.id)
  4148. if (this.repair == '1') {
  4149. if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  4150. arrs.push(v)
  4151. }
  4152. } else {
  4153. if (v.id != 9119 && !v._disabled) {
  4154. arrs.push(v)
  4155. }
  4156. }
  4157. if (v.id == 9119) {
  4158. strItems.splice(1, 0, this.strItems1)
  4159. } else if (v.id == 9120) {
  4160. strItems.splice(1, 0, this.strItems2)
  4161. } else if (v.id == 9121) {
  4162. strItems.splice(1, 0, this.strItems3)
  4163. } else if (v.id == 9122) {
  4164. strItems.splice(1, 0, this.strItems4)
  4165. } else if (v.id == 9123) {
  4166. strItems.splice(1, 0, this.strItems5)
  4167. }
  4168. })
  4169. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  4170. this.sumSel = arrs.concat(strItems)
  4171. } else {
  4172. this.sumSel = arrs
  4173. }
  4174. }
  4175. }
  4176. },
  4177. [
  4178. h('Option', {
  4179. props: {
  4180. value: JSON.stringify(this.resArr3[0]),
  4181. disabled: this.optionDis3
  4182. }
  4183. }, this.resArr3[0].s_name),
  4184. h('Option', {
  4185. props: {
  4186. value: JSON.stringify(this.resArr3[1]),
  4187. disabled: this.optionDis4
  4188. }
  4189. }, this.resArr3[1].s_name)
  4190. ]
  4191. )
  4192. } else if (row.id == 9122) {
  4193. return h('Select', {
  4194. props: {
  4195. placeholder: '请选择企业中标动态',
  4196. value: '',
  4197. },
  4198. on: {
  4199. 'on-change': (val) => {
  4200. const ids = JSON.parse(val).id
  4201. if (ids == 21) {
  4202. this.optionDis1 = false
  4203. this.optionDis2 = true
  4204. this.optionDis3 = false
  4205. this.optionDis4 = true
  4206. } else if (ids == 13) {
  4207. this.optionDis1 = true
  4208. this.optionDis2 = false
  4209. this.optionDis3 = true
  4210. this.optionDis4 = false
  4211. }
  4212. row.i_price_year = JSON.parse(val).i_price_year
  4213. row.i_price_month = JSON.parse(val).i_price_month
  4214. },
  4215. 'on-select': val => {
  4216. this.strItems4 = JSON.parse(val.value)
  4217. const arrs = [], arrs1 = [], strItems = []
  4218. this.serData.forEach(s => {
  4219. if (this.selData.length == 0) {
  4220. if (this.repair == '1') {
  4221. if (s.id == 1) {
  4222. this.selData.push(s)
  4223. }
  4224. } else {
  4225. if (!s._disabled) {
  4226. this.selData.push(s)
  4227. }
  4228. }
  4229. }
  4230. })
  4231. this.selData.map(v => {
  4232. arrs1.push(v.id)
  4233. if (this.repair == '1') {
  4234. if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  4235. arrs.push(v)
  4236. }
  4237. } else {
  4238. if (v.id != 9119 && !v._disabled) {
  4239. arrs.push(v)
  4240. }
  4241. }
  4242. if (v.id == 9119) {
  4243. strItems.splice(1, 0, this.strItems1)
  4244. } else if (v.id == 9120) {
  4245. strItems.splice(1, 0, this.strItems2)
  4246. } else if (v.id == 9121) {
  4247. strItems.splice(1, 0, this.strItems3)
  4248. } else if (v.id == 9122) {
  4249. strItems.splice(1, 0, this.strItems4)
  4250. } else if (v.id == 9123) {
  4251. strItems.splice(1, 0, this.strItems5)
  4252. }
  4253. })
  4254. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  4255. this.sumSel = arrs.concat(strItems)
  4256. } else {
  4257. this.sumSel = arrs
  4258. }
  4259. }
  4260. }
  4261. },
  4262. [
  4263. h('Option', {
  4264. props: {
  4265. value: JSON.stringify(this.resArr4[1]),
  4266. disabled: this.optionDis5
  4267. }
  4268. }, this.resArr4[1].s_name),
  4269. h('Option', {
  4270. props: {
  4271. value: JSON.stringify(this.resArr4[0]),
  4272. disabled: this.optionDis6
  4273. }
  4274. }, this.resArr4[0].s_name)
  4275. ]
  4276. )
  4277. } else if (row.id == 9123) {
  4278. return h('Select', {
  4279. props: {
  4280. placeholder: '请选择项目进度监控',
  4281. value: '',
  4282. },
  4283. on: {
  4284. 'on-change': (val) => {
  4285. row.i_price_year = JSON.parse(val).i_price_year
  4286. row.i_price_month = JSON.parse(val).i_price_month
  4287. },
  4288. 'on-select': val => {
  4289. this.strItems5 = JSON.parse(val.value)
  4290. const arrs = [], arrs1 = [], strItems = []
  4291. this.serData.forEach(s => {
  4292. if (this.selData.length == 0) {
  4293. if (this.repair == '1') {
  4294. if (s.id == 1) {
  4295. this.selData.push(s)
  4296. }
  4297. } else {
  4298. if (!s._disabled) {
  4299. this.selData.push(s)
  4300. }
  4301. }
  4302. }
  4303. })
  4304. this.selData.map(v => {
  4305. arrs1.push(v.id)
  4306. if (this.repair == '1') {
  4307. if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
  4308. arrs.push(v)
  4309. }
  4310. } else {
  4311. if (v.id != 9119 && !v._disabled) {
  4312. arrs.push(v)
  4313. }
  4314. }
  4315. if (v.id == 9119) {
  4316. strItems.splice(1, 0, this.strItems1)
  4317. } else if (v.id == 9120) {
  4318. strItems.splice(1, 0, this.strItems2)
  4319. } else if (v.id == 9121) {
  4320. strItems.splice(1, 0, this.strItems3)
  4321. } else if (v.id == 9122) {
  4322. strItems.splice(1, 0, this.strItems4)
  4323. } else if (v.id == 9123) {
  4324. strItems.splice(1, 0, this.strItems5)
  4325. }
  4326. })
  4327. if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
  4328. this.sumSel = arrs.concat(strItems)
  4329. } else {
  4330. this.sumSel = arrs
  4331. }
  4332. }
  4333. }
  4334. },
  4335. [
  4336. h('Option', {
  4337. props: {
  4338. value: JSON.stringify(this.resArr5[1])
  4339. }
  4340. }, this.resArr5[1].s_name),
  4341. h('Option', {
  4342. props: {
  4343. value: JSON.stringify(this.resArr5[0])
  4344. }
  4345. }, this.resArr5[0].s_name)
  4346. ]
  4347. )
  4348. } else {
  4349. return h('span', row.s_name ? row.s_name : '-')
  4350. }
  4351. } else {
  4352. return h('span', row.s_name ? row.s_name : '-')
  4353. }
  4354. }
  4355. },
  4356. {
  4357. title: '年价格',
  4358. key: 'i_price_year',
  4359. align: 'center',
  4360. render: (h, { row }) => {
  4361. let arr1 = [11, 15]
  4362. if (row.i_price_year) {
  4363. if (row.s_count_year) {
  4364. if (row.id == 17 || row.id == 18) {
  4365. return h('span', row.i_price_year)
  4366. } else {
  4367. return h('span', row.s_count_year + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_price_year)
  4368. }
  4369. } else {
  4370. return h('span', row.i_price_year)
  4371. }
  4372. } else {
  4373. return h('span', '-')
  4374. }
  4375. }
  4376. },
  4377. {
  4378. title: '月价格',
  4379. key: 'i_price_month',
  4380. align: 'center',
  4381. render: (h, { row }) => {
  4382. let arr1 = [11, 15]
  4383. if (row.i_price_month) {
  4384. if (row.s_count_month) {
  4385. if (row.id == 17 || row.id == 18) {
  4386. return h('span', row.i_price_month)
  4387. } else {
  4388. return h('span', row.s_count_month + (arr1.indexOf(row.id) > -1 ? '次/' : '个/') + row.i_price_month)
  4389. }
  4390. } else {
  4391. return h('span', row.i_price_month)
  4392. }
  4393. } else {
  4394. return h('span', '-')
  4395. }
  4396. }
  4397. }
  4398. ],
  4399. // 旧服务列表结束
  4400. sumSel: [],
  4401. creAuth: '',
  4402. bigStas: Number,
  4403. subStas: Number,
  4404. yearStas: Number,
  4405. isYears: Number,
  4406. stopTime: Number,
  4407. monthTime: Number,
  4408. colr: '',
  4409. proNums: 0,
  4410. comVal: {},
  4411. levelShow: true,
  4412. bigPro: [
  4413. { v: '1', n: '大会员' },
  4414. { v: '2', n: '大会员子账号' },
  4415. { v: '3', n: '大会员补充包' }
  4416. ],
  4417. levelDown: [],
  4418. nums: '',
  4419. chargeStatus: [
  4420. { v: 0, n: '免费' },
  4421. { v: 1, n: '收费' }
  4422. ],
  4423. }
  4424. }
  4425. }
  4426. </script>
  4427. <style lang="scss" scoped>
  4428. .disabled-modal {
  4429. .readonly-scroll {
  4430. max-height: 40vh;
  4431. min-height: 300px;
  4432. overflow-y: scroll;
  4433. position: relative;
  4434. border: unset;
  4435. overflow-x: hidden;
  4436. }
  4437. .ivu-form.mainDetail {
  4438. position: relative;
  4439. &::after {
  4440. content: "";
  4441. position: absolute;
  4442. top: -8px;
  4443. left: -5px;
  4444. width: 102%;
  4445. height: 102%;
  4446. border-radius: 10px;
  4447. background-color: rgba(225, 225, 225, 0.0);
  4448. display: inline-block;
  4449. z-index: 99999999;
  4450. }
  4451. }
  4452. }
  4453. .servechildrenbox {
  4454. display: flex;
  4455. // margin-top: 15px;
  4456. }
  4457. .serve-one {
  4458. font-weight: bold;
  4459. }
  4460. .servebox {
  4461. overflow: hidden;
  4462. display: block;
  4463. }
  4464. .serve-two {
  4465. display: flex;
  4466. margin: 5px 0;
  4467. }
  4468. .one-group {
  4469. float: left;
  4470. margin: 5px 0;
  4471. }
  4472. .serve-content {
  4473. display: flex;
  4474. flex-wrap: wrap;
  4475. float: left;
  4476. width: 650px;
  4477. }
  4478. .ivu-form-item {
  4479. margin-bottom: 10px;
  4480. }
  4481. </style>