Browse Source

项目管理模块

master
songguoqiang 1 year ago
parent
commit
7511aabd38
  1. 4
      src/api/spc/itembasic/index.ts
  2. 56
      src/api/spc/project/index.ts
  3. 57
      src/api/spc/typeitem/index.ts
  4. 18
      src/components/BasicForm/src/BasicForm.vue
  5. 3
      src/hooks/web/useTable.ts
  6. 1
      src/utils/dict.ts
  7. 48
      src/views/spc/itembasic/index.vue
  8. 800
      src/views/spc/itembasic/itembasic.data.ts
  9. 255
      src/views/spc/project/index.vue
  10. 133
      src/views/spc/project/project.data.ts
  11. 258
      src/views/spc/typeitem/index.vue
  12. 124
      src/views/spc/typeitem/typeItem.data.ts

4
src/api/spc/itembasic/index.ts

@ -38,8 +38,9 @@ export interface ItembasicVO {
// 查询物品基本信息列表 // 查询物品基本信息列表
export const getItembasicPage = async (params) => { export const getItembasicPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch
const data = {...params} const data = {...params}
delete params.isSearch
return await request.post({ url: '/spc/itembasic/senior', data }) return await request.post({ url: '/spc/itembasic/senior', data })
} else { } else {
return await request.get({ url: `/spc/itembasic/page`, params }) return await request.get({ url: `/spc/itembasic/page`, params })
@ -53,6 +54,7 @@ export const getItembasic = async (id: number) => {
// 新增物品基本信息 // 新增物品基本信息
export const createItembasic = async (data: ItembasicVO) => { export const createItembasic = async (data: ItembasicVO) => {
return await request.post({ url: `/spc/itembasic/create`, data }) return await request.post({ url: `/spc/itembasic/create`, data })
} }

56
src/api/spc/project/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ProjectVO {
code: string
name: string
status: string
desc: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: string
siteId: string
}
// 查询项目维护基本信息列表
export const getProjectPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/spc/project/senior', data })
} else {
return await request.get({ url: `/spc/project/page`, params })
}
}
// 查询项目维护基本信息详情
export const getProject = async (id: number) => {
return await request.get({ url: `/spc/project/get?id=` + id })
}
// 新增项目维护基本信息
export const createProject = async (data: ProjectVO) => {
return await request.post({ url: `/spc/project/create`, data })
}
// 修改项目维护基本信息
export const updateProject = async (data: ProjectVO) => {
return await request.put({ url: `/spc/project/update`, data })
}
// 删除项目维护基本信息
export const deleteProject = async (id: number) => {
return await request.delete({ url: `/spc/project/delete?id=` + id })
}
// 导出项目维护基本信息 Excel
export const exportProject = async (params) => {
return await request.download({ url: `/spc/project/export-excel`, params })
}
// 下载导入模板
export const importTemplate = () => {
return request.download({ url: '/spc/project/get-import-template' })
}

57
src/api/spc/typeitem/index.ts

@ -0,0 +1,57 @@
import request from '@/config/axios'
export interface TypeItemVO {
type: string
name: string
status: string
typeValue: string
userGroupCode: string
available: string
remark: string
deletionTime: Date
deleterId: string
concurrencyStamp: string
upperValue: number
lowerValue: number
}
// 查询物品检测类型与检测项目关联列表
export const getTypeItemPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/spc/type-item/senior', data })
} else {
return await request.get({ url: `/spc/type-item/page`, params })
}
}
// 查询物品检测类型与检测项目关联详情
export const getTypeItem = async (id: number) => {
return await request.get({ url: `/spc/type-item/get?id=` + id })
}
// 新增物品检测类型与检测项目关联
export const createTypeItem = async (data: TypeItemVO) => {
return await request.post({ url: `/spc/type-item/create`, data })
}
// 修改物品检测类型与检测项目关联
export const updateTypeItem = async (data: TypeItemVO) => {
return await request.put({ url: `/spc/type-item/update`, data })
}
// 删除物品检测类型与检测项目关联
export const deleteTypeItem = async (id: number) => {
return await request.delete({ url: `/spc/type-item/delete?id=` + id })
}
// 导出物品检测类型与检测项目关联 Excel
export const exportTypeItem = async (params) => {
return await request.download({ url: `/spc/type-item/export-excel`, params })
}
// 下载导入模板
export const importTemplate = () => {
return request.download({ url: '/spc/type-item/get-import-template' })
}

18
src/components/BasicForm/src/BasicForm.vue

@ -151,6 +151,8 @@ const searchTableSuccess = (formField,searchField, val, type, row) => {
emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row ) emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row )
} }
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any) => { const open = async (type: string, row?: any, masterParmas?: any) => {
dialogVisible.value = true dialogVisible.value = true
@ -232,22 +234,8 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
// const data = unref(formRef)?.formModel as ItempackagingApi.ItempackagingVO
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
// if(props.masterParmas.masterId){ emit('success',formType.value,data)
// data.masterId = props.masterParmas.masterId
// data.number = props.masterParmas.number
// }
if (formType.value === 'create') {
await props.apiCreate(data)
message.success(t('common.createSuccess'))
} else {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

3
src/hooks/web/useTable.ts

@ -173,6 +173,9 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
pageNo: 1, pageNo: 1,
...data ...data
}) })
// 查询/重置时,删除筛选相关属性
delete tableObject.params.filters
delete tableObject.params.isSearch
// 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据 // 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据
if (tableObject.currentPage !== 1) { if (tableObject.currentPage !== 1) {
tableObject.currentPage = 1 tableObject.currentPage = 1

1
src/utils/dict.ts

@ -191,6 +191,7 @@ export enum DICT_TYPE {
ITEM_GROUP = 'item_group', // 物品分组 ITEM_GROUP = 'item_group', // 物品分组
ITEM_CATEGORY = 'Item_category', // 物品种类 ITEM_CATEGORY = 'Item_category', // 物品种类
ITEM_COLOR = 'item_color', // 物品颜色 ITEM_COLOR = 'item_color', // 物品颜色
ITEMBASIC_TYPE= 'itembasic_type', // 物料检测类型
ITEM_CONFIGURATION = 'item_configuration', // 物品配置 ITEM_CONFIGURATION = 'item_configuration', // 物品配置
EQ_LEVEL = 'eq_level', // 质量等级 EQ_LEVEL = 'eq_level', // 质量等级
CURRENCY = 'currency', // 货币 CURRENCY = 'currency', // 货币

48
src/views/spc/itembasic/index.vue

@ -5,6 +5,10 @@
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<!-- HeadButttondata列表头部按钮 -->
<!-- buttonBaseClick列表头部按钮点击事件 -->
<!-- tableColumns列表行信息 -->
<!-- searchFormClick筛选提交成功方法-->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
@ -28,11 +32,6 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
@ -42,7 +41,6 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList"
:formAllSchemas="Itembasic.allSchemas" :formAllSchemas="Itembasic.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:rules="rules" :rules="rules"
@ -50,9 +48,10 @@
:apiCreate="ItembasicApi.createItembasic" :apiCreate="ItembasicApi.createItembasic"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@success="formsSuccess"
/> />
<!-- 详情 --> <!-- 详情 目前basic项目生成的这个有bug注释才能访问模块-->
<!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="Itembasic.allSchemas" /> --> <!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="Itembasic.allSchemas" /> -->
<!-- 导入 --> <!-- 导入 -->
@ -100,10 +99,10 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), // // defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), // // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
//defaultButtons.defaultFilterBtn(null), // // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// { // {
// label: '', // label: '',
@ -117,7 +116,6 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
console.log(val)
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') { //
@ -142,10 +140,8 @@ const butttondata = [
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
console.info(row) console.info(row)
if (val == 'edit') { // if (val == 'edit') { //
console.info("编辑",row)
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
console.info("编辑",row)
handleDelete(row.id) handleDelete(row.id)
} }
} }
@ -153,6 +149,9 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
// if(type=='update'){
// row.color = row.color.split(',');
// }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
@ -184,6 +183,29 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
const formsSuccess = async (formType,data) => {
var isHave =Itembasic.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ItembasicApi.createItembasic(data)
message.success(t('common.createSuccess'))
} else {
await ItembasicApi.updateItembasic(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

800
src/views/spc/itembasic/itembasic.data.ts

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {Project } from '@/views/spc/project/project.data'
import * as ProjectApi from '@/api/spc/project/index'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
@ -7,252 +9,290 @@ const { t } = useI18n() // 国际化
*/ */
export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '项目编码',
field: 'code', field: 'projcetCode',//传第给后端字段名称
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 150, width: 150,
fixed: 'left' fixed: 'left'
}, },
// tableForm:{
// minWidth:200,
// sortable:false
// }
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '描述1',
field: 'desc1',
sort: 'custom',
table: {
width: 150
} ,
// isTableForm:false
},
{
label: '描述2',
field: 'desc2',
sort: 'custom',
table: {
width: 150
} ,
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
isForm: true,
isSearch: true,
isTable: true,
table: {
width: 100
} ,
form: { form: {
component: 'Switch', // labelMessage: '信息提示说明!!!',
value: 'ENABLE',
componentProps: { componentProps: {
inactiveValue: 'DISABLE', isSearchList: true, // 开启查询弹窗
activeValue: 'ENABLE' searchListPlaceholder: '请选择项目编码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '项目信息', // 查询弹窗标题
searchAllSchemas: Project.allSchemas, // 查询弹窗所需类
searchPage: ProjectApi.getProjectPage // 查询弹窗所需分页方法
}
} }
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 120
} ,
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
table: {
width: 150
} ,
}, },
{ {
label: '是否标包', label: '项目名称',
field: 'isStdPack', field: 'projectName',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, isSearch: false,
dictClass: 'string', isForm:false,
// colorType: 'danger',
isTable: true,
table: { table: {
width: 120 width: 'auto',
}, fixed: 'left'
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}, },
// tableForm:{ // tableForm:{
// width: 180, // minWidth:200,
// type:'Radio', // sortable:false
// } // }
}, },
{ {
label: '可采购', label: '编号',
field: 'enableBuy', field: 'code',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '可制造',
field: 'enableMake',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '可委外加工',
field: 'enableOutsourcing',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 120
} ,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '回收件',
field: 'isRecycled',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '虚零件',
field: 'isPhantom',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: 'ABC类',
field: 'abcClass',
sort: 'custom',
dictType: DICT_TYPE.ABC_CLASS,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
},
{
label: '类型',
field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.ITEM_TYPE, isSearch: true,
dictClass: 'string',
isTable: true,
table: { table: {
width: 100 width: 'auto',
} , fixed: 'left'
}, },
{ // tableForm:{
label: '种类', // minWidth:200,
field: 'category', // sortable:false
sort: 'custom', // }
dictType: DICT_TYPE.ITEM_CATEGORY,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
}, },
{ {
label: '分组', label: '名称',
field: 'itemGroup', field: 'name',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.ITEM_GROUP, isSearch: true,
dictClass: 'string', // table: {
isTable: true, // width: 150
table: { // },
width: 100 },
} , // {
}, // label: '描述1',
// field: 'desc1',
// sort: 'custom',
// table: {
// width: 150
// } ,
// // isTableForm:false
// },
// {
// label: '描述2',
// field: 'desc2',
// sort: 'custom',
// table: {
// width: 150
// } ,
// },
// {
// label: '状态',
// field: 'status',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_STATUS,
// dictClass: 'string',
// isForm: true,
// isSearch: true,
// isTable: true,
// table: {
// width: 100
// } ,
// form: {
// component: 'Switch',
// value: 'ENABLE',
// componentProps: {
// inactiveValue: 'DISABLE',
// activeValue: 'ENABLE'
// }
// },
// },
// {
// label: '计量单位',
// field: 'uom',
// sort: 'custom',
// dictType: DICT_TYPE.UOM,
// dictClass: 'string',
// isSearch: true,
// isTable: true,
// table: {
// width: 120
// } ,
// },
// {
// label: '替代计量单位',
// field: 'altUom',
// sort: 'custom',
// dictType: DICT_TYPE.UOM,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 150
// } ,
// },
// {
// label: '是否标包',
// field: 'isStdPack',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// // colorType: 'danger',
// isTable: true,
// table: {
// width: 120
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// // tableForm:{
// // width: 180,
// // type:'Radio',
// // }
// },
// {
// label: '可采购',
// field: 'enableBuy',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
// {
// label: '可制造',
// field: 'enableMake',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
// {
// label: '可委外加工',
// field: 'enableOutsourcing',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 120
// } ,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
// {
// label: '回收件',
// field: 'isRecycled',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
// {
// label: '虚零件',
// field: 'isPhantom',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
// {
// label: 'ABC类',
// field: 'abcClass',
// sort: 'custom',
// dictType: DICT_TYPE.ABC_CLASS,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// },
// {
// label: '类型',
// field: 'type',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_TYPE,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// },
// {
// label: '种类',
// field: 'category',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_CATEGORY,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// },
// {
// label: '分组',
// field: 'itemGroup',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_GROUP,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// },
{ {
label: '颜色', label: '颜色',
field: 'color', field: 'color',
@ -260,54 +300,61 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.ITEM_COLOR, dictType: DICT_TYPE.ITEM_COLOR,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
table: { // table: {
width: 100 // width: 100
} , // } ,
},
{
label: '配置',
field: 'configuration',
sort: 'custom',
dictType: DICT_TYPE.ITEM_CONFIGURATION,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
},
{
label: '项目',
field: 'project',
sort: 'custom',
table: {
width: 100
} ,
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
dictType: DICT_TYPE.EQ_LEVEL,
dictClass: 'string',
isTable: true,
table: {
width: 120
} ,
},
{
label: '有效天数',
field: 'validityDays',
sort: 'custom',
table: {
width: 120
},
form: { form: {
component: 'InputNumber', component: 'Select',
componentProps: { componentProps: {
min: 0 // inactiveValue: 'DISABLE',
// activeValue: 'ENABLE',
} }
}, },
}, },
// {
// label: '配置',
// field: 'configuration',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_CONFIGURATION,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 100
// } ,
// },
// {
// label: '项目',
// field: 'project',
// sort: 'custom',
// table: {
// width: 100
// } ,
// },
// {
// label: '质量等级',
// field: 'eqLevel',
// sort: 'custom',
// dictType: DICT_TYPE.EQ_LEVEL,
// dictClass: 'string',
// isTable: true,
// table: {
// width: 120
// } ,
// },
// {
// label: '有效天数',
// field: 'validityDays',
// sort: 'custom',
// table: {
// width: 120
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 0
// }
// },
// },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -326,55 +373,55 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE' activeValue: 'TRUE'
} }
}, },
}, },
{ // {
label: '生效时间', // label: '生效时间',
field: 'activeTime', // field: 'activeTime',
sort: 'custom', // sort: 'custom',
isTable: true, // isTable: true,
formatter: dateFormatter, // formatter: dateFormatter,
detail: { // detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' // dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, // },
table: { // table: {
width: 180 // width: 180
} , // } ,
form: { // form: {
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
style: {width:'100%'}, // style: {width:'100%'},
type: 'datetime', // type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', // dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', // valueFormat: 'x',
}
},
// tableForm:{
// width: 200,
// type:'FormDateTime',
// } // }
}, // },
{ // // tableForm:{
label: '失效时间', // // width: 200,
field: 'expireTime', // // type:'FormDateTime',
sort: 'custom', // // }
isTable: true, // },
formatter: dateFormatter, // {
detail: { // label: '失效时间',
dateFormat: 'YYYY-MM-DD HH:mm:ss' // field: 'expireTime',
}, // sort: 'custom',
table: { // isTable: true,
width: 180 // formatter: dateFormatter,
} , // detail: {
form: { // dateFormat: 'YYYY-MM-DD HH:mm:ss'
component: 'DatePicker', // },
componentProps: { // table: {
style: {width:'100%'}, // width: 180
type: 'datetime', // } ,
dateFormat: 'YYYY-MM-DD HH:mm:ss', // form: {
valueFormat: 'x', // component: 'DatePicker',
} // componentProps: {
}, // style: {width:'100%'},
}, // type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -424,67 +471,68 @@ export const rules = reactive({
name: [ name: [
{ required: true, message: '请输入名称', trigger: 'blur' } { required: true, message: '请输入名称', trigger: 'blur' }
], ],
status: [
{ required: true, message: '请选择状态', trigger: 'change' } projcetCode: [
], { required: true, message: '请选择项目编码', trigger: 'change' }
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
altUom: [
{ required: true, message: '请选择替代计量单位', trigger: 'change' }
],
isStdPack: [
{ required: true, message: '请选择是否标包', trigger: 'change' }
],
enableBuy: [
{ required: true, message: '请选择是否可采购', trigger: 'change' }
],
enableMake: [
{ required: true, message: '请选择是否可制造', trigger: 'change' }
],
enableOutsourcing: [
{ required: true, message: '请选择是否可委外加工', trigger: 'change' }
],
isRecycled: [
{ required: true, message: '请选择回收件', trigger: 'change' }
],
isPhantom: [
{ required: true, message: '请选择虚零件', trigger: 'change' }
],
abcClass: [
{ required: true, message: '请选择ABC类', trigger: 'change' }
],
type: [
{ required: true, message: '请选择类型', trigger: 'change' }
],
category: [
{ required: true, message: '请选择种类', trigger: 'change' }
],
itemGroup: [
{ required: true, message: '请选择分组', trigger: 'change' }
],
color: [
{ required: true, message: '请选择颜色', trigger: 'change' }
],
configuration: [
{ required: true, message: '请选择配置', trigger: 'change' }
],
project: [
{ required: true, message: '请输入项目', trigger: 'blur' }
],
eqLevel: [
{ required: true, message: '请选择质量等级', trigger: 'change' }
],
validityDays: [
{ required: true, message: '请输入有效天数', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
activeTime: [
{ required: true, message: '请输入生效时间', trigger: 'change' }
],
expireTime: [
{ required: true, message: '请输入失效时间', trigger: 'change' }
], ],
// uom: [
// { required: true, message: '请选择计量单位', trigger: 'change' }
// ],
// altUom: [
// { required: true, message: '请选择替代计量单位', trigger: 'change' }
// ],
// isStdPack: [
// { required: true, message: '请选择是否标包', trigger: 'change' }
// ],
// enableBuy: [
// { required: true, message: '请选择是否可采购', trigger: 'change' }
// ],
// enableMake: [
// { required: true, message: '请选择是否可制造', trigger: 'change' }
// ],
// enableOutsourcing: [
// { required: true, message: '请选择是否可委外加工', trigger: 'change' }
// ],
// isRecycled: [
// { required: true, message: '请选择回收件', trigger: 'change' }
// ],
// isPhantom: [
// { required: true, message: '请选择虚零件', trigger: 'change' }
// ],
// abcClass: [
// { required: true, message: '请选择ABC类', trigger: 'change' }
// ],
// type: [
// { required: true, message: '请选择类型', trigger: 'change' }
// ],
// category: [
// { required: true, message: '请选择种类', trigger: 'change' }
// ],
// itemGroup: [
// { required: true, message: '请选择分组', trigger: 'change' }
// ],
// color: [
// { required: true, message: '请选择颜色', trigger: 'change' }
// ],
// configuration: [
// { required: true, message: '请选择配置', trigger: 'change' }
// ],
// project: [
// { required: true, message: '请输入项目', trigger: 'blur' }
// ],
// eqLevel: [
// { required: true, message: '请选择质量等级', trigger: 'change' }
// ],
// validityDays: [
// { required: true, message: '请输入有效天数', trigger: 'change' }
// ],
// available: [
// { required: true, message: '请选择是否可用', trigger: 'change' }
// ],
// activeTime: [
// { required: true, message: '请输入生效时间', trigger: 'change' }
// ],
// expireTime: [
// { required: true, message: '请输入失效时间', trigger: 'change' }
}) })

255
src/views/spc/project/index.vue

@ -0,0 +1,255 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Project.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Project.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProjectRules"
:formAllSchemas="Project.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="ProjectApi.updateProject"
:apiCreate="ProjectApi.createProject"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="Project.allSchemas" /> -->
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/spc/project/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Project,ProjectRules } from './project.data'
import * as ProjectApi from '@/api/spc/project'
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: 'Project' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Project.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
const { tableObject, tableMethods } = useTable({
getListApi: ProjectApi.getProjectPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicProject')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProjectApi.deleteProject(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProjectApi.exportProject(setSearchParams)
download.excel(data, '项目维护基本信息.xls')
} catch {
} finally {
exportLoading.value = false
}
}
const formsSuccess = async (formType,data) => {
var isHave =Project.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ProjectApi.createProject(data)
message.success(t('common.createSuccess'))
} else {
//data.color = data.color.split(',');
await ProjectApi.updateProject(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '项目维护基本信息导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProjectApi.importTemplate()
})
</script>

133
src/views/spc/project/project.data.ts

@ -0,0 +1,133 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ProjectRules = reactive({
code: [required]
})
export const Project = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '项目编号',
field: 'code',
sort: 'custom',
isSearch: true
},
{
label: '项目名称',
field: 'name',
sort: 'custom',
isSearch: true
},
// {
// label: '状态',
// field: 'status',
// sort: 'custom',
// isSearch: true,
// form: {
// component: 'Radio'
// }
// },
{
label: '描述',
field: 'descs',
sort: 'custom',
isSearch: false,
isTable:false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isSearch: true
// },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
isTable:false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable:false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable:false,
isForm:false
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
isForm:false
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
isForm:false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
isForm:false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

258
src/views/spc/typeitem/index.vue

@ -0,0 +1,258 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="TypeItem.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="TypeItem.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="TypeItemRules"
:formAllSchemas="TypeItem.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="TypeItemApi.updateTypeItem"
:apiCreate="TypeItemApi.createTypeItem"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="TypeItem.allSchemas" /> -->
<!-- 导入 -->
<!-- <ImportForm ref="importFormRef" url="/typeitem/type-item/import" :importTemplateData="importTemplateData" @success="importSuccess" /> -->
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { TypeItem,TypeItemRules } from './typeItem.data'
import * as TypeItemApi from '@/api/spc/typeitem'
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: 'TypeItem' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(TypeItem.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
const { tableObject, tableMethods } = useTable({
getListApi: TypeItemApi.getTypeItemPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
const formsSuccess = async (formType,data) => {
console.log('11111111111111')
// var isHave =Itembasic.allSchemas.formSchema.some(function (item) {
// return item.field === 'activeTime' || item.field === 'expireTime';
// });
// if(isHave){
// if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
// message.error('')
// return;
// }
// }
// if(data.activeTime==0)data.activeTime = null;
// if(data.expireTime==0)data.expireTime = null;
// data.color = data.color.join();
// if (formType === 'create') {
// await ItembasicApi.createItembasic(data)
// message.success(t('common.createSuccess'))
// } else {
// //data.color = data.color.split(',');
// await ItembasicApi.updateItembasic(data)
// message.success(t('common.updateSuccess'))
// }
// basicFormRef.value.dialogVisible = false
// getList()
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicTypeItem')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await TypeItemApi.deleteTypeItem(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await TypeItemApi.exportTypeItem(setSearchParams)
download.excel(data, '物品检测类型与检测项目关联.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物品检测类型与检测项目关联导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await TypeItemApi.importTemplate()
})
</script>

124
src/views/spc/typeitem/typeItem.data.ts

@ -0,0 +1,124 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const TypeItemRules = reactive({
type: [required],
name: [required],
typeValue: [required],
available: [required]
})
export const TypeItem = useCrudSchemas(reactive<CrudSchema[]>([
{
label:'代码',
field:'type',
sort: 'custom',
isSearch: true,
table: {
width: 'auto',
fixed: 'left'
},
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
// {
// label: '状态',
// field: 'status',
// sort: 'custom',
// isSearch: false,
// form: {
// component: 'Radio'
// }
// },
{
label: '检测类型',
field: 'typeValue',
sort: 'custom',
dictType: DICT_TYPE.ITEMBASIC_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '创建者',
field: 'creator',
isForm: false,
isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
isTable:false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '上限值',
field: 'upperValue',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '下限值',
field: 'lowerValue',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
Loading…
Cancel
Save