wo快速切换状态删除

This commit is contained in:
2026-04-24 01:05:06 +08:00
parent 403f983826
commit a3d94ae50b
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -447,7 +447,7 @@ func ApiPurchase(r *gin.RouterGroup) {
//读取条目 //读取条目
var getorders []TabPurchaseOrder var getorders []TabPurchaseOrder
query.Order("created_at DESC").Offset(jsondata.Entries * (jsondata.Page - 1)).Limit(jsondata.Entries).Find(&getorders) query.Order("updated_at DESC, id DESC").Offset(jsondata.Entries * (jsondata.Page - 1)).Limit(jsondata.Entries).Find(&getorders)
ReturnJson(ctx, "apiOK", map[string]interface{}{ ReturnJson(ctx, "apiOK", map[string]interface{}{
"all_count": count, "all_count": count,
@@ -162,8 +162,8 @@ onMounted(fetchOrders)
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-16">No.</th> <th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-16">No.</th>
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-48">{{ t('purchase.item_name') }}</th> <th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-48">{{ t('purchase.item_name') }}</th>
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-64">{{ t('purchase.purpose') }}</th> <th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-64">{{ t('purchase.purpose') }}</th>
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 whitespace-nowrap w-32">{{ t('purchase.created_at') }}</th> <th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 whitespace-nowrap w-32">{{ t('purchase.created_at') }}</th>
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 whitespace-nowrap w-32">{{ t('purchase.updated_at') }}</th>
<th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-32">{{ t('purchase.status') }}</th> <th class="px-6 py-3 font-medium text-gray-500 dark:text-gray-400 w-32">{{ t('purchase.status') }}</th>
</tr> </tr>
</thead> </thead>
@@ -187,6 +187,7 @@ onMounted(fetchOrders)
<td class="px-6 py-3 max-w-[200px] truncate font-medium text-gray-900 dark:text-white">{{ order.Title }}</td> <td class="px-6 py-3 max-w-[200px] truncate font-medium text-gray-900 dark:text-white">{{ order.Title }}</td>
<td class="px-6 py-3 max-w-[200px] truncate text-gray-600 dark:text-gray-300">{{ order.Remark || '-' }}</td> <td class="px-6 py-3 max-w-[200px] truncate text-gray-600 dark:text-gray-300">{{ order.Remark || '-' }}</td>
<td class="px-6 py-3 whitespace-nowrap text-gray-500 dark:text-gray-400">{{ formatDate(order.CreatedAt) }}</td> <td class="px-6 py-3 whitespace-nowrap text-gray-500 dark:text-gray-400">{{ formatDate(order.CreatedAt) }}</td>
<td class="px-6 py-3 whitespace-nowrap text-gray-500 dark:text-gray-400">{{ formatDate(order.UpdatedAt) }}</td>
<td class="px-6 py-3"> <td class="px-6 py-3">
<span <span
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold" class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold"
@@ -400,7 +400,7 @@ onUnmounted(() => {
</div> </div>
<!-- 状态快捷切换所有登录用户可见 --> <!-- 状态快捷切换所有登录用户可见 -->
<div <!-- <div
v-if="canCommit" v-if="canCommit"
class="flex flex-wrap items-center gap-2 border-b border-gray-100 px-6 py-3 dark:border-dk-muted" class="flex flex-wrap items-center gap-2 border-b border-gray-100 px-6 py-3 dark:border-dk-muted"
> >
@@ -418,7 +418,7 @@ onUnmounted(() => {
<IconCheck v-if="order?.CurrentStatus === opt.value" :size="12" /> <IconCheck v-if="order?.CurrentStatus === opt.value" :size="12" />
{{ t(opt.labelKey) }} {{ t(opt.labelKey) }}
</button> </button>
</div> </div> -->
<!-- 工单基本信息 --> <!-- 工单基本信息 -->
<div class="space-y-4 px-6 py-5"> <div class="space-y-4 px-6 py-5">