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

This commit is contained in:
sexygoat
2026-04-24 11:17:39 +08:00
parent 62851342c3
commit e4ed3784e3
5 changed files with 147 additions and 67 deletions

View File

@@ -319,7 +319,8 @@
CardService,
DeviceService,
PackageManageService,
StorageService
StorageService,
ShopService
} from '@/api/modules'
import { ElMessage, ElMessageBox, ElTag } from 'element-plus'
import { Plus } from '@element-plus/icons-vue'
@@ -369,6 +370,7 @@
purchase_role: undefined,
identifier: '',
is_expired: undefined,
seller_shop_id: undefined,
start_time: '',
end_time: ''
}
@@ -376,6 +378,28 @@
// 搜索表单
const searchForm = reactive<OrderQueryParams>({ ...initialSearchState })
// 店铺列表(用于代理商搜索)
const shopOptions = ref<any[]>([])
// 搜索代理商
const searchShops = async (query: string) => {
try {
const params: any = {
page: 1,
page_size: 20
}
if (query) {
params.shop_name = query
}
const res = await ShopService.getShops(params)
if (res.code === 0) {
shopOptions.value = res.data.items || []
}
} catch (error) {
console.error('Search shops failed:', error)
}
}
// 获取订单角色文本
const getPurchaseRoleText = (role: string): string => {
const roleMap: Record<string, string> = {
@@ -404,10 +428,10 @@
label: '资产标识符',
prop: 'identifier',
type: 'input',
placeholder: 'ICCID 或 VirtualNo',
config: {
maxlength: 30,
clearable: true
clearable: true,
placeholder: 'ICCID/VirtualNo/IMEI/SN/MSISDN'
},
labelWidth: '100'
},
@@ -478,6 +502,23 @@
clearable: true
}
},
{
label: '所属代理商',
prop: 'seller_shop_id',
type: 'select',
placeholder: '请选择所属代理商',
options: () =>
shopOptions.value.map((shop) => ({
label: shop.shop_name,
value: shop.id
})),
config: {
clearable: true,
filterable: true,
remote: true,
remoteMethod: (query: string) => searchShops(query)
}
},
{
label: '订单渠道',
prop: 'purchase_role',
@@ -970,6 +1011,7 @@
purchase_role: searchForm.purchase_role,
identifier: searchForm.identifier || undefined,
is_expired: searchForm.is_expired,
seller_shop_id: searchForm.seller_shop_id,
start_time: searchForm.start_time || undefined,
end_time: searchForm.end_time || undefined
}