order.vue 85 KB

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