This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
<span>加载中...</span>
|
||||
</div>
|
||||
</ElCard>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -64,8 +63,7 @@
|
||||
{ label: '换货单号', prop: 'exchange_no' },
|
||||
{
|
||||
label: '状态',
|
||||
render: (data) =>
|
||||
h(ElTag, { type: getStatusType(data.status) }, () => data.status_text)
|
||||
render: (data) => h(ElTag, { type: getStatusType(data.status) }, () => data.status_text)
|
||||
},
|
||||
{
|
||||
label: '换货原因',
|
||||
@@ -80,11 +78,7 @@
|
||||
{
|
||||
label: '新资产类型',
|
||||
formatter: (_, data) =>
|
||||
data.new_asset_type
|
||||
? data.new_asset_type === 'iot_card'
|
||||
? 'IoT卡'
|
||||
: '设备'
|
||||
: '--'
|
||||
data.new_asset_type ? (data.new_asset_type === 'iot_card' ? 'IoT卡' : '设备') : '--'
|
||||
},
|
||||
{
|
||||
label: '新资产标识符',
|
||||
|
||||
@@ -13,16 +13,9 @@
|
||||
|
||||
<ElCard shadow="never" class="art-table-card">
|
||||
<!-- 表格头部 -->
|
||||
<ArtTableHeader
|
||||
v-model:columns="columnChecks"
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<ArtTableHeader v-model:columns="columnChecks" @refresh="handleRefresh">
|
||||
<template #left>
|
||||
<ElButton
|
||||
type="primary"
|
||||
@click="showCreateDialog"
|
||||
v-permission="'exchange:create'"
|
||||
>
|
||||
<ElButton type="primary" @click="showCreateDialog" v-permission="'exchange:create'">
|
||||
创建换货单
|
||||
</ElButton>
|
||||
</template>
|
||||
@@ -68,12 +61,7 @@
|
||||
:close-on-click-modal="false"
|
||||
@closed="handleCloseCreateDialog"
|
||||
>
|
||||
<ElForm
|
||||
ref="createFormRef"
|
||||
:model="createForm"
|
||||
:rules="createRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<ElForm ref="createFormRef" :model="createForm" :rules="createRules" label-width="120px">
|
||||
<ElFormItem label="换货原因" prop="exchange_reason">
|
||||
<ElInput
|
||||
v-model="createForm.exchange_reason"
|
||||
@@ -83,7 +71,11 @@
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="旧资产类型" prop="old_asset_type">
|
||||
<ElSelect v-model="createForm.old_asset_type" placeholder="请选择旧资产类型" style="width: 100%">
|
||||
<ElSelect
|
||||
v-model="createForm.old_asset_type"
|
||||
placeholder="请选择旧资产类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<ElOption label="IoT卡" value="iot_card" />
|
||||
<ElOption label="设备" value="device" />
|
||||
</ElSelect>
|
||||
@@ -122,12 +114,7 @@
|
||||
:close-on-click-modal="false"
|
||||
@closed="handleCloseShipDialog"
|
||||
>
|
||||
<ElForm
|
||||
ref="shipFormRef"
|
||||
:model="shipForm"
|
||||
:rules="shipRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<ElForm ref="shipFormRef" :model="shipForm" :rules="shipRules" label-width="120px">
|
||||
<ElFormItem label="新资产标识符" prop="new_identifier">
|
||||
<ElInput
|
||||
v-model="shipForm.new_identifier"
|
||||
@@ -142,7 +129,7 @@
|
||||
</ElFormItem>
|
||||
<ElFormItem label="是否迁移数据">
|
||||
<ElSwitch v-model="shipForm.migrate_data" />
|
||||
<div style="font-size: 12px; color: #909399; margin-top: 4px">
|
||||
<div style=" margin-top: 4px;font-size: 12px; color: #909399">
|
||||
开启后将迁移钱包余额、套餐记录到新资产
|
||||
</div>
|
||||
</ElFormItem>
|
||||
@@ -185,12 +172,8 @@
|
||||
const router = useRouter()
|
||||
|
||||
// 右键菜单相关
|
||||
const {
|
||||
showContextMenuHint,
|
||||
hintPosition,
|
||||
handleCellMouseEnter,
|
||||
handleCellMouseLeave
|
||||
} = useTableContextMenu()
|
||||
const { showContextMenuHint, hintPosition, handleCellMouseEnter, handleCellMouseLeave } =
|
||||
useTableContextMenu()
|
||||
|
||||
const contextMenuRef = ref<InstanceType<typeof ArtMenuRight>>()
|
||||
const currentExchangeRow = ref<ExchangeResponse | null>(null)
|
||||
@@ -334,15 +317,14 @@
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
width: 130,
|
||||
formatter: (row: any) =>
|
||||
h(ElTag, { type: getStatusType(row.status) }, () => row.status_text)
|
||||
formatter: (row: any) => h(ElTag, { type: getStatusType(row.status) }, () => row.status_text)
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建时间',
|
||||
width: 180,
|
||||
formatter: (row: any) => formatDateTime(row.created_at)
|
||||
},
|
||||
}
|
||||
])
|
||||
|
||||
const getStatusType = (status: number) => {
|
||||
|
||||
Reference in New Issue
Block a user