唯一码生成页面修改逻辑

This commit is contained in:
2026-03-17 11:21:29 +08:00
parent d6486c4efd
commit 7db683b852
2 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询唯一码列表 // 查询唯一码管理列表
export function listCode(query) { export function listCode(query) {
return request({ return request({
url: '/unique/code/list', url: '/unique/code/list',
@@ -9,7 +9,7 @@ export function listCode(query) {
}) })
} }
// 查询唯一码详细 // 查询唯一码管理详细
export function getCode(id) { export function getCode(id) {
return request({ return request({
url: '/unique/code/' + id, url: '/unique/code/' + id,
@@ -17,7 +17,7 @@ export function getCode(id) {
}) })
} }
// 新增唯一码 // 新增唯一码管理
export function addCode(data) { export function addCode(data) {
return request({ return request({
url: '/unique/code', url: '/unique/code',
@@ -26,7 +26,7 @@ export function addCode(data) {
}) })
} }
// 修改唯一码 // 修改唯一码管理
export function updateCode(data) { export function updateCode(data) {
return request({ return request({
url: '/unique/code', url: '/unique/code',
@@ -35,7 +35,7 @@ export function updateCode(data) {
}) })
} }
// 删除唯一码 // 删除唯一码管理
export function delCode(id) { export function delCode(id) {
return request({ return request({
url: '/unique/code/' + id, url: '/unique/code/' + id,

View File

@@ -124,7 +124,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改唯一码对话框 --> <!-- 添加或修改唯一码管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="codeRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="codeRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="唯一码编号" prop="code"> <el-form-item label="唯一码编号" prop="code">
@@ -199,7 +199,7 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data) const { queryParams, form, rules } = toRefs(data)
/** 查询唯一码列表 */ /** 查询唯一码管理列表 */
function getList() { function getList() {
loading.value = true loading.value = true
listCode(queryParams.value).then(response => { listCode(queryParams.value).then(response => {
@@ -258,7 +258,7 @@ function handleSelectionChange(selection) {
function handleAdd() { function handleAdd() {
reset() reset()
open.value = true open.value = true
title.value = "添加唯一码" title.value = "添加唯一码管理"
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
@@ -268,7 +268,7 @@ function handleUpdate(row) {
getCode(_id).then(response => { getCode(_id).then(response => {
form.value = response.data form.value = response.data
open.value = true open.value = true
title.value = "修改唯一码" title.value = "修改唯一码管理"
}) })
} }
@@ -296,7 +296,7 @@ function submitForm() {
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
const _ids = row.id || ids.value const _ids = row.id || ids.value
proxy.$modal.confirm('是否确认删除唯一码编号为"' + _ids + '"的数据项?').then(function() { proxy.$modal.confirm('是否确认删除唯一码管理编号为"' + _ids + '"的数据项?').then(function() {
return delCode(_ids) return delCode(_ids)
}).then(() => { }).then(() => {
getList() getList()