ljlong_2630
8 months ago
11 changed files with 1041 additions and 833 deletions
@ -1,483 +1,477 @@ |
|||||
<template> |
<template> |
||||
<ContentWrap> |
<ContentWrap> |
||||
<!-- 搜索工作栏 --> |
<!-- 搜索工作栏 --> |
||||
<Search |
<Search |
||||
:schema="MoldAccounts.allSchemas.searchSchema" |
:schema="MoldAccounts.allSchemas.searchSchema" |
||||
@search="setSearchParams" |
@search="setSearchParams" |
||||
@reset="setSearchParams" |
@reset="setSearchParams" |
||||
/> |
/> |
||||
</ContentWrap> |
</ContentWrap> |
||||
|
|
||||
<!-- 列表头部 --> |
<!-- 列表头部 --> |
||||
<TableHead |
<TableHead |
||||
:HeadButttondata="HeadButttondata" |
:HeadButttondata="HeadButttondata" |
||||
@button-base-click="buttonBaseClick" |
@button-base-click="buttonBaseClick" |
||||
:routeName="routeName" |
:routeName="routeName" |
||||
@updataTableColumns="updataTableColumns" |
@updataTableColumns="updataTableColumns" |
||||
@searchFormClick="searchFormClick" |
@searchFormClick="searchFormClick" |
||||
:allSchemas="MoldAccounts.allSchemas" |
:allSchemas="MoldAccounts.allSchemas" |
||||
/> |
/> |
||||
|
|
||||
<!-- 列表 --> |
<!-- 列表 --> |
||||
<ContentWrap> |
<ContentWrap> |
||||
<Table |
<Table |
||||
:columns="tableColumns" |
:columns="tableColumns" |
||||
:data="tableObject.tableList" |
:data="tableObject.tableList" |
||||
:loading="tableObject.loading" |
:loading="tableObject.loading" |
||||
:pagination="{ |
:pagination="{ |
||||
total: tableObject.total |
total: tableObject.total |
||||
}" |
}" |
||||
v-model:pageSize="tableObject.pageSize" |
v-model:pageSize="tableObject.pageSize" |
||||
v-model:currentPage="tableObject.currentPage" |
v-model:currentPage="tableObject.currentPage" |
||||
v-model:sort="tableObject.sort" |
v-model:sort="tableObject.sort" |
||||
> |
> |
||||
<template #number="{ row }"> |
<template #number="{ row }"> |
||||
<el-button type="primary" link @click="openDetail(row, '编号', row.number)"> |
<el-button type="primary" link @click="openDetail(row, '编号', row.number)"> |
||||
<span>{{ row.number }}</span> |
<span>{{ row.number }}</span> |
||||
</el-button> |
</el-button> |
||||
</template> |
</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> |
||||
</Table> |
</Table> |
||||
</ContentWrap> |
</ContentWrap> |
||||
|
|
||||
<!-- 表单弹窗:添加/修改 --> |
<!-- 表单弹窗:添加/修改 --> |
||||
<BasicForm |
<BasicForm |
||||
ref="basicFormRef" |
ref="basicFormRef" |
||||
@success="formsSuccess" |
@success="formsSuccess" |
||||
:rules="MoldAccountsRules" |
:rules="MoldAccountsRules" |
||||
:formAllSchemas="MoldAccounts.allSchemas" |
:formAllSchemas="MoldAccounts.allSchemas" |
||||
:apiUpdate="MoldAccountsApi.updateMoldAccounts" |
:apiUpdate="MoldAccountsApi.updateMoldAccounts" |
||||
:apiCreate="MoldAccountsApi.createMoldAccounts" |
:apiCreate="MoldAccountsApi.createMoldAccounts" |
||||
@searchTableSuccess="searchTableSuccess" |
@searchTableSuccess="searchTableSuccess" |
||||
:isBusiness="false" |
:isBusiness="false" |
||||
/> |
/> |
||||
|
|
||||
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> |
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> |
||||
|
|
||||
<!-- 详情 --> |
<!-- 详情 --> |
||||
<DetailDeviceLedger |
<DetailDeviceLedger |
||||
ref="detailRef" |
ref="detailRef" |
||||
:tabs="MoldLedgerTabsList" |
:tabs="MoldLedgerTabsList" |
||||
:subTabs="MoldLedgerSubTabsList" |
:subTabs="MoldLedgerSubTabsList" |
||||
:isBasic="true" |
:isBasic="true" |
||||
:allSchemas="allSchemas" |
:allSchemas="allSchemas" |
||||
@changeTabs="changeTabs" |
@changeTabs="changeTabs" |
||||
:detailAllSchemas="detailAllSchemas" |
:detailAllSchemas="detailAllSchemas" |
||||
:apiPage="apiPage" |
:apiPage="apiPage" |
||||
:tabsExtend="tabsExtend" |
:tabsExtend="tabsExtend" |
||||
:tabName="tabName" |
:tabName="tabName" |
||||
:tableObjectExtend="tableObjectExtend" |
:tableObjectExtend="tableObjectExtend" |
||||
:getImageApi="uploadApi.getImage" |
:getImageApi="uploadApi.getImage" |
||||
:uploadImage="uploadApi.uploadImage" |
:uploadImage="uploadApi.uploadImage" |
||||
:defaultParams="defaultParams" |
:defaultParams="defaultParams" |
||||
:dialogApiPage="dialogApiPage" |
:dialogApiPage="dialogApiPage" |
||||
:dialogAllSchemas="dialogAllSchemas" |
:dialogAllSchemas="dialogAllSchemas" |
||||
:dialogAllSchemasRules="dialogAllSchemasRules" |
:dialogAllSchemasRules="dialogAllSchemasRules" |
||||
:diaLogApiUpdate="MoldMilestoneApi.updateMoldMilestone" |
:diaLogApiUpdate="MoldMilestoneApi.updateMoldMilestone" |
||||
:diaLogApiCreate="MoldMilestoneApi.createMoldMilestone" |
:diaLogApiCreate="MoldMilestoneApi.createMoldMilestone" |
||||
:dialogFormAllSchemasRules="MoldMilestoneRules" |
:dialogFormAllSchemasRules="MoldMilestoneRules" |
||||
:dialogFormAllSchemas="MoldMilestone.allSchemas" |
:dialogFormAllSchemas="MoldMilestone.allSchemas" |
||||
:milestoneFuncCode="milestone" |
:milestoneFuncCode="milestone" |
||||
/> |
/> |
||||
|
|
||||
<!-- 导入 --> |
<!-- 导入 --> |
||||
<ImportForm |
<ImportForm |
||||
ref="importFormRef" |
ref="importFormRef" |
||||
url="/eam/mold-accounts/import" |
url="/eam/mold-accounts/import" |
||||
:importTemplateData="importTemplateData" |
:importTemplateData="importTemplateData" |
||||
@success="importSuccess" |
@success="importSuccess" |
||||
/> |
/> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import download from '@/utils/download' |
import download from '@/utils/download' |
||||
import { |
import { |
||||
MoldAccounts, |
MoldAccounts, |
||||
MoldAccountsRules, |
MoldAccountsRules, |
||||
MoldMilestone, |
MoldMilestone, |
||||
MoldMilestoneRules |
MoldMilestoneRules |
||||
} from './moldAccounts.data' |
} from './moldAccounts.data' |
||||
import { Item } from '@/views/eam/basic/item/item.data' |
import { Item } from '@/views/eam/basic/item/item.data' |
||||
import * as ItemApi from '@/api/eam/basic/item' |
import * as ItemApi from '@/api/eam/basic/item' |
||||
import { createDeviceItemBatch, getDeviceItemPage } from '@/api/eam/basic/rel' |
import { createDeviceItemBatch, getDeviceItemPage } from '@/api/eam/basic/rel' |
||||
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' |
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' |
||||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
import { MoldLedgerTabsList } from '@/utils/disposition/tabsList' |
import { MoldLedgerTabsList } from '@/utils/disposition/tabsList' |
||||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
import { MoldRepair } from '@/views/eam/mold/moldRepair/moldRepair.data' |
||||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
import { DeviceItem } from '@/views/eam/basic/deviceItem/deviceItem.data' |
||||
import DetailDeviceLedger from '@/components/Detail/src/DetailDeviceLedger.vue' |
import * as moldRepairApi from '@/api/eam/mold/moldRepair' |
||||
import { MoldRepair } from '@/views/eam/mold/moldRepair/moldRepair.data' |
import * as uploadApi from '@/api/eam/upload' |
||||
import { DeviceItem } from '@/views/eam/basic/deviceItem/deviceItem.data' |
import * as MoldMaintainOrderMainApi from '@/api/eam/mold/moldMaintainOrderMain' |
||||
import * as moldRepairApi from '@/api/eam/mold/moldRepair' |
// import * as MoldMaintainOrderDetailApi from '@/api/eam/mold/moldMaintainOrderDetail' |
||||
import * as uploadApi from '@/api/eam/upload' |
import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain' |
||||
import * as MoldMaintainOrderMainApi from '@/api/eam/mold/moldMaintainOrderMain' |
import * as moldMaintenanceDetailApi from '@/api/eam/mold/moldMaintenanceDetail' |
||||
// import * as MoldMaintainOrderDetailApi from '@/api/eam/mold/moldMaintainOrderDetail' |
import * as MoldMilestoneApi from '@/api/eam/basic/moldMilestone' |
||||
import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain' |
import { getAccessToken } from '@/utils/auth' |
||||
import * as moldMaintenanceDetailApi from '@/api/eam/mold/moldMaintenanceDetail' |
import { dateFormatter } from '@/utils/formatTime' |
||||
import * as MoldMilestoneApi from '@/api/eam/basic/moldMilestone' |
import * as SupplierApi from '@/api/eam/basic/supplier' |
||||
import { getAccessToken } from '@/utils/auth' |
import { selectAllFactoryArea,selectAllFactoryAreaDept } from '@/api/system/dept' |
||||
|
|
||||
import { |
import { |
||||
MoldMaintainOrderMain, |
MoldMaintainOrderMain, |
||||
MoldMaintainOrderDetail, |
MoldMaintainOrderDetail, |
||||
} from '../moldmaintainjob/moldMaintainOrderMain.data' |
} from '../moldmaintainjob/moldMaintainOrderMain.data' |
||||
import { |
import { |
||||
MoldMaintenanceMain, |
MoldMaintenanceMain, |
||||
MoldMaintenanceDetail |
MoldMaintenanceDetail |
||||
} from '../moldmaintenancejob/moldMaintenanceMain.data' |
} from '../moldmaintenancejob/moldMaintenanceMain.data' |
||||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
||||
|
|
||||
defineOptions({ name: 'MoldAccounts' }) |
defineOptions({ name: 'MoldAccounts' }) |
||||
|
|
||||
const message = useMessage() // 消息弹窗 |
const message = useMessage() // 消息弹窗 |
||||
const { t } = useI18n() // 国际化 |
const { t } = useI18n() // 国际化 |
||||
|
|
||||
const route = useRoute() // 路由信息 |
const route = useRoute() // 路由信息 |
||||
const routeName = ref() |
const routeName = ref() |
||||
const deviceNumber = ref() |
const deviceNumber = ref() |
||||
routeName.value = route.name |
routeName.value = route.name |
||||
const tableColumns = ref(MoldAccounts.allSchemas.tableColumns) |
const tableColumns = ref(MoldAccounts.allSchemas.tableColumns) |
||||
|
|
||||
const allSchemas = ref(MoldAccounts.allSchemas) |
const allSchemas = ref(MoldAccounts.allSchemas) |
||||
const detailAllSchemas = ref() |
const detailAllSchemas = ref() |
||||
const apiPage = ref() |
const apiPage = ref() |
||||
const itemCodeRow = ref() |
const itemCodeRow = ref() |
||||
const tableObjectExtend = ref() |
const tableObjectExtend = ref() |
||||
const defaultParams = ref({}) |
const defaultParams = ref({}) |
||||
const dialogApiPage = ref() |
const dialogApiPage = ref() |
||||
const dialogAllSchemas = ref() |
const dialogAllSchemas = ref() |
||||
const dialogAllSchemasRules = ref() |
const dialogAllSchemasRules = ref() |
||||
const milestone = ref("milestone") |
const milestone = ref("milestone") |
||||
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
||||
const src = ref(BASE_URL + '/jmreport/view/924987924638945280?token=' + getAccessToken()) |
const src = ref(BASE_URL + '/jmreport/view/924987924638945280?token=' + getAccessToken()) |
||||
|
|
||||
// 查询页面返回 |
// 查询页面返回 |
||||
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) => { |
const updataTableColumns = (val) => { |
||||
tableColumns.value = val |
tableColumns.value = val |
||||
} |
} |
||||
|
|
||||
const { tableObject, tableMethods } = useTable({ |
const { tableObject, tableMethods } = useTable({ |
||||
getListApi: MoldAccountsApi.getMoldAccountsPage // 分页接口 |
getListApi: MoldAccountsApi.getMoldAccountsPage // 分页接口 |
||||
}) |
}) |
||||
|
|
||||
// 获得表格的各种操作 |
// 获得表格的各种操作 |
||||
const { getList, setSearchParams } = tableMethods |
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
// 列表头部按钮 |
// 列表头部按钮 |
||||
const HeadButttondata = [ |
const HeadButttondata = [ |
||||
defaultButtons.defaultAddBtn(null), // 新增 |
defaultButtons.defaultAddBtn(null), // 新增 |
||||
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
defaultButtons.selectQrCodeBatchBtn(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: '自定义扩展按钮', |
||||
// name: 'zdy', |
// name: 'zdy', |
||||
// hide: false, |
// hide: false, |
||||
// type: 'primary', |
// type: 'primary', |
||||
// icon: 'Select', |
// icon: 'Select', |
||||
// color: '' |
// color: '' |
||||
// }, |
// }, |
||||
] |
] |
||||
|
|
||||
// 头部按钮事件 |
// 头部按钮事件 |
||||
const buttonBaseClick = (val, item) => { |
const buttonBaseClick = (val, item) => { |
||||
if (val == 'add') { |
if (val == 'add') { |
||||
// 新增 |
// 新增 |
||||
openForm('create') |
openForm('create') |
||||
} else if (val == 'qrCodeBatch') { |
} else if (val == 'qrCodeBatch') { |
||||
// 批量生成二维码 |
// 批量生成二维码 |
||||
qrCodeBatch(val, item) |
qrCodeBatch(val, item) |
||||
} else if (val == 'import') { |
} else if (val == 'import') { |
||||
// 导入 |
// 导入 |
||||
handleImport() |
handleImport() |
||||
} else if (val == 'export') { |
} else if (val == 'export') { |
||||
// 导出 |
// 导出 |
||||
handleExport() |
handleExport() |
||||
} else if (val == 'refresh') { |
} else if (val == 'refresh') { |
||||
// 刷新 |
// 刷新 |
||||
getList() |
getList() |
||||
} else if (val == 'filtrate') { |
} else if (val == 'filtrate') { |
||||
// 筛选 |
// 筛选 |
||||
} else { |
} else { |
||||
// 其他按钮 |
// 其他按钮 |
||||
console.log('其他按钮', item) |
console.log('其他按钮', item) |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
// 列表-操作按钮 |
// 列表-操作按钮 |
||||
const butttondata = [ |
const butttondata = [ |
||||
defaultButtons.mainListEditBtn(null), // 编辑 |
defaultButtons.mainListEditBtn(null), // 编辑 |
||||
// defaultButtons.mainListDeleteBtn(null), // 删除 |
// defaultButtons.mainListDeleteBtn(null), // 删除 |
||||
defaultButtons.selectQrCodeBtn(null), //二维码 |
defaultButtons.selectQrCodeBtn(null), //二维码 |
||||
// defaultButtons.selectItemBtn(null) //备件 |
// defaultButtons.selectItemBtn(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 == 'qrCode') { |
} else if (val == 'qrCode') { |
||||
window.open(src.value + "&number='" + row.number + "'") |
window.open(src.value + "&number='" + row.number + "'") |
||||
} else if (val == 'selectItem') { |
} else if (val == 'selectItem') { |
||||
openItem(row.number) |
openItem(row.number) |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
/** 添加/修改操作 */ |
/** 添加/修改操作 */ |
||||
const basicFormRef = ref() |
const basicFormRef = ref() |
||||
const openForm = (type: string, row?: any) => { |
const openForm = (type: string, row?: any) => { |
||||
basicFormRef.value.open(type, row) |
basicFormRef.value.open(type, row) |
||||
} |
} |
||||
|
|
||||
// form表单提交 |
// form表单提交 |
||||
const formsSuccess = async (formType, data) => { |
const formsSuccess = async (formType, data) => { |
||||
var isHave = MoldAccounts.allSchemas.formSchema.some(function (item) { |
|
||||
return item.field === 'activeTime' || item.field === 'expireTime' |
if (formType === 'create') { |
||||
}) |
const param = { |
||||
if (isHave) { |
number : data.number |
||||
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) { |
} |
||||
message.error('失效时间要大于生效时间') |
// 判断模具编号是否存在 |
||||
return |
let flag = false |
||||
} |
await MoldAccountsApi.getMoldAccountsPage(param).then(res => { |
||||
} |
if (res?.total > 0) { |
||||
if (data.activeTime == 0) data.activeTime = null |
flag = true |
||||
if (data.expireTime == 0) data.expireTime = null |
} |
||||
if (formType === 'create') { |
}) |
||||
const param = { |
if (flag) { |
||||
number : data.number |
message.error('模具编号已存在') |
||||
} |
return |
||||
// 判断模具编号是否存在 |
} |
||||
let flag = false |
//提交 |
||||
await MoldAccountsApi.getMoldAccountsPage(param).then(res => { |
await MoldAccountsApi.createMoldAccounts(data) |
||||
if (res?.total > 0) { |
message.success(t('common.createSuccess')) |
||||
flag = true |
} else { |
||||
} |
await MoldAccountsApi.updateMoldAccounts(data) |
||||
}) |
message.success(t('common.updateSuccess')) |
||||
if (flag) { |
} |
||||
message.error('模具编号已存在') |
basicFormRef.value.dialogVisible = false |
||||
return |
getList() |
||||
} |
} |
||||
//提交 |
|
||||
await MoldAccountsApi.createMoldAccounts(data) |
/** 详情操作 */ |
||||
message.success(t('common.createSuccess')) |
const detailRef = ref() |
||||
} else { |
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
||||
await MoldAccountsApi.updateMoldAccounts(data) |
const factoryDeptList = await selectAllFactoryAreaDept() |
||||
message.success(t('common.updateSuccess')) |
const supplierList = await SupplierApi.getSupplierNoPage({}) |
||||
} |
row.factoryAreaNumberDetail = factoryDeptList.find((account) => account.id == row.factoryAreaNumber)?.name |
||||
basicFormRef.value.dialogVisible = false |
row.supplierNumberDetail = supplierList.find((account) => account.number == row.supplierNumber)?.name |
||||
getList() |
itemCodeRow.value = row.number |
||||
} |
tabsExtend.value = 1 |
||||
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicMoldAccounts') |
||||
/** 详情操作 */ |
} |
||||
const detailRef = ref() |
|
||||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
/** 删除按钮操作 */ |
||||
itemCodeRow.value = row.number |
const handleDelete = async (id: number) => { |
||||
tabsExtend.value = 1 |
try { |
||||
detailRef.value.openDetail(row, titleName, titleValue, 'basicMoldAccounts') |
// 删除的二次确认 |
||||
} |
await message.delConfirm() |
||||
|
// 发起删除 |
||||
/** 删除按钮操作 */ |
await MoldAccountsApi.deleteMoldAccounts(id) |
||||
const handleDelete = async (id: number) => { |
message.success(t('common.delSuccess')) |
||||
try { |
// 刷新列表 |
||||
// 删除的二次确认 |
await getList() |
||||
await message.delConfirm() |
} catch {} |
||||
// 发起删除 |
} |
||||
await MoldAccountsApi.deleteMoldAccounts(id) |
|
||||
message.success(t('common.delSuccess')) |
/** 导出按钮操作 */ |
||||
// 刷新列表 |
const exportLoading = ref(false) // 导出的加载中 |
||||
await getList() |
const handleExport = async () => { |
||||
} catch {} |
try { |
||||
} |
// 导出的二次确认 |
||||
|
await message.exportConfirm() |
||||
/** 导出按钮操作 */ |
// 发起导出 |
||||
const exportLoading = ref(false) // 导出的加载中 |
exportLoading.value = true |
||||
const handleExport = async () => { |
const data = await MoldAccountsApi.exportMoldAccounts(tableObject.params) |
||||
try { |
download.excel(data, '设备台账.xlsx') |
||||
// 导出的二次确认 |
} catch { |
||||
await message.exportConfirm() |
} finally { |
||||
// 发起导出 |
exportLoading.value = false |
||||
exportLoading.value = true |
} |
||||
const data = await MoldAccountsApi.exportMoldAccounts(tableObject.params) |
} |
||||
download.excel(data, '设备台账.xlsx') |
|
||||
} catch { |
/** 导入 */ |
||||
} finally { |
const importFormRef = ref() |
||||
exportLoading.value = false |
const handleImport = () => { |
||||
} |
importFormRef.value.open() |
||||
} |
} |
||||
|
// 导入附件弹窗所需的参数 |
||||
/** 导入 */ |
const importTemplateData = reactive({ |
||||
const importFormRef = ref() |
templateUrl: '', |
||||
const handleImport = () => { |
templateTitle: '设备台账导入模版.xlsx' |
||||
importFormRef.value.open() |
}) |
||||
} |
// 导入成功之后 |
||||
// 导入附件弹窗所需的参数 |
const importSuccess = () => { |
||||
const importTemplateData = reactive({ |
getList() |
||||
templateUrl: '', |
} |
||||
templateTitle: '设备台账导入模版.xlsx' |
|
||||
}) |
// 筛选提交 |
||||
// 导入成功之后 |
const searchFormClick = (searchData) => { |
||||
const importSuccess = () => { |
tableObject.params = { |
||||
getList() |
isSearch: true, |
||||
} |
filters: searchData.filters |
||||
|
} |
||||
// 筛选提交 |
getList() // 刷新当前列表 |
||||
const searchFormClick = (searchData) => { |
} |
||||
tableObject.params = { |
|
||||
isSearch: true, |
const MoldLedgerSubTabsList = getStrDictOptions(DICT_TYPE.MOLD_DOC_TYPE) |
||||
filters: searchData.filters |
const tabsExtend = ref() |
||||
} |
const tabName = ref() |
||||
getList() // 刷新当前列表 |
const funcCode = ref('mold_mould_picture') |
||||
} |
// tabs 切换事件 |
||||
|
const changeTabs = (item) => { |
||||
const MoldLedgerSubTabsList = getStrDictOptions(DICT_TYPE.MOLD_DOC_TYPE) |
if (item.prop == 'Image') { |
||||
const tabsExtend = ref() |
tabsExtend.value = 1 |
||||
const tabName = ref() |
tabName.value = item.label |
||||
const funcCode = ref('mold_mould_picture') |
funcCode.value = 'mold_mould_picture' |
||||
// tabs 切换事件 |
// apiPage.value = CustomeritemApi.getCustomeritemPage |
||||
const changeTabs = (item) => { |
// detailAllSchemas.value = Customeritem.allSchemas |
||||
if (item.prop == 'Image') { |
} else if (item.prop == 'Word') { |
||||
tabsExtend.value = 1 |
tabsExtend.value = 2 |
||||
tabName.value = item.label |
tabName.value = item.label |
||||
funcCode.value = 'mold_mould_picture' |
funcCode.value = 'mold_mould_attachment' |
||||
// apiPage.value = CustomeritemApi.getCustomeritemPage |
// apiPage.value = PurchaseDetailApi.getPurchaseDetailPage |
||||
// detailAllSchemas.value = Customeritem.allSchemas |
// detailAllSchemas.value = PurchaseMain.allSchemas |
||||
} else if (item.prop == 'Word') { |
} else if (item.prop == 'Part') { |
||||
tabsExtend.value = 2 |
tabsExtend.value = 4 |
||||
tabName.value = item.label |
tabName.value = item.label |
||||
funcCode.value = 'mold_mould_attachment' |
defaultParams.value = { |
||||
// apiPage.value = PurchaseDetailApi.getPurchaseDetailPage |
deviceNumber: itemCodeRow |
||||
// detailAllSchemas.value = PurchaseMain.allSchemas |
} |
||||
} else if (item.prop == 'Part') { |
apiPage.value = getDeviceItemPage |
||||
tabsExtend.value = 4 |
detailAllSchemas.value = DeviceItem.allSchemas |
||||
tabName.value = item.label |
} else if (item.prop == 'MoldReportRecord') { |
||||
defaultParams.value = { |
tabsExtend.value = 4 |
||||
deviceNumber: itemCodeRow |
tabName.value = item.label |
||||
} |
defaultParams.value = { |
||||
apiPage.value = getDeviceItemPage |
deviceNumber: itemCodeRow |
||||
detailAllSchemas.value = DeviceItem.allSchemas |
} |
||||
} else if (item.prop == 'MoldReportRecord') { |
apiPage.value = moldRepairApi.getMoldRepairPage |
||||
tabsExtend.value = 4 |
detailAllSchemas.value = MoldRepair.allSchemas |
||||
tabName.value = item.label |
} else if (item.prop == 'RepairRecord') { |
||||
defaultParams.value = { |
tabsExtend.value = 3 |
||||
deviceNumber: itemCodeRow |
tabName.value = item.label |
||||
} |
defaultParams.value = { |
||||
apiPage.value = moldRepairApi.getMoldRepairPage |
deviceNumber: itemCodeRow |
||||
detailAllSchemas.value = MoldRepair.allSchemas |
} |
||||
} else if (item.prop == 'RepairRecord') { |
apiPage.value = MoldMaintenanceMainApi.getMoldMaintenanceMainPage |
||||
tabsExtend.value = 3 |
detailAllSchemas.value = MoldMaintenanceMain.allSchemas |
||||
tabName.value = item.label |
dialogApiPage.value = moldMaintenanceDetailApi.getMoldMaintenanceDetailPage |
||||
defaultParams.value = { |
dialogAllSchemas.value = MoldMaintenanceDetail.allSchemas |
||||
deviceNumber: itemCodeRow |
} else if (item.prop == 'MaintenanceRecord') { |
||||
} |
tabsExtend.value = 3 |
||||
apiPage.value = MoldMaintenanceMainApi.getMoldMaintenanceMainPage |
tabName.value = item.label |
||||
detailAllSchemas.value = MoldMaintenanceMain.allSchemas |
defaultParams.value = { |
||||
dialogApiPage.value = moldMaintenanceDetailApi.getMoldMaintenanceDetailPage |
deviceNumber: itemCodeRow |
||||
dialogAllSchemas.value = MoldMaintenanceDetail.allSchemas |
} |
||||
} else if (item.prop == 'MaintenanceRecord') { |
apiPage.value = MoldMaintainOrderMainApi.getMoldMaintainOrderMainPage |
||||
tabsExtend.value = 3 |
detailAllSchemas.value = MoldMaintainOrderMain.allSchemas |
||||
tabName.value = item.label |
// dialogApiPage.value = MoldMaintainOrderDetailApi.getMoldMaintainOrderDetailPage |
||||
defaultParams.value = { |
dialogAllSchemas.value = MoldMaintainOrderDetail.allSchemas |
||||
deviceNumber: itemCodeRow |
} else if (item.prop == 'Milestone') { |
||||
} |
tabsExtend.value = 5 |
||||
apiPage.value = MoldMaintainOrderMainApi.getMoldMaintainOrderMainPage |
tabName.value = item.label |
||||
detailAllSchemas.value = MoldMaintainOrderMain.allSchemas |
defaultParams.value = { |
||||
// dialogApiPage.value = MoldMaintainOrderDetailApi.getMoldMaintainOrderDetailPage |
moldNumber: itemCodeRow |
||||
dialogAllSchemas.value = MoldMaintainOrderDetail.allSchemas |
} |
||||
} else if (item.prop == 'Milestone') { |
apiPage.value = MoldMilestoneApi.getMoldMilestonePage |
||||
tabsExtend.value = 5 |
detailAllSchemas.value = MoldMilestone.allSchemas |
||||
tabName.value = item.label |
} |
||||
defaultParams.value = { |
tableObjectExtend.value = [ |
||||
moldNumber: itemCodeRow |
{ |
||||
} |
key: 'itemCode', |
||||
apiPage.value = MoldMilestoneApi.getMoldMilestonePage |
value: itemCodeRow.value |
||||
detailAllSchemas.value = MoldMilestone.allSchemas |
} |
||||
} |
] |
||||
tableObjectExtend.value = [ |
} |
||||
{ |
|
||||
key: 'itemCode', |
|
||||
value: itemCodeRow.value |
/** 初始化 **/ |
||||
} |
onMounted(async () => { |
||||
] |
getList() |
||||
} |
importTemplateData.templateUrl = await MoldAccountsApi.importTemplate() |
||||
|
}) |
||||
|
|
||||
/** 初始化 **/ |
/** 二维码 */ |
||||
onMounted(async () => { |
const openQrCode = async (number: String) => { |
||||
getList() |
// const data = await MoldAccountsApi.getQrCode(number) |
||||
importTemplateData.templateUrl = await MoldAccountsApi.importTemplate() |
// const url = window.URL.createObjectURL(new Blob([data])) |
||||
}) |
// const link = document.createElement('a') |
||||
|
// link.style.display = 'none' |
||||
/** 二维码 */ |
// link.href = url |
||||
const openQrCode = async (number: String) => { |
// link.setAttribute('download', '设备二维码.png') |
||||
// const data = await MoldAccountsApi.getQrCode(number) |
// document.body.appendChild(link) |
||||
// const url = window.URL.createObjectURL(new Blob([data])) |
// link.click() |
||||
// const link = document.createElement('a') |
// try { |
||||
// link.style.display = 'none' |
// // 删除的二次确认 |
||||
// link.href = url |
// await message.delConfirm() |
||||
// link.setAttribute('download', '设备二维码.png') |
// // 发起删除 |
||||
// document.body.appendChild(link) |
// await MoldAccountsApi.deleteMoldAccounts(id) |
||||
// link.click() |
// message.success(t('common.delSuccess')) |
||||
// try { |
// // 刷新列表 |
||||
// // 删除的二次确认 |
// await getList() |
||||
// await message.delConfirm() |
// } catch {} |
||||
// // 发起删除 |
} |
||||
// await MoldAccountsApi.deleteMoldAccounts(id) |
|
||||
// message.success(t('common.delSuccess')) |
const searchTableRef = ref() |
||||
// // 刷新列表 |
/** 绑定备件操作 */ |
||||
// await getList() |
const openItem = async (number: String) => { |
||||
// } catch {} |
deviceNumber.value = number |
||||
} |
searchTableRef.value.open( |
||||
|
'选择备件', |
||||
const searchTableRef = ref() |
Item.allSchemas, |
||||
/** 绑定备件操作 */ |
ItemApi.getItemPage, |
||||
const openItem = async (number: String) => { |
null, |
||||
deviceNumber.value = number |
Item.allSchemas.searchSchema, |
||||
searchTableRef.value.open( |
true, |
||||
'选择备件', |
null, |
||||
Item.allSchemas, |
null, |
||||
ItemApi.getItemPage, |
null, |
||||
null, |
null |
||||
Item.allSchemas.searchSchema, |
) |
||||
true, |
} |
||||
null, |
|
||||
null, |
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { |
||||
null, |
const deviceItemRelList = selections.map((element) => ({ |
||||
null |
deviceNumber: deviceNumber.value, |
||||
) |
itemNumber: element.number |
||||
} |
})) |
||||
|
createDeviceItemBatch(deviceItemRelList).then((res) => { |
||||
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { |
console.log('res', res) |
||||
const deviceItemRelList = selections.map((element) => ({ |
}) |
||||
deviceNumber: deviceNumber.value, |
console.log('deviceItemRelList', deviceItemRelList) |
||||
itemNumber: element.number |
} |
||||
})) |
|
||||
createDeviceItemBatch(deviceItemRelList).then((res) => { |
const qrCodeBatch = async (val,item) => { |
||||
console.log('res', res) |
const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') |
||||
}) |
window.open(src.value + "&number=" + qrCodeList) |
||||
console.log('deviceItemRelList', deviceItemRelList) |
} |
||||
} |
|
||||
|
|
||||
const qrCodeBatch = async (val,item) => { |
|
||||
const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') |
|
||||
window.open(src.value + "&number=" + qrCodeList) |
</script> |
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</script> |
|
||||
|
@ -1,314 +1,342 @@ |
|||||
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 { selectAllFactoryArea,selectAllFactoryAreaDept } from '@/api/system/dept' |
import { selectAllFactoryArea,selectAllFactoryAreaDept } from '@/api/system/dept' |
||||
import * as SupplierApi from '@/api/eam/basic/supplier' |
import * as SupplierApi from '@/api/eam/basic/supplier' |
||||
import { validateHanset,validateNumDot, validateEmail,validateNum } from '@/utils/validator' |
import { validateHanset,validateNumDot, validateEmail,validateNum } from '@/utils/validator' |
||||
const factoryList = await selectAllFactoryArea() |
const factoryList = await selectAllFactoryArea() |
||||
const factoryDeptList = await selectAllFactoryAreaDept() |
const factoryDeptList = await selectAllFactoryAreaDept() |
||||
const supplierList = await SupplierApi.getSupplierNoPage() |
const supplierList = await SupplierApi.getSupplierNoPage({}) |
||||
// 表单校验
|
// 表单校验
|
||||
export const MoldAccountsRules = reactive({ |
export const MoldAccountsRules = reactive({ |
||||
number: [ |
number: [ |
||||
required, |
required, |
||||
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
||||
], |
], |
||||
name: [ |
name: [ |
||||
required, |
required, |
||||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, |
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, |
||||
], |
], |
||||
factoryAreaNumber: [required], |
factoryAreaNumber: [required], |
||||
purchaseDept: [ |
purchaseDept: [ |
||||
{ max: 100, message: '不得超过100个字符', trigger: 'blur' }, |
{ max: 100, message: '不得超过100个字符', trigger: 'blur' }, |
||||
], |
], |
||||
purchaser: [ |
purchaser: [ |
||||
{ max: 60, message: '不得超过60个字符', trigger: 'blur' }, |
{ max: 60, message: '不得超过60个字符', trigger: 'blur' }, |
||||
], |
], |
||||
purchasePrice: [ |
purchasePrice: [ |
||||
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
{ validator:validateNumDot, message: '请输入数字格式', trigger: 'blur'}, |
||||
{ validator:validateNumDot, message: '请输入数字格式', trigger: 'blur'} |
{ max: 20, message: '不得超过20个字符', trigger:'blur'}, |
||||
], |
], |
||||
beat:[ |
beat:[ |
||||
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'} |
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'} |
||||
] |
] |
||||
}) |
}) |
||||
|
|
||||
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
{ |
{ |
||||
label: '模具编号', |
label: '模具编号', |
||||
field: 'number', |
field: 'number', |
||||
sort: 'custom', |
sort: 'custom', |
||||
isSearch: true, |
isSearch: true, |
||||
isForm: true, |
isForm: true, |
||||
table: { |
table: { |
||||
width: '150', |
width: '150', |
||||
fixed: 'left', |
fixed: 'left', |
||||
}, |
}, |
||||
}, |
}, |
||||
{ |
{ |
||||
label: '名称', |
label: '名称', |
||||
field: 'name', |
field: 'name', |
||||
sort: 'custom', |
sort: 'custom', |
||||
isSearch: true |
isSearch: true |
||||
}, |
}, |
||||
{ |
{ |
||||
label: '规格型号', |
label: '规格型号', |
||||
field: 'specification', |
field: 'specification', |
||||
sort: 'custom' |
sort: 'custom' |
||||
}, |
}, |
||||
{ |
{ |
||||
label: '模具类型', |
label: '模具类型', |
||||
field: 'type', |
field: 'type', |
||||
sort: 'custom', |
sort: 'custom', |
||||
isSearch: false, |
isSearch: false, |
||||
isForm: true, |
isForm: true, |
||||
isTable: true, |
isTable: true, |
||||
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
||||
dictClass: 'string', |
dictClass: 'string', |
||||
form: { |
form: { |
||||
value: 'MOLD', |
value: 'MOLD', |
||||
component: 'Select', |
component: 'Select', |
||||
componentProps: { |
componentProps: { |
||||
disabled: true, |
disabled: true, |
||||
} |
} |
||||
}, |
}, |
||||
search: { |
search: { |
||||
value: 'MOLD' |
value: 'MOLD' |
||||
} |
} |
||||
}, |
}, |
||||
{ |
{ |
||||
label: '所属厂区', |
label: '所属厂区', |
||||
field: 'factoryAreaNumber', |
field: 'factoryAreaNumber', |
||||
sort: 'custom', |
sort: 'custom', |
||||
isSearch: false, |
isSearch: false, |
||||
table: { |
isDetail: false, |
||||
width: '150', |
table: { |
||||
}, |
width: '150', |
||||
api: () => factoryList, |
}, |
||||
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
api: () => factoryList, |
||||
return factoryList.find((account) => account.id == cellValue)?.name |
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
||||
}, |
return factoryList.find((account) => account.id == cellValue)?.name |
||||
search: { |
}, |
||||
show: true, |
search: { |
||||
component: 'Select', |
show: true, |
||||
api: () => factoryList, |
component: 'Select', |
||||
componentProps: { |
api: () => factoryList, |
||||
optionsAlias: { |
componentProps: { |
||||
labelField: 'name', |
optionsAlias: { |
||||
valueField: 'id' |
labelField: 'name', |
||||
}, |
valueField: 'id' |
||||
filterable: true, |
}, |
||||
} |
filterable: true, |
||||
}, |
} |
||||
form: { |
}, |
||||
component: 'Select', |
form: { |
||||
api: () => factoryList, |
component: 'Select', |
||||
componentProps: { |
api: () => factoryList, |
||||
disabled: false, |
componentProps: { |
||||
optionsAlias: { |
disabled: false, |
||||
labelField: 'name', |
optionsAlias: { |
||||
valueField: 'id' |
labelField: 'name', |
||||
}, |
valueField: 'id' |
||||
filterable: true, |
}, |
||||
placeholder: "请选择设备" |
filterable: true, |
||||
}, |
placeholder: "请选择设备" |
||||
} |
}, |
||||
}, |
} |
||||
{ |
}, |
||||
label: '采购时间', |
{ |
||||
field: 'purchaseTime', |
label: '所属厂区', |
||||
sort: 'custom', |
field: 'factoryAreaNumberDetail', |
||||
formatter: dateFormatter, |
sort: 'custom', |
||||
form: { |
isDetail: true, |
||||
component: 'DatePicker', |
isForm: false, |
||||
componentProps: { |
isSearch: false, |
||||
type: 'datetime', |
isTable: false, |
||||
valueFormat: 'x' |
isTableForm: false, |
||||
} |
}, |
||||
}, |
{ |
||||
detail: { |
label: '采购时间', |
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
field: 'purchaseTime', |
||||
} |
sort: 'custom', |
||||
}, |
formatter: dateFormatter, |
||||
{ |
form: { |
||||
label: '采购部门', |
component: 'DatePicker', |
||||
field: 'purchaseDept', |
componentProps: { |
||||
sort: 'custom', |
type: 'datetime', |
||||
isSearch: false, |
valueFormat: 'x' |
||||
isForm: true, |
} |
||||
isTable: true, |
}, |
||||
form: { |
detail: { |
||||
component: 'Input', |
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
} |
} |
||||
}, |
}, |
||||
{ |
{ |
||||
label: '采购人', |
label: '采购部门', |
||||
field: 'purchaser', |
field: 'purchaseDept', |
||||
sort: 'custom', |
sort: 'custom', |
||||
form: { |
isSearch: false, |
||||
component: 'Input', |
isForm: true, |
||||
} |
isTable: true, |
||||
}, |
form: { |
||||
{ |
component: 'Input', |
||||
label: '供应商', |
} |
||||
field: 'supplierNumber', |
}, |
||||
sort: 'custom', |
{ |
||||
table:{ |
label: '采购人', |
||||
width:150 |
field: 'purchaser', |
||||
}, |
sort: 'custom', |
||||
form:{ |
form: { |
||||
component: 'Select', |
component: 'Input', |
||||
componentProps: { |
} |
||||
options: supplierList, |
}, |
||||
optionsAlias: { |
{ |
||||
labelField: 'name', |
label: '供应商', |
||||
valueField: 'number' |
field: 'supplierNumber', |
||||
}, |
sort: 'custom', |
||||
filterable: true, |
table:{ |
||||
placeholder: "请选择供应商" |
width:150 |
||||
} |
}, |
||||
} |
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
||||
}, |
return supplierList.find((account) => account.number == cellValue)?.name |
||||
{ |
}, |
||||
label: '出厂日期', |
form:{ |
||||
field: 'productionDate', |
component: 'Select', |
||||
sort: 'custom', |
componentProps: { |
||||
formatter: dateFormatter, |
options: supplierList, |
||||
form: { |
optionsAlias: { |
||||
component: 'DatePicker', |
labelField: 'name', |
||||
componentProps: { |
valueField: 'number' |
||||
type: 'datetime', |
}, |
||||
valueFormat: 'x' |
filterable: true, |
||||
} |
placeholder: "请选择供应商" |
||||
} |
} |
||||
}, |
} |
||||
{ |
}, |
||||
label: '购买价格', |
{ |
||||
field: 'purchasePrice', |
label: '供应商', |
||||
sort: 'custom' |
field: 'supplierNumberDetail', |
||||
}, |
sort: 'custom', |
||||
{ |
isDetail: true, |
||||
label: '是否客户资产', |
isForm: false, |
||||
field: 'isClientAssets', |
isSearch: false, |
||||
sort: 'custom', |
isTable: false, |
||||
form: { |
isTableForm: false, |
||||
component: 'Select', |
}, |
||||
}, |
{ |
||||
dictType: DICT_TYPE.TRUE_FALSE, |
label: '出厂日期', |
||||
dictClass: 'string', |
field: 'productionDate', |
||||
}, |
sort: 'custom', |
||||
{ |
formatter: dateFormatter, |
||||
label: '模次', |
form: { |
||||
field: 'frequency', |
component: 'DatePicker', |
||||
sort: 'custom', |
componentProps: { |
||||
isForm: false, |
type: 'datetime', |
||||
isSearch: false, |
valueFormat: 'x' |
||||
form: { |
} |
||||
component: 'Input', |
} |
||||
} |
}, |
||||
}, |
{ |
||||
{ |
label: '购买价格', |
||||
label: '节拍', |
field: 'purchasePrice', |
||||
field: 'beat', |
sort: 'custom', |
||||
sort: 'custom', |
isForm: true, |
||||
isForm: true, |
form: { |
||||
form: { |
component: 'Input', |
||||
component: 'Input', |
} |
||||
} |
}, |
||||
}, |
{ |
||||
{ |
label: '是否客户资产', |
||||
label: '维修状态', |
field: 'isClientAssets', |
||||
field: 'status', |
sort: 'custom', |
||||
sort: 'custom', |
form: { |
||||
dictType: DICT_TYPE.BASIC_STATUS, |
component: 'Select', |
||||
dictClass: 'string', |
}, |
||||
isSearch: true, |
dictType: DICT_TYPE.TRUE_FALSE, |
||||
isForm: false, |
dictClass: 'string', |
||||
}, |
}, |
||||
|
{ |
||||
|
label: '模次', |
||||
{ |
field: 'frequency', |
||||
label: '操作', |
sort: 'custom', |
||||
field: 'action', |
isForm: false, |
||||
isForm: false, |
isSearch: false, |
||||
table: { |
form: { |
||||
width: 200, |
component: 'Input', |
||||
fixed: 'right' |
} |
||||
}, |
}, |
||||
isDetail: false, |
{ |
||||
} |
label: '节拍', |
||||
])) |
field: 'beat', |
||||
// 表单校验
|
sort: 'custom', |
||||
export const UpImageRules = reactive({ |
isForm: true, |
||||
filePath: [required], |
form: { |
||||
}) |
component: 'Input', |
||||
export const UpImage = useCrudSchemas(reactive<CrudSchema[]>([ |
} |
||||
{ |
}, |
||||
label: '上传图片', |
{ |
||||
field: 'filePathList', |
label: '维修状态', |
||||
sort: 'custom', |
field: 'status', |
||||
isForm: true, |
sort: 'custom', |
||||
form:{ |
dictType: DICT_TYPE.BASIC_STATUS, |
||||
component:'UploadImgs', |
dictClass: 'string', |
||||
|
isSearch: true, |
||||
} |
isForm: false, |
||||
}, |
}, |
||||
])) |
|
||||
|
|
||||
|
{ |
||||
export const MoldMilestoneRules = reactive({ |
label: '操作', |
||||
number: [required], |
field: 'action', |
||||
moldNumber: [required], |
isForm: false, |
||||
}) |
table: { |
||||
|
width: 200, |
||||
|
fixed: 'right' |
||||
export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([ |
}, |
||||
{ |
isDetail: false, |
||||
label: '里程碑阶段', |
} |
||||
field: 'milestoneStage', |
])) |
||||
sort: 'custom', |
// 表单校验
|
||||
isSearch: true, |
export const UpImageRules = reactive({ |
||||
isForm: true, |
filePath: [required], |
||||
form: { |
}) |
||||
component: 'Select', |
export const UpImage = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
componentProps: { |
{ |
||||
disabled: true, |
label: '上传图片', |
||||
} |
field: 'filePathList', |
||||
}, |
sort: 'custom', |
||||
}, |
isForm: true, |
||||
{ |
form:{ |
||||
label: '里程碑日期', |
component:'UploadImgs', |
||||
field: 'milestoneDate', |
|
||||
sort: 'custom', |
} |
||||
formatter: dateFormatter, |
}, |
||||
isSearch: true, |
])) |
||||
isForm: true, |
|
||||
search: { |
|
||||
component: 'DatePicker', |
export const MoldMilestoneRules = reactive({ |
||||
componentProps: { |
number: [required], |
||||
valueFormat: 'YYYY-MM-DD', |
moldNumber: [required], |
||||
type: 'date', |
}) |
||||
} |
|
||||
}, |
|
||||
form: { |
export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
component: 'DatePicker', |
{ |
||||
componentProps: { |
label: '里程碑阶段', |
||||
type: 'date', |
field: 'milestoneStage', |
||||
valueFormat: 'x' |
sort: 'custom', |
||||
} |
isSearch: true, |
||||
} |
isForm: true, |
||||
}, |
form: { |
||||
{ |
component: 'Select', |
||||
label: '操作', |
componentProps: { |
||||
field: 'action', |
disabled: true, |
||||
isForm: false, |
} |
||||
table: { |
}, |
||||
width: 150, |
}, |
||||
fixed: 'right' |
{ |
||||
} |
label: '里程碑日期', |
||||
} |
field: 'milestoneDate', |
||||
])) |
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
// // 表单校验
|
isSearch: true, |
||||
// export const UpFileRules = reactive({
|
isForm: true, |
||||
// filePath: [required],
|
search: { |
||||
// })
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
valueFormat: 'YYYY-MM-DD', |
||||
|
type: 'date', |
||||
|
} |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'date', |
||||
|
valueFormat: 'x' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
])) |
||||
|
|
||||
|
// // 表单校验
|
||||
|
// export const UpFileRules = reactive({
|
||||
|
// filePath: [required],
|
||||
|
// })
|
||||
|
Loading…
Reference in new issue