Browse Source

修改部分样式, 并新增运单列表导出

dev-xx
qb 10 months ago
parent
commit
74a4151ea3
  1. 12
      src/api/waybill/WaybillOrderList.js
  2. 4
      src/styles/element-ui.scss
  3. 2
      src/views/distribution/artery/TripartiteTransfer.vue
  4. 3
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  5. 2
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  6. 2
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  7. 2
      src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue
  8. 4
      src/views/distribution/signfor/distributionSignfor.vue
  9. 593
      src/views/warehouse/prewarehousing/PreStoragePackage2.vue
  10. 31
      src/views/waybill/WaybillOrderList.vue

12
src/api/waybill/WaybillOrderList.js

@ -69,3 +69,15 @@ export const postUnFreezeWaybill = data => {
data,
});
};
/**
* 运单导出
*/
export const postExport = data => {
return request({
url: '/api/logpm-warehouse/warehouseWaybill/exportWaybillList',
method: 'post',
data,
responseType: 'blob',
});
};

4
src/styles/element-ui.scss

@ -95,13 +95,13 @@ li.is-active {
// 标签
// 标签
$red: #ff6161 !important;
$red: #ff5722 !important;
.red.el-tag {
background: $red;
border-color: $red;
}
$green: #23b566 !important;
$green: #009688 !important;
.green.el-tag {
background: $green;
border-color: $green;

2
src/views/distribution/artery/TripartiteTransfer.vue

@ -901,7 +901,7 @@ const editTransfer = async () => {
if (_length > 1) return ElMessage.warning('只能选择一条数据修改');
if (Number(details.selectionList[0].isSettlement) === 1)
if (Number(details.selectionList[0].isSettlement) === 2)
return ElMessage.warning('已结算, 无法修改');
if (Number(details.selectionList[0].loadStatus) === 90)

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

@ -571,7 +571,6 @@ export default {
mounted() {
this.init();
this.onLoad(this.page);
},
computed: {
...mapGetters(['permission']),
@ -1447,7 +1446,7 @@ export default {
.value {
transition: all 1.5s;
font-size: 1rem;
color: #397b12;
color: #009688;
}
}
</style>

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

@ -1398,7 +1398,7 @@ export default {
.value {
transition: all 1.5s;
font-size: 1rem;
color: #397b12;
color: #009688;
}
}
</style>

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

@ -1360,7 +1360,7 @@ export default {
.value {
transition: all 1.5s;
font-size: 1rem;
color: #397b12;
color: #009688;
}
}
</style>

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

@ -1712,7 +1712,7 @@ export default {
.value {
transition: all 1.5s;
font-size: 1rem;
color: #397b12;
color: #009688;
}
}
</style>

4
src/views/distribution/signfor/distributionSignfor.vue

@ -661,7 +661,7 @@ export default {
this.queryDictionary();
this.init();
this.getMasterDriverData();
// this.columnListedit=JSON.parse(JSON.stringify(this.columnList))
},
computed: {
@ -1190,7 +1190,7 @@ export default {
.value {
transition: all 1.5s;
font-size: 1rem;
color: #397b12;
color: #009688;
}
}
</style>

593
src/views/warehouse/prewarehousing/PreStoragePackage2.vue

@ -0,0 +1,593 @@
<template>
<basic-container v-loading="loadingObj.pageLoading">
<div class="avue-crud">
<!-- 搜索模块 -->
<div v-h5uShow="!search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="创建时间:" class="el-times">
<!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>-->
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
value-format="YYYY-MM-DD"
/>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<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>
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"></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>
</el-row>
<!-- 表格 -->
<!-- 列表模块 -->
<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 === '操作'">
<el-text
v-if="details.orderStatus === 'haveData'"
@click="handleShowPackageOrderList(slotProps.scope)"
>
包明细
</el-text>
</template>
</template>
</tablecmt>
<!-- 分页模块 -->
<el-row class="el-fy">
<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, 100, 200, 500, 1000]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
</div>
</el-row>
</div>
</basic-container>
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"
:drawerShow="drawerShow"
:columnList="details.columnList"
v-model="details.columnList"
></edittablehead>
</template>
<script setup lang="ts">
import {
ref,
reactive,
toRefs,
computed,
onMounted,
nextTick,
onActivated,
onDeactivated,
} from 'vue';
import functions from '@/utils/functions.js';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import {
getopenOrderAdvancePageList,
postOpenOrderFreezeByAdvanceIds,
postOpenOrderDeletedAdvance,
postFindBrandList,
postOpenLabel,
} from '@/api/waybill/TemporaryStorageList';
import { getLazyTreeAll } from '@/api/base/region';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import {
downloadXls,
setNodeHeight,
deepClone,
downloadFileBase64,
handleClearTableQuery,
} from '@/utils/util';
import { columnList } from '@/option/waybill/TemporaryStorageList';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage, ElMessageBox } from 'element-plus';
import type { FormInstance, FormRules } from 'element-plus';
import { getToken } from '@/utils/auth';
import { useStore } from 'vuex';
//
const $router = useRouter();
// vuex
const $store = useStore();
//
const ruleFormRef = ref<FormInstance>();
columnList;
/** 表格实例 */
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];
},
},
],
/** 时间选择器数据 */
stockupDate: [],
/** 列表 */
columnList: deepClone(columnList),
/** 列表数据 */
data: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
list: false,
/** 开标签 */
addTagLoading: false,
/** 上传 */
UploadLoadong: false,
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
pageNum: 1,
pageSize: 30,
total: 0,
},
/** 包明细分页参数 */
packageListPage: {
currentPage: 1,
pageSize: 30,
total: 0,
},
/** 弹出层显示 */
popUpShow: {
/** 包件明细 */
packageOrderListlVisited: false,
/** 修改客户信息 */
editClientInfoVisible: false,
/** 导入 -- 家配 */
UploadPackageDelivery: false,
/** 导入 -- 批量开标前 */
UploadBatch: false,
/** 新增标签 */
addTagVisited: false,
},
/** 列表Dom节点 */
listNode: '',
/** 打印的html */
html: '',
/** 头部 */
header: {
'Blade-Auth': 'bearer ' + getToken(),
},
});
//
getLazyTreeAll().then(res => {
if (res.data.success) {
details.addTagInfo.cargoInfo.find(val => val.label === '所属区域').checkArr = res.data.data;
}
});
//
postFindBrandList({}).then(res => {
const { code, data } = res.data;
if (code !== 200) return;
details.addTagInfo.cargoInfo.find(val => val.label === '品牌').checkArr = data;
});
const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } =
toRefs(details);
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
onMounted(() => {
const timer = setTimeout(() => {
details.listNode = document.querySelector('.maboxhi');
details.listNode.style.transition = 'all .5s ease-out';
clearTimeout(timer);
}, 100);
});
/** 请求页面数据 */
const onLoad = async (params = {} as any, isRefresh?: boolean) => {
try {
// loading
details.loadingObj.list = true;
console.log('status :>> ', status);
details.query.freezeStatus = '0';
//
params.hasPackage = 1;
//
const res = await getopenOrderAdvancePageList(details.page, { ...details.query, ...params });
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
const _arr = [...details.selectionList];
for (let i = 0; i < data.records.length; i++) {
const value = data.records[i];
value.legacyStatusName = Number(value.legacyStatus) ? '是' : '否';
}
details.data = data.records;
details.page.total = data.total;
if (isRefresh) return;
for (const item of data.records) {
for (let index = 0; index < _arr.length; index++) {
const element = _arr[index];
if (element.id === item.id) {
_arr.splice(index, 1, item);
break;
}
}
}
console.log('_arr :>> ', _arr);
await nextTick();
tableNodeRef.value.handleCheckSelect(_arr);
return res.data;
} catch (error) {
console.log('error :>> ', error);
} finally {
// loading
if (status === 'haveData') details.loadingObj.haveDataList = false;
else details.loadingObj.notHaveDataList = false;
}
};
const initOnLoad = async (params = {}, isRefresh = false) => {
details.page.pageNum = 1;
details.page.total = 0;
await onLoad(params, isRefresh);
};
initOnLoad();
/** 搜索 */
const searchChange = () => {
if (details.stockupDate.length === 0) {
delete details.query.startCreateTimeStr;
delete details.query.endCreateTimeStr;
} else {
details.query.startCreateTimeStr = dayjs(details.stockupDate[0]).format('YYYY-MM-DD');
details.query.endCreateTimeStr = dayjs(details.stockupDate[1]).format('YYYY-MM-DD');
}
initOnLoad();
};
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
handleClearTableQuery(details.columnList);
initOnLoad();
};
/** 展开列表控件 */
const showdrawer = (_flag?: boolean) => {
details.drawerShow = _flag;
};
/** 是否开启搜索区 */
const searchHide = () => {
details.search = !details.search;
setNodeHeight(details.listNode, '', true);
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
index === '' ? delete details.query[row.prop] : (details.query[row.prop] = index);
initOnLoad();
};
/** 表格表头时间选择 */
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];
}
initOnLoad();
};
/** 表格表头输入框搜索 */
const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
index === ''
? delete details.query[row.prop.replace('Name', '')]
: (details.query[row.prop.replace('Name', '')] = index);
initOnLoad();
};
/** 表格表头复选框选择 */
const selectionChange = (list: any) => {
details.selectionList = list;
console.log('list :>> ', list);
};
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = current => {
details.page.pageNum = current;
onLoad();
};
/**
* 设置列表 -- 固定函数
* 弹窗的勾选回调用于更改头部数组
* 固定搭配只需要更换 columnList
* */
const setnewcolum = (newarr, headarr, type) => {
if (type == 1) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'checkList', headarr);
} else if (type == 2) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'flexList', headarr);
} else if (type == 3) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'sortlist', headarr);
}
};
/** 弹出层开启前清除数据 */
const beforeClose = done => {
done();
details.selectionList = [];
details.view = false;
};
/** 查看包明细 */
const handleShowPackageOrderList = ({ row }) => {
$router.push({
path: '/waybill/orderPackageListDetails?name=包明细',
query: {
id: row.id,
name: `订单 -- ${row.orderCode} 包明细`,
},
});
};
onActivated(() => {
console.log('activated');
console.log('this.$store :>> ', $store);
if ($store.state.isRefresh.refreshObj.PreStoragePackage) {
//
details.query = {};
details.page.pageNum = 1;
onLoad({}, true);
$store.commit('EDIT_REFRESHITEM', { title: 'PreStoragePackage', status: false });
}
});
</script>
<style scoped lang="scss">
.fo-fl {
display: flex;
flex-wrap: wrap;
zoom: 0.9;
}
//
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-range-editor.el-input__wrapper) {
height: 100% !important;
}
//
.add_row {
display: flex;
justify-content: space-between;
}
.add_row_title {
text-align: center;
margin-bottom: 10px;
font-size: 18px;
font-weight: bold;
}
//
.statistics_row {
margin: 10px 0;
font-size: 14px;
zoom: 0.9;
display: flex;
> div {
margin-right: 20px;
}
}
//
.crad_container {
display: flex;
.card_container_item {
flex: 1;
// padding: 10px;
border-radius: 5px;
box-shadow: 0 0 5px #ccc;
&:first-child {
margin-right: 20px;
}
.card_container_item_title {
padding: 10px;
border-bottom: 1px solid #ccc;
display: flex;
justify-content: space-between;
align-items: center;
}
.card_container_item_box {
padding: 10px;
}
}
}
//
:deep(.el-divider__text.is-left) {
font-size: 20px;
font-weight: bold;
color: var(--el-color-primary);
}
//
:deep(.el-divider__text.is-center) {
font-size: 20px;
font-weight: bold;
color: var(--el-color-primary);
}
//
.addTagRow {
display: flex;
& > div {
flex: 1;
}
}
//
:deep(.el-input-number) {
width: var(--el-input-width);
}
:deep(.el-form-item__error) {
z-index: 99;
--el-color-danger: #f00;
}
:deep(.el-form-item.is-error .el-input__wrapper) {
--el-color-danger: #f00;
}
:deep(
.el-form-item.is-required:not(.is-no-asterisk).asterisk-left > .el-form-item__label:before,
.el-form-item.is-required:not(.is-no-asterisk).asterisk-left
> .el-form-item__label-wrap
> .el-form-item__label:before
) {
--el-color-danger: #f00;
}
.overflow {
overflow: hidden;
}
// tabbar
:deep(.el-tabs__item.is-active) {
font-weight: bold;
color: #d38729;
}
:deep(.el-tabs__active-bar) {
background: #d38729;
}
</style>

31
src/views/waybill/WaybillOrderList.vue

@ -61,6 +61,7 @@
<el-button type="primary" icon="Delete" @click="handleBatchDelete">批量作废</el-button>
<el-button type="primary" icon="Rank" @click="handleBatchFreeze"> </el-button>
<el-button type="primary" icon="Refresh" @click="handleBatchRecover"> </el-button>
<el-button type="primary" icon="Download" @click="handleExport"> </el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -236,6 +237,7 @@ import {
postAbolishWaybill,
postFreezeWaybill,
postUnFreezeWaybill,
postExport,
} from '@/api/waybill/WaybillOrderList.js';
import {
downloadXls,
@ -840,6 +842,35 @@ const handleUploadReceiptSubmit = async () => {
details.loadingObj.pageLoading = false;
}
};
/** 导出 */
const handleExport = () => {
ElMessageBox.confirm('确定导出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { ...details.query };
const res = await postExport(submitData);
console.log('res :>> ', res);
const { status, data } = res;
if (status !== 200) return ElMessage.error({ message: '导出失败' });
console.log('data :>> ', data);
downloadXls(data, '运单数据.xlsx');
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
</script>
<style scoped lang="scss">

Loading…
Cancel
Save