order_detail.blade.php 99 KB

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