tgorder.vue 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237
  1. <template>
  2. <div class="mod-order-order">
  3. <!-- <top-task></top-task>-->
  4. <div class="search-bar">
  5. <el-form
  6. :inline="true"
  7. :model="dataForm"
  8. @keyup.enter.native="getDataList(this.page)"
  9. size="small"
  10. >
  11. <div class="input-row">
  12. <el-form-item :label="this.$i18n.t('order.number') + ':'" :label-width=" lang === 'en' ? '145px' : '85px'">
  13. <el-input
  14. v-model="dataForm.orderNumber"
  15. :placeholder="this.$i18n.t('order.number')"
  16. clearable
  17. size="small"
  18. ></el-input>
  19. </el-form-item>
  20. <el-form-item label="快递单号" :label-width=" lang === 'en' ? '145px' : '85px'">
  21. <el-input
  22. v-model="dataForm.dvyFlowId"
  23. placeholder="请输入快递单号"
  24. clearable
  25. size="small"
  26. ></el-input>
  27. </el-form-item>
  28. <el-form-item :label="this.$i18n.t('shop.contactTel') + ':'" :label-width=" lang === 'en' ? '145px' : '85px'">
  29. <el-input
  30. v-model="dataForm.mobile"
  31. :placeholder="this.$i18n.t('order.pleaseEnterNumber')"
  32. clearable
  33. size="small"
  34. ></el-input>
  35. </el-form-item>
  36. <el-form-item :label="this.$i18n.t('order.createTime') + ':' " :label-width=" lang === 'en' ? '145px' : '85px'">
  37. </el-form-item>
  38. <el-form-item>
  39. <div
  40. class="default-btn primary-btn"
  41. @click="searchChange(true)"
  42. >{{ $t("order.query") }}</div>
  43. <div
  44. class="default-btn"
  45. @click="clear()"
  46. >{{ $t("shop.resetMap") }}</div>
  47. </el-form-item>
  48. </div>
  49. </el-form>
  50. </div>
  51. <div class="main">
  52. <div class="content">
  53. <!-- 导航 -->
  54. <div class="order-status-nav clearfix">
  55. <ul class="nav-list clearfix">
  56. <li
  57. :class="['nav-item', activeName == 0 ? 'selected' : '']"
  58. data-sts="0"
  59. @click="selectNav($event)"
  60. >
  61. {{ $t('time.a') }}
  62. </li>
  63. </ul>
  64. <ul class="nav-right"></ul>
  65. </div>
  66. <!-- 列标题 -->
  67. <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
  68. <el-row style="width: 100%">
  69. <el-col :span="6" id="prod-info-title">
  70. <span class="item product">{{ $t("temp.prodInfo") }}</span>
  71. </el-col>
  72. <el-col :span="4" id="price-title" class="transaction-price">
  73. <span class="item">{{ $t("order.transaQuantity") }}</span>
  74. </el-col>
  75. <el-col :span="3" class="column-title">
  76. <span class="item">{{ $t("order.actualPaymentAmount") }}</span>
  77. </el-col>
  78. <el-col :span="2" class="column-title">
  79. <span class="item">{{ $t("order.paymentMethod") }}</span>
  80. </el-col>
  81. <el-col :span="3" class="column-title">
  82. <span class="item">{{ $t("order.buyerConsignee") }}</span>
  83. </el-col>
  84. <el-col :span="2" class="column-title">
  85. <span class="item">{{ $t("group.orderStatus") }}</span>
  86. </el-col>
  87. <el-col :span="2" class="column-title">
  88. <span class="item">{{ $t("order.afterSalesStatus") }}</span>
  89. </el-col>
  90. <el-col :span="2" class="column-title">
  91. <span class="item">{{ $t("publics.operating") }}</span>
  92. </el-col>
  93. </el-row>
  94. </div>
  95. <div
  96. class="prod"
  97. v-for="(order, index) in dataList"
  98. :key="order.orderId"
  99. >
  100. <div class="prod-tit">
  101. <el-checkbox v-model="order.checkStatus" :ref="'checkbox' + index" @change="checked=>handleSelectionChange(checked, order.orderNumber)"></el-checkbox>
  102. <span class="order-index">No.{{index + 1}}</span>
  103. <span class="order-number">{{ $t("order.number") }}:{{ order.orderNumber }}</span>
  104. <span class="order-time">{{ $t("order.createTime") }}:{{ order.createTime }}</span>
  105. <div v-if="order.isPromotion === 1">
  106. <el-tag effect="dark" v-if="order.isPromotion === 1" type="primary">推广单</el-tag>
  107. <el-button type="text" @click="openOrderPromotionDialog(order.orderNumber, order.prodName)">推广链接</el-button>
  108. </div>
  109. </div>
  110. <div class="prod-cont">
  111. <el-row style="width: 100%">
  112. <el-col :span="10" style="height: 100%">
  113. <div class="item prod-item">
  114. <div
  115. class="items name"
  116. v-for="orderItem in order.orderItems"
  117. :key="orderItem.orderItemId"
  118. >
  119. <!-- 商品信息 -->
  120. <div class="order-prod-item-info">
  121. <div class="info">
  122. <div class="prod-image">
  123. <prod-pic
  124. height="60"
  125. width="60"
  126. :pic="orderItem.pic"
  127. ></prod-pic>
  128. </div>
  129. <div class="prod-name">
  130. <div class="prod-con">
  131. <div class="prod-name-txt">
  132. {{ orderItem.prodName }}
  133. </div>
  134. <div
  135. class="order-status"
  136. v-if="order.orderType === 1 || order.orderType === 2"
  137. >
  138. {{
  139. order.orderType === 1
  140. ? $t("order.groupPurchaseOrder")
  141. : order.orderType === 2
  142. ? $t("order.spikeOrder")
  143. : ""
  144. }}
  145. </div>
  146. <div
  147. class="order-status"
  148. v-if="order.orderMold === 1"
  149. >
  150. {{ $t("order.virtualOrder") }}
  151. </div>
  152. <div
  153. class="order-status"
  154. v-if="
  155. !orderItem.returnMoneySts ||
  156. orderItem.returnMoneySts < 0 ||
  157. orderItem.returnMoneySts > 5
  158. "
  159. >
  160. {{
  161. orderItem.status === 0 && order.status === 2
  162. ? $t("order.pendingReceipt")
  163. : [
  164. "",
  165. $t("order.pendingPayment"),
  166. $t("order.toBeShipped"),
  167. $t("order.pendingReceipt"),
  168. "",
  169. $t("order.successfulTransaction"),
  170. $t("order.transactionFailed"),
  171. $t("group.waitGroup"),
  172. ][order.status]
  173. }}
  174. </div>
  175. <div class="order-status" v-else>
  176. {{
  177. [
  178. "",
  179. $t("order.buyerApplication"),
  180. $t("order.sellerAccepts"),
  181. $t("order.selShipment"),
  182. $t("order.sellerReceipt"),
  183. $t("order.refundSuccessfully"),
  184. ][orderItem.returnMoneySts]
  185. }}
  186. </div>
  187. <div
  188. class="order-status"
  189. v-if="order.dvyType === 2 || order.dvyType === 4"
  190. >
  191. {{
  192. order.dvyType === 2
  193. ? $t("order.selfMention")
  194. : order.dvyType === 4
  195. ? $t("order.sameCityDelivery")
  196. : ""
  197. }}
  198. </div>
  199. <!-- <span class="prod-info">{{orderItem.skuName}}</span> -->
  200. <div
  201. class="order-status"
  202. v-if="orderItem.preSaleTime !== null"
  203. >
  204. {{ $t('order.EstimatedDeliveryTime') }}{{ orderItem.preSaleTime }}
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. <!-- 赠品信息 -->
  210. <div v-if="orderItem.giveawayList" class="order-prod-item-give-con">
  211. <div class="giveaway-item" v-for="(giveawayItem, giveIndex) in orderItem.giveawayList" :key="giveIndex">
  212. <div class="giveaway-item-name"> 【{{$i18n.t('order.giveawayPord')}}】 {{giveawayItem.prodName}}</div>
  213. <div class="giveaway-item-sku-count">{{giveawayItem.skuName || ''}} x{{giveawayItem.prodCount}}</div>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="prod-price">
  218. <span>{{ orderItem.price.toFixed(2) }}</span>
  219. <span
  220. >{{ orderItem.prodCount
  221. }}{{ $t("marketing.item") }}</span
  222. >
  223. </div>
  224. </div>
  225. </div>
  226. </el-col>
  227. <el-col :span="3" style="height: 100%">
  228. <div class="item">
  229. <div>
  230. <span class="totalprice"
  231. >{{ order.actualTotal.toFixed(2)}}
  232. </span
  233. >
  234. <span
  235. class="totalprice"
  236. v-if="order.payScore && order.payScore > 0"
  237. >+ {{ order.payScore }}{{ $t("order.integral") }}</span
  238. >
  239. <span class="totalprice" v-if="order.freightAmount && order.freightAmount - order.platformFreeFreightAmount > 0"
  240. >({{ $t("order.includingFreight") }}:{{
  241. (order.freightAmount - order.platformFreeFreightAmount).toFixed(2)
  242. }})</span
  243. >
  244. <br />
  245. <span
  246. >{{ $t("order.total") }}{{ order.productNums
  247. }}{{ $t("marketing.item") }}</span
  248. >
  249. <br />
  250. <div
  251. class="default-btn text-btn"
  252. @click="editAmount(order)"
  253. v-if="order.status === 1"
  254. >{{ $t("order.modifyTheAmount") }}</div
  255. >
  256. </div>
  257. </div>
  258. </el-col>
  259. <!-- 支付方式 -->
  260. <el-col :span="2" style="height: 100%">
  261. <div class="item">
  262. <div>
  263. <span v-if="(!order.payType && order.payType != 0) || order.status === 1">{{
  264. $t("order.unpaid")
  265. }}</span>
  266. <span v-else>
  267. {{
  268. [
  269. $t("order.pointsPayment"),
  270. $t("order.wecProPay"),
  271. $t("order.alipayPCPayment"),
  272. $t("order.wechatScanCodePayment"),
  273. $t("order.wechatH5Payment"),
  274. $t("order.weclAccountPay"),
  275. $t("order.alipayH5Payment"),
  276. $t("order.alipayAPPPayment"),
  277. $t("order.wechatAPPPayment"),
  278. $t("order.balancePayment"),
  279. $t("order.payPalPayment"),
  280. ][order.payType]
  281. }}
  282. </span>
  283. </div>
  284. </div>
  285. </el-col>
  286. <!-- 买家信息 -->
  287. <el-col :span="3" style="height: 100%">
  288. <div class="item">
  289. <div class="buyer-info">
  290. <div>
  291. <el-tooltip placement="top">
  292. <div slot="content" style="font-size: 16px">
  293. <div v-if="order.userAddrOrder">
  294. <span>{{order.userAddrOrder.province }}</span>
  295. <span>{{order.userAddrOrder.city }}</span>
  296. <span>{{order.userAddrOrder.area }}</span>
  297. <span>{{order.userAddrOrder.street }}</span>
  298. <span>{{order.userAddrOrder.addr }}</span>
  299. </div>
  300. </div>
  301. <div>
  302. <div class="buyer-name">{{ order.receiverName }}</div>
  303. <div class="buyer-phone">{{ order.receiverMobile }}</div><br/>
  304. <div class="buyer-phone" v-if="order.deliveryNo" style="text-decoration:underline;cursor: pointer; color: dodgerblue;font-size: 16px" @click="openDeliveryPage(order.deliveryNo)">{{order.deliveryNo}}</div>
  305. </div>
  306. </el-tooltip>
  307. </div>
  308. </div>
  309. </div>
  310. </el-col>
  311. <el-col :span="2" style="height: 100%">
  312. <div class="item">
  313. <!-- <span v-if="order.refundStatus === 1" size="small" type="danger">退款申请中</span> -->
  314. <span>
  315. <span
  316. v-if="order.status === 1"
  317. size="small"
  318. type="danger"
  319. >{{ $t("order.pendingPayment") }}</span
  320. >
  321. <span
  322. v-else-if="order.status === 2"
  323. size="small"
  324. type="danger"
  325. >{{ $t("order.toBeShipped") }}</span
  326. >
  327. <span
  328. v-else-if="order.status === 3"
  329. size="small"
  330. type="danger"
  331. >{{ $t("order.pendingReceipt") }}</span
  332. >
  333. <span
  334. v-else-if="order.status === 7"
  335. size="small"
  336. type="danger"
  337. >{{ $t("group.waitGroup") }}</span
  338. >
  339. <span
  340. v-else-if="order.status === 5"
  341. size="small"
  342. type="danger"
  343. >{{ $t("order.successfulTransaction") }}</span
  344. >
  345. <span v-else-if="order.status === 6" size="small">{{
  346. $t("order.transactionFailed")
  347. }}</span>
  348. </span>
  349. </div>
  350. </el-col>
  351. <el-col :span="2" style="height: 100%">
  352. <div class="item">
  353. <span v-if="order.refundStatus === 1">{{ $t("order.refundApplication") }}</span>
  354. <span v-else-if="order.refundStatus === 2">{{ $t("order.refundsuccessfully") }}</span>
  355. <span v-else-if="order.refundStatus === 3">{{ $t("order.partialRefundSucc") }}</span>
  356. <span v-else-if="order.refundStatus === 4">{{ $t("order.refundFailed") }}</span>
  357. <span v-else>{{$t("order.noAfterSales")}}</span>
  358. </div>
  359. </el-col>
  360. <el-col :span="2" style="height: 100%">
  361. <div class="item">
  362. <div class="operate">
  363. <!-- <button onclick="">打印订单</button><br> -->
  364. <div
  365. class="default-btn text-btn operate-btn"
  366. @click="addOrUpdateHandle(order.orderNumber, order.shopId, order.status)"
  367. >{{ $t("order.seeDetails") }}</div
  368. >
  369. <!-- <div-->
  370. <!-- class="default-btn text-btn operate-btn"-->
  371. <!-- @click="toImbox(order)"-->
  372. <!-- >{{ $t("order.contactBuyer") }}</div-->
  373. <!-- >-->
  374. <!--<div
  375. class="default-btn text-btn operate-btn"
  376. v-if="
  377. isAuth('order:delivery:orderItemsDelivery') &&
  378. order.status == 3 &&
  379. (!order.refundStatus || order.refundStatus > 2) &&
  380. order.dvyType === 1
  381. "
  382. @click="reviseLogistics(order.orderNumber)"
  383. >{{ $t("order.modifyLogistics") }}</div
  384. >
  385. <div
  386. class="default-btn text-btn operate-btn"
  387. v-if="isAuth('order:delivery:orderItemsDelivery') && order.status === 2 && order.dvyType !== 2 && order.orderMold !== 1"
  388. @click="changeOrder(order)"
  389. >{{ $t("order.delivery") }}</div
  390. >-->
  391. <!-- <div-->
  392. <!-- class="default-btn text-btn operate-btn"-->
  393. <!-- v-if="order.isPromotion === 1"-->
  394. <!-- @click="markPromotion(order)"-->
  395. <!-- >取消推广-->
  396. <!-- </div>-->
  397. <!--<div
  398. class="default-btn text-btn operate-btn"
  399. v-else
  400. @click="markPromotion(order)"
  401. >标记推广
  402. </div>-->
  403. <div
  404. class="default-btn text-btn operate-btn"
  405. v-if="order.status === 1"
  406. @click="orderConfirmPay(order)"
  407. >确认支付
  408. </div>
  409. <!--<div
  410. class="default-btn text-btn operate-btn"
  411. v-if="order.status == 2"
  412. @click="scanDelivey(order)"
  413. >扫码发货
  414. </div>-->
  415. <!--<div
  416. class="default-btn text-btn operate-btn"
  417. v-if="isAuth('admin:station:orderItemsDelivery') && order.status === 2 && order.dvyType === 2"
  418. @click="stationOrder(order)"
  419. >{{ $t("order.pickUp") }}</div
  420. >
  421. <div
  422. class="default-btn text-btn operate-btn"
  423. v-if="isAuth('admin:station:orderItemsDelivery') && (!order.refundStatus || order.refundStatus > 2)
  424. && order.orderMold === 1 && order.writeOffNum !== 0 && (order.status === 3 ||order.status === 5)
  425. && order.writeOffCodes && order.writeOffCodes.length > 0 "
  426. @click="stationOrder(order)"
  427. >{{ $t("order.Writeoffs") }}</div
  428. >
  429. <div
  430. class="default-btn text-btn operate-btn"
  431. @click="refundRoute(order.orderNumber)"
  432. v-if="isAuth('admin:orderRefund:update') && order.refundStatus"
  433. >{{ $t("order.refundInformation") }}</div
  434. >-->
  435. <!--<div
  436. class="default-btn text-btn operate-btn"
  437. @click="generatePrintPdf(order.orderNumber, order.shopId)">{{ $t("order.generatePrintPdf") }}</div>-->
  438. </div>
  439. </div>
  440. </el-col>
  441. </el-row>
  442. </div>
  443. <!-- <div class="remark">
  444. <div class="buyer-remark">
  445. <span>备注:{{order.remarks}}</span>
  446. </div>
  447. </div>-->
  448. </div>
  449. <div class="empty" v-if="!dataList.length">
  450. {{ $t("order.noData") }}
  451. </div>
  452. </div>
  453. </div>
  454. <el-pagination
  455. ref="orderListTable"
  456. v-if="dataList.length"
  457. @size-change="sizeChangeHandle"
  458. @current-change="currentChangeHandle"
  459. :current-page="page.currentPage"
  460. :page-sizes="[10, 20, 50, 100]"
  461. :page-size="page.pageSize"
  462. :total="page.total"
  463. layout="total, sizes, prev, pager, next, jumper"
  464. ></el-pagination>
  465. <!-- 弹窗, 新增 / 修改 -->
  466. <order-station
  467. v-if="orderStationVisible"
  468. ref="orderStation"
  469. @refreshOrderStationDataList="getDataList"
  470. ></order-station>
  471. <consignment-info
  472. v-if="consignmentInfoVisible"
  473. ref="consignmentInfo"
  474. @inputCallback="getWaitingConsignmentExcel"
  475. ></consignment-info>
  476. <orderAmount-update
  477. v-if="orderAmountUpdateVisible"
  478. ref="orderAmountUpdate"
  479. @refreshOrderAmountUpdate="getDataList"
  480. ></orderAmount-update>
  481. <order-delivery-update
  482. v-if="devyVisible"
  483. ref="orderDeliveryUpdate"
  484. @refreshOrderDeliveryUpdate="getDataList"
  485. ></order-delivery-update>
  486. <!-- 修改物流弹窗 -->
  487. <!-- <el-dialog :title="修改物流" width="70%"></el-dialog> -->
  488. <el-dialog
  489. :title="this.$i18n.t('order.modifyLogistics')"
  490. :close-on-click-modal="false"
  491. :visible.sync="logVisible"
  492. @closed="handleClose"
  493. width="50%"
  494. >
  495. <!-- 修改 -->
  496. <div class="revise-log" v-if="isReviseLog">
  497. <div class="change-logistics">
  498. <div class="warning">{{ $t("order.ifModifyTheLog") }}</div>
  499. <div class="log-list">
  500. <div
  501. class="item"
  502. v-for="(logItem, index) in logisticsInfo"
  503. :key="index"
  504. >
  505. <div class="i-tit">
  506. <div class="big">{{ $t("order.package") }}{{ index + 1 }}</div>
  507. <div class="text">
  508. {{ $t("order.total") }} {{ logItem.productNums }}
  509. {{ $t("marketing.item") }}{{ $t("home.product") }}
  510. </div>
  511. </div>
  512. <!-- <div class="i-con">
  513. <div class="label">发货方式:</div>
  514. <div class="con">
  515. <div class="con-radio">
  516. <input type="radio" name="checkit" value="" checked="true"/><span>需要物流</span>
  517. </div>
  518. </div>
  519. </div>
  520. <div class="i-con">
  521. <div class="label">物流公司:</div>
  522. <div class="con">
  523. <div class="con-select">申通快递</div>
  524. <div class="con-text">
  525. <div class="text">运单号编:</div>
  526. <input type="text" />
  527. </div>
  528. </div>
  529. </div>-->
  530. <el-form
  531. :model="logDataForm"
  532. ref="logDataForm"
  533. @keyup.enter.native="logDataFormSubmit()"
  534. :label-width=" lang === 'en' ? '205px' : '95px'"
  535. >
  536. <div class="item-goods">
  537. <div class="goods-box" ref="carouser">
  538. <div
  539. class="item"
  540. v-for="(
  541. orderItem, index
  542. ) in logItem.orderItems"
  543. :key="index"
  544. >
  545. <div class="img">
  546. <prod-pic
  547. height="60"
  548. width="60"
  549. :pic="orderItem.pic"
  550. ></prod-pic>
  551. <div class="number">×{{ orderItem.prodCount }}</div>
  552. </div>
  553. <div class="name">{{ orderItem.prodName }}</div>
  554. </div>
  555. </div>
  556. </div>
  557. <el-form-item
  558. :label="$t('order.delType') + ':'"
  559. style="margin-left:15px;"
  560. >
  561. <el-radio-group v-model="logItem.deliveryType">
  562. <el-radio :label="1" v-model="radio" disabled>{{
  563. $t("order.distribution")
  564. }}</el-radio>
  565. <el-radio :label="3" v-model="radio" disabled>{{
  566. $t("order.noNeedRequired")
  567. }}</el-radio>
  568. </el-radio-group>
  569. </el-form-item>
  570. <div v-if="logItem.deliveryType === 1" class="info-int">
  571. <el-form-item
  572. :label="$t('order.courierCompany') + ':'"
  573. class="form-item"
  574. style="margin-left:15px;"
  575. >
  576. <div class="con">
  577. <el-select v-model="logItem.dvyId" size="small">
  578. <!-- :placeholder="this.$i18n.t('tip.select')" -->
  579. <el-option
  580. v-for="item in logDataForm.dvyNames"
  581. :key="item.dvyId"
  582. :label="item.dvyName"
  583. :value="item.dvyId"
  584. ></el-option>
  585. </el-select>
  586. </div>
  587. </el-form-item>
  588. <el-form-item
  589. :label="$t('order.trackingNumber') + ':'"
  590. class="form-item"
  591. >
  592. <el-input
  593. v-model="logItem.dvyFlowId"
  594. controls-position="right"
  595. :min="0"
  596. size="small"
  597. ></el-input>
  598. <!-- :label="this.$i18n.t('order.trackingNumber')" -->
  599. </el-form-item>
  600. </div>
  601. </el-form>
  602. </div>
  603. </div>
  604. </div>
  605. </div>
  606. <!-- 确认 -->
  607. <div class="change-logistics" v-if="!isReviseLog">
  608. <div class="warning">{{ $t("order.ifModifyTheLog") }}</div>
  609. <el-table class="log-info-table" :data="confirmList">
  610. <!-- <div v-for="(item,index) in confirmList" :key="index"> -->
  611. <el-table-column
  612. property="dvyIdName"
  613. :label="this.$i18n.t('order.packageName')"
  614. width="220"
  615. style="text-align: left"
  616. ></el-table-column>
  617. <el-table-column
  618. property="productNums"
  619. :label="this.$i18n.t('order.amountOfGoods')"
  620. width="140"
  621. ></el-table-column>
  622. <el-table-column
  623. property="delMethod"
  624. :label="this.$i18n.t('order.deliveryMethod')"
  625. width="140"
  626. ></el-table-column>
  627. <el-table-column
  628. property="dvyName"
  629. :label="this.$i18n.t('order.logisticsCompany')"
  630. width="170"
  631. ></el-table-column>
  632. <el-table-column
  633. property="dvyFlowId"
  634. :label="this.$i18n.t('order.trackingNumber')"
  635. ></el-table-column>
  636. <!-- </div> -->
  637. </el-table>
  638. </div>
  639. <div slot="footer" v-if="isReviseLog" class="dialog-footer">
  640. <div class="default-btn" @click="logVisible = false">{{
  641. $t("crud.filter.cancelBtn")
  642. }}</div>
  643. <div class="default-btn primary-btn" @click="logDataFormSubmit()">{{
  644. $t("order.save")
  645. }}</div>
  646. </div>
  647. <div slot="footer" v-if="!isReviseLog" class="dialog-footer">
  648. <div class="default-btn" @click="backToRevise()">{{
  649. $t("order.backToModify")
  650. }}</div>
  651. <div class="default-btn primary-btn" @click="confirmRevise()">{{
  652. $t("order.confirmTheChanges")
  653. }}</div>
  654. </div>
  655. </el-dialog>
  656. <!-- /修改物流弹窗 -->
  657. <order-upload v-if="uploadVisible" ref="spuUpload" :param="dataForm" @refreshDataList1="getWaitingConsignmentExcel" />
  658. <order-info ref="orderInfo" @orderAuditStatusUpdate="handleOrderAuditStatusUpdate"></order-info>
  659. <orderPromotion ref="orderPromotion" ></orderPromotion>
  660. <el-dialog
  661. title="批量生成PDF"
  662. :modal="false"
  663. top="200px"
  664. :close-on-click-modal="false"
  665. :visible.sync="generatePrintPdfBatchVisible">
  666. <el-form
  667. ref="dataForm"
  668. label-width="80px">
  669. <el-form-item label="打印渠道" prop="printChannel">
  670. <el-select v-model="printChannel" clearable filterable>
  671. <!-- <el-option key="GSART" label="广森" value="GSART"></el-option>-->
  672. <!-- <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>-->
  673. <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
  674. <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
  675. </el-select>
  676. </el-form-item>
  677. </el-form>
  678. <span slot="footer">
  679. <el-button type="info" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
  680. <el-button type="primary" @click="generatePrintPdfBatch">{{$t("crud.filter.submitBtn")}}</el-button>
  681. </span>
  682. </el-dialog>
  683. <el-dialog
  684. title="确认打印订单"
  685. :modal="false"
  686. top="200px"
  687. :close-on-click-modal="false"
  688. :visible.sync="orderCreateBatchVisible">
  689. <el-form
  690. :model="dataForm"
  691. ref="dataForm"
  692. label-width="80px"
  693. >
  694. <el-form-item label="打印渠道" prop="printChannel">
  695. <el-select v-model="printChannel" clearable filterable>
  696. <!--<el-option key="GSART" label="广森" value="GSART"></el-option>
  697. <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>-->
  698. <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
  699. <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
  700. </el-select>
  701. </el-form-item>
  702. </el-form>
  703. <span slot="footer">
  704. <el-button type="info" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
  705. <el-button :loading="orderCreateBatchLoading" type="primary" @click="createOrderBatch">{{$t("crud.filter.submitBtn")}}</el-button>
  706. </span>
  707. </el-dialog>
  708. </div>
  709. </template>
  710. <script>
  711. import OrderStation from './order-station'
  712. import ConsignmentInfo from './consignment-info'
  713. import OrderAmountUpdate from './orderAmount-update'
  714. import OrderDeliveryUpdate from './order-delivery-update'
  715. import OrderUpload from './order-upload'
  716. import moment from 'moment'
  717. import ProdPic from '@/components/prod-pic'
  718. import OrderInfo from "./orderInfo";
  719. import TopTask from '@/components/top-task';
  720. import InputNumberRange from '@/components/input-number-range';
  721. import OrderPromotion from './orderPromotion';
  722. import {} from "@/utils/excel";
  723. import {downloadXls} from "@/utils/excel";
  724. export default {
  725. data () {
  726. return {
  727. // 是否全选
  728. selectAll: false,
  729. showHeadScroll: false, // 修改物流相关
  730. logVisible: false,
  731. radio: '1',
  732. logisticsInfo: [], // 包裹列表
  733. logDataForm: {
  734. dvyId: '', // 当前物流公司id
  735. dvyFlowId: '', // 物流单号
  736. dvyNames: [] // 物流公司列表
  737. },
  738. uploadVisible: false,
  739. lang: localStorage.getItem('lang'),
  740. // logDataRule: {
  741. // dvyFlowId: [
  742. // { required: true, message: this.$i18n.t('publics.noNull'), trigger: 'blur' }
  743. // ]
  744. // },
  745. errorNum: 0,
  746. // 确认修改弹窗
  747. isReviseLog: true, // 是否正在修改物流信息
  748. confirmList: [], // 确认修改信息
  749. dataForm: {},
  750. sts: 0,
  751. dateRange: [],
  752. productNumsRange:[],
  753. status: null,
  754. options: [{
  755. value: 1,
  756. label: this.$i18n.t('order.pendingPayment')
  757. },
  758. {
  759. value: 2,
  760. label: this.$i18n.t('order.toBeShipped')
  761. },
  762. {
  763. value: 3,
  764. label: this.$i18n.t('order.pendingReceipt')
  765. },
  766. {
  767. value: 5,
  768. label: this.$i18n.t('order.successfulTransaction')
  769. },
  770. {
  771. value: 6,
  772. label: this.$i18n.t('order.transactionFailed')
  773. },
  774. {
  775. value: 7,
  776. label: this.$i18n.t('group.waitGroup')
  777. },
  778. {
  779. value: 8,
  780. label: '待推送打印'
  781. },
  782. {
  783. value: 9,
  784. label: '打印待发货'
  785. },
  786. {
  787. value: 10,
  788. label: '普通待发货'
  789. },
  790. {
  791. value: 11,
  792. label: '普通打印待发货'
  793. }],
  794. refund: [{
  795. value: 0,
  796. label: this.$i18n.t('order.noAfterSales')
  797. },
  798. {
  799. value: 1,
  800. label: this.$i18n.t('order.requestARefund')
  801. },
  802. {
  803. value: 2,
  804. label: this.$i18n.t('order.refundsuccessfully')
  805. },
  806. {
  807. value: 3,
  808. label: this.$i18n.t('order.partialRefundSucc')
  809. },
  810. {
  811. value: 4,
  812. label: this.$i18n.t('order.refundFailed')
  813. }],
  814. orderType: [{
  815. value: 0,
  816. label: this.$i18n.t('order.normalOrder')
  817. }, {
  818. value: 1,
  819. label: this.$i18n.t('order.groupPurchaseOrder')
  820. }, {
  821. value: 2,
  822. label: this.$i18n.t('order.spikeOrder')
  823. }],
  824. orderMold: [{
  825. value: 0,
  826. label: this.$i18n.t('order.physicalOrder')
  827. }, {
  828. value: 1,
  829. label: this.$i18n.t('order.virtualOrder')
  830. }],
  831. dvyType: [{
  832. value: 1,
  833. label: this.$i18n.t('order.expressDelivery')
  834. },
  835. {
  836. value: 2,
  837. label: this.$i18n.t('order.selfMention')
  838. },
  839. {
  840. value: 3,
  841. label: this.$i18n.t('order.noNeedRequired')
  842. },
  843. {
  844. value: 4,
  845. label: this.$i18n.t('order.sameCityDelivery')
  846. }],
  847. payType: [{
  848. value: 0,
  849. label: this.$i18n.t('order.pointsPayment')
  850. }, {
  851. value: 1,
  852. label: this.$i18n.t('admin.weChatPay')
  853. }, {
  854. value: 2,
  855. label: this.$i18n.t('admin.aliPay')
  856. }, {
  857. value: 3,
  858. label: this.$i18n.t('admin.balancePay')
  859. }, {
  860. value: 4,
  861. label: this.$i18n.t('order.payPalPayment')
  862. }],
  863. resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
  864. dataList: [],
  865. page: {
  866. total: 0, // 总页数
  867. currentPage: 1, // 当前页数
  868. pageSize: 10 // 每页显示多少条
  869. },
  870. dataListLoading: false,
  871. dataListSelections: new Set(),
  872. devyVisible: false,
  873. orderStationVisible: false,
  874. consignmentInfoVisible: false,
  875. orderAmountUpdateVisible: false,
  876. activeName: '0',
  877. timeActive: null,
  878. priceWidth: '109px',
  879. infoWidth: '400px',
  880. generatePrintPdfBatchVisible: false,
  881. orderCreateBatchVisible: false,
  882. printChannel: "KuaiYin",
  883. orderCreateBatchLoading: false,
  884. exportDeliveryLoading:false,
  885. confirmPayLoading: false,
  886. }
  887. },
  888. components: {
  889. OrderInfo,
  890. OrderStation,
  891. OrderAmountUpdate,
  892. OrderDeliveryUpdate,
  893. ConsignmentInfo,
  894. OrderUpload,
  895. ProdPic,
  896. TopTask,
  897. InputNumberRange,
  898. OrderPromotion
  899. },
  900. computed: {
  901. // 二级菜单折叠状态
  902. sidebarFold: {
  903. get () { return this.$store.state.common.sidebarFold },
  904. set (val) { this.$store.commit('common/updateSidebarFold', val) }
  905. }
  906. },
  907. created () {
  908. // 首页跳转状态参数
  909. this.activeName = this.$route.query.status ? String(this.$route.query.status) : '0'
  910. this.sts = this.$route.query.status || 0
  911. this.status = this.sts === 0 ? null : Number(this.sts)
  912. // 携带参数查询
  913. // 携带参数查询
  914. this.init(this.page, this.$route.query)
  915. // 请求物流公司
  916. this.getLogisticsList()
  917. },
  918. activated () {
  919. // 携带参数查询
  920. var query = this.$route.query
  921. if (Object.keys(query).length > 0) {
  922. // 携带参数查询
  923. this.init(this.page, query)
  924. }
  925. },
  926. mounted () {
  927. // 监听页面滚动
  928. // window.addEventListener('scroll', this.scrollToTop)
  929. // setTimeout(() => {
  930. // this.getEleWidth()
  931. // })
  932. // window.onresize = () => {
  933. // return (() => {
  934. // setTimeout(() => {
  935. // this.getEleWidth()
  936. // })
  937. // })()
  938. // }
  939. },
  940. watch: {
  941. },
  942. methods: {
  943. orderConfirmPay(order){
  944. let _this = this
  945. if (order.orderItems[0].actualTotal === 0.01){
  946. toConfirmPay()
  947. }else{
  948. this.orderAmountUpdateVisible = true
  949. this.$nextTick(()=>{
  950. this.$refs.orderAmountUpdate.init(order)
  951. this.$refs.orderAmountUpdate.setOrderAmountAndFreight(order, toConfirmPay)
  952. })
  953. }
  954. function toConfirmPay() {
  955. _this.$confirm('确定完成支付吗?', '提示', {
  956. confirmButtonText: '确定',
  957. cancelButtonText: '取消',
  958. type: 'warning'
  959. }).then(() => {
  960. let dataBody = {"orderNumbers": order.orderNumber, "payType":9};
  961. _this.$http({
  962. url: _this.$http.adornUrl('/order/order/pay'),
  963. method: 'post',
  964. data:_this.$http.adornData(dataBody)
  965. }).then(({ data }) => {
  966. _this.$message.success("下单确认成功")
  967. _this.getDataList(this.page)
  968. })
  969. });
  970. }
  971. },
  972. scanDelivery(order){
  973. },
  974. handleExportDelivery(){
  975. this.exportDeliveryLoading = true;
  976. this.$http({
  977. url: this.$http.adornUrl('/order/order/exportDeliveryInfo'),
  978. method: 'GET',
  979. params: this.$http.adornParams({startTime: this.dateRange[0], endTime: this.dateRange[1]}),
  980. responseType: 'blob'
  981. }).then(({data}) => {
  982. this.exportDeliveryLoading = false;
  983. let fileName = "微信发货订单信息";
  984. downloadXls(data, fileName + ".xlsx");
  985. }).catch((error) => {
  986. this.exportDeliveryLoading = false;
  987. this.$message.error(error)
  988. })
  989. },
  990. openGeneratePrintPdfBatchDialog(){
  991. this.generatePrintPdfBatchVisible = true;
  992. },
  993. openCreateOrderBatchDialog(){
  994. this.orderCreateBatchVisible = true;
  995. },
  996. handleOrderAuditStatusUpdate(auditStatusReturn){
  997. let it = this;
  998. this.dataList.forEach((item, index) => {
  999. if(item.orderNumber == auditStatusReturn.orderNumber){
  1000. it.$set(item,'auditStatus',auditStatusReturn.auditStatus)
  1001. return;
  1002. }
  1003. })
  1004. },
  1005. /**
  1006. * 全选按钮
  1007. */
  1008. handleSelectAll (checked) {
  1009. let it = this;
  1010. if(checked){
  1011. this.dataList.forEach((item, index) => {
  1012. it.$set(item,'checkStatus',true)
  1013. it.dataListSelections.add(item.orderNumber);
  1014. it.selectAll = true
  1015. })
  1016. }else{
  1017. this.dataList.forEach((item, index) => {
  1018. it.$set(item,'checkStatus',false)
  1019. it.dataListSelections.delete(item.orderNumber);
  1020. it.selectAll = false;
  1021. })
  1022. }
  1023. },
  1024. handleSelectionChange(checked, orderNumber){
  1025. if(checked){
  1026. this.dataListSelections.add(orderNumber);
  1027. }else{
  1028. this.dataListSelections.delete(orderNumber)
  1029. }
  1030. },
  1031. getEleWidth () {
  1032. let div = document.getElementById('price-title') // prod-info-title
  1033. let div1 = document.getElementById('prod-info-title')
  1034. if (!div && !div1) {
  1035. return
  1036. }
  1037. let w = div.offsetWidth // 返回元素的总宽度
  1038. let w1 = div1.offsetWidth
  1039. this.priceWidth = w + 'px'
  1040. this.infoWidth = w1 + 'px'
  1041. },
  1042. /**
  1043. * 关闭 修改物流弹窗
  1044. */
  1045. handleClose () {
  1046. this.isReviseLog = true
  1047. },
  1048. /**
  1049. * 页面滚动事件
  1050. */
  1051. scrollToTop () {
  1052. let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
  1053. this.showHeadScroll = scrollTop > 400
  1054. },
  1055. /**
  1056. * 获取包裹物流信息
  1057. */
  1058. reviseLogistics (orderNumber) {
  1059. // console.log(orderNumber)
  1060. this.logVisible = !this.logVisible
  1061. this.$http({
  1062. url: this.$http.adornUrl('/order/delivery/getOrderDeliveries/' + orderNumber),
  1063. method: 'put'
  1064. }).then(({ data }) => {
  1065. this.logisticsInfo = data
  1066. this.logisticsInfo.forEach((el, index) => {
  1067. el.newDvyFlowId = el.dvyFlowId
  1068. el.newDvyId = el.dvyId
  1069. el.dvyIdName = this.$i18n.t('order.package') + Number(index + 1)
  1070. // 修改弹窗
  1071. this.confirmList = [] // 清空确认列表
  1072. })
  1073. })
  1074. this.errorNum = 0
  1075. },
  1076. /**
  1077. * 请求物流公司列表
  1078. */
  1079. getLogisticsList () {
  1080. this.$http({
  1081. url: this.$http.adornUrl('/admin/delivery/list'),
  1082. method: 'get',
  1083. params: this.$http.adornParams()
  1084. }).then(({ data }) => {
  1085. this.logDataForm.dvyNames = data
  1086. })
  1087. },
  1088. /**
  1089. * 生成作品打印PDF
  1090. */
  1091. generatePrintPdf (orderNumber, shopId) {
  1092. this.$http({
  1093. url: this.$http.adornUrl('/order/thirdPrintOrder/generatePrintPdf'),
  1094. method: 'post',
  1095. data: this.$http.adornData({
  1096. orderNumber: orderNumber,
  1097. shopId: shopId
  1098. }),
  1099. }).then(({ data }) => {
  1100. if(data.status === "success"){
  1101. window.open(this.resourcesUrl + data.result.workUrl);
  1102. }else{
  1103. this.$message({
  1104. message: data.msg,
  1105. type: 'danger'
  1106. })
  1107. }
  1108. })
  1109. },
  1110. /**
  1111. * 批量生成打印订单PDF
  1112. */
  1113. generatePrintPdfBatch(){
  1114. let dataBody = {"orderNumberList": [...this.dataListSelections], "printChannel":this.printChannel};
  1115. this.$http({
  1116. url: this.$http.adornUrl('/order/thirdPrintOrder/generatePrintPdfBatch'),
  1117. method: 'post',
  1118. data: this.$http.adornData(dataBody)
  1119. }).then(({ data }) => {
  1120. if(data.status === "success"){
  1121. console.log("发送showTask")
  1122. this.$Bus.$emit('showTask', true)
  1123. }else{
  1124. this.$message({
  1125. message: data.msg,
  1126. type: 'error'
  1127. })
  1128. }
  1129. })
  1130. },
  1131. /**
  1132. * 批量推送打印订单P
  1133. */
  1134. createOrderBatch(){
  1135. this.orderCreateBatchLoading = true;
  1136. let dataBody = {"orderNumberList": [...this.dataListSelections], "printChannel":this.printChannel};
  1137. this.$http({
  1138. url: this.$http.adornUrl('/order/thirdPrintOrder/createOrderBatch'),
  1139. method: 'post',
  1140. data: this.$http.adornData(dataBody)
  1141. }).then(({ data }) => {
  1142. this.orderCreateBatchLoading = false;
  1143. if(data.status === "success"){
  1144. this.$message({
  1145. message: data.msg,
  1146. type: 'success'
  1147. })
  1148. }else{
  1149. this.$message({
  1150. message: data.msg,
  1151. type: 'error'
  1152. })
  1153. }
  1154. }).catch(()=>{
  1155. this.orderCreateBatchLoading = false;
  1156. })
  1157. },
  1158. /**
  1159. * 批量第三方发货
  1160. */
  1161. deliveryThirdBatch(){
  1162. let deliveryOrderItemParamList = [];
  1163. this.dataListSelections.forEach(item =>{
  1164. let deliveryOrderItemParam = {};
  1165. deliveryOrderItemParam.orderNumber = item;
  1166. deliveryOrderItemParam.deliveryType = 1
  1167. deliveryOrderItemParamList.push(deliveryOrderItemParam);
  1168. })
  1169. let dataBody = {"deliveryOrderItemParamList": deliveryOrderItemParamList};
  1170. this.$http({
  1171. url: this.$http.adornUrl('/order/delivery/orderItemsDeliveryThirdBatch'),
  1172. method: 'PUT',
  1173. data: this.$http.adornData(dataBody)
  1174. }).then(({ data }) => {
  1175. this.dataListSelections = new Set();
  1176. if(data.status === "success"){
  1177. this.$message({
  1178. message: "发货成功",
  1179. type: 'success'
  1180. })
  1181. }else{
  1182. this.$message({
  1183. message: data.msg,
  1184. type: 'danger'
  1185. })
  1186. }
  1187. })
  1188. },
  1189. /**
  1190. * 点击保存
  1191. */
  1192. logDataFormSubmit () {
  1193. // let reviseLogList = []
  1194. let flag = true
  1195. let logisticsInfo = this.logisticsInfo
  1196. logisticsInfo.map((el, index) => {
  1197. if (el.deliveryType === 3) {
  1198. return
  1199. }
  1200. if (!flag) {
  1201. return false
  1202. }
  1203. // console.log('logisticsInfo', el.logisticsInfo)
  1204. // console.log('el.dvyFlowId', el.dvyFlowId)
  1205. var reg = /^[a-zA-Z0-9]{4,30}$/
  1206. if (el.dvyFlowId.length === 0) {
  1207. this.$message({
  1208. message: this.$i18n.t('order.logEmpty'),
  1209. type: 'warning'
  1210. })
  1211. flag = false
  1212. this.errorNum = 1
  1213. // throw ('物流单号不能为空')
  1214. // return false
  1215. } else if (!reg.test(el.dvyFlowId)) {
  1216. this.$message({
  1217. message: this.$i18n.t('order.checkDvyId'),
  1218. type: 'warning'
  1219. })
  1220. flag = false
  1221. this.errorNum = 1
  1222. } else {
  1223. this.errorNum = 0
  1224. // console.log(el.newDvyFlowId)
  1225. let confirmList = this.confirmList
  1226. if ((el.newDvyFlowId.length !== 0 && el.newDvyFlowId !== el.dvyFlowId) || (el.newDvyId !== el.dvyId)) {
  1227. confirmList.push(el)
  1228. confirmList.forEach((el, index) => {
  1229. el.delMethod = this.$i18n.t('order.logistics')
  1230. // el.packageName = "包裹" + Number(index+1)
  1231. this.logDataForm.dvyNames.forEach((dvyName, index) => {
  1232. if (el.dvyId === dvyName.dvyId) {
  1233. el.dvyName = dvyName.dvyName
  1234. }
  1235. })
  1236. })
  1237. this.confirmList = confirmList
  1238. }
  1239. }
  1240. // console.log('确认列表:', this.confirmList)
  1241. // this.confirmList.forEach((el, index) => {
  1242. // })
  1243. })
  1244. // console.log(this.errorNum)
  1245. if (this.errorNum === 1) {
  1246. return
  1247. } else if (this.confirmList.length === 0) {
  1248. this.$message({
  1249. message: this.$i18n.t('order.noLogIsChanged'),
  1250. type: 'warning'
  1251. })
  1252. flag = false
  1253. }
  1254. if (flag) {
  1255. this.isReviseLog = false // 修改弹窗
  1256. }
  1257. },
  1258. /**
  1259. * 确认修改物流信息
  1260. */
  1261. confirmRevise () {
  1262. // let dvyOrderParam = {
  1263. // deliveryOrders: this.confirmList
  1264. // }
  1265. this.$http({
  1266. url: this.$http.adornUrl('/order/delivery/updateOrderDeliveries'),
  1267. method: 'put',
  1268. data: this.$http.adornData({
  1269. deliveryOrders: this.confirmList
  1270. }),
  1271. params: this.$http.adornParams()
  1272. }).then(({ data }) => {
  1273. this.$message({
  1274. message: this.$i18n.t('publics.operation'),
  1275. type: 'success'
  1276. })
  1277. this.isReviseLog = true
  1278. this.logVisible = false
  1279. })
  1280. },
  1281. /**
  1282. * 返回修改(物流信息)
  1283. */
  1284. backToRevise () {
  1285. this.isReviseLog = true
  1286. // 修改弹窗
  1287. this.confirmList = [] // 清空确认列表
  1288. },
  1289. init (page, params, newData = false) {
  1290. page = (page === undefined ? this.page : page)
  1291. this.dataListLoading = true
  1292. if (newData || !this.theData) {
  1293. this.theData = {
  1294. current: page == null ? this.page.currentPage : page.currentPage,
  1295. size: page == null ? this.page.pageSize : page.pageSize,
  1296. 'orderNumber': this.dataForm.orderNumber,
  1297. 'orderType': this.dataForm.orderType,
  1298. 'orderMold': this.dataForm.orderMold,
  1299. 'payType': this.dataForm.payType,
  1300. 'receiver': this.dataForm.receiver,
  1301. 'mobile': this.dataForm.mobile,
  1302. 'status': this.status,
  1303. 'dvyType': this.dataForm.dvyType,
  1304. 'stationName': this.dataForm.stationName,
  1305. 'refundStatus': this.dataForm.refundStatus,
  1306. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1307. 'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
  1308. 'startProductNums': this.productNumsRange === null ? null : this.productNumsRange[0], // 订购数量起
  1309. 'endProductNums': this.productNumsRange === null ? null : this.productNumsRange[1], // 订购数量起
  1310. 'auditStatus': this.dataForm.auditStatus, // 审阅状态
  1311. 'prodName': this.dataForm.prodName, // 产品名称,
  1312. 'dvyFlowId': this.dataForm.dvyFlowId, //快递单号
  1313. 'skuName': this.dataForm.skuName,
  1314. 'isPromotion': this.dataForm.isPromotion,
  1315. 'prodZone': this.dataForm.prodZone,
  1316. 'actualTotal': 0.01
  1317. }
  1318. } else {
  1319. this.theData.current = page == null ? this.page.currentPage : page.currentPage
  1320. this.theData.size = page == null ? this.page.pageSize : page.pageSize
  1321. this.theData.status = this.status
  1322. }
  1323. this.$http({
  1324. url: this.$http.adornUrl('/order/order/getTgPage'),
  1325. method: 'get',
  1326. params: this.$http.adornParams(
  1327. Object.assign(this.theData, params
  1328. ), false
  1329. )
  1330. }).then(({ data }) => {
  1331. this.dataList = data.records
  1332. this.page.total = data.total
  1333. this.sts = !this.status ? 0 : this.status
  1334. this.dataListLoading = false
  1335. this.activeName = !this.status ? '0' : this.status + ''
  1336. })
  1337. },
  1338. /**
  1339. * 获取数据列表
  1340. */
  1341. getDataList (page, params, newData = false) {
  1342. page = (page === undefined ? this.page : page)
  1343. this.dataListLoading = true
  1344. if (newData || !this.theData) {
  1345. this.theData = {
  1346. current: page == null ? this.page.currentPage : page.currentPage,
  1347. size: page == null ? this.page.pageSize : page.pageSize,
  1348. 'orderNumber': this.dataForm.orderNumber,
  1349. 'orderType': this.dataForm.orderType,
  1350. 'orderMold': this.dataForm.orderMold,
  1351. 'payType': this.dataForm.payType,
  1352. 'receiver': this.dataForm.receiver,
  1353. 'mobile': this.dataForm.mobile,
  1354. 'status': this.status,
  1355. 'dvyType': this.dataForm.dvyType,
  1356. 'stationName': this.dataForm.stationName,
  1357. 'refundStatus': this.dataForm.refundStatus,
  1358. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1359. 'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
  1360. 'startProductNums': this.productNumsRange === null ? null : this.productNumsRange[0], // 订购数量起
  1361. 'endProductNums': this.productNumsRange === null ? null : this.productNumsRange[1], // 订购数量起
  1362. 'auditStatus': this.dataForm.auditStatus, // 审阅状态
  1363. 'prodName': this.dataForm.prodName, // 产品名称,
  1364. 'dvyFlowId': this.dataForm.dvyFlowId, //快递单号
  1365. 'skuName': this.dataForm.skuName,
  1366. 'isPromotion': this.dataForm.isPromotion,
  1367. 'prodZone': this.dataForm.prodZone
  1368. }
  1369. } else {
  1370. this.theData.current = page == null ? this.page.currentPage : page.currentPage
  1371. this.theData.size = page == null ? this.page.pageSize : page.pageSize
  1372. this.theData.status = this.status
  1373. }
  1374. this.$http({
  1375. url: this.$http.adornUrl('/order/order/getTgPage'),
  1376. method: 'get',
  1377. params: this.$http.adornParams(
  1378. Object.assign(this.theData, params
  1379. ), false
  1380. )
  1381. }).then(({ data }) => {
  1382. this.dataList = data.records
  1383. this.page.total = data.total
  1384. this.sts = !this.status ? 0 : this.status
  1385. this.dataListLoading = false
  1386. this.activeName = !this.status ? '0' : this.status + ''
  1387. })
  1388. },
  1389. getWaitPrintPage(page, params, newData = false){
  1390. this.dataListLoading = true
  1391. if (newData || !this.theData) {
  1392. this.theData = {
  1393. current: page == null ? this.page.currentPage : page.currentPage,
  1394. size: page == null ? this.page.pageSize : page.pageSize,
  1395. 'orderNumber': this.dataForm.orderNumber,
  1396. // 'prodName': this.dataForm.prodName,
  1397. 'orderType': this.dataForm.orderType,
  1398. 'orderMold': this.dataForm.orderMold,
  1399. 'payType': this.dataForm.payType,
  1400. 'receiver': this.dataForm.receiver,
  1401. 'mobile': this.dataForm.mobile,
  1402. 'status': this.status,
  1403. 'dvyType': this.dataForm.dvyType,
  1404. 'stationName': this.dataForm.stationName,
  1405. 'refundStatus': this.dataForm.refundStatus,
  1406. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1407. 'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
  1408. 'startProductNums': this.productNumsRange === null ? null : this.productNumsRange[0], // 订购数量起
  1409. 'endProductNums': this.productNumsRange === null ? null : this.productNumsRange[1], // 订购数量起
  1410. 'auditStatus': this.dataForm.auditStatus, // 审阅状态
  1411. 'prodName': this.dataForm.prodName, // 产品名称
  1412. 'skuName': this.dataForm.skuName, // 产品名称,
  1413. 'isPromotion': this.dataForm.isPromotion,
  1414. 'prodZone': this.dataForm.prodZone
  1415. }
  1416. } else {
  1417. this.theData.current = page == null ? this.page.currentPage : page.currentPage
  1418. this.theData.size = page == null ? this.page.pageSize : page.pageSize
  1419. this.theData.status = this.status
  1420. }
  1421. this.$http({
  1422. url: this.$http.adornUrl('/order/order/waitPrintPage'),
  1423. method: 'get',
  1424. params: this.$http.adornParams(
  1425. Object.assign(this.theData, params
  1426. ), false
  1427. )
  1428. }).then(({ data }) => {
  1429. this.dataList = data.records
  1430. this.page.total = data.total
  1431. this.sts = !this.status ? 0 : this.status
  1432. this.dataListLoading = false
  1433. this.activeName = !this.status ? '0' : this.status + ''
  1434. })
  1435. },
  1436. getWaitPrintDeliveryPage(page, params, newData = false){
  1437. this.dataListLoading = true
  1438. if (newData || !this.theData) {
  1439. this.theData = {
  1440. current: page == null ? this.page.currentPage : page.currentPage,
  1441. size: page == null ? this.page.pageSize : page.pageSize,
  1442. 'orderNumber': this.dataForm.orderNumber,
  1443. // 'prodName': this.dataForm.prodName,
  1444. 'orderType': this.dataForm.orderType,
  1445. 'orderMold': this.dataForm.orderMold,
  1446. 'payType': this.dataForm.payType,
  1447. 'receiver': this.dataForm.receiver,
  1448. 'mobile': this.dataForm.mobile,
  1449. 'status': this.status,
  1450. 'dvyType': this.dataForm.dvyType,
  1451. 'stationName': this.dataForm.stationName,
  1452. 'refundStatus': this.dataForm.refundStatus,
  1453. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1454. 'endTime': this.dateRange === null ? null : this.dateRange[1] // 结束时间
  1455. }
  1456. } else {
  1457. this.theData.current = page == null ? this.page.currentPage : page.currentPage
  1458. this.theData.size = page == null ? this.page.pageSize : page.pageSize
  1459. this.theData.status = this.status
  1460. }
  1461. this.$http({
  1462. url: this.$http.adornUrl('/order/order/waitPrintDeliveryPage'),
  1463. method: 'get',
  1464. params: this.$http.adornParams(
  1465. Object.assign(this.theData, params
  1466. ), false
  1467. )
  1468. }).then(({ data }) => {
  1469. this.dataList = data.records
  1470. this.page.total = data.total
  1471. this.sts = !this.status ? 0 : this.status
  1472. this.dataListLoading = false
  1473. this.activeName = !this.status ? '0' : this.status + ''
  1474. })
  1475. },
  1476. getWaitNormalPrintPage(page, params, newData = false){
  1477. this.dataListLoading = true
  1478. if (newData || !this.theData) {
  1479. this.theData = {
  1480. current: page == null ? this.page.currentPage : page.currentPage,
  1481. size: page == null ? this.page.pageSize : page.pageSize,
  1482. 'orderNumber': this.dataForm.orderNumber,
  1483. // 'prodName': this.dataForm.prodName,
  1484. 'orderType': this.dataForm.orderType,
  1485. 'orderMold': this.dataForm.orderMold,
  1486. 'payType': this.dataForm.payType,
  1487. 'receiver': this.dataForm.receiver,
  1488. 'mobile': this.dataForm.mobile,
  1489. 'status': this.status,
  1490. 'dvyType': this.dataForm.dvyType,
  1491. 'stationName': this.dataForm.stationName,
  1492. 'refundStatus': this.dataForm.refundStatus,
  1493. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1494. 'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间,
  1495. 'prodZone': this.dataForm.prodZone,
  1496. }
  1497. } else {
  1498. this.theData.current = page == null ? this.page.currentPage : page.currentPage
  1499. this.theData.size = page == null ? this.page.pageSize : page.pageSize
  1500. this.theData.status = this.status
  1501. }
  1502. this.$http({
  1503. url: this.$http.adornUrl('/order/order/waitNormalPrintPage'),
  1504. method: 'get',
  1505. params: this.$http.adornParams(
  1506. Object.assign(this.theData, params
  1507. ), false
  1508. )
  1509. }).then(({ data }) => {
  1510. this.dataList = data.records
  1511. this.page.total = data.total
  1512. this.sts = !this.status ? 0 : this.status
  1513. this.dataListLoading = false
  1514. this.activeName = !this.status ? '0' : this.status + ''
  1515. })
  1516. },
  1517. // 每页数
  1518. sizeChangeHandle (val) {
  1519. this.page.pageSize = val
  1520. this.page.currentPage = 1
  1521. this.getDataList(this.page)
  1522. },
  1523. // 当前页
  1524. currentChangeHandle (val) {
  1525. this.dataListSelections = new Set();
  1526. this.page.currentPage = val
  1527. // this.getDataList(this.page)
  1528. if(this.status == 8){
  1529. this.getWaitPrintPage(this.page)
  1530. }else if(this.status == 9){
  1531. this.getWaitPrintDeliveryPage(this.page)
  1532. }else if(this.status == 10){
  1533. this.getWaitNormalPrintPage(this.page)
  1534. }else{
  1535. this.getDataList(this.page)
  1536. }
  1537. },
  1538. /**
  1539. * 导航选择状态
  1540. */
  1541. selectNav (e) {
  1542. var sts = e.currentTarget.dataset.sts;
  1543. this.activeName = parseInt(sts);
  1544. this.status = this.activeName === 0 ? null : parseInt(sts)
  1545. this.page.currentPage = 1
  1546. if(this.status == 8){
  1547. this.getWaitPrintPage(this.page)
  1548. }else if(this.status == 9){
  1549. this.getWaitPrintDeliveryPage(this.page)
  1550. }else if(this.status == 10){
  1551. this.getWaitNormalPrintPage(this.page)
  1552. }else{
  1553. this.getDataList(this.page)
  1554. }
  1555. },
  1556. // 多选
  1557. selectionChangeHandle (val) {
  1558. this.dataListSelections = val
  1559. },
  1560. orderStatus (val) {
  1561. this.status = val
  1562. this.activeName = val + ''
  1563. this.getDataList(this.page)
  1564. },
  1565. /**
  1566. * 根据选项设置时间
  1567. * 1:今天 2:昨天 3: 近七天 4:近30天 5:近60天
  1568. */
  1569. setDateRange (val) {
  1570. this.timeActive = val
  1571. var startDay = null
  1572. var endDay = null
  1573. if (val === 1) {
  1574. startDay = 0
  1575. endDay = 0
  1576. } else if (val === 2) {
  1577. startDay = -1
  1578. endDay = -1
  1579. } else if (val === 3) {
  1580. startDay = -7
  1581. endDay = -1
  1582. } else if (val === 4) {
  1583. startDay = -30
  1584. endDay = -1
  1585. } else {
  1586. return
  1587. }
  1588. // 开始时间
  1589. let startTime = moment().add(startDay, 'days').startOf('days').format('LL')
  1590. // 结束时间
  1591. let endTime = moment().add(endDay, 'days').endOf('days').format('LL')
  1592. this.dateRange = [startTime, endTime]
  1593. },
  1594. // 查看订单
  1595. addOrUpdateHandle (orderNumber, shopId, status) {
  1596. this.$refs.orderInfo.init({
  1597. orderNumber: orderNumber,
  1598. shopId: shopId,
  1599. status: status
  1600. })
  1601. /*
  1602. this.$router.push({
  1603. path: '/order-orderInfo',
  1604. query: {
  1605. orderNumber: orderNumber,
  1606. shopId: shopId,
  1607. status: status
  1608. }
  1609. })*/
  1610. },
  1611. // 前往消息盒子
  1612. toImbox (order) {
  1613. window.open(location.href.split('#')[0] + '#/imBox?userId=' + order.userId + '&orderNumber=' + order.orderNumber, 'view_window')
  1614. },
  1615. // 退款路由跳转
  1616. refundRoute (val) {
  1617. this.$router.push({
  1618. path: '/order-orderRefund',
  1619. query: { orderNumber: val }
  1620. })
  1621. },
  1622. // 删除
  1623. deleteHandle (id) {
  1624. var ids = id ? [id] : this.dataListSelections.map(item => {
  1625. return item.orderId
  1626. })
  1627. this.$confirm(`${this.$i18n.t('sys.makeSure')}[${id ? this.$i18n.t('text.delBtn') : this.$i18n.t('sys.batchDelete')}]${this.$i18n.t('text.menu')}?`, this.$i18n.t('text.tips'), {
  1628. confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
  1629. cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
  1630. type: 'warning'
  1631. }).then(() => {
  1632. this.$http({
  1633. url: this.$http.adornUrl(`/prod/spec/${ids}`),
  1634. method: 'delete',
  1635. data: this.$http.adornData(ids, false)
  1636. }).then(({ data }) => {
  1637. this.$message({
  1638. message: this.$i18n.t('publics.operation'),
  1639. type: 'success',
  1640. duration: 1500,
  1641. onClose: () => {
  1642. this.getDataList(this.page)
  1643. }
  1644. })
  1645. })
  1646. }).catch(() => { })
  1647. },
  1648. showConsignmentInfo () {
  1649. this.consignmentInfoVisible = true
  1650. this.$nextTick(() => {
  1651. this.$refs.consignmentInfo.init()
  1652. })
  1653. },
  1654. getWaitingConsignmentExcel () {
  1655. this.getDataList(this.page)
  1656. },
  1657. uploadSpu () {
  1658. this.dataForm.startTime = this.dateRange === null ? null : this.dateRange[0]
  1659. this.dataForm.endTime = this.dateRange === null ? null : this.dateRange[1]
  1660. this.uploadVisible = true
  1661. this.$nextTick(() => {
  1662. this.$refs.spuUpload.init()
  1663. })
  1664. },
  1665. // 清空按钮
  1666. clear () {
  1667. this.dataForm = {}
  1668. this.dateRange = []
  1669. this.status = null
  1670. this.timeActive = null
  1671. },
  1672. // 搜索查询
  1673. searchChange (newData = false) {
  1674. let it = this;
  1675. this.dataList.forEach((item, index) => {
  1676. it.$set(item,'checkStatus',false)
  1677. it.dataListSelections.delete(item.orderNumber);
  1678. it.selectAll = false;
  1679. it.checked = false;
  1680. })
  1681. this.dataListSelections = new Set();
  1682. this.selectAll = false;
  1683. this.selectSheets = 0;
  1684. this.page.currentPage = 1
  1685. // this.getDataList(this.page, null, newData)
  1686. if(this.status === 8){
  1687. this.getWaitPrintPage(this.page, null, newData)
  1688. }else if(this.status === 9){
  1689. this.getWaitPrintDeliveryPage(this.page, null, newData)
  1690. }else if(this.status === 10){
  1691. this.getWaitNormalPrintPage(this.page, null, newData)
  1692. }else{
  1693. this.getDataList(this.page, null, newData)
  1694. }
  1695. },
  1696. /**
  1697. * 更改订单金额
  1698. */
  1699. editAmount (order) {
  1700. this.orderAmountUpdateVisible = true
  1701. this.$nextTick(() => {
  1702. this.$refs.orderAmountUpdate.init(order)
  1703. })
  1704. },
  1705. /**
  1706. * 发货
  1707. */
  1708. changeOrder (order) {
  1709. this.devyVisible = true
  1710. this.$nextTick(() => {
  1711. this.$refs.orderDeliveryUpdate.init(order)
  1712. })
  1713. },
  1714. /**
  1715. * 标记推广
  1716. */
  1717. markPromotion(order){
  1718. this.$http({
  1719. url: this.$http.adornUrl('/order/order/markPromotion/' + order.orderNumber),
  1720. method: 'POST',
  1721. }).then(({ data }) => {
  1722. if(data){
  1723. this.$message({
  1724. message: "标记成功",
  1725. type: 'success'
  1726. });
  1727. this.getDataList(this.page, null, false);
  1728. }else{
  1729. this.$message({
  1730. message: "标记失败",
  1731. type: 'error'
  1732. })
  1733. }
  1734. })
  1735. },
  1736. /**
  1737. * 提货
  1738. */
  1739. stationOrder (order) {
  1740. this.orderStationVisible = true
  1741. this.$nextTick(() => {
  1742. this.$refs.orderStation.init(order)
  1743. })
  1744. },
  1745. getSoldExcel () {
  1746. if (!this.dateRange || this.dateRange.length < 2) {
  1747. this.$message.error(this.$i18n.t('order.pleExpOrderFirst'))
  1748. return
  1749. }
  1750. this.$confirm(`${this.$i18n.t('order.exportReport')}`, this.$i18n.t('text.tips'), {
  1751. confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
  1752. cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
  1753. type: 'warning'
  1754. }).then(() => {
  1755. this.$http({
  1756. url: this.$http.adornUrl('/order/order/soldExcel'),
  1757. method: 'get',
  1758. params: this.$http.adornParams({
  1759. 'orderNumber': this.dataForm.orderNumber,
  1760. // 'prodName': this.dataForm.prodName,
  1761. 'orderType': this.dataForm.orderType,
  1762. 'payType': this.dataForm.payType,
  1763. 'lang': this.lang === 'en' ? 1 : 0,
  1764. 'receiver': this.dataForm.receiver,
  1765. 'mobile': this.dataForm.mobile,
  1766. 'status': this.status,
  1767. 'dvyType': this.dataForm.dvyType,
  1768. 'stationName': this.dataForm.stationName,
  1769. 'refundStatus': this.dataForm.refundStatus,
  1770. 'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
  1771. 'endTime': this.dateRange === null ? null : this.dateRange[1] // 结束时间
  1772. }),
  1773. responseType: 'blob' // 解决文件下载乱码问题
  1774. }).then(({ data }) => {
  1775. var blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' })
  1776. const fileName = this.$i18n.t('order.orderInfCollationXls')
  1777. const elink = document.createElement('a')
  1778. if ('download' in elink) { // 非IE下载
  1779. elink.download = fileName
  1780. elink.style.display = 'none'
  1781. elink.href = URL.createObjectURL(blob)
  1782. document.body.appendChild(elink)
  1783. elink.click()
  1784. URL.revokeObjectURL(elink.href) // 释放URL 对象
  1785. document.body.removeChild(elink)
  1786. } else { // IE10+下载
  1787. navigator.msSaveBlob(blob, fileName)
  1788. }
  1789. })
  1790. })
  1791. },
  1792. openDeliveryPage(deliveryNo){
  1793. // window.open("https://t.17track.net/zh-cn#nums=" + deliveryNo, '_blank');
  1794. let copy = (e)=>{
  1795. e.preventDefault()
  1796. e.clipboardData.setData('text/plain',deliveryNo)
  1797. document.removeEventListener('copy',copy)
  1798. }
  1799. document.addEventListener('copy',copy)
  1800. document.execCommand("Copy");
  1801. window.open("https://www.baidu.com/s?wd=%E7%89%A9%E6%B5%81%E6%9F%A5%E8%AF%A2&rsv_spt=1&rsv_iqid=0xe1fe334b0008559a&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=16&rsv_sug1=12&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=2849&rsv_sug4=3141", '_blank')
  1802. },
  1803. openOrderPromotionDialog(orderNumber, prodName){
  1804. this.$refs.orderPromotion.init({
  1805. orderNumber: orderNumber,
  1806. prodName: prodName
  1807. })
  1808. },
  1809. openPromotionDialog(){
  1810. this.$refs.orderPromotion.init({
  1811. })
  1812. },
  1813. },
  1814. destroyed () {
  1815. // 页面销毁时移除监听
  1816. window.removeEventListener('scroll', this.handleScroll)
  1817. }
  1818. }
  1819. </script>
  1820. <style lang="scss" scoped>
  1821. .mod-order-order {
  1822. .search-bar {
  1823. .input-row {
  1824. .select-time-btn {
  1825. margin-right: 20px;
  1826. display: inline-block;
  1827. color: #AAAAAA;
  1828. font-size: 14px;
  1829. cursor:pointer;
  1830. &:last-child {
  1831. margin-right: 0;
  1832. }
  1833. }
  1834. .select-time-btn.is-active {
  1835. color: #155BD4;
  1836. }
  1837. }
  1838. }
  1839. .main {
  1840. .content {
  1841. .all-check-btn {
  1842. margin-right: 10px;
  1843. }
  1844. .had-selected {
  1845. font-size: 12px;
  1846. margin-right: 10px;
  1847. }
  1848. }
  1849. .order-status-nav {
  1850. position: relative;
  1851. display: block;
  1852. width: 100%;
  1853. margin-bottom: 15px;
  1854. height: 40px;
  1855. line-height: 40px;
  1856. border-bottom: 1px solid #ddd;
  1857. ul,
  1858. li {
  1859. list-style: none;
  1860. padding: 0;
  1861. margin: 0;
  1862. }
  1863. .nav-item {
  1864. float: left;
  1865. height: 40px;
  1866. line-height: 40px;
  1867. background: #f7f8fa;
  1868. border: 1px solid #ddd;
  1869. padding: 0 20px;
  1870. margin: 0 -1px -1px 0;
  1871. cursor: pointer;
  1872. }
  1873. .selected {
  1874. background: #fff;
  1875. border-bottom: 1px solid #fff;
  1876. }
  1877. }
  1878. .status-nav {
  1879. ::v-deep .el-tabs__item {
  1880. padding: 0 20px ;
  1881. min-width: 68px;
  1882. width: auto;
  1883. text-align: center;
  1884. }
  1885. ::v-deep .el-tabs__nav-wrap::after{
  1886. height: 1px;
  1887. }
  1888. }
  1889. .tit {
  1890. display: flex;
  1891. align-items: center;
  1892. margin-bottom: 15px;
  1893. background: #F7F8FA;
  1894. z-index: 11;
  1895. height: 57px;
  1896. font-weight: bold;
  1897. .column-title {
  1898. text-align: center;
  1899. }
  1900. .item {
  1901. padding: 0 10px;
  1902. width: 10%;
  1903. text-align: center;
  1904. }
  1905. .product {
  1906. width: 25%;
  1907. margin-bottom: 15px;
  1908. text-align: left !important;
  1909. }
  1910. }
  1911. .fixed-top {
  1912. position: fixed;
  1913. width: calc(83.5% + var(--tit-width-incremental));
  1914. top: 90px;
  1915. }
  1916. .prod {
  1917. margin-bottom: 15px;
  1918. .prod-tit {
  1919. padding: 10px;
  1920. background: #F7F8FA;
  1921. height: 49px;
  1922. display: flex;
  1923. align-items: center;
  1924. border-left: 1px solid #EBEDF0;
  1925. border-top: 1px solid #EBEDF0;
  1926. border-right: 1px solid #EBEDF0;
  1927. .order-number{
  1928. color: #333333;
  1929. font-size: 14px
  1930. }
  1931. .order-index{
  1932. color: red;
  1933. font-size: 14px;
  1934. font-weight: bold;
  1935. }
  1936. .order-time{
  1937. color: #999999;
  1938. font-size: 14px
  1939. }
  1940. span {
  1941. margin-right: 15px;
  1942. }
  1943. }
  1944. .prod-cont {
  1945. display: flex;
  1946. border: 1px solid #EBEDF0;
  1947. color: #495060;
  1948. .item {
  1949. display: flex;
  1950. display: -webkit-flex;
  1951. align-items: center;
  1952. padding: 10px;
  1953. text-align: center;
  1954. justify-content: center !important;
  1955. height: 100%;
  1956. border-right: 1px solid #eee;
  1957. .totalprice {
  1958. color: #ff4141;
  1959. margin-bottom: 10px;
  1960. }
  1961. .operate {
  1962. color: #2d8cf0;
  1963. .operate-btn {
  1964. margin: 0 !important;
  1965. height: auto;
  1966. }
  1967. .default-btn + .default-btn {
  1968. display: block;
  1969. margin-top: 10px;
  1970. margin-left: 0;
  1971. }
  1972. }
  1973. .buyer-info {
  1974. .buyer-name {
  1975. margin-bottom: 4px;
  1976. }
  1977. }
  1978. span {
  1979. display: block;
  1980. }
  1981. }
  1982. .prod-item {
  1983. padding: 0;
  1984. display: flex;
  1985. flex-direction: column !important;
  1986. height: 100%;
  1987. border-right: 1px solid #eee;
  1988. .items.name {
  1989. width: 100%;
  1990. display: flex;
  1991. align-items: center;
  1992. border-bottom: 1px solid #EBEDF0;
  1993. padding: 10px !important;
  1994. text-align: left;
  1995. &:last-child {
  1996. border-bottom: none;
  1997. }
  1998. .order-prod-item-info {
  1999. width: 72%;
  2000. display: flex;
  2001. flex-direction: column;
  2002. .info {
  2003. display: flex;
  2004. align-items: center;
  2005. .prod-image {
  2006. min-height: 80px;
  2007. width: 80px;
  2008. height: auto;
  2009. margin-right: 20px;
  2010. padding: 0;
  2011. line-height: 80px;
  2012. img {
  2013. width: 100%;
  2014. height: 100%;
  2015. object-fit: contain;
  2016. }
  2017. }
  2018. .prod-name {
  2019. width: 100% !important;
  2020. .prod-con {
  2021. width: 85% !important;
  2022. display: block;
  2023. padding: 0 !important;
  2024. .prod-name-txt {
  2025. padding-right: 10px;
  2026. box-sizing: border-box;
  2027. display: -webkit-box;
  2028. -webkit-box-orient: vertical;
  2029. -webkit-line-clamp: 2;
  2030. overflow: hidden;
  2031. }
  2032. .order-status {
  2033. display: inline-block;
  2034. margin-top: 15px;
  2035. margin-right: 10px;
  2036. padding: 2px 4px;
  2037. border: 1px solid #e43130;
  2038. border-radius: 2px;
  2039. color: #e43130;
  2040. font-size: 14px;
  2041. }
  2042. }
  2043. }
  2044. }
  2045. // 赠品盒子
  2046. .order-prod-item-give-con {
  2047. width: 100%;
  2048. padding: 10px 50px 0 10px;
  2049. box-sizing: border-box;
  2050. .giveaway-item {
  2051. display: flex;
  2052. margin-bottom: 10px;
  2053. &:last-child {
  2054. margin-bottom: 0;
  2055. }
  2056. }
  2057. .giveaway-item-name {
  2058. box-sizing: border-box;
  2059. display: -webkit-box;
  2060. -webkit-box-orient: vertical;
  2061. -webkit-line-clamp: 1;
  2062. overflow: hidden;
  2063. }
  2064. .giveaway-item-sku-count {
  2065. margin-left: 10px;
  2066. color: #999;
  2067. width: 20px;
  2068. }
  2069. }
  2070. }
  2071. .prod-price {
  2072. width: 28%;
  2073. display: flex;
  2074. justify-content: flex-start;
  2075. flex-direction: column;
  2076. overflow: hidden;
  2077. position: relative;
  2078. right: 0 !important;
  2079. span {
  2080. display: block;
  2081. text-align: left;
  2082. word-break: keep-all;
  2083. &:first-child {
  2084. margin-bottom: 10px;
  2085. }
  2086. }
  2087. }
  2088. }
  2089. }
  2090. }
  2091. }
  2092. .empty {
  2093. display: block;
  2094. height: 200px;
  2095. line-height: 200px;
  2096. text-align: center;
  2097. color: #aaa;
  2098. }
  2099. .transaction-price {
  2100. text-align: left;
  2101. }
  2102. }
  2103. // 修改物流弹窗
  2104. .change-logistics {
  2105. color: #333;
  2106. padding: 0 20px;
  2107. .warning {
  2108. padding: 10px;
  2109. border: 1px solid #f1924e;
  2110. background: #fff5ed;
  2111. }
  2112. .log-list {
  2113. max-height: 600px;
  2114. margin-top: 30px;
  2115. overflow-y: auto;
  2116. .item {
  2117. padding-bottom: 20px;
  2118. .i-tit {
  2119. display: flex;
  2120. align-items: center;
  2121. .big {
  2122. font-weight: 600;
  2123. margin-right: 15px;
  2124. }
  2125. }
  2126. .item-goods {
  2127. position: relative;
  2128. width: 100%;
  2129. height: 110px;
  2130. overflow-x: auto;
  2131. .goods-box {
  2132. position: absolute;
  2133. left: 0;
  2134. display: flex;
  2135. margin-top: 0;
  2136. -webkit-transition: all 0.3s;
  2137. -moz-transition: all 0.3s;
  2138. transition: all 0.3s;
  2139. .item {
  2140. margin-right: 10px;
  2141. font-size: 12px;
  2142. cursor: pointer;
  2143. .img {
  2144. width: 60px;
  2145. height: 60px;
  2146. font-size: 0;
  2147. margin-bottom: 4px;
  2148. margin-top: 4px;
  2149. position: relative;
  2150. img {
  2151. width: 100%;
  2152. height: 100%;
  2153. }
  2154. .number {
  2155. position: absolute;
  2156. bottom: 0;
  2157. right: 0;
  2158. background: rgba(0, 0, 0, 0.3);
  2159. color: #fff;
  2160. border-radius: 6px 0 6px 0;
  2161. font-size: 12px;
  2162. height: 16px;
  2163. line-height: 16px;
  2164. padding: 0 5px;
  2165. }
  2166. }
  2167. .name {
  2168. width: 60px;
  2169. height: 16px;
  2170. line-height: 16px;
  2171. white-space: nowrap;
  2172. overflow: hidden;
  2173. text-overflow: ellipsis;
  2174. color: #999;
  2175. }
  2176. }
  2177. .item:last-child {
  2178. margin: 0;
  2179. }
  2180. }
  2181. }
  2182. .info-int {
  2183. &.el-form-item__content,
  2184. &.el-form-item__label,
  2185. .el-input__suffix-inner,
  2186. .el-input__icon {
  2187. height: 32px;
  2188. line-height: 32px;
  2189. }
  2190. display: flex;
  2191. .form-item {
  2192. margin-right: 15px;
  2193. }
  2194. }
  2195. }
  2196. }
  2197. .log-info-table {
  2198. margin-top: 20px;
  2199. max-height: 600px;
  2200. overflow-y: auto;
  2201. }
  2202. }
  2203. @media (max-width:1660px) {
  2204. .fixed-top {
  2205. width: calc(79.5% + var(--tit-width-incremental)) !important;
  2206. }
  2207. }
  2208. @media (max-width:1360px) {
  2209. .fixed-top {
  2210. width: calc(75.5% + var(--tit-width-incremental)) !important;
  2211. }
  2212. }
  2213. }
  2214. </style>