Browse Source

新增营业部收入报表,优化数据看板

dev
qb 4 months ago
parent
commit
7893726c81
  1. 28
      src/api/reportforms/SalesDepartmentIncomeReport.js
  2. 6
      src/api/wel/index.js
  3. 484
      src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue
  4. 398
      src/components/ArteryPrintTemplateV2/ArteryPrintTemplateV2.vue
  5. 275
      src/option/reportforms/SalesDepartmentIncomeReport.js
  6. 121
      src/views/desk/DataBoard.vue
  7. 522
      src/views/reportforms/SalesDepartmentIncomeReport.vue
  8. 34
      src/views/waybill/orderPackageList.vue

28
src/api/reportforms/SalesDepartmentIncomeReport.js

@ -0,0 +1,28 @@
import request from '@/axios';
/** 报表列表 */
export const postDeptIncomingPage = params => {
return request({
url: '/api/logpm-report/reportIncoming/deptIncomingPage',
method: 'get',
params,
});
};
/** 查询事业线 */
export const postFindbusinessLine = () => {
return request({
url: '/api/logpm-basicdata/warehouse/findBusunessLineList',
method: 'get',
params: {},
});
};
/** 报表导出 */
export const postDeptIncomingExport = params => {
return request({
url: '/api/logpm-report/reportIncoming/deptIncomingExport',
method: 'get',
params,
responseType: 'blob',
});
};

6
src/api/wel/index.js

@ -109,10 +109,10 @@ export const postTrunklineCarsData = data => {
* @param {Object} data * @param {Object} data
* @returns * @returns
*/ */
export const postTrunklineCarsDataByWarehouseId = data => { export const getCarsStattisNum = data => {
return request({ return request({
url: '/api/logpm-report/warehouseIndex/trunklineCarsDataByWarehouseId', url: '/api/logpm-report/warehouseIndex/carsStattisNum',
method: 'post', method: 'get',
data, data,
}); });
}; };

484
src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue

@ -10,271 +10,281 @@
border-right: 1px solid #000; border-right: 1px solid #000;
" "
> >
<tr> <thead>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4"> <tr>
<img style="height: 40px" src="../../../public/img/htlogo.png" alt="暂无图片" /> <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
</th> <img style="height: 40px" src="../../../public/img/htlogo.png" alt="暂无图片" />
<th </th>
colspan="6" <th
style="font-size: 20px; border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6"
> style="font-size: 20px; border-bottom: 1px solid #000; border-left: 1px solid #000"
线
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:colspan="6 + goodsTitleList.length + 1"
>
<img id="imgcode" :src="renderInfo.carsNoBase64" />
<div>{{ renderInfo.carsNo }}</div>
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
始发站{{ renderInfo.startWarehouseName }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6">
经停站{{
renderInfo.endWarehouseNames.slice(0, renderInfo.endWarehouseNames.length - 1)[0] || ''
}}
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:colspan="6 + goodsTitleList.length + 1"
>
目的站{{ renderInfo.endWarehouseNames.slice(-1)[0] }}
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
司机{{ renderInfo.assistantName || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="2">
司机电话{{ renderInfo.assistantMobile || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="3">
车牌号{{ renderInfo.carNumber || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">
卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:colspan="6 + goodsTitleList.length + 1"
>
卸车人员签字
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">序号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
发货单位
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
开单时间
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
始发仓
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
目的仓
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货单位
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货人
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货电话
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
物流单号
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
合同号
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
计划件数
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">货位</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:colspan="goodsTitleList.length + 1"
>
装车产品明细
</th>
<!-- <th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">合计件数</th> -->
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
卸车件数
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
卸车网点
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
卸车时间
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
异常备注
</th>
</tr>
<tr>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
v-for="item in goodsTitleList"
:key="item"
>
{{ item }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">小计</th>
</tr>
<!-- -->
<template v-if="orderList.length > 0">
<tr v-for="(value, index) in orderList" style="word-break: break-all">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ index + 1 }}
</td>
<!-- 发货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
> >
{{ value.shipper || '' }} 线
</td> </th>
<!-- 开单时间 --> <th
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex" :colspan="6 + goodsTitleList.length + 1"
contenteditable
> >
{{ value.createTime || '' }} <img id="imgcode" :src="renderInfo.carsNoBase64" />
</td> <div>{{ renderInfo.carsNo }}</div>
<!-- 始发仓 --> </th>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> </tr>
{{ value.departureWarehouseName || '' }} <tr>
</td> <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
<!-- 目的仓 --> 始发站{{ renderInfo.startWarehouseName }}
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> </th>
{{ value.destinationWarehouseName || '' }} <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6">
</td> 经停站{{
<!-- 收货单位 --> renderInfo.endWarehouseNames.slice(0, renderInfo.endWarehouseNames.length - 1)[0] ||
<td ''
v-if="value.mergeColumnIndex" }}
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex" :colspan="6 + goodsTitleList.length + 1"
contenteditable
> >
{{ value.consignee }} 目的站{{ renderInfo.endWarehouseNames.slice(-1)[0] }}
</td> </th>
<!-- 收货人 --> </tr>
<td <tr>
v-if="value.mergeColumnIndex" <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
司机{{ renderInfo.assistantName || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="2">
司机电话{{ renderInfo.assistantMobile || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="3">
车牌号{{ renderInfo.carNumber || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">
卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex" :colspan="6 + goodsTitleList.length + 1"
contenteditable
> >
{{ value.consigneeName }} 卸车人员签字
</td> </th>
<!-- 收货电话 --> </tr>
<td <tr>
v-if="value.mergeColumnIndex" <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
序号
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
发货单位
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
开单时间
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
始发仓
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
目的仓
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货单位
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货人
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
收货电话
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
物流单号
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
合同号
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
计划件数
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
货位
</th>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex" :colspan="goodsTitleList.length + 1"
contenteditable
> >
{{ value.consigneeMobile }} 装车产品明细
</td> </th>
<!-- 物流单号 --> <!-- <th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">合计件数</th> -->
<td <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
v-if="value.mergeColumnIndex" 卸车件数
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
卸车网点
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
卸车时间
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" rowspan="2">
异常备注
</th>
</tr>
<tr>
<th
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex" v-for="item in goodsTitleList"
:key="item"
> >
{{ value.waybillNo }} {{ item }}
</td> </th>
<!-- 合同号 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"> <th style="border-bottom: 1px solid #000; border-left: 1px solid #000">小计</th>
{{ value.orderCode }} </tr>
</thead>
<tbody>
<!-- -->
<template v-if="orderList.length > 0">
<tr v-for="(value, index) in orderList" style="word-break: break-all">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ index + 1 }}
</td>
<!-- 发货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.shipper || '' }}
</td>
<!-- 开单时间 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.createTime || '' }}
</td>
<!-- 始发仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.departureWarehouseName || '' }}
</td>
<!-- 目的仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.destinationWarehouseName || '' }}
</td>
<!-- 收货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consignee }}
</td>
<!-- 收货人 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeName }}
</td>
<!-- 收货电话 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeMobile }}
</td>
<!-- 物流单号 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
>
{{ value.waybillNo }}
</td>
<!-- 合同号 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ value.orderCode }}
</td>
<!-- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.planNum }}
</td>
<!-- 货位 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
v-for="item in goodsTitleList"
>
{{ (value.goodsList.find(val => val.goodsName === item) || {}).num || '' }}
</td>
<!-- 小计 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.smallTotal }}
</td>
<!-- 合计件数 -->
<!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.smallTotal }}</td> -->
<!-- 卸车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.unloadNum }}
</td>
<!-- 卸车网点 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
<!-- 卸车时间 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
<!-- 异常备注 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
</tr>
</template>
<!-- 合计行 -->
<tr>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="10">
合计
</td> </td>
<!-- 计划件数 --> <!-- 合计 -- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.planNum }} {{ totalPlanNum }}
</td> </td>
<!-- 货位 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td <td
style="border-bottom: 1px solid #000; border-left: 1px solid #000" style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable contenteditable
v-for="item in goodsTitleList" v-for="item in goodsTitleList"
> ></td>
{{ (value.goodsList.find(val => val.goodsName === item) || {}).num || '' }}
</td>
<!-- 小计 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.smallTotal }} {{ totalNum }}
</td> </td>
<!-- 合计件数 --> <!-- 合计件数 -->
<!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.smallTotal }}</td> --> <!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalNum }}</td> -->
<!-- 卸车件数 --> <!-- 卸车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.unloadNum }} {{ totalUnLoadNum }}
</td> </td>
<!-- 卸车网点 --> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td <td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
style="border-bottom: 1px solid #000; border-left: 1px solid #000" <td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
contenteditable
></td>
<!-- 卸车时间 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
<!-- 异常备注 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
</tr> </tr>
</template> <tr style="border-bottom: 1px solid #000; border-left: 1px solid #000">
<td :colspan="6" contenteditable>投诉电话4000184668</td>
<!-- 合计行 -->
<tr>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="10">
合计
</td>
<!-- 合计 -- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalPlanNum }}
</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
v-for="item in goodsTitleList"
></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalNum }}
</td>
<!-- 合计件数 -->
<!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalNum }}</td> -->
<!-- 卸车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalUnLoadNum }}
</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
</tr>
<tr style="border-bottom: 1px solid #000; border-left: 1px solid #000">
<td :colspan="6" contenteditable>投诉电话4000184668</td>
<td :colspan="6" contenteditable>营业部电话</td> <td :colspan="6" contenteditable>营业部电话</td>
<td :colspan="5 + goodsTitleList.length" contenteditable>系统单调度</td> <td :colspan="5 + goodsTitleList.length" contenteditable>系统单调度</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</template> </template>

398
src/components/ArteryPrintTemplateV2/ArteryPrintTemplateV2.vue

@ -10,215 +10,221 @@
border-right: 1px solid #000; border-right: 1px solid #000;
" "
> >
<tr> <thead>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4"> <tr>
<img style="height: 40px" src="../../../public/img/htlogo.png" alt="暂无图片" /> <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
</th> <img style="height: 40px" src="../../../public/img/htlogo.png" alt="暂无图片" />
<th </th>
colspan="6" <th
style="font-size: 20px; border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6"
> style="font-size: 20px; border-bottom: 1px solid #000; border-left: 1px solid #000"
线
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" :colspan="7">
<img id="imgcode" :src="renderInfo.carsNoBase64" />
<div>{{ renderInfo.carsNo }}</div>
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
始发站{{ renderInfo.startWarehouseName }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6">
经停站{{
renderInfo.endWarehouseNames.slice(0, renderInfo.endWarehouseNames.length - 1)[0] || ''
}}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" :colspan="7">
目的站{{ renderInfo.endWarehouseNames.slice(-1)[0] }}
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
司机{{ renderInfo.assistantName || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="2">
司机电话{{ renderInfo.assistantMobile || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="3">
车牌号{{ renderInfo.carNumber || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">
卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}
</th>
<th
style="
border-bottom: 1px solid #000;
border-left: 1px solid #000;
text-align: left;
padding-left: 10px;
"
:colspan="7"
>
卸车人员签字
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">序号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">发货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">开单时间</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">始发仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">目的仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货人</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货电话</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">物流单号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">合同号</th>
<th colspan="2" style="border-bottom: 1px solid #000; border-left: 1px solid #000">
装车产品明细
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">计划件数</th>
<!-- 本仓装车件数 -->
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">本仓装车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">总装车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">卸车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">异常备注</th>
</tr>
<!-- -->
<template v-if="orderList.length > 0">
<tr v-for="(value, index) in orderList" style="word-break: break-all">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ index + 1 }}
</td>
<!-- 发货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.shipper || '' }}
</td>
<!-- 开单时间 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.createTime || '' }}
</td>
<!-- 始发仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.departureWarehouseName || '' }}
</td>
<!-- 目的仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.destinationWarehouseName || '' }}
</td>
<!-- 收货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consignee }}
</td>
<!-- 收货人 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeName }}
</td>
<!-- 收货电话 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeMobile }}
</td>
<!-- 物流单号 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
> >
{{ value.waybillNo }} 线
</td> </th>
<!-- 合同号 --> <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" :colspan="7">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"> <img id="imgcode" :src="renderInfo.carsNoBase64" />
{{ value.orderCode }} <div>{{ renderInfo.carsNo }}</div>
</td> </th>
<!-- 品类明细 --> </tr>
<td <tr>
colspan="2" <th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
style="border-bottom: 1px solid #000; border-left: 1px solid #000" 始发站{{ renderInfo.startWarehouseName }}
contenteditable </th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="6">
经停站{{
renderInfo.endWarehouseNames.slice(0, renderInfo.endWarehouseNames.length - 1)[0] ||
''
}}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" :colspan="7">
目的站{{ renderInfo.endWarehouseNames.slice(-1)[0] }}
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="4">
司机{{ renderInfo.assistantName || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="2">
司机电话{{ renderInfo.assistantMobile || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="3">
车牌号{{ renderInfo.carNumber || '' }}
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">
卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}
</th>
<th
style="
border-bottom: 1px solid #000;
border-left: 1px solid #000;
text-align: left;
padding-left: 10px;
"
:colspan="7"
> >
{{ value.goodsListStr }} 卸车人员签字
</th>
</tr>
<tr>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">序号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">发货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">开单时间</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">始发仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">目的仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货人</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">收货电话</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">物流单号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">合同号</th>
<th colspan="2" style="border-bottom: 1px solid #000; border-left: 1px solid #000">
装车产品明细
</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">计划件数</th>
<!-- 本仓装车件数 -->
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">本仓装车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">总装车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">卸车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000">异常备注</th>
</tr>
</thead>
<tbody>
<!-- -->
<template v-if="orderList.length > 0">
<tr v-for="(value, index) in orderList" style="word-break: break-all">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ index + 1 }}
</td>
<!-- 发货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.shipper || '' }}
</td>
<!-- 开单时间 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.createTime || '' }}
</td>
<!-- 始发仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.departureWarehouseName || '' }}
</td>
<!-- 目的仓 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.destinationWarehouseName || '' }}
</td>
<!-- 收货单位 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consignee }}
</td>
<!-- 收货人 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeName }}
</td>
<!-- 收货电话 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
contenteditable
>
{{ value.consigneeMobile }}
</td>
<!-- 物流单号 -->
<td
v-if="value.mergeColumnIndex"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
:rowspan="value.mergeColumnIndex"
>
{{ value.waybillNo }}
</td>
<!-- 合同号 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">
{{ value.orderCode }}
</td>
<!-- 品类明细 -->
<td
colspan="2"
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
>
{{ value.goodsListStr }}
</td>
<!-- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.planNum || 0 }}
</td>
<!-- 本仓装车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.loadingNum || 0 }}
</td>
<!-- 总装车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.stockNum || 0 }}
</td>
<!-- 卸车件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.unloadNum || 0 }}
</td>
<!-- 异常备注 -->
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
</tr>
</template>
<!-- 合计行 -->
<tr>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="10">
合计
</td> </td>
<!-- 计划件数 --> <td colspan="2" style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<!-- 合计 -- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.planNum || 0 }} {{ totalPlanNum }}
</td> </td>
<!-- 本仓装车件数 --> <!-- 本仓装车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.loadingNum || 0 }} {{ totalloadingNum }}
</td> </td>
<!-- 总装车件数 --> <!-- 总装车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.stockNum || 0 }} {{ totalStockloadingNum }}
</td> </td>
<!-- 卸车件数 --> <!-- 卸车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> <td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ value.unloadNum || 0 }} {{ totalUnLoadNum }}
</td> </td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
</tr>
<tr style="border-bottom: 1px solid #000; border-left: 1px solid #000">
<td :colspan="6" contenteditable>投诉电话4000184668</td>
<td :colspan="6" contenteditable>营业部电话</td>
<!-- 异常备注 --> <td :colspan="5" contenteditable>系统单调度</td>
<td
style="border-bottom: 1px solid #000; border-left: 1px solid #000"
contenteditable
></td>
</tr> </tr>
</template> </tbody>
<!-- 合计行 -->
<tr>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" colspan="10">
合计
</td>
<td colspan="2" style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
<!-- 合计 -- 计划件数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalPlanNum }}
</td>
<!-- 本仓装车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalloadingNum }}
</td>
<!-- 总装车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalStockloadingNum }}
</td>
<!-- 卸车数 -->
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable>
{{ totalUnLoadNum }}
</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"></td>
</tr>
<tr style="border-bottom: 1px solid #000; border-left: 1px solid #000">
<td :colspan="6" contenteditable>投诉电话4000184668</td>
<td :colspan="6" contenteditable>营业部电话</td>
<td :colspan="5" contenteditable>系统单调度</td>
</tr>
</table> </table>
</div> </div>
</template> </template>

275
src/option/reportforms/SalesDepartmentIncomeReport.js

@ -0,0 +1,275 @@
export const columnList = [
{
prop: '',
label: '复选框',
type: 0,
width: 55,
fixed: true,
},
{
prop: '',
label: '序号',
type: 12,
values: '',
width: 55,
fixed: true,
},
{
prop: 'businessLine',
label: '事业线',
type: 1,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'departureWarehouseName',
label: '始发仓',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'destinationWarehouseName',
label: '目的仓',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'brand',
label: '品牌',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'waybillNum',
label: '运单数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'num',
label: '件数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'weight',
label: '重量',
type: 1,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'volume',
label: '体积',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'stockNum',
label: '到货件数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'signNum',
label: '签收件数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'pickupFee',
label: '提货费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'freightFee',
label: '运费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'deliveryFee',
label: '送货费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'warehouseManagementFee',
label: '仓库管理费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'storageFee',
label: '仓储费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'startWareOutTime',
label: '始发仓发货日期',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'timeStr',
label: '时间周期',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'handlingFee',
label: '仓储操作费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'sortingFee',
label: '仓储分拣费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'installFee',
label: '安装费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'otherFee',
label: '其他费',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
{
prop: 'totalFee',
label: '总费用',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
isshowSummary: true, //开启统计
},
];

121
src/views/desk/DataBoard.vue

@ -548,7 +548,7 @@
<img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" />
<span>已上架</span> <span>已上架</span>
</div> </div>
<!-- <div <div
class="mt10" class="mt10"
@click=" @click="
() => () =>
@ -562,11 +562,6 @@
details.allocationDataInfo.useNum || 0 details.allocationDataInfo.useNum || 0
}}</span> }}</span>
<span class=""></span> <span class=""></span>
</div> -->
<div class="mt10">
<span class="data mr5px">{{ details.allocationDataInfo.useNum || 0 }}</span>
<span class=""></span>
</div> </div>
</div> </div>
@ -576,7 +571,7 @@
<img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" />
<span>空闲库位</span> <span>空闲库位</span>
</div> </div>
<!-- <div <div
class="mt10" class="mt10"
@click=" @click="
() => () =>
@ -590,11 +585,6 @@
details.allocationDataInfo.nullNum || 0 details.allocationDataInfo.nullNum || 0
}}</span> }}</span>
<span class=""></span> <span class=""></span>
</div> -->
<div class="mt10">
<span class="data mr5px">{{ details.allocationDataInfo.nullNum || 0 }}</span>
<span class=""></span>
</div> </div>
</div> </div>
@ -604,7 +594,7 @@
<img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" />
<span>未上架</span> <span>未上架</span>
</div> </div>
<!-- <div <div
class="mt10" class="mt10"
@click=" @click="
() => () =>
@ -618,11 +608,6 @@
details.allocationDataInfo.noUpshelfNum || 0 details.allocationDataInfo.noUpshelfNum || 0
}}</span> }}</span>
<span class=""></span> <span class=""></span>
</div> -->
<div class="mt10">
<span class="data mr5px">{{ details.allocationDataInfo.noUpshelfNum || 0 }}</span>
<span class=""></span>
</div> </div>
</div> </div>
</div> </div>
@ -718,9 +703,20 @@
</div> </div>
<div class="border pd10 flex-c-sb"> <div class="border pd10 flex-c-sb">
<div class="text_center"> <div
class="text_center"
@click="
() =>
handleDetails('trunklineCarsDataColumn', '干线车次统计 - 总车次 - 车', {
tip: '总车次',
prop: 'totalNum',
})
"
>
<div class="data_box mb10"> <div class="data_box mb10">
<div class="data mr5px">{{ details.trunklineCarsDataInfo.totalNum || 0 }}</div> <div class="data mr5px underline">
{{ details.trunklineCarsDataInfo.totalNum || 0 }}
</div>
<div class=""></div> <div class=""></div>
</div> </div>
<div class=""> <div class="">
@ -728,9 +724,20 @@
</div> </div>
</div> </div>
<div class="text_center"> <div
class="text_center"
@click="
() =>
handleDetails('trunklineCarsDataColumn', '干线车次统计 - 在途 - 车', {
tip: '在途',
prop: 'inTransitNum',
})
"
>
<div class="data_box mb10"> <div class="data_box mb10">
<div class="data mr5px">{{ details.trunklineCarsDataInfo.inTransitNum || 0 }}</div> <div class="data mr5px underline">
{{ details.trunklineCarsDataInfo.inTransitNum || 0 }}
</div>
<div class=""></div> <div class=""></div>
</div> </div>
<div class=""> <div class="">
@ -738,9 +745,20 @@
</div> </div>
</div> </div>
<div class="text_center"> <div
class="text_center"
@click="
() =>
handleDetails('trunklineCarsDataColumn', '干线车次统计 - 作业 - 车', {
tip: '作业',
prop: 'workNum',
})
"
>
<div class="data_box mb10"> <div class="data_box mb10">
<div class="data mr5px">{{ details.trunklineCarsDataInfo.workNum || 0 }}</div> <div class="data mr5px underline">
{{ details.trunklineCarsDataInfo.workNum || 0 }}
</div>
<div class=""></div> <div class=""></div>
</div> </div>
<div class=""> <div class="">
@ -748,9 +766,20 @@
</div> </div>
</div> </div>
<div class="text_center"> <div
class="text_center"
@click="
() =>
handleDetails('trunklineCarsDataColumn', '干线车次统计 - 卸车完成 - 车', {
tip: '卸车完成',
prop: 'unloadNum',
})
"
>
<div class="data_box mb10"> <div class="data_box mb10">
<div class="data mr5px">{{ details.trunklineCarsDataInfo.unloadNum || 0 }}</div> <div class="data mr5px underline">
{{ details.trunklineCarsDataInfo.unloadNum || 0 }}
</div>
<div class=""></div> <div class=""></div>
</div> </div>
<div class=""> <div class="">
@ -1565,7 +1594,7 @@ import {
postOpenOrderDataByWarehouseId, postOpenOrderDataByWarehouseId,
postAllocationDataByWarehouseId, postAllocationDataByWarehouseId,
postHandOrderDataByWarehouseId, postHandOrderDataByWarehouseId,
postTrunklineCarsDataByWarehouseId, getCarsStattisNum,
$_aftersalesData, $_aftersalesData,
} from '@/api/wel/index'; } from '@/api/wel/index';
import { exportExcelByDom } from '@/utils/export'; import { exportExcelByDom } from '@/utils/export';
@ -1873,15 +1902,37 @@ const initTrunklineHandOrderData = async () => {
/** 请求干线车次数据 */ /** 请求干线车次数据 */
const initTrunklineCarsData = async () => { const initTrunklineCarsData = async () => {
const _obj: any = {};
const _keyArr = ['inTransitNum', 'totalNum', 'unloadNum', 'workNum'];
for (let i = 0; i < _keyArr.length; i++) {
const value = _keyArr[i];
_obj[value] = 0;
}
_obj.list = [];
try { try {
details.loadingObj.trunklineCarsData = true; details.loadingObj.trunklineCarsData = true;
const res = await postTrunklineCarsData({}); const res = await getCarsStattisNum({});
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.trunklineCarsDataInfo = data || {};
for (let i = 0; i < data.length; i++) {
const value = data[i];
for (let i = 0; i < _keyArr.length; i++) {
const key = _keyArr[i];
value[key] = isNumber(value[key]) ? Number(value[key]) : 0;
_obj[key] = computeNumber(_obj[key], '+', value[key]).result;
}
_obj.list.push(value);
}
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
details.trunklineCarsDataInfo = _obj;
details.loadingObj.trunklineCarsData = false; details.loadingObj.trunklineCarsData = false;
} }
}; };
@ -2082,7 +2133,7 @@ const initDeliveryData = async () => {
const initSignforData = async () => { const initSignforData = async () => {
const _keyArr = ['signNum', 'unSignNum', 'clerkSignNum', 'planNum', 'clerkOverTimeSignfoNum']; const _keyArr = ['signNum', 'unSignNum', 'clerkSignNum', 'planNum', 'clerkOverTimeSignfoNum'];
const _obj = { const _obj: any = {
daySignData: { data: [] }, daySignData: { data: [] },
monthSignData: { data: [] }, monthSignData: { data: [] },
dayBillLadingSignData: { data: [] }, dayBillLadingSignData: { data: [] },
@ -2106,8 +2157,6 @@ const initSignforData = async () => {
const item = _obj[key]; const item = _obj[key];
item[value] = 0; item[value] = 0;
console.log('item :>> ', item);
} }
} }
@ -2154,8 +2203,6 @@ const initSignforData = async () => {
_obj.monthSignData.unSignNum _obj.monthSignData.unSignNum
).result; ).result;
console.log('_obj :>> ', _obj);
// //
if ( if (
!isNumber(_obj.monthBillLadingSignData.signNum) || !isNumber(_obj.monthBillLadingSignData.signNum) ||
@ -2686,8 +2733,8 @@ const handleDetails = async (type, title, optionObj: OptionObjType) => {
// 线 // 线
case 'trunklineCarsDataColumn': case 'trunklineCarsDataColumn':
res = await postTrunklineCarsDataByWarehouseId({}); handleShowEcharts(details.trunklineCarsDataInfo.list, title, optionObj);
break; return;
default: default:
break; break;
} }
@ -2727,7 +2774,7 @@ const handleShowAbnormalData = (
title, title,
type: 'dayData' | 'monthData', type: 'dayData' | 'monthData',
optionObj: any = {}, optionObj: any = {},
chartType chartType = 'pie'
) => { ) => {
details.popUpShow.isShow = true; details.popUpShow.isShow = true;
details.title = title; details.title = title;

522
src/views/reportforms/SalesDepartmentIncomeReport.vue

@ -0,0 +1,522 @@
<template>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<!-- 搜索模块 -->
<div v-h5uShow="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search" label-width="100px">
<el-form-item label="品牌" prop="brandId">
<el-select
class="w100"
v-model="query.brand"
filterable
placeholder="请选择"
default-first-option
clearable
>
<el-option
v-for="item in details.brandOptions"
:key="item.brandId"
:label="item.brandName"
:value="item.brandId"
/>
</el-select>
</el-form-item>
<el-form-item label="年份">
<el-date-picker
v-model="query.year"
type="year"
format="YYYY"
placeholder="请选择"
value-format="YYYY"
@change="
() => {
delete details.query.month;
delete details.query.timeArr;
}
"
/>
</el-form-item>
<el-form-item label="月份">
<el-date-picker
v-model="query.month"
type="month"
format="YYYY-MM"
placeholder="请选择"
value-format="YYYY-MM"
@change="
() => {
delete details.query.year;
delete details.query.timeArr;
}
"
/>
</el-form-item>
<el-form-item label="时间周期">
<el-date-picker
v-model="query.timeArr"
type="daterange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="YYYY-MM-DD"
@change="
() => {
delete details.query.year;
delete details.query.month;
}
"
/>
</el-form-item>
<el-form-item label="事业线">
<el-select
class="w100"
v-model="query.businessLine"
filterable
placeholder="请选择"
default-first-option
clearable
>
<el-option
v-for="item in details.businessLineOption"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item label="始发仓">
<el-input v-model="query.departureWarehouseName" placeholder="请输入" clearable />
</el-form-item>
<el-form-item label="目的仓">
<el-input v-model="query.destinationWarehouseName" placeholder="请输入" clearable />
</el-form-item>
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset"> </el-button>
</el-form-item>
</el-form>
</div>
<!-- 控件模块 -->
<div class="avue-crud__header flex-c-sb">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="Download" @click="ExportData"> 导出 </el-button>
</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="Search" @click="searchHide" circle></el-button>
</div>
</div>
<!-- 表格 -->
<!-- 列表模块 -->
<tablecmt
ref="tableNodeRef"
:columnList="details.columnList"
:tableData="details.data"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> </template>
</template>
</tablecmt>
<!-- 分页模块 -->
<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.pageNum"
:page-sizes="[30, 50, 80, 120, 500]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
</div>
</div>
</basic-container>
<edittablehead
@closce="showdrawer"
:drawerShow="drawerShow"
:columnList="details.columnList"
v-model="details.columnList"
></edittablehead>
</template>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick, defineAsyncComponent } from 'vue';
import functions from '@/utils/functions.js';
import dayjs from 'dayjs';
import { mapGetters, useStore } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { postFindBrandList } from '@/api/waybill/TemporaryStorageList';
import {
postDeptIncomingPage,
postFindbusinessLine,
postDeptIncomingExport,
} from '@/api/reportforms/SalesDepartmentIncomeReport';
import {
setNodeHeight,
getHtmls,
deepClone,
getObjType,
handleTranslationDataSeclect,
handleClearTableQuery,
handleSelectQuery,
handleInputQuery,
downloadXls,
} from '@/utils/util';
import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
import { columnList } from '@/option/reportforms/SalesDepartmentIncomeReport';
//
const $router = useRouter();
const $store = useStore();
//
const tableNodeRef = ref();
const details = reactive<any>({
/** 是否开启搜索 */
search: true,
/** 表格搜索条件 */
query: {},
/** 时间快捷选择设置 */
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: deepClone(columnList),
data: [],
/** 头部搜索配置 */
titleSearchOption: [],
/** 流转节点数据 */
flowNodeData: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
list: false,
packageListLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
pageNum: 1,
pageSize: 30,
total: 0,
},
/** 品牌 */
brandOptions: [],
/** 事业线 */
businessLineOption: [],
/** 弹出层显示 */
popUpShow: {},
/** 全屏 */
fullscreenObj: {},
});
const { search, query, shortcuts, loadingObj, selectionList, drawerShow, page } = toRefs(details);
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
/** 权限按钮 */
const permissionObj = reactive({});
/** 请求页面数据 */
const onLoad = async (params = {}) => {
try {
details.loadingObj.list = true;
const submitData = { ...details.page, ...details.query, ...params };
for (const key in submitData) {
const element = submitData[key];
if (!element && element !== 0) delete submitData[key];
}
//
if (submitData.month) {
const _arr = submitData.month.split('-');
submitData.year = _arr[0];
submitData.month = _arr[1];
}
//
else if (getObjType(submitData.timeArr) === 'array' && submitData.timeArr.length > 0) {
submitData.startTimeStr = submitData.timeArr[0];
submitData.endTimeStr = submitData.timeArr[1];
}
if (
(getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) &&
!submitData.year &&
!submitData.month
) {
details.data = [];
return ElMessage.warning('请选择时间');
}
delete submitData.timeArr;
delete submitData.total;
const res = await postDeptIncomingPage(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.data = getObjType(data.records) === 'array' ? data.records : [];
details.page.total = data.total;
handleTranslationDataSeclect(details.data, details.columnList);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.list = false;
}
};
const init = () => {
const time = new Date().getTime();
details.query.timeArr = [
dayjs(time - 1000 * 60 * 60 * 24 * 7).format('YYYY-MM-DD'),
dayjs(time).format('YYYY-MM-DD'),
];
onLoad();
};
init();
/** 查询品牌 */
const handleFindBrand = async () => {
try {
const res = await postFindBrandList();
console.log('res :>> ', res);
const { data, code } = res.data;
if (code !== 200) return;
console.log('data :>> ', data);
details.brandOptions = data || [];
} catch (error) {
console.log('error :>> ', error);
}
};
/** 查询事业线 */
const handleFindbusinessLine = async () => {
try {
const res = await postFindbusinessLine();
console.log('res :>> ', res);
const { data, code } = res.data;
if (code !== 200) return;
console.log('data :>> ', data);
details.businessLineOption = data || [];
} catch (error) {
console.log('error :>> ', error);
}
};
handleFindbusinessLine();
handleFindBrand();
/** 搜索 */
const searchChange = () => {
onLoad();
};
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.page.pageNum = 1;
handleClearTableQuery(details.columnList);
onLoad();
};
/** 展开列表控件 */
const showdrawer = (_flag?: boolean) => {
details.drawerShow = _flag;
};
/** 是否开启搜索区 */
const searchHide = () => {
details.search = !details.search;
setNodeHeight(tableNodeRef.value.$el, '', true);
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
handleInputQuery(index, row, details.query);
onLoad();
};
/** 表格表头时间选择 */
const timesc = (index, row) => {
console.log(index, row);
if (!!index) {
index = dayjs(index).format('YYYY-MM-DD');
}
details.query[row.prop] = index;
if (!index) {
delete details.query[row.prop];
}
onLoad();
};
/** 表格表头输入框搜索 */
const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
handleSelectQuery(index, row, details.query);
onLoad();
};
/** 表格表头复选框选择 */
const selectionChange = (list: any) => {
details.selectionList = list;
};
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = pageNum => {
details.page.pageNum = pageNum;
onLoad();
};
/** 弹出层开启前清除数据 */
const beforeClose = done => {
done();
details.form = {};
details.selectionList = [];
details.view = false;
};
//
const ExportData = async () => {
try {
details.loadingObj.list = true;
const submitData = { ...details.page, ...details.query };
for (const key in submitData) {
const element = submitData[key];
if (!element && element !== 0) delete submitData[key];
}
//
if (submitData.month) {
const _arr = submitData.month.split('-');
submitData.year = _arr[0];
submitData.month = _arr[1];
}
//
else if (getObjType(submitData.timeArr) === 'array' && submitData.timeArr.length > 0) {
submitData.startTimeStr = submitData.timeArr[0];
submitData.endTimeStr = submitData.timeArr[1];
}
if (
(getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) &&
!submitData.year &&
!submitData.month
) {
return ElMessage.warning('请选择时间');
}
delete submitData.timeArr;
delete submitData.total;
const res = await postDeptIncomingExport(submitData);
const { status, data } = res;
if (status !== 200) return;
const time = new Date().getTime();
downloadXls(data, '营业部收入报表 -' + time + '.xlsx');
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.list = false;
}
};
</script>
<style scoped lang="scss">
//
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-range-editor.el-input__wrapper) {
height: 100% !important;
}
.el_div_input {
width: 100%;
display: flex;
align-items: center;
.el_dy_icon {
font-size: 1.5em;
}
}
</style>

34
src/views/waybill/orderPackageList.vue

@ -120,24 +120,22 @@
</tablecmt> </tablecmt>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div>
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> <!-- 分页模块 -->
<!-- 分页模块 --> <el-pagination
<el-pagination align="right"
align="right" background
background @size-change="sizeChange"
@size-change="sizeChange" @current-change="currentChange"
@current-change="currentChange" :current-page="page.pageNum"
:current-page="page.pageNum" :page-sizes="[30, 50, 80, 120, 500]"
:page-sizes="[30, 50, 80, 120, 500]" :page-size="page.pageSize"
:page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
layout="total, sizes, prev, pager, next, jumper" :total="page.total"
:total="page.total" >
> </el-pagination>
</el-pagination> </div>
</div>
</el-row>
</div> </div>
</basic-container> </basic-container>

Loading…
Cancel
Save