Merge remote-tracking branch 'websoft/master'
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<component
|
||||
:is="crudContainer"
|
||||
:option="pageFormOption"
|
||||
:form-page-title="isStandaloneFormPage ? formPageTitle : undefined"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
v-model:page="page"
|
||||
@@ -2641,7 +2642,7 @@
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicleNo" label="车牌号/航班号/船号/班列号" width="192" />
|
||||
<el-table-column prop="vehicleNo" label="车牌号/航班号/船号/班列号" width="200" />
|
||||
<el-table-column prop="driverName" label="司机" width="128" />
|
||||
<el-table-column prop="carrierName" label="承运商" width="192" />
|
||||
<el-table-column label="运输方式" width="192">
|
||||
@@ -2656,7 +2657,7 @@
|
||||
{{ formatTransportPlanProvinceCityDistrict(row.departureAddress) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120" fixed="right">
|
||||
<el-table-column label="状态" width="80" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
:class="['business-crud-page__transport-plan-waybill-status', row.statusClass]"
|
||||
@@ -2665,7 +2666,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="128" fixed="right">
|
||||
<el-table-column label="操作" width="80" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="openTransportPlanWaybillDetail(row)">
|
||||
详情
|
||||
@@ -3225,7 +3226,7 @@
|
||||
width="78%"
|
||||
class="business-crud-page__route-change-dialog"
|
||||
>
|
||||
<el-tabs v-model="waybillRouteChangeTab">
|
||||
<el-tabs type="border-card" v-model="waybillRouteChangeTab">
|
||||
<el-tab-pane label="变更路线" name="change">
|
||||
<section-card title="运单地址">
|
||||
<el-table :data="waybillRouteChangeRows" border>
|
||||
@@ -3310,7 +3311,7 @@
|
||||
<el-empty v-else description="暂无路线" :image-size="60" />
|
||||
</section-card>
|
||||
<el-form label-width="auto">
|
||||
<el-form-item label="变更备注">
|
||||
<el-form-item label="变更备注" style="margin-top: 8px">
|
||||
<el-input
|
||||
v-model="waybillRouteChangeRemark"
|
||||
type="textarea"
|
||||
@@ -3501,7 +3502,7 @@
|
||||
批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="transportPlanImportTab" class="business-crud-page__import-preview-tabs">
|
||||
<el-tabs type="border-card" v-model="transportPlanImportTab" class="business-crud-page__import-preview-tabs">
|
||||
<el-tab-pane :label="`计划单数(${transportPlanImportRows.length})`" name="all" />
|
||||
<el-tab-pane :label="`疑似重复(${transportPlanImportDuplicateCount})`" name="duplicate" />
|
||||
</el-tabs>
|
||||
@@ -3917,7 +3918,7 @@
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="操作" width="220" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="{ row, $index }">
|
||||
<div class="business-crud-page__dispatch-actions">
|
||||
<el-link type="primary" @click="handleDispatchEditRow(row, $index)">编辑</el-link>
|
||||
@@ -5623,6 +5624,9 @@ const attachmentViewerPlugins = [
|
||||
|
||||
const PageAvueForm = {
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
formPageTitle: { type: String, default: '' },
|
||||
},
|
||||
render() {
|
||||
const attrs = { ...this.$attrs };
|
||||
const rowSave = attrs.onRowSave;
|
||||
@@ -5643,9 +5647,12 @@ const PageAvueForm = {
|
||||
slot,
|
||||
])
|
||||
);
|
||||
return h('div', { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' }, [
|
||||
h(resolveComponent('avue-form'), attrs, slots),
|
||||
]);
|
||||
const children = [];
|
||||
if (this.formPageTitle) {
|
||||
children.push(h('div', { class: 'archive-page-form__title' }, this.formPageTitle));
|
||||
}
|
||||
children.push(h(resolveComponent('avue-form'), attrs, slots));
|
||||
return h('div', { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' }, children);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5956,6 +5963,9 @@ export default {
|
||||
: 'business-crud-form-page-dialog';
|
||||
opt.dialogTop = '0';
|
||||
opt.dialogWidth = '100%';
|
||||
} else if (!opt.dialogCustomClass) {
|
||||
// 普通弹窗模式:灰底 body + 白卡表单(与独立表单页风格一致)
|
||||
opt.dialogCustomClass = 'business-crud-form-dialog';
|
||||
}
|
||||
return opt;
|
||||
})(),
|
||||
@@ -6254,6 +6264,18 @@ export default {
|
||||
(this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode))
|
||||
);
|
||||
},
|
||||
formPageTitle() {
|
||||
if (
|
||||
this.isStandaloneFormPage &&
|
||||
(this.isShippingTemplatePage || this.isTransportPlanPage || this.isWaybillDetailLayout)
|
||||
) {
|
||||
return (
|
||||
this.$route.query.name ||
|
||||
`${this.$route.query.mode === 'edit' ? '编辑' : '新增'}${this.config.title || ''}`
|
||||
);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
crudContainer() {
|
||||
return this.isStandaloneFormPage ? 'PageAvueForm' : 'avue-crud';
|
||||
},
|
||||
@@ -6262,13 +6284,14 @@ export default {
|
||||
const isTransportPlanCreate =
|
||||
this.config.enableTransportPlanCreateActions === true &&
|
||||
this.$route.query.mode === 'add';
|
||||
return {
|
||||
const base = {
|
||||
...this.option,
|
||||
boxType: this.$route.query.mode === 'edit' ? 'edit' : 'add',
|
||||
menuBtn: true,
|
||||
submitBtn: !isTransportPlanCreate,
|
||||
emptyBtn: false,
|
||||
};
|
||||
return this.buildFormGroupOption(base);
|
||||
},
|
||||
isWaybillDetailLayout() {
|
||||
return this.config.permission === 'waybill_manage';
|
||||
@@ -6921,6 +6944,45 @@ export default {
|
||||
if (mode === 'edit') this.form = { id };
|
||||
this.beforeOpen(() => {}, mode);
|
||||
},
|
||||
buildFormGroupOption(option) {
|
||||
const sectionTitleProps = [
|
||||
'basicInfoTitle',
|
||||
'templateInfoTitle',
|
||||
'shippingInfoTitle',
|
||||
'goodsInfoTitle',
|
||||
'taskInfoTitle',
|
||||
'contractFileTitle',
|
||||
'billingInfoTitle',
|
||||
'settlementRuleTitle',
|
||||
'paymentRatioTitle',
|
||||
'attachmentTitle',
|
||||
'changeRecordTitle',
|
||||
];
|
||||
const columns = [...(option.column || [])].sort(
|
||||
(a, b) => (b.order || 0) - (a.order || 0)
|
||||
);
|
||||
const groups = [];
|
||||
let current = [];
|
||||
columns.forEach(col => {
|
||||
if (sectionTitleProps.includes(col.prop)) {
|
||||
if (current.length) groups.push(current);
|
||||
current = [col];
|
||||
} else {
|
||||
current.push(col);
|
||||
}
|
||||
});
|
||||
if (current.length) groups.push(current);
|
||||
if (groups.length <= 1) return option;
|
||||
return {
|
||||
...option,
|
||||
column: groups[0],
|
||||
group: groups.slice(1).map(group => ({
|
||||
label: '',
|
||||
arrow: false,
|
||||
column: group,
|
||||
})),
|
||||
};
|
||||
},
|
||||
openContractFormPage(mode, row = {}) {
|
||||
if (this.isStandaloneBusinessPage) {
|
||||
this.$router.push({
|
||||
@@ -15428,8 +15490,9 @@ export default {
|
||||
|
||||
&__transport-plan-detail-head,
|
||||
&__transport-plan-waybill-card {
|
||||
border: 1px solid #dfe3e8;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
&__transport-plan-detail-head {
|
||||
@@ -15586,7 +15649,7 @@ export default {
|
||||
}
|
||||
|
||||
&__transport-plan-waybill-card {
|
||||
margin-top: 8px;
|
||||
//margin-top: 8px;
|
||||
padding: 16px 14px 12px;
|
||||
}
|
||||
|
||||
@@ -16109,7 +16172,7 @@ export default {
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
.avue-form__group--title {
|
||||
padding: 0 !important;
|
||||
@@ -16125,7 +16188,7 @@ export default {
|
||||
width: 100% !important;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 24px 96px;
|
||||
//padding: 20px 24px 96px;
|
||||
background: #f5f6fa;
|
||||
margin: 0 !important;
|
||||
border-radius: 0;
|
||||
@@ -16286,6 +16349,66 @@ export default {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// 合同管理独立表单页:标题分块使用白底卡片,间距 12px,与 section-card 风格一致
|
||||
:global(.contract-manage-form-dialog) {
|
||||
//padding: 20px 24px 96px;
|
||||
background: #f5f6fa;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 独立表单页(合同/运单/运输计划/运输模板):标题分块使用白底卡片,间距 12px,与 section-card 风格一致
|
||||
:global(.business-crud-form-page-dialog:not(.el-dialog)) {
|
||||
//padding: 20px 24px 96px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-form) {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-form > .el-form > .avue-form__group),
|
||||
:global(.business-crud-page--form-page .avue-group) {
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
|
||||
margin-bottom: 12px;
|
||||
padding: 14px 16px 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-form > .el-form > .avue-form__group:last-child),
|
||||
:global(.business-crud-page--form-page .avue-group:last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// 分组后的表单:卡片由 .avue-group 承担,内层 .avue-form__group 去卡片化,避免白卡叠白卡
|
||||
:global(.business-crud-page--form-page .avue-form .avue-form__group:has(.dialog-section-title)) {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-group .el-collapse) {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-group .el-collapse-item__header) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-group .el-collapse-item__wrap) {
|
||||
border-bottom: none;
|
||||
will-change: auto;
|
||||
}
|
||||
|
||||
:global(.business-crud-page--form-page .avue-group .el-collapse-item__content) {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
:global(.avue--collapse .el-overlay:has(.contract-manage-form-dialog)) {
|
||||
left: 60px !important;
|
||||
}
|
||||
|
||||
@@ -1735,10 +1735,12 @@ export default {
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.master-editor section {
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 12px;
|
||||
padding: 16px;
|
||||
border: 1px solid #eff1f7;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||
h3 {
|
||||
margin: 0 0 16px;
|
||||
padding-left: 12px;
|
||||
|
||||
Reference in New Issue
Block a user