Compare commits
5 Commits
1862115e1d
...
1e4de76978
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e4de76978 | |||
| e6d4edf362 | |||
| 5e92124710 | |||
| badfed7ff1 | |||
| c339852e04 |
@@ -170,12 +170,14 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 `
|
|||||||
- 表格操作列同时展示“查看、编辑、删除”等三个按钮时,操作列宽度统一不小于 `220px`;操作列最大按钮数量超过 3 个时,操作列宽度统一加宽到不小于 `320px`;最大按钮数量超过 4 个时,仍按 `320px` 保持列宽,并从第 5 个按钮开始换行展示,禁止出现按钮裁切或显示不全。
|
- 表格操作列同时展示“查看、编辑、删除”等三个按钮时,操作列宽度统一不小于 `220px`;操作列最大按钮数量超过 3 个时,操作列宽度统一加宽到不小于 `320px`;最大按钮数量超过 4 个时,仍按 `320px` 保持列宽,并从第 5 个按钮开始换行展示,禁止出现按钮裁切或显示不全。
|
||||||
- 表格操作列按钮统一仅展示文字,禁止配置 `icon` / `:icon` 或在操作按钮、操作下拉项中嵌入图标;顶部工具栏按钮不受此条限制。
|
- 表格操作列按钮统一仅展示文字,禁止配置 `icon` / `:icon` 或在操作按钮、操作下拉项中嵌入图标;顶部工具栏按钮不受此条限制。
|
||||||
- 纯文字操作入口统一使用 `<el-link>`,禁止使用带 `text` 属性的 `<el-button>`;提交、确认、上传等具有明确命令语义或需要加载状态的按钮可继续使用 `<el-button>`。
|
- 纯文字操作入口统一使用 `<el-link>`,禁止使用带 `text` 属性的 `<el-button>`;提交、确认、上传等具有明确命令语义或需要加载状态的按钮可继续使用 `<el-button>`。
|
||||||
|
- 所有表格操作列中的文字链接统一保持 `8px` 间距;操作按钮超过操作列可用宽度时必须自动换行,禁止链接连续粘连或被裁切。Avue 自定义 `#menu` 插槽和手写 `el-table-column` 操作列均适用。
|
||||||
- `.avue-crud__header` 顶部间距统一为 `12px`。
|
- `.avue-crud__header` 顶部间距统一为 `12px`。
|
||||||
- 分页组件整体靠右展示,必须展示接口返回的数据总条数,`X条/页` 的页容量选择器必须放在总条数右侧。
|
- 分页组件整体靠右展示,必须展示接口返回的数据总条数,`X条/页` 的页容量选择器必须放在总条数右侧。
|
||||||
- `.basic-container__card` 的直接子级 `.el-card__body` 内边距统一去除,保持 `padding: 0`
|
- `.basic-container__card` 的直接子级 `.el-card__body` 内边距统一去除,保持 `padding: 0`
|
||||||
- 所有 CRUD 页面搜索栏需与下方表格拆分为独立区域,两者垂直间距统一为 `8px`。
|
- 所有 CRUD 页面搜索栏需与下方表格拆分为独立区域,两者垂直间距统一为 `8px`。
|
||||||
- 所有 CRUD 页面搜索栏操作按钮(搜索、清空等)需在搜索表单下方独占一行并放置在最右侧;搜索条件超过一行时必须显示“展开/折叠”,默认折叠且仅展示一行搜索条件;一行布局默认展示 4 个筛选项,Avue 配置统一使用 `searchIndex: 4`。
|
- 所有 CRUD 页面搜索栏操作按钮(搜索、清空等)需在搜索表单下方独占一行并放置在最右侧;搜索条件超过一行时必须显示“展开/折叠”,默认折叠且仅展示一行搜索条件;一行布局默认展示 4 个筛选项,Avue 配置统一使用 `searchIndex: 4`。
|
||||||
- 所有 CRUD 页面中新增、批量导入等顶部按钮组行不需要背景色,应保持透明背景。
|
- 所有 CRUD 页面中新增、批量导入等顶部按钮组行不需要背景色,应保持透明背景。
|
||||||
|
- 所有 CRUD 页面顶部工具栏的“新增/新建”主操作按钮统一使用蓝底白字的实心主按钮(`type="primary"` 且不使用 `plain`),视觉标准与“新建运单”一致;批量导入、导出等辅助工具按钮仍使用描边样式。
|
||||||
- 所有 `.basic-container__card` 内的 Avue 内层 `el-card` 需去卡片化,仅保留外层容器卡片样式,禁止出现二级卡片边框、阴影或额外内边距。
|
- 所有 `.basic-container__card` 内的 Avue 内层 `el-card` 需去卡片化,仅保留外层容器卡片样式,禁止出现二级卡片边框、阴影或额外内边距。
|
||||||
|
|
||||||
### 4.5 全局注册组件
|
### 4.5 全局注册组件
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ export const reject = id =>
|
|||||||
params: { id },
|
params: { id },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const updateAttachments = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/update-attachments`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
export const withdraw = id =>
|
export const withdraw = id =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/withdraw`,
|
url: `${baseUrl}/withdraw`,
|
||||||
|
|||||||
@@ -40,6 +40,16 @@ export const submitApproval = id => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const withdrawApproval = id => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/withdraw-approval',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const approve = id => {
|
export const approve = id => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/customer-archive/approve',
|
url: '/blade-transport/customer-archive/approve',
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ const MIME_MAP = {
|
|||||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
ppt: 'application/vnd.ms-powerpoint',
|
ppt: 'application/vnd.ms-powerpoint',
|
||||||
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||||
|
eml: 'message/rfc822',
|
||||||
|
msg: 'application/vnd.ms-outlook',
|
||||||
|
zip: 'application/zip',
|
||||||
txt: 'text/plain',
|
txt: 'text/plain',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
type: 'radio',
|
type: 'radio',
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
dicData: typeLevelDic,
|
dicData: typeLevelDic,
|
||||||
search: true,
|
search: false,
|
||||||
searchSpan: 6,
|
|
||||||
value: 2,
|
value: 2,
|
||||||
span: 24,
|
span: 24,
|
||||||
|
order: 100,
|
||||||
hide: true,
|
hide: true,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
@@ -70,20 +70,34 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
label: '货物类型',
|
label: '货物类型',
|
||||||
prop: 'cargoName',
|
prop: 'cargoName',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchSpan: 6,
|
||||||
|
searchOrder: 2,
|
||||||
|
order: 70,
|
||||||
|
placeholder: '请输入',
|
||||||
maxlength: 50,
|
maxlength: 50,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
rules: [{ validator: validateCargoName, trigger: 'blur' }],
|
rules: [
|
||||||
|
{ required: true, message: '请输入货物类型名称', trigger: 'blur' },
|
||||||
|
{ validator: validateCargoName, trigger: 'blur' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货物类型编码',
|
label: '货物类型编码',
|
||||||
prop: 'cargoCode',
|
prop: 'cargoCode',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
searchSpan: 6,
|
searchSpan: 6,
|
||||||
|
searchOrder: 1,
|
||||||
maxlength: 4,
|
maxlength: 4,
|
||||||
|
order: 60,
|
||||||
|
placeholder: '请输入',
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
rules: [
|
rules: [
|
||||||
|
{ required: true, message: '请输入货物类型编码', trigger: 'blur' },
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
const form = ctx.form || {};
|
const form = ctx.form || {};
|
||||||
@@ -115,6 +129,8 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
hide: true,
|
hide: true,
|
||||||
display: false,
|
display: false,
|
||||||
span: 12,
|
span: 12,
|
||||||
|
order: 90,
|
||||||
|
placeholder: '请输入',
|
||||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -128,16 +144,19 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '上级货物编码',
|
label: '上级货物类型编码',
|
||||||
prop: 'parentCargoCode',
|
prop: 'parentCargoCode',
|
||||||
slot: true,
|
slot: true,
|
||||||
readonly: true,
|
readonly: true,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
|
addDisabled: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
display: false,
|
display: false,
|
||||||
span: 12,
|
span: 12,
|
||||||
|
order: 80,
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
|
placeholder: '请输入',
|
||||||
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -156,6 +175,7 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
minRows: 4,
|
minRows: 4,
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
|
placeholder: '请输入',
|
||||||
maxlength: 200,
|
maxlength: 200,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
|||||||
@@ -27,18 +27,154 @@ export const createOption = () => ({
|
|||||||
delBtn: false,
|
delBtn: false,
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 160,
|
menuFixed: 'right',
|
||||||
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
|
{
|
||||||
|
label: '地址名称',
|
||||||
|
prop: 'addressName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 8,
|
||||||
|
span: 24,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
placeholder: '请输入',
|
||||||
|
maxlength: 100,
|
||||||
|
showWordLimit: true,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入地址名称', trigger: 'blur' },
|
||||||
|
{ max: 100, message: '地址名称不能超过100个字', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '地址编号',
|
||||||
|
prop: 'addressCode',
|
||||||
|
minWidth: 120,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '类型',
|
||||||
prop: 'addressType',
|
prop: 'addressType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 7,
|
||||||
span: 24,
|
span: 24,
|
||||||
|
minWidth: 140,
|
||||||
dicData: addressTypeOptions,
|
dicData: addressTypeOptions,
|
||||||
rules: [{ required: true, message: '请选择类型', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择类型', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '站点编码',
|
||||||
|
prop: 'siteCodeDisplay',
|
||||||
|
search: false,
|
||||||
|
minWidth: 120,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '详细地址',
|
||||||
|
prop: 'detailAddress',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 5,
|
||||||
|
formslot: true,
|
||||||
|
type: 'textarea',
|
||||||
|
minRows: 3,
|
||||||
|
span: 24,
|
||||||
|
minWidth: 220,
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
||||||
|
{ max: 255, message: '详细地址不能超过255个字', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '经度',
|
||||||
|
prop: 'longitude',
|
||||||
|
minWidth: 120,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '纬度',
|
||||||
|
prop: 'latitude',
|
||||||
|
minWidth: 120,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '行政区划',
|
||||||
|
prop: 'regionName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 4,
|
||||||
|
display: false,
|
||||||
|
minWidth: 150,
|
||||||
|
rules: [{ required: true, message: '请选择行政区划', trigger: 'change' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系人',
|
||||||
|
prop: 'contactName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 2,
|
||||||
|
minWidth: 110,
|
||||||
|
placeholder: '请输入',
|
||||||
|
maxlength: 50,
|
||||||
|
rules: [{ max: 50, message: '联系人不能超过50个字', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系方式',
|
||||||
|
prop: 'contactPhone',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 1,
|
||||||
|
minWidth: 130,
|
||||||
|
placeholder: '请输入',
|
||||||
|
maxlength: 20,
|
||||||
|
rules: [{ max: 20, message: '联系方式不能超过20个字', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织',
|
||||||
|
prop: 'deptName',
|
||||||
|
minWidth: 150,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark',
|
||||||
|
type: 'textarea',
|
||||||
|
minRows: 4,
|
||||||
|
span: 24,
|
||||||
|
minWidth: 160,
|
||||||
|
overHidden: true,
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
placeholder: '请输入',
|
||||||
|
maxlength: 200,
|
||||||
|
showWordLimit: true,
|
||||||
|
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '更新时间',
|
||||||
|
prop: 'updateTime',
|
||||||
|
type: 'datetime',
|
||||||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
width: 180,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
type: 'datetime',
|
||||||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
width: 180,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '港口',
|
label: '港口',
|
||||||
prop: 'portId',
|
prop: 'portId',
|
||||||
@@ -75,133 +211,24 @@ export const createOption = () => ({
|
|||||||
span: 24,
|
span: 24,
|
||||||
rules: [{ required: true, message: '请选择机场标准名称', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择机场标准名称', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '地址名称',
|
|
||||||
prop: 'addressName',
|
|
||||||
search: true,
|
|
||||||
span: 24,
|
|
||||||
minWidth: 150,
|
|
||||||
maxlength: 100,
|
|
||||||
showWordLimit: true,
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '请输入地址名称', trigger: 'blur' },
|
|
||||||
{ max: 100, message: '地址名称不能超过100个字', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '地址编号',
|
|
||||||
prop: 'addressCode',
|
|
||||||
minWidth: 120,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '站点编码',
|
|
||||||
prop: 'siteCodeDisplay',
|
|
||||||
search: false,
|
|
||||||
minWidth: 120,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '站点编码',
|
label: '站点编码',
|
||||||
prop: 'siteCode',
|
prop: 'siteCode',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 6,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '行政区划',
|
|
||||||
prop: 'regionName',
|
|
||||||
search: true,
|
|
||||||
display: false,
|
|
||||||
minWidth: 150,
|
|
||||||
rules: [{ required: true, message: '请选择行政区划', trigger: 'change' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '详细地址',
|
|
||||||
prop: 'detailAddress',
|
|
||||||
search: true,
|
|
||||||
formslot: true,
|
|
||||||
type: 'textarea',
|
|
||||||
minRows: 3,
|
|
||||||
span: 24,
|
|
||||||
minWidth: 220,
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
|
||||||
{ max: 255, message: '详细地址不能超过255个字', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '组织',
|
label: '组织',
|
||||||
prop: 'deptId',
|
prop: 'deptId',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 3,
|
||||||
hide: true,
|
hide: true,
|
||||||
display: false,
|
display: false,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '组织',
|
|
||||||
prop: 'deptName',
|
|
||||||
minWidth: 150,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '联系人',
|
|
||||||
prop: 'contactName',
|
|
||||||
search: true,
|
|
||||||
minWidth: 110,
|
|
||||||
maxlength: 50,
|
|
||||||
rules: [{ max: 50, message: '联系人不能超过50个字', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '联系方式',
|
|
||||||
prop: 'contactPhone',
|
|
||||||
search: true,
|
|
||||||
minWidth: 130,
|
|
||||||
maxlength: 20,
|
|
||||||
rules: [{ max: 20, message: '联系方式不能超过20个字', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '备注',
|
|
||||||
prop: 'remark',
|
|
||||||
type: 'textarea',
|
|
||||||
minRows: 4,
|
|
||||||
span: 24,
|
|
||||||
hide: true,
|
|
||||||
maxlength: 200,
|
|
||||||
showWordLimit: true,
|
|
||||||
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '更新人',
|
|
||||||
prop: 'updateUserName',
|
|
||||||
minWidth: 120,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '更新时间',
|
|
||||||
prop: 'updateTime',
|
|
||||||
type: 'datetime',
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
minWidth: 160,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '创建时间',
|
|
||||||
prop: 'createTime',
|
|
||||||
type: 'datetime',
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
minWidth: 160,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ import {
|
|||||||
textRule,
|
textRule,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
|
const listDicFormatter = res => {
|
||||||
|
const data = res?.data || res;
|
||||||
|
if (Array.isArray(data)) return data;
|
||||||
|
if (Array.isArray(data?.records)) return data.records;
|
||||||
|
if (Array.isArray(data?.data)) return data.data;
|
||||||
|
if (Array.isArray(data?.data?.records)) return data.data.records;
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
title: '常用货物',
|
title: '常用货物',
|
||||||
permission: 'common_cargo',
|
permission: 'common_cargo',
|
||||||
@@ -17,12 +26,29 @@ export const config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const option = createCrudOption([
|
export const option = createCrudOption([
|
||||||
|
{
|
||||||
|
label: '货物名称',
|
||||||
|
prop: 'cargoName',
|
||||||
|
minWidth: 150,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('货物名称', 100, true),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '货物编号',
|
||||||
|
prop: 'cargoCode',
|
||||||
|
formslot: true,
|
||||||
|
minWidth: 120,
|
||||||
|
maxlength: 20,
|
||||||
|
showWordLimit: true,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入货物编号', trigger: 'blur' },
|
||||||
|
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '一级货物类型',
|
label: '一级货物类型',
|
||||||
prop: 'firstCargoTypeName',
|
prop: 'firstCargoTypeName',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
|
||||||
searchOrder: 3,
|
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
|
||||||
@@ -39,8 +65,6 @@ export const option = createCrudOption([
|
|||||||
label: '二级货物类型',
|
label: '二级货物类型',
|
||||||
prop: 'secondCargoTypeName',
|
prop: 'secondCargoTypeName',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
|
||||||
searchOrder: 4,
|
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
|
||||||
@@ -48,47 +72,118 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '二级货物类型编码',
|
label: '二级货物类型编码',
|
||||||
prop: 'secondCargoTypeCode',
|
prop: 'secondCargoTypeCode',
|
||||||
hide: true,
|
|
||||||
display: false,
|
display: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
},
|
},
|
||||||
|
// 搜索字段与表格、表单字段独立,避免筛选配置影响数据展示和编辑布局。
|
||||||
{
|
{
|
||||||
label: '货物名称',
|
label: '货物名称',
|
||||||
prop: 'cargoName',
|
prop: 'searchCargoName',
|
||||||
|
searchProp: 'cargoName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 1,
|
searchOrder: 5,
|
||||||
minWidth: 150,
|
searchPlaceholder: '请输入',
|
||||||
rules: textRule('货物名称', 100, true),
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货物编号',
|
label: '货物编号',
|
||||||
prop: 'cargoCode',
|
prop: 'searchCargoCode',
|
||||||
formslot: true,
|
searchProp: 'cargoCode',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 4,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '一级货物类型',
|
||||||
|
prop: 'searchFirstCargoTypeName',
|
||||||
|
searchProp: 'firstCargoTypeName',
|
||||||
|
type: 'select',
|
||||||
|
searchType: 'select',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 3,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
dicUrl: '/blade-system/cargo-type/list?current=1&size=9999&typeLevel=1',
|
||||||
|
dicFormatter: listDicFormatter,
|
||||||
|
props: {
|
||||||
|
label: 'cargoName',
|
||||||
|
value: 'cargoName',
|
||||||
|
},
|
||||||
|
filterable: true,
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '二级货物类型',
|
||||||
|
prop: 'searchSecondCargoTypeName',
|
||||||
|
searchProp: 'secondCargoTypeName',
|
||||||
|
type: 'select',
|
||||||
|
searchType: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 2,
|
searchOrder: 2,
|
||||||
minWidth: 120,
|
searchPlaceholder: '请选择',
|
||||||
maxlength: 20,
|
dicUrl: '/blade-system/cargo-type/list?current=1&size=9999&typeLevel=2',
|
||||||
showWordLimit: true,
|
dicFormatter: listDicFormatter,
|
||||||
rules: [
|
props: {
|
||||||
{ required: true, message: '请输入货物编号', trigger: 'blur' },
|
label: 'cargoName',
|
||||||
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
|
value: 'cargoName',
|
||||||
],
|
},
|
||||||
|
filterable: true,
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '组织',
|
label: '组织',
|
||||||
prop: 'deptName',
|
prop: 'searchDeptId',
|
||||||
|
searchProp: 'deptId',
|
||||||
|
type: 'select',
|
||||||
|
searchType: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 1,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
dicData: [],
|
||||||
|
props: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
},
|
||||||
|
filterable: true,
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '包装品牌',
|
||||||
|
prop: 'packageBrand',
|
||||||
|
slot: true,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '品牌',
|
label: '品牌',
|
||||||
prop: 'brand',
|
prop: 'brand',
|
||||||
search: false,
|
search: false,
|
||||||
|
hide: true,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
|
placeholder: '请输入',
|
||||||
rules: textRule('品牌', 50),
|
rules: textRule('品牌', 50),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -96,10 +191,25 @@ export const option = createCrudOption([
|
|||||||
prop: 'packageType',
|
prop: 'packageType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: packageOptions,
|
dicData: packageOptions,
|
||||||
|
hide: true,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货值',
|
label: '规格',
|
||||||
|
prop: 'specification',
|
||||||
|
minWidth: 120,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('规格', 50),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '型号',
|
||||||
|
prop: 'model',
|
||||||
|
minWidth: 120,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('型号', 50),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '单价',
|
||||||
prop: 'cargoValue',
|
prop: 'cargoValue',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
@@ -129,29 +239,26 @@ export const option = createCrudOption([
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '规格',
|
label: '尺寸',
|
||||||
prop: 'specification',
|
prop: 'sizeText',
|
||||||
minWidth: 120,
|
|
||||||
rules: textRule('规格', 50),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '型号',
|
|
||||||
prop: 'model',
|
|
||||||
minWidth: 120,
|
|
||||||
rules: textRule('型号', 50),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '说明',
|
|
||||||
prop: 'descriptionOne',
|
|
||||||
minWidth: 160,
|
|
||||||
rules: textRule('说明', 100),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '数据来源',
|
|
||||||
prop: 'dataSource',
|
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
|
rules: textRule('尺寸', 100),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '其他说明1',
|
||||||
|
prop: 'descriptionOne',
|
||||||
|
minWidth: 160,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('其他说明1', 100),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '其他说明2',
|
||||||
|
prop: 'descriptionTwo',
|
||||||
|
minWidth: 160,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('其他说明2', 100),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
@@ -159,12 +266,25 @@ export const option = createCrudOption([
|
|||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
minRows: 4,
|
minRows: 4,
|
||||||
span: 24,
|
span: 24,
|
||||||
hide: true,
|
|
||||||
maxlength: 200,
|
maxlength: 200,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
|
placeholder: '请输入',
|
||||||
rules: textRule('备注', 200),
|
rules: textRule('备注', 200),
|
||||||
},
|
},
|
||||||
...auditColumns,
|
{
|
||||||
|
label: '组织',
|
||||||
|
prop: 'deptName',
|
||||||
|
minWidth: 150,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
...auditColumns
|
||||||
|
.filter(column => ['updateTime', 'createTime'].includes(column.prop))
|
||||||
|
.sort(
|
||||||
|
(first, second) =>
|
||||||
|
['updateTime', 'createTime'].indexOf(first.prop) -
|
||||||
|
['updateTime', 'createTime'].indexOf(second.prop)
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const excelOption = {
|
export const excelOption = {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ export const config = {
|
|||||||
permission: 'common_route',
|
permission: 'common_route',
|
||||||
exportUrl: '/blade-transport/common-route/export-common-route',
|
exportUrl: '/blade-transport/common-route/export-common-route',
|
||||||
exportName: '常用线路',
|
exportName: '常用线路',
|
||||||
|
importUrl: '/blade-transport/common-route/import-common-route',
|
||||||
|
templateUrl: '/blade-transport/common-route/export-template',
|
||||||
enableAllDept: false,
|
enableAllDept: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -12,17 +14,14 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '线路名称',
|
label: '线路名称',
|
||||||
prop: 'routeName',
|
prop: 'routeName',
|
||||||
search: true,
|
span: 12,
|
||||||
searchOrder: 1,
|
|
||||||
span: 24,
|
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
|
overHidden: true,
|
||||||
rules: textRule('线路名称', 100, true),
|
rules: textRule('线路名称', 100, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '线路编号',
|
label: '线路编号',
|
||||||
prop: 'routeCode',
|
prop: 'routeCode',
|
||||||
search: true,
|
|
||||||
searchOrder: 2,
|
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
@@ -30,8 +29,6 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '发货地',
|
label: '发货地',
|
||||||
prop: 'departureName',
|
prop: 'departureName',
|
||||||
search: true,
|
|
||||||
searchOrder: 3,
|
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
@@ -40,10 +37,9 @@ export const option = createCrudOption([
|
|||||||
label: '发货地址',
|
label: '发货地址',
|
||||||
prop: 'departureAddress',
|
prop: 'departureAddress',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
|
||||||
searchOrder: 4,
|
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
|
overHidden: true,
|
||||||
rules: textRule('发货地址', 255, true),
|
rules: textRule('发货地址', 255, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -53,6 +49,8 @@ export const option = createCrudOption([
|
|||||||
precision: 6,
|
precision: 6,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '发货纬度',
|
label: '发货纬度',
|
||||||
@@ -61,6 +59,8 @@ export const option = createCrudOption([
|
|||||||
precision: 6,
|
precision: 6,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '发货联系人',
|
label: '发货联系人',
|
||||||
@@ -77,8 +77,6 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '收货地',
|
label: '收货地',
|
||||||
prop: 'arrivalName',
|
prop: 'arrivalName',
|
||||||
search: true,
|
|
||||||
searchOrder: 5,
|
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
@@ -87,10 +85,9 @@ export const option = createCrudOption([
|
|||||||
label: '收货地址',
|
label: '收货地址',
|
||||||
prop: 'arrivalAddress',
|
prop: 'arrivalAddress',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
|
||||||
searchOrder: 6,
|
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
|
overHidden: true,
|
||||||
rules: textRule('收货地址', 255, true),
|
rules: textRule('收货地址', 255, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -100,6 +97,8 @@ export const option = createCrudOption([
|
|||||||
precision: 6,
|
precision: 6,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '收货纬度',
|
label: '收货纬度',
|
||||||
@@ -108,6 +107,8 @@ export const option = createCrudOption([
|
|||||||
precision: 6,
|
precision: 6,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '收货联系人',
|
label: '收货联系人',
|
||||||
@@ -121,25 +122,160 @@ export const option = createCrudOption([
|
|||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)],
|
rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '组织',
|
|
||||||
prop: 'deptName',
|
|
||||||
search: true,
|
|
||||||
searchOrder: 7,
|
|
||||||
minWidth: 150,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
minRows: 4,
|
minRows: 4,
|
||||||
span: 24,
|
span: 24,
|
||||||
hide: true,
|
minWidth: 180,
|
||||||
maxlength: 500,
|
maxlength: 500,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: textRule('备注', 500),
|
rules: textRule('备注', 500),
|
||||||
},
|
},
|
||||||
...auditColumns,
|
{
|
||||||
|
label: '组织',
|
||||||
|
prop: 'deptName',
|
||||||
|
minWidth: 150,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
// 搜索字段独立于表格和表单字段,避免筛选配置影响数据展示和编辑布局。
|
||||||
|
{
|
||||||
|
label: '线路名称',
|
||||||
|
prop: 'searchRouteName',
|
||||||
|
searchProp: 'routeName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 7,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '线路编号',
|
||||||
|
prop: 'searchRouteCode',
|
||||||
|
searchProp: 'routeCode',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 6,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发货地',
|
||||||
|
prop: 'searchDepartureName',
|
||||||
|
searchProp: 'departureName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 5,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发货地址',
|
||||||
|
prop: 'searchDepartureAddress',
|
||||||
|
searchProp: 'departureAddress',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 4,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '收货地',
|
||||||
|
prop: 'searchArrivalName',
|
||||||
|
searchProp: 'arrivalName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 3,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '收货地址',
|
||||||
|
prop: 'searchArrivalAddress',
|
||||||
|
searchProp: 'arrivalAddress',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 2,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织',
|
||||||
|
prop: 'searchDeptId',
|
||||||
|
searchProp: 'deptId',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 1,
|
||||||
|
searchType: 'cascader',
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
dicData: [],
|
||||||
|
props: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
children: 'children',
|
||||||
|
},
|
||||||
|
checkStrictly: true,
|
||||||
|
emitPath: false,
|
||||||
|
showAllLevels: false,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
...auditColumns
|
||||||
|
.filter(column => column.prop !== 'createUserName')
|
||||||
|
.map(column =>
|
||||||
|
['createTime', 'updateTime'].includes(column.prop) ? { ...column, minWidth: 190 } : column
|
||||||
|
)
|
||||||
|
.sort(
|
||||||
|
(first, second) =>
|
||||||
|
['updateUserName', 'updateTime', 'createTime'].indexOf(first.prop) -
|
||||||
|
['updateUserName', 'updateTime', 'createTime'].indexOf(second.prop)
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
export const excelOption = {
|
||||||
|
submitBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '导入模板',
|
||||||
|
prop: 'excelTemplate',
|
||||||
|
formslot: true,
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Excel文件',
|
||||||
|
prop: 'excelFile',
|
||||||
|
type: 'upload',
|
||||||
|
drag: true,
|
||||||
|
loadText: '模板上传中,请稍等',
|
||||||
|
span: 24,
|
||||||
|
propsHttp: {
|
||||||
|
res: 'data',
|
||||||
|
},
|
||||||
|
tip: '请上传 .xls,.xlsx 标准格式文件',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|||||||
@@ -87,8 +87,10 @@ export const approvalStatusOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const effectiveTypeOptions = [
|
export const effectiveTypeOptions = [
|
||||||
{ label: '临时', value: 'temporary' },
|
{ label: '未生效', value: 'not_effective' },
|
||||||
{ label: '正式', value: 'formal' },
|
{ label: '临时生效', value: 'temporary_effective' },
|
||||||
|
{ label: '正式生效', value: 'formal_effective' },
|
||||||
|
{ label: '已过期', value: 'expired' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const businessTypeOptions = [
|
export const businessTypeOptions = [
|
||||||
|
|||||||
@@ -6,11 +6,18 @@ import {
|
|||||||
createCrudOption,
|
createCrudOption,
|
||||||
effectiveTypeOptions,
|
effectiveTypeOptions,
|
||||||
selectRule,
|
selectRule,
|
||||||
settlementModeOptions,
|
|
||||||
signTypeOptions,
|
signTypeOptions,
|
||||||
textRule,
|
textRule,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
|
const contractSettlementModeOptions = [
|
||||||
|
{ label: '现结', value: '现结' },
|
||||||
|
{ label: '日结', value: '日结' },
|
||||||
|
{ label: '周结', value: '周结' },
|
||||||
|
{ label: '月结', value: '月结' },
|
||||||
|
{ label: '按固定天数周期', value: '按固定天数周期' },
|
||||||
|
];
|
||||||
|
|
||||||
const listDicFormatter = res => {
|
const listDicFormatter = res => {
|
||||||
const data = res?.data || res;
|
const data = res?.data || res;
|
||||||
if (Array.isArray(data)) return data;
|
if (Array.isArray(data)) return data;
|
||||||
@@ -25,7 +32,13 @@ export const config = {
|
|||||||
permission: 'contract_manage',
|
permission: 'contract_manage',
|
||||||
exportUrl: '/blade-transport/contract-manage/export-contract-manage',
|
exportUrl: '/blade-transport/contract-manage/export-contract-manage',
|
||||||
exportName: '合同管理',
|
exportName: '合同管理',
|
||||||
enableAllDept: false,
|
defaultForm: {
|
||||||
|
contractCategory: '客户合同',
|
||||||
|
},
|
||||||
|
projectPlaceholder: '请选择',
|
||||||
|
organizationPlaceholder: '请选择',
|
||||||
|
enableAllDept: true,
|
||||||
|
allDeptReadonly: false,
|
||||||
batchDelete: false,
|
batchDelete: false,
|
||||||
enableContractForm: true,
|
enableContractForm: true,
|
||||||
enableProjectSelect: true,
|
enableProjectSelect: true,
|
||||||
@@ -39,6 +52,7 @@ export const config = {
|
|||||||
enableChangeRecord: true,
|
enableChangeRecord: true,
|
||||||
enableOrganizationSelect: true,
|
enableOrganizationSelect: true,
|
||||||
enableContractCreateActions: true,
|
enableContractCreateActions: true,
|
||||||
|
enableContractExpiryTags: true,
|
||||||
actions: ['copy'],
|
actions: ['copy'],
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
statusTextProp: 'approvalStatusName',
|
statusTextProp: 'approvalStatusName',
|
||||||
@@ -63,9 +77,25 @@ export const config = {
|
|||||||
label: '撤回',
|
label: '撤回',
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['reviewing'],
|
status: ['reviewing'],
|
||||||
stage: ['temporary'],
|
stage: ['temporary', 'formal'],
|
||||||
permission: 'contract_manage_withdraw',
|
permission: 'contract_manage_withdraw',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
action: 'approve',
|
||||||
|
label: '通过',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
stage: ['temporary', 'formal'],
|
||||||
|
permission: 'contract_manage_approve',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'reject',
|
||||||
|
label: '驳回',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
stage: ['temporary', 'formal'],
|
||||||
|
permission: 'contract_manage_reject',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
action: 'submitFormal',
|
action: 'submitFormal',
|
||||||
label: '重新提交转正',
|
label: '重新提交转正',
|
||||||
@@ -143,16 +173,18 @@ export const option = createCrudOption([
|
|||||||
prop: 'contractNo',
|
prop: 'contractNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 6,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
order: 185,
|
order: 185,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
placeholder: '不填写,则系统自动生成',
|
placeholder: '不填写,则系统自动生成',
|
||||||
minWidth: 160,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '合同名称',
|
label: '合同名称',
|
||||||
prop: 'contractName',
|
prop: 'contractName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 7,
|
searchOrder: 7,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
order: 180,
|
order: 180,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
rules: textRule('合同名称', 100, true),
|
rules: textRule('合同名称', 100, true),
|
||||||
@@ -163,6 +195,7 @@ export const option = createCrudOption([
|
|||||||
search: true,
|
search: true,
|
||||||
searchOrder: 8,
|
searchOrder: 8,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
order: 140,
|
order: 140,
|
||||||
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
||||||
@@ -187,6 +220,7 @@ export const option = createCrudOption([
|
|||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
searchType: 'cascader',
|
searchType: 'cascader',
|
||||||
|
searchPlaceholder: '全部',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
order: 120,
|
order: 120,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
@@ -208,6 +242,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 9,
|
searchOrder: 9,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
order: 170,
|
order: 170,
|
||||||
dicData: contractCategoryOptions,
|
dicData: contractCategoryOptions,
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
@@ -217,10 +252,8 @@ export const option = createCrudOption([
|
|||||||
label: '签约类型',
|
label: '签约类型',
|
||||||
prop: 'signType',
|
prop: 'signType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: false,
|
||||||
searchOrder: 1,
|
|
||||||
span: 6,
|
span: 6,
|
||||||
row: true,
|
|
||||||
order: 190,
|
order: 190,
|
||||||
dicData: signTypeOptions,
|
dicData: signTypeOptions,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
@@ -232,6 +265,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 5,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
dicData: effectiveTypeOptions,
|
dicData: effectiveTypeOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
display: false,
|
display: false,
|
||||||
@@ -241,7 +275,8 @@ export const option = createCrudOption([
|
|||||||
prop: 'partyA',
|
prop: 'partyA',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
order: 160,
|
order: 160,
|
||||||
dicUrl: '/blade-transport/customer-archive/list?current=1&size=9999&approvalStatus=approved',
|
dicUrl:
|
||||||
|
'/blade-transport/customer-archive/list?current=1&size=9999&customerType=客户&approvalStatus=approved&status=1',
|
||||||
dicFormatter: listDicFormatter,
|
dicFormatter: listDicFormatter,
|
||||||
props: {
|
props: {
|
||||||
label: 'fullName',
|
label: 'fullName',
|
||||||
@@ -256,7 +291,8 @@ export const option = createCrudOption([
|
|||||||
prop: 'partyB',
|
prop: 'partyB',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
order: 150,
|
order: 150,
|
||||||
dicUrl: '/blade-transport/customer-archive/list?current=1&size=9999&approvalStatus=approved',
|
dicUrl:
|
||||||
|
'/blade-transport/customer-archive/list?current=1&size=9999&customerType=承运商&approvalStatus=approved&status=1',
|
||||||
dicFormatter: listDicFormatter,
|
dicFormatter: listDicFormatter,
|
||||||
props: {
|
props: {
|
||||||
label: 'fullName',
|
label: 'fullName',
|
||||||
@@ -334,14 +370,14 @@ export const option = createCrudOption([
|
|||||||
rules: [{ required: true, message: '请选择签订日期', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择签订日期', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '结算方式',
|
label: '结算类型',
|
||||||
prop: 'settlementMode',
|
prop: 'settlementMode',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: settlementModeOptions,
|
dicData: contractSettlementModeOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
order: 90,
|
order: 90,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
rules: selectRule('结算方式'),
|
rules: selectRule('结算类型'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '合同格式',
|
label: '合同格式',
|
||||||
@@ -392,7 +428,7 @@ export const option = createCrudOption([
|
|||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
minWidth: 160,
|
minWidth: 190,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
@@ -402,6 +438,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 2,
|
searchOrder: 2,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
slot: true,
|
slot: true,
|
||||||
dicData: contractStageOptions,
|
dicData: contractStageOptions,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
@@ -414,6 +451,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 4,
|
searchOrder: 4,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
slot: true,
|
slot: true,
|
||||||
dicData: contractApprovalStatusOptions,
|
dicData: contractApprovalStatusOptions,
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
@@ -572,3 +610,6 @@ export const option = createCrudOption([
|
|||||||
|
|
||||||
option.span = 8;
|
option.span = 8;
|
||||||
option.dialogWidth = 1480;
|
option.dialogWidth = 1480;
|
||||||
|
option.dialogTop = '10px';
|
||||||
|
option.dialogCloseBtn = true;
|
||||||
|
option.menuWidth = 320;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const config = {
|
|||||||
permission: 'process_config',
|
permission: 'process_config',
|
||||||
exportUrl: '/blade-transport/process-config/export-process-config',
|
exportUrl: '/blade-transport/process-config/export-process-config',
|
||||||
exportName: '过程配置',
|
exportName: '过程配置',
|
||||||
enableAllDept: false,
|
enableAllDept: true,
|
||||||
actions: ['copy', 'enable', 'disable'],
|
actions: ['copy', 'enable', 'disable'],
|
||||||
statusProp: 'status',
|
statusProp: 'status',
|
||||||
statusTextProp: 'statusName',
|
statusTextProp: 'statusName',
|
||||||
@@ -29,21 +29,13 @@ export const option = applyTableMenuWidth({
|
|||||||
span: 24,
|
span: 24,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '配置编号',
|
|
||||||
prop: 'configCode',
|
|
||||||
search: true,
|
|
||||||
searchOrder: 4,
|
|
||||||
minWidth: 130,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
editDisabled: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '配置名称',
|
label: '配置名称',
|
||||||
prop: 'configName',
|
prop: 'configName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 6,
|
||||||
|
searchSpan: 6,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
span: 12,
|
span: 12,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -51,13 +43,16 @@ export const option = applyTableMenuWidth({
|
|||||||
rules: textRule('配置名称', 100, true),
|
rules: textRule('配置名称', 100, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目ID集合',
|
label: '配置编号',
|
||||||
prop: 'projectIds',
|
prop: 'configCode',
|
||||||
hide: true,
|
search: true,
|
||||||
display: false,
|
searchOrder: 4,
|
||||||
|
searchSpan: 6,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
minWidth: 130,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
rules: textRule('项目ID集合', 1000, true),
|
editDisabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目',
|
label: '项目',
|
||||||
@@ -65,7 +60,9 @@ export const option = applyTableMenuWidth({
|
|||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 5,
|
||||||
searchType: 'select',
|
searchType: 'input',
|
||||||
|
searchSpan: 6,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
minRows: 2,
|
minRows: 2,
|
||||||
span: 12,
|
span: 12,
|
||||||
@@ -77,53 +74,98 @@ export const option = applyTableMenuWidth({
|
|||||||
rules: textRule('项目', 1000, true),
|
rules: textRule('项目', 1000, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '',
|
label: '过程节点',
|
||||||
searchLabel: '包含过程节点',
|
|
||||||
prop: 'includedNodes',
|
prop: 'includedNodes',
|
||||||
search: true,
|
|
||||||
searchOrder: 3,
|
|
||||||
type: 'select',
|
type: 'select',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
dicData: nodeOptions,
|
dicData: nodeOptions,
|
||||||
minWidth: 180,
|
minWidth: 260,
|
||||||
formslot: true,
|
overHidden: false,
|
||||||
span: 24,
|
slot: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
rules: selectRule('包含过程节点'),
|
rules: selectRule('过程节点'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '默认完成运输天数',
|
label: '默认运输完成天数',
|
||||||
prop: 'defaultFinishDays',
|
prop: 'defaultFinishDays',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
type: 'number',
|
type: 'number',
|
||||||
min: 1,
|
min: 0,
|
||||||
max: 999,
|
max: 999,
|
||||||
span: 12,
|
span: 12,
|
||||||
|
minWidth: 170,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark',
|
||||||
|
type: 'textarea',
|
||||||
|
minRows: 4,
|
||||||
|
span: 24,
|
||||||
|
minWidth: 180,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
maxlength: 500,
|
||||||
|
showWordLimit: true,
|
||||||
|
rules: textRule('备注', 500),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织',
|
||||||
|
prop: 'deptName',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
...auditColumns
|
||||||
|
.filter(column => ['updateTime', 'createTime'].includes(column.prop))
|
||||||
|
.map(column => ({ ...column, minWidth: 190 }))
|
||||||
|
.sort(
|
||||||
|
(first, second) =>
|
||||||
|
['updateTime', 'createTime'].indexOf(first.prop) -
|
||||||
|
['updateTime', 'createTime'].indexOf(second.prop)
|
||||||
|
),
|
||||||
|
{
|
||||||
|
label: '项目ID集合',
|
||||||
|
prop: 'projectIds',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
rules: textRule('项目ID集合', 1000, true),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 1,
|
searchOrder: 1,
|
||||||
|
searchSpan: 6,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
dicData: processStatusOptions,
|
dicData: processStatusOptions,
|
||||||
slot: true,
|
slot: true,
|
||||||
minWidth: 100,
|
hide: true,
|
||||||
|
fixed: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '组织',
|
label: '组织',
|
||||||
prop: 'deptName',
|
prop: 'searchDeptId',
|
||||||
|
searchProp: 'deptId',
|
||||||
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 2,
|
searchOrder: 2,
|
||||||
minWidth: 150,
|
searchSpan: 6,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
dicData: [],
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '',
|
label: '',
|
||||||
@@ -132,23 +174,9 @@ export const option = applyTableMenuWidth({
|
|||||||
span: 24,
|
span: 24,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '备注',
|
|
||||||
prop: 'remark',
|
|
||||||
type: 'textarea',
|
|
||||||
minRows: 4,
|
|
||||||
span: 24,
|
|
||||||
hide: true,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
maxlength: 500,
|
|
||||||
showWordLimit: true,
|
|
||||||
rules: textRule('备注', 500),
|
|
||||||
},
|
|
||||||
...auditColumns,
|
|
||||||
]),
|
]),
|
||||||
|
saveBtnText: '保存',
|
||||||
|
updateBtnText: '保存',
|
||||||
dialogTop: '10px',
|
dialogTop: '10px',
|
||||||
dialogWidth: '96%',
|
dialogWidth: '96%',
|
||||||
dialogCustomClass: 'process-config-dialog',
|
|
||||||
searchSpan: 8,
|
|
||||||
}, 5);
|
}, 5);
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ const userDicFormatter = res => {
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const formatUserRealName = (row, role) =>
|
||||||
|
row[`${role}RealName`] ||
|
||||||
|
row[`${role}UserRealName`] ||
|
||||||
|
row[`${role}User`]?.realName ||
|
||||||
|
row[role]?.realName ||
|
||||||
|
row[`${role}UserName`] ||
|
||||||
|
'';
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
title: '项目管理',
|
title: '项目管理',
|
||||||
permission: 'project_apply',
|
permission: 'project_apply',
|
||||||
@@ -94,8 +102,9 @@ export const option = createCrudOption([
|
|||||||
label: '立项申请单号',
|
label: '立项申请单号',
|
||||||
prop: 'applyNo',
|
prop: 'applyNo',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
searchOrder: 7,
|
searchOrder: 7,
|
||||||
minWidth: 160,
|
minWidth: 220,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
},
|
},
|
||||||
@@ -110,6 +119,7 @@ export const option = createCrudOption([
|
|||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
prop: 'projectName',
|
prop: 'projectName',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
searchOrder: 6,
|
searchOrder: 6,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
maxlength: 50,
|
maxlength: 50,
|
||||||
@@ -128,6 +138,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
dicData: projectTypeOptions,
|
dicData: projectTypeOptions,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
@@ -156,7 +167,7 @@ export const option = createCrudOption([
|
|||||||
label: '承办部门',
|
label: '承办部门',
|
||||||
prop: 'undertakeDeptName',
|
prop: 'undertakeDeptName',
|
||||||
search: true,
|
search: true,
|
||||||
searchLabel: '承办单位',
|
searchPlaceholder: '请输入',
|
||||||
searchOrder: 5,
|
searchOrder: 5,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('承办部门', 50, true),
|
rules: textRule('承办部门', 50, true),
|
||||||
@@ -170,6 +181,7 @@ export const option = createCrudOption([
|
|||||||
label: '项目负责人',
|
label: '项目负责人',
|
||||||
prop: 'principalUserName',
|
prop: 'principalUserName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
|
formatter: row => formatUserRealName(row, 'principal'),
|
||||||
rules: textRule('项目负责人', 50, true),
|
rules: textRule('项目负责人', 50, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -177,6 +189,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'principalUserId',
|
prop: 'principalUserId',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 4,
|
searchOrder: 4,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicUrl: '/blade-system/user/user-list',
|
dicUrl: '/blade-system/user/user-list',
|
||||||
@@ -193,6 +206,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'handlerUserName',
|
prop: 'handlerUserName',
|
||||||
hide: true,
|
hide: true,
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
|
formatter: row => formatUserRealName(row, 'handler'),
|
||||||
rules: textRule('项目经办人', 50, true),
|
rules: textRule('项目经办人', 50, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -336,6 +350,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'approvalStatus',
|
prop: 'approvalStatus',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 2,
|
searchOrder: 2,
|
||||||
slot: true,
|
slot: true,
|
||||||
dicData: projectApprovalStatusOptions,
|
dicData: projectApprovalStatusOptions,
|
||||||
@@ -362,6 +377,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'effectiveType',
|
prop: 'effectiveType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 1,
|
searchOrder: 1,
|
||||||
dicData: effectiveTypeOptions,
|
dicData: effectiveTypeOptions,
|
||||||
value: 'temporary',
|
value: 'temporary',
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ export const config = {
|
|||||||
exportName: '临时额度申请',
|
exportName: '临时额度申请',
|
||||||
enableAllDept: false,
|
enableAllDept: false,
|
||||||
enableProjectSelect: true,
|
enableProjectSelect: true,
|
||||||
|
projectQueryParams: {
|
||||||
|
temporaryCreditLimitSelectable: true,
|
||||||
|
},
|
||||||
enableAttachmentTable: true,
|
enableAttachmentTable: true,
|
||||||
enableDraftSave: true,
|
enableDraftSave: true,
|
||||||
saveAsDraft: true,
|
saveAsDraft: true,
|
||||||
@@ -108,6 +111,7 @@ export const option = {
|
|||||||
value: 'projectName',
|
value: 'projectName',
|
||||||
},
|
},
|
||||||
filterable: true,
|
filterable: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
rules: textRule('项目名称', 100, true),
|
rules: textRule('项目名称', 100, true),
|
||||||
},
|
},
|
||||||
@@ -122,14 +126,16 @@ export const option = {
|
|||||||
prop: 'projectCode',
|
prop: 'projectCode',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('项目编号', 50, true),
|
rules: textRule('项目编号', 50),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '承办部门',
|
label: '承办部门',
|
||||||
prop: 'undertakeDeptName',
|
prop: 'undertakeDeptName',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('承办部门', 50, true),
|
rules: textRule('承办部门', 50, true),
|
||||||
},
|
},
|
||||||
@@ -138,6 +144,7 @@ export const option = {
|
|||||||
prop: 'projectFundLimit',
|
prop: 'projectFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
rules: [nonNegativeRule('项目资金使用额度')],
|
rules: [nonNegativeRule('项目资金使用额度')],
|
||||||
},
|
},
|
||||||
@@ -146,6 +153,7 @@ export const option = {
|
|||||||
prop: 'usedFundLimit',
|
prop: 'usedFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
value: 0,
|
value: 0,
|
||||||
rules: [nonNegativeRule('已使用项目资金额度')],
|
rules: [nonNegativeRule('已使用项目资金额度')],
|
||||||
@@ -155,6 +163,7 @@ export const option = {
|
|||||||
prop: 'remainingFundLimit',
|
prop: 'remainingFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
value: 0,
|
value: 0,
|
||||||
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
||||||
@@ -163,6 +172,7 @@ export const option = {
|
|||||||
label: '申请临时额度(万元)',
|
label: '申请临时额度(万元)',
|
||||||
prop: 'applyLimit',
|
prop: 'applyLimit',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
|
span: 12,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入申请临时额度', trigger: 'blur' },
|
{ required: true, message: '请输入申请临时额度', trigger: 'blur' },
|
||||||
@@ -175,6 +185,7 @@ export const option = {
|
|||||||
type: 'date',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
span: 12,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
rules: [{ required: true, message: '请选择申请有效期至', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择申请有效期至', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
@@ -260,6 +271,6 @@ export const option = {
|
|||||||
},
|
},
|
||||||
...auditColumns.map(column => ({ ...column, hide: true })),
|
...auditColumns.map(column => ({ ...column, hide: true })),
|
||||||
]),
|
]),
|
||||||
dialogWidth: 1480,
|
dialogWidth: 1010,
|
||||||
index: false,
|
index: false,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,23 +14,30 @@ export const option = {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
viewBtn: false,
|
viewBtn: false,
|
||||||
menuWidth: 160,
|
menuWidth: 220,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
{ label: '船舶名', prop: 'shipName', search: true, searchOrder: 5, slot: true, width: 130 },
|
{
|
||||||
|
label: '船舶名',
|
||||||
|
prop: 'shipName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 5,
|
||||||
|
slot: true,
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '船舶识别号',
|
label: '船舶识别号',
|
||||||
prop: 'shipIdentifierNo',
|
prop: 'shipIdentifierNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 4,
|
searchOrder: 4,
|
||||||
width: 140,
|
minWidth: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '船检登记号',
|
label: '船检登记号',
|
||||||
prop: 'shipInspectionNo',
|
prop: 'shipInspectionNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
width: 130,
|
minWidth: 130,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '船舶类型',
|
label: '船舶类型',
|
||||||
@@ -44,7 +51,7 @@ export const option = {
|
|||||||
{ label: '杂货船', value: '杂货船' },
|
{ label: '杂货船', value: '杂货船' },
|
||||||
{ label: '油船', value: '油船' },
|
{ label: '油船', value: '油船' },
|
||||||
],
|
],
|
||||||
width: 110,
|
minWidth: 110,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -55,7 +62,7 @@ export const option = {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
width: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
@@ -66,30 +73,36 @@ export const option = {
|
|||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: 1 },
|
||||||
{ label: '停用', value: 2 },
|
{ label: '停用', value: 2 },
|
||||||
],
|
],
|
||||||
width: 90,
|
minWidth: 90,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '国籍证有效期至',
|
label: '国籍证有效期至',
|
||||||
prop: 'nationalityCertEndDate',
|
prop: 'nationalityCertEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 150,
|
minWidth: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '最低安全配员证书有效期至',
|
label: '最低安全配员证书有效期至',
|
||||||
prop: 'safeManningCertEndDate',
|
prop: 'safeManningCertEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 210,
|
minWidth: 210,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '营业运输证有效期至',
|
label: '营业运输证有效期至',
|
||||||
prop: 'businessTransportCertEndDate',
|
prop: 'businessTransportCertEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 170,
|
minWidth: 170,
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '承租有效期至',
|
||||||
|
prop: 'leaseEndDate',
|
||||||
|
slot: true,
|
||||||
|
minWidth: 140,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{ label: '承租有效期至', prop: 'leaseEndDate', slot: true, width: 140, align: 'center' },
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export const option = {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
viewBtn: false,
|
viewBtn: false,
|
||||||
menuWidth: 160,
|
menuWidth: 220,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
@@ -23,7 +23,7 @@ export const option = {
|
|||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 5,
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属组织',
|
label: '所属组织',
|
||||||
@@ -33,7 +33,7 @@ export const option = {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
width: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '业务关系',
|
label: '业务关系',
|
||||||
@@ -47,7 +47,7 @@ export const option = {
|
|||||||
{ label: '管理挂靠', value: '管理挂靠' },
|
{ label: '管理挂靠', value: '管理挂靠' },
|
||||||
{ label: '业务合作', value: '业务合作' },
|
{ label: '业务合作', value: '业务合作' },
|
||||||
],
|
],
|
||||||
width: 120,
|
minWidth: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -65,13 +65,13 @@ export const option = {
|
|||||||
{ label: '拖挂车', value: '拖挂' },
|
{ label: '拖挂车', value: '拖挂' },
|
||||||
{ label: '半挂车', value: '半挂' },
|
{ label: '半挂车', value: '半挂' },
|
||||||
],
|
],
|
||||||
width: 110,
|
minWidth: 110,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '核定载质量(KG)',
|
label: '核定载质量(KG)',
|
||||||
prop: 'approvedLoadKg',
|
prop: 'approvedLoadKg',
|
||||||
width: 140,
|
minWidth: 140,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -85,28 +85,28 @@ export const option = {
|
|||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: 1 },
|
||||||
{ label: '停用', value: 2 },
|
{ label: '停用', value: 2 },
|
||||||
],
|
],
|
||||||
width: 90,
|
minWidth: 90,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '行驶证有效期',
|
label: '行驶证有效期',
|
||||||
prop: 'drivingLicenseEndDate',
|
prop: 'drivingLicenseEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 140,
|
minWidth: 140,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '道路运输证有效期',
|
label: '道路运输证有效期',
|
||||||
prop: 'roadTransportCertEndDate',
|
prop: 'roadTransportCertEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 160,
|
minWidth: 160,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '年审有效期',
|
label: '年审有效期',
|
||||||
prop: 'annualReviewEndDate',
|
prop: 'annualReviewEndDate',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 130,
|
minWidth: 130,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -364,6 +364,19 @@
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 统一 CRUD 顶部新增按钮为蓝底白字,保留其他工具按钮的描边样式
|
||||||
|
.avue-crud__header .el-button--primary.is-plain:has(.el-icon-plus) {
|
||||||
|
--el-button-bg-color: #409eff;
|
||||||
|
--el-button-border-color: #409eff;
|
||||||
|
--el-button-hover-bg-color: #66b1ff;
|
||||||
|
--el-button-hover-border-color: #66b1ff;
|
||||||
|
--el-button-active-bg-color: #337ecc;
|
||||||
|
--el-button-active-border-color: #337ecc;
|
||||||
|
--el-button-text-color: #fff;
|
||||||
|
--el-button-hover-text-color: #fff;
|
||||||
|
--el-button-active-text-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
// 统一分页为按钮样式并靠右展示
|
// 统一分页为按钮样式并靠右展示
|
||||||
.avue-crud__pagination,
|
.avue-crud__pagination,
|
||||||
.empty-pagination {
|
.empty-pagination {
|
||||||
@@ -536,16 +549,24 @@
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 全站统一:操作列最多一行展示 4 个按钮,第 5 个开始自动换行
|
// 全站统一:Avue 操作列文字链接保持间距并支持自动换行
|
||||||
.avue-crud .el-table td .cell.avue-crud__menu {
|
.avue-crud .avue-crud__menu {
|
||||||
display: inline-grid;
|
display: inline-flex !important;
|
||||||
grid-template-columns: repeat(4, max-content);
|
flex-wrap: wrap;
|
||||||
gap: 4px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全站统一:手写表格操作列中的文字链接保持间距并支持自动换行
|
||||||
|
.el-table .el-table__body .cell:not(.avue-crud__menu):has(> .el-link) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.avue-crud__menu > .el-button,
|
.avue-crud__menu > .el-button,
|
||||||
.avue-crud__menu > .el-dropdown {
|
.avue-crud__menu > .el-dropdown {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -47,7 +47,12 @@ const decorateFailExcel = async (blob, businessName, failDetailDecorator) => {
|
|||||||
*/
|
*/
|
||||||
export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
|
export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
|
||||||
const { failDetailDecorator } = options;
|
const { failDetailDecorator } = options;
|
||||||
const column = vm.findColumn(vm.excelOption.column, 'excelFile');
|
const excelOption = vm.excelOption || vm.excelOptionConfig;
|
||||||
|
const column = vm.findColumn(excelOption?.column || [], 'excelFile');
|
||||||
|
if (!column) {
|
||||||
|
vm.$message.error('导入配置异常,请稍后重试');
|
||||||
|
return;
|
||||||
|
}
|
||||||
column.httpRequest = (option, uploadColumn) =>
|
column.httpRequest = (option, uploadColumn) =>
|
||||||
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, { failDetailDecorator });
|
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, { failDetailDecorator });
|
||||||
vm.excelBox = true;
|
vm.excelBox = true;
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export default {
|
|||||||
viewBtn: true,
|
viewBtn: true,
|
||||||
labelWidth: 'auto',
|
labelWidth: 'auto',
|
||||||
searchLabelWidth: 160,
|
searchLabelWidth: 160,
|
||||||
menuWidth: 160,
|
menuWidth: 320,
|
||||||
dialogWidth: 600,
|
dialogWidth: 600,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
@@ -466,7 +466,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
rowSave(row, done, loading) {
|
rowSave(row, done, loading) {
|
||||||
add(row).then(
|
add(this.withTenantId(row)).then(
|
||||||
() => {
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -482,7 +482,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
rowUpdate(row, index, done, loading) {
|
rowUpdate(row, index, done, loading) {
|
||||||
update(row).then(
|
update(this.withTenantId(row)).then(
|
||||||
() => {
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -497,6 +497,12 @@ export default {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
withTenantId(row) {
|
||||||
|
return {
|
||||||
|
...row,
|
||||||
|
tenantId: row.tenantId || this.userInfo.tenantId || website.tenantId,
|
||||||
|
};
|
||||||
|
},
|
||||||
rowDel(row) {
|
rowDel(row) {
|
||||||
this.$confirm('确定将选择数据删除?', {
|
this.$confirm('确定将选择数据删除?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
@@ -366,15 +366,6 @@ export default {
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '行政区划编号',
|
|
||||||
prop: 'regionCode',
|
|
||||||
minWidth: 160,
|
|
||||||
overHidden: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
rules: [{ max: 32, message: '行政区划编码不能超过32字', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '详细地址',
|
label: '详细地址',
|
||||||
prop: 'detailAddress',
|
prop: 'detailAddress',
|
||||||
@@ -409,6 +400,15 @@ export default {
|
|||||||
{ validator: validateLatitude, trigger: 'blur' },
|
{ validator: validateLatitude, trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '行政区划编号',
|
||||||
|
prop: 'regionCode',
|
||||||
|
minWidth: 160,
|
||||||
|
overHidden: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
rules: [{ max: 32, message: '行政区划编码不能超过32字', trigger: 'blur' }],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '数据来源',
|
label: '数据来源',
|
||||||
prop: 'dataSource',
|
prop: 'dataSource',
|
||||||
@@ -425,23 +425,6 @@ export default {
|
|||||||
{ label: '手动录入', value: '手动录入' },
|
{ label: '手动录入', value: '手动录入' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '启停状态',
|
|
||||||
prop: 'status',
|
|
||||||
type: 'select',
|
|
||||||
search: true,
|
|
||||||
slot: true,
|
|
||||||
dataType: 'number',
|
|
||||||
minWidth: 110,
|
|
||||||
overHidden: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
dicData: [
|
|
||||||
{ label: '全部', value: '' },
|
|
||||||
{ label: '启用', value: 1 },
|
|
||||||
{ label: '停用', value: 2 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@@ -483,6 +466,23 @@ export default {
|
|||||||
display: false,
|
display: false,
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '启停状态',
|
||||||
|
prop: 'status',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
slot: true,
|
||||||
|
dataType: 'number',
|
||||||
|
minWidth: 110,
|
||||||
|
overHidden: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '启用', value: 1 },
|
||||||
|
{ label: '停用', value: 2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
excelOption: {
|
excelOption: {
|
||||||
@@ -869,17 +869,12 @@ export default {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
exportBlob(
|
exportBlob('/blade-system/airport-master/export-airport-master', this.buildExportParams(), {
|
||||||
'/blade-system/airport-master/export-airport-master',
|
feedback: true,
|
||||||
this.buildExportParams(),
|
})
|
||||||
{ feedback: true }
|
|
||||||
)
|
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
const blob = await addExcelRequiredHeaderMarks(res.data);
|
const blob = await addExcelRequiredHeaderMarks(res.data);
|
||||||
downloadXls(
|
downloadXls(blob, `空港机场主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||||
blob,
|
|
||||||
`空港机场主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
:table-loading="loading"
|
:table-loading="loading"
|
||||||
:data="data"
|
:data="data"
|
||||||
v-model:page="page"
|
v-model:page="page"
|
||||||
v-model:form="form"
|
v-model="form"
|
||||||
ref="crud"
|
ref="crud"
|
||||||
:permission="permissionList"
|
:permission="permissionList"
|
||||||
:before-open="beforeOpen"
|
:before-open="beforeOpen"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
>
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<el-button type="primary" v-if="permission.cargo_type_add" @click="$refs.crud.rowAdd()">
|
<el-button type="primary" v-if="permission.cargo_type_add" @click="$refs.crud.rowAdd()">
|
||||||
<el-icon class="el-icon--left"><Plus /></el-icon>新增
|
<el-icon class="el-icon--left"><Plus /></el-icon>新建货物类型
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" plain v-if="permission.cargo_type_import" @click="handleImport"
|
<el-button type="primary" plain v-if="permission.cargo_type_import" @click="handleImport"
|
||||||
><el-icon class="el-icon--left"><Upload /></el-icon>批量导入</el-button
|
><el-icon class="el-icon--left"><Upload /></el-icon>批量导入</el-button
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
:remote-method="loadParentOptions"
|
:remote-method="loadParentOptions"
|
||||||
:loading="parentLoading"
|
:loading="parentLoading"
|
||||||
:disabled="dialogType === 'view' || form.typeLevel !== 2"
|
:disabled="dialogType === 'view' || form.typeLevel !== 2"
|
||||||
placeholder="请输入名称或编码搜索"
|
placeholder="请输入"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleParentChange"
|
@change="handleParentChange"
|
||||||
>
|
>
|
||||||
@@ -348,6 +348,11 @@ export default {
|
|||||||
const parent = this.parentOptions.find(item => String(item.id) === String(value));
|
const parent = this.parentOptions.find(item => String(item.id) === String(value));
|
||||||
this.form.parentCargoName = parent ? parent.cargoName : '';
|
this.form.parentCargoName = parent ? parent.cargoName : '';
|
||||||
this.form.parentCargoCode = parent ? parent.cargoCode || parent.code || '' : '';
|
this.form.parentCargoCode = parent ? parent.cargoCode || parent.code || '' : '';
|
||||||
|
if (parent) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.crud?.clearValidate?.(['parentId', 'parentCargoCode']);
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
this.form.cargoCode = '';
|
this.form.cargoCode = '';
|
||||||
return;
|
return;
|
||||||
@@ -540,7 +545,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
buildExportParams() {
|
buildExportParams() {
|
||||||
return { ...this.query };
|
return {
|
||||||
|
...this.query,
|
||||||
|
...(this.ids ? { ids: this.ids } : {}),
|
||||||
|
};
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.$confirm('是否导出货物类型数据?', '提示', {
|
this.$confirm('是否导出货物类型数据?', '提示', {
|
||||||
@@ -564,16 +572,9 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTemplate() {
|
handleTemplate() {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
// 直接下载工程内置的标准导入模板(public 目录静态资源),表头与可正常导入的模板一致,
|
exportBlob('/blade-system/cargo-type/export-template', {}, { feedback: true })
|
||||||
// 含一级(19 类)及全部二级示例,便于用户参照填写层级关系与编码规则
|
|
||||||
const templateUrl = `${import.meta.env.BASE_URL}cargo-type-import-template.xlsx`;
|
|
||||||
fetch(templateUrl)
|
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (!res.ok) throw new Error('模板文件不存在');
|
downloadXls(res.data, '货物类型导入模板.xlsx');
|
||||||
return res.blob();
|
|
||||||
})
|
|
||||||
.then(blob => {
|
|
||||||
downloadXls(blob, '货物类型导入模板.xlsx');
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message.error('模板下载失败,请稍后重试');
|
this.$message.error('模板下载失败,请稍后重试');
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('common_address_add')"
|
v-if="hasPermission('common_address_add')"
|
||||||
@click="$refs.crud.rowAdd()"
|
@click="$refs.crud.rowAdd()"
|
||||||
>新增
|
>新建常用地址
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -188,7 +187,6 @@
|
|||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.detailAddress"
|
v-model="form.detailAddress"
|
||||||
readonly
|
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
placeholder="点击后弹出地图组件"
|
placeholder="点击后弹出地图组件"
|
||||||
suffix-icon="el-icon-location"
|
suffix-icon="el-icon-location"
|
||||||
@@ -389,10 +387,96 @@ export default {
|
|||||||
column.rules = rules;
|
column.rules = rules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setColumnSpan(prop, span) {
|
||||||
|
const column = this.findColumn(this.option.column, prop);
|
||||||
|
if (column) {
|
||||||
|
column.span = span;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setColumnRow(prop, row) {
|
||||||
|
const column = this.findColumn(this.option.column, prop);
|
||||||
|
if (column) {
|
||||||
|
column.row = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setColumnOrder(prop, order) {
|
||||||
|
const column = this.findColumn(this.option.column, prop);
|
||||||
|
if (column) {
|
||||||
|
column.order = order;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
syncSourceFormLayout(addressType) {
|
||||||
|
const isPortTerminal = addressType === '港口/码头';
|
||||||
|
const isRailwayStation = addressType === '铁路车站';
|
||||||
|
const isAirport = addressType === '空港机场';
|
||||||
|
const isRegularAddress = addressType === '常规地址';
|
||||||
|
this.setColumnSpan(
|
||||||
|
'addressName',
|
||||||
|
isRegularAddress || isPortTerminal || isRailwayStation || isAirport ? 12 : 24
|
||||||
|
);
|
||||||
|
this.setColumnRow('addressName', true);
|
||||||
|
this.setColumnSpan('stationId', isRailwayStation ? 12 : 24);
|
||||||
|
this.setColumnSpan('airportId', isAirport ? 12 : 24);
|
||||||
|
this.setColumnRow('stationId', isRailwayStation);
|
||||||
|
this.setColumnRow('airportId', isAirport);
|
||||||
|
const formOrders = {
|
||||||
|
addressType: 100,
|
||||||
|
addressName: 70,
|
||||||
|
contactName: 60,
|
||||||
|
contactPhone: 50,
|
||||||
|
detailAddress: 40,
|
||||||
|
remark: 30,
|
||||||
|
};
|
||||||
|
if (isPortTerminal) {
|
||||||
|
Object.assign(formOrders, {
|
||||||
|
addressType: 80,
|
||||||
|
portId: 70,
|
||||||
|
terminalId: 60,
|
||||||
|
addressName: 50,
|
||||||
|
contactName: 40,
|
||||||
|
contactPhone: 30,
|
||||||
|
detailAddress: 20,
|
||||||
|
remark: 10,
|
||||||
|
});
|
||||||
|
} else if (isRailwayStation) {
|
||||||
|
Object.assign(formOrders, {
|
||||||
|
addressType: 80,
|
||||||
|
stationId: 70,
|
||||||
|
addressName: 60,
|
||||||
|
contactName: 50,
|
||||||
|
contactPhone: 40,
|
||||||
|
detailAddress: 30,
|
||||||
|
remark: 20,
|
||||||
|
});
|
||||||
|
} else if (isAirport) {
|
||||||
|
Object.assign(formOrders, {
|
||||||
|
addressType: 80,
|
||||||
|
airportId: 70,
|
||||||
|
addressName: 60,
|
||||||
|
contactName: 50,
|
||||||
|
contactPhone: 40,
|
||||||
|
detailAddress: 30,
|
||||||
|
remark: 20,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
[
|
||||||
|
'addressType',
|
||||||
|
'portId',
|
||||||
|
'terminalId',
|
||||||
|
'stationId',
|
||||||
|
'airportId',
|
||||||
|
'addressName',
|
||||||
|
'contactName',
|
||||||
|
'contactPhone',
|
||||||
|
'detailAddress',
|
||||||
|
'remark',
|
||||||
|
].forEach(prop => this.setColumnOrder(prop, formOrders[prop]));
|
||||||
|
},
|
||||||
syncSourceColumnDisplay(addressType) {
|
syncSourceColumnDisplay(addressType) {
|
||||||
const isPortTerminal = addressType === '港口/码头';
|
const isPortTerminal = addressType === '港口/码头';
|
||||||
const isRailwayStation = addressType === '铁路车站';
|
const isRailwayStation = addressType === '铁路车站';
|
||||||
const isAirport = addressType === '空港机场';
|
const isAirport = addressType === '空港机场';
|
||||||
|
this.syncSourceFormLayout(addressType);
|
||||||
this.setColumnDisplay('portId', isPortTerminal);
|
this.setColumnDisplay('portId', isPortTerminal);
|
||||||
this.setColumnDisplay('terminalId', isPortTerminal);
|
this.setColumnDisplay('terminalId', isPortTerminal);
|
||||||
this.setColumnDisplay('stationId', isRailwayStation);
|
this.setColumnDisplay('stationId', isRailwayStation);
|
||||||
@@ -1183,6 +1267,17 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.common-address-page :deep(.avue-crud__dialog .avue-form__row),
|
||||||
|
.common-address-page :deep(.avue-crud__dialog .el-row) {
|
||||||
|
margin-right: -16px;
|
||||||
|
margin-left: -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.common-address-page :deep(.avue-crud__dialog .el-col) {
|
||||||
|
padding-right: 16px;
|
||||||
|
padding-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.common-address-page {
|
.common-address-page {
|
||||||
&__map-address {
|
&__map-address {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -229,7 +229,15 @@ import 'nprogress/nprogress.css';
|
|||||||
|
|
||||||
const DEFAULT_COUNTRY_CODE = '+86';
|
const DEFAULT_COUNTRY_CODE = '+86';
|
||||||
const EXCLUDED_EXCEL_HEADERS = ['数据来源', '启停状态'];
|
const EXCLUDED_EXCEL_HEADERS = ['数据来源', '启停状态'];
|
||||||
const REQUIRED_EXPORT_HEADERS = ['港口码头名称', '港口/码头名称', '类型', '国家', '城市', '经度', '纬度'];
|
const REQUIRED_EXPORT_HEADERS = [
|
||||||
|
'港口码头名称',
|
||||||
|
'港口/码头名称',
|
||||||
|
'类型',
|
||||||
|
'国家',
|
||||||
|
'城市',
|
||||||
|
'经度',
|
||||||
|
'纬度',
|
||||||
|
];
|
||||||
|
|
||||||
const getExcelCellText = value => {
|
const getExcelCellText = value => {
|
||||||
if (value === undefined || value === null) return '';
|
if (value === undefined || value === null) return '';
|
||||||
@@ -256,9 +264,7 @@ const removeWorkbookColumnsByHeaders = workbook => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (indexes.length) {
|
if (indexes.length) {
|
||||||
indexes
|
indexes.sort((a, b) => b - a).forEach(colNumber => worksheet.spliceColumns(colNumber, 1));
|
||||||
.sort((a, b) => b - a)
|
|
||||||
.forEach(colNumber => worksheet.spliceColumns(colNumber, 1));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -383,13 +389,42 @@ export default {
|
|||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 160,
|
menuWidth: 160,
|
||||||
column: [
|
column: [
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'code',
|
||||||
|
search: true,
|
||||||
|
formslot: true,
|
||||||
|
width: 140,
|
||||||
|
span: 12,
|
||||||
|
order: 70,
|
||||||
|
placeholder: '请输入编码',
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入编码', trigger: 'blur' },
|
||||||
|
{ validator: validateCode, trigger: 'blur' },
|
||||||
|
],
|
||||||
|
change: ({ value }) => this.handleCodeChange(value),
|
||||||
|
blur: ({ value }) => this.handleCodeChange(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '港口/码头名称',
|
||||||
|
prop: 'name',
|
||||||
|
minWidth: 140,
|
||||||
|
search: true,
|
||||||
|
searchOrder: 7,
|
||||||
|
span: 12,
|
||||||
|
order: 80,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: [{ required: true, message: '请输入港口/码头名称', trigger: 'blur' }],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '类型',
|
||||||
prop: 'category',
|
prop: 'category',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 6,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
|
order: 100,
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '港口', value: '港口' },
|
{ label: '港口', value: '港口' },
|
||||||
@@ -409,6 +444,7 @@ export default {
|
|||||||
dicData: [],
|
dicData: [],
|
||||||
hide: true,
|
hide: true,
|
||||||
span: 12,
|
span: 12,
|
||||||
|
order: 90,
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
rules: [{ required: false, message: '请选择上级港口', trigger: 'change' }],
|
rules: [{ required: false, message: '请选择上级港口', trigger: 'change' }],
|
||||||
change: ({ value }) => this.handleParentChange(value),
|
change: ({ value }) => this.handleParentChange(value),
|
||||||
@@ -416,7 +452,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '上级港口',
|
label: '上级港口',
|
||||||
prop: 'parentName',
|
prop: 'parentName',
|
||||||
minWidth: 120,
|
minWidth: 140,
|
||||||
slot: true,
|
slot: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
@@ -432,39 +468,17 @@ export default {
|
|||||||
placeholder: '自动带出',
|
placeholder: '自动带出',
|
||||||
rules: [{ required: false, message: '请选择上级港口', trigger: 'change' }],
|
rules: [{ required: false, message: '请选择上级港口', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '港口/码头名称',
|
|
||||||
prop: 'name',
|
|
||||||
minWidth: 140,
|
|
||||||
search: true,
|
|
||||||
span: 12,
|
|
||||||
placeholder: '请输入',
|
|
||||||
rules: [{ required: true, message: '请输入港口/码头名称', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '编码',
|
|
||||||
prop: 'code',
|
|
||||||
search: true,
|
|
||||||
formslot: true,
|
|
||||||
width: 140,
|
|
||||||
span: 12,
|
|
||||||
placeholder: '请输入编码',
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '请输入编码', trigger: 'blur' },
|
|
||||||
{ validator: validateCode, trigger: 'blur' },
|
|
||||||
],
|
|
||||||
change: ({ value }) => this.handleCodeChange(value),
|
|
||||||
blur: ({ value }) => this.handleCodeChange(value),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '国家',
|
label: '国家',
|
||||||
prop: 'country',
|
prop: 'country',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 5,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
span: 12,
|
span: 12,
|
||||||
|
order: 60,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
placeholder: '自动带出',
|
placeholder: '自动带出',
|
||||||
@@ -478,6 +492,7 @@ export default {
|
|||||||
formslot: true,
|
formslot: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
span: 12,
|
span: 12,
|
||||||
|
order: 50,
|
||||||
placeholder: '自动带出',
|
placeholder: '自动带出',
|
||||||
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
@@ -486,6 +501,7 @@ export default {
|
|||||||
prop: 'city',
|
prop: 'city',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 4,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -513,14 +529,44 @@ export default {
|
|||||||
prop: 'districtName',
|
prop: 'districtName',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 3,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '行政区划编号',
|
label: '经度',
|
||||||
|
prop: 'longitude',
|
||||||
|
formslot: true,
|
||||||
|
minWidth: 130,
|
||||||
|
span: 12,
|
||||||
|
order: 20,
|
||||||
|
placeholder: '请输入',
|
||||||
|
overHidden: false,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入经度', trigger: 'blur' },
|
||||||
|
{ validator: validateLongitude, trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '纬度',
|
||||||
|
prop: 'latitude',
|
||||||
|
formslot: true,
|
||||||
|
minWidth: 130,
|
||||||
|
span: 12,
|
||||||
|
order: 10,
|
||||||
|
placeholder: '请输入',
|
||||||
|
overHidden: false,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入纬度', trigger: 'blur' },
|
||||||
|
{ validator: validateLatitude, trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '行政区划编码',
|
||||||
prop: 'regionCode',
|
prop: 'regionCode',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
@@ -538,42 +584,18 @@ export default {
|
|||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
|
order: 30,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
maxlength: 255,
|
maxlength: 255,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: [{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' }],
|
rules: [{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '经度',
|
|
||||||
prop: 'longitude',
|
|
||||||
formslot: true,
|
|
||||||
minWidth: 130,
|
|
||||||
span: 12,
|
|
||||||
placeholder: '请输入',
|
|
||||||
overHidden: false,
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '请输入经度', trigger: 'blur' },
|
|
||||||
{ validator: validateLongitude, trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '纬度',
|
|
||||||
prop: 'latitude',
|
|
||||||
formslot: true,
|
|
||||||
minWidth: 130,
|
|
||||||
span: 12,
|
|
||||||
placeholder: '请输入',
|
|
||||||
overHidden: false,
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '请输入纬度', trigger: 'blur' },
|
|
||||||
{ validator: validateLatitude, trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '数据来源',
|
label: '数据来源',
|
||||||
prop: 'dataSource',
|
prop: 'dataSource',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchOrder: 2,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -585,23 +607,6 @@ export default {
|
|||||||
{ label: '手工导入', value: '手工导入' },
|
{ label: '手工导入', value: '手工导入' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '启停状态',
|
|
||||||
prop: 'status',
|
|
||||||
type: 'select',
|
|
||||||
search: true,
|
|
||||||
slot: true,
|
|
||||||
dataType: 'number',
|
|
||||||
minWidth: 110,
|
|
||||||
overHidden: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
dicData: [
|
|
||||||
{ label: '全部', value: '' },
|
|
||||||
{ label: '启用', value: 1 },
|
|
||||||
{ label: '停用', value: 2 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@@ -639,9 +644,26 @@ export default {
|
|||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
display: false,
|
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
prop: 'status',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 1,
|
||||||
|
slot: true,
|
||||||
|
dataType: 'number',
|
||||||
|
minWidth: 110,
|
||||||
|
overHidden: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '启用', value: 1 },
|
||||||
|
{ label: '停用', value: 2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
excelOption: {
|
excelOption: {
|
||||||
@@ -1270,19 +1292,14 @@ export default {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
exportBlob(
|
exportBlob('/blade-system/port-terminal/export-port-terminal', this.buildExportParams(), {
|
||||||
'/blade-system/port-terminal/export-port-terminal',
|
feedback: true,
|
||||||
this.buildExportParams(),
|
})
|
||||||
{ feedback: true }
|
|
||||||
)
|
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
const blob = await removeExcelColumnsByHeaders(res.data, {
|
const blob = await removeExcelColumnsByHeaders(res.data, {
|
||||||
markRequiredHeaders: true,
|
markRequiredHeaders: true,
|
||||||
});
|
});
|
||||||
downloadXls(
|
downloadXls(blob, `港口码头主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||||
blob,
|
|
||||||
`港口码头主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
|
|||||||
@@ -335,15 +335,6 @@ export default {
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '行政区划编号',
|
|
||||||
prop: 'regionCode',
|
|
||||||
minWidth: 160,
|
|
||||||
overHidden: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
rules: [{ max: 32, message: '行政区划编码不能超过32字', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '详细地址',
|
label: '详细地址',
|
||||||
prop: 'detailAddress',
|
prop: 'detailAddress',
|
||||||
@@ -373,20 +364,13 @@ export default {
|
|||||||
rules: [{ validator: validateLatitude, trigger: 'blur' }],
|
rules: [{ validator: validateLatitude, trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '数据来源',
|
label: '行政区划编号',
|
||||||
prop: 'dataSource',
|
prop: 'regionCode',
|
||||||
type: 'select',
|
minWidth: 160,
|
||||||
search: true,
|
|
||||||
minWidth: 120,
|
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
dicData: [
|
rules: [{ max: 32, message: '行政区划编码不能超过32字', trigger: 'blur' }],
|
||||||
{ label: '全部', value: '' },
|
|
||||||
{ label: '初始化导入', value: '初始化导入' },
|
|
||||||
{ label: '批量', value: '批量' },
|
|
||||||
{ label: '手动', value: '手动' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '启停状态',
|
label: '启停状态',
|
||||||
@@ -446,6 +430,22 @@ export default {
|
|||||||
display: false,
|
display: false,
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '数据来源',
|
||||||
|
prop: 'dataSource',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
minWidth: 120,
|
||||||
|
overHidden: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '初始化导入', value: '初始化导入' },
|
||||||
|
{ label: '批量', value: '批量' },
|
||||||
|
{ label: '手动', value: '手动' },
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
excelOption: {
|
excelOption: {
|
||||||
|
|||||||
@@ -11,6 +11,37 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col class="region-page__form-panel" :span="18">
|
<el-col class="region-page__form-panel" :span="18">
|
||||||
<basic-container>
|
<basic-container>
|
||||||
|
<el-form class="region-page__search" :model="searchForm" inline>
|
||||||
|
<el-form-item label="区域编码">
|
||||||
|
<el-input v-model="searchForm.code" clearable placeholder="请输入区域编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="区域名称">
|
||||||
|
<el-input v-model="searchForm.name" clearable placeholder="请输入区域名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="区域层级">
|
||||||
|
<el-select v-model="searchForm.regionLevel" clearable placeholder="请选择区域层级">
|
||||||
|
<el-option label="省份" :value="1" />
|
||||||
|
<el-option label="省市" :value="2" />
|
||||||
|
<el-option label="区县" :value="3" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据来源">
|
||||||
|
<el-select v-model="searchForm.dataSource" clearable placeholder="请选择数据来源">
|
||||||
|
<el-option label="手动录入" value="手动录入" />
|
||||||
|
<el-option label="初始化导入" value="初始化导入" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="启停状态">
|
||||||
|
<el-select v-model="searchForm.status" clearable placeholder="请选择启停状态">
|
||||||
|
<el-option label="启用" :value="1" />
|
||||||
|
<el-option label="停用" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="region-page__search-actions">
|
||||||
|
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button @click="handleSearchReset">清空</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="permission.region_add"
|
v-if="permission.region_add"
|
||||||
@@ -136,14 +167,21 @@ export default {
|
|||||||
treeCode: '',
|
treeCode: '',
|
||||||
treeParentCode: '',
|
treeParentCode: '',
|
||||||
treeData: [],
|
treeData: [],
|
||||||
|
searchForm: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
regionLevel: undefined,
|
||||||
|
dataSource: '',
|
||||||
|
status: undefined,
|
||||||
|
},
|
||||||
parentOptions: [],
|
parentOptions: [],
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
treeOption: {
|
treeOption: {
|
||||||
nodeKey: 'id',
|
nodeKey: 'id',
|
||||||
lazy: true,
|
lazy: true,
|
||||||
treeLoad: function (node, resolve) {
|
treeLoad: (node, resolve) => {
|
||||||
const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
|
const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
|
||||||
getLazyTree(parentCode).then(res => {
|
getLazyTree(parentCode, this.searchForm).then(res => {
|
||||||
resolve(
|
resolve(
|
||||||
res.data.data.map(item => {
|
res.data.data.map(item => {
|
||||||
return {
|
return {
|
||||||
@@ -402,7 +440,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initTree() {
|
initTree() {
|
||||||
this.treeData = [];
|
this.treeData = [];
|
||||||
getLazyTree(this.topCode).then(res => {
|
getLazyTree(this.topCode, this.searchForm).then(res => {
|
||||||
this.treeData = res.data.data.map(item => {
|
this.treeData = res.data.data.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
@@ -411,6 +449,20 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.initTree();
|
||||||
|
this.regionForm = {};
|
||||||
|
},
|
||||||
|
handleSearchReset() {
|
||||||
|
this.searchForm = {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
regionLevel: undefined,
|
||||||
|
dataSource: '',
|
||||||
|
status: undefined,
|
||||||
|
};
|
||||||
|
this.handleSearch();
|
||||||
|
},
|
||||||
nodeClick(data) {
|
nodeClick(data) {
|
||||||
this.setRegionColumnDisplay('code', true);
|
this.setRegionColumnDisplay('code', true);
|
||||||
this.treeCode = data.id;
|
this.treeCode = data.id;
|
||||||
@@ -624,20 +676,18 @@ export default {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
exportBlob(
|
exportBlob(`/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`, {
|
||||||
`/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`,
|
feedback: true,
|
||||||
{ feedback: true }
|
}).then(res => {
|
||||||
).then(res => {
|
|
||||||
downloadXls(res.data, `行政区划数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
downloadXls(res.data, `行政区划数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleTemplate() {
|
handleTemplate() {
|
||||||
exportBlob(
|
exportBlob(`/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`, {
|
||||||
`/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`,
|
feedback: true,
|
||||||
{ feedback: true }
|
}).then(res => {
|
||||||
).then(res => {
|
|
||||||
downloadXls(res.data, '行政区划模板.xlsx');
|
downloadXls(res.data, '行政区划模板.xlsx');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('common_cargo_add')"
|
v-if="hasPermission('common_cargo_add')"
|
||||||
@click="$refs.crud.rowAdd()"
|
@click="$refs.crud.rowAdd()"
|
||||||
>新增
|
>新建常用货物
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -113,7 +112,7 @@
|
|||||||
clearable
|
clearable
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入货物编号"
|
placeholder="请输入"
|
||||||
:disabled="dialogReadonly || dialogType === 'edit'"
|
:disabled="dialogReadonly || dialogType === 'edit'"
|
||||||
@input="handleCargoCodeInput"
|
@input="handleCargoCodeInput"
|
||||||
/>
|
/>
|
||||||
@@ -144,6 +143,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #packageBrand="{ row }">
|
||||||
|
{{ [row.packageType, row.brand].filter(Boolean).join(' / ') || '-' }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -192,6 +195,7 @@
|
|||||||
import * as api from '@/api/business/common-cargo';
|
import * as api from '@/api/business/common-cargo';
|
||||||
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
|
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
|
||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
|
import { getDeptTree } from '@/api/system/dept';
|
||||||
import { config, excelOption, option } from '@/option/business/common-cargo';
|
import { config, excelOption, option } from '@/option/business/common-cargo';
|
||||||
import { priceUnitOptions } from '@/option/business/common';
|
import { priceUnitOptions } from '@/option/business/common';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
@@ -221,6 +225,7 @@ export default {
|
|||||||
secondCargoTypeLoading: false,
|
secondCargoTypeLoading: false,
|
||||||
firstCargoTypeOptions: [],
|
firstCargoTypeOptions: [],
|
||||||
secondCargoTypeOptions: [],
|
secondCargoTypeOptions: [],
|
||||||
|
deptOptions: [],
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [10, 20, 50, 100],
|
pageSizes: [10, 20, 50, 100],
|
||||||
@@ -247,6 +252,9 @@ export default {
|
|||||||
return this.selectionList.map(item => item.id).join(',');
|
return this.selectionList.map(item => item.id).join(',');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.initDeptTree();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
||||||
@@ -256,6 +264,28 @@ export default {
|
|||||||
if (Array.isArray(data)) return data;
|
if (Array.isArray(data)) return data;
|
||||||
return (data && data.records) || [];
|
return (data && data.records) || [];
|
||||||
},
|
},
|
||||||
|
initDeptTree() {
|
||||||
|
getDeptTree(this.userInfo.tenantId).then(res => {
|
||||||
|
this.deptOptions = this.flattenDept(res.data.data || []);
|
||||||
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
|
if (deptColumn) {
|
||||||
|
deptColumn.dicData = this.deptOptions;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
flattenDept(tree, level = 0) {
|
||||||
|
const result = [];
|
||||||
|
tree.forEach(item => {
|
||||||
|
result.push({
|
||||||
|
label: `${' '.repeat(level)}${item.title || item.deptName || item.name}`,
|
||||||
|
value: item.id,
|
||||||
|
});
|
||||||
|
if (item.children && item.children.length) {
|
||||||
|
result.push(...this.flattenDept(item.children, level + 1));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
normalizeCargoTypeOptions(list = []) {
|
normalizeCargoTypeOptions(list = []) {
|
||||||
return list
|
return list
|
||||||
.map(item => ({
|
.map(item => ({
|
||||||
@@ -319,11 +349,12 @@ export default {
|
|||||||
const second = this.secondCargoTypeOptions.find(item => item.cargoCode === value);
|
const second = this.secondCargoTypeOptions.find(item => item.cargoCode === value);
|
||||||
this.form.secondCargoTypeName = second ? second.cargoName : '';
|
this.form.secondCargoTypeName = second ? second.cargoName : '';
|
||||||
this.form.secondCargoTypeCode = second ? second.cargoCode : '';
|
this.form.secondCargoTypeCode = second ? second.cargoCode : '';
|
||||||
|
this.form.cargoCode = second ? String(second.cargoCode).slice(0, 4) : '';
|
||||||
this.syncCargoCodePrefix();
|
this.syncCargoCodePrefix();
|
||||||
},
|
},
|
||||||
getCargoCodePrefix() {
|
getCargoCodePrefix() {
|
||||||
return this.form.secondCargoTypeCode && this.form.firstCargoTypeCode
|
return this.form.secondCargoTypeCode
|
||||||
? this.form.firstCargoTypeCode
|
? String(this.form.secondCargoTypeCode).slice(0, 4)
|
||||||
: '';
|
: '';
|
||||||
},
|
},
|
||||||
syncCargoCodePrefix() {
|
syncCargoCodePrefix() {
|
||||||
@@ -383,13 +414,13 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const cargoCode = String(row.cargoCode || '');
|
const cargoCode = String(row.cargoCode || '');
|
||||||
const prefix = row.firstCargoTypeCode;
|
const prefix = String(row.secondCargoTypeCode || '').slice(0, 4);
|
||||||
if (!cargoCode || cargoCode === prefix) {
|
if (!cargoCode || cargoCode === prefix) {
|
||||||
this.$message.warning('请输入货物编号');
|
this.$message.warning('请输入货物编号');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!cargoCode.startsWith(prefix)) {
|
if (!cargoCode.startsWith(prefix)) {
|
||||||
this.$message.warning('货物编号需拼接一级货物类型编号在前面');
|
this.$message.warning('货物编号需拼接二级货物类型编号在前面');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (cargoCode.length > 20) {
|
if (cargoCode.length > 20) {
|
||||||
|
|||||||
@@ -24,10 +24,25 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('common_route_add')"
|
v-if="hasPermission('common_route_add')"
|
||||||
@click="$refs.crud.rowAdd()"
|
@click="$refs.crud.rowAdd()"
|
||||||
>新增
|
>新建路线
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-upload"
|
||||||
|
plain
|
||||||
|
v-if="config.importUrl && hasPermission('common_route_import')"
|
||||||
|
@click="handleImport"
|
||||||
|
>批量导入
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-download"
|
||||||
|
plain
|
||||||
|
v-if="config.templateUrl && hasPermission('common_route_template')"
|
||||||
|
@click="handleTemplate"
|
||||||
|
>下载模板
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -57,10 +72,10 @@
|
|||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.departureAddress"
|
v-model="form.departureAddress"
|
||||||
readonly
|
|
||||||
placeholder="请输入并选择地址"
|
placeholder="请输入并选择地址"
|
||||||
suffix-icon="el-icon-location"
|
suffix-icon="el-icon-location"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
@click="openRouteMapDialog('departure')"
|
||||||
/>
|
/>
|
||||||
<el-tooltip content="选择常用地址" placement="top">
|
<el-tooltip content="选择常用地址" placement="top">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -84,10 +99,10 @@
|
|||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.arrivalAddress"
|
v-model="form.arrivalAddress"
|
||||||
readonly
|
|
||||||
placeholder="请输入并选择地址"
|
placeholder="请输入并选择地址"
|
||||||
suffix-icon="el-icon-location"
|
suffix-icon="el-icon-location"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
@click="openRouteMapDialog('arrival')"
|
||||||
/>
|
/>
|
||||||
<el-tooltip content="选择常用地址" placement="top">
|
<el-tooltip content="选择常用地址" placement="top">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -133,6 +148,16 @@
|
|||||||
@load="onLoad(page, query)"
|
@load="onLoad(page, query)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<el-dialog :title="`${config.title}导入`" append-to-body v-model="excelBox" width="555px">
|
||||||
|
<avue-form :option="excelOptionConfig" v-model="excelForm">
|
||||||
|
<template #excelTemplate>
|
||||||
|
<el-button type="primary" @click="handleTemplate">
|
||||||
|
点击下载<i class="el-icon-download el-icon--right"></i>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-form>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择常用地址"
|
title="选择常用地址"
|
||||||
append-to-body
|
append-to-body
|
||||||
@@ -242,6 +267,48 @@
|
|||||||
<el-button @click="addressDialogVisible = false">关闭</el-button>
|
<el-button @click="addressDialogVisible = false">关闭</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="地图选择地址"
|
||||||
|
append-to-body
|
||||||
|
v-model="routeMapVisible"
|
||||||
|
width="920px"
|
||||||
|
@opened="initRouteAmap"
|
||||||
|
>
|
||||||
|
<div class="common-route-page__map-toolbar">
|
||||||
|
<el-input
|
||||||
|
v-model="routeMapKeyword"
|
||||||
|
clearable
|
||||||
|
placeholder="输入地址关键词"
|
||||||
|
@keyup.enter="searchRouteMapKeyword"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:icon="Search"
|
||||||
|
:loading="routeMapLoading"
|
||||||
|
@click="searchRouteMapKeyword"
|
||||||
|
>
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div ref="routeAmap" class="common-route-page__map"></div>
|
||||||
|
<div class="common-route-page__map-info">
|
||||||
|
<span>{{ routeMapStatus }}</span>
|
||||||
|
<span v-if="routeMapSelected.regionName"
|
||||||
|
>发货/收货地:{{ routeMapSelected.regionName }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="routeMapVisible = false">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="!routeMapSelected.longitude"
|
||||||
|
@click="confirmRouteMapPick"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -251,18 +318,24 @@ import { getList as getCommonAddressList } from '@/api/base/common-address';
|
|||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import { getDeptTree } from '@/api/system/dept';
|
import { getDeptTree } from '@/api/system/dept';
|
||||||
import { addressTypeOptions } from '@/option/base/common-address';
|
import { addressTypeOptions } from '@/option/base/common-address';
|
||||||
import { config, option } from '@/option/business/common-route';
|
import { config, excelOption, option } from '@/option/business/common-route';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { openImportDialog } from '@/utils/import-excel';
|
||||||
import { downloadXls } from '@/utils/util';
|
import { downloadXls } from '@/utils/util';
|
||||||
import { List } from '@element-plus/icons-vue';
|
import { List, Search } from '@element-plus/icons-vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
|
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
||||||
|
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
||||||
|
let amapLoader;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
List,
|
List,
|
||||||
|
Search,
|
||||||
config,
|
config,
|
||||||
option,
|
option,
|
||||||
form: {},
|
form: {},
|
||||||
@@ -270,12 +343,24 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
data: [],
|
data: [],
|
||||||
dialogReadonly: false,
|
dialogReadonly: false,
|
||||||
|
excelBox: false,
|
||||||
|
excelForm: {},
|
||||||
|
excelOptionConfig: excelOption,
|
||||||
addressTypeOptions,
|
addressTypeOptions,
|
||||||
addressDialogVisible: false,
|
addressDialogVisible: false,
|
||||||
addressTarget: '',
|
addressTarget: '',
|
||||||
addressQuery: {},
|
addressQuery: {},
|
||||||
addressData: [],
|
addressData: [],
|
||||||
addressLoading: false,
|
addressLoading: false,
|
||||||
|
routeMapVisible: false,
|
||||||
|
routeMapTarget: '',
|
||||||
|
routeMapLoading: false,
|
||||||
|
routeMapKeyword: '',
|
||||||
|
routeMapStatus: '可搜索地址或点击地图选点',
|
||||||
|
routeMapSelected: {},
|
||||||
|
routeAmap: null,
|
||||||
|
routeAmapMarker: null,
|
||||||
|
routeAmapGeocoder: null,
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -317,9 +402,22 @@ export default {
|
|||||||
},
|
},
|
||||||
initDeptTree() {
|
initDeptTree() {
|
||||||
getDeptTree(this.userInfo.tenantId).then(res => {
|
getDeptTree(this.userInfo.tenantId).then(res => {
|
||||||
this.deptOptions = this.flattenDept(res.data.data || []);
|
const deptTree = res.data.data || [];
|
||||||
|
this.deptOptions = this.flattenDept(deptTree);
|
||||||
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
|
if (deptColumn) {
|
||||||
|
deptColumn.dicData = this.buildDeptTree(deptTree);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
buildDeptTree(tree) {
|
||||||
|
return tree.map(item => ({
|
||||||
|
label: item.title || item.deptName || item.name,
|
||||||
|
value: item.id,
|
||||||
|
children:
|
||||||
|
item.children && item.children.length ? this.buildDeptTree(item.children) : undefined,
|
||||||
|
}));
|
||||||
|
},
|
||||||
flattenDept(tree, level = 0) {
|
flattenDept(tree, level = 0) {
|
||||||
const result = [];
|
const result = [];
|
||||||
tree.forEach(item => {
|
tree.forEach(item => {
|
||||||
@@ -404,6 +502,246 @@ export default {
|
|||||||
this.form[`${prefix}Contact`] = address.contactName || this.form[`${prefix}Contact`] || '';
|
this.form[`${prefix}Contact`] = address.contactName || this.form[`${prefix}Contact`] || '';
|
||||||
this.form[`${prefix}Phone`] = address.contactPhone || this.form[`${prefix}Phone`] || '';
|
this.form[`${prefix}Phone`] = address.contactPhone || this.form[`${prefix}Phone`] || '';
|
||||||
},
|
},
|
||||||
|
openRouteMapDialog(target) {
|
||||||
|
if (this.dialogReadonly) return;
|
||||||
|
const prefix = target === 'departure' ? 'departure' : 'arrival';
|
||||||
|
this.routeMapTarget = prefix;
|
||||||
|
this.routeMapKeyword = this.form[`${prefix}Address`] || this.form[`${prefix}Name`] || '';
|
||||||
|
this.routeMapSelected = this.buildRouteMapSelection({
|
||||||
|
lng: this.form[`${prefix}Longitude`],
|
||||||
|
lat: this.form[`${prefix}Latitude`],
|
||||||
|
address: this.form[`${prefix}Address`],
|
||||||
|
regionName: this.form[`${prefix}Name`],
|
||||||
|
});
|
||||||
|
this.routeMapStatus = this.routeMapSelected.longitude
|
||||||
|
? '已加载当前选点,可重新选点'
|
||||||
|
: '可搜索地址或点击地图选点';
|
||||||
|
this.routeMapVisible = true;
|
||||||
|
},
|
||||||
|
loadAmap() {
|
||||||
|
if (window.AMap && window.AMap.Map) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
if (!amapLoader) {
|
||||||
|
amapLoader = new Promise((resolve, reject) => {
|
||||||
|
window._AMapSecurityConfig = {
|
||||||
|
securityJsCode: AMAP_SECURITY_CODE,
|
||||||
|
};
|
||||||
|
const script = document.createElement('script');
|
||||||
|
script.src = `https://webapi.amap.com/maps?v=2.0&key=${AMAP_KEY}`;
|
||||||
|
script.async = true;
|
||||||
|
script.onload = resolve;
|
||||||
|
script.onerror = () => reject(new Error('高德地图组件加载失败'));
|
||||||
|
document.body.appendChild(script);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return amapLoader;
|
||||||
|
},
|
||||||
|
initRouteAmap() {
|
||||||
|
this.loadAmap()
|
||||||
|
.then(() => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.routeAmap) {
|
||||||
|
const center = this.toLngLat(
|
||||||
|
this.routeMapSelected.longitude || 116.40769,
|
||||||
|
this.routeMapSelected.latitude || 39.89945
|
||||||
|
);
|
||||||
|
this.routeAmap = new window.AMap.Map(this.$refs.routeAmap, {
|
||||||
|
center,
|
||||||
|
zoom: this.routeMapSelected.longitude ? 14 : 11,
|
||||||
|
});
|
||||||
|
window.AMap.plugin(['AMap.ToolBar', 'AMap.Geocoder'], () => {
|
||||||
|
this.routeAmap.addControl(new window.AMap.ToolBar());
|
||||||
|
if (!this.routeAmapGeocoder) {
|
||||||
|
this.routeAmapGeocoder = new window.AMap.Geocoder();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.routeAmap.on('click', event => this.pickRouteMapPoint(event.lnglat));
|
||||||
|
} else if (typeof this.routeAmap.resize === 'function') {
|
||||||
|
this.routeAmap.resize();
|
||||||
|
}
|
||||||
|
if (this.routeMapSelected.longitude) {
|
||||||
|
this.renderRouteMapMarker(
|
||||||
|
this.toLngLat(this.routeMapSelected.longitude, this.routeMapSelected.latitude)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('高德地图组件加载失败,请稍后重试或重新打开弹窗');
|
||||||
|
this.routeMapVisible = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchRouteMapKeyword() {
|
||||||
|
const keyword = String(this.routeMapKeyword || '').trim();
|
||||||
|
if (!keyword) {
|
||||||
|
this.$message.warning('请输入地址关键词');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadAmap()
|
||||||
|
.then(() => {
|
||||||
|
this.routeMapLoading = true;
|
||||||
|
return this.ensureRouteAmapGeocoder();
|
||||||
|
})
|
||||||
|
.then(() => this.runAmapGeocode('location', keyword))
|
||||||
|
.then(result => {
|
||||||
|
const point = this.resolveMapPoint(result);
|
||||||
|
if (!point) {
|
||||||
|
this.routeMapStatus = '未找到匹配地址';
|
||||||
|
this.$message.warning('地图搜索无匹配地址');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.pickRouteMapPoint(point, keyword);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.routeMapStatus = '地图搜索失败';
|
||||||
|
this.$message.error('地图搜索失败,请稍后重试');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.routeMapLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pickRouteMapPoint(lnglat, keyword) {
|
||||||
|
const longitude = this.getPointLng(lnglat);
|
||||||
|
const latitude = this.getPointLat(lnglat);
|
||||||
|
if (longitude === undefined || latitude === undefined) {
|
||||||
|
this.$message.warning('选点坐标无效');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const point = this.toLngLat(longitude, latitude);
|
||||||
|
this.renderRouteMapMarker(point);
|
||||||
|
this.routeMapSelected = this.buildRouteMapSelection({
|
||||||
|
lng: longitude,
|
||||||
|
lat: latitude,
|
||||||
|
address: keyword,
|
||||||
|
});
|
||||||
|
this.routeMapStatus = '正在反查地址...';
|
||||||
|
this.ensureRouteAmapGeocoder()
|
||||||
|
.then(() => this.runAmapGeocode('address', point))
|
||||||
|
.then(result => {
|
||||||
|
const address = this.resolveMapAddress(result);
|
||||||
|
this.routeMapSelected = {
|
||||||
|
...this.routeMapSelected,
|
||||||
|
detailAddress: address.detailAddress || this.routeMapSelected.detailAddress,
|
||||||
|
regionName: address.regionName || this.routeMapSelected.regionName,
|
||||||
|
};
|
||||||
|
this.routeMapKeyword = this.routeMapSelected.detailAddress || this.routeMapKeyword;
|
||||||
|
this.routeMapStatus = this.routeMapSelected.detailAddress || '已选点,可确认回填';
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.routeMapStatus = '反查地址失败';
|
||||||
|
this.$message.error('反查地址失败,请重新选点');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
renderRouteMapMarker(point) {
|
||||||
|
if (!this.routeAmap || !window.AMap) return;
|
||||||
|
if (this.routeAmapMarker) {
|
||||||
|
this.routeAmapMarker.setMap(null);
|
||||||
|
}
|
||||||
|
this.routeAmapMarker = new window.AMap.Marker({ position: point });
|
||||||
|
this.routeAmapMarker.setMap(this.routeAmap);
|
||||||
|
this.routeAmap.setCenter(point);
|
||||||
|
},
|
||||||
|
confirmRouteMapPick() {
|
||||||
|
if (!this.routeMapSelected.longitude) {
|
||||||
|
this.$message.warning('请先搜索或点击地图完成选点');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const prefix = this.routeMapTarget;
|
||||||
|
this.form[`${prefix}Address`] =
|
||||||
|
this.routeMapSelected.detailAddress || this.form[`${prefix}Address`];
|
||||||
|
this.form[`${prefix}Name`] = this.routeMapSelected.regionName || this.form[`${prefix}Name`];
|
||||||
|
this.form[`${prefix}Longitude`] = this.routeMapSelected.longitude;
|
||||||
|
this.form[`${prefix}Latitude`] = this.routeMapSelected.latitude;
|
||||||
|
this.routeMapVisible = false;
|
||||||
|
this.$refs.crud?.validateField?.(`${prefix}Address`);
|
||||||
|
},
|
||||||
|
buildRouteMapSelection({ lng, lat, address, regionName }) {
|
||||||
|
return {
|
||||||
|
longitude: this.formatCoordinate(lng),
|
||||||
|
latitude: this.formatCoordinate(lat),
|
||||||
|
detailAddress: address || '',
|
||||||
|
regionName: regionName || '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
formatCoordinate(value) {
|
||||||
|
if (value === undefined || value === null || value === '') return '';
|
||||||
|
const numberValue = Number(value);
|
||||||
|
return Number.isFinite(numberValue) ? numberValue.toFixed(6) : '';
|
||||||
|
},
|
||||||
|
toLngLat(lng, lat) {
|
||||||
|
return new window.AMap.LngLat(Number(lng), Number(lat));
|
||||||
|
},
|
||||||
|
getPointLng(point) {
|
||||||
|
if (!point) return undefined;
|
||||||
|
if (typeof point.getLng === 'function') return point.getLng();
|
||||||
|
return point.lng ?? point.lon;
|
||||||
|
},
|
||||||
|
getPointLat(point) {
|
||||||
|
if (!point) return undefined;
|
||||||
|
if (typeof point.getLat === 'function') return point.getLat();
|
||||||
|
return point.lat;
|
||||||
|
},
|
||||||
|
ensureRouteAmapGeocoder() {
|
||||||
|
if (this.routeAmapGeocoder) return Promise.resolve(this.routeAmapGeocoder);
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (!window.AMap || !window.AMap.plugin) {
|
||||||
|
reject(new Error('高德地图组件未就绪'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.AMap.plugin(['AMap.Geocoder'], () => {
|
||||||
|
try {
|
||||||
|
this.routeAmapGeocoder = new window.AMap.Geocoder();
|
||||||
|
resolve(this.routeAmapGeocoder);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
runAmapGeocode(action, input) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const timer = window.setTimeout(() => {
|
||||||
|
reject(new Error('高德地图请求超时'));
|
||||||
|
}, 10000);
|
||||||
|
const done = (status, result) => {
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
if (status === 'complete' && result) {
|
||||||
|
resolve(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reject(new Error('高德地图请求失败'));
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
if (action === 'location') {
|
||||||
|
this.routeAmapGeocoder.getLocation(input, done);
|
||||||
|
} else {
|
||||||
|
this.routeAmapGeocoder.getAddress(input, done);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resolveMapPoint(result) {
|
||||||
|
if (!result) return null;
|
||||||
|
const geocode = Array.isArray(result.geocodes) ? result.geocodes[0] : null;
|
||||||
|
if (geocode && geocode.location) return geocode.location;
|
||||||
|
if (result.location) return result.location;
|
||||||
|
if (result.lnglat) return result.lnglat;
|
||||||
|
if (result.getLng || result.lng || result.lon) return result;
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
resolveMapAddress(result = {}) {
|
||||||
|
const regeocode = result.regeocode || {};
|
||||||
|
const component = regeocode.addressComponent || {};
|
||||||
|
const city = Array.isArray(component.city) ? '' : component.city;
|
||||||
|
return {
|
||||||
|
detailAddress: regeocode.formattedAddress || '',
|
||||||
|
regionName: [component.province, city, component.district].filter(Boolean).join(''),
|
||||||
|
};
|
||||||
|
},
|
||||||
normalizeRow(row) {
|
normalizeRow(row) {
|
||||||
const submitRow = { ...row };
|
const submitRow = { ...row };
|
||||||
Object.keys(submitRow).forEach(key => {
|
Object.keys(submitRow).forEach(key => {
|
||||||
@@ -613,6 +951,27 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleTemplate() {
|
||||||
|
NProgress.start();
|
||||||
|
exportBlob(
|
||||||
|
config.templateUrl,
|
||||||
|
{
|
||||||
|
[this.website.tokenHeader]: getToken(),
|
||||||
|
},
|
||||||
|
{ feedback: true }
|
||||||
|
)
|
||||||
|
.then(res => {
|
||||||
|
downloadXls(res.data, `${config.title}模板.xlsx`);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
NProgress.done();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleImport() {
|
||||||
|
const column = this.excelOptionConfig.column.find(item => item.prop === 'excelFile');
|
||||||
|
column.action = config.importUrl;
|
||||||
|
openImportDialog(this, config.title, () => this.onLoad(this.page, this.query));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -654,5 +1013,31 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__map-toolbar {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
.el-input {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__map {
|
||||||
|
width: 100%;
|
||||||
|
height: 420px;
|
||||||
|
border: 1px solid #eff1f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__map-info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
@refresh-change="refreshChange"
|
@refresh-change="refreshChange"
|
||||||
|
@search-icon-change="handleSearchIconChange"
|
||||||
@on-load="onLoad"
|
@on-load="onLoad"
|
||||||
>
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:icon="actionButtonLikeSearch ? undefined : 'el-icon-plus'"
|
:icon="actionButtonLikeSearch ? undefined : 'el-icon-plus'"
|
||||||
:plain="!actionButtonLikeSearch"
|
|
||||||
v-if="canCreate"
|
v-if="canCreate"
|
||||||
@click="$refs.crud.rowAdd()"
|
@click="$refs.crud.rowAdd()"
|
||||||
>{{ config.createText || '新增' }}
|
>{{ config.createText || '新增' }}
|
||||||
@@ -114,11 +114,35 @@
|
|||||||
|
|
||||||
<template #contractCategory-label>合同类型</template>
|
<template #contractCategory-label>合同类型</template>
|
||||||
|
|
||||||
|
<template v-if="config.enableContractExpiryTags" #search-menu>
|
||||||
|
<div v-show="searchExpanded" class="business-crud-page__contract-expiry-search">
|
||||||
|
<span class="business-crud-page__contract-expiry-label">签约类型:</span>
|
||||||
|
<el-select v-model="contractSignType" clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in contractSignTypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<div class="business-crud-page__contract-expiry-tags">
|
||||||
|
<el-check-tag
|
||||||
|
v-for="item in contractExpiryTagOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:checked="contractExpiryScope === item.value"
|
||||||
|
@change="handleContractExpiryScopeChange(item.value)"
|
||||||
|
>
|
||||||
|
{{ item.label }}({{ contractExpiryStats[item.statKey] || 0 }})
|
||||||
|
</el-check-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #projectName-form>
|
<template #projectName-form>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectedProjectId"
|
v-model="selectedProjectId"
|
||||||
class="business-crud-page__field"
|
class="business-crud-page__field"
|
||||||
placeholder="请选择项目名称"
|
:placeholder="config.projectPlaceholder || '请选择项目名称'"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
:loading="projectLoading"
|
:loading="projectLoading"
|
||||||
@@ -1221,7 +1245,7 @@
|
|||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="selectedOrganizationId"
|
v-model="selectedOrganizationId"
|
||||||
class="business-crud-page__field"
|
class="business-crud-page__field"
|
||||||
placeholder="请选择所属组织"
|
:placeholder="config.organizationPlaceholder || '请选择所属组织'"
|
||||||
:options="organizationOptions"
|
:options="organizationOptions"
|
||||||
:props="organizationCascaderProps"
|
:props="organizationCascaderProps"
|
||||||
clearable
|
clearable
|
||||||
@@ -1402,12 +1426,17 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
|
v-if="settlementRuleEnabled"
|
||||||
:model="settlementRuleForm"
|
:model="settlementRuleForm"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
label-width="auto"
|
label-width="auto"
|
||||||
class="business-crud-page__module-form business-crud-page__module-form--three"
|
class="business-crud-page__module-form business-crud-page__module-form--three"
|
||||||
>
|
>
|
||||||
<el-form-item label="账单起始日期" required>
|
<el-form-item
|
||||||
|
label="账单起始日期"
|
||||||
|
required
|
||||||
|
:error="settlementRuleErrors.billStartDate"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="settlementRuleForm.billStartDate"
|
v-model="settlementRuleForm.billStartDate"
|
||||||
type="date"
|
type="date"
|
||||||
@@ -1415,9 +1444,10 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
@change="clearSettlementRuleError('billStartDate')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算类型" required>
|
<el-form-item label="结算类型" required :error="settlementRuleErrors.settlementType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="settlementRuleForm.settlementType"
|
v-model="settlementRuleForm.settlementType"
|
||||||
placeholder="请选择结算类型"
|
placeholder="请选择结算类型"
|
||||||
@@ -1432,7 +1462,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showSettlementBillCycleType" label="账单周期类型" required>
|
<el-form-item
|
||||||
|
v-if="showSettlementBillCycleType"
|
||||||
|
label="账单周期类型"
|
||||||
|
required
|
||||||
|
:error="settlementRuleErrors.billCycleType"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="settlementRuleForm.billCycleType"
|
v-model="settlementRuleForm.billCycleType"
|
||||||
placeholder="请选择账单周期类型"
|
placeholder="请选择账单周期类型"
|
||||||
@@ -1447,11 +1482,17 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showSettlementBillCutoffDay" label="账单截单日">
|
<el-form-item
|
||||||
|
v-if="showSettlementBillCutoffDay"
|
||||||
|
label="账单截单日"
|
||||||
|
required
|
||||||
|
:error="settlementRuleErrors.billCutoffDay"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="settlementRuleForm.billCutoffDay"
|
v-model="settlementRuleForm.billCutoffDay"
|
||||||
placeholder="请选择账单截单日"
|
placeholder="请选择账单截单日"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
@change="clearSettlementRuleError('billCutoffDay')"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in billCutoffDayOptions"
|
v-for="item in billCutoffDayOptions"
|
||||||
@@ -1461,11 +1502,17 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showSettlementCycleDays" label="周期天数" required>
|
<el-form-item
|
||||||
|
v-if="showSettlementCycleDays"
|
||||||
|
label="周期天数"
|
||||||
|
required
|
||||||
|
:error="settlementRuleErrors.cycleDays"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="settlementRuleForm.cycleDays"
|
v-model="settlementRuleForm.cycleDays"
|
||||||
placeholder="请选择周期天数"
|
placeholder="请选择周期天数"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
@change="clearSettlementRuleError('cycleDays')"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in cycleDayOptions"
|
v-for="item in cycleDayOptions"
|
||||||
@@ -2800,7 +2847,7 @@
|
|||||||
:title="billingPlanMode === 'edit' ? '编辑计费方案' : '添加计费方案'"
|
:title="billingPlanMode === 'edit' ? '编辑计费方案' : '添加计费方案'"
|
||||||
append-to-body
|
append-to-body
|
||||||
v-model="billingPlanBox"
|
v-model="billingPlanBox"
|
||||||
width="96%"
|
width="90%"
|
||||||
class="business-crud-page__billing-dialog"
|
class="business-crud-page__billing-dialog"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
@@ -2827,6 +2874,7 @@
|
|||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="billingPlanForm.remark"
|
v-model="billingPlanForm.remark"
|
||||||
|
class="business-crud-page__billing-plan-remark"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@@ -3958,6 +4006,7 @@ export default {
|
|||||||
cargoImportLoading: false,
|
cargoImportLoading: false,
|
||||||
billingPlanRows: [],
|
billingPlanRows: [],
|
||||||
settlementRuleForm: defaultSettlementRule(),
|
settlementRuleForm: defaultSettlementRule(),
|
||||||
|
settlementRuleErrors: {},
|
||||||
reconciliationForm: defaultReconciliation(),
|
reconciliationForm: defaultReconciliation(),
|
||||||
changeRecordRows: [],
|
changeRecordRows: [],
|
||||||
billingPlanBox: false,
|
billingPlanBox: false,
|
||||||
@@ -4035,9 +4084,23 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
contractExpiryScope: '',
|
||||||
|
contractSignType: '',
|
||||||
|
searchExpanded: false,
|
||||||
|
attachmentUploadMode: false,
|
||||||
|
contractExpiryStats: {
|
||||||
|
all: 0,
|
||||||
|
within30: 0,
|
||||||
|
within90: 0,
|
||||||
|
over90: 0,
|
||||||
|
expired: 0,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
if (this.config.enableAllDept && this.isAdmin) {
|
||||||
|
this.allDept = 1;
|
||||||
|
}
|
||||||
if (this.config.enableProjectSelect) {
|
if (this.config.enableProjectSelect) {
|
||||||
this.loadProjectOptions();
|
this.loadProjectOptions();
|
||||||
}
|
}
|
||||||
@@ -4076,6 +4139,18 @@ export default {
|
|||||||
actionButtonLikeSearch() {
|
actionButtonLikeSearch() {
|
||||||
return this.config.actionButtonLikeSearch === true;
|
return this.config.actionButtonLikeSearch === true;
|
||||||
},
|
},
|
||||||
|
contractSignTypeOptions() {
|
||||||
|
return this.option.column?.find(column => column.prop === 'signType')?.dicData || [];
|
||||||
|
},
|
||||||
|
contractExpiryTagOptions() {
|
||||||
|
return [
|
||||||
|
{ label: '全部', value: '', statKey: 'all' },
|
||||||
|
{ label: '30天内到期', value: 'within30', statKey: 'within30' },
|
||||||
|
{ label: '90天内到期', value: 'within90', statKey: 'within90' },
|
||||||
|
{ label: '90天以上', value: 'over90', statKey: 'over90' },
|
||||||
|
{ label: '已到期', value: 'expired', statKey: 'expired' },
|
||||||
|
];
|
||||||
|
},
|
||||||
contractSelectEnabled() {
|
contractSelectEnabled() {
|
||||||
return this.config.enableContractSelect || this.config.enableTransportPlanForm;
|
return this.config.enableContractSelect || this.config.enableTransportPlanForm;
|
||||||
},
|
},
|
||||||
@@ -4242,7 +4317,9 @@ export default {
|
|||||||
return this.isAdmin;
|
return this.isAdmin;
|
||||||
},
|
},
|
||||||
readonlyScope() {
|
readonlyScope() {
|
||||||
return this.config.enableAllDept && this.allDept === 1;
|
return (
|
||||||
|
this.config.enableAllDept && this.config.allDeptReadonly !== false && this.allDept === 1
|
||||||
|
);
|
||||||
},
|
},
|
||||||
canCreate() {
|
canCreate() {
|
||||||
return this.hasPermission(`${this.config.permission}_add`) && !this.readonlyScope;
|
return this.hasPermission(`${this.config.permission}_add`) && !this.readonlyScope;
|
||||||
@@ -4301,6 +4378,9 @@ export default {
|
|||||||
emitPath: true,
|
emitPath: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
settlementRuleEnabled() {
|
||||||
|
return Number(this.settlementRuleForm.autoGenerate) === 1;
|
||||||
|
},
|
||||||
showSettlementBillCycleType() {
|
showSettlementBillCycleType() {
|
||||||
return this.settlementRuleForm.settlementType === '月结';
|
return this.settlementRuleForm.settlementType === '月结';
|
||||||
},
|
},
|
||||||
@@ -4537,6 +4617,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action.action === 'edit' || action.action === 'attachmentUpload') {
|
if (action.action === 'edit' || action.action === 'attachmentUpload') {
|
||||||
|
this.attachmentUploadMode = action.action === 'attachmentUpload';
|
||||||
this.$refs.crud.rowEdit(row, index);
|
this.$refs.crud.rowEdit(row, index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4714,6 +4795,7 @@ export default {
|
|||||||
return rule.settlementType === '固定天数周期结算';
|
return rule.settlementType === '固定天数周期结算';
|
||||||
},
|
},
|
||||||
handleSettlementTypeChange(value) {
|
handleSettlementTypeChange(value) {
|
||||||
|
this.clearSettlementRuleError('settlementType');
|
||||||
if (value === '月结') {
|
if (value === '月结') {
|
||||||
if (!this.settlementRuleForm.billCycleType) {
|
if (!this.settlementRuleForm.billCycleType) {
|
||||||
this.settlementRuleForm.billCycleType = '固定截单日';
|
this.settlementRuleForm.billCycleType = '固定截单日';
|
||||||
@@ -4731,6 +4813,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSettlementBillCycleTypeChange(value) {
|
handleSettlementBillCycleTypeChange(value) {
|
||||||
|
this.clearSettlementRuleError('billCycleType');
|
||||||
if (value === '固定截单日') {
|
if (value === '固定截单日') {
|
||||||
this.settlementRuleForm.billCutoffDay = this.settlementRuleForm.billCutoffDay || 25;
|
this.settlementRuleForm.billCutoffDay = this.settlementRuleForm.billCutoffDay || 25;
|
||||||
return;
|
return;
|
||||||
@@ -4753,23 +4836,40 @@ export default {
|
|||||||
}
|
}
|
||||||
return nextRule;
|
return nextRule;
|
||||||
},
|
},
|
||||||
|
clearSettlementRuleError(field) {
|
||||||
|
if (!this.settlementRuleErrors[field]) return;
|
||||||
|
this.settlementRuleErrors = {
|
||||||
|
...this.settlementRuleErrors,
|
||||||
|
[field]: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
validateSettlementRule() {
|
validateSettlementRule() {
|
||||||
const rule = this.normalizeSettlementRule(this.settlementRuleForm);
|
const rule = this.normalizeSettlementRule(this.settlementRuleForm);
|
||||||
|
this.settlementRuleErrors = {};
|
||||||
if (this.isBillingFieldEmpty(rule.billStartDate)) {
|
if (this.isBillingFieldEmpty(rule.billStartDate)) {
|
||||||
|
this.settlementRuleErrors = { billStartDate: '请选择账单起始日期' };
|
||||||
this.$message.warning('请选择账单起始日期');
|
this.$message.warning('请选择账单起始日期');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.isBillingFieldEmpty(rule.settlementType)) {
|
if (this.isBillingFieldEmpty(rule.settlementType)) {
|
||||||
|
this.settlementRuleErrors = { settlementType: '请选择结算类型' };
|
||||||
this.$message.warning('请选择结算类型');
|
this.$message.warning('请选择结算类型');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.isMonthlySettlement(rule) && this.isBillingFieldEmpty(rule.billCycleType)) {
|
if (this.isMonthlySettlement(rule) && this.isBillingFieldEmpty(rule.billCycleType)) {
|
||||||
|
this.settlementRuleErrors = { billCycleType: '请选择账单周期类型' };
|
||||||
this.$message.warning('请选择账单周期类型');
|
this.$message.warning('请选择账单周期类型');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.isFixedBillCutoffSettlement(rule)) {
|
if (this.isFixedBillCutoffSettlement(rule)) {
|
||||||
|
if (this.isBillingFieldEmpty(rule.billCutoffDay)) {
|
||||||
|
this.settlementRuleErrors = { billCutoffDay: '请选择账单截单日' };
|
||||||
|
this.$message.warning('请选择账单截单日');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const billCutoffDay = Number(rule.billCutoffDay);
|
const billCutoffDay = Number(rule.billCutoffDay);
|
||||||
if (!Number.isInteger(billCutoffDay) || billCutoffDay < 1 || billCutoffDay > 31) {
|
if (!Number.isInteger(billCutoffDay) || billCutoffDay < 1 || billCutoffDay > 31) {
|
||||||
|
this.settlementRuleErrors = { billCutoffDay: '账单截单日必须为1~31的整数' };
|
||||||
this.$message.warning('账单截单日必须为1~31的整数');
|
this.$message.warning('账单截单日必须为1~31的整数');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4777,13 +4877,14 @@ export default {
|
|||||||
if (this.isFixedCycleSettlement(rule)) {
|
if (this.isFixedCycleSettlement(rule)) {
|
||||||
const cycleDays = Number(rule.cycleDays);
|
const cycleDays = Number(rule.cycleDays);
|
||||||
if (!Number.isInteger(cycleDays) || cycleDays < 1 || cycleDays > 365) {
|
if (!Number.isInteger(cycleDays) || cycleDays < 1 || cycleDays > 365) {
|
||||||
|
this.settlementRuleErrors = { cycleDays: '周期天数必须为1~365的整数' };
|
||||||
this.$message.warning('周期天数必须为1~365的整数');
|
this.$message.warning('周期天数必须为1~365的整数');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
normalizeRow(row) {
|
normalizeRow(row, saveAsDraft = false) {
|
||||||
const submitRow = { ...row };
|
const submitRow = { ...row };
|
||||||
if (this.config.enableTransportPlanForm) {
|
if (this.config.enableTransportPlanForm) {
|
||||||
if (!this.validateTransportPlanForm(submitRow)) return false;
|
if (!this.validateTransportPlanForm(submitRow)) return false;
|
||||||
@@ -4803,7 +4904,7 @@ export default {
|
|||||||
submitRow.billingPlanJson = JSON.stringify(this.billingPlanRows);
|
submitRow.billingPlanJson = JSON.stringify(this.billingPlanRows);
|
||||||
}
|
}
|
||||||
if (this.config.enableSettlementRule) {
|
if (this.config.enableSettlementRule) {
|
||||||
if (!this.validateSettlementRule()) return false;
|
if (this.settlementRuleEnabled && !this.validateSettlementRule()) return false;
|
||||||
submitRow.settlementRuleJson = JSON.stringify(this.normalizeSettlementRule());
|
submitRow.settlementRuleJson = JSON.stringify(this.normalizeSettlementRule());
|
||||||
}
|
}
|
||||||
if (this.config.enableReconciliation) {
|
if (this.config.enableReconciliation) {
|
||||||
@@ -4812,7 +4913,7 @@ export default {
|
|||||||
if (this.config.enableChangeRecord) {
|
if (this.config.enableChangeRecord) {
|
||||||
submitRow.changeRecordJson = JSON.stringify(this.changeRecordRows);
|
submitRow.changeRecordJson = JSON.stringify(this.changeRecordRows);
|
||||||
}
|
}
|
||||||
if (this.config.saveAsDraft) {
|
if (this.config.saveAsDraft && saveAsDraft) {
|
||||||
submitRow.approvalStatus = 'draft';
|
submitRow.approvalStatus = 'draft';
|
||||||
}
|
}
|
||||||
delete submitRow.basicInfoTitle;
|
delete submitRow.basicInfoTitle;
|
||||||
@@ -4896,22 +4997,25 @@ export default {
|
|||||||
this.stopSubmitLoading(loading);
|
this.stopSubmitLoading(loading);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.getSaveRequest()(submitRow).then(
|
const request =
|
||||||
|
this.attachmentUploadMode && typeof this.api.updateAttachments === 'function'
|
||||||
|
? this.api.updateAttachments
|
||||||
|
: this.getSaveRequest();
|
||||||
|
request(submitRow).then(
|
||||||
() => {
|
() => {
|
||||||
|
this.attachmentUploadMode = false;
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({ type: 'success', message: '操作成功!' });
|
this.$message({ type: 'success', message: '操作成功!' });
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
this.attachmentUploadMode = false;
|
||||||
window.console.log(error);
|
window.console.log(error);
|
||||||
this.stopSubmitLoading(loading);
|
this.stopSubmitLoading(loading);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getSaveRequest() {
|
getSaveRequest() {
|
||||||
if (this.config.saveAsDraft && typeof this.api.saveDraft === 'function') {
|
|
||||||
return this.api.saveDraft;
|
|
||||||
}
|
|
||||||
return this.api.submit;
|
return this.api.submit;
|
||||||
},
|
},
|
||||||
buildContractCreateSubmitRow(action) {
|
buildContractCreateSubmitRow(action) {
|
||||||
@@ -5033,7 +5137,7 @@ export default {
|
|||||||
handleDraftSave() {
|
handleDraftSave() {
|
||||||
const request =
|
const request =
|
||||||
typeof this.api.saveDraft === 'function' ? this.api.saveDraft : this.api.submit;
|
typeof this.api.saveDraft === 'function' ? this.api.saveDraft : this.api.submit;
|
||||||
const submitRow = this.normalizeRow(this.form);
|
const submitRow = this.normalizeRow(this.form, true);
|
||||||
if (!submitRow) return;
|
if (!submitRow) return;
|
||||||
this.draftSaveLoading = true;
|
this.draftSaveLoading = true;
|
||||||
request(submitRow)
|
request(submitRow)
|
||||||
@@ -5096,6 +5200,7 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
beforeOpen(done, type) {
|
||||||
this.crudDialogType = type;
|
this.crudDialogType = type;
|
||||||
|
this.settlementRuleErrors = {};
|
||||||
this.syncCustomCreateDialogButtons(type);
|
this.syncCustomCreateDialogButtons(type);
|
||||||
this.dialogReadonly = type === 'view';
|
this.dialogReadonly = type === 'view';
|
||||||
this.syncContractNoDisabled(type);
|
this.syncContractNoDisabled(type);
|
||||||
@@ -5177,8 +5282,7 @@ export default {
|
|||||||
this.syncCurrentOrganizationOption();
|
this.syncCurrentOrganizationOption();
|
||||||
}
|
}
|
||||||
if (this.config.enableProjectSelect) {
|
if (this.config.enableProjectSelect) {
|
||||||
this.form.usedFundLimit = 0;
|
this.form.remainingFundLimit = this.calculateRemainingFundLimit();
|
||||||
this.form.remainingFundLimit = 0;
|
|
||||||
this.syncCurrentProjectOption();
|
this.syncCurrentProjectOption();
|
||||||
}
|
}
|
||||||
if (this.contractSelectEnabled) {
|
if (this.contractSelectEnabled) {
|
||||||
@@ -5225,7 +5329,7 @@ export default {
|
|||||||
loadProjectOptions() {
|
loadProjectOptions() {
|
||||||
if (!this.config.enableProjectSelect || this.projectLoading) return;
|
if (!this.config.enableProjectSelect || this.projectLoading) return;
|
||||||
this.projectLoading = true;
|
this.projectLoading = true;
|
||||||
getProjectList(1, 9999, {})
|
getProjectList(1, 9999, this.config.projectQueryParams || {})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.projectOptions = extractRecords(res);
|
this.projectOptions = extractRecords(res);
|
||||||
this.syncCurrentProjectOption();
|
this.syncCurrentProjectOption();
|
||||||
@@ -5249,6 +5353,12 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
calculateRemainingFundLimit() {
|
||||||
|
const projectFundLimit = Number(this.form.projectFundLimit);
|
||||||
|
const usedFundLimit = Number(this.form.usedFundLimit);
|
||||||
|
if (!Number.isFinite(projectFundLimit) || !Number.isFinite(usedFundLimit)) return '';
|
||||||
|
return Math.round((projectFundLimit - usedFundLimit + Number.EPSILON) * 100) / 100;
|
||||||
|
},
|
||||||
handleProjectChange(projectId) {
|
handleProjectChange(projectId) {
|
||||||
const project = this.projectOptions.find(item => String(item.id) === String(projectId));
|
const project = this.projectOptions.find(item => String(item.id) === String(projectId));
|
||||||
if (!project) {
|
if (!project) {
|
||||||
@@ -5276,7 +5386,7 @@ export default {
|
|||||||
this.form.undertakeDeptName = project.undertakeDeptName || '';
|
this.form.undertakeDeptName = project.undertakeDeptName || '';
|
||||||
this.form.projectFundLimit = project.fundLimit || project.projectFundLimit || 0;
|
this.form.projectFundLimit = project.fundLimit || project.projectFundLimit || 0;
|
||||||
this.form.usedFundLimit = 0;
|
this.form.usedFundLimit = 0;
|
||||||
this.form.remainingFundLimit = 0;
|
this.form.remainingFundLimit = this.calculateRemainingFundLimit();
|
||||||
if (this.contractSelectEnabled || this.config.enableTransportPlanForm) {
|
if (this.contractSelectEnabled || this.config.enableTransportPlanForm) {
|
||||||
this.form.customerName =
|
this.form.customerName =
|
||||||
project.customerName ||
|
project.customerName ||
|
||||||
@@ -7618,11 +7728,16 @@ export default {
|
|||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
|
this.contractExpiryScope = '';
|
||||||
|
this.contractSignType = '';
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
},
|
},
|
||||||
searchChange(params, done) {
|
searchChange(params, done) {
|
||||||
this.query = params;
|
this.query = {
|
||||||
|
...params,
|
||||||
|
...(this.contractSignType ? { signType: this.contractSignType } : {}),
|
||||||
|
};
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page, params);
|
this.onLoad(this.page, params);
|
||||||
done();
|
done();
|
||||||
@@ -7645,6 +7760,25 @@ export default {
|
|||||||
refreshChange() {
|
refreshChange() {
|
||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
},
|
},
|
||||||
|
handleSearchIconChange(expanded) {
|
||||||
|
this.searchExpanded = expanded;
|
||||||
|
},
|
||||||
|
handleContractExpiryScopeChange(expireScope) {
|
||||||
|
this.contractExpiryScope = expireScope;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
refreshContractExpiryStats(query) {
|
||||||
|
if (!this.config.enableContractExpiryTags || typeof this.api.expireStats !== 'function') return;
|
||||||
|
const statsQuery = { ...query };
|
||||||
|
delete statsQuery.expireScope;
|
||||||
|
this.api.expireStats(statsQuery).then(res => {
|
||||||
|
this.contractExpiryStats = {
|
||||||
|
...this.contractExpiryStats,
|
||||||
|
...(res.data.data || {}),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
handleScopeChange() {
|
handleScopeChange() {
|
||||||
if (!this.canViewAllDept) {
|
if (!this.canViewAllDept) {
|
||||||
this.allDept = 0;
|
this.allDept = 0;
|
||||||
@@ -7701,7 +7835,13 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const query = this.normalizeQueryParams({ ...params, ...this.query, allDept: this.allDept });
|
const query = this.normalizeQueryParams({
|
||||||
|
...params,
|
||||||
|
...this.query,
|
||||||
|
allDept: this.allDept,
|
||||||
|
...(this.contractSignType ? { signType: this.contractSignType } : {}),
|
||||||
|
...(this.contractExpiryScope ? { expireScope: this.contractExpiryScope } : {}),
|
||||||
|
});
|
||||||
this.api
|
this.api
|
||||||
.getList(page.currentPage, page.pageSize, query)
|
.getList(page.currentPage, page.pageSize, query)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -7709,6 +7849,7 @@ export default {
|
|||||||
this.page.total = result.total;
|
this.page.total = result.total;
|
||||||
this.data = result.records;
|
this.data = result.records;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
|
this.refreshContractExpiryStats(query);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@@ -8612,6 +8753,38 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__contract-expiry-search {
|
||||||
|
display: flex;
|
||||||
|
order: -1;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-right: auto;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
|
:deep(.el-select) {
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__contract-expiry-label {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
min-width: 140px;
|
||||||
|
color: #606266;
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__contract-expiry-tags {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
:deep(.el-check-tag) {
|
||||||
|
margin: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dialog-section-title {
|
.dialog-section-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -9422,6 +9595,10 @@ export default {
|
|||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__billing-plan-remark {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
&__billing-rule-head {
|
&__billing-rule-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="canMajorProjectSupplement"
|
v-if="canMajorProjectSupplement"
|
||||||
@click="openProjectDialog('majorSupplement')"
|
@click="openProjectDialog('majorSupplement')"
|
||||||
>
|
>
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="canCreate"
|
v-if="canCreate"
|
||||||
@click="openProjectDialog('add')"
|
@click="openProjectDialog('add')"
|
||||||
>
|
>
|
||||||
@@ -176,21 +174,16 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="承办部门" prop="undertakeDeptId">
|
<el-form-item label="承办部门" prop="undertakeDeptId">
|
||||||
<el-select
|
<el-cascader
|
||||||
v-model="form.undertakeDeptId"
|
v-model="form.undertakeDeptId"
|
||||||
placeholder="请选择承办部门"
|
placeholder="请选择承办部门"
|
||||||
filterable
|
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
|
:options="deptTreeOptions"
|
||||||
|
:props="deptCascaderProps"
|
||||||
:disabled="isBasicInfoReadonly"
|
:disabled="isBasicInfoReadonly"
|
||||||
@change="handleUndertakeDeptChange"
|
@change="handleUndertakeDeptChange"
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in deptOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目由来" prop="projectSource">
|
<el-form-item label="项目由来" prop="projectSource">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -217,9 +210,11 @@
|
|||||||
<el-form-item label="客户名称" prop="customerNames">
|
<el-form-item label="客户名称" prop="customerNames">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectedCustomerId"
|
v-model="selectedCustomerId"
|
||||||
placeholder="搜索选择"
|
placeholder="支持多选,选择后下方列表展示"
|
||||||
|
multiple
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
|
collapse-tags
|
||||||
:loading="customerLoading"
|
:loading="customerLoading"
|
||||||
@visible-change="visible => visible && loadCustomerOptions('客户')"
|
@visible-change="visible => visible && loadCustomerOptions('客户')"
|
||||||
@change="handleCustomerChange"
|
@change="handleCustomerChange"
|
||||||
@@ -257,6 +252,7 @@
|
|||||||
v-model="form.fundLimit"
|
v-model="form.fundLimit"
|
||||||
placeholder="实际业务回款周期内付款额度"
|
placeholder="实际业务回款周期内付款额度"
|
||||||
@input="value => handleNumberInput('fundLimit', value)"
|
@input="value => handleNumberInput('fundLimit', value)"
|
||||||
|
@blur="formatAmountField('fundLimit')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目应收账款额度(万元)" prop="receivableLimit">
|
<el-form-item label="项目应收账款额度(万元)" prop="receivableLimit">
|
||||||
@@ -264,6 +260,7 @@
|
|||||||
v-model="form.receivableLimit"
|
v-model="form.receivableLimit"
|
||||||
placeholder="回款期内最大应收账款额度"
|
placeholder="回款期内最大应收账款额度"
|
||||||
@input="value => handleNumberInput('receivableLimit', value)"
|
@input="value => handleNumberInput('receivableLimit', value)"
|
||||||
|
@blur="formatAmountField('receivableLimit')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="应收账款回款期限" prop="receivableDays">
|
<el-form-item label="应收账款回款期限" prop="receivableDays">
|
||||||
@@ -466,13 +463,25 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="project-apply-form__material-card">
|
||||||
<div class="project-apply-form__material-head">
|
<div class="project-apply-form__material-head">
|
||||||
<div class="dialog-section-title project-apply-form__material-title">项目材料</div>
|
<div class="dialog-section-title project-apply-form__material-title">项目材料</div>
|
||||||
<el-button type="primary" :disabled="!attachmentRows.length" @click="handleBatchDownload"
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="!attachmentRows.length"
|
||||||
|
@click="handleBatchDownload"
|
||||||
>批量下载</el-button
|
>批量下载</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="attachmentRows" border class="project-apply-form__table">
|
<el-alert
|
||||||
|
v-if="dialogReadonly && missingRequiredAttachmentTypes.length"
|
||||||
|
class="project-apply-form__material-warning"
|
||||||
|
type="warning"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
:title="`缺少必需材料:${missingRequiredAttachmentTypes.join('、')}`"
|
||||||
|
/>
|
||||||
|
<el-table :data="attachmentRows" border class="project-apply-form__material-table">
|
||||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||||
<el-table-column label="附件类型" min-width="160" align="center">
|
<el-table-column label="附件类型" min-width="160" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -506,10 +515,7 @@
|
|||||||
<el-table-column label="操作" width="110" align="center">
|
<el-table-column label="操作" width="110" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-link type="primary" @click="downloadAttachment(row)">下载</el-link>
|
<el-link type="primary" @click="downloadAttachment(row)">下载</el-link>
|
||||||
<el-link
|
<el-link v-if="!dialogReadonly" type="primary" @click="removeAttachment($index)"
|
||||||
v-if="!dialogReadonly"
|
|
||||||
type="primary"
|
|
||||||
@click="removeAttachment($index)"
|
|
||||||
>删除</el-link
|
>删除</el-link
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -520,11 +526,12 @@
|
|||||||
class="project-apply-form__upload"
|
class="project-apply-form__upload"
|
||||||
:readonly="dialogReadonly"
|
:readonly="dialogReadonly"
|
||||||
:file-types="attachmentFileTypes"
|
:file-types="attachmentFileTypes"
|
||||||
:max-size="500"
|
:max-size="50"
|
||||||
button-text="上传附件"
|
button-text="上传附件"
|
||||||
tip="支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件大小限制500M"
|
tip="支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件大小限制50M"
|
||||||
@change="handleAttachmentChange"
|
@change="handleAttachmentChange"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!isChangeDialog" class="dialog-section-title project-apply-form__table-title">
|
<div v-if="!isChangeDialog" class="dialog-section-title project-apply-form__table-title">
|
||||||
变更记录
|
变更记录
|
||||||
@@ -595,16 +602,24 @@
|
|||||||
:class="{ 'project-apply-dialog__footer--change': isChangeDialog }"
|
:class="{ 'project-apply-dialog__footer--change': isChangeDialog }"
|
||||||
>
|
>
|
||||||
<template v-if="isChangeDialog">
|
<template v-if="isChangeDialog">
|
||||||
<el-button type="primary" :loading="submitLoading" @click="submitChangeProject">
|
|
||||||
提交
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" :loading="submitLoading" @click="saveChangeProject">
|
<el-button type="primary" :loading="submitLoading" @click="saveChangeProject">
|
||||||
保存
|
保存
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="projectBox = false">关闭</el-button>
|
<el-button type="primary" :loading="submitLoading" @click="submitChangeProject">
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="handleCancelProject">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-button @click="projectBox = false">取消</el-button>
|
<el-button @click="handleCancelProject">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="!dialogReadonly"
|
||||||
|
type="primary"
|
||||||
|
:loading="submitLoading"
|
||||||
|
@click="saveProject"
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!dialogReadonly"
|
v-if="!dialogReadonly"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -745,6 +760,7 @@ const changeTypeOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const normalProjectAttachmentTypeOptions = [
|
const normalProjectAttachmentTypeOptions = [
|
||||||
|
'项目立项报告',
|
||||||
'利润测算表',
|
'利润测算表',
|
||||||
'单一来源供应商申请表/三方比价表',
|
'单一来源供应商申请表/三方比价表',
|
||||||
'合同模板',
|
'合同模板',
|
||||||
@@ -754,6 +770,7 @@ const normalProjectAttachmentTypeOptions = [
|
|||||||
].map(item => ({ label: item, value: item }));
|
].map(item => ({ label: item, value: item }));
|
||||||
|
|
||||||
const majorProjectAttachmentTypeOptions = [
|
const majorProjectAttachmentTypeOptions = [
|
||||||
|
'项目立项报告',
|
||||||
'会议纪要',
|
'会议纪要',
|
||||||
'评审表决票',
|
'评审表决票',
|
||||||
'利润测算表',
|
'利润测算表',
|
||||||
@@ -875,6 +892,8 @@ export default {
|
|||||||
fundDemand: [{ label: '资金需求', validator: validateAmount, trigger: 'blur' }],
|
fundDemand: [{ label: '资金需求', validator: validateAmount, trigger: 'blur' }],
|
||||||
handlerUserId: [
|
handlerUserId: [
|
||||||
{
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择项目经办人',
|
||||||
label: '项目经办人',
|
label: '项目经办人',
|
||||||
nameProp: 'handlerUserName',
|
nameProp: 'handlerUserName',
|
||||||
validator: validateUser,
|
validator: validateUser,
|
||||||
@@ -883,6 +902,8 @@ export default {
|
|||||||
],
|
],
|
||||||
principalUserId: [
|
principalUserId: [
|
||||||
{
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择项目负责人',
|
||||||
label: '项目负责人',
|
label: '项目负责人',
|
||||||
nameProp: 'principalUserName',
|
nameProp: 'principalUserName',
|
||||||
validator: validateUser,
|
validator: validateUser,
|
||||||
@@ -899,8 +920,16 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
|
deptTreeOptions: [],
|
||||||
|
deptCascaderProps: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
children: 'children',
|
||||||
|
emitPath: false,
|
||||||
|
checkStrictly: true,
|
||||||
|
},
|
||||||
cargoTypeOptions: [],
|
cargoTypeOptions: [],
|
||||||
selectedCustomerId: '',
|
selectedCustomerId: [],
|
||||||
selectedCarrierIds: [],
|
selectedCarrierIds: [],
|
||||||
customerOptions: [],
|
customerOptions: [],
|
||||||
carrierOptions: [],
|
carrierOptions: [],
|
||||||
@@ -993,6 +1022,12 @@ export default {
|
|||||||
? majorProjectAttachmentTypeOptions
|
? majorProjectAttachmentTypeOptions
|
||||||
: normalProjectAttachmentTypeOptions;
|
: normalProjectAttachmentTypeOptions;
|
||||||
},
|
},
|
||||||
|
missingRequiredAttachmentTypes() {
|
||||||
|
const uploadedTypes = new Set(this.attachmentRows.map(item => item.fileType).filter(Boolean));
|
||||||
|
return this.projectAttachmentTypeOptions
|
||||||
|
.map(item => item.value)
|
||||||
|
.filter(fileType => !uploadedTypes.has(fileType));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadDeptOptions();
|
this.loadDeptOptions();
|
||||||
@@ -1233,7 +1268,7 @@ export default {
|
|||||||
if (type === 'add' || type === 'majorSupplement') {
|
if (type === 'add' || type === 'majorSupplement') {
|
||||||
this.applyProjectDetail({
|
this.applyProjectDetail({
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
projectType: type === 'majorSupplement' ? '重大项目' : '',
|
projectType: type === 'majorSupplement' ? '重大项目' : '普通项目',
|
||||||
});
|
});
|
||||||
this.fillDefaultUsers();
|
this.fillDefaultUsers();
|
||||||
return;
|
return;
|
||||||
@@ -1253,21 +1288,35 @@ export default {
|
|||||||
this.carrierRows = [];
|
this.carrierRows = [];
|
||||||
this.attachmentRows = [];
|
this.attachmentRows = [];
|
||||||
this.changeRows = [];
|
this.changeRows = [];
|
||||||
this.selectedCustomerId = '';
|
this.selectedCustomerId = [];
|
||||||
this.selectedCarrierIds = [];
|
this.selectedCarrierIds = [];
|
||||||
},
|
},
|
||||||
applyProjectDetail(row) {
|
applyProjectDetail(row) {
|
||||||
|
const displayRow = {
|
||||||
|
...row,
|
||||||
|
fundLimit: this.formatAmount(row.fundLimit),
|
||||||
|
receivableLimit: this.formatAmount(row.receivableLimit),
|
||||||
|
...(this.dialogReadonly
|
||||||
|
? {
|
||||||
|
projectScale: this.normalizeReadonlyAmount(row.projectScale),
|
||||||
|
estimatedProfit: this.normalizeReadonlyAmount(row.estimatedProfit),
|
||||||
|
fundDemand: this.normalizeReadonlyAmount(row.fundDemand),
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
};
|
||||||
const form = {
|
const form = {
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
...row,
|
...displayRow,
|
||||||
|
handlerUserName: this.resolveUserRealName(displayRow, 'handler'),
|
||||||
|
principalUserName: this.resolveUserRealName(displayRow, 'principal'),
|
||||||
businessDateRange:
|
businessDateRange:
|
||||||
row.businessStartDate && row.businessEndDate
|
displayRow.businessStartDate && displayRow.businessEndDate
|
||||||
? [row.businessStartDate, row.businessEndDate]
|
? [displayRow.businessStartDate, displayRow.businessEndDate]
|
||||||
: [],
|
: [],
|
||||||
};
|
};
|
||||||
const situation = this.parseSituation(row.situationRemark);
|
const situation = this.parseSituation(displayRow.situationRemark);
|
||||||
const customerRows = this.parseJsonArray(row.customerJson);
|
const customerRows = this.parseJsonArray(displayRow.customerJson);
|
||||||
const carrierRows = this.parseJsonArray(row.carrierJson);
|
const carrierRows = this.parseJsonArray(displayRow.carrierJson);
|
||||||
this.form = {
|
this.form = {
|
||||||
...form,
|
...form,
|
||||||
...situation,
|
...situation,
|
||||||
@@ -1276,9 +1325,11 @@ export default {
|
|||||||
};
|
};
|
||||||
this.customerRows = customerRows;
|
this.customerRows = customerRows;
|
||||||
this.carrierRows = carrierRows;
|
this.carrierRows = carrierRows;
|
||||||
this.attachmentRows = this.parseJsonArray(row.attachmentsJson);
|
this.attachmentRows = this.parseJsonArray(displayRow.attachmentsJson);
|
||||||
this.changeRows = this.buildChangeRows(row);
|
this.changeRows = this.buildChangeRows(displayRow);
|
||||||
this.selectedCustomerId = this.getCustomerRowId(this.customerRows[0]);
|
this.selectedCustomerId = this.customerRows
|
||||||
|
.map(item => this.getCustomerRowId(item))
|
||||||
|
.filter(Boolean);
|
||||||
this.selectedCarrierIds = this.carrierRows
|
this.selectedCarrierIds = this.carrierRows
|
||||||
.map(item => this.getCustomerRowId(item))
|
.map(item => this.getCustomerRowId(item))
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
@@ -1287,7 +1338,13 @@ export default {
|
|||||||
fillDefaultUsers() {
|
fillDefaultUsers() {
|
||||||
const userId = this.userInfo?.userId || this.userInfo?.id || '';
|
const userId = this.userInfo?.userId || this.userInfo?.id || '';
|
||||||
const userName =
|
const userName =
|
||||||
this.userInfo?.realName || this.userInfo?.userName || this.userInfo?.account || '';
|
this.userInfo?.realName ||
|
||||||
|
this.userInfo?.real_name ||
|
||||||
|
this.userInfo?.name ||
|
||||||
|
this.userInfo?.userName ||
|
||||||
|
this.userInfo?.user_name ||
|
||||||
|
this.userInfo?.account ||
|
||||||
|
'';
|
||||||
if (userId && userName) {
|
if (userId && userName) {
|
||||||
this.form.handlerUserId = userId;
|
this.form.handlerUserId = userId;
|
||||||
this.form.handlerUserName = userName;
|
this.form.handlerUserName = userName;
|
||||||
@@ -1295,6 +1352,16 @@ export default {
|
|||||||
this.form.principalUserName = userName;
|
this.form.principalUserName = userName;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
resolveUserRealName(row = {}, role) {
|
||||||
|
return (
|
||||||
|
row[`${role}RealName`] ||
|
||||||
|
row[`${role}UserRealName`] ||
|
||||||
|
row[`${role}User`]?.realName ||
|
||||||
|
row[role]?.realName ||
|
||||||
|
row[`${role}UserName`] ||
|
||||||
|
''
|
||||||
|
);
|
||||||
|
},
|
||||||
resolveChangeType(row = {}) {
|
resolveChangeType(row = {}) {
|
||||||
if (row.changeType) return row.changeType;
|
if (row.changeType) return row.changeType;
|
||||||
const node = row.currentNode || '';
|
const node = row.currentNode || '';
|
||||||
@@ -1330,6 +1397,36 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
saveProject() {
|
||||||
|
this.submitLoading = true;
|
||||||
|
this.api
|
||||||
|
.saveDraft(this.normalizeSubmitForm())
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false || res.data?.data === false) {
|
||||||
|
this.$message.error(res.data?.msg || '保存失败,请联系管理员');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success('保存成功!');
|
||||||
|
this.projectBox = false;
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.submitLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCancelProject() {
|
||||||
|
if (!['add', 'majorSupplement', 'change'].includes(this.dialogType)) {
|
||||||
|
this.projectBox = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确认后直接关闭弹窗,列表无数据变更,是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.projectBox = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
saveChangeProject() {
|
saveChangeProject() {
|
||||||
this.submitChangeForm(false);
|
this.submitChangeForm(false);
|
||||||
},
|
},
|
||||||
@@ -1366,6 +1463,8 @@ export default {
|
|||||||
const [businessStartDate, businessEndDate] = this.form.businessDateRange || [];
|
const [businessStartDate, businessEndDate] = this.form.businessDateRange || [];
|
||||||
const submitRow = {
|
const submitRow = {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
fundLimit: this.formatAmount(this.form.fundLimit),
|
||||||
|
receivableLimit: this.formatAmount(this.form.receivableLimit),
|
||||||
businessStartDate,
|
businessStartDate,
|
||||||
businessEndDate,
|
businessEndDate,
|
||||||
customerJson: JSON.stringify(this.customerRows),
|
customerJson: JSON.stringify(this.customerRows),
|
||||||
@@ -1479,6 +1578,11 @@ export default {
|
|||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
},
|
},
|
||||||
|
normalizeReadonlyAmount(value) {
|
||||||
|
return value === null || value === undefined || value === '' || Number(value) === -1
|
||||||
|
? ''
|
||||||
|
: value;
|
||||||
|
},
|
||||||
mergeCustomerOptions(options = [], selectedOptions = []) {
|
mergeCustomerOptions(options = [], selectedOptions = []) {
|
||||||
const result = [...selectedOptions];
|
const result = [...selectedOptions];
|
||||||
options.forEach(option => {
|
options.forEach(option => {
|
||||||
@@ -1507,7 +1611,7 @@ export default {
|
|||||||
changeType:
|
changeType:
|
||||||
row.changeType ||
|
row.changeType ||
|
||||||
(String(row.currentNode || '').includes('备案') ? '项目备案调整' : '项目变更'),
|
(String(row.currentNode || '').includes('备案') ? '项目备案调整' : '项目变更'),
|
||||||
handler: row.handlerUserName || '',
|
handler: this.resolveUserRealName(row, 'handler'),
|
||||||
content: row.changeContent || '',
|
content: row.changeContent || '',
|
||||||
reason: row.changeReason || '',
|
reason: row.changeReason || '',
|
||||||
status: row.approvalStatusName || row.approvalStatus || '',
|
status: row.approvalStatusName || row.approvalStatus || '',
|
||||||
@@ -1531,9 +1635,18 @@ export default {
|
|||||||
},
|
},
|
||||||
loadDeptOptions() {
|
loadDeptOptions() {
|
||||||
getDeptTree().then(res => {
|
getDeptTree().then(res => {
|
||||||
this.deptOptions = this.flattenDept(res.data.data || []);
|
const deptTree = res.data.data || [];
|
||||||
|
this.deptOptions = this.flattenDept(deptTree);
|
||||||
|
this.deptTreeOptions = this.toDeptCascaderOptions(deptTree);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
toDeptCascaderOptions(list = []) {
|
||||||
|
return list.map(item => ({
|
||||||
|
label: item.title || item.deptName || item.name,
|
||||||
|
value: item.id,
|
||||||
|
children: item.children?.length ? this.toDeptCascaderOptions(item.children) : undefined,
|
||||||
|
}));
|
||||||
|
},
|
||||||
flattenDept(list = [], level = 0) {
|
flattenDept(list = [], level = 0) {
|
||||||
return list.reduce((result, item) => {
|
return list.reduce((result, item) => {
|
||||||
const label = item.title || item.deptName || item.name;
|
const label = item.title || item.deptName || item.name;
|
||||||
@@ -1568,7 +1681,11 @@ export default {
|
|||||||
const loadingKey = type === '客户' ? 'customerLoading' : 'carrierLoading';
|
const loadingKey = type === '客户' ? 'customerLoading' : 'carrierLoading';
|
||||||
const optionsKey = type === '客户' ? 'customerOptions' : 'carrierOptions';
|
const optionsKey = type === '客户' ? 'customerOptions' : 'carrierOptions';
|
||||||
this[loadingKey] = true;
|
this[loadingKey] = true;
|
||||||
getCustomerArchiveList(1, 100, { customerType: type, status: 1 })
|
getCustomerArchiveList(1, 100, {
|
||||||
|
customerType: type,
|
||||||
|
status: 1,
|
||||||
|
...(type === '客户' ? { approvalStatus: 'approved' } : {}),
|
||||||
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const records = (res.data.data && res.data.data.records) || [];
|
const records = (res.data.data && res.data.data.records) || [];
|
||||||
const selectedOptions = this.buildCustomerOptionsFromRows(
|
const selectedOptions = this.buildCustomerOptionsFromRows(
|
||||||
@@ -1592,16 +1709,16 @@ export default {
|
|||||||
raw: item,
|
raw: item,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleCustomerChange(id) {
|
handleCustomerChange(ids) {
|
||||||
if (!id) {
|
if (!ids || !ids.length) {
|
||||||
this.customerRows = [];
|
this.customerRows = [];
|
||||||
this.form.customerNames = '';
|
this.form.customerNames = '';
|
||||||
this.form.customerJson = '';
|
this.form.customerJson = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loadCustomerDetailRow(id, 'customer').then(row => {
|
Promise.all(ids.map(id => this.loadCustomerDetailRow(id, 'customer'))).then(rows => {
|
||||||
this.customerRows = [row];
|
this.customerRows = rows;
|
||||||
this.form.customerNames = row.customer;
|
this.form.customerNames = rows.map(item => item.customer).join('、');
|
||||||
this.form.customerJson = JSON.stringify(this.customerRows);
|
this.form.customerJson = JSON.stringify(this.customerRows);
|
||||||
this.syncSelectedCustomerOptions();
|
this.syncSelectedCustomerOptions();
|
||||||
this.$refs.projectForm?.validateField('customerNames');
|
this.$refs.projectForm?.validateField('customerNames');
|
||||||
@@ -1654,6 +1771,14 @@ export default {
|
|||||||
this.form[prop] =
|
this.form[prop] =
|
||||||
parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 2)}` : parts[0];
|
parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 2)}` : parts[0];
|
||||||
},
|
},
|
||||||
|
formatAmount(value) {
|
||||||
|
if (value === null || value === undefined || value === '' || Number(value) === -1) return '';
|
||||||
|
const amount = Number(value);
|
||||||
|
return Number.isFinite(amount) ? amount.toFixed(2) : value;
|
||||||
|
},
|
||||||
|
formatAmountField(prop) {
|
||||||
|
this.form[prop] = this.formatAmount(this.form[prop]);
|
||||||
|
},
|
||||||
handleIntegerInput(prop, value) {
|
handleIntegerInput(prop, value) {
|
||||||
this.form[prop] = String(value || '').replace(/[^\d]/g, '');
|
this.form[prop] = String(value || '').replace(/[^\d]/g, '');
|
||||||
},
|
},
|
||||||
@@ -1834,13 +1959,36 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__material-card {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 12px 16px;
|
padding: 14px 16px;
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__material-table {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
:deep(.el-table__header th) {
|
||||||
|
background: #f5f7fa;
|
||||||
|
color: #303133;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table__cell) {
|
||||||
|
border-color: #eff1f7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__material-warning {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
&__material-title {
|
&__material-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('driver_add')"
|
v-if="hasPermission('driver_add')"
|
||||||
@click="openDriver()"
|
@click="openDriver()"
|
||||||
>新增
|
>新增
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('transport_ship_add')"
|
v-if="hasPermission('transport_ship_add')"
|
||||||
@click="openShip()"
|
@click="openShip()"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('transport_vehicle_add')"
|
v-if="hasPermission('transport_vehicle_add')"
|
||||||
@click="openVehicle()"
|
@click="openVehicle()"
|
||||||
>新增
|
>新增
|
||||||
|
|||||||
@@ -20,35 +20,10 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('credit_score_quantification_add')"
|
v-if="hasPermission('credit_score_quantification_add')"
|
||||||
@click="openConfig()"
|
@click="openConfig()"
|
||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-upload"
|
|
||||||
plain
|
|
||||||
v-if="hasPermission('credit_score_quantification_import')"
|
|
||||||
@click="handleImport"
|
|
||||||
>批量导入
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-download"
|
|
||||||
plain
|
|
||||||
v-if="hasPermission('credit_score_quantification_template')"
|
|
||||||
@click="handleTemplate"
|
|
||||||
>下载模板
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-download"
|
|
||||||
plain
|
|
||||||
v-if="hasPermission('credit_score_quantification_export')"
|
|
||||||
@click="handleExport"
|
|
||||||
>批量导出
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@@ -71,28 +46,28 @@
|
|||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('credit_score_quantification_edit')"
|
v-if="hasPermission('credit_score_quantification_status') && row.status === 1"
|
||||||
@click="openConfig(row)"
|
@click="handleStatus(row)"
|
||||||
>
|
>
|
||||||
编辑
|
停用
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('credit_score_quantification_publish') && row.status === 3"
|
v-if="hasPermission('credit_score_quantification_publish') && row.status !== 1"
|
||||||
@click="handlePublish(row)"
|
@click="handlePublish(row)"
|
||||||
>
|
>
|
||||||
发布
|
发布
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('credit_score_quantification_status') && row.status !== 3"
|
v-if="hasPermission('credit_score_quantification_edit') && row.status !== 1"
|
||||||
@click="handleStatus(row)"
|
@click="openConfig(row)"
|
||||||
>
|
>
|
||||||
{{ row.status === 1 ? '停用' : '启用' }}
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="hasPermission('credit_score_quantification_delete') && row.status === 3"
|
v-if="hasPermission('credit_score_quantification_delete')"
|
||||||
@click="rowDel(row)"
|
@click="rowDel(row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -100,16 +75,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<el-dialog title="评分量化表数据导入" append-to-body v-model="excelBox" width="555px">
|
|
||||||
<avue-form :option="excelOption" v-model="excelForm">
|
|
||||||
<template #excelTemplate>
|
|
||||||
<el-button type="primary" @click="handleTemplate">
|
|
||||||
点击下载<i class="el-icon-download el-icon--right"></i>
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</avue-form>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="readonly ? '查看评分量化表' : configForm.id ? '编辑评分量化表' : '新增评分量化表'"
|
:title="readonly ? '查看评分量化表' : configForm.id ? '编辑评分量化表' : '新增评分量化表'"
|
||||||
append-to-body
|
append-to-body
|
||||||
@@ -128,10 +93,21 @@
|
|||||||
:disabled="readonly"
|
:disabled="readonly"
|
||||||
>
|
>
|
||||||
<el-form-item label="评定表名称" required>
|
<el-form-item label="评定表名称" required>
|
||||||
<el-input v-model="configForm.name" maxlength="30" show-word-limit />
|
<el-input
|
||||||
|
v-model="configForm.name"
|
||||||
|
class="score-config__name-input"
|
||||||
|
maxlength="30"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="configForm.remark" type="textarea" maxlength="500" show-word-limit />
|
<el-input
|
||||||
|
v-model="configForm.remark"
|
||||||
|
type="textarea"
|
||||||
|
:rows="1"
|
||||||
|
maxlength="500"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -160,16 +136,6 @@
|
|||||||
<el-table :data="configForm.standards" border class="config-table">
|
<el-table :data="configForm.standards" border class="config-table">
|
||||||
<el-table-column label="序号" type="index" width="90" align="center" />
|
<el-table-column label="序号" type="index" width="90" align="center" />
|
||||||
<el-table-column label="信用等级" prop="creditLevel" width="120" align="center" />
|
<el-table-column label="信用等级" prop="creditLevel" width="120" align="center" />
|
||||||
<el-table-column label="得分率" width="160" align="center">
|
|
||||||
<template #default="{ row }"
|
|
||||||
>{{ row.scoreRateLower }}% - {{ row.scoreRateUpper }}%</template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="最大资金使用额度(万元)" width="210" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ row.creditLimitLower }} - {{ row.creditLimitUpper }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="标准说明" prop="standardDescription" min-width="320" />
|
<el-table-column label="标准说明" prop="standardDescription" min-width="320" />
|
||||||
<el-table-column label="操作" width="160" align="center">
|
<el-table-column label="操作" width="160" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
@@ -192,7 +158,7 @@
|
|||||||
append-to-body
|
append-to-body
|
||||||
v-model="categoryBox"
|
v-model="categoryBox"
|
||||||
width="82%"
|
width="82%"
|
||||||
class="score-dialog"
|
class="score-dialog category-dialog"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
>
|
>
|
||||||
<div class="category-detail">
|
<div class="category-detail">
|
||||||
@@ -317,43 +283,62 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="得分率(%)" required>
|
<el-form-item label="得分率(%)" required>
|
||||||
<div class="range-input">
|
<div class="range-input standard-range-input">
|
||||||
<el-input-number
|
<el-input
|
||||||
v-model="standardForm.scoreRateLower"
|
v-model="standardForm.scoreRateLower"
|
||||||
:min="0"
|
inputmode="numeric"
|
||||||
:max="100"
|
@input="value => handleStandardNumberInput('scoreRateLower', value, 0, 100)"
|
||||||
:precision="0"
|
|
||||||
/>
|
/>
|
||||||
<span>至</span>
|
<span>至</span>
|
||||||
<el-input-number
|
<el-input
|
||||||
v-model="standardForm.scoreRateUpper"
|
v-model="standardForm.scoreRateUpper"
|
||||||
:min="0"
|
inputmode="numeric"
|
||||||
:max="100"
|
@input="value => handleStandardNumberInput('scoreRateUpper', value, 0, 100)"
|
||||||
:precision="0"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="得分率每增加" required>
|
|
||||||
<el-input-number v-model="standardForm.scoreRateIncrease" :min="0" :precision="0" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="最大资金使用额度(万元)" required>
|
<el-form-item label="得分率每增加" required>
|
||||||
<div class="range-input">
|
<el-input
|
||||||
<el-input-number v-model="standardForm.creditLimitLower" :min="0" :precision="2" />
|
v-model="standardForm.scoreRateIncrease"
|
||||||
<span>至</span>
|
inputmode="numeric"
|
||||||
<el-input-number v-model="standardForm.creditLimitUpper" :min="0" :precision="2" />
|
@input="value => handleStandardNumberInput('scoreRateIncrease', value)"
|
||||||
</div>
|
>
|
||||||
|
<template #suffix>%</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="额度增加" required>
|
<el-form-item label="额度增加" required>
|
||||||
<el-input-number v-model="standardForm.creditLimitIncrease" :min="0" :precision="2" />
|
<el-input
|
||||||
<span class="score-unit">万元</span>
|
v-model="standardForm.creditLimitIncrease"
|
||||||
|
inputmode="decimal"
|
||||||
|
@input="value => handleStandardNumberInput('creditLimitIncrease', value, 2)"
|
||||||
|
>
|
||||||
|
<template #suffix>万元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="最大资金使用额度(万元)" required>
|
||||||
|
<div class="range-input standard-range-input">
|
||||||
|
<el-input
|
||||||
|
v-model="standardForm.creditLimitLower"
|
||||||
|
inputmode="decimal"
|
||||||
|
@input="value => handleStandardNumberInput('creditLimitLower', value, 2)"
|
||||||
|
/>
|
||||||
|
<span>至</span>
|
||||||
|
<el-input
|
||||||
|
v-model="standardForm.creditLimitUpper"
|
||||||
|
inputmode="decimal"
|
||||||
|
@input="value => handleStandardNumberInput('creditLimitUpper', value, 2)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -383,14 +368,8 @@ import {
|
|||||||
publish,
|
publish,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
} from '@/api/vehicle/credit-score-quantification';
|
} from '@/api/vehicle/credit-score-quantification';
|
||||||
import { exportBlob } from '@/api/common';
|
|
||||||
import { downloadXls } from '@/utils/util';
|
|
||||||
import { openImportDialog } from '@/utils/import-excel';
|
|
||||||
import { getToken } from '@/utils/auth';
|
|
||||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import NProgress from 'nprogress';
|
|
||||||
import 'nprogress/nprogress.css';
|
|
||||||
|
|
||||||
const createTimeRangeMap = {
|
const createTimeRangeMap = {
|
||||||
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
||||||
@@ -413,9 +392,7 @@ export default {
|
|||||||
categoryBox: false,
|
categoryBox: false,
|
||||||
itemBox: false,
|
itemBox: false,
|
||||||
standardBox: false,
|
standardBox: false,
|
||||||
excelBox: false,
|
|
||||||
readonly: false,
|
readonly: false,
|
||||||
excelForm: {},
|
|
||||||
configForm: this.emptyConfig(),
|
configForm: this.emptyConfig(),
|
||||||
currentCategory: { items: [] },
|
currentCategory: { items: [] },
|
||||||
currentItemIndex: -1,
|
currentItemIndex: -1,
|
||||||
@@ -455,7 +432,7 @@ export default {
|
|||||||
menuWidth: 160,
|
menuWidth: 160,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '评定表名称',
|
label: '评分表名称',
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
slot: true,
|
slot: true,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
@@ -464,23 +441,10 @@ export default {
|
|||||||
rules: [{ required: true, message: '请输入评定表名称', trigger: 'blur' }],
|
rules: [{ required: true, message: '请输入评定表名称', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '创建人',
|
||||||
prop: 'remark',
|
prop: 'createUserName',
|
||||||
minWidth: 260,
|
minWidth: 120,
|
||||||
overHidden: true,
|
display: false,
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '状态',
|
|
||||||
prop: 'status',
|
|
||||||
type: 'select',
|
|
||||||
search: true,
|
|
||||||
slot: true,
|
|
||||||
dataType: 'number',
|
|
||||||
dicData: [
|
|
||||||
{ label: '正常', value: 1 },
|
|
||||||
{ label: '停用', value: 2 },
|
|
||||||
{ label: '草稿', value: 3 },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
@@ -489,6 +453,22 @@ export default {
|
|||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
|
display: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
prop: 'status',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
slot: true,
|
||||||
|
dataType: 'number',
|
||||||
|
searchValue: '',
|
||||||
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '正常', value: 1 },
|
||||||
|
{ label: '停用', value: 2 },
|
||||||
|
],
|
||||||
|
clearable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
@@ -502,33 +482,6 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
excelOption: {
|
|
||||||
labelPosition: 'right',
|
|
||||||
submitBtn: false,
|
|
||||||
emptyBtn: false,
|
|
||||||
column: [
|
|
||||||
{
|
|
||||||
label: '模板上传',
|
|
||||||
prop: 'excelFile',
|
|
||||||
type: 'upload',
|
|
||||||
drag: true,
|
|
||||||
loadText: '模板上传中,请稍等',
|
|
||||||
span: 24,
|
|
||||||
propsHttp: {
|
|
||||||
res: 'data',
|
|
||||||
},
|
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
|
||||||
action:
|
|
||||||
'/blade-transport/credit-score-quantification/import-credit-score-quantification',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '模板下载',
|
|
||||||
prop: 'excelTemplate',
|
|
||||||
formslot: true,
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -723,6 +676,18 @@ export default {
|
|||||||
this.standardForm.creditLevel = '';
|
this.standardForm.creditLevel = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleStandardNumberInput(field, value, precision = 0, max) {
|
||||||
|
let normalized = String(value || '').replace(precision > 0 ? /[^\d.]/g : /\D/g, '');
|
||||||
|
if (precision > 0) {
|
||||||
|
const [integer = '', ...decimalParts] = normalized.split('.');
|
||||||
|
const decimal = decimalParts.join('').slice(0, precision);
|
||||||
|
normalized = decimalParts.length ? `${integer}.${decimal}` : integer;
|
||||||
|
}
|
||||||
|
if (max !== undefined && normalized !== '' && Number(normalized) > max) {
|
||||||
|
normalized = String(max);
|
||||||
|
}
|
||||||
|
this.standardForm[field] = normalized;
|
||||||
|
},
|
||||||
isValidCreditLevel(creditLevel) {
|
isValidCreditLevel(creditLevel) {
|
||||||
return this.creditLevelOptions.some(item => item.value === String(creditLevel || '').trim());
|
return this.creditLevelOptions.some(item => item.value === String(creditLevel || '').trim());
|
||||||
},
|
},
|
||||||
@@ -764,6 +729,16 @@ export default {
|
|||||||
}
|
}
|
||||||
const standard = JSON.parse(JSON.stringify(this.standardForm));
|
const standard = JSON.parse(JSON.stringify(this.standardForm));
|
||||||
standard.creditLevel = String(standard.creditLevel || '').trim();
|
standard.creditLevel = String(standard.creditLevel || '').trim();
|
||||||
|
[
|
||||||
|
'scoreRateLower',
|
||||||
|
'scoreRateUpper',
|
||||||
|
'scoreRateIncrease',
|
||||||
|
'creditLimitLower',
|
||||||
|
'creditLimitUpper',
|
||||||
|
'creditLimitIncrease',
|
||||||
|
].forEach(field => {
|
||||||
|
standard[field] = Number(standard[field]);
|
||||||
|
});
|
||||||
const nextStandards = JSON.parse(JSON.stringify(this.configForm.standards));
|
const nextStandards = JSON.parse(JSON.stringify(this.configForm.standards));
|
||||||
if (this.currentStandardIndex >= 0) {
|
if (this.currentStandardIndex >= 0) {
|
||||||
nextStandards.splice(this.currentStandardIndex, 1, standard);
|
nextStandards.splice(this.currentStandardIndex, 1, standard);
|
||||||
@@ -786,7 +761,13 @@ export default {
|
|||||||
this.standardBox = false;
|
this.standardBox = false;
|
||||||
},
|
},
|
||||||
removeStandard(index) {
|
removeStandard(index) {
|
||||||
|
this.$confirm('确定删除该评估标准?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
this.configForm.standards.splice(index, 1);
|
this.configForm.standards.splice(index, 1);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
isBlankValue(value) {
|
isBlankValue(value) {
|
||||||
return value === undefined || value === null || value === '';
|
return value === undefined || value === null || value === '';
|
||||||
@@ -947,7 +928,7 @@ export default {
|
|||||||
this.$message.warning('请选择至少一条数据');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm('仅草稿状态量表可删除,确定删除所选数据?', {
|
this.$confirm('确定删除所选评分量化表?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -1024,49 +1005,9 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleImport() {
|
|
||||||
openImportDialog(this, '评分量化表');
|
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
this.$confirm('是否导出评分量化表数据?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
}).then(() => {
|
|
||||||
NProgress.start();
|
|
||||||
exportBlob(
|
|
||||||
'/blade-transport/credit-score-quantification/export-credit-score-quantification',
|
|
||||||
this.buildExportParams(),
|
|
||||||
{ feedback: true }
|
|
||||||
)
|
|
||||||
.then(res => {
|
|
||||||
downloadXls(res.data, `评分量化表${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
NProgress.done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buildExportParams() {
|
|
||||||
return {
|
|
||||||
...this.buildQuery(),
|
|
||||||
ids: this.ids,
|
|
||||||
[this.website.tokenHeader]: getToken(),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
buildQuery(params = {}) {
|
buildQuery(params = {}) {
|
||||||
return normalizeSearchRangeParams({ ...params, ...this.query }, createTimeRangeMap);
|
return normalizeSearchRangeParams({ ...params, ...this.query }, createTimeRangeMap);
|
||||||
},
|
},
|
||||||
handleTemplate() {
|
|
||||||
exportBlob(
|
|
||||||
`/blade-transport/credit-score-quantification/export-template?${
|
|
||||||
this.website.tokenHeader
|
|
||||||
}=${getToken()}`,
|
|
||||||
{ feedback: true }
|
|
||||||
).then(res => {
|
|
||||||
downloadXls(res.data, '评分量化表模板.xlsx');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -1074,6 +1015,10 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.score-config {
|
.score-config {
|
||||||
padding: 4px 12px 12px;
|
padding: 4px 12px 12px;
|
||||||
|
|
||||||
|
&__name-input {
|
||||||
|
width: min(420px, 100%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.base-form {
|
.base-form {
|
||||||
@@ -1111,10 +1056,14 @@ export default {
|
|||||||
.category-line {
|
.category-line {
|
||||||
margin: 0 0 24px;
|
margin: 0 0 24px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 400;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.category-dialog .el-dialog__title) {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
.score-item-form {
|
.score-item-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1400px;
|
max-width: 1400px;
|
||||||
@@ -1220,6 +1169,17 @@ export default {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.standard-range-input {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
|
:deep(.el-input) {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.score-unit {
|
.score-unit {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
plain
|
|
||||||
v-if="hasPermission('customer_archive_add')"
|
v-if="hasPermission('customer_archive_add')"
|
||||||
@click="openArchive()"
|
@click="openArchive()"
|
||||||
>新增
|
>新增
|
||||||
@@ -87,6 +86,16 @@
|
|||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
type="warning"
|
||||||
|
v-if="
|
||||||
|
hasPermission('customer_archive_submit') &&
|
||||||
|
['draft', 'reviewing'].includes(row.approvalStatus)
|
||||||
|
"
|
||||||
|
@click="handleWithdrawApproval(row)"
|
||||||
|
>
|
||||||
|
撤回
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="success"
|
type="success"
|
||||||
v-if="hasPermission('customer_archive_approve') && row.approvalStatus === 'reviewing'"
|
v-if="hasPermission('customer_archive_approve') && row.approvalStatus === 'reviewing'"
|
||||||
@@ -142,16 +151,23 @@
|
|||||||
:disabled="readonly"
|
:disabled="readonly"
|
||||||
class="archive-form"
|
class="archive-form"
|
||||||
>
|
>
|
||||||
<section-card title="工商信息">
|
<div class="section-title dialog-section-title">基本信息</div>
|
||||||
|
<div class="archive-form__group">
|
||||||
|
<div class="dialog-section-title archive-form__group-title">工商信息</div>
|
||||||
<el-row :gutter="18">
|
<el-row :gutter="18">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客商编号" prop="customerCode">
|
<el-form-item label="客商编号" prop="customerCode">
|
||||||
<el-input v-model="archiveForm.customerCode" disabled placeholder="保存后自动生成" />
|
<el-input v-model="archiveForm.customerCode" disabled placeholder="保存后自动生成" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客商性质" prop="customerNature">
|
<el-form-item label="客商性质" prop="customerNature">
|
||||||
<el-select v-model="archiveForm.customerNature" filterable clearable>
|
<el-select
|
||||||
|
v-model="archiveForm.customerNature"
|
||||||
|
placeholder="请输入"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerNatureOptions"
|
v-for="item in customerNatureOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -161,10 +177,11 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="统一社会信用代码" prop="unifiedCreditCode">
|
<el-form-item label="统一社会信用代码" prop="unifiedCreditCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="archiveForm.unifiedCreditCode"
|
v-model="archiveForm.unifiedCreditCode"
|
||||||
|
placeholder="请输入"
|
||||||
maxlength="18"
|
maxlength="18"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
@input="
|
@input="
|
||||||
@@ -175,14 +192,25 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客商名称" prop="fullName">
|
<el-form-item label="客商名称" prop="fullName">
|
||||||
<el-input v-model="archiveForm.fullName" maxlength="100" show-word-limit />
|
<el-input
|
||||||
|
v-model="archiveForm.fullName"
|
||||||
|
placeholder="请输入"
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客商类型" prop="customerType">
|
<el-form-item label="客商类型" prop="customerType">
|
||||||
<el-select v-model="archiveForm.customerType" filterable clearable>
|
<el-select
|
||||||
|
v-model="archiveForm.customerType"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerTypeOptions"
|
v-for="item in customerTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -192,13 +220,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="企业法人" prop="legalPerson">
|
<el-form-item label="企业法人" prop="legalPerson">
|
||||||
<el-input v-model="archiveForm.legalPerson" maxlength="10" show-word-limit />
|
<el-input v-model="archiveForm.legalPerson" maxlength="10" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="经营范围" prop="businessScope">
|
<el-form-item label="经营范围" prop="businessScope" required>
|
||||||
<el-select v-model="archiveForm.businessScope" multiple filterable clearable>
|
<el-select v-model="archiveForm.businessScope" multiple filterable clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in businessScopeOptions"
|
v-for="item in businessScopeOptions"
|
||||||
@@ -209,8 +237,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="营业期限" prop="businessEndDate" required>
|
<el-form-item
|
||||||
|
label="营业期限"
|
||||||
|
prop="businessEndDate"
|
||||||
|
:required="archiveForm.businessTermType === '固定期限'"
|
||||||
|
>
|
||||||
<div class="business-term-field">
|
<div class="business-term-field">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="archiveForm.businessEndDate"
|
v-model="archiveForm.businessEndDate"
|
||||||
@@ -228,18 +260,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="助记码" prop="mnemonicCode">
|
<el-form-item label="助记码" prop="mnemonicCode">
|
||||||
<el-input v-model="archiveForm.mnemonicCode" maxlength="15" show-word-limit />
|
<el-input v-model="archiveForm.mnemonicCode" maxlength="15" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客户简称" prop="shortName">
|
<el-form-item label="客户简称" prop="shortName">
|
||||||
<el-input v-model="archiveForm.shortName" maxlength="20" show-word-limit />
|
<el-input
|
||||||
|
v-model="archiveForm.shortName"
|
||||||
|
placeholder="请输入"
|
||||||
|
maxlength="20"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="地址" prop="registeredDetailAddress">
|
<el-form-item label="地址" prop="registeredDetailAddress" required>
|
||||||
<div class="archive-form__address">
|
<div class="archive-form__address">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
ref="registeredRegionCascader"
|
ref="registeredRegionCascader"
|
||||||
@@ -260,9 +297,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section-card>
|
</div>
|
||||||
|
|
||||||
<section-card title="联系信息">
|
<div class="archive-form__group">
|
||||||
|
<div class="dialog-section-title archive-form__group-title">联系信息</div>
|
||||||
<el-row :gutter="18">
|
<el-row :gutter="18">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客商负责人" prop="principal">
|
<el-form-item label="客商负责人" prop="principal">
|
||||||
@@ -291,11 +329,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section-card>
|
</div>
|
||||||
|
|
||||||
<section-card title="财务/信用信息">
|
<div class="archive-form__group">
|
||||||
|
<div class="dialog-section-title archive-form__group-title">财务/信用信息</div>
|
||||||
<el-row :gutter="18">
|
<el-row :gutter="18">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="注册资金(万元)" prop="registeredCapital">
|
<el-form-item label="注册资金(万元)" prop="registeredCapital">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="archiveForm.registeredCapital"
|
v-model="archiveForm.registeredCapital"
|
||||||
@@ -304,7 +343,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="开票税点" prop="invoiceTaxRate">
|
<el-form-item label="开票税点" prop="invoiceTaxRate">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="archiveForm.invoiceTaxRate"
|
v-model="archiveForm.invoiceTaxRate"
|
||||||
@@ -313,12 +352,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="客户等级" prop="customerLevel">
|
<el-form-item label="客户等级" prop="customerLevel">
|
||||||
<el-input v-model="archiveForm.customerLevel" disabled />
|
<el-input v-model="archiveForm.customerLevel" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="最大资金使用额度(万元)" prop="maxCreditLimit">
|
<el-form-item label="最大资金使用额度(万元)" prop="maxCreditLimit">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="archiveForm.maxCreditLimit"
|
v-model="archiveForm.maxCreditLimit"
|
||||||
@@ -328,19 +367,20 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="申请总资金使用额度(万元)" prop="applyCreditLimit">
|
<el-form-item label="申请总资金使用额度(万元)" prop="applyCreditLimit">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="archiveForm.applyCreditLimit"
|
v-model="archiveForm.applyCreditLimit"
|
||||||
maxlength="18"
|
maxlength="18"
|
||||||
@input="value => handleDecimalInput('applyCreditLimit', value)"
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section-card>
|
</div>
|
||||||
|
|
||||||
<section-card title="其他信息">
|
<div class="archive-form__group">
|
||||||
|
<div class="dialog-section-title archive-form__group-title">其他信息</div>
|
||||||
<el-row :gutter="18">
|
<el-row :gutter="18">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
@@ -353,7 +393,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section-card>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-tabs v-model="activeTab" class="archive-tabs">
|
<el-tabs v-model="activeTab" class="archive-tabs">
|
||||||
@@ -538,8 +578,9 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<section-card title="客商材料">
|
<div class="customer-material-section">
|
||||||
<template #extra>
|
<div class="section-head">
|
||||||
|
<div class="section-title dialog-section-title">客商材料</div>
|
||||||
<div v-if="!readonly" class="section-actions">
|
<div v-if="!readonly" class="section-actions">
|
||||||
<el-button icon="el-icon-download" @click="downloadAttachments">批量下载</el-button>
|
<el-button icon="el-icon-download" @click="downloadAttachments">批量下载</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="addAttachment"
|
<el-button type="primary" icon="el-icon-plus" @click="addAttachment"
|
||||||
@@ -549,11 +590,11 @@
|
|||||||
OCR上传识别
|
OCR上传识别
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
<el-alert
|
<el-alert
|
||||||
type="info"
|
type="info"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
title="支持 JPG、PNG、PDF、Word、Excel、PPT,单文件大小不超过 10MB。"
|
title="支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件大小限制500M"
|
||||||
class="archive-rule-alert"
|
class="archive-rule-alert"
|
||||||
/>
|
/>
|
||||||
<el-alert
|
<el-alert
|
||||||
@@ -580,8 +621,8 @@
|
|||||||
v-model="row.files"
|
v-model="row.files"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
accept=".jpg,.jpeg,.png,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
accept=".pdf,.bmp,.jpeg,.png,.jpg,.doc,.docx,.ppt,.pptx,.xlsx,.xls,.eml,.msg,.zip"
|
||||||
:max-size="10"
|
:max-size="500"
|
||||||
button-text="上传文件"
|
button-text="上传文件"
|
||||||
:show-tip="false"
|
:show-tip="false"
|
||||||
@success="file => handleQualificationUploadSuccess(file, row)"
|
@success="file => handleQualificationUploadSuccess(file, row)"
|
||||||
@@ -616,16 +657,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</div>
|
||||||
|
|
||||||
<section-card title="变更记录">
|
<div class="change-record-section">
|
||||||
|
<div class="section-title dialog-section-title">变更记录</div>
|
||||||
<el-table :data="archiveForm.changeRecords" border>
|
<el-table :data="archiveForm.changeRecords" border>
|
||||||
<el-table-column label="序号" type="index" width="90" align="center" />
|
<el-table-column label="序号" type="index" width="90" align="center" />
|
||||||
<el-table-column label="变更日期" prop="changeTime" min-width="170" />
|
<el-table-column label="变更日期" prop="changeTime" min-width="170" />
|
||||||
<el-table-column label="变更内容" prop="changeContent" min-width="260" />
|
<el-table-column label="变更内容" prop="changeContent" min-width="260" />
|
||||||
<el-table-column label="变更账号" prop="changeUserName" min-width="160" />
|
<el-table-column label="变更账号" prop="changeUserName" min-width="160" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</div>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="archiveBox = false">{{ readonly ? '关闭' : '取消' }}</el-button>
|
<el-button @click="archiveBox = false">{{ readonly ? '关闭' : '取消' }}</el-button>
|
||||||
@@ -651,13 +693,13 @@
|
|||||||
label-width="110px"
|
label-width="110px"
|
||||||
class="contact-form"
|
class="contact-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="联系人姓名" prop="contactName">
|
<el-form-item label="联系人姓名" prop="contactName" class="contact-form__compact-field">
|
||||||
<el-input v-model="contactForm.contactName" maxlength="30" />
|
<el-input v-model="contactForm.contactName" maxlength="30" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号" prop="contactPhone">
|
<el-form-item label="手机号" prop="contactPhone" class="contact-form__compact-field">
|
||||||
<el-input v-model="contactForm.contactPhone" maxlength="11" />
|
<el-input v-model="contactForm.contactPhone" maxlength="11" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email" class="contact-form__compact-field">
|
||||||
<el-input v-model="contactForm.email" maxlength="100" />
|
<el-input v-model="contactForm.email" maxlength="100" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="地址" prop="detailAddress">
|
<el-form-item label="地址" prop="detailAddress">
|
||||||
@@ -678,13 +720,15 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark" class="contact-form__compact-field">
|
||||||
<el-input v-model="contactForm.remark" maxlength="200" />
|
<el-input v-model="contactForm.remark" maxlength="200" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
<div class="contact-dialog__footer-actions">
|
||||||
<el-button type="primary" @click="saveContact">保存</el-button>
|
<el-button type="primary" @click="saveContact">保存</el-button>
|
||||||
<el-button @click="contactBox = false">返回</el-button>
|
<el-button @click="contactBox = false">返回</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -771,8 +815,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
<div class="receipt-dialog__footer-actions">
|
||||||
<el-button type="primary" @click="saveReceipt">保存</el-button>
|
<el-button type="primary" @click="saveReceipt">保存</el-button>
|
||||||
<el-button @click="receiptBox = false">返回</el-button>
|
<el-button @click="receiptBox = false">返回</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -802,7 +848,6 @@
|
|||||||
<el-input v-model="invoiceForm.registeredPhone" maxlength="20" />
|
<el-input v-model="invoiceForm.registeredPhone" maxlength="20" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="注册地址" prop="registeredRegionName">
|
<el-form-item label="注册地址" prop="registeredRegionName">
|
||||||
<div class="invoice-form__address">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="invoiceForm.registeredRegionName"
|
v-model="invoiceForm.registeredRegionName"
|
||||||
readonly
|
readonly
|
||||||
@@ -811,6 +856,8 @@
|
|||||||
suffix-icon="el-icon-location"
|
suffix-icon="el-icon-location"
|
||||||
@click="handleInvoiceRegisteredMapPick"
|
@click="handleInvoiceRegisteredMapPick"
|
||||||
/>
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="详细地址" prop="registeredDetailAddress">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="invoiceForm.registeredDetailAddress"
|
v-model="invoiceForm.registeredDetailAddress"
|
||||||
readonly
|
readonly
|
||||||
@@ -819,7 +866,6 @@
|
|||||||
suffix-icon="el-icon-location"
|
suffix-icon="el-icon-location"
|
||||||
@click="handleInvoiceRegisteredMapPick"
|
@click="handleInvoiceRegisteredMapPick"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -873,8 +919,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
<div class="invoice-dialog__footer-actions">
|
||||||
<el-button type="primary" @click="saveInvoice">保存</el-button>
|
<el-button type="primary" @click="saveInvoice">保存</el-button>
|
||||||
<el-button @click="invoiceBox = false">返回</el-button>
|
<el-button @click="invoiceBox = false">返回</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -1090,7 +1138,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120" align="center" v-if="!readonly">
|
<el-table-column label="操作" width="120" align="center" v-if="!readonly">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-link type="primary" @click="scoreAttachmentFiles.splice($index, 1)">
|
<el-link type="primary" @click="deleteScoreAttachment($index)">
|
||||||
删除
|
删除
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
@@ -1113,6 +1161,7 @@ import {
|
|||||||
getDetail,
|
getDetail,
|
||||||
submit,
|
submit,
|
||||||
submitApproval,
|
submitApproval,
|
||||||
|
withdrawApproval,
|
||||||
approve,
|
approve,
|
||||||
reject,
|
reject,
|
||||||
changeStatus,
|
changeStatus,
|
||||||
@@ -1180,11 +1229,11 @@ export default {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const validateInvoiceRegisteredAddress = (rule, value, callback) => {
|
const validateRegisteredAddress = (rule, value, callback) => {
|
||||||
const regionName = (this.invoiceForm.registeredRegionName || '').trim();
|
const regionName = (this.archiveForm.registeredRegionName || '').trim();
|
||||||
const detailAddress = (this.invoiceForm.registeredDetailAddress || '').trim();
|
const detailAddress = String(value || '').trim();
|
||||||
if (!regionName) {
|
if (!regionName) {
|
||||||
callback(new Error('请选择注册地址'));
|
callback(new Error('请选择省市区'));
|
||||||
} else if (!detailAddress) {
|
} else if (!detailAddress) {
|
||||||
callback(new Error('请输入详细地址'));
|
callback(new Error('请输入详细地址'));
|
||||||
} else if (detailAddress.length > 255) {
|
} else if (detailAddress.length > 255) {
|
||||||
@@ -1196,6 +1245,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
query: {},
|
query: {},
|
||||||
|
deptSearchInitialized: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
data: [],
|
data: [],
|
||||||
page: {
|
page: {
|
||||||
@@ -1305,8 +1355,18 @@ export default {
|
|||||||
maxCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
|
maxCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
|
||||||
applyCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
|
applyCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
|
||||||
businessEndDate: [{ validator: validateBusinessEndDate, trigger: 'change' }],
|
businessEndDate: [{ validator: validateBusinessEndDate, trigger: 'change' }],
|
||||||
registeredDetailAddress: [{ max: 255, message: '详细地址最多255个字符', trigger: 'blur' }],
|
registeredDetailAddress: [
|
||||||
businessScope: [{ type: 'array', message: '请选择经营范围', trigger: 'change' }],
|
{ validator: validateRegisteredAddress, trigger: ['change', 'blur'] },
|
||||||
|
],
|
||||||
|
businessScope: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
type: 'array',
|
||||||
|
min: 1,
|
||||||
|
message: '请选择经营范围',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
remark: [{ max: 500, message: '备注最多500个字符', trigger: 'blur' }],
|
remark: [{ max: 500, message: '备注最多500个字符', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
contactRules: {
|
contactRules: {
|
||||||
@@ -1332,7 +1392,11 @@ export default {
|
|||||||
registeredPhone: [{ required: true, message: '请输入注册电话', trigger: 'blur' }],
|
registeredPhone: [{ required: true, message: '请输入注册电话', trigger: 'blur' }],
|
||||||
bankName: [{ required: true, message: '请输入开户行名称', trigger: 'blur' }],
|
bankName: [{ required: true, message: '请输入开户行名称', trigger: 'blur' }],
|
||||||
registeredRegionName: [
|
registeredRegionName: [
|
||||||
{ required: true, validator: validateInvoiceRegisteredAddress, trigger: 'blur' },
|
{ required: true, message: '请选择注册地址', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
registeredDetailAddress: [
|
||||||
|
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
||||||
|
{ max: 255, message: '详细地址最多255个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
bankAccount: [{ required: true, message: '请输入银行账号', trigger: 'blur' }],
|
bankAccount: [{ required: true, message: '请输入银行账号', trigger: 'blur' }],
|
||||||
receiverDetailAddress: [
|
receiverDetailAddress: [
|
||||||
@@ -1369,6 +1433,7 @@ export default {
|
|||||||
slot: true,
|
slot: true,
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 10,
|
searchOrder: 10,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1376,6 +1441,7 @@ export default {
|
|||||||
prop: 'shortName',
|
prop: 'shortName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 2,
|
searchOrder: 2,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1383,6 +1449,7 @@ export default {
|
|||||||
prop: 'fullName',
|
prop: 'fullName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 9,
|
searchOrder: 9,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
@@ -1392,8 +1459,10 @@ export default {
|
|||||||
search: true,
|
search: true,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOrder: 7,
|
searchOrder: 7,
|
||||||
|
searchValue: '',
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
dicData: this.customerTypeOptions,
|
dicData: [{ label: '全部', value: '' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户性质',
|
label: '客户性质',
|
||||||
@@ -1401,8 +1470,11 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 5,
|
||||||
|
searchValue: '',
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
dicData: [
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
{ label: '有限公司', value: '有限公司' },
|
{ label: '有限公司', value: '有限公司' },
|
||||||
{ label: '个体工商户', value: '个体工商户' },
|
{ label: '个体工商户', value: '个体工商户' },
|
||||||
],
|
],
|
||||||
@@ -1412,6 +1484,7 @@ export default {
|
|||||||
prop: 'unifiedCreditCode',
|
prop: 'unifiedCreditCode',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 190,
|
minWidth: 190,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1420,8 +1493,9 @@ export default {
|
|||||||
search: true,
|
search: true,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOrder: 1,
|
searchOrder: 1,
|
||||||
|
searchValue: '',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
dicData: [],
|
dicData: [{ label: '全部', value: '' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '准入标准',
|
label: '准入标准',
|
||||||
@@ -1432,8 +1506,8 @@ export default {
|
|||||||
searchOrder: 8,
|
searchOrder: 8,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '临时客商', value: 'temporary' },
|
{ label: '临时', value: 'temporary' },
|
||||||
{ label: '正式客商', value: 'formal' },
|
{ label: '正式', value: 'formal' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1443,8 +1517,10 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 4,
|
searchOrder: 4,
|
||||||
|
searchValue: '',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
dicData: [
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
{ label: '审核中', value: 'reviewing' },
|
{ label: '审核中', value: 'reviewing' },
|
||||||
{ label: '审核通过', value: 'approved' },
|
{ label: '审核通过', value: 'approved' },
|
||||||
@@ -1468,9 +1544,11 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 6,
|
||||||
|
searchValue: '',
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
dicData: [
|
dicData: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: 1 },
|
||||||
{ label: '停用', value: 2 },
|
{ label: '停用', value: 2 },
|
||||||
],
|
],
|
||||||
@@ -1618,7 +1696,7 @@ export default {
|
|||||||
deptId: [],
|
deptId: [],
|
||||||
deptIds: '',
|
deptIds: '',
|
||||||
deptName: '',
|
deptName: '',
|
||||||
customerType: '',
|
customerType: [],
|
||||||
businessScope: [],
|
businessScope: [],
|
||||||
businessTermType: '固定期限',
|
businessTermType: '固定期限',
|
||||||
registeredRegionPath: [],
|
registeredRegionPath: [],
|
||||||
@@ -1736,16 +1814,39 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initDeptTree() {
|
initDeptTree() {
|
||||||
getDeptTree(this.userInfo.tenantId).then(res => {
|
getDeptTree(this.userInfo.tenantId)
|
||||||
|
.then(res => {
|
||||||
this.deptTree = this.normalizeDeptTree(res.data.data || []);
|
this.deptTree = this.normalizeDeptTree(res.data.data || []);
|
||||||
this.deptOptions = this.flattenDept(this.deptTree);
|
this.deptOptions = this.flattenDept(this.deptTree);
|
||||||
const deptColumn = this.findColumn(this.option.column, 'deptName');
|
const deptColumn = this.findColumn(this.option.column, 'deptName');
|
||||||
deptColumn.dicData = this.deptOptions.map(item => ({
|
deptColumn.dicData = [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
...this.deptOptions.map(item => ({
|
||||||
label: item.label,
|
label: item.label,
|
||||||
value: item.rawLabel,
|
value: item.rawLabel,
|
||||||
}));
|
})),
|
||||||
|
];
|
||||||
|
this.applyDefaultDeptSearch(deptColumn);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.deptSearchInitialized = true;
|
||||||
|
this.$nextTick(() => this.onLoad(this.page, this.query));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
applyDefaultDeptSearch(deptColumn) {
|
||||||
|
if (this.isAdmin) return;
|
||||||
|
const currentDeptId = this.userInfo.deptId || this.userInfo.dept_id;
|
||||||
|
const currentDept = this.deptOptions.find(
|
||||||
|
item => String(item.value) === String(currentDeptId)
|
||||||
|
);
|
||||||
|
const deptName = currentDept?.rawLabel || this.userInfo.deptName || this.userInfo.dept_name;
|
||||||
|
if (!deptName) return;
|
||||||
|
deptColumn.searchValue = deptName;
|
||||||
|
this.query = { ...this.query, deptName };
|
||||||
|
if (this.$refs.crud?.searchForm) {
|
||||||
|
this.$refs.crud.searchForm.deptName = deptName;
|
||||||
|
}
|
||||||
|
},
|
||||||
initRegionOptions() {
|
initRegionOptions() {
|
||||||
getLazyTree().then(res => {
|
getLazyTree().then(res => {
|
||||||
const regions = this.buildRegionTree(res.data.data || []);
|
const regions = this.buildRegionTree(res.data.data || []);
|
||||||
@@ -1827,10 +1928,12 @@ export default {
|
|||||||
handleRegisteredRegionChange(value) {
|
handleRegisteredRegionChange(value) {
|
||||||
if (!value || !value.length) {
|
if (!value || !value.length) {
|
||||||
this.archiveForm.registeredRegionName = '';
|
this.archiveForm.registeredRegionName = '';
|
||||||
|
this.$refs.archiveForm?.validateField('registeredDetailAddress');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.archiveForm.registeredRegionName = this.getRegisteredRegionLabels(value).join('');
|
this.archiveForm.registeredRegionName = this.getRegisteredRegionLabels(value).join('');
|
||||||
|
this.$refs.archiveForm?.validateField('registeredDetailAddress');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initBusinessDictionaries() {
|
initBusinessDictionaries() {
|
||||||
@@ -1840,12 +1943,12 @@ export default {
|
|||||||
['有限公司', '个体工商户'],
|
['有限公司', '个体工商户'],
|
||||||
options => {
|
options => {
|
||||||
const customerNatureColumn = this.findColumn(this.option.column, 'customerNature');
|
const customerNatureColumn = this.findColumn(this.option.column, 'customerNature');
|
||||||
customerNatureColumn.dicData = options;
|
customerNatureColumn.dicData = [{ label: '全部', value: '' }, ...options];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.loadDictOptions('customer_type', 'customerTypeOptions', ['客户', '承运商'], options => {
|
this.loadDictOptions('customer_type', 'customerTypeOptions', ['客户', '承运商'], options => {
|
||||||
const customerTypeColumn = this.findColumn(this.option.column, 'customerType');
|
const customerTypeColumn = this.findColumn(this.option.column, 'customerType');
|
||||||
customerTypeColumn.dicData = options;
|
customerTypeColumn.dicData = [{ label: '全部', value: '' }, ...options];
|
||||||
});
|
});
|
||||||
this.loadDictOptions('scope_of_business', 'businessScopeOptions');
|
this.loadDictOptions('scope_of_business', 'businessScopeOptions');
|
||||||
this.loadDictOptions('bank_list', 'bankListOptions');
|
this.loadDictOptions('bank_list', 'bankListOptions');
|
||||||
@@ -1922,7 +2025,12 @@ export default {
|
|||||||
if (checked) {
|
if (checked) {
|
||||||
this.archiveForm.businessEndDate = '';
|
this.archiveForm.businessEndDate = '';
|
||||||
}
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.archiveForm?.clearValidate('businessEndDate');
|
||||||
|
if (!checked) {
|
||||||
this.$refs.archiveForm?.validateField('businessEndDate');
|
this.$refs.archiveForm?.validateField('businessEndDate');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleBusinessEndDateChange(value) {
|
handleBusinessEndDateChange(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
@@ -2033,8 +2141,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteContact(index) {
|
deleteContact(index) {
|
||||||
|
this.$confirm('确定删除该联系人?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
this.archiveForm.contacts.splice(index, 1);
|
this.archiveForm.contacts.splice(index, 1);
|
||||||
this.handleDetailCurrentChange('contact', this.contactPage.currentPage);
|
this.handleDetailCurrentChange('contact', this.contactPage.currentPage);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
handleContactMapPick() {
|
handleContactMapPick() {
|
||||||
this.contactMapTarget = 'contact';
|
this.contactMapTarget = 'contact';
|
||||||
@@ -2361,8 +2477,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteReceipt(index) {
|
deleteReceipt(index) {
|
||||||
|
this.$confirm('确定删除该收款信息?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
this.archiveForm.receiptAccounts.splice(index, 1);
|
this.archiveForm.receiptAccounts.splice(index, 1);
|
||||||
this.handleDetailCurrentChange('receipt', this.receiptPage.currentPage);
|
this.handleDetailCurrentChange('receipt', this.receiptPage.currentPage);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
normalizeInvoice(invoice = {}) {
|
normalizeInvoice(invoice = {}) {
|
||||||
const registeredDetailAddress =
|
const registeredDetailAddress =
|
||||||
@@ -2416,8 +2540,27 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteInvoice(index) {
|
deleteInvoice(index) {
|
||||||
|
this.$confirm('确定删除该发票信息?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
this.archiveForm.invoices.splice(index, 1);
|
this.archiveForm.invoices.splice(index, 1);
|
||||||
this.handleDetailCurrentChange('invoice', this.invoicePage.currentPage);
|
this.handleDetailCurrentChange('invoice', this.invoicePage.currentPage);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
deleteScoreAttachment(index) {
|
||||||
|
this.$confirm('确定删除该评分证明材料?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.scoreAttachmentFiles.splice(index, 1);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
parseAttachments(value) {
|
parseAttachments(value) {
|
||||||
if (!value) return [];
|
if (!value) return [];
|
||||||
@@ -2502,7 +2645,9 @@ export default {
|
|||||||
...this.emptyArchive(),
|
...this.emptyArchive(),
|
||||||
...detail,
|
...detail,
|
||||||
deptId: this.normalizeDeptIds(detail),
|
deptId: this.normalizeDeptIds(detail),
|
||||||
customerType: detail.customerType || '',
|
customerType: this.splitValue(detail.customerType),
|
||||||
|
invoiceTaxRate: this.normalizeOptionalAmount(detail.invoiceTaxRate),
|
||||||
|
registeredCapital: this.normalizeOptionalAmount(detail.registeredCapital),
|
||||||
businessScope,
|
businessScope,
|
||||||
businessTermType: detail.businessTermType || '固定期限',
|
businessTermType: detail.businessTermType || '固定期限',
|
||||||
registeredRegionPath: Array.isArray(detail.registeredRegionPath)
|
registeredRegionPath: Array.isArray(detail.registeredRegionPath)
|
||||||
@@ -2541,10 +2686,15 @@ export default {
|
|||||||
attachments: [],
|
attachments: [],
|
||||||
details: [],
|
details: [],
|
||||||
...score,
|
...score,
|
||||||
|
tempApplyCreditLimit: this.normalizeOptionalAmount(score.tempApplyCreditLimit),
|
||||||
attachments: score.attachments || this.parseAttachments(score.proofAttachments),
|
attachments: score.attachments || this.parseAttachments(score.proofAttachments),
|
||||||
details: score.details || [],
|
details: score.details || [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
normalizeOptionalAmount(value) {
|
||||||
|
const amount = Number(value);
|
||||||
|
return Number.isFinite(amount) && amount < 0 ? '' : value ?? '';
|
||||||
|
},
|
||||||
getScoreTimeValue(value) {
|
getScoreTimeValue(value) {
|
||||||
if (!value) return 0;
|
if (!value) return 0;
|
||||||
const time = this.$dayjs(value).valueOf();
|
const time = this.$dayjs(value).valueOf();
|
||||||
@@ -2571,6 +2721,7 @@ export default {
|
|||||||
const latestScore = this.getLatestCreditScore(archive.scores || []);
|
const latestScore = this.getLatestCreditScore(archive.scores || []);
|
||||||
archive.customerLevel = latestScore?.creditLevel || archive.customerLevel || '';
|
archive.customerLevel = latestScore?.creditLevel || archive.customerLevel || '';
|
||||||
archive.maxCreditLimit = latestScore?.maxCreditLimit || archive.maxCreditLimit || '';
|
archive.maxCreditLimit = latestScore?.maxCreditLimit || archive.maxCreditLimit || '';
|
||||||
|
archive.applyCreditLimit = archive.maxCreditLimit;
|
||||||
return archive;
|
return archive;
|
||||||
},
|
},
|
||||||
syncArchiveCreditFromScores() {
|
syncArchiveCreditFromScores() {
|
||||||
@@ -2629,6 +2780,13 @@ export default {
|
|||||||
},
|
},
|
||||||
normalizeArchive() {
|
normalizeArchive() {
|
||||||
const archive = JSON.parse(JSON.stringify(this.archiveForm));
|
const archive = JSON.parse(JSON.stringify(this.archiveForm));
|
||||||
|
if (archive.businessTermType === '长期') {
|
||||||
|
archive.businessEndDate = null;
|
||||||
|
}
|
||||||
|
const invoiceTaxRate = this.normalizeOptionalAmount(archive.invoiceTaxRate);
|
||||||
|
const registeredCapital = this.normalizeOptionalAmount(archive.registeredCapital);
|
||||||
|
archive.invoiceTaxRate = invoiceTaxRate === '' ? null : invoiceTaxRate;
|
||||||
|
archive.registeredCapital = registeredCapital === '' ? null : registeredCapital;
|
||||||
archive.customerType = Array.isArray(archive.customerType)
|
archive.customerType = Array.isArray(archive.customerType)
|
||||||
? archive.customerType.join(',')
|
? archive.customerType.join(',')
|
||||||
: archive.customerType;
|
: archive.customerType;
|
||||||
@@ -3165,6 +3323,18 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleWithdrawApproval(row) {
|
||||||
|
this.$confirm('是否确认撤回该客商审批?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => withdrawApproval(row.id))
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({ type: 'success', message: '已撤回至草稿状态!' });
|
||||||
|
});
|
||||||
|
},
|
||||||
handleApprove(row) {
|
handleApprove(row) {
|
||||||
this.$confirm('是否确认审核通过?', '提示', {
|
this.$confirm('是否确认审核通过?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -3204,7 +3374,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = this.isAdmin ? {} : { deptName: this.getCurrentDeptName() };
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
},
|
},
|
||||||
searchChange(params, done) {
|
searchChange(params, done) {
|
||||||
@@ -3230,6 +3400,7 @@ export default {
|
|||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
},
|
},
|
||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
|
if (!this.deptSearchInitialized) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getList(page.currentPage, page.pageSize, this.buildQuery(params))
|
getList(page.currentPage, page.pageSize, this.buildQuery(params))
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -3272,6 +3443,13 @@ export default {
|
|||||||
buildQuery(params = {}) {
|
buildQuery(params = {}) {
|
||||||
return normalizeSearchRangeParams({ ...params, ...this.query }, createTimeRangeMap);
|
return normalizeSearchRangeParams({ ...params, ...this.query }, createTimeRangeMap);
|
||||||
},
|
},
|
||||||
|
getCurrentDeptName() {
|
||||||
|
const currentDeptId = this.userInfo.deptId || this.userInfo.dept_id;
|
||||||
|
const currentDept = this.deptOptions.find(
|
||||||
|
item => String(item.value) === String(currentDeptId)
|
||||||
|
);
|
||||||
|
return currentDept?.rawLabel || this.userInfo.deptName || this.userInfo.dept_name || '';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -3293,6 +3471,28 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.archive-form__group {
|
||||||
|
padding: 16px 20px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
.dialog-section-title {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内层白色卡片:字段区域白底,浮于灰色分组块之上
|
||||||
|
> .el-row {
|
||||||
|
margin: 0;
|
||||||
|
padding: 18px 16px 4px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.business-term-field,
|
.business-term-field,
|
||||||
.archive-form__address {
|
.archive-form__address {
|
||||||
@@ -3326,11 +3526,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
margin: 16px 0 12px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
.section-head {
|
.section-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: 18px 0 12px;
|
margin: 18px 0 12px;
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-actions {
|
.section-actions {
|
||||||
@@ -3470,6 +3681,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.customer-material-section {
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.change-record-section {
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
.score-list-table,
|
.score-list-table,
|
||||||
.contact-table,
|
.contact-table,
|
||||||
@@ -3532,6 +3750,37 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-form__compact-field {
|
||||||
|
:deep(.el-input) {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-dialog__footer-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receipt-form {
|
||||||
|
:deep(.el-input),
|
||||||
|
:deep(.el-select) {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.receipt-dialog__footer-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invoice-dialog__footer-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.contact-form__map-toolbar {
|
.contact-form__map-toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user