shopsList.vue 111 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738
  1. <template>
  2. <el-tabs v-model="activeName" @tab-click="handleClick">
  3. <el-tab-pane label="商铺列表" name="first">
  4. <div style="display: inline-block;">
  5. <div style="position: relative;display: inline-block;margin: 10px 0px;">
  6. <span>商铺名称:</span>
  7. <el-input
  8. style="width: 200px;"
  9. @keydown.enter.native="shopSelect"
  10. placeholder="请输入商铺名称"
  11. v-model="shopName1"
  12. >
  13. </el-input
  14. >&nbsp;&nbsp;
  15. </div>
  16. <div style="position: relative;display: inline-block;margin: 10px 0px;">
  17. <span>省/市/区:</span>
  18. <el-input
  19. style="width: 200px;"
  20. @keydown.enter.native="shopSelect"
  21. placeholder="请输入省/市/区"
  22. v-model="region"
  23. >
  24. </el-input
  25. >&nbsp;&nbsp;
  26. </div>
  27. <div style="position: relative;display: inline-block;margin: 10px 0px;">
  28. <span>是否是活动商铺:</span>
  29. <el-select
  30. v-model="isActivity"
  31. placeholder="请选择是否是活动商铺"
  32. style="width:150px;"
  33. @change="shopSelect()"
  34. >
  35. <el-option
  36. v-for="item in statusmain"
  37. :key="item.value"
  38. :label="item.label"
  39. :value="item.value"
  40. >
  41. </el-option> </el-select
  42. >&nbsp;&nbsp;&nbsp;&nbsp;
  43. </div>
  44. <div style="position: relative;display: inline-block;margin: 10px 0px;">
  45. <span>是否为会员立减商家:</span>
  46. <el-select
  47. v-model="vipPromotion"
  48. placeholder="请选择"
  49. style="width:150px;"
  50. @change="shopSelect()"
  51. >
  52. <el-option label="是" :value="1"></el-option>
  53. <el-option label="否" :value="0"></el-option>
  54. </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
  55. </div>
  56. <el-button
  57. style="margin-left:15px;"
  58. size="mini"
  59. type="primary"
  60. icon="document"
  61. @click="shopSelect"
  62. >查询
  63. </el-button>
  64. <el-button
  65. style="margin-left:15px;"
  66. size="mini"
  67. type="primary"
  68. icon="document"
  69. @click="cleans2"
  70. >重置
  71. </el-button>
  72. </div>
  73. <div style="float: right;margin-right:2%;">
  74. <el-button
  75. :disabled="!isAuth('shopsList:add')"
  76. icon="document"
  77. size="mini"
  78. style="margin: 10px 0;"
  79. type="primary"
  80. @click="addNotice"
  81. >添加商铺</el-button
  82. >
  83. </div>
  84. <el-table
  85. v-loading="tableDataLoading"
  86. :data="typeDatas.list"
  87. row-key="id"
  88. >
  89. <el-table-column label="编号" prop="shopId" width="80" fixed="left">
  90. </el-table-column>
  91. <el-table-column label="名称" prop="shopName" fixed="left">
  92. </el-table-column>
  93. <el-table-column label="店铺手机号" prop="phone" width="120">
  94. </el-table-column>
  95. <el-table-column label="商铺类型" prop="shopTypeName">
  96. </el-table-column>
  97. <el-table-column prop="shopCover" label="封面图" width="150">
  98. <template slot-scope="scope">
  99. <div style="display: inline-block; margin: 3px;">
  100. <el-popover placement="top-start" title="" trigger="hover">
  101. <img
  102. style="width: 50px; height: 50px"
  103. :src="scope.row.shopCover"
  104. alt=""
  105. slot="reference"
  106. />
  107. <img
  108. style="width: 300px; height: auto"
  109. :src="scope.row.shopCover"
  110. alt=""
  111. />
  112. </el-popover>
  113. </div>
  114. </template>
  115. </el-table-column>
  116. <el-table-column prop="shopBanner" label="轮播图" width="150">
  117. <template slot-scope="scope">
  118. <div
  119. v-for="(item, index) in scope.row.shopBanner"
  120. :key="index"
  121. style="display: inline-block; margin: 3px;"
  122. >
  123. <el-popover placement="top-start" title="" trigger="hover">
  124. <img
  125. style="width: 50px; height: 50px"
  126. :src="item"
  127. alt=""
  128. slot="reference"
  129. />
  130. <img style="width: 300px; height: auto" :src="item" alt="" />
  131. </el-popover>
  132. </div>
  133. </template>
  134. </el-table-column>
  135. <el-table-column label="商铺佣金比例" prop="shopTypeName" width="150">
  136. <template slot-scope="scope">
  137. <span>{{ scope.row.shopRate ? scope.row.shopRate : 0 }}</span>
  138. <el-button
  139. size="mini"
  140. type="danger"
  141. style="color: #4f9dec;background: #fff;border: none;"
  142. :disabled="!isAuth('userList:updateMoney')"
  143. @click="rechargenone(scope.row, 3)"
  144. >修改佣金比例
  145. </el-button>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="营业状态" prop="putawayFlag">
  149. <template slot-scope="scope">
  150. <span>{{ scope.row.putawayFlag == 0 ? "上班啦" : "打烊啦" }}</span>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="商铺保证金" prop="cashDeposit" width="150">
  154. <template slot-scope="scope">
  155. <span>{{ scope.row.cashDeposit ? scope.row.cashDeposit : 0 }}</span>
  156. <el-button
  157. size="mini"
  158. type="danger"
  159. style="color: #4f9dec;background: #fff;border: none;"
  160. :disabled="!isAuth('userList:updateMoney')"
  161. @click="rechargenone(scope.row, 2)"
  162. >修改保证金
  163. </el-button>
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="配送费" prop="errandMoney" width="150">
  167. <template slot-scope="scope">
  168. <span>{{ scope.row.errandMoney ? scope.row.errandMoney : 0 }}</span>
  169. <el-button
  170. size="mini"
  171. type="danger"
  172. style="color: #4f9dec;background: #fff;border: none;"
  173. :disabled="!isAuth('userList:updateMoney')"
  174. @click="rechargenone(scope.row, 1)"
  175. >修改配送费
  176. </el-button>
  177. </template>
  178. </el-table-column>
  179. <el-table-column
  180. label="配送距离"
  181. prop="distributionDistance"
  182. width="150"
  183. >
  184. <template slot-scope="scope">
  185. <span>{{
  186. scope.row.distributionDistance
  187. ? scope.row.distributionDistance
  188. : 0
  189. }}</span>
  190. </template>
  191. </el-table-column>
  192. <!-- <el-table-column label="是否减免配送费" prop="exemptErrandFlag">
  193. <template slot-scope="scope">
  194. <span>{{scope.row.exemptErrandFlag==0?'开启':'关闭'}}</span>
  195. </template>
  196. </el-table-column> -->
  197. <el-table-column label="减免配送费最低订单金额" prop="exemptMinMoney">
  198. </el-table-column>
  199. <el-table-column label="最低起送金额" prop="minimumDelivery">
  200. </el-table-column>
  201. <el-table-column label="是否开启满减" prop="enableFullReductionFlag">
  202. <template slot-scope="scope">
  203. <span>{{
  204. scope.row.enableFullReductionFlag == 0 ? "开启" : "关闭"
  205. }}</span>
  206. </template>
  207. </el-table-column>
  208. <el-table-column label="是否开启平台配送" prop="autoSendOrder">
  209. <template slot-scope="scope">
  210. <span>{{ scope.row.autoSendOrder == 0 ? "开启" : "关闭" }}</span>
  211. </template>
  212. </el-table-column>
  213. <el-table-column label="是否开启自动接单" prop="autoAcceptOrder">
  214. <template slot-scope="scope">
  215. <span>{{ scope.row.autoAcceptOrder == 0 ? "开启" : "关闭" }}</span>
  216. </template>
  217. </el-table-column>
  218. <el-table-column label="商铺标签" prop="shopLable"> </el-table-column>
  219. <el-table-column label="开店时间" prop="businessHours">
  220. </el-table-column>
  221. <el-table-column label="闭店时间" prop="lockHours"> </el-table-column>
  222. <el-table-column label="商铺评分" prop="shopScore"> </el-table-column>
  223. <el-table-column label="商铺销量" prop="shopSales"> </el-table-column>
  224. <el-table-column label="打印机类型" prop="facility">
  225. <template slot-scope="scope">
  226. <span v-if="scope.row.facility == 1">飞鹅</span>
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="设备sn编码" prop="snCode"> </el-table-column>
  230. <el-table-column label="设备key秘钥" prop="value"> </el-table-column>
  231. <el-table-column label="省" prop="province"> </el-table-column>
  232. <el-table-column label="市" prop="city"> </el-table-column>
  233. <el-table-column label="区" prop="district"> </el-table-column>
  234. <el-table-column label="详细地址" prop="detailedAddress" width="200">
  235. </el-table-column>
  236. <el-table-column label="经度" prop="shopLng"> </el-table-column>
  237. <el-table-column label="纬度" prop="shopLat"> </el-table-column>
  238. <el-table-column label="审核时间" prop="auditTime" width="160">
  239. </el-table-column>
  240. <el-table-column label="创建时间" prop="createTime" width="160">
  241. </el-table-column>
  242. <el-table-column label="商家公告" prop="shopNotice" width="150">
  243. </el-table-column>
  244. <el-table-column label="关联用户" prop="userId" width="150">
  245. <template slot-scope="scope">
  246. <span @click="goUserInfo(scope.row.userId)">{{
  247. scope.row.userId ? "查看" : "暂无"
  248. }}</span>
  249. </template>
  250. </el-table-column>
  251. <el-table-column prop="sort" label="排序" width="200">
  252. <template slot-scope="scope">
  253. <el-input-number
  254. size="mini"
  255. v-model="scope.row.sort"
  256. @change="paixuBtn(scope.row)"
  257. ></el-input-number>
  258. </template>
  259. </el-table-column>
  260. <el-table-column label="是否订阅消息配置" width="120">
  261. <template slot-scope="scope">
  262. <el-switch
  263. v-model="scope.row.messageConfiguration"
  264. @change="changeTj(scope.row)"
  265. :active-value="0"
  266. :inactive-value="1"
  267. active-color="#13ce66"
  268. inactive-color="#ff4949"
  269. >
  270. </el-switch>
  271. </template>
  272. </el-table-column>
  273. <el-table-column label="是否供货商" width="120">
  274. <template slot-scope="scope">
  275. <el-switch
  276. v-model="scope.row.isSupplier"
  277. @change="changeTj(scope.row)"
  278. :active-value="0"
  279. :inactive-value="1"
  280. active-color="#13ce66"
  281. inactive-color="#ff4949"
  282. >
  283. </el-switch>
  284. </template>
  285. </el-table-column>
  286. <el-table-column label="店铺二维码" width="100">
  287. <template slot-scope="scope">
  288. <el-button
  289. size="mini"
  290. type="primary"
  291. @click="erweima(scope.row)"
  292. style="margin: 5px;"
  293. >查看
  294. </el-button>
  295. </template>
  296. </el-table-column>
  297. <el-table-column prop="isAllowShop" label="是否推荐" width="80">
  298. <template slot-scope="scope">
  299. <el-switch
  300. v-model="scope.row.isRecommend"
  301. @change="changeTj(scope.row)"
  302. :active-value="openValue"
  303. :inactive-value="closeValue"
  304. active-color="#13ce66"
  305. inactive-color="#ff4949"
  306. >
  307. </el-switch>
  308. </template>
  309. </el-table-column>
  310. <el-table-column
  311. label="是否为会员立减商家"
  312. align="center"
  313. width="150"
  314. fixed="right"
  315. >
  316. <template slot-scope="scope">
  317. <!-- <div v-if="scope.row.vipPromotion == 1">是</div>
  318. <div v-else>否</div> -->
  319. <el-switch
  320. v-model="scope.row.vipPromotion"
  321. @change="changeLJ(scope.row)"
  322. :active-value="String(openValue)"
  323. :inactive-value="String(closeValue)"
  324. active-color="#13ce66"
  325. >
  326. </el-switch>
  327. </template>
  328. </el-table-column>
  329. <el-table-column
  330. label="是否参加活动"
  331. align="center"
  332. width="120"
  333. fixed="right"
  334. >
  335. <template slot-scope="scope">
  336. <div v-if="scope.row.activityId">是</div>
  337. <div v-else>否</div>
  338. <!-- <el-button size="mini" style="color: #4f9dec;background: #fff;border: none;margin: 3px;"
  339. type="primary" v-if="scope.row.activityId" @click="looksHd(scope.row)">活动详情
  340. </el-button> -->
  341. <el-button
  342. size="mini"
  343. style="margin: 3px;"
  344. type="warning"
  345. @click="canjiaHd(scope.row)"
  346. :disabled="!isAuth('shopsList:huodongliebiao')"
  347. >活动列表
  348. </el-button>
  349. </template>
  350. </el-table-column>
  351. <el-table-column
  352. label="是否隐藏商家"
  353. align="center"
  354. width="120"
  355. fixed="right"
  356. >
  357. <template slot-scope="scope">
  358. <el-switch
  359. v-model="scope.row.isConceal"
  360. @change="isConcealChange(scope.row)"
  361. :active-value="1"
  362. :inactive-value="0"
  363. >
  364. </el-switch>
  365. </template>
  366. </el-table-column>
  367. <el-table-column label="操作" width="230" fixed="right">
  368. <template slot-scope="scope">
  369. <el-button
  370. size="mini"
  371. type="primary"
  372. @click="shopsListAdmin(scope.row)"
  373. style="margin: 5px;"
  374. >
  375. 商品列表
  376. </el-button>
  377. <el-button
  378. :disabled="!isAuth('shopsList:update')"
  379. size="mini"
  380. type="primary"
  381. @click="updateMima(scope.row)"
  382. style="margin: 5px;"
  383. >修改密码
  384. </el-button>
  385. <el-button
  386. :disabled="!isAuth('shopsList:update')"
  387. size="mini"
  388. type="primary"
  389. @click="shopsListOrder(scope.row)"
  390. style="margin: 5px;"
  391. >
  392. 订单列表
  393. </el-button>
  394. <el-button
  395. :disabled="!isAuth('shopsList:update')"
  396. size="mini"
  397. type="primary"
  398. @click="updates(scope.$index, scope.row)"
  399. style="margin: 5px;"
  400. >修改信息
  401. </el-button>
  402. <el-button
  403. :disabled="!isAuth('shopsList:update')"
  404. size="mini"
  405. type="primary"
  406. @click="shopsListSr(scope.row)"
  407. style="margin: 5px;"
  408. >收入统计
  409. </el-button>
  410. <el-button
  411. :disabled="!isAuth('shopsList:update')"
  412. size="mini"
  413. type="primary"
  414. @click="shopsListQb(scope.row)"
  415. style="margin: 5px;"
  416. >商铺钱包
  417. </el-button>
  418. <el-button
  419. :disabled="!isAuth('shopsList:update')"
  420. size="mini"
  421. type="primary"
  422. @click="shopsListBzj(scope.row)"
  423. style="margin: 5px;"
  424. >
  425. 保证金明细
  426. </el-button>
  427. <el-button
  428. size="mini"
  429. type="primary"
  430. @click="shopsListPJ(scope.row)"
  431. style="margin: 5px;"
  432. >评价明细
  433. </el-button>
  434. <el-button
  435. :disabled="!isAuth('shopsList:update')"
  436. size="mini"
  437. type="primary"
  438. @click="shopsListYhq(scope.row)"
  439. style="margin: 5px;"
  440. >优惠券管理
  441. </el-button>
  442. <el-button
  443. :disabled="!isAuth('shopsList:fengjin')"
  444. size="mini"
  445. type="danger"
  446. @click="fengjin(scope.row)"
  447. style="margin: 5px;"
  448. >{{ scope.row.bannedFlag == 1 ? "解封" : "封禁" }}
  449. </el-button>
  450. <el-button
  451. :disabled="!isAuth('shopsList:delete')"
  452. size="mini"
  453. type="danger"
  454. @click="deletes(scope.row)"
  455. style="margin: 5px;"
  456. >删除
  457. </el-button>
  458. <el-button
  459. size="mini"
  460. type="danger"
  461. style="margin: 5px;"
  462. @click="printSet(scope.row)"
  463. :disabled="!isAuth('shopsList:dayinpeizhi')"
  464. >
  465. 打印配置
  466. </el-button>
  467. </template>
  468. </el-table-column>
  469. </el-table>
  470. <div style="text-align: center;margin-top: 10px;">
  471. <el-pagination
  472. @size-change="handleSizeChange"
  473. @current-change="handleCurrentChange"
  474. :page-sizes="[10, 20, 30, 50, 100]"
  475. :page-size="limit"
  476. :current-page="page"
  477. layout="total,sizes, prev, pager, next,jumper"
  478. :total="typeDatas.totalCount"
  479. >
  480. </el-pagination>
  481. </div>
  482. </el-tab-pane>
  483. <el-tab-pane label="商家类型" name="third">
  484. <div style="float: right;margin-right:2%;">
  485. <el-button
  486. style="margin: 10px 0;"
  487. :disabled="!isAuth('bannerList:add')"
  488. size="mini"
  489. type="primary"
  490. icon="document"
  491. @click="addNotice1(1)"
  492. >添加类型</el-button
  493. >
  494. </div>
  495. <el-table
  496. v-loading="tableDataLoading"
  497. :data="typeDatas1.list"
  498. row-key="id"
  499. >
  500. <el-table-column label="编号" prop="id" width="80"> </el-table-column>
  501. <el-table-column label="名称" prop="shopTypeName"> </el-table-column>
  502. <el-table-column label="操作" width="200">
  503. <template slot-scope="scope">
  504. <el-button
  505. :disabled="!isAuth('shopsList:update')"
  506. size="mini"
  507. type="primary"
  508. @click="addNotice1(scope.row)"
  509. style="margin: 5px;"
  510. >修改
  511. </el-button>
  512. <el-button
  513. :disabled="!isAuth('shopsList:delete')"
  514. size="mini"
  515. type="danger"
  516. @click="deletes1(scope.row)"
  517. style="margin: 5px;"
  518. >删除
  519. </el-button>
  520. </template>
  521. </el-table-column>
  522. </el-table>
  523. <div style="text-align: center;margin-top: 10px;float:right">
  524. <el-pagination
  525. @size-change="handleSizeChange1"
  526. @current-change="handleCurrentChange1"
  527. :page-sizes="[10, 20, 30, 50, 100]"
  528. :page-size="limit"
  529. :current-page="page"
  530. layout="total,sizes, prev, pager, next"
  531. :total="typeDatas1.totalCount"
  532. >
  533. </el-pagination>
  534. </div>
  535. </el-tab-pane>
  536. <!-- 添加商户 -->
  537. <el-dialog :visible.sync="dialogFormVisible" center :title="titles">
  538. <div style="margin-bottom: 10px;" v-if="titles == '添加'">
  539. <span style="width: 200px;display: inline-block;text-align: right;"
  540. >商铺用户:</span
  541. >
  542. <el-input
  543. v-model="shopUserName"
  544. placeholder="请选择用户"
  545. style="width:50%;"
  546. @focus="selectUserId"
  547. >
  548. </el-input>
  549. </div>
  550. <div style="margin-bottom: 10px;" v-if="titles == '添加'">
  551. <span style="width: 200px;display: inline-block;text-align: right;"
  552. >店铺手机号:</span
  553. >
  554. <el-input
  555. v-model="shopPhone"
  556. placeholder="请输入店铺手机号"
  557. style="width:50%;"
  558. ></el-input>
  559. </div>
  560. <div style="margin-bottom: 10px;">
  561. <span style="width: 200px;display: inline-block;text-align: right;"
  562. >店铺名称:</span
  563. >
  564. <el-input
  565. v-model="shopName"
  566. placeholder="请输入店铺名称"
  567. style="width:50%;"
  568. ></el-input>
  569. </div>
  570. <div style="margin-bottom: 10px;">
  571. <span style="width: 200px;display: inline-block;text-align: right;"
  572. >店铺类型:</span
  573. >
  574. <el-select
  575. v-model="shopType"
  576. multiple
  577. clearable
  578. style="width:50%;"
  579. @change="shopTypeSelect"
  580. >
  581. <el-option
  582. v-for="item in typeDatas2"
  583. :key="item.id"
  584. :label="item.shopTypeName"
  585. :value="item.id"
  586. >
  587. </el-option>
  588. </el-select>
  589. </div>
  590. <!-- <div style="margin-bottom: 10px;">
  591. <span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
  592. <el-input style="width:50%;" v-model="sort" type="number" min="0" placeholder="请输入排序"></el-input>
  593. </div> -->
  594. <div style="display: flex;align-items: center;margin: 2% 0;">
  595. <span style="width: 200px;display: inline-block;text-align: right;"
  596. >封面图:</span
  597. >
  598. <div
  599. style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;"
  600. >
  601. <el-upload
  602. class="avatar-uploader"
  603. v-model="shopCover"
  604. :action="Tupiantou"
  605. :show-file-list="false"
  606. :on-success="handleAvatarSuccess1"
  607. :before-upload="beforeAvatarUpload"
  608. :headers="{ token: token }"
  609. >
  610. <img
  611. v-if="shopCover"
  612. :src="shopCover"
  613. class="avatar"
  614. style="width: 148px;height: 148px;"
  615. />
  616. <i
  617. v-else
  618. class="el-icon-plus avatar-uploader-icon"
  619. style="font-size: 28px;color: #8c939d"
  620. ></i>
  621. </el-upload>
  622. </div>
  623. </div>
  624. <div style="margin-bottom: 10px;display:flex;">
  625. <span style="width: 200px;display: inline-block;text-align: right;"
  626. >轮播图:</span
  627. >
  628. <div class="imgs" v-for="(item, index) in img" :key="index">
  629. <img width="100%" class="images" height="100%" :src="item" alt="" />
  630. <span class="dels">
  631. <i class="el-icon-delete" @click="dels(index)"></i>
  632. </span>
  633. </div>
  634. <div class="imgs" style="width: 50%;">
  635. <el-upload
  636. :action="Tupiantou"
  637. list-type="picture-card"
  638. :show-file-list="false"
  639. :on-success="handleRemove"
  640. :on-progress="onprogress1"
  641. :headers="{ token: token }"
  642. :before-upload="beforeAvatarUpload"
  643. >
  644. <el-progress
  645. v-if="percentage1 > 0 && percentage1 < 100"
  646. type="circle"
  647. :percentage="percentage1"
  648. >
  649. </el-progress>
  650. <i v-else class="el-icon-plus"></i>
  651. </el-upload>
  652. <el-dialog :visible.sync="dialogVisible">
  653. <img width="100%" :src="dialogImageUrl" alt="" />
  654. </el-dialog>
  655. </div>
  656. </div>
  657. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  658. <span style="width: 200px;display: inline-block;text-align: right;"
  659. >商铺商户号:</span
  660. >
  661. <el-input
  662. v-model="mchId"
  663. placeholder="请输入商铺商户号"
  664. style="width:50%;"
  665. ></el-input>
  666. </div>
  667. <div style="margin-bottom: 10px;">
  668. <span style="width: 200px;display: inline-block;text-align: right;"
  669. >开店时间:</span
  670. >
  671. <!-- <el-input v-model="openTime" placeholder="请输入排序号" type="data" min="0" style="width:50%;"></el-input> -->
  672. <el-time-select
  673. v-model="openTime"
  674. :picker-options="{
  675. start: '00:00',
  676. step: '00:15',
  677. end: '24:00'
  678. }"
  679. placeholder="选择开店时间"
  680. style="width:50%;"
  681. >
  682. </el-time-select>
  683. </div>
  684. <div style="margin-bottom: 10px;">
  685. <span style="width: 200px;display: inline-block;text-align: right;"
  686. >闭店时间:</span
  687. >
  688. <!-- <el-input v-model="closeTime" placeholder="请输入排序号" type="data" min="0" style="width:50%;"></el-input> -->
  689. <el-time-select
  690. v-model="closeTime"
  691. :picker-options="{
  692. start: '00:00',
  693. step: '00:15',
  694. end: '24:00'
  695. }"
  696. placeholder="选择闭店时间"
  697. style="width:50%;"
  698. >
  699. </el-time-select>
  700. </div>
  701. <div style="margin-bottom: 10px;">
  702. <span style="width: 200px;display: inline-block;text-align: right;"
  703. >商铺标签:</span
  704. >
  705. <span class="bqList" v-for="(item, index) in labels" :key="index"
  706. >{{ item }}
  707. <span class="delss">
  708. <i class="el-icon-delete" @click="dels1(index)"></i>
  709. </span>
  710. </span>
  711. <el-input
  712. v-model="bq"
  713. style="width:200px;"
  714. placeholder="请输入标签"
  715. onkeyup="this.value=this.value.replace(/[, ]/g,'')"
  716. @keydown.enter.native="btnTj"
  717. ></el-input>
  718. <!-- <button class="tj" @click="btnTj">添加标签</button> -->
  719. <el-button
  720. type="primary"
  721. class="tj"
  722. size="mini"
  723. icon="el-icon-edit"
  724. circle
  725. @click="btnTj"
  726. >
  727. </el-button>
  728. </div>
  729. <div style="margin-bottom: 10px;">
  730. <span style="width: 200px;display: inline-block;text-align: right;"
  731. >店铺公告:</span
  732. >
  733. <el-input
  734. v-model="shopNotice"
  735. placeholder="请输入店铺公告"
  736. type="textarea"
  737. :rows="2"
  738. style="width:50%;"
  739. ></el-input>
  740. </div>
  741. <div style="margin-bottom: 10px;">
  742. <span style="width: 200px;display: inline-block;text-align: right;"
  743. >城市:</span
  744. >
  745. <el-cascader
  746. style="width:50%"
  747. size="large"
  748. :options="options"
  749. ref="cascaderAddr"
  750. v-model="storeAddress"
  751. :placeholder="storeAddre"
  752. @change="handleChange55"
  753. :value="storeAddre"
  754. >
  755. </el-cascader>
  756. </div>
  757. <div style="margin-bottom: 10px;">
  758. <span style="width: 200px;display: inline-block;text-align: right;"
  759. >店铺地址:</span
  760. >
  761. <el-input
  762. v-model="detailedAddress"
  763. @keydown.enter.native="phoneSelect"
  764. placeholder="请输入店铺地址"
  765. type="text"
  766. style="width:50%;"
  767. ></el-input>
  768. </div>
  769. <div style="margin-bottom: 10px;">
  770. <span style="width: 200px;display: inline-block;text-align: right;"
  771. >配送费:</span
  772. >
  773. <el-input
  774. v-model="errandMoney"
  775. placeholder="请输入配送费"
  776. type="text"
  777. style="width:50%;"
  778. ></el-input>
  779. </div>
  780. <div style="margin-bottom: 10px;">
  781. <span style="width: 200px;display: inline-block;text-align: right;"
  782. >配送距离:</span
  783. >
  784. <el-input
  785. v-model="distributionDistance"
  786. placeholder="请输入配送距离"
  787. type="text"
  788. style="width:50%;"
  789. >
  790. </el-input>
  791. </div>
  792. <!-- <div style="margin-bottom: 10px;">
  793. <span style="width: 200px;display: inline-block;text-align: right;">是否减免配送费:</span>
  794. <el-radio-group v-model="exemptErrandFlag" @change="onFlag">
  795. <el-radio :label="0">开启</el-radio>
  796. <el-radio :label="1">关闭</el-radio>
  797. </el-radio-group>
  798. </div> -->
  799. <div style="margin-bottom: 10px;">
  800. <span style="width: 200px;display: inline-block;text-align: right;"
  801. >减免配送费最低订单金额:</span
  802. >
  803. <el-input
  804. v-model="exemptMinMoney"
  805. placeholder="请输入减免配送费最低订单金额"
  806. type="text"
  807. style="width:50%;"
  808. ></el-input>
  809. </div>
  810. <div style="margin-bottom: 10px;">
  811. <span style="width: 200px;display: inline-block;text-align: right;"
  812. >最低起送金额:</span
  813. >
  814. <el-input
  815. v-model="minimumDelivery"
  816. placeholder="请输入最低起送金额"
  817. type="text"
  818. style="width:50%;"
  819. ></el-input>
  820. </div>
  821. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  822. <span style="width: 200px;display: inline-block;text-align: right;"
  823. >是否开启满减:</span
  824. >
  825. <el-radio-group v-model="enableFullReductionFlag">
  826. <el-radio :label="0">开启</el-radio>
  827. <el-radio :label="1">关闭</el-radio>
  828. </el-radio-group>
  829. </div>
  830. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  831. <span style="width: 200px;display: inline-block;text-align: right;"
  832. >是否开启平台配送:</span
  833. >
  834. <el-radio-group v-model="autoSendOrder">
  835. <el-radio :label="0">开启</el-radio>
  836. <el-radio :label="1">关闭</el-radio>
  837. </el-radio-group>
  838. </div>
  839. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  840. <span style="width: 200px;display: inline-block;text-align: right;"
  841. >是否开启自动接单:</span
  842. >
  843. <el-radio-group v-model="autoAcceptOrder">
  844. <el-radio :label="0">开启</el-radio>
  845. <el-radio :label="1">关闭</el-radio>
  846. </el-radio-group>
  847. </div>
  848. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  849. <span style="width: 200px;display: inline-block;text-align: right;"
  850. >是否开启预约单功能:</span
  851. >
  852. <el-radio-group v-model="reservationOpenFlag">
  853. <el-radio :label="1">开启</el-radio>
  854. <el-radio :label="0">关闭</el-radio>
  855. </el-radio-group>
  856. </div>
  857. <div style="margin-bottom: 10px;">
  858. <span style="width: 200px;display: inline-block;text-align: right;"
  859. >打印机类型:</span
  860. >
  861. <el-radio-group v-model="facility">
  862. <el-radio :label="1">飞鹅</el-radio>
  863. </el-radio-group>
  864. <div style="font-size: 8px;color: red;margin-left: 200px;">
  865. * 一个设备只能关联一个商铺
  866. </div>
  867. </div>
  868. <div style="margin-bottom: 10px;">
  869. <span style="width: 200px;display: inline-block;text-align: right;"
  870. >设备sn编码:</span
  871. >
  872. <el-input
  873. v-model="snCode"
  874. placeholder="请输入设备sn编码"
  875. type="text"
  876. style="width:50%;"
  877. ></el-input>
  878. </div>
  879. <div style="margin-bottom: 10px;">
  880. <span style="width: 200px;display: inline-block;text-align: right;"
  881. >设备key秘钥:</span
  882. >
  883. <el-input
  884. v-model="value"
  885. placeholder="请输入设备key秘钥"
  886. type="text"
  887. style="width:50%;"
  888. ></el-input>
  889. </div>
  890. <div style="margin-bottom: 10px;" v-if="titles == '修改'">
  891. <span style="width: 200px;display: inline-block;text-align: right;"
  892. >营业状态:</span
  893. >
  894. <el-radio-group v-model="putawayFlag">
  895. <el-radio :label="0">上班啦</el-radio>
  896. <el-radio :label="1">打烊啦</el-radio>
  897. </el-radio-group>
  898. </div>
  899. <div style="margin-bottom: 10px;">
  900. <span style="width: 200px;display: inline-block;text-align: right;"
  901. >纬度:</span
  902. >
  903. <el-input
  904. v-model="latitude"
  905. style="width:50%;"
  906. placeholder="请输入纬度"
  907. disabled
  908. ></el-input>
  909. </div>
  910. <div style="margin-bottom: 10px;">
  911. <span style="width: 200px;display: inline-block;text-align: right;"
  912. >经度:</span
  913. >
  914. <el-input
  915. v-model="longitude"
  916. style="width:50%;"
  917. placeholder="请输入经度"
  918. disabled
  919. ></el-input>
  920. </div>
  921. <div>
  922. <div
  923. id="container1"
  924. style="width:80%;height:500px;margin-left: 10%;"
  925. ></div>
  926. </div>
  927. <div slot="footer" class="dialog-footer">
  928. <el-button @click="dialogFormVisible = false">取 消</el-button>
  929. <el-button type="primary" @click="releasNoticeTo()">确 定</el-button>
  930. </div>
  931. </el-dialog>
  932. <!-- 店铺二维码 -->
  933. <el-dialog :visible.sync="dialogFormVisible2" center title="店铺二维码">
  934. <div>
  935. <img :src="erweimaImg" style="width: 50%;margin-left: 25%;" />
  936. <div style="text-align: center;margin-top: 20px;">
  937. <el-button type="primary" @click="chakan()">打开窗口查看</el-button>
  938. </div>
  939. </div>
  940. </el-dialog>
  941. <!-- 添加、修改类型 -->
  942. <el-dialog :visible.sync="dialogFormVisible3" center :title="titles1">
  943. <div style="margin-bottom: 10px;">
  944. <span style="width: 200px;display: inline-block;text-align: right;"
  945. >类型名称:</span
  946. >
  947. <el-input
  948. v-model="shopTypeName"
  949. placeholder="请输入类型名称"
  950. style="width:50%;"
  951. ></el-input>
  952. </div>
  953. <div slot="footer" class="dialog-footer">
  954. <el-button @click="dialogFormVisible3 = false">取 消</el-button>
  955. <el-button type="primary" @click="releasNoticeTo1()">确 定</el-button>
  956. </div>
  957. </el-dialog>
  958. <!-- 修改保证金 金额 -->
  959. <el-dialog title="修改金额" :visible.sync="dialogFormVisible4" center>
  960. <div style="margin-bottom: 10px;">
  961. <span style="width: 200px;display: inline-block;text-align: right;"
  962. >修改类型:</span
  963. >
  964. <el-radio-group v-model="type">
  965. <el-radio :label="1">添加</el-radio>
  966. <el-radio :label="2">减少</el-radio>
  967. </el-radio-group>
  968. </div>
  969. <div style="margin-bottom: 10px;">
  970. <span style="width: 200px;display: inline-block;text-align: right;"
  971. >金额:</span
  972. >
  973. <el-input
  974. style="width:50%;"
  975. v-model="money"
  976. type="number"
  977. :min="0"
  978. :max="100"
  979. :controls="false"
  980. placeholder="请输入金额"
  981. ></el-input>
  982. </div>
  983. <div slot="footer" class="dialog-footer">
  984. <el-button @click="dialogFormVisible4 = false">取 消</el-button>
  985. <el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
  986. </div>
  987. </el-dialog>
  988. <!-- 修改佣金比例 -->
  989. <el-dialog title="修改佣金比例" :visible.sync="dialogFormVisible7" center>
  990. <div style="margin-bottom: 10px;">
  991. <span style="width: 200px;display: inline-block;text-align: right;"
  992. >佣金比例:</span
  993. >
  994. <el-input
  995. style="width:50%;"
  996. v-model="money"
  997. type="number"
  998. :min="0"
  999. :max="100"
  1000. :controls="false"
  1001. placeholder="请输入佣金比例"
  1002. ></el-input>
  1003. </div>
  1004. <div slot="footer" class="dialog-footer">
  1005. <el-button @click="dialogFormVisible7 = false">取 消</el-button>
  1006. <el-button type="primary" @click="StairNoticeToYj()">确 定</el-button>
  1007. </div>
  1008. </el-dialog>
  1009. <!-- 修改配送费 金额 -->
  1010. <el-dialog title="修改配送费" :visible.sync="dialogFormVisible6" center>
  1011. <div style="margin-bottom: 10px;">
  1012. <span style="width: 200px;display: inline-block;text-align: right;"
  1013. >配送费:</span
  1014. >
  1015. <el-input
  1016. style="width:50%;"
  1017. v-model="money"
  1018. type="number"
  1019. :min="0"
  1020. :max="100"
  1021. :controls="false"
  1022. placeholder="请输入配送费"
  1023. ></el-input>
  1024. </div>
  1025. <div slot="footer" class="dialog-footer">
  1026. <el-button @click="dialogFormVisible6 = false">取 消</el-button>
  1027. <el-button type="primary" @click="StairNoticeTo2()">确 定</el-button>
  1028. </div>
  1029. </el-dialog>
  1030. <!-- 修改密码 -->
  1031. <el-dialog title="修改密码" :visible.sync="dialogFormVisible5" center>
  1032. <div style="margin-bottom: 10px;">
  1033. <span style="width: 200px;display: inline-block;text-align: right;"
  1034. >新密码:</span
  1035. >
  1036. <el-input
  1037. style="width:50%;"
  1038. v-model="newPassword"
  1039. type="password"
  1040. :controls="false"
  1041. placeholder="请输入新密码"
  1042. >
  1043. </el-input>
  1044. </div>
  1045. <div style="margin-bottom: 10px;">
  1046. <span style="width: 200px;display: inline-block;text-align: right;"
  1047. >确认密码:</span
  1048. >
  1049. <el-input
  1050. style="width:50%;"
  1051. v-model="querenPassword"
  1052. type="password"
  1053. :controls="false"
  1054. placeholder="请输入确认密码"
  1055. >
  1056. </el-input>
  1057. </div>
  1058. <div slot="footer" class="dialog-footer">
  1059. <el-button @click="dialogFormVisible5 = false">取 消</el-button>
  1060. <el-button type="primary" @click="updatePassword()">确 定</el-button>
  1061. </div>
  1062. </el-dialog>
  1063. <!-- 用户列表 -->
  1064. <el-dialog title="用户列表" :visible.sync="dialogFormVisible11" center>
  1065. <el-input
  1066. style="width: 150px;"
  1067. @keydown.enter.native="select11"
  1068. clearable
  1069. placeholder="请输入手机号"
  1070. v-model="phone"
  1071. >
  1072. </el-input
  1073. >&nbsp;&nbsp;&nbsp;&nbsp;
  1074. <el-input
  1075. style="width: 150px;"
  1076. @keydown.enter.native="select11"
  1077. clearable
  1078. placeholder="请输入昵称"
  1079. v-model="nickName"
  1080. >
  1081. </el-input>
  1082. <div style="display: inline-block;">
  1083. <el-button
  1084. style="margin-left:15px;"
  1085. size="mini"
  1086. type="primary"
  1087. icon="document"
  1088. @click="select11"
  1089. >查询
  1090. </el-button>
  1091. <el-button
  1092. style="margin-left:15px;"
  1093. size="mini"
  1094. type="primary"
  1095. icon="document"
  1096. @click="cleans11"
  1097. >重置
  1098. </el-button>
  1099. </div>
  1100. <!-- <el-button style="margin-left:15px;" size="mini" type="primary"
  1101. icon="document" @click="closes2()">确定</el-button> -->
  1102. <el-table
  1103. v-loading="tableDataLoading11"
  1104. :data="userData.list"
  1105. :row-key="
  1106. row => {
  1107. return row.userId;
  1108. }
  1109. "
  1110. >
  1111. <!-- <el-table-column :reserve-selection="true" type="selection" fixed>
  1112. </el-table-column> -->
  1113. <el-table-column prop="userId" label="编号"> </el-table-column>
  1114. <el-table-column fixed prop="nickName" label="昵称">
  1115. <template slot-scope="scope">
  1116. <span style="color: #f56c6c;">{{
  1117. scope.row.nickName ? scope.row.nickName : "未设置"
  1118. }}</span>
  1119. </template>
  1120. </el-table-column>
  1121. <el-table-column label="图像">
  1122. <template slot-scope="scope">
  1123. <img
  1124. v-if="scope.row.avatar == null"
  1125. src="~@/assets/img/avatar.png"
  1126. alt=""
  1127. width="40"
  1128. height="40"
  1129. />
  1130. <img v-else :src="scope.row.avatar" alt="" width="40" height="40" />
  1131. </template>
  1132. </el-table-column>
  1133. <el-table-column prop="phone" label="手机号" width="120">
  1134. <template slot-scope="scope">
  1135. <span
  1136. style="color: #4f9dec;cursor: pointer;"
  1137. @click="closes11(scope.row)"
  1138. >{{ scope.row.phone ? scope.row.phone : "未绑定" }}</span
  1139. >
  1140. </template>
  1141. </el-table-column>
  1142. <el-table-column prop="platform" label="来源"> </el-table-column>
  1143. <el-table-column prop="createTime" label="创建时间"> </el-table-column>
  1144. <el-table-column prop="createTime" label="操作">
  1145. <template slot-scope="scope">
  1146. <el-button
  1147. style="margin-left:15px;"
  1148. size="mini"
  1149. type="primary"
  1150. icon="document"
  1151. @click="closes2(scope.row)"
  1152. >
  1153. 确定</el-button
  1154. >
  1155. </template>
  1156. </el-table-column>
  1157. </el-table>
  1158. <div style="text-align: center;margin-top: 10px;">
  1159. <el-pagination
  1160. @size-change="handleSizeChange11"
  1161. @current-change="handleCurrentChange11"
  1162. :page-sizes="[10, 20, 30, 50]"
  1163. :page-size="size11"
  1164. :current-page="page11"
  1165. layout="total,sizes, prev, pager, next,jumper"
  1166. :total="userData.totalCount"
  1167. >
  1168. </el-pagination>
  1169. </div>
  1170. </el-dialog>
  1171. <!-- 活动列表 -->
  1172. <el-dialog
  1173. title="活动列表"
  1174. :visible.sync="dialogFormVisibleHd"
  1175. center
  1176. width="70%"
  1177. @close="handleCancleHd"
  1178. >
  1179. <div style="margin:2% 0;display: inline-block;">
  1180. <el-input
  1181. style="width: 180px;"
  1182. @keydown.enter.native="selectHd"
  1183. clearable
  1184. placeholder="请输入活动名称"
  1185. v-model="integralName"
  1186. ></el-input>
  1187. </div>
  1188. <div style="display: inline-block;">
  1189. <el-button
  1190. style="margin-left:15px;"
  1191. size="mini"
  1192. type="primary"
  1193. icon="document"
  1194. @click="selectHd"
  1195. >查询
  1196. </el-button>
  1197. <el-button
  1198. style="margin-left:15px;"
  1199. size="mini"
  1200. type="primary"
  1201. icon="document"
  1202. @click="cleansHs"
  1203. >重置
  1204. </el-button>
  1205. </div>
  1206. <el-table v-loading="tableDataLoadingHd" :data="huodongData">
  1207. <el-table-column prop="id" label="编号" width="80"> </el-table-column>
  1208. <el-table-column prop="title" label="活动名称" width="150">
  1209. </el-table-column>
  1210. <el-table-column prop="image" label="活动图片" width="200">
  1211. <template slot-scope="scope">
  1212. <div v-if="scope.row.image">
  1213. <div
  1214. v-for="(item, index) in scope.row.image.split(',')"
  1215. :key="index"
  1216. style="display: inline-block; margin: 3px;"
  1217. >
  1218. <el-popover placement="top-start" title="" trigger="hover">
  1219. <img
  1220. style="width: 50px; height: 50px"
  1221. :src="item"
  1222. alt=""
  1223. slot="reference"
  1224. />
  1225. <img style="width: 300px; height: auto" :src="item" alt="" />
  1226. </el-popover>
  1227. </div>
  1228. </div>
  1229. </template>
  1230. </el-table-column>
  1231. <el-table-column prop="type" label="活动类型">
  1232. <template slot-scope="scope">
  1233. <span v-if="scope.row.type == 1">普通活动</span>
  1234. <span v-else-if="scope.row.type == 2">时段优惠</span>
  1235. <span v-else-if="scope.row.type == 3">满额优惠</span>
  1236. <span v-else-if="scope.row.type == 4">全场优惠</span>
  1237. </template>
  1238. </el-table-column>
  1239. <el-table-column prop="content" label="活动内容">
  1240. <template slot-scope="scope">
  1241. <el-popover placement="top-start" title="" trigger="hover">
  1242. <div
  1243. style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"
  1244. slot="reference"
  1245. >
  1246. {{ scope.row.content }}
  1247. </div>
  1248. <div style="width: 300px; height: auto;word-break: break-all;">
  1249. {{ scope.row.content }}
  1250. </div>
  1251. </el-popover>
  1252. </template>
  1253. </el-table-column>
  1254. <el-table-column prop="updateTime" label="创建时间" width="160">
  1255. </el-table-column>
  1256. <el-table-column fixed="right" label="操作" width="100">
  1257. <template slot-scope="scope">
  1258. <el-button
  1259. size="mini"
  1260. v-if="scope.row.quantity == 0"
  1261. type="primary"
  1262. @click="querenBtnHd(scope.row)"
  1263. style="margin: 3px;"
  1264. >参加活动
  1265. </el-button>
  1266. <template v-else>
  1267. <el-button size="mini" type="warn" disabled style="margin: 3px;"
  1268. >已参加
  1269. </el-button>
  1270. <el-button
  1271. size="mini"
  1272. type="primary"
  1273. style="margin: 3px;"
  1274. v-if="scope.row.type == 3"
  1275. @click="selectshangpin(scope.row)"
  1276. >选择商品
  1277. </el-button>
  1278. <el-button
  1279. size="mini"
  1280. type="primary"
  1281. style="margin: 3px;"
  1282. @click="quitHuo(scope.row)"
  1283. >退出活动
  1284. </el-button>
  1285. </template>
  1286. </template>
  1287. </el-table-column>
  1288. </el-table>
  1289. <!-- <div style="text-align: center;margin-top: 10px;">
  1290. <el-pagination @size-change="handleSizeChangeH" @current-change="handleCurrentChangeH"
  1291. :page-sizes="[10, 15, 20, 25]" :page-size="limitH" :current-page="pageH"
  1292. layout="total,sizes, prev, pager, next" :total="huodongData.length">
  1293. </el-pagination>
  1294. </div> -->
  1295. </el-dialog>
  1296. <!-- 活动详情 -->
  1297. <el-dialog title="活动详情" :visible.sync="dialogFormVisibleXq" center>
  1298. <div>
  1299. <div style="margin-bottom: 10px;">
  1300. <span style="width: 200px;display: inline-block;text-align: right;"
  1301. >活动名称:</span
  1302. >
  1303. <span>{{ xiangqingData.activityTitle }}</span>
  1304. </div>
  1305. <div style="margin-bottom: 10px;" v-if="xiangqingData.activityImage">
  1306. <div style="width: 200px;display: inline-block;text-align: right;">
  1307. 活动图片:
  1308. </div>
  1309. <div
  1310. class="imgs"
  1311. v-for="(item, index) in xiangqingData.activityImage.split(',')"
  1312. :key="index"
  1313. >
  1314. <img width="100%" class="images" height="100%" :src="item" alt="" />
  1315. </div>
  1316. </div>
  1317. <div style="margin-bottom: 10px;">
  1318. <span style="width: 200px;display: inline-block;text-align: right;"
  1319. >活动详情:</span
  1320. >
  1321. <div
  1322. class="divs"
  1323. v-html="xiangqingData.activityContent"
  1324. style="margin-left: 200px;width: 50%;"
  1325. ></div>
  1326. </div>
  1327. </div>
  1328. </el-dialog>
  1329. <!-- 参与活动弹框 -->
  1330. <el-dialog title="参与活动" :visible.sync="dialogFormcanyuhuo" center>
  1331. <div>
  1332. <div style="margin-bottom: 10px;">
  1333. <span style="width: 200px;display: inline-block;text-align: right;"
  1334. >活动名称:</span
  1335. >
  1336. <span>{{ huoList.title }}</span>
  1337. </div>
  1338. <div style="margin-bottom: 10px;" v-if="huoList.image">
  1339. <div style="width: 200px;display: inline-block;text-align: right;">
  1340. 活动图片:
  1341. </div>
  1342. <div
  1343. class="imgs"
  1344. v-for="(item, index) in huoList.image.split(',')"
  1345. :key="index"
  1346. >
  1347. <img width="100%" class="images" height="100%" :src="item" alt="" />
  1348. </div>
  1349. </div>
  1350. <div style="margin-bottom: 10px;">
  1351. <span style="width: 200px;display: inline-block;text-align: right;"
  1352. >活动详情:</span
  1353. >
  1354. <div
  1355. class="divs"
  1356. v-html="huoList.content"
  1357. style="margin-left: 200px;width: 50%;"
  1358. ></div>
  1359. </div>
  1360. <!-- <div style="margin-bottom: 10px;">
  1361. <span style="width: 200px;display: inline-block;text-align: right;">参与活动的商品:</span>
  1362. <span class="divs" style="width: 50%;color: rgba(62, 142, 247, 1);" @click="selectshangpin">请选择/修改</span>
  1363. </div> -->
  1364. <div style="margin-bottom: 10px;">
  1365. <span style="width: 200px;display: inline-block;text-align: right;"
  1366. >活动类型:</span
  1367. >
  1368. <span v-if="huoList.type == '1'">普通活动</span>
  1369. <span v-if="huoList.type == '2'">时段优惠</span>
  1370. <span v-if="huoList.type == '3'">满额优惠</span>
  1371. <span v-if="huoList.type == '4'">全场优惠</span>
  1372. </div>
  1373. <div
  1374. style="margin-bottom: 10px;"
  1375. v-if="
  1376. huoList.type == '2' || huoList.type == '3' || huoList.type == '4'
  1377. "
  1378. >
  1379. <span style="width: 200px;display: inline-block;text-align: right;"
  1380. >适用情况:</span
  1381. >
  1382. <el-radio v-model="suitType" :label="'1'">皆适用</el-radio><br />
  1383. <div style="margin-left: 205px;width: 200px;">
  1384. <el-radio v-model="suitType" :label="'2'"
  1385. >仅针对第一次下单</el-radio
  1386. >
  1387. </div>
  1388. </div>
  1389. <div style="margin-bottom: 10px;">
  1390. <span style="width: 200px;display: inline-block;text-align: right;"
  1391. >活动时间:</span
  1392. >
  1393. <span>{{ huoList.startTime }}至{{ huoList.endTime }}</span>
  1394. </div>
  1395. <div
  1396. style="margin-bottom: 10px;"
  1397. v-if="
  1398. huoList.type == '2' || huoList.type == '3' || huoList.type == '4'
  1399. "
  1400. >
  1401. <span style="width: 200px;display: inline-block;text-align: right;"
  1402. >使用限制:</span
  1403. >
  1404. <el-radio v-model="limitType" :label="'1'">无限制</el-radio><br />
  1405. <div style="margin-left: 205px;">
  1406. <el-radio v-model="limitType" :label="'2'">每天使用</el-radio>
  1407. <el-input
  1408. v-model="limitNum"
  1409. type="number"
  1410. style="width:13%;display: inline-table;"
  1411. ></el-input>
  1412. <span>次</span>
  1413. </div>
  1414. </div>
  1415. <div style="margin-bottom: 10px;">
  1416. <div class="canquxiao" @click="joinHuo">确定</div>
  1417. <div class="canqueding" @click="quxiaoHuo">取消</div>
  1418. </div>
  1419. </div>
  1420. </el-dialog>
  1421. <!-- 选择活动商品弹框 -->
  1422. <el-dialog
  1423. title="优惠商品"
  1424. :visible.sync="dialogFormVisibleshangp"
  1425. center
  1426. width="70%"
  1427. @close="handleCancleshangp"
  1428. >
  1429. <div style="margin:2% 0;display: inline-block;">
  1430. <span>商品名称:</span>
  1431. <el-input
  1432. style="width: 180px;"
  1433. @keydown.enter.native="select2"
  1434. clearable
  1435. placeholder="请输入商品名称"
  1436. v-model="integralName2"
  1437. ></el-input>
  1438. </div>
  1439. <div style="display: inline-block;">
  1440. <el-button
  1441. style="margin-left:15px;"
  1442. size="mini"
  1443. type="primary"
  1444. icon="document"
  1445. @click="select2"
  1446. >查询
  1447. </el-button>
  1448. </div>
  1449. <div style="display: inline-block;">
  1450. <el-button
  1451. style="margin-left:15px;"
  1452. size="mini"
  1453. type="primary"
  1454. icon="document"
  1455. @click="yiselect()"
  1456. >已选择商品
  1457. </el-button>
  1458. </div>
  1459. <el-table
  1460. v-loading="tableDataLoadingShop"
  1461. :data="shopData.list"
  1462. ref="dataTable"
  1463. :key="randomKey"
  1464. @select="selectdan"
  1465. @select-all="selectAll"
  1466. >
  1467. <el-table-column type="selection" width="55"> </el-table-column>
  1468. <el-table-column label="编号" prop="goodsId" width="80" fixed="left">
  1469. </el-table-column>
  1470. <el-table-column label="标题" prop="goodsName" fixed="left">
  1471. </el-table-column>
  1472. <el-table-column prop="goodsCover" label="商品图" width="150">
  1473. <template slot-scope="scope">
  1474. <div style="display: inline-block; margin: 3px;">
  1475. <el-popover placement="top-start" title="" trigger="hover">
  1476. <img
  1477. style="width: 50px; height: 50px"
  1478. :src="scope.row.goodsCover"
  1479. alt=""
  1480. slot="reference"
  1481. />
  1482. <img
  1483. style="width: 300px; height: auto"
  1484. :src="scope.row.goodsCover"
  1485. alt=""
  1486. />
  1487. </el-popover>
  1488. </div>
  1489. </template>
  1490. </el-table-column>
  1491. <el-table-column label="商品描述" prop="goodsDescribe" width="120">
  1492. </el-table-column>
  1493. <el-table-column label="创建时间" prop="createTime"> </el-table-column>
  1494. </el-table>
  1495. <el-button
  1496. style="margin-left:15px;margin-top: 10px;"
  1497. size="mini"
  1498. type="primary"
  1499. icon="document"
  1500. @click="tianjiahuo"
  1501. >确定
  1502. </el-button>
  1503. <div style="text-align: center;margin-top: 10px;">
  1504. <el-pagination
  1505. @size-change="handleSizeChangeShop"
  1506. @current-change="handleCurrentChangeShop"
  1507. :page-sizes="[10, 15, 20, 25]"
  1508. :page-size="limit1"
  1509. :current-page="page1"
  1510. layout="total,sizes, prev, pager, next"
  1511. :total="shopData.totalCount"
  1512. >
  1513. </el-pagination>
  1514. </div>
  1515. </el-dialog>
  1516. <!-- 已选择商品 -->
  1517. <el-dialog
  1518. title="已选择商品"
  1519. :visible.sync="dialogFormVisibleshangpYi"
  1520. center
  1521. width="70%"
  1522. >
  1523. <el-table v-loading="tableDataLoadingShopYi" :data="shopDataYi">
  1524. <el-table-column label="编号" prop="goodsId" width="80" fixed="left">
  1525. </el-table-column>
  1526. <el-table-column label="标题" prop="goodsName" fixed="left">
  1527. </el-table-column>
  1528. <el-table-column prop="goodsCover" label="商品图" width="150">
  1529. <template slot-scope="scope">
  1530. <div style="display: inline-block; margin: 3px;">
  1531. <el-popover placement="top-start" title="" trigger="hover">
  1532. <img
  1533. style="width: 50px; height: 50px"
  1534. :src="scope.row.goodsCover"
  1535. alt=""
  1536. slot="reference"
  1537. />
  1538. <img
  1539. style="width: 300px; height: auto"
  1540. :src="scope.row.goodsCover"
  1541. alt=""
  1542. />
  1543. </el-popover>
  1544. </div>
  1545. </template>
  1546. </el-table-column>
  1547. <el-table-column label="商品描述" prop="goodsDescribe" width="120">
  1548. </el-table-column>
  1549. <el-table-column label="创建时间" prop="createTime"> </el-table-column>
  1550. </el-table>
  1551. <!-- <div style="text-align: center;margin-top: 10px;">
  1552. <el-pagination @size-change="handleSizeChangeShop2" @current-change="handleCurrentChangeShop2"
  1553. :page-sizes="[10, 15, 20, 25]" :page-size="limit2" :current-page="page2"
  1554. layout="total,sizes, prev, pager, next" :total="shopTotal">
  1555. </el-pagination>
  1556. </div> -->
  1557. </el-dialog>
  1558. </el-tabs>
  1559. </template>
  1560. <script>
  1561. import Vue from "vue";
  1562. import { jsonp } from "vue-jsonp";
  1563. import {
  1564. provinceAndCityData,
  1565. regionData,
  1566. provinceAndCityDataPlus,
  1567. regionDataPlus,
  1568. CodeToText,
  1569. TextToCode
  1570. } from "element-china-area-data";
  1571. var geocoder,
  1572. map,
  1573. markersArray = [];
  1574. export default {
  1575. data() {
  1576. return {
  1577. token: "",
  1578. routeFlag: true,
  1579. phone: "",
  1580. nickName: "",
  1581. limit: 10,
  1582. page: 1,
  1583. limit1: 10,
  1584. page1: 1,
  1585. limit2: 10,
  1586. page2: 1,
  1587. size11: 10,
  1588. page11: 1,
  1589. shopName1: "",
  1590. isActivity: "",
  1591. vipPromotion:"",
  1592. region: "",
  1593. shopId: "",
  1594. userIdList: "",
  1595. shopName: "",
  1596. shopNotice: "",
  1597. userData: [], //用户集合
  1598. openTime: "",
  1599. closeTime: "",
  1600. detailedAddress: "",
  1601. shopLng: "",
  1602. shopLat: "",
  1603. percentage1: 0, //进度条
  1604. img: [], //任务轮播图
  1605. // img: '',
  1606. classn: "",
  1607. value: "",
  1608. parentId: 0,
  1609. parentIdnum: "",
  1610. tableDataLoading: false,
  1611. dialogFormVisible1: false,
  1612. dialogFormVisible2: false,
  1613. dialogFormVisible3: false,
  1614. tableDataLoading11: false,
  1615. dialogFormVisible: false,
  1616. dialogFormVisible11: false, //用户列表
  1617. typeDatas: {},
  1618. typeDatas1: {},
  1619. titles: "添加",
  1620. // 地图相关
  1621. longitude: "", //维度
  1622. latitude: "", //经度
  1623. loadingMap: true,
  1624. BMap: "",
  1625. map: "",
  1626. geoc: "",
  1627. keyword: "",
  1628. showMap: false,
  1629. pointLngLat: "",
  1630. center: {
  1631. lng: 109.45744048529967,
  1632. lat: 36.49771311230842
  1633. },
  1634. storeAddress: [],
  1635. storeAddre: "请选择城市",
  1636. form: {
  1637. province: "",
  1638. city: "", //市
  1639. district: "" //区
  1640. },
  1641. dialogImageUrl: [],
  1642. dialogVisible: false,
  1643. erweimaImg: "",
  1644. activeName: "first",
  1645. shopTypeName: "",
  1646. shopTypId: "",
  1647. titles1: "",
  1648. labels: [], //标签集合
  1649. bq: "", //输入的标签名
  1650. province: "",
  1651. city: "", //市
  1652. district: "", //区
  1653. options: regionData,
  1654. shopCover: "",
  1655. shopTypenum: [],
  1656. typeDatas2: [],
  1657. shopType: "",
  1658. type: "",
  1659. money: "",
  1660. classIndex: "",
  1661. dialogFormVisible4: false,
  1662. dialogFormVisible5: false,
  1663. dialogFormVisible6: false,
  1664. dialogFormVisible7: false,
  1665. tablemoney: 0,
  1666. dataForm: {
  1667. id: 0,
  1668. userName: "",
  1669. password: "",
  1670. comfirmPassword: "",
  1671. salt: "",
  1672. email: "",
  1673. mobile: "",
  1674. roleIdList: [],
  1675. shopIdList: [],
  1676. status: 1
  1677. },
  1678. newPassword: "",
  1679. querenPassword: "",
  1680. bannedFlag: "",
  1681. exemptErrandFlag: 1, //是否见面配送费0开启 1关闭
  1682. errandMoney: 0,
  1683. exemptMinMoney: 0,
  1684. minimumDelivery: 0,
  1685. enableFullReductionFlag: 1,
  1686. autoSendOrder: 1,
  1687. autoAcceptOrder: 1,
  1688. reservationOpenFlag: 0,
  1689. sort: 1,
  1690. putawayFlag: 1,
  1691. distributionDistance: 3000,
  1692. facility: 1,
  1693. shopUserId: "",
  1694. shopUserName: "",
  1695. mchId: "", // 商铺商户号
  1696. shopPhone: "", //商户关联手机号
  1697. snCode: "",
  1698. dialogFormVisibleHd: false,
  1699. dialogFormVisibleXq: false,
  1700. dialogFormcanyuhuo: false,
  1701. dialogFormVisibleshangp: false, //优惠商品选择弹框
  1702. dialogFormVisibleshangpYi: false, //已选择商品弹框
  1703. selectedItems: [], //存储选中的数组
  1704. randomKey: Math.random(),
  1705. suoshoplength: 0, //所有商品数量
  1706. shopTotal: 0,
  1707. shopDataYi: [], //已选择商品
  1708. shopData: {},
  1709. tableDataLoadingShop: false,
  1710. tableDataLoadingShopYi: false,
  1711. tableDataLoadingHd: false,
  1712. huodongData: [],
  1713. limitH: 10,
  1714. pageH: 1,
  1715. integralName: "",
  1716. integralName2: "",
  1717. xiangqingData: {},
  1718. statusmain: [
  1719. {
  1720. value: "",
  1721. label: "全部"
  1722. },
  1723. {
  1724. value: 0,
  1725. label: "否"
  1726. },
  1727. {
  1728. value: 1,
  1729. label: "是"
  1730. }
  1731. ],
  1732. openValue: 1,
  1733. closeValue: 0,
  1734. activityId: "",
  1735. // 参与活动参数
  1736. huoList: {},
  1737. suitType: "1", //适用情况
  1738. limitType: "1", //使用限制
  1739. limitNum: "",
  1740. actShopid: [] //选择商品的id
  1741. };
  1742. },
  1743. methods: {
  1744. // tabs切换
  1745. handleClick(tab, event) {
  1746. this.page = 1;
  1747. this.limit = 10;
  1748. if (tab._props.label == "商铺列表") {
  1749. this.dataSelect();
  1750. }
  1751. if (tab._props.label == "商家类型") {
  1752. this.dataSelect1();
  1753. }
  1754. },
  1755. //用户模块的分页处理
  1756. handleSizeChange11(val) {
  1757. this.size11 = val;
  1758. this.dataSelect11();
  1759. },
  1760. //用户模块的分页处理
  1761. handleCurrentChange11(val) {
  1762. this.page11 = val;
  1763. this.dataSelect11();
  1764. },
  1765. handleSizeChange(val) {
  1766. this.limit = val;
  1767. this.dataSelect();
  1768. },
  1769. handleCurrentChange(val) {
  1770. this.page = val;
  1771. this.dataSelect();
  1772. },
  1773. //活动列表
  1774. handleSizeChangeH(val) {
  1775. this.limitH = val;
  1776. this.shopSelect2();
  1777. },
  1778. handleCurrentChangeH(val) {
  1779. this.pageH = val;
  1780. this.shopSelect2();
  1781. },
  1782. handleSizeChange1(val) {
  1783. this.limit = val;
  1784. this.dataSelect1();
  1785. },
  1786. handleCurrentChange1(val) {
  1787. this.page = val;
  1788. this.dataSelect1();
  1789. },
  1790. // 图标上传
  1791. handleAvatarSuccess(file) {
  1792. this.img = file.data;
  1793. },
  1794. // 添加店铺
  1795. addNotice() {
  1796. this.titles = "添加";
  1797. this.shopId = "";
  1798. this.mchId = "";
  1799. this.shopName = "";
  1800. this.shopNotice = "";
  1801. this.shopType = "";
  1802. this.openTime = "";
  1803. this.closeTime = "";
  1804. this.shopCover = "";
  1805. this.dialogImageUrl = [];
  1806. this.img = [];
  1807. this.detailedAddress = "";
  1808. this.shopLng = "";
  1809. this.shopLat = "";
  1810. this.longitude = ""; //维度
  1811. this.latitude = ""; //经度
  1812. this.bannedFlag = "";
  1813. this.errandMoney = 0;
  1814. this.exemptErrandFlag = 1;
  1815. this.facility = 1;
  1816. this.snCode = "";
  1817. this.value = "";
  1818. this.distributionDistance = 3000;
  1819. this.exemptMinMoney = 0;
  1820. this.minimumDelivery = 0;
  1821. this.enableFullReductionFlag = 1;
  1822. this.autoSendOrder = 1;
  1823. this.autoAcceptOrder = 1;
  1824. this.reservationOpenFlag = 0;
  1825. this.sort = 1;
  1826. this.putawayFlag = 1;
  1827. this.labels = [];
  1828. this.shopPhone = "";
  1829. this.shopUserId = "";
  1830. this.shopUserName = "";
  1831. this.storeAddress = [];
  1832. this.storeAddre = "请选择城市";
  1833. this.dialogFormVisible = true;
  1834. this.getMyLocation();
  1835. },
  1836. // 获取用户数据列表
  1837. dataSelect11() {
  1838. let phone = -1;
  1839. if (this.phone) {
  1840. phone = this.phone;
  1841. }
  1842. this.tableDataLoading11 = true;
  1843. this.$http({
  1844. url: this.$http.adornUrl("user/selectUserList"),
  1845. method: "get",
  1846. params: this.$http.adornParams({
  1847. page: this.page11,
  1848. limit: this.size11,
  1849. shopAdminFlag: "",
  1850. phone: this.phone,
  1851. userName: this.nickName,
  1852. type: ""
  1853. })
  1854. }).then(({ data }) => {
  1855. this.tableDataLoading11 = false;
  1856. let returnData = data.data;
  1857. this.userData = returnData;
  1858. });
  1859. },
  1860. // 查询
  1861. select11() {
  1862. this.page11 = 1;
  1863. this.dataSelect11();
  1864. },
  1865. //查看用户
  1866. selectUserId() {
  1867. this.dialogFormVisible11 = true;
  1868. this.page11 = 1;
  1869. this.phone = "";
  1870. this.nickName = "";
  1871. this.dataSelect11();
  1872. },
  1873. closes11(item) {
  1874. this.shopUserId = item.userId;
  1875. this.shopUserName = item.userName;
  1876. this.dialogFormVisible11 = false;
  1877. },
  1878. // 重置
  1879. cleans11() {
  1880. this.page11 = 1;
  1881. this.phone = "";
  1882. this.nickName = "";
  1883. this.dataSelect11();
  1884. },
  1885. // 添加店铺
  1886. releasNoticeTo() {
  1887. if (this.shopUserId == "") {
  1888. this.$notify({
  1889. title: "提示",
  1890. duration: 1800,
  1891. message: "请输入选择关联用户",
  1892. type: "warning"
  1893. });
  1894. return;
  1895. }
  1896. if (this.shopPhone == "") {
  1897. this.$notify({
  1898. title: "提示",
  1899. duration: 1800,
  1900. message: "请输入商户关联手机号",
  1901. type: "warning"
  1902. });
  1903. return;
  1904. }
  1905. if (this.shopName == "") {
  1906. this.$notify({
  1907. title: "提示",
  1908. duration: 1800,
  1909. message: "请输入店铺名称",
  1910. type: "warning"
  1911. });
  1912. return;
  1913. }
  1914. if (this.shopType == "") {
  1915. this.$notify({
  1916. title: "提示",
  1917. duration: 1800,
  1918. message: "请选择店铺类型",
  1919. type: "warning"
  1920. });
  1921. return;
  1922. }
  1923. if (this.openTime == "") {
  1924. this.$notify({
  1925. title: "提示",
  1926. duration: 1800,
  1927. message: "请选择开店时间",
  1928. type: "warning"
  1929. });
  1930. return;
  1931. }
  1932. if (this.closeTime == "") {
  1933. this.$notify({
  1934. title: "提示",
  1935. duration: 1800,
  1936. message: "请选择闭店时间",
  1937. type: "warning"
  1938. });
  1939. return;
  1940. }
  1941. if (this.detailedAddress == "") {
  1942. this.$notify({
  1943. title: "提示",
  1944. duration: 1800,
  1945. message: "请输入店铺地址",
  1946. type: "warning"
  1947. });
  1948. return;
  1949. }
  1950. if (this.img.length == 0) {
  1951. this.$notify({
  1952. title: "提示",
  1953. duration: 1800,
  1954. message: "轮播图不能为空",
  1955. type: "warning"
  1956. });
  1957. return;
  1958. }
  1959. if (this.errandMoney == "") {
  1960. this.errandMoney = 0;
  1961. }
  1962. if (this.minimumDelivery == "") {
  1963. this.minimumDelivery = 0;
  1964. }
  1965. if (this.exemptMinMoney == "") {
  1966. this.exemptMinMoney = 0;
  1967. }
  1968. if (this.longitude == "" || this.latitude == "") {
  1969. this.$notify({
  1970. title: "提示",
  1971. duration: 1800,
  1972. message: "请在地图上定位获取经纬度",
  1973. type: "warning"
  1974. });
  1975. return;
  1976. }
  1977. var datas = {};
  1978. datas.shopName = this.shopName;
  1979. datas.mchId = this.mchId;
  1980. datas.businessHours = this.openTime;
  1981. datas.shopBanner = this.img.toString();
  1982. datas.lockHours = this.closeTime;
  1983. datas.detailedAddress = this.detailedAddress;
  1984. datas.errandMoney = this.errandMoney;
  1985. datas.exemptErrandFlag = this.exemptErrandFlag;
  1986. datas.shopNotice = this.shopNotice;
  1987. datas.facility = this.facility;
  1988. datas.snCode = this.snCode;
  1989. datas.value = this.value;
  1990. datas.distributionDistance = this.distributionDistance;
  1991. datas.exemptMinMoney = this.exemptMinMoney;
  1992. datas.minimumDelivery = this.minimumDelivery;
  1993. datas.enableFullReductionFlag = this.enableFullReductionFlag;
  1994. datas.autoSendOrder = this.autoSendOrder;
  1995. datas.autoAcceptOrder = this.autoAcceptOrder;
  1996. datas.reservationOpenFlag = this.reservationOpenFlag;
  1997. datas.sort = this.sort;
  1998. datas.putawayFlag = this.putawayFlag;
  1999. datas.shopLng = this.longitude;
  2000. datas.shopLat = this.latitude;
  2001. datas.shopCover = this.shopCover;
  2002. datas.city = this.city;
  2003. datas.province = this.province;
  2004. datas.district = this.district;
  2005. datas.userId = this.shopUserId;
  2006. datas.phone = this.shopPhone;
  2007. // datas.isSupplier=1; // 是否为供货商
  2008. // datas.shopTypeId = this.shopType;
  2009. datas.shopTypeId = this.shopType.join(","); // 店铺类型改为多选
  2010. datas.shopLable = this.labels.toString();
  2011. datas.bannedFlag = this.bannedFlag;
  2012. // datas.reservation0penFlag='1'
  2013. if (this.titles == "添加") {
  2014. var url = "admin/goods/insertGoodsShop";
  2015. }
  2016. if (this.titles == "修改") {
  2017. var url = "admin/goods/updateGoodsShop";
  2018. datas.shopId = this.shopId;
  2019. }
  2020. console.log(datas, "jjkkk");
  2021. this.$http({
  2022. url: this.$http.adornUrl(url),
  2023. method: "post",
  2024. data: this.$http.adornData(datas)
  2025. }).then(({ data }) => {
  2026. if (data.code == 0) {
  2027. this.dialogFormVisible = false;
  2028. this.$message({
  2029. message: "操作成功",
  2030. type: "success",
  2031. duration: 1500,
  2032. onClose: () => {
  2033. this.dataSelect();
  2034. }
  2035. });
  2036. } else {
  2037. this.$message({
  2038. message: data.msg,
  2039. type: "warning",
  2040. duration: 1500,
  2041. onClose: () => {}
  2042. });
  2043. }
  2044. });
  2045. },
  2046. // 修改弹框
  2047. updates(index, rows) {
  2048. console.log(rows, "dfsf");
  2049. this.titles = "修改";
  2050. this.shopId = rows.shopId;
  2051. this.shopName = rows.shopName;
  2052. this.mchId = rows.mchId;
  2053. if (rows.shopNotice) {
  2054. this.shopNotice = rows.shopNotice;
  2055. } else {
  2056. this.shopNotice = "";
  2057. }
  2058. if (rows.shopBanner) {
  2059. this.dialogImageUrl = rows.shopBanner;
  2060. this.img = rows.shopBanner;
  2061. }
  2062. if (rows.shopLable) {
  2063. this.labels = rows.shopLable.split(",");
  2064. }
  2065. this.openTime = rows.businessHours;
  2066. this.closeTime = rows.lockHours;
  2067. this.detailedAddress = rows.detailedAddress;
  2068. this.shopLng = rows.shopLng;
  2069. this.shopLat = rows.shopLat;
  2070. this.longitude = rows.shopLng; //维度
  2071. this.latitude = rows.shopLat; //经度
  2072. this.shopCover = rows.shopCover;
  2073. this.city = rows.city;
  2074. this.province = rows.province;
  2075. this.district = rows.district;
  2076. // this.shopType = rows.shopTypeId;
  2077. if (rows.shopTypeId) {
  2078. this.shopType = rows.shopTypeId.split(",").map(i => {
  2079. return Number(i);
  2080. }); // 店铺类型改为多选
  2081. }
  2082. this.bannedFlag = rows.bannedFlag;
  2083. if (rows.errandMoney) {
  2084. this.errandMoney = rows.errandMoney;
  2085. } else {
  2086. this.errandMoney = 0;
  2087. }
  2088. if (rows.exemptMinMoney) {
  2089. this.exemptMinMoney = rows.exemptMinMoney;
  2090. } else {
  2091. this.exemptMinMoney = 0;
  2092. }
  2093. this.minimumDelivery = rows.minimumDelivery;
  2094. this.shopPhone = rows.phone;
  2095. this.shopUserId = rows.userId;
  2096. if (rows.facility) {
  2097. this.facility = rows.facility;
  2098. }
  2099. console.log(rows, "mmm");
  2100. this.snCode = rows.snCode;
  2101. this.value = rows.value;
  2102. if (rows.exemptErrandFlag) {
  2103. this.exemptErrandFlag = rows.exemptErrandFlag;
  2104. }
  2105. if (rows.enableFullReductionFlag != null) {
  2106. this.enableFullReductionFlag = rows.enableFullReductionFlag;
  2107. console.log(
  2108. "rows.enableFullReductionFlag",
  2109. rows.enableFullReductionFlag
  2110. );
  2111. } else {
  2112. this.enableFullReductionFlag = 1;
  2113. }
  2114. if (rows.autoSendOrder != null) {
  2115. this.autoSendOrder = rows.autoSendOrder;
  2116. console.log("rows.autoSendOrder", rows.autoSendOrder);
  2117. } else {
  2118. this.autoSendOrder = 1;
  2119. }
  2120. if (rows.autoAcceptOrder != null) {
  2121. this.autoAcceptOrder = rows.autoAcceptOrder;
  2122. console.log("rows.autoAcceptOrder", rows.autoAcceptOrder);
  2123. } else {
  2124. this.autoAcceptOrder = 1;
  2125. }
  2126. if (rows.reservationOpenFlag != null) {
  2127. this.reservationOpenFlag = rows.reservationOpenFlag;
  2128. console.log("rows.reservationOpenFlag", rows.reservationOpenFlag);
  2129. } else {
  2130. this.reservationOpenFlag = 1;
  2131. }
  2132. if (rows.sort != null) {
  2133. this.sort = rows.sort;
  2134. } else {
  2135. this.sort = 1;
  2136. }
  2137. // if(rows.exemptErrandFlag==1){
  2138. // this.exemptMinMoney = 0
  2139. // }
  2140. this.putawayFlag = rows.putawayFlag;
  2141. this.distributionDistance = rows.distributionDistance;
  2142. this.storeAddress = [];
  2143. this.storeAddre = this.province + "/" + this.city + "/" + this.district;
  2144. // console.log(this.province + '/' + this.city + '/' + this.district)
  2145. this.getMyLocation();
  2146. this.dialogFormVisible = true;
  2147. },
  2148. // 查看二维码
  2149. erweima(row) {
  2150. console.log("row.shopId", row.shopId);
  2151. this.dialogFormVisible2 = true;
  2152. this.erweimaImg = this.$http.adornUrl(
  2153. "invite/shopQr?shopId=" + row.shopId
  2154. );
  2155. },
  2156. chakan() {
  2157. window.open(this.erweimaImg, "_blank");
  2158. },
  2159. // 删除分类
  2160. deletes(row) {
  2161. // if (row.children == null || row.children.length == 0) {
  2162. this.$confirm(`确定删除此条信息?删除后将无法恢复`, "提示", {
  2163. confirmButtonText: "确定",
  2164. cancelButtonText: "取消",
  2165. type: "warning"
  2166. })
  2167. .then(() => {
  2168. this.$http({
  2169. url: this.$http.adornUrl("admin/goods/deleteGoodsShop"),
  2170. method: "get",
  2171. params: this.$http.adornParams({
  2172. id: row.shopId
  2173. })
  2174. }).then(({ data }) => {
  2175. this.$message({
  2176. message: "删除成功",
  2177. type: "success",
  2178. duration: 1500,
  2179. onClose: () => {
  2180. this.dataSelect();
  2181. }
  2182. });
  2183. });
  2184. })
  2185. .catch(() => {});
  2186. // } else {
  2187. // this.$message({
  2188. // message: '请先删除',
  2189. // type: 'error',
  2190. // duration: 1500,
  2191. // })
  2192. // return
  2193. // }
  2194. },
  2195. // 打印配置
  2196. printSet(row) {
  2197. // console.log(row,'打印');
  2198. this.$router.push({
  2199. path: "/shopPrintSet",
  2200. query: {
  2201. shopId: row.shopId
  2202. }
  2203. });
  2204. },
  2205. // 封禁
  2206. fengjin(row) {
  2207. if (row.bannedFlag == 1) {
  2208. var bannedFlag = 0;
  2209. var texts = "确定要解封此商铺吗?";
  2210. } else {
  2211. var bannedFlag = 1;
  2212. var texts = "确定要封禁此商铺吗?";
  2213. }
  2214. this.$confirm(texts, "提示", {
  2215. confirmButtonText: "确定",
  2216. cancelButtonText: "取消",
  2217. type: "warning"
  2218. })
  2219. .then(() => {
  2220. this.$http({
  2221. url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
  2222. method: "post",
  2223. data: this.$http.adornData({
  2224. shopId: row.shopId,
  2225. bannedFlag: bannedFlag
  2226. })
  2227. }).then(({ data }) => {
  2228. this.$message({
  2229. message: "操作成功",
  2230. type: "success",
  2231. duration: 1500,
  2232. onClose: () => {
  2233. this.dataSelect();
  2234. }
  2235. });
  2236. });
  2237. })
  2238. .catch(() => {});
  2239. },
  2240. //查看用户详情
  2241. goUserInfo(userId) {
  2242. if (userId) {
  2243. this.$router.push({
  2244. path: "/userDetail",
  2245. query: {
  2246. userId
  2247. }
  2248. });
  2249. }
  2250. },
  2251. // 商品列表
  2252. shopsListAdmin(row) {
  2253. this.$router.push({
  2254. path: "/shopsListAdmin",
  2255. query: {
  2256. shopId: row.shopId
  2257. }
  2258. });
  2259. },
  2260. // 订单列表
  2261. shopsListOrder(row) {
  2262. this.$router.push({
  2263. path: "/shopsOrder",
  2264. query: {
  2265. shopId: row.shopId
  2266. }
  2267. });
  2268. },
  2269. // 收入统计
  2270. shopsListSr(row) {
  2271. this.$router.push({
  2272. path: "/shopDatas",
  2273. query: {
  2274. shopId: row.shopId
  2275. }
  2276. });
  2277. },
  2278. // 保证金明细
  2279. shopsListBzj(row) {
  2280. this.$router.push({
  2281. path: "/bondList",
  2282. query: {
  2283. shopId: row.shopId
  2284. }
  2285. });
  2286. },
  2287. // 评价明细
  2288. shopsListPJ(row) {
  2289. this.$router.push({
  2290. path: "/pingjiaList",
  2291. query: {
  2292. shopId: row.shopId
  2293. }
  2294. });
  2295. },
  2296. // 商铺钱包
  2297. shopsListQb(row) {
  2298. this.$router.push({
  2299. path: "/shopWallet",
  2300. query: {
  2301. shopId: row.shopId
  2302. }
  2303. });
  2304. },
  2305. // 优惠券管理
  2306. shopsListYhq(row) {
  2307. this.$router.push({
  2308. path: "/couponShop",
  2309. query: {
  2310. shopId: row.shopId
  2311. }
  2312. });
  2313. },
  2314. // 获取商户数据
  2315. dataSelect() {
  2316. this.tableDataLoading = true;
  2317. this.$http({
  2318. url: this.$http.adornUrl("admin/goods/selectAllShop"),
  2319. method: "get",
  2320. params: this.$http.adornParams({
  2321. page: this.page,
  2322. limit: this.limit,
  2323. shopName: this.shopName1,
  2324. region: this.region,
  2325. isActivity: this.isActivity,
  2326. vipPromotion:this.vipPromotion
  2327. })
  2328. }).then(({ data }) => {
  2329. let canshu = {
  2330. page: this.page,
  2331. limit: this.limit,
  2332. shopName1: this.shopName1,
  2333. region: this.region,
  2334. isActivity: this.isActivity
  2335. };
  2336. sessionStorage.setItem("shopsList", JSON.stringify(canshu));
  2337. this.tableDataLoading = false;
  2338. for (var i in data.data.list) {
  2339. if (data.data.list[i].shopBanner) {
  2340. data.data.list[i].shopBanner = data.data.list[i].shopBanner.split(
  2341. ","
  2342. );
  2343. }
  2344. data.data.list[i].isConceal == 1 ? 1 : 0;
  2345. }
  2346. let returnData = data.data;
  2347. this.typeDatas = returnData;
  2348. console.log(this.typeDatas, "ll");
  2349. });
  2350. },
  2351. //定位获得当前位置信息
  2352. getMyLocation() {
  2353. var geolocation = new qq.maps.Geolocation(
  2354. "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75",
  2355. "来点小收入"
  2356. );
  2357. geolocation.getIpLocation(this.showPosition, this.showErr);
  2358. // geolocation.getLocation(this.showPosition, this.showErr);//或者用getLocation精确度比较高
  2359. },
  2360. showPosition(position) {
  2361. console.log(position);
  2362. // this.latitude = position.lat;
  2363. // this.longitude = position.lng;
  2364. // this.city = position.city;
  2365. this.setMap();
  2366. },
  2367. showErr(e) {
  2368. console.log("定位失败", e);
  2369. this.getMyLocation(); //定位失败再请求定位,测试使用
  2370. },
  2371. //位置信息在地图上展示
  2372. setMap() {
  2373. //步骤:定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
  2374. //设置地图中心点
  2375. var myLatlng = new qq.maps.LatLng(this.latitude, this.longitude);
  2376. //定义工厂模式函数
  2377. var myOptions = {
  2378. zoom: 13, //设置地图缩放级别
  2379. center: myLatlng, //设置中心点样式
  2380. mapTypeId: qq.maps.MapTypeId.ROADMAP //设置地图样式详情参见MapType
  2381. };
  2382. // //获取dom元素添加地图信息
  2383. var map = new qq.maps.Map(
  2384. document.getElementById("container1"),
  2385. myOptions
  2386. );
  2387. //给地图添加点击事件
  2388. //给定位的位置添加图片标注
  2389. var marker = new qq.maps.Marker({
  2390. position: myLatlng,
  2391. map: map
  2392. });
  2393. // `````````````
  2394. var that = this;
  2395. if (that.longitude == "") {
  2396. var center = new qq.maps.LatLng(34.34281541842994, 108.93970884382725);
  2397. } else {
  2398. var center = new qq.maps.LatLng(that.latitude, that.longitude);
  2399. }
  2400. var map = new qq.maps.Map(document.getElementById("container1"), {
  2401. center: center,
  2402. zoom: 13
  2403. });
  2404. var marker = new qq.maps.Marker({
  2405. position: center,
  2406. map: map
  2407. });
  2408. var latlngBounds = new qq.maps.LatLngBounds();
  2409. qq.maps.event.addListener(map, "click", function(event) {
  2410. console.log(event, qq.maps);
  2411. that.longitude = event.latLng.getLng(); // 经度
  2412. that.latitude = event.latLng.getLat(); // 纬度
  2413. jsonp(
  2414. "https://apis.map.qq.com/ws/geocoder/v1/?location=" +
  2415. event.latLng.getLat() +
  2416. "," +
  2417. event.latLng.getLng() +
  2418. "&key=ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75&get_poi=1&output=jsonp",
  2419. {
  2420. myCustomUrlParam: "veryNice"
  2421. }
  2422. )
  2423. .then(response => {
  2424. console.log(
  2425. "response",
  2426. response,
  2427. response.result.formatted_addresses.recommend
  2428. );
  2429. that.detailedAddress =
  2430. response.result.formatted_addresses.recommend;
  2431. })
  2432. .catch(error => {
  2433. // handle error
  2434. })
  2435. .then(() => {
  2436. // always executed
  2437. });
  2438. if (markersArray) {
  2439. for (let i in markersArray) {
  2440. markersArray[i].setMap(null);
  2441. }
  2442. }
  2443. var marker = new qq.maps.Marker({
  2444. map: map,
  2445. position: event.latLng
  2446. });
  2447. markersArray.push(marker);
  2448. });
  2449. geocoder = new qq.maps.Geocoder({
  2450. complete: function(result) {
  2451. console.log(result);
  2452. that.longitude = result.detail.location.lng;
  2453. that.latitude = result.detail.location.lat;
  2454. map.setCenter(result.detail.location);
  2455. var marker = new qq.maps.Marker({
  2456. map: map,
  2457. position: result.detail.location
  2458. });
  2459. markersArray.push(marker);
  2460. }
  2461. });
  2462. },
  2463. // 地图定位
  2464. select() {
  2465. console.log(this.detailedAddress);
  2466. // this.address = this.province+ this.city+this.district+this.address
  2467. var addr =
  2468. this.province + this.city + this.district + this.detailedAddress;
  2469. let that = this;
  2470. jsonp(
  2471. "https://apis.map.qq.com/ws/geocoder/v1/?address==" +
  2472. addr +
  2473. "&key=ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75&get_poi=1&output=jsonp",
  2474. {
  2475. myCustomUrlParam: "veryNice"
  2476. }
  2477. )
  2478. .then(response => {
  2479. // handle success
  2480. console.log("response", response);
  2481. that.longitude = response.result.location.lng; // 经度
  2482. that.latitude = response.result.location.lat; // 纬度
  2483. // that.address = response.result.title
  2484. that.setMap();
  2485. })
  2486. .catch(error => {
  2487. // handle error
  2488. })
  2489. .then(() => {
  2490. // always executed
  2491. });
  2492. },
  2493. phoneSelect() {
  2494. this.select();
  2495. },
  2496. onprogress1(event, file, fileList) {
  2497. console.log("详情图上传进度", parseInt(event.percent));
  2498. this.percentage1 = parseInt(event.percent);
  2499. },
  2500. beforeAvatarUpload(file) {
  2501. return this.$processImage(this, file, false);
  2502. },
  2503. // 封面图
  2504. handleAvatarSuccess1(file, fileList) {
  2505. this.shopCover = file.data;
  2506. },
  2507. // 轮播图片上传
  2508. handleRemove(file) {
  2509. console.log(file, this.img);
  2510. this.img.push(file.data);
  2511. },
  2512. handleDownload(file) {
  2513. console.log(file, this.img);
  2514. },
  2515. // 删除轮播图
  2516. dels(index) {
  2517. this.img.splice(index, 1);
  2518. console.log(this.img);
  2519. },
  2520. shopSelect() {
  2521. this.page = 1;
  2522. this.dataSelect();
  2523. },
  2524. cleans2(state) {
  2525. this.page = 1;
  2526. this.shopName1 = "";
  2527. this.region = "";
  2528. this.isActivity = "";
  2529. this.vipPromotion="";
  2530. this.dataSelect();
  2531. },
  2532. // 获取分类数据
  2533. dataSelect1() {
  2534. this.tableDataLoading = true;
  2535. this.$http({
  2536. url: this.$http.adornUrl("admin/shoptype/selectShopTypeList"),
  2537. method: "get",
  2538. params: this.$http.adornParams({
  2539. page: this.page,
  2540. limit: this.limit
  2541. })
  2542. }).then(({ data }) => {
  2543. this.tableDataLoading = false;
  2544. let returnData = data.data;
  2545. this.typeDatas1 = returnData;
  2546. });
  2547. },
  2548. // 获取分类数据不带分页
  2549. dataSelect2() {
  2550. this.tableDataLoading = true;
  2551. this.$http({
  2552. url: this.$http.adornUrl("admin/shoptype/selectShopTypeList"),
  2553. method: "get",
  2554. params: this.$http.adornParams({})
  2555. }).then(({ data }) => {
  2556. this.tableDataLoading = false;
  2557. let returnData = data.data;
  2558. this.typeDatas2 = returnData;
  2559. console.log(this.typeDatas2, "店铺数据");
  2560. });
  2561. },
  2562. // 添加类型
  2563. addNotice1(row) {
  2564. if (row != 1) {
  2565. this.titles1 = "修改类型";
  2566. this.shopTypId = row.id;
  2567. this.shopTypeName = row.shopTypeName;
  2568. } else {
  2569. this.titles1 = "添加类型";
  2570. this.shopTypId = "";
  2571. this.shopTypeName = "";
  2572. }
  2573. this.dialogFormVisible3 = true;
  2574. },
  2575. // 确认添加
  2576. releasNoticeTo1() {
  2577. if (this.shopTypeName == "") {
  2578. this.$notify({
  2579. title: "提示",
  2580. duration: 1800,
  2581. message: "请输入类型名称",
  2582. type: "warning"
  2583. });
  2584. return;
  2585. }
  2586. if (this.titles1 == "添加类型") {
  2587. var url = "admin/shoptype/insertShopType";
  2588. }
  2589. if (this.titles1 == "修改类型") {
  2590. var url = "admin/shoptype/upateShopType";
  2591. }
  2592. this.$http({
  2593. url: this.$http.adornUrl(url),
  2594. method: "post",
  2595. data: this.$http.adornData({
  2596. id: this.shopTypId,
  2597. shopTypeName: this.shopTypeName
  2598. })
  2599. }).then(({ data }) => {
  2600. if (data.code == 0) {
  2601. this.dialogFormVisible3 = false;
  2602. this.$message({
  2603. message: "操作成功",
  2604. type: "success",
  2605. duration: 1500,
  2606. onClose: () => {
  2607. this.dataSelect1();
  2608. }
  2609. });
  2610. } else {
  2611. this.$message({
  2612. message: data.msg,
  2613. type: "warning",
  2614. duration: 1500,
  2615. onClose: () => {}
  2616. });
  2617. }
  2618. });
  2619. },
  2620. // 删除类型
  2621. deletes1(row) {
  2622. this.$confirm(`确定删除此条信息?删除后将无法恢复`, "提示", {
  2623. confirmButtonText: "确定",
  2624. cancelButtonText: "取消",
  2625. type: "warning"
  2626. })
  2627. .then(() => {
  2628. this.$http({
  2629. url: this.$http.adornUrl("admin/shoptype/deleteShopType"),
  2630. method: "post",
  2631. params: this.$http.adornParams({
  2632. shopTypeId: row.id
  2633. })
  2634. }).then(({ data }) => {
  2635. if (data.code == 0) {
  2636. this.$message({
  2637. message: "操作成功",
  2638. type: "success",
  2639. duration: 1500,
  2640. onClose: () => {
  2641. this.dataSelect1();
  2642. }
  2643. });
  2644. } else {
  2645. this.$message({
  2646. message: data.msg,
  2647. type: "warning",
  2648. duration: 1500,
  2649. onClose: () => {}
  2650. });
  2651. }
  2652. });
  2653. })
  2654. .catch(() => {});
  2655. },
  2656. // 添加标签
  2657. btnTj() {
  2658. if (this.bq == "" || this.bq == " ") {
  2659. this.$notify({
  2660. title: "提示",
  2661. duration: 1800,
  2662. message: "请输入标签名",
  2663. type: "warning"
  2664. });
  2665. return;
  2666. } else {
  2667. console.log("this.bq", this.bq);
  2668. this.labels.push(this.bq);
  2669. this.bq = "";
  2670. }
  2671. },
  2672. // 删除标签
  2673. dels1(index) {
  2674. this.labels.splice(index, 1);
  2675. console.log(this.labels);
  2676. },
  2677. // 获取省市区
  2678. handleChange55(value) {
  2679. value = this.$refs["cascaderAddr"].currentLabels;
  2680. this.province = value[0];
  2681. this.city = value[1];
  2682. this.district = value[2];
  2683. if (this.city == "市辖区") {
  2684. this.city = this.province;
  2685. }
  2686. console.log(this.$refs["cascaderAddr"].currentLabels);
  2687. },
  2688. shopTypeSelect(val) {
  2689. console.log(val);
  2690. },
  2691. // 修改保证金
  2692. rechargenone(row, index) {
  2693. this.shopId = row.shopId;
  2694. if (index == 2) {
  2695. this.type = "";
  2696. this.money = 0;
  2697. this.tablemoney = row.cashDeposit;
  2698. this.dialogFormVisible4 = true;
  2699. }
  2700. if (index == 1) {
  2701. this.bannedFlag = row.bannedFlag;
  2702. this.money = row.errandMoney;
  2703. this.dialogFormVisible6 = true;
  2704. }
  2705. if (index == 3) {
  2706. this.bannedFlag = row.bannedFlag;
  2707. this.money = row.shopRate;
  2708. this.dialogFormVisible7 = true;
  2709. }
  2710. },
  2711. StairNoticeTo2() {
  2712. if (this.money == "") {
  2713. this.$notify({
  2714. title: "提示",
  2715. duration: 1800,
  2716. message: "请输入金额",
  2717. type: "warning"
  2718. });
  2719. return;
  2720. }
  2721. this.money = Number(this.money);
  2722. this.$http({
  2723. url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
  2724. method: "post",
  2725. data: this.$http.adornData({
  2726. shopId: this.shopId,
  2727. errandMoney: this.money,
  2728. bannedFlag: this.bannedFlag
  2729. })
  2730. }).then(({ data }) => {
  2731. if (data.code == 0) {
  2732. this.$message({
  2733. message: "添加金额成功",
  2734. type: "success",
  2735. duration: 1500,
  2736. onClose: () => {
  2737. this.money = "";
  2738. this.dataSelect();
  2739. }
  2740. });
  2741. this.dialogFormVisible6 = false;
  2742. } else {
  2743. this.$message.error(data.msg);
  2744. }
  2745. });
  2746. },
  2747. StairNoticeTo1() {
  2748. let userId = this.$route.query.userId;
  2749. if (this.type == "") {
  2750. this.$notify({
  2751. title: "提示",
  2752. duration: 1800,
  2753. message: "请选择修改类型",
  2754. type: "warning"
  2755. });
  2756. return;
  2757. }
  2758. if (this.money == "") {
  2759. this.$notify({
  2760. title: "提示",
  2761. duration: 1800,
  2762. message: "请输入金额",
  2763. type: "warning"
  2764. });
  2765. return;
  2766. }
  2767. if (this.type == 2) {
  2768. if (this.money > this.tablemoney) {
  2769. this.$notify({
  2770. title: "提示",
  2771. duration: 1800,
  2772. message: "最高金额为" + this.tablemoney,
  2773. type: "warning"
  2774. });
  2775. return;
  2776. }
  2777. }
  2778. this.$http({
  2779. // url: this.$http.adornUrl(
  2780. // `admin/shop/updateShopCashDeposit?shopId=` +
  2781. // this.shopId +
  2782. // "&money=" +
  2783. // this.money +
  2784. // "&type=" +
  2785. // this.type
  2786. // ),
  2787. url: this.$http.adornUrl(
  2788. `admin/shop/updateShopCashDeposit`
  2789. ),
  2790. method: "get",
  2791. data: this.$http.adornData({}),
  2792. params: this.$http.adornParams({
  2793. shopId: this.shopId,
  2794. money: this.money,
  2795. type: this.type
  2796. })
  2797. }).then(({ data }) => {
  2798. if (data.code == 0) {
  2799. this.$message({
  2800. message: "添加金额成功",
  2801. type: "success",
  2802. duration: 1500,
  2803. onClose: () => {
  2804. this.money = "";
  2805. this.dataSelect();
  2806. }
  2807. });
  2808. this.dialogFormVisible4 = false;
  2809. } else {
  2810. this.$message.error(data.msg);
  2811. }
  2812. });
  2813. },
  2814. // 修改佣金比例
  2815. StairNoticeToYj() {
  2816. if (this.money == "") {
  2817. this.$notify({
  2818. title: "提示",
  2819. duration: 1800,
  2820. message: "请输入佣金比例",
  2821. type: "warning"
  2822. });
  2823. return;
  2824. }
  2825. this.$http({
  2826. url: this.$http.adornUrl("admin/goodsShop/updateGoodsShopRate"),
  2827. method: "get",
  2828. params: this.$http.adornParams({
  2829. shopId: this.shopId,
  2830. shopRate: this.money
  2831. })
  2832. }).then(({ data }) => {
  2833. if (data.code == 0) {
  2834. this.$message({
  2835. message: "修改成功",
  2836. type: "success",
  2837. duration: 1500,
  2838. onClose: () => {
  2839. this.money = "";
  2840. this.dataSelect();
  2841. }
  2842. });
  2843. this.dialogFormVisible7 = false;
  2844. } else {
  2845. this.$message.error(data.msg);
  2846. }
  2847. });
  2848. },
  2849. updateMima(row) {
  2850. console.log("修改密码", row);
  2851. this.init(row.adminUserId);
  2852. this.dialogFormVisible5 = true;
  2853. this.newPassword = "";
  2854. this.querenPassword = "";
  2855. },
  2856. init(id) {
  2857. this.$http({
  2858. url: this.$http.adornUrl(`sys/user/info/${id}`),
  2859. method: "get",
  2860. params: this.$http.adornParams()
  2861. }).then(({ data }) => {
  2862. console.log(data);
  2863. if (data && data.code === 0) {
  2864. this.dataForm.userName = data.user.username;
  2865. this.dataForm.salt = data.user.salt;
  2866. this.dataForm.email = data.user.email;
  2867. this.dataForm.mobile = data.user.mobile;
  2868. this.dataForm.roleIdList = data.user.roleIdList;
  2869. this.dataForm.shopIdList = data.user.shopIdList;
  2870. this.dataForm.status = data.user.status;
  2871. this.dataForm.id = data.user.userId;
  2872. }
  2873. });
  2874. },
  2875. // 确认修改
  2876. updatePassword() {
  2877. console.log({
  2878. userId: this.dataForm.id,
  2879. // 'username': this.dataForm.userName,
  2880. password: this.dataForm.password,
  2881. salt: this.dataForm.salt
  2882. });
  2883. if (this.newPassword == "" || this.querenPassword == "") {
  2884. this.$notify({
  2885. title: "提示",
  2886. duration: 1800,
  2887. message: "新密码或确认密码不能为空!",
  2888. type: "warning"
  2889. });
  2890. return;
  2891. }
  2892. if (this.newPassword != this.querenPassword) {
  2893. this.$notify({
  2894. title: "提示",
  2895. duration: 1800,
  2896. message: "两次密码输入不一致!",
  2897. type: "warning"
  2898. });
  2899. return;
  2900. }
  2901. this.dataForm.password = this.newPassword;
  2902. this.$http({
  2903. url: this.$http.adornUrl(`/sys/user/updateAdmin`),
  2904. method: "post",
  2905. data: this.$http.adornData({
  2906. userId: this.dataForm.id,
  2907. // 'username': this.dataForm.userName,
  2908. password: this.dataForm.password,
  2909. salt: this.dataForm.salt
  2910. // 'email': this.dataForm.email,
  2911. // 'mobile': this.dataForm.mobile,
  2912. // 'status': this.dataForm.status,
  2913. // 'roleIdList': this.dataForm.roleIdList,
  2914. // 'shopIdList': this.dataForm.shopIdList
  2915. })
  2916. }).then(({ data }) => {
  2917. console.log(data);
  2918. if (data && data.code === 0) {
  2919. this.$message({
  2920. message: "操作成功",
  2921. type: "success",
  2922. duration: 1500,
  2923. onClose: () => {
  2924. this.dialogFormVisible5 = false;
  2925. }
  2926. });
  2927. } else {
  2928. this.$message.error(data.msg);
  2929. }
  2930. });
  2931. },
  2932. closes2(row) {
  2933. this.shopUserId = row.userId;
  2934. if (row.nickName) {
  2935. this.shopUserName = row.nickName;
  2936. } else {
  2937. this.shopUserName = row.phone;
  2938. }
  2939. this.dialogFormVisible11 = false;
  2940. },
  2941. // 活动弹框
  2942. canjiaHd(row) {
  2943. this.shopId = row.shopId;
  2944. this.activityId = row.activityId;
  2945. this.dialogFormVisibleHd = true;
  2946. this.shopSelect2();
  2947. },
  2948. // 活动列表中该商家已参与的活动
  2949. shopSelect2() {
  2950. this.$http({
  2951. url: this.$http.adornUrl(
  2952. `admin/activity-shop/shop-activity-list/${this.shopId}`
  2953. ),
  2954. method: "get",
  2955. params: this.$http.adornParams({
  2956. // 'shopId': this.shopId,
  2957. })
  2958. }).then(({ data }) => {
  2959. let returnData = data.data;
  2960. this.huodongSelect(returnData);
  2961. });
  2962. },
  2963. // 获取活动列表
  2964. huodongSelect(returnData) {
  2965. this.tableDataLoadingHd = true;
  2966. this.$http({
  2967. url: this.$http.adornUrl("admin/activity/page"),
  2968. method: "get",
  2969. params: this.$http.adornParams({
  2970. page: this.pageH,
  2971. limit: this.limitH,
  2972. title: this.integralName,
  2973. isEnable: ""
  2974. })
  2975. }).then(({ data }) => {
  2976. let length = data.data.totalCount;
  2977. this.$http({
  2978. url: this.$http.adornUrl("admin/activity/page"),
  2979. method: "get",
  2980. params: this.$http.adornParams({
  2981. page: this.pageH,
  2982. limit: length,
  2983. title: this.integralName,
  2984. isEnable: ""
  2985. })
  2986. }).then(({ data }) => {
  2987. this.tableDataLoadingHd = false;
  2988. let returnData2 = data.data;
  2989. const newList = returnData2.list.map(item => {
  2990. return { ...item, quantity: 0 };
  2991. return { ...item, activityShopId: 0 };
  2992. });
  2993. var arr = [];
  2994. for (var j in returnData) {
  2995. newList.forEach(item => {
  2996. if (item.id === returnData[j].activityId) {
  2997. // 'status'为属性名,'非活动'为修改后的内容
  2998. item.quantity = 1;
  2999. item.activityShopId = returnData[j].activityShopId;
  3000. }
  3001. });
  3002. }
  3003. arr = newList;
  3004. this.huodongData = arr;
  3005. });
  3006. });
  3007. },
  3008. selectHd() {
  3009. this.pageH = 1;
  3010. this.shopSelect2();
  3011. },
  3012. cleansHs() {
  3013. this.pageH = 1;
  3014. this.integralName = "";
  3015. this.shopSelect2();
  3016. },
  3017. select2() {
  3018. this.page1 = 1;
  3019. this.getGoods11();
  3020. },
  3021. // 已选择商品
  3022. yiselect(row) {
  3023. console.log(this.shopId);
  3024. this.dialogFormVisibleshangpYi = true;
  3025. this.selectShang();
  3026. },
  3027. handleSizeChangeShop(val) {
  3028. this.limit1 = val;
  3029. this.getGoods11();
  3030. },
  3031. handleCurrentChangeShop(val) {
  3032. this.page1 = val;
  3033. this.getGoods11();
  3034. },
  3035. handleSizeChangeShop2(val) {
  3036. this.limit2 = val;
  3037. this.selectShang();
  3038. },
  3039. handleCurrentChangeShop2(val) {
  3040. this.page2 = val;
  3041. this.selectShang();
  3042. },
  3043. //添加商品
  3044. tianjiahuo() {
  3045. if (this.selectedItems.length <= 0) {
  3046. this.$message("请勾选需要添加的商品");
  3047. return;
  3048. }
  3049. var shangIds = [];
  3050. this.selectedItems.forEach(item => {
  3051. shangIds.push(item.goodsId);
  3052. });
  3053. this.$http({
  3054. url: this.$http.adornUrl("/admin/activity-goods"),
  3055. method: "post",
  3056. data: this.$http.adornData({
  3057. activityShopId: this.actShopid,
  3058. goodsIds: shangIds
  3059. })
  3060. }).then(({ data }) => {
  3061. if (data.code == 0) {
  3062. this.$message({
  3063. message: "操作成功",
  3064. type: "success",
  3065. duration: 1500,
  3066. onClose: () => {
  3067. this.dialogFormVisibleshangp = false;
  3068. this.selectedItems = [];
  3069. this.integralName = "";
  3070. this.integralName2 = "";
  3071. this.shopSelect();
  3072. }
  3073. });
  3074. } else {
  3075. this.$message({
  3076. message: data.msg,
  3077. type: "warning",
  3078. duration: 1500,
  3079. onClose: () => {}
  3080. });
  3081. }
  3082. });
  3083. },
  3084. //选中table已有数据
  3085. selectedPreExisting(rows) {
  3086. if (rows.length > 0) {
  3087. //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
  3088. this.$nextTick(() => {
  3089. rows.forEach(row => {
  3090. //判断row是存在当前tableData
  3091. let selectedItem = this.shopData.list.find(
  3092. item => item.goodsId == row.goodsId
  3093. );
  3094. this.$refs.dataTable.toggleRowSelection(selectedItem);
  3095. });
  3096. });
  3097. } else {
  3098. this.$refs.dataTable.clearSelection();
  3099. }
  3100. },
  3101. //表格单选
  3102. selectdan(selection, row) {
  3103. //因为翻页之后,点选时selection会出现undefined,所以这里需要进行判断
  3104. //这里可以通过判断选择selection中有没有row,就可以判断出是增加还是删减
  3105. if (
  3106. selection &&
  3107. selection.find(item => item && item.goodsId == row.goodsId)
  3108. ) {
  3109. this.addRows([row]);
  3110. } else {
  3111. this.deleteRows([row]);
  3112. }
  3113. },
  3114. //表格全选
  3115. selectAll(selection) {
  3116. //判断是选中还是取消tableData
  3117. if (selection.length > 0) {
  3118. this.addRows(this.shopData.list);
  3119. } else {
  3120. this.deleteRows(this.shopData.list);
  3121. }
  3122. },
  3123. //添加选中
  3124. addRows(rows) {
  3125. rows.forEach(row => {
  3126. //过滤,当selectedItems有此条数据时,则直接返回,不执行添加
  3127. if (this.selectedItems.find(item => item.goodsId == row.goodsId)) {
  3128. return;
  3129. }
  3130. this.selectedItems.push(row);
  3131. });
  3132. },
  3133. //取消选中
  3134. deleteRows(rows) {
  3135. //当selectedItems为空数组时,不执行删除
  3136. if (this.selectedItems.length == 0) {
  3137. return;
  3138. }
  3139. rows.forEach(row => {
  3140. this.selectedItems = this.selectedItems.filter(
  3141. item => item.goodsId !== row.goodsId
  3142. );
  3143. });
  3144. },
  3145. //优惠商品弹框关闭
  3146. handleCancleshangp() {
  3147. this.integralName2 = "";
  3148. },
  3149. //活动列表弹框关闭
  3150. handleCancleHd() {
  3151. this.integralName = "";
  3152. },
  3153. //选择商品
  3154. selectshangpin(row) {
  3155. console.log(row);
  3156. this.dialogFormVisibleshangp = true;
  3157. this.actShopid = row.activityShopId;
  3158. this.getGoods11();
  3159. },
  3160. // 店铺已选择商品
  3161. selectShang() {
  3162. this.$http({
  3163. url: this.$http.adornUrl(`admin/activity-goods/${this.actShopid}`),
  3164. method: "get",
  3165. params: this.$http.adornParams({})
  3166. }).then(({ data }) => {
  3167. if (data.msg == "success") {
  3168. let returnData = data.data;
  3169. //商品列表
  3170. this.getGoods(returnData);
  3171. } else {
  3172. this.$message({
  3173. message: data.msg,
  3174. type: "warning",
  3175. duration: 1500,
  3176. onClose: () => {}
  3177. });
  3178. }
  3179. });
  3180. },
  3181. //所有商品
  3182. getGoods(returnData) {
  3183. this.$http({
  3184. url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
  3185. method: "get",
  3186. params: this.$http.adornParams({
  3187. page: this.page2,
  3188. limit: this.limit2,
  3189. goodsName: "",
  3190. shopId: this.shopId
  3191. })
  3192. }).then(({ data }) => {
  3193. if (data.msg == "success") {
  3194. this.suoshoplength = data.data.totalCount;
  3195. this.$http({
  3196. url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
  3197. method: "get",
  3198. params: this.$http.adornParams({
  3199. page: this.page2,
  3200. limit: this.suoshoplength,
  3201. goodsName: "",
  3202. shopId: this.shopId
  3203. })
  3204. }).then(({ data }) => {
  3205. if (data.msg == "success") {
  3206. let returnData2 = data.data;
  3207. const newList = returnData2.list;
  3208. var arr = [];
  3209. for (var j in returnData) {
  3210. newList.forEach(item => {
  3211. if (item.goodsId === returnData[j]) {
  3212. arr.push(item);
  3213. }
  3214. });
  3215. }
  3216. this.shopDataYi = arr;
  3217. this.shopTotal = this.shopDataYi.length;
  3218. } else {
  3219. this.$message({
  3220. message: data.msg,
  3221. type: "warning",
  3222. duration: 1500,
  3223. onClose: () => {}
  3224. });
  3225. }
  3226. });
  3227. } else {
  3228. this.$message({
  3229. message: data.msg,
  3230. type: "warning",
  3231. duration: 1500,
  3232. onClose: () => {}
  3233. });
  3234. }
  3235. });
  3236. },
  3237. //所有商品11
  3238. getGoods11() {
  3239. this.$http({
  3240. url: this.$http.adornUrl("admin/goodsShop/selectGoodsByShopId"),
  3241. method: "get",
  3242. params: this.$http.adornParams({
  3243. page: this.page1,
  3244. limit: this.limit1,
  3245. goodsName: this.integralName2,
  3246. shopId: this.shopId
  3247. })
  3248. }).then(({ data }) => {
  3249. if (data.msg == "success") {
  3250. this.shopData = data.data;
  3251. //randomKey是table数据改动时,刷新table的
  3252. this.randomKey = Math.random();
  3253. this.selectedPreExisting(this.selectedItems);
  3254. } else {
  3255. this.$message({
  3256. message: data.msg,
  3257. type: "warning",
  3258. duration: 1500,
  3259. onClose: () => {}
  3260. });
  3261. }
  3262. });
  3263. },
  3264. //选中table已有数据
  3265. selectedPreExisting(rows) {
  3266. if (rows.length > 0) {
  3267. //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
  3268. this.$nextTick(() => {
  3269. rows.forEach(row => {
  3270. //判断row是存在当前tableData
  3271. let selectedItem = this.shopData.list.find(
  3272. item => item.goodsId == row.goodsId
  3273. );
  3274. this.$refs.dataTable.toggleRowSelection(selectedItem);
  3275. });
  3276. });
  3277. } else {
  3278. this.$refs.dataTable.clearSelection();
  3279. }
  3280. },
  3281. // 确认参加活动
  3282. querenBtnHd(row) {
  3283. this.activityId = row.id;
  3284. this.getActivity(row.id);
  3285. },
  3286. //退出活动
  3287. quitHuo(row) {
  3288. this.$confirm(`确定退出该活动?`, "提示", {
  3289. confirmButtonText: "确定",
  3290. cancelButtonText: "取消",
  3291. type: "warning"
  3292. })
  3293. .then(() => {
  3294. this.$http({
  3295. url: this.$http.adornUrl("admin/activity-shop/quit"),
  3296. method: "put",
  3297. params: this.$http.adornParams({
  3298. shopId: this.shopId,
  3299. activityId: row.id
  3300. })
  3301. }).then(({ data }) => {
  3302. if (data.code == 0) {
  3303. this.$message({
  3304. message: "操作成功",
  3305. type: "success",
  3306. duration: 1500,
  3307. onClose: () => {
  3308. this.shopSelect2();
  3309. }
  3310. });
  3311. } else {
  3312. this.$message({
  3313. message: data.msg,
  3314. type: "warning",
  3315. duration: 1500,
  3316. onClose: () => {}
  3317. });
  3318. }
  3319. });
  3320. })
  3321. .catch(() => {});
  3322. },
  3323. //取消参与活动
  3324. quxiaoHuo() {
  3325. this.dialogFormcanyuhuo = false;
  3326. },
  3327. //参与活动
  3328. joinHuo() {
  3329. var shopid = [this.shopId];
  3330. if (this.limitType == "") {
  3331. this.$notify({
  3332. title: "提示",
  3333. duration: 1800,
  3334. message: "有限制时不能为空",
  3335. type: "warning"
  3336. });
  3337. return;
  3338. }
  3339. this.$http({
  3340. url: this.$http.adornUrl("admin/activity-shop/join"),
  3341. method: "post",
  3342. data: this.$http.adornData({
  3343. activityId: this.activityId,
  3344. limitType: this.limitType,
  3345. limitValue: this.limitNum,
  3346. shopIds: shopid,
  3347. suitType: this.suitType
  3348. })
  3349. }).then(({ data }) => {
  3350. if (data.code == 0) {
  3351. this.dialogFormcanyuhuo = false;
  3352. this.$message({
  3353. message: "操作成功",
  3354. type: "success",
  3355. duration: 1500,
  3356. onClose: () => {
  3357. this.shopSelect2();
  3358. // this.dataSelect()
  3359. }
  3360. });
  3361. } else {
  3362. this.$message({
  3363. message: data.msg,
  3364. type: "warning",
  3365. duration: 1500,
  3366. onClose: () => {}
  3367. });
  3368. }
  3369. });
  3370. },
  3371. //获取活动信息
  3372. getActivity(id) {
  3373. this.$http({
  3374. url: this.$http.adornUrl(`admin/activity/${id}`),
  3375. method: "get",
  3376. params: this.$http.adornParams({
  3377. // 'shopId': this.shopId,
  3378. })
  3379. }).then(({ data }) => {
  3380. if (data.msg == "success") {
  3381. let returnData = data.data;
  3382. this.huoList = returnData;
  3383. this.dialogFormcanyuhuo = true;
  3384. } else {
  3385. this.$message({
  3386. message: data.msg,
  3387. type: "warning",
  3388. duration: 1500,
  3389. onClose: () => {}
  3390. });
  3391. }
  3392. });
  3393. },
  3394. // 查看活动
  3395. looksHd(row) {
  3396. this.$http({
  3397. url: this.$http.adornUrl("admin/activityManage/getActivityInfo?=2"),
  3398. method: "get",
  3399. params: this.$http.adornParams({
  3400. activityId: row.activityId
  3401. })
  3402. }).then(({ data }) => {
  3403. let returnData = data.data;
  3404. this.xiangqingData = returnData;
  3405. });
  3406. this.dialogFormVisibleXq = true;
  3407. },
  3408. // 是否推荐活动商家
  3409. changeTj(row) {
  3410. console.log(row);
  3411. this.$http({
  3412. url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
  3413. method: "post",
  3414. data: this.$http.adornData({
  3415. isRecommend: row.isRecommend,
  3416. shopId: row.shopId,
  3417. isSupplier: row.isSupplier,
  3418. messageConfiguration: row.messageConfiguration
  3419. })
  3420. }).then(({ data }) => {
  3421. if (data.code == 0) {
  3422. this.dialogFormVisible1 = false;
  3423. this.$message({
  3424. message: "操作成功",
  3425. type: "success",
  3426. duration: 1500,
  3427. onClose: () => {
  3428. this.dataSelect();
  3429. }
  3430. });
  3431. } else {
  3432. this.$message({
  3433. message: data.msg,
  3434. type: "warning",
  3435. duration: 1500,
  3436. onClose: () => {
  3437. this.dataSelect();
  3438. }
  3439. });
  3440. }
  3441. });
  3442. },
  3443. // 是否为会员立减商家
  3444. changeLJ(row) {
  3445. console.log(row);
  3446. this.$http({
  3447. url: this.$http.adornUrl(`/admin/goodsShop/vip-promotion/${row.shopId}/${row.vipPromotion}`),
  3448. method: "put",
  3449. data: this.$http.adornData({})
  3450. }).then(({ data }) => {
  3451. console.log(data,"是否为会员立减商家");
  3452. if (data.code == 0) {
  3453. this.$message({
  3454. message: "操作成功",
  3455. type: "success",
  3456. duration: 1500,
  3457. onClose: () => {
  3458. this.dataSelect();
  3459. }
  3460. });
  3461. } else {
  3462. this.$message({
  3463. message: data.msg,
  3464. type: "warning",
  3465. duration: 1500,
  3466. onClose: () => {
  3467. this.dataSelect();
  3468. }
  3469. });
  3470. }
  3471. });
  3472. },
  3473. // 是否隐藏商家
  3474. isConcealChange(row) {
  3475. console.log(row);
  3476. this.$http({
  3477. url: this.$http.adornUrl("admin/goods/updateGoodsShop"),
  3478. method: "post",
  3479. data: this.$http.adornData({
  3480. isConceal: row.isConceal,
  3481. isRecommend: row.isRecommend,
  3482. shopId: row.shopId,
  3483. isSupplier: row.isSupplier,
  3484. messageConfiguration: row.messageConfiguration
  3485. })
  3486. }).then(({ data }) => {
  3487. if (data.code == 0) {
  3488. this.dialogFormVisible1 = false;
  3489. this.$message({
  3490. message: "操作成功",
  3491. type: "success",
  3492. duration: 1500,
  3493. onClose: () => {
  3494. this.dataSelect();
  3495. }
  3496. });
  3497. } else {
  3498. this.$message({
  3499. message: data.msg,
  3500. type: "warning",
  3501. duration: 1500,
  3502. onClose: () => {
  3503. this.dataSelect();
  3504. }
  3505. });
  3506. }
  3507. });
  3508. },
  3509. // 减免开关
  3510. onFlag() {
  3511. if (this.exemptErrandFlag == 1) {
  3512. this.exemptMinMoney = 0;
  3513. this.minimumDelivery = 0;
  3514. }
  3515. },
  3516. // 修改排序
  3517. paixuBtn(row) {
  3518. this.$http({
  3519. url: this.$http.adornUrl("admin/goodsShop/updateGoodsShopSort"),
  3520. method: "get",
  3521. // data: this.$http.adornData({
  3522. params: this.$http.adornParams({
  3523. sort: row.sort,
  3524. shopId: row.shopId
  3525. })
  3526. }).then(({ data }) => {
  3527. if (data.code == 0) {
  3528. this.$message({
  3529. message: "操作成功",
  3530. type: "success",
  3531. duration: 1500,
  3532. onClose: () => {
  3533. this.dataSelect();
  3534. }
  3535. });
  3536. } else {
  3537. this.$message({
  3538. message: data.msg,
  3539. type: "warning",
  3540. duration: 1500,
  3541. onClose: () => {
  3542. this.dataSelect();
  3543. }
  3544. });
  3545. }
  3546. });
  3547. }
  3548. },
  3549. mounted() {
  3550. this.token = Vue.cookie.get("token");
  3551. let flag = sessionStorage.getItem("shopsListFlag");
  3552. console.log(flag, "shopsListFlag");
  3553. if (flag == "true") {
  3554. let parmas = JSON.parse(sessionStorage.getItem("shopsList"));
  3555. this.page = parmas.page;
  3556. this.limit = parmas.limit;
  3557. this.shopName1 = parmas.shopName1;
  3558. this.region = parmas.region;
  3559. this.isActivity = parmas.isActivity;
  3560. } else {
  3561. this.page = 1;
  3562. this.limit = 10;
  3563. this.shopName1 = "";
  3564. this.region = "";
  3565. this.isActivity = "";
  3566. sessionStorage.removeItem("shopsList");
  3567. }
  3568. this.dataSelect();
  3569. this.dataSelect2();
  3570. },
  3571. beforeRouteEnter(to, from, next) {
  3572. if (
  3573. from.name == "shopsListAdmin" ||
  3574. from.name == "shopsOrder" ||
  3575. from.name == "shopDatas" ||
  3576. from.name == "bondList" ||
  3577. from.name == "couponShop" ||
  3578. from.name == "shopWallet" ||
  3579. from.name == "pingjiaList" ||
  3580. from.name == "shopPrintSet"
  3581. ) {
  3582. sessionStorage.setItem("shopsListFlag", true);
  3583. console.log("是通过修改页面跳转过来的");
  3584. } else {
  3585. sessionStorage.setItem("shopsListFlag", false);
  3586. console.log("直接进入页面");
  3587. }
  3588. next(vm => {});
  3589. }
  3590. };
  3591. </script>
  3592. <style>
  3593. .imgs {
  3594. position: relative;
  3595. border-radius: 6px;
  3596. width: 148px;
  3597. height: 148px;
  3598. margin-right: 10px;
  3599. display: inline-block;
  3600. }
  3601. .dels {
  3602. position: absolute;
  3603. top: 0;
  3604. left: 0;
  3605. display: none;
  3606. }
  3607. .dels .el-icon-delete {
  3608. line-height: 148px;
  3609. padding-left: 58px;
  3610. font-size: 25px;
  3611. color: #fff;
  3612. }
  3613. .imgs:hover .dels {
  3614. width: 100%;
  3615. height: 100%;
  3616. background: #000;
  3617. display: block;
  3618. opacity: 0.5;
  3619. }
  3620. .bqList {
  3621. padding: 4px 14px;
  3622. margin: 4px;
  3623. border: 1px solid #efefef;
  3624. font-size: 12px;
  3625. color: #999;
  3626. border-radius: 4px;
  3627. margin-right: 15px;
  3628. }
  3629. .delss {
  3630. display: none;
  3631. position: relative;
  3632. }
  3633. .delss .el-icon-delete {
  3634. position: absolute;
  3635. top: 0;
  3636. }
  3637. .bqList:hover .delss {
  3638. display: initial;
  3639. opacity: 0.5;
  3640. }
  3641. .tj {
  3642. padding: 6px !important;
  3643. margin: 4px;
  3644. font-size: 12px;
  3645. border: 1px solid #ccc;
  3646. border-radius: 4px;
  3647. }
  3648. .divs img {
  3649. width: 100%;
  3650. }
  3651. /* //参与活动 */
  3652. .canquxiao {
  3653. margin-top: 20px;
  3654. margin-left: 287px;
  3655. width: 76px;
  3656. height: 35px;
  3657. opacity: 1;
  3658. border-radius: 5px;
  3659. border: 1px solid rgba(0, 0, 0, 1);
  3660. font-size: 16px;
  3661. font-weight: 400;
  3662. line-height: 35px;
  3663. color: rgba(0, 0, 0, 1);
  3664. text-align: center;
  3665. }
  3666. .canqueding {
  3667. margin-top: -35px;
  3668. margin-left: 407px;
  3669. width: 76px;
  3670. height: 35px;
  3671. opacity: 1;
  3672. border-radius: 5px;
  3673. background: rgba(62, 142, 247, 1);
  3674. font-size: 16px;
  3675. font-weight: 400;
  3676. line-height: 35px;
  3677. color: rgba(255, 255, 255, 1);
  3678. text-align: center;
  3679. }
  3680. </style>