feat:订单代码生成

This commit is contained in:
dzc committed 2025-01-05 17:05:38 +08:00
1 parent 528c82bcf0
commit f618439e06
5 files changed
+376 -23

No files matched your search

+42 -23
View File
@@ -1,31 +1,50 @@
<template>
<div class="layout-padding">
<div class="layout-padding-auto layout-padding-view">
<el-row>
<div class="mb8" style="width: 100%">
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
v-auth="'hard_hardInvoice_add'">
新 增
</el-button>
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'hard_hardInvoice_del'"
@click="handleDelete(selectObjs)">
删除
</el-button>
<right-toolbar v-model:showSearch="showSearch" :export="'hard_hardInvoice_export'" @exportExcel="exportExcel"
class="ml10 mr20" style="float: right;" @queryTable="getDataList"></right-toolbar>
</div>
</el-row>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24">
<el-col :span="4">
<el-form-item class="w100" label="设备名" prop="name">
<el-input v-model="state.queryForm.name" placeholder="设备名" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="w100" label="设备类型" prop="type">
<dict-select v-model="state.queryForm.type" dict-code="hard_type" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="w100" label="商户" prop="merchantIds">
<select-mch v-model="state.queryForm.merchantIds" />
</el-form-item>
</el-col>
<el-form-item>
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
}}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
</el-form-item>
</el-row>
</el-form>
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
@sort-change="sortChangeHandle">
<el-table-column type="selection" width="40" align="center" />
<el-table-column type="index" label="#" width="40" />
<el-table-column prop="deptId" label="部门id" show-overflow-tooltip />
<el-table-column prop="hardId" label="设备id" show-overflow-tooltip />
<el-table-column prop="hardOrderId" label="硬件订单id" show-overflow-tooltip />
<el-table-column prop="status" label="状态" show-overflow-tooltip />
<el-table-column prop="pic" label="发票图片" show-overflow-tooltip />
<el-table-column label="操作" width="150">
<el-table-column prop="deptId" label="订单编号" />
<el-table-column prop="hardId" label="设备" />
<el-table-column label="商家" prop="merchantStr" />
<el-table-column label="部门" prop="deptName" />
<el-table-column prop="status" label="打印状态">
<template #default="{ row }">
</template>
</el-table-column>
<el-table-column prop="pic" label="发票">
<template #default="{ row }">
<preview-image v-if="row.pic" :src="row.pic" />
</template>
</el-table-column>
<el-table-column v-if="false" label="操作" width="150">
<template #default="scope">
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardInvoice_edit'"
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
@@ -45,7 +64,7 @@
<script setup lang="ts" name="systemHardInvoice">
import { BasicTableProps, useTable } from "/@/hooks/table";
import { fetchList, delObjs } from '/@/api/hard/hard-invoice'
import * as hardInvoiceApi from '/@/api/hard/hard-invoice'
import { useMessage, useMessageBox } from "/@/hooks/message";
import { useDict } from '/@/hooks/dict';
@@ -64,7 +83,7 @@ const multiple = ref(true)
const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {},
pageList: fetchList
pageList: hardInvoiceApi.pageJoin
})
// table hook
@@ -106,7 +125,7 @@ const handleDelete = async (ids: string[]) => {
}
try {
await delObjs(ids);
await hardInvoiceApi.delObjs(ids);
getDataList();
useMessage().success('删除成功');
} catch (err: any) {