ljlong_2630 1 year ago
parent
commit
b34e7deea4
  1. 4
      src/components/BasicForm/src/BasicForm.vue
  2. 24
      src/components/Dialog/src/Dialog.vue
  3. 52
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  4. 50
      src/views/eam/basic/inspection/inspection.data.ts
  5. 50
      src/views/eam/basic/item/item.data.ts
  6. 20
      src/views/eam/basic/location/index.vue
  7. 50
      src/views/eam/basic/location/location.data.ts
  8. 21
      src/views/eam/basic/locationArea/index.vue
  9. 50
      src/views/eam/basic/locationArea/locationArea.data.ts
  10. 53
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  11. 344
      src/views/eam/basic/supplier/index.vue
  12. 50
      src/views/eam/basic/supplier/supplier.data.ts
  13. 13
      src/views/eam/item/countRecord/countRecord.data.ts
  14. 44
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  15. 8
      src/views/eam/item/itemMaintenance/itemMaintenance.data.ts
  16. 3
      src/views/home/echarts-data.ts
  17. 10
      src/views/login/components/LoginForm.vue

4
src/components/BasicForm/src/BasicForm.vue

@ -4,12 +4,12 @@
v-model="dialogVisible" v-model="dialogVisible"
:width="isBusiness ? '60%' : '40%'" :width="isBusiness ? '60%' : '40%'"
:close-on-click-modal="false" :close-on-click-modal="false"
:vLoading="formLoading"
> >
<div <div
style="max-height: 60vh;overflow-y: auto;"> style="max-height: 60vh;overflow-y: auto;">
<Form <Form
ref="formRef" ref="formRef"
v-loading="formLoading"
:rules="rules" :rules="rules"
:schema="formSchema" :schema="formSchema"
:is-col="true" :is-col="true"
@ -456,7 +456,7 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} }

24
src/components/Dialog/src/Dialog.vue

@ -11,7 +11,8 @@ const props = defineProps({
fullscreen: propTypes.bool.def(true), fullscreen: propTypes.bool.def(true),
width: propTypes.oneOfType([String, Number]).def('40%'), width: propTypes.oneOfType([String, Number]).def('40%'),
scroll: propTypes.bool.def(false), // maxHeight scroll: propTypes.bool.def(false), // maxHeight
maxHeight: propTypes.oneOfType([String, Number]).def('400px') maxHeight: propTypes.oneOfType([String, Number]).def('400px'),
vLoading:propTypes.bool.def(false)
}) })
const getBindValue = computed(() => { const getBindValue = computed(() => {
@ -34,6 +35,22 @@ const toggleFull = () => {
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight) const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)
let demo = null
watch(
() => props.vLoading,
async (val: boolean) => {
await nextTick()
if (val) {
initDialog()
} else {
if (demo !== null) demo.close()
}
},
{
immediate: true
}
)
watch( watch(
() => isFullscreen.value, () => isFullscreen.value,
async (val: boolean) => { async (val: boolean) => {
@ -55,6 +72,10 @@ const dialogStyle = computed(() => {
height: unref(dialogHeight) height: unref(dialogHeight)
} }
}) })
const initDialog = () => {
// el-loadingsvg使
demo = ElLoading.service({ target: '.loading', text: '加载中...', background: 'rgba(246, 246, 246, 0.8)' })
}
</script> </script>
<template> <template>
@ -68,6 +89,7 @@ const dialogStyle = computed(() => {
draggable draggable
class="com-dialog" class="com-dialog"
:show-close="false" :show-close="false"
custom-class="loading"
> >
<template #header="{ close }"> <template #header="{ close }">
<div class="relative h-54px flex items-center justify-between pl-15px pr-15px"> <div class="relative h-54px flex items-center justify-between pl-15px pr-15px">

52
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -135,6 +135,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 1,
max: 100,
precision: 0 precision: 0
} }
}, },
@ -155,32 +156,31 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
// {
{ // label: '是否可用',
label: '是否可用', // field: 'available',
field: 'available', // dictType: DICT_TYPE.TRUE_FALSE,
dictType: DICT_TYPE.TRUE_FALSE, // dictClass: 'string',
dictClass: 'string', // isSearch: false,
isSearch: false, // isTable: true,
isTable: true, // sort: 'custom',
sort: 'custom', // table: {
table: { // width: 150
width: 150 // },
}, // tableForm: {
tableForm: { // type: 'Select',
type: 'Select', // inactiveValue: 'FALSE',
inactiveValue: 'FALSE', // disabled: true
disabled: true // },
}, // form: {
form: { // component: 'Switch',
component: 'Switch', // value: 'TRUE',
value: 'TRUE', // componentProps: {
componentProps: { // inactiveValue: 'FALSE',
inactiveValue: 'FALSE', // activeValue: 'TRUE'
activeValue: 'TRUE' // }
} // }
} // },
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

50
src/views/eam/basic/inspection/inspection.data.ts

@ -119,31 +119,31 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

50
src/views/eam/basic/item/item.data.ts

@ -234,31 +234,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

20
src/views/eam/basic/location/index.vue

@ -151,15 +151,19 @@
} }
if (data.activeTime == 0) data.activeTime = null; if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null; if (data.expireTime == 0) data.expireTime = null;
if (formType === 'create') { try {
await LocationApi.createLocation(data) if (formType === 'create') {
message.success(t('common.createSuccess')) await LocationApi.createLocation(data)
} else { message.success(t('common.createSuccess'))
await LocationApi.updateLocation(data) } else {
message.success(t('common.updateSuccess')) await LocationApi.updateLocation(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false
getList()
} }
/** 详情操作 */ /** 详情操作 */

50
src/views/eam/basic/location/location.data.ts

@ -97,31 +97,31 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

21
src/views/eam/basic/locationArea/index.vue

@ -143,15 +143,20 @@
} }
if (data.activeTime == 0) data.activeTime = null; if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null; if (data.expireTime == 0) data.expireTime = null;
if (formType === 'create') { try {
await LocationAreaApi.createLocationArea(data) if (formType === 'create') {
message.success(t('common.createSuccess')) await LocationAreaApi.createLocationArea(data)
} else { message.success(t('common.createSuccess'))
await LocationAreaApi.updateLocationArea(data) } else {
message.success(t('common.updateSuccess')) await LocationAreaApi.updateLocationArea(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false
getList()
} }
// //

50
src/views/eam/basic/locationArea/locationArea.data.ts

@ -43,31 +43,31 @@ export const LocationArea = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

53
src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts

@ -122,7 +122,7 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ {
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',
sort: 'custom', sort: 'custom',
@ -134,6 +134,7 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 1,
max: 100,
precision: 0 precision: 0
} }
}, },
@ -154,31 +155,31 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

344
src/views/eam/basic/supplier/index.vue

@ -4,29 +4,16 @@
<Search :schema="Supplier.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="Supplier.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="Supplier.allSchemas" />
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Supplier.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}"> <template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
@ -39,187 +26,184 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef" @success="formsSuccess" :rules="SupplierRules" :formAllSchemas="Supplier.allSchemas"
ref="basicFormRef" :apiUpdate="SupplierApi.updateSupplier" :apiCreate="SupplierApi.createSupplier"
@success="formsSuccess" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
:rules="SupplierRules"
:formAllSchemas="Supplier.allSchemas"
:apiUpdate="SupplierApi.updateSupplier"
:apiCreate="SupplierApi.createSupplier"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Supplier.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="Supplier.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { Supplier,SupplierRules } from './supplier.data' import { Supplier, SupplierRules } from './supplier.data'
import * as SupplierApi from '@/api/eam/basic/supplier' import * as SupplierApi from '@/api/eam/basic/supplier'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Supplier' }) defineOptions({ name: 'Supplier' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(Supplier.allSchemas.tableColumns) const tableColumns = ref(Supplier.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplierApi.getSupplierPage //
}) })
}
//
// const { getList, setSearchParams } = tableMethods
const updataTableColumns = (val) => {
tableColumns.value = val //
} const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
const { tableObject, tableMethods } = useTable({ defaultButtons.defaultExportBtn(null), //
getListApi: SupplierApi.getSupplierPage // defaultButtons.defaultFreshBtn(null), //
}) defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// // {
const { getList, setSearchParams } = tableMethods // label: '',
// name: 'zdy',
// // hide: false,
const HeadButttondata = [ // type: 'primary',
defaultButtons.defaultAddBtn(null), // // icon: 'Select',
defaultButtons.defaultExportBtn(null), // // color: ''
defaultButtons.defaultFreshBtn(null), // // },
defaultButtons.defaultFilterBtn(null), // ]
defaultButtons.defaultSetBtn(null), //
// { //
// label: '', const buttonBaseClick = (val, item) => {
// name: 'zdy', if (val == 'add') { //
// hide: false, openForm('create')
// type: 'primary', } else if (val == 'export') { //
// icon: 'Select', handleExport()
// color: '' } else if (val == 'refresh') { //
// }, getList()
] } else if (val == 'filtrate') { //
} else { //
// console.log('其他按钮', item)
const buttonBaseClick = (val, item) => { }
if (val == 'add') { //
openForm('create')
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
} }
}
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), // defaultButtons.mainListDeleteBtn(null), //
] ]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type : string, row ?: any) => {
basicFormRef.value.open(type, row)
} }
}
// form
/** 添加/修改操作 */ const formsSuccess = async (formType, data) => {
const basicFormRef = ref() var isHave = Supplier.allSchemas.formSchema.some(function (item) {
const openForm = (type: string, row?: any) => { return item.field === 'activeTime' || item.field === 'expireTime';
basicFormRef.value.open(type, row) });
} if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
// form message.error('失效时间要大于生效时间')
const formsSuccess = async (formType,data) => { return;
var isHave =Supplier.allSchemas.formSchema.some(function (item) { }
return item.field === 'activeTime' || item.field === 'expireTime'; }
}); if (data.activeTime == 0) data.activeTime = null;
if(isHave){ if (data.expireTime == 0) data.expireTime = null;
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ try {
message.error('失效时间要大于生效时间') if (formType === 'create') {
return; await SupplierApi.createSupplier(data)
message.success(t('common.createSuccess'))
} else {
await SupplierApi.updateSupplier(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
} }
} }
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; /** 详情操作 */
if (formType === 'create') { const detailRef = ref()
await SupplierApi.createSupplier(data) const openDetail = (row : any, titleName : any, titleValue : any) => {
message.success(t('common.createSuccess')) detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
} else {
await SupplierApi.updateSupplier(data)
message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false
getList() /** 删除按钮操作 */
} const handleDelete = async (id : number) => {
try {
/** 详情操作 */ //
const detailRef = ref() await message.delConfirm()
const openDetail = (row: any, titleName: any, titleValue: any) => { //
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier') await SupplierApi.deleteSupplier(id)
} message.success(t('common.delSuccess'))
//
/** 删除按钮操作 */ await getList()
const handleDelete = async (id: number) => { } catch { }
try {
//
await message.delConfirm()
//
await SupplierApi.deleteSupplier(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 SupplierApi.exportSupplier(tableObject.params)
download.excel(data, '供应商.xlsx')
} catch {
} finally {
exportLoading.value = false
} }
}
// /** 导出按钮操作 */
const searchFormClick = (searchData) => { const exportLoading = ref(false) //
tableObject.params = { const handleExport = async () => {
isSearch: true, try {
filters: searchData.filters //
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierApi.exportSupplier(tableObject.params)
download.excel(data, '供应商.xlsx')
} catch {
} finally {
exportLoading.value = false
}
} }
getList() //
}
/** 初始化 **/ //
onMounted(async () => { const searchFormClick = (searchData) => {
getList() tableObject.params = {
}) isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script> </script>

50
src/views/eam/basic/supplier/supplier.data.ts

@ -53,31 +53,31 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{ // {
label: '状态', // label: '状态',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

13
src/views/eam/item/countRecord/countRecord.data.ts

@ -29,6 +29,17 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left' fixed: 'left'
}, },
}, },
{
label: '计划编号',
field: 'requestNumber',
sort: 'custom',
isForm: false,
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
{ {
label: '名称', label: '名称',
field: 'name', field: 'name',
@ -116,6 +127,8 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '库位编号', label: '库位编号',
field: 'locationNumber', field: 'locationNumber',

44
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -172,8 +172,6 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: false disabled: false
} }
}, },
{ {
label: '设备/模具编号', label: '设备/模具编号',
field: 'deviceNumber', field: 'deviceNumber',
@ -260,27 +258,27 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 2 precision: 2
} }
}, },
{ // {
label: '是否账内库', // label: '是否账内库',
field: 'isInAccount', // field: 'isInAccount',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: true, // isSearch: true,
isTable: true, // isTable: true,
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
disabled: true // disabled: true
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true, // disabled: true,
} // }
}, // },
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

8
src/views/eam/item/itemMaintenance/itemMaintenance.data.ts

@ -68,8 +68,12 @@ export const ItemMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, isForm: false,
}, },
{
{ label: '维修原因',
field: 'reasons',
sort: 'custom',
},
{
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,

3
src/views/home/echarts-data.ts

@ -5,8 +5,7 @@ const { t } = useI18n()
export const lineOptions: EChartsOption = { export const lineOptions: EChartsOption = {
xAxis: { xAxis: {
data: [ 1, 2, 3,4,5,6,7,8,9,10,11,12 data: [ 1, 2, 3,4,5,6,7,8,9,10,11,12],
],
boundaryGap: false, boundaryGap: false,
axisTick: { axisTick: {
show: false show: false

10
src/views/login/components/LoginForm.vue

@ -7,12 +7,12 @@
<LoginFormTitle style="width: 100%" /> <LoginFormTitle style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName"> <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" <el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse" link type="primary" /> :prefix-icon="iconHouse" link type="primary" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginData.loginForm.username" :placeholder="t('login.usernamePlaceholder')" <el-input v-model="loginData.loginForm.username" :placeholder="t('login.usernamePlaceholder')"
@ -119,9 +119,9 @@ const loginData = reactive({
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: { loginForm: {
tenantName: '闻荫源码', tenantName: '',
username: 'admin', username: '',
password: '123456', password: '',
captchaVerification: '', captchaVerification: '',
rememberMe: false, rememberMe: false,
code: '', code: '',

Loading…
Cancel
Save