order-list.blade.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-ohter.css')}}"/>
  6. <style>
  7. .edit-i {
  8. display: none;
  9. }
  10. .el-table_1_column_2:hover .edit-i {
  11. font-weight: 900;
  12. padding: 0;
  13. margin: 0;
  14. display: inline-block;
  15. }
  16. .el-tabs__item, .is-top {
  17. font-size: 16px
  18. }
  19. .el-tabs__active-bar {
  20. height: 3px;
  21. }
  22. .input-with-select .el-input-group__prepend {
  23. background-color: #fff;
  24. }
  25. </style>
  26. <div class="all">
  27. <div id="app" v-cloak>
  28. <div class="vue-head">
  29. <div class="vue-search">
  30. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  31. <el-row :gutter="15">
  32. <el-col :span="8" style="margin-top: 10px">
  33. <el-input placeholder="会员昵称/姓名/手机号/ID" v-model="search_input_value2"
  34. class="input-with-select">
  35. <el-select style="width: 150px" class="search_input_select"
  36. v-model="search_input_key2" slot="prepend" placeholder="请选择">
  37. <el-option label="会员昵称" value="nickname">会员昵称
  38. </el-option>
  39. <el-option label="会员姓名" value="realname">会员姓名
  40. </el-option>
  41. <el-option label="会员手机" value="mobile">会员手机
  42. </el-option>
  43. <el-option label="会员ID" value="uid">会员ID
  44. </el-option>
  45. </el-select>
  46. </el-input>
  47. </el-col>
  48. <el-col :span="8" style="margin-top: 10px">
  49. <el-input placeholder="订单ID/订单号/第三方订单号" v-model="search_input_value4"
  50. class="input-with-select">
  51. <el-select style="width: 130px" class="search_input_select"
  52. v-model="search_input_key4" slot="prepend" placeholder="请选择">
  53. <el-option label="订单号" value="order_sn">订单号
  54. </el-option>
  55. <el-option label="订单ID" value="order_id">订单ID
  56. </el-option>
  57. <el-option label="第三方订单号" value="bird_order_sn">第三方订单号
  58. </el-option>
  59. <el-option label="芸信订单号" value="yun_order">芸信订单号
  60. </el-option>
  61. </el-select>
  62. </el-input>
  63. </el-col>
  64. <el-col :span="5" style="margin-top: 10px">
  65. <el-select v-model="search_form.state" clearable placeholder="订单状态">
  66. <el-option
  67. v-for="(item,index) in state_arr"
  68. :key="index"
  69. :label="item.label"
  70. :value="item.value">
  71. </el-option>
  72. </el-select>
  73. </el-col>
  74. </el-row>
  75. <el-row :gutter="5">
  76. <el-col :span="3" style="margin-top: 10px">
  77. <el-select v-model="search_form.time_field" clearable placeholder="搜索时间">
  78. <el-option
  79. v-for="(item,index) in ts_arr"
  80. :key="index"
  81. :label="item.label"
  82. :value="item.value">
  83. </el-option>
  84. </el-select>
  85. </el-col>
  86. <el-col :span="6" style="margin-top: 10px">
  87. <div class="block">
  88. <span class="demonstration"></span>
  89. <el-date-picker
  90. v-model="search_form.time_arr"
  91. type="datetimerange"
  92. :picker-options="pickerOptions"
  93. range-separator="至"
  94. start-placeholder="开始日期"
  95. end-placeholder="结束日期"
  96. value-format="timestamp"
  97. align="right">
  98. </el-date-picker>
  99. </div>
  100. </el-col>
  101. <el-col :span="4" style="margin-top: 10px">
  102. <el-button-group>
  103. <el-button type="primary" @click="changeForm()">搜索</el-button>
  104. <el-button type="success" @click="refresh_modal.show=true">刷新</el-button>
  105. </el-button-group>
  106. </el-col>
  107. </el-row>
  108. </el-form>
  109. </div>
  110. </div>
  111. <div class="vue-main">
  112. <div class="vue-main-form">
  113. <div class="vue-main-title" style="margin-top:-10px">
  114. <div class="title"><span
  115. style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>订单管理</b>
  116. </div>
  117. </div>
  118. </div>
  119. <div style="margin-bottom:20px">
  120. <div style="margin-bottom:20px">
  121. </div>
  122. <el-table :data="list" style="width: 100%;" align="center" :fit="true">
  123. <el-table-column min-width="12.5%" prop="" label="订单号/第三方订单号/芸信订单号" align="center">
  124. <template slot-scope="scope">
  125. [[scope.row.order_sn]]<template v-if="!scope.row.order_sn"> /</template><br>
  126. [[scope.row.bird_order_sn]]<template v-if="!scope.row.bird_order_sn"> /</template><br>
  127. [[scope.row.yun_order]]<template v-if="!scope.row.yun_order"> /</template>
  128. </template>
  129. </el-table-column>
  130. <el-table-column min-width="12.5%" prop="" label="会员信息" align="center">
  131. <template slot-scope="scope">
  132. <div class="block" v-if="scope.row.has_one_member">
  133. <el-link type="info" class="title"
  134. @click="memberDetail(scope.row.has_one_member.uid)" target="_blank">
  135. <el-avatar shape="circle" :size="40"
  136. :src="scope.row.has_one_member.avatar_image"></el-avatar>
  137. <br>
  138. ([[scope.row.has_one_member.uid]])[[scope.row.has_one_member.username]]
  139. </el-link>
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column min-width="8%" prop="bird_type_name" label="第三方平台" align="center">
  144. </el-table-column>
  145. <el-table-column min-width="12.5%" prop="" label="状态" align="center">
  146. <template slot-scope="scope">
  147. <el-tag type="primary" v-if="scope.row.state==0">待结算</el-tag>
  148. <el-tag type="success" v-if="scope.row.state==1">已结算</el-tag>
  149. <el-tag type="danger" v-if="scope.row.state==-1">已失效</el-tag>
  150. </template>
  151. </el-table-column>
  152. <el-table-column min-width="12.5%" label="订单金额" align="center">
  153. <template slot-scope="scope">
  154. [[scope.row.amount]]元
  155. </template>
  156. </el-table-column>
  157. <el-table-column min-width="17%" label="时间" align="center">
  158. <template slot-scope="scope">
  159. <el-tag type="info">创建时间:[[scope.row.create_time]]</el-tag>
  160. <p></p>
  161. <template v-if="scope.row.close_time">
  162. <el-tag type="danger">关闭时间:[[scope.row.close_time]]</el-tag>
  163. <p></p>
  164. </template>
  165. <template v-if="scope.row.finish_time">
  166. <el-tag type="primary">结算时间:[[scope.row.finish_time]]</el-tag>
  167. <p></p>
  168. </template>
  169. </template>
  170. </el-table-column>
  171. <el-table-column min-width="12.5%" prop="" label="操作" align="center">
  172. <template slot-scope="scope">
  173. <el-button type="primary" size="mini" v-if="scope.row.state==0"
  174. @click="refreshOrder(scope.row)">刷新订单
  175. </el-button>
  176. </template>
  177. </el-table-column>
  178. </el-table>
  179. </div>
  180. <el-dialog title="订单刷新" :visible.sync="refresh_modal.show" width="50%">
  181. <el-row :gutter="3"></el-row>
  182. <el-col :span="3"><span style="float: right;margin-top: 6px;margin-right: 2px">更新时间</span></el-col>
  183. <el-col :span="5">
  184. <div class="block">
  185. <span class="demonstration"></span>
  186. <el-date-picker
  187. v-model="refresh_modal.time_arr"
  188. type="datetimerange"
  189. :picker-options="pickerOptions"
  190. range-separator="至"
  191. start-placeholder="开始日期"
  192. end-placeholder="结束日期"
  193. value-format="timestamp"
  194. align="right">
  195. </el-date-picker>
  196. </div>
  197. </el-col>
  198. <span slot="footer" class="dialog-footer">
  199. <el-button :loading="refresh_modal.refresh_button_loading" type="primary"
  200. @click="refreshManyOrder()">刷新</el-button>
  201. <el-button @click="refresh_modal.show = false">取 消</el-button>
  202. </span>
  203. </el-dialog>
  204. <div class="vue-page" v-if="total > 0">
  205. <el-row>
  206. <el-col align="right">
  207. <el-pagination layout="prev, pager, next,jumper" @current-change="getData" :total="total"
  208. :page-size="per_page" :current-page="current_page" background
  209. ></el-pagination>
  210. </el-col>
  211. </el-row>
  212. </div>
  213. </div>
  214. <!-- 分页 -->
  215. </div>
  216. </div>
  217. <script>
  218. var app = new Vue({
  219. el: "#app",
  220. delimiters: ['[[', ']]'],
  221. name: 'test',
  222. data() {
  223. var uid = "{!! $_GET['uid'] !!}";
  224. if (uid === undefined || uid === 0 || uid === '0') {
  225. uid = '';
  226. }
  227. return {
  228. refresh_modal: {
  229. 'show': false,
  230. 'time_arr': [new Date().getTime() - 86400 * 1000, new Date().getTime()],
  231. 'refresh_button_loading': false,
  232. },
  233. list: [],
  234. total: 1,
  235. per_page: 1,
  236. current_page: 1,
  237. search_form: {
  238. 'state': '',
  239. 'create_notice': '',
  240. 'finish_notice': '',
  241. 'time_field': '',
  242. 'time_arr': [new Date().getTime(), new Date().getTime()]
  243. },
  244. search_input_key2: 'nickname',
  245. search_input_value2: '',
  246. search_input_key4: 'order_sn',
  247. search_input_value4: '',
  248. search_data: {},
  249. state_arr: [
  250. {value: '0', label: '待结算'},
  251. {value: '1', label: '已结算'},
  252. {value: '-1', label: '已失效'},
  253. ],
  254. ts_arr: [
  255. {value: 'create_time', label: '创建时间'},
  256. {value: 'finish_time', label: '结算时间'},
  257. {value: 'close_time', label: '失效时间'},
  258. ],
  259. pickerOptions: {
  260. shortcuts: [
  261. {
  262. text: '一天内',
  263. onClick(picker) {
  264. const end = new Date();
  265. const start = new Date();
  266. start.setTime(start.getTime() - 3600 * 1000 * 24);
  267. picker.$emit('pick', [start, end]);
  268. }
  269. },
  270. {
  271. text: '三天内',
  272. onClick(picker) {
  273. const end = new Date();
  274. const start = new Date();
  275. start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
  276. picker.$emit('pick', [start, end]);
  277. }
  278. }, {
  279. text: '一周内',
  280. onClick(picker) {
  281. const end = new Date();
  282. const start = new Date();
  283. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  284. picker.$emit('pick', [start, end]);
  285. }
  286. }, {
  287. text: '一月内',
  288. onClick(picker) {
  289. const end = new Date();
  290. const start = new Date();
  291. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  292. picker.$emit('pick', [start, end]);
  293. }
  294. },
  295. ]
  296. },
  297. }
  298. },
  299. created() {
  300. },
  301. mounted() {
  302. this.changeForm();
  303. },
  304. methods: {
  305. memberDetail: function (id) {
  306. window.open("{!! yzWebFullUrl('member.member.detail') !!}" + '&id=' + id);
  307. },
  308. refreshManyOrder: function () {
  309. this.refresh_modal.refresh_button_loading = true;
  310. this.$http.post('{!! yzWebFullUrl('plugin.cps-sub-platform.admin.order.refreshManyOrder') !!}', {
  311. 'start_time': this.refresh_modal.time_arr[0],
  312. 'end_time': this.refresh_modal.time_arr[1],
  313. }).then(function (response) {
  314. console.log(response);
  315. if (response.data.result) {
  316. this.$message({message: response.data.msg, type: 'success'});
  317. this.search();
  318. this.refresh_modal.show = false;
  319. } else {
  320. this.$message({message: response.data.msg, type: 'error'});
  321. }
  322. this.refresh_modal.refresh_button_loading = false
  323. }, function (response) {
  324. this.$message({message: response.data.msg, type: 'error'});
  325. this.refresh_modal.refresh_button_loading = false
  326. })
  327. },
  328. refreshOrder: function (scope) {
  329. this.$http.post('{!! yzWebFullUrl('plugin.cps-sub-platform.admin.order.refreshOrder') !!}', {
  330. 'order_id': scope.order_id,
  331. }).then(function (response) {
  332. console.log(response);
  333. if (response.data.result) {
  334. this.$message({message: response.data.msg, type: 'success'});
  335. this.search();
  336. } else {
  337. this.$message({message: response.data.msg, type: 'error'});
  338. }
  339. }, function (response) {
  340. this.$message({message: response.data.msg, type: 'error'});
  341. })
  342. },
  343. search: function () {
  344. this.$http.post('{!! yzWebFullUrl('plugin.cps-sub-platform.admin.order.index') !!}', {
  345. 'page': this.current_page,
  346. 'is_json': 1,
  347. 'search_data': this.search_data,
  348. }).then(function (response) {
  349. console.log(response);
  350. if (response.data.result) {
  351. let this_data = response.data.data.list;
  352. this.current_page = this_data.current_page;
  353. this.list = this_data.data;
  354. this.total = this_data.total;
  355. this.per_page = this_data.per_page;
  356. } else {
  357. this.$message({message: response.data.msg, type: 'error'});
  358. }
  359. }, function (response) {
  360. this.$message({message: response.data.msg, type: 'error'});
  361. })
  362. },
  363. getData: function (val) {
  364. this.current_page = val;
  365. this.search();
  366. },
  367. changeForm: function () {
  368. this.search_data.realname = '';
  369. this.search_data.mobile = '';
  370. this.search_data.uid = 0;
  371. this.search_data.nickname = '';
  372. this.search_data.order_sn = 0;
  373. this.search_data.order_sn = '';
  374. this.search_data.bird_order_sn = '';
  375. this.search_data.yun_order = '';
  376. this.search_data = this.search_form;
  377. this.search_data[this.search_input_key2] = this.search_input_value2;
  378. this.search_data[this.search_input_key4] = this.search_input_value4;
  379. this.current_page = 1;
  380. this.search();
  381. }
  382. },
  383. })
  384. </script>
  385. @endsection