price-difference-gift-package-list.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <?php
  2. ?>
  3. <style>
  4. .vue-line-clamp p {
  5. line-height: 22px;
  6. }
  7. .demo-form-inline .el-select .el-input {
  8. /* width: 100px; */
  9. }
  10. /* 订单表格 start */
  11. .width-pre10 {
  12. width: 10%;
  13. }
  14. .width-50 {
  15. width: 50px;
  16. }
  17. .width-100 {
  18. min-width: 100px;
  19. }
  20. .width-400 {
  21. width: 350px;
  22. }
  23. .order-table {
  24. overflow-x: scroll;
  25. }
  26. .tab-title,
  27. .tab-cont {
  28. width: 100%;
  29. min-width: 1290px;
  30. font-size: 13px;
  31. }
  32. .tab-title {
  33. padding: 20px 0;
  34. }
  35. .tab-title>li {
  36. padding: 0 10px;
  37. white-space: nowrap;
  38. }
  39. .tab-cont {
  40. border: 1px solid #F2F2F2;
  41. margin-bottom: 20px;
  42. }
  43. .tab-cont-row {
  44. padding: 10px 10px;
  45. background-color: #F7F7F7;
  46. }
  47. .tab-cont-info {
  48. display: flex;
  49. flex-direction: row;
  50. }
  51. .tab-cont-info>li {
  52. min-height: 120px;
  53. height: 100%;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. flex: 1;
  58. }
  59. /* 订单表格 end */
  60. /* 补货上级样式 */
  61. .tab-cont-info .tab-shop-info[style*="flex-direction: column"] {
  62. height: 100%;
  63. min-height: 120px;
  64. }
  65. </style>
  66. <template id="price-difference-gift-package-list">
  67. <div>
  68. <el-card shadow="never" body-style="background-color: #f3f3f3;padding:0" v-loading="listLoading">
  69. <div class="table-body">
  70. <el-form :inline="true" :model="search_data" size="small" class="demo-form-inline">
  71. <el-form-item >
  72. <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" v-model="search_data.keyword" @keyup.enter.native="search" placeholder="请输入用户昵称/id/手机号"></el-input>
  73. </el-form-item>
  74. <el-form-item >
  75. <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" v-model="search_data.order_no" @keyup.enter.native="search" placeholder="请输入订单编号"></el-input>
  76. </el-form-item>
  77. <el-form-item >
  78. <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" v-model="search_data.goods_name" @keyup.enter.native="search" placeholder="请输入商品名称"></el-input>
  79. </el-form-item>
  80. <el-form-item >
  81. <el-date-picker
  82. style="margin-right: 20px;"
  83. size="small"
  84. v-model="selectDate"
  85. type="datetimerange"
  86. value-format="yyyy-MM-dd HH:mm:ss"
  87. range-separator="至"
  88. start-placeholder="开始日期"
  89. end-placeholder="结束日期"
  90. :default-time="['00:00:00', '23:59:59']"
  91. :picker-options="pickerOptions">
  92. </el-date-picker>
  93. </el-form-item>
  94. <el-form-item >
  95. <el-select v-model="search_data.payment_type" placeholder="请选择" style="margin-right: 20px;" size="small">
  96. <el-option v-for="(val, key) in payment_type_arr" :key="key" :label="val" :value="key">
  97. </el-option>
  98. </el-select>
  99. </el-form-item>
  100. <el-form-item>
  101. <el-button type="primary" @click="search">搜索</el-button>
  102. </el-form-item>
  103. </el-form>
  104. <!-- 订单表格 start -->
  105. <div class="order-table">
  106. <!-- 表格头 -->
  107. <ul class="tab-title" flex="dir:left cross:center">
  108. <li class="width-400" style="text-align: center;">订单编号</li>
  109. <li class="width-400" style="text-align: center;">商品名称</li>
  110. <li class="width-400" style="text-align: center;">价格/补货数量</li>
  111. <li class="width-400" style="text-align: center;">实际支付金额(元)</li>
  112. <li class="width-400" style="text-align: center;">补货上级</li>
  113. <li class="width-400" style="text-align: center;">收货人信息</li>
  114. <li class="width-400" style="text-align: center;">随机减金额(元)</li>
  115. </ul>
  116. <div v-for="(item, index) in list" :key="item.id">
  117. <div class="tab-cont" >
  118. <div class="tab-cont-row" flex="main:justify cross:center">
  119. <div flex="dir:left cross:center">
  120. <div style="padding-right: 20px;">用户({{item.user.id}}):{{item.user.nickname}}</div>
  121. <div style="padding-right: 20px;">订单创建时间:{{item.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  122. </div>
  123. </div>
  124. <ul class="tab-cont-info" flex="dir:left cross:center" v-for="(it, i) in item.fillOrder" :key="i">
  125. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:center" >
  126. <div>
  127. {{it.order_no}}
  128. </div>
  129. </li>
  130. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:left" >
  131. <el-image style="width: 50px; height: 50px; border-radius: 5px;margin-right:5px" :src="it.goods.cover_pic"></el-image>
  132. <div>{{it.goods.goods_name}}</div>
  133. </li>
  134. <li class="tab-shop-info width-400 border-bottom border-right " flex="dir:left" >
  135. <div style="padding:10px">
  136. <div>¥{{it.goods_price}}</div>
  137. <div>总数:{{it.self_pickup_num+it.cloud_warehouse_num}}件</div>
  138. <div>自提:{{it.self_pickup_num}}件</div>
  139. <div>云仓:{{it.cloud_warehouse_num}}件</div>
  140. <p>
  141. <el-tag size="small" type="warning">{{payment_type_list[item.payment_type]}}</el-tag>
  142. </p>
  143. </div>
  144. </li>
  145. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:left" >
  146. <div v-show="i == 0">
  147. <div>¥{{item.pay_money}}</div>
  148. <div v-if="item.shipping_money>0">(含运费¥{{item.shipping_money}})</div>
  149. </div>
  150. </li>
  151. <!-- 补货上级 -->
  152. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:left" style="flex-direction: column;">
  153. <div v-for="(user, i) in it.from_user" :key="i" style="padding:5px">
  154. <el-image class="default-avatar" :src="user.avatar_url"
  155. style="width: 50px;height: 50px;">
  156. <div slot="error" class="image-slot">
  157. <com-image src="resources/img/mall/default_avatar_url.png"
  158. style="width: 50px;height: 50px;"></com-image>
  159. </div>
  160. </el-image>
  161. <div>
  162. <div>ID:{{user.id}}</div>
  163. <div>昵称:{{user.nickname}}</div>
  164. </div>
  165. </div>
  166. </li>
  167. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:left" >
  168. <div style="padding:0 10px" v-if="it.self_pickup_num>0">
  169. <div>{{item.receiver_name}}</div>
  170. <div>{{item.receiver_mobile}}</div>
  171. <div>{{item.address}}</div>
  172. </div>
  173. <div style="padding:0 10px" v-else>
  174. <div>--</div>
  175. </div>
  176. </li>
  177. <li class="tab-shop-info width-400 border-bottom border-right" flex="dir:left" >
  178. <div v-show="i == 0">
  179. <div>{{item.rand_fee}}</div>
  180. </div>
  181. </li>
  182. </ul>
  183. </div>
  184. </div>
  185. </div>
  186. <div style="text-align: right;margin: 20px 0;">
  187. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  188. </div>
  189. <!-- 订单表格 end -->
  190. </div>
  191. </el-card>
  192. </div>
  193. </template>
  194. <script>
  195. Vue.component('price-difference-gift-package-list', {
  196. template: '#price-difference-gift-package-list',
  197. props: {
  198. },
  199. data() {
  200. return {
  201. exportList:{},
  202. listLoading:false,
  203. search_data:{
  204. goods_name:'',
  205. keyword:'',
  206. end:'',
  207. start:'',
  208. payment_type:'',
  209. order_no:''
  210. },
  211. selectDate:[
  212. ],
  213. datetime:'',
  214. list:[],
  215. marketing_type_map:{},
  216. isIndeterminate: false,
  217. changePriceLoading: false,
  218. page: 1,
  219. pageCount:1,
  220. limit:10,
  221. url:'cloud-stock/order/index',
  222. payment_type_list:[],
  223. pickerOptions: {
  224. shortcuts: [
  225. {
  226. text: '今日',
  227. onClick(picker) {
  228. const end = new Date();
  229. const start = new Date();
  230. start.setHours(0, 0, 0, 0);
  231. end.setHours(23, 59, 59, 999);
  232. picker.$emit('pick', [start, end]);
  233. }
  234. },
  235. {
  236. text: '本月',
  237. onClick(picker) {
  238. const today = new Date();
  239. const start = new Date(today.getFullYear(), today.getMonth(), 1);
  240. const end = new Date(today.getFullYear(), today.getMonth() + 1, 0, 23, 59, 59);
  241. picker.$emit('pick', [start, end]);
  242. }
  243. },
  244. {
  245. text: '近七天',
  246. onClick(picker) {
  247. const end = new Date();
  248. const start = new Date();
  249. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  250. picker.$emit('pick', [start, end]);
  251. }
  252. },
  253. {
  254. text: '近一个月',
  255. onClick(picker) {
  256. const end = new Date();
  257. const start = new Date();
  258. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  259. picker.$emit('pick', [start, end]);
  260. }
  261. }
  262. ]
  263. },
  264. payment_type_arr: {
  265. '0': "请选择",
  266. '1': "微信",
  267. '2': "支付宝",
  268. '3': "银联卡",
  269. '5': "余额支付",
  270. '7': "汇聚支付",
  271. '8': "汇聚快捷支付",
  272. '12': "积分支付",
  273. '15': "银典支付",
  274. '16': "通联支付",
  275. },
  276. }
  277. },
  278. mounted(){
  279. },
  280. computed: {
  281. },
  282. methods: {
  283. getlist(page) {
  284. this.list = [];
  285. this.listLoading = true;
  286. request({
  287. params: {
  288. r: this.url,
  289. page: page,
  290. limit:this.limit,
  291. keyword:this.keyword,
  292. list_type:'diff_order',
  293. ...this.search_data
  294. },
  295. method: 'get',
  296. }).then(e => {
  297. this.listLoading = false;
  298. if (e.data.code === 0) {
  299. this.list = e.data.data.list;
  300. this.pageCount = e.data.data.page_count;
  301. this.page=e.data.data.page
  302. this.payment_type_list=e.data.data.payment_type_list
  303. this.exportList=e.data.data.export_list
  304. this.$emit('change-export-list', {search_data:this.search_data,export_list:e.data.data.export_list});
  305. } else {
  306. this.$message.error(e.data.msg);
  307. }
  308. }).catch(e => {
  309. this.listLoading = false;
  310. });
  311. },
  312. search(){
  313. if(this.selectDate && this.selectDate[0]){
  314. this.search_data.start = this.selectDate[0];
  315. this.search_data.end = this.selectDate[1];
  316. }else{
  317. this.search_data.start = '';
  318. this.search_data.end = '';
  319. }
  320. this.getlist()
  321. },
  322. // 获取选择的时间
  323. changeTime(e){
  324. console.log(e);
  325. if (e) {
  326. this.search_data.start=e[0]
  327. this.search_data.end=e[1]
  328. }else{
  329. this.search_data.start=''
  330. this.search_data.end=''
  331. }
  332. },
  333. // 获取分页的当前页数
  334. pagination(currentPage) {
  335. console.log(currentPage);
  336. this.getlist(currentPage)
  337. },
  338. }
  339. });
  340. </script>