|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
<template>
|
|
2
|
|
- <div v-loading="loading" >
|
|
|
2
|
+ <div v-loading="loading">
|
|
3
|
3
|
<el-table :data="dataLists" border stripe>
|
|
4
|
|
- <el-table-column type="index" label="编号" align="center" fixed width="80"/>
|
|
|
4
|
+ <el-table-column type="index" label="编号" align="center" fixed width="80" />
|
|
5
|
5
|
<el-table-column prop="F_Id" label="订单编号" align="center" min-width="140">
|
|
6
|
6
|
<template slot-scope="scope">
|
|
7
|
7
|
<!-- <el-tooltip content="点击查看工单详情" placement="top"> -->
|
|
|
@@ -12,20 +12,34 @@
|
|
12
|
12
|
<el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
|
|
13
|
13
|
<el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
|
|
14
|
14
|
<el-table-column label="订购商品" align="center" min-width>
|
|
15
|
|
- <template slot-scope="scope">
|
|
16
|
|
- {{ scope.row.OrderDetailList | judgmentOrderGoods }}
|
|
17
|
|
- </template>
|
|
|
15
|
+ <template slot-scope="scope">{{ scope.row.OrderDetailList | judgmentOrderGoods }}</template>
|
|
18
|
16
|
</el-table-column>
|
|
19
|
17
|
<el-table-column prop="F_AddTime" label="下单日期" align="center" />
|
|
20
|
|
- <el-table-column label="订单状态" align="center" >
|
|
21
|
|
- <template slot-scope="scope">
|
|
22
|
|
- {{ scope.row.F_State | judgmentStateName }}
|
|
23
|
|
- </template>
|
|
|
18
|
+ <el-table-column label="订单状态" align="center">
|
|
|
19
|
+ <template slot-scope="scope">{{ scope.row.F_State | judgmentStateName }}</template>
|
|
24
|
20
|
</el-table-column>
|
|
25
|
21
|
<el-table-column prop="F_AddUserName" label="下单员工" align="center" />
|
|
26
|
22
|
<el-table-column prop="F_BelongName" label="归属员工" align="center" />
|
|
27
|
23
|
<el-table-column prop="F_Type" label="订单类型" align="center" />
|
|
28
|
24
|
<el-table-column prop="F_Express" label="快递公司" align="center" />
|
|
|
25
|
+ <el-table-column label="物流状态" align="center">
|
|
|
26
|
+ <template slot-scope="scope">{{ scope.row.F_Status | judgmentStatusName }}</template>
|
|
|
27
|
+ </el-table-column>
|
|
|
28
|
+ <el-table-column label="操作" width="240" align="center" class-name="oparate_btn" fixed="right">
|
|
|
29
|
+ <template slot-scope="scope">
|
|
|
30
|
+ <el-button
|
|
|
31
|
+ type="text"
|
|
|
32
|
+ v-show="orderTrue"
|
|
|
33
|
+ v-if="authority_afterSale(scope.row.F_Status)"
|
|
|
34
|
+ @click="btn_afterSale(scope.row.F_Id)"
|
|
|
35
|
+ >售后</el-button>
|
|
|
36
|
+ <el-button
|
|
|
37
|
+ type="text"
|
|
|
38
|
+ v-if="authority_collection(scope.row.F_Status)"
|
|
|
39
|
+ @click="btn_collection(scope.row.F_Id)"
|
|
|
40
|
+ >改代收</el-button>
|
|
|
41
|
+ </template>
|
|
|
42
|
+ </el-table-column>
|
|
29
|
43
|
</el-table>
|
|
30
|
44
|
<pagination
|
|
31
|
45
|
v-show="pageParams.total > 0"
|
|
|
@@ -34,8 +48,8 @@
|
|
34
|
48
|
:pagesize.sync="pageParams.pagesize"
|
|
35
|
49
|
:auto-scroll="false"
|
|
36
|
50
|
class="pagination"
|
|
37
|
|
- @pagination="getList" />
|
|
38
|
|
-
|
|
|
51
|
+ @pagination="getList"
|
|
|
52
|
+ />
|
|
39
|
53
|
</div>
|
|
40
|
54
|
</template>
|
|
41
|
55
|
<script>
|
|
|
@@ -43,6 +57,7 @@
|
|
43
|
57
|
import { orderStateFilter, orderStateTypeFilter, formatterContent } from '@/filters'
|
|
44
|
58
|
import { getOrderLists } from '@/api/orderManagement/orderList'
|
|
45
|
59
|
import detail from '@/views/orderManagement/orderList/detail'
|
|
|
60
|
+import afterSale from './afterSale'
|
|
46
|
61
|
import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
|
|
47
|
62
|
|
|
48
|
63
|
export default {
|
|
|
@@ -51,7 +66,7 @@ export default {
|
|
51
|
66
|
Pagination
|
|
52
|
67
|
},
|
|
53
|
68
|
filters: {
|
|
54
|
|
- judgmentStateName(status) {
|
|
|
69
|
+ judgmentStateName (status) {
|
|
55
|
70
|
const statusMap = {
|
|
56
|
71
|
'-1': '无效',
|
|
57
|
72
|
'0': '暂存',
|
|
|
@@ -64,14 +79,24 @@ export default {
|
|
64
|
79
|
}
|
|
65
|
80
|
return statusMap[status]
|
|
66
|
81
|
},
|
|
67
|
|
- judgmentOrderGoods(status) {
|
|
|
82
|
+ judgmentOrderGoods (status) {
|
|
68
|
83
|
let orderGoodsNameQuantity = ''
|
|
69
|
84
|
for (let i = 0; i < status.length; i++) {
|
|
70
|
85
|
orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
|
|
71
|
86
|
}
|
|
72
|
87
|
orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
|
|
73
|
88
|
return orderGoodsNameQuantity
|
|
74
|
|
- }
|
|
|
89
|
+ },
|
|
|
90
|
+ judgmentStatusName (status) {
|
|
|
91
|
+ const statusMap = {
|
|
|
92
|
+ '0': '未发出',
|
|
|
93
|
+ '1': '未签收',
|
|
|
94
|
+ '2': '签收',
|
|
|
95
|
+ '3': '改代收',
|
|
|
96
|
+ '4': '拒收',
|
|
|
97
|
+ }
|
|
|
98
|
+ return statusMap[status]
|
|
|
99
|
+ },
|
|
75
|
100
|
},
|
|
76
|
101
|
props: {
|
|
77
|
102
|
callinNum: {
|
|
|
@@ -83,9 +108,11 @@ export default {
|
|
83
|
108
|
default: ''
|
|
84
|
109
|
}
|
|
85
|
110
|
},
|
|
86
|
|
- data() {
|
|
|
111
|
+ data () {
|
|
87
|
112
|
return {
|
|
88
|
113
|
loading: false,
|
|
|
114
|
+ activeName: "-2", //标签切换首页
|
|
|
115
|
+ orderTrue: false,
|
|
89
|
116
|
pageParams: {
|
|
90
|
117
|
pageindex: 1, // 当前第几页
|
|
91
|
118
|
pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
|
@@ -94,14 +121,18 @@ export default {
|
|
94
|
121
|
dataLists: [] // 列表数据
|
|
95
|
122
|
}
|
|
96
|
123
|
},
|
|
97
|
|
- created() {
|
|
|
124
|
+ created () {
|
|
98
|
125
|
this.getList()
|
|
|
126
|
+ if (window.localStorage.getItem("roleCode") === 'SH') {
|
|
|
127
|
+ this.orderTrue = true
|
|
|
128
|
+ }
|
|
99
|
129
|
},
|
|
100
|
130
|
methods: {
|
|
101
|
|
- getList() {
|
|
|
131
|
+ getList () {
|
|
102
|
132
|
this.loading = true
|
|
103
|
133
|
return new Promise(resolve => {
|
|
104
|
134
|
const params = {
|
|
|
135
|
+ F_State: this.activeName, //订单状态
|
|
105
|
136
|
pageindex: this.pageParams.pageindex, // int 第几页
|
|
106
|
137
|
pagesize: this.pageParams.pagesize, // int 每页几条信息
|
|
107
|
138
|
phone: this.callinNum // 否 string 模糊查询(号码)
|
|
|
@@ -116,7 +147,7 @@ export default {
|
|
116
|
147
|
resolve()
|
|
117
|
148
|
})
|
|
118
|
149
|
},
|
|
119
|
|
- btn_detail(editId) {
|
|
|
150
|
+ btn_detail (editId) {
|
|
120
|
151
|
this.$layer.iframe({
|
|
121
|
152
|
content: {
|
|
122
|
153
|
content: detail, // 传递的组件对象
|
|
|
@@ -129,11 +160,48 @@ export default {
|
|
129
|
160
|
this.getList()
|
|
130
|
161
|
}
|
|
131
|
162
|
})
|
|
|
163
|
+ },
|
|
|
164
|
+ //售后
|
|
|
165
|
+ btn_afterSale (afterSalesId) {
|
|
|
166
|
+ this.$layer.iframe({
|
|
|
167
|
+ content: {
|
|
|
168
|
+ content: afterSale, // 传递的组件对象
|
|
|
169
|
+ parent: this, // 当前的vue对象
|
|
|
170
|
+ data: { rowid: afterSalesId } // props
|
|
|
171
|
+ },
|
|
|
172
|
+ area: ["80%", "80%"],
|
|
|
173
|
+ title: "售后内容"
|
|
|
174
|
+ });
|
|
|
175
|
+ },
|
|
|
176
|
+ //改代收
|
|
|
177
|
+ btn_collection (collectionId) {
|
|
|
178
|
+ this.$layer.iframe({
|
|
|
179
|
+ content: {
|
|
|
180
|
+ content: afterSale, // 传递的组件对象
|
|
|
181
|
+ parent: this, // 当前的vue对象
|
|
|
182
|
+ data: { rowid: collectionId, collectionAfterSalesReasonType: '改代收' } // props
|
|
|
183
|
+ },
|
|
|
184
|
+ area: ["80%", "80%"],
|
|
|
185
|
+ title: "改代收"
|
|
|
186
|
+ });
|
|
|
187
|
+ },
|
|
|
188
|
+ authority_collection (status) {
|
|
|
189
|
+ if (status == 1 && this.orderTrue) {
|
|
|
190
|
+ return true
|
|
|
191
|
+ } else {
|
|
|
192
|
+ return false
|
|
|
193
|
+ }
|
|
|
194
|
+ },
|
|
|
195
|
+ authority_afterSale (status) {
|
|
|
196
|
+ if (status == 2 && this.orderTrue) {
|
|
|
197
|
+ return true
|
|
|
198
|
+ } else {
|
|
|
199
|
+ return false
|
|
|
200
|
+ }
|
|
132
|
201
|
}
|
|
133
|
202
|
}
|
|
134
|
203
|
}
|
|
135
|
204
|
</script>
|
|
136
|
205
|
|
|
137
|
206
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
138
|
|
-
|
|
139
|
207
|
</style>
|