| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738 |
- <template>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="商铺列表" name="first">
- <div style="display: inline-block;">
- <div style="position: relative;display: inline-block;margin: 10px 0px;">
- <span>商铺名称:</span>
- <el-input
- style="width: 200px;"
- @keydown.enter.native="shopSelect"
- placeholder="请输入商铺名称"
- v-model="shopName1"
- >
- </el-input
- >
- </div>
- <div style="position: relative;display: inline-block;margin: 10px 0px;">
- <span>省/市/区:</span>
- <el-input
- style="width: 200px;"
- @keydown.enter.native="shopSelect"
- placeholder="请输入省/市/区"
- v-model="region"
- >
- </el-input
- >
- </div>
- <div style="position: relative;display: inline-block;margin: 10px 0px;">
- <span>是否是活动商铺:</span>
- <el-select
- v-model="isActivity"
- placeholder="请选择是否是活动商铺"
- style="width:150px;"
- @change="shopSelect()"
- >
- <el-option
- v-for="item in statusmain"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option> </el-select
- >
- </div>
- <div style="position: relative;display: inline-block;margin: 10px 0px;">
- <span>是否为会员立减商家:</span>
- <el-select
- v-model="vipPromotion"
- placeholder="请选择"
- style="width:150px;"
- @change="shopSelect()"
- >
- <el-option label="是" :value="1"></el-option>
- <el-option label="否" :value="0"></el-option>
- </el-select>
- </div>
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="shopSelect"
- >查询
- </el-button>
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="cleans2"
- >重置
- </el-button>
- </div>
- <div style="float: right;margin-right:2%;">
- <el-button
- :disabled="!isAuth('shopsList:add')"
- icon="document"
- size="mini"
- style="margin: 10px 0;"
- type="primary"
- @click="addNotice"
- >添加商铺</el-button
- >
- </div>
- <el-table
- v-loading="tableDataLoading"
- :data="typeDatas.list"
- row-key="id"
- >
- <el-table-column label="编号" prop="shopId" width="80" fixed="left">
- </el-table-column>
- <el-table-column label="名称" prop="shopName" fixed="left">
- </el-table-column>
- <el-table-column label="店铺手机号" prop="phone" width="120">
- </el-table-column>
- <el-table-column label="商铺类型" prop="shopTypeName">
- </el-table-column>
- <el-table-column prop="shopCover" label="封面图" width="150">
- <template slot-scope="scope">
- <div style="display: inline-block; margin: 3px;">
- <el-popover placement="top-start" title="" trigger="hover">
- <img
- style="width: 50px; height: 50px"
- :src="scope.row.shopCover"
- alt=""
- slot="reference"
- />
- <img
- style="width: 300px; height: auto"
- :src="scope.row.shopCover"
- alt=""
- />
- </el-popover>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="shopBanner" label="轮播图" width="150">
- <template slot-scope="scope">
- <div
- v-for="(item, index) in scope.row.shopBanner"
- :key="index"
- style="display: inline-block; margin: 3px;"
- >
- <el-popover placement="top-start" title="" trigger="hover">
- <img
- style="width: 50px; height: 50px"
- :src="item"
- alt=""
- slot="reference"
- />
- <img style="width: 300px; height: auto" :src="item" alt="" />
- </el-popover>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="商铺佣金比例" prop="shopTypeName" width="150">
- <template slot-scope="scope">
- <span>{{ scope.row.shopRate ? scope.row.shopRate : 0 }}</span>
- <el-button
- size="mini"
- type="danger"
- style="color: #4f9dec;background: #fff;border: none;"
- :disabled="!isAuth('userList:updateMoney')"
- @click="rechargenone(scope.row, 3)"
- >修改佣金比例
- </el-button>
- </template>
- </el-table-column>
- <el-table-column label="营业状态" prop="putawayFlag">
- <template slot-scope="scope">
- <span>{{ scope.row.putawayFlag == 0 ? "上班啦" : "打烊啦" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="商铺保证金" prop="cashDeposit" width="150">
- <template slot-scope="scope">
- <span>{{ scope.row.cashDeposit ? scope.row.cashDeposit : 0 }}</span>
- <el-button
- size="mini"
- type="danger"
- style="color: #4f9dec;background: #fff;border: none;"
- :disabled="!isAuth('userList:updateMoney')"
- @click="rechargenone(scope.row, 2)"
- >修改保证金
- </el-button>
- </template>
- </el-table-column>
- <el-table-column label="配送费" prop="errandMoney" width="150">
- <template slot-scope="scope">
- <span>{{ scope.row.errandMoney ? scope.row.errandMoney : 0 }}</span>
- <el-button
- size="mini"
- type="danger"
- style="color: #4f9dec;background: #fff;border: none;"
- :disabled="!isAuth('userList:updateMoney')"
- @click="rechargenone(scope.row, 1)"
- >修改配送费
- </el-button>
- </template>
- </el-table-column>
- <el-table-column
- label="配送距离"
- prop="distributionDistance"
- width="150"
- >
- <template slot-scope="scope">
- <span>{{
- scope.row.distributionDistance
- ? scope.row.distributionDistance
- : 0
- }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="是否减免配送费" prop="exemptErrandFlag">
- <template slot-scope="scope">
- <span>{{scope.row.exemptErrandFlag==0?'开启':'关闭'}}</span>
- </template>
- </el-table-column> -->
- <el-table-column label="减免配送费最低订单金额" prop="exemptMinMoney">
- </el-table-column>
- <el-table-column label="最低起送金额" prop="minimumDelivery">
- </el-table-column>
- <el-table-column label="是否开启满减" prop="enableFullReductionFlag">
- <template slot-scope="scope">
- <span>{{
- scope.row.enableFullReductionFlag == 0 ? "开启" : "关闭"
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="是否开启平台配送" prop="autoSendOrder">
- <template slot-scope="scope">
- <span>{{ scope.row.autoSendOrder == 0 ? "开启" : "关闭" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="是否开启自动接单" prop="autoAcceptOrder">
- <template slot-scope="scope">
- <span>{{ scope.row.autoAcceptOrder == 0 ? "开启" : "关闭" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="商铺标签" prop="shopLable"> </el-table-column>
- <el-table-column label="开店时间" prop="businessHours">
- </el-table-column>
- <el-table-column label="闭店时间" prop="lockHours"> </el-table-column>
- <el-table-column label="商铺评分" prop="shopScore"> </el-table-column>
- <el-table-column label="商铺销量" prop="shopSales"> </el-table-column>
- <el-table-column label="打印机类型" prop="facility">
- <template slot-scope="scope">
- <span v-if="scope.row.facility == 1">飞鹅</span>
- </template>
- </el-table-column>
- <el-table-column label="设备sn编码" prop="snCode"> </el-table-column>
- <el-table-column label="设备key秘钥" prop="value"> </el-table-column>
- <el-table-column label="省" prop="province"> </el-table-column>
- <el-table-column label="市" prop="city"> </el-table-column>
- <el-table-column label="区" prop="district"> </el-table-column>
- <el-table-column label="详细地址" prop="detailedAddress" width="200">
- </el-table-column>
- <el-table-column label="经度" prop="shopLng"> </el-table-column>
- <el-table-column label="纬度" prop="shopLat"> </el-table-column>
- <el-table-column label="审核时间" prop="auditTime" width="160">
- </el-table-column>
- <el-table-column label="创建时间" prop="createTime" width="160">
- </el-table-column>
- <el-table-column label="商家公告" prop="shopNotice" width="150">
- </el-table-column>
- <el-table-column label="关联用户" prop="userId" width="150">
- <template slot-scope="scope">
- <span @click="goUserInfo(scope.row.userId)">{{
- scope.row.userId ? "查看" : "暂无"
- }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="sort" label="排序" width="200">
- <template slot-scope="scope">
- <el-input-number
- size="mini"
- v-model="scope.row.sort"
- @change="paixuBtn(scope.row)"
- ></el-input-number>
- </template>
- </el-table-column>
- <el-table-column label="是否订阅消息配置" width="120">
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.messageConfiguration"
- @change="changeTj(scope.row)"
- :active-value="0"
- :inactive-value="1"
- active-color="#13ce66"
- inactive-color="#ff4949"
- >
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column label="是否供货商" width="120">
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.isSupplier"
- @change="changeTj(scope.row)"
- :active-value="0"
- :inactive-value="1"
- active-color="#13ce66"
- inactive-color="#ff4949"
- >
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column label="店铺二维码" width="100">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="erweima(scope.row)"
- style="margin: 5px;"
- >查看
- </el-button>
- </template>
- </el-table-column>
- <el-table-column prop="isAllowShop" label="是否推荐" width="80">
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.isRecommend"
- @change="changeTj(scope.row)"
- :active-value="openValue"
- :inactive-value="closeValue"
- active-color="#13ce66"
- inactive-color="#ff4949"
- >
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column
- label="是否为会员立减商家"
- align="center"
- width="150"
- fixed="right"
- >
- <template slot-scope="scope">
- <!-- <div v-if="scope.row.vipPromotion == 1">是</div>
- <div v-else>否</div> -->
- <el-switch
- v-model="scope.row.vipPromotion"
- @change="changeLJ(scope.row)"
- :active-value="String(openValue)"
- :inactive-value="String(closeValue)"
- active-color="#13ce66"
- >
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column
- label="是否参加活动"
- align="center"
- width="120"
- fixed="right"
- >
- <template slot-scope="scope">
- <div v-if="scope.row.activityId">是</div>
- <div v-else>否</div>
- <!-- <el-button size="mini" style="color: #4f9dec;background: #fff;border: none;margin: 3px;"
- type="primary" v-if="scope.row.activityId" @click="looksHd(scope.row)">活动详情
- </el-button> -->
- <el-button
- size="mini"
- style="margin: 3px;"
- type="warning"
- @click="canjiaHd(scope.row)"
- :disabled="!isAuth('shopsList:huodongliebiao')"
- >活动列表
- </el-button>
- </template>
- </el-table-column>
- <el-table-column
- label="是否隐藏商家"
- align="center"
- width="120"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.isConceal"
- @change="isConcealChange(scope.row)"
- :active-value="1"
- :inactive-value="0"
- >
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="230" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="shopsListAdmin(scope.row)"
- style="margin: 5px;"
- >
- 商品列表
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="updateMima(scope.row)"
- style="margin: 5px;"
- >修改密码
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="shopsListOrder(scope.row)"
- style="margin: 5px;"
- >
- 订单列表
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="updates(scope.$index, scope.row)"
- style="margin: 5px;"
- >修改信息
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="shopsListSr(scope.row)"
- style="margin: 5px;"
- >收入统计
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="shopsListQb(scope.row)"
- style="margin: 5px;"
- >商铺钱包
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="shopsListBzj(scope.row)"
- style="margin: 5px;"
- >
- 保证金明细
- </el-button>
- <el-button
- size="mini"
- type="primary"
- @click="shopsListPJ(scope.row)"
- style="margin: 5px;"
- >评价明细
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="shopsListYhq(scope.row)"
- style="margin: 5px;"
- >优惠券管理
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:fengjin')"
- size="mini"
- type="danger"
- @click="fengjin(scope.row)"
- style="margin: 5px;"
- >{{ scope.row.bannedFlag == 1 ? "解封" : "封禁" }}
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:delete')"
- size="mini"
- type="danger"
- @click="deletes(scope.row)"
- style="margin: 5px;"
- >删除
- </el-button>
- <el-button
- size="mini"
- type="danger"
- style="margin: 5px;"
- @click="printSet(scope.row)"
- :disabled="!isAuth('shopsList:dayinpeizhi')"
- >
- 打印配置
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 20, 30, 50, 100]"
- :page-size="limit"
- :current-page="page"
- layout="total,sizes, prev, pager, next,jumper"
- :total="typeDatas.totalCount"
- >
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="商家类型" name="third">
- <div style="float: right;margin-right:2%;">
- <el-button
- style="margin: 10px 0;"
- :disabled="!isAuth('bannerList:add')"
- size="mini"
- type="primary"
- icon="document"
- @click="addNotice1(1)"
- >添加类型</el-button
- >
- </div>
- <el-table
- v-loading="tableDataLoading"
- :data="typeDatas1.list"
- row-key="id"
- >
- <el-table-column label="编号" prop="id" width="80"> </el-table-column>
- <el-table-column label="名称" prop="shopTypeName"> </el-table-column>
- <el-table-column label="操作" width="200">
- <template slot-scope="scope">
- <el-button
- :disabled="!isAuth('shopsList:update')"
- size="mini"
- type="primary"
- @click="addNotice1(scope.row)"
- style="margin: 5px;"
- >修改
- </el-button>
- <el-button
- :disabled="!isAuth('shopsList:delete')"
- size="mini"
- type="danger"
- @click="deletes1(scope.row)"
- style="margin: 5px;"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;float:right">
- <el-pagination
- @size-change="handleSizeChange1"
- @current-change="handleCurrentChange1"
- :page-sizes="[10, 20, 30, 50, 100]"
- :page-size="limit"
- :current-page="page"
- layout="total,sizes, prev, pager, next"
- :total="typeDatas1.totalCount"
- >
- </el-pagination>
- </div>
- </el-tab-pane>
- <!-- 添加商户 -->
- <el-dialog :visible.sync="dialogFormVisible" center :title="titles">
- <div style="margin-bottom: 10px;" v-if="titles == '添加'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >商铺用户:</span
- >
- <el-input
- v-model="shopUserName"
- placeholder="请选择用户"
- style="width:50%;"
- @focus="selectUserId"
- >
- </el-input>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '添加'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >店铺手机号:</span
- >
- <el-input
- v-model="shopPhone"
- placeholder="请输入店铺手机号"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >店铺名称:</span
- >
- <el-input
- v-model="shopName"
- placeholder="请输入店铺名称"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >店铺类型:</span
- >
- <el-select
- v-model="shopType"
- multiple
- clearable
- style="width:50%;"
- @change="shopTypeSelect"
- >
- <el-option
- v-for="item in typeDatas2"
- :key="item.id"
- :label="item.shopTypeName"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div>
- <!-- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
- <el-input style="width:50%;" v-model="sort" type="number" min="0" placeholder="请输入排序"></el-input>
- </div> -->
- <div style="display: flex;align-items: center;margin: 2% 0;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >封面图:</span
- >
- <div
- style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;"
- >
- <el-upload
- class="avatar-uploader"
- v-model="shopCover"
- :action="Tupiantou"
- :show-file-list="false"
- :on-success="handleAvatarSuccess1"
- :before-upload="beforeAvatarUpload"
- :headers="{ token: token }"
- >
- <img
- v-if="shopCover"
- :src="shopCover"
- class="avatar"
- style="width: 148px;height: 148px;"
- />
- <i
- v-else
- class="el-icon-plus avatar-uploader-icon"
- style="font-size: 28px;color: #8c939d"
- ></i>
- </el-upload>
- </div>
- </div>
- <div style="margin-bottom: 10px;display:flex;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >轮播图:</span
- >
- <div class="imgs" v-for="(item, index) in img" :key="index">
- <img width="100%" class="images" height="100%" :src="item" alt="" />
- <span class="dels">
- <i class="el-icon-delete" @click="dels(index)"></i>
- </span>
- </div>
- <div class="imgs" style="width: 50%;">
- <el-upload
- :action="Tupiantou"
- list-type="picture-card"
- :show-file-list="false"
- :on-success="handleRemove"
- :on-progress="onprogress1"
- :headers="{ token: token }"
- :before-upload="beforeAvatarUpload"
- >
- <el-progress
- v-if="percentage1 > 0 && percentage1 < 100"
- type="circle"
- :percentage="percentage1"
- >
- </el-progress>
- <i v-else class="el-icon-plus"></i>
- </el-upload>
- <el-dialog :visible.sync="dialogVisible">
- <img width="100%" :src="dialogImageUrl" alt="" />
- </el-dialog>
- </div>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >商铺商户号:</span
- >
- <el-input
- v-model="mchId"
- placeholder="请输入商铺商户号"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >开店时间:</span
- >
- <!-- <el-input v-model="openTime" placeholder="请输入排序号" type="data" min="0" style="width:50%;"></el-input> -->
- <el-time-select
- v-model="openTime"
- :picker-options="{
- start: '00:00',
- step: '00:15',
- end: '24:00'
- }"
- placeholder="选择开店时间"
- style="width:50%;"
- >
- </el-time-select>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >闭店时间:</span
- >
- <!-- <el-input v-model="closeTime" placeholder="请输入排序号" type="data" min="0" style="width:50%;"></el-input> -->
- <el-time-select
- v-model="closeTime"
- :picker-options="{
- start: '00:00',
- step: '00:15',
- end: '24:00'
- }"
- placeholder="选择闭店时间"
- style="width:50%;"
- >
- </el-time-select>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >商铺标签:</span
- >
- <span class="bqList" v-for="(item, index) in labels" :key="index"
- >{{ item }}
- <span class="delss">
- <i class="el-icon-delete" @click="dels1(index)"></i>
- </span>
- </span>
- <el-input
- v-model="bq"
- style="width:200px;"
- placeholder="请输入标签"
- onkeyup="this.value=this.value.replace(/[, ]/g,'')"
- @keydown.enter.native="btnTj"
- ></el-input>
- <!-- <button class="tj" @click="btnTj">添加标签</button> -->
- <el-button
- type="primary"
- class="tj"
- size="mini"
- icon="el-icon-edit"
- circle
- @click="btnTj"
- >
- </el-button>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >店铺公告:</span
- >
- <el-input
- v-model="shopNotice"
- placeholder="请输入店铺公告"
- type="textarea"
- :rows="2"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >城市:</span
- >
- <el-cascader
- style="width:50%"
- size="large"
- :options="options"
- ref="cascaderAddr"
- v-model="storeAddress"
- :placeholder="storeAddre"
- @change="handleChange55"
- :value="storeAddre"
- >
- </el-cascader>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >店铺地址:</span
- >
- <el-input
- v-model="detailedAddress"
- @keydown.enter.native="phoneSelect"
- placeholder="请输入店铺地址"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >配送费:</span
- >
- <el-input
- v-model="errandMoney"
- placeholder="请输入配送费"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >配送距离:</span
- >
- <el-input
- v-model="distributionDistance"
- placeholder="请输入配送距离"
- type="text"
- style="width:50%;"
- >
- </el-input>
- </div>
- <!-- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">是否减免配送费:</span>
- <el-radio-group v-model="exemptErrandFlag" @change="onFlag">
- <el-radio :label="0">开启</el-radio>
- <el-radio :label="1">关闭</el-radio>
- </el-radio-group>
- </div> -->
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >减免配送费最低订单金额:</span
- >
- <el-input
- v-model="exemptMinMoney"
- placeholder="请输入减免配送费最低订单金额"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >最低起送金额:</span
- >
- <el-input
- v-model="minimumDelivery"
- placeholder="请输入最低起送金额"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >是否开启满减:</span
- >
- <el-radio-group v-model="enableFullReductionFlag">
- <el-radio :label="0">开启</el-radio>
- <el-radio :label="1">关闭</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >是否开启平台配送:</span
- >
- <el-radio-group v-model="autoSendOrder">
- <el-radio :label="0">开启</el-radio>
- <el-radio :label="1">关闭</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >是否开启自动接单:</span
- >
- <el-radio-group v-model="autoAcceptOrder">
- <el-radio :label="0">开启</el-radio>
- <el-radio :label="1">关闭</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >是否开启预约单功能:</span
- >
- <el-radio-group v-model="reservationOpenFlag">
- <el-radio :label="1">开启</el-radio>
- <el-radio :label="0">关闭</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >打印机类型:</span
- >
- <el-radio-group v-model="facility">
- <el-radio :label="1">飞鹅</el-radio>
- </el-radio-group>
- <div style="font-size: 8px;color: red;margin-left: 200px;">
- * 一个设备只能关联一个商铺
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >设备sn编码:</span
- >
- <el-input
- v-model="snCode"
- placeholder="请输入设备sn编码"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >设备key秘钥:</span
- >
- <el-input
- v-model="value"
- placeholder="请输入设备key秘钥"
- type="text"
- style="width:50%;"
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;" v-if="titles == '修改'">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >营业状态:</span
- >
- <el-radio-group v-model="putawayFlag">
- <el-radio :label="0">上班啦</el-radio>
- <el-radio :label="1">打烊啦</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >纬度:</span
- >
- <el-input
- v-model="latitude"
- style="width:50%;"
- placeholder="请输入纬度"
- disabled
- ></el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >经度:</span
- >
- <el-input
- v-model="longitude"
- style="width:50%;"
- placeholder="请输入经度"
- disabled
- ></el-input>
- </div>
- <div>
- <div
- id="container1"
- style="width:80%;height:500px;margin-left: 10%;"
- ></div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="releasNoticeTo()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 店铺二维码 -->
- <el-dialog :visible.sync="dialogFormVisible2" center title="店铺二维码">
- <div>
- <img :src="erweimaImg" style="width: 50%;margin-left: 25%;" />
- <div style="text-align: center;margin-top: 20px;">
- <el-button type="primary" @click="chakan()">打开窗口查看</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 添加、修改类型 -->
- <el-dialog :visible.sync="dialogFormVisible3" center :title="titles1">
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >类型名称:</span
- >
- <el-input
- v-model="shopTypeName"
- placeholder="请输入类型名称"
- style="width:50%;"
- ></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible3 = false">取 消</el-button>
- <el-button type="primary" @click="releasNoticeTo1()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 修改保证金 金额 -->
- <el-dialog title="修改金额" :visible.sync="dialogFormVisible4" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >修改类型:</span
- >
- <el-radio-group v-model="type">
- <el-radio :label="1">添加</el-radio>
- <el-radio :label="2">减少</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >金额:</span
- >
- <el-input
- style="width:50%;"
- v-model="money"
- type="number"
- :min="0"
- :max="100"
- :controls="false"
- placeholder="请输入金额"
- ></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible4 = false">取 消</el-button>
- <el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 修改佣金比例 -->
- <el-dialog title="修改佣金比例" :visible.sync="dialogFormVisible7" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >佣金比例:</span
- >
- <el-input
- style="width:50%;"
- v-model="money"
- type="number"
- :min="0"
- :max="100"
- :controls="false"
- placeholder="请输入佣金比例"
- ></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible7 = false">取 消</el-button>
- <el-button type="primary" @click="StairNoticeToYj()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 修改配送费 金额 -->
- <el-dialog title="修改配送费" :visible.sync="dialogFormVisible6" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >配送费:</span
- >
- <el-input
- style="width:50%;"
- v-model="money"
- type="number"
- :min="0"
- :max="100"
- :controls="false"
- placeholder="请输入配送费"
- ></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible6 = false">取 消</el-button>
- <el-button type="primary" @click="StairNoticeTo2()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 修改密码 -->
- <el-dialog title="修改密码" :visible.sync="dialogFormVisible5" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >新密码:</span
- >
- <el-input
- style="width:50%;"
- v-model="newPassword"
- type="password"
- :controls="false"
- placeholder="请输入新密码"
- >
- </el-input>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >确认密码:</span
- >
- <el-input
- style="width:50%;"
- v-model="querenPassword"
- type="password"
- :controls="false"
- placeholder="请输入确认密码"
- >
- </el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible5 = false">取 消</el-button>
- <el-button type="primary" @click="updatePassword()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 用户列表 -->
- <el-dialog title="用户列表" :visible.sync="dialogFormVisible11" center>
- <el-input
- style="width: 150px;"
- @keydown.enter.native="select11"
- clearable
- placeholder="请输入手机号"
- v-model="phone"
- >
- </el-input
- >
- <el-input
- style="width: 150px;"
- @keydown.enter.native="select11"
- clearable
- placeholder="请输入昵称"
- v-model="nickName"
- >
- </el-input>
- <div style="display: inline-block;">
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="select11"
- >查询
- </el-button>
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="cleans11"
- >重置
- </el-button>
- </div>
- <!-- <el-button style="margin-left:15px;" size="mini" type="primary"
- icon="document" @click="closes2()">确定</el-button> -->
- <el-table
- v-loading="tableDataLoading11"
- :data="userData.list"
- :row-key="
- row => {
- return row.userId;
- }
- "
- >
- <!-- <el-table-column :reserve-selection="true" type="selection" fixed>
- </el-table-column> -->
- <el-table-column prop="userId" label="编号"> </el-table-column>
- <el-table-column fixed prop="nickName" label="昵称">
- <template slot-scope="scope">
- <span style="color: #f56c6c;">{{
- scope.row.nickName ? scope.row.nickName : "未设置"
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="图像">
- <template slot-scope="scope">
- <img
- v-if="scope.row.avatar == null"
- src="~@/assets/img/avatar.png"
- alt=""
- width="40"
- height="40"
- />
- <img v-else :src="scope.row.avatar" alt="" width="40" height="40" />
- </template>
- </el-table-column>
- <el-table-column prop="phone" label="手机号" width="120">
- <template slot-scope="scope">
- <span
- style="color: #4f9dec;cursor: pointer;"
- @click="closes11(scope.row)"
- >{{ scope.row.phone ? scope.row.phone : "未绑定" }}</span
- >
- </template>
- </el-table-column>
- <el-table-column prop="platform" label="来源"> </el-table-column>
- <el-table-column prop="createTime" label="创建时间"> </el-table-column>
- <el-table-column prop="createTime" label="操作">
- <template slot-scope="scope">
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="closes2(scope.row)"
- >
- 确定</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination
- @size-change="handleSizeChange11"
- @current-change="handleCurrentChange11"
- :page-sizes="[10, 20, 30, 50]"
- :page-size="size11"
- :current-page="page11"
- layout="total,sizes, prev, pager, next,jumper"
- :total="userData.totalCount"
- >
- </el-pagination>
- </div>
- </el-dialog>
- <!-- 活动列表 -->
- <el-dialog
- title="活动列表"
- :visible.sync="dialogFormVisibleHd"
- center
- width="70%"
- @close="handleCancleHd"
- >
- <div style="margin:2% 0;display: inline-block;">
- <el-input
- style="width: 180px;"
- @keydown.enter.native="selectHd"
- clearable
- placeholder="请输入活动名称"
- v-model="integralName"
- ></el-input>
- </div>
- <div style="display: inline-block;">
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="selectHd"
- >查询
- </el-button>
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="cleansHs"
- >重置
- </el-button>
- </div>
- <el-table v-loading="tableDataLoadingHd" :data="huodongData">
- <el-table-column prop="id" label="编号" width="80"> </el-table-column>
- <el-table-column prop="title" label="活动名称" width="150">
- </el-table-column>
- <el-table-column prop="image" label="活动图片" width="200">
- <template slot-scope="scope">
- <div v-if="scope.row.image">
- <div
- v-for="(item, index) in scope.row.image.split(',')"
- :key="index"
- style="display: inline-block; margin: 3px;"
- >
- <el-popover placement="top-start" title="" trigger="hover">
- <img
- style="width: 50px; height: 50px"
- :src="item"
- alt=""
- slot="reference"
- />
- <img style="width: 300px; height: auto" :src="item" alt="" />
- </el-popover>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="type" label="活动类型">
- <template slot-scope="scope">
- <span v-if="scope.row.type == 1">普通活动</span>
- <span v-else-if="scope.row.type == 2">时段优惠</span>
- <span v-else-if="scope.row.type == 3">满额优惠</span>
- <span v-else-if="scope.row.type == 4">全场优惠</span>
- </template>
- </el-table-column>
- <el-table-column prop="content" label="活动内容">
- <template slot-scope="scope">
- <el-popover placement="top-start" title="" trigger="hover">
- <div
- style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"
- slot="reference"
- >
- {{ scope.row.content }}
- </div>
- <div style="width: 300px; height: auto;word-break: break-all;">
- {{ scope.row.content }}
- </div>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column prop="updateTime" label="创建时间" width="160">
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="100">
- <template slot-scope="scope">
- <el-button
- size="mini"
- v-if="scope.row.quantity == 0"
- type="primary"
- @click="querenBtnHd(scope.row)"
- style="margin: 3px;"
- >参加活动
- </el-button>
- <template v-else>
- <el-button size="mini" type="warn" disabled style="margin: 3px;"
- >已参加
- </el-button>
- <el-button
- size="mini"
- type="primary"
- style="margin: 3px;"
- v-if="scope.row.type == 3"
- @click="selectshangpin(scope.row)"
- >选择商品
- </el-button>
- <el-button
- size="mini"
- type="primary"
- style="margin: 3px;"
- @click="quitHuo(scope.row)"
- >退出活动
- </el-button>
- </template>
- </template>
- </el-table-column>
- </el-table>
- <!-- <div style="text-align: center;margin-top: 10px;">
- <el-pagination @size-change="handleSizeChangeH" @current-change="handleCurrentChangeH"
- :page-sizes="[10, 15, 20, 25]" :page-size="limitH" :current-page="pageH"
- layout="total,sizes, prev, pager, next" :total="huodongData.length">
- </el-pagination>
- </div> -->
- </el-dialog>
- <!-- 活动详情 -->
- <el-dialog title="活动详情" :visible.sync="dialogFormVisibleXq" center>
- <div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动名称:</span
- >
- <span>{{ xiangqingData.activityTitle }}</span>
- </div>
- <div style="margin-bottom: 10px;" v-if="xiangqingData.activityImage">
- <div style="width: 200px;display: inline-block;text-align: right;">
- 活动图片:
- </div>
- <div
- class="imgs"
- v-for="(item, index) in xiangqingData.activityImage.split(',')"
- :key="index"
- >
- <img width="100%" class="images" height="100%" :src="item" alt="" />
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动详情:</span
- >
- <div
- class="divs"
- v-html="xiangqingData.activityContent"
- style="margin-left: 200px;width: 50%;"
- ></div>
- </div>
- </div>
- </el-dialog>
- <!-- 参与活动弹框 -->
- <el-dialog title="参与活动" :visible.sync="dialogFormcanyuhuo" center>
- <div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动名称:</span
- >
- <span>{{ huoList.title }}</span>
- </div>
- <div style="margin-bottom: 10px;" v-if="huoList.image">
- <div style="width: 200px;display: inline-block;text-align: right;">
- 活动图片:
- </div>
- <div
- class="imgs"
- v-for="(item, index) in huoList.image.split(',')"
- :key="index"
- >
- <img width="100%" class="images" height="100%" :src="item" alt="" />
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动详情:</span
- >
- <div
- class="divs"
- v-html="huoList.content"
- style="margin-left: 200px;width: 50%;"
- ></div>
- </div>
- <!-- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">参与活动的商品:</span>
- <span class="divs" style="width: 50%;color: rgba(62, 142, 247, 1);" @click="selectshangpin">请选择/修改</span>
- </div> -->
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动类型:</span
- >
- <span v-if="huoList.type == '1'">普通活动</span>
- <span v-if="huoList.type == '2'">时段优惠</span>
- <span v-if="huoList.type == '3'">满额优惠</span>
- <span v-if="huoList.type == '4'">全场优惠</span>
- </div>
- <div
- style="margin-bottom: 10px;"
- v-if="
- huoList.type == '2' || huoList.type == '3' || huoList.type == '4'
- "
- >
- <span style="width: 200px;display: inline-block;text-align: right;"
- >适用情况:</span
- >
- <el-radio v-model="suitType" :label="'1'">皆适用</el-radio><br />
- <div style="margin-left: 205px;width: 200px;">
- <el-radio v-model="suitType" :label="'2'"
- >仅针对第一次下单</el-radio
- >
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;"
- >活动时间:</span
- >
- <span>{{ huoList.startTime }}至{{ huoList.endTime }}</span>
- </div>
- <div
- style="margin-bottom: 10px;"
- v-if="
- huoList.type == '2' || huoList.type == '3' || huoList.type == '4'
- "
- >
- <span style="width: 200px;display: inline-block;text-align: right;"
- >使用限制:</span
- >
- <el-radio v-model="limitType" :label="'1'">无限制</el-radio><br />
- <div style="margin-left: 205px;">
- <el-radio v-model="limitType" :label="'2'">每天使用</el-radio>
- <el-input
- v-model="limitNum"
- type="number"
- style="width:13%;display: inline-table;"
- ></el-input>
- <span>次</span>
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <div class="canquxiao" @click="joinHuo">确定</div>
- <div class="canqueding" @click="quxiaoHuo">取消</div>
- </div>
- </div>
- </el-dialog>
- <!-- 选择活动商品弹框 -->
- <el-dialog
- title="优惠商品"
- :visible.sync="dialogFormVisibleshangp"
- center
- width="70%"
- @close="handleCancleshangp"
- >
- <div style="margin:2% 0;display: inline-block;">
- <span>商品名称:</span>
- <el-input
- style="width: 180px;"
- @keydown.enter.native="select2"
- clearable
- placeholder="请输入商品名称"
- v-model="integralName2"
- ></el-input>
- </div>
- <div style="display: inline-block;">
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="select2"
- >查询
- </el-button>
- </div>
- <div style="display: inline-block;">
- <el-button
- style="margin-left:15px;"
- size="mini"
- type="primary"
- icon="document"
- @click="yiselect()"
- >已选择商品
- </el-button>
- </div>
- <el-table
- v-loading="tableDataLoadingShop"
- :data="shopData.list"
- ref="dataTable"
- :key="randomKey"
- @select="selectdan"
- @select-all="selectAll"
- >
- <el-table-column type="selection" width="55"> </el-table-column>
- <el-table-column label="编号" prop="goodsId" width="80" fixed="left">
- </el-table-column>
- <el-table-column label="标题" prop="goodsName" fixed="left">
- </el-table-column>
- <el-table-column prop="goodsCover" label="商品图" width="150">
- <template slot-scope="scope">
- <div style="display: inline-block; margin: 3px;">
- <el-popover placement="top-start" title="" trigger="hover">
- <img
- style="width: 50px; height: 50px"
- :src="scope.row.goodsCover"
- alt=""
- slot="reference"
- />
- <img
- style="width: 300px; height: auto"
- :src="scope.row.goodsCover"
- alt=""
- />
- </el-popover>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="商品描述" prop="goodsDescribe" width="120">
- </el-table-column>
- <el-table-column label="创建时间" prop="createTime"> </el-table-column>
- </el-table>
- <el-button
- style="margin-left:15px;margin-top: 10px;"
- size="mini"
- type="primary"
- icon="document"
- @click="tianjiahuo"
- >确定
- </el-button>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination
- @size-change="handleSizeChangeShop"
- @current-change="handleCurrentChangeShop"
- :page-sizes="[10, 15, 20, 25]"
- :page-size="limit1"
- :current-page="page1"
- layout="total,sizes, prev, pager, next"
- :total="shopData.totalCount"
- >
- </el-pagination>
- </div>
- </el-dialog>
- <!-- 已选择商品 -->
- <el-dialog
- title="已选择商品"
- :visible.sync="dialogFormVisibleshangpYi"
- center
- width="70%"
- >
- <el-table v-loading="tableDataLoadingShopYi" :data="shopDataYi">
- <el-table-column label="编号" prop="goodsId" width="80" fixed="left">
- </el-table-column>
- <el-table-column label="标题" prop="goodsName" fixed="left">
- </el-table-column>
- <el-table-column prop="goodsCover" label="商品图" width="150">
- <template slot-scope="scope">
- <div style="display: inline-block; margin: 3px;">
- <el-popover placement="top-start" title="" trigger="hover">
- <img
- style="width: 50px; height: 50px"
- :src="scope.row.goodsCover"
- alt=""
- slot="reference"
- />
- <img
- style="width: 300px; height: auto"
- :src="scope.row.goodsCover"
- alt=""
- />
- </el-popover>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="商品描述" prop="goodsDescribe" width="120">
- </el-table-column>
- <el-table-column label="创建时间" prop="createTime"> </el-table-column>
- </el-table>
- <!-- <div style="text-align: center;margin-top: 10px;">
- <el-pagination @size-change="handleSizeChangeShop2" @current-change="handleCurrentChangeShop2"
- :page-sizes="[10, 15, 20, 25]" :page-size="limit2" :current-page="page2"
- layout="total,sizes, prev, pager, next" :total="shopTotal">
- </el-pagination>
- </div> -->
- </el-dialog>
- </el-tabs>
- </template>
- <script>
- import Vue from "vue";
- import { jsonp } from "vue-jsonp";
- import {
- provinceAndCityData,
- regionData,
- provinceAndCityDataPlus,
- regionDataPlus,
- CodeToText,
- TextToCode
- } from "element-china-area-data";
- var geocoder,
- map,
- markersArray = [];
- export default {
- data() {
- return {
- token: "",
- routeFlag: true,
- phone: "",
- nickName: "",
- limit: 10,
- page: 1,
- limit1: 10,
- page1: 1,
- limit2: 10,
- page2: 1,
- size11: 10,
- page11: 1,
- shopName1: "",
- isActivity: "",
- vipPromotion:"",
- region: "",
- shopId: "",
- userIdList: "",
- shopName: "",
- shopNotice: "",
- userData: [], //用户集合
- openTime: "",
- closeTime: "",
- detailedAddress: "",
- shopLng: "",
- shopLat: "",
- percentage1: 0, //进度条
- img: [], //任务轮播图
- // img: '',
- classn: "",
- value: "",
- parentId: 0,
- parentIdnum: "",
- tableDataLoading: false,
- dialogFormVisible1: false,
- dialogFormVisible2: false,
- dialogFormVisible3: false,
- tableDataLoading11: false,
- dialogFormVisible: false,
- dialogFormVisible11: false, //用户列表
- typeDatas: {},
- typeDatas1: {},
- titles: "添加",
- // 地图相关
- longitude: "", //维度
- latitude: "", //经度
- loadingMap: true,
- BMap: "",
- map: "",
- geoc: "",
- keyword: "",
- showMap: false,
- pointLngLat: "",
- center: {
- lng: 109.45744048529967,
- lat: 36.49771311230842
- },
- storeAddress: [],
- storeAddre: "请选择城市",
- form: {
- province: "",
- city: "", //市
- district: "" //区
- },
- dialogImageUrl: [],
- dialogVisible: false,
- erweimaImg: "",
- activeName: "first",
- shopTypeName: "",
- shopTypId: "",
- titles1: "",
- labels: [], //标签集合
- bq: "", //输入的标签名
- province: "",
- city: "", //市
- district: "", //区
- options: regionData,
- shopCover: "",
- shopTypenum: [],
- typeDatas2: [],
- shopType: "",
- type: "",
- money: "",
- classIndex: "",
- dialogFormVisible4: false,
- dialogFormVisible5: false,
- dialogFormVisible6: false,
- dialogFormVisible7: false,
- tablemoney: 0,
- dataForm: {
- id: 0,
- userName: "",
- password: "",
- comfirmPassword: "",
- salt: "",
- email: "",
- mobile: "",
- roleIdList: [],
- shopIdList: [],
- status: 1
- },
- newPassword: "",
- querenPassword: "",
- bannedFlag: "",
- exemptErrandFlag: 1, //是否见面配送费0开启 1关闭
- errandMoney: 0,
- exemptMinMoney: 0,
- minimumDelivery: 0,
- enableFullReductionFlag: 1,
- autoSendOrder: 1,
- autoAcceptOrder: 1,
- reservationOpenFlag: 0,
- sort: 1,
- putawayFlag: 1,
- distributionDistance: 3000,
- facility: 1,
- shopUserId: "",
- shopUserName: "",
- mchId: "", // 商铺商户号
- shopPhone: "", //商户关联手机号
- snCode: "",
- dialogFormVisibleHd: false,
- dialogFormVisibleXq: false,
- dialogFormcanyuhuo: false,
- dialogFormVisibleshangp: false, //优惠商品选择弹框
- dialogFormVisibleshangpYi: false, //已选择商品弹框
- selectedItems: [], //存储选中的数组
- randomKey: Math.random(),
- suoshoplength: 0, //所有商品数量
- shopTotal: 0,
- shopDataYi: [], //已选择商品
- shopData: {},
- tableDataLoadingShop: false,
- tableDataLoadingShopYi: false,
- tableDataLoadingHd: false,
- huodongData: [],
- limitH: 10,
- pageH: 1,
- integralName: "",
- integralName2: "",
- xiangqingData: {},
- statusmain: [
- {
- value: "",
- label: "全部"
- },
- {
- value: 0,
- label: "否"
- },
- {
- value: 1,
- label: "是"
- }
- ],
- openValue: 1,
- closeValue: 0,
- activityId: "",
- // 参与活动参数
- huoList: {},
- suitType: "1", //适用情况
- limitType: "1", //使用限制
- limitNum: "",
- actShopid: [] //选择商品的id
- };
- },
- methods: {
- // tabs切换
- handleClick(tab, event) {
- this.page = 1;
- this.limit = 10;
- if (tab._props.label == "商铺列表") {
- this.dataSelect();
- }
- if (tab._props.label == "商家类型") {
- this.dataSelect1();
- }
- },
- //用户模块的分页处理
- handleSizeChange11(val) {
- this.size11 = val;
- this.dataSelect11();
- },
- //用户模块的分页处理
- handleCurrentChange11(val) {
- this.page11 = val;
- this.dataSelect11();
- },
- handleSizeChange(val) {
- this.limit = val;
- this.dataSelect();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.dataSelect();
- },
- //活动列表
- handleSizeChangeH(val) {
- this.limitH = val;
- this.shopSelect2();
- },
- handleCurrentChangeH(val) {
- this.pageH = val;
- this.shopSelect2();
- },
- handleSizeChange1(val) {
- this.limit = val;
- this.dataSelect1();
- },
- handleCurrentChange1(val) {
- this.page = val;
- this.dataSelect1();
- },
- // 图标上传
- handleAvatarSuccess(file) {
- this.img = file.data;
- },
- // 添加店铺
- addNotice() {
- this.titles = "添加";
- this.shopId = "";
- this.mchId = "";
- this.shopName = "";
- this.shopNotice = "";
- this.shopType = "";
- this.openTime = "";
- this.closeTime = "";
- this.shopCover = "";
- this.dialogImageUrl = [];
- this.img = [];
- this.detailedAddress = "";
- this.shopLng = "";
- this.shopLat = "";
- this.longitude = ""; //维度
- this.latitude = ""; //经度
- this.bannedFlag = "";
- this.errandMoney = 0;
- this.exemptErrandFlag = 1;
- this.facility = 1;
- this.snCode = "";
- this.value = "";
- this.distributionDistance = 3000;
- this.exemptMinMoney = 0;
- this.minimumDelivery = 0;
- this.enableFullReductionFlag = 1;
- this.autoSendOrder = 1;
- this.autoAcceptOrder = 1;
- this.reservationOpenFlag = 0;
- this.sort = 1;
- this.putawayFlag = 1;
- this.labels = [];
- this.shopPhone = "";
- this.shopUserId = "";
- this.shopUserName = "";
- this.storeAddress = [];
- this.storeAddre = "请选择城市";
- this.dialogFormVisible = true;
- this.getMyLocation();
- },
- // 获取用户数据列表
- dataSelect11() {
- let phone = -1;
- if (this.phone) {
- phone = this.phone;
- }
- this.tableDataLoading11 = true;
- this.$http({
- url: this.$http.adornUrl("user/selectUserList"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page11,
- limit: this.size11,
- shopAdminFlag: "",
- phone: this.phone,
- userName: this.nickName,
- type: ""
- })
- }).then(({ data }) => {
- this.tableDataLoading11 = false;
- let returnData = data.data;
- this.userData = returnData;
- });
- },
- // 查询
- select11() {
- this.page11 = 1;
- this.dataSelect11();
- },
- //查看用户
- selectUserId() {
- this.dialogFormVisible11 = true;
- this.page11 = 1;
- this.phone = "";
- this.nickName = "";
- this.dataSelect11();
- },
- closes11(item) {
- this.shopUserId = item.userId;
- this.shopUserName = item.userName;
- this.dialogFormVisible11 = false;
- },
- // 重置
- cleans11() {
- this.page11 = 1;
- this.phone = "";
- this.nickName = "";
- this.dataSelect11();
- },
- // 添加店铺
- releasNoticeTo() {
- if (this.shopUserId == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入选择关联用户",
- type: "warning"
- });
- return;
- }
- if (this.shopPhone == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入商户关联手机号",
- type: "warning"
- });
- return;
- }
- if (this.shopName == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入店铺名称",
- type: "warning"
- });
- return;
- }
- if (this.shopType == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请选择店铺类型",
- type: "warning"
- });
- return;
- }
- if (this.openTime == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请选择开店时间",
- type: "warning"
- });
- return;
- }
- if (this.closeTime == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请选择闭店时间",
- type: "warning"
- });
- return;
- }
- if (this.detailedAddress == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入店铺地址",
- type: "warning"
- });
- return;
- }
- if (this.img.length == 0) {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "轮播图不能为空",
- type: "warning"
- });
- return;
- }
- if (this.errandMoney == "") {
- this.errandMoney = 0;
- }
- if (this.minimumDelivery == "") {
- this.minimumDelivery = 0;
- }
- if (this.exemptMinMoney == "") {
- this.exemptMinMoney = 0;
- }
- if (this.longitude == "" || this.latitude == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请在地图上定位获取经纬度",
- type: "warning"
- });
- return;
- }
- var datas = {};
- datas.shopName = this.shopName;
- datas.mchId = this.mchId;
- datas.businessHours = this.openTime;
- datas.shopBanner = this.img.toString();
- datas.lockHours = this.closeTime;
- datas.detailedAddress = this.detailedAddress;
- datas.errandMoney = this.errandMoney;
- datas.exemptErrandFlag = this.exemptErrandFlag;
- datas.shopNotice = this.shopNotice;
- datas.facility = this.facility;
- datas.snCode = this.snCode;
- datas.value = this.value;
- datas.distributionDistance = this.distributionDistance;
- datas.exemptMinMoney = this.exemptMinMoney;
- datas.minimumDelivery = this.minimumDelivery;
- datas.enableFullReductionFlag = this.enableFullReductionFlag;
- datas.autoSendOrder = this.autoSendOrder;
- datas.autoAcceptOrder = this.autoAcceptOrder;
- datas.reservationOpenFlag = this.reservationOpenFlag;
- datas.sort = this.sort;
- datas.putawayFlag = this.putawayFlag;
- datas.shopLng = this.longitude;
- datas.shopLat = this.latitude;
- datas.shopCover = this.shopCover;
- datas.city = this.city;
- datas.province = this.province;
- datas.district = this.district;
- datas.userId = this.shopUserId;
- datas.phone = this.shopPhone;
- // datas.isSupplier=1; // 是否为供货商
- // datas.shopTypeId = this.shopType;
- datas.shopTypeId = this.shopType.join(","); // 店铺类型改为多选
- datas.shopLable = this.labels.toString();
- datas.bannedFlag = this.bannedFlag;
- // datas.reservation0penFlag='1'
- if (this.titles == "添加") {
- var url = "admin/goods/insertGoodsShop";
- }
- if (this.titles == "修改") {
- var url = "admin/goods/updateGoodsShop";
- datas.shopId = this.shopId;
- }
- console.log(datas, "jjkkk");
- this.$http({
- url: this.$http.adornUrl(url),
- method: "post",
- data: this.$http.adornData(datas)
- }).then(({ data }) => {
- if (data.code == 0) {
- this.dialogFormVisible = false;
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- // 修改弹框
- updates(index, rows) {
- console.log(rows, "dfsf");
- this.titles = "修改";
- this.shopId = rows.shopId;
- this.shopName = rows.shopName;
- this.mchId = rows.mchId;
- if (rows.shopNotice) {
- this.shopNotice = rows.shopNotice;
- } else {
- this.shopNotice = "";
- }
- if (rows.shopBanner) {
- this.dialogImageUrl = rows.shopBanner;
- this.img = rows.shopBanner;
- }
- if (rows.shopLable) {
- this.labels = rows.shopLable.split(",");
- }
- this.openTime = rows.businessHours;
- this.closeTime = rows.lockHours;
- this.detailedAddress = rows.detailedAddress;
- this.shopLng = rows.shopLng;
- this.shopLat = rows.shopLat;
- this.longitude = rows.shopLng; //维度
- this.latitude = rows.shopLat; //经度
- this.shopCover = rows.shopCover;
- this.city = rows.city;
- this.province = rows.province;
- this.district = rows.district;
- // this.shopType = rows.shopTypeId;
- if (rows.shopTypeId) {
- this.shopType = rows.shopTypeId.split(",").map(i => {
- return Number(i);
- }); // 店铺类型改为多选
- }
- this.bannedFlag = rows.bannedFlag;
- if (rows.errandMoney) {
- this.errandMoney = rows.errandMoney;
- } else {
- this.errandMoney = 0;
- }
- if (rows.exemptMinMoney) {
- this.exemptMinMoney = rows.exemptMinMoney;
- } else {
- this.exemptMinMoney = 0;
- }
- this.minimumDelivery = rows.minimumDelivery;
- this.shopPhone = rows.phone;
- this.shopUserId = rows.userId;
- if (rows.facility) {
- this.facility = rows.facility;
- }
- console.log(rows, "mmm");
- this.snCode = rows.snCode;
- this.value = rows.value;
- if (rows.exemptErrandFlag) {
- this.exemptErrandFlag = rows.exemptErrandFlag;
- }
- if (rows.enableFullReductionFlag != null) {
- this.enableFullReductionFlag = rows.enableFullReductionFlag;
- console.log(
- "rows.enableFullReductionFlag",
- rows.enableFullReductionFlag
- );
- } else {
- this.enableFullReductionFlag = 1;
- }
- if (rows.autoSendOrder != null) {
- this.autoSendOrder = rows.autoSendOrder;
- console.log("rows.autoSendOrder", rows.autoSendOrder);
- } else {
- this.autoSendOrder = 1;
- }
- if (rows.autoAcceptOrder != null) {
- this.autoAcceptOrder = rows.autoAcceptOrder;
- console.log("rows.autoAcceptOrder", rows.autoAcceptOrder);
- } else {
- this.autoAcceptOrder = 1;
- }
- if (rows.reservationOpenFlag != null) {
- this.reservationOpenFlag = rows.reservationOpenFlag;
- console.log("rows.reservationOpenFlag", rows.reservationOpenFlag);
- } else {
- this.reservationOpenFlag = 1;
- }
- if (rows.sort != null) {
- this.sort = rows.sort;
- } else {
- this.sort = 1;
- }
- // if(rows.exemptErrandFlag==1){
- // this.exemptMinMoney = 0
- // }
- this.putawayFlag = rows.putawayFlag;
- this.distributionDistance = rows.distributionDistance;
- this.storeAddress = [];
- this.storeAddre = this.province + "/" + this.city + "/" + this.district;
- // console.log(this.province + '/' + this.city + '/' + this.district)
- this.getMyLocation();
- this.dialogFormVisible = true;
- },
- // 查看二维码
- erweima(row) {
- console.log("row.shopId", row.shopId);
- this.dialogFormVisible2 = true;
- this.erweimaImg = this.$http.adornUrl(
- "invite/shopQr?shopId=" + row.shopId
- );
- },
- chakan() {
- window.open(this.erweimaImg, "_blank");
- },
- // 删除分类
- deletes(row) {
- // if (row.children == null || row.children.length == 0) {
- this.$confirm(`确定删除此条信息?删除后将无法恢复`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.$http({
- url: this.$http.adornUrl("admin/goods/deleteGoodsShop"),
- method: "get",
- params: this.$http.adornParams({
- id: row.shopId
- })
- }).then(({ data }) => {
- this.$message({
- message: "删除成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- });
- })
- .catch(() => {});
- // } else {
- // this.$message({
- // message: '请先删除',
- // type: 'error',
- // duration: 1500,
- // })
- // return
- // }
- },
- // 打印配置
- printSet(row) {
- // console.log(row,'打印');
- this.$router.push({
- path: "/shopPrintSet",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 封禁
- fengjin(row) {
- if (row.bannedFlag == 1) {
- var bannedFlag = 0;
- var texts = "确定要解封此商铺吗?";
- } else {
- var bannedFlag = 1;
- var texts = "确定要封禁此商铺吗?";
- }
- this.$confirm(texts, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.$http({
- url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
- method: "post",
- data: this.$http.adornData({
- shopId: row.shopId,
- bannedFlag: bannedFlag
- })
- }).then(({ data }) => {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- });
- })
- .catch(() => {});
- },
- //查看用户详情
- goUserInfo(userId) {
- if (userId) {
- this.$router.push({
- path: "/userDetail",
- query: {
- userId
- }
- });
- }
- },
- // 商品列表
- shopsListAdmin(row) {
- this.$router.push({
- path: "/shopsListAdmin",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 订单列表
- shopsListOrder(row) {
- this.$router.push({
- path: "/shopsOrder",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 收入统计
- shopsListSr(row) {
- this.$router.push({
- path: "/shopDatas",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 保证金明细
- shopsListBzj(row) {
- this.$router.push({
- path: "/bondList",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 评价明细
- shopsListPJ(row) {
- this.$router.push({
- path: "/pingjiaList",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 商铺钱包
- shopsListQb(row) {
- this.$router.push({
- path: "/shopWallet",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 优惠券管理
- shopsListYhq(row) {
- this.$router.push({
- path: "/couponShop",
- query: {
- shopId: row.shopId
- }
- });
- },
- // 获取商户数据
- dataSelect() {
- this.tableDataLoading = true;
- this.$http({
- url: this.$http.adornUrl("admin/goods/selectAllShop"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page,
- limit: this.limit,
- shopName: this.shopName1,
- region: this.region,
- isActivity: this.isActivity,
- vipPromotion:this.vipPromotion
- })
- }).then(({ data }) => {
- let canshu = {
- page: this.page,
- limit: this.limit,
- shopName1: this.shopName1,
- region: this.region,
- isActivity: this.isActivity
- };
- sessionStorage.setItem("shopsList", JSON.stringify(canshu));
- this.tableDataLoading = false;
- for (var i in data.data.list) {
- if (data.data.list[i].shopBanner) {
- data.data.list[i].shopBanner = data.data.list[i].shopBanner.split(
- ","
- );
- }
- data.data.list[i].isConceal == 1 ? 1 : 0;
- }
- let returnData = data.data;
- this.typeDatas = returnData;
- console.log(this.typeDatas, "ll");
- });
- },
- //定位获得当前位置信息
- getMyLocation() {
- var geolocation = new qq.maps.Geolocation(
- "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75",
- "来点小收入"
- );
- geolocation.getIpLocation(this.showPosition, this.showErr);
- // geolocation.getLocation(this.showPosition, this.showErr);//或者用getLocation精确度比较高
- },
- showPosition(position) {
- console.log(position);
- // this.latitude = position.lat;
- // this.longitude = position.lng;
- // this.city = position.city;
- this.setMap();
- },
- showErr(e) {
- console.log("定位失败", e);
- this.getMyLocation(); //定位失败再请求定位,测试使用
- },
- //位置信息在地图上展示
- setMap() {
- //步骤:定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
- //设置地图中心点
- var myLatlng = new qq.maps.LatLng(this.latitude, this.longitude);
- //定义工厂模式函数
- var myOptions = {
- zoom: 13, //设置地图缩放级别
- center: myLatlng, //设置中心点样式
- mapTypeId: qq.maps.MapTypeId.ROADMAP //设置地图样式详情参见MapType
- };
- // //获取dom元素添加地图信息
- var map = new qq.maps.Map(
- document.getElementById("container1"),
- myOptions
- );
- //给地图添加点击事件
- //给定位的位置添加图片标注
- var marker = new qq.maps.Marker({
- position: myLatlng,
- map: map
- });
- // `````````````
- var that = this;
- if (that.longitude == "") {
- var center = new qq.maps.LatLng(34.34281541842994, 108.93970884382725);
- } else {
- var center = new qq.maps.LatLng(that.latitude, that.longitude);
- }
- var map = new qq.maps.Map(document.getElementById("container1"), {
- center: center,
- zoom: 13
- });
- var marker = new qq.maps.Marker({
- position: center,
- map: map
- });
- var latlngBounds = new qq.maps.LatLngBounds();
- qq.maps.event.addListener(map, "click", function(event) {
- console.log(event, qq.maps);
- that.longitude = event.latLng.getLng(); // 经度
- that.latitude = event.latLng.getLat(); // 纬度
- jsonp(
- "https://apis.map.qq.com/ws/geocoder/v1/?location=" +
- event.latLng.getLat() +
- "," +
- event.latLng.getLng() +
- "&key=ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75&get_poi=1&output=jsonp",
- {
- myCustomUrlParam: "veryNice"
- }
- )
- .then(response => {
- console.log(
- "response",
- response,
- response.result.formatted_addresses.recommend
- );
- that.detailedAddress =
- response.result.formatted_addresses.recommend;
- })
- .catch(error => {
- // handle error
- })
- .then(() => {
- // always executed
- });
- if (markersArray) {
- for (let i in markersArray) {
- markersArray[i].setMap(null);
- }
- }
- var marker = new qq.maps.Marker({
- map: map,
- position: event.latLng
- });
- markersArray.push(marker);
- });
- geocoder = new qq.maps.Geocoder({
- complete: function(result) {
- console.log(result);
- that.longitude = result.detail.location.lng;
- that.latitude = result.detail.location.lat;
- map.setCenter(result.detail.location);
- var marker = new qq.maps.Marker({
- map: map,
- position: result.detail.location
- });
- markersArray.push(marker);
- }
- });
- },
- // 地图定位
- select() {
- console.log(this.detailedAddress);
- // this.address = this.province+ this.city+this.district+this.address
- var addr =
- this.province + this.city + this.district + this.detailedAddress;
- let that = this;
- jsonp(
- "https://apis.map.qq.com/ws/geocoder/v1/?address==" +
- addr +
- "&key=ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75&get_poi=1&output=jsonp",
- {
- myCustomUrlParam: "veryNice"
- }
- )
- .then(response => {
- // handle success
- console.log("response", response);
- that.longitude = response.result.location.lng; // 经度
- that.latitude = response.result.location.lat; // 纬度
- // that.address = response.result.title
- that.setMap();
- })
- .catch(error => {
- // handle error
- })
- .then(() => {
- // always executed
- });
- },
- phoneSelect() {
- this.select();
- },
- onprogress1(event, file, fileList) {
- console.log("详情图上传进度", parseInt(event.percent));
- this.percentage1 = parseInt(event.percent);
- },
- beforeAvatarUpload(file) {
- return this.$processImage(this, file, false);
- },
- // 封面图
- handleAvatarSuccess1(file, fileList) {
- this.shopCover = file.data;
- },
- // 轮播图片上传
- handleRemove(file) {
- console.log(file, this.img);
- this.img.push(file.data);
- },
- handleDownload(file) {
- console.log(file, this.img);
- },
- // 删除轮播图
- dels(index) {
- this.img.splice(index, 1);
- console.log(this.img);
- },
- shopSelect() {
- this.page = 1;
- this.dataSelect();
- },
- cleans2(state) {
- this.page = 1;
- this.shopName1 = "";
- this.region = "";
- this.isActivity = "";
- this.vipPromotion="";
- this.dataSelect();
- },
- // 获取分类数据
- dataSelect1() {
- this.tableDataLoading = true;
- this.$http({
- url: this.$http.adornUrl("admin/shoptype/selectShopTypeList"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page,
- limit: this.limit
- })
- }).then(({ data }) => {
- this.tableDataLoading = false;
- let returnData = data.data;
- this.typeDatas1 = returnData;
- });
- },
- // 获取分类数据不带分页
- dataSelect2() {
- this.tableDataLoading = true;
- this.$http({
- url: this.$http.adornUrl("admin/shoptype/selectShopTypeList"),
- method: "get",
- params: this.$http.adornParams({})
- }).then(({ data }) => {
- this.tableDataLoading = false;
- let returnData = data.data;
- this.typeDatas2 = returnData;
- console.log(this.typeDatas2, "店铺数据");
- });
- },
- // 添加类型
- addNotice1(row) {
- if (row != 1) {
- this.titles1 = "修改类型";
- this.shopTypId = row.id;
- this.shopTypeName = row.shopTypeName;
- } else {
- this.titles1 = "添加类型";
- this.shopTypId = "";
- this.shopTypeName = "";
- }
- this.dialogFormVisible3 = true;
- },
- // 确认添加
- releasNoticeTo1() {
- if (this.shopTypeName == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入类型名称",
- type: "warning"
- });
- return;
- }
- if (this.titles1 == "添加类型") {
- var url = "admin/shoptype/insertShopType";
- }
- if (this.titles1 == "修改类型") {
- var url = "admin/shoptype/upateShopType";
- }
- this.$http({
- url: this.$http.adornUrl(url),
- method: "post",
- data: this.$http.adornData({
- id: this.shopTypId,
- shopTypeName: this.shopTypeName
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.dialogFormVisible3 = false;
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect1();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- // 删除类型
- deletes1(row) {
- this.$confirm(`确定删除此条信息?删除后将无法恢复`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.$http({
- url: this.$http.adornUrl("admin/shoptype/deleteShopType"),
- method: "post",
- params: this.$http.adornParams({
- shopTypeId: row.id
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect1();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- })
- .catch(() => {});
- },
- // 添加标签
- btnTj() {
- if (this.bq == "" || this.bq == " ") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入标签名",
- type: "warning"
- });
- return;
- } else {
- console.log("this.bq", this.bq);
- this.labels.push(this.bq);
- this.bq = "";
- }
- },
- // 删除标签
- dels1(index) {
- this.labels.splice(index, 1);
- console.log(this.labels);
- },
- // 获取省市区
- handleChange55(value) {
- value = this.$refs["cascaderAddr"].currentLabels;
- this.province = value[0];
- this.city = value[1];
- this.district = value[2];
- if (this.city == "市辖区") {
- this.city = this.province;
- }
- console.log(this.$refs["cascaderAddr"].currentLabels);
- },
- shopTypeSelect(val) {
- console.log(val);
- },
- // 修改保证金
- rechargenone(row, index) {
- this.shopId = row.shopId;
- if (index == 2) {
- this.type = "";
- this.money = 0;
- this.tablemoney = row.cashDeposit;
- this.dialogFormVisible4 = true;
- }
- if (index == 1) {
- this.bannedFlag = row.bannedFlag;
- this.money = row.errandMoney;
- this.dialogFormVisible6 = true;
- }
- if (index == 3) {
- this.bannedFlag = row.bannedFlag;
- this.money = row.shopRate;
- this.dialogFormVisible7 = true;
- }
- },
- StairNoticeTo2() {
- if (this.money == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入金额",
- type: "warning"
- });
- return;
- }
- this.money = Number(this.money);
- this.$http({
- url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
- method: "post",
- data: this.$http.adornData({
- shopId: this.shopId,
- errandMoney: this.money,
- bannedFlag: this.bannedFlag
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "添加金额成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.money = "";
- this.dataSelect();
- }
- });
- this.dialogFormVisible6 = false;
- } else {
- this.$message.error(data.msg);
- }
- });
- },
- StairNoticeTo1() {
- let userId = this.$route.query.userId;
- if (this.type == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请选择修改类型",
- type: "warning"
- });
- return;
- }
- if (this.money == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入金额",
- type: "warning"
- });
- return;
- }
- if (this.type == 2) {
- if (this.money > this.tablemoney) {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "最高金额为" + this.tablemoney,
- type: "warning"
- });
- return;
- }
- }
- this.$http({
- // url: this.$http.adornUrl(
- // `admin/shop/updateShopCashDeposit?shopId=` +
- // this.shopId +
- // "&money=" +
- // this.money +
- // "&type=" +
- // this.type
- // ),
- url: this.$http.adornUrl(
- `admin/shop/updateShopCashDeposit`
- ),
- method: "get",
- data: this.$http.adornData({}),
- params: this.$http.adornParams({
- shopId: this.shopId,
- money: this.money,
- type: this.type
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "添加金额成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.money = "";
- this.dataSelect();
- }
- });
- this.dialogFormVisible4 = false;
- } else {
- this.$message.error(data.msg);
- }
- });
- },
- // 修改佣金比例
- StairNoticeToYj() {
- if (this.money == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "请输入佣金比例",
- type: "warning"
- });
- return;
- }
- this.$http({
- url: this.$http.adornUrl("admin/goodsShop/updateGoodsShopRate"),
- method: "get",
- params: this.$http.adornParams({
- shopId: this.shopId,
- shopRate: this.money
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "修改成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.money = "";
- this.dataSelect();
- }
- });
- this.dialogFormVisible7 = false;
- } else {
- this.$message.error(data.msg);
- }
- });
- },
- updateMima(row) {
- console.log("修改密码", row);
- this.init(row.adminUserId);
- this.dialogFormVisible5 = true;
- this.newPassword = "";
- this.querenPassword = "";
- },
- init(id) {
- this.$http({
- url: this.$http.adornUrl(`sys/user/info/${id}`),
- method: "get",
- params: this.$http.adornParams()
- }).then(({ data }) => {
- console.log(data);
- if (data && data.code === 0) {
- this.dataForm.userName = data.user.username;
- this.dataForm.salt = data.user.salt;
- this.dataForm.email = data.user.email;
- this.dataForm.mobile = data.user.mobile;
- this.dataForm.roleIdList = data.user.roleIdList;
- this.dataForm.shopIdList = data.user.shopIdList;
- this.dataForm.status = data.user.status;
- this.dataForm.id = data.user.userId;
- }
- });
- },
- // 确认修改
- updatePassword() {
- console.log({
- userId: this.dataForm.id,
- // 'username': this.dataForm.userName,
- password: this.dataForm.password,
- salt: this.dataForm.salt
- });
- if (this.newPassword == "" || this.querenPassword == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "新密码或确认密码不能为空!",
- type: "warning"
- });
- return;
- }
- if (this.newPassword != this.querenPassword) {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "两次密码输入不一致!",
- type: "warning"
- });
- return;
- }
- this.dataForm.password = this.newPassword;
- this.$http({
- url: this.$http.adornUrl(`/sys/user/updateAdmin`),
- method: "post",
- data: this.$http.adornData({
- userId: this.dataForm.id,
- // 'username': this.dataForm.userName,
- password: this.dataForm.password,
- salt: this.dataForm.salt
- // 'email': this.dataForm.email,
- // 'mobile': this.dataForm.mobile,
- // 'status': this.dataForm.status,
- // 'roleIdList': this.dataForm.roleIdList,
- // 'shopIdList': this.dataForm.shopIdList
- })
- }).then(({ data }) => {
- console.log(data);
- if (data && data.code === 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dialogFormVisible5 = false;
- }
- });
- } else {
- this.$message.error(data.msg);
- }
- });
- },
- closes2(row) {
- this.shopUserId = row.userId;
- if (row.nickName) {
- this.shopUserName = row.nickName;
- } else {
- this.shopUserName = row.phone;
- }
- this.dialogFormVisible11 = false;
- },
- // 活动弹框
- canjiaHd(row) {
- this.shopId = row.shopId;
- this.activityId = row.activityId;
- this.dialogFormVisibleHd = true;
- this.shopSelect2();
- },
- // 活动列表中该商家已参与的活动
- shopSelect2() {
- this.$http({
- url: this.$http.adornUrl(
- `admin/activity-shop/shop-activity-list/${this.shopId}`
- ),
- method: "get",
- params: this.$http.adornParams({
- // 'shopId': this.shopId,
- })
- }).then(({ data }) => {
- let returnData = data.data;
- this.huodongSelect(returnData);
- });
- },
- // 获取活动列表
- huodongSelect(returnData) {
- this.tableDataLoadingHd = true;
- this.$http({
- url: this.$http.adornUrl("admin/activity/page"),
- method: "get",
- params: this.$http.adornParams({
- page: this.pageH,
- limit: this.limitH,
- title: this.integralName,
- isEnable: ""
- })
- }).then(({ data }) => {
- let length = data.data.totalCount;
- this.$http({
- url: this.$http.adornUrl("admin/activity/page"),
- method: "get",
- params: this.$http.adornParams({
- page: this.pageH,
- limit: length,
- title: this.integralName,
- isEnable: ""
- })
- }).then(({ data }) => {
- this.tableDataLoadingHd = false;
- let returnData2 = data.data;
- const newList = returnData2.list.map(item => {
- return { ...item, quantity: 0 };
- return { ...item, activityShopId: 0 };
- });
- var arr = [];
- for (var j in returnData) {
- newList.forEach(item => {
- if (item.id === returnData[j].activityId) {
- // 'status'为属性名,'非活动'为修改后的内容
- item.quantity = 1;
- item.activityShopId = returnData[j].activityShopId;
- }
- });
- }
- arr = newList;
- this.huodongData = arr;
- });
- });
- },
- selectHd() {
- this.pageH = 1;
- this.shopSelect2();
- },
- cleansHs() {
- this.pageH = 1;
- this.integralName = "";
- this.shopSelect2();
- },
- select2() {
- this.page1 = 1;
- this.getGoods11();
- },
- // 已选择商品
- yiselect(row) {
- console.log(this.shopId);
- this.dialogFormVisibleshangpYi = true;
- this.selectShang();
- },
- handleSizeChangeShop(val) {
- this.limit1 = val;
- this.getGoods11();
- },
- handleCurrentChangeShop(val) {
- this.page1 = val;
- this.getGoods11();
- },
- handleSizeChangeShop2(val) {
- this.limit2 = val;
- this.selectShang();
- },
- handleCurrentChangeShop2(val) {
- this.page2 = val;
- this.selectShang();
- },
- //添加商品
- tianjiahuo() {
- if (this.selectedItems.length <= 0) {
- this.$message("请勾选需要添加的商品");
- return;
- }
- var shangIds = [];
- this.selectedItems.forEach(item => {
- shangIds.push(item.goodsId);
- });
- this.$http({
- url: this.$http.adornUrl("/admin/activity-goods"),
- method: "post",
- data: this.$http.adornData({
- activityShopId: this.actShopid,
- goodsIds: shangIds
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dialogFormVisibleshangp = false;
- this.selectedItems = [];
- this.integralName = "";
- this.integralName2 = "";
- this.shopSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- //选中table已有数据
- selectedPreExisting(rows) {
- if (rows.length > 0) {
- //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
- this.$nextTick(() => {
- rows.forEach(row => {
- //判断row是存在当前tableData
- let selectedItem = this.shopData.list.find(
- item => item.goodsId == row.goodsId
- );
- this.$refs.dataTable.toggleRowSelection(selectedItem);
- });
- });
- } else {
- this.$refs.dataTable.clearSelection();
- }
- },
- //表格单选
- selectdan(selection, row) {
- //因为翻页之后,点选时selection会出现undefined,所以这里需要进行判断
- //这里可以通过判断选择selection中有没有row,就可以判断出是增加还是删减
- if (
- selection &&
- selection.find(item => item && item.goodsId == row.goodsId)
- ) {
- this.addRows([row]);
- } else {
- this.deleteRows([row]);
- }
- },
- //表格全选
- selectAll(selection) {
- //判断是选中还是取消tableData
- if (selection.length > 0) {
- this.addRows(this.shopData.list);
- } else {
- this.deleteRows(this.shopData.list);
- }
- },
- //添加选中
- addRows(rows) {
- rows.forEach(row => {
- //过滤,当selectedItems有此条数据时,则直接返回,不执行添加
- if (this.selectedItems.find(item => item.goodsId == row.goodsId)) {
- return;
- }
- this.selectedItems.push(row);
- });
- },
- //取消选中
- deleteRows(rows) {
- //当selectedItems为空数组时,不执行删除
- if (this.selectedItems.length == 0) {
- return;
- }
- rows.forEach(row => {
- this.selectedItems = this.selectedItems.filter(
- item => item.goodsId !== row.goodsId
- );
- });
- },
- //优惠商品弹框关闭
- handleCancleshangp() {
- this.integralName2 = "";
- },
- //活动列表弹框关闭
- handleCancleHd() {
- this.integralName = "";
- },
- //选择商品
- selectshangpin(row) {
- console.log(row);
- this.dialogFormVisibleshangp = true;
- this.actShopid = row.activityShopId;
- this.getGoods11();
- },
- // 店铺已选择商品
- selectShang() {
- this.$http({
- url: this.$http.adornUrl(`admin/activity-goods/${this.actShopid}`),
- method: "get",
- params: this.$http.adornParams({})
- }).then(({ data }) => {
- if (data.msg == "success") {
- let returnData = data.data;
- //商品列表
- this.getGoods(returnData);
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- //所有商品
- getGoods(returnData) {
- this.$http({
- url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page2,
- limit: this.limit2,
- goodsName: "",
- shopId: this.shopId
- })
- }).then(({ data }) => {
- if (data.msg == "success") {
- this.suoshoplength = data.data.totalCount;
- this.$http({
- url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page2,
- limit: this.suoshoplength,
- goodsName: "",
- shopId: this.shopId
- })
- }).then(({ data }) => {
- if (data.msg == "success") {
- let returnData2 = data.data;
- const newList = returnData2.list;
- var arr = [];
- for (var j in returnData) {
- newList.forEach(item => {
- if (item.goodsId === returnData[j]) {
- arr.push(item);
- }
- });
- }
- this.shopDataYi = arr;
- this.shopTotal = this.shopDataYi.length;
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- //所有商品11
- getGoods11() {
- this.$http({
- url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
- method: "get",
- params: this.$http.adornParams({
- page: this.page1,
- limit: this.limit1,
- goodsName: this.integralName2,
- shopId: this.shopId
- })
- }).then(({ data }) => {
- if (data.msg == "success") {
- this.shopData = data.data;
- //randomKey是table数据改动时,刷新table的
- this.randomKey = Math.random();
- this.selectedPreExisting(this.selectedItems);
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- //选中table已有数据
- selectedPreExisting(rows) {
- if (rows.length > 0) {
- //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
- this.$nextTick(() => {
- rows.forEach(row => {
- //判断row是存在当前tableData
- let selectedItem = this.shopData.list.find(
- item => item.goodsId == row.goodsId
- );
- this.$refs.dataTable.toggleRowSelection(selectedItem);
- });
- });
- } else {
- this.$refs.dataTable.clearSelection();
- }
- },
- // 确认参加活动
- querenBtnHd(row) {
- this.activityId = row.id;
- this.getActivity(row.id);
- },
- //退出活动
- quitHuo(row) {
- this.$confirm(`确定退出该活动?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.$http({
- url: this.$http.adornUrl("admin/activity-shop/quit"),
- method: "put",
- params: this.$http.adornParams({
- shopId: this.shopId,
- activityId: row.id
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.shopSelect2();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- })
- .catch(() => {});
- },
- //取消参与活动
- quxiaoHuo() {
- this.dialogFormcanyuhuo = false;
- },
- //参与活动
- joinHuo() {
- var shopid = [this.shopId];
- if (this.limitType == "") {
- this.$notify({
- title: "提示",
- duration: 1800,
- message: "有限制时不能为空",
- type: "warning"
- });
- return;
- }
- this.$http({
- url: this.$http.adornUrl("admin/activity-shop/join"),
- method: "post",
- data: this.$http.adornData({
- activityId: this.activityId,
- limitType: this.limitType,
- limitValue: this.limitNum,
- shopIds: shopid,
- suitType: this.suitType
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.dialogFormcanyuhuo = false;
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.shopSelect2();
- // this.dataSelect()
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- //获取活动信息
- getActivity(id) {
- this.$http({
- url: this.$http.adornUrl(`admin/activity/${id}`),
- method: "get",
- params: this.$http.adornParams({
- // 'shopId': this.shopId,
- })
- }).then(({ data }) => {
- if (data.msg == "success") {
- let returnData = data.data;
- this.huoList = returnData;
- this.dialogFormcanyuhuo = true;
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {}
- });
- }
- });
- },
- // 查看活动
- looksHd(row) {
- this.$http({
- url: this.$http.adornUrl("admin/activityManage/getActivityInfo?=2"),
- method: "get",
- params: this.$http.adornParams({
- activityId: row.activityId
- })
- }).then(({ data }) => {
- let returnData = data.data;
- this.xiangqingData = returnData;
- });
- this.dialogFormVisibleXq = true;
- },
- // 是否推荐活动商家
- changeTj(row) {
- console.log(row);
- this.$http({
- url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
- method: "post",
- data: this.$http.adornData({
- isRecommend: row.isRecommend,
- shopId: row.shopId,
- isSupplier: row.isSupplier,
- messageConfiguration: row.messageConfiguration
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.dialogFormVisible1 = false;
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- }
- });
- },
- // 是否为会员立减商家
- changeLJ(row) {
- console.log(row);
- this.$http({
- url: this.$http.adornUrl(`/admin/goodsShop/vip-promotion/${row.shopId}/${row.vipPromotion}`),
- method: "put",
- data: this.$http.adornData({})
- }).then(({ data }) => {
- console.log(data,"是否为会员立减商家");
- if (data.code == 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- }
- });
- },
- // 是否隐藏商家
- isConcealChange(row) {
- console.log(row);
- this.$http({
- url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
- method: "post",
- data: this.$http.adornData({
- isConceal: row.isConceal,
- isRecommend: row.isRecommend,
- shopId: row.shopId,
- isSupplier: row.isSupplier,
- messageConfiguration: row.messageConfiguration
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.dialogFormVisible1 = false;
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- }
- });
- },
- // 减免开关
- onFlag() {
- if (this.exemptErrandFlag == 1) {
- this.exemptMinMoney = 0;
- this.minimumDelivery = 0;
- }
- },
- // 修改排序
- paixuBtn(row) {
- this.$http({
- url: this.$http.adornUrl("admin/goodsShop/updateGoodsShopSort"),
- method: "get",
- // data: this.$http.adornData({
- params: this.$http.adornParams({
- sort: row.sort,
- shopId: row.shopId
- })
- }).then(({ data }) => {
- if (data.code == 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- } else {
- this.$message({
- message: data.msg,
- type: "warning",
- duration: 1500,
- onClose: () => {
- this.dataSelect();
- }
- });
- }
- });
- }
- },
- mounted() {
- this.token = Vue.cookie.get("token");
- let flag = sessionStorage.getItem("shopsListFlag");
- console.log(flag, "shopsListFlag");
- if (flag == "true") {
- let parmas = JSON.parse(sessionStorage.getItem("shopsList"));
- this.page = parmas.page;
- this.limit = parmas.limit;
- this.shopName1 = parmas.shopName1;
- this.region = parmas.region;
- this.isActivity = parmas.isActivity;
- } else {
- this.page = 1;
- this.limit = 10;
- this.shopName1 = "";
- this.region = "";
- this.isActivity = "";
- sessionStorage.removeItem("shopsList");
- }
- this.dataSelect();
- this.dataSelect2();
- },
- beforeRouteEnter(to, from, next) {
- if (
- from.name == "shopsListAdmin" ||
- from.name == "shopsOrder" ||
- from.name == "shopDatas" ||
- from.name == "bondList" ||
- from.name == "couponShop" ||
- from.name == "shopWallet" ||
- from.name == "pingjiaList" ||
- from.name == "shopPrintSet"
- ) {
- sessionStorage.setItem("shopsListFlag", true);
- console.log("是通过修改页面跳转过来的");
- } else {
- sessionStorage.setItem("shopsListFlag", false);
- console.log("直接进入页面");
- }
- next(vm => {});
- }
- };
- </script>
- <style>
- .imgs {
- position: relative;
- border-radius: 6px;
- width: 148px;
- height: 148px;
- margin-right: 10px;
- display: inline-block;
- }
- .dels {
- position: absolute;
- top: 0;
- left: 0;
- display: none;
- }
- .dels .el-icon-delete {
- line-height: 148px;
- padding-left: 58px;
- font-size: 25px;
- color: #fff;
- }
- .imgs:hover .dels {
- width: 100%;
- height: 100%;
- background: #000;
- display: block;
- opacity: 0.5;
- }
- .bqList {
- padding: 4px 14px;
- margin: 4px;
- border: 1px solid #efefef;
- font-size: 12px;
- color: #999;
- border-radius: 4px;
- margin-right: 15px;
- }
- .delss {
- display: none;
- position: relative;
- }
- .delss .el-icon-delete {
- position: absolute;
- top: 0;
- }
- .bqList:hover .delss {
- display: initial;
- opacity: 0.5;
- }
- .tj {
- padding: 6px !important;
- margin: 4px;
- font-size: 12px;
- border: 1px solid #ccc;
- border-radius: 4px;
- }
- .divs img {
- width: 100%;
- }
- /* //参与活动 */
- .canquxiao {
- margin-top: 20px;
- margin-left: 287px;
- width: 76px;
- height: 35px;
- opacity: 1;
- border-radius: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- font-size: 16px;
- font-weight: 400;
- line-height: 35px;
- color: rgba(0, 0, 0, 1);
- text-align: center;
- }
- .canqueding {
- margin-top: -35px;
- margin-left: 407px;
- width: 76px;
- height: 35px;
- opacity: 1;
- border-radius: 5px;
- background: rgba(62, 142, 247, 1);
- font-size: 16px;
- font-weight: 400;
- line-height: 35px;
- color: rgba(255, 255, 255, 1);
- text-align: center;
- }
- </style>
|