|
|
|
@ -39,81 +39,75 @@
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 控件区 --> |
|
|
|
|
<el-row> |
|
|
|
|
<div class="avue-crud__header"> |
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="handler" |
|
|
|
|
></el-button |
|
|
|
|
> --> |
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-edit" @click="handleMoke" v-if="handler" |
|
|
|
|
>转预约单</el-button |
|
|
|
|
> --> |
|
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="handleStockList" v-if="handler" |
|
|
|
|
>批量转库存品</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleCallDelivery('3')" |
|
|
|
|
v-if="handler" |
|
|
|
|
>修改客户信息</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleCallDelivery('2')" |
|
|
|
|
v-if="handler" |
|
|
|
|
>修改服务类型</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="danger" icon="Download" @click="handleExport" plain>导 出</el-button> |
|
|
|
|
|
|
|
|
|
<!-- <el-button type="danger"--> |
|
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
|
<!-- @click="handleImport">导 入--> |
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
|
|
|
|
|
<el-dialog title="零担导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template #excelTemplate> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-plus" v-if = "handler">转配送</el-button>--> |
|
|
|
|
<div class="flex-c-sb"> |
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="handleStockList" v-if="handler" |
|
|
|
|
>批量转库存品</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleCallDelivery('3')" |
|
|
|
|
v-if="handler" |
|
|
|
|
>修改客户信息</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleCallDelivery('2')" |
|
|
|
|
v-if="handler" |
|
|
|
|
>修改服务类型</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="danger" icon="Download" @click="handleExport" plain>导 出</el-button> |
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handlebill" v-if="!handler" |
|
|
|
|
>创建提货单</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleCallDelivery('1')" |
|
|
|
|
v-if="!handler" |
|
|
|
|
>再次通知</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
@click="handleCallDelivery('1')" |
|
|
|
|
v-if="!handler" |
|
|
|
|
>通知提货</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="flex-c-sb"> |
|
|
|
|
<div class="totalContainer mr10 flex-c-sb"> |
|
|
|
|
<div class="title">订单总数:</div> |
|
|
|
|
<div class="value">{{ totalInfo.orderNum || 0 }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handlebill" v-if="!handler" |
|
|
|
|
>创建提货单</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleCallDelivery('1')" |
|
|
|
|
v-if="!handler" |
|
|
|
|
>再次通知</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
@click="handleCallDelivery('1')" |
|
|
|
|
v-if="!handler" |
|
|
|
|
>通知提货</el-button |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<div class="totalContainer mr10 flex-c-sb"> |
|
|
|
|
<div class="title">包件总数:</div> |
|
|
|
|
<div class="value">{{ totalInfo.packageCodeNum || 0 }}</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
|
|
|
|
|
|
|
|
|
<div class="totalContainer flex-c-sb"> |
|
|
|
|
<div class="title">运单总数:</div> |
|
|
|
|
<div class="value">{{ totalInfo.waybillNum || 0 }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
class="mt10" |
|
|
|
|
ref="tableNode" |
|
|
|
|
:columnList="columnList" |
|
|
|
|
:tableData="data" |
|
|
|
@ -268,6 +262,7 @@
|
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 表单模块 --> |
|
|
|
|
<el-dialog |
|
|
|
|
:title="title" |
|
|
|
@ -385,6 +380,17 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 零担导入 --> |
|
|
|
|
<el-dialog title="零担导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template #excelTemplate> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<MyPrint v-model="popUpShow.printVisited" :html="html" :title="'配送单'"> </MyPrint> |
|
|
|
|
</div> |
|
|
|
|
</basic-container> |
|
|
|
@ -406,6 +412,7 @@ import {
|
|
|
|
|
addStock, |
|
|
|
|
stockArticExport, |
|
|
|
|
postShowOrderCode, |
|
|
|
|
getCollectt, |
|
|
|
|
} from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
import { getListOwn } from '@/api/distribution/distributionParcelList'; |
|
|
|
|
import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery'; |
|
|
|
@ -418,7 +425,7 @@ import dayjs from 'dayjs';
|
|
|
|
|
import { getUser } from '@/api/system/user'; |
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { downloadXls, getObjType } from '@/utils/util'; |
|
|
|
|
import { columnList } from '@/option/distribution/distributionStockArticleSelf'; |
|
|
|
|
import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js'; |
|
|
|
|
const _newCol = deepClone(columnList); |
|
|
|
@ -549,6 +556,15 @@ export default {
|
|
|
|
|
popUpShow: { |
|
|
|
|
printVisited: false, |
|
|
|
|
}, |
|
|
|
|
/** 展示数据 */ |
|
|
|
|
totalInfo: { |
|
|
|
|
/** 订单总数 */ |
|
|
|
|
orderNum: 0, |
|
|
|
|
/** 包件总数 */ |
|
|
|
|
packageCodeNum: 0, |
|
|
|
|
/** 运单总数 */ |
|
|
|
|
waybillNum: 0, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -1321,11 +1337,10 @@ export default {
|
|
|
|
|
params.entDate = this.getTime(entDate.toString()); |
|
|
|
|
} |
|
|
|
|
this.query.genre = 1; |
|
|
|
|
const res = await getList( |
|
|
|
|
page.currentPage, |
|
|
|
|
page.pageSize, |
|
|
|
|
Object.assign(params, this.query) |
|
|
|
|
); |
|
|
|
|
const [res] = await Promise.all([ |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)), |
|
|
|
|
this.getAllOrderInfo(), |
|
|
|
|
]); |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
@ -1383,6 +1398,56 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 获取全部订单数据 */ |
|
|
|
|
async getAllOrderInfo() { |
|
|
|
|
try { |
|
|
|
|
const submitData = { |
|
|
|
|
genre: 1, |
|
|
|
|
...this.query, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const res = await getCollectt(submitData); |
|
|
|
|
|
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
this.totalInfo = data || {}; |
|
|
|
|
|
|
|
|
|
if (getObjType(this.totalInfo) !== 'object') this.totalInfo = {}; |
|
|
|
|
|
|
|
|
|
for (const key in this.totalInfo) { |
|
|
|
|
let value = this.totalInfo[key]; |
|
|
|
|
const type = getObjType(value); |
|
|
|
|
|
|
|
|
|
console.log('type :>> ', type); |
|
|
|
|
|
|
|
|
|
if (type !== 'number' && type !== 'string') { |
|
|
|
|
this.totalInfo[key] = 0; |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 转为字符串 |
|
|
|
|
value += ''; |
|
|
|
|
|
|
|
|
|
value = value.split('').reverse().join(''); |
|
|
|
|
|
|
|
|
|
let _str = ''; |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < value.length; i++) { |
|
|
|
|
const _val = value[i]; |
|
|
|
|
|
|
|
|
|
_str += _val; |
|
|
|
|
|
|
|
|
|
if ((i + 1) % 3 === 0 && i + 1 < value.length) _str += ','; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.totalInfo[key] = _str.split('').reverse().join(''); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
@ -1441,4 +1506,20 @@ export default {
|
|
|
|
|
display: flex; |
|
|
|
|
align-items: flex-end; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 统计 |
|
|
|
|
.totalContainer { |
|
|
|
|
text-align: center; |
|
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.value { |
|
|
|
|
transition: all 1.5s; |
|
|
|
|
font-size: 1rem; |
|
|
|
|
color: #397b12; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|