vue-detail.blade.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. @extends('layouts.base')
  2. @section('title', '订单详情')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. body{font-weight:500;color:#333;}
  7. .all{background:#eff3f6}
  8. .el-form-item__label{margin-right:30px}
  9. .vue-main-form .el-form-item__content{margin-left:calc(15% + 30px) !important}
  10. .order-sum-li{width:16.66%;line-height:28px}
  11. .list-con-goods-text{min-height:70px;overflow:hidden;flex:1;display: flex;flex-direction: column;justify-content: space-between;}
  12. .list-con-goods-price{border-right:1px solid #e9e9e9;border-left:1px solid #e9e9e9;min-width:150px;min-height:90px;text-align: left;padding:20px;display: flex;flex-direction: column;}
  13. .list-con-goods-title{font-size:14px;line-height:20px;text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;}
  14. .list-con-goods-option{font-size:12px;color:#999}
  15. </style>
  16. <div class="all">
  17. <div id="app" v-cloak>
  18. <div class="vue-crumbs">
  19. <a>订单管理</a> > 订单详情
  20. </div>
  21. <el-form ref="form" :model="form" label-width="15%">
  22. <div class="vue-head">
  23. <div class="vue-main-title">
  24. <div class="vue-main-title-left"></div>
  25. <div class="vue-main-title-content">基本信息</div>
  26. </div>
  27. <div class="vue-main-form">
  28. <el-form-item label="购买会员" prop="store_name">
  29. <div style="width:100px;height:100px" v-if="user.avatar != '' ">
  30. <img :src="user.avatar" alt="" style="width:100%;height:100%">
  31. </div>
  32. <div style="line-height:33px;margin-left:15px">
  33. <div>(会员ID:[[user.id]]) [[user.nickname]]</div>
  34. <div>[[shipping_address.realname]]</div>
  35. <div>[[shipping_address.mobile]]</div>
  36. </div>
  37. </el-form-item>
  38. <el-form-item label="订单编号">
  39. <div>[[orderDetail.order_sn]]</div>
  40. </el-form-item>
  41. <el-form-item label="订单金额" prop="">
  42. <div style="display:flex;width:70%">
  43. <div class="order-sum-li" v-for="(item,index) in amount_detail.amount_items">
  44. <div>[[item.title]]</div>
  45. <div>¥[[item.amount]]</div>
  46. </div>
  47. <div class="order-sum-li">
  48. <div>应收款</div>
  49. <div style="color:red;font-weight:600">¥[[amount_detail.amount]]</div>
  50. </div>
  51. </div>
  52. </el-form-item>
  53. <el-form-item label="订单状态" prop="">
  54. <div style="display:inline-block;margin-right:20px">[[orderDetail.status_name]]</div>
  55. <el-button size="small" plain type="primary" @click="confirmSend(orderDetail.id,orderDetail)" v-if="orderDetail.status==1">确认发货</el-button>
  56. <el-button size="small" plain type="primary" @click="cancelOrder(orderDetail.id,orderDetail)" v-if="orderDetail.status==0">关闭订单</el-button>
  57. </el-form-item>
  58. <el-form-item label="" prop="">
  59. <el-steps align-center style="width:70%" process-status="process">
  60. <el-step v-for="(process_item,processIndex) in orderDetail.order_steps" :key="processIndex" :icon="process_item.icon" :status="process_item.status" :title="process_item.title" :description="process_item.desc"></el-step>
  61. </el-steps>
  62. </el-form-item>
  63. <el-form-item label="用户备注" prop="">
  64. <div>[[orderDetail.remark]]</div>
  65. </el-form-item>
  66. </div>
  67. </div>
  68. <div v-if="orderDetail.shipping_address != null" class="vue-head">
  69. <div class="vue-main-title">
  70. <div class="vue-main-title-left"></div>
  71. <div class="vue-main-title-content">收货信息</div>
  72. </div>
  73. <div class="vue-main-form">
  74. <el-form-item label="收货人" prop="">
  75. <div>[[orderDetail.shipping_address.realname]]</div>
  76. </el-form-item>
  77. <el-form-item label="联系电话" prop="">
  78. <div>[[orderDetail.shipping_address.mobile]]</div>
  79. </el-form-item>
  80. <el-form-item label="收货地址" prop="">
  81. <div>[[orderDetail.shipping_address.province]][[orderDetail.shipping_address.city]][[orderDetail.shipping_address.county]][[orderDetail.shipping_address.town]][[orderDetail.shipping_address.detail]]</div>
  82. </el-form-item>
  83. <!-- 物流信息 -->
  84. <div v-if="orderDetail.order_express != null && orderDetail.order_express.length > 0">
  85. <el-form-item label="物流信息" prop="">
  86. <el-button size="small" type="primary" @click="showDispatchInfo()">查看</el-button>
  87. </el-form-item>
  88. </div>
  89. </div>
  90. </div>
  91. <!-- 商品信息 -->
  92. <div v-if="orderDetail.order_items !== undefined && orderDetail.order_items.length > 0" class="vue-head">
  93. <div class="vue-main-title">
  94. <div class="vue-main-title-left"></div>
  95. <div class="vue-main-title-content">商品信息</div>
  96. </div>
  97. <div class="vue-main-form">
  98. <el-table :data="orderDetail.order_items" style="width: 100%">
  99. <el-table-column prop="product_id" label="商品ID" width="100" align="center"></el-table-column>
  100. <el-table-column prop="" label="商品" width="60" align="center">
  101. <template slot-scope="scope">
  102. <img :src="scope.row.image_url" style="width:50px;height:50px;">
  103. </template>
  104. </el-table-column>
  105. <el-table-column prop="down_time" label="" min-width="180" align="left">
  106. <template slot-scope="scope">
  107. <!-- style="color:#29BA9C;cursor: pointer;"
  108. @click=" gotoGoods(scope.row.goods_id) "> -->
  109. <div class="list-con-goods-title">
  110. [[scope.row.title]]
  111. </div>
  112. <div class="list-con-goods-option">规格: [[scope.row.sku_title]]</div>
  113. <div class="list-con-goods-option">数量: [[scope.row.qty]]</div>
  114. <!-- </div> -->
  115. </template>
  116. </el-table-column>
  117. <el-table-column prop="down_time" label="商品价格" min-width="230" align="center">
  118. <template slot-scope="scope">
  119. <div>
  120. <div style="display:flex;justify-content: center;">
  121. <div style="flex:1;text-align:right">中台-供货价:</div>
  122. <div style="flex:1;text-align:left">¥[[scope.row.supply_amount]]</div>
  123. </div>
  124. <div style="display:flex;justify-content: center;">
  125. <div style="flex:1;text-align:right">单价:</div>
  126. <div style="flex:1;text-align:left">¥[[scope.row.price]]</div>
  127. </div>
  128. <div style="display:flex;justify-content: center;">
  129. <div style="flex:1;text-align:right">小计:</div>
  130. <div style="flex:1;text-align:left">¥[[scope.row.amount]]</div>
  131. </div>
  132. </div>
  133. </template>
  134. </el-table-column>
  135. </el-table>
  136. </div>
  137. </div>
  138. </el-form>
  139. <!-- 查看商品 -->
  140. <el-dialog :visible.sync="get_goods_show" width="750px" title="商品列表">
  141. <div id="separate-send">
  142. <el-table ref="multipleTable1" :data="get_goods_list" tooltip-effect="dark" height="550" style="width: 100%">
  143. <el-table-column width="550">
  144. <template slot-scope="scope">
  145. <div style="display:flex;width: 88%;">
  146. <div style="width:50px;height:50px">
  147. <img :src="scope.row.image_url" alt="" style="width:50px;height:50px">
  148. </div>
  149. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  150. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  151. <div style="color:#999">[[scope.row.product_id]]</div>
  152. </div>
  153. </div>
  154. </template>
  155. </el-table-column>
  156. <el-table-column>
  157. <template slot-scope="scope">
  158. <div style="color:#999">[[scope.row.sku_title]]</div>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. </div>
  163. <span slot="footer" class="dialog-footer">
  164. <el-button @click="get_goods_show = false">取 消</el-button>
  165. </span>
  166. </el-dialog>
  167. <!-- 查看物流信息 -->
  168. <el-dialog :visible.sync="modal_dispatch_info" width="750px" center title="物流信息">
  169. <div style="height:400px;overflow:auto" id="dispatch-info">
  170. <!-- 多包裹 -->
  171. <div>
  172. <div style="display:flex;margin-bottom:15px;" v-for="(item3,index3) in dispatch">
  173. <div class="left" style="width:105px;margin-right:30px;text-align:right">
  174. 包裹[[index3 + 1]]信息
  175. </div>
  176. <div class="right" style="flex:1" v-if="item3.order_items.length>0">
  177. <div>
  178. <div class="wl-img" style="width:70px;height:70px;position:relative;">
  179. <img :src="item3.order_items[0].image_url" style="width:100%;height:100%">
  180. <div style="line-height:18px;background:RGB(17, 9, 5,0.7);color:#fff;position:absolute;bottom:0;width:100%;text-align:center">
  181. {{-- 共[[item3.count]]件--}}
  182. </div>
  183. <div @click="getGoodDetail(item3.order_items)" style="position:absolute;bottom:0;right:-80px;cursor: pointer;color:#ff9b19 ">
  184. 查看商品
  185. </div>
  186. </div>
  187. <div style="padding:5px 0" v-if="item3.company_name">公司:[[item3.company_name]]</div>
  188. <div style="padding:5px 0" v-if="item3.express_no">运单号:[[item3.express_no]]</div>
  189. <div style="padding:5px 0" v-if="item3.express_no == '' ">无物流</div>
  190. <template v-if="item3.list != null">
  191. <div style="padding:5px 0" v-for="(d1, k2) in item3.list" :key="k2">[[d1.time]] [[d1.status]]</div>
  192. </template>
  193. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  194. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  195. {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. <span slot="footer" class="dialog-footer">
  202. <el-button @click="modal_dispatch_info = false">关 闭</el-button>
  203. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  204. </span>
  205. </el-dialog>
  206. <!-- 确认发货 -->
  207. <el-dialog :visible.sync="confirm_send_show" width="850px" title="确认发货">
  208. <div style="height:600px;overflow:auto" id="confirm-send">
  209. <el-form ref="send" :model="send" :rules="send_rules" label-width="15%">
  210. <el-form-item label="收件人信息" prop="aggregation">
  211. <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
  212. <div>收货地址: [[address_info.province]][[address_info.city]][[address_info.county]][[address_info.town]][[address_info.detail]]</div>
  213. </el-form-item>
  214. <el-form-item label="配送方式" prop="">
  215. <el-radio v-model="send.dispatch_type_id" :label="1">快递</el-radio>
  216. <el-radio v-model="send.dispatch_type_id" :label="2">无需物流</el-radio>
  217. </el-form-item>
  218. <div v-if="send.dispatch_type_id == 1">
  219. <el-form-item label="快递公司">
  220. <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" :disabled='readonly' style="width:70%;">
  221. <el-option label="请选择快递" value=""></el-option>
  222. <el-option v-for="(item,index) in expressCompanies" :key="index" :label="item.name" :value="item.code"></el-option>
  223. </el-select>
  224. </el-form-item>
  225. <el-form-item label="快递单号" prop="">
  226. <el-input v-model="send.express_sn" :disabled='readonly' style="width:70%;"></el-input>
  227. </el-form-item>
  228. </div>
  229. <el-table ref="multipleTable" :data="order_goods_send_list" tooltip-effect="dark" height="350" style="width: 100%" @selection-change="moreSendChange">
  230. <el-table-column type="selection" :selectable="checkSelectable" width="55"></el-table-column>
  231. <el-table-column width="350">
  232. <template slot-scope="scope">
  233. <div style="display:flex;width: 88%;">
  234. <div style="width:50px;height:50px">
  235. <img :src="scope.row.image_url" alt="" style="width:50px;height:50px">
  236. </div>
  237. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  238. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  239. <div style="color:#999">[[scope.row.product_id]]</div>
  240. </div>
  241. </div>
  242. </template>
  243. </el-table-column>
  244. <el-table-column >
  245. <template slot-scope="scope">
  246. <div style="display:flex;width: 88%;">
  247. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  248. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.order_express.company_name]]</div>
  249. <div style="color:#999">[[scope.row.order_express.express_no]]</div>
  250. </div>
  251. </div>
  252. </template>
  253. </el-table-column>
  254. <el-table-column>
  255. <template slot-scope="scope">
  256. <div style="color:#999">[[scope.row.sku_title]]</div>
  257. </template>
  258. </el-table-column>
  259. </el-table>
  260. </el-form>
  261. </div>
  262. <span slot="footer" class="dialog-footer">
  263. <el-button @click="confirm_send_show = false">取 消</el-button>
  264. <el-button type="primary" @click="sureconfirmSend()">确认发货 </el-button>
  265. </span>
  266. </el-dialog>
  267. </div>
  268. </div>
  269. </div>
  270. <script>
  271. var app = new Vue({
  272. el:"#app",
  273. delimiters: ['[[', ']]'],
  274. name: 'test',
  275. data() {
  276. return{
  277. is_pdf:false,
  278. street: '{!! \Setting::get("shop.trade")['is_street'] !!}',
  279. id:0,
  280. middleground_configuration_id:0,
  281. getDataUrl: '{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.detail') !!}',//获取订单数据链接
  282. order_id:0,
  283. orderDetail:{},
  284. amount_detail:[],//金额数组
  285. user:[],//用户信息
  286. shipping_address:[],//收货人信息
  287. readonly:false,
  288. dispatch:{}, //订单物流信息
  289. logistics:{},//物流详情
  290. modal_dispatch_info: false,
  291. form:{
  292. },
  293. loading: false,
  294. cancel_send_show:false,// 取消发货弹窗
  295. cancel_send_con:"",//取消发货原因
  296. cancel_send_id:'',
  297. confirm_send_show:false,// 确认发货弹窗
  298. confirm_send_id:"",
  299. send:{
  300. dispatch_type_id:1,
  301. express_code:"",
  302. express_sn:"",
  303. order_sn:"",
  304. },
  305. send_rules:{},
  306. address_info:{},
  307. expressCompanies:[],//快递公司
  308. // 多包裹发货
  309. more_send_show:false,
  310. order_goods_send_list:[],
  311. send_order_goods_ids:[],
  312. // 查看商品
  313. get_goods_show:false,
  314. get_goods_list:[],
  315. }
  316. },
  317. created() {
  318. let result = this.viewReturn();
  319. this.__initial(result);
  320. },
  321. mounted() {
  322. if(this.id) {
  323. this.getData();
  324. }
  325. },
  326. methods: {
  327. //视图返回数据
  328. viewReturn() {
  329. return {!! $data?:'{}' !!};
  330. },
  331. //初始化页面数据,请求链接
  332. __initial(data) {
  333. if (data.id) {
  334. this.id = data.id;
  335. }
  336. if (data.middleground_configuration_id) {
  337. this.middleground_configuration_id = data.middleground_configuration_id;
  338. }
  339. console.log(data);
  340. },
  341. getData() {
  342. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  343. this.$http.post(this.getDataUrl,{id:this.id,middleground_configuration_id:this.middleground_configuration_id }).then(function (response) {
  344. if (response.data.result){
  345. this.orderDetail = response.data.data.order;
  346. this.amount_detail = response.data.data.order.amount_detail;
  347. this.user = response.data.data.order.user;
  348. this.shipping_address = response.data.data.order.shipping_address;
  349. this.order_id = response.data.data.order.id;
  350. this.dispatch = response.data.data.order.order_express;
  351. this.logistics = response.data.data.order.logistics;
  352. loading.close();
  353. } else {
  354. this.$message({message: response.data.msg,type: 'error'});
  355. }
  356. loading.close();
  357. },function (response) {
  358. this.$message({message: response.data.msg,type: 'error'});
  359. loading.close();
  360. }
  361. );
  362. },
  363. checkSelectable(item){
  364. // console.log(item);
  365. return item.send_status == 0;
  366. },
  367. //订单取消
  368. cancelOrder(id,item){
  369. this.$confirm('确定取消编号:'+item.order_sn+'订单吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  370. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  371. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.cancel-order') !!}',{order_id:id,order_sn:item.order_sn,middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
  372. if (response.data.result) {
  373. this.$message({type: 'success',message: '取消成功!'});
  374. this.getData(1);
  375. }
  376. else{
  377. this.$message({type: 'error',message: response.data.msg});
  378. }
  379. loading.close();
  380. },function (response) {
  381. this.$message({type: 'error',message: response.data.msg});
  382. loading.close();
  383. }
  384. );
  385. }).catch(() => {
  386. this.$message({type: 'info',message: '已取消'});
  387. });
  388. },
  389. // 确认发货
  390. confirmSend(id,item) {
  391. let json = {
  392. order_id:id,
  393. middleground_configuration_id:this.middleground_configuration_id
  394. };
  395. console.log(json);
  396. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  397. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.goods-send-info') !!}',json).then(function(response) {
  398. loading.close();
  399. if (response.data.result) {
  400. this.confirm_send_show = true;
  401. this.confirm_send_con = "";
  402. this.send = {
  403. dispatch_type_id :1,
  404. express_code:"",
  405. express_sn:"",
  406. order_sn:item.order_sn
  407. }
  408. this.confirm_send_id = response.data.data.order.id;
  409. this.address_info = response.data.data.order.shipping_address || {};
  410. this.order_goods_send_list = response.data.data.order.order_items;
  411. this.expressCompanies = response.data.data.express;
  412. } else {
  413. this.$message({
  414. message: response.data.msg,
  415. type: 'error'
  416. });
  417. }
  418. }, function(response) {
  419. this.$message({
  420. message: response.data.msg,
  421. type: 'error'
  422. });
  423. loading.close();
  424. });
  425. },
  426. sureconfirmSend(){
  427. let json = {
  428. dispatch_type_id :this.send.dispatch_type_id,
  429. express_code:this.send.express_code,
  430. express_sn:this.send.express_sn,
  431. order_item_ids:this.send_order_goods_ids,
  432. order_id:this.confirm_send_id,
  433. order_sn:this.send.order_sn,
  434. middleground_configuration_id:this.middleground_configuration_id
  435. };
  436. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  437. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.send') !!}',json).then(function(response) {
  438. if (response.data.result) {
  439. this.$message({
  440. message: '发货成功',
  441. type: 'success'
  442. });
  443. this.confirm_send_show = false;
  444. loading.close();
  445. this.getData();
  446. } else {
  447. this.$message({
  448. message: response.data.msg,
  449. type: 'error'
  450. });
  451. }
  452. loading.close();
  453. }, function(response) {
  454. this.$message({
  455. message: response.data.msg,
  456. type: 'error'
  457. });
  458. loading.close();
  459. });
  460. },
  461. // 选择商品
  462. moreSendChange(selection) {
  463. let arr = [];
  464. for(let j = 0,len = selection.length; j < len; j++){
  465. console.log(selection[j].id);
  466. arr.push(selection[j].id);
  467. }
  468. this.send_order_goods_ids = arr;
  469. },
  470. // 获取可选择的商品 多包裹发货
  471. getSeparateSendOrderGoods(id) {
  472. this.$http.post('{!! yzWebFullUrl('order.multiple-packages-order-goods.get-order-goods') !!}', {order_id:id,middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
  473. if (response.data.result) {
  474. this.order_goods_send_list = response.data.data;
  475. // console.log(this.order_goods_send_list);
  476. } else{
  477. this.$message({type: 'error',message: response.data.msg});
  478. }
  479. },function (response) {
  480. this.$message({type: 'error',message: response.data.msg});
  481. });
  482. },
  483. //查看物流信息
  484. showDispatchInfo() {
  485. this.modal_dispatch_info = true;
  486. },
  487. // 查看商品
  488. getGoodDetail(item) {
  489. console.log(item)
  490. this.get_goods_show = true;
  491. this.get_goods_list = [];
  492. this.get_goods_list = item || [];
  493. },
  494. gotoGoods(id) {
  495. window.open(`{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id);
  496. {{--window.location.href = `{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id;--}}
  497. },
  498. clearImg(str,type,index) {
  499. if(!type) {
  500. this.form[str] = "";
  501. this.form[str+'_url'] = "";
  502. }
  503. else {
  504. this.form[str].splice(index,1);
  505. this.form[str+'_url'].splice(index,1);
  506. }
  507. this.$forceUpdate();
  508. },
  509. goBack() {
  510. history.go(-1)
  511. },
  512. sureImg(name,image,image_url) {
  513. this.form[name] = image;
  514. this.form[name+'_url'] = image_url;
  515. let url = image_url.split('.')
  516. console.log(url)
  517. if(url[url.length-1] == 'pdf') {
  518. this.is_pdf = true;
  519. }
  520. else {
  521. this.is_pdf = false;
  522. }
  523. },
  524. clearImg(str) {
  525. this.form[str] = "";
  526. this.form[str+'_url'] = "";
  527. this.$forceUpdate();
  528. },
  529. },
  530. })
  531. </script>
  532. @endsection