list.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <div class="filter-control">
  5. <span>订单ID:</span>
  6. <el-input
  7. v-model="listQuery.orderId"
  8. style="width:180px;"
  9. placeholder="订单ID"
  10. clearable
  11. @input="e => (listQuery.orderId = checkedInput(e))"
  12. @keyup.enter.native="getList"
  13. @clear="getList"
  14. />
  15. </div>
  16. <div class="filter-control">
  17. <span>订单号:</span>
  18. <el-input
  19. v-model="listQuery.orderNo"
  20. style="width:180px;"
  21. placeholder="订单号"
  22. clearable
  23. @keyup.enter.native="getList"
  24. @clear="getList"
  25. />
  26. </div>
  27. <div class="filter-control">
  28. <span>机构名称:</span>
  29. <el-input
  30. v-model="listQuery.clubName"
  31. style="width:180px;"
  32. placeholder="机构名称"
  33. clearable
  34. @keyup.enter.native="getList"
  35. @clear="getList"
  36. />
  37. </div>
  38. <div class="filter-control">
  39. <span>收货人:</span>
  40. <el-input
  41. v-model="listQuery.receiver"
  42. style="width:180px;"
  43. placeholder="收货人"
  44. clearable
  45. @keyup.enter.native="getList"
  46. @clear="getList"
  47. />
  48. </div>
  49. <div class="filter-control">
  50. <span>商品名称:</span>
  51. <el-input
  52. v-model="listQuery.productName"
  53. style="width:180px;"
  54. placeholder="商品名称"
  55. clearable
  56. @keyup.enter.native="getList"
  57. @clear="getList"
  58. />
  59. </div>
  60. <div class="filter-control">
  61. <span>订单状态:</span>
  62. <el-select v-model="listQuery.status" style="width:180px;" clearable @change="getList">
  63. <el-option value="" label="所有" />
  64. <el-option label="交易中" value="99" />
  65. <el-option label="交易完成" value="4" />
  66. <el-option label="订单完成" value="5" />
  67. <el-option label="已关闭" value="6" />
  68. <el-option label="交易全退" value="7" />
  69. </el-select>
  70. </div>
  71. <div class="filter-control">
  72. <span>收款状态:</span>
  73. <el-select v-model="listQuery.receiptStatus" style="width:180px;" clearable @change="getList">
  74. <el-option value="" label="所有" />
  75. <el-option label="待收款" value="1" />
  76. <el-option label="部分收款" value="2" />
  77. <el-option label="已收款" value="3" />
  78. </el-select>
  79. </div>
  80. <div class="filter-control">
  81. <span>发货状态:</span>
  82. <el-select v-model="listQuery.sendOutStatus" style="width:180px;" clearable @change="getList">
  83. <el-option value="" label="所有" />
  84. <el-option label="待发货" value="1" />
  85. <el-option label="部分发货" value="2" />
  86. <el-option label="已发货" value="3" />
  87. </el-select>
  88. </div>
  89. <div class="filter-control">
  90. <span>付款状态:</span>
  91. <el-select v-model="listQuery.payStatus" style="width:180px;" clearable @change="getList">
  92. <el-option value="" label="所有" />
  93. <el-option label="待付款" value="1" />
  94. <el-option label="部分付款" value="2" />
  95. <el-option label="已付款" value="3" />
  96. </el-select>
  97. </div>
  98. <div class="filter-control">
  99. <span>退款状态:</span>
  100. <el-select v-model="listQuery.refundType" style="width:180px;" clearable @change="getList">
  101. <el-option value="" label="所有" />
  102. <el-option label="无退款" value="0" />
  103. <el-option label="部分退款" value="1" />
  104. <el-option label="已退款" value="2" />
  105. </el-select>
  106. </div>
  107. <div class="filter-control">
  108. <span>下单时间:</span>
  109. <el-date-picker
  110. v-model="time"
  111. type="daterange"
  112. unlink-panels
  113. range-separator="至"
  114. start-placeholder="开始日期"
  115. end-placeholder="结束日期"
  116. :picker-options="pickerOptions"
  117. @change="getList"
  118. />
  119. </div>
  120. <div class="filter-control orderSource">
  121. <span>订单类型:</span>
  122. <el-select v-model="listQuery.orderType" style="width:180px;" @change="getList">
  123. <el-option label="所有" value="" />
  124. <el-option label="采购员订单" :value="0" />
  125. <el-option label="自主订单" :value="1" />
  126. </el-select>
  127. </div>
  128. <div class="filter-control orderSource">
  129. <span>订单来源:</span>
  130. <el-select v-model="listQuery.organizeId" style="width:180px;" @change="getList">
  131. <el-option label="【丽格集采联盟】平台" :value="4" />
  132. </el-select>
  133. </div>
  134. <div class="filter-control">
  135. <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
  136. </div>
  137. </div>
  138. <el-table
  139. v-loading="listLoading"
  140. :data="list"
  141. element-loading-text="Loading"
  142. border
  143. fit
  144. highlight-current-row
  145. :header-cell-style="{background:'#eef1f6',color:'#606266'}"
  146. >
  147. <el-table-column label="订单ID" align="center" prop="orderId" width="65" />
  148. <el-table-column label="订单编号" align="center" prop="orderNo" />
  149. <el-table-column label="订单类型" align="center" prop="payTotalFee">
  150. <template slot-scope="{row}">
  151. {{ row.orderType === 1 ? '自主订单' : '采购员订单' }}
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="机构" align="center" prop="clubName" />
  155. <el-table-column label="收货人" align="center" prop="receiver" width="100" />
  156. <!-- <el-table-column label="订单状态" align="center" prop="status" width="120">
  157. <template slot-scope="{row}">
  158. <template v-if="['11'].indexOf(row.status)>=0">
  159. <el-tag type="success" size="small">交易中</el-tag>
  160. </template>
  161. <template v-else>
  162. <el-tag :type="row.status*1===6?'info':''" size="small">{{ row.status | orderStatusFilter }}</el-tag>
  163. </template>
  164. </template>
  165. </el-table-column> -->
  166. <el-table-column label="收款状态" align="center" prop="receiptStatus" width="120">
  167. <template slot-scope="{row}">
  168. <el-tag v-if="row.receiptStatus*1===1" type="danger" size="small">待收款</el-tag>
  169. <el-tag v-if="row.receiptStatus*1===2" type="warning" size="small">部分收款</el-tag>
  170. <el-tag v-if="row.receiptStatus*1===3" type="success" size="small">已收款</el-tag>
  171. </template>
  172. </el-table-column>
  173. <!-- <el-table-column label="付款状态" align="center" prop="receiptStatus" width="120">
  174. <template slot-scope="{row}">
  175. <el-tag v-if="row.payStatus*1===1" type="danger" size="small">待付款</el-tag>
  176. <el-tag v-if="row.payStatus*1===2" type="warning" size="small">部分付款</el-tag>
  177. <el-tag v-if="row.payStatus*1===3" type="success" size="small">已付款</el-tag>
  178. </template>
  179. </el-table-column> -->
  180. <el-table-column label="发货状态" align="center" prop="sendOutStatus" width="120">
  181. <template slot-scope="{row}">
  182. <el-tag v-if="row.sendOutStatus*1===1" type="danger" size="small">待发货</el-tag>
  183. <el-tag v-if="row.sendOutStatus*1===2" type="warning" size="small">部分发货</el-tag>
  184. <el-tag v-if="row.sendOutStatus*1===3" type="success" size="small">已发货</el-tag>
  185. </template>
  186. </el-table-column>
  187. <!-- <el-table-column label="退款状态" align="center" prop="refundType" width="120">
  188. <template slot-scope="{row}">
  189. <el-tag v-if="row.refundType*1===1" type="info" size="small">部分退款</el-tag>
  190. <el-tag v-else-if="row.refundType*1===2" type="info" size="small">全部退款</el-tag>
  191. <el-tag v-else type="info" size="small">无退款</el-tag>
  192. </template>
  193. </el-table-column> -->
  194. <el-table-column label="订单金额" align="center" prop="payTotalFee">
  195. <template slot-scope="{row}">
  196. ¥{{ row.payTotalFee | toThousandFloatFilter }}
  197. </template>
  198. </el-table-column>
  199. <el-table-column align="center" label="下单时间" prop="orderTime" width="100">
  200. <template v-if="row.orderTime" slot-scope="{row}">
  201. <span>{{ row.orderTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  202. </template>
  203. </el-table-column>
  204. <el-table-column label="操作" align="center" width="120">
  205. <template slot-scope="{row}">
  206. <el-button type="primary" size="mini" @click="handleDetailes(row.orderId)">查看详情</el-button>
  207. </template>
  208. </el-table-column>
  209. </el-table>
  210. <pagination v-show="total>10" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="getList" />
  211. <Remarks dialog-title="订单备注信息" :is-visible.sync="dialogRemarksVisible" :order-id="dialogRemarksOrderId" :remark-list="dialogRemarkList" />
  212. <template>
  213. <el-backtop style="right: 40px; bottom: 40px;">
  214. <i class="el-icon-upload2" />
  215. </el-backtop>
  216. </template>
  217. </div>
  218. </template>
  219. <script>
  220. import { getList, getRemarks } from '@/api/order'
  221. import pickerOptions from '@/utils/time-picker.js'
  222. import Remarks from './components/remarks'
  223. export default {
  224. components: { Remarks },
  225. data() {
  226. return {
  227. time: '',
  228. pickerOptions,
  229. list: null,
  230. listLoading: true,
  231. total: 0,
  232. dialogRemarkList: [],
  233. dialogRemarksVisible: false,
  234. dialogRemarksOrderId: 0,
  235. listQuery: {
  236. index: 1,
  237. pageSize: 10,
  238. orderType: '',
  239. organizeId: 4,
  240. orderId: '',
  241. orderNo: '',
  242. buyer: '',
  243. receiver: '',
  244. status: '',
  245. receiptStatus: '',
  246. sendOutStatus: '',
  247. refundType: '',
  248. returnedPurchaseStatus: '',
  249. startTime: '',
  250. endTime: ''
  251. }
  252. }
  253. },
  254. computed: {
  255. organizeId() {
  256. return this.$store.getters.organizeId
  257. }
  258. },
  259. created() {
  260. this.getList()
  261. },
  262. methods: {
  263. initTime() {
  264. // 初始化获取时间筛选值
  265. if (this.time && this.time.length > 0) {
  266. this.listQuery.startTime = this.time[0]
  267. this.listQuery.endTime = this.time[1]
  268. } else {
  269. this.listQuery.startTime = ''
  270. this.listQuery.endTime = ''
  271. }
  272. },
  273. getList() {
  274. this.listLoading = true
  275. this.initTime()
  276. getList(this.listQuery).then(response => {
  277. this.list = response.data.results
  278. this.total = response.data.totalRecord
  279. this.listLoading = false
  280. }).catch(() => {
  281. this.listLoading = false
  282. })
  283. },
  284. // 查看订单详情
  285. handleDetailes(orderId) {
  286. this.$router.push({ path: '/order/detail', query: { orderId: orderId }})
  287. },
  288. checkedInput(event) {
  289. const pattern = /[^0-9.]/g
  290. return event.replace(pattern, '')
  291. },
  292. RemarksOrder: function(id) {
  293. getRemarks({ orderID: id }).then(response => {
  294. this.dialogRemarkList = response.data
  295. })
  296. this.dialogRemarksOrderId = id
  297. this.dialogRemarksVisible = true
  298. }
  299. }
  300. }
  301. </script>
  302. <style scoped lang="scss">
  303. .el-form-item{
  304. margin-bottom: 0
  305. }
  306. .date-box{
  307. margin-right:0;
  308. }
  309. .orderSource {
  310. ::v-deep .el-select {
  311. width: 200px !important;
  312. }
  313. }
  314. </style>