提交
This commit is contained in:
1 parent
833544def3
commit
16be6fa22d
204 files changed
+455089
-46491
No files matched your search
@@ -1,26 +1,20 @@
|
||||
<template>
|
||||
<div v-if="hasSelection" class="list-export-dropdown">
|
||||
<el-button
|
||||
class="btn-ghost list-export-dropdown__main"
|
||||
:disabled="disabled"
|
||||
:loading="exporting"
|
||||
@click="handleExportFiltered"
|
||||
>
|
||||
<el-icon><Download /></el-icon>
|
||||
导出筛选结果
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
:disabled="disabled || exporting"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<el-button class="btn-ghost list-export-dropdown__caret" :disabled="disabled || exporting">
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
<el-button class="btn-ghost" :disabled="disabled" :loading="exporting">
|
||||
<el-icon><Download /></el-icon>
|
||||
导出
|
||||
<el-icon class="list-export-dropdown__caret-icon"><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="selected" :disabled="!selectedIds?.length">
|
||||
导出已选
|
||||
<el-dropdown-item command="filtered">导出筛选结果</el-dropdown-item>
|
||||
<el-dropdown-item command="selected" :disabled="!selectedCount">
|
||||
{{ selectedCount ? `导出已选(${selectedCount})` : '导出已选' }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@@ -40,7 +34,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { ArrowDown, Download } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
@@ -77,6 +71,8 @@
|
||||
|
||||
const exporting = ref(false)
|
||||
|
||||
const selectedCount = computed(() => props.selectedIds?.length || 0)
|
||||
|
||||
function buildPayload(withIds: boolean): ListExportPayload {
|
||||
const payload: ListExportPayload = { ...props.getFilterParams() }
|
||||
if (props.visibleColumns?.length) {
|
||||
@@ -111,6 +107,7 @@
|
||||
}
|
||||
|
||||
function handleCommand(cmd: string) {
|
||||
if (cmd === 'filtered') void runExport(false)
|
||||
if (cmd === 'selected') void runExport(true)
|
||||
}
|
||||
</script>
|
||||
@@ -118,7 +115,7 @@
|
||||
<style scoped lang="scss">
|
||||
.list-export-dropdown {
|
||||
display: inline-flex;
|
||||
align-items: stretch;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
|
||||
:deep(.el-button) {
|
||||
@@ -129,16 +126,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.list-export-dropdown__main {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
.list-export-dropdown__caret {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
min-width: 36px;
|
||||
padding: 0 10px;
|
||||
.list-export-dropdown__caret-icon {
|
||||
margin-left: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -36,6 +36,7 @@
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="handlePlanDateChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="归属公司" prop="belongsCompany">
|
||||
@@ -383,14 +384,18 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="pl-plan-logistics-block">
|
||||
<div class="pl-plan-logistics-block-head">
|
||||
<div class="pl-plan-logistics-block-wrap">
|
||||
<el-button
|
||||
class="pl-plan-logistics-swap-btn"
|
||||
text
|
||||
type="primary"
|
||||
@click="handleSwapPickupDelivery"
|
||||
>
|
||||
<el-icon><Sort /></el-icon>取送货互换
|
||||
</el-button>
|
||||
<div class="pl-plan-logistics-block">
|
||||
<h4 class="pl-plan-subtitle">送货信息</h4>
|
||||
<el-button text type="primary" @click="handleSwapPickupDelivery">
|
||||
<el-icon><Sort /></el-icon>取送货互换
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="送货地址" class="form-col-span-2">
|
||||
<PlAddressWithLibrary
|
||||
v-model="formData.destinationAddress"
|
||||
@@ -415,6 +420,7 @@
|
||||
<el-form-item label="注意事项" class="form-col-span-2">
|
||||
<el-input v-model="formData.destinationNotes" placeholder="送货注意事项" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1339,21 +1345,12 @@ function resetForm() {
|
||||
basicFormRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
/** 新增时:取货/送达时间默认跟随计划日期;已手改则不覆盖 */
|
||||
watch(
|
||||
() => formData.planDate,
|
||||
(next, prev) => {
|
||||
if (isEdit.value || isCopy.value) return
|
||||
const nextVal = next || ''
|
||||
const prevVal = prev || ''
|
||||
if (!formData.pickupTime || formData.pickupTime === prevVal) {
|
||||
formData.pickupTime = nextVal
|
||||
}
|
||||
if (!formData.deliveryTime || formData.deliveryTime === prevVal) {
|
||||
formData.deliveryTime = nextVal
|
||||
}
|
||||
}
|
||||
)
|
||||
/** 计划日期变更时,取货/送货时间始终跟随;二者仍可单独调整 */
|
||||
function handlePlanDateChange(val: string | null) {
|
||||
const nextVal = val || ''
|
||||
formData.pickupTime = nextVal
|
||||
formData.deliveryTime = nextVal
|
||||
}
|
||||
|
||||
function handleOpened() {
|
||||
loadMasterData().then(async () => {
|
||||
@@ -1792,17 +1789,6 @@ async function handleSubmit(mode: 'save' | 'saveAndArrange' = 'save') {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-block-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-block-head .pl-plan-subtitle {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.pl-plan-party-select-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -1873,12 +1859,30 @@ async function handleSubmit(mode: 'save' | 'saveAndArrange' = 'save') {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-row {
|
||||
margin-top: 34px;
|
||||
}
|
||||
|
||||
.pl-plan-party-row .pl-plan-party-block,
|
||||
.pl-plan-logistics-row .pl-plan-logistics-block {
|
||||
.pl-plan-logistics-row .pl-plan-logistics-block,
|
||||
.pl-plan-logistics-row .pl-plan-logistics-block-wrap {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-block-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-swap-btn {
|
||||
position: absolute;
|
||||
top: -32px;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
height: 26px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.pl-plan-flow-bridge {
|
||||
flex: 0 0 88px;
|
||||
display: flex;
|
||||
@@ -1934,10 +1938,6 @@ async function handleSubmit(mode: 'save' | 'saveAndArrange' = 'save') {
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.pl-plan-logistics-block-head {
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user