index.php 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('component/order-address', __DIR__);
  4. ComponentHelper::loadComponentView('component/order-shipping', __DIR__, ['is_electronic_bill' => $is_electronic_bill ?? false]);
  5. ComponentHelper::loadComponentView('com-export-dialog');
  6. ComponentHelper::loadComponentView('com-ellipsis');
  7. if (isset($is_electronic_bill) && $is_electronic_bill) {
  8. ComponentHelper::loadComponentView('electronic-bill-batch', \Yii::$app->basePath . '/../addons/' . \common\enums\AddonsEnum::ADDONS_NAME_ELECTRONIC_BILL . '/common/components/order');
  9. }
  10. ?>
  11. <style>
  12. @media screen and (max-width: 1500px) {
  13. #app {
  14. min-width: 1270px;
  15. }
  16. }
  17. .vue-line-clamp p {
  18. line-height: 22px;
  19. }
  20. .demo-form-inline .el-select .el-input {
  21. width: 100px;
  22. }
  23. .order_number {
  24. display: flex;
  25. justify-content: space-between;
  26. }
  27. .order_number .el-link {
  28. width: 140px;
  29. }
  30. /* 订单表格 start */
  31. .width-pre10 {
  32. width: 10%;
  33. }
  34. .width-50 {
  35. width: 50px;
  36. }
  37. .width-400 {
  38. width: 350px;
  39. }
  40. .order-table {
  41. overflow-x: scroll;
  42. }
  43. .tab-title,
  44. .tab-cont {
  45. width: 100%;
  46. min-width: 1290px;
  47. font-size: 13px;
  48. }
  49. .tab-title {
  50. padding: 20px 0;
  51. }
  52. .tab-title>li {
  53. padding: 0 10px;
  54. }
  55. .tab-cont {
  56. border: 1px solid #F2F2F2;
  57. margin-bottom: 20px;
  58. }
  59. .tab-cont-row {
  60. padding: 10px 0;
  61. background-color: #F7F7F7;
  62. }
  63. .tab-cont-info {
  64. height: 100px;
  65. }
  66. .tab-cont-info>li {
  67. /* display: flex;
  68. flex-direction: column;
  69. justify-content: center; */
  70. height: 100%;
  71. padding: 16px 10px;
  72. }
  73. .tab-btns {
  74. width: 320px;
  75. margin-right: 20px;
  76. }
  77. .tab-goods-name {
  78. margin: 0 10px;
  79. }
  80. .border-right {
  81. border-right: 1px solid #f2f2f2;
  82. }
  83. .border-bottom {
  84. border-bottom: 1px solid #f2f2f2;
  85. }
  86. .no-border-bottom {
  87. border-bottom: none !important;
  88. }
  89. .cursor {
  90. cursor: pointer;
  91. }
  92. .edit-icon {
  93. color: #03c5ff;
  94. cursor: pointer;
  95. }
  96. .popover-btn {
  97. font-size: 12px;
  98. padding: 0 10px;
  99. border-right: 1px solid var(--primary, #03c5ff);
  100. cursor: pointer;
  101. display: inline-block;
  102. line-height: 1;
  103. color: #03c5ff;
  104. }
  105. .popover-btn:last-child {
  106. border-right: none;
  107. }
  108. .width-s {
  109. width: 250px;
  110. }
  111. .el-button--text {
  112. padding: 0 !important;
  113. }
  114. .com-order-refund-status {
  115. position: absolute;
  116. bottom: 18px;
  117. left: 0px;
  118. height: 20px;
  119. width: 50px;
  120. background-color: #FF7171;
  121. color: #fff;
  122. text-align: center;
  123. border-radius: 0 0 5px 5px;
  124. font-size: 12px;
  125. }
  126. .fenRunData .el-dialog__body {
  127. padding: 0px 10px 0 10px;
  128. }
  129. .change_price p {
  130. padding: 5px;
  131. font-size: 15px;
  132. width: 200px;
  133. }
  134. .change_price {
  135. width: 200px;
  136. margin: 0px 0 0px 81%;
  137. }
  138. .change_price label {
  139. float: left;
  140. width: 100px;
  141. text-align: right;
  142. padding-right: 20px;
  143. }
  144. .change_formula {
  145. float: left;
  146. width: 300px;
  147. color: #6c6969;
  148. font-size: 12px;
  149. }
  150. .el-tabs--border-card {
  151. border: 0;
  152. }
  153. /* 订单表格 end */
  154. </style>
  155. <div id="app" v-cloak>
  156. <el-tabs type="border-card" v-model="orderTypeTab" @tab-click="orderTypeTabClick">
  157. <el-tab-pane label="商品订单" name="gorder">
  158. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" v-loading="listLoading">
  159. <div slot="header">
  160. <span>订单列表</span>
  161. <div style="float: right; margin: -5px 0;display:flex;">
  162. <?php if (isset($is_electronic_bill) && $is_electronic_bill) { ?>
  163. <electronic-bill-batch :order-list="list" :params="search_data" @complete="getList(search_data)"></electronic-bill-batch>
  164. <?php } ?>
  165. <div style="margin-top: -5px;margin-right:10px;">
  166. <el-button type="primary" size="small" @click="detailOrder">批量删除</el-button>
  167. </div>
  168. <!-- <el-button type="primary" size="small" @click="handle('edit')">添加商品</el-button>-->
  169. <!-- <el-button type="primary" size="small">订单导出</el-button>-->
  170. <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search_data">
  171. </com-export-dialog>
  172. </div>
  173. </div>
  174. <div class="table-body">
  175. <el-tabs v-model="activeName" @tab-click="handleClick">
  176. <el-tab-pane v-for="item in tabs" :key="item.value" :label="item.name" :name="item.value">
  177. <el-form :inline="true" :model="search_data" size="small" class="demo-form-inline">
  178. <el-form-item label="下单时间">
  179. <el-date-picker style="margin-top: 1px;" @change="changeTime" v-model="datetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" size="small"></el-date-picker>
  180. </el-form-item>
  181. <el-form-item label="">
  182. <div class="order_number">
  183. <el-input placeholder="请输入订单号" v-model="search_data.order_no" size="small"></el-input>
  184. <el-link type="primary" :underline="false" @click="upOrderNumber">订单批量查询</el-link>
  185. </div>
  186. </el-form-item>
  187. <el-form-item label="">
  188. <el-input placeholder="请输入内容" v-model="search_data.type_value" class="input-with-select">
  189. <el-select v-model="search_data.type" slot="prepend" clearable placeholder="请选择" size="small">
  190. <el-option label="收货人" value="consignee"></el-option>
  191. <el-option label="收货人手机" value="consignee_mobile"></el-option>
  192. <el-option label="订单ID" value="order_id"></el-option>
  193. <el-option label="用户ID" value="user_id"></el-option>
  194. <el-option label="会员编号" value="username"></el-option>
  195. <el-option label="手机号码" value="mobile"></el-option>
  196. <el-option label="商品名称" value="goods_name"></el-option>
  197. <el-option label="交易单号" value="trade_no"></el-option>
  198. </el-select>
  199. </el-input>
  200. </el-form-item>
  201. <el-form-item label="配送方式">
  202. <el-select v-model="search_data.shipping_type" placeholder="请选择">
  203. <el-option v-for="(val, key) in shipping_type_list" :key="key" :label="val" :value="key">
  204. </el-option>
  205. </el-select>
  206. </el-form-item>
  207. <el-form-item label="订单标识">
  208. <el-select v-model="search_data.marketing_type" placeholder="请选择" size="small">
  209. <el-option v-for="(val, key) in marketing_type_map" :key="key" :label="val" :value="key">
  210. </el-option>
  211. </el-select>
  212. </el-form-item>
  213. <el-form-item label="标识排除">
  214. <el-select v-model="search_data.not_marketing_type" placeholder="请选择" size="small">
  215. <el-option v-for="(val, key) in marketing_type_map" :key="key" :label="val" :value="key">
  216. </el-option>
  217. </el-select>
  218. </el-form-item>
  219. <el-form-item label="支付方式">
  220. <el-select v-model="search_data.payment_type" placeholder="请选择" size="small">
  221. <el-option v-for="(val, key) in payment_type_arr" :key="key" :label="val" :value="key">
  222. </el-option>
  223. </el-select>
  224. </el-form-item>
  225. <el-form-item label="优惠券抵扣">
  226. <el-select v-model="search_data.is_use_coupon" placeholder="请选择" size="small">
  227. <el-option v-for="(val, key) in user_coupon_map" :key="key" :label="val" :value="key">
  228. </el-option>
  229. </el-select>
  230. </el-form-item>
  231. <el-form-item label="商品一级分类">
  232. <el-select v-model="search_data.cate_id" placeholder="请选择" clearable size="small">
  233. <el-option v-for="(val, key) in cateList" :key="val.id" :label="val.name" :value="val.id">
  234. </el-option>
  235. </el-select>
  236. </el-form-item>
  237. <el-form-item label="收货地址筛选 省、市、区">
  238. <el-cascader
  239. @change="addressChange"
  240. :options="districtList"
  241. :props="addressProps"
  242. v-model="addressIdsMap"
  243. clearable @clear="clearAreaIds"
  244. size="small"
  245. >
  246. </el-cascader>
  247. </el-form-item>
  248. <template v-if="isShowStatistical">
  249. <el-form-item >
  250. <div><span>订单总额:</span><span>¥{{totalAreaMoney}}</span></div>
  251. </el-form-item>
  252. <el-form-item >
  253. <div><span>订单数量:</span><span>{{totalOrderCount}}条</span></div>
  254. </el-form-item>
  255. </template>
  256. <el-form-item>
  257. <el-button type="primary" @click="search" size="small">搜索</el-button>
  258. <el-button type="danger" @click="clearSearch" v-if="show_clear_search_btn" size="small">清除条件</el-button>
  259. </el-form-item>
  260. </el-form>
  261. <!-- 订单表格 start -->
  262. <div class="order-table">
  263. <ul class="tab-title" flex="dir:left cross:center">
  264. <li class="width-50" flex="main:center">
  265. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="allSelOrder"></el-checkbox>
  266. </li>
  267. <li class="width-400">商品信息</li>
  268. <li class="width-pre10">价格/数量</li>
  269. <li class="width-pre10">实付款</li>
  270. <li class="width-s">收货人信息</li>
  271. <li class="width-s" v-if="is_show_username==1">真实姓名</li>
  272. <li class="width-s">配送方式</li>
  273. <li class="width-pre10">状态</li>
  274. <li class="width-pre10">备注</li>
  275. <li class="width-pre10">留言</li>
  276. <li class="width-400">操作</li>
  277. </ul>
  278. <div class="tab-cont" v-for="(item, index) in list" :key="index">
  279. <div class="tab-cont-row" flex="main:justify cross:center">
  280. <div flex="dir:left cross:center">
  281. <div class="width-50" flex="main:center">
  282. <!-- <el-checkbox v-model="item.select" @change=""></el-checkbox> -->
  283. <el-checkbox-group v-model="checkedOrder" @change="orderChange">
  284. <el-checkbox :label="item.id">{{''}}</el-checkbox>
  285. </el-checkbox-group>
  286. </div>
  287. <div style="padding-right: 20px;">订单({{ item.id }})编号:{{ item.order_no || '-' }}</div>
  288. <div v-if="item.base_user" style="padding-right: 20px;">
  289. <el-button type="text" @click="navUserDetail(item.base_user.id)" class="all_text">
  290. 用户({{item.base_user.id}}):{{ item.base_user.nickname || item.base_user.username }}
  291. </el-button>
  292. </div>
  293. <div style="padding-right: 20px;">下单时间:{{ item.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  294. <el-tag size="small" style="margin-right: 20px;" v-if="marketing_type_map[item.marketing_type]">{{marketing_type_map[item.marketing_type]}}</el-tag>
  295. <el-tag size="small" v-if="item.community_shipping_type && item.is_virtual == 0" :type="item.community_shipping_type.type">{{item.community_shipping_type.title}}</el-tag>
  296. <el-tag size="small" style="margin-left: 20px;" v-if="item.is_user_handle_finish == 1">放弃退换货</el-tag>
  297. <el-tag size="small" style="margin-left: 20px;" v-if="item.is_print == 1">已打印</el-tag>
  298. <el-tag size="small" type="warning" style="margin-left: 20px;" v-else>未打印</el-tag>
  299. <el-tag size="small" style="margin-left: 20px;" v-if="orderDetailStatusIdentical(item.detail)">部分发货</el-tag>
  300. <el-tag size="small" :type="item.order_status == -4 ? 'danger' : ''" style="margin-left: 20px;" v-else>{{ order_status_list[item.order_status] }}</el-tag>
  301. <el-tag size="small" style="margin-left: 20px;" v-if="item.goods_subtype == 1" type="warning">处方药</el-tag>
  302. </div>
  303. </div>
  304. <ul class="tab-cont-info" flex="dir:left cross:center" v-for="(it, i) in item.detail" v-if="true">
  305. <li class="width-50" :class="i == item.detail.length - 1 ? 'no-border-bottom' : 'border-bottom'"></li>
  306. <li class="tab-shop-info width-400" flex="dir:left" :class="i == item.detail.length - 1 ? 'no-border-bottom' : 'border-bottom'">
  307. <div style="position: relative;">
  308. <el-button type="text" @click="goodDetail(it.goods_id)">
  309. <el-image style="width: 50px; height: 50px; border-radius: 5px;" :src="it.pic_url"></el-image>
  310. </el-button>
  311. <span v-if="repeal_list[it.is_feedback]" class="com-order-refund-status">{{ repeal_list[it.is_feedback] }}</span>
  312. </div>
  313. <div class="tab-goods-name">
  314. <com-ellipsis :line="1" :text="it.goods_name+''"></com-ellipsis>
  315. <template>
  316. <el-popover
  317. trigger="hover"
  318. placement="top"
  319. >
  320. <el-tag size="small">
  321. {{ it.goods_attr_name || '无规格' }}
  322. </el-tag>
  323. <el-tag slot="reference" style="margin-right: 2px;margin-top: 5px;max-width: 187px;overflow: hidden;text-overflow: ellipsis; cursor: pointer;" size="small">
  324. {{ it.goods_attr_name || '无规格' }}
  325. </el-tag>
  326. </el-popover>
  327. </template>
  328. <div v-if="it.coupons_card_no">卡券编号: {{it.coupons_card_no}} <el-tag style="cursor: pointer" title="点击复制卡券编号" size="mini" type="primary" @click="onCopyCardNo(it.coupons_card_no)">复制</el-tag></div>
  329. </div>
  330. </li>
  331. <li class="width-pre10 border-right" :class="i == item.detail.length - 1 ? 'no-border-bottom' : 'border-bottom'">
  332. <div class="cursor" flex="cross:center" @mouseover="mouseOver(index, i)" @mouseleave="mouseLeave">
  333. <p style="padding-right: 10px;">
  334. {{ getOrderPrice(it) }}
  335. <span v-if="it.adjust_money != 0">(调价:¥{{ it.adjust_money }})</span>
  336. </p>
  337. </div>
  338. <p style="padding-right: 10px;">
  339. <span v-if="it.marketing_type == 'FunMall' && it.handling_fee_text">
  340. {{it.handling_fee_text}}
  341. </span>
  342. </p>
  343. <p>{{ it.num }}{{it.goods_unit||'件'}}</p>
  344. </li>
  345. <li class="width-pre10 border-right">
  346. <div v-show="i == 0">
  347. <p>{{ item.pay_money }}</p>
  348. <p>(含运费¥{{ item.shipping_money }})</p>
  349. <p>
  350. <el-tag size="small" type="warning">{{payment_type_list[item.payment_type]}}</el-tag>
  351. </p>
  352. </div>
  353. </li>
  354. <li class="width-s border-right">
  355. <div v-show="i == 0">
  356. <!-- 判断是否为自提点自提 -->
  357. <div v-if="item.province == 0 && item.community_addons_data && item.community_addons_data.head_info">
  358. <p>{{ item.community_addons_data.head_info.name | emptyFilled }}</p>
  359. <p>{{ item.community_addons_data.head_info.contact_name | emptyFilled }}</p>
  360. <p>{{ item.community_addons_data.head_info.contact_phone | emptyFilled}} </p>
  361. <p style="display: flex;align-items: center;">
  362. <com-ellipsis :line="1" :text="item.community_addons_data.head_info.address"></com-ellipsis>
  363. </p>
  364. </div>
  365. <div v-else>
  366. <p>{{ item.receiver_name | emptyFilled }}</p>
  367. <p>{{ item.mobile |emptyFilled}} </p>
  368. <p style="display: flex;align-items: center;">
  369. <com-ellipsis v-if="(item.region_name ).trim() != 'null'" :line="1" :text="item.region_name + '' + item.address"></com-ellipsis>
  370. <span v-else>--</span>
  371. </p>
  372. </div>
  373. </div>
  374. </li>
  375. <li class="width-s border-right" v-if="is_show_username==1&&item.base_user">
  376. <div v-show="i == 0">
  377. <p>{{ item.base_user.username }}</p>
  378. </div>
  379. </li>
  380. <li class="width-pre10 border-right">
  381. <p v-show="i == 0">
  382. <!-- 货到付款修改为送货上门 -->
  383. <div v-if="item.community_addons_data && item.community_addons_data.is_community_pickup == 1 && item.shipping_type == 3">
  384. 送货上门
  385. </div>
  386. <div v-else>
  387. <div v-if="item.is_virtual == 0">
  388. {{shipping_type_list[item.shipping_type]}}
  389. </div>
  390. <div v-else>
  391. -
  392. </div>
  393. </div>
  394. </p>
  395. </li>
  396. <li class="width-pre10 border-right" :class="i == item.detail.length - 1 ? 'no-border-bottom' : 'border-bottom'">
  397. <el-tag size="small" :type="it.order_status == -4 ? 'danger' : ''">{{ order_status_list[it.order_status] }}</el-tag>
  398. </li>
  399. <li class="width-pre10 border-right">
  400. <div v-if="i == 0">
  401. <com-ellipsis :line="1" :text="item.seller_remark"></com-ellipsis>
  402. </div>
  403. </li>
  404. <li class="width-pre10 border-right">
  405. <div v-if="i == 0">
  406. <com-ellipsis :line="1" :text="item.extra?.message ?? ''"></com-ellipsis>
  407. </div>
  408. </li>
  409. <li class="width-400">
  410. <div v-show="i == 0">
  411. <el-button size="small" type="text" @click="handle('detail',item)">详情</el-button>
  412. <el-button v-if="item.Printer && item.Printer.is_show_printer==1" size="small" type="text" @click="handle('printer',item)">打印小票</el-button>
  413. <!-- <template v-for="operate_item in status_operate_list[item.order_status]['operate']">-->
  414. <!-- <el-button size="small" type="text" @click="handle(operate_item.code,item)">{{operate_item.name}}</el-button>-->
  415. <!-- </template>-->
  416. <template>
  417. <template v-if="item.order_status == 0 && item.marketing_type == 'DepositPresale'">
  418. <template v-for="operate_item in special_status_nopay_operate">
  419. <el-button size="small" type="text" @click="handle(operate_item.code,item)">{{operate_item.name}}</el-button>
  420. </template>
  421. </template>
  422. <template v-else-if="status_operate_list[item.order_status] && status_operate_list[item.order_status]['operate']">
  423. <template v-for="operate_item in status_operate_list[item.order_status]['operate']">
  424. <el-button v-if="(is_compliance == 0 || operate_item.code != 'fen_run') && (item.show_botton || operate_item.code == 'fen_run') " size="small" type="text" @click="handle(operate_item.code,item)" :disabled="operate_item.code === 'shipping' && !item.is_allow_shipping">{{operate_item.name}}</el-button>
  425. </template>
  426. </template>
  427. <el-button size="small" type="text" @click="handle('print',item)">打印</el-button>
  428. </template>
  429. </div>
  430. </li>
  431. </ul>
  432. </div>
  433. </div>
  434. <div style="text-align: right;margin: 30px 0; display: flex; justify-content: space-between; align-items: center">
  435. <div class="block">
  436. <el-button type="primary"
  437. size="small"
  438. v-for="(item,index) in orderBatchButton"
  439. :key="index"
  440. @click="getOrderBatch(item.title,item.key)"
  441. v-html="item.title">
  442. </el-button>
  443. </div>
  444. <div style="text-align: right; display: flex; justify-content: space-between">
  445. <el-pagination @current-change="pagination" background layout="total, prev, pager, next" :page-size="pageSize" :page-count="pageCount" :current-page="currentPage" :total="rowCount"></el-pagination>
  446. <el-input v-model="page" placeholder="" size="small" @keyup.enter.native="pageSearch" style="width:50px; float: right; text-align: center; margin: 0;padding: 0;"></el-input>
  447. <!-- <el-pagination @current-change="pagination" background layout="prev, pager, next"-->
  448. <!-- :page-count="pageCount" :current-page="currentPage"></el-pagination>-->
  449. </div>
  450. </div>
  451. <!-- 订单表格 end -->
  452. </el-tab-pane>
  453. </el-tabs>
  454. </div>
  455. </el-card>
  456. </el-tab-pane>
  457. <el-tab-pane v-if="valid_addons.indexOf('ReservationService') !== -1 || valid_addons.indexOf('HomeMaking') !== -1" label="服务订单" name="rorder"></el-tab-pane>
  458. </el-tabs>
  459. <!-- 修改价格 -->
  460. <el-dialog :close-on-click-modal="false" title="订单改价" :visible.sync="isShowChangePrice">
  461. <el-form :model="change_price_form" ref="goodsValidateForm" label-width="80px" size="small">
  462. <el-table :data="change_price_form.detail" :span-method="objectSpanMethod" border>
  463. <el-table-column prop="goods_name" label="商品" width="180"></el-table-column>
  464. <el-table-column width="100" prop="price" label="单价(元)">
  465. <template slot-scope="scope">
  466. <span>{{scope.row.price}}元</span>
  467. </template>
  468. </el-table-column>
  469. <el-table-column width="50" prop="price" label="数量">
  470. <template slot-scope="scope">
  471. <span>{{scope.row.num}}</span>
  472. </template>
  473. </el-table-column>
  474. <el-table-column prop="goods_price" label="小计">
  475. <template slot-scope="scope">
  476. <span>{{scope.row.price*scope.row.num}}元</span>
  477. </template>
  478. </el-table-column>
  479. <el-table-column prop="discount_sum" label="优惠">
  480. <template slot-scope="scope">
  481. <el-tooltip class="item" effect="dark" content="优惠 = 会员折扣 + 优惠券 + 积分抵扣 + 会员价 + 涨减价" placement="top">
  482. <span>{{(scope.row.discount_sum).toFixed(2)}}元</span>
  483. </el-tooltip>
  484. </template>
  485. </el-table-column>
  486. <el-table-column prop="" label="涨价或减价">
  487. <template slot-scope="scope">
  488. <el-input type="number" size="small" v-model="scope.row.adjust_money" @input="sumChangePrice(scope,$event)"></el-input>
  489. </template>
  490. </el-table-column>
  491. <el-table-column prop="" label="运费">
  492. <template slot-scope="scope">
  493. <el-input size="small" v-model="change_price_form.shipping_money" @input="sumChangeShipping($event)" onkeyup="if(value<0){value=0}else{value=toNumber(value,2)}"></el-input>
  494. </template>
  495. </el-table-column>
  496. </el-table>
  497. <div style="padding-top: 20px;" class="change_formula">
  498. <p> 实付总金额 = 小计 + 店铺优惠 + 小计涨减价 + 运费 </p>
  499. </div>
  500. <div style="padding-top: 20px;" class="change_price">
  501. <p> <label>实付总金额 </label> ¥{{change_price_form.new_pay_money}} </p>
  502. </div>
  503. </el-form>
  504. <div slot="footer" class="dialog-footer">
  505. <el-button @click="isShowChangePrice = false">取 消</el-button>
  506. <el-button type="primary" @click="handle('change_price',change_price_form,true)" :loading="changePriceLoading">确 定</el-button>
  507. </div>
  508. </el-dialog>
  509. <!-- 备注 -->
  510. <el-dialog :close-on-click-modal="false" title="备注" width="600px" :visible.sync="isShowRemark">
  511. <el-form :model="remark_form" ref="goodsValidateForm" label-width="80px" size="small">
  512. <el-form-item label="" prop="remark">
  513. <el-input type="textarea" placeholder="卖家备注" v-model="remark_form.seller_remark"></el-input>
  514. </el-form-item>
  515. </el-form>
  516. <div slot="footer" class="dialog-footer">
  517. <el-button @click="isShowRemark = false">取 消</el-button>
  518. <el-button type="primary" @click="handle('remark',remark_form,true)" :loading="remarkLoading">确 定</el-button>
  519. </div>
  520. </el-dialog>
  521. <!-- 修改地址 -->
  522. <order-address :is_show="isShowChangeAddress" :change-address-loading="changeAddressLoading" @sure="handleChangeAddress" :order_info="change_address_form" @close="isShowChangeAddress = false"></order-address>
  523. <!-- 发货 -->
  524. <order-shipping :is_show="isShowChangeShipping" :change-shipping-loading="changeShippingLoading" :order_info="shipping_form" @submit="handleShipping" @close="isShowChangeShipping = false"></order-shipping>
  525. <el-dialog :close-on-click-modal="false" class="fenRunData" title="分润明细" :visible.sync="dialogTableVisible_fenRun">
  526. <el-tabs v-model="activeNames" @tab-click="commissionHandleClick">
  527. <!-- <el-tabs v-model="activeNames" @tab-click="commissionHandleClick">
  528. <el-tab-pane label="佣金" name="commission">
  529. <el-table :data="fenRunData">
  530. <el-table-column label="用户">
  531. <template slot-scope="scope">
  532. <div class="table-info-img-text">
  533. <el-image class="table-info-img circle" :src="scope.row.avatar_url">
  534. <div slot="error" class="image-slot">
  535. <el-image class="table-info-img" src="/resources/img/common/default-avatar.png"></el-image>
  536. </div>
  537. </el-image>
  538. <div class="table-info-text">
  539. <div>{{scope.row.nickname}}<span style="color:blue">({{scope.row.user_id}})</span></div>
  540. <div>{{scope.row.mobile}}</div>
  541. </div>
  542. </div>
  543. </template>
  544. </el-table-column>
  545. <el-table-column property="change_num" label="佣金"></el-table-column>
  546. <el-table-column property="is_frozen" label="状态"></el-table-column>
  547. <el-table-column property="capital_type_text" label="类型"></el-table-column>
  548. <el-table-column property="from_type_text" label="所属插件"></el-table-column>
  549. </el-table>
  550. </el-tab-pane>
  551. <el-tab-pane label="积分" name="score">
  552. <el-table :data="fenRunData">
  553. <el-table-column label="用户">
  554. <template slot-scope="scope">
  555. <div class="table-info-img-text">
  556. <el-image class="table-info-img circle" :src="scope.row.avatar_url">
  557. <div slot="error" class="image-slot">
  558. <el-image class="table-info-img" src="/resources/img/common/default-avatar.png"></el-image>
  559. </div>
  560. </el-image>
  561. <div class="table-info-text">
  562. <div>{{scope.row.nickname}}<span style="color:blue">({{scope.row.user_id}})</span></div>
  563. <div>{{scope.row.mobile}}</div>
  564. </div>
  565. </div>
  566. </template>
  567. </el-table-column>
  568. <el-table-column property="change_num" label="积分">
  569. <template slot-scope="scope">
  570. <span v-if="scope.row.change_type == 'sub'" style="color:red;">-{{scope.row.change_num}}</span>
  571. <span v-else style="color:green;">+{{scope.row.change_num}}</span>
  572. </template>
  573. </el-table-column>
  574. <el-table-column property="is_frozen" label="状态"></el-table-column>
  575. <el-table-column property="capital_type_text" label="类型"></el-table-column>
  576. <el-table-column property="from_type_text" label="所属插件"></el-table-column>
  577. </el-table>
  578. </el-tab-pane>
  579. </el-tabs> -->
  580. <el-tab-pane v-for="(v, k) in commission_type" :label="v.label" :key="v.name" :name="v.name">
  581. <el-table :data="fenRunData">
  582. <el-table-column label="用户">
  583. <template slot-scope="scope">
  584. <div class="table-info-img-text">
  585. <el-image class="table-info-img circle" :src="scope.row.avatar_url">
  586. <div slot="error" class="image-slot">
  587. <el-image class="table-info-img" src="/resources/img/common/default-avatar.png"></el-image>
  588. </div>
  589. </el-image>
  590. <div class="table-info-text">
  591. <div>{{scope.row.nickname}}<span style="color:blue">({{scope.row.user_id}})</span></div>
  592. <div>{{scope.row.mobile}}</div>
  593. </div>
  594. </div>
  595. </template>
  596. </el-table-column>
  597. <el-table-column property="change_num" :label="v.label">
  598. <template slot-scope="scope">
  599. <span v-if="scope.row.change_type=='add'" style="color:green;">+{{scope.row.change_num}}</span>
  600. <span v-else style="color:red;">-{{scope.row.change_num}}</span>
  601. </template>
  602. </el-table-column>
  603. <el-table-column property="is_frozen" label="状态"></el-table-column>
  604. <el-table-column property="capital_type_text" label="类型">
  605. <template slot-scope="scope">
  606. {{scope.row.capital_type_text}} : {{scope.row.desc}}
  607. </template>
  608. </el-table-column>
  609. <el-table-column property="from_type_text" label="所属插件"></el-table-column>
  610. </el-table>
  611. </el-tab-pane>
  612. </el-dialog>
  613. <!-- 订单批量查询 -->
  614. <el-dialog :close-on-click-modal="false" ref="orderInquiryDialog" title="订单批量查询" width="600px" :visible.sync="orderInquiry.is_order_inquiry_show" @close="clearOrderNumber">
  615. <el-form :model="orderInquiry" label-width="80px" size="small" style="width: 90%;margin: 0 auto;">
  616. <el-form-item label="" prop="remark" label-width="0px">
  617. <div class="sub-title">
  618. <h2 style="margin: 0px!important;">查询订单范围</h2>
  619. <p>请批量填写订单号 (格式: 一行填写一个订单号)</p>
  620. </div>
  621. <el-input type="textarea"
  622. v-model="orderInquiry.order_no"
  623. placeholder="例: &#10; s20240606111151325321 &#10; s20240606111151325536 &#10; s20240607811151325536"
  624. :rows="12"
  625. resize="none">
  626. </el-input>
  627. </el-form-item>
  628. </el-form>
  629. <div slot="footer" class="dialog-footer">
  630. <el-button @click="clearOrderNumber">取 消</el-button>
  631. <el-button type="primary" @click="confirmOrders" :loading="remarkLoading">确 定</el-button>
  632. </div>
  633. </el-dialog>
  634. <!-- 订单批量备注和留言 -->
  635. <el-dialog :close-on-click-modal="false" ref="orderInquiryDialog" :title="orderBatchDialog.title" width="600px" :visible.sync="orderBatchDialog.is_order_batch_show" @close="clearOrderBatch">
  636. <el-form :model="orderInquiry" label-width="80px" size="small" style="width: 95%;margin: 0 auto;">
  637. <el-form-item label="" prop="remark" label-width="0px">
  638. <el-input type="textarea"
  639. v-model="orderBatchDialog.content"
  640. :placeholder="orderBatchDialog.title"
  641. :rows="10"
  642. resize="none">
  643. </el-input>
  644. </el-form-item>
  645. </el-form>
  646. <div slot="footer" class="dialog-footer">
  647. <el-button @click="clearOrderBatch">取 消</el-button>
  648. <el-button type="primary" @click.stop.prevent="orderBatchSubmit" :disabled="orderBatchDialog.is_order_button_disabled" :loading="remarkLoading">确 定</el-button>
  649. </div>
  650. </el-dialog>
  651. </div>
  652. <script>
  653. const app = new Vue({
  654. el: '#app',
  655. data() {
  656. return {
  657. orderTypeTab:'gorder',
  658. price: 0,
  659. visibles: false,
  660. hidden: false,
  661. orderInquiry: {// 订单批量查询
  662. order_no: null,
  663. is_order_inquiry_show: false,
  664. },
  665. orderBatchButton: [// 订单批量按钮
  666. {title: '订单批量备注', key:'remarks'},
  667. {title: '订单批量留言', key:'leave'},
  668. ],
  669. orderLeave: { //订单留言
  670. is_order_show: false,
  671. content: null,
  672. },
  673. orderBatchDialog: {// 订单批量留言弹框
  674. is_order_batch_show: false,
  675. content: null,
  676. order_type: null,
  677. title: null,
  678. order_ids: null,
  679. is_order_button_disabled: false,
  680. },
  681. is_show_username: <?= $is_show_username ? json_encode($is_show_username) : 0 ?>,
  682. is_compliance: <?= $is_compliance ?? 0; ?>,
  683. current: -1,
  684. detailIndex: -1,
  685. checkAll: false,
  686. checked: false,
  687. select: '',
  688. input3: '',
  689. goods_name: '',
  690. goods_id: '',
  691. is_show_change_price: true,
  692. marketing_type_map: {},
  693. commission_type: [],
  694. user_coupon_map:{
  695. 1:'使用抵扣',
  696. 2:'未使用',
  697. },
  698. special_status_nopay_operate:[
  699. {
  700. 'type': 'text',
  701. 'name': '支付',
  702. 'code': 'pay'
  703. },{
  704. 'type': 'text',
  705. 'name': '备注',
  706. 'code': 'remark'
  707. },
  708. ],
  709. // 操作按钮列表
  710. status_operate_list: {
  711. '0': {
  712. operate: [{
  713. 'type': 'text',
  714. 'name': '支付',
  715. 'code': 'pay'
  716. }, {
  717. 'type': 'text',
  718. 'name': '关闭交易',
  719. 'code': 'cancel'
  720. }, {
  721. 'type': 'text',
  722. 'name': '修改价格',
  723. 'code': 'change_price'
  724. }, {
  725. 'type': 'text',
  726. 'name': '备注',
  727. 'code': 'remark'
  728. }, {
  729. 'type': 'text',
  730. 'name': '留言',
  731. 'code': 'leave'
  732. }]
  733. },
  734. '1': {
  735. operate: [{
  736. 'type': 'text',
  737. 'name': '发货',
  738. 'code': 'shipping'
  739. }, {
  740. 'type': 'text',
  741. 'name': '修改地址',
  742. 'code': 'change_address'
  743. }, {
  744. 'type': 'text',
  745. 'name': '备注',
  746. 'code': 'remark'
  747. },{
  748. 'type': 'text',
  749. 'name': '留言',
  750. 'code': 'leave'
  751. }, {
  752. 'type': 'text',
  753. 'name': '分润明细',
  754. 'code': 'fen_run'
  755. },]
  756. },
  757. '2': {
  758. operate: [{
  759. 'type': 'text',
  760. 'name': '确认收货',
  761. 'code': 'take-delivery'
  762. }, {
  763. 'type': 'text',
  764. 'name': '备注',
  765. 'code': 'remark'
  766. }, {
  767. 'type': 'text',
  768. 'name': '留言',
  769. 'code': 'leave'
  770. }, {
  771. 'type': 'text',
  772. 'name': '分润明细',
  773. 'code': 'fen_run'
  774. }, ]
  775. },
  776. '3': {
  777. operate: [{
  778. 'type': 'text',
  779. 'name': '订单完成',
  780. 'code': 'sales'
  781. }, {
  782. 'type': 'text',
  783. 'name': '分润明细',
  784. 'code': 'fen_run'
  785. }, ]
  786. },
  787. '4': {
  788. operate: [{
  789. 'type': 'text',
  790. 'name': '分润明细',
  791. 'code': 'fen_run'
  792. }, ]
  793. },
  794. '6': {
  795. operate: [{
  796. 'type': 'text',
  797. 'name': '分润明细',
  798. 'code': 'fen_run'
  799. }, ]
  800. },
  801. '7': {
  802. operate: [{
  803. 'type': 'text',
  804. 'name': '分润明细',
  805. 'code': 'fen_run'
  806. }, ]
  807. },
  808. '-1': {
  809. operate: [{
  810. 'type': 'text',
  811. 'name': '售后审核',
  812. 'code': 'sales_review'
  813. }, {
  814. 'type': 'text',
  815. 'name': '分润明细',
  816. 'code': 'fen_run'
  817. }, ]
  818. },
  819. '-2': {
  820. operate: [{
  821. 'type': 'text',
  822. 'name': '售后完成',
  823. 'code': 'sales_finish'
  824. }, {
  825. 'type': 'text',
  826. 'name': '分润明细',
  827. 'code': 'fen_run'
  828. }, ]
  829. },
  830. '-3': {
  831. operate: [{
  832. 'type': 'text',
  833. 'name': '售后完成',
  834. 'code': 'sales_finish'
  835. }, {
  836. 'type': 'text',
  837. 'name': '分润明细',
  838. 'code': 'fen_run'
  839. }, ]
  840. },
  841. '-4': {
  842. operate: [{
  843. 'type': 'text',
  844. 'name': '备注',
  845. 'code': 'remark'
  846. },{
  847. 'type': 'text',
  848. 'name': '留言',
  849. 'code': 'leave'
  850. }, {
  851. 'type': 'text',
  852. 'name': '删除',
  853. 'code': 'destroy'
  854. }]
  855. },
  856. '-5': {
  857. operate: [{
  858. 'type': 'text',
  859. 'name': '备注',
  860. 'code': 'remark'
  861. },{
  862. 'type': 'text',
  863. 'name': '留言',
  864. 'code': 'leave'
  865. }, {
  866. 'type': 'text',
  867. 'name': '删除',
  868. 'code': 'destroy'
  869. }]
  870. }
  871. },
  872. repeal_list: {
  873. '1': '售后中',
  874. '2': '售后完成',
  875. },
  876. tabs: [{
  877. name: '全部',
  878. value: '999'
  879. },
  880. {
  881. name: '未付款',
  882. value: '0'
  883. },
  884. {
  885. name: '待发货',
  886. value: '1'
  887. },
  888. {
  889. name: '已发货',
  890. value: '2'
  891. },
  892. {
  893. name: '已收货',
  894. value: '3'
  895. },
  896. {
  897. name: '已完成',
  898. value: '4'
  899. },
  900. {
  901. name: '已关闭',
  902. value: '-4'
  903. },
  904. ],
  905. // 订单状态
  906. order_status_list: {
  907. "0": "待付款",
  908. "1": "待发货",
  909. "2": "已发货",
  910. "3": "已收货",
  911. "4": "已完成",
  912. "6": "待自提",
  913. "7": "自提成功",
  914. "-1": "售后申请",
  915. "-2": "退款中",
  916. "-3": "售后完成",
  917. "-4": "已关闭",
  918. "-5": "撤销申请",
  919. "-6": "售后拒绝",
  920. },
  921. payment_type_list: {
  922. '0': "未支付",
  923. '1': "微信",
  924. '2': "支付宝",
  925. '3': "银联卡",
  926. '5': "余额支付",
  927. '7': "汇聚支付",
  928. '8': "汇聚快捷支付",
  929. '12': "积分支付",
  930. '13': "礼包卡兑换",
  931. '15': "银典支付",
  932. '16': "通联支付",
  933. '17': "组合支付",
  934. '18': "汇付支付",
  935. '19': "衫德支付",
  936. '20': "衫德快捷支付",
  937. '100': "线下支付",
  938. '108': "金币支付"
  939. },
  940. payment_type_arr: {
  941. '1': "微信",
  942. '2': "支付宝",
  943. '3': "银联卡",
  944. '5': "余额支付",
  945. '7': "汇聚支付",
  946. '8': "汇聚快捷支付",
  947. '12': "积分支付",
  948. '13': "礼包卡兑换",
  949. '15': "银典支付",
  950. '16': "通联支付",
  951. '17': "组合支付",
  952. '18': "汇付支付",
  953. '19': "衫德支付",
  954. '20': "衫德快捷支付",
  955. },
  956. shipping_type_list: {
  957. '1': "物流配送",
  958. '2': "买家自提",
  959. '3': "商家配送",
  960. '4': "本地配送"
  961. },
  962. selectList: [{
  963. value: 'order_sn',
  964. name: '订单号'
  965. }, ],
  966. keyword_1: '1',
  967. activeName: '999',
  968. list: [],
  969. export_list: {},
  970. listLoading: false,
  971. page: 1,
  972. pageCount: 0,
  973. rowCount: 0,
  974. pageSize: 20, // 每页数量
  975. mch_id: 0, // 这个地方不知道要怎么获取
  976. searchCats: [],
  977. datetime: [],
  978. search_data: { // 筛选条件
  979. order_status: null,
  980. ids: [],
  981. cats: [],
  982. start: null,
  983. end: null,
  984. goods_id: null,
  985. order_no: null,
  986. type_value: null,
  987. type: null,
  988. order_id: 0,
  989. shipping_type: '',
  990. marketing_type: '',
  991. not_marketing_type: '',
  992. payment_type: '',
  993. r: 'mall/order/index',
  994. fields: [],
  995. province: null,
  996. cate_id: '',
  997. is_use_coupon:null,
  998. },
  999. isShowChangePrice: false,
  1000. change_price_form: {
  1001. detail: [],
  1002. shipping_money: 0,
  1003. },
  1004. isShowChangeAddress: false,
  1005. change_address_form: {},
  1006. isShowChangeShipping: false,
  1007. shipping_form: {},
  1008. isShowRemark: false,
  1009. remark_form: {},
  1010. user_level: {},
  1011. // loading
  1012. changePriceLoading: false,
  1013. remarkLoading: false,
  1014. changeAddressLoading: false,
  1015. changeShippingLoading: false,
  1016. orderUrl: 'mall/order/index',
  1017. export_url: 'mall/order/index',
  1018. checkedOrder: [], //选中的订单
  1019. isIndeterminate: false,
  1020. dialogTableVisible_fenRun: false,
  1021. activeNames: 'commission',
  1022. orderId: 0,
  1023. fenRunData: [],
  1024. changesShipping: 0,
  1025. changeprice: 0,
  1026. changeprice_status: false,
  1027. deleteIds: [],
  1028. currentPage: 1,
  1029. valid_addons: [],
  1030. addressIdsMap: [],
  1031. districtList: [],
  1032. addressProps: {
  1033. value: 'id',
  1034. label: 'name',
  1035. children: 'list',
  1036. checkStrictly: true,
  1037. multiple: true,
  1038. },
  1039. totalAreaMoney: 0,
  1040. totalOrderCount: 0,
  1041. cateList: [],
  1042. isBatchMessage: 0, // 是否是批量留言
  1043. print_url: '',
  1044. };
  1045. },
  1046. mounted: function() {
  1047. this.search_data.order_id = getQuery('order_id');
  1048. this.search_data.order_no = getQuery('order_no');
  1049. this.getList(this.search_data);
  1050. this.getDistrict(3)
  1051. this.getCateList()
  1052. },
  1053. computed: {
  1054. show_clear_search_btn: function() {
  1055. return !isEmpty(this.search_data.cats) || !isEmpty(this.search_data.start) ||
  1056. !isEmpty(this.search_data.end) || !isEmpty(this.search_data.goods_id) ||
  1057. !isEmpty(this.search_data.order_no) || !isEmpty(this.search_data.type) ||
  1058. !isEmpty(this.search_data.type_value) || !isEmpty(this.search_data.marketing_type) || !isEmpty(this.search_data.payment_type)
  1059. || !isEmpty(this.search_data.province) || !isEmpty(this.search_data.cate_id) || !isEmpty(this.search_data.is_use_coupon) || !isEmpty(this.search_data.not_marketing_type);
  1060. },
  1061. isShowStatistical(){
  1062. return (this.search_data.province && this.search_data.province.length > 0) || !isEmpty(this.search_data.cate_id)
  1063. }
  1064. },
  1065. updated: function() {
  1066. // console.log('ssssss')
  1067. },
  1068. methods: {
  1069. change(e, type) {
  1070. this.$forceUpdate();
  1071. },
  1072. // 判断多个订单时状态
  1073. orderDetailStatusIdentical (orderList) {
  1074. if (!Array.isArray(orderList)) return false;
  1075. if (orderList.length <= 1) return false;
  1076. let orderStatusListNum = 0; // 订单状态列表
  1077. let shipmentsNum = 0;// 等级为2的数
  1078. let repeal = 0; //等级为2的数
  1079. for (let i = 0; i < orderList.length; i++) {
  1080. if (orderList[i].order_status == 2 && orderList[i].order_status != -4) {
  1081. orderStatusListNum++;
  1082. }
  1083. if (orderList[i].order_status == 2) {
  1084. shipmentsNum++;
  1085. } else if (orderList[i].order_status == -4) {
  1086. repeal++;
  1087. }
  1088. }
  1089. if (shipmentsNum === orderList.length || repeal === orderList.length) return false;
  1090. return orderStatusListNum > 0;
  1091. },
  1092. //修改商品价格
  1093. sumChangePrice(data, value) {
  1094. if (value && !isNaN(value)) {
  1095. if (value) {
  1096. var change_price = parseFloat(this.change_price_form.detail[data.$index].goods_price) + parseFloat(value);
  1097. var changesShipping = this.change_price_form.shipping_money;
  1098. if (this.changesShipping > 0) { //当运费有修改时去修改的值
  1099. changesShipping = this.changesShipping;
  1100. }
  1101. if (!changesShipping) {
  1102. changesShipping = 0;
  1103. }
  1104. var changeprice = 0;
  1105. var new_pay_money = 0;
  1106. for (var i = 0; i < this.change_price_form.detail.length; i++) {
  1107. if (this.change_price_form.detail[i].adjust_money && !isNaN(this.change_price_form.detail[i].adjust_money)) {
  1108. var value_data = value.split(".");
  1109. if (value_data.length > 1) {
  1110. if (value_data[1].length > 2) {
  1111. this.change_price_form.detail[i].adjust_money = parseFloat(value).toFixed(2);
  1112. }
  1113. }
  1114. changeprice = parseFloat(changeprice) + parseFloat(this.change_price_form.detail[i].adjust_money);
  1115. }
  1116. new_pay_money += parseFloat(this.change_price_form.detail[i].goods_price);
  1117. }
  1118. if (change_price < 0) {
  1119. this.change_price_form.new_pay_money = parseFloat(new_pay_money + parseFloat(changesShipping)).toFixed(2);
  1120. this.change_price_form.detail[data.$index].new_goods_price = parseFloat(this.change_price_form.detail[data.$index].goods_price);
  1121. this.$message.error("单个商品支付金额不可以小于零");
  1122. } else {
  1123. this.change_price_form.new_pay_money = (new_pay_money + parseFloat(changeprice) + parseFloat(changesShipping)).toFixed(2);
  1124. if (this.change_price_form.new_pay_money < 0.1) {
  1125. this.$message.error("实付金额不可以小于0.1");
  1126. return false;
  1127. }
  1128. this.changeprice_status = true;
  1129. this.change_price_form.detail[data.$index].new_goods_price = parseFloat(this.change_price_form.detail[data.$index].goods_price) + parseFloat(value);
  1130. }
  1131. }
  1132. }
  1133. return value;
  1134. },
  1135. //修改邮费
  1136. sumChangeShipping(value) { //change_price_form.detail shipping_money
  1137. var changeprice = 0;
  1138. var new_pay_money = 0;
  1139. for (var i = 0; i < this.change_price_form.detail.length; i++) {
  1140. if (this.change_price_form.detail[i].adjust_money && !isNaN(this.change_price_form.detail[i].adjust_money)) {
  1141. changeprice = parseFloat(changeprice) + parseFloat(this.change_price_form.detail[i].adjust_money);
  1142. }
  1143. new_pay_money += parseFloat(this.change_price_form.detail[i].goods_price);
  1144. }
  1145. if (value && !isNaN(value)) {
  1146. this.change_price_form.new_pay_money = (new_pay_money + parseFloat(value) + parseFloat(changeprice)).toFixed(2);
  1147. this.changesShipping = parseFloat(value).toFixed(2);
  1148. }
  1149. },
  1150. objectSpanMethod({
  1151. row,
  1152. column,
  1153. rowIndex,
  1154. columnIndex
  1155. }) {
  1156. if (columnIndex === 6) {
  1157. console.log(rowIndex, 'rowIndex');
  1158. if (rowIndex === 0) {
  1159. return {
  1160. rowspan: this.change_price_form.detail.length,
  1161. colspan: 1
  1162. };
  1163. } else {
  1164. return {
  1165. rowspan: 0,
  1166. colspan: 0
  1167. };
  1168. }
  1169. }
  1170. return {
  1171. rowspan: 1,
  1172. colspan: 1
  1173. };
  1174. },
  1175. mouseOver(index, i) {
  1176. // console.log(i)
  1177. this.current = index
  1178. this.detailIndex = i
  1179. this.hidden = true
  1180. },
  1181. mouseLeave() {
  1182. this.hidden = false
  1183. },
  1184. printReceipt() { // 打印小票
  1185. this.$confirm('是否打印小票?', '提示', {
  1186. confirmButtonText: '确定',
  1187. cancelButtonText: '取消',
  1188. }).then(() => {
  1189. }).catch(() => {});
  1190. },
  1191. remark() { // 备注
  1192. },
  1193. changeTime(e) {
  1194. // console.log(e)
  1195. this.search_data.start = e[0]
  1196. this.search_data.end = e[1]
  1197. },
  1198. handleClick(res) { //标签页切换
  1199. this.list = []
  1200. this.checkedOrder = []
  1201. if (this.search_data.status == this.activeName) return;
  1202. this.search_data.order_status = this.activeName;
  1203. this.page = 1;
  1204. this.getList(this.search_data);
  1205. },
  1206. navUserDetail(id) {
  1207. this.$navigate({
  1208. r: 'mall/user/user-detail',
  1209. id: id
  1210. })
  1211. },
  1212. goodDetail(goods_id) {
  1213. let params = {
  1214. r: 'mall/goods/edit'
  1215. };
  1216. params = Object.assign(params, {
  1217. id: goods_id
  1218. });
  1219. navigateTo(params);
  1220. },
  1221. search() {
  1222. this.page = 1;
  1223. this.getList(this.search_data);
  1224. },
  1225. clearSearch() {
  1226. this.search_data.cats = [];
  1227. this.search_data.start = null;
  1228. this.search_data.end = null;
  1229. this.search_data.order_status = null;
  1230. this.search_data.order_no = null;
  1231. this.search_data.type = null;
  1232. this.search_data.type_value = null;
  1233. this.search_data.shipping_type = '';
  1234. this.search_data.marketing_type = '';
  1235. this.search_data.payment_type = '';
  1236. this.search_data.province = null;
  1237. this.search_data.cate_id = '';
  1238. this.search_data.is_use_coupon = null;
  1239. this.search_data.not_marketing_type = '';
  1240. this.datetime = [];
  1241. this.addressIdsMap = [];
  1242. this.getList();
  1243. },
  1244. handleChangeAddress(data) {
  1245. this.handle('change_address', data, true);
  1246. },
  1247. handleShipping(data) {
  1248. this.handle('shipping', data, true);
  1249. },
  1250. orderTypeTabClick(tab,event){
  1251. console.log(this.orderTypeTab)
  1252. if('rorder' == this.orderTypeTab) navigateTo({r:'mall/order/reserve'});
  1253. if('gorder' == this.orderTypeTab) navigateTo({r:'mall/order/index'});
  1254. },
  1255. handle(type, data = null, submit = false) {
  1256. console.log(type)
  1257. let id = data ? parseInt(data.id) : '';
  1258. let url = 'mall/order/operate'
  1259. switch (type) {
  1260. // 订单详情
  1261. case 'detail':
  1262. let params = {
  1263. r: 'mall/order/detail'
  1264. };
  1265. if (id) params = Object.assign(params, {
  1266. id: id
  1267. });
  1268. navigateTo(params, true);
  1269. break;
  1270. // 删除订单
  1271. case 'destroy':
  1272. param = {
  1273. id: data.id,
  1274. type
  1275. };
  1276. this.$confirm('删除该条数据后不可以恢复, 是否继续?', '警告', {
  1277. type: 'warning'
  1278. }).then(() => {
  1279. this.send('mall/order/del', param)
  1280. }).catch((err) => {})
  1281. break;
  1282. // 取消订单
  1283. case 'cancel':
  1284. param = {
  1285. id: id
  1286. };
  1287. this.$confirm('确定关闭订单吗?', '警告', {
  1288. type: 'warning'
  1289. }).then(() => {
  1290. this.send('mall/order/close', param)
  1291. }).catch((err) => {})
  1292. break;
  1293. // 支付订单
  1294. case 'pay':
  1295. param = {
  1296. id: id
  1297. };
  1298. this.$confirm('确定付款吗?', '警告', {
  1299. type: 'warning'
  1300. }).then(() => {
  1301. this.send('mall/order/pay', param)
  1302. }).catch((err) => {})
  1303. break;
  1304. // 修改价格
  1305. case 'change_price':
  1306. if (submit) {
  1307. //检测每个商品修改价格不可以小于0和商品总价不可以小于0
  1308. for (var i = 0; i < this.change_price_form.detail.length; i++) {
  1309. var change_price = (parseFloat(this.change_price_form.detail[i].goods_price) + parseFloat(this.change_price_form.detail[i].adjust_money)).toFixed(2);
  1310. if (change_price < 0) {
  1311. this.$message.error('单个商品的减价值不可以大于商品实付金额');
  1312. return false;
  1313. }
  1314. }
  1315. if (this.change_price_form.new_pay_money < 0.1) {
  1316. this.$message.error("实付金额不可以小于0.1");
  1317. return false;
  1318. }
  1319. this.changePriceLoading = true;
  1320. this.send('mall/order/change-price', this.change_price_form, (resp) => {
  1321. if (resp.code == 0) this.isShowChangePrice = false;
  1322. });
  1323. setTimeout(() => {
  1324. this.changePriceLoading = false;
  1325. }, 100);
  1326. } else {
  1327. this.isShowChangePrice = true;
  1328. var objString = JSON.stringify(data);
  1329. this.change_price_form = JSON.parse(objString);
  1330. this.$set(this.change_price_form, 'new_pay_money', this.change_price_form.pay_money);
  1331. for (var i = 0; i < this.change_price_form.detail.length; i++) {
  1332. this.$set(this.change_price_form.detail[i], 'new_goods_price', this.change_price_form.detail[i].goods_price);
  1333. this.$set(this.change_price_form.detail[i], 'new_adjust_money', this.change_price_form.detail[i].adjust_money);
  1334. //his.change_price_form.detail[i].adjust_money = 0;
  1335. var discount_money = (parseFloat(this.change_price_form.detail[i].price) * this.change_price_form.detail[i].num) - parseFloat(this.change_price_form.detail[i].goods_price);
  1336. this.$set(this.change_price_form.detail[i], 'discount_sum', discount_money);
  1337. }
  1338. }
  1339. break;
  1340. // 修改收货地址
  1341. case 'change_address':
  1342. if (submit) {
  1343. this.changeAddressLoading = true;
  1344. this.send('mall/order/change-address', data, (resp) => {
  1345. if (resp.code == 0) this.isShowChangeAddress = false;
  1346. });
  1347. setTimeout(() => {
  1348. this.changeAddressLoading = false;
  1349. }, 100);
  1350. } else {
  1351. this.isShowChangeAddress = true
  1352. var objString = JSON.stringify(data);
  1353. this.change_address_form = JSON.parse(objString);
  1354. }
  1355. break;
  1356. // 备注
  1357. case 'remark':
  1358. if (submit) {
  1359. this.remarkLoading = true;
  1360. this.send('mall/order/remark', this.remark_form, (resp) => {
  1361. if (resp.code == 0) this.isShowRemark = false;
  1362. });
  1363. setTimeout(() => {
  1364. this.remarkLoading = false;
  1365. }, 100);
  1366. } else {
  1367. this.isShowRemark = true
  1368. var objString = JSON.stringify(data);
  1369. this.remark_form = JSON.parse(objString);
  1370. }
  1371. break;
  1372. case 'leave':// 留言
  1373. this.isBatchMessage = 0
  1374. this.orderBatchDialog.is_order_batch_show = true;
  1375. this.orderBatchDialog.content = data.leave;
  1376. this.orderBatchDialog.title = '留言';
  1377. this.orderBatchDialog.order_type = 'leave';
  1378. this.orderBatchDialog.order_ids = [data.id];
  1379. break;
  1380. // 物流发货
  1381. case 'shipping':
  1382. if (submit) {
  1383. this.changeShippingLoading = true;
  1384. this.send('mall/order/shipping', data, (resp) => {
  1385. if (resp.code == 0) this.isShowChangeShipping = false;
  1386. });
  1387. setTimeout(() => {
  1388. this.changeShippingLoading = false;
  1389. }, 100);
  1390. } else {
  1391. this.isShowChangeShipping = true
  1392. var objString = JSON.stringify(data);
  1393. this.shipping_form = JSON.parse(objString);
  1394. }
  1395. break;
  1396. // 收货
  1397. case 'take-delivery':
  1398. param = {
  1399. id: id
  1400. };
  1401. this.$confirm('确定收货吗?', '警告', {
  1402. type: 'warning'
  1403. }).then(() => {
  1404. this.send('mall/order/take-delivery', param)
  1405. }).catch((err) => {})
  1406. break;
  1407. // 订单完成
  1408. case 'sales':
  1409. param = {
  1410. id: id
  1411. };
  1412. this.$confirm('确定完成订单吗?', '警告', {
  1413. type: 'warning'
  1414. }).then(() => {
  1415. this.send('mall/order/sales-order', param)
  1416. }).catch((err) => {})
  1417. break;
  1418. case 'fen_run':
  1419. this.dialogTableVisible_fenRun = true;
  1420. this.orderId = id;
  1421. this.getCapitalLog(id, this.activeNames)
  1422. break;
  1423. case 'printer':
  1424. param = {
  1425. order_id: id,
  1426. print_type: 0 // 0 => 平台,1 => 门店,2 => 多商户
  1427. };
  1428. this.$confirm('确定打印?', '警告', {
  1429. type: 'warning'
  1430. }).then(() => {
  1431. this.send('printer/default/printer', param)
  1432. }).catch((err) => {})
  1433. break;
  1434. case 'print':
  1435. // params = {
  1436. // r: 'http://backend.qimall.com/kk.html'
  1437. // };
  1438. // window.location.href = 'http://backend.qimall.com/kk.html';
  1439. window.open(this.print_url + '?id=' + data.id, '_blank');
  1440. break;
  1441. }
  1442. },
  1443. send(url, params, callback) {
  1444. let self = this;
  1445. request({
  1446. params: {
  1447. r: url,
  1448. },
  1449. method: 'post',
  1450. data: params
  1451. }).then(e => {
  1452. if (e.data.code == 0) {
  1453. self.$message.success(e.data.msg);
  1454. self.getList(this.search_data);
  1455. } else {
  1456. self.$message.error(e.data.msg);
  1457. }
  1458. if (callback) callback(e.data);
  1459. }).catch(e => {
  1460. console.log(e);
  1461. });
  1462. },
  1463. pageSearch() {
  1464. this.getList();
  1465. this.page_count = 1;
  1466. },
  1467. searchClick() {
  1468. this.page = 1;
  1469. this.getList();
  1470. },
  1471. pagination(currentPage) {
  1472. let self = this;
  1473. self.page = currentPage;
  1474. self.getList(this.search_data);
  1475. },
  1476. // 获取商品列表
  1477. getList(params = {}) {
  1478. let self = this;
  1479. let basic_params = {
  1480. r: 'mall/order/index',
  1481. page: self.page,
  1482. };
  1483. params = Object.assign(basic_params, params);
  1484. if (self.listLoading == false) {
  1485. self.listLoading = true;
  1486. request({
  1487. params: params,
  1488. method: 'get',
  1489. }).then(e => {
  1490. self.listLoading = false;
  1491. if (e.data.code == 0) {
  1492. self.list = e.data.data.list;
  1493. self.search_data.fields = e.data.data.fields;
  1494. self.marketing_type_map = e.data.data.marketing_type_map;
  1495. this.export_list = e.data.data.export_list;
  1496. self.pageCount = e.data.data.page_count;
  1497. self.rowCount = parseInt(e.data.data.row_count);
  1498. self.pageSize = parseInt(e.data.data.page_size);
  1499. if (this.page_count != 1) self.pageCount = e.data.data.page_count;
  1500. self.commission_type = e.data.data.commission_type;
  1501. this.currentPage = parseInt(this.page);
  1502. self.shipping_type_list = e.data.data.shipping_type_list;
  1503. self.valid_addons = e.data.data.valid_addons;
  1504. self.seller_remark = e.data.data.seller_remark;
  1505. self.totalAreaMoney = e.data.data.total_area_money
  1506. self.totalOrderCount = e.data.data.total_order_count
  1507. self.print_url = e.data.data.print_url;
  1508. } else {
  1509. self.$message.error(e.data.msg);
  1510. }
  1511. }).catch(e => {
  1512. self.$message.error(e.data.msg);
  1513. self.listLoading = false;
  1514. });
  1515. }
  1516. },
  1517. orderChange(val) {
  1518. let checkedCount = val.length;
  1519. this.checkAll = checkedCount == this.list.length;
  1520. this.isIndeterminate = checkedCount > 0 && checkedCount < this.list.length;
  1521. this.search_data.ids = val;
  1522. this.deleteIds = val;
  1523. this.orderBatchDialog.order_ids = val;
  1524. },
  1525. allSelOrder(boo) {
  1526. let ids = [];
  1527. this.list.forEach(v => {
  1528. ids.push(v.id);
  1529. })
  1530. this.checkedOrder = boo ? ids : [];
  1531. this.isIndeterminate = false;
  1532. this.search_data.ids = ids;
  1533. this.deleteIds = ids;
  1534. this.orderBatchDialog.order_ids = ids;
  1535. },
  1536. commissionHandleClick(tab, event) {
  1537. console.log(this.activeNames);
  1538. this.getCapitalLog(this.orderId, this.activeNames)
  1539. },
  1540. getCapitalLog(orderId, wallet_type) {
  1541. request({
  1542. params: {
  1543. r: 'mall/order/commission-and-score-list',
  1544. order_id: orderId,
  1545. wallet_type: wallet_type,
  1546. },
  1547. method: 'get',
  1548. }).then(e => {
  1549. if (e.data.code == 0) {
  1550. this.fenRunData = e.data.data.list;
  1551. this.user_level = e.data.data.user_level;
  1552. } else {
  1553. self.$message.error(e.data.msg);
  1554. }
  1555. }).catch(e => {
  1556. console.log(e);
  1557. });
  1558. },
  1559. getOrderPrice(data) {
  1560. let text = '';
  1561. switch (data.marketing_type) {
  1562. case 'ScoreMall':
  1563. case 'FunMall':
  1564. text = data.extra_info;
  1565. break;
  1566. default:
  1567. text = '¥' + data.goods_price;
  1568. }
  1569. return text;
  1570. },
  1571. detailOrder() {
  1572. param = {
  1573. id: this.deleteIds,
  1574. };
  1575. this.$confirm('删除这些数据后不可以恢复, 是否继续?', '警告', {
  1576. type: 'warning'
  1577. }).then(() => {
  1578. let self = this;
  1579. request({
  1580. params: {
  1581. r: 'mall/order/del',
  1582. },
  1583. method: 'post',
  1584. data: param
  1585. }).then(e => {
  1586. if (e.data.code == 0) {
  1587. this.checkedOrder = [];
  1588. this.$message.success(e.data.msg);
  1589. this.getList(this.search_data);
  1590. } else {
  1591. this.$message.error(e.data.msg);
  1592. }
  1593. }).catch(e => {
  1594. console.log(e);
  1595. });
  1596. }).catch((err) => {})
  1597. },
  1598. addressChange(e) {
  1599. this.search_data.province = this.chooseJqfl(e)
  1600. },
  1601. getDistrict(level) {
  1602. if (level) {
  1603. level1 = level;
  1604. } else{
  1605. level1 = 1;
  1606. }
  1607. request({
  1608. params: {
  1609. r: 'common/region/get-district-list',
  1610. level: level1
  1611. },
  1612. }).then(e => {
  1613. if (e.data.code == 0) {
  1614. this.districtList = e.data.data
  1615. }
  1616. }).catch(e => {
  1617. });
  1618. },
  1619. clearAreaIds(){
  1620. this.search_data.province = null
  1621. },
  1622. chooseJqfl(params) {
  1623. let finalArray = [];
  1624. if (params.length > 0) {
  1625. const uniqueIn = (arr) => (x) => 1 == arr.filter((v) => v == x).length;
  1626. const appendLastId = (result, ids) => [...result, ids[ids.length - 1]];
  1627. const flatted = params.flat();
  1628. const lastIds = params.reduce(appendLastId, []);
  1629. finalArray = lastIds.filter(uniqueIn(flatted));
  1630. }
  1631. return finalArray
  1632. },
  1633. getCateList() {
  1634. let self = this;
  1635. request({
  1636. params: {
  1637. r: 'mall/cate/index',
  1638. level: 1,
  1639. },
  1640. method: 'get',
  1641. }).then(e => {
  1642. self.cateList = e.data.data.list
  1643. }).catch(e => {
  1644. console.log(e);
  1645. });
  1646. },
  1647. /* 订单批量查询 */
  1648. upOrderNumber() { // 弹出批量订单弹窗
  1649. if (this.search_data.order_no !== '' && this.search_data.order_no != null) {
  1650. this.orderInquiry.order_no = this.search_data.order_no.split(',').map( el => el.trim()).filter(Boolean).join('\n');
  1651. }
  1652. this.orderInquiry.is_order_inquiry_show = true;
  1653. },
  1654. clearOrderNumber() {// 清空批量弹出订单
  1655. this.orderInquiry = {
  1656. is_order_inquiry_show: false,
  1657. order_no: null,
  1658. };
  1659. },
  1660. confirmOrders() {// 确认订单数据
  1661. if (this.orderInquiry.order_no.split('\n').map( el => el.trim()).filter(Boolean).length > 100) {
  1662. return this.$message.error('批量订单查询最大不能超过100条')
  1663. }
  1664. this.search_data.order_no = this.orderInquiry.order_no.split('\n').map( el => el.trim()).filter(Boolean).join(',');
  1665. this.orderInquiry.is_order_inquiry_show = false;
  1666. },
  1667. /* 订单批量操作 */
  1668. getOrderBatch(title,order_type) {
  1669. this.orderBatchDialog.is_order_batch_show = true;
  1670. this.orderBatchDialog.order_type = order_type;
  1671. this.orderBatchDialog.title = title;
  1672. this.isBatchMessage = 1
  1673. },
  1674. clearOrderBatch() {// 批量操作数据清除
  1675. this.orderBatchDialog = {
  1676. is_order_batch_show: false,
  1677. content: null,
  1678. order_type: null,
  1679. order_ids: this.orderBatchDialog.order_ids,
  1680. title: null,
  1681. }
  1682. },
  1683. orderBatchSubmit() {// 订单数据批量提交
  1684. if (this.orderBatchDialog.order_ids === '' || this.orderBatchDialog.order_ids == null){
  1685. return this.$message.error("请选择要操作订单!");
  1686. }
  1687. if (this.orderBatchDialog.content === '' || this.orderBatchDialog.content == null){
  1688. return this.$message.error("请填写" + this.orderBatchDialog.title + "内容!");
  1689. }
  1690. this.orderBatchDialog.is_order_button_disabled = true;// 防止订单二次点击
  1691. let order_ids = this.orderBatchDialog.order_ids.join(',');
  1692. request({
  1693. params: {
  1694. r: 'mall/order/order-batch',
  1695. },
  1696. method: 'post',
  1697. data: {
  1698. order_type: this.orderBatchDialog.order_type,
  1699. content: this.orderBatchDialog.content,
  1700. order_ids: order_ids,
  1701. is_batch_message: this.isBatchMessage
  1702. }
  1703. }).then(e => {
  1704. if (e.data.code === 0) {
  1705. this.$message({
  1706. message: e.data.msg,
  1707. type: 'success',
  1708. duration: 2000,
  1709. onClose: () => {
  1710. this.orderBatchDialog.is_order_batch_show = false;
  1711. this.orderBatchDialog.is_order_button_disabled = false;
  1712. window.location.reload();
  1713. }
  1714. });
  1715. } else {
  1716. this.orderBatchDialog.is_order_button_disabled = false;
  1717. this.$message.error(e.data.msg);
  1718. }
  1719. }).catch(e => {
  1720. console.log(e);
  1721. });
  1722. },
  1723. onCopyCardNo(card_no) {
  1724. var copyInput = document.createElement('input')
  1725. copyInput.setAttribute('value', card_no)
  1726. document.body.appendChild(copyInput)
  1727. copyInput.select()
  1728. try {
  1729. var copyed = document.execCommand('copy')
  1730. if (copyed) {
  1731. document.body.removeChild(copyInput)
  1732. this.$message.success('复制成功')
  1733. }
  1734. } catch {
  1735. this.$message.success('复制失败,请检查浏览器兼容')
  1736. }
  1737. },
  1738. }
  1739. });
  1740. </script>