mission.vue 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626
  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="transactionId"
  82. ></el-input
  83. >&nbsp;&nbsp;
  84. </div>
  85. <div style="position: relative;display: inline-block;margin: 3px;">
  86. <span>商铺名称:</span>
  87. <el-input
  88. style="width: 200px;"
  89. @keydown.enter.native="phoneSelect"
  90. @input="phoneSelect"
  91. placeholder="请输入商户名称"
  92. v-model="shopName"
  93. >
  94. </el-input
  95. >&nbsp;&nbsp;
  96. </div>
  97. <div style="position: relative;display: inline-block;margin: 3px;">
  98. <span>商铺类型:</span>
  99. <el-select
  100. v-model="spEarningTypeId"
  101. style="width:200px;"
  102. @change="phoneSelect"
  103. :clearable="true"
  104. >
  105. <el-option
  106. v-for="item in spEarnings"
  107. :key="item.id"
  108. :label="item.shopTypeName"
  109. :value="item.id"
  110. >
  111. </el-option> </el-select
  112. >&nbsp;&nbsp;&nbsp;
  113. </div>
  114. <div style="position: relative;display: inline-block;margin: 3px;">
  115. <span>优惠券类型:</span>
  116. <el-select
  117. v-model="couponType"
  118. style="width:200px;"
  119. @change="phoneSelect"
  120. :clearable="true"
  121. >
  122. <el-option label="平台" :value="0"> </el-option>
  123. <el-option label="商家" :value="1"> </el-option> </el-select
  124. >&nbsp;&nbsp;&nbsp;
  125. </div>
  126. <div style="position: relative;display: inline-block;margin: 3px;">
  127. <span>手机号:</span>
  128. <el-input
  129. style="width: 200px;"
  130. @keydown.enter.native="phoneSelect"
  131. placeholder="请输入手机号"
  132. v-model="phone"
  133. >
  134. </el-input
  135. >&nbsp;&nbsp;
  136. </div>
  137. <div style="position: relative;display: inline-block;margin: 3px;">
  138. <span>骑手所在站点:</span>
  139. <el-select
  140. @change="phoneSelect"
  141. :clearable="true"
  142. v-model="stationName"
  143. placeholder="请选择骑手所在站点"
  144. >
  145. <el-option
  146. :label="i.stationName"
  147. :value="i.id"
  148. :key="i.id"
  149. v-for="i in stationData"
  150. ></el-option> </el-select
  151. >&nbsp;&nbsp;
  152. </div>
  153. <div style="position: relative;display: inline-block; margin: 3px;">
  154. <span>骑手电话:</span>
  155. <el-input
  156. style="width: 200px;"
  157. @keydown.enter.native="phoneSelect"
  158. placeholder="请输入骑手电话"
  159. v-model="riderPhone"
  160. >
  161. </el-input
  162. >&nbsp;&nbsp;
  163. </div>
  164. <div style="position: relative;display: inline-block;margin: 3px;">
  165. <span>昵称:</span>
  166. <el-input
  167. style="width: 200px;"
  168. @keydown.enter.native="phoneSelect"
  169. placeholder="请输入昵称"
  170. v-model="userName"
  171. >
  172. </el-input
  173. >&nbsp;&nbsp;
  174. </div>
  175. <div style="margin:5px;display: inline-block;">
  176. <!-- <span>订单创建开始时间:</span> -->
  177. <!-- <el-date-picker
  178. style="width: 160px;margin-left: 10px;"
  179. v-model="startTime"
  180. align="right"
  181. type="datetime"
  182. format="yyyy-MM-dd"
  183. value-format="yyyy-MM-dd"
  184. placeholder="选择开始时间"
  185. >
  186. </el-date-picker> -->
  187. <span>订单创建时间:</span>
  188. <el-date-picker
  189. v-model="startTime"
  190. type="datetimerange"
  191. unlink-panels
  192. range-separator="-"
  193. start-placeholder="开始日期"
  194. end-placeholder="结束日期"
  195. format="yyyy-MM-dd HH:mm:ss"
  196. value-format="yyyy-MM-dd HH:mm:ss"
  197. >
  198. </el-date-picker>
  199. &nbsp;&nbsp;&nbsp;
  200. </div>
  201. <!-- <div style="margin:5px;display: inline-block;">
  202. <span>订单创建截止时间:</span>
  203. <el-date-picker
  204. style="width: 160px;margin-left: 10px;"
  205. v-model="endTime"
  206. align="right"
  207. type="datetime"
  208. format="yyyy-MM-dd"
  209. value-format="yyyy-MM-dd"
  210. placeholder="选择截止时间"
  211. >
  212. </el-date-picker>
  213. </div> -->
  214. <div style="margin:5px;display: inline-block;">
  215. <!-- <span>支付开始时间:</span> -->
  216. <!-- <el-date-picker
  217. style="width: 160px;margin-left: 10px;"
  218. v-model="payStartTime"
  219. align="right"
  220. type="datetime"
  221. format="yyyy-MM-dd"
  222. value-format="yyyy-MM-dd"
  223. placeholder="选择开始时间"
  224. >
  225. </el-date-picker> -->
  226. <span>支付时间:</span>
  227. <el-date-picker
  228. v-model="payStartTime"
  229. type="datetimerange"
  230. unlink-panels
  231. range-separator="-"
  232. start-placeholder="开始日期"
  233. end-placeholder="结束日期"
  234. format="yyyy-MM-dd HH:mm:ss"
  235. value-format="yyyy-MM-dd HH:mm:ss"
  236. ></el-date-picker>
  237. &nbsp;&nbsp;&nbsp;
  238. </div>
  239. <!-- <div style="margin:5px;display: inline-block;">
  240. <span>支付截止时间:</span>
  241. <el-date-picker
  242. style="width: 160px;margin-left: 10px;"
  243. v-model="payEndTime"
  244. align="right"
  245. type="datetime"
  246. format="yyyy-MM-dd"
  247. value-format="yyyy-MM-dd"
  248. placeholder="选择截止时间"
  249. >
  250. </el-date-picker>
  251. </div> -->
  252. <div v-if="status == 14" style="margin:5px;display: inline-block;">
  253. <!-- <span>退款开始时间:</span> -->
  254. <!-- <el-date-picker
  255. style="width: 200px;margin-left: 10px;"
  256. v-model="refundStartTime"
  257. align="right"
  258. type="datetime"
  259. format="yyyy-MM-dd HH:mm:ss"
  260. value-format="yyyy-MM-dd HH:mm:ss"
  261. placeholder="选择开始时间"
  262. >
  263. </el-date-picker> -->
  264. <span>退款时间:</span>
  265. <el-date-picker
  266. v-model="refundStartTime"
  267. type="datetimerange"
  268. unlink-panels
  269. range-separator="-"
  270. start-placeholder="开始日期"
  271. end-placeholder="结束日期"
  272. format="yyyy-MM-dd HH:mm:ss"
  273. value-format="yyyy-MM-dd HH:mm:ss"
  274. ></el-date-picker>
  275. &nbsp;&nbsp;&nbsp;
  276. </div>
  277. <!-- <div v-if="status == 14" style="margin:5px;display: inline-block;">
  278. <span>退款结束时间:</span>
  279. <el-date-picker
  280. style="width: 200px;margin-left: 10px;"
  281. v-model="refundEndTime"
  282. align="right"
  283. type="datetime"
  284. format="yyyy-MM-dd HH:mm:ss"
  285. value-format="yyyy-MM-dd HH:mm:ss"
  286. placeholder="选择结束时间"
  287. >
  288. </el-date-picker>
  289. </div> -->
  290. <el-button
  291. style="margin-left:15px;"
  292. size="mini"
  293. type="primary"
  294. icon="document"
  295. @click="phoneSelect"
  296. >查询
  297. </el-button>
  298. <el-button
  299. style="margin-left:15px;"
  300. size="mini"
  301. type="primary"
  302. icon="document"
  303. @click="cleans2"
  304. >重置</el-button
  305. >
  306. <el-button
  307. style="margin-left:15px;"
  308. size="mini"
  309. type="warning"
  310. icon="document"
  311. @click="exportList"
  312. >
  313. 导出Excel
  314. </el-button>
  315. <!-- <div style="margin:5px 15px;display: inline-block;" v-if="shopName">
  316. <span style="font-size:18px;">店铺订单总金额:{{ shopMoney }}</span>
  317. </div> -->
  318. </div>
  319. <div style="color: orange;">
  320. *
  321. 导出订单提示:导出订单前请进行时间或者状态等筛选,否则导出订单量过多易出现卡顿或系统崩溃
  322. </div>
  323. <el-table v-loading="tableDataLoading" :data="tableData2.list">
  324. <el-table-column
  325. fixed
  326. prop="orderId"
  327. label="编号"
  328. width="80"
  329. ></el-table-column>
  330. <el-table-column fixed prop="userName" label="下单用户">
  331. <template slot-scope="scope">
  332. <span
  333. style="color: #4f9dec;cursor: pointer;"
  334. @click="updates(scope.row.userId)"
  335. >
  336. {{ scope.row.userName ? scope.row.userName : "未绑定" }}
  337. </span>
  338. </template>
  339. </el-table-column>
  340. <el-table-column fixed prop="userName" label="用户头像">
  341. <template slot-scope="scope">
  342. <img
  343. v-if="scope.row.avatar"
  344. :src="scope.row.avatar"
  345. width="60"
  346. height="60"
  347. />
  348. <span v-else>
  349. <img src="../../assets/img/avatar.png" width="60" height="60" />
  350. </span>
  351. </template>
  352. </el-table-column>
  353. <el-table-column prop="phone" label="手机号"></el-table-column>
  354. <el-table-column prop="shopTypeName" label="商铺类型"></el-table-column>
  355. <el-table-column prop="shopName" label="商铺信息" width="300">
  356. <template slot-scope="scope">
  357. <div>店铺名称:{{ scope.row.shopName }}</div>
  358. <div>店铺电话:{{ scope.row.shopPhone }}</div>
  359. <div>店铺地址:{{ scope.row.detailedAddress }}</div>
  360. </template>
  361. </el-table-column>
  362. <el-table-column prop="orderTypeExtra" label="订单类型">
  363. <template slot-scope="scope">
  364. <div>
  365. {{
  366. scope.row.orderTypeExtra == 1
  367. ? "到店取餐"
  368. : scope.row.orderTypeExtra == 2
  369. ? "骑手配送"
  370. : scope.row.orderTypeExtra == 3
  371. ? "商家配送"
  372. : ""
  373. }}
  374. </div>
  375. </template>
  376. </el-table-column>
  377. <el-table-column prop="reservationFlag" label="配送状态">
  378. <template slot-scope="scope">
  379. <div>
  380. {{
  381. scope.row.reservationFlag == 1
  382. ? "预约订单"
  383. : scope.row.reservationFlag == 0
  384. ? "即时订单"
  385. : ""
  386. }}
  387. </div>
  388. </template>
  389. </el-table-column>
  390. <el-table-column
  391. prop="expectDeliveryTime"
  392. label="预约送达时间"
  393. ></el-table-column>
  394. <el-table-column prop="address" label="配送信息" width="300">
  395. <template slot-scope="scope">
  396. <div v-if="scope.row.orderType == 2">
  397. <div>订餐人:{{ scope.row.address.userName }}</div>
  398. <div>订餐人电话:{{ scope.row.address.userPhone }}</div>
  399. <div>
  400. 订餐地址:{{ scope.row.address.address }}({{
  401. scope.row.address.addressDetail
  402. }})
  403. </div>
  404. </div>
  405. <div v-else style="text-align: center;width: 100%;">-</div>
  406. </template>
  407. </el-table-column>
  408. <el-table-column prop="riderNickName" label="骑手昵称" width="120">
  409. <template slot-scope="scope">
  410. <div
  411. style="color: #4f9dec;cursor: pointer;"
  412. @click="updates(scope.row.riderUserId)"
  413. >
  414. {{ scope.row.riderNickName }}
  415. </div>
  416. </template>
  417. </el-table-column>
  418. <el-table-column
  419. prop="riderPhone"
  420. label="骑手电话"
  421. width="200"
  422. ></el-table-column>
  423. <el-table-column
  424. prop="stationName"
  425. label="骑手所在站点"
  426. width="200"
  427. ></el-table-column>
  428. <el-table-column prop="orderSequence" label="序号"></el-table-column>
  429. <el-table-column
  430. prop="transactionId"
  431. label="商户单号"
  432. width="160"
  433. ></el-table-column>
  434. <el-table-column prop="orderNumber" label="订单号" width="180">
  435. <template slot-scope="scope">
  436. <span style="cursor: pointer;" @click="orderSkip(scope.row)">{{
  437. scope.row.orderNumber
  438. }}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column prop="content" label="内容" width="300">
  442. <template slot-scope="scope">
  443. <div>
  444. <div
  445. v-for="(item, index) in scope.row.orderGoodsList"
  446. :key="index"
  447. >
  448. <span>{{ index + 1 }}. 商品名:{{ item.goodsName }},</span
  449. ><span>数量:{{ item.goodsNum }},</span
  450. ><span>规格:{{ item.skuMessage }}</span>
  451. </div>
  452. </div>
  453. </template>
  454. </el-table-column>
  455. <el-table-column prop="goodsPriceZ" label="商品总价(元)" width="100">
  456. </el-table-column>
  457. <el-table-column
  458. prop="couponMoney"
  459. label="优惠券优惠金额(元)"
  460. width="100"
  461. >
  462. <template slot-scope="scope">
  463. <div>
  464. <div>
  465. <span
  466. >{{
  467. scope.row.couponMoney ? scope.row.couponMoney : "0"
  468. }}元</span
  469. >
  470. </div>
  471. </div>
  472. </template>
  473. </el-table-column>
  474. <el-table-column
  475. prop="activityTitle"
  476. label="活动名称"
  477. width="160"
  478. ></el-table-column>
  479. <el-table-column
  480. prop="couponTypeRemark"
  481. label="优惠券类型"
  482. width="100"
  483. ></el-table-column>
  484. <el-table-column prop="" label="活动优惠金额(元)" width="100">
  485. <template slot-scope="scope">
  486. <div>
  487. <div>
  488. <span
  489. >{{
  490. scope.row.activityDiscountAmount
  491. ? scope.row.activityDiscountAmount
  492. : "0"
  493. }}元</span
  494. >
  495. </div>
  496. </div>
  497. </template>
  498. </el-table-column>
  499. <el-table-column
  500. prop="packMoney"
  501. label="打包费(元/个 具体按照数量计算)"
  502. width="100"
  503. >
  504. <template slot-scope="scope">
  505. <div>{{ scope.row.packMoney }}元/个</div>
  506. </template>
  507. </el-table-column>
  508. <el-table-column prop="errandMoney" label="跑腿费(元)" width="100">
  509. <template slot-scope="scope">
  510. <div>
  511. {{ scope.row.orderType == 1 ? "0" : scope.row.errandMoney }}元
  512. </div>
  513. </template>
  514. </el-table-column>
  515. <el-table-column prop="payMoney" label="支付金额(元)" width="100">
  516. </el-table-column>
  517. <el-table-column
  518. prop="errandMoneyIsShop"
  519. label="跑腿费说明"
  520. width="150"
  521. >
  522. </el-table-column>
  523. <el-table-column prop="remark" label="订单备注" width="150">
  524. </el-table-column>
  525. <el-table-column prop="createTime" label="创建时间" width="100"></el-table-column>
  526. <el-table-column prop="payTime" label="支付时间" width="100"></el-table-column>
  527. <el-table-column prop="receivingTime" label="接单时间" width="100"></el-table-column>
  528. <el-table-column prop="finishTime" label="订单完成时间" width="120"></el-table-column>
  529. <el-table-column prop="payType" label="支付方式" width="100">
  530. <template slot-scope="scope">
  531. <span v-if="scope.row.payType === 1">微信</span>
  532. <span v-if="scope.row.payType === 2">余额</span>
  533. <span v-if="scope.row.payType === 3">其他</span>
  534. </template>
  535. </el-table-column>
  536. <el-table-column
  537. prop="orderCode"
  538. label="取餐号"
  539. width="110"
  540. ></el-table-column>
  541. <!-- <el-table-column
  542. fixed="right"
  543. prop="shopReceivingTime"
  544. label="首次接单时间"
  545. ></el-table-column> -->
  546. <el-table-column fixed="right" prop="status" label="状态" width="100">
  547. <template slot-scope="scope">
  548. <span style="color: #4f9dec;" v-if="scope.row.status === 0"
  549. >待结算</span
  550. >
  551. <span
  552. style="color: #4f9dec;"
  553. v-if="scope.row.status === 1 || scope.row.status === 2"
  554. >待支付</span
  555. >
  556. <span style="color: #4f9dec;" v-if="scope.row.status === 3">
  557. {{ scope.row.orderType == 1 ? "待取餐" : "待配送" }}
  558. </span>
  559. <span style="color: #4f9dec;" v-if="scope.row.status === 4"
  560. >已完成</span
  561. >
  562. <span style="color: #999;" v-if="scope.row.status === 5"
  563. >已取消</span
  564. >
  565. <span style="color: #999;" v-if="scope.row.status === 6"
  566. >制作中</span
  567. >
  568. <span style="color: #999;" v-if="scope.row.status === 7"
  569. >商家待接单</span
  570. >
  571. <span style="color: #999;" v-if="scope.row.status === 8"
  572. >商家已拒单</span
  573. >
  574. </template>
  575. </el-table-column>
  576. <el-table-column
  577. fixed="right"
  578. prop="isPrint"
  579. label="小票打印状态"
  580. width="80"
  581. >
  582. <template slot-scope="scope">
  583. <span v-if="scope.row.isPrint === 0 || scope.row.isPrint === ''"
  584. >未打印</span
  585. >
  586. <span v-if="scope.row.isPrint === 1">已打印</span>
  587. </template>
  588. </el-table-column>
  589. <el-table-column
  590. fixed="right"
  591. prop="indentState"
  592. label="跑腿订单状态"
  593. width="100"
  594. >
  595. <template slot-scope="scope">
  596. <span style="color: #4f9dec;" v-if="scope.row.indentState === 0"
  597. >已下单未支付</span
  598. >
  599. <span style="color: #4f9dec;" v-if="scope.row.indentState === 1"
  600. >超时关闭未支付订单</span
  601. >
  602. <span style="color: #4f9dec;" v-if="scope.row.indentState === 2"
  603. >已支付</span
  604. >
  605. <span style="color: #4f9dec;" v-if="scope.row.indentState === 3">
  606. 骑手已接单
  607. </span>
  608. <span style="color: #4f9dec;" v-if="scope.row.indentState === 4"
  609. >骑手已取货/购买</span
  610. >
  611. <span style="color: #999;" v-if="scope.row.indentState === 6"
  612. >订单已完成</span
  613. >
  614. <span style="color: #999;" v-if="scope.row.indentState === 8"
  615. >用户取消订单</span
  616. >
  617. <span style="color: #999;" v-if="scope.row.indentState === 9"
  618. >骑手取消订单</span
  619. >
  620. <span style="color: #999;" v-if="scope.row.indentState === 10"
  621. >平台下架订单
  622. </span>
  623. <span style="color: #999;" v-if="scope.row.indentState === 11"
  624. >外卖订单下单后生成跑腿订单,只参与群聊,无法被接单
  625. </span>
  626. </template>
  627. </el-table-column>
  628. <el-table-column
  629. prop="isRider"
  630. label="是否是转单"
  631. fixed="right"
  632. width="80"
  633. >
  634. <template slot-scope="scope">
  635. <div v-if="scope.row.isRider == 1">是</div>
  636. <div v-if="scope.row.isRider == 2">否</div>
  637. </template>
  638. </el-table-column>
  639. <!-- <el-table-column
  640. fixed="right"
  641. prop="updateTime"
  642. label="完成时间"
  643. >
  644. <template slot-scope="scope">
  645. <div v-if="scope.row.status == 4">{{ scope.row.updateTime }}</div>
  646. </template>
  647. </el-table-column> -->
  648. <el-table-column fixed="right" prop="status" label="操作" width="250">
  649. <template slot-scope="scope">
  650. <el-button
  651. size="mini"
  652. type="primary"
  653. v-if="scope.row.status === 6"
  654. :disabled="!isAuth('mission:qucan')"
  655. @click="wancheng(scope.row)"
  656. >制作已完成</el-button
  657. >
  658. <el-button
  659. size="mini"
  660. type="danger"
  661. :disabled="!isAuth('mission:tuikuan')"
  662. style="margin: 10px;"
  663. v-if="
  664. scope.row.status === 3 ||
  665. scope.row.status === 6 ||
  666. scope.row.status === 7
  667. "
  668. @click="tuikuan(scope.row)"
  669. >退款</el-button
  670. >
  671. <el-button
  672. size="mini"
  673. type="primary"
  674. v-if="scope.row.status === 3"
  675. :disabled="!isAuth('mission:qucan')"
  676. @click="wancheng(scope.row)"
  677. style="margin: 5px 0;"
  678. >{{ scope.row.orderType == 1 ? "餐品已完成" : "餐品已完成" }}
  679. </el-button>
  680. <el-button
  681. size="mini"
  682. type="primary"
  683. v-if="
  684. scope.row.status == 3 ||
  685. scope.row.status === 4 ||
  686. scope.row.status === 6
  687. "
  688. :disabled="!isAuth('mission:qucan')"
  689. @click="dayin(scope.row)"
  690. style="margin: 3px;"
  691. >打印小票</el-button
  692. >
  693. <el-button
  694. size="mini"
  695. type="primary"
  696. v-if="
  697. scope.row.status == 3 ||
  698. scope.row.status === 4 ||
  699. scope.row.status === 6
  700. "
  701. :disabled="!isAuth('mission:mingxi')"
  702. @click="detailClick(scope.row)"
  703. style="margin: 3px;"
  704. >打印小票明细</el-button
  705. >
  706. <el-button
  707. size="mini"
  708. type="primary"
  709. @click="complainDetails(scope.row)"
  710. style="margin: 3px;"
  711. >聊天内容</el-button
  712. >
  713. <el-button
  714. size="mini"
  715. type="primary"
  716. v-if="scope.row.status == 3"
  717. :disabled="!isAuth('orderCenterRun:zhuandan')"
  718. @click="zhuandan(scope.row)"
  719. style="margin: 3px;"
  720. >转单</el-button
  721. >
  722. <el-button
  723. size="mini"
  724. type="primary"
  725. v-if="scope.row.orderTypeExtra == 2"
  726. :disabled="!isAuth('mission:qishoumingxi')"
  727. @click="riderDetail(scope.row)"
  728. style="margin: 3px;"
  729. >骑手明细</el-button
  730. >
  731. </template>
  732. </el-table-column>
  733. </el-table>
  734. <div
  735. style="color: #B94A48;font-size: 20px;margin-top: 10px;"
  736. v-if="totalMoney"
  737. >
  738. 本页累计交易统计:{{ totalMoney }}元
  739. </div>
  740. <div style="text-align: center;margin-top: 10px;">
  741. <el-pagination
  742. @size-change="handleSizeChange3"
  743. @current-change="handleCurrentChange3"
  744. :page-sizes="[10, 20, 30, 40]"
  745. :page-size="limit"
  746. :current-page="page"
  747. layout="total,sizes, prev, pager, next"
  748. :total="tableData2.totalCount"
  749. >
  750. </el-pagination>
  751. </div>
  752. </el-tab-pane>
  753. <!-- 导出限制 -->
  754. <el-dialog
  755. custom-class="export"
  756. :visible.sync="exportVisible"
  757. center
  758. :title="exportTitle"
  759. :close-on-click-modal="false"
  760. >
  761. <div class="con" v-show="exportFlag == 1">
  762. <img src="../../assets/img/error.png" alt="" />
  763. <span
  764. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  765. >当前导出条数超过50000条,暂不支持导出</span
  766. >
  767. <span style="font-size:14px;color: #808080;"
  768. >(注:数据中的图片、附件只能以链接的形式导出)</span
  769. >
  770. </div>
  771. <div class="con" v-show="exportFlag == 2">
  772. <img class="gundong" src="../../assets/img/loading.png" alt="" />
  773. <span
  774. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  775. >导出中...</span
  776. >
  777. <span style="font-size:14px;color: #808080;"
  778. >(注:请到个人导出记录查看并下载)</span
  779. >
  780. </div>
  781. <div class="con" v-show="exportFlag == 3">
  782. <img src="../../assets/img/success.png" alt="" />
  783. <span
  784. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  785. >导出成功</span
  786. >
  787. <span style="font-size:14px;color: #808080;"
  788. >(注:请到个人导出记录查看并下载)</span
  789. >
  790. </div>
  791. <div class="con" v-show="exportFlag == 4">
  792. <img class="gundong" src="../../assets/img/loading.png" alt="" />
  793. <span
  794. style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
  795. >版本迭代中,导出暂时无法使用</span
  796. >
  797. </div>
  798. <div class="btn">
  799. <el-button type="primary" @click="exportAffirm">确定</el-button>
  800. </div>
  801. </el-dialog>
  802. <!-- 任务拒绝弹框 -->
  803. <el-dialog title="任务拒绝" :visible.sync="dialogFormVisible7" center>
  804. <div style="margin-bottom: 10px;">
  805. <span style="width: 200px;display: inline-block;text-align: right;"
  806. >拒绝理由:</span
  807. >
  808. <el-input
  809. style="width:50%;"
  810. v-model="content"
  811. type="text"
  812. placeholder="请输入拒绝理由"
  813. ></el-input>
  814. </div>
  815. <div slot="footer" class="dialog-footer">
  816. <el-button @click="dialogFormVisible7 = false">取 消</el-button>
  817. <el-button type="primary" @click="refuseto()">确 定</el-button>
  818. </div>
  819. </el-dialog>
  820. <!-- 图片展示-->
  821. <el-dialog
  822. title="图片"
  823. :visible.sync="dialogVisible"
  824. width="35%"
  825. :before-close="handleClose"
  826. >
  827. <span
  828. v-if="imageUrl.length > 0"
  829. v-for="(item, index) in imageUrl"
  830. :key="index"
  831. style="width: 100px;
  832. height: 100px;display:inline-block;"
  833. >
  834. <!-- <el-image style = "width: 100px; height: 100px" :src = "item" :preview-src-list="imageUrl"></el-image>-->
  835. <img :src="item" alt="" style="width: 100px; height: 100px" />
  836. </span>
  837. <span v-else>暂无图片</span>
  838. </el-dialog>
  839. <!-- 聊天内容 -->
  840. <el-dialog title="聊天内容" :visible.sync="dialogFormVisible" center>
  841. <!-- <div style="margin:2% 0;display: inline-block;">
  842. <span>内容:</span>
  843. <el-input style="width: 150px;" @keydown.enter.native="select1" clearable placeholder="请输入聊天内容"
  844. v-model="content">
  845. </el-input>
  846. </div>
  847. <div style="display: inline-block;">
  848. <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select1">查询</el-button>
  849. <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleans1">重置</el-button>
  850. </div> -->
  851. <el-table v-loading="tableDataLoading1" :data="userData.list">
  852. <el-table-column prop="chatContentId" label="编号" width="80">
  853. </el-table-column>
  854. <el-table-column prop="userName" label="用户昵称">
  855. <template slot-scope="scope">
  856. <div v-if="scope.row.shopId">
  857. {{ scope.row.shopName }}
  858. </div>
  859. <div
  860. v-else
  861. style="color: #4f9dec;cursor: pointer;"
  862. @click="details(scope.row)"
  863. >
  864. {{
  865. scope.row.userName ? scope.row.userName : scope.row.riderName
  866. }}
  867. </div>
  868. </template>
  869. </el-table-column>
  870. <el-table-column prop="title" label="用户头像">
  871. <template slot-scope="scope">
  872. <!-- <div v-if="scope.row.avatar == null || scope.row.avatar == ''">
  873. 暂无图片
  874. </div> -->
  875. <div>
  876. <el-popover placement="top-start" title="" trigger="hover">
  877. <img
  878. style="width: 50px; height: 50px"
  879. :src="
  880. scope.row.shopCover
  881. ? scope.row.shopCover
  882. : scope.row.riderAvatar
  883. ? scope.row.riderAvatar
  884. : scope.row.userAvatar
  885. "
  886. alt=""
  887. slot="reference"
  888. />
  889. <img
  890. style="width: 200px; height: 200px"
  891. :src="
  892. scope.row.shopCover
  893. ? scope.row.shopCover
  894. : scope.row.riderAvatar
  895. ? scope.row.riderAvatar
  896. : scope.row.userAvatar
  897. "
  898. alt=""
  899. />
  900. </el-popover>
  901. </div>
  902. </template>
  903. </el-table-column>
  904. <el-table-column prop="content" label="信息内容" width="280">
  905. <template slot-scope="scope">
  906. <div v-if="scope.row.messageType == 1">{{ scope.row.content }}</div>
  907. <div v-if="scope.row.messageType == 2">
  908. <el-popover placement="top-start" title="" trigger="hover">
  909. <img
  910. style="width: 50px; height: 50px"
  911. :src="scope.row.content"
  912. alt=""
  913. slot="reference"
  914. />
  915. <img
  916. style="width: 200px; height: 200px"
  917. :src="scope.row.content"
  918. alt=""
  919. />
  920. </el-popover>
  921. </div>
  922. <div v-if="scope.row.messageType == 3">
  923. <audio
  924. :src="scope.row.content"
  925. type="audio/wav"
  926. controls="controls"
  927. ></audio>
  928. </div>
  929. <div v-if="scope.row.messageType == 4">
  930. <el-popover placement="top-start" title="" trigger="hover">
  931. <img
  932. style="width: 50px; height: 50px"
  933. :src="
  934. 'https://mxys.chuanghai-tech.com/emoji/' + scope.row.content
  935. "
  936. alt=""
  937. slot="reference"
  938. />
  939. <img
  940. style="width: 200px; height: 200px"
  941. :src="
  942. 'https://mxys.chuanghai-tech.com/emoji/' + scope.row.content
  943. "
  944. alt=""
  945. />
  946. </el-popover>
  947. </div>
  948. <!-- <div v-if="scope.row.messageType==4">
  949. <el-popover placement="top-start" title="" trigger="hover">
  950. <img style="width: 50px; height: 50px" :src="'https://mxys.chuanghai-tech.com/emoji/'+scope.row.content" alt="" slot="reference">
  951. <img style="width: 200px; height: 200px" :src="'https://mxys.chuanghai-tech.com/emoji/'+scope.row.content" alt="">
  952. </el-popover>
  953. </div> -->
  954. </template>
  955. </el-table-column>
  956. <el-table-column prop="createTime" label="创建时间" width="150">
  957. </el-table-column>
  958. <el-table-column
  959. prop="createTime"
  960. label="操作"
  961. width="100"
  962. fixed="right"
  963. >
  964. <template slot-scope="scope">
  965. <el-button
  966. size="mini"
  967. type="danger"
  968. :disabled="!isAuth('userList:delete')"
  969. @click="deleteuser(scope.row)"
  970. >
  971. 删除</el-button
  972. >
  973. </template>
  974. </el-table-column>
  975. </el-table>
  976. <div style="text-align: center;margin-top: 10px;">
  977. <el-pagination
  978. @size-change="handleSizeChange1"
  979. @current-change="handleCurrentChange1"
  980. :page-sizes="[10, 20, 30, 50, 100]"
  981. :page-size="limit1"
  982. :current-page="page1"
  983. layout="total,sizes, prev, pager, next"
  984. :total="userData.totalCount"
  985. >
  986. </el-pagination>
  987. </div>
  988. </el-dialog>
  989. <!-- 骑手列表 -->
  990. <el-dialog title="骑手列表" :visible.sync="dialogFormVisibleP" center>
  991. <div style="margin:2% 0;display: inline-block;">
  992. <span>手机号:</span>
  993. <el-input
  994. style="width: 150px;"
  995. @keydown.enter.native="selectU"
  996. clearable
  997. placeholder="请输入手机号"
  998. v-model="phoneU"
  999. ></el-input>
  1000. </div>
  1001. &emsp;&emsp;
  1002. <div style="margin:2% 0;display: inline-block;">
  1003. <span>昵称:</span>
  1004. <el-input
  1005. style="width: 150px;"
  1006. @keydown.enter.native="selectU"
  1007. clearable
  1008. placeholder="请输入昵称"
  1009. v-model="campus"
  1010. ></el-input>
  1011. </div>
  1012. &emsp;&emsp;
  1013. <div style="display: inline-block;">
  1014. <el-button
  1015. style="margin-left:15px;"
  1016. size="mini"
  1017. type="primary"
  1018. icon="document"
  1019. @click="selectU"
  1020. >查询
  1021. </el-button>
  1022. <el-button
  1023. style="margin-left:15px;"
  1024. size="mini"
  1025. type="primary"
  1026. icon="document"
  1027. @click="cleansU"
  1028. >重置
  1029. </el-button>
  1030. </div>
  1031. <el-table v-loading="tableDataLoadingU" :data="userData.list">
  1032. <el-table-column prop="userId" label="编号" width="80">
  1033. </el-table-column>
  1034. <el-table-column prop="nickName" label="用户昵称" width="120">
  1035. <template slot-scope="scope">
  1036. <span
  1037. style="color: #4f9dec;cursor: pointer;"
  1038. @click="updatesvideo(scope.row)"
  1039. v-text="scope.row.nickName"
  1040. ></span>
  1041. </template>
  1042. </el-table-column>
  1043. <el-table-column prop="avatar" label="用户头像" width="100">
  1044. <template slot-scope="scope">
  1045. <img
  1046. v-if="scope.row.avatar && scope.row.avatar != ''"
  1047. :src="scope.row.avatar"
  1048. width="40"
  1049. height="40"
  1050. />
  1051. <span v-else>暂无图片</span>
  1052. </template>
  1053. </el-table-column>
  1054. <el-table-column prop="phone" label="手机号"> </el-table-column>
  1055. <el-table-column prop="createTime" label="创建时间" width="180">
  1056. </el-table-column>
  1057. <el-table-column
  1058. label="操作"
  1059. prop="id"
  1060. width="100"
  1061. fixed="right"
  1062. align="center"
  1063. >
  1064. <template slot-scope="scope">
  1065. <el-button size="mini" type="primary" @click="userBtns(scope.row)"
  1066. >确认
  1067. </el-button>
  1068. </template>
  1069. </el-table-column>
  1070. </el-table>
  1071. <div style="text-align: center;margin-top: 10px;">
  1072. <el-pagination
  1073. @size-change="handleSizeChangeU"
  1074. @current-change="handleCurrentChangeU"
  1075. :page-sizes="[10, 20, 30, 40]"
  1076. :page-size="limit1"
  1077. :current-page="page1"
  1078. layout="total,sizes, prev, pager, next,jumper"
  1079. :total="userData.totalCount"
  1080. >
  1081. </el-pagination>
  1082. </div>
  1083. </el-dialog>
  1084. <!-- 骑手明细 -->
  1085. <el-dialog
  1086. custom-class="riderDetail"
  1087. title="本单骑手记录"
  1088. :visible.sync="dialogFormVisibleQS"
  1089. center
  1090. >
  1091. <el-table v-loading="tableDataLoadingQS" :data="riderData">
  1092. <el-table-column type="index" label="序号" width="80">
  1093. </el-table-column>
  1094. <el-table-column prop="userName" label="骑手姓名"> </el-table-column>
  1095. <el-table-column prop="userPhone" label="骑手手机号"> </el-table-column>
  1096. <el-table-column prop="payTime" label="订单支付时间"></el-table-column>
  1097. <el-table-column prop="receveTime" label="接单时间"></el-table-column>
  1098. <el-table-column prop="stationName" label="所在站点"></el-table-column>
  1099. </el-table>
  1100. <div style="text-align: center;margin-top: 10px;">
  1101. <el-pagination
  1102. @size-change="handleSizeChangeQS"
  1103. @current-change="handleCurrentChangeQS"
  1104. :page-sizes="[10, 20, 30, 40]"
  1105. :page-size="limitQS"
  1106. :current-page="pageQS"
  1107. layout="total,sizes, prev, pager, next,jumper"
  1108. :total="totalCountQS"
  1109. >
  1110. </el-pagination>
  1111. </div>
  1112. </el-dialog>
  1113. <!-- 打印小票明细 -->
  1114. <el-dialog
  1115. custom-class="detail"
  1116. :visible.sync="detailVisible"
  1117. center
  1118. title="小票明细"
  1119. :close-on-click-modal="false"
  1120. >
  1121. <el-table v-loading="detailLoading" :data="detailData.list">
  1122. <el-table-column fixed prop="id" label="打印编号"></el-table-column>
  1123. <el-table-column
  1124. fixed
  1125. prop="orderStatus"
  1126. label="打印时订单状态"
  1127. ></el-table-column>
  1128. <el-table-column
  1129. fixed
  1130. prop="isAppend"
  1131. label="打印状态是否补打"
  1132. ></el-table-column>
  1133. <el-table-column prop="createTime" label="打印时间"> </el-table-column>
  1134. </el-table>
  1135. <div style="text-align: center;margin-top: 10px;">
  1136. <el-pagination
  1137. @size-change="detailSizeChange"
  1138. @current-change="detailCurrentChange"
  1139. :page-sizes="[10, 20, 30, 40]"
  1140. :page-size="detailLimit"
  1141. :current-page="detailPage"
  1142. layout="total,sizes, prev, pager, next"
  1143. :total="detailData.totalCount"
  1144. >
  1145. </el-pagination>
  1146. </div>
  1147. <!-- <div class="btn">
  1148. <el-button type="primary" @click="exportAffirm">确定</el-button>
  1149. </div> -->
  1150. </el-dialog>
  1151. </el-tabs>
  1152. </template>
  1153. <script>
  1154. import dayjs from "dayjs";
  1155. export default {
  1156. data() {
  1157. return {
  1158. dialogVisible: false,
  1159. stationData: [], // 骑手站点数据
  1160. stationName: "",
  1161. spEarnings: [], // 商铺类型数据
  1162. couponType: "", // 优惠券类型
  1163. spEarningTypeId: "",
  1164. imageUrl: [],
  1165. limit: 10,
  1166. page: 1,
  1167. totalMoney: 0,
  1168. phone: "",
  1169. userName: "",
  1170. orderNumber: "",
  1171. transactionId: "", // 商户单号
  1172. status: "",
  1173. describes: "",
  1174. token: "",
  1175. taskNum: "",
  1176. taskMoney: "",
  1177. statesnum: [
  1178. {
  1179. label: "全部",
  1180. value: 0
  1181. },
  1182. {
  1183. label: "待接单",
  1184. value: 2
  1185. },
  1186. {
  1187. label: "制作中",
  1188. value: 6
  1189. },
  1190. {
  1191. label: "待送达",
  1192. value: 3
  1193. },
  1194. {
  1195. label: "已完成",
  1196. value: 4
  1197. },
  1198. {
  1199. label: "已下架",
  1200. value: 5
  1201. }
  1202. ],
  1203. taskstates: [
  1204. {
  1205. label: "全部",
  1206. value: ""
  1207. },
  1208. {
  1209. label: "待结算",
  1210. value: 0
  1211. },
  1212. {
  1213. label: "待支付",
  1214. value: 1
  1215. },
  1216. {
  1217. label: "已支付",
  1218. value: 15
  1219. },
  1220. {
  1221. label: "已退款",
  1222. value: 14
  1223. },
  1224. {
  1225. label: "商家待接单",
  1226. value: 7
  1227. },
  1228. {
  1229. label: "制作中",
  1230. value: 6
  1231. },
  1232. {
  1233. label: "待取餐/待配送", //待取餐、派送中
  1234. value: 3
  1235. },
  1236. {
  1237. label: "已完成",
  1238. value: 4
  1239. },
  1240. {
  1241. label: "已取消",
  1242. value: 5
  1243. },
  1244. {
  1245. label: "商家已拒单",
  1246. value: 8
  1247. }
  1248. ],
  1249. orderType: "",
  1250. orderTypes: [
  1251. {
  1252. label: "全部",
  1253. value: ""
  1254. },
  1255. {
  1256. label: "到店取餐",
  1257. value: 1
  1258. },
  1259. {
  1260. label: "骑手配送",
  1261. value: 2
  1262. },
  1263. {
  1264. label: "商家配送",
  1265. value: 3
  1266. }
  1267. ],
  1268. reservationFlag: "",
  1269. reservationFlags: [
  1270. {
  1271. label: "全部",
  1272. value: ""
  1273. },
  1274. {
  1275. label: "即时订单",
  1276. value: 0
  1277. },
  1278. {
  1279. label: "预约订单",
  1280. value: 1
  1281. }
  1282. ],
  1283. indentStatus: "",
  1284. indentStatuss: [
  1285. {
  1286. label: "全部",
  1287. value: ""
  1288. },
  1289. {
  1290. label: "已下单未支付",
  1291. value: 0
  1292. },
  1293. {
  1294. label: "超时关闭未支付订单",
  1295. value: 1
  1296. },
  1297. {
  1298. label: "已支付",
  1299. value: 2
  1300. },
  1301. {
  1302. label: "骑手已接单",
  1303. value: 3
  1304. },
  1305. {
  1306. label: "骑手已取货/购买",
  1307. value: 4
  1308. },
  1309. {
  1310. label: "订单已完成",
  1311. value: 6
  1312. },
  1313. {
  1314. label: "用户取消订单",
  1315. value: 8
  1316. },
  1317. {
  1318. label: "骑手取消订单",
  1319. value: 9
  1320. },
  1321. {
  1322. label: "骑手取消订单",
  1323. value: 10
  1324. },
  1325. {
  1326. label: "外卖订单下单后生成跑腿订单,只参与群聊,无法被接单",
  1327. value: 11
  1328. }
  1329. ],
  1330. shopId: "",
  1331. shopName: "",
  1332. shopList: "",
  1333. sort: 10,
  1334. id: "",
  1335. btnChangeEnable: true,
  1336. helpTakeId: "",
  1337. helpMaintainId: "",
  1338. content: "",
  1339. classifyIcon: "",
  1340. classifyId: "",
  1341. classifyUrl: "",
  1342. classifyName: "",
  1343. classifyDeatilsName: "",
  1344. formLabelWidth: "200px",
  1345. activeName: "first",
  1346. tableDataLoading: false,
  1347. tableDataLoading1: false,
  1348. dialogFormVisible: false,
  1349. dialogFormVisible1: false,
  1350. dialogFormVisible2: false,
  1351. dialogFormVisible3: false,
  1352. dialogFormVisible4: false,
  1353. dialogFormVisible5: false,
  1354. dialogFormVisible6: false,
  1355. dialogFormVisible7: false,
  1356. dialogFormVisible8: false,
  1357. tableData: [],
  1358. tableData2: {},
  1359. shopMoney: "", // 店铺总交易
  1360. form: {
  1361. id: "",
  1362. classifyName: "",
  1363. classifyUrl: "",
  1364. classifyIcon: "",
  1365. describes: ""
  1366. },
  1367. form2: {
  1368. id: "",
  1369. classifyDeatilsName: "",
  1370. classifyUrl: "",
  1371. classifyIcon: "",
  1372. taskNum: "",
  1373. taskMoney: ""
  1374. },
  1375. protectjieData: [],
  1376. protectpaiData: [],
  1377. helpTaskData: [],
  1378. safeguardData: [],
  1379. classifyData: [],
  1380. checkBoxData: [], //多选框选择的值
  1381. checkBoxData2: [], //多选框选择的值
  1382. chatConversationId: "",
  1383. userData: {},
  1384. limit1: 10,
  1385. page1: 1,
  1386. riderPhone: "",
  1387. // ····
  1388. userData: {},
  1389. phoneU: "",
  1390. campus: "",
  1391. ordersId: "",
  1392. limit1: 10,
  1393. page1: 1,
  1394. dialogFormVisibleP: false,
  1395. tableDataLoadingU: false,
  1396. // info: {
  1397. // stockDate: this.getNowTime(), //日期
  1398. // },
  1399. // info2: {
  1400. // stockDate2: this.getNowTime2(), //日期
  1401. // },
  1402. // info3: {
  1403. // stockDate3: this.getNowTime3(), //日期
  1404. // },
  1405. startTime: "",
  1406. endTime: "",
  1407. payStartTime: [
  1408. dayjs()
  1409. .subtract(6, "day").startOf('day')
  1410. .format("YYYY-MM-DD HH:mm:ss"),
  1411. dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
  1412. ], //支付开始时间
  1413. payEndTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
  1414. refundStartTime: "",
  1415. refundEndTime: "",
  1416. // 导出限制
  1417. exportTitle: "导出错误",
  1418. exportVisible: false,
  1419. exportFlag: 1, //1 超出限制 2导出中
  1420. // 打印小票明细
  1421. detailVisible: false,
  1422. detailLoading: false,
  1423. detailData: {},
  1424. detailId: "",
  1425. detailLimit: 10,
  1426. detailPage: 1,
  1427. // 骑手明细
  1428. dialogFormVisibleQS: false,
  1429. tableDataLoadingQS: false,
  1430. riderData: [],
  1431. orderIdQS: "",
  1432. pageQS: 1,
  1433. limitQS: 10,
  1434. totalCountQS: 8
  1435. };
  1436. },
  1437. methods: {
  1438. // 站点下拉框
  1439. stationList() {
  1440. this.$http({
  1441. url: this.$http.adornUrl("admin/riderStation/stationList"),
  1442. method: "get",
  1443. params: this.$http.adornParams({})
  1444. }).then(({ data }) => {
  1445. console.log(data, "站点下拉框");
  1446. this.stationData = data.data;
  1447. });
  1448. },
  1449. shopTypeList() {
  1450. this.$http({
  1451. url: this.$http.adornUrl("admin/shoptype/selectShopTypeList"),
  1452. method: "get",
  1453. params: this.$http.adornParams({
  1454. page: 1,
  1455. limit: 1000
  1456. })
  1457. }).then(({ data }) => {
  1458. console.log(data, "商铺类型");
  1459. let returnData = data.data.list;
  1460. this.spEarnings = returnData;
  1461. });
  1462. },
  1463. // 订单跳转到短信界面
  1464. orderSkip(row) {
  1465. console.log(row.indentId);
  1466. console.log(row.orderTypeExtra, "2 骑手配送,3 商家配送");
  1467. if (row.indentId) {
  1468. // 2 骑手配送
  1469. if (row.orderTypeExtra == 2) {
  1470. this.$router.push({
  1471. path: "/duanxinlistRun",
  1472. query: {
  1473. indentId: row.indentId
  1474. }
  1475. });
  1476. }
  1477. // 3 商家配送
  1478. else if (row.orderTypeExtra == 3) {
  1479. this.$router.push({
  1480. path: "/shopduanxinlistRun",
  1481. query: {
  1482. indentId: row.indentId
  1483. }
  1484. });
  1485. } else {
  1486. // 到店取餐无短信记录
  1487. this.$message({
  1488. message: "无短信记录",
  1489. type: "warning",
  1490. duration: 1500
  1491. });
  1492. }
  1493. } else {
  1494. // 到店取餐无短信记录
  1495. this.$message({
  1496. message: "无短信记录",
  1497. type: "warning",
  1498. duration: 1500
  1499. });
  1500. }
  1501. },
  1502. // 详情跳转
  1503. updates(userId) {
  1504. this.$router.push({
  1505. path: "/userDetail",
  1506. query: {
  1507. userId: userId
  1508. }
  1509. });
  1510. },
  1511. // 详情跳转
  1512. details(row) {
  1513. if (!row.shopId) {
  1514. }
  1515. let userId = row.userId ? row.userId : row.riderId;
  1516. this.$router.push({
  1517. path: "/userDetail",
  1518. query: {
  1519. userId: userId
  1520. }
  1521. });
  1522. },
  1523. // 图标上传一级分类
  1524. handleAvatarSuccess(file) {
  1525. this.classifyIcon = file.data;
  1526. },
  1527. // 图标上传一级分类编辑
  1528. handleAvatarSuccess2(file) {
  1529. this.form.classifyIcon = file.data;
  1530. },
  1531. // 多选
  1532. changeFun(val) {
  1533. this.checkBoxData = val;
  1534. },
  1535. // 多选
  1536. changeFun2(val) {
  1537. this.checkBoxData2 = val;
  1538. },
  1539. handleSizeChange(val) {
  1540. this.limit = val;
  1541. this.dataSelect();
  1542. },
  1543. handleCurrentChange(val) {
  1544. this.page = val;
  1545. this.dataSelect();
  1546. },
  1547. handleSizeChange2(val) {
  1548. this.limit = val;
  1549. this.classifySelect();
  1550. },
  1551. handleCurrentChange2(val) {
  1552. this.page = val;
  1553. this.classifySelect();
  1554. },
  1555. handleSizeChange3(val) {
  1556. this.limit = val;
  1557. this.taskdataSelect();
  1558. },
  1559. handleCurrentChange3(val) {
  1560. this.page = val;
  1561. this.taskdataSelect();
  1562. },
  1563. handleSizeChange1(val) {
  1564. this.limit1 = val;
  1565. this.neirongSelect(this.chatConversationId);
  1566. },
  1567. handleCurrentChange1(val) {
  1568. this.page1 = val;
  1569. this.neirongSelect(this.chatConversationId);
  1570. },
  1571. // tabs切换
  1572. handleClick(tab, event) {
  1573. if (tab._props.label == "订单管理") {
  1574. this.page = 1;
  1575. this.limit = 10;
  1576. this.taskdataSelect();
  1577. }
  1578. },
  1579. // 下架
  1580. soldClick(row) {
  1581. this.$confirm(`确定要下架此任务?`, "提示", {
  1582. confirmButtonText: "确定",
  1583. cancelButtonText: "取消",
  1584. type: "warning"
  1585. })
  1586. .then(() => {
  1587. this.$http({
  1588. url: this.$http.adornUrl(
  1589. `help/outHelpOrder/?helpOrderId=${row.id}`
  1590. ),
  1591. method: "post",
  1592. data: this.$http.adornData({})
  1593. }).then(({ data }) => {
  1594. if (data.code == 0) {
  1595. this.$message({
  1596. message: "操作成功",
  1597. type: "success",
  1598. duration: 1500,
  1599. onClose: () => {
  1600. this.dataSelect();
  1601. }
  1602. });
  1603. } else {
  1604. this.$message({
  1605. message: data.msg,
  1606. type: "error",
  1607. duration: 1500,
  1608. onClose: () => {
  1609. this.dataSelect();
  1610. }
  1611. });
  1612. }
  1613. });
  1614. })
  1615. .catch(() => {});
  1616. },
  1617. //查看照片
  1618. refund(e) {
  1619. this.imageUrl = [];
  1620. if (e.image != null) {
  1621. let img = e.image.split(",");
  1622. if (img.length != 0) {
  1623. this.imageUrl = img;
  1624. }
  1625. }
  1626. this.dialogVisible = true;
  1627. },
  1628. handleClose(done) {
  1629. // this.$confirm('确认关闭?')
  1630. // .then(_ => {
  1631. done();
  1632. // })
  1633. // .catch(_ => {});
  1634. },
  1635. // 添加一级分类弹框
  1636. classifyStair() {
  1637. this.dialogFormVisible = true;
  1638. },
  1639. // 添加一级分类确定
  1640. StairNoticeTo() {
  1641. if (this.classifyName == "") {
  1642. this.$notify({
  1643. title: "提示",
  1644. duration: 1800,
  1645. message: "请输入分类名称",
  1646. type: "warning"
  1647. });
  1648. return;
  1649. }
  1650. // if (this.classifyUrl == '') {
  1651. // this.$notify({
  1652. // title: '提示',
  1653. // duration: 1800,
  1654. // message: '请输入分类链接',
  1655. // type: 'warning'
  1656. // });
  1657. // return
  1658. // }
  1659. if (this.describes == "") {
  1660. this.$notify({
  1661. title: "提示",
  1662. duration: 1800,
  1663. message: "请输入分类描述",
  1664. type: "warning"
  1665. });
  1666. return;
  1667. }
  1668. if (this.classifyIcon == "") {
  1669. this.$notify({
  1670. title: "提示",
  1671. duration: 1800,
  1672. message: "请上传分类图标",
  1673. type: "warning"
  1674. });
  1675. return;
  1676. }
  1677. this.$http({
  1678. url: this.$http.adornUrl("helpClassify/saveHelpClassify"),
  1679. method: "post",
  1680. data: this.$http.adornData({
  1681. classifyName: this.classifyName,
  1682. state: this.state,
  1683. sort: this.sort,
  1684. classifyIcon: this.classifyIcon,
  1685. classifyUrl: this.classifyUrl,
  1686. describes: this.describes
  1687. })
  1688. }).then(({ data }) => {
  1689. this.dialogFormVisible = false;
  1690. this.$message({
  1691. message: "一级分类添加成功",
  1692. type: "success",
  1693. duration: 1500,
  1694. onClose: () => {
  1695. this.classifyUrl = "";
  1696. this.classifyName = "";
  1697. this.classifyIcon = "";
  1698. this.describes = "";
  1699. this.classifySelect();
  1700. }
  1701. });
  1702. });
  1703. },
  1704. // 修改一级分类
  1705. compile(index, rows) {
  1706. this.dialogFormVisible2 = true;
  1707. this.form.id = rows.id;
  1708. this.form.classifyName = rows.classifyName;
  1709. this.form.classifyUrl = rows.classifyUrl;
  1710. this.form.classifyIcon = rows.classifyIcon;
  1711. this.form.describes = rows.describes;
  1712. },
  1713. // 修改一级分类确定
  1714. CompileNoticeTo() {
  1715. if (this.form.classifyName == "") {
  1716. this.$notify({
  1717. title: "提示",
  1718. duration: 1800,
  1719. message: "请输入分类名称",
  1720. type: "warning"
  1721. });
  1722. return;
  1723. }
  1724. if (this.form.describes == "") {
  1725. this.$notify({
  1726. title: "提示",
  1727. duration: 1800,
  1728. message: "请输入分类描述",
  1729. type: "warning"
  1730. });
  1731. return;
  1732. }
  1733. if (this.form.classifyIcon == "") {
  1734. this.$notify({
  1735. title: "提示",
  1736. duration: 1800,
  1737. message: "请上传分类图标",
  1738. type: "warning"
  1739. });
  1740. return;
  1741. }
  1742. this.$http({
  1743. url: this.$http.adornUrl("helpClassify/updateHelpClassify"),
  1744. method: "post",
  1745. data: this.$http.adornData({
  1746. id: this.form.id,
  1747. classifyName: this.form.classifyName,
  1748. classifyUrl: this.form.classifyUrl,
  1749. classifyIcon: this.form.classifyIcon,
  1750. describes: this.form.describes
  1751. })
  1752. }).then(({ data }) => {
  1753. this.dialogFormVisible2 = false;
  1754. this.$message({
  1755. message: "操作成功",
  1756. type: "success",
  1757. duration: 1500,
  1758. onClose: () => {
  1759. this.classifySelect();
  1760. }
  1761. });
  1762. });
  1763. },
  1764. //删除一级
  1765. deleteStair(row) {
  1766. let delid = row.id;
  1767. this.$confirm(`确定删除此条信息?`, "提示", {
  1768. confirmButtonText: "确定",
  1769. cancelButtonText: "取消",
  1770. type: "warning"
  1771. })
  1772. .then(() => {
  1773. this.$http({
  1774. url: this.$http.adornUrl(
  1775. `helpClassify/deleteClassifyById/?id=${delid}`
  1776. ),
  1777. method: "post",
  1778. data: this.$http.adornData({})
  1779. }).then(({ data }) => {
  1780. this.$message({
  1781. message: "删除成功",
  1782. type: "success",
  1783. duration: 1500,
  1784. onClose: () => {
  1785. this.name = "";
  1786. this.classifySelect();
  1787. }
  1788. });
  1789. });
  1790. })
  1791. .catch(() => {});
  1792. },
  1793. // 手机号搜索
  1794. phoneSelect() {
  1795. this.page = 1;
  1796. this.limit = 10;
  1797. this.taskdataSelect();
  1798. },
  1799. // 重置
  1800. cleans2() {
  1801. // const data=this.$route.query;
  1802. // if(data.refund){
  1803. // delete this.$router.push({query:{}}) // 删除页面参数
  1804. // }
  1805. this.page = 1;
  1806. this.phone = "";
  1807. this.riderPhone = "";
  1808. this.userName = "";
  1809. this.orderNumber = "";
  1810. this.transactionId = "";
  1811. this.status = "";
  1812. this.shopName = "";
  1813. this.reservationFlag = "";
  1814. this.indentStatus = "";
  1815. this.orderType = "";
  1816. this.startTime = "";
  1817. this.endTime = "";
  1818. this.refundStartTime = "";
  1819. this.refundEndTime = "";
  1820. this.payStartTime = [
  1821. dayjs()
  1822. .subtract(6, "day").startOf('day')
  1823. .format("YYYY-MM-DD HH:mm:ss"),
  1824. dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
  1825. ];
  1826. this.payEndTime = dayjs().format("YYYY-MM-DD");
  1827. this.stationName = "";
  1828. this.spEarningTypeId = "";
  1829. this.couponType = "";
  1830. this.taskdataSelect();
  1831. },
  1832. // 查询
  1833. select() {
  1834. this.page = 1;
  1835. this.limit = 10;
  1836. this.dataSelect();
  1837. },
  1838. // 重置
  1839. cleans() {
  1840. this.phone = "";
  1841. this.status = 0;
  1842. this.content = "";
  1843. this.dataSelect();
  1844. },
  1845. // select选择事件
  1846. animeDat(state) {
  1847. this.dataSelect();
  1848. },
  1849. animeDat2(state) {
  1850. // this.$router.replace({ refund: '' })
  1851. this.page = 1;
  1852. this.taskdataSelect();
  1853. },
  1854. // 获取派单数据列表
  1855. dataSelect() {
  1856. this.tableDataLoading = true;
  1857. this.$http({
  1858. url: this.$http.adornUrl("help/selectStatusHelpOrder"),
  1859. method: "get",
  1860. params: this.$http.adornParams({
  1861. page: this.page,
  1862. limit: this.limit,
  1863. phone: this.phone,
  1864. status: this.status,
  1865. content: this.content
  1866. })
  1867. }).then(({ data }) => {
  1868. this.tableDataLoading = false;
  1869. let returnData = data.data;
  1870. this.tableData = returnData;
  1871. });
  1872. },
  1873. // 获取数据列表
  1874. taskdataSelect() {
  1875. console.log(this.refundStartTime);
  1876. this.totalMoney = 0;
  1877. this.tableDataLoading = true;
  1878. this.$http({
  1879. url: this.$http.adornUrl("admin/order/selectAllOrderAdmin"),
  1880. method: "get",
  1881. params: this.$http.adornParams({
  1882. page: this.page,
  1883. limit: this.limit,
  1884. phone: this.phone,
  1885. userName: this.userName,
  1886. orderNumber: this.orderNumber,
  1887. transactionId: this.transactionId,
  1888. status: this.status,
  1889. shopName: this.shopName,
  1890. orderType: this.orderType,
  1891. reservationFlag: this.reservationFlag,
  1892. indentStatus: this.indentStatus,
  1893. riderPhone: this.riderPhone,
  1894. startTime: this.startTime ? this.startTime[0] : "",
  1895. endTime: this.startTime ? this.startTime[1] : "",
  1896. refundStartTime: this.refundStartTime ? this.refundStartTime[0] : "",
  1897. refundEndTime: this.refundStartTime ? this.refundStartTime[1] : "",
  1898. payStartTime: this.payStartTime ? this.payStartTime[0] : "",
  1899. payEndTime: this.payStartTime ? this.payStartTime[1] : "",
  1900. riderStationId: this.stationName,
  1901. shopTypeId: this.spEarningTypeId,
  1902. couponType: this.couponType
  1903. })
  1904. }).then(({ data }) => {
  1905. console.log(data, "订单中心");
  1906. if (data.code == 0) {
  1907. this.tableDataLoading = false;
  1908. let returnData = data.data;
  1909. this.tableData2 = returnData;
  1910. console.log(this.tableData2, "hhhhh");
  1911. for (var i in this.tableData2.list) {
  1912. this.tableData2.list[i].goodsPriceZ = 0;
  1913. this.totalMoney =
  1914. Number(this.totalMoney) +
  1915. Number(this.tableData2.list[i].payMoney);
  1916. if (this.tableData2.list[i].address) {
  1917. this.tableData2.list[i].address = JSON.parse(
  1918. this.tableData2.list[i].address
  1919. );
  1920. }
  1921. for (var j in this.tableData2.list[i].orderGoodsList) {
  1922. this.tableData2.list[i].orderGoodsList[j].goodsPriceZ =
  1923. this.tableData2.list[i].orderGoodsList[j].goodsPrice *
  1924. this.tableData2.list[i].orderGoodsList[j].goodsNum;
  1925. this.tableData2.list[i].goodsPriceZ =
  1926. this.tableData2.list[i].goodsPriceZ +
  1927. this.tableData2.list[i].orderGoodsList[j].goodsPriceZ;
  1928. }
  1929. }
  1930. this.totalMoney = this.totalMoney.toFixed(2);
  1931. console.log(data.data.totalCount, "此时间段暂无数据");
  1932. if (!data.data.totalCount) {
  1933. this.$message({
  1934. message: "此时间段暂无数据",
  1935. type: "success",
  1936. duration: 1500,
  1937. onClose: () => {}
  1938. });
  1939. }
  1940. } else {
  1941. this.$message({
  1942. message: data.msg,
  1943. type: "error",
  1944. duration: 1500,
  1945. onClose: () => {}
  1946. });
  1947. }
  1948. });
  1949. // this.$http({
  1950. // url: this.$http.adornUrl("admin/order/selectAllOrderTotalPrice"),
  1951. // method: "get",
  1952. // params: this.$http.adornParams({
  1953. // page: this.page,
  1954. // limit: this.limit,
  1955. // phone: this.phone,
  1956. // userName: this.userName,
  1957. // orderNumber: this.orderNumber,
  1958. // status: this.status,
  1959. // shopName: this.shopName,
  1960. // orderType: this.orderType,
  1961. // reservationFlag: this.reservationFlag,
  1962. // indentStatus: this.indentStatus,
  1963. // riderPhone: this.riderPhone,
  1964. // startTime: this.startTime,
  1965. // endTime: this.endTime,
  1966. // payStartTime: this.payStartTime,
  1967. // payEndTime: this.payEndTime,
  1968. // riderStationId: this.stationName,
  1969. // shopTypeId:this.spEarningTypeId,
  1970. // couponType:this.couponType
  1971. // })
  1972. // }).then(({ data }) => {
  1973. // this.shopMoney=data.data
  1974. // console.log(data,'店铺总交易金额');
  1975. // })
  1976. },
  1977. // 商铺列表
  1978. classifySelect() {
  1979. this.tableDataLoading = true;
  1980. this.$http({
  1981. url: this.$http.adornUrl("admin/goods/selectAllShopList"),
  1982. method: "get",
  1983. params: this.$http.adornParams({})
  1984. }).then(({ data }) => {
  1985. this.tableDataLoading = false;
  1986. let returnData = data.data;
  1987. this.shopList = returnData;
  1988. });
  1989. },
  1990. // 餐品完成
  1991. wancheng(row) {
  1992. if (row.status == 3) {
  1993. var status1 = 4;
  1994. }
  1995. if (row.status == 6) {
  1996. var status1 = 3;
  1997. }
  1998. this.$http({
  1999. url: this.$http.adornUrl("admin/order/updateOrder"),
  2000. method: "post",
  2001. data: this.$http.adornData({
  2002. status: status1,
  2003. orderId: row.orderId,
  2004. orderNumber: row.orderNumber
  2005. })
  2006. }).then(({ data }) => {
  2007. if (data.code == 0) {
  2008. this.$message({
  2009. message: "操作成功",
  2010. type: "success",
  2011. duration: 1500,
  2012. onClose: () => {
  2013. this.taskdataSelect();
  2014. }
  2015. });
  2016. } else {
  2017. this.$message({
  2018. message: data.msg,
  2019. type: "warning",
  2020. duration: 1500,
  2021. onClose: () => {}
  2022. });
  2023. }
  2024. });
  2025. },
  2026. // 退款
  2027. tuikuan(row) {
  2028. console.log("退款");
  2029. this.$confirm(`确定要退款?`, "提示", {
  2030. confirmButtonText: "确定",
  2031. cancelButtonText: "取消",
  2032. type: "warning"
  2033. })
  2034. .then(() => {
  2035. console.log("取定");
  2036. this.$http({
  2037. url: this.$http.adornUrl("admin/order/adminCancelOrder"),
  2038. method: "post",
  2039. params: this.$http.adornParams({
  2040. orderId: row.orderId
  2041. })
  2042. }).then(({ data }) => {
  2043. if (data.code == 0) {
  2044. this.$message({
  2045. message: "操作成功",
  2046. type: "success",
  2047. duration: 1500,
  2048. onClose: () => {
  2049. this.taskdataSelect();
  2050. }
  2051. });
  2052. } else {
  2053. this.$message({
  2054. message: data.msg,
  2055. type: "error",
  2056. duration: 1500,
  2057. onClose: () => {}
  2058. });
  2059. }
  2060. });
  2061. })
  2062. .catch(() => {
  2063. console.log("取消");
  2064. });
  2065. },
  2066. // 打印小票
  2067. dayin(row) {
  2068. this.$http({
  2069. url: this.$http.adornUrl("admin/order/print"),
  2070. method: "post",
  2071. params: this.$http.adornParams({
  2072. orderId: row.orderId,
  2073. isAppend: 1 // 1 默认补打
  2074. })
  2075. }).then(({ data }) => {
  2076. if (data.code == 0) {
  2077. this.$message({
  2078. message: "操作成功",
  2079. type: "success",
  2080. duration: 1500,
  2081. onClose: () => {
  2082. this.taskdataSelect();
  2083. }
  2084. });
  2085. } else {
  2086. this.$message({
  2087. message: data.msg,
  2088. type: "warning",
  2089. duration: 1500,
  2090. onClose: () => {}
  2091. });
  2092. }
  2093. });
  2094. },
  2095. // 聊天内容
  2096. complainDetails(row) {
  2097. this.chatConversationId = row.orderId;
  2098. this.neirongSelect(this.chatConversationId);
  2099. this.dialogFormVisible = true;
  2100. },
  2101. select1() {
  2102. this.page1 = 1;
  2103. this.neirongSelect(this.chatConversationId);
  2104. },
  2105. // 重置
  2106. cleans1() {
  2107. this.content = "";
  2108. this.page1 = 1;
  2109. this.neirongSelect(this.chatConversationId);
  2110. },
  2111. // 获取聊天内容列表
  2112. neirongSelect(chatConversationId) {
  2113. this.tableDataLoading1 = true;
  2114. this.$http({
  2115. url: this.$http.adornUrl("shop/ordersChat/selectGameChatDetails"),
  2116. method: "get",
  2117. params: this.$http.adornParams({
  2118. page: this.page1,
  2119. limit: this.limit1,
  2120. ordersId: this.chatConversationId,
  2121. content: this.content
  2122. })
  2123. }).then(({ data }) => {
  2124. this.tableDataLoading1 = false;
  2125. let returnData = data.data;
  2126. this.userData = returnData;
  2127. });
  2128. },
  2129. //删除聊天
  2130. deleteuser(row) {
  2131. // let delid = row.userId
  2132. this.$confirm(`确定删除此条信息?`, "提示", {
  2133. confirmButtonText: "确定",
  2134. cancelButtonText: "取消",
  2135. type: "warning"
  2136. }).then(() => {
  2137. this.$http({
  2138. url: this.$http.adornUrl(
  2139. "shop/ordersChat/deleteOrdersChat?chatContentId=" +
  2140. row.chatContentId
  2141. ),
  2142. method: "post",
  2143. params: this.$http.adornParams({})
  2144. }).then(({ data }) => {
  2145. if (data.code == 0) {
  2146. this.$message({
  2147. message: "删除成功",
  2148. type: "success",
  2149. duration: 1500,
  2150. onClose: () => {
  2151. this.neirongSelect(this.chatConversationId);
  2152. }
  2153. });
  2154. } else {
  2155. this.$message({
  2156. message: data.msg,
  2157. type: "warning",
  2158. duration: 1500,
  2159. onClose: () => {}
  2160. });
  2161. }
  2162. });
  2163. });
  2164. },
  2165. handleSizeChangeU(val) {
  2166. this.limit1 = val;
  2167. this.dataSelectUser()();
  2168. },
  2169. handleCurrentChangeU(val) {
  2170. this.page1 = val;
  2171. this.dataSelectUser();
  2172. },
  2173. // 转单弹框
  2174. zhuandan(row) {
  2175. this.ordersId = row.indentId;
  2176. this.page1 = 1;
  2177. this.phoneU = "";
  2178. this.campus = "";
  2179. this.dataSelectUser();
  2180. this.dialogFormVisibleP = true;
  2181. },
  2182. // 确认选择
  2183. userBtns(row) {
  2184. this.$http({
  2185. url: this.$http.adornUrl("admin/tbindent/transferOfOrder"),
  2186. method: "post",
  2187. params: this.$http.adornParams({
  2188. riderUserId: row.userId,
  2189. indentId: this.ordersId
  2190. })
  2191. }).then(({ data }) => {
  2192. if (data.code == 0) {
  2193. this.$message({
  2194. message: "操作成功",
  2195. type: "success",
  2196. duration: 1500,
  2197. onClose: () => {
  2198. this.taskdataSelect();
  2199. this.dialogFormVisibleP = false;
  2200. }
  2201. });
  2202. } else {
  2203. if (data.msg == "订单状态发生变更,请刷新后重试!") {
  2204. this.$message({
  2205. message: "当前订单状态不支持转单",
  2206. type: "warning",
  2207. duration: 1500,
  2208. onClose: () => {}
  2209. });
  2210. } else {
  2211. this.$message({
  2212. message: data.msg,
  2213. type: "warning",
  2214. duration: 1500,
  2215. onClose: () => {}
  2216. });
  2217. }
  2218. }
  2219. });
  2220. },
  2221. // 获取数据列表
  2222. dataSelectUser() {
  2223. this.tableDataLoadingU = true;
  2224. this.$http({
  2225. url: this.$http.adornUrl("user/selectUserList"),
  2226. method: "get",
  2227. params: this.$http.adornParams({
  2228. page: this.page1,
  2229. limit: this.limit1,
  2230. // 'member': this.member,
  2231. phone: this.phoneU,
  2232. nickName: this.campus,
  2233. type: 2,
  2234. isVip: "",
  2235. platform: "",
  2236. shopAdminFlag: this.shopAdminFlag
  2237. })
  2238. }).then(({ data }) => {
  2239. this.tableDataLoadingU = false;
  2240. let returnData = data.data;
  2241. this.userData = returnData;
  2242. });
  2243. },
  2244. // 查询
  2245. selectU() {
  2246. this.page = 1;
  2247. this.dataSelectUser();
  2248. },
  2249. // 重置
  2250. cleansU() {
  2251. this.page1 = 1;
  2252. this.campus = "";
  2253. this.phoneU = "";
  2254. this.dataSelectUser();
  2255. },
  2256. // 打印小票明细 (-------------------------------------------------------)
  2257. detailClick(row) {
  2258. this.detailVisible = true;
  2259. this.detailLoading = true;
  2260. this.detailId = row ? row.orderId : this.detailId;
  2261. this.$http({
  2262. url: this.$http.adornUrl("admin/printInfo/getOrderPrintDetailList"),
  2263. method: "get",
  2264. params: this.$http.adornParams({
  2265. page: this.detailPage,
  2266. limit: this.detailLimit,
  2267. orderId: this.detailId
  2268. })
  2269. }).then(({ data }) => {
  2270. console.log(data, "打印小票明细");
  2271. this.detailLoading = false;
  2272. let returnData = data.data;
  2273. this.detailData = returnData;
  2274. });
  2275. },
  2276. detailSizeChange(val) {
  2277. this.detailLimit = val;
  2278. this.detailClick();
  2279. },
  2280. detailCurrentChange(val) {
  2281. this.detailPage = val;
  2282. this.detailClick();
  2283. },
  2284. // 骑手明细 (-------------------------------------------------------)
  2285. riderListData() {
  2286. this.dialogFormVisibleQS = true;
  2287. this.$http({
  2288. url: this.$http.adornUrl("admin/transferRecord/queryTransferRecords"),
  2289. method: "get",
  2290. params: this.$http.adornParams({
  2291. page: this.pageQS,
  2292. limit: this.limitQS,
  2293. orderId: this.orderIdQS
  2294. })
  2295. }).then(({ data }) => {
  2296. console.log(data, "骑手明细");
  2297. this.tableDataLoadingQS = false;
  2298. this.riderData = data.data.list;
  2299. this.totalCountQS = data.data.totalCount;
  2300. });
  2301. },
  2302. riderDetail(row) {
  2303. this.orderIdQS = row.orderId;
  2304. this.riderListData();
  2305. },
  2306. handleSizeChangeQS(val) {
  2307. this.limitQS = val;
  2308. this.riderListData();
  2309. },
  2310. handleCurrentChangeQS(val) {
  2311. this.pageQS = val;
  2312. this.riderListData();
  2313. },
  2314. // 导出
  2315. // exportBtn() {
  2316. // var userId = this.$cookie.get('userId')
  2317. // this.$http({
  2318. // url: this.$http.adornUrl("admin/export/excelOrder"),
  2319. // method: "get",
  2320. // // responseType: "blob",
  2321. // params: this.$http.adornParams({
  2322. // // 'page': page,
  2323. // // 'size': this.size,
  2324. // userId:userId,
  2325. // phone: this.phone,
  2326. // userName: this.userName,
  2327. // orderNumber: this.orderNumber,
  2328. // status: this.status,
  2329. // shopName: this.shopName,
  2330. // orderSequence: this.orderSequence,
  2331. // orderType: this.orderType,
  2332. // reservationFlag: this.reservationFlag,
  2333. // indentStatus: this.indentStatus,
  2334. // riderPhone: this.riderPhone,
  2335. // startTime: this.startTime,
  2336. // endTime: this.endTime,
  2337. // payStartTime: this.payStartTime,
  2338. // payEndTime: this.payEndTime
  2339. // })
  2340. // }).then(({ data }) => {
  2341. // console.log(data, "导出");
  2342. // // let blob = new Blob([data], {
  2343. // // type:
  2344. // // "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  2345. // // });
  2346. // // if (window.navigator.msSaveOrOpenBlob) {
  2347. // // navigator.msSaveBlob(blob);
  2348. // // } else {
  2349. // // let url = window.URL.createObjectURL(blob);
  2350. // // let elink = document.createElement("a");
  2351. // // elink.download = "订单列表.xlsx";
  2352. // // elink.style.display = "none";
  2353. // // elink.href = url;
  2354. // // document.body.appendChild(elink);
  2355. // // elink.click();
  2356. // // document.body.removeChild(elink);
  2357. // // }
  2358. // });
  2359. // },
  2360. exportList() {
  2361. console.log(this.tableData2.totalCount, "导出条数");
  2362. this.exportTitle = "导出";
  2363. // this.exportFlag = 4;
  2364. this.exportVisible = true;
  2365. if (this.tableData2.totalCount >= 50000) {
  2366. this.exportTitle = "导出错误";
  2367. this.exportFlag = 1;
  2368. } else {
  2369. this.exportTitle = "导出";
  2370. this.exportFlag = 2;
  2371. this.exportVisible = true;
  2372. var userId = this.$cookie.get("userId");
  2373. this.$http({
  2374. url: this.$http.adornUrl("admin/export/excelOrder"),
  2375. method: "get",
  2376. // responseType: "blob",
  2377. params: this.$http.adornParams({
  2378. // 'page': page,
  2379. // 'size': this.size,
  2380. userId: userId,
  2381. phone: this.phone,
  2382. userName: this.userName,
  2383. orderNumber: this.orderNumber,
  2384. transactionId: this.transactionId,
  2385. status: this.status,
  2386. shopName: this.shopName,
  2387. orderSequence: this.orderSequence,
  2388. orderType: this.orderType,
  2389. reservationFlag: this.reservationFlag,
  2390. indentStatus: this.indentStatus,
  2391. riderPhone: this.riderPhone,
  2392. startTime: this.startTime ? this.startTime[0] : "",
  2393. endTime: this.startTime ? this.startTime[1] : "",
  2394. payStartTime: this.payStartTime ? this.payStartTime[0] : "",
  2395. payEndTime: this.payStartTime ? this.payStartTime[1] : "",
  2396. refundStartTime: this.refundStartTime
  2397. ? this.refundStartTime[0]
  2398. : "",
  2399. refundEndTime: this.refundStartTime ? this.refundStartTime[1] : "",
  2400. riderStationId: this.stationName,
  2401. shopTypeId: this.spEarningTypeId,
  2402. couponType: this.couponType
  2403. })
  2404. }).then(({ data }) => {
  2405. console.log(data, "导出");
  2406. if (data.code == 0) {
  2407. this.exportTitle = "导出成功";
  2408. this.exportFlag = 3;
  2409. }
  2410. // let blob = new Blob([data], {
  2411. // type:
  2412. // "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  2413. // });
  2414. // if (window.navigator.msSaveOrOpenBlob) {
  2415. // navigator.msSaveBlob(blob);
  2416. // } else {
  2417. // let url = window.URL.createObjectURL(blob);
  2418. // let elink = document.createElement("a");
  2419. // elink.download = "订单列表.xlsx";
  2420. // elink.style.display = "none";
  2421. // elink.href = url;
  2422. // document.body.appendChild(elink);
  2423. // elink.click();
  2424. // document.body.removeChild(elink);
  2425. // }
  2426. });
  2427. }
  2428. },
  2429. exportAffirm() {
  2430. this.exportVisible = false;
  2431. },
  2432. getPath() {
  2433. console.log("监控路由获取参数", this.$route.params);
  2434. if (this.$route.params.type == "platform") {
  2435. console.log(this.$route.params, "平台-钩子中获取参数");
  2436. if (this.$route.params.refund == 14) {
  2437. this.status = this.$route.params.refund;
  2438. this.payStartTime = "";
  2439. // this.payEndTime = "";
  2440. this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2441. // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
  2442. this.taskdataSelect();
  2443. } else if (this.$route.params.refund == 15) {
  2444. this.status = this.$route.params.refund;
  2445. this.payStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2446. // this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
  2447. this.refundStartTime = "";
  2448. // this.refundEndTime = "";
  2449. this.taskdataSelect();
  2450. } else {
  2451. this.status = "";
  2452. this.refundStartTime = "";
  2453. // this.refundEndTime = "";
  2454. this.payStartTime = "";
  2455. // this.payEndTime = "";
  2456. this.taskdataSelect();
  2457. }
  2458. } else if (this.$route.params.type == "shop") {
  2459. if (this.$route.params.refund == 14) {
  2460. console.log(this.$route.params, "商家-钩子中获取参数");
  2461. this.status = this.$route.params.refund;
  2462. this.payStartTime = "";
  2463. // this.payEndTime = "";
  2464. this.shopName = this.$route.params.shopName;
  2465. this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2466. // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
  2467. this.taskdataSelect();
  2468. }
  2469. } else {
  2470. this.status = "";
  2471. this.shopName = "";
  2472. this.refundStartTime = "";
  2473. // this.refundEndTime = "";
  2474. this.payStartTime = [
  2475. dayjs()
  2476. .subtract(6, "day").startOf('day')
  2477. .format("YYYY-MM-DD HH:mm:ss"),
  2478. dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
  2479. ];
  2480. // this.payEndTime = dayjs().format("YYYY-MM-DD");
  2481. // this.taskdataSelect();
  2482. }
  2483. }
  2484. },
  2485. watch: {
  2486. $route: "getPath"
  2487. },
  2488. beforeMount() {},
  2489. mounted() {
  2490. // this.classifySelect()
  2491. // this.taskdataSelect();
  2492. this.stationList();
  2493. this.shopTypeList();
  2494. // let endTime=dayjs().format('YYYY-MM-DD')
  2495. // let startTime=dayjs().subtract(6, 'day').format('YYYY-MM-DD')
  2496. // console.log(startTime,endTime);
  2497. this.$nextTick(() => {
  2498. if (this.$route.params.type == "platform") {
  2499. console.log(this.$route.params, "平台-钩子中获取参数");
  2500. if (this.$route.params.refund == 14) {
  2501. this.status = this.$route.params.refund;
  2502. this.payStartTime = "";
  2503. // this.payEndTime = "";
  2504. this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2505. // this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
  2506. // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
  2507. this.taskdataSelect();
  2508. } else if (this.$route.params.refund == 15) {
  2509. this.status = this.$route.params.refund;
  2510. this.payStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2511. // this.payStartTime = this.$route.params.dayId + " " + "00:00:00";
  2512. // this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
  2513. this.refundStartTime = "";
  2514. // this.refundEndTime = "";
  2515. this.taskdataSelect();
  2516. } else {
  2517. this.status = "";
  2518. this.refundStartTime = "";
  2519. // this.refundEndTime = "";
  2520. this.payStartTime = "";
  2521. // this.payEndTime = "";
  2522. this.taskdataSelect();
  2523. }
  2524. } else if (this.$route.params.type == "shop") {
  2525. if (this.$route.params.refund == 14) {
  2526. console.log(this.$route.params, "商家-钩子中获取参数");
  2527. this.status = this.$route.params.refund;
  2528. this.payStartTime = "";
  2529. // this.payEndTime = "";
  2530. this.shopName = this.$route.params.shopName;
  2531. this.refundStartTime =[ this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
  2532. // this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
  2533. // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
  2534. this.taskdataSelect();
  2535. }
  2536. } else {
  2537. this.status = "";
  2538. this.shopName = "";
  2539. this.refundStartTime = "";
  2540. // this.refundEndTime = "";
  2541. this.payStartTime = [
  2542. dayjs()
  2543. .subtract(6, "day").startOf('day')
  2544. .format("YYYY-MM-DD HH:mm:ss"),
  2545. dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
  2546. ];
  2547. // this.payEndTime = dayjs().format("YYYY-MM-DD");
  2548. this.taskdataSelect();
  2549. }
  2550. });
  2551. }
  2552. };
  2553. </script>
  2554. <style scoped>
  2555. /* 导出限制 */
  2556. .el-tabs >>> .export {
  2557. width: 500px;
  2558. }
  2559. .el-tabs >>> .export .con {
  2560. display: flex;
  2561. flex-direction: column;
  2562. justify-content: center;
  2563. align-items: center;
  2564. margin-bottom: 20px;
  2565. }
  2566. .el-tabs >>> .export .con .gundong {
  2567. animation: gundong 3s linear infinite;
  2568. }
  2569. @keyframes gundong {
  2570. /* from表示动画的开始位置,也可以使用0%来表示。 */
  2571. from {
  2572. transform: rotate(0deg);
  2573. }
  2574. /* to表示动画的结束位置,也可以使用100%来表示。 */
  2575. to {
  2576. transform: rotate(360deg);
  2577. }
  2578. }
  2579. .el-tabs >>> .export img {
  2580. width: 70px;
  2581. }
  2582. .el-tabs >>> .export .btn {
  2583. display: flex;
  2584. flex-direction: row-reverse;
  2585. }
  2586. /* 打印小票明细 */
  2587. .el-tabs >>> .detail {
  2588. width: 700px;
  2589. }
  2590. .el-tabs >>> .detail .btn {
  2591. margin-top: 15px;
  2592. display: flex;
  2593. flex-direction: row-reverse;
  2594. }
  2595. /* 打印小票明细 */
  2596. .el-tabs >>> .riderDetail {
  2597. width: 900px;
  2598. }
  2599. </style>