Browse Source

新增指标导入

dev-xx
qb 1 year ago
parent
commit
1af8ccb648
  1. 15
      src/api/distribution/VehicleStowage.js
  2. 2
      src/option/distribution/VehicleStowage.js
  3. 12
      src/option/distribution/addVehicleStowage.js
  4. 32
      src/option/supervise/supervise.js
  5. 237
      src/views/distribution/artery/VehicleStowage.vue
  6. 16
      src/views/distribution/artery/zeroAdditionalRecording.vue
  7. 103
      src/views/supervise/management.vue

15
src/api/distribution/VehicleStowage.js

@ -109,7 +109,7 @@ export const postUpdateLoadScanFinalNodeIdById = data => {
*/
export const postFindNextNodeList = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findNextNodeList ',
url: '/api/logpm-trunkline/carsLoad/findNextNodeList',
method: 'post',
data,
});
@ -120,7 +120,18 @@ export const postFindNextNodeList = data => {
*/
export const postRemoveCarsLoadScan = data => {
return request({
url: 'logpm-trunkline/api/carsLoad/removeCarsLoadScan ',
url: '/api/logpm-trunkline/api/carsLoad/removeCarsLoadScan',
method: 'post',
data,
});
};
/**
* 手动装车
*/
export const postManualLoadingloadId = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/manualLoading',
method: 'post',
data,
});

2
src/option/distribution/VehicleStowage.js

@ -378,7 +378,7 @@ export const columnList = [
label: '操作',
type: 6,
values: '',
width: '400',
width: '250',
checkarr: [],
fixed: 'right',
sortable: false,

12
src/option/distribution/addVehicleStowage.js

@ -195,7 +195,7 @@ export const columnList = [
{
prop: 'destination',
label: '到站',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -206,7 +206,7 @@ export const columnList = [
{
prop: 'destinationWarehouseName',
label: '目的站',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -217,7 +217,7 @@ export const columnList = [
{
prop: 'shipper',
label: '发货单位',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -248,7 +248,7 @@ export const columnList = [
{
prop: 'productName',
label: '品类名称',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -323,7 +323,7 @@ export const columnList = [
{
prop: 'customerTrain',
label: '客户车次',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -333,7 +333,7 @@ export const columnList = [
{
prop: 'remark',
label: '运单备注',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],

32
src/option/supervise/supervise.js

@ -72,8 +72,6 @@ export const classificationColumnList = [
},
];
export const managementColumnList = [
{
prop: '',
@ -124,8 +122,17 @@ export const managementColumnList = [
sortable: true,
head: false,
},
{
prop: 'createDeptName',
label: '考核归属部门',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'createTime',
label: '创建时间',
@ -149,8 +156,6 @@ export const managementColumnList = [
},
];
// 指标列表
export const IndicatorColumnList = [
{
@ -213,6 +218,17 @@ export const IndicatorColumnList = [
sortable: true,
head: false,
},
{
prop: 'createDeptName',
label: '考核归属部门',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'objectionRemark',
label: '描述',
@ -257,10 +273,10 @@ export const IndicatorColumnList = [
sortable: true,
head: false,
},
{
prop: 'isObjection',
label: '是否存在异议',//1 表示提交 2 表示审核 通过 3 表示审核失败
label: '是否存在异议', //1 表示提交 2 表示审核 通过 3 表示审核失败
type: 1,
values: '',
width: '130',

237
src/views/distribution/artery/VehicleStowage.vue

@ -1,65 +1,59 @@
<template>
<basic-container>
<div class="avue-crud">
<div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 -->
<el-row v-if="!search">
<div v-h5uShow="!search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="el-fr-d">
<div class="fo-fl">
<el-form-item label="车次号:">
<el-input
v-model="query.serviceNumber"
placeholder="请输入车次号"
clearable
></el-input>
</el-form-item>
<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
/>
</el-form-item>
<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
/>
</el-form-item>
<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
/>
</el-form-item>
</div>
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="车次号:">
<el-input v-model="query.serviceNumber" placeholder="请输入车次号" clearable></el-input>
</el-form-item>
<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
/>
</el-form-item>
<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
/>
</el-form-item>
<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
/>
</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>
</el-row>
</div>
<!-- 控件模块 -->
<el-row>
@ -162,40 +156,47 @@
<template v-if="slotProps.scope.column.label === '操作'">
<div class="handleControl">
<el-button type="text" @click="handleShowzeroAdditionalRecording(slotProps.scope)">
<el-text @click="handleShowzeroAdditionalRecording(slotProps.scope)">
零担补录
</el-button>
<el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)">
装车明细
</el-button>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
</el-text>
<el-text @click="handleShowTruckLoadingDetails(slotProps.scope)"> 装车明细 </el-text>
<el-text
v-if="Mydata.id === slotProps.scope.row.nowWarehouseId"
@click="handleEditStowage(slotProps.scope)"
>
编辑
</el-button>
<!-- <el-button type="text">数据同步</el-button> -->
<!-- <el-button type="text">批量装车</el-button>
<el-button type="text">手动装车</el-button> -->
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleNodeCost(slotProps.scope)"
>
节点费用
</el-button>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleDirectGoMarketVesited(slotProps.scope)"
>
配置直发商家
</el-button>
<el-button type="text" @click="handleDirectGoMarketDetails(slotProps.scope)">
签收详情
</el-button>
</el-text>
<el-dropdown>
<span class="el-dropdown-link">
<el-text>
更多 <el-icon class="el-icon--right"><arrow-down /></el-icon
></el-text>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="Mydata.id === slotProps.scope.row.nowWarehouseId">
<el-text @click="handleNodeCost(slotProps.scope)"> 节点费用 </el-text>
</el-dropdown-item>
<el-dropdown-item v-if="Mydata.id === slotProps.scope.row.nowWarehouseId">
<el-text @click="handleDirectGoMarketVesited(slotProps.scope)">
配置直发商家
</el-text>
</el-dropdown-item>
<el-dropdown-item>
<el-text @click="handleDirectGoMarketDetails(slotProps.scope)">
签收详情
</el-text>
</el-dropdown-item>
<el-dropdown-item v-if="Mydata.id === slotProps.scope.row.nowWarehouseId">
<el-text @click="handleManualLoading(slotProps.scope)"> 手动装车 </el-text>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
</template>
@ -368,6 +369,7 @@ import {
postFindNextNodeList,
postUpdateLoadScanFinalNodeIdById,
postRemoveCarsLoadScan,
postManualLoadingloadId,
} from '@/api/distribution/VehicleStowage';
import { useStore } from 'vuex';
import { useRouter, useRoute } from 'vue-router';
@ -432,6 +434,8 @@ const details = reactive<any>({
list: false,
/** 配置装车目的地详情 */
truckLoadingDetailPopUpLoading: false,
/** 页面laoding */
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -615,7 +619,12 @@ const onLoad = async (params = {}) => {
}
};
onLoad();
const initOnload = () => {
details.page.pageNum = 1;
onLoad();
};
initOnload();
/** 初始化请求数据 */
const init = async item => {
const res = await postFindNextNodeList({ loadId: item.id });
@ -635,7 +644,7 @@ const init = async item => {
/** 搜索 */
const searchChange = () => {
onLoad(details.page);
initOnload();
};
/** 清空表单 */
@ -643,7 +652,7 @@ const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.pageNum = 1;
onLoad(details.page);
initOnload();
};
/** 展开列表控件 */
@ -653,29 +662,15 @@ const showdrawer = (_flag?: boolean) => {
/** 是否开启搜索区 */
const searchHide = () => {
function getWinHight() {
var windowHight = 0;
if (document.body.clientHeight && document.documentElement.clientHeight) {
windowHight =
document.body.clientHeight < document.documentElement.clientHeight
? document.body.clientHeight
: document.documentElement.clientHeight;
} else {
}
return document.documentElement.clientHeight;
}
details.search = !details.search;
const timer = setTimeout(() => {
details.listNode.style.height =
getWinHight() - details.listNode.getBoundingClientRect().top - 70 + 'px';
clearTimeout(timer);
}, 10);
setNodeHeight(details.listNode, '', true);
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
onLoad(details.page);
initOnload();
};
/** 表格表头时间选择 */
@ -688,7 +683,7 @@ const timesc = (index, row) => {
if (!index) {
delete details.query[row.prop];
}
onLoad(details.page);
initOnload();
};
/** 表格表头输入框搜索 */
@ -702,7 +697,7 @@ const selectsc = (index, row) => {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
onLoad(details.page);
initOnload();
};
/** 表格表头复选框选择 */
@ -713,7 +708,7 @@ const selectionChange = (list: any) => {
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad(details.page);
initOnload();
};
/** 页码改变执行的回调 */
@ -939,7 +934,7 @@ const handleStartCar = async () => {
message: '发车成功',
});
onLoad();
initOnload();
});
}
};
@ -1067,7 +1062,7 @@ const handleCancelStartCar = () => {
type: 'success',
message: '取消发车成功',
});
onLoad();
initOnload();
});
};
@ -1116,9 +1111,32 @@ const handleCancelCarsLoad = () => {
type: 'success',
message: '取消配载成功',
});
onLoad();
initOnload();
});
};
/** 手动装车 */
const handleManualLoading = ({ row }) => {
console.log('row :>> ', row);
ElMessageBox.confirm(`是否进行手动装车?`)
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const response = await postManualLoadingloadId({ loadId: row.id });
if (response.data.code !== 200) return;
ElMessage.success(response.data.msg);
initOnload();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
.catch(() => {
// catch error
});
};
</script>
<style scoped lang="scss">
@ -1190,6 +1208,9 @@ const handleCancelCarsLoad = () => {
}
.handleControl {
display: flex;
align-items: center;
:deep(.el-button) {
font-size: 0.8rem;
}

16
src/views/distribution/artery/zeroAdditionalRecording.vue

@ -428,7 +428,7 @@ const onLoad = async (params = {}) => {
details.loadingObj.oldListLoading = true;
const submitData = {
...details.page,
...details.query,
...details.oldQuery,
orderCodes: details.orderCodeList,
...params,
};
@ -504,7 +504,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
details.oldQuery[row.prop] = index;
onLoad();
};
@ -514,9 +514,9 @@ const timesc = (index, row) => {
if (!!index) {
index = dayjs(index).format('YYYY-MM-DD');
}
details.query[row.prop] = index;
details.oldQuery[row.prop] = index;
if (!index) {
delete details.query[row.prop];
delete details.oldQuery[row.prop];
}
onLoad();
};
@ -526,11 +526,11 @@ const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
details.oldQuery[row.prop] = index;
if (!index) delete details.oldQuery[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
details.oldQuery['certificateType'] = index;
if (!index) delete details.oldQuery['certificateType'];
}
onLoad();
};

103
src/views/supervise/management.vue

@ -52,6 +52,10 @@
<el-button type="primary" @click="BatchDelete">
<el-icon><Plus /></el-icon></el-button
>
<el-button type="primary" @click="details.popUpShow.UploadBatch = true" icon="Upload">
导入
</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -166,6 +170,46 @@
</span>
</template>
</el-dialog>
<!-- 导入 -- 批量开标签 -->
<el-dialog
class="el-dialog-UploadBatch"
title="批量开标签导入"
:visible.sync="details.popUpShow.UploadBatch"
width="70%"
v-model="details.popUpShow.UploadBatch"
>
<div v-loading="details.loadingObj.UploadLoadong" element-loading-text="数据处理中...">
<div>
<el-divider content-position="left">数据导入</el-divider>
</div>
<P>请确认传入的文件为Excel文件格式</P>
<a
href="http://47.108.51.143:9000/basic/upload/20240219/354778c01bf15c3a892bdb9815b4b461.xlsx"
style="text-decoration: none"
>
<el-button type="primary" icon="Download"> 模版下载 </el-button>
</a>
<div>
<el-upload
class="upload-demo mt10"
drag
:headers="details.header"
action="/api/logpm-supervise/classify/importClassify"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:on-error="handleClose"
multiple
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">拖拽文件或 <em>点击上传</em></div>
</el-upload>
</div>
</div>
</el-dialog>
</basic-container>
<!-- 列表配置显示 -->
@ -182,6 +226,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import { ref, reactive, computed, onMounted } from 'vue';
import { managementColumnList } from '@/option/supervise/supervise.js';
import functions from '@/utils/functions.js';
import { getToken } from '@/utils/auth';
import {
$_Getclassify,
$_newlyadded,
@ -229,6 +274,19 @@ const rules = ref({
},
],
});
const details = reactive({
/** 弹窗 */
popUpShow: { UploadBatch: false },
/** loading */
loadingObj: {
/** 上传 */
UploadLoadong: false,
},
/** 头部 */
header: {
'Blade-Auth': 'bearer ' + getToken(),
},
});
/** 表单实例 */
const ruleFormRef = ref();
const onLoad = val => {
@ -284,13 +342,12 @@ const currentChange = val => {
current.value = val;
onLoad();
};
const parentClassifyChange=()=>{
if(!queryTop.value.parentClassifyName){
query.value.name=null
onLoad()
const parentClassifyChange = () => {
if (!queryTop.value.parentClassifyName) {
query.value.name = null;
onLoad();
}
}
};
const searchChangeS = () => {
query.value = {};
queryTop.value = {};
@ -497,6 +554,40 @@ const btnsc = () => {};
const selectsc = () => {};
//
const PointsManagementFn = () => {};
/** 上传文件 */
const handleBeforeUpload = file => {
console.log('file :>> ', file);
details.loadingObj.UploadLoadong = true;
//
const _fileNameArr = file.name.split('.');
const _fileType = _fileNameArr[_fileNameArr.length - 1];
const whiteArr = ['xls', 'xlsx'];
if (whiteArr.indexOf(_fileType) !== -1) return true;
ElMessage.warning('请传入xls或xlsx格式的文件');
details.loadingObj.UploadLoadong = false;
return false;
};
/** 长传成功 */
const handleSuccess = res => {
console.log('res :>> ', res);
details.loadingObj.UploadLoadong = false;
if (res.code !== 200) return ElMessage.warning('上传失败');
ElMessage.success('上传成功');
onLoad();
};
/** 上传失败 */
const handleClose = res => {
details.loadingObj.UploadLoadong = false;
ElMessage.warning('上传失败');
};
</script>
<style scoped lang="scss">

Loading…
Cancel
Save