|
@@ -39,7 +39,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<div class="order-management-pagination">
|
|
<div class="order-management-pagination">
|
|
- <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
|
|
|
|
|
|
+ <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -72,18 +72,14 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
-
|
|
|
|
name: 'order-check',
|
|
name: 'order-check',
|
|
|
|
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
type: 3,
|
|
type: 3,
|
|
active: null,
|
|
active: null,
|
|
- colors: [
|
|
|
|
- '#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'
|
|
|
|
- ],
|
|
|
|
|
|
+ colors: ['#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'],
|
|
statusMap: {
|
|
statusMap: {
|
|
unprocessed: '未处理',
|
|
unprocessed: '未处理',
|
|
processed: '已确认',
|
|
processed: '已确认',
|
|
@@ -91,11 +87,11 @@ export default {
|
|
invalid: '已取消'
|
|
invalid: '已取消'
|
|
},
|
|
},
|
|
payMap: {
|
|
payMap: {
|
|
- '0': '微信',
|
|
|
|
- '1': '支付宝',
|
|
|
|
- '2': 'paypal',
|
|
|
|
- '3': '其他',
|
|
|
|
- '4': '货到付款'
|
|
|
|
|
|
+ 0: '微信',
|
|
|
|
+ 1: '支付宝',
|
|
|
|
+ 2: 'paypal',
|
|
|
|
+ 3: '其他',
|
|
|
|
+ 4: '货到付款'
|
|
},
|
|
},
|
|
paymentStatusMap: {
|
|
paymentStatusMap: {
|
|
unpaid: '未付款',
|
|
unpaid: '未付款',
|
|
@@ -105,43 +101,55 @@ export default {
|
|
partRefund: '部分退款',
|
|
partRefund: '部分退款',
|
|
refunded: '全额退款'
|
|
refunded: '全额退款'
|
|
},
|
|
},
|
|
- tabs: [{ name: '全部', idx: -1 }, { name: '未支付', idx: 0 }, { name: '待发货', idx: 1 }, { name: '已发货', idx: 2 }, { name: '已完成', idx: 3 }],
|
|
|
|
|
|
+ tabs: [
|
|
|
|
+ { name: '全部', idx: -1 },
|
|
|
|
+ { name: '未支付', idx: 0 },
|
|
|
|
+ { name: '待发货', idx: 1 },
|
|
|
|
+ { name: '已发货', idx: 2 },
|
|
|
|
+ { name: '已完成', idx: 3 }
|
|
|
|
+ ],
|
|
expandedArr: [],
|
|
expandedArr: [],
|
|
orders: [],
|
|
orders: [],
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
key_input: '',
|
|
key_input: '',
|
|
fullscreenLoading: false,
|
|
fullscreenLoading: false,
|
|
product: {
|
|
product: {
|
|
- 'name': '',
|
|
|
|
- 'packageName': '',
|
|
|
|
- 'count': '',
|
|
|
|
- 'amount': '',
|
|
|
|
- 'url': ''
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ packageName: '',
|
|
|
|
+ count: '',
|
|
|
|
+ amount: '',
|
|
|
|
+ url: ''
|
|
},
|
|
},
|
|
receive: {
|
|
receive: {
|
|
- 'name': '',
|
|
|
|
- 'phone': '',
|
|
|
|
- 'address': '',
|
|
|
|
- 'invoice': '',
|
|
|
|
- 'expressNum': ''
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ phone: '',
|
|
|
|
+ address: '',
|
|
|
|
+ invoice: '',
|
|
|
|
+ expressNum: ''
|
|
},
|
|
},
|
|
total: 0,
|
|
total: 0,
|
|
- options: [{
|
|
|
|
- value: undefined,
|
|
|
|
- label: '全部筛选订单'
|
|
|
|
- }, {
|
|
|
|
- value: 0,
|
|
|
|
- label: '未支付筛选订单'
|
|
|
|
- }, {
|
|
|
|
- value: 1,
|
|
|
|
- label: '待发货筛选订单'
|
|
|
|
- }, {
|
|
|
|
- value: 2,
|
|
|
|
- label: '已发货筛选订单'
|
|
|
|
- }, {
|
|
|
|
- value: 3,
|
|
|
|
- label: '已完成筛选订单'
|
|
|
|
- }],
|
|
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ value: undefined,
|
|
|
|
+ label: '全部筛选订单'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: 0,
|
|
|
|
+ label: '未支付筛选订单'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: 1,
|
|
|
|
+ label: '待发货筛选订单'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: 2,
|
|
|
|
+ label: '已发货筛选订单'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: 3,
|
|
|
|
+ label: '已完成筛选订单'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
selectValue: '',
|
|
selectValue: '',
|
|
// expressNum_input: "",
|
|
// expressNum_input: "",
|
|
searchDate: [],
|
|
searchDate: [],
|
|
@@ -151,31 +159,35 @@ export default {
|
|
hasClickSearch: false,
|
|
hasClickSearch: false,
|
|
tabIndex: -1,
|
|
tabIndex: -1,
|
|
pickerOptions2: {
|
|
pickerOptions2: {
|
|
- shortcuts: [{
|
|
|
|
- text: '最近一周',
|
|
|
|
- onClick (picker) {
|
|
|
|
- const end = new Date()
|
|
|
|
- const start = new Date()
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
|
- }
|
|
|
|
- }, {
|
|
|
|
- text: '最近一个月',
|
|
|
|
- onClick (picker) {
|
|
|
|
- const end = new Date()
|
|
|
|
- const start = new Date()
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
|
- }
|
|
|
|
- }, {
|
|
|
|
- text: '最近三个月',
|
|
|
|
- onClick (picker) {
|
|
|
|
- const end = new Date()
|
|
|
|
- const start = new Date()
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
|
|
|
+ shortcuts: [
|
|
|
|
+ {
|
|
|
|
+ text: '最近一周',
|
|
|
|
+ onClick (picker) {
|
|
|
|
+ const end = new Date()
|
|
|
|
+ const start = new Date()
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
+ picker.$emit('pick', [start, end])
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '最近一个月',
|
|
|
|
+ onClick (picker) {
|
|
|
|
+ const end = new Date()
|
|
|
|
+ const start = new Date()
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
|
+ picker.$emit('pick', [start, end])
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '最近三个月',
|
|
|
|
+ onClick (picker) {
|
|
|
|
+ const end = new Date()
|
|
|
|
+ const start = new Date()
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
|
+ picker.$emit('pick', [start, end])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }]
|
|
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -185,7 +197,9 @@ export default {
|
|
},
|
|
},
|
|
async updateAduitStatus (id, status) {
|
|
async updateAduitStatus (id, status) {
|
|
let m = status === 'A' ? 'I' : 'A'
|
|
let m = status === 'A' ? 'I' : 'A'
|
|
- let data = (await this.$http.get('/manager/goods/version/update/' + id + '/' + m))
|
|
|
|
|
|
+ let data = await this.$http.get(
|
|
|
|
+ '/manager/goods/version/update/' + id + '/' + m + '/' + this.type
|
|
|
|
+ )
|
|
this._searchOrderData(this.currentPage)
|
|
this._searchOrderData(this.currentPage)
|
|
},
|
|
},
|
|
async updateMaker () {
|
|
async updateMaker () {
|
|
@@ -219,9 +233,7 @@ export default {
|
|
if (pattern.test(expressNum)) {
|
|
if (pattern.test(expressNum)) {
|
|
this.$alert('快递单号不能为中文', '提示', {
|
|
this.$alert('快递单号不能为中文', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
- callback: action => {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ callback: (action) => {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -240,7 +252,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$alert('保存失败', '提示', {
|
|
this.$alert('保存失败', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
- callback: action => {}
|
|
|
|
|
|
+ callback: (action) => {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -283,7 +295,12 @@ export default {
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
this.status = this.tabIndex === -1 ? null : this.tabIndex
|
|
this.status = this.tabIndex === -1 ? null : this.tabIndex
|
|
|
|
|
|
- if (!this.searchDate || this.expressNum || !this.userName || !this.orderNum) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ !this.searchDate ||
|
|
|
|
+ this.expressNum ||
|
|
|
|
+ !this.userName ||
|
|
|
|
+ !this.orderNum
|
|
|
|
+ ) {
|
|
this._searchOrderData()
|
|
this._searchOrderData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -293,8 +310,8 @@ export default {
|
|
let date1, date2, userName, expressNum, orderNum
|
|
let date1, date2, userName, expressNum, orderNum
|
|
this.date1 = this.searchDate ? this.searchDate[0] : null
|
|
this.date1 = this.searchDate ? this.searchDate[0] : null
|
|
this.date2 = this.searchDate ? this.searchDate[1] : null
|
|
this.date2 = this.searchDate ? this.searchDate[1] : null
|
|
- date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
|
|
|
|
- date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
|
|
|
|
|
|
+ date1 = this.date1 ? this.date1 + ' 00:00:00' : null
|
|
|
|
+ date2 = this.date2 ? this.date2 + ' 23:59:59' : null
|
|
|
|
|
|
this.userName = userName = this.searchPhone || null
|
|
this.userName = userName = this.searchPhone || null
|
|
this.expressNum = expressNum = this.searchExpressNum || null
|
|
this.expressNum = expressNum = this.searchExpressNum || null
|
|
@@ -326,7 +343,7 @@ export default {
|
|
console.log(method, para)
|
|
console.log(method, para)
|
|
if (method === 'get') {
|
|
if (method === 'get') {
|
|
let paras = []
|
|
let paras = []
|
|
- Object.keys(para).forEach(k => {
|
|
|
|
|
|
+ Object.keys(para).forEach((k) => {
|
|
if (para[k] || typeof para[k] === 'number') {
|
|
if (para[k] || typeof para[k] === 'number') {
|
|
paras.push(`${k}=${para[k]}`)
|
|
paras.push(`${k}=${para[k]}`)
|
|
} else {
|
|
} else {
|
|
@@ -354,8 +371,8 @@ export default {
|
|
let date1, date2, userName, expressNum, orderNum
|
|
let date1, date2, userName, expressNum, orderNum
|
|
this.date1 = this.searchDate ? this.searchDate[0] : null
|
|
this.date1 = this.searchDate ? this.searchDate[0] : null
|
|
this.date2 = this.searchDate ? this.searchDate[1] : null
|
|
this.date2 = this.searchDate ? this.searchDate[1] : null
|
|
- date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
|
|
|
|
- date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
|
|
|
|
|
|
+ date1 = this.date1 ? this.date1 + ' 00:00:00' : null
|
|
|
|
+ date2 = this.date2 ? this.date2 + ' 23:59:59' : null
|
|
|
|
|
|
this.userName = userName = this.searchPhone || null
|
|
this.userName = userName = this.searchPhone || null
|
|
this.expressNum = expressNum = this.searchExpressNum || null
|
|
this.expressNum = expressNum = this.searchExpressNum || null
|
|
@@ -363,12 +380,12 @@ export default {
|
|
let status = this.status
|
|
let status = this.status
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
- 'type': this.status,
|
|
|
|
- 'startDate': date1,
|
|
|
|
- 'endDate': date2,
|
|
|
|
- 'orderSn': orderNum,
|
|
|
|
- 'phoneNum': userName,
|
|
|
|
- 'expressNum': expressNum
|
|
|
|
|
|
+ type: this.status,
|
|
|
|
+ startDate: date1,
|
|
|
|
+ endDate: date2,
|
|
|
|
+ orderSn: orderNum,
|
|
|
|
+ phoneNum: userName,
|
|
|
|
+ expressNum: expressNum
|
|
}
|
|
}
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
|
|
|
|
@@ -377,35 +394,39 @@ export default {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
- }).then(async () => {
|
|
|
|
- let exec = await this.$http({
|
|
|
|
- methods: 'get',
|
|
|
|
- params: data,
|
|
|
|
- url: '/manager/order/export',
|
|
|
|
- responseType: 'arraybuffer'
|
|
|
|
|
|
+ })
|
|
|
|
+ .then(async () => {
|
|
|
|
+ let exec = await this.$http({
|
|
|
|
+ methods: 'get',
|
|
|
|
+ params: data,
|
|
|
|
+ url: '/manager/order/export',
|
|
|
|
+ responseType: 'arraybuffer'
|
|
|
|
+ })
|
|
|
|
+ try {
|
|
|
|
+ let blob = new Blob([exec], { type: 'application/vnd.ms-excel' })
|
|
|
|
+ let url = URL.createObjectURL(blob)
|
|
|
|
+ location.href = url
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.error(e)
|
|
|
|
+ }
|
|
|
|
+ this.fullscreenLoading = false
|
|
})
|
|
})
|
|
- try {
|
|
|
|
- let blob = new Blob([exec], {type: 'application/vnd.ms-excel'})
|
|
|
|
- let url = URL.createObjectURL(blob)
|
|
|
|
- location.href = url
|
|
|
|
- } catch (e) {
|
|
|
|
- console.error(e)
|
|
|
|
- }
|
|
|
|
- this.fullscreenLoading = false
|
|
|
|
- }).catch(() => {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'info',
|
|
|
|
- message: '已取消导出'
|
|
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消导出'
|
|
|
|
+ })
|
|
|
|
+ this.fullscreenLoading = false
|
|
})
|
|
})
|
|
- this.fullscreenLoading = false
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
async _getOrderDetail (row) {
|
|
async _getOrderDetail (row) {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
- let data = (await this.$http.post('/manager/order/detail', {orderId: row.id})).data
|
|
|
|
- let temp = this.orders.find(item => item.id === row.id)
|
|
|
|
|
|
+ let data = (
|
|
|
|
+ await this.$http.post('/manager/order/detail', { orderId: row.id })
|
|
|
|
+ ).data
|
|
|
|
+ let temp = this.orders.find((item) => item.id === row.id)
|
|
|
|
|
|
- temp.items = data.orderItems.map(item => {
|
|
|
|
|
|
+ temp.items = data.orderItems.map((item) => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
product: {
|
|
product: {
|
|
@@ -438,11 +459,11 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
-@import url('./style.css');
|
|
|
|
|
|
+@import url("./style.css");
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style type="text/css">
|
|
<style type="text/css">
|
|
-.el-table__expand-icon>i {
|
|
|
|
|
|
+.el-table__expand-icon > i {
|
|
display: none !important;
|
|
display: none !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|