Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
b21287dfbc
  1. 2
      .env
  2. 2
      README.md
  3. 6
      index.html
  4. 79
      src/api/eam/toolAccounts/index.ts
  5. 61
      src/api/eam/toolMod/index.ts
  6. BIN
      src/assets/imgs/login-bg.png
  7. BIN
      src/assets/imgs/login-bg1.png
  8. BIN
      src/assets/imgs/logo1.png
  9. 244
      src/views/eam/toolAccounts/index.vue
  10. 279
      src/views/eam/toolAccounts/toolAccounts.data.ts
  11. 285
      src/views/eam/toolMod/index.vue
  12. 320
      src/views/eam/toolMod/operateForm.vue
  13. 155
      src/views/eam/toolMod/toolMod.data.ts
  14. 22
      src/views/login/login.vue
  15. 2
      src/views/mes/orderDay/components/schedule.vue
  16. 7
      src/views/mes/workScheduling/index.vue
  17. 11
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

2
.env

@ -1,5 +1,5 @@
# 标题 # 标题
VITE_APP_TITLE=富维海拉管理系统 VITE_APP_TITLE=富维海拉智慧工厂管理平台
# 项目本地运行端口号 # 项目本地运行端口号
VITE_PORT=80 VITE_PORT=80

2
README.md

@ -10,6 +10,8 @@ form: {
searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
hiddenFilterButton:true,//是否隐藏筛选按钮 hiddenFilterButton:true,//是否隐藏筛选按钮
dialogWidth:'100px',//搜索出来弹窗的宽度 dialogWidth:'100px',//搜索出来弹窗的宽度
isConcatDetailSchemas:true, // 是否主子表合并
searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas, // 查询弹窗所需子表类
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{

6
index.html

@ -3,16 +3,16 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<!-- <link rel="icon" href="/favicon.ico" /> --> <!-- <link rel="icon" href="/favicon.ico" /> -->
<!-- <link rel="icon" href="/src/assets/imgs/logo1.png" /> --> <link rel="icon" href="/src/assets/imgs/logo1.png" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta <meta
name="keywords" name="keywords"
content="富维海拉管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" content="富维海拉智慧工厂管理平台 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
/> />
<meta <meta
name="description" name="description"
content="富维海拉管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" content="富维海拉智慧工厂管理平台 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
/> />
<title>%VITE_APP_TITLE%</title> <title>%VITE_APP_TITLE%</title>
</head> </head>

79
src/api/eam/toolAccounts/index.ts

@ -0,0 +1,79 @@
import request from '@/config/axios'
export interface ToolAccountsVO {
id: number
code: string
name: string
specification: string
type: string
equity: string
electricMachine: string
isCustomerAptitude: boolean
customerId: string
storageLocation: string
useDept: string
principal: string
principalTelephone: string
status: string
startDate: Date
supplierCode: string
purchaseTime: Date
purchaseDept: string
purchaser: string
productionDate: Date
manufactureCode: string
equipmentLife: string
acceptanceDate: Date
purchasePrice: number
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询工装台账列表
export const getToolAccountsPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/tool-accounts/senior', data })
} else {
return await request.get({ url: `/eam/tool-accounts/page`, params })
}
}
// 查询工装台账详情
export const getToolAccounts = async (id: number) => {
return await request.get({ url: `/eam/tool-accounts/get?id=` + id })
}
// 新增工装台账
export const createToolAccounts = async (data: ToolAccountsVO) => {
return await request.post({ url: `/eam/tool-accounts/create`, data })
}
// 修改工装台账
export const updateToolAccounts = async (data: ToolAccountsVO) => {
return await request.put({ url: `/eam/tool-accounts/update`, data })
}
// 删除工装台账
export const deleteToolAccounts = async (id: number) => {
return await request.delete({ url: `/eam/tool-accounts/delete?id=` + id })
}
// 导出工装台账 Excel
export const exportToolAccounts = async (params) => {
return await request.download({ url: `/eam/tool-accounts/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/tool-accounts/get-import-template' })
}

61
src/api/eam/toolMod/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface ToolModVO {
id: number
modCode: string
toolCode: string
type: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询工装物料关联列表
export const getToolModPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic/tool-mod/senior', data })
} else {
return await request.get({ url: `/eam/basic/tool-mod/page`, params })
}
}
// 查询工装物料关联详情
export const getToolMod = async (id: number) => {
return await request.get({ url: `/eam/basic/tool-mod/get?id=` + id })
}
// 新增工装物料关联
export const createToolMod = async (data: ToolModVO) => {
return await request.post({ url: `/eam/basic/tool-mod/create`, data })
}
// 修改工装物料关联
export const updateToolMod = async (data: ToolModVO) => {
return await request.put({ url: `/eam/basic/tool-mod/update`, data })
}
// 删除工装物料关联
export const deleteToolMod = async (id: number) => {
return await request.delete({ url: `/eam/basic/tool-mod/delete?id=` + id })
}
// 导出工装物料关联 Excel
export const exportToolMod = async (params) => {
return await request.download({ url: `/eam/basic/tool-mod/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/tool-mod/get-import-template' })
}
// 新增工装物料关联
export const createToolModBatch = async (data: ToolModVO) => {
return await request.post({ url: `/eam/basic/tool-mod/createBatch`, data })
}

BIN
src/assets/imgs/login-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

BIN
src/assets/imgs/login-bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
src/assets/imgs/logo1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 52 KiB

244
src/views/eam/toolAccounts/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolAccounts.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="ToolAccountsRules"
:formAllSchemas="ToolAccounts.allSchemas"
:apiUpdate="ToolAccountsApi.updateToolAccounts"
:apiCreate="ToolAccountsApi.createToolAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolAccounts.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/tool-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolAccounts,ToolAccountsRules } from './toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
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: 'ToolAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolAccounts.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ToolAccountsApi.getToolAccountsPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-accounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:tool-accounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:tool-accounts:export'}), //
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({hasPermi:'eam:tool-accounts:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-accounts:delete'}), //
]
// -
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)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolAccounts.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 ToolAccountsApi.createToolAccounts(data)
message.success(t('common.createSuccess'))
} else {
await ToolAccountsApi.updateToolAccounts(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicToolAccounts')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolAccountsApi.deleteToolAccounts(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 ToolAccountsApi.exportToolAccounts(tableObject.params)
download.excel(data, '工装台账.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工装台账导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolAccountsApi.importTemplate()
})
</script>

279
src/views/eam/toolAccounts/toolAccounts.data.ts

@ -0,0 +1,279 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ToolAccountsRules = reactive({
code: [required],
name: [required],
concurrencyStamp: [required]
})
export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装编号',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '型号',
field: 'specification',
sort: 'custom',
isSearch: true
},
{
label: '类型',
field: 'type',
sort: 'custom',
isSearch: false,
form: {
component: 'Select'
}
},
{
label: '产权',
field: 'equity',
sort: 'custom',
isSearch: false
},
{
label: '电机',
field: 'electricMachine',
sort: 'custom',
isSearch: false
},
{
label: '是否客户资质',
field: 'isCustomerAptitude',
sort: 'custom',
isSearch: false,
form: {
component: 'Switch'
}
},
{
label: '客户id',
field: 'customerId',
sort: 'custom',
isSearch: false
},
{
label: '存放位置',
field: 'storageLocation',
sort: 'custom',
isSearch: false
},
{
label: '使用部门',
field: 'useDept',
sort: 'custom',
isSearch: false
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false
},
{
label: '负责人联系方式',
field: 'principalTelephone',
sort: 'custom',
isSearch: false
},
{
label: '设备状态',
field: 'status',
sort: 'custom',
isSearch: false,
form: {
component: 'Switch'
}
},
{
label: '启用日期',
field: 'startDate',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '供应商编号',
field: 'supplierCode',
sort: 'custom',
isSearch: false
},
{
label: '采购时间',
field: 'purchaseTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '采购部门',
field: 'purchaseDept',
sort: 'custom',
isSearch: true
},
{
label: '采购人',
field: 'purchaser',
sort: 'custom',
isSearch: true
},
{
label: '出厂日期',
field: 'productionDate',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '生产厂商编码',
field: 'manufactureCode',
sort: 'custom',
isSearch: false
},
{
label: '设备使用寿命',
field: 'equipmentLife',
sort: 'custom',
isSearch: false
},
{
label: '验收日期',
field: 'acceptanceDate',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '价格',
field: 'purchasePrice',
sort: 'custom',
isSearch: false
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

285
src/views/eam/toolMod/index.vue

@ -0,0 +1,285 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolMod.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolMod.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(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<!-- <BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ToolModRules"
:formAllSchemas="ToolMod.allSchemas"
:apiUpdate="ToolModApi.updateToolMod"
:apiCreate="ToolModApi.createToolMod"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/> -->
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolMod.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic/tool-mod/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<!-- 表单弹窗添加/修改 -->
<teamForm ref="basicFormRef" @success="formsSuccess" :formAllSchemas="ToolMod.allSchemas"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolMod,ToolModRules } from './toolMod.data'
import * as ToolModApi from '@/api/eam/toolMod'
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'
import TeamForm from "./operateForm.vue";
defineOptions({ name: 'ToolMod' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolMod.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ToolModApi.getToolModPage //
})
const judgeStatus = (row) =>{
if(row.available === 'TRUE'){
return true
}else{
return false
}
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-mod:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:tool-mod:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:tool-mod:export'}), //
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 = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:tool-mod:update'}), //
defaultButtons.mainListEnableBtn({hasPermi:'eam:tool-mod:enable',hide: judgeStatus(row)}), //
defaultButtons.mainListDisableBtn({hasPermi:'eam:tool-mod:disable',hide: !judgeStatus(row)}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-mod:delete'}), //
]}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'enable') { //
handleEnable(row,'TRUE')
}else if (val == 'disable') {//
handleEnable(row,'FALSE')
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolMod.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 ToolModApi.createToolMod(data)
message.success(t('common.createSuccess'))
} else {
await ToolModApi.updateToolMod(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicToolMod')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolModApi.deleteToolMod(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 ToolModApi.exportToolMod(tableObject.params)
download.excel(data, '工装物料关联.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工装物料关联导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'modCodeShow') {
let str = ''
let modCodeList = Array(String)
val.forEach((element) => {
str += element.name + ':' + element.code + ','
modCodeList.push(element.code)
})
str = str.substring(0, str.length - 1)
setV['modCodeShow'] = str
setV['modCodeList'] = modCodeList
formRef.setValues(setV);
}else if(formField == 'toolCodeShow'){
let str = val[0].name + ':' + val[0].code
str = str.substring(0, str.length - 1)
setV['toolCodeShow'] = str
setV['toolCode'] = val[0].code
formRef.setValues(setV);
}
})
}
const handleEnable = (row,enable) =>{
message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
row.available = enable
ToolModApi.updateToolMod(row).then(res => {
message.success(t('common.updateSuccess'))
})
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolModApi.importTemplate()
})
</script>

320
src/views/eam/toolMod/operateForm.vue

@ -0,0 +1,320 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<el-form
ref="basicFormRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="80px"
>
<el-row>
<el-col :span="24">
<el-form-item label="工装" prop="toolCode">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in toolCodeList" :key="ent.code" closable :disable-transitions="false"
@close="handleToolClose(ent.code)">
{{ ent.name}}
</el-tag>
<el-input
v-if="inputToolVisible"
ref="InputRef"
v-model="inputToolValue"
class="w-20"
size="small"
/>
<el-button v-else class="button-new-tag" size="small" @click="addTool">
选定工装 +
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="物料" prop="modCodeList">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.code" closable :disable-transitions="false"
@close="handleClose(ent.code)">
{{ ent.name}}
</el-tag>
<el-input
v-if="inputVisible"
ref="InputRef"
v-model="inputValue"
class="w-20"
size="small"
/>
<el-button v-else class="button-new-tag" size="small" @click="addMod">
添加物料 +
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DEVICE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加班组人员弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import request from "@/config/axios";
import download from '@/utils/download'
import { ToolMod,ToolModRules } from './toolMod.data'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
import * as ToolModApi from '@/api/eam/toolMod'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'OperateForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const toolCodeList = ref([])
const inputValue = ref('')
const inputToolValue = ref('')
const inputVisible = ref(false)
const inputToolVisible = ref(false)
const isDisabled = ref(false)
const isToolDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
toolCode: '',
modCodeList: [],
type: null,
remark: ''
})
const formRules = reactive({
modCodeList: [required],
toolCode: [required],
type: [required],
concurrencyStamp: [required]
})
const basicFormRef = ref() // Ref
const handleClose = (code) => {
tags.value = tags.value.filter(item=>{
return item.code!=code
})
}
const handleToolClose = (code) => {
toolCodeList.value = toolCodeList.value.filter(item=>{
return item.code!=code
})
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addTool = () =>{
addToolCommon(true,'toolCodeList')
}
const addMod = () =>{
addModCommon(true,'modCodeList')
}
/** 选择物料弹窗 */
const addModCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择物料'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = ItembasicApi.getItembasicPage,
_searchTableAllSchemas.value = Itembasic.allSchemas,
openCommon()
}
/** 选择物料弹窗 */
const addToolCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选定工装'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = ToolAccountsApi.getToolAccountsPage,
_searchTableAllSchemas.value = ToolAccounts.allSchemas,
openCommon()
}
/** 弹窗选择之后 回调函数 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
if (formField === 'modCodeList') {
tags.value = [];
val.forEach(item => {
let newMod = {}
newMod['code'] = item.code;
newMod['name'] = item.name;
tags.value.push(newMod);
});
}else if (formField === 'toolCodeList') {
toolCodeList.value = [];
val.forEach(item => {
let newTool = {}
newTool['code'] = item.code;
newTool['name'] = item.name;
toolCodeList.value.push(newTool);
});
}
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (row) {
isDisabled.value = true;
formLoading.value = true
try {
// formData.value = await request.get({ url: `/wms/itembasic/get?id=` + row.id });
// tags.value=formData.value
} finally {
formLoading.value = false
}
}
else {
isDisabled.value = false;
tags.value=[];
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
formData.value.modCodeList = tags.value.map(item=>item.code)
formData.value.toolCode = toolCodeList.value[0].code
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
const data = formData.value as unknown as ToolModApi.ToolModVO
if (formType.value === 'create') {
await ToolModApi.createToolModBatch(data)
message.success(t('common.createSuccess'))
} else {
await ToolModApi.updateToolMod(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
toolCode: '',
modCodeList: [],
type: null,
remark: ''
}
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

155
src/views/eam/toolMod/toolMod.data.ts

@ -0,0 +1,155 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
// 表单校验
export const ToolModRules = reactive({
modCode: [required],
toolCode: [required],
type: [required],
concurrencyStamp: [required]
})
export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装编码',
field: 'toolCode',
sort: 'custom',
isSearch: false,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
},
// {
// label: '工装编码',
// field: 'toolCodeShow',
// sort: 'custom',
// isSearch: true,
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择工装代码',
// searchField: 'toolCodeShow',
// searchTitle: '客户物料基础信息',
// searchAllSchemas: ToolAccounts.allSchemas,
// searchPage: ToolAccountsApi.getToolAccountsPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// },
// search: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择工装代码',
// searchField: 'toolCodeShow',
// searchTitle: '客户物料基础信息',
// searchAllSchemas: ToolAccounts.allSchemas,
// searchPage: ToolAccountsApi.getToolAccountsPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '物料编号',
field: 'modCode',
sort: 'custom',
isSearch: false,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
},
// {
// label: '物料编号',
// field: 'modCodeShow',
// sort: 'custom',
// isSearch: true,
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择物料代码',
// searchField: 'modCodeShow',
// searchTitle: '客户物料基础信息',
// multiple:true,
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: ItembasicApi.getItembasicPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// },
// search: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择物料代码',
// searchField: 'modCodeShow',
// searchTitle: '客户物料基础信息',
// multiple: true,
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: ItembasicApi.getItembasicPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// isSearch: true
// },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

22
src/views/login/login.vue

@ -1,14 +1,14 @@
<template> <template>
<div <div
:class="prefixCls" :class="`${prefixCls} ${prefixCls}__left`"
class="relative h-[100%] lt-xl:bg-[var(--login-bg-color)] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px" class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px"
> >
<div class="relative mx-auto h-full flex"> <div class="relative mx-auto h-full flex">
<div <div
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`" :class="` flex-1 bg-opacity-20 relative p-30px lt-xl:hidden`"
> >
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center text-white"> <div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span> <span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
</div> </div>
@ -19,18 +19,18 @@
enter-active-class="animate__animated animate__bounceInLeft" enter-active-class="animate__animated animate__bounceInLeft"
tag="div" tag="div"
> >
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> <!-- <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> -->
<div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> <!-- <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> -->
<div key="3" class="mt-5 text-14px font-normal text-white"> <div key="3" class="mt-5 text-14px font-normal text-white">
{{ t('login.message') }} {{ t('login.message') }}
</div> </div>
</TransitionGroup> </TransitionGroup>
</div> </div>
</div> </div>
<div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px"> <div class="relative flex-1 p-30px lt-sm:p-10px">
<!-- 右上角的主题语言选择 --> <!-- 右上角的主题语言选择 -->
<div <div
class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end" class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
> >
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
@ -38,7 +38,7 @@
</div> </div>
<div class="flex items-center justify-end space-x-10px"> <div class="flex items-center justify-end space-x-10px">
<!-- <ThemeSwitch /> --> <!-- <ThemeSwitch /> -->
<LocaleDropdown class="dark:text-white lt-xl:text-white" /> <LocaleDropdown class="dark:text-white " />
</div> </div>
</div> </div>
<!-- 右边的登录界面 --> <!-- 右边的登录界面 -->
@ -94,11 +94,13 @@ $prefix-cls: #{$namespace}-login;
z-index: -1; z-index: -1;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/svgs/login-bg.svg'); // background-image: url('@/assets/svgs/login-bg.svg');
background-image: url('@/assets/imgs/login-bg.png');
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
content: ''; content: '';
} }
} }
} }
</style> </style>

2
src/views/mes/orderDay/components/schedule.vue

@ -706,7 +706,9 @@ const deleteEquipment=(row)=>{
/*删除选择的班组人员*/ /*删除选择的班组人员*/
const deleteUser=(row)=>{ const deleteUser=(row)=>{
console.log("workerData.value.709",workerData.value)
workerData.value.splice(workerData.value.indexOf(row),1) workerData.value.splice(workerData.value.indexOf(row),1)
console.log("workerData.value.711",workerData.value)
} }
/*班组人员保存接口*/ /*班组人员保存接口*/
const saveUser = async () =>{ const saveUser = async () =>{

7
src/views/mes/workScheduling/index.vue

@ -230,11 +230,14 @@ const finishReport=async(row)=>{
processCode:row.workingNode processCode:row.workingNode
} }
//console.log("workscheduling-finishReport-213",row) //console.log("workscheduling-finishReport-213",row)
let res=await WorkSchedulingApi.getNodePosition(params) if(row.workingNode=='endNode'){
if(res==='end'){
//reportFinishRef.value.openDetail(row,"") //reportFinishRef.value.openDetail(row,"")
WorkSchedulingApi.completeHandle(params) WorkSchedulingApi.completeHandle(params)
}else{ }else{
// let res=await WorkSchedulingApi.getNodePosition(params)
// if(res){
// }
message.alert("当前工序不是完工工序,不能进行完工操作!") message.alert("当前工序不是完工工序,不能进行完工操作!")
} }
} }

11
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as ItemApi from '@/api/wms/itembasic' import * as ItemApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
@ -38,7 +38,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '申请日期', label: '申请日期',
field: 'applicationDate', field: 'applicationDate',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter2,
isSearch: false, isSearch: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
@ -57,8 +57,11 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
table: { table: {
width: 175 width: 120
} },
detail: {
dateFormat: 'YYYY-MM-DD'
},
}, },
{ {
label: '申请时间', label: '申请时间',

Loading…
Cancel
Save