|
|
|
|
@ -45,7 +45,7 @@ |
|
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
|
<el-button size="small" @click="handleDetail(row)">查看详情</el-button> |
|
|
|
|
<!-- <el-button size="small" @click="handleDelete(row)">删除</el-button> --> |
|
|
|
|
<el-button :disabled='row.status == 1 || row.status == 2' size="small" @click="handleSend(row)">发货</el-button> |
|
|
|
|
<el-button :disabled='row.status == 1 || row.status == 3 || row.status == 4' size="small" @click="handleSend(row)">发货</el-button> |
|
|
|
|
</template> |
|
|
|
|
<!-- <template slot-scope="scope" slot="sleepingPosture"> |
|
|
|
|
<div v-show="scope.row.sleepingPosture == 1">仰睡</div> |
|
|
|
|
@ -58,9 +58,9 @@ |
|
|
|
|
<div v-show="scope.row.status == 4">已完成</div> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
|
<el-button type="danger" size="small" @click="deleteItem" |
|
|
|
|
<!-- <el-button type="danger" size="small" @click="deleteItem" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
> --> |
|
|
|
|
<el-button type="primary" size="small" @click="exportData" |
|
|
|
|
>导出</el-button |
|
|
|
|
> |
|
|
|
|
@ -78,11 +78,11 @@ |
|
|
|
|
<el-descriptions :column="2" class="margin-top" size="small" border> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">姓名</template> |
|
|
|
|
<div>{{ checkaccept.username }}</div> |
|
|
|
|
<div>{{ checkaccept.buyerName }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">手机</template> |
|
|
|
|
<div>{{ checkaccept.phone }}</div> |
|
|
|
|
<div>{{ checkaccept.buyerPhone }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">订单编号</template> |
|
|
|
|
@ -92,7 +92,7 @@ |
|
|
|
|
<template slot="label"> |
|
|
|
|
<div>地址</div> |
|
|
|
|
</template> |
|
|
|
|
<div style="width: 158px">{{ checkaccept.position }}</div> |
|
|
|
|
<div style="width: 158px">{{ checkaccept.address }}</div> |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label">订单状态</template> |
|
|
|
|
@ -114,7 +114,7 @@ |
|
|
|
|
<div class="number_box" v-show="diaType == 'send'"> |
|
|
|
|
<p>请选择快递公司:</p> |
|
|
|
|
<el-select v-model="company"> |
|
|
|
|
<el-option v-for="item in companyData" :key="item.value" :value="item.value" :label="item.label"></el-option> |
|
|
|
|
<el-option v-for="item in companyData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
<div class="number_box" v-show="diaType == 'send'"> |
|
|
|
|
@ -142,7 +142,7 @@ |
|
|
|
|
</el-timeline> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-show="diaType == 'send'"> |
|
|
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
|
|
|
|
<el-button type="primary" @click="handlieConfirm">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-show="isShowInfo"> |
|
|
|
|
<el-button type="primary" @click="dialogVisible = false">关 闭</el-button> |
|
|
|
|
@ -156,11 +156,10 @@ |
|
|
|
|
// import {getBaseList,getTypeList} from "@/api/base" |
|
|
|
|
import { |
|
|
|
|
getList, |
|
|
|
|
exportList, |
|
|
|
|
deleteList, |
|
|
|
|
detailList, |
|
|
|
|
} from "@/api/statistics/statistics"; |
|
|
|
|
import {getWuliuInfo,getOrderList} from "@/api/order/order" |
|
|
|
|
import {getWuliuInfo,getOrderList,exportList,getComPanyList,getDetail} from "@/api/order/order" |
|
|
|
|
// import { getToken } from "@/util/auth"; |
|
|
|
|
import md5 from "js-md5"; |
|
|
|
|
export default { |
|
|
|
|
@ -495,7 +494,9 @@ export default { |
|
|
|
|
{value:'shentong',label:'申通'}, |
|
|
|
|
{value:'zhongtong',label:'中通'}, |
|
|
|
|
], |
|
|
|
|
company:'' |
|
|
|
|
companyList:[], |
|
|
|
|
company:'', |
|
|
|
|
orderId:'' |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
@ -514,8 +515,19 @@ export default { |
|
|
|
|
// this.getWinData(); |
|
|
|
|
// this.getTypeData(); |
|
|
|
|
this.onLoad(); |
|
|
|
|
this.getCompany() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getCompany(){ |
|
|
|
|
getComPanyList().then(res =>{ |
|
|
|
|
console.log(res) |
|
|
|
|
this.companyData = res.data.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 确认发货接口 |
|
|
|
|
handlieConfirm(){ |
|
|
|
|
// confirmgoods() |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(); |
|
|
|
|
@ -542,14 +554,10 @@ export default { |
|
|
|
|
this.isShowInfo = false |
|
|
|
|
this.diaTitle = '发货' |
|
|
|
|
this.diaType="send" |
|
|
|
|
detailList({ id: row.id }).then((res) => { |
|
|
|
|
this.orderId = row.id; |
|
|
|
|
getDetail({ id: row.id }).then((res) => { |
|
|
|
|
console.log(res); |
|
|
|
|
this.checkaccept = res.data.data; |
|
|
|
|
this.checkaccept.position = |
|
|
|
|
this.checkaccept.province + |
|
|
|
|
this.checkaccept.city + |
|
|
|
|
this.checkaccept.district + |
|
|
|
|
this.checkaccept.detail; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 查看物流信息 |
|
|
|
|
@ -658,10 +666,6 @@ export default { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
console.log(params) |
|
|
|
|
this.form = params |
|
|
|
|
console.log(this.form); |
|
|
|
|
|
|
|
|
|
this.query = this.form; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, this.form); |
|
|
|
|
@ -710,49 +714,16 @@ export default { |
|
|
|
|
this.data = res.data.data.records; |
|
|
|
|
this.page.total = res.data.data.total; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// getList({ |
|
|
|
|
// current: this.page.currentPage, |
|
|
|
|
// size: this.page.pageSize, |
|
|
|
|
// ...params, |
|
|
|
|
// }).then((res) => { |
|
|
|
|
// console.log("res==>", res); |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.data = res.data.data.records; |
|
|
|
|
// this.page.total = res.data.data.total; |
|
|
|
|
// }); |
|
|
|
|
// this.data = [ |
|
|
|
|
// {username:'张大仙',phone:'13201241125',orderNo:'321456789520',position:'山东省青岛市市南区香港中路',orderStatus:'0'}, |
|
|
|
|
// {username:'张伟',phone:'13201241125',orderNo:'321456789520',position:'山东省青岛市市南区香港中路',orderStatus:'1'}, |
|
|
|
|
// {username:'王五',phone:'13201241125',orderNo:'321456789520',position:'山东省青岛市市南区香港中路',orderStatus:'0'}, |
|
|
|
|
// {username:'张三',phone:'13201241125',orderNo:'321456789520',position:'山东省青岛市市南区香港中路',orderStatus:'0'}, |
|
|
|
|
// {username:'李四',phone:'13201241125',orderNo:'321456789520',position:'山东省青岛市市南区香港中路',orderStatus:'0'}, |
|
|
|
|
// ] |
|
|
|
|
// this.loading = false; |
|
|
|
|
}, |
|
|
|
|
addRegister() { |
|
|
|
|
this.$router.push({ path: "/register/add", query: { type: "add" } }); |
|
|
|
|
}, |
|
|
|
|
exportData() { |
|
|
|
|
let params = {}; |
|
|
|
|
if (!this.form.timeArr) { |
|
|
|
|
params = { |
|
|
|
|
username: this.form.name ? this.form.name : "", |
|
|
|
|
phone: this.form.phonenumber ? this.form.phonenumber : "", |
|
|
|
|
pillowHardness: this.form.hardness ? this.form.hardness : "", |
|
|
|
|
pillowMaterial: this.form.material ? this.form.material : "", |
|
|
|
|
ageRange: this.form.age ? this.form.age : "", |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
params = { |
|
|
|
|
username: this.form.name ? this.form.name : "", |
|
|
|
|
phone: this.form.phonenumber ? this.form.phonenumber : "", |
|
|
|
|
pillowHardness: this.form.hardness ? this.form.hardness : "", |
|
|
|
|
pillowMaterial: this.form.material ? this.form.material : "", |
|
|
|
|
ageRange: this.form.age ? this.form.age : "", |
|
|
|
|
startTime: this.form.timeArr[0], |
|
|
|
|
endTime: this.form.timeArr[1], |
|
|
|
|
}; |
|
|
|
|
params = { |
|
|
|
|
buyerName:this.form.name ? this.form.name : '', |
|
|
|
|
buyerPhone:this.form.phonenumber ? this.form.phonenumber : '', |
|
|
|
|
orderNo:this.form.orderNumber ? this.form.orderNumber : '' |
|
|
|
|
} |
|
|
|
|
exportList(params).then((res) => { |
|
|
|
|
console.log(res); |
|
|
|
|
@ -764,7 +735,7 @@ export default { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let blob = new Blob([res.data]); //response.data为后端传的流文件 |
|
|
|
|
let downloadFilename = "统计" + ".xlsx"; //设置导出的文件名 |
|
|
|
|
let downloadFilename = "订单" + ".xlsx"; //设置导出的文件名 |
|
|
|
|
if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
|
|
|
|
//兼容ie浏览器 |
|
|
|
|
window.navigator.msSaveOrOpenBlob(blob, downloadFilename); |
|
|
|
|
|