restock_detail.blade.php 97 KB

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