vue-detail.blade.php 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881
  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="orderDetail.has_many_order_goods !== undefined && orderDetail.has_many_order_goods.length > 0" class="vue-head">
  455. <div class="vue-main-title">
  456. <div class="vue-main-title-left"></div>
  457. <div class="vue-main-title-content">商品信息</div>
  458. </div>
  459. <div class="vue-main-form">
  460. <el-table :data="orderDetail.has_many_order_goods" style="width: 100%">
  461. <el-table-column prop="goods_id" label="商品ID" width="100" align="center"></el-table-column>
  462. <el-table-column prop="" label="商品" width="60" align="center">
  463. <template slot-scope="scope">
  464. <img :src="scope.row.thumb_src" style="width:50px;height:50px;">
  465. </template>
  466. </el-table-column>
  467. <el-table-column prop="down_time" label="" min-width="180" align="left">
  468. <template slot-scope="scope">
  469. <!-- <div class="list-con-goods-text" :style="{justifyContent:(scope.row.goods_option_title?'':'center')}"> -->
  470. <div class="list-con-goods-title"
  471. style="color:#29BA9C;cursor: pointer;"
  472. @click="gotoGoods(scope.row.goods_id)">
  473. [[scope.row.title]]
  474. </div>
  475. <div class="list-con-goods-option">规格: [[scope.row.goods_option_title]]</div>
  476. <div class="list-con-goods-option">数量: [[scope.row.total]]</div>
  477. <!-- </div> -->
  478. </template>
  479. </el-table-column>
  480. <el-table-column prop="down_time" label="商品价格" min-width="230" align="center">
  481. <template slot-scope="scope">
  482. <div>
  483. <div style="display:flex;justify-content: center;">
  484. <div style="flex:1;text-align:right">现价:</div>
  485. <div style="flex:1;text-align:left">¥[[scope.row.goods_price]]</div>
  486. </div>
  487. <div style="display:flex;justify-content: center;">
  488. <div style="flex:1;text-align:right">原价:</div>
  489. <div style="flex:1;text-align:left">¥[[scope.row.goods_market_price]]</div>
  490. </div>
  491. <div style="display:flex;justify-content: center;">
  492. <div style="flex:1;text-align:right">成本价:</div>
  493. <div style="flex:1;text-align:left">¥[[scope.row.goods_cost_price]]</div>
  494. </div>
  495. <div style="display:flex;justify-content: center;">
  496. <div style="flex:1;text-align:right">均摊支付:</div>
  497. <div style="flex:1;text-align:left">¥[[scope.row.payment_amount]]</div>
  498. </div>
  499. </div>
  500. </template>
  501. </el-table-column>
  502. <el-table-column prop="down_time" label="优惠均摊信息" min-width="243" align="center">
  503. <template slot-scope="scope">
  504. <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">
  505. <div style="display:flex;justify-content: center;">
  506. <div style="flex:1;text-align:right">[[goods_discount.name]]</div>
  507. <div style="flex:1;text-align:left">¥[[goods_discount.amount]]</div>
  508. </div>
  509. </div>
  510. </template>
  511. </el-table-column>
  512. <el-table-column prop="down_time" label="抵扣信息" min-width="180" align="center">
  513. <template slot-scope="scope">
  514. <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">
  515. <div style="display:flex;justify-content: center;">
  516. <div style="flex:1;text-align:right">[[goods_deduction.name]]</div>
  517. <div style="flex:1;text-align:left">¥[[goods_deduction.used_coin]]</div>
  518. </div>
  519. </div>
  520. </template>
  521. </el-table-column>
  522. {{--<el-table-column prop="down_time" label="手续费" min-width="180" align="center" class="edit-cell">--}}
  523. {{--<template slot-scope="scope">--}}
  524. {{--<div style="display:flex;justify-content: center;">--}}
  525. {{--<div style="flex:1;text-align:right">服务费:</div>--}}
  526. {{--<div style="flex:1;text-align:left">¥123.3333</div>--}}
  527. {{--</div>--}}
  528. {{--</template>--}}
  529. {{--</el-table-column>--}}
  530. </el-table>
  531. </div>
  532. </div>
  533. </el-form>
  534. <!-- 修改收货地址 -->
  535. <el-dialog :visible.sync="modal_order_address_show" width="900px" title="修改收货信息">
  536. <div style="overflow:auto">
  537. <div style="overflow:auto" id="update-address">
  538. <el-form ref="updateAddress" :model="updateAddress" label-width="15%">
  539. <el-form-item label="收件人" prop="">
  540. <el-input v-model="updateAddress.realname" placeholder="收件人姓名" style="width:70%"></el-input>
  541. </el-form-item>
  542. <el-form-item label="联系方式">
  543. <el-input v-model="updateAddress.phone" placeholder="收件人电话" style="width:70%"></el-input>
  544. </el-form-item>
  545. <el-form-item label="地址" v-loading="areaLoading">
  546. <el-select v-model="updateAddress.province_id" clearable placeholder="省" @change="changeProvince(updateAddress.province_id)" style="width:150px">
  547. <el-option v-for="(item,index) in province_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  548. </el-select>
  549. <el-select v-model="updateAddress.city_id" clearable placeholder="市" @change="changeCity(updateAddress.city_id)" style="width:150px">
  550. <el-option v-for="(item,index) in city_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  551. </el-select>
  552. <el-select v-model="updateAddress.district_id" clearable placeholder="区/县" @change="changeDistrict(updateAddress.district_id)" style="width:150px">
  553. <el-option v-for="(item,index) in district_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  554. </el-select>
  555. <el-select v-if="street == 1" v-model="updateAddress.street_id" clearable placeholder="街道/乡镇" style="width:150px">
  556. <el-option v-for="(item,index) in street_list" :key="index" :label="item.areaname" :value="item.id"></el-option>
  557. </el-select>
  558. </el-form-item>
  559. <el-form-item label="详细地址">
  560. <el-input v-model="updateAddress.address" placeholder="详细地址" style="width:70%"></el-input>
  561. </el-form-item>
  562. </el-form>
  563. </div>
  564. </div>
  565. <span slot="footer" class="dialog-footer">
  566. <el-button @click="modal_order_address_show = false">取 消</el-button>
  567. <el-button type="primary" @click="addressUpdate">确 认</el-button>
  568. </span>
  569. </el-dialog>
  570. <!-- 修改记录 -->
  571. <el-dialog :visible.sync="modal_update_show" width="900px" title="修改记录">
  572. <div style="overflow:auto">
  573. <el-table :data="update_list" style="width: 100%;height:500px;overflow:auto" id="update-list">
  574. <el-table-column label="修改时间" prop="created_at" align="center"></el-table-column>
  575. <el-table-column label="修改前收货信息" prop="" align="center">
  576. <template slot-scope="scope">
  577. <div> [[scope.row.old_name]]</div>
  578. <div> [[scope.row.old_phone]]</div>
  579. <div> [[scope.row.old_address]]</div>
  580. </template>
  581. </el-table-column>
  582. <el-table-column label="修改后收货信息" prop="" align="center">
  583. <template slot-scope="scope">
  584. <div> [[scope.row.realname]]</div>
  585. <div> [[scope.row.phone]]</div>
  586. <div> [[scope.row.new_address]]</div>
  587. </template>
  588. </el-table-column>
  589. </el-table>
  590. </div>
  591. <span slot="footer" class="dialog-footer">
  592. <el-button @click="modal_update_show = false">取 消</el-button>
  593. <!-- <el-button type="primary" @click="addressUpdate">确 认</el-button> -->
  594. </span>
  595. </el-dialog>
  596. <!-- 支付记录 -->
  597. <el-dialog :visible.sync="modal_pay_show" width="1100px" title="支付记录">
  598. <div style="overflow:auto">
  599. <el-table :data="pay_list" style="width: 100%;height:500px;overflow:auto" id="pay-list">
  600. <el-table-column label="ID" prop="id" align="center"></el-table-column>
  601. <el-table-column label="支付单号">
  602. <template slot-scope="scope">
  603. <a :href="'{{ yzWebUrl('orderPay.detail', array('order_pay_id' => '')) }}'+[[scope.row.id]]" target="_blank">
  604. [[scope.row.pay_sn]]
  605. </a>
  606. </template>
  607. </el-table-column>
  608. <el-table-column prop="amount" label="支付金额"></el-table-column>
  609. <el-table-column prop="status_name" label="状态"></el-table-column>
  610. <el-table-column prop="pay_type_name" label="支付方式"></el-table-column>
  611. <el-table-column prop="created_at" label="创建时间"></el-table-column>
  612. <el-table-column prop="pay_time" label="支付时间"></el-table-column>
  613. <el-table-column prop="refund_time" label="退款时间"></el-table-column>
  614. </el-table>
  615. </div>
  616. <span slot="footer" class="dialog-footer">
  617. <el-button @click="modal_pay_show = false">取 消</el-button>
  618. <!-- <el-button type="primary" @click="">确 认</el-button> -->
  619. </span>
  620. </el-dialog>
  621. <!-- 查看物流信息 -->
  622. <el-dialog :visible.sync="modal_dispatch_info" width="750px" center title="物流信息">
  623. <div style="height:400px;overflow:auto" id="dispatch-info">
  624. <!-- 多包裹 -->
  625. <div>
  626. <div style="display:flex;margin-bottom:15px;" v-for="(item3,index3) in dispatch">
  627. <div class="left" style="width:105px;margin-right:30px;text-align:right">
  628. 包裹[[index3 + 1]]信息
  629. </div>
  630. <div class="right" style="flex:1">
  631. <div>
  632. <div class="wl-img" style="width:70px;height:70px;position:relative;">
  633. <img :src="item3.thumb" style="width:100%;height:100%">
  634. <div style="line-height:18px;background:RGB(17, 9, 5,0.7);color:#fff;position:absolute;bottom:0;width:100%;text-align:center">
  635. 共[[item3.count]]件
  636. </div>
  637. <div @click="getGoodDetail(item3)" style="position:absolute;bottom:0;right:-80px;cursor: pointer;color:#ff9b19 ">
  638. 查看商品
  639. </div>
  640. </div>
  641. <div style="padding:5px 0">公司:[[item3.company_name]]</div>
  642. <div style="padding:5px 0">运单号:[[item3.express_sn]]</div>
  643. <template v-if="item3.data != null">
  644. <div style="padding:5px 0" v-for="(d1, k2) in item3.data" :key="k2">[[d1.time]] [[d1.context]]</div>
  645. </template>
  646. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  647. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  648. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  649. </div>
  650. </div>
  651. </div>
  652. </div>
  653. </div>
  654. <span slot="footer" class="dialog-footer">
  655. <el-button @click="modal_dispatch_info = false">关 闭</el-button>
  656. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  657. </span>
  658. </el-dialog>
  659. <!-- 取消发货 -->
  660. <el-dialog :visible.sync="cancel_send_show" width="750px" title="取消发货">
  661. <div style="height:300px;overflow:auto" id="cancel-send">
  662. <div style="color:#000;font-weight:500">取消发货原因</div>
  663. <el-input v-model="cancel_send_con" :rows="10" type="textarea"></el-input>
  664. </div>
  665. <span slot="footer" class="dialog-footer">
  666. <el-button @click="cancel_send_show = false">取 消</el-button>
  667. <el-button type="primary" @click="sureCancelSend">取消发货 </el-button>
  668. </span>
  669. </el-dialog>
  670. <!-- 确认发货 -->
  671. <el-dialog :visible.sync="confirm_send_show" width="750px" title="确认发货">
  672. <div style="height:400px;overflow:auto" id="confirm-send">
  673. <el-form ref="send" :model="send" :rules="send_rules" label-width="15%">
  674. <el-form-item label="收件人信息" prop="aggregation">
  675. <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
  676. <div>收货地址: [[address_info.address]]</div>
  677. </el-form-item>
  678. <el-form-item label="配送方式" prop="">
  679. <el-radio v-model="send.dispatch_type_id" :label="1">快递</el-radio>
  680. </el-form-item>
  681. <el-form-item label="快递公司">
  682. <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  683. <el-option label="其他快递" value=""></el-option>
  684. <el-option v-for="(item,index) in expressCompanies" :key="index" :label="item.name" :value="item.value"></el-option>
  685. </el-select>
  686. </el-form-item>
  687. <el-form-item label="快递单号" prop="">
  688. <el-input v-model="send.express_sn" style="width:70%;"></el-input>
  689. </el-form-item>
  690. </el-form>
  691. </div>
  692. <span slot="footer" class="dialog-footer">
  693. <el-button @click="confirm_send_show = false">取 消</el-button>
  694. <el-button type="primary" @click="sureconfirmSend">确认发货 </el-button>
  695. </span>
  696. </el-dialog>
  697. <!-- 多包裹确认发货 -->
  698. <el-dialog :visible.sync="more_send_show" width="750px" title="分批发货">
  699. <div id="separate-send">
  700. <el-form ref="send" :model="send" label-width="15%">
  701. <el-form-item label="收件人信息" prop="aggregation">
  702. <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
  703. <div>收货地址: [[address_info.address]]</div>
  704. </el-form-item>
  705. <el-form-item label="快递公司">
  706. <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  707. <el-option label="其他快递" value=""></el-option>
  708. <el-option v-for="(v1,k1) in expressCompanies" :key="k1" :label="v1.name" :value="v1.value"></el-option>
  709. </el-select>
  710. </el-form-item>
  711. <el-form-item label="快递单号" prop="">
  712. <el-input v-model="send.express_sn" style="width:70%;"></el-input>
  713. </el-form-item>
  714. </el-form>
  715. <el-table ref="multipleTable" :data="order_goods_send_list" tooltip-effect="dark" height="250" style="width: 100%" @selection-change="moreSendChange">
  716. <el-table-column type="selection" width="55"></el-table-column>
  717. <el-table-column width="550">
  718. <template slot-scope="scope">
  719. <div style="display:flex;width: 88%;">
  720. <div style="width:50px;height:50px">
  721. <img :src="scope.row.thumb" alt="" style="width:50px;height:50px">
  722. </div>
  723. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  724. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  725. <div style="color:#999">[[scope.row.goods_id]]</div>
  726. </div>
  727. </div>
  728. </template>
  729. </el-table-column>
  730. <el-table-column>
  731. <template slot-scope="scope">
  732. <div style="color:#999">[[scope.row.goods_option_title]]</div>
  733. </template>
  734. </el-table-column>
  735. </el-table>
  736. </div>
  737. <span slot="footer" class="dialog-footer">
  738. <el-button @click="more_send_show = false">取 消</el-button>
  739. <el-button type="primary" @click="confirmMoreSend()">确认发货 </el-button>
  740. </span>
  741. </el-dialog>
  742. <!-- 查看商品 -->
  743. <el-dialog :visible.sync="get_goods_show" width="750px" title="商品列表">
  744. <div id="separate-send">
  745. <el-table ref="multipleTable1" :data="get_goods_list" tooltip-effect="dark" height="550" style="width: 100%">
  746. <el-table-column width="550">
  747. <template slot-scope="scope">
  748. <div style="display:flex;width: 88%;">
  749. <div style="width:50px;height:50px">
  750. <img :src="scope.row.thumb" alt="" style="width:50px;height:50px">
  751. </div>
  752. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  753. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  754. <div style="color:#999">[[scope.row.goods_id]]</div>
  755. </div>
  756. </div>
  757. </template>
  758. </el-table-column>
  759. <el-table-column>
  760. <template slot-scope="scope">
  761. <div style="color:#999">[[scope.row.goods_option_title]]</div>
  762. </template>
  763. </el-table-column>
  764. </el-table>
  765. </div>
  766. <span slot="footer" class="dialog-footer">
  767. <el-button @click="get_goods_show = false">取 消</el-button>
  768. </span>
  769. </el-dialog>
  770. <!-- 驳回售后申请 -->
  771. <el-dialog :visible.sync="refund_reject_show" width="750px" title="驳回售后申请">
  772. <div style="height:300px;overflow:auto" id="refund-reject">
  773. <div style="color:#000;font-weight:500">驳回原因</div>
  774. <el-input v-model="refund_reject_reason" :rows="10" type="textarea"></el-input>
  775. </div>
  776. <span slot="footer" class="dialog-footer">
  777. <el-button @click="refund_reject_show = false">取 消</el-button>
  778. <el-button type="primary" @click="confirmRefundReject()">确 认</el-button>
  779. </span>
  780. </el-dialog>
  781. <!-- 通过申请 -->
  782. <el-dialog :visible.sync="refund_pass_show" width="650px" title="通过申请">
  783. <el-form ref="refund_pass_form" :model="refund_pass_form">
  784. <el-form-item label="">
  785. 退货地址:
  786. <el-select v-model="refund_pass_form.refund_address" clearable placeholder="请选择退货地址" style="width:150px">
  787. <el-option v-for="(vr, kr) in refund_pass_address" :label="vr.address_name" :key="kr" :value="vr.id">
  788. <span v-if="vr.is_default">[[vr.address_name]](默认地址)</span>
  789. </el-option>
  790. </el-select>
  791. </el-form-item>
  792. <el-form-item label="">
  793. 留言:
  794. <el-input v-model="refund_pass_form.message" :rows="8" type="textarea"></el-input>
  795. </el-form-item>
  796. </el-form>
  797. <span slot="footer" class="dialog-footer">
  798. <el-button @click="refund_pass_show = false">取 消</el-button>
  799. <el-button type="primary" @click="confirmRefundPass()">确 认</el-button>
  800. </span>
  801. </el-dialog>
  802. <!-- 换货确认发货 -->
  803. <el-dialog :visible.sync="refund_resend_show" width="650px" title="确认发货">
  804. <div style="height:350px;overflow:auto" id="refund-resend">
  805. <el-form ref="refund_resend" :model="refund_resend" label-width="15%">
  806. <el-form-item label="快递公司">
  807. <el-select v-model="refund_resend.express_code" clearable filterable placeholder="快递公司" style="width:70%;">
  808. <el-option label="其他快递" value="其他快递"></el-option>
  809. <el-option v-for="(vr1,kr1) in expressCompanies" :key="kr1" :label="vr1.name" :value="vr1.value"></el-option>
  810. </el-select>
  811. </el-form-item>
  812. <el-form-item label="快递单号" prop="">
  813. <el-input v-model="refund_resend.express_sn" style="width:70%;"></el-input>
  814. </el-form-item>
  815. </el-form>
  816. </div>
  817. <span slot="footer" class="dialog-footer">
  818. <el-button @click="refund_resend_show = false">取 消</el-button>
  819. <el-button type="primary" @click="confirmRefundResend()">确认发货 </el-button>
  820. </span>
  821. </el-dialog>
  822. <!-- 查看退货、换货物流信息 -->
  823. <el-dialog :visible.sync="modal_refund_logistics" width="750px" center title="查看售后物流信息">
  824. <div style="height:400px;overflow:auto" id="dispatch-info">
  825. <el-form label-width="15%">
  826. <el-form-item label="物流公司" prop="">
  827. [[refundLogistics.company_name]]
  828. </el-form-item>
  829. <el-form-item label="快递单号" prop="">
  830. <div style="display:inline-block;margin-right:20px">[[refundLogistics.express_sn]]</div>
  831. </el-form-item>
  832. <el-form-item label="物流情况" prop="">
  833. <template v-if="refundLogistics.data != null">
  834. <div v-for="(item3, k3) in refundLogistics.data" :key="k3">[[item3.time]] [[item3.context]]</div>
  835. </template>
  836. </el-form-item>
  837. </el-form>
  838. </div>
  839. <span slot="footer" class="dialog-footer">
  840. <el-button @click="modal_refund_logistics = false">关 闭</el-button>
  841. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  842. </span>
  843. </el-dialog>
  844. <!-- 修改退款金额 -->
  845. <el-dialog :visible.sync="refund_change_show" center width="500px" title="修改退款金额">
  846. <div style="height:350px;overflow:auto" id="refund-change">
  847. <div class="tip" style="color:#f00;margin:10px 0;">提示:修改后退款金额不能小于0元</div>
  848. <el-form label-width="15%">
  849. <el-form-item label="加或减" prop="refund_change_price">
  850. <el-input @input="inputPrice(refund_change_price)" v-model="refund_change_price" style="width:60%;"></el-input>
  851. </el-form-item>
  852. </el-form>
  853. <div style="display:inline-block;color:#000;margin-right:20px;font-weight:500;">
  854. <div style="display:flex;text-align:center;line-height:28px;align-items: center;">
  855. <div style="margin-right:15px">
  856. 原退款金额<br>
  857. ¥[[parseFloat(refund_price)]]
  858. </div>
  859. <div style="margin-right:15px">+</div>
  860. <div style="margin-right:15px">
  861. 价格修改<br>
  862. ¥[[(parseFloat(refund_change_price))]]
  863. </div>
  864. <div style="margin-right:15px">=</div>
  865. <div style="margin-right:15px">
  866. 退款金额<br>
  867. <strong style="color:#f00">¥[[parseFloat(parseFloat(refund_price)+(parseFloat(refund_change_price))).toFixed(2)]]</strong>
  868. </div>
  869. </div>
  870. </div>
  871. </div>
  872. <span slot="footer" class="dialog-footer">
  873. <el-button @click="refund_change_show = false">取 消</el-button>
  874. <el-button type="primary" @click="refundChangePrice()">确认修改 </el-button>
  875. </span>
  876. </el-dialog>
  877. {{--<div class="vue-page">--}}
  878. {{--<div class="vue-center">--}}
  879. {{--<el-button type="primary" @click="submitForm('form')">保存设置</el-button>--}}
  880. {{--<el-button @click="goBack">返回</el-button>--}}
  881. {{--</div>--}}
  882. {{--</div>--}}
  883. <upload-img :upload-show="uploadShow" :name="chooseImgName" @replace="changeProp" @sure="sureImg"></upload-img>
  884. </div>
  885. </div>
  886. <script src="{{resource_get('static/yunshop/tinymce4.7.5/tinymce.min.js')}}"></script>
  887. <!-- <script src="{{resource_get('static/yunshop/tinymceTemplate.js')}}"></script> -->
  888. @include('public.admin.tinymceee')
  889. <!-- @include('public.admin.uploadImg') -->
  890. @include('public.admin.uploadfile')
  891. <script>
  892. var app = new Vue({
  893. el:"#app",
  894. delimiters: ['[[', ']]'],
  895. name: 'test',
  896. data() {
  897. return{
  898. is_pdf:false,
  899. street: '{!! \Setting::get("shop.trade")['is_street'] !!}',
  900. id:0,
  901. getDataUrl: '{!! yzWebFullUrl('plugin.deposit-ladder.backend.store.detail.get-data') !!}',//获取订单数据链接
  902. order_id:0,
  903. orderDetail:{},
  904. yz_member:{},
  905. div_from:{},
  906. refundApply:{}, //退款信息
  907. refund_change_price:0,
  908. refund_price:0,
  909. refund_change_show:false, //修改退款金额
  910. refundLogistics:{}, //退款物流信息
  911. modal_refund_logistics: false,
  912. dispatch:{}, //订单物流信息
  913. modal_dispatch_info: false,
  914. form:{
  915. merchant_remark:'',//商家备注
  916. thumb_url:'',//发票地址
  917. thumb:'',//发票地址
  918. },
  919. uploadShow:false,
  920. chooseImgName:'',
  921. submit_url:'',
  922. showVisible:false,
  923. loading: false,
  924. uploadImg1:'',
  925. // 修改收货信息
  926. province_list:[],
  927. city_list:[],
  928. district_list:[],
  929. street_list:[],
  930. modal_order_address_show:false,
  931. updateAddress:{
  932. street_id:'',
  933. city_id:"",
  934. },
  935. // 地址修改记录
  936. modal_update_show:false,
  937. update_list:[],
  938. areaLoading:false,
  939. // 支付记录
  940. modal_pay_show:false,
  941. pay_list:[],
  942. cancel_send_show:false,// 取消发货弹窗
  943. cancel_send_con:"",//取消发货原因
  944. cancel_send_id:'',
  945. confirm_send_show:false,// 确认发货弹窗
  946. confirm_send_id:"",
  947. send:{
  948. dispatch_type_id:1,
  949. express_code:"",
  950. express_sn:"",
  951. },
  952. send_rules:{},
  953. address_info:{},
  954. expressCompanies:[],//快递公司
  955. //退款申请拒绝
  956. refund_reject_show: false,
  957. refund_reject_reason:'',
  958. //通过退款申请
  959. refund_pass_show: false,
  960. refund_pass_address: [],
  961. refund_pass_form:{},
  962. //换货确认发货
  963. refund_resend_show:false,
  964. refund_resend:{
  965. express_code:"",
  966. express_sn:"",
  967. },
  968. // 多包裹发货
  969. more_send_show:false,
  970. order_goods_send_list:[],
  971. send_order_goods_ids:[],
  972. // 查看商品
  973. get_goods_show:false,
  974. get_goods_list:[],
  975. }
  976. },
  977. created() {
  978. let result = this.viewReturn();
  979. this.__initial(result);
  980. },
  981. mounted() {
  982. if(this.id) {
  983. this.getData();
  984. }
  985. },
  986. methods: {
  987. //视图返回数据
  988. viewReturn() {
  989. return {!! $data?:'{}' !!};
  990. },
  991. //初始化页面数据,请求链接
  992. __initial(data) {
  993. if (data.requestInputs.id) {
  994. this.id = data.requestInputs.id;
  995. }
  996. console.log(data);
  997. },
  998. getData() {
  999. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1000. this.$http.post(this.getDataUrl,{id:this.id}).then(function (response) {
  1001. if (response.data.result){
  1002. this.orderDetail = response.data.data.order;
  1003. this.order_id = response.data.data.order.id;
  1004. this.yz_member = response.data.data.yz_member;
  1005. this.div_from = response.data.data.div_from;
  1006. this.refundApply = response.data.data.refundApply;
  1007. if (this.refundApply) {
  1008. this.refund_price = this.refundApply.price;
  1009. }
  1010. // console.log(this.refundApply != null && Object.keys(this.refundApply).length > 0);
  1011. //console.log(this.refundApply);
  1012. if (response.data.data.dispatch) {
  1013. this.dispatch = response.data.data.dispatch;
  1014. }
  1015. this.expressCompanies = response.data.data.expressCompanies;
  1016. if (response.data.data.order.has_one_order_remark) {
  1017. this.form.merchant_remark = response.data.data.order.has_one_order_remark.remark;
  1018. }
  1019. if (response.data.data.order.invoice) {
  1020. this.form.thumb_url = response.data.data.order.invoice;
  1021. this.form.thumb = response.data.data.order.invoice;
  1022. let url = this.form.thumb_url.split('.')
  1023. console.log(url)
  1024. if(url[url.length-1] == 'pdf') {
  1025. this.is_pdf = true;
  1026. }
  1027. else {
  1028. this.is_pdf = false;
  1029. }
  1030. }
  1031. loading.close();
  1032. } else {
  1033. this.$message({message: response.data.msg,type: 'error'});
  1034. }
  1035. loading.close();
  1036. },function (response) {
  1037. this.$message({message: response.data.msg,type: 'error'});
  1038. loading.close();
  1039. }
  1040. );
  1041. },
  1042. //显示退款物流信息
  1043. selectRefundLogistics(value) {
  1044. console.log(value);
  1045. this.modal_refund_logistics = true;
  1046. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1047. this.$http.post('{!! yzWebFullUrl('order.detail.refund-express') !!}',{order_id:this.order_id,refund_value:value}).then(function (response) {
  1048. if (response.data.result){
  1049. // console.log(response.data.data);
  1050. this.refundLogistics = response.data.data;
  1051. loading.close();
  1052. } else {
  1053. this.$message({message: response.data.msg,type: 'error'});
  1054. }
  1055. loading.close();
  1056. },function (response) {
  1057. this.$message({message: response.data.msg,type: 'error'});
  1058. loading.close();
  1059. }
  1060. );
  1061. },
  1062. //退款操作
  1063. refundConfirm(operationType) {
  1064. console.log(operationType);
  1065. if (operationType == -1) {
  1066. return this.refundReject();
  1067. } else if (operationType == 1) {
  1068. return this.refundPay();
  1069. } else if (operationType == 2) {
  1070. return this.refundConsensus()
  1071. } else if (operationType == 3) {
  1072. return this.refundPass()
  1073. } else if (operationType == 5) {
  1074. return this.refundResend()
  1075. } else if (operationType == 10) {
  1076. return this.refundClose()
  1077. }
  1078. this.$message.error(operationType + "操作方式不存在!");
  1079. },
  1080. //正则过滤掉除\-\.0-9以外的字符,不会写
  1081. inputPrice(refund_change_price) {
  1082. },
  1083. //确认修改退款金额
  1084. refundChangePrice() {
  1085. if(this.refund_change_price === '') {
  1086. this.$message.error("修改金额不能为空!");
  1087. return false;
  1088. }
  1089. // if((parseFloat(this.refundApply.price) + parseFloat(this.refund_change_price)) < 1) {
  1090. // this.$message.error("退款金额不能必须大于0!");
  1091. // return false;
  1092. // }
  1093. let json = {
  1094. 'order_id':this.id,
  1095. 'refund_id':this.refundApply.id,
  1096. 'change_price':this.refund_change_price,
  1097. };
  1098. let loading = this.$loading({target:document.querySelector("#refund-change"),background: 'rgba(0, 0, 0, 0)'});
  1099. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.change-price') !!}',json).then(function (response) {
  1100. if (response.data.result) {
  1101. this.$message({type: 'success',message: '操作成功!'});
  1102. } else{
  1103. this.$message({type: 'error',message: response.data.msg});
  1104. }
  1105. loading.close();
  1106. this.refund_change_show = false;
  1107. this.getData(); //重新获取数据刷新页面
  1108. },function (response) {
  1109. this.$message({type: 'error',message: response.data.msg});
  1110. loading.close();
  1111. this.refund_change_show = false;
  1112. });
  1113. },
  1114. //同意退款
  1115. refundPay() {
  1116. this.$confirm('是否同意此订单退款?', '提示', {confirmButtonText: '同意',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1117. let url = '{!! yzWebFullUrl('refund.pay.index') !!}'
  1118. url += '&refund_id=' + this.refundApply.id;
  1119. window.location.href = url;
  1120. {{--let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});--}}
  1121. {{--this.$http.post('{!! yzWebFullUrl('refund.vue-operation.pay') !!}',{refund_id:this.refundApply.id}).then(function (response) {--}}
  1122. {{--if (response.data.result) {--}}
  1123. {{--this.$message({type: 'success',message: '操作成功'});--}}
  1124. {{--} else{--}}
  1125. {{--this.$message({type: 'error',message: response.data.msg});--}}
  1126. {{--}--}}
  1127. {{--loading.close();--}}
  1128. {{--this.getData(); //重新获取数据刷新页面--}}
  1129. {{--},function (response) {--}}
  1130. {{--this.$message({type: 'error',message: response.data.msg});--}}
  1131. {{--loading.close();--}}
  1132. {{--}--}}
  1133. {{--);--}}
  1134. }).catch(() => {
  1135. this.$message({type: 'info',message: '已取消操作'});
  1136. });
  1137. },
  1138. //手动退款
  1139. refundConsensus() {
  1140. this.$confirm('确认此订单手动退款完成吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1141. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1142. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.consensus') !!}',{refund_id:this.refundApply.id}).then(function (response) {
  1143. if (response.data.result) {
  1144. this.$message({type: 'success',message: '操作成功'});
  1145. } else{
  1146. this.$message({type: 'error',message: response.data.msg});
  1147. }
  1148. loading.close();
  1149. this.getData(); //重新获取数据刷新页面
  1150. },function (response) {
  1151. this.$message({type: 'error',message: response.data.msg});
  1152. loading.close();
  1153. }
  1154. );
  1155. }).catch(() => {
  1156. this.$message({type: 'info',message: '已取消操作'});
  1157. });
  1158. },
  1159. //通过申请
  1160. refundPass() {
  1161. this.refund_pass_show = true;
  1162. this.getRefundAddress();
  1163. },
  1164. //通过申请
  1165. confirmRefundPass() {
  1166. if(!this.refund_pass_form.refund_address) {
  1167. this.$message.error("请选择退货地址!");
  1168. return false;
  1169. }
  1170. let json = {
  1171. 'refund_id':this.refundApply.id,
  1172. 'message':this.refund_pass_form.message,
  1173. 'refund_address': this.refund_pass_form.refund_address,
  1174. };
  1175. let loading = this.$loading({target:document.querySelector("#refund-pass"),background: 'rgba(0, 0, 0, 0)'});
  1176. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.pass') !!}',json).then(function (response) {
  1177. if (response.data.result) {
  1178. this.$message({type: 'success',message: '操作成功!'});
  1179. } else{
  1180. this.$message({type: 'error',message: response.data.msg});
  1181. }
  1182. loading.close();
  1183. this.refund_pass_show = false;
  1184. this.getData(); //重新获取数据刷新页面
  1185. },function (response) {
  1186. this.$message({type: 'error',message: response.data.msg});
  1187. loading.close();
  1188. this.refund_pass_show = false;
  1189. });
  1190. },
  1191. //获取退款地址
  1192. getRefundAddress() {
  1193. this.$http.post('{!! yzWebFullUrl('goods.return-address.ajax-all-address') !!}').then(function (response) {
  1194. if (response.data.result) {
  1195. this.refund_pass_address = response.data.data;
  1196. console.log(this.refund_pass_address);
  1197. } else{
  1198. this.$message({type: 'error',message: response.data.msg});
  1199. }
  1200. },function (response) {
  1201. this.$message({type: 'error',message: response.data.msg});
  1202. });
  1203. },
  1204. //换货确认发货
  1205. refundResend() {
  1206. this.refund_resend_show = true;
  1207. },
  1208. //换货确认发货
  1209. confirmRefundResend() {
  1210. let json = {
  1211. refund_id:this.refundApply.id,
  1212. express_code:this.refund_resend.express_code,
  1213. express_company_name:this.refund_resend.express_code,
  1214. express_sn:this.refund_resend.express_sn,
  1215. };
  1216. let loading = this.$loading({target:document.querySelector("#refund-pass"),background: 'rgba(0, 0, 0, 0)'});
  1217. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.resend') !!}',json).then(function (response) {
  1218. if (response.data.result) {
  1219. this.$message({type: 'success',message: '操作成功!'});
  1220. } else{
  1221. this.$message({type: 'error',message: response.data.msg});
  1222. }
  1223. loading.close();
  1224. this.refund_resend_show = false;
  1225. this.getData(); //重新获取数据刷新页面
  1226. },function (response) {
  1227. this.$message({type: 'error',message: response.data.msg});
  1228. loading.close();
  1229. this.refund_resend_show = false;
  1230. });
  1231. },
  1232. //换货完成关闭申请
  1233. refundClose() {
  1234. this.$confirm('确认此订单换货完成吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1235. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1236. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.close') !!}',{refund_id:this.refundApply.id}).then(function (response) {
  1237. if (response.data.result) {
  1238. this.$message({type: 'success',message: '操作成功'});
  1239. } else{
  1240. this.$message({type: 'error',message: response.data.msg});
  1241. }
  1242. loading.close();
  1243. this.getData(); //重新获取数据刷新页面
  1244. },function (response) {
  1245. this.$message({type: 'error',message: response.data.msg});
  1246. loading.close();
  1247. }
  1248. );
  1249. }).catch(() => {
  1250. this.$message({type: 'info',message: '已取消操作'});
  1251. });
  1252. },
  1253. //驳回退款申请
  1254. refundReject() {
  1255. this.refund_reject_show = true;
  1256. this.refund_reject_reason = "";
  1257. },
  1258. //驳回退款申请
  1259. confirmRefundReject() {
  1260. let json = {
  1261. 'refund_id':this.refundApply.id,
  1262. 'reject_reason':this.refund_reject_reason,
  1263. };
  1264. let loading = this.$loading({target:document.querySelector("#refund-reject"),background: 'rgba(0, 0, 0, 0)'});
  1265. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.reject') !!}',json).then(function (response) {
  1266. if (response.data.result) {
  1267. this.$message({type: 'success',message: '操作成功!'});
  1268. }
  1269. else{
  1270. this.$message({type: 'error',message: response.data.msg});
  1271. }
  1272. loading.close();
  1273. this.refund_reject_show = false;
  1274. this.getData(); //重新获取数据刷新页面
  1275. },function (response) {
  1276. this.$message({type: 'error',message: response.data.msg});
  1277. loading.close();
  1278. this.refund_reject_show = false;
  1279. });
  1280. },
  1281. //订单操作
  1282. orderConfirm(operationType, order) {
  1283. console.log(operationType);
  1284. if (operationType == 1) {
  1285. this.confirmPay(order.id);
  1286. } else if (operationType == 2) {
  1287. this.confirmSend(order.id, order);
  1288. } else if (operationType == 3) {
  1289. this.confirmReceive(order.id);
  1290. } else if (operationType == 'cancel_send') {
  1291. this.cancelSend(order.id);
  1292. } else if (operationType == 'separate_send') {
  1293. this.separateSend(order.id, order);
  1294. }
  1295. },
  1296. // 确认付款
  1297. confirmPay(id) {
  1298. this.$confirm('确认此订单已付款吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1299. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1300. this.$http.post('{!! yzWebFullUrl('order.vue-operation.pay') !!}',{order_id:id}).then(function (response) {
  1301. if (response.data.result) {
  1302. this.$message({type: 'success',message: '操作成功'});
  1303. } else{
  1304. this.$message({type: 'error',message: response.data.msg});
  1305. }
  1306. loading.close();
  1307. location.reload(); //刷新页面
  1308. },function (response) {
  1309. this.$message({type: 'error',message: response.data.msg});
  1310. loading.close();
  1311. }
  1312. );
  1313. }).catch(() => {
  1314. this.$message({type: 'info',message: '已取消操作'});
  1315. });
  1316. },
  1317. // 确认发货
  1318. confirmSend(id,item) {
  1319. this.confirm_send_show = true;
  1320. this.send = {
  1321. dispatch_type_id :1,
  1322. express_code:"",
  1323. express_sn:""
  1324. };
  1325. this.confirm_send_id = id;
  1326. this.address_info = item.address;
  1327. },
  1328. //确认发货
  1329. sureconfirmSend() {
  1330. let json = {
  1331. dispatch_type_id:this.send.dispatch_type_id,
  1332. express_code:this.send.express_code,
  1333. express_sn:this.send.express_sn,
  1334. order_id:this.confirm_send_id,
  1335. };
  1336. console.log(json);
  1337. // if(this.send.express_sn == "") {
  1338. // this.$message.error("快递单号不能为空!");
  1339. // return;
  1340. // }
  1341. let loading = this.$loading({target:document.querySelector("#confirm-send"),background: 'rgba(0, 0, 0, 0)'});
  1342. this.$http.post('{!! yzWebFullUrl('order.vue-operation.send') !!}',json).then(function (response) {
  1343. if (response.data.result) {
  1344. this.$message({type: 'success',message: '确认发货成功!'});
  1345. } else{
  1346. this.$message({type: 'error',message: response.data.msg});
  1347. }
  1348. loading.close();
  1349. this.confirm_send_show = false;
  1350. location.reload(); //刷新页面
  1351. },function (response) {
  1352. this.$message({type: 'error',message: response.data.msg});
  1353. loading.close();
  1354. this.confirm_send_show = false;
  1355. })
  1356. },
  1357. //多包裹发货
  1358. separateSend(id,item) {
  1359. this.more_send_show = true;
  1360. this.confirm_send_id = id;
  1361. this.send = {
  1362. dispatch_type_id :1,
  1363. express_code:"",
  1364. express_sn:"",
  1365. };
  1366. this.address_info = item.address;
  1367. this.getSeparateSendOrderGoods(id);
  1368. },
  1369. // 多包裹确认发货 选择商品
  1370. moreSendChange(selection) {
  1371. let arr = [];
  1372. for(let j = 0,len = selection.length; j < len; j++){
  1373. console.log(selection[j].id);
  1374. arr.push(selection[j].id);
  1375. }
  1376. this.send_order_goods_ids = arr;
  1377. },
  1378. // 获取可选择的商品 多包裹发货
  1379. getSeparateSendOrderGoods(id) {
  1380. this.$http.post('{!! yzWebFullUrl('order.multiple-packages-order-goods.get-order-goods') !!}', {order_id:id}).then(function (response) {
  1381. if (response.data.result) {
  1382. this.order_goods_send_list = response.data.data;
  1383. // console.log(this.order_goods_send_list);
  1384. } else{
  1385. this.$message({type: 'error',message: response.data.msg});
  1386. }
  1387. },function (response) {
  1388. this.$message({type: 'error',message: response.data.msg});
  1389. });
  1390. },
  1391. //多包裹确认发货
  1392. confirmMoreSend() {
  1393. let json = {
  1394. dispatch_type_id:this.send.dispatch_type_id,
  1395. express_code:this.send.express_code,
  1396. express_sn:this.send.express_sn,
  1397. order_id:this.confirm_send_id,
  1398. order_goods_ids:this.send_order_goods_ids,
  1399. };
  1400. console.log(json);
  1401. if(this.send_order_goods_ids == undefined || this.send_order_goods_ids.length <= 0) {
  1402. this.$message.error("请选择分批发货订单商品!");
  1403. return;
  1404. }
  1405. if(json.express_sn == "") {
  1406. this.$message.error("快递单号不能为空!");
  1407. return;
  1408. }
  1409. let loading = this.$loading({target:document.querySelector("#separate-send"),background: 'rgba(0, 0, 0, 0)'});
  1410. this.$http.post('{!! yzWebFullUrl('order.vue-operation.separate-send') !!}',json).then(function (response) {
  1411. if (response.data.result) {
  1412. this.$message({type: 'success',message: '发货成功!'});
  1413. } else{
  1414. this.$message({type: 'error',message: response.data.msg});
  1415. }
  1416. loading.close();
  1417. this.more_send_show = false;
  1418. location.reload(); //刷新页面
  1419. },function (response) {
  1420. this.$message({type: 'error',message: response.data.msg});
  1421. loading.close();
  1422. this.more_send_show = false;
  1423. })
  1424. },
  1425. // 取消发货
  1426. cancelSend(id) {
  1427. this.cancel_send_show = true;
  1428. this.cancel_send_con = "";
  1429. this.cancel_send_id = id;
  1430. console.log(id)
  1431. },
  1432. // 确认取消发货
  1433. sureCancelSend() {
  1434. let json = {
  1435. // route:'order.operation.manualRefund',
  1436. order_id:this.cancel_send_id,
  1437. cancelreson:this.cancel_send_con,
  1438. };
  1439. console.log(json);
  1440. let loading = this.$loading({target:document.querySelector("#cancel-send"),background: 'rgba(0, 0, 0, 0)'});
  1441. this.$http.post('{!! yzWebFullUrl('order.vue-operation.cancel-send') !!}',json).then(function (response) {
  1442. if (response.data.result) {
  1443. this.$message({type: 'success',message: '取消发货成功!'});
  1444. } else {
  1445. this.$message({type: 'error',message: response.data.msg});
  1446. }
  1447. loading.close();
  1448. this.close_order_show = false;
  1449. location.reload(); //刷新页面
  1450. },function (response) {
  1451. this.$message({type: 'error',message: response.data.msg});
  1452. loading.close();
  1453. this.close_order_show = false;
  1454. })
  1455. },
  1456. // 确认收货
  1457. confirmReceive(id) {
  1458. this.$confirm('确认订单收货吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  1459. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1460. this.$http.post('{!! yzWebFullUrl('order.vue-operation.receive') !!}',{order_id:id}).then(function (response) {
  1461. if (response.data.result) {
  1462. this.$message({type: 'success',message: '操作成功'});
  1463. } else{
  1464. this.$message({type: 'error',message: response.data.msg});
  1465. }
  1466. loading.close();
  1467. location.reload(); //刷新页面
  1468. },function (response) {
  1469. this.$message({type: 'error',message: response.data.msg});
  1470. loading.close();
  1471. }
  1472. );
  1473. }).catch(() => {
  1474. this.$message({type: 'info',message: '已取消操作'});
  1475. });
  1476. },
  1477. //显示订单地址修改记录
  1478. getUpdateIndex() {
  1479. this.modal_update_show = true;
  1480. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1481. this.$http.post('{!! yzWebFullUrl('order.address-update.index') !!}',{order_id:this.orderDetail.id}).then(function (response) {
  1482. if (response.data.result){
  1483. this.update_list = response.data.data;
  1484. loading.close();
  1485. } else {
  1486. this.$message({message: response.data.msg,type: 'error'});
  1487. }
  1488. loading.close();
  1489. },function (response) {
  1490. this.$message({message: response.data.msg,type: 'error'});
  1491. loading.close();
  1492. }
  1493. );
  1494. },
  1495. // 支付记录
  1496. getPayList() {
  1497. this.modal_pay_show = true;
  1498. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  1499. this.$http.post('{!! yzWebFullUrl('order.orderPay.vue') !!}',{order_id:this.order_id}).then(function (response) {
  1500. if (response.data.result){
  1501. // console.log(response.data.data);
  1502. this.pay_list = response.data.data;
  1503. loading.close();
  1504. } else {
  1505. this.$message({message: response.data.msg,type: 'error'});
  1506. }
  1507. loading.close();
  1508. },function (response) {
  1509. this.$message({message: response.data.msg,type: 'error'});
  1510. loading.close();
  1511. }
  1512. );
  1513. },
  1514. //显示修改订单收货地址
  1515. showAddressUpdate() {
  1516. this.modal_order_address_show = true;
  1517. this.initProvince();
  1518. },
  1519. //修改订单收货地址
  1520. addressUpdate() {
  1521. let json = {
  1522. order_id:this.orderDetail.id,
  1523. realname:this.updateAddress.realname,
  1524. phone:this.updateAddress.phone,
  1525. address:this.updateAddress.address,
  1526. province_id: this.updateAddress.province_id ? this.updateAddress.province_id : 0,
  1527. city_id:this.updateAddress.city_id ? this.updateAddress.city_id : 0,
  1528. district_id :this.updateAddress.district_id ? this.updateAddress.district_id : 0,
  1529. street_id:this.updateAddress.street_id ? this.updateAddress.street_id : 0,
  1530. };
  1531. console.log(json);
  1532. let loading = this.$loading({target:document.querySelector("#update-address"),background: 'rgba(0, 0, 0, 0)'});
  1533. this.$http.post('{!! yzWebFullUrl('order.address-update.update') !!}',{data:json}).then(function (response) {
  1534. if (response.data.result) {
  1535. this.$message({type: 'success',message: '地址修改成功!'});
  1536. location.reload();
  1537. } else{
  1538. this.$message({type: 'error',message: response.data.msg});
  1539. }
  1540. loading.close();
  1541. this.modal_order_address_show = false;
  1542. },function (response) {
  1543. this.$message({type: 'error',message: response.data.msg});
  1544. loading.close();
  1545. this.modal_order_address_show = false;
  1546. })
  1547. },
  1548. //获取地址信息
  1549. initProvince(val) {
  1550. console.log(val);
  1551. this.areaLoading = true;
  1552. this.$http.get("{!! yzWebUrl('area.list.init', ['area_ids'=>'']) !!}"+val).then(response => {
  1553. this.province_list = response.data.data;
  1554. this.areaLoading = false;
  1555. }, response => {
  1556. this.areaLoading = false;
  1557. });
  1558. },
  1559. changeProvince(val) {
  1560. this.city_list = [];
  1561. this.district_list = [];
  1562. this.street_list = [];
  1563. // this.search_form.province_id = "";
  1564. this.updateAddress.city_id = "";
  1565. this.updateAddress.district_id = "";
  1566. this.updateAddress.street_id = "";
  1567. this.areaLoading = true;
  1568. let url = "<?php echo yzWebUrl('area.list', ['parent_id'=> '']); ?>" + val;
  1569. this.$http.get(url).then(response => {
  1570. if (response.data.data.length) {
  1571. this.city_list = response.data.data;
  1572. } else {
  1573. this.city_list = null;
  1574. }
  1575. this.areaLoading = false;
  1576. }, response => {
  1577. this.areaLoading = false;
  1578. });
  1579. },
  1580. // 市改变
  1581. changeCity(val) {
  1582. this.district_list = [];
  1583. this.street_list = [];
  1584. this.updateAddress.district_id = "";
  1585. this.updateAddress.street_id = "";
  1586. this.areaLoading = true;
  1587. let url = "<?php echo yzWebUrl('area.list', ['parent_id'=> '']); ?>" + val;
  1588. this.$http.get(url).then(response => {
  1589. if (response.data.data.length) {
  1590. this.district_list = response.data.data;
  1591. } else {
  1592. this.district_list = null;
  1593. }
  1594. this.areaLoading = false;
  1595. }, response => {
  1596. this.areaLoading = false;
  1597. });
  1598. },
  1599. // 区改变
  1600. changeDistrict(val) {
  1601. console.log(val)
  1602. this.street_list = [];
  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.street_list = response.data.data;
  1609. } else {
  1610. this.street_list = null;
  1611. }
  1612. this.areaLoading = false;
  1613. }, response => {
  1614. this.areaLoading = false;
  1615. });
  1616. },
  1617. //保存商家备注
  1618. saveMerchantRemark() {
  1619. let json = {
  1620. order_id:this.orderDetail.id,
  1621. remark:this.form.merchant_remark,
  1622. };
  1623. console.log(json);
  1624. if (this.form.merchant_remark === '') {
  1625. this.$message({type: 'error',message: '商家备注不能为空'});
  1626. return false;
  1627. }
  1628. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1629. this.$http.post('{!! yzWebFullUrl('order.vue-operation.remarks') !!}',json).then(function (response) {
  1630. if (response.data.result) {
  1631. this.$message({type: 'success',message: '保存成功!'});
  1632. location.reload();
  1633. } else{
  1634. this.$message({type: 'error',message: response.data.msg});
  1635. }
  1636. loading.close();
  1637. },function (response) {
  1638. this.$message({type: 'error',message: response.data.msg});
  1639. loading.close();
  1640. })
  1641. },
  1642. //上传发票
  1643. saveInvoice() {
  1644. let json = {
  1645. order_id:this.orderDetail.id,
  1646. invoice:this.form.thumb,
  1647. };
  1648. console.log(json);
  1649. if (this.form.thumb_url == '' || this.form.thumb_url == '0') {
  1650. this.$message({type: 'error',message: '未找到上传图片!'});
  1651. return false;
  1652. }
  1653. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1654. this.$http.post('{!! yzWebFullUrl('order.vue-operation.invoice') !!}',json).then(function (response) {
  1655. if (response.data.result) {
  1656. this.$message({type: 'success',message: '保存成功!'});
  1657. location.reload();
  1658. } else{
  1659. this.$message({type: 'error',message: response.data.msg});
  1660. }
  1661. loading.close();
  1662. },function (response) {
  1663. this.$message({type: 'error',message: response.data.msg});
  1664. loading.close();
  1665. })
  1666. },
  1667. //查看物流信息
  1668. showDispatchInfo() {
  1669. this.modal_dispatch_info = true;
  1670. },
  1671. // 查看商品
  1672. getGoodDetail(item) {
  1673. console.log(item)
  1674. this.get_goods_show = true;
  1675. this.get_goods_list = [];
  1676. this.get_goods_list = item.goods || [];
  1677. },
  1678. gotoGoods(id) {
  1679. window.open(`{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id);
  1680. {{--window.location.href = `{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id;--}}
  1681. },
  1682. submitForm(formName) {
  1683. console.log(this.form);
  1684. let that = this;
  1685. let json = {
  1686. name:this.form.name,
  1687. alias:this.form.alias,
  1688. logo:this.form.logo,
  1689. is_recommend:this.form.is_recommend || 0,
  1690. desc:this.form.desc,
  1691. };
  1692. let json1 = {
  1693. brand:json
  1694. }
  1695. if(this.id) {
  1696. json1.id = this.id
  1697. }
  1698. this.$refs[formName].validate((valid) => {
  1699. if (valid) {
  1700. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  1701. this.$http.post(this.submit_url,json1).then(response => {
  1702. if (response.data.result) {
  1703. this.$message({type: 'success',message: '操作成功!'});
  1704. this.goBack();
  1705. } else {
  1706. this.$message({message: response.data.msg,type: 'error'});
  1707. }
  1708. loading.close();
  1709. },response => {
  1710. loading.close();
  1711. });
  1712. }
  1713. else {
  1714. console.log('error submit!!');
  1715. return false;
  1716. }
  1717. });
  1718. },
  1719. clearImg(str,type,index) {
  1720. if(!type) {
  1721. this.form[str] = "";
  1722. this.form[str+'_url'] = "";
  1723. }
  1724. else {
  1725. this.form[str].splice(index,1);
  1726. this.form[str+'_url'].splice(index,1);
  1727. }
  1728. this.$forceUpdate();
  1729. },
  1730. goBack() {
  1731. history.go(-1)
  1732. },
  1733. openUpload(str) {
  1734. this.chooseImgName = str;
  1735. this.uploadShow = true;
  1736. },
  1737. changeProp(val) {
  1738. if(val == true) {
  1739. this.uploadShow = false;
  1740. }
  1741. else {
  1742. this.uploadShow = true;
  1743. }
  1744. },
  1745. sureImg(name,image,image_url) {
  1746. this.form[name] = image;
  1747. this.form[name+'_url'] = image_url;
  1748. let url = image_url.split('.')
  1749. console.log(url)
  1750. if(url[url.length-1] == 'pdf') {
  1751. this.is_pdf = true;
  1752. }
  1753. else {
  1754. this.is_pdf = false;
  1755. }
  1756. },
  1757. clearImg(str) {
  1758. this.form[str] = "";
  1759. this.form[str+'_url'] = "";
  1760. this.$forceUpdate();
  1761. },
  1762. goToDetail(plugin_id,id){
  1763. var url = '';
  1764. if(plugin_id == 0){
  1765. url= '{!! yzWebFullUrl('order.detail.vue-index') !!}&id='+id;
  1766. }else if(plugin_id == 92){
  1767. url= '{!! yzWebFullUrl('plugin.supplier.admin.controllers.order.supplier-order-detail') !!}&id='+id;
  1768. }else if(plugin_id == 44){
  1769. url= '{!! yzWebFullUrl('plugin.jd-supply.admin.order-list.detail') !!}&id='+id;
  1770. }
  1771. window.location = url;
  1772. },
  1773. },
  1774. })
  1775. </script>
  1776. @endsection