fix: 套餐订购,界面优化
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m59s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m59s
This commit is contained in:
@@ -315,7 +315,7 @@ export class CardService extends BaseService {
|
|||||||
* @param params 查询参数
|
* @param params 查询参数
|
||||||
*/
|
*/
|
||||||
static getStandaloneIotCards(params?: any): Promise<PaginationResponse<any>> {
|
static getStandaloneIotCards(params?: any): Promise<PaginationResponse<any>> {
|
||||||
return this.getPage('/api/admin/iot-cards/standalone', params)
|
return this.getPage('/api/admin/iot-cards/standalone', { is_standalone: true, ...params })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>资产查询</span>
|
<span>资产查询</span>
|
||||||
|
<ElButton type="danger" @click="handleGoBack">返回上次搜索</ElButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="iccid-search">
|
<div class="iccid-search">
|
||||||
@@ -63,11 +64,13 @@
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
search: [payload: { identifier: string }]
|
search: [payload: { identifier: string }]
|
||||||
refresh: []
|
refresh: []
|
||||||
|
goBack: []
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// State
|
// State
|
||||||
const searchIccid = ref('')
|
const searchIccid = ref('')
|
||||||
const iccidInputFocused = ref(false)
|
const iccidInputFocused = ref(false)
|
||||||
|
const previousSearchValue = ref('')
|
||||||
|
|
||||||
// 从URL参数中获取初始值
|
// 从URL参数中获取初始值
|
||||||
const initializeFromQuery = () => {
|
const initializeFromQuery = () => {
|
||||||
@@ -86,6 +89,9 @@
|
|||||||
|
|
||||||
// 暴露方法供父组件调用,用于更新搜索框值
|
// 暴露方法供父组件调用,用于更新搜索框值
|
||||||
const updateSearchValue = (value: string) => {
|
const updateSearchValue = (value: string) => {
|
||||||
|
if (value && value !== searchIccid.value) {
|
||||||
|
previousSearchValue.value = searchIccid.value
|
||||||
|
}
|
||||||
searchIccid.value = value
|
searchIccid.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +100,7 @@
|
|||||||
if (!searchIccid.value.trim()) {
|
if (!searchIccid.value.trim()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
previousSearchValue.value = searchIccid.value.trim()
|
||||||
emit('search', { identifier: searchIccid.value.trim() })
|
emit('search', { identifier: searchIccid.value.trim() })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,9 +108,19 @@
|
|||||||
emit('refresh')
|
emit('refresh')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleGoBack = () => {
|
||||||
|
if (previousSearchValue.value) {
|
||||||
|
const temp = searchIccid.value
|
||||||
|
searchIccid.value = previousSearchValue.value
|
||||||
|
previousSearchValue.value = temp
|
||||||
|
emit('search', { identifier: searchIccid.value.trim() })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 暴露给父组件
|
// 暴露给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
updateSearchValue
|
updateSearchValue,
|
||||||
|
handleGoBack
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -117,6 +134,12 @@
|
|||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
background: var(--el-fill-color-light);
|
background: var(--el-fill-color-light);
|
||||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-card__body) {
|
:deep(.el-card__body) {
|
||||||
|
|||||||
@@ -38,16 +38,9 @@
|
|||||||
<span v-else>{{ scope.row.order_no }}</span>
|
<span v-else>{{ scope.row.order_no }}</span>
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
<ElTableColumn label="套餐名称" width="150">
|
<ElTableColumn label="套餐名称" width="200" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<ElButton
|
<span class="package-name-text">{{ scope.row.package_name }}</span>
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
class="package-name-link"
|
|
||||||
@click="handlePackageNameClick(scope.row)"
|
|
||||||
>
|
|
||||||
{{ scope.row.package_name }}
|
|
||||||
</ElButton>
|
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
<ElTableColumn label="套餐价格" width="120">
|
<ElTableColumn label="套餐价格" width="120">
|
||||||
@@ -120,8 +113,16 @@
|
|||||||
{{ formatDateTime(scope.row.created_at) }}
|
{{ formatDateTime(scope.row.created_at) }}
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
<ElTableColumn label="操作" width="120" fixed="right">
|
<ElTableColumn label="操作" width="160" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<ElButton
|
||||||
|
v-if="hasAuth('package_usage:daily_records')"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handlePackageNameClick(scope.row)"
|
||||||
|
>
|
||||||
|
流量详单
|
||||||
|
</ElButton>
|
||||||
<ElButton
|
<ElButton
|
||||||
v-if="scope.row.status !== 4 && hasAuth('package:create_refund')"
|
v-if="scope.row.status !== 4 && hasAuth('package:create_refund')"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -343,7 +344,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.package-name-link {
|
.package-name-text {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -262,7 +262,7 @@
|
|||||||
|
|
||||||
// 设备搜索表单初始值
|
// 设备搜索表单初始值
|
||||||
const initialDeviceSearchState = {
|
const initialDeviceSearchState = {
|
||||||
status: undefined,
|
status: 2,
|
||||||
virtual_no: '',
|
virtual_no: '',
|
||||||
device_name: '',
|
device_name: '',
|
||||||
device_type: '',
|
device_type: '',
|
||||||
|
|||||||
@@ -173,7 +173,9 @@
|
|||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
v-if="allocateForm.selection_type === CardSelectionType.FILTER && userInfo.user_type !== 3"
|
v-if="
|
||||||
|
allocateForm.selection_type === CardSelectionType.FILTER && userInfo.user_type !== 3
|
||||||
|
"
|
||||||
label="批次号"
|
label="批次号"
|
||||||
>
|
>
|
||||||
<ElSelect
|
<ElSelect
|
||||||
@@ -274,7 +276,9 @@
|
|||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
v-if="recallForm.selection_type === CardSelectionType.FILTER && userInfo.user_type !== 3"
|
v-if="
|
||||||
|
recallForm.selection_type === CardSelectionType.FILTER && userInfo.user_type !== 3
|
||||||
|
"
|
||||||
label="批次号"
|
label="批次号"
|
||||||
>
|
>
|
||||||
<ElSelect
|
<ElSelect
|
||||||
@@ -1162,8 +1166,8 @@
|
|||||||
placeholder: '全部'
|
placeholder: '全部'
|
||||||
},
|
},
|
||||||
options: () => [
|
options: () => [
|
||||||
{ label: '未绑定设备', value: false },
|
{ label: '未绑定设备', value: true },
|
||||||
{ label: '已绑定设备', value: true }
|
{ label: '已绑定设备', value: false }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user