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 查询参数
|
||||
*/
|
||||
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>
|
||||
<div class="card-header">
|
||||
<span>资产查询</span>
|
||||
<ElButton type="danger" @click="handleGoBack">返回上次搜索</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
<div class="iccid-search">
|
||||
@@ -63,11 +64,13 @@
|
||||
const emit = defineEmits<{
|
||||
search: [payload: { identifier: string }]
|
||||
refresh: []
|
||||
goBack: []
|
||||
}>()
|
||||
|
||||
// State
|
||||
const searchIccid = ref('')
|
||||
const iccidInputFocused = ref(false)
|
||||
const previousSearchValue = ref('')
|
||||
|
||||
// 从URL参数中获取初始值
|
||||
const initializeFromQuery = () => {
|
||||
@@ -86,6 +89,9 @@
|
||||
|
||||
// 暴露方法供父组件调用,用于更新搜索框值
|
||||
const updateSearchValue = (value: string) => {
|
||||
if (value && value !== searchIccid.value) {
|
||||
previousSearchValue.value = searchIccid.value
|
||||
}
|
||||
searchIccid.value = value
|
||||
}
|
||||
|
||||
@@ -94,6 +100,7 @@
|
||||
if (!searchIccid.value.trim()) {
|
||||
return
|
||||
}
|
||||
previousSearchValue.value = searchIccid.value.trim()
|
||||
emit('search', { identifier: searchIccid.value.trim() })
|
||||
}
|
||||
|
||||
@@ -101,9 +108,19 @@
|
||||
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({
|
||||
updateSearchValue
|
||||
updateSearchValue,
|
||||
handleGoBack
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -117,6 +134,12 @@
|
||||
padding: 16px 20px;
|
||||
background: var(--el-fill-color-light);
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-card__body) {
|
||||
|
||||
@@ -38,16 +38,9 @@
|
||||
<span v-else>{{ scope.row.order_no }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="套餐名称" width="150">
|
||||
<ElTableColumn label="套餐名称" width="200" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<ElButton
|
||||
type="primary"
|
||||
link
|
||||
class="package-name-link"
|
||||
@click="handlePackageNameClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.package_name }}
|
||||
</ElButton>
|
||||
<span class="package-name-text">{{ scope.row.package_name }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="套餐价格" width="120">
|
||||
@@ -120,8 +113,16 @@
|
||||
{{ formatDateTime(scope.row.created_at) }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="操作" width="120" fixed="right">
|
||||
<ElTableColumn label="操作" width="160" fixed="right">
|
||||
<template #default="scope">
|
||||
<ElButton
|
||||
v-if="hasAuth('package_usage:daily_records')"
|
||||
type="primary"
|
||||
link
|
||||
@click="handlePackageNameClick(scope.row)"
|
||||
>
|
||||
流量详单
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="scope.row.status !== 4 && hasAuth('package:create_refund')"
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
// 设备搜索表单初始值
|
||||
const initialDeviceSearchState = {
|
||||
status: undefined,
|
||||
status: 2,
|
||||
virtual_no: '',
|
||||
device_name: '',
|
||||
device_type: '',
|
||||
|
||||
@@ -173,7 +173,9 @@
|
||||
</ElSelect>
|
||||
</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="批次号"
|
||||
>
|
||||
<ElSelect
|
||||
@@ -274,7 +276,9 @@
|
||||
</ElSelect>
|
||||
</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="批次号"
|
||||
>
|
||||
<ElSelect
|
||||
@@ -1162,8 +1166,8 @@
|
||||
placeholder: '全部'
|
||||
},
|
||||
options: () => [
|
||||
{ label: '未绑定设备', value: false },
|
||||
{ label: '已绑定设备', value: true }
|
||||
{ label: '未绑定设备', value: true },
|
||||
{ label: '已绑定设备', value: false }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user