Browse Source

修复配送bug

dev-xx
qb 11 months ago
parent
commit
4b0ea6dd18
  1. 88
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  2. 175
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  3. 78
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue

88
src/views/distribution/deliverylist/distributionDeliveryList.vue

@ -5,32 +5,42 @@
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form class="header_search" :model="query"> <el-form class="header_search" :model="query">
<el-form-item label="配送车次:"> <el-form-item label="配送车次:">
<el-input v-model="query.trainNumber" placeholder="请输入配送车次"></el-input> <el-input
v-model="query.trainNumbers"
placeholder="请输入配送车次"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="配送日期:" class="el-times"> <el-form-item label="配送日期:" class="el-times">
<el-date-picker <el-date-picker
v-model="query.taskTime" class="w100"
type="date" v-model="query.taskTimeArr"
placeholder="选择日期" type="daterange"
format="YYYY-MM-DD " unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
clearable
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="配送类型:"> <el-form-item label="配送类型:">
<el-select v-model="query.businessType" placeholder="请选择业务类型"> <el-select class="w100" v-model="query.businessType" placeholder="请选择业务类型">
<el-option :key="'1'" :value="'商配'">商配 </el-option> <el-option :key="'1'" :value="'商配'">商配 </el-option>
<el-option :key="'2'" :value="'市配'">市配 </el-option> <el-option :key="'2'" :value="'市配'">市配 </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="配送种类:"> <el-form-item label="配送种类:">
<el-select v-model="query.deliveryKind" placeholder="请选择业务类型"> <el-select class="w100" v-model="query.deliveryKind" placeholder="请选择业务类型">
<el-option :key="'1'" :value="'自主配送'">自主配送 </el-option> <el-option :key="'1'" :value="'自主配送'">自主配送 </el-option>
<el-option :key="'2'" :value="'外协配送'">外协配送 </el-option> <el-option :key="'2'" :value="'外协配送'">外协配送 </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="配送司机:"> <el-form-item label="配送司机:">
<el-select <el-select
class="w100"
v-model="query.driverName" v-model="query.driverName"
filterable filterable
placeholder="请输入司机名称" placeholder="请输入司机名称"
@ -47,6 +57,7 @@
</el-form-item> </el-form-item>
<el-form-item label="配送车辆:"> <el-form-item label="配送车辆:">
<el-select <el-select
class="w100"
v-model="query.vehicleName" v-model="query.vehicleName"
filterable filterable
placeholder="请输入司机名称" placeholder="请输入司机名称"
@ -318,7 +329,7 @@ import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import { getVehicleList } from '@/api/basicdata/basicdataVehicle'; import { getVehicleList } from '@/api/basicdata/basicdataVehicle';
import print from '@/utils/print'; import print from '@/utils/print';
import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading'; import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading';
import { downloadXls, setNodeHeight } from '@/utils/util'; import { downloadXls, getObjType, setNodeHeight } from '@/utils/util';
export default { export default {
data() { data() {
@ -359,6 +370,36 @@ export default {
form: {}, form: {},
// //
selectionList: [], selectionList: [],
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
return [start, end];
},
},
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
{
text: '最近三个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
return [start, end];
},
},
],
columnList: [ columnList: [
{ {
prop: '', prop: '',
@ -411,6 +452,16 @@ export default {
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
{
prop: 'orderCode',
label: '订单自编号',
type: 3,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'typeName', prop: 'typeName',
label: '配送类型', label: '配送类型',
@ -471,6 +522,17 @@ export default {
// fixed: false, // fixed: false,
// sortable: true // sortable: true
// }, // },
// clineName
{
prop: 'clineName',
label: '收货人',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'customersNumber', prop: 'customersNumber',
label: '配送客户数', label: '配送客户数',
@ -1109,6 +1171,12 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
if (getObjType(this.query.taskTimeArr) === 'array') {
params.taskTimeStart = this.query.taskTimeArr[0];
params.taskTimeEnd = this.query.taskTimeArr[1];
}
getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data; const data = res.data.data;
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
@ -1254,4 +1322,8 @@ export default {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
.w100 {
width: 100% !important;
}
</style> </style>

175
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -1,83 +1,84 @@
<template> <template>
<basic-container class="basic-container" v-loading="loadingObj.pageLoading"> <basic-container class="basic-container" v-loading="loadingObj.pageLoading">
<div class="avue-crud"> <div class="avue-crud">
<el-row v-if="!search"> <div v-h5uShow="!search">
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form :inline="true" :model="query" class="fr-fm"> <el-form :inline="true" :model="query" class="header_search">
<div class="el-tb"> <el-form-item label="配送车次:">
<el-form-item label="配送车次:"> <el-input
<el-input v-model="query.trainNumber" placeholder="请输入配送车次"></el-input> v-model="query.trainNumbers"
</el-form-item> placeholder="请输入配送车次"
<el-form-item label="配送日期:" class="el-times"> clearable
<el-date-picker ></el-input>
v-model="query.taskTime" </el-form-item>
type="datetime" <el-form-item label="配送日期:" class="el-times">
format="YYYY-MM-DD" <el-date-picker
value-format="YYYY-MM-DD" class="w100"
placeholder="选择日期" v-model="query.taskTimeArr"
> type="daterange"
</el-date-picker> unlink-panels
</el-form-item> range-separator="至"
<!-- <el-form-item label="配送类型:">--> start-placeholder="开始时间"
<!-- <el-select v-model="query.businessType" placeholder="请选择业务类型">--> end-placeholder="结束时间"
<!-- <el-option--> :shortcuts="shortcuts"
<!-- :key="'1'"--> value-format="YYYY-MM-DD"
<!-- :value="'商配'">商配--> clearable
<!-- </el-option>--> >
<!-- <el-option--> </el-date-picker>
<!-- :key="'2'"--> </el-form-item>
<!-- :value="'市配'">市配-->
<!-- </el-option>--> <el-form-item label="配送种类:">
<!-- </el-select>--> <el-select class="w100" v-model="query.deliveryKind" placeholder="请选择业务类型">
<!-- </el-form-item>--> <el-option :key="'1'" :value="'自主配送'">自主配送 </el-option>
<el-form-item label="配送种类:"> <el-option :key="'2'" :value="'外协配送'">外协配送 </el-option>
<el-select v-model="query.deliveryKind" placeholder="请选择业务类型"> </el-select>
<el-option :key="'1'" :value="'自主配送'">自主配送 </el-option> </el-form-item>
<el-option :key="'2'" :value="'外协配送'">外协配送 </el-option>
</el-select> <el-form-item label="配送司机:">
</el-form-item> <el-select
<el-form-item label="配送司机:"> class="w100"
<el-select v-model="query.driverName"
v-model="query.driverName" filterable
filterable clearable
clearable placeholder="请输入司机名称"
placeholder="请输入司机名称" :loading="loading"
:loading="loading" >
<el-option
v-for="item in driverData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictValue"
> >
<el-option </el-option>
v-for="item in driverData" </el-select>
:key="item.dictKey" </el-form-item>
:label="item.dictValue"
:value="item.dictValue" <el-form-item label="配送车辆:">
> <el-select
</el-option> class="w100"
</el-select> v-model="query.vehicleName"
</el-form-item> filterable
<el-form-item label="配送车辆:"> clearable
<el-select placeholder="请输入司机名称"
v-model="query.vehicleName" :loading="loading"
filterable >
clearable <el-option
placeholder="请输入司机名称" v-for="item in vehicleData"
:loading="loading" :key="item.dictKey"
:label="item.dictValue"
:value="item.dictValue"
> >
<el-option </el-option>
v-for="item in vehicleData" </el-select>
:key="item.dictKey" </el-form-item>
:label="item.dictValue"
:value="item.dictValue"
>
</el-option>
</el-select>
</el-form-item>
</div>
<!-- 查询按钮 --> <!-- 查询按钮 -->
<el-form-item class="el-btn"> <el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button> <el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset"> </el-button> <el-button icon="el-icon-delete" @click="searchReset"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </div>
<!-- <el-row :gutter="24" class="rows"> --> <!-- <el-row :gutter="24" class="rows"> -->
<!-- <el-col :xl="14" :lg="7" :md="8" :sm="24" >--> <!-- <el-col :xl="14" :lg="7" :md="8" :sm="24" >-->
@ -365,6 +366,36 @@ export default {
// //
selectionList: [], selectionList: [],
activeName: 'first', activeName: 'first',
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
return [start, end];
},
},
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
{
text: '最近三个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
return [start, end];
},
},
],
columnList: [ columnList: [
{ {
prop: 'serialNumber', prop: 'serialNumber',
@ -1297,6 +1328,11 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.query.type = '1'; this.query.type = '1';
if (getObjType(this.query.taskTimeArr) === 'array') {
params.taskTimeStart = this.query.taskTimeArr[0];
params.taskTimeEnd = this.query.taskTimeArr[1];
}
getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data; const data = res.data.data;
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
@ -1518,4 +1554,7 @@ export default {
// .el_tabBK { // .el_tabBK {
// // height: 70%; // // height: 70%;
// } // }
.w100 {
width: 100% !important;
}
</style> </style>

78
src/views/distribution/deliverylist/distributionDeliveryListmar.vue

@ -5,23 +5,45 @@
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search"> <el-form :inline="true" :model="query" class="header_search">
<el-form-item label="配送车次:"> <el-form-item label="配送车次:">
<el-input v-model="query.trainNumber" placeholder="请输入配送车次"></el-input> <el-input
v-model="query.trainNumbers"
placeholder="请输入配送车次"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="客户名称:"> <el-form-item label="客户名称:">
<el-input v-model="query.clineName" placeholder="请输入客户名称"></el-input> <el-input v-model="query.clineName" placeholder="请输入客户名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="配送日期:" class="el-times"> <el-form-item label="配送日期:" class="el-times">
<el-date-picker v-model="query.taskTime" type="date" placeholder="选择日期"> <el-date-picker
class="w100"
v-model="query.taskTimeArr"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="配送种类:"> <el-form-item label="配送种类:">
<el-select v-model="query.deliveryKind" placeholder="请选择业务类型"> <el-select
class="w100"
clearable
v-model="query.deliveryKind"
placeholder="请选择业务类型"
>
<el-option :key="'1'" :value="'自主配送'">自主配送</el-option> <el-option :key="'1'" :value="'自主配送'">自主配送</el-option>
<el-option :key="'2'" :value="'外协配送'">外协配送</el-option> <el-option :key="'2'" :value="'外协配送'">外协配送</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="配送司机:"> <el-form-item label="配送司机:">
<el-select <el-select
class="w100"
clearable
v-model="query.driverName" v-model="query.driverName"
filterable filterable
placeholder="请输入司机名称" placeholder="请输入司机名称"
@ -38,6 +60,8 @@
</el-form-item> </el-form-item>
<el-form-item label="配送车辆:"> <el-form-item label="配送车辆:">
<el-select <el-select
class="w100"
clearable
v-model="query.vehicleName" v-model="query.vehicleName"
filterable filterable
placeholder="请输入司机名称" placeholder="请输入司机名称"
@ -209,7 +233,13 @@ import { getVehicleList } from '@/api/basicdata/basicdataVehicle';
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery'; import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import print from '@/utils/print'; import print from '@/utils/print';
import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading'; import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading';
import { downloadXls, getWinHeight, handleClearTableQuery, setNodeHeight } from '@/utils/util'; import {
downloadXls,
getWinHeight,
handleClearTableQuery,
setNodeHeight,
getObjType,
} from '@/utils/util';
export default { export default {
data() { data() {
@ -251,6 +281,36 @@ export default {
// //
selectionList: [], selectionList: [],
activeName: 'first', activeName: 'first',
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
return [start, end];
},
},
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
{
text: '最近三个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
return [start, end];
},
},
],
allColumnList: [ allColumnList: [
{ {
prop: '', prop: '',
@ -1310,6 +1370,11 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.query.type = '2'; this.query.type = '2';
if (getObjType(this.query.taskTimeArr) === 'array') {
params.taskTimeStart = this.query.taskTimeArr[0];
params.taskTimeEnd = this.query.taskTimeArr[1];
}
getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data; const data = res.data.data;
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
@ -1537,4 +1602,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.w100 {
width: 100% !important;
}
</style> </style>

Loading…
Cancel
Save