order.vue 85 KB

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