调整 业务
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 => {
|
export const update = row => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-system/dept/submit',
|
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.updateUser;
|
||||||
delete detail.updateUserName;
|
delete detail.updateUserName;
|
||||||
delete detail.status;
|
delete detail.status;
|
||||||
// 模板名称追加「副本」
|
// 模板名称追加「-副本」
|
||||||
detail.templateName = `${detail.templateName || ''}副本`;
|
detail.templateName = `${detail.templateName || ''}-副本`;
|
||||||
|
|
||||||
console.log('处理后的数据:', detail);
|
console.log('处理后的数据:', detail);
|
||||||
console.log('isStandaloneBusinessPage:', this.isStandaloneBusinessPage);
|
console.log('isStandaloneBusinessPage:', this.isStandaloneBusinessPage);
|
||||||
|
|||||||
@@ -10,107 +10,200 @@
|
|||||||
:class="{ 'waybill-import-page': standalone }"
|
:class="{ 'waybill-import-page': standalone }"
|
||||||
@closed="handleClosed"
|
@closed="handleClosed"
|
||||||
>
|
>
|
||||||
<div class="waybill-import-toolbar">
|
<section v-show="searchVisible" class="waybill-import-toolbar__search">
|
||||||
<div class="waybill-import-toolbar__search">
|
<el-form :model="query" label-position="right" label-width="88px" @submit.prevent>
|
||||||
<el-form :inline="true" :model="query" label-width="auto">
|
<div class="waybill-import-toolbar__search-grid">
|
||||||
<el-form-item label="运单批次号"
|
<el-form-item label="运单批次号">
|
||||||
><el-input v-model="query.batchNo" clearable
|
<el-input v-model="query.batchNo" clearable placeholder="请输入" />
|
||||||
/></el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="承运商"
|
<el-form-item label="承运商">
|
||||||
><el-select v-model="query.carrierId" clearable filterable
|
<el-select v-model="query.carrierId" clearable filterable placeholder="请选择">
|
||||||
><el-option
|
<el-option
|
||||||
v-for="item in queryCarriers"
|
v-for="item in queryCarriers"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id" /></el-select
|
:value="item.id"
|
||||||
></el-form-item>
|
/>
|
||||||
<el-form-item label="创建时间"
|
</el-select>
|
||||||
><el-date-picker
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
v-model="query.createTimeRange"
|
v-model="query.createTimeRange"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
/></el-form-item>
|
range-separator="~"
|
||||||
<el-form-item label="创建人"
|
start-placeholder="开始时间"
|
||||||
><el-select v-model="query.createUser" clearable filterable
|
end-placeholder="结束时间"
|
||||||
><el-option
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建人">
|
||||||
|
<el-select v-model="query.createUser" clearable filterable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
v-for="item in creators"
|
v-for="item in creators"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id" /></el-select
|
:value="item.id"
|
||||||
></el-form-item>
|
/>
|
||||||
</el-form>
|
</el-select>
|
||||||
<div class="waybill-import-toolbar__search-actions">
|
</el-form-item>
|
||||||
<el-button type="primary" @click="loadBatches">查询</el-button
|
|
||||||
><el-button @click="resetQuery">重置</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="waybill-import-toolbar__search-actions">
|
||||||
<div class="waybill-import-toolbar__actions">
|
<el-button type="primary" @click="loadBatches">查询</el-button>
|
||||||
<el-button type="primary" @click="handleCreate">新建导入</el-button
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
><el-button type="danger" plain :disabled="!selected.length" @click="removeBatches"
|
</div>
|
||||||
|
</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
|
>批量删除</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="batches" border @selection-change="selected = $event">
|
<section class="waybill-import-toolbar__table-panel">
|
||||||
<el-table-column type="selection" width="50" /><el-table-column
|
<el-table
|
||||||
type="index"
|
:data="batches"
|
||||||
label="序号"
|
:size="tableSize"
|
||||||
width="70"
|
border
|
||||||
/>
|
@selection-change="selected = $event"
|
||||||
<el-table-column prop="batchNo" label="运单批次号" min-width="150" /><el-table-column
|
|
||||||
prop="projectName"
|
|
||||||
label="项目名称"
|
|
||||||
min-width="150"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="carrierName" label="承运商" min-width="140" /><el-table-column
|
|
||||||
prop="carrierType"
|
|
||||||
label="承运类型"
|
|
||||||
min-width="120"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="waybillCount" label="运单数" width="90" /><el-table-column
|
|
||||||
prop="importTypeName"
|
|
||||||
label="导入方式"
|
|
||||||
width="100"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
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
|
|
||||||
label="操作"
|
|
||||||
width="180"
|
|
||||||
fixed="right"
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }"
|
<el-table-column type="selection" width="50" /><el-table-column
|
||||||
><el-link type="primary" @click="openDetail(row)">查看</el-link
|
type="index"
|
||||||
><el-link
|
label="序号"
|
||||||
v-if="row.importStatus === 'draft'"
|
width="70"
|
||||||
type="primary"
|
/>
|
||||||
@click="editBatch(row)"
|
<el-table-column
|
||||||
>编辑</el-link
|
v-if="columnVisible.batchNo"
|
||||||
><el-link type="danger" @click="removeBatch(row)">删除</el-link></template
|
prop="batchNo"
|
||||||
|
label="运单批次号"
|
||||||
|
min-width="150"
|
||||||
|
/><el-table-column
|
||||||
|
v-if="columnVisible.projectName"
|
||||||
|
prop="projectName"
|
||||||
|
label="项目名称"
|
||||||
|
min-width="150"
|
||||||
|
/>
|
||||||
|
<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
|
||||||
|
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"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
<template #default="{ row }">{{ row.createUserName || '-' }}</template>
|
||||||
</el-table>
|
</el-table-column>
|
||||||
<el-pagination
|
<el-table-column
|
||||||
v-model:current-page="page.current"
|
v-if="columnVisible.statusName"
|
||||||
v-model:page-size="page.size"
|
prop="statusName"
|
||||||
layout="total, prev, pager, next, sizes"
|
label="状态"
|
||||||
:page-sizes="[10, 20, 50]"
|
width="100"
|
||||||
:total="page.total"
|
/>
|
||||||
@current-change="loadBatches"
|
<el-table-column
|
||||||
@size-change="loadBatches"
|
v-if="columnVisible.createTime"
|
||||||
/>
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
min-width="170"
|
||||||
|
sortable
|
||||||
|
/><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
|
||||||
|
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
|
||||||
|
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, sizes, prev, pager, next, jumper"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:total="page.total"
|
||||||
|
@current-change="loadBatches"
|
||||||
|
@size-change="loadBatches"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</component>
|
</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-dialog v-model="detailVisible" title="导入运单详情" width="90%" append-to-body>
|
||||||
<el-form :inline="true" :model="detailQuery"
|
<el-form :inline="true" :model="detailQuery"
|
||||||
><el-form-item label="车牌号/船号"
|
><el-form-item label="车牌号/船号"
|
||||||
><el-input v-model="detailQuery.vehicleNo" clearable /></el-form-item
|
><el-input v-model="detailQuery.vehicleNo" clearable /></el-form-item
|
||||||
><el-form-item label="货物名称"
|
><el-form-item label="司机/船长姓名"
|
||||||
><el-input v-model="detailQuery.cargoName" clearable /></el-form-item
|
><el-input v-model="detailQuery.driverName" clearable placeholder="请输入" /></el-form-item
|
||||||
><el-button type="primary" @click="loadDetails">查询</el-button></el-form
|
><el-button type="primary" @click="loadDetails">查询</el-button></el-form
|
||||||
>
|
>
|
||||||
<el-table :data="details" border
|
<el-table :data="details" border
|
||||||
@@ -126,7 +219,10 @@
|
|||||||
prop="vehicleNo"
|
prop="vehicleNo"
|
||||||
label="车牌号/航班号/船号/班列号"
|
label="车牌号/航班号/船号/班列号"
|
||||||
min-width="190"
|
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"
|
prop="driverName"
|
||||||
label="司机/船长姓名"
|
label="司机/船长姓名"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
@@ -200,17 +296,20 @@
|
|||||||
prop="waybillIdentifier"
|
prop="waybillIdentifier"
|
||||||
label="同一运单标识号"
|
label="同一运单标识号"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
/><el-table-column label="操作" width="80">-</el-table-column></el-table
|
/></el-table
|
||||||
>
|
>
|
||||||
<el-pagination
|
<div class="waybill-import-toolbar__pagination">
|
||||||
v-model:current-page="detailPage.current"
|
<el-pagination
|
||||||
v-model:page-size="detailPage.size"
|
background
|
||||||
layout="total, prev, pager, next, sizes"
|
v-model:current-page="detailPage.current"
|
||||||
:page-sizes="[10, 20, 50]"
|
v-model:page-size="detailPage.size"
|
||||||
:total="detailPage.total"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@current-change="loadDetails"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
@size-change="loadDetails"
|
:total="detailPage.total"
|
||||||
/>
|
@current-change="loadDetails"
|
||||||
|
@size-change="loadDetails"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<component
|
<component
|
||||||
@@ -506,8 +605,32 @@ const handleClosed = () => emit('closed');
|
|||||||
const createVisible = ref(props.createPage),
|
const createVisible = ref(props.createPage),
|
||||||
detailVisible = ref(false),
|
detailVisible = ref(false),
|
||||||
formRef = ref();
|
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 query = reactive({ batchNo: '', carrierId: '', createUser: '', createTimeRange: [] });
|
||||||
const detailQuery = reactive({ vehicleNo: '', cargoName: '' });
|
const detailQuery = reactive({ vehicleNo: '', driverName: '' });
|
||||||
const createDefaultForm = () => ({
|
const createDefaultForm = () => ({
|
||||||
id: '',
|
id: '',
|
||||||
batchNo: '',
|
batchNo: '',
|
||||||
@@ -862,6 +985,20 @@ const loadEditorOptions = async () => {
|
|||||||
cargoTypeFlatOptions.value = flattenCargoTypeOptions(cargoTypeOptions.value);
|
cargoTypeFlatOptions.value = flattenCargoTypeOptions(cargoTypeOptions.value);
|
||||||
driverOptions.value = extractRecords(driverRes);
|
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 loadBatches = async () => {
|
||||||
const res = await api.getImportBatches({ ...query, current: page.current, size: page.size });
|
const res = await api.getImportBatches({ ...query, current: page.current, size: page.size });
|
||||||
batches.value = res.data?.data?.records || [];
|
batches.value = res.data?.data?.records || [];
|
||||||
@@ -922,9 +1059,13 @@ const closeCreate = () => {
|
|||||||
}
|
}
|
||||||
createVisible.value = false;
|
createVisible.value = false;
|
||||||
};
|
};
|
||||||
const openDetail = row => {
|
const openDetail = async row => {
|
||||||
detailQuery.batchId = row.id;
|
detailQuery.batchId = row.id;
|
||||||
|
detailQuery.vehicleNo = '';
|
||||||
|
detailQuery.driverName = '';
|
||||||
|
detailPage.current = 1;
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
|
await ensureTransportTypeOptions();
|
||||||
loadDetails();
|
loadDetails();
|
||||||
};
|
};
|
||||||
// 草稿明细已落库为草稿运单,编辑时回填到明细表,避免重新上传附件。
|
// 草稿明细已落库为草稿运单,编辑时回填到明细表,避免重新上传附件。
|
||||||
@@ -1329,34 +1470,81 @@ const confirmImport = async () => {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.waybill-import-toolbar {
|
.waybill-import-toolbar {
|
||||||
margin-bottom: 12px;
|
|
||||||
|
|
||||||
&__search {
|
&__search {
|
||||||
display: flex;
|
padding: 18px 18px 8px;
|
||||||
align-items: flex-start;
|
margin-bottom: 8px;
|
||||||
gap: 12px;
|
background: #fff;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
.el-form {
|
&__search-grid {
|
||||||
flex: 1;
|
display: grid;
|
||||||
margin-bottom: 0;
|
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 {
|
&__search-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: none;
|
justify-content: flex-end;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__actions {
|
&__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 {
|
.waybill-import-page {
|
||||||
min-height: calc(100vh - 120px);
|
min-height: calc(100vh - 120px);
|
||||||
padding: 12px 24px 24px;
|
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.waybill-import-create {
|
.waybill-import-create {
|
||||||
|
|||||||
@@ -5172,13 +5172,11 @@ export default {
|
|||||||
if (type === 'add' && copyId) {
|
if (type === 'add' && copyId) {
|
||||||
this.api.getDetail(copyId).then(res => {
|
this.api.getDetail(copyId).then(res => {
|
||||||
const sourceData = res.data.data || {};
|
const sourceData = res.data.data || {};
|
||||||
// 清除不应该复制的字段
|
// 清除不应该复制的字段(业务状态与原运单保持一致)
|
||||||
delete sourceData.id;
|
delete sourceData.id;
|
||||||
delete sourceData.code;
|
delete sourceData.code;
|
||||||
delete sourceData.waybillNo;
|
delete sourceData.waybillNo;
|
||||||
delete sourceData.waybillStatus;
|
delete sourceData.waybillStatus;
|
||||||
delete sourceData.businessStatus;
|
|
||||||
delete sourceData.businessStatusName;
|
|
||||||
delete sourceData.driverAcceptStatus;
|
delete sourceData.driverAcceptStatus;
|
||||||
delete sourceData.driverAcceptTime;
|
delete sourceData.driverAcceptTime;
|
||||||
delete sourceData.driverAcceptDriverId;
|
delete sourceData.driverAcceptDriverId;
|
||||||
@@ -5195,10 +5193,8 @@ export default {
|
|||||||
delete sourceData.updateUserName;
|
delete sourceData.updateUserName;
|
||||||
|
|
||||||
this.applyFormDetail(sourceData);
|
this.applyFormDetail(sourceData);
|
||||||
// 标记为手工创建,状态与新增一致(暂存=草稿,确认后按过程配置校正)
|
// 标记为手工创建;业务状态沿用原运单
|
||||||
this.form.dataSource = '手工创建';
|
this.form.dataSource = '手工创建';
|
||||||
this.form.businessStatus = '';
|
|
||||||
this.form.businessStatusName = '';
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -583,219 +583,219 @@
|
|||||||
label-width="auto"
|
label-width="auto"
|
||||||
class="loading-manage-dialog__form archive-form"
|
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 class="loading-manage-dialog__candidate-search">
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="运单号">
|
|
||||||
<el-input v-model="candidateQuery.waybillNo" clearable placeholder="请输入" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.projectName"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="loadProjectOptions"
|
|
||||||
:loading="projectLoading"
|
|
||||||
placeholder="请输入"
|
|
||||||
@visible-change="
|
|
||||||
visible => visible && loadProjectOptions(candidateQuery.projectName)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in projectOptions"
|
|
||||||
:key="item.id || item.projectName"
|
|
||||||
:label="item.projectName"
|
|
||||||
:value="item.projectName"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="发货地址">
|
|
||||||
<el-input
|
|
||||||
v-model="candidateQuery.departureAddress"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<template v-if="candidateSearchVisible">
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="货物名称">
|
|
||||||
<el-input v-model="candidateQuery.cargoName" clearable placeholder="请输入" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="收货地址">
|
|
||||||
<el-input
|
|
||||||
v-model="candidateQuery.arrivalAddress"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="客户名称">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.customerName"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="loadCustomerOptions"
|
|
||||||
:loading="customerLoading"
|
|
||||||
placeholder="请输入"
|
|
||||||
@visible-change="
|
|
||||||
visible => visible && loadCustomerOptions(candidateQuery.customerName)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in customerOptions"
|
|
||||||
:key="item.id || item.customerName"
|
|
||||||
:label="item.customerName"
|
|
||||||
:value="item.customerName"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="货物类型">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.cargoType"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="loadCargoTypeOptions"
|
|
||||||
:loading="cargoTypeLoading"
|
|
||||||
placeholder="请输入"
|
|
||||||
@visible-change="
|
|
||||||
visible => visible && loadCargoTypeOptions(candidateQuery.cargoType)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in cargoTypeOptions"
|
|
||||||
:key="item.id || item.cargoName || item.cargoType"
|
|
||||||
:label="item.cargoName || item.cargoType || item.label"
|
|
||||||
:value="item.cargoName || item.cargoType || item.label"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="原始单号">
|
|
||||||
<el-input
|
|
||||||
v-model="candidateQuery.originalNo"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="车/船/航班/班列">
|
|
||||||
<el-input v-model="candidateQuery.vehicleNo" clearable placeholder="请输入" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="承运商名称">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.carrierName"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="loadCarrierOptions"
|
|
||||||
:loading="carrierLoading"
|
|
||||||
placeholder="请输入"
|
|
||||||
@visible-change="
|
|
||||||
visible => visible && loadCarrierOptions(candidateQuery.carrierName)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in carrierOptions"
|
|
||||||
:key="item.id || item.fullName || item.customerName || item.carrierName"
|
|
||||||
:label="
|
|
||||||
item.fullName || item.customerName || item.carrierName || item.name
|
|
||||||
"
|
|
||||||
:value="
|
|
||||||
item.fullName || item.customerName || item.carrierName || item.name
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="司机">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.driverName"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="loadDriverOptions"
|
|
||||||
:loading="driverLoading"
|
|
||||||
placeholder="请输入"
|
|
||||||
@visible-change="
|
|
||||||
visible => visible && loadDriverOptions(candidateQuery.driverName)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in driverOptions"
|
|
||||||
:key="item.id || item.driverName || item.name"
|
|
||||||
:label="item.driverName || item.name"
|
|
||||||
:value="item.driverName || item.name"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="运输方式">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.transportType"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
:disabled="dialogMode === 'add'"
|
|
||||||
@visible-change="visible => visible && loadTransportTypeOptions()"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in transportTypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
<el-col
|
|
||||||
:span="candidateSearchVisible ? 24 : 6"
|
|
||||||
class="loading-manage-dialog__candidate-actions"
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="handleCandidateSearch">查询</el-button>
|
|
||||||
<el-button @click="handleCandidateReset">重置</el-button>
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
|
||||||
@click="candidateSearchVisible = !candidateSearchVisible"
|
|
||||||
>{{ candidateSearchVisible ? '收起' : '展开' }}</el-link
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</section-card>
|
|
||||||
|
|
||||||
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
||||||
<section-card title="待配载运单">
|
<section-card>
|
||||||
|
<div class="loading-manage-dialog__candidate-search">
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="运单号">
|
||||||
|
<el-input v-model="candidateQuery.waybillNo" clearable placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="项目名称">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.projectName"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="loadProjectOptions"
|
||||||
|
:loading="projectLoading"
|
||||||
|
placeholder="请输入"
|
||||||
|
@visible-change="
|
||||||
|
visible => visible && loadProjectOptions(candidateQuery.projectName)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in projectOptions"
|
||||||
|
:key="item.id || item.projectName"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.projectName"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="发货地址">
|
||||||
|
<el-input
|
||||||
|
v-model="candidateQuery.departureAddress"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<template v-if="candidateSearchVisible">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="货物名称">
|
||||||
|
<el-input
|
||||||
|
v-model="candidateQuery.cargoName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="收货地址">
|
||||||
|
<el-input
|
||||||
|
v-model="candidateQuery.arrivalAddress"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="客户名称">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.customerName"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="loadCustomerOptions"
|
||||||
|
:loading="customerLoading"
|
||||||
|
placeholder="请输入"
|
||||||
|
@visible-change="
|
||||||
|
visible => visible && loadCustomerOptions(candidateQuery.customerName)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in customerOptions"
|
||||||
|
:key="item.id || item.customerName"
|
||||||
|
:label="item.customerName"
|
||||||
|
:value="item.customerName"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="货物类型">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.cargoType"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="loadCargoTypeOptions"
|
||||||
|
:loading="cargoTypeLoading"
|
||||||
|
placeholder="请输入"
|
||||||
|
@visible-change="
|
||||||
|
visible => visible && loadCargoTypeOptions(candidateQuery.cargoType)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cargoTypeOptions"
|
||||||
|
:key="item.id || item.cargoName || item.cargoType"
|
||||||
|
:label="item.cargoName || item.cargoType || item.label"
|
||||||
|
:value="item.cargoName || item.cargoType || item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="原始单号">
|
||||||
|
<el-input
|
||||||
|
v-model="candidateQuery.originalNo"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="车/船/航班/班列">
|
||||||
|
<el-input
|
||||||
|
v-model="candidateQuery.vehicleNo"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="承运商名称">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.carrierName"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="loadCarrierOptions"
|
||||||
|
:loading="carrierLoading"
|
||||||
|
placeholder="请输入"
|
||||||
|
@visible-change="
|
||||||
|
visible => visible && loadCarrierOptions(candidateQuery.carrierName)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in carrierOptions"
|
||||||
|
:key="item.id || item.fullName || item.customerName || item.carrierName"
|
||||||
|
:label="
|
||||||
|
item.fullName || item.customerName || item.carrierName || item.name
|
||||||
|
"
|
||||||
|
:value="
|
||||||
|
item.fullName || item.customerName || item.carrierName || item.name
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="司机">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.driverName"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="loadDriverOptions"
|
||||||
|
:loading="driverLoading"
|
||||||
|
placeholder="请输入"
|
||||||
|
@visible-change="
|
||||||
|
visible => visible && loadDriverOptions(candidateQuery.driverName)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in driverOptions"
|
||||||
|
:key="item.id || item.driverName || item.name"
|
||||||
|
:label="item.driverName || item.name"
|
||||||
|
:value="item.driverName || item.name"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="运输方式">
|
||||||
|
<el-select
|
||||||
|
v-model="candidateQuery.transportType"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
:disabled="dialogMode === 'add'"
|
||||||
|
@visible-change="visible => visible && loadTransportTypeOptions()"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in transportTypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<el-col
|
||||||
|
:span="candidateSearchVisible ? 24 : 6"
|
||||||
|
class="loading-manage-dialog__candidate-actions"
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="handleCandidateSearch">查询</el-button>
|
||||||
|
<el-button @click="handleCandidateReset">重置</el-button>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="candidateSearchVisible = !candidateSearchVisible"
|
||||||
|
>{{ candidateSearchVisible ? '收起' : '展开' }}</el-link
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="candidateTableRef"
|
ref="candidateTableRef"
|
||||||
v-loading="candidateLoading"
|
v-loading="candidateLoading"
|
||||||
@@ -843,27 +843,43 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ formatCandidateWaybillValue(row, 'goodsInfo') }}
|
{{ formatCandidateGoodsInfo(row) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="departureAddress"
|
prop="departureAddress"
|
||||||
label="发货地址"
|
label="发货地址"
|
||||||
min-width="220"
|
min-width="220"
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ formatCandidateAddress(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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="arrivalAddress"
|
prop="arrivalAddress"
|
||||||
label="收货地址"
|
label="收货地址"
|
||||||
min-width="220"
|
min-width="220"
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ formatCandidateAddress(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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -995,20 +1011,36 @@
|
|||||||
prop="departureAddress"
|
prop="departureAddress"
|
||||||
label="发货地"
|
label="发货地"
|
||||||
min-width="220"
|
min-width="220"
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="arrivalAddress"
|
prop="arrivalAddress"
|
||||||
label="到货地"
|
label="到货地"
|
||||||
min-width="220"
|
min-width="220"
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="110" fixed="right">
|
<el-table-column label="操作" width="110" fixed="right">
|
||||||
@@ -1825,6 +1857,7 @@ export default {
|
|||||||
if (!row) return '-';
|
if (!row) return '-';
|
||||||
if (prop === 'businessStatus') return this.statusText(row);
|
if (prop === 'businessStatus') return this.statusText(row);
|
||||||
if (prop === 'transportType') return this.transportTypeLabel(row.transportType);
|
if (prop === 'transportType') return this.transportTypeLabel(row.transportType);
|
||||||
|
if (prop === 'goodsInfo') return this.formatCandidateGoodsInfo(row);
|
||||||
const column = waybillOption.column.find(item => item.prop === prop);
|
const column = waybillOption.column.find(item => item.prop === prop);
|
||||||
if (column?.formatter) {
|
if (column?.formatter) {
|
||||||
const value = column.formatter(row, {}, row[prop]);
|
const value = column.formatter(row, {}, row[prop]);
|
||||||
@@ -1833,14 +1866,130 @@ export default {
|
|||||||
const value = row[prop];
|
const value = row[prop];
|
||||||
return value === undefined || value === null || value === '' ? '-' : value;
|
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) {
|
formatCandidateDate(value) {
|
||||||
if (!value) return '-';
|
if (!value) return '-';
|
||||||
const date = dayjs(value);
|
const date = dayjs(value);
|
||||||
return date.isValid() ? date.format('YYYY-MM-DD HH:mm:ss') : value;
|
return date.isValid() ? date.format('YYYY-MM-DD HH:mm:ss') : value;
|
||||||
},
|
},
|
||||||
formatCandidateAddress(row, type) {
|
formatCandidateAddress(row, type) {
|
||||||
const value = row?.[`${type}Address`] || row?.[`${type}Name`] || '';
|
const prefix = type === 'departure' ? 'departure' : 'arrival';
|
||||||
return this.formatProvinceCityDistrict(value) || '-';
|
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) {
|
splitText(value) {
|
||||||
if (!value) return [];
|
if (!value) return [];
|
||||||
@@ -2462,10 +2611,6 @@ export default {
|
|||||||
if (['road', '公路运输'].includes(normalized)) return 'road,公路运输';
|
if (['road', '公路运输'].includes(normalized)) return 'road,公路运输';
|
||||||
return value || '';
|
return value || '';
|
||||||
},
|
},
|
||||||
openCandidateSearch() {
|
|
||||||
this.candidateSearchVisible = true;
|
|
||||||
this.loadCandidateWaybills();
|
|
||||||
},
|
|
||||||
handleCandidateSearch() {
|
handleCandidateSearch() {
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.loadCandidateWaybills();
|
this.loadCandidateWaybills();
|
||||||
@@ -2567,11 +2712,11 @@ export default {
|
|||||||
};
|
};
|
||||||
rows.forEach((row, rowIndex) => {
|
rows.forEach((row, rowIndex) => {
|
||||||
const departure = row.departureAddress || row.departureName;
|
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) => {
|
rows.forEach((row, rowIndex) => {
|
||||||
const arrival = row.arrivalAddress || row.arrivalName;
|
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) => ({
|
return [...nodeMap.values()].map((node, index) => ({
|
||||||
...node,
|
...node,
|
||||||
@@ -3266,8 +3411,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.loading-manage-dialog__candidate-search {
|
.loading-manage-dialog__candidate-search {
|
||||||
padding: 4px 0;
|
padding: 0;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-manage-dialog__waybill-route-layout {
|
.loading-manage-dialog__waybill-route-layout {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container class="waybill-import-page-container">
|
<basic-container class="waybill-import-page-container">
|
||||||
<div class="waybill-import-page-title">导入运单</div>
|
|
||||||
<waybill-import-dialog standalone />
|
<waybill-import-dialog standalone />
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
@@ -11,28 +10,14 @@ import WaybillImportDialog from './components/waybill-import-dialog.vue';
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.waybill-import-page-container {
|
.waybill-import-page-container {
|
||||||
|
:deep(.basic-container__card) {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.basic-container__card > .el-card__body) {
|
:deep(.basic-container__card > .el-card__body) {
|
||||||
padding: 0;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -22,6 +22,14 @@
|
|||||||
@tree-load="treeLoad"
|
@tree-load="treeLoad"
|
||||||
>
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:loading="iamSyncLoading"
|
||||||
|
v-if="userInfo.authority.includes('admin')"
|
||||||
|
@click="handleIamOrganizationSync"
|
||||||
|
>同步组织
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@@ -120,7 +128,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { getLeaderList } from '@/api/system/user';
|
||||||
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
|
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@@ -152,6 +168,7 @@ export default {
|
|||||||
selectionList: [],
|
selectionList: [],
|
||||||
query: {},
|
query: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
|
iamSyncLoading: false,
|
||||||
parentId: 0,
|
parentId: 0,
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -691,6 +708,26 @@ export default {
|
|||||||
done(row);
|
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() {
|
handleDelete() {
|
||||||
if (this.selectionList.length === 0) {
|
if (this.selectionList.length === 0) {
|
||||||
this.$message.warning('请选择至少一条数据');
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
|||||||
Reference in New Issue
Block a user