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