2023-3-27
This commit is contained in:
@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"',
|
||||
BASE_API: '"http://mall.yyundong.com/adminapi"',
|
||||
// BASE_API: '"http://192.168.3.9:8085"'
|
||||
// BASE_API: '"http://mall.yyundong.com/adminapi"',
|
||||
BASE_API: '"http://192.168.3.9:8085"'
|
||||
// BASE_API: '"http://127.0.0.1:8085"'
|
||||
})
|
||||
|
||||
@@ -70,7 +70,7 @@ export function orderData(params) {
|
||||
|
||||
export function exportExcel(params) {
|
||||
return request({
|
||||
url: '/base/v1/basevehicleout/exportExcel',
|
||||
url: '/oms/OmsOrder/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: params,
|
||||
@@ -78,4 +78,13 @@ export function exportExcel(params) {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// export function exportExcel(params) {
|
||||
// return request({
|
||||
// url: '/oms/OmsOrder/exportExcel',
|
||||
// method: 'get',
|
||||
// params: params
|
||||
// })
|
||||
// }
|
||||
@@ -85,7 +85,7 @@ export function orderData(params) {
|
||||
|
||||
export function exportExcel(params) {
|
||||
return request({
|
||||
url: '/base/v1/basevehicleout/exportExcel',
|
||||
url: '/oms/OmsOrder/exportExcel2',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: params,
|
||||
|
||||
@@ -121,9 +121,14 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets"></i>
|
||||
<span>数据列表</span>
|
||||
|
||||
<el-button style="margin-top: -5px;" type="primary" class="btn-add" @click="doExport()" size="small">
|
||||
导出Excel
|
||||
</el-button>
|
||||
<el-button v-show="status==0||status==2" style="margin-top: -5px;" type="primary" class="btn-add"
|
||||
@click="doBatch()" size="small">
|
||||
批量发货
|
||||
</el-button>
|
||||
</el-card>
|
||||
<!-- <div class="batch-operate-container">
|
||||
<el-checkbox v-model="printChecked" @change="batchSelection"
|
||||
@@ -233,7 +238,8 @@
|
||||
fetchList,
|
||||
closeOrder,
|
||||
deleteOrder,
|
||||
orderData
|
||||
orderData,
|
||||
exportExcel
|
||||
} from '@/api/order';
|
||||
import {
|
||||
formatDate
|
||||
@@ -493,7 +499,37 @@
|
||||
this.orderDatas(this.listQuery.status);
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
|
||||
console.log("val》》》》》", val)
|
||||
|
||||
for (var i = 0; i < val.length; i++) {
|
||||
|
||||
if (val[i].status != 2) {
|
||||
this.$message({
|
||||
message: '请选择待发货状态的订单',
|
||||
type: 'warning',
|
||||
duration: 1000
|
||||
});
|
||||
|
||||
let index = this.list.findIndex((item) => {
|
||||
|
||||
return item.id === val[i].id
|
||||
|
||||
})
|
||||
|
||||
console.log("index》》》》》", index)
|
||||
//dom更新完才执行nextTick回调
|
||||
this.$refs.orderTable.toggleRowSelection(this.list[index], false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.multipleSelection = val;
|
||||
|
||||
|
||||
},
|
||||
handleViewOrder(index, row) {
|
||||
this.$router.push({
|
||||
@@ -729,9 +765,22 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 批量发货
|
||||
doBatch() {
|
||||
|
||||
},
|
||||
// 导出
|
||||
doExport() {
|
||||
if (this.list.length == 0) {
|
||||
this.$message({
|
||||
message: '暂无数据可导出!',
|
||||
type: 'warning',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// const loading = this.$loading({
|
||||
// lock: true,
|
||||
@@ -739,24 +788,30 @@
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
// })
|
||||
// exportExcel(this.listQuery).then((resp) => {
|
||||
// loading.close()
|
||||
// const blob = new Blob([resp], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const fileName = '订单列表' + '.xls'
|
||||
// const elink = document.createElement('a')
|
||||
// elink.download = fileName
|
||||
// elink.style.display = 'nonde'
|
||||
// elink.href = URL.createObjectURL(blob)
|
||||
// document.body.appendChild(elink)
|
||||
// elink.click()
|
||||
// URL.revokeObjectURL(elink.href)
|
||||
// document.body.removeChild(elink)
|
||||
// }).catch(() => {
|
||||
// loading.close()
|
||||
// })
|
||||
|
||||
this.listQuery = {
|
||||
status: 0,
|
||||
orderSn: '00382',
|
||||
receiverPhone: '',
|
||||
createTimeStart: '',
|
||||
createTimeEnd: ''
|
||||
}
|
||||
exportExcel(this.listQuery).then((resp) => {
|
||||
// loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '订单列表' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
// loading.close()
|
||||
})
|
||||
|
||||
},
|
||||
handleExportOption(val) {
|
||||
|
||||
@@ -193,7 +193,8 @@
|
||||
fetchList,
|
||||
orderData,
|
||||
getValueszd,
|
||||
getValueqhd
|
||||
getValueqhd,
|
||||
exportExcel
|
||||
} from '@/api/orderStatistic';
|
||||
import {
|
||||
formatDate
|
||||
@@ -400,29 +401,29 @@
|
||||
// 导出
|
||||
doExport() {
|
||||
|
||||
// const loading = this.$loading({
|
||||
// lock: true,
|
||||
// text: 'Loading',
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
// })
|
||||
// exportExcel(this.listQuery).then((resp) => {
|
||||
// loading.close()
|
||||
// const blob = new Blob([resp], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const fileName = '订单归集统计表' + '.xls'
|
||||
// const elink = document.createElement('a')
|
||||
// elink.download = fileName
|
||||
// elink.style.display = 'nonde'
|
||||
// elink.href = URL.createObjectURL(blob)
|
||||
// document.body.appendChild(elink)
|
||||
// elink.click()
|
||||
// URL.revokeObjectURL(elink.href)
|
||||
// document.body.removeChild(elink)
|
||||
// }).catch(() => {
|
||||
// loading.close()
|
||||
// })
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
exportExcel(this.listQuery).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '订单归集统计表' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user