customerStoreOrderList.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div>
  3. <el-table border v-loading="loading" :data="list" >
  4. <el-table-column label="订单号" align="center" prop="orderCode" width="200px" />
  5. <el-table-column label="所属公司" align="center" prop="companyName" />
  6. <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
  7. <el-table-column label="用户昵称" align="center" prop="nickname" width="150px" >
  8. <template slot-scope="scope">
  9. <span>{{scope.row.nickname}} </span>
  10. </template>
  11. </el-table-column>
  12. <el-table-column label="收件人" align="center" prop="realName" width="150px" >
  13. <template slot-scope="scope">
  14. <span>{{scope.row.realName}} </span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="订单金额" align="center" prop="totalPrice" >
  18. <template slot-scope="scope">
  19. <span v-if="scope.row.totalPrice!=null">{{scope.row.totalPrice.toFixed(2)}}</span>
  20. </template>
  21. </el-table-column>
  22. <el-table-column label="应付金额" align="center" prop="payPrice" >
  23. <template slot-scope="scope">
  24. <span v-if="scope.row.payPrice!=null">{{scope.row.payPrice.toFixed(2)}}</span>
  25. </template>
  26. </el-table-column>
  27. <el-table-column label="下单时间" align="center" prop="createTime" />
  28. <!-- <el-table-column label="支付状态" align="center" prop="paid" /> -->
  29. <el-table-column label="支付时间" align="center" prop="payTime" width="180">
  30. </el-table-column>
  31. <el-table-column label="支付方式" align="center" prop="payType" >
  32. <template slot-scope="scope">
  33. <el-tag prop="payType" v-for="(item, index) in payTypeOptions" v-if="scope.row.payType==item.dictValue">{{item.dictLabel}}</el-tag>
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="订单类型" align="center" prop="orderType" >
  37. <template slot-scope="scope">
  38. <el-tag prop="status" v-for="(item, index) in orderTypeOptions" v-if="scope.row.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="状态" align="center" prop="status" >
  42. <template slot-scope="scope">
  43. <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
  47. <template slot-scope="scope">
  48. <el-tag prop="status" v-for="(item, index) in deliveryStatusOptions" v-if="scope.row.deliveryStatus==item.dictValue">{{item.dictLabel}}</el-tag>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="物流结算状态" align="center" prop="deliveryPayStatus" >
  52. <template slot-scope="scope">
  53. <el-tag prop="status" v-for="(item, index) in deliveryPayStatusOptions" v-if="scope.row.deliveryPayStatus==item.dictValue">{{item.dictLabel}}</el-tag>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="操作" fixed="right" width="80px" align="center" class-name="small-padding fixed-width">
  57. <template slot-scope="scope">
  58. <el-button
  59. size="mini"
  60. type="text"
  61. @click="handleDetails(scope.row)"
  62. v-hasPermi="['store:storeOrder:query']"
  63. >查看</el-button>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <pagination
  68. v-show="total>0"
  69. :total="total"
  70. :page.sync="queryParams.pageNum"
  71. :limit.sync="queryParams.pageSize"
  72. @pagination="getList"
  73. />
  74. <el-drawer
  75. z-index = "999"
  76. size="75%"
  77. :title="show.title" :visible.sync="show.open"
  78. >
  79. <productOrder ref="order" />
  80. </el-drawer>
  81. </div>
  82. </template>
  83. <script>
  84. import { getCustomerOrderList } from "@/api/store/storeOrder";
  85. import productOrder from "../../store/components/productOrder2.vue";
  86. export default {
  87. components: { productOrder },
  88. name: "customerVisit",
  89. data() {
  90. return {
  91. deliveryPayStatusOptions:[],
  92. deliveryStatusOptions:[],
  93. orderTypeOptions:[],
  94. payTypeOptions:[],
  95. show:{
  96. open:false,
  97. title:"订单详情"
  98. },
  99. statusOptions:[],
  100. // 遮罩层
  101. loading: true,
  102. // 总条数
  103. total: 0,
  104. list: [],
  105. // 查询参数
  106. queryParams: {
  107. pageNum: 1,
  108. pageSize: 10,
  109. customerId: null,
  110. },
  111. };
  112. },
  113. created() {
  114. this.getDicts("store_order_type").then((response) => {
  115. this.orderTypeOptions = response.data;
  116. });
  117. this.getDicts("user_status").then((response) => {
  118. this.userStatusOptions = response.data;
  119. });
  120. this.getDicts("store_pay_type").then((response) => {
  121. this.payTypeOptions = response.data;
  122. });
  123. this.getDicts("store_order_status").then((response) => {
  124. this.statusOptions = response.data;
  125. });
  126. this.getDicts("store_order_delivery_status").then((response) => {
  127. this.deliveryStatusOptions = response.data;
  128. });
  129. this.getDicts("store_delivery_pay_status").then((response) => {
  130. this.deliveryPayStatusOptions = response.data;
  131. });
  132. },
  133. methods: {
  134. handleDetails(row){
  135. this.show.open=true;
  136. const orderId = row.id ;
  137. setTimeout(() => {
  138. this.$refs.order.getOrder(orderId);
  139. }, 500);
  140. },
  141. getData(customerId){
  142. this.queryParams.customerId=customerId;
  143. this.queryParams.pageNum=1;
  144. this.getList();
  145. },
  146. getList() {
  147. this.loading = true;
  148. getCustomerOrderList(this.queryParams).then(response => {
  149. this.list = response.rows;
  150. this.total = response.total;
  151. this.loading = false;
  152. });
  153. },
  154. }
  155. };
  156. </script>
  157. <style lang="scss" scoped>
  158. </style>