提交
This commit is contained in:
1 parent
b15d1ddde3
commit
c270d14057
348 files changed
+50251
-45978
No files matched your search
@@ -30,7 +30,7 @@
|
||||
<el-popover
|
||||
:visible="visible"
|
||||
placement="bottom-end"
|
||||
:width="300"
|
||||
:width="type === 'textMulti' ? 360 : 300"
|
||||
trigger="click"
|
||||
:teleported="true"
|
||||
popper-class="column-header-filter-popper"
|
||||
@@ -69,6 +69,26 @@
|
||||
<p class="field-tip">{{ textFieldTip }}</p>
|
||||
</template>
|
||||
|
||||
<!-- 多个文本:各自模糊,命中任一即可 -->
|
||||
<template v-else-if="type === 'textMulti'">
|
||||
<div class="field">
|
||||
<label>客户名称</label>
|
||||
<el-select
|
||||
v-model="draftSelected"
|
||||
multiple
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
placeholder="输入名称后回车,可添加多个"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@visible-change="onDatePickerVisibleChange"
|
||||
/>
|
||||
</div>
|
||||
<p class="field-tip">多个客户为「或」:名称包含任一关键字即匹配</p>
|
||||
</template>
|
||||
|
||||
<!-- 枚举:固定选项勾选 -->
|
||||
<template v-else-if="type === 'enum'">
|
||||
<div class="field">
|
||||
@@ -263,6 +283,7 @@
|
||||
|
||||
const typeHint = computed(() => {
|
||||
if (props.type === 'text') return '文本:输入关键字模糊匹配(整库)'
|
||||
if (props.type === 'textMulti') return '文本:可添加多个名称,包含即匹配'
|
||||
if (props.type === 'enum') return '枚举:勾选固定选项'
|
||||
if (props.type === 'number') return '数字:运算符 + 单值或区间'
|
||||
return '时间:按日期闭区间过滤'
|
||||
@@ -288,9 +309,9 @@
|
||||
draftText.value = s.text || ''
|
||||
return
|
||||
}
|
||||
if (props.type === 'enum') {
|
||||
if (props.type === 'textMulti' || props.type === 'enum') {
|
||||
const s = (m || { text: '', selected: [], keyword: '' }) as TextColumnFilterState
|
||||
draftSelected.value = [...(s.selected || [])]
|
||||
draftSelected.value = [...(s.selected || [])].map((value) => String(value || '').trim()).filter(Boolean)
|
||||
draftKeyword.value = s.keyword || ''
|
||||
return
|
||||
}
|
||||
@@ -364,6 +385,12 @@
|
||||
if (props.type === 'text') {
|
||||
return { text: draftText.value.trim() }
|
||||
}
|
||||
if (props.type === 'textMulti') {
|
||||
const selected = draftSelected.value
|
||||
.map((value) => String(value || '').trim())
|
||||
.filter(Boolean)
|
||||
return { text: '', selected: [...new Set(selected)] }
|
||||
}
|
||||
if (props.type === 'enum') {
|
||||
return {
|
||||
text: '',
|
||||
|
||||
@@ -117,7 +117,7 @@ const editorHeight = computed(() => {
|
||||
})
|
||||
|
||||
function handleCompanyChange(key: PlSlipCompanyKey) {
|
||||
slipContent.value = applyPlSlipCompanyToHtml(slipContent.value, key)
|
||||
slipContent.value = applyPlSlipCompanyToHtml(slipContent.value, key, { swapSeal: true })
|
||||
}
|
||||
|
||||
async function waitForImagesLoaded(container: HTMLElement) {
|
||||
@@ -243,7 +243,7 @@ function toggleRedSeal() {
|
||||
}
|
||||
slipContent.value = injectSlipSealImages(
|
||||
slipContent.value,
|
||||
buildInboundSlipCompanySealHtml(),
|
||||
buildInboundSlipCompanySealHtml(selectedCompanyKey.value),
|
||||
'inbound-slip-seal-block'
|
||||
)
|
||||
showRedSeal.value = true
|
||||
@@ -267,7 +267,7 @@ async function handleSaveTemplate() {
|
||||
const plan = (await refreshPlan()) || currentPlan.value
|
||||
if (!plan) throw new Error('计划数据无效')
|
||||
// 保存前归一为山峡抬头,避免把云栋切换态写入模板
|
||||
const normalized = applyPlSlipCompanyToHtml(slipContent.value, 'shanxia')
|
||||
const normalized = applyPlSlipCompanyToHtml(slipContent.value, 'shanxia', { swapSeal: true })
|
||||
const finalTemplate = restoreInboundSlipPlaceholders(normalized, plan)
|
||||
await planApi.saveInboundSlipTemplate(currentPlanId.value, finalTemplate)
|
||||
ElMessage.success('模板保存成功')
|
||||
@@ -327,7 +327,7 @@ async function handleGeneratePdf() {
|
||||
if (plan) {
|
||||
const renderCtx = await buildSlipRenderContext(plan)
|
||||
htmlContent = replaceInboundSlipPlaceholders(htmlContent, plan, renderCtx)
|
||||
htmlContent = applyPlSlipCompanyToHtml(htmlContent, selectedCompanyKey.value)
|
||||
htmlContent = applyPlSlipCompanyToHtml(htmlContent, selectedCompanyKey.value, { swapSeal: true })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,11 +62,12 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<DialogFormBody :loading="menuDialogLoading">
|
||||
<!-- 父子关联勾选:选父级全选子级,选子级自动带上父级(与 check-strictly 互斥,故不加) -->
|
||||
<!-- 节点独立勾选:父级不连带子级,子级也不连带父级 -->
|
||||
<el-tree
|
||||
ref="menuTreeRef"
|
||||
:data="menuTreeData"
|
||||
show-checkbox
|
||||
check-strictly
|
||||
node-key="id"
|
||||
:props="{ label: 'menuName', children: 'children' }"
|
||||
:default-checked-keys="menuCheckedKeys"
|
||||
@@ -260,6 +261,7 @@
|
||||
ref="viewMenuTreeRef"
|
||||
class="role-view-readonly-tree"
|
||||
show-checkbox
|
||||
check-strictly
|
||||
:data="viewMenuTreeData"
|
||||
node-key="id"
|
||||
:props="{ label: 'menuName', children: 'children' }"
|
||||
@@ -595,7 +597,7 @@
|
||||
menuSubmitLoading.value = true
|
||||
try {
|
||||
const tree = menuTreeRef.value
|
||||
const rawKeys: string[] = tree?.getCheckedKeys(true) || []
|
||||
const rawKeys: string[] = tree?.getCheckedKeys() || []
|
||||
const leafKeys = [...new Set(rawKeys)]
|
||||
await fetchUpdateRoleMenus(menuEditingRoleId.value, leafKeys)
|
||||
menuDialogVisible.value = false
|
||||
@@ -791,7 +793,7 @@
|
||||
async function syncViewReadonlyTreeChecks() {
|
||||
viewTreeRenderKey.value += 1
|
||||
await nextTick()
|
||||
viewMenuTreeRef.value?.setCheckedKeys?.(viewMenuCheckedKeys.value, true)
|
||||
viewMenuTreeRef.value?.setCheckedKeys?.(viewMenuCheckedKeys.value)
|
||||
viewDeptTreeRef.value?.setCheckedKeys?.(viewDeptCheckedKeys.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user