vue-detail.blade.php 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894
  1. @extends('layouts.base')
  2. @section('title', '订单详情')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. body{font-weight:500;color:#333;}
  7. .all{background:#eff3f6}
  8. .el-form-item__label{margin-right:30px}
  9. .vue-main-form .el-form-item__content{margin-left:calc(15% + 30px) !important}
  10. .order-sum-li{width:16.66%;line-height:28px}
  11. .list-con-goods-text{min-height:70px;overflow:hidden;flex:1;display: flex;flex-direction: column;justify-content: space-between;}
  12. .list-con-goods-price{border-right:1px solid #e9e9e9;border-left:1px solid #e9e9e9;min-width:150px;min-height:90px;text-align: left;padding:20px;display: flex;flex-direction: column;}
  13. .list-con-goods-title{font-size:14px;line-height:20px;text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;}
  14. .list-con-goods-option{font-size:12px;color:#999}
  15. </style>
  16. <div class="all">
  17. <div id="app" v-cloak>
  18. <div class="vue-crumbs">
  19. <a>订单管理</a> > 订单详情
  20. </div>
  21. <el-form ref="form" :model="form" label-width="15%">
  22. <div class="vue-head">
  23. <div class="vue-main-title">
  24. <div class="vue-main-title-left"></div>
  25. <div class="vue-main-title-content">基本信息</div>
  26. </div>
  27. <div class="vue-main-form">
  28. <el-form-item label="购买会员" prop="store_name">
  29. <div v-if="orderDetail.belongs_to_member != null" style="display:flex">
  30. <div style="width:100px;height:100px">
  31. <img :src="orderDetail.belongs_to_member.avatar_image" alt="" style="width:100%;height:100%">
  32. </div>
  33. <div style="line-height:33px;margin-left:15px">
  34. <div>(会员ID:[[orderDetail.uid]]) [[orderDetail.belongs_to_member.nickname]]</div>
  35. <div>[[orderDetail.belongs_to_member.realname]]</div>
  36. <div>[[orderDetail.belongs_to_member.mobile]]</div>
  37. </div>
  38. </div>
  39. <div v-if="yz_member != null && yz_member.is_old" style="display:flex">
  40. <div>(会员ID:[[orderDetail.uid]]) 已被合并为会员ID [[yz_member.mark_member_id]]</div>
  41. </div>
  42. </el-form-item>
  43. <el-form-item label="订单编号">
  44. <div>[[orderDetail.order_sn]]</div>
  45. </el-form-item>
  46. <el-form-item label="订单金额" prop="store_name">
  47. <div style="display:flex;width:70%">
  48. <div class="order-sum-li">
  49. <div>商品小计</div>
  50. <div>¥[[orderDetail.goods_price]]</div>
  51. </div>
  52. <div class="order-sum-li">
  53. <div>会员折扣价</div>
  54. <div>¥[[orderDetail.order_goods_price]]</div>
  55. </div>
  56. <div v-if="orderDetail.fee_amount" class="order-sum-li">
  57. <div>手续费</div>
  58. <div>¥[[orderDetail.fee_amount]]</div>
  59. </div>
  60. <div v-if="orderDetail.service_fee_amount" class="order-sum-li">
  61. <div>服务费</div>
  62. <div>¥[[orderDetail.service_fee_amount]]</div>
  63. </div>
  64. <div class="order-sum-li">
  65. <div>优惠</div>
  66. <div>-¥[[orderDetail.discount_price]]</div>
  67. </div>
  68. <div class="order-sum-li">
  69. <div>抵扣</div>
  70. <div>-¥[[orderDetail.deduction_price]]</div>
  71. </div>
  72. <div class="order-sum-li">
  73. <div>运费</div>
  74. <div>¥[[orderDetail.dispatch_price]]</div>
  75. </div>
  76. <div class="order-sum-li">
  77. <div>应收款</div>
  78. <div style="color:red;font-weight:600">¥[[orderDetail.price]]</div>
  79. </div>
  80. </div>
  81. </el-form-item>
  82. <el-form-item label="支付方式" prop="">
  83. <!-- <div>未付款</div> -->
  84. <div style="display:inline-block;margin-right:20px">[[orderDetail.pay_type_name]]</div>
  85. <el-button v-if="orderDetail.order_pays != null" size="small" plain type="primary" @click="getPayList">
  86. 查看支付记录
  87. </el-button>
  88. </el-form-item>
  89. <el-form-item label="订单状态" prop="">
  90. <div style="display:inline-block;margin-right:20px">[[orderDetail.status_name]]</div>
  91. <div style="display:inline-block;margin-right:10px" v-for="(item1,index1) in orderDetail.backend_button_models" :key="index1">
  92. <el-button @click="orderConfirm(item1.value,orderDetail)" size="small" plain :type="item1.type">
  93. [[item1.name]]
  94. </el-button>
  95. </div>
  96. {{--<el-button size="small" plain type="primary">确认付款</el-button>--}}
  97. </el-form-item>
  98. {{--流程类型颜色demo--}}
  99. {{--<el-form-item label="" prop="">--}}
  100. {{--<el-steps :space="200" :active="1" finish-status="success">--}}
  101. {{--<el-step title="等待" status="wait"></el-step>--}}
  102. {{--<el-step title="进行中" status="process"></el-step>--}}
  103. {{--<el-step title="已完成" status="finish"></el-step>--}}
  104. {{--<el-step title="成功" status="success"></el-step>--}}
  105. {{--<el-step title="错误" status="error"></el-step>--}}
  106. {{--</el-steps>--}}
  107. {{--</el-form-item>--}}
  108. {{--订单流程--}}
  109. <el-form-item label="" prop="">
  110. <el-steps align-center style="width:70%" process-status="process">
  111. <el-step v-for="(process_item,processIndex) in orderDetail.orderSteps" :key="processIndex" :icon="process_item.icon" :status="process_item.status" :title="process_item.title" :description="process_item.desc"></el-step>
  112. </el-steps>
  113. </el-form-item>
  114. <el-form-item label="用户备注" prop="">
  115. <div>[[orderDetail.note]]</div>
  116. </el-form-item>
  117. <el-form-item label="商家备注" prop="">
  118. <el-input v-model="form.merchant_remark" type="textarea" placeholder="多行输入" rows="8" style="width:70%">
  119. </el-input>
  120. </el-form-item>
  121. <el-form-item label="" prop="">
  122. <el-button size="small" type="primary" @click="saveMerchantRemark()">保存备注</el-button>
  123. </el-form-item>
  124. </div>
  125. </div>
  126. <div v-if="orderDetail.address != null" class="vue-head">
  127. <div class="vue-main-title">
  128. <div class="vue-main-title-left"></div>
  129. <div class="vue-main-title-content">收货信息</div>
  130. </div>
  131. <div class="vue-main-form">
  132. <el-form-item label="收货人" prop="">
  133. <div>[[orderDetail.address.realname]]</div>
  134. </el-form-item>
  135. <el-form-item label="联系电话" prop="">
  136. <div>[[orderDetail.address.mobile]]</div>
  137. </el-form-item>
  138. <el-form-item label="收货地址" prop="">
  139. <div>[[orderDetail.address.address]]</div>
  140. </el-form-item>
  141. <el-form-item label="" prop="">
  142. <el-button v-if="orderDetail.status == 0 || orderDetail.status == 1" size="small" type="primary" @click="showAddressUpdate()">修改信息</el-button>
  143. <el-button size="small" type="text" @click="getUpdateIndex">修改记录</el-button>
  144. </el-form-item>
  145. <!-- 物流信息 -->
  146. <div v-if="dispatch != null && dispatch.length > 0">
  147. <el-form-item label="物流信息" prop="">
  148. <el-button size="small" type="primary" @click="showDispatchInfo()">查看</el-button>
  149. </el-form-item>
  150. </div>
  151. </div>
  152. </div>
  153. <div v-if="refundApply != null && Object.keys(refundApply).length > 0" class="vue-head">
  154. <div class="vue-main-title">
  155. <div class="vue-main-title-left"></div>
  156. <div class="vue-main-title-content">售后申请</div>
  157. {{--<el-button size="small" plain type="success">success</el-button>--}}
  158. {{--<el-button size="small" plain type="warning">warning</el-button>--}}
  159. {{--<el-button size="small" plain type="danger">danger</el-button>--}}
  160. {{--<el-button size="small" plain type="primary">primary</el-button>--}}
  161. {{--<el-button size="small" plain type="info">info</el-button>--}}
  162. </div>
  163. <div class="vue-main-form">
  164. <el-form-item label="售后状态" prop="">
  165. <div style="display:inline-block;margin-right:20px">[[refundApply.status_name]]</div>
  166. <div style="display:inline-block;margin-right:10px" v-for="(button1,key1) in refundApply.backend_button_models" :key="key1">
  167. <el-tooltip style="max-width: 150px" effect="dark"
  168. :disabled="!(button1.desc !== undefined && button1.desc.length > 0)"
  169. placement="top-start">
  170. <template slot="content">
  171. <div v-if="typeof(button1.desc) != 'string' && button1.desc.length > 0">
  172. <div v-for="(content1,k1) in button1.desc">[[content1]]<br/></div>
  173. </div>
  174. <div v-else>[[button1.desc]]</div>
  175. </template>
  176. <el-button @click="refundConfirm(button1.value)" size="small" plain :type="button1.type">
  177. [[button1.name]]
  178. </el-button>
  179. </el-tooltip>
  180. </div>
  181. </el-form-item>
  182. <el-form-item label="" prop="">
  183. <el-steps align-center style="width:80%">
  184. <el-step v-for="(process_item1,processIndex1) in refundApply.refundSteps"
  185. :key="processIndex1"
  186. :icon="process_item1.icon"
  187. :status="process_item1.status"
  188. :title="process_item1.title">
  189. <template slot="description">
  190. <div>[[process_item1.desc]]</div>
  191. <template v-if="process_item1.value == 20 && refundApply.returnExpress != null">
  192. <div>快递名称:[[refundApply.returnExpress.express_company_name]]</div>
  193. <div>快递单号:[[refundApply.returnExpress.express_sn]]</div>
  194. <el-button plain size="mini" type="primary" @click="selectLogistics(process_item1.value)">查看物流</el-button>
  195. </template>
  196. <template v-if="process_item1.value == 30 && refundApply.resendExpress != null">
  197. <div>快递名称:[[refundApply.resendExpress.express_company_name]]</div>
  198. <div>快递单号:[[refundApply.resendExpress.express_sn]]</div>
  199. <el-button plain size="mini" type="primary" @click="selectRefundLogistics(process_item1.value)">查看物流</el-button>
  200. </template>
  201. </template>
  202. </el-step>
  203. </el-steps>
  204. </el-form-item>
  205. <el-form-item label="售后类型" prop="">
  206. <div>[[refundApply.refund_type_name]]</div>
  207. </el-form-item>
  208. <el-form-item v-if="refundApply.refund_type != 2" label="退款金额" prop="">
  209. <div>
  210. ¥[[refundApply.price]]
  211. <el-tag v-if="refundApply.change_log != null" size="small" type="danger">改价</el-tag>
  212. <template v-if="refundApply.status < 6 && orderDetail.plugin_id == 0">
  213. <a style="color:#29BA9C;padding-left: 15px" @click="refund_change_show = true">修改金额</a>
  214. </template>
  215. </div>
  216. </el-form-item>
  217. <el-form-item label="退款原因" prop="">
  218. <div>[[refundApply.reason]]</div>
  219. </el-form-item>
  220. <el-form-item label="说明" prop="">
  221. <div>[[refundApply.content]]</div>
  222. </el-form-item>
  223. </div>
  224. </div>
  225. <!-- 发票 todo 这里的页面感觉需要优化一下-->
  226. <div v-if="orderDetail.collect_name || (orderDetail.order_invoice && orderDetail.order_invoice.collect_name)" style="display:flex;">
  227. <div class="vue-head" style="flex:5">
  228. <div class="vue-main-title">
  229. <div class="vue-main-title-left"></div>
  230. <div class="vue-main-title-content">发票信息</div>
  231. </div>
  232. <div class="vue-main-form">
  233. <el-form label-width="25%">
  234. <el-form-item label="发票类型:" prop="">
  235. <div>[[orderDetail.invoice_type == 1 ? '纸质发票' : '电子发票' ]]</div>
  236. </el-form-item>
  237. <el-form-item label="发票抬头:" prop="">
  238. <div>[[orderDetail.rise_type == 1 ? '个人' : '单位' ]]</div>
  239. </el-form-item>
  240. <el-form-item label="单位/抬头名称:" prop="">
  241. <div>[[orderDetail.collect_name]]</div>
  242. </el-form-item>
  243. <el-form-item label="邮箱:" prop="">
  244. <div>[[orderDetail.email]]</div>
  245. </el-form-item>
  246. <el-form-item label="纳税人识别号:" prop="">
  247. <div>[[orderDetail.company_number]]</div>
  248. </el-form-item>
  249. </el-form>
  250. </div>
  251. </div>
  252. <div class="vue-head" style="flex:4;">
  253. <div class="vue-main-title">
  254. <div class="vue-main-title-left"></div>
  255. <div class="vue-main-title-content">上传发票</div>
  256. </div>
  257. <div class="vue-main-form">
  258. <el-form-item label="" prop="thumb">
  259. <div class="upload-box" @click="openUpload('thumb')" v-if="!form.thumb_url">
  260. <i class="el-icon-plus" style="font-size:32px"></i>
  261. </div>
  262. <div @click="openUpload('thumb')" class="upload-boxed" v-if="form.thumb_url&&!is_pdf" style="height:82px">
  263. <!-- <embed :src="form.thumb_url" width="100%" height="100%" :href="form.thumb_url"></embed> -->
  264. <img :src="form.thumb_url" alt="" style="width:150px;height:82px;border-radius: 5px;cursor: pointer;">
  265. <i class="el-icon-close" @click.stop="clearImg('advert_one','img')" title="点击清除图片"></i>
  266. <div class="upload-boxed-text">点击重新上传</div>
  267. </div>
  268. <div @click="openUpload('thumb')" class="upload-boxed" v-if="form.thumb_url&&is_pdf" style="height:82px;border:1px solid #ccc">
  269. <div style="text-align:center;">PDF文件</div>
  270. <!-- <embed :src="form.thumb_url" width="100%" height="100%" :href="form.thumb_url"></embed> -->
  271. <!-- <img :src="form.thumb_url" alt="" style="width:150px;height:82px;border-radius: 5px;cursor: pointer;"> -->
  272. <i class="el-icon-close" @click.stop="clearImg('advert_one','img')" title="点击清除图片"></i>
  273. <div class="upload-boxed-text">点击重新上传</div>
  274. </div>
  275. <div v-if="is_pdf">
  276. <a :href="form.thumb_url" target="_blank">预览PDF文件</a>
  277. </div>
  278. </el-form-item>
  279. <el-form-item label="" prop="">
  280. <el-button size="small" type="primary" @click="saveInvoice()" >保存发票</el-button>
  281. </el-form-item>
  282. </div>
  283. </div>
  284. </div>
  285. <!-- 优惠信息 -->
  286. <div v-if="orderDetail.discounts != null && orderDetail.discounts.length > 0" class="vue-head">
  287. <div class="vue-main-title">
  288. <div class="vue-main-title-left"></div>
  289. <div class="vue-main-title-content">优惠信息</div>
  290. </div>
  291. <div class="vue-main-form">
  292. <el-form-item label="" prop="">
  293. <table class="el-table" style="width:70%;">
  294. <thead>
  295. <tr>
  296. <td class="is-center">优惠名称</td>
  297. <td class="is-center">优惠金额</td>
  298. </tr>
  299. </thead>
  300. <tbody>
  301. <template v-for="(discount,discount_key) in orderDetail.discounts">
  302. <tr>
  303. <td class="is-center">[[discount.name]]</td>
  304. <td class="is-center">[[discount.amount]]</td>
  305. </tr>
  306. </template>
  307. </tbody>
  308. </table>
  309. </el-form-item>
  310. </div>
  311. </div>
  312. <!-- 手续费 -->
  313. <div v-if="orderDetail.order_fees != null && orderDetail.order_fees.length > 0" class="vue-head">
  314. <div class="vue-main-title">
  315. <div class="vue-main-title-left"></div>
  316. <div class="vue-main-title-content">手续费信息</div>
  317. </div>
  318. <div class="vue-main-form">
  319. <el-form-item label="" prop="">
  320. <table class="el-table" style="width:70%;">
  321. <thead>
  322. <tr>
  323. <td class="is-center">手续费名称</td>
  324. <td class="is-center">手续费金额</td>
  325. </tr>
  326. </thead>
  327. <tbody>
  328. <template v-for="(order_fee,order_fee_key) in orderDetail.order_fees">
  329. <tr>
  330. <td class="is-center">[[order_fee.name]]</td>
  331. <td class="is-center">[[order_fee.amount]]</td>
  332. </tr>
  333. </template>
  334. </tbody>
  335. </table>
  336. </el-form-item>
  337. </div>
  338. </div>
  339. <!-- 服务费 -->
  340. <div v-if="orderDetail.order_service_fees != null && orderDetail.order_service_fees.length > 0" class="vue-head">
  341. <div class="vue-main-title">
  342. <div class="vue-main-title-left"></div>
  343. <div class="vue-main-title-content">服务费信息</div>
  344. </div>
  345. <div class="vue-main-form">
  346. <el-form-item label="" prop="">
  347. <table class="el-table" style="width:70%;">
  348. <thead>
  349. <tr>
  350. <td class="is-center">服务费名称</td>
  351. <td class="is-center">服务费金额</td>
  352. </tr>
  353. </thead>
  354. <tbody>
  355. <template v-for="(order_service_fee,order_service_fee_key) in orderDetail.order_service_fees">
  356. <tr>
  357. <td class="is-center">[[order_service_fee.name]]</td>
  358. <td class="is-center">[[order_service_fee.amount]]</td>
  359. </tr>
  360. </template>
  361. </tbody>
  362. </table>
  363. </el-form-item>
  364. </div>
  365. </div>
  366. <!-- 抵扣信息 -->
  367. <div v-if="orderDetail.deductions !== undefined && orderDetail.deductions.length > 0" class="vue-head">
  368. <div class="vue-main-title">
  369. <div class="vue-main-title-left"></div>
  370. <div class="vue-main-title-content">抵扣信息</div>
  371. </div>
  372. <div class="vue-main-form">
  373. <el-form-item label="" prop="">
  374. <table class="el-table" style="width:70%;">
  375. <thead>
  376. <tr>
  377. <td class="is-center">名称</td>
  378. <td class="is-center">抵扣值</td>
  379. <td class="is-center">抵扣金额</td>
  380. </tr>
  381. </thead>
  382. <tbody>
  383. <template v-for="(deduction,deduction_key) in orderDetail.deductions">
  384. <tr>
  385. <td class="is-center">[[deduction.name]]</td>
  386. <td class="is-center">[[deduction.coin]]</td>
  387. <td class="is-center">[[deduction.amount]]</td>
  388. </tr>
  389. </template>
  390. </tbody>
  391. </table>
  392. </el-form-item>
  393. </div>
  394. </div>
  395. <!-- 优惠卷信息 -->
  396. <div v-if="orderDetail.coupons !== undefined && orderDetail.coupons.length > 0" class="vue-head">
  397. <div class="vue-main-title">
  398. <div class="vue-main-title-left"></div>
  399. <div class="vue-main-title-content">优惠券信息</div>
  400. </div>
  401. <div class="vue-main-form">
  402. <el-form-item label="" prop="">
  403. <table class="el-table" style="width:70%;">
  404. <thead>
  405. <tr>
  406. <td class="is-center">名称</td>
  407. <td class="is-center">抵扣金额</td>
  408. </tr>
  409. </thead>
  410. <tbody>
  411. <template v-for="(coupon,coupon_key) in orderDetail.coupons">
  412. <tr>
  413. <td class="is-center">[[coupon.name]]</td>
  414. <td class="is-center">[[coupon.amount]]</td>
  415. </tr>
  416. </template>
  417. </tbody>
  418. </table>
  419. </el-form-item>
  420. </div>
  421. </div>
  422. @foreach(\app\common\modules\widget\Widget::current()->getItem('order_detail') as $key1=>$value1)
  423. {!! widget($value1['class'], ['order_id'=> request()->input('id')])!!}
  424. @endforeach
  425. <div v-if="div_from.status">
  426. <div class="vue-head">
  427. <div class="vue-main-title">
  428. <div class="vue-main-title-left"></div>
  429. <div class="vue-main-title-content">个人表单信息</div>
  430. </div>
  431. <div class="vue-main-form">
  432. <el-form-item label="真实姓名" prop="">
  433. <div>[[div_from.member_name]]</div>
  434. </el-form-item>
  435. <el-form-item label="身份证" prop="">
  436. <div>[[div_from.member_card]]</div>
  437. </el-form-item>
  438. </div>
  439. </div>
  440. </div>
  441. <!-- 插件控制 -->
  442. <div v-if="false">
  443. <div class="vue-head">
  444. <div class="vue-main-title">
  445. <div class="vue-main-title-left"></div>
  446. <div class="vue-main-title-content">插件描述</div>
  447. </div>
  448. <div class="vue-main-form">
  449. 插件订单内容
  450. </div>
  451. </div>
  452. </div>
  453. <!-- 项目信息 -->
  454. <div v-if="projects" class="vue-head">
  455. <div class="vue-main-title">
  456. <div class="vue-main-title-left"></div>
  457. <div class="vue-main-title-content">{{$lang_set['project']}}信息</div>
  458. </div>
  459. <div class="vue-main-form">
  460. <el-table :data="projects" style="width: 100%">
  461. <el-table-column prop="project_id" label="ID" width="100" align="center"></el-table-column>
  462. <el-table-column prop="project_title" label="{{$lang_set['project']}}名称" align="center"></el-table-column>
  463. <el-table-column prop="project_price" label="{{$lang_set['project']}}价格" align="center"></el-table-column>
  464. <el-table-column prop="total_count" label="{{$lang_set['project']}}包含次数" align="center"></el-table-column>
  465. <el-table-column prop="used_count" label="{{$lang_set['project']}}已使用次数" align="center"></el-table-column>
  466. </el-table>
  467. </div>
  468. </div>
  469. <!-- 商品信息 -->
  470. <div v-if="orderDetail.has_many_order_goods !== undefined && orderDetail.has_many_order_goods.length > 0" class="vue-head">
  471. <div class="vue-main-title">
  472. <div class="vue-main-title-left"></div>
  473. <div class="vue-main-title-content">商品信息</div>
  474. </div>
  475. <div class="vue-main-form">
  476. <el-table :data="orderDetail.has_many_order_goods" style="width: 100%">
  477. <el-table-column prop="goods_id" label="商品ID" width="100" align="center"></el-table-column>
  478. <el-table-column prop="" label="商品" width="60" align="center">
  479. <template slot-scope="scope">
  480. <img :src="scope.row.goods_thumb" style="width:50px;height:50px;">
  481. </template>
  482. </el-table-column>
  483. <el-table-column prop="down_time" label="" min-width="180" align="left">
  484. <template slot-scope="scope">
  485. <!-- <div class="list-con-goods-text" :style="{justifyContent:(scope.row.goods_option_title?'':'center')}"> -->
  486. <div class="list-con-goods-title"
  487. style="color:#29BA9C;cursor: pointer;"
  488. @click="gotoGoods(scope.row.goods_id)">
  489. [[scope.row.title]]
  490. </div>
  491. <div class="list-con-goods-option">规格: [[scope.row.goods_option_title]]</div>
  492. <div class="list-con-goods-option">数量: [[scope.row.total]]</div>
  493. <!-- </div> -->
  494. </template>
  495. </el-table-column>
  496. <el-table-column prop="down_time" label="商品价格" min-width="230" align="center">
  497. <template slot-scope="scope">
  498. <div>
  499. <div style="display:flex;justify-content: center;">
  500. <div style="flex:1;text-align:right">现价:</div>
  501. <div style="flex:1;text-align:left">¥[[scope.row.goods_price]]</div>
  502. </div>
  503. <div style="display:flex;justify-content: center;">
  504. <div style="flex:1;text-align:right">原价:</div>
  505. <div style="flex:1;text-align:left">¥[[scope.row.goods_market_price]]</div>
  506. </div>
  507. <div style="display:flex;justify-content: center;">
  508. <div style="flex:1;text-align:right">成本价:</div>
  509. <div style="flex:1;text-align:left">¥[[scope.row.goods_cost_price]]</div>
  510. </div>
  511. <div style="display:flex;justify-content: center;">
  512. <div style="flex:1;text-align:right">均摊支付:</div>
  513. <div style="flex:1;text-align:left">¥[[scope.row.payment_amount]]</div>
  514. </div>
  515. </div>
  516. </template>
  517. </el-table-column>
  518. <el-table-column prop="down_time" label="优惠均摊信息" min-width="243" align="center">
  519. <template slot-scope="scope">
  520. <div v-if="scope.row.order_goods_discounts !== undefined && scope.row.order_goods_discounts.length > 0" v-for="(goods_discount,index1) in scope.row.order_goods_discounts">
  521. <div style="display:flex;justify-content: center;">
  522. <div style="flex:1;text-align:right">[[goods_discount.name]]</div>
  523. <div style="flex:1;text-align:left">¥[[goods_discount.amount]]</div>
  524. </div>
  525. </div>
  526. </template>
  527. </el-table-column>
  528. <el-table-column prop="down_time" label="抵扣信息" min-width="180" align="center">
  529. <template slot-scope="scope">
  530. <div v-if="scope.row.order_goods_deductions !== undefined && scope.row.order_goods_deductions.length > 0" v-for="(goods_deduction,index2) in scope.row.order_goods_deductions">
  531. <div style="display:flex;justify-content: center;">
  532. <div style="flex:1;text-align:right">[[goods_deduction.name]]</div>
  533. <div style="flex:1;text-align:left">¥[[goods_deduction.used_coin]]</div>
  534. </div>
  535. </div>
  536. </template>
  537. </el-table-column>
  538. {{--<el-table-column prop="down_time" label="手续费" min-width="180" align="center" class="edit-cell">--}}
  539. {{--<template slot-scope="scope">--}}
  540. {{--<div style="display:flex;justify-content: center;">--}}
  541. {{--<div style="flex:1;text-align:right">服务费:</div>--}}
  542. {{--<div style="flex:1;text-align:left">¥123.3333</div>--}}
  543. {{--</div>--}}
  544. {{--</template>--}}
  545. {{--</el-table-column>--}}
  546. </el-table>
  547. </div>
  548. </div>
  549. </el-form>
  550. <!-- 修改收货地址 -->
  551. <el-dialog :visible.sync="modal_order_address_show" width="900px" title="修改收货信息">
  552. <div style="overflow:auto">
  553. <div style="overflow:auto" id="update-address">
  554. <el-form ref="updateAddress" :model="updateAddress" label-width="15%">
  555. <el-form-item label="收件人" prop="">
  556. <el-input v-model="updateAddress.realname" placeholder="收件人姓名" style="width:70%"></el-input>
  557. </el-form-item>
  558. <el-form-item label="联系方式">
  559. <el-input v-model="updateAddress.phone" placeholder="收件人电话" style="width:70%"></el-input>
  560. </el-form-item>
  561. <el-form-item label="地址" v-loading="areaLoading">
  562. <el-select v-model="updateAddress.province_id" clearable placeholder="省" @change="changeProvince(updateAddress.province_id)" style="width:150px">
  563. <el-option v-for="(item,index) in province_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  564. </el-select>
  565. <el-select v-model="updateAddress.city_id" clearable placeholder="市" @change="changeCity(updateAddress.city_id)" style="width:150px">
  566. <el-option v-for="(item,index) in city_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  567. </el-select>
  568. <el-select v-model="updateAddress.district_id" clearable placeholder="区/县" @change="changeDistrict(updateAddress.district_id)" style="width:150px">
  569. <el-option v-for="(item,index) in district_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  570. </el-select>
  571. <el-select v-if="street == 1" v-model="updateAddress.street_id" clearable placeholder="街道/乡镇" style="width:150px">
  572. <el-option v-for="(item,index) in street_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  573. </el-select>
  574. </el-form-item>
  575. <el-form-item label="详细地址">
  576. <el-input v-model="updateAddress.address" placeholder="详细地址" style="width:70%"></el-input>
  577. </el-form-item>
  578. </el-form>
  579. </div>
  580. </div>
  581. <span slot="footer" class="dialog-footer">
  582. <el-button @click="modal_order_address_show = false">取 消</el-button>
  583. <el-button type="primary" @click="addressUpdate">确 认</el-button>
  584. </span>
  585. </el-dialog>
  586. <!-- 修改记录 -->
  587. <el-dialog :visible.sync="modal_update_show" width="900px" title="修改记录">
  588. <div style="overflow:auto">
  589. <el-table :data="update_list" style="width: 100%;height:500px;overflow:auto" id="update-list">
  590. <el-table-column label="修改时间" prop="created_at" align="center"></el-table-column>
  591. <el-table-column label="修改前收货信息" prop="" align="center">
  592. <template slot-scope="scope">
  593. <div> [[scope.row.old_name]]</div>
  594. <div> [[scope.row.old_phone]]</div>
  595. <div> [[scope.row.old_address]]</div>
  596. </template>
  597. </el-table-column>
  598. <el-table-column label="修改后收货信息" prop="" align="center">
  599. <template slot-scope="scope">
  600. <div> [[scope.row.realname]]</div>
  601. <div> [[scope.row.phone]]</div>
  602. <div> [[scope.row.new_address]]</div>
  603. </template>
  604. </el-table-column>
  605. </el-table>
  606. </div>
  607. <span slot="footer" class="dialog-footer">
  608. <el-button @click="modal_update_show = false">取 消</el-button>
  609. <!-- <el-button type="primary" @click="addressUpdate">确 认</el-button> -->
  610. </span>
  611. </el-dialog>
  612. <!-- 支付记录 -->
  613. <el-dialog :visible.sync="modal_pay_show" width="1100px" title="支付记录">
  614. <div style="overflow:auto">
  615. <el-table :data="pay_list" style="width: 100%;height:500px;overflow:auto" id="pay-list">
  616. <el-table-column label="ID" prop="id" align="center"></el-table-column>
  617. <el-table-column label="支付单号">
  618. <template slot-scope="scope">
  619. <a :href="'{{ yzWebUrl('orderPay.detail', array('order_pay_id' => '')) }}'+[[scope.row.id]]" target="_blank">
  620. [[scope.row.pay_sn]]
  621. </a>
  622. </template>
  623. </el-table-column>
  624. <el-table-column prop="amount" label="支付金额"></el-table-column>
  625. <el-table-column prop="status_name" label="状态"></el-table-column>
  626. <el-table-column prop="pay_type_name" label="支付方式"></el-table-column>
  627. <el-table-column prop="created_at" label="创建时间"></el-table-column>
  628. <el-table-column prop="pay_time" label="支付时间"></el-table-column>
  629. <el-table-column prop="refund_time" label="退款时间"></el-table-column>
  630. </el-table>
  631. </div>
  632. <span slot="footer" class="dialog-footer">
  633. <el-button @click="modal_pay_show = false">取 消</el-button>
  634. <!-- <el-button type="primary" @click="">确 认</el-button> -->
  635. </span>
  636. </el-dialog>
  637. <!-- 查看物流信息 -->
  638. <el-dialog :visible.sync="modal_dispatch_info" width="750px" center title="物流信息">
  639. <div style="height:400px;overflow:auto" id="dispatch-info">
  640. <!-- 多包裹 -->
  641. <div>
  642. <div style="display:flex;margin-bottom:15px;" v-for="(item3,index3) in dispatch">
  643. <div class="left" style="width:105px;margin-right:30px;text-align:right">
  644. 包裹[[index3 + 1]]信息
  645. </div>
  646. <div class="right" style="flex:1">
  647. <div>
  648. <div class="wl-img" style="width:70px;height:70px;position:relative;">
  649. <img :src="item3.thumb" style="width:100%;height:100%">
  650. <div style="line-height:18px;background:RGB(17, 9, 5,0.7);color:#fff;position:absolute;bottom:0;width:100%;text-align:center">
  651. 共[[item3.count]]件
  652. </div>
  653. <div @click="getGoodDetail(item3)" style="position:absolute;bottom:0;right:-80px;cursor: pointer;color:#ff9b19 ">
  654. 查看商品
  655. </div>
  656. </div>
  657. <div style="padding:5px 0">公司:[[item3.company_name]]</div>
  658. <div style="padding:5px 0">运单号:[[item3.express_sn]]</div>
  659. <template v-if="item3.data != null">
  660. <div style="padding:5px 0" v-for="(d1, k2) in item3.data" :key="k2">[[d1.time]] [[d1.context]]</div>
  661. </template>
  662. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  663. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  664. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  665. </div>
  666. </div>
  667. </div>
  668. </div>
  669. </div>
  670. <span slot="footer" class="dialog-footer">
  671. <el-button @click="modal_dispatch_info = false">关 闭</el-button>
  672. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  673. </span>
  674. </el-dialog>
  675. <!-- 取消发货 -->
  676. <el-dialog :visible.sync="cancel_send_show" width="750px" title="取消发货">
  677. <div style="height:300px;overflow:auto" id="cancel-send">
  678. <div style="color:#000;font-weight:500">取消发货原因</div>
  679. <el-input v-model="cancel_send_con" :rows="10" type="textarea"></el-input>
  680. </div>
  681. <span slot="footer" class="dialog-footer">
  682. <el-button @click="cancel_send_show = false">取 消</el-button>
  683. <el-button type="primary" @click="sureCancelSend">取消发货 </el-button>
  684. </span>
  685. </el-dialog>
  686. <!-- 确认发货 -->
  687. <el-dialog :visible.sync="confirm_send_show" width="750px" title="确认发货">
  688. <div style="height:400px;overflow:auto" id="confirm-send">
  689. <el-form ref="send" :model="send" :rules="send_rules" label-width="15%">
  690. <el-form-item label="收件人信息" prop="aggregation">
  691. <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
  692. <div>收货地址: [[address_info.address]]</div>
  693. </el-form-item>
  694. <el-form-item label="配送方式" prop="">
  695. <el-radio v-model="send.dispatch_type_id" :label="1">快递</el-radio>
  696. </el-form-item>
  697. <el-form-item label="快递公司">
  698. <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  699. <el-option label="其他快递" value=""></el-option>
  700. <el-option v-for="(item,index) in expressCompanies" :key="index" :label="item.name" :value="item.value"></el-option>
  701. </el-select>
  702. </el-form-item>
  703. <el-form-item label="快递单号" prop="">
  704. <el-input v-model="send.express_sn" style="width:70%;"></el-input>
  705. </el-form-item>
  706. </el-form>
  707. </div>
  708. <span slot="footer" class="dialog-footer">
  709. <el-button @click="confirm_send_show = false">取 消</el-button>
  710. <el-button type="primary" @click="sureconfirmSend">确认发货 </el-button>
  711. </span>
  712. </el-dialog>
  713. <!-- 多包裹确认发货 -->
  714. <el-dialog :visible.sync="more_send_show" width="750px" title="分批发货">
  715. <div id="separate-send">
  716. <el-form ref="send" :model="send" label-width="15%">
  717. <el-form-item label="收件人信息" prop="aggregation">
  718. <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
  719. <div>收货地址: [[address_info.address]]</div>
  720. </el-form-item>
  721. <el-form-item label="快递公司">
  722. <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  723. <el-option label="其他快递" value=""></el-option>
  724. <el-option v-for="(v1,k1) in expressCompanies" :key="k1" :label="v1.name" :value="v1.value"></el-option>
  725. </el-select>
  726. </el-form-item>
  727. <el-form-item label="快递单号" prop="">
  728. <el-input v-model="send.express_sn" style="width:70%;"></el-input>
  729. </el-form-item>
  730. </el-form>
  731. <el-table ref="multipleTable" :data="order_goods_send_list" tooltip-effect="dark" height="250" style="width: 100%" @selection-change="moreSendChange">
  732. <el-table-column type="selection" width="55"></el-table-column>
  733. <el-table-column width="550">
  734. <template slot-scope="scope">
  735. <div style="display:flex;width: 88%;">
  736. <div style="width:50px;height:50px">
  737. <img :src="scope.row.thumb" alt="" style="width:50px;height:50px">
  738. </div>
  739. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  740. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  741. <div style="color:#999">[[scope.row.goods_id]]</div>
  742. </div>
  743. </div>
  744. </template>
  745. </el-table-column>
  746. <el-table-column>
  747. <template slot-scope="scope">
  748. <div style="color:#999">[[scope.row.goods_option_title]]</div>
  749. </template>
  750. </el-table-column>
  751. </el-table>
  752. </div>
  753. <span slot="footer" class="dialog-footer">
  754. <el-button @click="more_send_show = false">取 消</el-button>
  755. <el-button type="primary" @click="confirmMoreSend()">确认发货 </el-button>
  756. </span>
  757. </el-dialog>
  758. <!-- 查看商品 -->
  759. <el-dialog :visible.sync="get_goods_show" width="750px" title="商品列表">
  760. <div id="separate-send">
  761. <el-table ref="multipleTable1" :data="get_goods_list" tooltip-effect="dark" height="550" style="width: 100%">
  762. <el-table-column width="550">
  763. <template slot-scope="scope">
  764. <div style="display:flex;width: 88%;">
  765. <div style="width:50px;height:50px">
  766. <img :src="scope.row.thumb" alt="" style="width:50px;height:50px">
  767. </div>
  768. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  769. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  770. <div style="color:#999">[[scope.row.goods_id]]</div>
  771. </div>
  772. </div>
  773. </template>
  774. </el-table-column>
  775. <el-table-column>
  776. <template slot-scope="scope">
  777. <div style="color:#999">[[scope.row.goods_option_title]]</div>
  778. </template>
  779. </el-table-column>
  780. </el-table>
  781. </div>
  782. <span slot="footer" class="dialog-footer">
  783. <el-button @click="get_goods_show = false">取 消</el-button>
  784. </span>
  785. </el-dialog>
  786. <!-- 驳回售后申请 -->
  787. <el-dialog :visible.sync="refund_reject_show" width="750px" title="驳回售后申请">
  788. <div style="height:300px;overflow:auto" id="refund-reject">
  789. <div style="color:#000;font-weight:500">驳回原因</div>
  790. <el-input v-model="refund_reject_reason" :rows="10" type="textarea"></el-input>
  791. </div>
  792. <span slot="footer" class="dialog-footer">
  793. <el-button @click="refund_reject_show = false">取 消</el-button>
  794. <el-button type="primary" @click="confirmRefundReject()">确 认</el-button>
  795. </span>
  796. </el-dialog>
  797. <!-- 通过申请 -->
  798. <el-dialog :visible.sync="refund_pass_show" width="650px" title="通过申请">
  799. <el-form ref="refund_pass_form" :model="refund_pass_form">
  800. <el-form-item label="">
  801. 退货地址:
  802. <el-select v-model="refund_pass_form.refund_address" clearable placeholder="请选择退货地址" style="width:150px">
  803. <el-option v-for="(vr, kr) in refund_pass_address" :label="vr.address_name" :key="kr" :value="vr.id">
  804. <span v-if="vr.is_default">[[vr.address_name]](默认地址)</span>
  805. </el-option>
  806. </el-select>
  807. </el-form-item>
  808. <el-form-item label="">
  809. 留言:
  810. <el-input v-model="refund_pass_form.message" :rows="8" type="textarea"></el-input>
  811. </el-form-item>
  812. </el-form>
  813. <span slot="footer" class="dialog-footer">
  814. <el-button @click="refund_pass_show = false">取 消</el-button>
  815. <el-button type="primary" @click="confirmRefundPass()">确 认</el-button>
  816. </span>
  817. </el-dialog>
  818. <!-- 换货确认发货 -->
  819. <el-dialog :visible.sync="refund_resend_show" width="650px" title="确认发货">
  820. <div style="height:350px;overflow:auto" id="refund-resend">
  821. <el-form ref="refund_resend" :model="refund_resend" label-width="15%">
  822. <el-form-item label="快递公司">
  823. <el-select v-model="refund_resend.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  824. <el-option label="其他快递" value="其他快递"></el-option>
  825. <el-option v-for="(vr1,kr1) in expressCompanies" :key="kr1" :label="vr1.name" :value="vr1.value"></el-option>
  826. </el-select>
  827. </el-form-item>
  828. <el-form-item label="快递单号" prop="">
  829. <el-input v-model="refund_resend.express_sn" style="width:70%;"></el-input>
  830. </el-form-item>
  831. </el-form>
  832. </div>
  833. <span slot="footer" class="dialog-footer">
  834. <el-button @click="refund_resend_show = false">取 消</el-button>
  835. <el-button type="primary" @click="confirmRefundResend()">确认发货 </el-button>
  836. </span>
  837. </el-dialog>
  838. <!-- 查看退货、换货物流信息 -->
  839. <el-dialog :visible.sync="modal_refund_logistics" width="750px" center title="查看售后物流信息">
  840. <div style="height:400px;overflow:auto" id="dispatch-info">
  841. <el-form label-width="15%">
  842. <el-form-item label="物流公司" prop="">
  843. [[refundLogistics.company_name]]
  844. </el-form-item>
  845. <el-form-item label="快递单号" prop="">
  846. <div style="display:inline-block;margin-right:20px">[[refundLogistics.express_sn]]</div>
  847. </el-form-item>
  848. <el-form-item label="物流情况" prop="">
  849. <template v-if="refundLogistics.data != null">
  850. <div v-for="(item3, k3) in refundLogistics.data" :key="k3">[[item3.time]] [[item3.context]]</div>
  851. </template>
  852. </el-form-item>
  853. </el-form>
  854. </div>
  855. <span slot="footer" class="dialog-footer">
  856. <el-button @click="modal_refund_logistics = false">关 闭</el-button>
  857. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  858. </span>
  859. </el-dialog>
  860. <!-- 修改退款金额 -->
  861. <el-dialog :visible.sync="refund_change_show" center width="500px" title="修改退款金额">
  862. <div style="height:350px;overflow:auto" id="refund-change">
  863. <div class="tip" style="color:#f00;margin:10px 0;">提示:修改后退款金额不能小于0元</div>
  864. <el-form label-width="15%">
  865. <el-form-item label="加或减" prop="refund_change_price">
  866. <el-input @input="inputPrice(refund_change_price)" v-model="refund_change_price" style="width:60%;"></el-input>
  867. </el-form-item>
  868. </el-form>
  869. <div style="display:inline-block;color:#000;margin-right:20px;font-weight:500;">
  870. <div style="display:flex;text-align:center;line-height:28px;align-items: center;">
  871. <div style="margin-right:15px">
  872. 原退款金额<br>
  873. ¥[[parseFloat(refund_price)]]
  874. </div>
  875. <div style="margin-right:15px">+</div>
  876. <div style="margin-right:15px">
  877. 价格修改<br>
  878. ¥[[(parseFloat(refund_change_price))]]
  879. </div>
  880. <div style="margin-right:15px">=</div>
  881. <div style="margin-right:15px">
  882. 退款金额<br>
  883. <strong style="color:#f00">¥[[parseFloat(parseFloat(refund_price)+(parseFloat(refund_change_price))).toFixed(2)]]</strong>
  884. </div>
  885. </div>
  886. </div>
  887. </div>
  888. <span slot="footer" class="dialog-footer">
  889. <el-button @click="refund_change_show = false">取 消</el-button>
  890. <el-button type="primary" @click="refundChangePrice()">确认修改 </el-button>
  891. </span>
  892. </el-dialog>
  893. {{--<div class="vue-page">--}}
  894. {{--<div class="vue-center">--}}
  895. {{--<el-button type="primary" @click="submitForm('form')">保存设置</el-button>--}}
  896. {{--<el-button @click="goBack">返回</el-button>--}}
  897. {{--</div>--}}
  898. {{--</div>--}}
  899. <upload-img :upload-show="uploadShow" :name="chooseImgName" @replace="changeProp" @sure="sureImg"></upload-img>
  900. </div>
  901. </div>
  902. <script src="{{resource_get('static/yunshop/tinymce4.7.5/tinymce.min.js')}}"></script>
  903. <!-- <script src="{{resource_get('static/yunshop/tinymceTemplate.js')}}"></script> -->
  904. @include('public.admin.tinymceee')
  905. <!-- @include('public.admin.uploadImg') -->
  906. @include('public.admin.uploadfile')
  907. <script>
  908. var app = new Vue({
  909. el:"#app",
  910. delimiters: ['[[', ']]'],
  911. name: 'test',
  912. data() {
  913. return{
  914. is_pdf:false,
  915. street: '{!! \Setting::get("shop.trade")['is_street'] !!}',
  916. id:0,
  917. getDataUrl: '{!! yzWebFullUrl('plugin.reserve-simple.admin.order-detail.get-data') !!}',//获取订单数据链接
  918. order_id:0,
  919. orderDetail:{},
  920. yz_member:{},
  921. div_from:{},
  922. refundApply:{}, //退款信息
  923. refund_change_price:0,
  924. refund_price:0,
  925. refund_change_show:false, //修改退款金额
  926. refundLogistics:{}, //退款物流信息
  927. modal_refund_logistics: false,
  928. projects:[],
  929. dispatch:{}, //订单物流信息
  930. modal_dispatch_info: false,
  931. form:{
  932. merchant_remark:'',//商家备注
  933. thumb_url:'',//发票地址
  934. thumb:'',//发票地址
  935. },
  936. uploadShow:false,
  937. chooseImgName:'',
  938. submit_url:'',
  939. showVisible:false,
  940. loading: false,
  941. uploadImg1:'',
  942. // 修改收货信息
  943. province_list:[],
  944. city_list:[],
  945. district_list:[],
  946. street_list:[],
  947. modal_order_address_show:false,
  948. updateAddress:{
  949. street_id:'',
  950. city_id:"",
  951. },
  952. // 地址修改记录
  953. modal_update_show:false,
  954. update_list:[],
  955. areaLoading:false,
  956. // 支付记录
  957. modal_pay_show:false,
  958. pay_list:[],
  959. cancel_send_show:false,// 取消发货弹窗
  960. cancel_send_con:"",//取消发货原因
  961. cancel_send_id:'',
  962. confirm_send_show:false,// 确认发货弹窗
  963. confirm_send_id:"",
  964. send:{
  965. dispatch_type_id:1,
  966. express_code:"",
  967. express_sn:"",
  968. },
  969. send_rules:{},
  970. address_info:{},
  971. expressCompanies:[],//快递公司
  972. //退款申请拒绝
  973. refund_reject_show: false,
  974. refund_reject_reason:'',
  975. //通过退款申请
  976. refund_pass_show: false,
  977. refund_pass_address: [],
  978. refund_pass_form:{},
  979. //换货确认发货
  980. refund_resend_show:false,
  981. refund_resend:{
  982. express_code:"",
  983. express_sn:"",
  984. },
  985. // 多包裹发货
  986. more_send_show:false,
  987. order_goods_send_list:[],
  988. send_order_goods_ids:[],
  989. // 查看商品
  990. get_goods_show:false,
  991. get_goods_list:[],
  992. }
  993. },
  994. created() {
  995. let result = this.viewReturn();
  996. this.__initial(result);
  997. },
  998. mounted() {
  999. if(this.id) {
  1000. this.getData();
  1001. }
  1002. },
  1003. methods: {
  1004. //视图返回数据
  1005. viewReturn() {
  1006. return {!! $data?:'{}' !!};
  1007. },
  1008. //初始化页面数据,请求链接
  1009. __initial(data) {
  1010. if (data.requestInputs.id) {
  1011. this.id = data.requestInputs.id;
  1012. }
  1013. console.log(data);
  1014. },
  1015. getData() {
  1016. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1017. this.$http.post(this.getDataUrl,{id:this.id}).then(function (response) {
  1018. if (response.data.result){
  1019. this.orderDetail = response.data.data.order;
  1020. this.order_id = response.data.data.order.id;
  1021. this.yz_member = response.data.data.yz_member;
  1022. this.div_from = response.data.data.div_from;
  1023. this.projects = response.data.data.projects;
  1024. this.refundApply = response.data.data.refundApply;
  1025. if (this.refundApply) {
  1026. this.refund_price = this.refundApply.price;
  1027. }
  1028. // console.log(this.refundApply != null && Object.keys(this.refundApply).length > 0);
  1029. //console.log(this.refundApply);
  1030. if (response.data.data.dispatch) {
  1031. this.dispatch = response.data.data.dispatch;
  1032. }
  1033. this.expressCompanies = response.data.data.expressCompanies;
  1034. if (response.data.data.order.has_one_order_remark) {
  1035. this.form.merchant_remark = response.data.data.order.has_one_order_remark.remark;
  1036. }
  1037. if (response.data.data.order.invoice) {
  1038. this.form.thumb_url = response.data.data.order.invoice;
  1039. this.form.thumb = response.data.data.order.invoice;
  1040. let url = this.form.thumb_url.split('.')
  1041. console.log(url)
  1042. if(url[url.length-1] == 'pdf') {
  1043. this.is_pdf = true;
  1044. }
  1045. else {
  1046. this.is_pdf = false;
  1047. }
  1048. }
  1049. loading.close();
  1050. } else {
  1051. this.$message({message: response.data.msg,type: 'error'});
  1052. }
  1053. loading.close();
  1054. },function (response) {
  1055. this.$message({message: response.data.msg,type: 'error'});
  1056. loading.close();
  1057. }
  1058. );
  1059. },
  1060. //显示退款物流信息
  1061. selectRefundLogistics(value) {
  1062. console.log(value);
  1063. this.modal_refund_logistics = true;
  1064. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1065. this.$http.post('{!! yzWebFullUrl('order.detail.refund-express') !!}',{order_id:this.order_id,refund_value:value}).then(function (response) {
  1066. if (response.data.result){
  1067. // console.log(response.data.data);
  1068. this.refundLogistics = response.data.data;
  1069. loading.close();
  1070. } else {
  1071. this.$message({message: response.data.msg,type: 'error'});
  1072. }
  1073. loading.close();
  1074. },function (response) {
  1075. this.$message({message: response.data.msg,type: 'error'});
  1076. loading.close();
  1077. }
  1078. );
  1079. },
  1080. //退款操作
  1081. refundConfirm(operationType) {
  1082. console.log(operationType);
  1083. if (operationType == -1) {
  1084. return this.refundReject();
  1085. } else if (operationType == 1) {
  1086. return this.refundPay();
  1087. } else if (operationType == 2) {
  1088. return this.refundConsensus()
  1089. } else if (operationType == 3) {
  1090. return this.refundPass()
  1091. } else if (operationType == 5) {
  1092. return this.refundResend()
  1093. } else if (operationType == 10) {
  1094. return this.refundClose()
  1095. }
  1096. this.$message.error(operationType + "操作方式不存在!");
  1097. },
  1098. //正则过滤掉除\-\.0-9以外的字符,不会写
  1099. inputPrice(refund_change_price) {
  1100. },
  1101. //确认修改退款金额
  1102. refundChangePrice() {
  1103. if(this.refund_change_price === '') {
  1104. this.$message.error("修改金额不能为空!");
  1105. return false;
  1106. }
  1107. // if((parseFloat(this.refundApply.price) + parseFloat(this.refund_change_price)) < 1) {
  1108. // this.$message.error("退款金额不能必须大于0!");
  1109. // return false;
  1110. // }
  1111. let json = {
  1112. 'order_id':this.id,
  1113. 'refund_id':this.refundApply.id,
  1114. 'change_price':this.refund_change_price,
  1115. };
  1116. let loading = this.$loading({target:document.querySelector("#refund-change"),background: 'rgba(0, 0, 0, 0)'});
  1117. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.change-price') !!}',json).then(function (response) {
  1118. if (response.data.result) {
  1119. this.$message({type: 'success',message: '操作成功!'});
  1120. } else{
  1121. this.$message({type: 'error',message: response.data.msg});
  1122. }
  1123. loading.close();
  1124. this.refund_change_show = false;
  1125. this.getData(); //重新获取数据刷新页面
  1126. },function (response) {
  1127. this.$message({type: 'error',message: response.data.msg});
  1128. loading.close();
  1129. this.refund_change_show = false;
  1130. });
  1131. },
  1132. //同意退款
  1133. refundPay() {
  1134. this.$confirm('是否同意此订单退款?', '提示', {confirmButtonText: '同意',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1135. let url = '{!! yzWebFullUrl('refund.pay.index') !!}'
  1136. url += '&refund_id=' + this.refundApply.id;
  1137. window.location.href = url;
  1138. {{--let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});--}}
  1139. {{--this.$http.post('{!! yzWebFullUrl('refund.vue-operation.pay') !!}',{refund_id:this.refundApply.id}).then(function (response) {--}}
  1140. {{--if (response.data.result) {--}}
  1141. {{--this.$message({type: 'success',message: '操作成功'});--}}
  1142. {{--} else{--}}
  1143. {{--this.$message({type: 'error',message: response.data.msg});--}}
  1144. {{--}--}}
  1145. {{--loading.close();--}}
  1146. {{--this.getData(); //重新获取数据刷新页面--}}
  1147. {{--},function (response) {--}}
  1148. {{--this.$message({type: 'error',message: response.data.msg});--}}
  1149. {{--loading.close();--}}
  1150. {{--}--}}
  1151. {{--);--}}
  1152. }).catch(() => {
  1153. this.$message({type: 'info',message: '已取消操作'});
  1154. });
  1155. },
  1156. //手动退款
  1157. refundConsensus() {
  1158. this.$confirm('确认此订单手动退款完成吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1159. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1160. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.consensus') !!}',{refund_id:this.refundApply.id}).then(function (response) {
  1161. if (response.data.result) {
  1162. this.$message({type: 'success',message: '操作成功'});
  1163. } else{
  1164. this.$message({type: 'error',message: response.data.msg});
  1165. }
  1166. loading.close();
  1167. this.getData(); //重新获取数据刷新页面
  1168. },function (response) {
  1169. this.$message({type: 'error',message: response.data.msg});
  1170. loading.close();
  1171. }
  1172. );
  1173. }).catch(() => {
  1174. this.$message({type: 'info',message: '已取消操作'});
  1175. });
  1176. },
  1177. //通过申请
  1178. refundPass() {
  1179. this.refund_pass_show = true;
  1180. this.getRefundAddress();
  1181. },
  1182. //通过申请
  1183. confirmRefundPass() {
  1184. if(!this.refund_pass_form.refund_address) {
  1185. this.$message.error("请选择退货地址!");
  1186. return false;
  1187. }
  1188. let json = {
  1189. 'refund_id':this.refundApply.id,
  1190. 'message':this.refund_pass_form.message,
  1191. 'refund_address': this.refund_pass_form.refund_address,
  1192. };
  1193. let loading = this.$loading({target:document.querySelector("#refund-pass"),background: 'rgba(0, 0, 0, 0)'});
  1194. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.pass') !!}',json).then(function (response) {
  1195. if (response.data.result) {
  1196. this.$message({type: 'success',message: '操作成功!'});
  1197. } else{
  1198. this.$message({type: 'error',message: response.data.msg});
  1199. }
  1200. loading.close();
  1201. this.refund_pass_show = false;
  1202. this.getData(); //重新获取数据刷新页面
  1203. },function (response) {
  1204. this.$message({type: 'error',message: response.data.msg});
  1205. loading.close();
  1206. this.refund_pass_show = false;
  1207. });
  1208. },
  1209. //获取退款地址
  1210. getRefundAddress() {
  1211. this.$http.post('{!! yzWebFullUrl('goods.return-address.ajax-all-address') !!}').then(function (response) {
  1212. if (response.data.result) {
  1213. this.refund_pass_address = response.data.data;
  1214. console.log(this.refund_pass_address);
  1215. } else{
  1216. this.$message({type: 'error',message: response.data.msg});
  1217. }
  1218. },function (response) {
  1219. this.$message({type: 'error',message: response.data.msg});
  1220. });
  1221. },
  1222. //换货确认发货
  1223. refundResend() {
  1224. this.refund_resend_show = true;
  1225. },
  1226. //换货确认发货
  1227. confirmRefundResend() {
  1228. let json = {
  1229. refund_id:this.refundApply.id,
  1230. express_code:this.refund_resend.express_code,
  1231. express_company_name:this.refund_resend.express_code,
  1232. express_sn:this.refund_resend.express_sn,
  1233. };
  1234. let loading = this.$loading({target:document.querySelector("#refund-pass"),background: 'rgba(0, 0, 0, 0)'});
  1235. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.resend') !!}',json).then(function (response) {
  1236. if (response.data.result) {
  1237. this.$message({type: 'success',message: '操作成功!'});
  1238. } else{
  1239. this.$message({type: 'error',message: response.data.msg});
  1240. }
  1241. loading.close();
  1242. this.refund_resend_show = false;
  1243. this.getData(); //重新获取数据刷新页面
  1244. },function (response) {
  1245. this.$message({type: 'error',message: response.data.msg});
  1246. loading.close();
  1247. this.refund_resend_show = false;
  1248. });
  1249. },
  1250. //换货完成关闭申请
  1251. refundClose() {
  1252. this.$confirm('确认此订单换货完成吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1253. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1254. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.close') !!}',{refund_id:this.refundApply.id}).then(function (response) {
  1255. if (response.data.result) {
  1256. this.$message({type: 'success',message: '操作成功'});
  1257. } else{
  1258. this.$message({type: 'error',message: response.data.msg});
  1259. }
  1260. loading.close();
  1261. this.getData(); //重新获取数据刷新页面
  1262. },function (response) {
  1263. this.$message({type: 'error',message: response.data.msg});
  1264. loading.close();
  1265. }
  1266. );
  1267. }).catch(() => {
  1268. this.$message({type: 'info',message: '已取消操作'});
  1269. });
  1270. },
  1271. //驳回退款申请
  1272. refundReject() {
  1273. this.refund_reject_show = true;
  1274. this.refund_reject_reason = "";
  1275. },
  1276. //驳回退款申请
  1277. confirmRefundReject() {
  1278. let json = {
  1279. 'refund_id':this.refundApply.id,
  1280. 'reject_reason':this.refund_reject_reason,
  1281. };
  1282. let loading = this.$loading({target:document.querySelector("#refund-reject"),background: 'rgba(0, 0, 0, 0)'});
  1283. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.reject') !!}',json).then(function (response) {
  1284. if (response.data.result) {
  1285. this.$message({type: 'success',message: '操作成功!'});
  1286. }
  1287. else{
  1288. this.$message({type: 'error',message: response.data.msg});
  1289. }
  1290. loading.close();
  1291. this.refund_reject_show = false;
  1292. this.getData(); //重新获取数据刷新页面
  1293. },function (response) {
  1294. this.$message({type: 'error',message: response.data.msg});
  1295. loading.close();
  1296. this.refund_reject_show = false;
  1297. });
  1298. },
  1299. //订单操作
  1300. orderConfirm(operationType, order) {
  1301. console.log(operationType);
  1302. if (operationType == 1) {
  1303. this.confirmPay(order.id);
  1304. } else if (operationType == 2) {
  1305. this.confirmSend(order.id, order);
  1306. } else if (operationType == 3) {
  1307. this.confirmReceive(order.id);
  1308. } else if (operationType == 'cancel_send') {
  1309. this.cancelSend(order.id);
  1310. } else if (operationType == 'separate_send') {
  1311. this.separateSend(order.id, order);
  1312. }
  1313. },
  1314. // 确认付款
  1315. confirmPay(id) {
  1316. this.$confirm('确认此订单已付款吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1317. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1318. this.$http.post('{!! yzWebFullUrl('order.vue-operation.pay') !!}',{order_id:id}).then(function (response) {
  1319. if (response.data.result) {
  1320. this.$message({type: 'success',message: '操作成功'});
  1321. } else{
  1322. this.$message({type: 'error',message: response.data.msg});
  1323. }
  1324. loading.close();
  1325. location.reload(); //刷新页面
  1326. },function (response) {
  1327. this.$message({type: 'error',message: response.data.msg});
  1328. loading.close();
  1329. }
  1330. );
  1331. }).catch(() => {
  1332. this.$message({type: 'info',message: '已取消操作'});
  1333. });
  1334. },
  1335. // 确认发货
  1336. confirmSend(id,item) {
  1337. this.confirm_send_show = true;
  1338. this.send = {
  1339. dispatch_type_id :1,
  1340. express_code:"",
  1341. express_sn:""
  1342. };
  1343. this.confirm_send_id = id;
  1344. this.address_info = item.address;
  1345. },
  1346. //确认发货
  1347. sureconfirmSend() {
  1348. let json = {
  1349. dispatch_type_id:this.send.dispatch_type_id,
  1350. express_code:this.send.express_code,
  1351. express_sn:this.send.express_sn,
  1352. order_id:this.confirm_send_id,
  1353. };
  1354. console.log(json);
  1355. // if(this.send.express_sn == "") {
  1356. // this.$message.error("快递单号不能为空!");
  1357. // return;
  1358. // }
  1359. let loading = this.$loading({target:document.querySelector("#confirm-send"),background: 'rgba(0, 0, 0, 0)'});
  1360. this.$http.post('{!! yzWebFullUrl('order.vue-operation.send') !!}',json).then(function (response) {
  1361. if (response.data.result) {
  1362. this.$message({type: 'success',message: '确认发货成功!'});
  1363. } else{
  1364. this.$message({type: 'error',message: response.data.msg});
  1365. }
  1366. loading.close();
  1367. this.confirm_send_show = false;
  1368. location.reload(); //刷新页面
  1369. },function (response) {
  1370. this.$message({type: 'error',message: response.data.msg});
  1371. loading.close();
  1372. this.confirm_send_show = false;
  1373. })
  1374. },
  1375. //多包裹发货
  1376. separateSend(id,item) {
  1377. this.more_send_show = true;
  1378. this.confirm_send_id = id;
  1379. this.send = {
  1380. dispatch_type_id :1,
  1381. express_code:"",
  1382. express_sn:"",
  1383. };
  1384. this.address_info = item.address;
  1385. this.getSeparateSendOrderGoods(id);
  1386. },
  1387. // 多包裹确认发货 选择商品
  1388. moreSendChange(selection) {
  1389. let arr = [];
  1390. for(let j = 0,len = selection.length; j < len; j++){
  1391. console.log(selection[j].id);
  1392. arr.push(selection[j].id);
  1393. }
  1394. this.send_order_goods_ids = arr;
  1395. },
  1396. // 获取可选择的商品 多包裹发货
  1397. getSeparateSendOrderGoods(id) {
  1398. this.$http.post('{!! yzWebFullUrl('order.multiple-packages-order-goods.get-order-goods') !!}', {order_id:id}).then(function (response) {
  1399. if (response.data.result) {
  1400. this.order_goods_send_list = response.data.data;
  1401. // console.log(this.order_goods_send_list);
  1402. } else{
  1403. this.$message({type: 'error',message: response.data.msg});
  1404. }
  1405. },function (response) {
  1406. this.$message({type: 'error',message: response.data.msg});
  1407. });
  1408. },
  1409. //多包裹确认发货
  1410. confirmMoreSend() {
  1411. let json = {
  1412. dispatch_type_id:this.send.dispatch_type_id,
  1413. express_code:this.send.express_code,
  1414. express_sn:this.send.express_sn,
  1415. order_id:this.confirm_send_id,
  1416. order_goods_ids:this.send_order_goods_ids,
  1417. };
  1418. console.log(json);
  1419. if(this.send_order_goods_ids == undefined || this.send_order_goods_ids.length <= 0) {
  1420. this.$message.error("请选择分批发货订单商品!");
  1421. return;
  1422. }
  1423. if(json.express_sn == "") {
  1424. this.$message.error("快递单号不能为空!");
  1425. return;
  1426. }
  1427. let loading = this.$loading({target:document.querySelector("#separate-send"),background: 'rgba(0, 0, 0, 0)'});
  1428. this.$http.post('{!! yzWebFullUrl('order.vue-operation.separate-send') !!}',json).then(function (response) {
  1429. if (response.data.result) {
  1430. this.$message({type: 'success',message: '发货成功!'});
  1431. } else{
  1432. this.$message({type: 'error',message: response.data.msg});
  1433. }
  1434. loading.close();
  1435. this.more_send_show = false;
  1436. location.reload(); //刷新页面
  1437. },function (response) {
  1438. this.$message({type: 'error',message: response.data.msg});
  1439. loading.close();
  1440. this.more_send_show = false;
  1441. })
  1442. },
  1443. // 取消发货
  1444. cancelSend(id) {
  1445. this.cancel_send_show = true;
  1446. this.cancel_send_con = "";
  1447. this.cancel_send_id = id;
  1448. console.log(id)
  1449. },
  1450. // 确认取消发货
  1451. sureCancelSend() {
  1452. let json = {
  1453. // route:'order.operation.manualRefund',
  1454. order_id:this.cancel_send_id,
  1455. cancelreson:this.cancel_send_con,
  1456. };
  1457. console.log(json);
  1458. let loading = this.$loading({target:document.querySelector("#cancel-send"),background: 'rgba(0, 0, 0, 0)'});
  1459. this.$http.post('{!! yzWebFullUrl('order.vue-operation.cancel-send') !!}',json).then(function (response) {
  1460. if (response.data.result) {
  1461. this.$message({type: 'success',message: '取消发货成功!'});
  1462. } else {
  1463. this.$message({type: 'error',message: response.data.msg});
  1464. }
  1465. loading.close();
  1466. this.close_order_show = false;
  1467. location.reload(); //刷新页面
  1468. },function (response) {
  1469. this.$message({type: 'error',message: response.data.msg});
  1470. loading.close();
  1471. this.close_order_show = false;
  1472. })
  1473. },
  1474. // 确认收货
  1475. confirmReceive(id) {
  1476. this.$confirm('确认订单收货吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1477. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1478. this.$http.post('{!! yzWebFullUrl('order.vue-operation.receive') !!}',{order_id:id}).then(function (response) {
  1479. if (response.data.result) {
  1480. this.$message({type: 'success',message: '操作成功'});
  1481. } else{
  1482. this.$message({type: 'error',message: response.data.msg});
  1483. }
  1484. loading.close();
  1485. location.reload(); //刷新页面
  1486. },function (response) {
  1487. this.$message({type: 'error',message: response.data.msg});
  1488. loading.close();
  1489. }
  1490. );
  1491. }).catch(() => {
  1492. this.$message({type: 'info',message: '已取消操作'});
  1493. });
  1494. },
  1495. //显示订单地址修改记录
  1496. getUpdateIndex() {
  1497. this.modal_update_show = true;
  1498. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1499. this.$http.post('{!! yzWebFullUrl('order.address-update.index') !!}',{order_id:this.orderDetail.id}).then(function (response) {
  1500. if (response.data.result){
  1501. this.update_list = response.data.data;
  1502. loading.close();
  1503. } else {
  1504. this.$message({message: response.data.msg,type: 'error'});
  1505. }
  1506. loading.close();
  1507. },function (response) {
  1508. this.$message({message: response.data.msg,type: 'error'});
  1509. loading.close();
  1510. }
  1511. );
  1512. },
  1513. // 支付记录
  1514. getPayList() {
  1515. this.modal_pay_show = true;
  1516. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1517. this.$http.post('{!! yzWebFullUrl('order.orderPay.vue') !!}',{order_id:this.order_id}).then(function (response) {
  1518. if (response.data.result){
  1519. // console.log(response.data.data);
  1520. this.pay_list = response.data.data;
  1521. loading.close();
  1522. } else {
  1523. this.$message({message: response.data.msg,type: 'error'});
  1524. }
  1525. loading.close();
  1526. },function (response) {
  1527. this.$message({message: response.data.msg,type: 'error'});
  1528. loading.close();
  1529. }
  1530. );
  1531. },
  1532. //显示修改订单收货地址
  1533. showAddressUpdate() {
  1534. this.modal_order_address_show = true;
  1535. this.initProvince();
  1536. },
  1537. //修改订单收货地址
  1538. addressUpdate() {
  1539. let json = {
  1540. order_id:this.orderDetail.id,
  1541. realname:this.updateAddress.realname,
  1542. phone:this.updateAddress.phone,
  1543. address:this.updateAddress.address,
  1544. province_id: this.updateAddress.province_id ? this.updateAddress.province_id : 0,
  1545. city_id:this.updateAddress.city_id ? this.updateAddress.city_id : 0,
  1546. district_id :this.updateAddress.district_id ? this.updateAddress.district_id : 0,
  1547. street_id:this.updateAddress.street_id ? this.updateAddress.street_id : 0,
  1548. };
  1549. console.log(json);
  1550. let loading = this.$loading({target:document.querySelector("#update-address"),background: 'rgba(0, 0, 0, 0)'});
  1551. this.$http.post('{!! yzWebFullUrl('order.address-update.update') !!}',{data:json}).then(function (response) {
  1552. if (response.data.result) {
  1553. this.$message({type: 'success',message: '地址修改成功!'});
  1554. location.reload();
  1555. } else{
  1556. this.$message({type: 'error',message: response.data.msg});
  1557. }
  1558. loading.close();
  1559. this.modal_order_address_show = false;
  1560. },function (response) {
  1561. this.$message({type: 'error',message: response.data.msg});
  1562. loading.close();
  1563. this.modal_order_address_show = false;
  1564. })
  1565. },
  1566. //获取地址信息
  1567. initProvince(val) {
  1568. console.log(val);
  1569. this.areaLoading = true;
  1570. this.$http.get("{!! yzWebUrl('area.list.init', ['area_ids'=>'']) !!}"+val).then(response => {
  1571. this.province_list = response.data.data;
  1572. this.areaLoading = false;
  1573. }, response => {
  1574. this.areaLoading = false;
  1575. });
  1576. },
  1577. changeProvince(val) {
  1578. this.city_list = [];
  1579. this.district_list = [];
  1580. this.street_list = [];
  1581. // this.search_form.province_id = "";
  1582. this.updateAddress.city_id = "";
  1583. this.updateAddress.district_id = "";
  1584. this.updateAddress.street_id = "";
  1585. this.areaLoading = true;
  1586. let url = "<?php echo yzWebUrl('area.list', ['parent_id'=> '']); ?>" + val;
  1587. this.$http.get(url).then(response => {
  1588. if (response.data.data.length) {
  1589. this.city_list = response.data.data;
  1590. } else {
  1591. this.city_list = null;
  1592. }
  1593. this.areaLoading = false;
  1594. }, response => {
  1595. this.areaLoading = false;
  1596. });
  1597. },
  1598. // 市改变
  1599. changeCity(val) {
  1600. this.district_list = [];
  1601. this.street_list = [];
  1602. this.updateAddress.district_id = "";
  1603. this.updateAddress.street_id = "";
  1604. this.areaLoading = true;
  1605. let url = "<?php echo yzWebUrl('area.list', ['parent_id'=> '']); ?>" + val;
  1606. this.$http.get(url).then(response => {
  1607. if (response.data.data.length) {
  1608. this.district_list = response.data.data;
  1609. } else {
  1610. this.district_list = null;
  1611. }
  1612. this.areaLoading = false;
  1613. }, response => {
  1614. this.areaLoading = false;
  1615. });
  1616. },
  1617. // 区改变
  1618. changeDistrict(val) {
  1619. console.log(val)
  1620. this.street_list = [];
  1621. this.updateAddress.street_id = "";
  1622. this.areaLoading = true;
  1623. let url = "<?php echo yzWebUrl('area.list', ['parent_id'=> '']); ?>" + val;
  1624. this.$http.get(url).then(response => {
  1625. if (response.data.data.length) {
  1626. this.street_list = response.data.data;
  1627. } else {
  1628. this.street_list = null;
  1629. }
  1630. this.areaLoading = false;
  1631. }, response => {
  1632. this.areaLoading = false;
  1633. });
  1634. },
  1635. //保存商家备注
  1636. saveMerchantRemark() {
  1637. let json = {
  1638. order_id:this.orderDetail.id,
  1639. remark:this.form.merchant_remark,
  1640. };
  1641. console.log(json);
  1642. if (this.form.merchant_remark === '') {
  1643. this.$message({type: 'error',message: '商家备注不能为空'});
  1644. return false;
  1645. }
  1646. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1647. this.$http.post('{!! yzWebFullUrl('order.vue-operation.remarks') !!}',json).then(function (response) {
  1648. if (response.data.result) {
  1649. this.$message({type: 'success',message: '保存成功!'});
  1650. location.reload();
  1651. } else{
  1652. this.$message({type: 'error',message: response.data.msg});
  1653. }
  1654. loading.close();
  1655. },function (response) {
  1656. this.$message({type: 'error',message: response.data.msg});
  1657. loading.close();
  1658. })
  1659. },
  1660. //上传发票
  1661. saveInvoice() {
  1662. let json = {
  1663. order_id:this.orderDetail.id,
  1664. invoice:this.form.thumb,
  1665. };
  1666. console.log(json);
  1667. if (this.form.thumb_url == '' || this.form.thumb_url == '0') {
  1668. this.$message({type: 'error',message: '未找到上传图片!'});
  1669. return false;
  1670. }
  1671. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1672. this.$http.post('{!! yzWebFullUrl('order.vue-operation.invoice') !!}',json).then(function (response) {
  1673. if (response.data.result) {
  1674. this.$message({type: 'success',message: '保存成功!'});
  1675. location.reload();
  1676. } else{
  1677. this.$message({type: 'error',message: response.data.msg});
  1678. }
  1679. loading.close();
  1680. },function (response) {
  1681. this.$message({type: 'error',message: response.data.msg});
  1682. loading.close();
  1683. })
  1684. },
  1685. //查看物流信息
  1686. showDispatchInfo() {
  1687. this.modal_dispatch_info = true;
  1688. },
  1689. // 查看商品
  1690. getGoodDetail(item) {
  1691. console.log(item)
  1692. this.get_goods_show = true;
  1693. this.get_goods_list = [];
  1694. this.get_goods_list = item.goods || [];
  1695. },
  1696. gotoGoods(id) {
  1697. window.open(`{!! yzWebFullUrl('plugin.reserve-simple.admin.goods.edit') !!}`+`&id=`+id);
  1698. {{--window.location.href = `{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id;--}}
  1699. },
  1700. submitForm(formName) {
  1701. console.log(this.form);
  1702. let that = this;
  1703. let json = {
  1704. name:this.form.name,
  1705. alias:this.form.alias,
  1706. logo:this.form.logo,
  1707. is_recommend:this.form.is_recommend || 0,
  1708. desc:this.form.desc,
  1709. };
  1710. let json1 = {
  1711. brand:json
  1712. }
  1713. if(this.id) {
  1714. json1.id = this.id
  1715. }
  1716. this.$refs[formName].validate((valid) => {
  1717. if (valid) {
  1718. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1719. this.$http.post(this.submit_url,json1).then(response => {
  1720. if (response.data.result) {
  1721. this.$message({type: 'success',message: '操作成功!'});
  1722. this.goBack();
  1723. } else {
  1724. this.$message({message: response.data.msg,type: 'error'});
  1725. }
  1726. loading.close();
  1727. },response => {
  1728. loading.close();
  1729. });
  1730. }
  1731. else {
  1732. console.log('error submit!!');
  1733. return false;
  1734. }
  1735. });
  1736. },
  1737. clearImg(str,type,index) {
  1738. if(!type) {
  1739. this.form[str] = "";
  1740. this.form[str+'_url'] = "";
  1741. }
  1742. else {
  1743. this.form[str].splice(index,1);
  1744. this.form[str+'_url'].splice(index,1);
  1745. }
  1746. this.$forceUpdate();
  1747. },
  1748. goBack() {
  1749. history.go(-1)
  1750. },
  1751. openUpload(str) {
  1752. this.chooseImgName = str;
  1753. this.uploadShow = true;
  1754. },
  1755. changeProp(val) {
  1756. if(val == true) {
  1757. this.uploadShow = false;
  1758. }
  1759. else {
  1760. this.uploadShow = true;
  1761. }
  1762. },
  1763. sureImg(name,image,image_url) {
  1764. this.form[name] = image;
  1765. this.form[name+'_url'] = image_url;
  1766. let url = image_url.split('.')
  1767. console.log(url)
  1768. if(url[url.length-1] == 'pdf') {
  1769. this.is_pdf = true;
  1770. }
  1771. else {
  1772. this.is_pdf = false;
  1773. }
  1774. },
  1775. clearImg(str) {
  1776. this.form[str] = "";
  1777. this.form[str+'_url'] = "";
  1778. this.$forceUpdate();
  1779. },
  1780. goToDetail(plugin_id,id){
  1781. var url = '';
  1782. if(plugin_id == 0){
  1783. url= '{!! yzWebFullUrl('order.detail.vue-index') !!}&id='+id;
  1784. }
  1785. window.location = url;
  1786. },
  1787. },
  1788. })
  1789. </script>
  1790. @endsection