|
|
@@ -43,7 +43,7 @@
|
|
43
|
43
|
<el-tab-pane label="退回" name="2"></el-tab-pane>
|
|
44
|
44
|
<el-tab-pane label="通过" name="3"></el-tab-pane>
|
|
45
|
45
|
<el-tab-pane label="无货" name="4"></el-tab-pane>
|
|
46
|
|
- <el-tab-pane label="已分拣" name="5"></el-tab-pane> -->
|
|
|
46
|
+ <el-tab-pane label="已分拣" name="5"></el-tab-pane>-->
|
|
47
|
47
|
<el-tab-pane label="已发货" name="6"></el-tab-pane>
|
|
48
|
48
|
</el-tabs>
|
|
49
|
49
|
<el-table
|
|
|
@@ -86,7 +86,7 @@
|
|
86
|
86
|
<el-button
|
|
87
|
87
|
v-permission="'HY_afterSale'"
|
|
88
|
88
|
type="text"
|
|
89
|
|
- v-if="authority_afterSale(scope.row.F_Status,scope.row.IsSale)"
|
|
|
89
|
+ v-if="authority_afterSale(scope.row.F_Status)"
|
|
90
|
90
|
@click="btn_afterSale(scope.row.F_Id)"
|
|
91
|
91
|
>售后</el-button>
|
|
92
|
92
|
<el-button
|
|
|
@@ -110,91 +110,93 @@
|
|
110
|
110
|
</template>
|
|
111
|
111
|
|
|
112
|
112
|
<script>
|
|
113
|
|
-import { getDictionaryValueList } from '@/api/commonAPI'
|
|
|
113
|
+import { getDictionaryValueList } from "@/api/commonAPI";
|
|
114
|
114
|
import { getOrderLists } from "@/api/orderManagement/orderList";
|
|
115
|
115
|
import { pickerOptions } from "@/utils";
|
|
116
|
|
-import afterSale from './afterSale';
|
|
117
|
|
-import detail from "@/views/orderManagement/orderList/detail"
|
|
|
116
|
+import afterSale from "./afterSale";
|
|
|
117
|
+import detail from "@/views/orderManagement/orderList/detail";
|
|
118
|
118
|
import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
|
|
119
|
119
|
|
|
120
|
120
|
export default {
|
|
121
|
121
|
name: "SaleOrderList",
|
|
122
|
122
|
components: {
|
|
123
|
|
- Pagination
|
|
|
123
|
+ Pagination,
|
|
124
|
124
|
},
|
|
125
|
125
|
filters: {
|
|
126
|
|
- judgmentStateName (status) {
|
|
|
126
|
+ judgmentStateName(status) {
|
|
127
|
127
|
const statusMap = {
|
|
128
|
|
- '-1': '无效',
|
|
129
|
|
- '0': '暂存',
|
|
130
|
|
- '1': '提交',
|
|
131
|
|
- '2': '退回',
|
|
132
|
|
- '3': '通过',
|
|
133
|
|
- '4': '无货',
|
|
134
|
|
- '5': '已分拣',
|
|
135
|
|
- '6': '已发货'
|
|
136
|
|
- }
|
|
137
|
|
- return statusMap[status]
|
|
|
128
|
+ "-1": "无效",
|
|
|
129
|
+ 0: "暂存",
|
|
|
130
|
+ 1: "提交",
|
|
|
131
|
+ 2: "退回",
|
|
|
132
|
+ 3: "通过",
|
|
|
133
|
+ 4: "无货",
|
|
|
134
|
+ 5: "已分拣",
|
|
|
135
|
+ 6: "已发货",
|
|
|
136
|
+ };
|
|
|
137
|
+ return statusMap[status];
|
|
138
|
138
|
},
|
|
139
|
|
- judgmentStatusName (status) {
|
|
|
139
|
+ judgmentStatusName(status) {
|
|
140
|
140
|
const statusMap = {
|
|
141
|
|
- '0': '未发出',
|
|
142
|
|
- '1': '未签收',
|
|
143
|
|
- '2': '签收',
|
|
144
|
|
- '3': '改代收',
|
|
145
|
|
- '4': '拒收',
|
|
146
|
|
- }
|
|
147
|
|
- return statusMap[status]
|
|
|
141
|
+ 0: "未发出",
|
|
|
142
|
+ 1: "未签收",
|
|
|
143
|
+ 2: "签收",
|
|
|
144
|
+ 3: "改代收",
|
|
|
145
|
+ 4: "拒收",
|
|
|
146
|
+ };
|
|
|
147
|
+ return statusMap[status];
|
|
148
|
148
|
},
|
|
149
|
|
- judgmentOrderGoods (status) {
|
|
150
|
|
- let orderGoodsNameQuantity = ''
|
|
|
149
|
+ judgmentOrderGoods(status) {
|
|
|
150
|
+ let orderGoodsNameQuantity = "";
|
|
151
|
151
|
for (let i = 0; i < status.length; i++) {
|
|
152
|
|
- orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
|
|
|
152
|
+ orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`;
|
|
153
|
153
|
}
|
|
154
|
|
- orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
|
|
155
|
|
- return orderGoodsNameQuantity
|
|
|
154
|
+ orderGoodsNameQuantity = orderGoodsNameQuantity.substring(
|
|
|
155
|
+ 0,
|
|
|
156
|
+ orderGoodsNameQuantity.length - 1
|
|
|
157
|
+ );
|
|
|
158
|
+ return orderGoodsNameQuantity;
|
|
156
|
159
|
},
|
|
157
|
160
|
},
|
|
158
|
|
- data () {
|
|
|
161
|
+ data() {
|
|
159
|
162
|
return {
|
|
160
|
|
- sale:'',
|
|
161
|
163
|
loading: false,
|
|
162
|
164
|
searchData: {
|
|
163
|
|
- adFrom: '', //消息/广告媒体来源
|
|
164
|
|
- type: '', //订单类型
|
|
165
|
|
- id: '', //订单号
|
|
166
|
|
- customer: '', //客户姓名
|
|
167
|
|
- customerPhone: '', //客户手机号
|
|
168
|
|
- trackingNo: '', //运单号
|
|
169
|
|
- searchTime: '', //订单时间
|
|
|
165
|
+ adFrom: "", //消息/广告媒体来源
|
|
|
166
|
+ type: "", //订单类型
|
|
|
167
|
+ id: "", //订单号
|
|
|
168
|
+ customer: "", //客户姓名
|
|
|
169
|
+ customerPhone: "", //客户手机号
|
|
|
170
|
+ trackingNo: "", //运单号
|
|
|
171
|
+ searchTime: "", //订单时间
|
|
170
|
172
|
},
|
|
171
|
173
|
activeName: "-2", //标签切换首页
|
|
172
|
174
|
pickerOptions, // 日期数据
|
|
173
|
175
|
pageParams: {
|
|
174
|
176
|
pageindex: 1, // 当前第几页
|
|
175
|
177
|
pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
176
|
|
- total: 0 // 总共多少数据
|
|
|
178
|
+ total: 0, // 总共多少数据
|
|
177
|
179
|
},
|
|
178
|
180
|
dataLists: [], // 列表数据
|
|
179
|
181
|
multipleSelection: [], // 选中的数据
|
|
180
|
182
|
selectedId: [], // 选中的数据的id
|
|
181
|
|
- orderType: [],//订单类型
|
|
|
183
|
+ orderType: [], //订单类型
|
|
182
|
184
|
mergeOrderId: [], //合并订单id
|
|
183
|
185
|
};
|
|
184
|
186
|
},
|
|
185
|
|
- created () {
|
|
186
|
|
- this.getOrderType()
|
|
187
|
|
- this.getList()
|
|
188
|
|
- document.onkeyup = e => {
|
|
|
187
|
+ created() {
|
|
|
188
|
+ this.getOrderType();
|
|
|
189
|
+ this.getList();
|
|
|
190
|
+ document.onkeyup = (e) => {
|
|
189
|
191
|
if (e.keyCode === 13) {
|
|
190
|
192
|
this.getList();
|
|
191
|
193
|
}
|
|
192
|
194
|
};
|
|
193
|
195
|
},
|
|
194
|
196
|
methods: {
|
|
195
|
|
- getList () {
|
|
|
197
|
+ getList() {
|
|
196
|
198
|
this.loading = true;
|
|
197
|
|
- return new Promise(resolve => {
|
|
|
199
|
+ return new Promise((resolve) => {
|
|
198
|
200
|
const params = {
|
|
199
|
201
|
F_State: this.activeName, //订单状态
|
|
200
|
202
|
pageindex: this.pageParams.pageindex, // int 第几页
|
|
|
@@ -210,7 +212,7 @@ export default {
|
|
210
|
212
|
F_PayState: -2,
|
|
211
|
213
|
state: 0,
|
|
212
|
214
|
};
|
|
213
|
|
- getOrderLists(params).then(response => {
|
|
|
215
|
+ getOrderLists(params).then((response) => {
|
|
214
|
216
|
this.loading = false;
|
|
215
|
217
|
if (response.state.toLowerCase() === "success") {
|
|
216
|
218
|
this.pageParams.total = response.data.Totals;
|
|
|
@@ -221,87 +223,91 @@ export default {
|
|
221
|
223
|
});
|
|
222
|
224
|
},
|
|
223
|
225
|
// 获取订单类型
|
|
224
|
|
- getOrderType () {
|
|
225
|
|
- return new Promise(resolve => {
|
|
|
226
|
+ getOrderType() {
|
|
|
227
|
+ return new Promise((resolve) => {
|
|
226
|
228
|
const params = {
|
|
227
|
229
|
isleaf: true,
|
|
228
|
|
- code: 'ORDERTYPE'
|
|
229
|
|
- }
|
|
230
|
|
- getDictionaryValueList(params).then(response => {
|
|
231
|
|
- if (response.state.toLowerCase() === 'success') {
|
|
232
|
|
- this.orderType = response.data.Rows
|
|
|
230
|
+ code: "ORDERTYPE",
|
|
|
231
|
+ };
|
|
|
232
|
+ getDictionaryValueList(params).then((response) => {
|
|
|
233
|
+ if (response.state.toLowerCase() === "success") {
|
|
|
234
|
+ this.orderType = response.data.Rows;
|
|
233
|
235
|
}
|
|
234
|
|
- })
|
|
235
|
|
- })
|
|
|
236
|
+ });
|
|
|
237
|
+ });
|
|
236
|
238
|
},
|
|
237
|
|
- handleTabClick (tab, event) {
|
|
238
|
|
- this.pageParams.pageindex=1
|
|
239
|
|
- this.getList()
|
|
|
239
|
+ handleTabClick(tab, event) {
|
|
|
240
|
+ this.pageParams.pageindex = 1;
|
|
|
241
|
+
|
|
|
242
|
+ this.getList();
|
|
240
|
243
|
},
|
|
241
|
|
- btn_search () {
|
|
|
244
|
+ btn_search() {
|
|
242
|
245
|
this.pageParams.pageindex = 1;
|
|
243
|
246
|
this.getList();
|
|
244
|
247
|
},
|
|
245
|
|
- authority_collection (status) {
|
|
|
248
|
+ authority_collection(status) {
|
|
246
|
249
|
if (status == 1) {
|
|
247
|
|
- return true
|
|
|
250
|
+ return true;
|
|
248
|
251
|
} else {
|
|
249
|
|
- return false
|
|
|
252
|
+ return false;
|
|
250
|
253
|
}
|
|
251
|
254
|
},
|
|
252
|
|
- authority_afterSale (status,sale) {
|
|
253
|
|
- if (status == 2 || sale <=0 ) {
|
|
254
|
|
- return true
|
|
|
255
|
+ authority_afterSale(status) {
|
|
|
256
|
+ if (status == 2) {
|
|
|
257
|
+ return true;
|
|
255
|
258
|
} else {
|
|
256
|
|
- return false
|
|
|
259
|
+ return false;
|
|
257
|
260
|
}
|
|
258
|
261
|
},
|
|
259
|
262
|
//售后
|
|
260
|
|
- btn_afterSale (afterSalesId) {
|
|
|
263
|
+ btn_afterSale(afterSalesId) {
|
|
261
|
264
|
this.$layer.iframe({
|
|
262
|
265
|
content: {
|
|
263
|
266
|
content: afterSale, // 传递的组件对象
|
|
264
|
267
|
parent: this, // 当前的vue对象
|
|
265
|
|
- data: { rowid: afterSalesId } // props
|
|
|
268
|
+ data: { rowid: afterSalesId }, // props
|
|
266
|
269
|
},
|
|
267
|
270
|
area: ["80%", "80%"],
|
|
268
|
|
- title: "售后内容"
|
|
|
271
|
+ title: "售后内容",
|
|
269
|
272
|
});
|
|
270
|
273
|
},
|
|
271
|
274
|
//改代收
|
|
272
|
|
- btn_collection (collectionId) {
|
|
|
275
|
+ btn_collection(collectionId) {
|
|
273
|
276
|
this.$layer.iframe({
|
|
274
|
277
|
content: {
|
|
275
|
278
|
content: afterSale, // 传递的组件对象
|
|
276
|
279
|
parent: this, // 当前的vue对象
|
|
277
|
|
- data: { rowid: collectionId, collectionAfterSalesReasonType: '改代收' } // props
|
|
|
280
|
+ data: {
|
|
|
281
|
+ rowid: collectionId,
|
|
|
282
|
+ collectionAfterSalesReasonType: "改代收",
|
|
|
283
|
+ }, // props
|
|
278
|
284
|
},
|
|
279
|
285
|
area: ["80%", "80%"],
|
|
280
|
|
- title: "改代收"
|
|
|
286
|
+ title: "改代收",
|
|
281
|
287
|
});
|
|
282
|
288
|
},
|
|
283
|
289
|
//详情
|
|
284
|
|
- hadndleOrderCode (ordercode) {
|
|
|
290
|
+ hadndleOrderCode(ordercode) {
|
|
285
|
291
|
this.$layer.iframe({
|
|
286
|
292
|
content: {
|
|
287
|
293
|
content: detail, // 传递的组件对象
|
|
288
|
294
|
parent: this, // 当前的vue对象
|
|
289
|
|
- data: { 'rowid': ordercode }// props
|
|
|
295
|
+ data: { rowid: ordercode }, // props
|
|
290
|
296
|
},
|
|
291
|
|
- area: ['80%', '90%'],
|
|
292
|
|
- title: '订单详情'
|
|
293
|
|
- })
|
|
|
297
|
+ area: ["80%", "90%"],
|
|
|
298
|
+ title: "订单详情",
|
|
|
299
|
+ });
|
|
294
|
300
|
},
|
|
295
|
301
|
//选择多个
|
|
296
|
|
- handleSelectionChange (val) {
|
|
297
|
|
- const ids = []
|
|
298
|
|
- this.multipleSelection = val
|
|
|
302
|
+ handleSelectionChange(val) {
|
|
|
303
|
+ const ids = [];
|
|
|
304
|
+ this.multipleSelection = val;
|
|
299
|
305
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
300
|
|
- ids.push(this.multipleSelection[i].F_Id)
|
|
|
306
|
+ ids.push(this.multipleSelection[i].F_Id);
|
|
301
|
307
|
}
|
|
302
|
|
- this.mergeOrderId = ids
|
|
|
308
|
+ this.mergeOrderId = ids;
|
|
303
|
309
|
},
|
|
304
|
|
- }
|
|
|
310
|
+ },
|
|
305
|
311
|
};
|
|
306
|
312
|
</script>
|
|
307
|
313
|
|