Merge remote-tracking branch 'websoft/master'
This commit is contained in:
@@ -11,7 +11,7 @@ export default {
|
||||
tenantMode: true, // 是否开启租户模式
|
||||
tenantId: '000000', // 管理组租户编号
|
||||
captchaMode: true, // 是否开启验证码模式
|
||||
captchaType: 'behavior', // 验证码类型(image:首屏图形验证码 behavior:登录时弹出点选/滑块/旋转随机行为验证)
|
||||
captchaType: 'image', // 验证码类型(image:首屏图形验证码 behavior:登录时弹出点选/滑块/旋转随机行为验证)
|
||||
switchMode: false, // 是否开启登录切换角色部门
|
||||
lockPage: '/lock', // 锁屏页面地址
|
||||
tokenTime: 3000, // 定时刷新token间隔(单位:毫秒)
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import { ElTreeSelect } from 'element-plus';
|
||||
import { h } from 'vue';
|
||||
|
||||
/**
|
||||
* 所属组织 统一搜索 mixin
|
||||
* ------------------------------------------------------------------
|
||||
* 全站「所属组织」搜索栏统一为树形下拉(el-tree-select),风格与客户档案
|
||||
* (vehicle/customer-archive.vue)保持一致。
|
||||
*
|
||||
* 接入步骤(在使用了 avue-crud 的页面中):
|
||||
* 1. 混入本 mixin:mixins: [organizationSearch]
|
||||
* 2. option 中「所属组织」列加上 searchslot: true(prop 为 organizationName 或 deptName 均可)
|
||||
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
|
||||
*
|
||||
* 说明:
|
||||
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
|
||||
* - 树节点标识统一用 id(node-key='id'),返回值为部门 id
|
||||
* - 页面若已有 excludeExternalOrganization / normalizeOrgTree 等方法,
|
||||
* 组件自身方法优先级更高,会覆盖本 mixin 的默认实现
|
||||
* - 搜索值(id)需在各自的 searchChange / normalizeSearch 中按后端要求
|
||||
* 转换为部门名称(参考 contract-manage 的 normalizeSearch)
|
||||
*/
|
||||
const ORG_PROPS = ['organizationName', 'deptName'];
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 树形组织数据,仅供搜索栏 el-tree-select 使用;
|
||||
// 与页面自身 organizationOptions(多为表单扁平列表)隔离,避免相互覆盖
|
||||
organizationTreeOptions: [],
|
||||
organizationTreeFlatOptions: [],
|
||||
organizationLoading: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
loadOrganizationOptions() {
|
||||
if (this.organizationLoading) return;
|
||||
this.organizationLoading = true;
|
||||
const tenantId = this.userInfo?.tenantId;
|
||||
getDeptTree(tenantId)
|
||||
.then(res => {
|
||||
const source = res.data?.data || res.data || [];
|
||||
const tree = this.excludeExternalOrganization
|
||||
? this.excludeExternalOrganization(source)
|
||||
: source;
|
||||
this.organizationTreeOptions = this.normalizeOrgTree(tree);
|
||||
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationTreeOptions);
|
||||
const option = this.tableOption || this.option;
|
||||
if (!option) return;
|
||||
ORG_PROPS.forEach(prop => {
|
||||
const column = this.findColumn?.(option.column, prop);
|
||||
if (column) {
|
||||
column.renderSearch = scope => this.renderOrganizationSearch(scope, prop);
|
||||
}
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
this.organizationLoading = false;
|
||||
});
|
||||
},
|
||||
// 默认排除「外部组织」节点;页面可覆盖
|
||||
excludeExternalOrganization(tree = []) {
|
||||
return (tree || []).reduce((result, item) => {
|
||||
const name = item.title || item.deptName || item.name || item.label || '';
|
||||
if (String(name).trim() === '外部组织') return result;
|
||||
result.push({
|
||||
...item,
|
||||
children: this.excludeExternalOrganization(item.children || []),
|
||||
});
|
||||
return result;
|
||||
}, []);
|
||||
},
|
||||
normalizeOrgTree(tree = []) {
|
||||
return (tree || []).map(item => {
|
||||
const label = item.title || item.deptName || item.name || item.label || '';
|
||||
const children = this.normalizeOrgTree(item.children || []);
|
||||
return {
|
||||
...item,
|
||||
id: String(item.id),
|
||||
label,
|
||||
rawLabel: label,
|
||||
children: children.length ? children : undefined,
|
||||
};
|
||||
});
|
||||
},
|
||||
flattenOrgTree(tree = []) {
|
||||
return (tree || []).flatMap(item => [
|
||||
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
|
||||
...this.flattenOrgTree(item.children || []),
|
||||
]);
|
||||
},
|
||||
findOrgById(id) {
|
||||
const value = Array.isArray(id) ? id.at(-1) : id;
|
||||
return this.organizationTreeFlatOptions.find(item => String(item.id) === String(value));
|
||||
},
|
||||
renderOrganizationSearch(scope, prop = 'organizationName') {
|
||||
return h(ElTreeSelect, {
|
||||
modelValue: scope.row?.[prop] || '',
|
||||
'onUpdate:modelValue': value => {
|
||||
if (scope.row) scope.row[prop] = value;
|
||||
},
|
||||
data: this.organizationTreeOptions,
|
||||
'node-key': 'id',
|
||||
'check-strictly': true,
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
'render-after-expand': false,
|
||||
style: 'width: 100%',
|
||||
placeholder: '请选择 所属组织',
|
||||
props: { label: 'label', value: 'id', children: 'children' },
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -251,6 +251,7 @@ export const option = createCrudOption([
|
||||
searchPlaceholder: '请输入',
|
||||
order: 180,
|
||||
slot: true,
|
||||
overHidden: true,
|
||||
minWidth: 240,
|
||||
rules: textRule('合同名称', 100, true),
|
||||
},
|
||||
@@ -285,20 +286,11 @@ export const option = createCrudOption([
|
||||
prop: 'organizationName',
|
||||
search: true,
|
||||
searchOrder: 3,
|
||||
searchType: 'cascader',
|
||||
searchPlaceholder: '全部',
|
||||
searchslot: true,
|
||||
searchPlaceholder: '请选择 所属组织',
|
||||
formslot: true,
|
||||
order: 120,
|
||||
dicData: [],
|
||||
props: {
|
||||
label: 'label',
|
||||
value: 'id',
|
||||
children: 'children',
|
||||
},
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
showAllLevels: false,
|
||||
filterable: true,
|
||||
minWidth: 150,
|
||||
rules: selectRule('所属组织'),
|
||||
},
|
||||
@@ -318,7 +310,9 @@ export const option = createCrudOption([
|
||||
label: '签约类型',
|
||||
prop: 'signType',
|
||||
type: 'select',
|
||||
search: false,
|
||||
search: true,
|
||||
searchOrder: 10,
|
||||
searchPlaceholder: '请选择',
|
||||
span: 8,
|
||||
order: 190,
|
||||
dicData: signTypeOptions,
|
||||
|
||||
@@ -81,9 +81,7 @@ export const option = {
|
||||
prop: 'organizationName',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
type: 'select',
|
||||
filterable: true,
|
||||
dicData: [],
|
||||
searchslot: true,
|
||||
slot: true,
|
||||
minWidth: 160,
|
||||
},
|
||||
|
||||
@@ -37,9 +37,7 @@ export const option = {
|
||||
prop: 'organizationName',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
type: 'select',
|
||||
filterable: true,
|
||||
dicData: [],
|
||||
searchslot: true,
|
||||
slot: true,
|
||||
minWidth: 160,
|
||||
},
|
||||
|
||||
@@ -46,9 +46,7 @@ export const option = {
|
||||
prop: 'organizationName',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
type: 'select',
|
||||
filterable: true,
|
||||
dicData: [],
|
||||
searchslot: true,
|
||||
slot: true,
|
||||
minWidth: 150,
|
||||
},
|
||||
|
||||
@@ -46,21 +46,22 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" class="login-code" v-if="captchaMode && captchaType === 'image'">
|
||||
<el-input
|
||||
@keyup.enter="handleLogin"
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
:placeholder="$t('login.code')"
|
||||
>
|
||||
<template #prefix>
|
||||
<i class="icon-yanzhengma"></i>
|
||||
</template>
|
||||
<template #append>
|
||||
<div class="login-code-box">
|
||||
<img :src="loginForm.image" class="login-code-img" @click="refreshCode" />
|
||||
</div>
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="login-code-wrap">
|
||||
<el-input
|
||||
@keyup.enter="handleLogin"
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
maxlength="6"
|
||||
:placeholder="$t('login.code')"
|
||||
>
|
||||
<template #prefix>
|
||||
<i class="icon-yanzhengma"></i>
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="login-code-box" @click="refreshCode" title="点击刷新验证码">
|
||||
<img :src="loginForm.image" class="login-code-img" alt="验证码" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click.prevent="handleLogin" class="login-submit"
|
||||
|
||||
+26
-15
@@ -134,26 +134,37 @@
|
||||
}
|
||||
.login-code {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.el-input-group__append {
|
||||
background-color: #fff;
|
||||
}
|
||||
.login-code-wrap {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
gap: 10px;
|
||||
.el-input {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.login-code-box {
|
||||
width: 130px;
|
||||
height: 38px;
|
||||
flex: none;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: border-color 0.2s;
|
||||
&:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
}
|
||||
.login-code-img {
|
||||
cursor: pointer;
|
||||
min-width: 100px;
|
||||
padding: 0 5px;
|
||||
height: 30px;
|
||||
color: #333;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 3px;
|
||||
line-height: 38px;
|
||||
text-indent: 5px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
display: block;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -6,68 +6,72 @@
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<el-descriptions v-if="readonly" :column="3" class="billing-plan-detail">
|
||||
<el-descriptions-item label="方案名称">{{
|
||||
displayValue(draft.planName)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="运输方式">{{
|
||||
transportModeLabel(draft.transportMode)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="默认方案">{{
|
||||
isDefaultPlan(draft) ? '是' : '否'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ displayValue(draft.remark) }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-form
|
||||
v-else
|
||||
ref="formRef"
|
||||
:model="draft"
|
||||
:rules="formRules"
|
||||
label-position="right"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8"
|
||||
|
||||
<section-card>
|
||||
<el-descriptions v-if="readonly" :column="3" class="billing-plan-detail">
|
||||
<el-descriptions-item label="方案名称">{{
|
||||
displayValue(draft.planName)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="运输方式">{{
|
||||
transportModeLabel(draft.transportMode)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="默认方案">{{
|
||||
isDefaultPlan(draft) ? '是' : '否'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ displayValue(draft.remark) }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-form
|
||||
v-else
|
||||
ref="formRef"
|
||||
:model="draft"
|
||||
:rules="formRules"
|
||||
label-position="right"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8"
|
||||
><el-form-item label="方案名称" prop="planName"
|
||||
><el-input
|
||||
v-model="draft.planName"
|
||||
maxlength="100"
|
||||
:disabled="readonly" /></el-form-item
|
||||
></el-col>
|
||||
<el-col :span="8"
|
||||
><el-input
|
||||
v-model="draft.planName"
|
||||
maxlength="100"
|
||||
:disabled="readonly" /></el-form-item
|
||||
></el-col>
|
||||
<el-col :span="8"
|
||||
><el-form-item label="运输方式" prop="transportMode"
|
||||
><el-select
|
||||
v-model="draft.transportMode"
|
||||
clearable
|
||||
filterable
|
||||
:loading="transportModeLoading"
|
||||
placeholder="请选择运输方式"
|
||||
@visible-change="visible => visible && ensureTransportModes()"
|
||||
><el-option
|
||||
v-for="item in transportModeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value" /></el-select></el-form-item
|
||||
></el-col>
|
||||
<el-col :span="8"
|
||||
><el-select
|
||||
v-model="draft.transportMode"
|
||||
clearable
|
||||
filterable
|
||||
:loading="transportModeLoading"
|
||||
placeholder="请选择运输方式"
|
||||
@visible-change="visible => visible && ensureTransportModes()"
|
||||
><el-option
|
||||
v-for="item in transportModeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value" /></el-select></el-form-item
|
||||
></el-col>
|
||||
<el-col :span="8"
|
||||
><el-form-item label="默认方案"
|
||||
><el-checkbox v-model="draft.defaultPlan" :disabled="readonly">默认方案</el-checkbox
|
||||
><el-icon class="billing-plan-editor__default-tip" @click="showDefaultPlanTip"
|
||||
><InfoFilled
|
||||
/></el-icon>
|
||||
></el-form-item
|
||||
><el-checkbox v-model="draft.defaultPlan" :disabled="readonly">默认方案</el-checkbox
|
||||
><el-tooltip content="同一运输方式仅支持配置一个默认计费方案" placement="top">
|
||||
<el-icon class="billing-plan-editor__default-tip"
|
||||
><InfoFilled
|
||||
/></el-icon> </el-tooltip
|
||||
></el-form-item
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="24"
|
||||
>
|
||||
<el-col :span="24"
|
||||
><el-form-item label="备注"
|
||||
><el-input
|
||||
v-model="draft.remark"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
:disabled="readonly" /></el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
><el-input
|
||||
v-model="draft.remark"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
:disabled="readonly" /></el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</section-card>
|
||||
<div class="rule-head">
|
||||
<el-link v-if="!readonly" type="primary" @click="addRule">+添加规则</el-link>
|
||||
</div>
|
||||
@@ -362,6 +366,7 @@ import { getList as getFeeItemList } from '@/api/base/fee-item';
|
||||
import { getLazyTree as getRegionLazyTree } from '@/api/base/region';
|
||||
import { InfoFilled } from '@element-plus/icons-vue';
|
||||
import { getDictionary } from '@/api/system/dictbiz';
|
||||
import SectionCard from '@/components/section-card/main.vue';
|
||||
|
||||
const clone = value => JSON.parse(JSON.stringify(value));
|
||||
const defaultRule = () => ({
|
||||
@@ -391,7 +396,7 @@ const defaultRule = () => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
components: { InfoFilled },
|
||||
components: { SectionCard, InfoFilled },
|
||||
props: {
|
||||
modelValue: Boolean,
|
||||
value: { type: Object, default: () => ({}) },
|
||||
@@ -874,9 +879,6 @@ export default {
|
||||
this.visible = false;
|
||||
});
|
||||
},
|
||||
showDefaultPlanTip() {
|
||||
this.$message.info('同一运输方式仅支持配置一个默认计费方案');
|
||||
},
|
||||
openMatch(row, index) {
|
||||
this.matchIndex = index;
|
||||
this.matchForm = { ...defaultRule().matchCondition, ...(row.matchCondition || {}) };
|
||||
|
||||
@@ -83,7 +83,10 @@
|
||||
</section>
|
||||
|
||||
<section class="change-section change-reason-section"><div class="dialog-section-title">变更原因</div><el-form-item prop="changeReason"><el-input v-model="form.changeReason" type="textarea" :rows="2" maxlength="2000" show-word-limit placeholder="请输入变更原因" /></el-form-item><div class="dialog-section-title">变更材料</div><el-upload action="#" :auto-upload="false" multiple :show-file-list="false" @change="handleChangeMaterial"><el-button plain>上传变更材料</el-button></el-upload></section>
|
||||
<div class="page-footer"><el-button type="primary" @click="submit">提交</el-button><el-button @click="$router.back()">关闭</el-button></div>
|
||||
<div class="page-footer">
|
||||
<el-button @click="$router.back()">取消</el-button>
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-dialog v-model="documentPreviewVisible" :title="previewFile.name || '附件预览'" append-to-body destroy-on-close width="90%" top="4vh">
|
||||
@@ -151,11 +154,11 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.contract-change-page { min-height: 100%; background: #f5f6fa; }
|
||||
<style scoped lang="scss">
|
||||
.contract-change-page { min-height: 100%; padding-bottom: 72px; background: #f5f6fa; }
|
||||
.contract-change-page :deep(.basic-container__card) { border: 0; background: transparent; box-shadow: none; }
|
||||
.contract-change-form { background: #f5f6fa; }
|
||||
.change-section { padding: 20px 24px; background: #fff; border-bottom: 1px solid #eff1f7; }
|
||||
.change-section { padding: 20px 24px; background: #fff; border-bottom: 1px solid #eff1f7; margin-top: 12px; }
|
||||
.contract-basic-section { margin-bottom: 12px; padding: 14px 16px 16px; overflow: hidden; background: #fff; border-bottom: 0; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
|
||||
.contract-basic-section > .dialog-section-title { margin-bottom: 20px; color: #303133; }
|
||||
.contract-basic-section__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; }
|
||||
@@ -182,8 +185,34 @@ export default {
|
||||
.attachment-upload .el-upload { display: inline-flex; }
|
||||
.settlement-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
|
||||
.settlement-form { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 8px 28px; }
|
||||
.change-reason-section { border: 1px dashed #ff8f9a; margin: 20px 16px; }
|
||||
.page-footer { display: flex; gap: 16px; padding: 20px 40px; border-top: 1px solid #eff1f7; }
|
||||
.change-reason-section { margin: 20px 0; }
|
||||
.page-footer {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 230px;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-height: 64px;
|
||||
box-sizing: border-box;
|
||||
padding: 12px 24px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #eff1f7;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
|
||||
|
||||
// 统一 12px 间距,与全站底部操作栏(去 gap,由相邻按钮 margin 提供)一致
|
||||
.el-button + .el-button {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
:global(.avue--collapse .page-footer) {
|
||||
left: 60px;
|
||||
}
|
||||
:global(.avue-layout--horizontal .page-footer) {
|
||||
left: 0;
|
||||
}
|
||||
@media (max-width: 1200px) { .contract-basic-section__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
|
||||
@media (max-width: 768px) { .contract-basic-section__grid { grid-template-columns: 1fr; } }
|
||||
</style>
|
||||
|
||||
@@ -33,16 +33,7 @@
|
||||
</template>
|
||||
|
||||
<template #search-menu>
|
||||
<div v-show="searchExpanded" class="contract-manage-page__expiry-search">
|
||||
<span>签约类型:</span>
|
||||
<el-select v-model="contractSignType" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in signTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="contract-manage-page__expiry-search">
|
||||
<el-check-tag
|
||||
v-for="item in expiryTagOptions"
|
||||
:key="item.value"
|
||||
@@ -55,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<template #contractName="{ row }">
|
||||
<el-link v-if="row.contractName" type="primary" @click.stop="openDetail(row)">
|
||||
<el-link v-if="row.contractName" type="primary" class="contract-name-cell" @click.stop="openDetail(row)">
|
||||
{{ row.contractName }}
|
||||
</el-link>
|
||||
<span v-else>-</span>
|
||||
@@ -492,8 +483,8 @@
|
||||
</el-form>
|
||||
|
||||
<div class="contract-manage-page__footer">
|
||||
<el-button @click="closeForm">关闭</el-button>
|
||||
<template v-if="formMode === 'add'">
|
||||
<el-button @click="closeForm">取消</el-button>
|
||||
<template v-if="formMode === 'add' || isDraftEdit">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -803,7 +794,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
||||
import PdfPreview from '@/components/pdf-preview/main.vue';
|
||||
import { ElImageViewer } from 'element-plus';
|
||||
import { ElImageViewer, ElTreeSelect } from 'element-plus';
|
||||
import { OpenFileViewer } from '@open-file-viewer/vue';
|
||||
import { fallbackPlugin, imagePlugin, officePlugin, textPlugin } from '@open-file-viewer/core';
|
||||
import '@open-file-viewer/core/style.css';
|
||||
@@ -1111,7 +1102,6 @@ export default {
|
||||
page: { currentPage: 1, pageSize: 10, pageSizes: [10, 20, 50, 100], total: 0 },
|
||||
selectionList: [],
|
||||
searchExpanded: false,
|
||||
contractSignType: '',
|
||||
contractExpiryScope: '',
|
||||
contractExpiryStats: { all: 0, within30: 0, within90: 0, over90: 0, expired: 0 },
|
||||
expiryTagOptions: [
|
||||
@@ -1215,6 +1205,10 @@ export default {
|
||||
formMode() {
|
||||
return this.$route.query.mode === 'edit' ? 'edit' : 'add';
|
||||
},
|
||||
// 草稿(approvalStatus=draft)编辑页:按钮与新增页一致(暂存/提交临时/提交正式)
|
||||
isDraftEdit() {
|
||||
return this.formMode === 'edit' && this.form.approvalStatus === 'draft';
|
||||
},
|
||||
formPageTitle() {
|
||||
return this.$route.query.name || `${this.formMode === 'edit' ? '编辑' : '新增'}合同管理`;
|
||||
},
|
||||
@@ -1397,7 +1391,6 @@ export default {
|
||||
const query = this.normalizeSearch({
|
||||
...params,
|
||||
...this.query,
|
||||
...(this.contractSignType ? { signType: this.contractSignType } : {}),
|
||||
...(this.contractExpiryScope ? { expireScope: this.contractExpiryScope } : {}),
|
||||
});
|
||||
this.api
|
||||
@@ -1421,7 +1414,6 @@ export default {
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.contractSignType = '';
|
||||
this.contractExpiryScope = '';
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page);
|
||||
@@ -1692,7 +1684,10 @@ export default {
|
||||
this.organizationOptions = this.normalizeOrganizationTree(organizationTree);
|
||||
this.organizationFlatOptions = this.flattenOrganizationTree(this.organizationOptions);
|
||||
const column = this.findColumn(this.tableOption.column, 'organizationName');
|
||||
if (column) column.dicData = this.organizationOptions;
|
||||
if (column) {
|
||||
column.dicData = this.organizationOptions;
|
||||
column.renderSearch = scope => this.renderOrganizationSearch(scope);
|
||||
}
|
||||
this.syncCurrentOrganizationOption();
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -1756,6 +1751,24 @@ export default {
|
||||
this.organizationOptions.unshift(item);
|
||||
this.organizationFlatOptions.unshift(item);
|
||||
},
|
||||
renderOrganizationSearch(scope) {
|
||||
// 搜索区所属组织:树形下拉(与客户档案统一)
|
||||
return h(ElTreeSelect, {
|
||||
modelValue: scope.row?.organizationName || '',
|
||||
'onUpdate:modelValue': value => {
|
||||
if (scope.row) scope.row.organizationName = value;
|
||||
},
|
||||
data: this.organizationOptions,
|
||||
'node-key': 'id',
|
||||
'check-strictly': true,
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
'render-after-expand': false,
|
||||
style: 'width: 100%',
|
||||
placeholder: '请选择 所属组织',
|
||||
props: { label: 'label', value: 'id', children: 'children' },
|
||||
});
|
||||
},
|
||||
integerInput(prop, value) {
|
||||
this.form[prop] = String(value || '').replace(/\D/g, '');
|
||||
},
|
||||
@@ -2097,17 +2110,28 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contract-name-cell {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.contract-manage-page {
|
||||
&__expiry-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
padding-top: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 180px;
|
||||
}
|
||||
// 将 #search-menu slot 容器(即"时间段快捷筛选"组)排到「查询 / 重置 / 收起」之前;
|
||||
// .avue-form__menu 本身就是 flex + flex-end,整组内容自然靠右,无需额外推挤
|
||||
:deep(.avue-crud__search .avue-form__menu > .contract-manage-page__expiry-search) {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
&__footer {
|
||||
@@ -2119,13 +2143,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
min-height: 64px;
|
||||
box-sizing: border-box;
|
||||
padding: 12px 24px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #eff1f7;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
|
||||
|
||||
// 统一 12px 间距,与全站底部操作栏(去 gap,由相邻按钮 margin 提供)一致
|
||||
.el-button + .el-button {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&__flow {
|
||||
@@ -2144,6 +2172,17 @@ export default {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
// 搜索区域白底卡片包裹
|
||||
:deep(.avue-crud__search) {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
:deep(.avue-crud__search:not(.el-card)) {
|
||||
padding: 12px 12px 4px;
|
||||
}
|
||||
|
||||
&--form {
|
||||
min-height: 100%;
|
||||
padding-bottom: 72px;
|
||||
@@ -2180,7 +2219,8 @@ export default {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
> .dialog-section-title {
|
||||
> .dialog-section-title,
|
||||
:deep(.dialog-section-title) {
|
||||
margin-bottom: 20px;
|
||||
color: #303133;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
:disabled="isBasicInfoReadonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务部门" prop="businessDeptId" class="project-apply-form__item--full">
|
||||
<el-form-item label="业务部门" prop="businessDeptId">
|
||||
<el-tree-select
|
||||
v-model="form.businessDeptId"
|
||||
:data="businessDeptTreeOptions"
|
||||
@@ -211,7 +211,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目由来说明" prop="sourceRemark" class="project-apply-form__item--full">
|
||||
<el-input v-model="form.sourceRemark" maxlength="300" :disabled="isBasicInfoReadonly" />
|
||||
<el-input v-model="form.sourceRemark" type="textarea" rows="2" maxlength="300" :disabled="isBasicInfoReadonly" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@@ -2190,7 +2190,7 @@ export default {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
// 占满整行的表单项(业务部门 / 项目由来说明)
|
||||
// 占满整行的表单项(如项目由来说明等多行文本字段)
|
||||
:deep(.project-apply-form__item--full) {
|
||||
grid-column: 1 / -1;
|
||||
|
||||
|
||||
@@ -6,7 +6,19 @@
|
||||
<el-input v-model="query.paymentNo" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用部门">
|
||||
<el-input v-model="query.deptName" clearable placeholder="请输入" />
|
||||
<el-tree-select
|
||||
:model-value="query.deptName"
|
||||
:data="organizationTreeOptions"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
render-after-expand
|
||||
style="width: 100%"
|
||||
placeholder="请选择 所属组织"
|
||||
:props="{ label: 'label', value: 'id', children: 'children' }"
|
||||
@update:model-value="val => { query.deptName = findOrgById(val)?.rawLabel || val }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="付款日期">
|
||||
<el-date-picker
|
||||
@@ -47,9 +59,11 @@
|
||||
<script>
|
||||
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
||||
import { approvalStatusOptions } from '@/api/payment/billPayment';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
|
||||
export default {
|
||||
name: 'BillPaymentSearch',
|
||||
mixins: [organizationSearch],
|
||||
props: {
|
||||
query: { type: Object, required: true },
|
||||
loading: { type: Boolean, default: false },
|
||||
@@ -58,6 +72,9 @@ export default {
|
||||
data() {
|
||||
return { ArrowDown, ArrowUp, expanded: false, approvalStatusOptions };
|
||||
},
|
||||
mounted() {
|
||||
this.loadOrganizationOptions();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -10,7 +10,19 @@
|
||||
<el-input v-model="query.projectName" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织">
|
||||
<el-input v-model="query.deptName" clearable placeholder="请输入" />
|
||||
<el-tree-select
|
||||
:model-value="query.deptName"
|
||||
:data="organizationTreeOptions"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
render-after-expand
|
||||
style="width: 100%"
|
||||
placeholder="请选择 所属组织"
|
||||
:props="{ label: 'label', value: 'id', children: 'children' }"
|
||||
@update:model-value="val => { query.deptName = findOrgById(val)?.rawLabel || val }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item class="invoice-kingdee-item" label="金蝶单据状态">
|
||||
<el-select v-model="query.kingdeeStatus" clearable placeholder="请选择">
|
||||
@@ -234,6 +246,7 @@ import * as XLSX from 'xlsx';
|
||||
import * as api from '@/api/payment/invoiceApplication';
|
||||
import * as formalSettlementApi from '@/api/settlement/formalSettlement';
|
||||
import { invoiceApplicationTableColumns } from '@/option/payment/invoiceApplication';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
|
||||
const emptyQuery = () => ({
|
||||
applicationNo: '',
|
||||
@@ -245,6 +258,7 @@ const emptyQuery = () => ({
|
||||
|
||||
export default {
|
||||
name: 'InvoiceApplication',
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
ArrowDown,
|
||||
@@ -266,6 +280,7 @@ export default {
|
||||
...mapGetters(['permission']),
|
||||
},
|
||||
mounted() {
|
||||
this.loadOrganizationOptions();
|
||||
this.loadTable();
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -19,7 +19,19 @@
|
||||
<el-input v-model="query.projectName" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织">
|
||||
<el-input v-model="query.deptName" clearable placeholder="请输入" />
|
||||
<el-tree-select
|
||||
:model-value="query.deptName"
|
||||
:data="organizationTreeOptions"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
render-after-expand
|
||||
style="width: 100%"
|
||||
placeholder="请选择 所属组织"
|
||||
:props="{ label: 'label', value: 'id', children: 'children' }"
|
||||
@update:model-value="val => { query.deptName = findOrgById(val)?.rawLabel || val }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="searchExpanded" label="审核状态">
|
||||
<el-select v-model="query.approvalStatus" clearable placeholder="请选择">
|
||||
@@ -226,6 +238,7 @@ import { mapGetters } from 'vuex';
|
||||
import * as XLSX from 'xlsx';
|
||||
import * as api from '@/api/payment/invoiceReceipt';
|
||||
import { invoiceReceiptTableColumns } from '@/option/payment/invoiceReceipt';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
|
||||
const emptyQuery = () => ({
|
||||
invoiceNo: '',
|
||||
@@ -238,6 +251,7 @@ const emptyQuery = () => ({
|
||||
|
||||
export default {
|
||||
name: 'InvoiceReceipt',
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
ArrowDown,
|
||||
@@ -259,6 +273,7 @@ export default {
|
||||
...mapGetters(['permission']),
|
||||
},
|
||||
mounted() {
|
||||
this.loadOrganizationOptions();
|
||||
this.loadTable();
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -23,7 +23,18 @@
|
||||
/></el-form-item>
|
||||
<template v-if="searchExpanded">
|
||||
<el-form-item label="所属组织"
|
||||
><el-input v-model="query.deptName" clearable
|
||||
><el-tree-select
|
||||
:model-value="query.deptName"
|
||||
:data="organizationTreeOptions"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
render-after-expand
|
||||
style="width: 100%"
|
||||
placeholder="请选择 所属组织"
|
||||
:props="{ label: 'label', value: 'id', children: 'children' }"
|
||||
@update:model-value="val => { query.deptName = findOrgById(val)?.rawLabel || val }"
|
||||
/></el-form-item>
|
||||
<el-form-item label="关联结算单"
|
||||
><el-input v-model="query.settlementNo" clearable
|
||||
@@ -224,6 +235,7 @@ import { ArrowDown, ArrowUp, Refresh } from '@element-plus/icons-vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import * as api from '@/api/payment/paymentApplication';
|
||||
import { paymentApplicationTableColumns } from '@/option/payment/paymentApplication';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
|
||||
const emptyQuery = () => ({
|
||||
paymentNo: '',
|
||||
@@ -238,6 +250,7 @@ const emptyQuery = () => ({
|
||||
});
|
||||
export default {
|
||||
name: 'PaymentApplication',
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
ArrowDown,
|
||||
@@ -263,6 +276,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadOrganizationOptions();
|
||||
this.loadTable();
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -32,6 +32,15 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
<el-link type="primary" @click.stop="handleView(scope.row, scope.index)" v-if="permissionList.viewBtn"
|
||||
>查看</el-link
|
||||
>
|
||||
<el-link type="primary" @click.stop="handleEdit(scope.row, scope.index)" v-if="permissionList.editBtn"
|
||||
>编辑</el-link
|
||||
>
|
||||
<el-link type="danger" @click.stop="handleDel(scope.row, scope.index)" v-if="permissionList.delBtn"
|
||||
>删除</el-link
|
||||
>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
@@ -177,7 +186,9 @@ export default {
|
||||
border: true,
|
||||
index: true,
|
||||
selection: true,
|
||||
viewBtn: true,
|
||||
viewBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
menuWidth: 320,
|
||||
dialogWidth: 800,
|
||||
dialogClickModal: false,
|
||||
@@ -519,6 +530,15 @@ export default {
|
||||
isRootDept(row) {
|
||||
return row && (row.parentId === 0 || String(row.parentId) === '0');
|
||||
},
|
||||
handleView(row, index) {
|
||||
this.$refs.crud.rowView(row, index);
|
||||
},
|
||||
handleEdit(row, index) {
|
||||
this.$refs.crud.rowEdit(row, index);
|
||||
},
|
||||
handleDel(row, index) {
|
||||
this.$refs.crud.rowDel(row, index);
|
||||
},
|
||||
handleAdd(row) {
|
||||
this.parentId = row.id;
|
||||
this.loadParentDeptCode(row.id);
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</section-card>
|
||||
<el-tabs class="user-permission-tabs">
|
||||
<el-tabs type="border-card" class="user-permission-tabs">
|
||||
<el-tab-pane label="已拥有角色">
|
||||
<el-table :data="formRoleList" border>
|
||||
<el-table-column type="index" label="序号" width="70" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<basic-container>
|
||||
<el-tabs v-model="activeTab" @tab-change="handleTabChange">
|
||||
<el-tabs type="border-card" v-model="activeTab" @tab-change="handleTabChange">
|
||||
<!-- 个人信息 Tab -->
|
||||
<el-tab-pane label="个人信息" name="info">
|
||||
<el-form ref="infoForm" :model="infoForm" label-width="auto">
|
||||
|
||||
@@ -591,6 +591,7 @@ import {
|
||||
} from '@/api/transportCapacity/driver';
|
||||
import { getList as getVehicleList } from '@/api/transportCapacity/transport-vehicle';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
import { getDictionary } from '@/api/system/dictbiz';
|
||||
import { getLazyTree } from '@/api/base/region';
|
||||
import { exportBlob } from '@/api/common';
|
||||
@@ -661,6 +662,7 @@ export default {
|
||||
components: {
|
||||
ImageUploadField,
|
||||
},
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
option,
|
||||
@@ -849,6 +851,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.initDeptTree();
|
||||
this.loadOrganizationOptions();
|
||||
this.initRegionOptions();
|
||||
this.initQualificationTypeOptions();
|
||||
},
|
||||
|
||||
@@ -574,6 +574,7 @@ import { ElLoading } from 'element-plus';
|
||||
import { InfoFilled } from '@element-plus/icons-vue';
|
||||
import { option } from '@/option/transportCapacity/transport-ship';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
import {
|
||||
getList,
|
||||
getDetail,
|
||||
@@ -639,6 +640,7 @@ const emptyForm = () => ({
|
||||
|
||||
export default {
|
||||
components: { ImageUploadField, InfoFilled, ShipLedger },
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
option,
|
||||
@@ -731,6 +733,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.initDeptTree();
|
||||
this.loadOrganizationOptions();
|
||||
},
|
||||
methods: {
|
||||
hasPermission(code) {
|
||||
|
||||
@@ -544,6 +544,7 @@ import {
|
||||
recognizeBaiduOcr,
|
||||
} from '@/api/transportCapacity/transport-vehicle';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
import { exportBlob } from '@/api/common';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getUploadHeaders } from '@/utils/upload';
|
||||
@@ -633,6 +634,7 @@ export default {
|
||||
ImageUploadField,
|
||||
VehicleLedger,
|
||||
},
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
option,
|
||||
@@ -747,6 +749,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.initDeptTree();
|
||||
this.loadOrganizationOptions();
|
||||
},
|
||||
methods: {
|
||||
hasPermission(code) {
|
||||
|
||||
@@ -4643,7 +4643,7 @@ export default {
|
||||
white-space: normal !important;
|
||||
word-break: break-all;
|
||||
overflow-wrap: anywhere;
|
||||
line-height: 18px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
// 锁定表单项 label 与控件垂直居中对齐(避免长 label 折行时视觉错位)
|
||||
@@ -4657,8 +4657,6 @@ export default {
|
||||
// 通过 padding 把内容下沉到 label 中线,让 * 视觉中心落在第一行文字中心。
|
||||
:deep(.el-form-item.is-required .el-form-item__label) {
|
||||
align-items: flex-start;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item.is-required .el-form-item__label::before) {
|
||||
|
||||
Reference in New Issue
Block a user