com-order.php 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. <?php
  2. Yii::$app->loadComponentView('order/com-search','@app/plugins/o2o_store/views/components/mall');
  3. Yii::$app->loadComponentView('order/com-edit-address');
  4. Yii::$app->loadComponentView('order/com-edit-seller-remark');
  5. Yii::$app->loadComponentView('order/com-clerk');
  6. Yii::$app->loadComponentView('order/com-send');
  7. Yii::$app->loadComponentView('order/com-cancel');
  8. Yii::$app->loadComponentView('order/com-edit-price');
  9. Yii::$app->loadComponentView('order/com-city');
  10. ?>
  11. <style>
  12. .com-order-list .table-body {
  13. padding: 20px;
  14. background-color: #fff;
  15. }
  16. .com-order-list .header-box {
  17. padding: 20px;
  18. background-color: #fff;
  19. margin-bottom: 10px;
  20. border-top-left-radius: 4px;
  21. border-top-right-radius: 4px;
  22. }
  23. .com-order-list .header-box .title {
  24. display: inline-block;
  25. }
  26. .com-order-list .addPrice {
  27. color: #5CB85C;
  28. }
  29. .com-order-list .com-order-item .el-button {
  30. padding: 0;
  31. }
  32. .com-order-list .change .el-input__inner {
  33. height: 22px !important;
  34. line-height: 22px !important;
  35. }
  36. .com-order-list .price-item {
  37. color: #888888;
  38. }
  39. .com-order-list .price-item .el-form-item {
  40. margin-bottom: 0 !important;
  41. }
  42. .com-order-list .important {
  43. color: #ff4544;
  44. }
  45. .com-order-list .com-order-list .goods-info {
  46. padding: 5px;
  47. font-size: 12px;
  48. color: #353535;
  49. text-align: left;
  50. }
  51. .com-order-list .com-order-list .goods-name {
  52. white-space: nowrap;
  53. overflow: hidden;
  54. text-overflow: ellipsis;
  55. font-size: 16px;
  56. margin-bottom: 10px;
  57. }
  58. .com-order-list .el-date-editor .el-range-separator {
  59. width: auto;
  60. }
  61. .com-order-list .goods-image {
  62. height: 90px;
  63. width: 90px;
  64. margin-right: 15px;
  65. float: left;
  66. }
  67. .com-order-list .com-order-item {
  68. margin-top: 20px;
  69. min-width: 750px;
  70. }
  71. .com-order-list .com-order-item:hover {
  72. border: 1px solid #3399FF;
  73. }
  74. .com-order-list .com-order-item:hover .com-order-del {
  75. display: block;
  76. }
  77. .com-order-del {
  78. position: absolute;
  79. top: 20px;
  80. right: 25px;
  81. color: #7C868D;
  82. font-size: 18px;
  83. padding: 0;
  84. display: none;
  85. }
  86. .com-order-list .com-order-item .el-card__header {
  87. padding: 0;
  88. }
  89. .com-order-list .com-order-head {
  90. padding: 20px;
  91. background-color: #F3F5F6;
  92. color: #303133;
  93. min-width: 750px;
  94. display: flex;
  95. position: relative;
  96. }
  97. .com-order-list .com-order-time {
  98. color: #909399;
  99. }
  100. .com-order-user {
  101. margin-left: 30px;
  102. }
  103. .com-order-user img {
  104. height: 20px;
  105. width: 20px;
  106. display: block;
  107. float: left;
  108. border-radius: 50%;
  109. margin-right: 10px;
  110. }
  111. .com-order-offline {
  112. margin-left: 30px;
  113. margin-top: -2px;
  114. }
  115. .com-order-offline .el-tag {
  116. margin-right: 5px;
  117. }
  118. .com-order-refund-status {
  119. position: absolute;
  120. bottom: 19px;
  121. left: 20px;
  122. height: 20px;
  123. width: 90px;
  124. z-index: 5;
  125. background-color: #FF7171;
  126. color: #fff;
  127. text-align: center;
  128. }
  129. .cancel {
  130. margin-left: 10px;
  131. }
  132. .com-order-list .com-order-item .cancel .el-button {
  133. padding: 5px;
  134. }
  135. .com-order-list .el-card__body {
  136. padding: 0;
  137. }
  138. .com-order-body {
  139. display: flex;
  140. flex-wrap: nowrap;
  141. }
  142. .com-order-list .goods-item {
  143. border-right: 1px solid #EBEEF5;
  144. }
  145. .com-order-list .goods-item .goods {
  146. position: relative;
  147. padding: 20px;
  148. min-height: 130px;
  149. border-top: 1px solid #EBEEF5;
  150. }
  151. .com-order-list .goods-item .goods:first-of-type {
  152. border-top: 0;
  153. }
  154. .com-order-list .goods-item .goods-info {
  155. width: 50%;
  156. margin-top: 5px;
  157. }
  158. .com-order-list .goods-item .goods-info .goods-name {
  159. margin-bottom: 5px;
  160. word-break: break-all;
  161. text-overflow: ellipsis;
  162. display: -webkit-box;
  163. -webkit-box-orient: vertical;
  164. -webkit-line-clamp: 2;
  165. overflow: hidden;
  166. }
  167. .com-order-list .goods-item .goods .com-order-goods-price {
  168. height: 24px;
  169. margin-top: 10px;
  170. position: absolute;
  171. bottom: 20px;
  172. left: 125px;
  173. }
  174. .com-order-list .com-order-info {
  175. display: flex;
  176. align-items: center;
  177. width: 15%;
  178. text-align: center;
  179. border-right: 1px solid #EBEEF5;
  180. }
  181. .com-order-list .com-order-info > div {
  182. width: 100%;
  183. }
  184. .com-order-list .express-price {
  185. height: 30px;
  186. line-height: 30px;
  187. }
  188. .com-order-title {
  189. background-color: #F3F5F6;
  190. height: 40px;
  191. line-height: 40px;
  192. display: flex;
  193. min-width: 750px;
  194. }
  195. .com-order-title div {
  196. text-align: center;
  197. }
  198. .com-order-icon {
  199. margin-right: 5%;
  200. margin-bottom: 10px;
  201. cursor: pointer;
  202. }
  203. .com-order-icon:last-of-type {
  204. margin-right: 0;
  205. }
  206. .com-order-list .remark-box {
  207. padding-top: 3px;
  208. margin-left: 7px;
  209. }
  210. /*表格底部样式 start*/
  211. .com-order-list .card-footer {
  212. background: #F3F5F6;
  213. padding: 10px 20px;
  214. }
  215. .com-order-list .card-footer .address-box {
  216. margin-right: 10px;
  217. }
  218. .com-order-list .card-footer .seller-remark {
  219. margin-top: 10px;
  220. color: #E6A23C;
  221. }
  222. /*表格底部样式 end*/
  223. .com-order-list .express-send-box {
  224. position: relative;
  225. overflow: hidden;
  226. border-radius: 4px;
  227. height: 24px;
  228. }
  229. .com-order-list .express-send-box .triangle {
  230. width: 0;
  231. height: 0;
  232. border-right: 23px solid rgba(0, 0, 0, 0);
  233. border-top: 23px solid red;
  234. position: relative;
  235. top: -24px;
  236. }
  237. .com-order-list .express-send-box .triangle .text {
  238. font-size: 10px;
  239. color: #ffffff;
  240. position: absolute;
  241. top: -25px;
  242. }
  243. .express-single-box {
  244. margin-bottom: 10px;
  245. }
  246. .express-single-box .goods-pic {
  247. width: 35px;
  248. height: 35px;
  249. margin: 0 4px;
  250. }
  251. .express-single-box .label {
  252. margin-right: 10px;
  253. }
  254. </style>
  255. <template id="com-order-list" ref="appOrder">
  256. <div class="com-order-list" style="margin-bottom: 20px;">
  257. <div class="header-box">
  258. <div class="title">
  259. <slot name="orderTitle">订单列表</slot>
  260. </div>
  261. <com-export-dialog
  262. style="float: right;margin-top: -5px"
  263. :field_list='export_list'
  264. :action_url="'<?= Yii::$app->request->baseUrl . '/index.php?r=' ?>' + orderUrl"
  265. :params="search">
  266. </com-export-dialog>
  267. <el-button
  268. v-if="isShowRecycle"
  269. style="float: right; margin: -5px 20px"
  270. :loading="submitLoading"
  271. type="primary"
  272. size="small"
  273. @click="toRecycleAll">清空回收站
  274. </el-button>
  275. </div>
  276. <div class="table-body">
  277. <com-search
  278. @search="toSearch"
  279. :plugins="plugins"
  280. :tabs="tabs"
  281. :active-name="activeName"
  282. :is-show-order-type="isShowOrderType"
  283. :is-show-order-plugin="isShowOrderPlugin"
  284. :new-search="newSearch"
  285. :select-list="selectList">
  286. </com-search>
  287. <com-edit-address
  288. @close="dialogClose"
  289. @submit="dialogSubmit"
  290. :is-show="addressVisible"
  291. :order="newOrder">
  292. </com-edit-address>
  293. <com-edit-seller-remark
  294. :url="editRemarkUrl"
  295. @close="dialogClose"
  296. @submit="dialogSubmit"
  297. :is-show="sellerRemarkVisible"
  298. :order="newOrder">
  299. </com-edit-seller-remark>
  300. <com-clerk
  301. @close="dialogClose"
  302. @submit="dialogSubmit"
  303. :is-show="clerkVisible"
  304. :order="newOrder">
  305. </com-clerk>
  306. <com-send
  307. @close="dialogClose"
  308. @submit="dialogSubmit"
  309. :is-show="sendVisible"
  310. :express-id="expressId"
  311. :send-type="sendType"
  312. :order="newOrder">
  313. </com-send>
  314. <com-cancel
  315. @close="dialogClose"
  316. @submit="dialogSubmit"
  317. :is-show="cancelVisible"
  318. :cancel-type="cancelType"
  319. :order="newOrder">
  320. </com-cancel>
  321. <com-edit-price
  322. @close="dialogClose"
  323. @submit="dialogSubmit"
  324. :is-show="changePriceVisible"
  325. :order="newOrder">
  326. </com-edit-price>
  327. <com-city
  328. @close="dialogClose"
  329. @submit="dialogSubmit"
  330. :is-show="citySendVisible"
  331. :send-type="sendType"
  332. :order="newOrder">
  333. </com-city>
  334. <div class="com-order-title">
  335. <div v-for="(item,index) in orderTitle" :key="index" :style="{width: item.width}">{{item.name}}</div>
  336. </div>
  337. <div v-loading="loading" v-if="list && list.length > 0">
  338. <el-card
  339. v-for="item in list"
  340. class="com-order-item"
  341. :key="item.id"
  342. shadow="never">
  343. <div slot="header" class="com-order-head" flex="cross:center">
  344. <div class="com-order-time">{{ item.created_at }}</div>
  345. <div class="com-order-user">
  346. <span class="com-order-time">订单号:</span>{{ item.order_no }}
  347. </div>
  348. <div class="com-order-user" flex="cross:center">
  349. <img src="statics/img/mall/ali.png" v-if="item.platform == 'aliapp'" alt="">
  350. <img src="statics/img/mall/wx.png" v-else-if="item.platform == 'wxapp'" alt="">
  351. <img src="statics/img/mall/toutiao.png" v-else-if="item.platform == 'ttapp'" alt="">
  352. <img src="statics/img/mall/baidu.png" v-else-if="item.platform == 'bdapp'" alt="">
  353. <span>{{ item.nickname }}({{ item.user_id }})</span>
  354. </div>
  355. <div flex="cross:center" class="remark-box" v-if="item.remark != '' || item.words != ''">
  356. <el-tooltip effect="dark" placement="bottom">
  357. <div slot="content">
  358. <span v-if="item.remark">买家下单留言:{{item.remark}}</span>
  359. <br v-if="item.remark"/>
  360. <span v-if="item.words">商家订单留言:{{item.words}}</span>
  361. <br v-if="item.words"/>
  362. <span v-for="(deItem, deIndex) in item.detailExpress" :key="deItem.id">
  363. <span v-if="deItem.merchant_remark">
  364. 卖家物流留言: {{deItem.merchant_remark}}
  365. </span>
  366. <br v-if="deItem.merchant_remark"/>
  367. </span>
  368. </div>
  369. <div v-if="item.remark || item.is_show_merchant_remark">
  370. <img src="statics/img/mall/order/remark.png" alt="">
  371. </div>
  372. </el-tooltip>
  373. </div>
  374. <div class="com-order-offline" flex="dir:left wrap:wrap">
  375. <template v-if="item.cancel_status == 2 && item.status == 1 && isShowCancel">
  376. <!-- 用户申请取消 -->
  377. <div class="cancel" flex="wrap:wrap">
  378. <span style="margin-right: 5px;">用户正在申请取消该订单</span>
  379. <el-button type="success" size="mini" @click="agreeCancel(item,1)">同意</el-button>
  380. <el-button type="danger" size="mini" @click="agreeCancel(item,0)">拒绝</el-button>
  381. </div>
  382. </template>
  383. <template v-else-if="isShowOrderStatus">
  384. <!-- <div v-if="item.send_type == 0" class="express-send-box">-->
  385. <!-- <el-tag size="small">快递发送</el-tag>-->
  386. <!-- <div v-if="item.store_id > 0" class="triangle">-->
  387. <!-- <el-tooltip class="item" effect="dark" content="该订单由门店自提改成快递发送" placement="top">-->
  388. <!-- <span class="text">改</span>-->
  389. <!-- </el-tooltip>-->
  390. <!-- </div>-->
  391. <!-- </div>-->
  392. <el-tag size="small" v-if="item.send_type == 0">快递发送</el-tag>
  393. <el-tag size="small" v-if="item.send_type == 1">到店自提</el-tag>
  394. <el-tag size="small" v-if="item.send_type == 2">同城配送</el-tag>
  395. <el-tag size="small" type="warning" v-if="item.is_pay == 0">待付款</el-tag>
  396. <el-tag size="small" type="warning" v-if="item.is_pay == 1 && item.is_send == 0">已付款
  397. </el-tag>
  398. <el-tag size="small" type="success"
  399. v-if="item.is_send == 0 && item.is_pay == 1 && item.detailExpress && item.detailExpress.length > 0">
  400. 部分发货
  401. </el-tag>
  402. <el-tag size="small" type="success"
  403. v-if="item.is_send == 0 && item.is_pay == 1 && item.detailExpress && item.detailExpress.length == 0">
  404. 未发货
  405. </el-tag>
  406. <el-tag size="small" type="success" v-if="item.is_send == 1 && item.is_confirm == 0">
  407. 已发货
  408. </el-tag>
  409. <el-tag size="small" type="success" v-if="item.is_confirm == 0 && item.is_send == 1">
  410. 未收货
  411. </el-tag>
  412. <el-tag size="small" type="success" v-if="item.is_sale == 1">已完成</el-tag>
  413. <el-tag size="small" type="danger" v-if="item.cancel_status == 1">已取消</el-tag>
  414. <el-tag size="small" type="danger" v-else-if="item.cancel_status == 2">申请取消</el-tag>
  415. <slot name="orderTag" :order="item"></slot>
  416. </template>
  417. </div>
  418. <el-button
  419. v-if="isShowCancel && item.is_send == 0 && item.cancel_status == 0 && item.is_cancel_show == 1 && item.status == 1"
  420. style="right: 60px"
  421. class="com-order-del"
  422. @click="agreeCancel(item,2)"
  423. type="text">
  424. <el-tooltip class="item" effect="dark" content="强制取消" placement="top">
  425. <img src="statics/img/mall/order/force.png" alt="">
  426. </el-tooltip>
  427. </el-button>
  428. <el-button v-if="isShowRecycle && item.is_recycle == 0"
  429. class="com-order-del"
  430. @click="toRecycle(item)"
  431. type="text">
  432. <el-tooltip class="item" effect="dark" content="放入回收站" placement="top">
  433. <img src="statics/img/mall/order/del.png" alt="">
  434. </el-tooltip>
  435. </el-button>
  436. </div>
  437. <div class="com-order-body">
  438. <!-- 订单信息 -->
  439. <div class="goods-item" :style="{width: orderTitle[0].width}">
  440. <div class="goods" v-for="goods in item.detail">
  441. <img :src="goods.goods_info && goods.goods_info.goods_attr && goods.goods_info.goods_attr.pic_url ? goods.goods_info.goods_attr.pic_url : goods.goods_info.goods_attr.cover_pic"
  442. class="goods-image">
  443. <span v-if="goods.refund_status == '11' || goods.refund_status == '10' || goods.refund_status == '12'" class="com-order-refund-status">售后中</span>
  444. <span v-else-if="goods.refund_status == '20'" class="com-order-refund-status">已退款</span>
  445. <span v-else-if="goods.refund_status == '21'" class="com-order-refund-status">已拒绝</span>
  446. <div flex="dir:left">
  447. <div class="goods-info">
  448. <div class="goods-name">
  449. <com-ellipsis :line="2">
  450. <el-tag style="margin-right: 5px"
  451. v-if="goods.plugin_name != null"
  452. size="mini"
  453. type="warning" hit>
  454. {{goods.mch && goods.mch.id > 0 ?
  455. goods.mch.store.name+'('+goods.mch.id+')'
  456. :goods.plugin_name}}
  457. </el-tag>
  458. {{goods.goods_info && goods.goods_info.goods_attr &&
  459. goods.goods_info.goods_attr.name ?
  460. goods.goods_info.goods_attr.name : goods.goods.goodsWarehouse.name}}
  461. </com-ellipsis>
  462. </div>
  463. <div style="margin-bottom: 24px;">
  464. <span style="margin-right: 10px;">
  465. <slot name="attr" :item="item">
  466. 规格:
  467. <el-tag size="mini"
  468. style="margin-right: 5px;"
  469. v-for="attr in goods.attr_list"
  470. :key="attr.id">
  471. {{attr.attr_group_name}}:{{attr.attr_name}}
  472. </el-tag>
  473. </slot>
  474. </span>
  475. </div>
  476. <div class="com-order-goods-price">
  477. <span v-if="goods.goods_info && goods.goods_info.goods_attr &&
  478. goods.goods_info.goods_attr.no">
  479. 货号:{{goods.goods_info.goods_attr.no}}
  480. </span>
  481. </div>
  482. </div>
  483. <div style="width: 250px" flex="dir:left box:mean">
  484. <div flex="cross:center main:center">
  485. <span>小计:¥{{goods.total_original_price}}</span>
  486. <el-button type="text"
  487. style="margin-left: 3px;"
  488. v-if="isShowEditSinglePrice && item.is_pay == 0 && item.is_send == 0 && search.status != 5"
  489. circle
  490. @click="changeGoods(goods)">
  491. <img src="statics/img/mall/order/edit.png" alt="">
  492. </el-button>
  493. </div>
  494. <div flex="cross:center main:center">数量:x {{goods.num}}</div>
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. <div flex="cross:center" class="com-order-info" :style="{width:orderTitle[1].width}">
  500. <div flex="dir:top">
  501. <div>
  502. <span style="font-size: 16px">¥{{item.total_pay_price}}</span>
  503. <el-popover
  504. placement="bottom"
  505. width="250"
  506. trigger="hover">
  507. <el-form class="price-item" label-width="100px" :model="item">
  508. <el-form-item label="商品小计">
  509. <span>{{ item.total_goods_original_price }}元</span>
  510. </el-form-item>
  511. <el-form-item label="会员优惠" v-if="item.member_discount_price != 0.00">
  512. <span class="important" v-if="item.member_discount_price > 0">
  513. -{{ item.member_discount_price }}元
  514. </span>
  515. <span class="addPrice" v-if="item.member_discount_price < 0">
  516. +{{ -item.member_discount_price }}元
  517. </span>
  518. </el-form-item>
  519. <el-form-item label="积分抵扣" v-if="item.score_deduction_price != 0.00">
  520. <span class="important">-{{ item.score_deduction_price }}元</span>
  521. </el-form-item>
  522. <el-form-item label="优惠券抵扣" v-if="item.coupon_discount_price != 0.00">
  523. <span class="important">-{{ item.coupon_discount_price }}元</span>
  524. </el-form-item>
  525. <el-form-item label="后台改价" v-if="item.back_price != 0.00">
  526. <span class="important" v-if="item.back_price > 0">-{{ item.back_price }}元</span>
  527. <span class="addPrice" v-else>+{{ -item.back_price }}元</span>
  528. </el-form-item>
  529. <el-form-item label="运费改价" v-if="item.express_price != 0">
  530. <span class="important"
  531. v-if="item.express_price > item.express_original_price">
  532. +{{item.express_price - item.express_original_price}}元
  533. </span>
  534. <span class="addPrice" v-else>
  535. -{{item.express_price - item.express_original_price }}元
  536. </span>
  537. </el-form-item>
  538. <el-form-item v-if="item.plugin_data" v-for="pluginData in item.plugin_data"
  539. :label="pluginData.label" :key="pluginData.label">
  540. <span class="important">{{pluginData.value}}元</span>
  541. </el-form-item>
  542. </el-form>
  543. <img src="statics/img/mall/order/price.png" slot="reference" alt="">
  544. </el-popover>
  545. <slot name="other" :item="item"></slot>
  546. </div>
  547. <div class="express-price">
  548. <span>
  549. <span style="color: #909399">(含运费¥{{item.express_price}})</span>
  550. <!-- <el-button type="text"-->
  551. <!-- v-if="isShowEditExpressPrice && item.is_pay == 0 && item.is_send == 0 && search.status != 5"-->
  552. <!-- circle-->
  553. <!-- @click="openDialog(item, changePriceVisible = true)">-->
  554. <!-- <img src="statics/img/mall/order/edit.png" alt="">-->
  555. <!-- </el-button>-->
  556. </span>
  557. </div>
  558. <div>
  559. <el-tag size="mini" color="#E6A23C" style="color:#fff;border:0"
  560. v-if="item.pay_type == 1">在线支付
  561. </el-tag>
  562. <el-tag size="mini" color="#E6A23C" style="color:#fff;border:0"
  563. v-if="item.pay_type == 3">余额支付
  564. </el-tag>
  565. <el-tag size="mini" color="#E6A23C" style="color:#fff;border:0"
  566. v-if="item.pay_type == 2">货到付款
  567. </el-tag>
  568. </div>
  569. </div>
  570. </div>
  571. <div v-if="isShowAction" class="com-order-info" :style="{width:orderTitle[2].width}"
  572. style="padding: 10px;border-right: 0;">
  573. <div flex="wrap:wrap cross:center">
  574. <!-- 结束 -->
  575. <el-tooltip class="item" effect="dark" content="结束订单" placement="top">
  576. <img class="com-order-icon" @click="saleOrder(item.id)"
  577. v-if="item.is_recycle == 0 && item.is_confirm == 1 && item.is_sale == 0 && isShowFinish && item.status != 0"
  578. src="statics/img/mall/order/sale.png" alt="">
  579. </el-tooltip>
  580. <!-- 确认收货 -->
  581. <el-tooltip class="item" effect="dark" content="确认收货" placement="top">
  582. <img class="com-order-icon" src="statics/img/mall/order/confirm.png" alt=""
  583. v-if="item.is_recycle == 0 && item.is_send == 1 && item.is_confirm == 0 && isShowConfirm && item.status != 0 && item.is_confirm_show"
  584. @click="confirm(item.id)">
  585. </el-tooltip>
  586. <el-tooltip class="item" effect="dark" content="电子面单" placement="top">
  587. <img class="com-order-icon" src="statics/img/mall/order/express_single.png" alt=""
  588. v-if="item.new_express_single && item.new_express_single.length > 0"
  589. @click="expressSingle(item.new_express_single)">
  590. </el-tooltip>
  591. <!-- 核销 -->
  592. <el-tooltip class="item" effect="dark" content="核销订单" placement="top">
  593. <img class="com-order-icon" @click="openDialog(item, clerkVisible = true)"
  594. v-if="item.send_type == 1 && (item.is_pay == 1 || item.pay_type == 2) && item.clerk == null && item.is_send == 0 && item.is_clerk_show && item.is_recycle == 0 && isShowClerk && item.is_recycle == 0 && item.status != 0 && item.cancel_status != 1"
  595. src="statics/img/mall/order/clerk.png" alt="">
  596. </el-tooltip>
  597. <template v-if="">
  598. <slot name="orderSend" :order="item"></slot>
  599. <!-- 发货 -->
  600. <el-tooltip class="item" effect="dark" content="发货" placement="top">
  601. <img class="com-order-icon" @click="openExpress(item,'send')"
  602. v-if="item.is_send_show"
  603. src="statics/img/mall/order/send.png" alt="">
  604. </el-tooltip>
  605. <!-- 同城配送发货 选择配送员 --> <!-- 到店自提也可发货 -->
  606. <!-- <el-tooltip class="item" effect="dark" content="发货" placement="top">
  607. <img class="com-order-icon" @click="openCity(item,'send')"
  608. v-if="item.send_type == 2 && item.is_send == 0 && item.cancel_status != 1 && (item.is_pay == 1 || item.pay_type == 2) && item.is_send_show == 1 && isShowSend && item.is_recycle == 0 && item.status != 0"
  609. src="statics/img/mall/order/send.png" alt="">
  610. </el-tooltip>
  611. <el-tooltip class="item" effect="dark" content="发货" placement="top">
  612. <img class="com-order-icon" @click="storeOrderSend(item)"
  613. v-if="item.send_type == 1 && (item.is_pay == 1 || item.pay_type == 2) && item.is_send == 0 && item.cancel_status != 1 && item.is_send_show == 1 && isShowSend && item.is_recycle == 0 && item.status != 0"
  614. src="statics/img/mall/order/send.png" alt="">
  615. </el-tooltip> -->
  616. </template>
  617. <el-tooltip class="item" effect="dark" content="打印小票" placement="top">
  618. <img class="com-order-icon"
  619. v-if="item.is_recycle == 0 && isShowPrint"
  620. @click="print(item.id)"
  621. src="statics/img/mall/order/print.png" alt="">
  622. </el-tooltip>
  623. <!-- 恢复订单 -->
  624. <el-tooltip class="item" effect="dark" content="恢复订单" placement="top">
  625. <img class="com-order-icon" v-if="item.is_recycle == 1"
  626. @click="toRecycle(item)"
  627. src="statics/img/mall/order/renew.png" alt="">
  628. </el-tooltip>
  629. <!-- 删除订单 -->
  630. <el-tooltip class="item" effect="dark" content="删除订单" placement="top">
  631. <img class="com-order-icon" v-if="item.is_recycle == 1"
  632. @click="toDelete(item)"
  633. src="statics/img/mall/del.png" alt="">
  634. </el-tooltip>
  635. <!-- 订单详情 -->
  636. <el-tooltip class="item" effect="dark" content="查看订单详情" placement="top">
  637. <img v-if="isShowDetail" class="com-order-icon" @click="toDetail(item.id)"
  638. src="statics/img/mall/order/detail.png"
  639. alt="">
  640. </el-tooltip>
  641. </div>
  642. </div>
  643. <!--目前用于分销-->
  644. <slot name="orderAction" :order="item"></slot>
  645. </div>
  646. <div class="card-footer">
  647. <template v-if="item.send_type == 1">
  648. <div flex="cross:center">
  649. <el-tag style="margin-right: 10px;" size="small" hit type="warning">到店自提</el-tag>
  650. <span class="address-box" v-if="item.store">门店名称:{{item.store.name}} 电话:{{item.store.mobile}} 地址:{{item.store.address}}</span>
  651. </div>
  652. <div style="margin: 10px 0;">收货人: {{item.name}} 电话:{{item.mobile}}</div>
  653. </template>
  654. <div v-else-if="(item.send_type == 0 || item.send_type == 2) && item.address">
  655. <div flex="dir:left">
  656. <div class="address-box">收货人: {{item.name}} 电话:{{item.mobile}} 地址:{{item.address}}</div>
  657. <el-button
  658. v-if="isShowEditAddress == 1 && item.send_type != 2 && item.cancel_status == 0 && item.is_send==0"
  659. type="text"
  660. icon="el-icon-edit"
  661. circle
  662. @click="openDialog(item, addressVisible = true)">
  663. </el-button>
  664. </div>
  665. </div>
  666. <slot name="footerFirst" :item="item"></slot>
  667. <div class="seller-remark" v-if="item.seller_remark">商家备注:{{item.seller_remark}}</div>
  668. <slot name="footer" :item="item"></slot>
  669. </div>
  670. </el-card>
  671. </div>
  672. <el-card v-loading="loading" shadow="never" class="com-order-item"
  673. style="height: 100px;line-height: 100px;text-align: center;"
  674. v-if="list && list.length == 0">
  675. 暂无订单信息
  676. </el-card>
  677. <div style="margin-top: 15px">
  678. <el-pagination
  679. v-if="pagination"
  680. style="display: inline-block;float: right;"
  681. background
  682. :page-count="pagination.page_count"
  683. :current-page="pagination.current_page"
  684. @current-change="pageChange"
  685. layout="prev, pager, next">
  686. </el-pagination>
  687. </div>
  688. </div>
  689. <el-dialog
  690. title="电子面单"
  691. :visible.sync="singleDialogVisible"
  692. width="30%">
  693. <div v-for="(expressSingle, index) in newExpressSingle"
  694. :key="index"
  695. class="express-single-box" flex="dir:left">
  696. <div>
  697. <div class="label" style="background: #fffaef;color: #e6a23c;padding: 3px 0;">
  698. 收货信息:{{index + 1}}
  699. </div>
  700. </div>
  701. <div flex="dir:top">
  702. <div flex="cross:center">
  703. <template v-if="expressSingle.send_type == 1">
  704. <el-tag style="margin-right: 5px;" type="info" hit size="small">{{
  705. expressSingle.express }}
  706. </el-tag>
  707. <a :href="'https://www.baidu.com/s?wd='+ expressSingle.express + expressSingle.express_no"
  708. target="_blank" title='点击搜索运单号'>{{ expressSingle.express_no }}</a>
  709. </template>
  710. <template v-else>
  711. <span>{{expressSingle.express_content}}</span>
  712. </template>
  713. <el-button @click="printTeplate(expressSingle.print_teplate)" v-if="expressSingle.print_teplate"
  714. style="margin-left: 10px;" size="mini" type="default">打印此面单
  715. </el-button>
  716. </div>
  717. <div flex="dir:left" style="margin-top: 10px;">
  718. <span class="label">配送商品:</span>
  719. <img v-for="(goods, index) in expressSingle.goods_list"
  720. :key="index"
  721. class="goods-pic"
  722. :src="goods.cover_pic">
  723. </div>
  724. </div>
  725. </div>
  726. </el-dialog>
  727. <el-dialog width="25%" title="修改商品价格" :visible.sync="editGoodsPriceVisible">
  728. <el-form :model="editGoodsForm" ref="goodsValidateForm" label-width="80px" size="small">
  729. <el-form-item
  730. label="商品价格"
  731. prop="total_price"
  732. :rules="[{ required: true, message: '价格不能为空'}]">
  733. <el-input type="number" v-model="editGoodsForm.total_price" auto-complete="off"></el-input>
  734. </el-form-item>
  735. </el-form>
  736. <div slot="footer" class="dialog-footer">
  737. <el-button size="small" @click="editGoodsPriceVisible = false">取 消</el-button>
  738. <el-button size="small" :loading="submitLoading" type="primary"
  739. @click="changePrice('goodsValidateForm')">确 定
  740. </el-button>
  741. </div>
  742. </el-dialog>
  743. </div>
  744. </template>
  745. <script>
  746. Vue.component('com-order', {
  747. template: '#com-order-list',
  748. props: {
  749. orderTitle: {
  750. type: Array,
  751. default: function () {
  752. return [
  753. {width: '60%', name: '订单信息'},
  754. {width: '20%', name: '实付金额'},
  755. {width: '20%', name: '操作'}
  756. ]
  757. }
  758. },
  759. selectList: {
  760. type: Array,
  761. default: function () {
  762. return [
  763. {value: '1', name: '订单号'},
  764. {value: '9', name: '商户单号'},
  765. {value: '2', name: '用户名'},
  766. {value: '4', name: '用户ID'},
  767. {value: '5', name: '商品名称'},
  768. {value: '3', name: '收货人'},
  769. {value: '6', name: '收货人电话'},
  770. {value: '7', name: '门店名称'},
  771. {value: 'goods_no', name: '商品货号'},
  772. ]
  773. }
  774. },
  775. tabs: {
  776. type: Array,
  777. default: function () {
  778. return [
  779. {value: '-1', name: '全部'},
  780. {value: '0', name: '待付款'},
  781. {value: '1', name: '待发货'},
  782. {value: '2', name: '待收货'},
  783. {value: '3', name: '已完成'},
  784. {value: '4', name: '待处理'},
  785. {value: '5', name: '已取消'},
  786. {value: '7', name: '回收站'},
  787. ]
  788. }
  789. },
  790. activeName: {
  791. type: String,
  792. default: '-1',
  793. },
  794. // 订单列表请求URL
  795. orderUrl: {
  796. type: String,
  797. default: 'plugin/o2o_store/mall/order/index',
  798. },
  799. // 删除回收站请求URl
  800. recycleUrl: {
  801. type: String,
  802. default: 'mall/order/destroy-all',
  803. },
  804. // 订单详情URL
  805. orderDetailUrl: {
  806. type: String,
  807. default: 'plugin/o2o_store/mall/order/detail'
  808. },
  809. // 修改备注请求URL
  810. editRemarkUrl: {
  811. type: String,
  812. default: 'mall/order/seller-remark'
  813. },
  814. // 订单详情URL
  815. batchSendUrl: {
  816. type: String,
  817. default: 'mall/order/batch-send'
  818. },
  819. // 控制按钮是否显示
  820. // 编辑收货地址
  821. isShowEditAddress: {
  822. type: Boolean,
  823. default: true
  824. },
  825. // 订单取消操作
  826. isShowCancel: {
  827. type: Boolean,
  828. default: true
  829. },
  830. // 编辑订单备注
  831. isShowRemark: {
  832. type: Boolean,
  833. default: true
  834. },
  835. // 结束订单
  836. isShowFinish: {
  837. type: Boolean,
  838. default: true
  839. },
  840. // 确认收货
  841. isShowConfirm: {
  842. type: Boolean,
  843. default: true
  844. },
  845. // 小票打印
  846. isShowPrint: {
  847. type: Boolean,
  848. default: true
  849. },
  850. // 订单核销
  851. isShowClerk: {
  852. type: Boolean,
  853. default: true
  854. },
  855. // 订单发货
  856. isShowSend: {
  857. type: Boolean,
  858. default: true
  859. },
  860. // 清空回收站
  861. isShowRecycle: {
  862. type: Boolean,
  863. default: true
  864. },
  865. // 订单配送方式
  866. isShowOrderType: {
  867. type: Boolean,
  868. default: true
  869. },
  870. // 订单配送方式
  871. isShowOrderStatus: {
  872. type: Boolean,
  873. default: true
  874. },
  875. // 订单详情
  876. isShowDetail: {
  877. type: Boolean,
  878. default: true
  879. },
  880. // 操作按钮
  881. isShowAction: {
  882. type: Boolean,
  883. default: true
  884. },
  885. // 修改运费
  886. isShowEditExpressPrice: {
  887. type: Boolean,
  888. default: true
  889. },
  890. // 修改商品小计
  891. isShowEditSinglePrice: {
  892. type: Boolean,
  893. default: true
  894. },
  895. // 插件筛选
  896. isShowOrderPlugin: {
  897. type: Boolean,
  898. default: false
  899. },
  900. newSearch: {
  901. type: Object,
  902. default: function () {
  903. return {
  904. time: null,
  905. keyword: '',
  906. keyword_1: '1',
  907. date_start: '',
  908. date_end: '',
  909. platform: '',
  910. status: '',
  911. plugin: 'all',
  912. send_type: -1,
  913. }
  914. }
  915. },
  916. },
  917. data() {
  918. return {
  919. search: {},
  920. submitLoading: false,
  921. // 新的
  922. loading: false,
  923. list: [],
  924. pagination: null,
  925. newOrder: {},// 传给各子组件的订单信息
  926. addressVisible: false,// 修改收货地址
  927. sellerRemarkVisible: false,// 添加商户备注
  928. clerkVisible: false,// 订单核销
  929. sendVisible: false,// 发货
  930. sendType: '',// 发货类型
  931. cancelVisible: false,// 订单取消
  932. cancelType: -1,// 订单取消状态 同意|拒绝
  933. changePriceVisible: false,// 修改订单价格
  934. plugins: [
  935. {
  936. name: '全部订单',
  937. sign: 'all',
  938. }
  939. ],// 插件筛选
  940. export_list: [],//导出字段数据,
  941. // 修改商品单价 start
  942. editGoodsPriceVisible: false,//修改商品单价
  943. editGoodsForm: {
  944. total_price: '',
  945. id: 0,
  946. },//价格
  947. // 修改商品单价 end
  948. expressId: 0,// 修改物流
  949. citySendVisible: false, //同城配送发货
  950. singleDialogVisible: false,// 电子面单弹框
  951. newExpressSingle: [],
  952. };
  953. },
  954. mounted() {
  955. this.search = this.newSearch;
  956. // 用户列表 用户订单数
  957. if (getQuery('user_id') > 0) {
  958. this.search.keyword_1 = '4';
  959. this.search.keyword = getQuery('user_id')
  960. }
  961. if (getQuery('clerk_id') > 0) {
  962. this.search.clerk_id = getQuery('clerk_id');
  963. }
  964. this.getList();
  965. },
  966. methods: {
  967. // 关闭弹出框
  968. closeDialog() {
  969. this.submitLoading = false;
  970. this.id = null;
  971. },
  972. // 进入商品详情
  973. toDetail(id) {
  974. this.$navigate({
  975. r: this.orderDetailUrl,
  976. order_id: id
  977. })
  978. },
  979. // 确认收货
  980. confirm(id) {
  981. this.$confirm('是否确认收货?', '提示', {
  982. confirmButtonText: '确定',
  983. cancelButtonText: '取消',
  984. }).then(() => {
  985. request({
  986. params: {
  987. r: 'mall/order/confirm',
  988. },
  989. data: {
  990. order_id: id
  991. },
  992. method: 'post',
  993. }).then(e => {
  994. if (e.data.code == 0) {
  995. this.$message({
  996. message: e.data.msg,
  997. type: 'success'
  998. });
  999. this.getList();
  1000. } else {
  1001. this.$message({
  1002. message: e.data.msg,
  1003. type: 'error'
  1004. });
  1005. }
  1006. }).catch(e => {
  1007. this.$message({
  1008. message: e.data.msg,
  1009. type: 'error'
  1010. });
  1011. });
  1012. }).catch(e => {
  1013. });
  1014. },
  1015. // 结束订单
  1016. saleOrder(id) {
  1017. this.$confirm('是否结束该订单?', '提示', {
  1018. confirmButtonText: '确定',
  1019. cancelButtonText: '取消',
  1020. }).then(() => {
  1021. request({
  1022. params: {
  1023. r: 'mall/order/order-sales',
  1024. },
  1025. data: {
  1026. order_id: id
  1027. },
  1028. method: 'post',
  1029. }).then(e => {
  1030. if (e.data.code == 0) {
  1031. this.$message({
  1032. message: e.data.msg,
  1033. type: 'success'
  1034. });
  1035. this.getList();
  1036. } else {
  1037. this.$message({
  1038. message: e.data.msg,
  1039. type: 'error'
  1040. });
  1041. }
  1042. }).catch(e => {
  1043. });
  1044. }).catch(() => {
  1045. });
  1046. },
  1047. // 打印小票
  1048. print(id) {
  1049. this.$confirm('是否打印小票?', '提示', {
  1050. confirmButtonText: '确定',
  1051. cancelButtonText: '取消',
  1052. }).then(() => {
  1053. this.loading = true;
  1054. request({
  1055. params: {
  1056. r: 'mall/order/order-print',
  1057. order_id: id
  1058. },
  1059. method: 'get',
  1060. }).then(e => {
  1061. this.loading = false;
  1062. if (e.data.code == 0) {
  1063. this.$message({
  1064. message: e.data.msg,
  1065. type: 'success'
  1066. });
  1067. this.getList();
  1068. }
  1069. this.$message({
  1070. message: e.data.msg,
  1071. type: 'warning'
  1072. });
  1073. }).catch(e => {
  1074. });
  1075. }).catch(() => {
  1076. });
  1077. },
  1078. changeGoods(e) {
  1079. this.editGoodsPriceVisible = true;
  1080. this.editGoodsForm.total_price = e.total_original_price;
  1081. this.editGoodsForm.id = e.id;
  1082. },
  1083. // 修改商品金额
  1084. changePrice(formName) {
  1085. this.$refs[formName].validate((valid) => {
  1086. if (valid) {
  1087. this.submitLoading = true;
  1088. request({
  1089. params: {
  1090. r: 'mall/order/update-price',
  1091. },
  1092. data: {
  1093. order_detail_id: this.editGoodsForm.id,
  1094. total_price: this.editGoodsForm.total_price
  1095. },
  1096. method: 'post',
  1097. }).then(e => {
  1098. this.submitLoading = false;
  1099. if (e.data.code === 0) {
  1100. this.editGoodsPriceVisible = false
  1101. this.$message({
  1102. message: '修改成功',
  1103. type: 'success'
  1104. });
  1105. this.getList();
  1106. } else {
  1107. this.$message({
  1108. message: e.data.msg,
  1109. type: 'warning'
  1110. });
  1111. }
  1112. }).catch(e => {
  1113. });
  1114. } else {
  1115. console.log('error submit!!');
  1116. return false;
  1117. }
  1118. });
  1119. },
  1120. // 回收站
  1121. toRecycle(e) {
  1122. let that = this;
  1123. let text = "是否放入回收站(可在回收站中恢复)?"
  1124. let para = {
  1125. order_id: e.id,
  1126. is_recycle: 1
  1127. }
  1128. if (e.is_recycle == 1) {
  1129. para.is_recycle = 0;
  1130. text = "是否移出回收站?"
  1131. }
  1132. this.$confirm(text, '提示', {
  1133. confirmButtonText: '确定',
  1134. cancelButtonText: '取消',
  1135. type: 'warning',
  1136. center: true
  1137. }).then(() => {
  1138. request({
  1139. params: {
  1140. r: 'plugin/o2o_store/mall/order/recycle',
  1141. },
  1142. data: para,
  1143. method: 'post'
  1144. }).then(e => {
  1145. e.visible = false;
  1146. this.submitLoading = false;
  1147. if (e.data.code === 0) {
  1148. this.$message({
  1149. message: e.data.msg,
  1150. type: 'success'
  1151. });
  1152. this.getList();
  1153. }
  1154. }).catch(e => {
  1155. });
  1156. }).catch(() => {
  1157. });
  1158. },
  1159. expressSingle(newExpressSingle) {
  1160. this.singleDialogVisible = true
  1161. this.newExpressSingle = newExpressSingle;
  1162. },
  1163. printTeplate(htmlData) {
  1164. myWindow = window.open('', '_blank');
  1165. myWindow.document.write(htmlData);
  1166. myWindow.focus();
  1167. },
  1168. // 删除订单
  1169. toDelete(e) {
  1170. this.$confirm('是否删除订单?', '提示', {
  1171. confirmButtonText: '确定',
  1172. cancelButtonText: '取消',
  1173. type: 'warning'
  1174. }).then(() => {
  1175. request({
  1176. params: {
  1177. r: 'mall/order/destroy',
  1178. },
  1179. data: {
  1180. order_id: e.id,
  1181. },
  1182. method: 'post'
  1183. }).then(e => {
  1184. this.loading = false;
  1185. if (e.data.code == 0) {
  1186. this.$message({
  1187. message: e.data.msg,
  1188. type: 'success'
  1189. });
  1190. this.getList();
  1191. }
  1192. }).catch(e => {
  1193. });
  1194. }).catch(() => {
  1195. });
  1196. },
  1197. // 获取订单列表
  1198. getList() {
  1199. this.loading = true;
  1200. let params = {
  1201. r: this.orderUrl
  1202. };
  1203. Object.keys(this.search).map((key) => {
  1204. params[key] = this.search[key]
  1205. });
  1206. request({
  1207. params: params,
  1208. }).then(e => {
  1209. this.loading = false;
  1210. if (e.data.code === 0) {
  1211. this.list = e.data.data.list;
  1212. this.export_list = e.data.data.export_list;
  1213. this.pagination = e.data.data.pagination;
  1214. //this.plugins = e.data.data.plugins;
  1215. let arr = e.data.data.plugins
  1216. let searchObj = {
  1217. "sign":"cloud_stock",
  1218. "name":"云库存订单"
  1219. }
  1220. arr.push(searchObj);
  1221. this.plugins = arr;
  1222. }
  1223. }).catch(e => {
  1224. });
  1225. },
  1226. // com-search组件 搜索事件
  1227. toSearch(searchParams) {
  1228. this.search = searchParams;
  1229. this.search.page = 1;
  1230. this.getList();
  1231. },
  1232. // 分页
  1233. pageChange(page) {
  1234. this.search.page = page;
  1235. this.getList();
  1236. },
  1237. openDialog(order) {
  1238. this.newOrder = order;
  1239. },
  1240. dialogClose() {
  1241. this.addressVisible = false;
  1242. this.sellerRemarkVisible = false;
  1243. this.clerkVisible = false;
  1244. this.sendVisible = false;
  1245. this.changePriceVisible = false;
  1246. this.cancelVisible = false;
  1247. this.citySendVisible = false;
  1248. },
  1249. dialogSubmit() {
  1250. this.expressId = 0;
  1251. this.getList();
  1252. },
  1253. // 发货
  1254. openExpress(order, type, expressId) {
  1255. this.newOrder = order;
  1256. this.sendType = type;
  1257. this.sendVisible = true;
  1258. this.expressId = parseInt(expressId);
  1259. },
  1260. // 申请取消订单
  1261. agreeCancel(row, status) {
  1262. this.newOrder = row;
  1263. this.cancelType = status;
  1264. this.cancelVisible = true;
  1265. },
  1266. // 清空回收站
  1267. toRecycleAll(e) {
  1268. this.$confirm('此操作将清空回收站, 是否继续?', '提示', {
  1269. confirmButtonText: '确定',
  1270. cancelButtonText: '取消',
  1271. type: 'warning',
  1272. center: true
  1273. }).then(() => {
  1274. this.submitLoading = true;
  1275. request({
  1276. params: {
  1277. r: this.recycleUrl,
  1278. },
  1279. data: {},
  1280. method: 'post',
  1281. }).then(e => {
  1282. e.visible = false;
  1283. this.submitLoading = false;
  1284. if (e.data.code === 0) {
  1285. this.$message({
  1286. message: e.data.msg,
  1287. type: 'success'
  1288. });
  1289. this.getList();
  1290. } else {
  1291. this.$message({
  1292. message: e.data.msg,
  1293. type: 'warning'
  1294. });
  1295. }
  1296. }).catch(e => {
  1297. this.submitLoading = false;
  1298. });
  1299. }).catch(() => {
  1300. });
  1301. },
  1302. // 清空回收站
  1303. toBatchSend(e) {
  1304. this.$navigate({
  1305. r: this.batchSendUrl
  1306. })
  1307. },
  1308. openExpressHint() {
  1309. this.$alert('该订单有多个物流,请到订单详情修改物流信息', '提示', {
  1310. confirmButtonText: '确定',
  1311. callback: action => {
  1312. }
  1313. });
  1314. },
  1315. openCity(order, sendType) {
  1316. this.newOrder = order;
  1317. this.sendType = sendType
  1318. this.citySendVisible = true;
  1319. },
  1320. storeOrderSend(order) {
  1321. this.$alert('是否将配送方式改为快递配送?', '提示', {
  1322. confirmButtonText: '确定',
  1323. showCancelButton: true,
  1324. type: 'warning',
  1325. callback: action => {
  1326. if (action == 'confirm') {
  1327. this.openDialog(order)
  1328. this.addressVisible = true;
  1329. }
  1330. }
  1331. });
  1332. }
  1333. },
  1334. });
  1335. </script>