李胜楠 1 year ago
parent
commit
1da041a2d5
  1. 3
      .env.development
  2. 3
      .env.production
  3. 7
      .env.test
  4. 115
      src/components/BasicForm/src/BasicForm.vue
  5. 81
      src/components/TableForm/src/TableForm.vue
  6. 379
      src/utils/disposition/tableColumns.ts
  7. 760
      src/utils/validator.ts
  8. 2
      src/views/report/jmreport/index.vue
  9. 38
      src/views/wms/itembasic/ItembasicForm.vue
  10. 25
      src/views/wms/itempackaging/index.vue

3
.env.development

@ -32,3 +32,6 @@ VITE_OUT_DIR=dist
# 自定义接口路径
VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://localhost:12080'

3
.env.production

@ -29,3 +29,6 @@ VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=dist-pro
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110'

7
.env.test

@ -4,10 +4,10 @@ NODE_ENV=test
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://dev.ccwin-in.com:25110'
VITE_BASE_URL='http://dev.ccwin-in.com:25100/api'
# 上传路径
VITE_UPLOAD_URL='http://dev.ccwin-in.com:25110/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://dev.ccwin-in.com:25100/api/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
@ -32,3 +32,6 @@ VITE_OUT_DIR=dist-test
# 自定义接口路径
VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110'

115
src/components/BasicForm/src/BasicForm.vue

@ -1,6 +1,22 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="formSchema" :is-col="true" />
<div class="table" v-if="isBusiness">
<TableForm ref="tableFormRef"
class="w-[100%]"
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
:tableFormRules="tableFormRules"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@tableSelectionChange="tableSelectionChange"
@extendedButtonsClick="extendedButtonsClick"
@formSelectChange="formSelectChange"
@tableSortChange="tableSortChange"
@selectCallback="selectCallback"
@handleTableSelect="handleTableSelect"
@inpuFocus="inpuFocus"/>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
@ -11,6 +27,7 @@
import { SearchTable } from '@/components/SearchTable';
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
const props = defineProps({
// rules
@ -25,11 +42,28 @@ const props = defineProps({
required: true,
default: null
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
//
tableData:{
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
//
searchTableTitle: {
type: String,
required: false,
default:'查询'
default: '查询'
},
// Schemas
searchTableAllSchemas: {
@ -60,6 +94,12 @@ const props = defineProps({
type: Function,
required: true,
default: null
},
// tableForm
isBusiness: {
type: Boolean,
required: true,
default: true
}
})
@ -111,6 +151,7 @@ const buttonBaseClick = (val) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
@ -119,13 +160,21 @@ const buttonBaseClick = (val) => {
}
/** 提交表单 */
const emit = defineEmits(['success']) // success
// const emit = defineEmits(['success']) // success
const tableFormRef = ref()
const submitForm = async () => {
const elForm = unref(formRef)?.getElFormRef()
//
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
const validateForm = await tableFormRef.value.validateForm()
console.log(tableFormRef.value);
console.log(validateForm);
if (!validateForm) return;
//
formLoading.value = true
try {
@ -151,4 +200,66 @@ const submitForm = async () => {
const resetForm = () => {
unref(formRef)?.resetFields()
}
//
const emit = defineEmits([
'success',
'tableSelectionChange',
'extendedButtonsClick',
'formSelectChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
'handleDeleteTable',
'handleAddTable',
'inpuFocus'
])
//
const formSelectChange = (field, val) => {
emit('formSelectChange', field, val)
}
// selection
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
}
//
const tableSortChange = (column, prop, order) => {
emit('tableSortChange', column, prop, order)
}
//
// const showSelect = (val, statusID) => {
// return getDictForStatusID(val, statusID)
// }
//
const handleTableSelect = (row, column, event) => {
emit('handleTableSelect', row, column, event)
}
//
const handleDeleteTable = (row, index) => {
console.log(row);
console.log(index);
emit('handleDeleteTable', row)
}
//
const handleAddTable = () => {
console.log(2);
emit('handleAddTable')
}
//
const inpuFocus = (headerItem) => {
console.log(11);
opensearchTable()
}
</script>
<style lang="scss" scoped>
.table {
border: 1px solid #dedede;
border-radius: 8px;
padding: 10px;
display: flex;
}
</style>

81
src/components/TableForm/src/TableForm.vue

@ -19,7 +19,7 @@
v-if="isShowButton"
v-slot="{ row, $index }"
>
<Icon icon="ep:remove" color="#409eff" size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDelete(row, $index)" />
<Icon icon="ep:remove" color="#757575" size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDeleteTable (row, $index)" />
</el-table-column>
<!-- 多选 -->
<el-table-column
@ -46,7 +46,7 @@
:label="headerItem.label" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || ''"
:width="headerItem?.tableForm?.width || 'auto'"
:width="headerItem?.tableForm?.width || '200'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form ref="TableBaseForm_Ref"
:model="row"
@ -57,10 +57,28 @@
<el-form-item
v-if="!headerItem?.tableForm?.type || headerItem?.tableForm?.type == 'InputString'"
:prop="headerItem.field">
<el-input v-model="row[headerItem.field]"
<el-input
v-model="row[headerItem.field]"
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%;"
@focus="inpuFocus(headerItem)"
/>
</el-form-item>
<!-- 金额输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'number'"
:prop="headerItem.field">
<el-input
v-model="row[headerItem.field]"
clearable
type="number"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%;"
@input="row[headerItem.field] = row[headerItem.field].replace(/[^\d\.-]/g, '')"
/>
</el-form-item>
<!-- 数字输入框 -->
@ -73,7 +91,7 @@
:max="headerItem?.tableForm?.max"
:min="headerItem?.tableForm?.min"
:disabled="itemIsDisabled(headerItem, row)"
@focus="inpuFocus(headerItem)"/>
/>
</el-form-item>
<!-- 下拉框 -->
<el-form-item
@ -81,8 +99,12 @@
:prop="headerItem.field">
<el-select
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags ="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip ="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit ="headerItem?.tableForm.multipleLimit"
:disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable"
:allow-create="headerItem?.tableForm.allowCreate"
@ -102,6 +124,7 @@
:prop="headerItem.field">
<el-time-picker
v-model="row[headerItem.field]"
:clearable="true"
:placeholder="headerItem?.tableForm?.placeholder || '选择时间'"
style="width: 100%" :disabled="itemIsDisabled(headerItem, row)"
:format="headerItem?.tableForm?.format || 'HH:mm:ss'"
@ -113,6 +136,7 @@
:prop="headerItem.field">
<el-date-picker
v-model="row[headerItem.field]"
:clearable="true"
style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期'"
@ -125,6 +149,7 @@
:prop="headerItem.field">
<el-date-picker
type="datetime"
:clearable="true"
v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期时间'"
style="width: 100%"
@ -138,6 +163,7 @@
:prop="headerItem.field">
<el-date-picker
v-model="row[headerItem.field]"
:clearable="true"
:disabled="itemIsDisabled(headerItem, row)"
:type="headerItem?.tableForm?.timeType || 'datetimerange'"
range-separator="至"
@ -219,12 +245,11 @@
</el-table>
<div class="button flex" v-if="isShowButton">
<div class="p-12px" @click="handleAdd">
<div class="p-12px" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<div>添加明细</div>
</div>
</div>
</div>
</template>
@ -295,11 +320,10 @@ const emit = defineEmits([
'extendedButtonsClick',
'formSelectChange',
'tableSortChange',
'showDrawer',
'selectCallback',
'handleTableSelect',
'handleDelete',
'handleAdd',
'handleDeleteTable',
'handleAddTable',
'inpuFocus'
])
// | type = radio | type = select
@ -319,9 +343,9 @@ const tableSortChange = (column, prop, order) => {
emit('tableSortChange', column, prop, order)
}
//
const showSelect = (val, statusID) => {
return getDictForStatusID(val, statusID)
}
// const showSelect = (val, statusID) => {
// return getDictForStatusID(val, statusID)
// }
//
const handleTableSelect = (row, column, event) => {
@ -342,32 +366,26 @@ const TableBaseForm_Ref = ref()
* @param {*} error 如果验证不成功走的方法
*/
const $baseMessage = inject('$baseMessage')
const validateForm = (success, error) => {
const validateForm = async () => {
let _lists = TableBaseForm_Ref.value.map(v => v.validate())
Promise.all(_lists).then(res => {
if (success) success()
return Promise.all(_lists).then(res => {
return true
}).catch(err => {
if (error) {
error()
return
}
$baseMessage('验证未通过,请按规则填写', 'error', 'vab-hey-message-error')
return false
})
}
//
const handleDelete = (row, index) => {
console.log(row);
console.log(index);
emit('handleDelete', row)
const handleDeleteTable = (row, index) => {
emit('handleDeleteTable', row)
}
//
const handleAdd = () => {
emit('handleAdd')
const handleAddTable = () => {
emit('handleAddTable')
}
//
const inpuFocus = (headerItem)=>{
if(headerItem.isInpuFocusShow){
if(headerItem?.tableForm?.isInpuFocusShow){
emit('inpuFocus')
}
}
@ -376,6 +394,7 @@ defineExpose({
TableBaseComponents_Ref,
validateForm
})
</script>
@ -388,10 +407,12 @@ defineExpose({
border: none;
}
::v-deep(.el-table td.el-table__cell div) {
::v-deep(.el-table td.el-table__cell .el-form-item__content) {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
::v-deep(.el-table td.el-table__cell div) {
overflow: visible;
}

379
src/utils/disposition/tableColumns.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum } from "@/utils/validator";
/**
* @returns {Array}
*/
@ -3280,10 +3281,10 @@ export const Owner = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const OwnerRules = reactive({
code: [
{ required: true, message: '请选择代码', trigger: 'blur' }
{ required: true, message: '请输入代码', trigger: 'blur' }
],
shortName: [
{ required: true, message: '请选择简称', trigger: 'blur' }
{ required: true, message: '请输入简称', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
@ -3415,10 +3416,10 @@ export const Carrier = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const CarrierRules = reactive({
code: [
{ required: true, message: '请选择代码', trigger: 'blur' }
{ required: true, message: '请输入代码', trigger: 'blur' }
],
shortName: [
{ required: true, message: '请选择简称', trigger: 'blur' }
{ required: true, message: '请输入简称', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
@ -3460,7 +3461,8 @@ export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
field: 'endAtNextDay',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true
isTable: true,
isSearch: true
},
{
label: '是否可用',
@ -3519,13 +3521,13 @@ export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const ShiftRules = reactive({
code: [
{ required: true, message: '请选择代码', trigger: 'blur' }
{ required: true, message: '请输入代码', trigger: 'blur' }
],
beginTime: [
{ required: true, message: '请选择开始时间', trigger: 'blur' }
{ required: true, message: '请输入开始时间', trigger: 'blur' }
],
entTime: [
{ required: true, message: '请选择结束时间', trigger: 'blur' }
{ required: true, message: '请输入结束时间', trigger: 'blur' }
],
endAtNextDay: [
{ required: true, message: '请选择是否跨天', trigger: 'change' }
@ -3608,7 +3610,7 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const TeamRules = reactive({
code: [
{ required: true, message: '请选择代码', trigger: 'blur' }
{ required: true, message: '请输入代码', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
@ -3666,9 +3668,31 @@ export const Strategy = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '创建者',
field: 'creator'
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const StrategyRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
priority: [
{ required: true, message: '请输入优先级', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择类型', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
@ -3696,9 +3720,34 @@ export const Rule = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '配置',
field: 'configuration'
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const RuleRules = reactive({
strategyCode: [
{ required: true, message: '请输入策略代码', trigger: 'blur' }
],
priority: [
{ required: true, message: '请输入优先级', trigger: 'blur' }
],
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
configuration: [
{ required: true, message: '请输入配置', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -3730,9 +3779,37 @@ export const Condition = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '条件分组',
field: 'groupCode'
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const ConditionRules = reactive({
strategyCode: [
{ required: true, message: '请输入策略代码', trigger: 'blur' }
],
ruleCode: [
{ required: true, message: '请输入规则代码', trigger: 'blur' }
],
paramCode: [
{ required: true, message: '请输入参数', trigger: 'blur' }
],
operator: [
{ required: true, message: '请选择操作符', trigger: 'change' }
],
value: [
{ required: true, message: '请输入值', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -3761,8 +3838,33 @@ export const Configuration = useCrudSchemas(reactive<CrudSchema[]>([
label: '配置分组',
field: 'groupCode'
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const ConfigurationRules = reactive({
strategyCode: [
{ required: true, message: '请输入策略代码', trigger: 'blur' }
],
ruleCode: [
{ required: true, message: '请输入规则代码', trigger: 'blur' }
],
configurationCode: [
{ required: true, message: '请输入配置名称', trigger: 'blur' }
],
configurationValue: [
{ required: true, message: '请输入配置值', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -3811,14 +3913,45 @@ export const Configurationsetting = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: true
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const ConfigurationsettingRules = reactive({
strategyType: [
{ required: true, message: '请选择策略类型', trigger: 'change' }
],
configurationCode: [
{ required: true, message: '请输入配置代码', trigger: 'blur' }
],
configurationName: [
{ required: true, message: '请输入配置名称', trigger: 'blur' }
],
isRequired: [
{ required: true, message: '请选择必填', trigger: 'change' }
],
dataType: [
{ required: true, message: '请选择数据类型', trigger: 'change' }
],
valueScope: [
{ required: true, message: '请输入值范围', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const Paramsetting = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '策略代码',
label: '策略类型',
field: 'strategyType',
dictType: DICT_TYPE.STRATEGY_TYPE,
dictClass: 'string',
@ -3869,8 +4002,39 @@ export const Paramsetting = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: true
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const ParamsettingRules = reactive({
strategyType: [
{ required: true, message: '请选择策略类型', trigger: 'change' }
],
paramCode: [
{ required: true, message: '请输入参数代码', trigger: 'blur' }
],
usableOpeartors: [
{ required: true, message: '请选择可用操作符', trigger: 'change' }
],
isRequired: [
{ required: true, message: '请选择必填', trigger: 'change' }
],
dataType: [
{ required: true, message: '请选择数据类型', trigger: 'change' }
],
valueScope: [
{ required: true, message: '请输入值范围', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -3958,8 +4122,33 @@ export const Transactiontype = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const TransactiontypeRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
inventoryAction: [
{ required: true, message: '请选择库存动作', trigger: 'change' }
],
allowNegative: [
{ required: true, message: '请选择允许复数', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
@ -4107,8 +4296,42 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
isSearch: true
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const BusinesstypeRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
itemTypes: [
{ required: true, message: '请选择可用物品类型范围', trigger: 'change' }
],
itemStatuses: [
{ required: true, message: '请选择可用物品状态范围', trigger: 'change' }
],
outTransactionType: [
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransactionType: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
useOnTheWay: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -4216,8 +4439,45 @@ export const Documentsetting = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
isSearch: true
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const DocumentsettingRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择单据类型', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
numberPrefix: [
{ required: true, message: '请输入号码前缀', trigger: 'blur' }
],
dateFormat: [
{ required: true, message: '请输入号码时间格式', trigger: 'blur' }
],
serialLength: [
{ required: true, message: '请输入号码流水长度', trigger: 'blur' }
],
resetPeriod: [
{ required: true, message: '请选择流水重置周期', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
@ -4321,8 +4581,39 @@ export const Requestsetting = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const RequestsettingRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
requestMode: [
{ required: true, message: '请选择申请模式', trigger: 'change' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
@ -4470,8 +4761,57 @@ export const Jobsetting = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const JobsettingRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
validMinutes: [
{ required: true, message: '请输入有效分钟', trigger: 'blur' }
],
autoComplete: [
{ required: true, message: '请选择是否自动完成', trigger: 'change' }
],
allowModifyLocation: [
{ required: true, message: '请选择是否允许修改库位', trigger: 'change' }
],
allowModifyQty: [
{ required: true, message: '请选择是否允许修改数量', trigger: 'change' }
],
allowBiggerQty: [
{ required: true, message: '请选择是否允许大于推荐数量', trigger: 'change' }
],
allowSmallerQty: [
{ required: true, message: '请选择是否允许小于推荐数量', trigger: 'change' }
],
allowModifyInventoryStatus: [
{ required: true, message: '请选择是否允许修改库存状态', trigger: 'change' }
],
allowContinuousScanning: [
{ required: true, message: '请选择是否允许连续扫描', trigger: 'change' }
],
allowPartialComplete: [
{ required: true, message: '请选择是否允许部分完成', trigger: 'change' }
],
allowModifyBach: [
{ required: true, message: '请选择是否允许修改批次', trigger: 'change' }
],
allowModifyPackingNumber: [
{ required: true, message: '请选择是否允许修改包装号', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
@ -4543,8 +4883,27 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
isSearch: true
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150
}
}
]))
//表单校验
export const RecordsettingRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
})
/**
* @returns {Array}
*/

760
src/utils/validator.ts

@ -0,0 +1,760 @@
//校验学校编码 只能为数字
export function validateCode(rule, value, callback) {
if (!value) {
return callback(new Error('学校编码不能为空'))
} else {
const codeReg = /^[0-9]+$/
const codeMax = /^\d{0,5}$/
if (codeReg.test(value)) {
if (codeMax.test(value)) {
callback()
} else {
callback(new Error('学校编码不能大于5位'))
}
} else {
callback(new Error('请输入正确的学校编码,只能是数字'))
}
}
}
//校验邮箱
export function validateEmail(rule, value, callback) {
if (value) {
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
if (mailReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的邮箱格式'))
}
} else {
callback()
}
}
//校验英文
export function validateEng(rule, value, callback) {
if (value) {
const mailReg = /^[A-Za-z\-\&\(\)\Ⅰ\Ⅱ\Ⅲ\Ⅳ\Ⅴ\Ⅵ\Ⅶ\Ⅷ\Ⅸ\Ⅹ\s]+$/;
if (mailReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的英文名字'))
}
} else {
callback()
}
}
//校验姓名拼音
export function validateEngName(rule, value, callback) {
if (value) {
const EngNameReg = /^[A-Za-z \(\)\s]+$/
if (EngNameReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的姓名拼音'))
}
} else {
callback()
}
}
//校验手机号码
export function validateHanset(rule, value, callback) {
if (value) {
// const regs =/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
// const regs = /^1[3|4|5|7|8][0-9]\d{8}$/
const regs = /^1[3-9]\d{9}$/
if (regs.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机号'))
}
} else {
callback()
}
}
//校验座机电话
export function validatePhone(rule, value, callback) {
if (value) {
//const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
// const regs = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
const regs = /^((0\d{2,3}-\d{7,8}))$/;
if (regs.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的座机号'))
}
} else {
callback()
}
}
//校验家庭电话 手机或者座机
export function validateFamilyPhone(rule, value, callback) {
if (value) {
const isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
// const isMob = /^((\+?86)|(\+86))?(13[0123456789][0-9]{8}|15[0123456789][0-9]{8}|17[0123456789][0-9]{8}|18[0123456789][0-9]{8}|147[0-9]{8}|1349[0-9]{7})$/;
const isMob = /^1[3-9]\d{9}$/
if (isPhone.test(value) || isMob.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机或者座机电话'))
}
} else {
callback()
}
}
// 校验只能为中文
export function validateChinese(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
if (chineseReg.test(value)) {
callback()
} else {
callback(new Error('请输入简介,只能为中文'))
}
} else {
callback()
}
}
// 校验名称既能为中文也可以为英文
export function validateName(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
const engLish = /^[A-Za-z]+$/
if (chineseReg.test(value) || engLish.test(value)) {
callback()
} else {
callback(new Error('请输入正确的中文或者英文名称'))
}
} else {
callback()
}
}
// 校验负责人既能为中文也可以为英文
export function validateChargeperson(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
const engLish = /^[A-Za-z]+$/
if (chineseReg.test(value) || engLish.test(value)) {
callback()
} else {
callback(new Error('请输入正确的负责人(中英文都可以)'))
}
} else {
callback()
}
}
//校验学校名称不能为空
export function validateXXMC(rule, value, callback) {
if (!value) {
return callback(new Error('案例名称不能为空'))
} else {
const chineseReg = /^[\u4E00-\u9FA5]+$/
if (chineseReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的案例名称,只能是汉字'))
}
}
}
//校验中英文数字和下划线都可以
export function validateZYS(rule, value, callback) {
if (value) {
//const postReg =/^[\u4e00-\u9fa5_a-zA-Z0-9_]{4,10}+$/
const Reg = /^[\u4e00-\u9fa5a-zA-Z0-9]+$/
if (Reg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的名称'))
}
} else {
callback()
}
}
// 校验邮政编码
export function validatePostCode(rule, value, callback) {
if (value) {
const postReg = /^[1-9]\d{5}$/
if (postReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的邮政编码'))
}
} else {
callback()
}
}
// 数字
export function validateNum(rule, value, callback) {
if (value) {
const numReg = /^[\d]+$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入数字'))
}
} else {
callback()
}
}
//数字和小数点
export function validateNumDot(rule, value, callback) {
if (value) {
const numReg = /^\d+$|^\d+\.\d+$/g
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入数字或小数点'))
}
} else {
callback()
}
}
// 组织机构代码
export function validateOrganization(rule, value, callback) {
if (value) {
const orgReg = /^[A-Za-z0-9]\w{14}$/g
if (orgReg.test(value)) {
callback()
} else {
callback(new Error('请输入组织机构代码'))
}
} else {
callback()
}
}
// 传真
export function validateFax(rule, value, callback) {
if (value) {
const faxReg = /^(\d{3,4}-)?\d{7,8}$/
if (faxReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的传真'))
}
} else {
callback()
}
}
// 主页地址
export function validateHome(rule, value, callback) {
if (value) {
const homeReg = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/
if (homeReg.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的主页地址'))
}
} else {
callback()
}
}
// 学分 小数,且保留最多三位小数
export function validateXf(rule, value, callback) {
if (!value) {
return callback(new Error('学分不能为空'))
} else {
const numReg = /^[0-9]+\.[0-9]{0,3}$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入小数,且小数点后最多三位'))
}
}
}
// 数字格式 小数点后一位
export function validateOneNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numOneReg = /^\d*\.{0,1}\d{0,1}$/
if (numReg.test(value)) {
if (numOneReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多1位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后两位
export function validateTwoNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,2}\d{0,2}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多2位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后两位 小数点前保留五位
export function validateTwoNumThree(rule, value, callback) {
if (value) {
if (Number(value) > 10000) {// 校验value值不能大于10000
callback(new Error('数值过大,请重新输入'))
}
const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,2}\d{0,2}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多2位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后三位
export function validateThreeNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,3}\d{0,3}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多3位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
// if (!value) {
// return callback(new Error('字段不能为空'))
// } else {
// const numReg = /^\d+(\.\d+)?$/
// const numTwoReg = /^\d*\.{0,3}\d{0,3}$/
// if (numReg.test(value)) {
// if (numTwoReg.test(value)) {
// callback()
// } else {
// callback(new Error('小数点后最多3位'))
// }
// } else {
// callback(new Error('请输入数字'))
// }
// }
}
//校验年份必须为4位数字
export function validateNF(rule, value, callback) {
if (value) {
const NFReg = /^\d{4}$/
if (NFReg.test(value)) {
callback()
} else {
callback(new Error('请输入4位数字'))
}
} else {
callback()
}
}
//校验年份必须为4位数字
export function validateXQ(rule, value, callback) {
if (value) {
const NFReg = /^\d{5}$/
if (NFReg.test(value)) {
callback()
} else {
callback(new Error('请输入5位数字'))
}
} else {
callback()
}
}
//校验分数最大值
export function validateMaxNumber(rule, value, callback) {
if (parseInt(value) <= 200) {
callback()
} else {
callback(new Error('分数不能大于200'))
}
}
//校验正整数
export function validateInteger(rule, value, callback) {
if (value) {
const integerReg = /^[+]{0,1}(\d+)$/
if (integerReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的整数'))
}
} else {
callback()
}
}
//校验整数
export function validateroundNumber(rule, value, callback) {
if (value) {
const numReg = /^[1-9]\d*$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的整数'))
}
} else {
callback()
}
}
//校验身份证号
export function validateCard(rule, value, callback) {
if (value) {
const cardBoolean = IdCardValidate(value);
// const cardReg =/(^\d{18}$)|(^\d{17}(\d|X|x)$)/
// if (cardReg.test(value)) {
if (cardBoolean) {
callback()
} else {
callback(new Error('请输入正确的身份证号'))
}
} else {
callback()
}
}
//身份证:身份证校验
function IdCardValidate(code) {
let tip = "";
if (code != "") {
const city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
let pass = true;
//是否为空
if (code === '') {
tip = "请输入身份证号,身份证号不能为空";
pass = false;
}
//校验长度,类型
else if (isCardNo(code) === false) {
tip = "您输入的身份证号码不正确,请重新输入";
pass = false;
}
//检查省份
else if (checkProvince(code, city) === false) {
tip = "您输入的身份证号码不正确,请重新输入";
pass = false;
}
//校验生日
else if (checkBirthday(code) === false) {
tip = "您输入的身份证号码生日不正确,请重新输入";
pass = false;
} else {
//18位身份证需要验证最后一位校验位
if (code.length == 18) {
code = code.split('');
//∑(ai×Wi)(mod 11)
//加权因子
const factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
//校验位
const parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
let sum = 0;
let ai = 0;
let wi = 0;
for (let i = 0; i < 17; i++) {
ai = code[i];
wi = factor[i];
sum += ai * wi;
}
const last = parity[sum % 11];
if (parity[sum % 11] != code[17]) {
tip = "身份证格式错误";
pass = false;
}
}
}
return pass;
}
}
//身份证:检查身份证号码是否符合规范,包括长度,类型
function isCardNo(card) {
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
const reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/;
if (reg.test(card) === false) {
return false;
}
return true;
};
//身份证:取身份证前两位,校验省份
function checkProvince(card, city) {
const province = card.substr(0, 2);
if (city[province] == undefined) {
return false;
}
return true;
};
//身份证:检查生日是否正确
function checkBirthday(card) {
const len = card.length;
//身份证15位时,次序为省(3位)市(3位)年(2位)月(2位)日(2位)校验位(3位),皆为数字
if (len == '15') {
const re_fifteen = /^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/;
const arr_data = card.match(re_fifteen);
const year = arr_data[2];
const month = arr_data[3];
const day = arr_data[4];
const birthday = new Date('19' + year + '/' + month + '/' + day);
return verifyBirthday('19' + year, month, day, birthday);
}
//身份证18位时,次序为省(3位)市(3位)年(4位)月(2位)日(2位)校验位(4位),校验位末尾可能为X
if (len == '18') {
const re_eighteen = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/;
const arr_data = card.match(re_eighteen);
const year = arr_data[2];
const month = arr_data[3];
const day = arr_data[4];
const birthday = new Date(year + '/' + month + '/' + day);
return verifyBirthday(year, month, day, birthday);
}
return false;
};
//身份证:校验日期
function verifyBirthday(year, month, day, birthday) {
const now = new Date();
const now_year = now.getFullYear();
//年月日是否合理
if (birthday.getFullYear() == year && (birthday.getMonth() + 1) == month && birthday.getDate() == day) {
//判断年份的范围(3岁到100岁之间)
const time = now_year - year;
if (time >= 3 && time <= 100) {
return true;
}
return false;
}
return false;By18Val
};
/**
* 18
* @param a_idCard
* @return
*/
function isTrueValidateCodeBy18IdCard(a_idCard) {
const By18Val = a_idCard[17].toLowerCase(); // 获取第十八位值
const numReg = /^[1-9]\d*$/
let numVal = false; // 校验第十八位是否为整数
if (numReg.test(Number(By18Val))) {
numVal = true
} else {
numVal = false
}
if (By18Val == 'x' || By18Val == 'X' || numVal) {
return true
} else {
return false
}
}
/**
*
* @param AddressNum
* @constructor
*/
function IdCardValidateAddress(AddressNum) {
const city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
if (city[AddressNum.substr(0, 2)]) {
return true
} else {
return false
}
}
/**
* 18
* @param idCard 18
* @return
*/
function isValidityBrithBy18IdCard(idCard18) {
const year = idCard18.substring(6, 10);
const month = idCard18.substring(10, 12);
const day = idCard18.substring(12, 14);
const temp_date = new Date(year, parseFloat(month) - 1, parseFloat(day));
// 这里用getFullYear()获取年份,避免千年虫问题
if (temp_date.getFullYear() != parseFloat(year)
|| temp_date.getMonth() != parseFloat(month) - 1
|| temp_date.getDate() != parseFloat(day)) {
return false;
} else {
return true;
}
}
/**
* 15
* @param idCard15 15
* @return
*/
function isValidityBrithBy15IdCard(idCard15) {
const year = idCard15.substring(6, 8);
const month = idCard15.substring(8, 10);
const day = idCard15.substring(10, 12);
const temp_date = new Date(year, parseFloat(month) - 1, parseFloat(day));
// 对于老身份证中的你年龄则不需考虑千年虫问题而使用getYear()方法
if (temp_date.getYear() != parseFloat(year)
|| temp_date.getMonth() != parseFloat(month) - 1
|| temp_date.getDate() != parseFloat(day)) {
return false;
} else {
return true;
}
}
/**
*
* @param str
* @returns {*}
*/
function trim(str) {
return str.replace(/(^\s*)|(\s*$)/g, "");
}
export default {
validateCode,
validateEmail,
validateEng,
validatePhone,
validateChinese,
validatePostCode,
validateNum,
validateNumDot,
validateZYS,
validateOrganization,
validateFax,
validateHome,
validateXXMC,
validateXf,
validateOneNum,
validateMaxNumber,
validateTwoNum,
validateTwoNumThree,
validateThreeNum,
validateInteger,
validateNF,
validateXQ,
validateroundNumber,
validateEngName,
validateCard,
validateHanset,
validateFamilyPhone,
validateName,
validateChargeperson,
}

2
src/views/report/jmreport/index.vue

@ -8,6 +8,6 @@ import { getAccessToken } from '@/utils/auth'
defineOptions({ name: 'JimuReport' })
const BASE_URL = import.meta.env.VITE_BASE_URL
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
</script>

38
src/views/wms/itembasic/ItembasicForm.vue

@ -4,7 +4,7 @@
<Form ref="formRef" v-loading="formLoading" :rules="ItemBasicRules" :schema="ItemBasic.allSchemas.formSchema"
:model="formData" :is-col="true" />
<div class="table">
<TableForm ref="tableFormRef" :tableFields="ItemBasic.allSchemas.tableFormColumns" :tableData="tableData" class="w-[100%]" @handleAdd="handleAdd" :tableFormRules="ItemBasicRules" @handleDelete="handleDelete" @inpuFocus="inpuFocus"/>
<TableForm ref="tableFormRef" :tableFields="PurchaseclaimRequestMain.allSchemas.tableFormColumns" :tableData="tableData" class="w-[100%]" @handleAdd="handleAdd" :tableFormRules="ItemBasicRules" @handleDelete="handleDelete" @inpuFocus="inpuFocus"/>
</div>
</div>
<template #footer>
@ -15,10 +15,9 @@
</template>
<script setup lang="ts">
import * as ItembasicApi from '@/api/wms/itembasic'
import { ItemBasic, ItemBasicRules } from '@/utils/disposition/tableColumns.ts'
import { ItemBasic, ItemBasicRules, PurchaseclaimRequestMain } from '@/utils/disposition/tableColumns.ts'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
console.log(ItemBasic);
const { t } = useI18n() //
const message = useMessage() //
@ -127,37 +126,14 @@ const buttonBaseClick = (val, item) => {
}
}
// const tableData = ref([{
// code: '',
// name:'',
// unit:'',
// num: '20',
// isStdPack:'FALSE'
// }, {
// code: 'GOODS-0202-12',
// name: '',
// unit: '',
// num: '20'
// }, {
// code: 'GOODS-0202-12',
// name: '',
// unit: '',
// num: '20'
// }, {
// code: 'GOODS-0202-12',
// name: '',
// unit: '',
// num: '20'
// }])
const tableFormKeys ={}
PurchaseclaimRequestMain.allSchemas.tableFormColumns.forEach(item=>{
tableFormKeys[item.field]=item.default? item.default:''
})
const tableData = ref([])
//
const handleAdd = ()=>{
tableData.value.push({
code: '',
name: '',
unit: '',
num: ''
})
tableData.value.push(tableFormKeys)
}
//

25
src/views/wms/itempackaging/index.vue

@ -37,11 +37,16 @@
@success="getList"
:rules="ItempackagingRules"
:formAllSchemas="Itempackaging.allSchemas"
:tableAllSchemas="PurchaseclaimRequestDetail.allSchemas"
:tableFormRules="PurchaseclaimRequestDetailRules"
:tableData="tableData"
searchTableTitle="物料基础信息"
:searchTableAllSchemas="ItemBasic.allSchemas"
:searchTablePage="ItembasicApi.getItembasicPage"
:apiUpdate="ItempackagingApi.updateItempackaging"
:apiCreate="ItempackagingApi.createItempackaging"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
/>
<!-- 详情 -->
@ -56,13 +61,14 @@ import download from '@/utils/download'
import * as ItempackagingApi from '@/api/wms/itempackaging'
import * as ItembasicApi from '@/api/wms/itembasic'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Itempackaging, ItempackagingRules, ItemBasic } from '@/utils/disposition/tableColumns'
import { Itempackaging, ItempackagingRules, ItemBasic, PurchaseclaimRequestDetail,PurchaseclaimRequestDetailRules } from '@/utils/disposition/tableColumns'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Itempackaging' })
console.log(PurchaseclaimRequestDetail.allSchemas);
const message = useMessage() //
const { t } = useI18n() //
@ -178,6 +184,23 @@ const importTemplateData = reactive({
const importSuccess = () => {
getList()
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseclaimRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
console.log(tableData.value)
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
/** 初始化 **/
onMounted(() => {

Loading…
Cancel
Save