|
|
|
@ -1,29 +1,16 @@
|
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<basic-container v-loading="pageloading"> |
|
|
|
|
<div class="avue-crud"> |
|
|
|
|
<div v-h5uShow="search"> |
|
|
|
|
<!-- 查询模块 --> |
|
|
|
|
<el-form class="header_search" :model="query"> |
|
|
|
|
<el-form-item label="配送车次:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="query.trainNumbers" |
|
|
|
|
placeholder="请输入配送车次" |
|
|
|
|
clearable |
|
|
|
|
></el-input> |
|
|
|
|
<el-input v-model="query.trainNumbers" placeholder="请输入配送车次" clearable></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送日期:" class="el-times"> |
|
|
|
|
<el-date-picker |
|
|
|
|
class="w100" |
|
|
|
|
v-model="Deliverydate" |
|
|
|
|
type="daterange" |
|
|
|
|
unlink-panels |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始时间" |
|
|
|
|
end-placeholder="结束时间" |
|
|
|
|
:shortcuts="shortcuts" |
|
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-date-picker class="w100" v-model="Deliverydate" type="daterange" unlink-panels range-separator="至" |
|
|
|
|
start-placeholder="开始时间" end-placeholder="结束时间" :shortcuts="shortcuts" value-format="YYYY-MM-DD" |
|
|
|
|
clearable> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送类型:"> |
|
|
|
@ -39,36 +26,15 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送司机:"> |
|
|
|
|
<el-select |
|
|
|
|
class="w100" |
|
|
|
|
v-model="query.driverName" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请输入司机名称" |
|
|
|
|
:loading="loading" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in driverData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
<el-select class="w100" v-model="query.driverName" filterable placeholder="请输入司机名称" :loading="loading"> |
|
|
|
|
<el-option v-for="item in driverData" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送车辆:"> |
|
|
|
|
<el-select |
|
|
|
|
class="w100" |
|
|
|
|
v-model="query.vehicleName" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请输入司机名称" |
|
|
|
|
:loading="loading" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in vehicleData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
<el-select class="w100" v-model="query.vehicleName" filterable placeholder="请输入司机名称" :loading="loading"> |
|
|
|
|
<el-option v-for="item in vehicleData" :key="item.dictKey" :label="item.dictValue" |
|
|
|
|
:value="item.dictValue"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -150,8 +116,7 @@
|
|
|
|
|
>批量打印</el-button |
|
|
|
|
> --> |
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</el-button>--> |
|
|
|
|
<el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain |
|
|
|
|
>导出 |
|
|
|
|
<el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain>导出 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
@ -165,17 +130,8 @@
|
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
class="tableNode" |
|
|
|
|
:columnList="columnList" |
|
|
|
|
:tableData="data" |
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionsc" |
|
|
|
|
> |
|
|
|
|
<tablecmt class="tableNode" :columnList="columnList" :tableData="data" :loading="loading" @inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" @btnCheck="btnsc" @selectCheck="selectsc" @selection="selectionsc"> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-text @click="editsolt(slotProps.scope)">查 看</el-text> |
|
|
|
|
<el-text @click="editmap(slotProps.scope)">地 图</el-text> |
|
|
|
@ -186,17 +142,9 @@
|
|
|
|
|
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> |
|
|
|
|
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> |
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-pagination |
|
|
|
|
align="right" |
|
|
|
|
background |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
:current-page="page.currentPage" |
|
|
|
|
:page-sizes="[30, 50, 80, 120, 200]" |
|
|
|
|
:page-size="page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="page.total" |
|
|
|
|
> |
|
|
|
|
<el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange" |
|
|
|
|
:current-page="page.currentPage" :page-sizes="[30, 50, 80, 120, 200]" :page-size="page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="page.total"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
@ -205,71 +153,31 @@
|
|
|
|
|
<el-dialog v-model="dialogVisible" title="增值服务" width="30%" :before-close="handleClose"> |
|
|
|
|
<el-form-item label="增值服务" prop="freightMark"> |
|
|
|
|
<el-checkbox-group v-model="form.addvalueType" @change="handleCheckedCitiesChange"> |
|
|
|
|
<el-checkbox |
|
|
|
|
style="width: 100%; margin-bottom: 3%" |
|
|
|
|
v-for="(item, index) in addvalueServeTypeData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictKey" |
|
|
|
|
>{{ item.dictValue }} |
|
|
|
|
<span v-if="index === 0 || index === 6 || index === 2 || index === 4" |
|
|
|
|
> 件数: |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="item.f" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 1)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<el-checkbox style="width: 100%; margin-bottom: 3%" v-for="(item, index) in addvalueServeTypeData" |
|
|
|
|
:key="item.dictKey" :label="item.dictKey">{{ item.dictValue }} |
|
|
|
|
<span v-if="index === 0 || index === 6 || index === 2 || index === 4"> 件数: |
|
|
|
|
<el-input type="number" v-model="item.f" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 1)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="index === 1" |
|
|
|
|
>公里: |
|
|
|
|
<el-input |
|
|
|
|
type="primary" |
|
|
|
|
v-model="item.a" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 2)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<span v-if="index === 1">公里: |
|
|
|
|
<el-input type="primary" v-model="item.a" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 2)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="index === 3" |
|
|
|
|
>距离: |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="item.b" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 3)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<span v-if="index === 3">距离: |
|
|
|
|
<el-input type="number" v-model="item.b" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 3)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="index === 5" |
|
|
|
|
>人数: |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="item.c" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 4)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<span v-if="index === 5">人数: |
|
|
|
|
<el-input type="number" v-model="item.c" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 4)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="index === 0" |
|
|
|
|
>楼层: |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="item.d" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 5)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<span v-if="index === 0">楼层: |
|
|
|
|
<el-input type="number" v-model="item.d" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 5)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="item" |
|
|
|
|
>预计费用: |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="item.e" |
|
|
|
|
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 6)" |
|
|
|
|
style="width: 20%; border: none; border-bottom: 2px solid #eee" |
|
|
|
|
/> |
|
|
|
|
<span v-if="item">预计费用: |
|
|
|
|
<el-input type="number" v-model="item.e" :disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1" |
|
|
|
|
@change="textbox($event, index, 6)" style="width: 20%; border: none; border-bottom: 2px solid #eee" /> |
|
|
|
|
</span> |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -282,12 +190,8 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
<edittablehead |
|
|
|
|
@closce="showdrawer" |
|
|
|
|
:drawerShow="drawerShow" |
|
|
|
|
:columnList="columnList" |
|
|
|
|
v-model="columnList" |
|
|
|
|
></edittablehead> |
|
|
|
|
<edittablehead @closce="showdrawer" :drawerShow="drawerShow" :columnList="columnList" v-model="columnList"> |
|
|
|
|
</edittablehead> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
@ -313,7 +217,7 @@ import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading'
|
|
|
|
|
import { downloadXls, getObjType, handleSelectQuery, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { exportExcel } from '@/utils/exportData'; |
|
|
|
|
|
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -329,6 +233,7 @@ export default {
|
|
|
|
|
// 加载中 |
|
|
|
|
loading: true, |
|
|
|
|
// 是否为查看模式 |
|
|
|
|
pageloading: false, |
|
|
|
|
view: false, |
|
|
|
|
// 打印模版 |
|
|
|
|
html: '', |
|
|
|
@ -682,20 +587,48 @@ export default {
|
|
|
|
|
* 导出 |
|
|
|
|
* */ |
|
|
|
|
handleExportInfo() { |
|
|
|
|
let row = {}; |
|
|
|
|
// if (!!this.ids) { |
|
|
|
|
// row.ids = this.ids; |
|
|
|
|
// } |
|
|
|
|
const ids = this.selectionList.join(','); |
|
|
|
|
row.ids = ids; |
|
|
|
|
row = { ...row, ...this.query }; |
|
|
|
|
delete row.deliveryStatusName; |
|
|
|
|
delete row.kindName; |
|
|
|
|
// console.log("<><><>>",ids); |
|
|
|
|
getDeliveryListExport(row).then(res => { |
|
|
|
|
// console.log(res.data); |
|
|
|
|
downloadXls(res.data, '全部配送计划数据.xlsx'); |
|
|
|
|
}); |
|
|
|
|
ElMessageBox.confirm( |
|
|
|
|
'是否确认导出数据?', |
|
|
|
|
'提示', |
|
|
|
|
{ |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
.then(async () => { |
|
|
|
|
try { |
|
|
|
|
this.pageloading = true; |
|
|
|
|
let row = {}; |
|
|
|
|
const ids = this.selectionList.join(','); |
|
|
|
|
row.ids = ids; |
|
|
|
|
row = { ...row, ...this.query }; |
|
|
|
|
if (getObjType(this.Deliverydate) === 'array') { |
|
|
|
|
// row.taskTimeArr = this.Deliverydate; |
|
|
|
|
row.taskTimeStart = this.Deliverydate[0]; |
|
|
|
|
row.taskTimeEnd = this.Deliverydate[1]; |
|
|
|
|
} |
|
|
|
|
delete row.deliveryStatusName; |
|
|
|
|
delete row.kindName; |
|
|
|
|
await getDeliveryListExport(row).then(res => { |
|
|
|
|
downloadXls(res.data, '全部配送计划数据.xlsx'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
console.log(error); |
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
|
this.pageloading = false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
getvehicleData() { |
|
|
|
|
return new Promise((rv, rev) => { |
|
|
|
@ -824,7 +757,7 @@ export default {
|
|
|
|
|
.then(_ => { |
|
|
|
|
done(); |
|
|
|
|
}) |
|
|
|
|
.catch(_ => {}); |
|
|
|
|
.catch(_ => { }); |
|
|
|
|
}, |
|
|
|
|
editsolt(scope) { |
|
|
|
|
const { row } = scope; |
|
|
|
@ -849,12 +782,12 @@ export default {
|
|
|
|
|
this.floorList = []; |
|
|
|
|
// this.orderInfo = row; |
|
|
|
|
}, |
|
|
|
|
btnsc(index, row) {}, |
|
|
|
|
btnsc(index, row) { }, |
|
|
|
|
selectsc(index, row) { |
|
|
|
|
handleSelectQuery(index, row, this.query); |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
timesc(index, row) {}, |
|
|
|
|
timesc(index, row) { }, |
|
|
|
|
inputsc(index, row) { |
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
if (!index) { |
|
|
|
@ -1131,6 +1064,7 @@ export default {
|
|
|
|
|
.orderInfos { |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.order-info { |
|
|
|
|
ul { |
|
|
|
|
list-style: none; |
|
|
|
@ -1144,10 +1078,12 @@ export default {
|
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
font-weight: 500; |
|
|
|
|
|
|
|
|
|
img { |
|
|
|
|
margin-right: 4px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
li::after { |
|
|
|
|
content: ''; |
|
|
|
|
display: block; |
|
|
|
@ -1159,28 +1095,35 @@ export default {
|
|
|
|
|
left: 0px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
li:first-child::after { |
|
|
|
|
content: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
li:first-child { |
|
|
|
|
padding-left: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-form-item__content) { |
|
|
|
|
width: 140px; |
|
|
|
|
margin-left: 8px !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-btn { |
|
|
|
|
min-width: 200px; |
|
|
|
|
margin-right: 0 !important; |
|
|
|
|
|
|
|
|
|
:deep(.el-form-item__content) { |
|
|
|
|
width: 180px; |
|
|
|
|
justify-content: flex-end; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-form-item { |
|
|
|
|
margin-right: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// .el-form { |
|
|
|
|
// width: 100%; |
|
|
|
|
// display: flex; |
|
|
|
@ -1190,15 +1133,18 @@ export default {
|
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-form-item__content { |
|
|
|
|
height: 30px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 日期选择框 |
|
|
|
|
.el-times { |
|
|
|
|
:deep(.el-tooltip__trigger) { |
|
|
|
|
height: 30px !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.avue-crud__header) { |
|
|
|
|
.avue-crud__left { |
|
|
|
|
margin-top: 0 !important; |
|
|
|
@ -1210,14 +1156,17 @@ export default {
|
|
|
|
|
height: 100%; |
|
|
|
|
flex-direction: column; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-card__body) { |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-card) { |
|
|
|
|
height: 100%; |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-fy { |
|
|
|
|
flex: 1; |
|
|
|
|
display: flex; |
|
|
|
|