fix: update some files
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m44s

This commit is contained in:
luo
2026-08-18 17:36:41 +08:00
parent 93f67967c5
commit d9d07422a9
38 changed files with 1140 additions and 728 deletions

View File

@@ -397,11 +397,11 @@
>
<ElDatePicker
v-model="seriesBindingForm.created_at_range"
type="daterange"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DDTHH:mm:ssZ"
style="width: 100%"
/>
</ElFormItem>
@@ -1537,13 +1537,13 @@
{
label: '起止时间',
prop: 'dateRange',
type: 'date',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
rangeSeparator: '至',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
valueFormat: 'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'
}
}
]

View File

@@ -10,30 +10,6 @@
返回
</ElButton>
<h2 class="detail-title">换货单详情</h2>
<ElButton
v-if="exchangeAuditTarget && hasAuth(exchangeAuditPermission)"
type="primary"
plain
@click="openAuditInvestigation(exchangeAuditTarget)"
>
{{ userType === 3 ? '活动记录' : '换货审计' }}
</ElButton>
<ElButton
v-if="oldAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.exchangeOldAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(oldAssetAuditTarget)"
>
旧资产审计
</ElButton>
<ElButton
v-if="newAssetAuditTarget && hasAuth(AUDIT_PERMISSIONS.exchangeNewAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(newAssetAuditTarget)"
>
新资产审计
</ElButton>
</div>
<!-- 详情内容 -->
@@ -59,51 +35,15 @@
import { formatDateTime } from '@/utils/business/format'
import DetailPage from '@/components/common/DetailPage.vue'
import type { DetailSection } from '@/components/common/DetailPage.vue'
import { useAuth } from '@/composables/useAuth'
import { useUserStore } from '@/store/modules/user'
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
import { resolveAuditResourceTarget } from '@/utils/business/auditNavigation'
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
defineOptions({ name: 'ExchangeDetail' })
const route = useRoute()
const router = useRouter()
const { hasAuth } = useAuth()
const userStore = useUserStore()
const loading = ref(false)
const exchangeDetail = ref<ExchangeResponse | null>(null)
const exchangeId = ref<number>(0)
const userType = computed(() => Number(userStore.info.user_type))
const exchangeAuditPermission = computed(() =>
userType.value === 3 ? AUDIT_PERMISSIONS.agentExchangeActivity : AUDIT_PERMISSIONS.exchangeEntry
)
const exchangeAuditTarget = computed(() => {
if (!exchangeDetail.value || ![1, 2, 3].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: 'exchange_order',
internalId: exchangeDetail.value.id,
businessIdentifier: exchangeDetail.value.exchange_no
})
})
const oldAssetAuditTarget = computed(() => {
if (!exchangeDetail.value || ![1, 2].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: exchangeDetail.value.old_asset_type,
internalId: exchangeDetail.value.old_asset_id
})
})
const newAssetAuditTarget = computed(() => {
if (!exchangeDetail.value || ![1, 2].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: exchangeDetail.value.new_asset_type || '',
internalId: exchangeDetail.value.new_asset_id
})
})
const formatExchangeShopName = (shopName?: string | null, shopId?: number | null) => {
if (shopName) return shopName

View File

@@ -851,15 +851,15 @@
}
},
{
label: '创建时间',
label: '起止时间',
prop: 'created_at_range',
type: 'date',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
rangeSeparator: '至',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
valueFormat: 'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'
}
}
])

View File

@@ -80,7 +80,7 @@
total_count: 0,
window_days: 15
})
const searchForm = reactive<ExpiringAssetQueryParams>({
const searchForm = reactive<ExpiringAssetQueryParams & { expires_range: string[] }>({
asset_type: undefined,
keyword: '',
shop_id: undefined,
@@ -88,7 +88,8 @@
days_min: undefined,
days_max: undefined,
expires_from: undefined,
expires_to: undefined
expires_to: undefined,
expires_range: []
})
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
@@ -166,16 +167,17 @@
}
},
{
label: '预计到期起始',
prop: 'expires_from',
type: 'date',
config: { valueFormat: 'YYYY-MM-DD', clearable: true }
},
{
label: '预计到期结束',
prop: 'expires_to',
type: 'date',
config: { valueFormat: 'YYYY-MM-DD', clearable: true }
label: '预计到期起止',
prop: 'expires_range',
type: 'datetimerange',
config: {
type: 'datetimerange',
rangeSeparator: '至',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ',
clearable: true
}
}
])
@@ -314,8 +316,9 @@
const daysMax = toInteger(searchForm.days_max)
if (daysMin !== undefined) params.days_min = daysMin
if (daysMax !== undefined) params.days_max = daysMax
if (searchForm.expires_from) params.expires_from = searchForm.expires_from
if (searchForm.expires_to) params.expires_to = searchForm.expires_to
const [expiresFrom, expiresTo] = searchForm.expires_range || []
if (expiresFrom) params.expires_from = expiresFrom
if (expiresTo) params.expires_to = expiresTo
const response = await AssetService.getExpiringAssets(params)
if (response.code === 0 && response.data) {
@@ -347,7 +350,8 @@
days_min: undefined,
days_max: undefined,
expires_from: undefined,
expires_to: undefined
expires_to: undefined,
expires_range: []
})
pagination.currentPage = 1
void loadAssets()

View File

@@ -100,15 +100,15 @@
options: () => statusOptions
},
{
label: '创建时间',
label: '起止时间',
prop: 'dateRange',
type: 'date',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
rangeSeparator: '至',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
valueFormat: 'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'
}
}
]

View File

@@ -10,22 +10,6 @@
返回
</ElButton>
<h2 class="detail-title">资产分配详情</h2>
<ElButton
v-if="recordAuditTarget && hasAuth(recordAuditPermission)"
type="primary"
plain
@click="openAuditInvestigation(recordAuditTarget)"
>
{{ userType === 3 ? '活动记录' : '分配审计' }}
</ElButton>
<ElButton
v-if="assetAuditTarget && hasAuth(AUDIT_PERMISSIONS.assetAllocationAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(assetAuditTarget)"
>
资产审计
</ElButton>
</div>
<!-- 详情内容 -->
@@ -41,7 +25,7 @@
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue'
import { ref, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElCard, ElButton, ElIcon, ElMessage } from 'element-plus'
import { ArrowLeft, Loading } from '@element-plus/icons-vue'
@@ -50,44 +34,14 @@
import { CardService } from '@/api/modules'
import type { AssetAllocationRecord } from '@/types/api/card'
import { formatDateTime } from '@/utils/business/format'
import { useAuth } from '@/composables/useAuth'
import { useUserStore } from '@/store/modules/user'
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
import { resolveAuditResourceTarget } from '@/utils/business/auditNavigation'
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
defineOptions({ name: 'AssetAssignDetail' })
const route = useRoute()
const router = useRouter()
const { hasAuth } = useAuth()
const userStore = useUserStore()
const loading = ref(false)
const detailData = ref<AssetAllocationRecord | null>(null)
const userType = computed(() => Number(userStore.info.user_type))
const recordAuditPermission = computed(() =>
userType.value === 3
? AUDIT_PERMISSIONS.agentAssetAllocationActivity
: AUDIT_PERMISSIONS.assetAllocationEntry
)
const recordAuditTarget = computed(() => {
if (!detailData.value || ![1, 2, 3].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: 'asset_allocation_record',
internalId: detailData.value.id,
businessIdentifier: detailData.value.allocation_no
})
})
const assetAuditTarget = computed(() => {
if (!detailData.value || ![1, 2].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: detailData.value.asset_type,
internalId: detailData.value.asset_id
})
})
// 详情页配置
const detailSections: DetailSection[] = [

View File

@@ -172,16 +172,16 @@
}))
},
{
label: '创建时间',
label: '起止时间',
prop: 'dateRange',
type: 'date',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
clearable: true,
rangeSeparator: '至',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
valueFormat: 'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'
}
}
]

View File

@@ -200,12 +200,12 @@
{
label: '授权时间',
prop: 'dateRange',
type: 'daterange',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
valueFormat: 'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'
}
}
]

View File

@@ -213,9 +213,9 @@
{
label: '创建时间',
prop: 'dateRange',
type: 'daterange',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'

View File

@@ -329,9 +329,9 @@
{
label: '创建时间',
prop: 'dateRange',
type: 'daterange',
type: 'datetimerange',
config: {
type: 'daterange',
type: 'datetimerange',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ'