Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 11 months ago
parent
commit
a199186e0b
  1. 19
      src/api/distribution/distributionStockArticle.js
  2. 231
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  3. 144
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  4. 203
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  5. 172
      src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue

19
src/api/distribution/distributionStockArticle.js

@ -11,15 +11,14 @@ export const getList = (current, size, params) => {
},
});
};
export const $_signforList = (params) => {
export const $_signforList = params => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/signforList',
method: 'get',
params
params,
});
};
export const getListStockArticleWhole = (current, size, params) => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/listWhole',
@ -365,7 +364,6 @@ export const postShowOrderCode = params => {
});
};
export const $_signforDistributionStockArticleList = params => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/export-signforDistributionStockArticleList',
@ -373,4 +371,15 @@ export const $_signforDistributionStockArticleList = params => {
params,
responseType: 'blob',
});
};
};
/**
* 获取全部在库信息
*/
export const getCollectt = params => {
return request({
url: '/api/logpm-distribution/distributionStockArticleStatistics/collect',
method: 'get',
params,
});
};

231
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -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>

144
src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue

@ -33,35 +33,51 @@
</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"
<div class="flex-c-sb">
<!-- 头部左侧按钮模块 -->
<div>
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="handler"
>创建异常</el-button
> -->
<el-button type="danger" icon="Edit" @click="handleCallDelivery('3')" v-if="handler"
>修改客户信息</el-button
>
<el-button type="danger" icon="Edit" @click="Modifywaybillrecipient"
>修改运单收货人</el-button
>
<el-button type="danger" 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="Edit" @click="handleCallDelivery('3')" v-if="handler"
>修改客户信息</el-button
>
<el-button type="danger" icon="Edit" @click="Modifywaybillrecipient"
>修改运单收货人</el-button
>
<el-button type="danger" icon="Edit" @click="handleCallDelivery('2')" v-if="handler"
>修改服务类型</el-button
>
<el-button type="danger" icon="Download" @click="handleExport" plain> </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="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"
@ -399,6 +415,7 @@ import {
stockArticExport,
$_Modifywaybillrecipient,
postShowOrderCode,
getCollectt,
} from '@/api/distribution/distributionStockArticle';
import { getListOwn } from '@/api/distribution/distributionParcelList';
import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery';
@ -408,7 +425,7 @@ import option from '@/option/distribution/distributionStockArticle';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { downloadXls, setNodeHeight } from '@/utils/util';
import { downloadXls, setNodeHeight, getObjType } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone, hanleTextLineFeed } from '@/utils/util.js';
import { ElMessage } from 'element-plus';
@ -524,6 +541,15 @@ export default {
popUpShow: {
printVisited: false,
},
/** 展示数据 */
totalInfo: {
/** 订单总数 */
orderNum: 0,
/** 包件总数 */
packageCodeNum: 0,
/** 运单总数 */
waybillNum: 0,
},
};
},
mounted() {
@ -1250,11 +1276,10 @@ export default {
}
this.query.genre = 1;
this.query.typeService = 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;
@ -1313,6 +1338,55 @@ export default {
},
});
},
/** 获取全部订单数据 */
async getAllOrderInfo() {
try {
const submitData = {
genre: 1,
typeService: 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);
}
},
},
};
</script>
@ -1384,4 +1458,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>

203
src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

@ -30,68 +30,83 @@
</el-form-item>
</el-form>
</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"
<div class="flex-c-sb">
<!-- 头部左侧按钮模块 -->
<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 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="el-icon-plus" 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="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
>
<el-button type="danger" icon="el-icon-plus" @click="handleExport" plain> </el-button>
<!-- <el-button type="danger" icon="el-icon-plus" 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
>
<el-button type="danger" icon="el-icon-plus" @click="handleExport" plain
> </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 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>
</div>
<!-- 列表模块 -->
<tablecmt
class="mt10"
ref="tableNode"
:columnList="columnList"
:tableData="data"
@ -390,6 +405,7 @@ import {
addStock,
stockArticExport,
postShowOrderCode,
getCollectt,
} from '@/api/distribution/distributionStockArticle';
import { getListOwn } from '@/api/distribution/distributionParcelList';
import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery';
@ -399,7 +415,7 @@ import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone, setNodeHeight, downloadXls } from '@/utils/util.js';
import { deepClone, setNodeHeight, downloadXls, getObjType } from '@/utils/util.js';
const _newCol = deepClone(columnList);
export default {
@ -497,6 +513,15 @@ export default {
popUpShow: {
printVisited: false,
},
/** 展示数据 */
totalInfo: {
/** 订单总数 */
orderNum: 0,
/** 包件总数 */
packageCodeNum: 0,
/** 运单总数 */
waybillNum: 0,
},
};
},
mounted() {
@ -1219,11 +1244,10 @@ export default {
}
this.query.genre = 1;
this.query.typeService = 2;
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;
console.log('>>>>>>>', data.records);
this.page.total = data.total;
@ -1284,6 +1308,55 @@ export default {
},
});
},
/** 获取全部订单数据 */
async getAllOrderInfo() {
try {
const submitData = {
genre: 1,
typeService: 2,
...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);
}
},
},
};
</script>
@ -1341,4 +1414,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>

172
src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue

@ -31,50 +31,65 @@
</el-form-item>
</el-form>
</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"
<div class="flex-c-sb">
<!-- 头部左侧按钮模块 -->
<div>
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="handler"
>创建异常</el-button
> -->
<el-button type="primary" icon="el-icon-plus" @click="handlebill" v-if="handler"
>创建提货单</el-button
>
<el-button type="primary" icon="Position" @click="handleStockList" v-if="handler"
>批量转库存品</el-button
>
<el-button type="danger" icon="Edit" @click="handleCallDelivery('3')" v-if="handler"
>修改客户信息</el-button
>
<el-button type="danger" icon="Edit" @click="Modifywaybillrecipient"
>修改运单收货人</el-button
>
<el-button type="danger" icon="Edit" @click="handleCallDelivery('2')" v-if="handler"
>修改服务类型</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="handleCallDelivery('1', '1')"
>通知提货</el-button
>
<el-button type="danger" icon="Plus" @click="handleCallDelivery('1', '2')"
>再次通知</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="primary" icon="Position" @click="handleStockList" v-if="handler"
>批量转库存品</el-button
>
<el-button type="danger" icon="Edit" @click="handleCallDelivery('3')" v-if="handler"
>修改客户信息</el-button
>
<el-button type="danger" icon="Edit" @click="Modifywaybillrecipient"
>修改运单收货人</el-button
>
<el-button type="danger" icon="Edit" @click="handleCallDelivery('2')" v-if="handler"
>修改服务类型</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="handleCallDelivery('1', '1')"
>通知提货</el-button
>
<el-button type="danger" icon="Plus" @click="handleCallDelivery('1', '2')"
>再次通知</el-button
>
<el-button type="danger" icon="Download" @click="handleExport" plain> </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" >创建提货单</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"
@ -529,6 +544,7 @@ import {
stockArticExport,
$_Modifywaybillrecipient,
postShowOrderCode,
getCollectt,
} from '@/api/distribution/distributionStockArticle';
import { getListOwn } from '@/api/distribution/distributionParcelList';
import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery';
@ -540,9 +556,8 @@ import { getDictionaryBiz } from '@/api/system/dict';
import { getListCallDelivery } from '@/api/distribution/distrilbutionCallDelivery';
import dayjs from 'dayjs';
import { getListMaterial } from '@/api/basic/basicMaterial';
import { downloadXls, setNodeHeight } from '@/utils/util';
import { downloadXls, setNodeHeight, deepClone, getObjType } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone } from '@/utils/util.js';
import { ElMessage } from 'element-plus';
const _newCol = deepClone(columnList);
export default {
@ -669,6 +684,15 @@ export default {
popUpShow: {
printVisited: false,
},
/** 展示数据 */
totalInfo: {
/** 订单总数 */
orderNum: 0,
/** 包件总数 */
packageCodeNum: 0,
/** 运单总数 */
waybillNum: 0,
},
};
},
created() {
@ -1572,11 +1596,10 @@ export default {
}
this.query.genre = 1;
this.query.typeService = 3;
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;
@ -1635,6 +1658,55 @@ export default {
},
});
},
/** 获取全部订单数据 */
async getAllOrderInfo() {
try {
const submitData = {
genre: 1,
typeService: 3,
...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);
}
},
},
};
</script>
@ -1694,4 +1766,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>

Loading…
Cancel
Save