调整 业务
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>oa登录</title>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js">
|
||||
</script>
|
||||
<script>
|
||||
// 获取URL查询字符串
|
||||
const queryString = window.location.search;
|
||||
|
||||
// 使用URLSearchParams解析查询字符串
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
|
||||
// 获取特定的参数值
|
||||
var userid = urlParams.get('userid'); // 用户id
|
||||
var username = urlParams.get('username'); // 用户名
|
||||
var redirectUrl = urlParams.get('redirectUrl'); // 重定向地址
|
||||
|
||||
if(userid==null){
|
||||
userid="";
|
||||
}
|
||||
if(username==null){
|
||||
username="";
|
||||
}
|
||||
|
||||
$.get("/oaApi/getToken?userid="+userid+"&username="+username,function(result){
|
||||
debugger
|
||||
//成功返回token
|
||||
if(result.data.token){
|
||||
//设置系统的cookie
|
||||
document.cookie = "X-AUTH-TOKEN="+result.data.token;
|
||||
|
||||
if(redirectUrl==null){
|
||||
//如果是登录就跳转到系统首页
|
||||
window.location.href = "./";
|
||||
}else {
|
||||
//如果是待办有重定向就跳转
|
||||
window.location.href = redirectUrl;
|
||||
}
|
||||
}else {
|
||||
alert("该业务系统未同步当前oa用户");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -41,6 +41,13 @@ export const add = row => {
|
||||
});
|
||||
};
|
||||
|
||||
export const syncIamOrganizations = () => {
|
||||
return request({
|
||||
url: '/blade-system/dept/sync-iam-organizations',
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
export const update = row => {
|
||||
return request({
|
||||
url: '/blade-system/dept/submit',
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
@@ -2027,8 +2027,8 @@ export default {
|
||||
delete detail.updateUser;
|
||||
delete detail.updateUserName;
|
||||
delete detail.status;
|
||||
// 模板名称追加「副本」
|
||||
detail.templateName = `${detail.templateName || ''}副本`;
|
||||
// 模板名称追加「-副本」
|
||||
detail.templateName = `${detail.templateName || ''}-副本`;
|
||||
|
||||
console.log('处理后的数据:', detail);
|
||||
console.log('isStandaloneBusinessPage:', this.isStandaloneBusinessPage);
|
||||
|
||||
@@ -10,107 +10,200 @@
|
||||
:class="{ 'waybill-import-page': standalone }"
|
||||
@closed="handleClosed"
|
||||
>
|
||||
<div class="waybill-import-toolbar">
|
||||
<div class="waybill-import-toolbar__search">
|
||||
<el-form :inline="true" :model="query" label-width="auto">
|
||||
<el-form-item label="运单批次号"
|
||||
><el-input v-model="query.batchNo" clearable
|
||||
/></el-form-item>
|
||||
<el-form-item label="承运商"
|
||||
><el-select v-model="query.carrierId" clearable filterable
|
||||
><el-option
|
||||
<section v-show="searchVisible" class="waybill-import-toolbar__search">
|
||||
<el-form :model="query" label-position="right" label-width="88px" @submit.prevent>
|
||||
<div class="waybill-import-toolbar__search-grid">
|
||||
<el-form-item label="运单批次号">
|
||||
<el-input v-model="query.batchNo" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="承运商">
|
||||
<el-select v-model="query.carrierId" clearable filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in queryCarriers"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" /></el-select
|
||||
></el-form-item>
|
||||
<el-form-item label="创建时间"
|
||||
><el-date-picker
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTimeRange"
|
||||
type="datetimerange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/></el-form-item>
|
||||
<el-form-item label="创建人"
|
||||
><el-select v-model="query.createUser" clearable filterable
|
||||
><el-option
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人">
|
||||
<el-select v-model="query.createUser" clearable filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in creators"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" /></el-select
|
||||
></el-form-item>
|
||||
</el-form>
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="waybill-import-toolbar__search-actions">
|
||||
<el-button type="primary" @click="loadBatches">查询</el-button
|
||||
><el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="loadBatches">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="waybill-import-toolbar__actions">
|
||||
<el-button type="primary" @click="handleCreate">新建导入</el-button
|
||||
><el-button type="danger" plain :disabled="!selected.length" @click="removeBatches"
|
||||
</el-form>
|
||||
</section>
|
||||
<div class="avue-crud__header waybill-import-toolbar__actions">
|
||||
<div class="avue-crud__left">
|
||||
<el-button type="primary" @click="handleCreate">新建导入</el-button>
|
||||
<el-button type="danger" plain :disabled="!selected.length" @click="removeBatches"
|
||||
>批量删除</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="avue-crud__right">
|
||||
<el-button icon="el-icon-refresh" circle @click="loadBatches" />
|
||||
<el-button icon="el-icon-operation" circle @click="columnSettingVisible = true" />
|
||||
<el-button icon="el-icon-search" circle @click="searchVisible = !searchVisible" />
|
||||
<el-button icon="el-icon-grid" circle @click="toggleTableSize" />
|
||||
</div>
|
||||
<el-table :data="batches" border @selection-change="selected = $event">
|
||||
</div>
|
||||
<section class="waybill-import-toolbar__table-panel">
|
||||
<el-table
|
||||
:data="batches"
|
||||
:size="tableSize"
|
||||
border
|
||||
@selection-change="selected = $event"
|
||||
>
|
||||
<el-table-column type="selection" width="50" /><el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column prop="batchNo" label="运单批次号" min-width="150" /><el-table-column
|
||||
<el-table-column
|
||||
v-if="columnVisible.batchNo"
|
||||
prop="batchNo"
|
||||
label="运单批次号"
|
||||
min-width="150"
|
||||
/><el-table-column
|
||||
v-if="columnVisible.projectName"
|
||||
prop="projectName"
|
||||
label="项目名称"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column prop="carrierName" label="承运商" min-width="140" /><el-table-column
|
||||
<el-table-column
|
||||
v-if="columnVisible.carrierName"
|
||||
prop="carrierName"
|
||||
label="承运商"
|
||||
min-width="140"
|
||||
/><el-table-column
|
||||
v-if="columnVisible.carrierType"
|
||||
prop="carrierType"
|
||||
label="承运类型"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column prop="waybillCount" label="运单数" width="90" /><el-table-column
|
||||
<el-table-column
|
||||
v-if="columnVisible.waybillCount"
|
||||
prop="waybillCount"
|
||||
label="运单数"
|
||||
width="90"
|
||||
/> <el-table-column
|
||||
v-if="columnVisible.importTypeName"
|
||||
prop="importTypeName"
|
||||
label="导入方式"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="columnVisible.createUserName"
|
||||
prop="createUserName"
|
||||
label="创建人"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="{ row }">{{ row.createUserName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="columnVisible.statusName"
|
||||
prop="statusName"
|
||||
label="状态"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="columnVisible.createTime"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="170"
|
||||
sortable
|
||||
/><el-table-column prop="updateTime" label="更新时间" min-width="170" sortable />
|
||||
<el-table-column prop="statusName" label="状态" width="100" /><el-table-column
|
||||
/><el-table-column
|
||||
v-if="columnVisible.updateTime"
|
||||
prop="updateTime"
|
||||
label="更新时间"
|
||||
min-width="170"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="180"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }"
|
||||
><el-link type="primary" @click="openDetail(row)">查看</el-link
|
||||
><el-link
|
||||
<template #default="{ row }">
|
||||
<el-link
|
||||
v-if="row.importStatus !== 'draft'"
|
||||
type="primary"
|
||||
@click="openDetail(row)"
|
||||
>查看</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="row.importStatus === 'draft'"
|
||||
type="primary"
|
||||
@click="editBatch(row)"
|
||||
>编辑</el-link
|
||||
><el-link type="danger" @click="removeBatch(row)">删除</el-link></template
|
||||
>
|
||||
<el-link
|
||||
v-if="row.importStatus === 'draft'"
|
||||
type="danger"
|
||||
@click="removeBatch(row)"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="waybill-import-toolbar__pagination">
|
||||
<el-pagination
|
||||
background
|
||||
v-model:current-page="page.current"
|
||||
v-model:page-size="page.size"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
:page-sizes="[10, 20, 50]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="page.total"
|
||||
@current-change="loadBatches"
|
||||
@size-change="loadBatches"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</component>
|
||||
|
||||
<el-dialog
|
||||
v-model="columnSettingVisible"
|
||||
title="列设置"
|
||||
width="360px"
|
||||
append-to-body
|
||||
>
|
||||
<el-checkbox-group v-model="visibleColumnKeys" class="waybill-import-toolbar__column-setting">
|
||||
<el-checkbox v-for="item in columnOptions" :key="item.prop" :label="item.prop">
|
||||
{{ item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<template #footer>
|
||||
<el-button @click="columnSettingVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="detailVisible" title="导入运单详情" width="90%" append-to-body>
|
||||
<el-form :inline="true" :model="detailQuery"
|
||||
><el-form-item label="车牌号/船号"
|
||||
><el-input v-model="detailQuery.vehicleNo" clearable /></el-form-item
|
||||
><el-form-item label="货物名称"
|
||||
><el-input v-model="detailQuery.cargoName" clearable /></el-form-item
|
||||
><el-form-item label="司机/船长姓名"
|
||||
><el-input v-model="detailQuery.driverName" clearable placeholder="请输入" /></el-form-item
|
||||
><el-button type="primary" @click="loadDetails">查询</el-button></el-form
|
||||
>
|
||||
<el-table :data="details" border
|
||||
@@ -126,7 +219,10 @@
|
||||
prop="vehicleNo"
|
||||
label="车牌号/航班号/船号/班列号"
|
||||
min-width="190"
|
||||
/><el-table-column prop="transportType" label="运输方式" width="110" /><el-table-column
|
||||
/><el-table-column prop="transportType" label="运输方式" width="110">
|
||||
<template #default="{ row }">{{ transportTypeLabel(row.transportType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="driverName"
|
||||
label="司机/船长姓名"
|
||||
min-width="120"
|
||||
@@ -200,17 +296,20 @@
|
||||
prop="waybillIdentifier"
|
||||
label="同一运单标识号"
|
||||
min-width="140"
|
||||
/><el-table-column label="操作" width="80">-</el-table-column></el-table
|
||||
/></el-table
|
||||
>
|
||||
<div class="waybill-import-toolbar__pagination">
|
||||
<el-pagination
|
||||
background
|
||||
v-model:current-page="detailPage.current"
|
||||
v-model:page-size="detailPage.size"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
:page-sizes="[10, 20, 50]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="detailPage.total"
|
||||
@current-change="loadDetails"
|
||||
@size-change="loadDetails"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<component
|
||||
@@ -506,8 +605,32 @@ const handleClosed = () => emit('closed');
|
||||
const createVisible = ref(props.createPage),
|
||||
detailVisible = ref(false),
|
||||
formRef = ref();
|
||||
const searchVisible = ref(true);
|
||||
const columnSettingVisible = ref(false);
|
||||
const tableSize = ref('default');
|
||||
const tableSizeOptions = ['default', 'large', 'small'];
|
||||
const columnOptions = [
|
||||
{ prop: 'batchNo', label: '运单批次号' },
|
||||
{ prop: 'projectName', label: '项目名称' },
|
||||
{ prop: 'carrierName', label: '承运商' },
|
||||
{ prop: 'carrierType', label: '承运类型' },
|
||||
{ prop: 'waybillCount', label: '运单数' },
|
||||
{ prop: 'importTypeName', label: '导入方式' },
|
||||
{ prop: 'createUserName', label: '创建人' },
|
||||
{ prop: 'statusName', label: '状态' },
|
||||
{ prop: 'createTime', label: '创建时间' },
|
||||
{ prop: 'updateTime', label: '更新时间' },
|
||||
];
|
||||
const visibleColumnKeys = ref(columnOptions.map(item => item.prop));
|
||||
const columnVisible = computed(() =>
|
||||
Object.fromEntries(columnOptions.map(item => [item.prop, visibleColumnKeys.value.includes(item.prop)]))
|
||||
);
|
||||
const toggleTableSize = () => {
|
||||
const index = tableSizeOptions.indexOf(tableSize.value);
|
||||
tableSize.value = tableSizeOptions[(index + 1) % tableSizeOptions.length];
|
||||
};
|
||||
const query = reactive({ batchNo: '', carrierId: '', createUser: '', createTimeRange: [] });
|
||||
const detailQuery = reactive({ vehicleNo: '', cargoName: '' });
|
||||
const detailQuery = reactive({ vehicleNo: '', driverName: '' });
|
||||
const createDefaultForm = () => ({
|
||||
id: '',
|
||||
batchNo: '',
|
||||
@@ -862,6 +985,20 @@ const loadEditorOptions = async () => {
|
||||
cargoTypeFlatOptions.value = flattenCargoTypeOptions(cargoTypeOptions.value);
|
||||
driverOptions.value = extractRecords(driverRes);
|
||||
};
|
||||
const ensureTransportTypeOptions = async () => {
|
||||
if (transportTypeOptions.value.length) return;
|
||||
const dictRes = await getDictionary({ code: 'transport_type' });
|
||||
transportTypeOptions.value = extractRecords(dictRes).map(item => ({
|
||||
label: item.dictValue || item.label,
|
||||
value: item.dictKey || item.value,
|
||||
}));
|
||||
};
|
||||
const transportTypeLabel = value => {
|
||||
if (value === null || value === undefined || value === '') return '-';
|
||||
return (
|
||||
transportTypeOptions.value.find(item => String(item.value) === String(value))?.label || value
|
||||
);
|
||||
};
|
||||
const loadBatches = async () => {
|
||||
const res = await api.getImportBatches({ ...query, current: page.current, size: page.size });
|
||||
batches.value = res.data?.data?.records || [];
|
||||
@@ -922,9 +1059,13 @@ const closeCreate = () => {
|
||||
}
|
||||
createVisible.value = false;
|
||||
};
|
||||
const openDetail = row => {
|
||||
const openDetail = async row => {
|
||||
detailQuery.batchId = row.id;
|
||||
detailQuery.vehicleNo = '';
|
||||
detailQuery.driverName = '';
|
||||
detailPage.current = 1;
|
||||
detailVisible.value = true;
|
||||
await ensureTransportTypeOptions();
|
||||
loadDetails();
|
||||
};
|
||||
// 草稿明细已落库为草稿运单,编辑时回填到明细表,避免重新上传附件。
|
||||
@@ -1329,34 +1470,81 @@ const confirmImport = async () => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.waybill-import-toolbar {
|
||||
margin-bottom: 12px;
|
||||
|
||||
&__search {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
|
||||
.el-form {
|
||||
flex: 1;
|
||||
margin-bottom: 0;
|
||||
padding: 18px 18px 8px;
|
||||
margin-bottom: 8px;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
&__search-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 8px 24px;
|
||||
}
|
||||
|
||||
&__search :deep(.el-form-item) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
&__search :deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__search :deep(.el-input),
|
||||
&__search :deep(.el-select),
|
||||
&__search :deep(.el-date-editor),
|
||||
&__search :deep(.el-date-editor.el-input),
|
||||
&__search :deep(.el-date-editor.el-input__wrapper),
|
||||
&__search :deep(.el-date-editor--datetimerange) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__search-actions {
|
||||
display: flex;
|
||||
flex: none;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
&__actions {
|
||||
margin-top: 8px;
|
||||
margin-top: 12px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&__column-setting {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
&__table-panel {
|
||||
padding: 0 12px 12px;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
&__pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
&__table-panel :deep(.el-table) {
|
||||
--el-table-border-color: #eff1f7;
|
||||
}
|
||||
|
||||
&__table-panel :deep(.el-table__body tr:nth-child(even) > td.el-table__cell),
|
||||
&__table-panel :deep(.el-table__body tr:nth-child(even) > td.el-table-fixed-column--left),
|
||||
&__table-panel :deep(.el-table__body tr:nth-child(even) > td.el-table-fixed-column--right) {
|
||||
background: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
.waybill-import-page {
|
||||
min-height: calc(100vh - 120px);
|
||||
padding: 12px 24px 24px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.waybill-import-create {
|
||||
|
||||
@@ -5172,13 +5172,11 @@ export default {
|
||||
if (type === 'add' && copyId) {
|
||||
this.api.getDetail(copyId).then(res => {
|
||||
const sourceData = res.data.data || {};
|
||||
// 清除不应该复制的字段
|
||||
// 清除不应该复制的字段(业务状态与原运单保持一致)
|
||||
delete sourceData.id;
|
||||
delete sourceData.code;
|
||||
delete sourceData.waybillNo;
|
||||
delete sourceData.waybillStatus;
|
||||
delete sourceData.businessStatus;
|
||||
delete sourceData.businessStatusName;
|
||||
delete sourceData.driverAcceptStatus;
|
||||
delete sourceData.driverAcceptTime;
|
||||
delete sourceData.driverAcceptDriverId;
|
||||
@@ -5195,10 +5193,8 @@ export default {
|
||||
delete sourceData.updateUserName;
|
||||
|
||||
this.applyFormDetail(sourceData);
|
||||
// 标记为手工创建,状态与新增一致(暂存=草稿,确认后按过程配置校正)
|
||||
// 标记为手工创建;业务状态沿用原运单
|
||||
this.form.dataSource = '手工创建';
|
||||
this.form.businessStatus = '';
|
||||
this.form.businessStatusName = '';
|
||||
done();
|
||||
});
|
||||
return;
|
||||
|
||||
@@ -583,12 +583,8 @@
|
||||
label-width="auto"
|
||||
class="loading-manage-dialog__form archive-form"
|
||||
>
|
||||
<section-card title="筛选待配载运单">
|
||||
<template #extra>
|
||||
<el-link v-if="!dialogReadonly" type="primary" @click="openCandidateSearch"
|
||||
>筛选</el-link
|
||||
>
|
||||
</template>
|
||||
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
||||
<section-card>
|
||||
<div class="loading-manage-dialog__candidate-search">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
@@ -632,7 +628,11 @@
|
||||
<template v-if="candidateSearchVisible">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="货物名称">
|
||||
<el-input v-model="candidateQuery.cargoName" clearable placeholder="请输入" />
|
||||
<el-input
|
||||
v-model="candidateQuery.cargoName"
|
||||
clearable
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -703,7 +703,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车/船/航班/班列">
|
||||
<el-input v-model="candidateQuery.vehicleNo" clearable placeholder="请输入" />
|
||||
<el-input
|
||||
v-model="candidateQuery.vehicleNo"
|
||||
clearable
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -792,10 +796,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</section-card>
|
||||
|
||||
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
||||
<section-card title="待配载运单">
|
||||
<el-table
|
||||
ref="candidateTableRef"
|
||||
v-loading="candidateLoading"
|
||||
@@ -843,27 +843,43 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ formatCandidateWaybillValue(row, 'goodsInfo') }}
|
||||
{{ formatCandidateGoodsInfo(row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="departureAddress"
|
||||
label="发货地址"
|
||||
min-width="220"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tooltip
|
||||
v-if="formatCandidateAddressTooltip(row, 'departure')"
|
||||
:content="formatCandidateAddressTooltip(row, 'departure')"
|
||||
placement="top"
|
||||
>
|
||||
<div class="loading-manage-page__address-cell">
|
||||
{{ formatCandidateAddress(row, 'departure') }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatCandidateAddress(row, 'departure') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arrivalAddress"
|
||||
label="收货地址"
|
||||
min-width="220"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tooltip
|
||||
v-if="formatCandidateAddressTooltip(row, 'arrival')"
|
||||
:content="formatCandidateAddressTooltip(row, 'arrival')"
|
||||
placement="top"
|
||||
>
|
||||
<div class="loading-manage-page__address-cell">
|
||||
{{ formatCandidateAddress(row, 'arrival') }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatCandidateAddress(row, 'arrival') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -995,20 +1011,36 @@
|
||||
prop="departureAddress"
|
||||
label="发货地"
|
||||
min-width="220"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ formatWaybillAddress(row, 'departure') }}
|
||||
<el-tooltip
|
||||
v-if="formatCandidateAddressTooltip(row, 'departure')"
|
||||
:content="formatCandidateAddressTooltip(row, 'departure')"
|
||||
placement="top"
|
||||
>
|
||||
<div class="loading-manage-page__address-cell">
|
||||
{{ formatCandidateAddress(row, 'departure') }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatCandidateAddress(row, 'departure') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arrivalAddress"
|
||||
label="到货地"
|
||||
min-width="220"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ formatWaybillAddress(row, 'arrival') }}
|
||||
<el-tooltip
|
||||
v-if="formatCandidateAddressTooltip(row, 'arrival')"
|
||||
:content="formatCandidateAddressTooltip(row, 'arrival')"
|
||||
placement="top"
|
||||
>
|
||||
<div class="loading-manage-page__address-cell">
|
||||
{{ formatCandidateAddress(row, 'arrival') }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatCandidateAddress(row, 'arrival') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="110" fixed="right">
|
||||
@@ -1825,6 +1857,7 @@ export default {
|
||||
if (!row) return '-';
|
||||
if (prop === 'businessStatus') return this.statusText(row);
|
||||
if (prop === 'transportType') return this.transportTypeLabel(row.transportType);
|
||||
if (prop === 'goodsInfo') return this.formatCandidateGoodsInfo(row);
|
||||
const column = waybillOption.column.find(item => item.prop === prop);
|
||||
if (column?.formatter) {
|
||||
const value = column.formatter(row, {}, row[prop]);
|
||||
@@ -1833,14 +1866,130 @@ export default {
|
||||
const value = row[prop];
|
||||
return value === undefined || value === null || value === '' ? '-' : value;
|
||||
},
|
||||
formatCandidateGoodsInfo(row = {}) {
|
||||
const goodsRows =
|
||||
[row.goodsJson, row.goodsList, row.goodsRows, row.cargoList, row.cargoRows, row.goods]
|
||||
.map(source => {
|
||||
if (source === undefined || source === null || source === '') return [];
|
||||
if (Array.isArray(source)) return source;
|
||||
if (typeof source === 'object') return [source];
|
||||
return parseJsonArray(source);
|
||||
})
|
||||
.filter(source => source.length)
|
||||
.sort((left, right) => right.length - left.length)[0] || [];
|
||||
if (!goodsRows.length) return String(row.goodsInfo || row.cargoInfo || '') || '-';
|
||||
const groups = goodsRows.reduce((result, item = {}) => {
|
||||
const unit = String(
|
||||
item.quantityUnit ||
|
||||
item.goodsQuantityUnit ||
|
||||
item.cargoUnit ||
|
||||
item.unit ||
|
||||
row.quantityUnit ||
|
||||
row.goodsQuantityUnit ||
|
||||
row.cargoUnit ||
|
||||
row.unit ||
|
||||
''
|
||||
).trim();
|
||||
const key = unit || '__empty__';
|
||||
if (!result[key]) {
|
||||
result[key] = {
|
||||
typeName:
|
||||
item.secondCargoTypeName ||
|
||||
item.secondCargoType ||
|
||||
item.cargoType ||
|
||||
item.goodsType ||
|
||||
item.typeName ||
|
||||
'货物',
|
||||
count: 0,
|
||||
quantity: 0,
|
||||
unit,
|
||||
};
|
||||
}
|
||||
result[key].count += 1;
|
||||
result[key].quantity += this.parseGoodsQuantity(
|
||||
item.quantity ?? item.cargoQuantity ?? item.goodsQuantity
|
||||
);
|
||||
return result;
|
||||
}, {});
|
||||
return (
|
||||
Object.values(groups)
|
||||
.map(group => {
|
||||
const quantity = this.formatGoodsQuantity(group.quantity);
|
||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
||||
group.unit ? ` ${group.unit}` : ''
|
||||
}`;
|
||||
})
|
||||
.join('; ') || '-'
|
||||
);
|
||||
},
|
||||
parseGoodsQuantity(value) {
|
||||
if (value === undefined || value === null || value === '') return 0;
|
||||
const text = String(value).replace(/,/g, '');
|
||||
const match = text.match(/-?\d+(\.\d+)?/);
|
||||
if (!match) return 0;
|
||||
const number = Number(match[0]);
|
||||
return Number.isFinite(number) ? number : 0;
|
||||
},
|
||||
formatGoodsQuantity(value) {
|
||||
const number = Number(value || 0);
|
||||
if (!Number.isFinite(number)) return '0';
|
||||
const fixed = Math.round((number + Number.EPSILON) * 1000) / 1000;
|
||||
return Number.isInteger(fixed) ? String(fixed) : String(fixed).replace(/\.?0+$/, '');
|
||||
},
|
||||
formatCandidateDate(value) {
|
||||
if (!value) return '-';
|
||||
const date = dayjs(value);
|
||||
return date.isValid() ? date.format('YYYY-MM-DD HH:mm:ss') : value;
|
||||
},
|
||||
formatCandidateAddress(row, type) {
|
||||
const value = row?.[`${type}Address`] || row?.[`${type}Name`] || '';
|
||||
return this.formatProvinceCityDistrict(value) || '-';
|
||||
const prefix = type === 'departure' ? 'departure' : 'arrival';
|
||||
const name = String(row?.[`${prefix}Name`] || '').trim();
|
||||
const address = String(row?.[`${prefix}Address`] || '').trim();
|
||||
if (!this.isRoadTransportType(row?.transportType)) {
|
||||
return name || address || '-';
|
||||
}
|
||||
const region = this.mergeRouteAddressParts(
|
||||
this.routeProvinceName(row, prefix),
|
||||
row[`${prefix}CityName`] || row[`${prefix}City`],
|
||||
row[`${prefix}DistrictName`] || row[`${prefix}District`]
|
||||
);
|
||||
const source = this.mergeRouteAddressParts(region, '', address || name);
|
||||
const parts = this.parseWaybillAddress(source);
|
||||
return (
|
||||
[parts.province, parts.city, parts.district]
|
||||
.map(value => String(value || '').trim())
|
||||
.filter(Boolean)
|
||||
.join('') ||
|
||||
this.formatProvinceCityDistrict(source) ||
|
||||
name ||
|
||||
address ||
|
||||
'-'
|
||||
);
|
||||
},
|
||||
formatCandidateAddressTooltip(row, type) {
|
||||
if (!this.isRoadTransportType(row?.transportType)) return '';
|
||||
const prefix = type === 'departure' ? 'departure' : 'arrival';
|
||||
const address = String(row?.[`${prefix}Address`] || '').trim();
|
||||
const name = String(row?.[`${prefix}Name`] || '').trim();
|
||||
const region = this.mergeRouteAddressParts(
|
||||
this.routeProvinceName(row, prefix),
|
||||
row[`${prefix}CityName`] || row[`${prefix}City`],
|
||||
row[`${prefix}DistrictName`] || row[`${prefix}District`]
|
||||
);
|
||||
const detailAddress =
|
||||
row[`${prefix}DetailAddress`] || row[`${prefix}AddressDetail`] || address;
|
||||
return this.mergeRouteAddressParts(region, '', detailAddress || name) || '';
|
||||
},
|
||||
isRoadTransportType(type) {
|
||||
const value = String(type || '')
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
return (
|
||||
value === 'road' ||
|
||||
value.includes('公路') ||
|
||||
value.includes('道路') ||
|
||||
value.includes('highway')
|
||||
);
|
||||
},
|
||||
splitText(value) {
|
||||
if (!value) return [];
|
||||
@@ -2462,10 +2611,6 @@ export default {
|
||||
if (['road', '公路运输'].includes(normalized)) return 'road,公路运输';
|
||||
return value || '';
|
||||
},
|
||||
openCandidateSearch() {
|
||||
this.candidateSearchVisible = true;
|
||||
this.loadCandidateWaybills();
|
||||
},
|
||||
handleCandidateSearch() {
|
||||
this.candidatePage.currentPage = 1;
|
||||
this.loadCandidateWaybills();
|
||||
@@ -2567,11 +2712,11 @@ export default {
|
||||
};
|
||||
rows.forEach((row, rowIndex) => {
|
||||
const departure = row.departureAddress || row.departureName;
|
||||
appendNode(departure, this.formatWaybillAddress(row, 'departure'), `装${rowIndex + 1}`);
|
||||
appendNode(departure, this.formatCandidateAddress(row, 'departure'), `装${rowIndex + 1}`);
|
||||
});
|
||||
rows.forEach((row, rowIndex) => {
|
||||
const arrival = row.arrivalAddress || row.arrivalName;
|
||||
appendNode(arrival, this.formatWaybillAddress(row, 'arrival'), `卸${rowIndex + 1}`);
|
||||
appendNode(arrival, this.formatCandidateAddress(row, 'arrival'), `卸${rowIndex + 1}`);
|
||||
});
|
||||
return [...nodeMap.values()].map((node, index) => ({
|
||||
...node,
|
||||
@@ -3266,8 +3411,8 @@ export default {
|
||||
}
|
||||
|
||||
.loading-manage-dialog__candidate-search {
|
||||
padding: 4px 0;
|
||||
margin-bottom: 8px;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.loading-manage-dialog__waybill-route-layout {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<basic-container class="waybill-import-page-container">
|
||||
<div class="waybill-import-page-title">导入运单</div>
|
||||
<waybill-import-dialog standalone />
|
||||
</basic-container>
|
||||
</template>
|
||||
@@ -11,28 +10,14 @@ import WaybillImportDialog from './components/waybill-import-dialog.vue';
|
||||
|
||||
<style scoped lang="scss">
|
||||
.waybill-import-page-container {
|
||||
:deep(.basic-container__card) {
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:deep(.basic-container__card > .el-card__body) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.waybill-import-page-title {
|
||||
position: relative;
|
||||
padding: 16px 24px 12px 36px;
|
||||
border-bottom: 1px solid #eff1f7;
|
||||
color: #303133;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 24px;
|
||||
width: 4px;
|
||||
height: 22px;
|
||||
border-radius: 2px;
|
||||
background: #409eff;
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
@tree-load="treeLoad"
|
||||
>
|
||||
<template #menu-left>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
:loading="iamSyncLoading"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
@click="handleIamOrganizationSync"
|
||||
>同步组织
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@@ -120,7 +128,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLazyList, remove, update, add, getDept, getDeptTree } from '@/api/system/dept';
|
||||
import {
|
||||
getLazyList,
|
||||
remove,
|
||||
update,
|
||||
add,
|
||||
getDept,
|
||||
getDeptTree,
|
||||
syncIamOrganizations,
|
||||
} from '@/api/system/dept';
|
||||
import { getLeaderList } from '@/api/system/user';
|
||||
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
|
||||
import { mapGetters } from 'vuex';
|
||||
@@ -152,6 +168,7 @@ export default {
|
||||
selectionList: [],
|
||||
query: {},
|
||||
loading: true,
|
||||
iamSyncLoading: false,
|
||||
parentId: 0,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
@@ -691,6 +708,26 @@ export default {
|
||||
done(row);
|
||||
});
|
||||
},
|
||||
handleIamOrganizationSync() {
|
||||
this.$confirm('确定从IAM同步组织信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
this.iamSyncLoading = true;
|
||||
return syncIamOrganizations();
|
||||
})
|
||||
.then(res => {
|
||||
const count = res?.data?.data ?? 0;
|
||||
this.$message.success(`IAM组织同步完成,共处理${count}条`);
|
||||
this.parentId = 0;
|
||||
this.onLoad(this.page, this.query);
|
||||
})
|
||||
.finally(() => {
|
||||
this.iamSyncLoading = false;
|
||||
});
|
||||
},
|
||||
handleDelete() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning('请选择至少一条数据');
|
||||
|
||||
Reference in New Issue
Block a user