mission.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026
  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: 3px;">
  6. <span>状态:</span>
  7. <el-select
  8. v-model="status"
  9. style="width:150px;margin-left: 10px;"
  10. @change="animeDat2(status)"
  11. >
  12. <el-option
  13. v-for="item in taskstates"
  14. :key="item.value"
  15. :label="item.label"
  16. :value="item.value"
  17. ></el-option> </el-select
  18. >&nbsp;&nbsp;&nbsp;
  19. </div>
  20. <div style="position: relative;display: inline-block;margin: 3px;">
  21. <span>订单类型:</span>
  22. <el-select
  23. v-model="orderType"
  24. style="width:150px;margin-left: 10px;"
  25. @change="animeDat2(orderType)"
  26. >
  27. <el-option
  28. v-for="item in orderTypes"
  29. :key="item.value"
  30. :label="item.label"
  31. :value="item.value"
  32. ></el-option> </el-select
  33. >&nbsp;&nbsp;&nbsp;
  34. </div>
  35. <div style="position: relative;display: inline-block;margin: 3px;">
  36. <span>配送状态:</span>
  37. <el-select
  38. v-model="reservationFlag"
  39. style="width:150px;margin-left: 10px;"
  40. @change="animeDat2(reservationFlag)"
  41. >
  42. <el-option
  43. v-for="item in reservationFlags"
  44. :key="item.value"
  45. :label="item.label"
  46. :value="item.value"
  47. ></el-option> </el-select
  48. >&nbsp;&nbsp;&nbsp;
  49. </div>
  50. <div style="position: relative;display: inline-block;margin: 3px;">
  51. <span>跑腿订单状态:</span>
  52. <el-select
  53. v-model="indentStatus"
  54. style="width:150px;margin-left: 10px;"
  55. @change="animeDat2(indentStatus)"
  56. >
  57. <el-option
  58. v-for="item in indentStatuss"
  59. :key="item.value"
  60. :label="item.label"
  61. :value="item.value"
  62. ></el-option> </el-select
  63. >&nbsp;&nbsp;&nbsp;
  64. </div>
  65. <div style="position: relative;display: inline-block;margin: 3px;">
  66. <span>订单号:</span>
  67. <el-input
  68. style="width: 200px;"
  69. @keydown.enter.native="phoneSelect"
  70. placeholder="请输入订单号"
  71. v-model="orderNumber"
  72. ></el-input
  73. >&nbsp;&nbsp;
  74. </div>
  75. <div style="position: relative;display: inline-block;margin: 3px;">
  76. <span>商铺名称:</span>
  77. <el-input
  78. style="width: 200px;"
  79. @keydown.enter.native="phoneSelect"
  80. placeholder="请输入商户名称"
  81. v-model="shopName"
  82. >
  83. </el-input
  84. >&nbsp;&nbsp;
  85. </div>
  86. <div style="position: relative;display: inline-block;margin: 3px;">
  87. <span>手机号:</span>
  88. <el-input
  89. style="width: 200px;"
  90. @keydown.enter.native="phoneSelect"
  91. placeholder="请输入手机号"
  92. v-model="phone"
  93. >
  94. </el-input
  95. >&nbsp;&nbsp;
  96. </div>
  97. <div style="position: relative;display: inline-block; margin: 3px;">
  98. <span>骑手电话:</span>
  99. <el-input
  100. style="width: 200px;"
  101. @keydown.enter.native="phoneSelect"
  102. placeholder="请输入骑手电话"
  103. v-model="riderPhone"
  104. >
  105. </el-input
  106. >&nbsp;&nbsp;
  107. </div>
  108. <div style="position: relative;display: inline-block;margin: 3px;">
  109. <span>昵称:</span>
  110. <el-input
  111. style="width: 200px;"
  112. @keydown.enter.native="phoneSelect"
  113. placeholder="请输入昵称"
  114. v-model="userName"
  115. >
  116. </el-input
  117. >&nbsp;&nbsp;
  118. </div>
  119. <div style="margin:5px;display: inline-block;">
  120. <span>订单创建开始时间:</span>
  121. <el-date-picker
  122. style="width: 160px;margin-left: 10px;"
  123. v-model="startTime"
  124. align="right"
  125. type="datetime"
  126. format="yyyy-MM-dd"
  127. value-format="yyyy-MM-dd"
  128. placeholder="选择开始时间"
  129. >
  130. </el-date-picker
  131. >&nbsp;&nbsp;&nbsp;
  132. </div>
  133. <div style="margin:5px;display: inline-block;">
  134. <span>订单创建截止时间:</span>
  135. <el-date-picker
  136. style="width: 160px;margin-left: 10px;"
  137. v-model="endTime"
  138. align="right"
  139. type="datetime"
  140. format="yyyy-MM-dd"
  141. value-format="yyyy-MM-dd"
  142. placeholder="选择截止时间"
  143. >
  144. </el-date-picker>
  145. </div>
  146. <div style="margin:5px;display: inline-block;">
  147. <span>支付开始时间:</span>
  148. <el-date-picker
  149. style="width: 160px;margin-left: 10px;"
  150. v-model="payStartTime"
  151. align="right"
  152. type="datetime"
  153. format="yyyy-MM-dd"
  154. value-format="yyyy-MM-dd"
  155. placeholder="选择开始时间"
  156. >
  157. </el-date-picker
  158. >&nbsp;&nbsp;&nbsp;
  159. </div>
  160. <div style="margin:5px;display: inline-block;">
  161. <span>支付截止时间:</span>
  162. <el-date-picker
  163. style="width: 160px;margin-left: 10px;"
  164. v-model="payEndTime"
  165. align="right"
  166. type="datetime"
  167. format="yyyy-MM-dd"
  168. value-format="yyyy-MM-dd"
  169. placeholder="选择截止时间"
  170. >
  171. </el-date-picker>
  172. </div>
  173. <el-button
  174. style="margin-left:15px;"
  175. size="mini"
  176. type="primary"
  177. icon="document"
  178. @click="phoneSelect"
  179. >查询
  180. </el-button>
  181. <el-button
  182. style="margin-left:15px;"
  183. size="mini"
  184. type="primary"
  185. icon="document"
  186. @click="cleans2"
  187. >重置</el-button
  188. >
  189. <el-button
  190. style="margin-left:15px;"
  191. size="mini"
  192. type="warning"
  193. icon="document"
  194. @click="exportList"
  195. >
  196. 导出Excel
  197. </el-button>
  198. </div>
  199. <div style="color: orange;">
  200. *
  201. 导出订单提示:导出订单前请进行时间或者状态等筛选,否则导出订单量过多易出现卡顿或系统崩溃
  202. </div>
  203. <el-table v-loading="tableDataLoading" :data="tableData2.list">
  204. <el-table-column
  205. fixed
  206. prop="orderId"
  207. label="编号"
  208. width="80"
  209. ></el-table-column>
  210. <el-table-column fixed prop="userName" label="下单用户">
  211. <template slot-scope="scope">
  212. <span
  213. style="color: #4f9dec;cursor: pointer;"
  214. @click="updates(scope.row.userId)"
  215. >
  216. {{ scope.row.userName ? scope.row.userName : "未绑定" }}
  217. </span>
  218. </template>
  219. </el-table-column>
  220. <el-table-column fixed prop="userName" label="用户头像">
  221. <template slot-scope="scope">
  222. <img
  223. v-if="scope.row.avatar"
  224. :src="scope.row.avatar"
  225. width="60"
  226. height="60"
  227. />
  228. <span v-else>
  229. <img src="../../assets/img/avatar.png" width="60" height="60" />
  230. </span>
  231. </template>
  232. </el-table-column>
  233. <el-table-column prop="phone" label="手机号"></el-table-column>
  234. <el-table-column prop="shopName" label="商铺信息" width="300">
  235. <template slot-scope="scope">
  236. <div>店铺名称:{{ scope.row.shopName }}</div>
  237. <div>店铺电话:{{ scope.row.shopPhone }}</div>
  238. <div>店铺地址:{{ scope.row.detailedAddress }}</div>
  239. </template>
  240. </el-table-column>
  241. <el-table-column prop="orderTypeExtra" label="订单类型">
  242. <template slot-scope="scope">
  243. <div>
  244. {{
  245. scope.row.orderTypeExtra == 1
  246. ? "到店取餐"
  247. : scope.row.orderTypeExtra == 2
  248. ? "骑手配送"
  249. : scope.row.orderTypeExtra == 3
  250. ? "商家配送"
  251. : ""
  252. }}
  253. </div>
  254. </template>
  255. </el-table-column>
  256. <el-table-column prop="reservationFlag" label="配送状态">
  257. <template slot-scope="scope">
  258. <div>
  259. {{
  260. scope.row.reservationFlag == 1
  261. ? "预约订单"
  262. : scope.row.reservationFlag == 0
  263. ? "即时订单"
  264. : ""
  265. }}
  266. </div>
  267. </template>
  268. </el-table-column>
  269. <el-table-column
  270. prop="expectDeliveryTime"
  271. label="预约送达时间"
  272. ></el-table-column>
  273. <el-table-column prop="address" label="配送信息" width="300">
  274. <template slot-scope="scope">
  275. <div v-if="scope.row.orderType == 2">
  276. <div>订餐人:{{ scope.row.address.userName }}</div>
  277. <div>订餐人电话:{{ scope.row.address.userPhone }}</div>
  278. <div>
  279. 订餐地址:{{ scope.row.address.address }}({{
  280. scope.row.address.addressDetail
  281. }})
  282. </div>
  283. </div>
  284. <div v-else style="text-align: center;width: 100%;">-</div>
  285. </template>
  286. </el-table-column>
  287. <el-table-column prop="riderNickName" label="骑手昵称" width="120">
  288. <template slot-scope="scope">
  289. <div
  290. style="color: #4f9dec;cursor: pointer;"
  291. @click="updates(scope.row.riderUserId)"
  292. >
  293. {{ scope.row.riderNickName }}
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <el-table-column
  298. prop="riderPhone"
  299. label="骑手电话"
  300. width="200"
  301. ></el-table-column>
  302. <el-table-column
  303. prop="orderSequence"
  304. label="序号"
  305. width="180"
  306. ></el-table-column>
  307. <el-table-column prop="orderNumber" label="订单号" width="180">
  308. <template slot-scope="scope">
  309. <span style="cursor: pointer;" @click="orderSkip(scope.row)">{{
  310. scope.row.orderNumber
  311. }}</span>
  312. </template>
  313. </el-table-column>
  314. <el-table-column prop="content" label="内容" width="300">
  315. <template slot-scope="scope">
  316. <div>
  317. <div
  318. v-for="(item, index) in scope.row.orderGoodsList"
  319. :key="index"
  320. >
  321. <span>{{ index + 1 }}. 商品名:{{ item.goodsName }},</span
  322. ><span>数量:{{ item.goodsNum }},</span
  323. ><span>规格:{{ item.skuMessage }}</span>
  324. </div>
  325. </div>
  326. </template>
  327. </el-table-column>
  328. <el-table-column prop="goodsPriceZ" label="商品总价(元)" width="100">
  329. </el-table-column>
  330. <el-table-column
  331. prop="couponMoney"
  332. label="优惠券优惠金额(元)"
  333. width="100"
  334. >
  335. <template slot-scope="scope">
  336. <div>
  337. <div>
  338. <span
  339. >{{
  340. scope.row.couponMoney ? scope.row.couponMoney : "0"
  341. }}元</span
  342. >
  343. </div>
  344. </div>
  345. </template>
  346. </el-table-column>
  347. <el-table-column
  348. prop="activityTitle"
  349. label="活动名称"
  350. width="200"
  351. ></el-table-column>
  352. <el-table-column prop="" label="活动优惠金额(元)" width="100">
  353. <template slot-scope="scope">
  354. <div>
  355. <div>
  356. <span
  357. >{{
  358. scope.row.activityDiscountAmount
  359. ? scope.row.activityDiscountAmount
  360. : "0"
  361. }}元</span
  362. >
  363. </div>
  364. </div>
  365. </template>
  366. </el-table-column>
  367. <el-table-column
  368. prop="packMoney"
  369. label="打包费(元/个 具体按照数量计算)"
  370. width="100"
  371. >
  372. <template slot-scope="scope">
  373. <div>{{ scope.row.packMoney }}元/个</div>
  374. </template>
  375. </el-table-column>
  376. <el-table-column prop="errandMoney" label="跑腿费(元)" width="100">
  377. <template slot-scope="scope">
  378. <div>
  379. {{ scope.row.orderType == 1 ? "0" : scope.row.errandMoney }}元
  380. </div>
  381. </template>
  382. </el-table-column>
  383. <el-table-column prop="payMoney" label="支付金额(元)" width="100">
  384. </el-table-column>
  385. <el-table-column
  386. prop="errandMoneyIsShop"
  387. label="跑腿费说明"
  388. width="150"
  389. >
  390. </el-table-column>
  391. <el-table-column prop="remark" label="订单备注" width="150">
  392. </el-table-column>
  393. <el-table-column prop="createTime" label="创建时间"></el-table-column>
  394. <el-table-column prop="payTime" label="支付时间"></el-table-column>
  395. <el-table-column prop="payType" label="支付方式" width="100">
  396. <template slot-scope="scope">
  397. <span v-if="scope.row.payType === 1">微信</span>
  398. <span v-if="scope.row.payType === 2">余额</span>
  399. <span v-if="scope.row.payType === 3">其他</span>
  400. </template>
  401. </el-table-column>
  402. <el-table-column
  403. prop="orderCode"
  404. label="取餐号"
  405. width="100"
  406. ></el-table-column>
  407. <el-table-column fixed="right" prop="status" label="状态" width="100">
  408. <template slot-scope="scope">
  409. <span style="color: #4f9dec;" v-if="scope.row.status === 0"
  410. >待结算</span
  411. >
  412. <span
  413. style="color: #4f9dec;"
  414. v-if="scope.row.status === 1 || scope.row.status === 2"
  415. >待支付</span
  416. >
  417. <span style="color: #4f9dec;" v-if="scope.row.status === 3">
  418. {{ scope.row.orderType == 1 ? "待取餐" : "待配送" }}
  419. </span>
  420. <span style="color: #4f9dec;" v-if="scope.row.status === 4"
  421. >已完成</span
  422. >
  423. <span style="color: #999;" v-if="scope.row.status === 5"
  424. >已取消</span
  425. >
  426. <span style="color: #999;" v-if="scope.row.status === 6"
  427. >制作中</span
  428. >
  429. <span style="color: #999;" v-if="scope.row.status === 7"
  430. >商家待接单</span
  431. >
  432. <span style="color: #999;" v-if="scope.row.status === 8"
  433. >商家已拒单</span
  434. >
  435. </template>
  436. </el-table-column>
  437. <el-table-column
  438. fixed="right"
  439. prop="indentState"
  440. label="跑腿订单状态"
  441. width="100"
  442. >
  443. <template slot-scope="scope">
  444. <span style="color: #4f9dec;" v-if="scope.row.indentState === 0"
  445. >已下单未支付</span
  446. >
  447. <span style="color: #4f9dec;" v-if="scope.row.indentState === 1"
  448. >超时关闭未支付订单</span
  449. >
  450. <span style="color: #4f9dec;" v-if="scope.row.indentState === 2"
  451. >已支付</span
  452. >
  453. <span style="color: #4f9dec;" v-if="scope.row.indentState === 3">
  454. 骑手已接单
  455. </span>
  456. <span style="color: #4f9dec;" v-if="scope.row.indentState === 4"
  457. >骑手已取货/购买</span
  458. >
  459. <span style="color: #999;" v-if="scope.row.indentState === 6"
  460. >订单已完成</span
  461. >
  462. <span style="color: #999;" v-if="scope.row.indentState === 8"
  463. >用户取消订单</span
  464. >
  465. <span style="color: #999;" v-if="scope.row.indentState === 9"
  466. >骑手取消订单</span
  467. >
  468. <span style="color: #999;" v-if="scope.row.indentState === 10"
  469. >平台下架订单
  470. </span>
  471. <span style="color: #999;" v-if="scope.row.indentState === 11"
  472. >外卖订单下单后生成跑腿订单,只参与群聊,无法被接单
  473. </span>
  474. </template>
  475. </el-table-column>
  476. <el-table-column
  477. prop="isRider"
  478. label="是否是转单"
  479. fixed="right"
  480. width="80"
  481. >
  482. <template slot-scope="scope">
  483. <div v-if="scope.row.isRider == 1">是</div>
  484. <div v-if="scope.row.isRider == 2">否</div>
  485. </template>
  486. </el-table-column>
  487. <el-table-column fixed="right" prop="status" label="操作" width="250">
  488. <template slot-scope="scope">
  489. <el-button
  490. size="mini"
  491. type="primary"
  492. v-if="scope.row.status === 6"
  493. :disabled="!isAuth('mission:qucan')"
  494. @click="wancheng(scope.row)"
  495. >制作已完成</el-button
  496. >
  497. <el-button
  498. size="mini"
  499. type="danger"
  500. :disabled="!isAuth('mission:tuikuan')"
  501. style="margin: 10px;"
  502. v-if="
  503. scope.row.status === 3 ||
  504. scope.row.status === 6 ||
  505. scope.row.status === 7
  506. "
  507. @click="tuikuan(scope.row)"
  508. >退款</el-button
  509. >
  510. <el-button
  511. size="mini"
  512. type="primary"
  513. v-if="scope.row.status === 3"
  514. :disabled="!isAuth('mission:qucan')"
  515. @click="wancheng(scope.row)"
  516. style="margin: 5px 0;"
  517. >{{ scope.row.orderType == 1 ? "餐品已完成" : "餐品已完成" }}
  518. </el-button>
  519. <el-button
  520. size="mini"
  521. type="primary"
  522. v-if="
  523. scope.row.status == 3 ||
  524. scope.row.status === 4 ||
  525. scope.row.status === 6
  526. "
  527. :disabled="!isAuth('mission:qucan')"
  528. @click="dayin(scope.row)"
  529. style="margin: 3px;"
  530. >打印小票</el-button
  531. >
  532. <el-button
  533. size="mini"
  534. type="primary"
  535. @click="complainDetails(scope.row)"
  536. style="margin: 3px;"
  537. >聊天内容
  538. </el-button>
  539. <el-button
  540. size="mini"
  541. type="primary"
  542. v-if="scope.row.status == 3"
  543. :disabled="!isAuth('orderCenterRun:zhuandan')"
  544. @click="zhuandan(scope.row)"
  545. style="margin: 3px;"
  546. >转单</el-button
  547. >
  548. </template>
  549. </el-table-column>
  550. </el-table>
  551. <div
  552. style="color: #B94A48;font-size: 20px;margin-top: 10px;"
  553. v-if="totalMoney"
  554. >
  555. 本页累计交易统计:{{ totalMoney }}元
  556. </div>
  557. <div style="text-align: center;margin-top: 10px;">
  558. <el-pagination
  559. @size-change="handleSizeChange3"
  560. @current-change="handleCurrentChange3"
  561. :page-sizes="[10, 20, 30, 40]"
  562. :page-size="limit"
  563. :current-page="page"
  564. layout="total,sizes, prev, pager, next"
  565. :total="tableData2.totalCount"
  566. >
  567. </el-pagination>
  568. </div>
  569. </el-tab-pane>
  570. <!-- 导出限制 -->
  571. <el-dialog
  572. custom-class="export"
  573. :visible.sync="exportVisible"
  574. center
  575. :title="exportTitle"
  576. :close-on-click-modal="false"
  577. >
  578. <div class="con" v-show="exportFlag == 1">
  579. <img src="../../assets/img/error.png" alt="" />
  580. <span
  581. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  582. >当前导出条数超过50000条,暂不支持导出</span
  583. >
  584. <span style="font-size:14px;color: #808080;"
  585. >(注:数据中的图片、附件只能以链接的形式导出)</span
  586. >
  587. </div>
  588. <div class="con" v-show="exportFlag == 2">
  589. <img class="gundong" src="../../assets/img/loading.png" alt="" />
  590. <span
  591. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  592. >导出中...</span
  593. >
  594. <span style="font-size:14px;color: #808080;"
  595. >(注:请到个人导出记录查看并下载)</span
  596. >
  597. </div>
  598. <div class="con" v-show="exportFlag == 3">
  599. <img src="../../assets/img/success.png" alt="" />
  600. <span
  601. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  602. >导出成功</span
  603. >
  604. <span style="font-size:14px;color: #808080;"
  605. >(注:请到个人导出记录查看并下载)</span
  606. >
  607. </div>
  608. <div class="con" v-show="exportFlag == 4">
  609. <img class="gundong" src="../../assets/img/loading.png" alt="" />
  610. <span
  611. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  612. >版本迭代中,导出暂时无法使用</span
  613. >
  614. </div>
  615. <div class="btn">
  616. <el-button type="primary" @click="exportAffirm">确定</el-button>
  617. </div>
  618. </el-dialog>
  619. <!-- 任务拒绝弹框 -->
  620. <el-dialog title="任务拒绝" :visible.sync="dialogFormVisible7" center>
  621. <div style="margin-bottom: 10px;">
  622. <span style="width: 200px;display: inline-block;text-align: right;"
  623. >拒绝理由:</span
  624. >
  625. <el-input
  626. style="width:50%;"
  627. v-model="content"
  628. type="text"
  629. placeholder="请输入拒绝理由"
  630. ></el-input>
  631. </div>
  632. <div slot="footer" class="dialog-footer">
  633. <el-button @click="dialogFormVisible7 = false">取 消</el-button>
  634. <el-button type="primary" @click="refuseto()">确 定</el-button>
  635. </div>
  636. </el-dialog>
  637. <!-- 图片展示-->
  638. <el-dialog
  639. title="图片"
  640. :visible.sync="dialogVisible"
  641. width="35%"
  642. :before-close="handleClose"
  643. >
  644. <span
  645. v-if="imageUrl.length > 0"
  646. v-for="(item, index) in imageUrl"
  647. :key="index"
  648. style="width: 100px;
  649. height: 100px;display:inline-block;"
  650. >
  651. <!-- <el-image style = "width: 100px; height: 100px" :src = "item" :preview-src-list="imageUrl"></el-image>-->
  652. <img :src="item" alt="" style="width: 100px; height: 100px" />
  653. </span>
  654. <span v-else>暂无图片</span>
  655. </el-dialog>
  656. <!-- 聊天内容 -->
  657. <el-dialog title="聊天内容" :visible.sync="dialogFormVisible" center>
  658. <!-- <div style="margin:2% 0;display: inline-block;">
  659. <span>内容:</span>
  660. <el-input style="width: 150px;" @keydown.enter.native="select1" clearable placeholder="请输入聊天内容"
  661. v-model="content">
  662. </el-input>
  663. </div>
  664. <div style="display: inline-block;">
  665. <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select1">查询</el-button>
  666. <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleans1">重置</el-button>
  667. </div> -->
  668. <el-table v-loading="tableDataLoading1" :data="userData.list">
  669. <el-table-column prop="chatContentId" label="编号" width="80">
  670. </el-table-column>
  671. <el-table-column prop="userName" label="用户昵称">
  672. <template slot-scope="scope">
  673. <div v-if="scope.row.shopId">
  674. {{ scope.row.shopName }}
  675. </div>
  676. <div
  677. v-else
  678. style="color: #4f9dec;cursor: pointer;"
  679. @click="details(scope.row)"
  680. >
  681. {{
  682. scope.row.userName ? scope.row.userName : scope.row.riderName
  683. }}
  684. </div>
  685. </template>
  686. </el-table-column>
  687. <el-table-column prop="title" label="用户头像">
  688. <template slot-scope="scope">
  689. <!-- <div v-if="scope.row.avatar == null || scope.row.avatar == ''">
  690. 暂无图片
  691. </div> -->
  692. <div>
  693. <el-popover placement="top-start" title="" trigger="hover">
  694. <img
  695. style="width: 50px; height: 50px"
  696. :src="
  697. scope.row.shopCover
  698. ? scope.row.shopCover
  699. : scope.row.riderAvatar
  700. ? scope.row.riderAvatar
  701. : scope.row.userAvatar
  702. "
  703. alt=""
  704. slot="reference"
  705. />
  706. <img
  707. style="width: 200px; height: 200px"
  708. :src="
  709. scope.row.shopCover
  710. ? scope.row.shopCover
  711. : scope.row.riderAvatar
  712. ? scope.row.riderAvatar
  713. : scope.row.userAvatar
  714. "
  715. alt=""
  716. />
  717. </el-popover>
  718. </div>
  719. </template>
  720. </el-table-column>
  721. <el-table-column prop="content" label="信息内容" width="280">
  722. <template slot-scope="scope">
  723. <div v-if="scope.row.messageType == 1">{{ scope.row.content }}</div>
  724. <div v-if="scope.row.messageType == 2">
  725. <el-popover placement="top-start" title="" trigger="hover">
  726. <img
  727. style="width: 50px; height: 50px"
  728. :src="scope.row.content"
  729. alt=""
  730. slot="reference"
  731. />
  732. <img
  733. style="width: 200px; height: 200px"
  734. :src="scope.row.content"
  735. alt=""
  736. />
  737. </el-popover>
  738. </div>
  739. <div v-if="scope.row.messageType == 3">
  740. <audio
  741. :src="scope.row.content"
  742. type="audio/wav"
  743. controls="controls"
  744. ></audio>
  745. </div>
  746. <div v-if="scope.row.messageType == 4">
  747. <el-popover placement="top-start" title="" trigger="hover">
  748. <img
  749. style="width: 50px; height: 50px"
  750. :src="
  751. 'https://mxys.chuanghai-tech.com/emoji/' + scope.row.content
  752. "
  753. alt=""
  754. slot="reference"
  755. />
  756. <img
  757. style="width: 200px; height: 200px"
  758. :src="
  759. 'https://mxys.chuanghai-tech.com/emoji/' + scope.row.content
  760. "
  761. alt=""
  762. />
  763. </el-popover>
  764. </div>
  765. <!-- <div v-if="scope.row.messageType==4">
  766. <el-popover placement="top-start" title="" trigger="hover">
  767. <img style="width: 50px; height: 50px" :src="'https://mxys.chuanghai-tech.com/emoji/'+scope.row.content" alt="" slot="reference">
  768. <img style="width: 200px; height: 200px" :src="'https://mxys.chuanghai-tech.com/emoji/'+scope.row.content" alt="">
  769. </el-popover>
  770. </div> -->
  771. </template>
  772. </el-table-column>
  773. <el-table-column prop="createTime" label="创建时间" width="150">
  774. </el-table-column>
  775. <el-table-column
  776. prop="createTime"
  777. label="操作"
  778. width="100"
  779. fixed="right"
  780. >
  781. <template slot-scope="scope">
  782. <el-button
  783. size="mini"
  784. type="danger"
  785. :disabled="!isAuth('userList:delete')"
  786. @click="deleteuser(scope.row)"
  787. >
  788. 删除</el-button
  789. >
  790. </template>
  791. </el-table-column>
  792. </el-table>
  793. <div style="text-align: center;margin-top: 10px;">
  794. <el-pagination
  795. @size-change="handleSizeChange1"
  796. @current-change="handleCurrentChange1"
  797. :page-sizes="[10, 20, 30, 50, 100]"
  798. :page-size="limit1"
  799. :current-page="page1"
  800. layout="total,sizes, prev, pager, next"
  801. :total="userData.totalCount"
  802. >
  803. </el-pagination>
  804. </div>
  805. </el-dialog>
  806. <!-- 骑手列表 -->
  807. <el-dialog title="骑手列表" :visible.sync="dialogFormVisibleP" center>
  808. <div style="margin:2% 0;display: inline-block;">
  809. <span>手机号:</span>
  810. <el-input
  811. style="width: 150px;"
  812. @keydown.enter.native="selectU"
  813. clearable
  814. placeholder="请输入手机号"
  815. v-model="phoneU"
  816. ></el-input>
  817. </div>
  818. &emsp;&emsp;
  819. <div style="margin:2% 0;display: inline-block;">
  820. <span>昵称:</span>
  821. <el-input
  822. style="width: 150px;"
  823. @keydown.enter.native="selectU"
  824. clearable
  825. placeholder="请输入昵称"
  826. v-model="campus"
  827. ></el-input>
  828. </div>
  829. &emsp;&emsp;
  830. <div style="display: inline-block;">
  831. <el-button
  832. style="margin-left:15px;"
  833. size="mini"
  834. type="primary"
  835. icon="document"
  836. @click="selectU"
  837. >查询
  838. </el-button>
  839. <el-button
  840. style="margin-left:15px;"
  841. size="mini"
  842. type="primary"
  843. icon="document"
  844. @click="cleansU"
  845. >重置
  846. </el-button>
  847. </div>
  848. <el-table v-loading="tableDataLoadingU" :data="userData.list">
  849. <el-table-column prop="userId" label="编号" width="80">
  850. </el-table-column>
  851. <el-table-column prop="nickName" label="用户昵称" width="120">
  852. <template slot-scope="scope">
  853. <span
  854. style="color: #4f9dec;cursor: pointer;"
  855. @click="updatesvideo(scope.row)"
  856. v-text="scope.row.nickName"
  857. ></span>
  858. </template>
  859. </el-table-column>
  860. <el-table-column prop="avatar" label="用户头像" width="100">
  861. <template slot-scope="scope">
  862. <img
  863. v-if="scope.row.avatar && scope.row.avatar != ''"
  864. :src="scope.row.avatar"
  865. width="40"
  866. height="40"
  867. />
  868. <span v-else>暂无图片</span>
  869. </template>
  870. </el-table-column>
  871. <el-table-column prop="phone" label="手机号"> </el-table-column>
  872. <el-table-column prop="createTime" label="创建时间" width="180">
  873. </el-table-column>
  874. <el-table-column
  875. label="操作"
  876. prop="id"
  877. width="100"
  878. fixed="right"
  879. align="center"
  880. >
  881. <template slot-scope="scope">
  882. <el-button size="mini" type="primary" @click="userBtns(scope.row)"
  883. >确认
  884. </el-button>
  885. </template>
  886. </el-table-column>
  887. </el-table>
  888. <div style="text-align: center;margin-top: 10px;">
  889. <el-pagination
  890. @size-change="handleSizeChangeU"
  891. @current-change="handleCurrentChangeU"
  892. :page-sizes="[10, 20, 30, 40]"
  893. :page-size="limit1"
  894. :current-page="page1"
  895. layout="total,sizes, prev, pager, next,jumper"
  896. :total="userData.totalCount"
  897. >
  898. </el-pagination>
  899. </div>
  900. </el-dialog>
  901. </el-tabs>
  902. </template>
  903. <script>
  904. export default {
  905. data() {
  906. return {
  907. dialogVisible: false,
  908. imageUrl: [],
  909. limit: 10,
  910. page: 1,
  911. totalMoney: 0,
  912. phone: "",
  913. userName: "",
  914. orderNumber: "",
  915. status: "",
  916. describes: "",
  917. token: "",
  918. taskNum: "",
  919. taskMoney: "",
  920. statesnum: [
  921. {
  922. label: "全部",
  923. value: 0
  924. },
  925. {
  926. label: "待接单",
  927. value: 2
  928. },
  929. {
  930. label: "制作中",
  931. value: 6
  932. },
  933. {
  934. label: "待送达",
  935. value: 3
  936. },
  937. {
  938. label: "已完成",
  939. value: 4
  940. },
  941. {
  942. label: "已下架",
  943. value: 5
  944. }
  945. ],
  946. taskstates: [
  947. {
  948. label: "全部",
  949. value: ""
  950. },
  951. {
  952. label: "待结算",
  953. value: 0
  954. },
  955. {
  956. label: "待支付",
  957. value: 1
  958. },
  959. {
  960. label: "商家待接单",
  961. value: 7
  962. },
  963. {
  964. label: "制作中",
  965. value: 6
  966. },
  967. {
  968. label: "待取餐/待配送", //待取餐、派送中
  969. value: 3
  970. },
  971. {
  972. label: "已完成",
  973. value: 4
  974. },
  975. {
  976. label: "已取消",
  977. value: 5
  978. },
  979. {
  980. label: "商家已拒单",
  981. value: 8
  982. }
  983. ],
  984. orderType: "",
  985. orderTypes: [
  986. {
  987. label: "全部",
  988. value: ""
  989. },
  990. {
  991. label: "到店取餐",
  992. value: 1
  993. },
  994. {
  995. label: "骑手配送",
  996. value: 2
  997. },
  998. {
  999. label: "商家配送",
  1000. value: 3
  1001. }
  1002. ],
  1003. reservationFlag: "",
  1004. reservationFlags: [
  1005. {
  1006. label: "全部",
  1007. value: ""
  1008. },
  1009. {
  1010. label: "即时订单",
  1011. value: 0
  1012. },
  1013. {
  1014. label: "预约订单",
  1015. value: 1
  1016. }
  1017. ],
  1018. indentStatus: "",
  1019. indentStatuss: [
  1020. {
  1021. label: "全部",
  1022. value: ""
  1023. },
  1024. {
  1025. label: "已下单未支付",
  1026. value: 0
  1027. },
  1028. {
  1029. label: "超时关闭未支付订单",
  1030. value: 1
  1031. },
  1032. {
  1033. label: "已支付",
  1034. value: 2
  1035. },
  1036. {
  1037. label: "骑手已接单",
  1038. value: 3
  1039. },
  1040. {
  1041. label: "骑手已取货/购买",
  1042. value: 4
  1043. },
  1044. {
  1045. label: "订单已完成",
  1046. value: 6
  1047. },
  1048. {
  1049. label: "用户取消订单",
  1050. value: 8
  1051. },
  1052. {
  1053. label: "骑手取消订单",
  1054. value: 9
  1055. },
  1056. {
  1057. label: "骑手取消订单",
  1058. value: 10
  1059. },
  1060. {
  1061. label: "外卖订单下单后生成跑腿订单,只参与群聊,无法被接单",
  1062. value: 11
  1063. }
  1064. ],
  1065. shopId: "",
  1066. shopName: "",
  1067. shopList: "",
  1068. sort: 10,
  1069. id: "",
  1070. btnChangeEnable: true,
  1071. helpTakeId: "",
  1072. helpMaintainId: "",
  1073. content: "",
  1074. classifyIcon: "",
  1075. classifyId: "",
  1076. classifyUrl: "",
  1077. classifyName: "",
  1078. classifyDeatilsName: "",
  1079. formLabelWidth: "200px",
  1080. activeName: "first",
  1081. tableDataLoading: false,
  1082. tableDataLoading1: false,
  1083. dialogFormVisible: false,
  1084. dialogFormVisible1: false,
  1085. dialogFormVisible2: false,
  1086. dialogFormVisible3: false,
  1087. dialogFormVisible4: false,
  1088. dialogFormVisible5: false,
  1089. dialogFormVisible6: false,
  1090. dialogFormVisible7: false,
  1091. dialogFormVisible8: false,
  1092. tableData: [],
  1093. tableData2: {},
  1094. form: {
  1095. id: "",
  1096. classifyName: "",
  1097. classifyUrl: "",
  1098. classifyIcon: "",
  1099. describes: ""
  1100. },
  1101. form2: {
  1102. id: "",
  1103. classifyDeatilsName: "",
  1104. classifyUrl: "",
  1105. classifyIcon: "",
  1106. taskNum: "",
  1107. taskMoney: ""
  1108. },
  1109. protectjieData: [],
  1110. protectpaiData: [],
  1111. helpTaskData: [],
  1112. safeguardData: [],
  1113. classifyData: [],
  1114. checkBoxData: [], //多选框选择的值
  1115. checkBoxData2: [], //多选框选择的值
  1116. chatConversationId: "",
  1117. userData: {},
  1118. limit1: 10,
  1119. page1: 1,
  1120. riderPhone: "",
  1121. // ····
  1122. userData: {},
  1123. phoneU: "",
  1124. campus: "",
  1125. ordersId: "",
  1126. limit1: 10,
  1127. page1: 1,
  1128. dialogFormVisibleP: false,
  1129. tableDataLoadingU: false,
  1130. // info: {
  1131. // stockDate: this.getNowTime(), //日期
  1132. // },
  1133. // info2: {
  1134. // stockDate2: this.getNowTime2(), //日期
  1135. // },
  1136. // info3: {
  1137. // stockDate3: this.getNowTime3(), //日期
  1138. // },
  1139. startTime: "",
  1140. endTime: "",
  1141. payStartTime: "", //支付开始时间
  1142. payEndTime: "",
  1143. // 导出限制
  1144. exportTitle: "导出错误",
  1145. exportVisible: false,
  1146. exportFlag: 1 //1 超出限制 2导出中
  1147. };
  1148. },
  1149. methods: {
  1150. // 订单跳转到短信界面
  1151. orderSkip(row) {
  1152. console.log(row.indentId);
  1153. console.log(row.orderTypeExtra, "2 骑手配送,3 商家配送");
  1154. if (row.indentId) {
  1155. // 2 骑手配送
  1156. if (row.orderTypeExtra == 2) {
  1157. this.$router.push({
  1158. path: "/duanxinlistRun",
  1159. query: {
  1160. indentId: row.indentId
  1161. }
  1162. });
  1163. }
  1164. // 3 商家配送
  1165. else if (row.orderTypeExtra == 3) {
  1166. this.$router.push({
  1167. path: "/shopduanxinlistRun",
  1168. query: {
  1169. indentId: row.indentId
  1170. }
  1171. });
  1172. } else {
  1173. // 到店取餐无短信记录
  1174. this.$message({
  1175. message: "无短信记录",
  1176. type: "warning",
  1177. duration: 1500
  1178. });
  1179. }
  1180. } else {
  1181. // 到店取餐无短信记录
  1182. this.$message({
  1183. message: "无短信记录",
  1184. type: "warning",
  1185. duration: 1500
  1186. });
  1187. }
  1188. },
  1189. // 详情跳转
  1190. updates(userId) {
  1191. this.$router.push({
  1192. path: "/userDetail",
  1193. query: {
  1194. userId: userId
  1195. }
  1196. });
  1197. },
  1198. // 详情跳转
  1199. details(row) {
  1200. if (!row.shopId) {
  1201. }
  1202. let userId = row.userId ? row.userId : row.riderId;
  1203. this.$router.push({
  1204. path: "/userDetail",
  1205. query: {
  1206. userId: userId
  1207. }
  1208. });
  1209. },
  1210. // 图标上传一级分类
  1211. handleAvatarSuccess(file) {
  1212. this.classifyIcon = file.data;
  1213. },
  1214. // 图标上传一级分类编辑
  1215. handleAvatarSuccess2(file) {
  1216. this.form.classifyIcon = file.data;
  1217. },
  1218. // 多选
  1219. changeFun(val) {
  1220. this.checkBoxData = val;
  1221. },
  1222. // 多选
  1223. changeFun2(val) {
  1224. this.checkBoxData2 = val;
  1225. },
  1226. handleSizeChange(val) {
  1227. this.limit = val;
  1228. this.dataSelect();
  1229. },
  1230. handleCurrentChange(val) {
  1231. this.page = val;
  1232. this.dataSelect();
  1233. },
  1234. handleSizeChange2(val) {
  1235. this.limit = val;
  1236. this.classifySelect();
  1237. },
  1238. handleCurrentChange2(val) {
  1239. this.page = val;
  1240. this.classifySelect();
  1241. },
  1242. handleSizeChange3(val) {
  1243. this.limit = val;
  1244. this.taskdataSelect();
  1245. },
  1246. handleCurrentChange3(val) {
  1247. this.page = val;
  1248. this.taskdataSelect();
  1249. },
  1250. handleSizeChange1(val) {
  1251. this.limit1 = val;
  1252. this.neirongSelect(this.chatConversationId);
  1253. },
  1254. handleCurrentChange1(val) {
  1255. this.page1 = val;
  1256. this.neirongSelect(this.chatConversationId);
  1257. },
  1258. // tabs切换
  1259. handleClick(tab, event) {
  1260. if (tab._props.label == "订单管理") {
  1261. this.page = 1;
  1262. this.limit = 10;
  1263. this.taskdataSelect();
  1264. }
  1265. },
  1266. // 下架
  1267. soldClick(row) {
  1268. this.$confirm(`确定要下架此任务?`, "提示", {
  1269. confirmButtonText: "确定",
  1270. cancelButtonText: "取消",
  1271. type: "warning"
  1272. })
  1273. .then(() => {
  1274. this.$http({
  1275. url: this.$http.adornUrl(
  1276. `help/outHelpOrder/?helpOrderId=${row.id}`
  1277. ),
  1278. method: "post",
  1279. data: this.$http.adornData({})
  1280. }).then(({ data }) => {
  1281. if (data.code == 0) {
  1282. this.$message({
  1283. message: "操作成功",
  1284. type: "success",
  1285. duration: 1500,
  1286. onClose: () => {
  1287. this.dataSelect();
  1288. }
  1289. });
  1290. } else {
  1291. this.$message({
  1292. message: data.msg,
  1293. type: "error",
  1294. duration: 1500,
  1295. onClose: () => {
  1296. this.dataSelect();
  1297. }
  1298. });
  1299. }
  1300. });
  1301. })
  1302. .catch(() => {});
  1303. },
  1304. //查看照片
  1305. refund(e) {
  1306. this.imageUrl = [];
  1307. if (e.image != null) {
  1308. let img = e.image.split(",");
  1309. if (img.length != 0) {
  1310. this.imageUrl = img;
  1311. }
  1312. }
  1313. this.dialogVisible = true;
  1314. },
  1315. handleClose(done) {
  1316. // this.$confirm('确认关闭?')
  1317. // .then(_ => {
  1318. done();
  1319. // })
  1320. // .catch(_ => {});
  1321. },
  1322. // 添加一级分类弹框
  1323. classifyStair() {
  1324. this.dialogFormVisible = true;
  1325. },
  1326. // 添加一级分类确定
  1327. StairNoticeTo() {
  1328. if (this.classifyName == "") {
  1329. this.$notify({
  1330. title: "提示",
  1331. duration: 1800,
  1332. message: "请输入分类名称",
  1333. type: "warning"
  1334. });
  1335. return;
  1336. }
  1337. // if (this.classifyUrl == '') {
  1338. // this.$notify({
  1339. // title: '提示',
  1340. // duration: 1800,
  1341. // message: '请输入分类链接',
  1342. // type: 'warning'
  1343. // });
  1344. // return
  1345. // }
  1346. if (this.describes == "") {
  1347. this.$notify({
  1348. title: "提示",
  1349. duration: 1800,
  1350. message: "请输入分类描述",
  1351. type: "warning"
  1352. });
  1353. return;
  1354. }
  1355. if (this.classifyIcon == "") {
  1356. this.$notify({
  1357. title: "提示",
  1358. duration: 1800,
  1359. message: "请上传分类图标",
  1360. type: "warning"
  1361. });
  1362. return;
  1363. }
  1364. this.$http({
  1365. url: this.$http.adornUrl("helpClassify/saveHelpClassify"),
  1366. method: "post",
  1367. data: this.$http.adornData({
  1368. classifyName: this.classifyName,
  1369. state: this.state,
  1370. sort: this.sort,
  1371. classifyIcon: this.classifyIcon,
  1372. classifyUrl: this.classifyUrl,
  1373. describes: this.describes
  1374. })
  1375. }).then(({ data }) => {
  1376. this.dialogFormVisible = false;
  1377. this.$message({
  1378. message: "一级分类添加成功",
  1379. type: "success",
  1380. duration: 1500,
  1381. onClose: () => {
  1382. this.classifyUrl = "";
  1383. this.classifyName = "";
  1384. this.classifyIcon = "";
  1385. this.describes = "";
  1386. this.classifySelect();
  1387. }
  1388. });
  1389. });
  1390. },
  1391. // 修改一级分类
  1392. compile(index, rows) {
  1393. this.dialogFormVisible2 = true;
  1394. this.form.id = rows.id;
  1395. this.form.classifyName = rows.classifyName;
  1396. this.form.classifyUrl = rows.classifyUrl;
  1397. this.form.classifyIcon = rows.classifyIcon;
  1398. this.form.describes = rows.describes;
  1399. },
  1400. // 修改一级分类确定
  1401. CompileNoticeTo() {
  1402. if (this.form.classifyName == "") {
  1403. this.$notify({
  1404. title: "提示",
  1405. duration: 1800,
  1406. message: "请输入分类名称",
  1407. type: "warning"
  1408. });
  1409. return;
  1410. }
  1411. if (this.form.describes == "") {
  1412. this.$notify({
  1413. title: "提示",
  1414. duration: 1800,
  1415. message: "请输入分类描述",
  1416. type: "warning"
  1417. });
  1418. return;
  1419. }
  1420. if (this.form.classifyIcon == "") {
  1421. this.$notify({
  1422. title: "提示",
  1423. duration: 1800,
  1424. message: "请上传分类图标",
  1425. type: "warning"
  1426. });
  1427. return;
  1428. }
  1429. this.$http({
  1430. url: this.$http.adornUrl("helpClassify/updateHelpClassify"),
  1431. method: "post",
  1432. data: this.$http.adornData({
  1433. id: this.form.id,
  1434. classifyName: this.form.classifyName,
  1435. classifyUrl: this.form.classifyUrl,
  1436. classifyIcon: this.form.classifyIcon,
  1437. describes: this.form.describes
  1438. })
  1439. }).then(({ data }) => {
  1440. this.dialogFormVisible2 = false;
  1441. this.$message({
  1442. message: "操作成功",
  1443. type: "success",
  1444. duration: 1500,
  1445. onClose: () => {
  1446. this.classifySelect();
  1447. }
  1448. });
  1449. });
  1450. },
  1451. //删除一级
  1452. deleteStair(row) {
  1453. let delid = row.id;
  1454. this.$confirm(`确定删除此条信息?`, "提示", {
  1455. confirmButtonText: "确定",
  1456. cancelButtonText: "取消",
  1457. type: "warning"
  1458. })
  1459. .then(() => {
  1460. this.$http({
  1461. url: this.$http.adornUrl(
  1462. `helpClassify/deleteClassifyById/?id=${delid}`
  1463. ),
  1464. method: "post",
  1465. data: this.$http.adornData({})
  1466. }).then(({ data }) => {
  1467. this.$message({
  1468. message: "删除成功",
  1469. type: "success",
  1470. duration: 1500,
  1471. onClose: () => {
  1472. this.name = "";
  1473. this.classifySelect();
  1474. }
  1475. });
  1476. });
  1477. })
  1478. .catch(() => {});
  1479. },
  1480. // 手机号搜索
  1481. phoneSelect() {
  1482. this.page = 1;
  1483. this.limit = 10;
  1484. this.taskdataSelect();
  1485. },
  1486. // 重置
  1487. cleans2() {
  1488. this.page = 1;
  1489. this.phone = "";
  1490. this.riderPhone = "";
  1491. this.userName = "";
  1492. this.orderNumber = "";
  1493. this.status = "";
  1494. this.shopName = "";
  1495. this.reservationFlag = "";
  1496. this.indentStatus = "";
  1497. this.orderType = "";
  1498. this.startTime = "";
  1499. this.endTime = "";
  1500. this.payStartTime = "";
  1501. this.payEndTime = "";
  1502. this.taskdataSelect();
  1503. },
  1504. // 查询
  1505. select() {
  1506. this.page = 1;
  1507. this.limit = 10;
  1508. this.dataSelect();
  1509. },
  1510. // 重置
  1511. cleans() {
  1512. this.phone = "";
  1513. this.status = 0;
  1514. this.content = "";
  1515. this.dataSelect();
  1516. },
  1517. // select选择事件
  1518. animeDat(state) {
  1519. this.dataSelect();
  1520. },
  1521. animeDat2(state) {
  1522. this.page = 1;
  1523. this.taskdataSelect();
  1524. },
  1525. // 获取派单数据列表
  1526. dataSelect() {
  1527. this.tableDataLoading = true;
  1528. this.$http({
  1529. url: this.$http.adornUrl("help/selectStatusHelpOrder"),
  1530. method: "get",
  1531. params: this.$http.adornParams({
  1532. page: this.page,
  1533. limit: this.limit,
  1534. phone: this.phone,
  1535. status: this.status,
  1536. content: this.content
  1537. })
  1538. }).then(({ data }) => {
  1539. this.tableDataLoading = false;
  1540. let returnData = data.data;
  1541. this.tableData = returnData;
  1542. });
  1543. },
  1544. // 获取数据列表
  1545. taskdataSelect() {
  1546. this.totalMoney = 0;
  1547. this.tableDataLoading = true;
  1548. this.$http({
  1549. url: this.$http.adornUrl("admin/order/selectAllOrderAdmin"),
  1550. method: "get",
  1551. params: this.$http.adornParams({
  1552. page: this.page,
  1553. limit: this.limit,
  1554. phone: this.phone,
  1555. userName: this.userName,
  1556. orderNumber: this.orderNumber,
  1557. status: this.status,
  1558. shopName: this.shopName,
  1559. orderType: this.orderType,
  1560. reservationFlag: this.reservationFlag,
  1561. indentStatus: this.indentStatus,
  1562. riderPhone: this.riderPhone,
  1563. startTime: this.startTime,
  1564. endTime: this.endTime,
  1565. payStartTime: this.payStartTime,
  1566. payEndTime: this.payEndTime
  1567. })
  1568. }).then(({ data }) => {
  1569. this.tableDataLoading = false;
  1570. let returnData = data.data;
  1571. this.tableData2 = returnData;
  1572. console.log(this.tableData2, "hhhhh");
  1573. for (var i in this.tableData2.list) {
  1574. this.tableData2.list[i].goodsPriceZ = 0;
  1575. this.totalMoney = this.totalMoney + this.tableData2.list[i].payMoney;
  1576. if (this.tableData2.list[i].address) {
  1577. this.tableData2.list[i].address = JSON.parse(
  1578. this.tableData2.list[i].address
  1579. );
  1580. }
  1581. for (var j in this.tableData2.list[i].orderGoodsList) {
  1582. this.tableData2.list[i].orderGoodsList[j].goodsPriceZ =
  1583. this.tableData2.list[i].orderGoodsList[j].goodsPrice *
  1584. this.tableData2.list[i].orderGoodsList[j].goodsNum;
  1585. this.tableData2.list[i].goodsPriceZ =
  1586. this.tableData2.list[i].goodsPriceZ +
  1587. this.tableData2.list[i].orderGoodsList[j].goodsPriceZ;
  1588. }
  1589. }
  1590. this.totalMoney = this.totalMoney.toFixed(2);
  1591. });
  1592. },
  1593. // 商铺列表
  1594. classifySelect() {
  1595. this.tableDataLoading = true;
  1596. this.$http({
  1597. url: this.$http.adornUrl("admin/goods/selectAllShopList"),
  1598. method: "get",
  1599. params: this.$http.adornParams({})
  1600. }).then(({ data }) => {
  1601. this.tableDataLoading = false;
  1602. let returnData = data.data;
  1603. this.shopList = returnData;
  1604. });
  1605. },
  1606. // 餐品完成
  1607. wancheng(row) {
  1608. if (row.status == 3) {
  1609. var status1 = 4;
  1610. }
  1611. if (row.status == 6) {
  1612. var status1 = 3;
  1613. }
  1614. this.$http({
  1615. url: this.$http.adornUrl("admin/order/updateOrder"),
  1616. method: "post",
  1617. data: this.$http.adornData({
  1618. status: status1,
  1619. orderId: row.orderId,
  1620. orderNumber: row.orderNumber
  1621. })
  1622. }).then(({ data }) => {
  1623. if (data.code == 0) {
  1624. this.$message({
  1625. message: "操作成功",
  1626. type: "success",
  1627. duration: 1500,
  1628. onClose: () => {
  1629. this.taskdataSelect();
  1630. }
  1631. });
  1632. } else {
  1633. this.$message({
  1634. message: data.msg,
  1635. type: "warning",
  1636. duration: 1500,
  1637. onClose: () => {}
  1638. });
  1639. }
  1640. });
  1641. },
  1642. // 退款
  1643. tuikuan(row) {
  1644. console.log("退款");
  1645. this.$confirm(`确定要退款?`, "提示", {
  1646. confirmButtonText: "确定",
  1647. cancelButtonText: "取消",
  1648. type: "warning"
  1649. })
  1650. .then(() => {
  1651. console.log("取定");
  1652. this.$http({
  1653. url: this.$http.adornUrl("admin/order/adminCancelOrder"),
  1654. method: "post",
  1655. params: this.$http.adornParams({
  1656. orderId: row.orderId
  1657. })
  1658. }).then(({ data }) => {
  1659. if (data.code == 0) {
  1660. this.$message({
  1661. message: "操作成功",
  1662. type: "success",
  1663. duration: 1500,
  1664. onClose: () => {
  1665. this.taskdataSelect();
  1666. }
  1667. });
  1668. } else {
  1669. this.$message({
  1670. message: data.msg,
  1671. type: "error",
  1672. duration: 1500,
  1673. onClose: () => {}
  1674. });
  1675. }
  1676. });
  1677. })
  1678. .catch(() => {
  1679. console.log("取消");
  1680. });
  1681. },
  1682. // 打印小票
  1683. dayin(row) {
  1684. this.$http({
  1685. url: this.$http.adornUrl("admin/order/print"),
  1686. method: "post",
  1687. params: this.$http.adornParams({
  1688. orderId: row.orderId
  1689. })
  1690. }).then(({ data }) => {
  1691. if (data.code == 0) {
  1692. this.$message({
  1693. message: "操作成功",
  1694. type: "success",
  1695. duration: 1500,
  1696. onClose: () => {
  1697. this.taskdataSelect();
  1698. }
  1699. });
  1700. } else {
  1701. this.$message({
  1702. message: data.msg,
  1703. type: "warning",
  1704. duration: 1500,
  1705. onClose: () => {}
  1706. });
  1707. }
  1708. });
  1709. },
  1710. // 聊天内容
  1711. complainDetails(row) {
  1712. this.chatConversationId = row.orderId;
  1713. this.neirongSelect(this.chatConversationId);
  1714. this.dialogFormVisible = true;
  1715. },
  1716. select1() {
  1717. this.page1 = 1;
  1718. this.neirongSelect(this.chatConversationId);
  1719. },
  1720. // 重置
  1721. cleans1() {
  1722. this.content = "";
  1723. this.page1 = 1;
  1724. this.neirongSelect(this.chatConversationId);
  1725. },
  1726. // 获取聊天内容列表
  1727. neirongSelect(chatConversationId) {
  1728. this.tableDataLoading1 = true;
  1729. this.$http({
  1730. url: this.$http.adornUrl("shop/ordersChat/selectGameChatDetails"),
  1731. method: "get",
  1732. params: this.$http.adornParams({
  1733. page: this.page1,
  1734. limit: this.limit1,
  1735. ordersId: this.chatConversationId,
  1736. content: this.content
  1737. })
  1738. }).then(({ data }) => {
  1739. this.tableDataLoading1 = false;
  1740. let returnData = data.data;
  1741. this.userData = returnData;
  1742. });
  1743. },
  1744. //删除聊天
  1745. deleteuser(row) {
  1746. // let delid = row.userId
  1747. this.$confirm(`确定删除此条信息?`, "提示", {
  1748. confirmButtonText: "确定",
  1749. cancelButtonText: "取消",
  1750. type: "warning"
  1751. }).then(() => {
  1752. this.$http({
  1753. url: this.$http.adornUrl(
  1754. "shop/ordersChat/deleteOrdersChat?chatContentId=" +
  1755. row.chatContentId
  1756. ),
  1757. method: "post",
  1758. params: this.$http.adornParams({})
  1759. }).then(({ data }) => {
  1760. if (data.code == 0) {
  1761. this.$message({
  1762. message: "删除成功",
  1763. type: "success",
  1764. duration: 1500,
  1765. onClose: () => {
  1766. this.neirongSelect(this.chatConversationId);
  1767. }
  1768. });
  1769. } else {
  1770. this.$message({
  1771. message: data.msg,
  1772. type: "warning",
  1773. duration: 1500,
  1774. onClose: () => {}
  1775. });
  1776. }
  1777. });
  1778. });
  1779. },
  1780. handleSizeChangeU(val) {
  1781. this.limit1 = val;
  1782. this.dataSelectUser()();
  1783. },
  1784. handleCurrentChangeU(val) {
  1785. this.page1 = val;
  1786. this.dataSelectUser();
  1787. },
  1788. // 转单弹框
  1789. zhuandan(row) {
  1790. this.ordersId = row.indentId;
  1791. this.page1 = 1;
  1792. this.phoneU = "";
  1793. this.campus = "";
  1794. this.dataSelectUser();
  1795. this.dialogFormVisibleP = true;
  1796. },
  1797. // 确认选择
  1798. userBtns(row) {
  1799. this.$http({
  1800. url: this.$http.adornUrl("admin/tbindent/transferOfOrder"),
  1801. method: "post",
  1802. params: this.$http.adornParams({
  1803. riderUserId: row.userId,
  1804. indentId: this.ordersId
  1805. })
  1806. }).then(({ data }) => {
  1807. if (data.code == 0) {
  1808. this.$message({
  1809. message: "操作成功",
  1810. type: "success",
  1811. duration: 1500,
  1812. onClose: () => {
  1813. this.taskdataSelect();
  1814. this.dialogFormVisibleP = false;
  1815. }
  1816. });
  1817. } else {
  1818. this.$message({
  1819. message: data.msg,
  1820. type: "warning",
  1821. duration: 1500,
  1822. onClose: () => {}
  1823. });
  1824. }
  1825. });
  1826. },
  1827. // 获取数据列表
  1828. dataSelectUser() {
  1829. this.tableDataLoadingU = true;
  1830. this.$http({
  1831. url: this.$http.adornUrl("user/selectUserList"),
  1832. method: "get",
  1833. params: this.$http.adornParams({
  1834. page: this.page1,
  1835. limit: this.limit1,
  1836. // 'member': this.member,
  1837. phone: this.phoneU,
  1838. nickName: this.campus,
  1839. type: 2,
  1840. isVip: "",
  1841. platform: "",
  1842. shopAdminFlag: this.shopAdminFlag
  1843. })
  1844. }).then(({ data }) => {
  1845. this.tableDataLoadingU = false;
  1846. let returnData = data.data;
  1847. this.userData = returnData;
  1848. });
  1849. },
  1850. // 查询
  1851. selectU() {
  1852. this.page = 1;
  1853. this.dataSelectUser();
  1854. },
  1855. // 重置
  1856. cleansU() {
  1857. this.page1 = 1;
  1858. this.campus = "";
  1859. this.phoneU = "";
  1860. this.dataSelectUser();
  1861. },
  1862. // 导出
  1863. // exportBtn() {
  1864. // var userId = this.$cookie.get('userId')
  1865. // this.$http({
  1866. // url: this.$http.adornUrl("admin/export/excelOrder"),
  1867. // method: "get",
  1868. // // responseType: "blob",
  1869. // params: this.$http.adornParams({
  1870. // // 'page': page,
  1871. // // 'size': this.size,
  1872. // userId:userId,
  1873. // phone: this.phone,
  1874. // userName: this.userName,
  1875. // orderNumber: this.orderNumber,
  1876. // status: this.status,
  1877. // shopName: this.shopName,
  1878. // orderSequence: this.orderSequence,
  1879. // orderType: this.orderType,
  1880. // reservationFlag: this.reservationFlag,
  1881. // indentStatus: this.indentStatus,
  1882. // riderPhone: this.riderPhone,
  1883. // startTime: this.startTime,
  1884. // endTime: this.endTime,
  1885. // payStartTime: this.payStartTime,
  1886. // payEndTime: this.payEndTime
  1887. // })
  1888. // }).then(({ data }) => {
  1889. // console.log(data, "导出");
  1890. // // let blob = new Blob([data], {
  1891. // // type:
  1892. // // "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  1893. // // });
  1894. // // if (window.navigator.msSaveOrOpenBlob) {
  1895. // // navigator.msSaveBlob(blob);
  1896. // // } else {
  1897. // // let url = window.URL.createObjectURL(blob);
  1898. // // let elink = document.createElement("a");
  1899. // // elink.download = "订单列表.xlsx";
  1900. // // elink.style.display = "none";
  1901. // // elink.href = url;
  1902. // // document.body.appendChild(elink);
  1903. // // elink.click();
  1904. // // document.body.removeChild(elink);
  1905. // // }
  1906. // });
  1907. // },
  1908. exportList() {
  1909. console.log(this.tableData2.totalCount,'导出条数');
  1910. this.exportTitle = "导出";
  1911. this.exportFlag = 4;
  1912. this.exportVisible = true;
  1913. // if (this.tableData2.totalCount >= 50000) {
  1914. // this.exportTitle = "导出错误";
  1915. // this.exportFlag = 1;
  1916. // } else {
  1917. // this.exportTitle = "导出";
  1918. // this.exportFlag = 2;
  1919. // this.exportVisible = true;
  1920. // var userId = this.$cookie.get('userId')
  1921. // this.$http({
  1922. // url: this.$http.adornUrl("admin/export/excelOrder"),
  1923. // method: "get",
  1924. // // responseType: "blob",
  1925. // params: this.$http.adornParams({
  1926. // // 'page': page,
  1927. // // 'size': this.size,
  1928. // userId:userId,
  1929. // phone: this.phone,
  1930. // userName: this.userName,
  1931. // orderNumber: this.orderNumber,
  1932. // status: this.status,
  1933. // shopName: this.shopName,
  1934. // orderSequence: this.orderSequence,
  1935. // orderType: this.orderType,
  1936. // reservationFlag: this.reservationFlag,
  1937. // indentStatus: this.indentStatus,
  1938. // riderPhone: this.riderPhone,
  1939. // startTime: this.startTime,
  1940. // endTime: this.endTime,
  1941. // payStartTime: this.payStartTime,
  1942. // payEndTime: this.payEndTime
  1943. // })
  1944. // }).then(({ data }) => {
  1945. // console.log(data, "导出");
  1946. // if(data.code==0){
  1947. // this.exportTitle = "导出成功";
  1948. // this.exportFlag = 3;
  1949. // }
  1950. // // let blob = new Blob([data], {
  1951. // // type:
  1952. // // "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  1953. // // });
  1954. // // if (window.navigator.msSaveOrOpenBlob) {
  1955. // // navigator.msSaveBlob(blob);
  1956. // // } else {
  1957. // // let url = window.URL.createObjectURL(blob);
  1958. // // let elink = document.createElement("a");
  1959. // // elink.download = "订单列表.xlsx";
  1960. // // elink.style.display = "none";
  1961. // // elink.href = url;
  1962. // // document.body.appendChild(elink);
  1963. // // elink.click();
  1964. // // document.body.removeChild(elink);
  1965. // // }
  1966. // });
  1967. // }
  1968. },
  1969. exportAffirm() {
  1970. this.exportVisible = false;
  1971. }
  1972. },
  1973. mounted() {
  1974. // this.classifySelect()
  1975. this.taskdataSelect();
  1976. }
  1977. };
  1978. </script>
  1979. <style scoped>
  1980. /* 导出限制 */
  1981. .el-tabs >>> .export {
  1982. width: 500px;
  1983. }
  1984. .el-tabs >>> .export .con {
  1985. display: flex;
  1986. flex-direction: column;
  1987. justify-content: center;
  1988. align-items: center;
  1989. margin-bottom: 20px;
  1990. }
  1991. .el-tabs >>> .export .con .gundong {
  1992. animation: gundong 3s linear infinite ;
  1993. }
  1994. @keyframes gundong{
  1995. /* from表示动画的开始位置,也可以使用0%来表示。 */
  1996. from{
  1997. transform: rotate(0deg)
  1998. }
  1999. /* to表示动画的结束位置,也可以使用100%来表示。 */
  2000. to{
  2001. transform: rotate(360deg);
  2002. }
  2003. }
  2004. .el-tabs >>> .export img {
  2005. width: 70px;
  2006. }
  2007. .el-tabs >>> .export .btn {
  2008. display: flex;
  2009. flex-direction: row-reverse;
  2010. }
  2011. </style>