Browse Source

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

master_hella_20240701
songguoqiang 5 months ago
parent
commit
2a2bfea15a
  1. 10
      src/components/BasicForm/src/BasicForm.vue
  2. 9
      src/components/XButton/src/ButtonBase.vue
  3. 1
      src/locales/en-US.ts
  4. 1
      src/locales/zh-CN.ts
  5. 1
      src/utils/dict.ts
  6. 2
      src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
  7. 1
      src/views/eam/equipmentRepairJobMain/index.vue
  8. 155
      src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
  9. 29
      src/views/eam/equipmentRepairRecordMain/index.vue
  10. 14
      src/views/eam/sparepartsinlocation/index.vue
  11. 93
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts
  12. 2
      src/views/login/forgetPassword.vue

10
src/components/BasicForm/src/BasicForm.vue

@ -566,9 +566,15 @@ const buttonBaseClick = (val) => {
}
//
else if (val == 'save') {
debounce(() => {
let timer = null
if(!timer){
submitForm()
}, 2000)()
timer = setTimeout(()=>{
if(timer){
clearTimeout(timer)
}
},2000)
}
}
//
else if (val == 'close') {

9
src/components/XButton/src/ButtonBase.vue

@ -72,8 +72,17 @@ const props = defineProps({
const emit = defineEmits(['buttonBaseClick', 'updataTableColumns'])
const buttonBaseClick = (val, item, $event) => {
let timer = null
if(!timer){
clearButtonBlurHandle($event) //el-button
emit('buttonBaseClick', val, item, $event)
timer = setTimeout(()=>{
if(timer){
clearTimeout(timer)
}
},2000)
}
}
const popoverVisible = ref(false)
//

1
src/locales/en-US.ts

@ -44,6 +44,7 @@ export default {
importMessage: 'Whether to confirm import data item?',
createSuccess: 'Create Success',
updateSuccess: 'Update Success',
emailSentSuccess: 'Email sent successfully',
delMessage: 'Delete the selected data?',
delDataMessage: 'Delete the data?',
delNoData: 'Please select the data to delete',

1
src/locales/zh-CN.ts

@ -44,6 +44,7 @@ export default {
importMessage: '是否确认导入数据项?',
createSuccess: '新增成功',
updateSuccess: '修改成功',
emailSentSuccess: '邮件发送成功',
delMessage: '是否删除所选中数据?',
delDataMessage: '是否删除数据?',
delNoData: '请选择需要删除的数据',

1
src/utils/dict.ts

@ -363,6 +363,7 @@ export enum DICT_TYPE {
EAM_MAINTENANCE_URGENCY = 'eam_maintenance_urgency', // 维保紧急程度
EAM_MAINTENANCE_LEVEL = 'eam_maintenance_level', // 维保维修级别
EAM_REPAIR_STATUS = 'eam_repair_status', // 维修状态
EAM_COMPLETE_RESULT = 'eam_complete_result', // 维修状态
OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边

2
src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts

@ -249,6 +249,8 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '结果',
field: 'completeResult',
sort: 'custom',
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
dictClass: 'string',
isSearch: true,
},
{

1
src/views/eam/equipmentRepairJobMain/index.vue

@ -88,7 +88,6 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.
import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue'
import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue'
import {createEquipmentRepairNewOrder} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'EquipmentRepairJobMain' })

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

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
// 表单校验
export const EquipmentRepairRecordMainRules = reactive({
@ -11,7 +13,6 @@ export const EquipmentRepairRecordMainRules = reactive({
equipmentCode: [required],
totalMinutes: [required],
faultType: [required],
concurrencyStamp: [required]
})
export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -28,12 +29,9 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '报修工单申请号',
label: '报修工单号',
field: 'repairNumber',
sort: 'custom',
isSearch: true
@ -42,43 +40,56 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '来源字典',
field: 'sources',
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
isSearch: false
},
{
label: '维修描述',
field: 'maintenanceDesc',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '紧急程度',
field: 'urgency',
sort: 'custom',
dictType: DICT_TYPE.REPAIR_DEGREE,
dictType: DICT_TYPE.EAM_MAINTENANCE_URGENCY,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '维修级别',
field: 'level',
sort: 'custom',
dictType: DICT_TYPE.REPAIR_LEVEL,
dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '是否停机',
@ -96,7 +107,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'startTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -118,7 +129,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'endTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -139,23 +150,25 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '维修时间',
field: 'totalMinutes',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Editor',
componentProps: {
@ -169,7 +182,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'verifyTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
@ -190,35 +206,31 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '执行人',
field: 'maintenancer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
},
{
label: '维修人联系电话',
field: 'maintenancePhone',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '结果枚举',
field: 'completeResult',
sort: 'custom',
dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '完成时间',
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -240,7 +252,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenanceTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
@ -262,7 +277,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'repairTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -283,11 +298,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '报修人',
field: 'repairer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
},
{
label: '故障类型',
@ -296,75 +307,86 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.EAM_REPAIR_STATUS,
dictClass: 'string',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '自动接单',
field: 'autoOrder',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动执行',
field: 'autoPerform',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动验证',
field: 'autoVerify',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '班组类型',
field: 'classType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
@ -372,7 +394,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '操作',

29
src/views/eam/equipmentRepairRecordMain/index.vue

@ -27,9 +27,9 @@
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>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -51,7 +51,16 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentRepairRecordMain.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentRepairRecordMain.allSchemas"
:detailAllSchemas="EquipmentRepairRecordDetail.allSchemas"
:detailAllSchemasRules="EquipmentRepairRecordDetailRules"
:apiPage="EquipmentRepairRecordDetailApi.getEquipmentRepairRecordDetailPage"
:detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false
:detailButtonIsShowDelete=false
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-repair-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -60,7 +69,9 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentRepairRecordMain,EquipmentRepairRecordMainRules } from './equipmentRepairRecordMain.data'
import { EquipmentRepairRecordDetail,EquipmentRepairRecordDetailRules } from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
import * as EquipmentRepairRecordMainApi from '@/api/eam/equipmentRepairRecordMain'
import * as EquipmentRepairRecordDetailApi from '@/api/eam/equipmentRepairRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -99,9 +110,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentRepairRecordMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentRepairRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentRepairRecordMain:export'}), //
// defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentRepairRecordMain:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentRepairRecordMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentRepairRecordMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +144,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentRepairRecordMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentRepairRecordMain:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairRecordMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentRepairRecordMain:delete'}), //
]
// -

14
src/views/eam/sparepartsinlocation/index.vue

@ -76,8 +76,7 @@
:apiDelete="SparePartsInLocationDetailApi.deleteSparePartsInLocationDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="true"
:detailButtonIsShowAdd="true"
:detailButtonIsShowAddStatusArray="['0']"
:detailButtonIsShowAdd="false"
/>
<!-- 导入 -->
@ -126,17 +125,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const setV = {}
setV[formField] = val[0][searchField]
if (type == 'tableForm') {
if (formField == 'sparePartsCode') {
row['sparePartsCode'] = val[0].itemNumber
if (formField == 'locationCode') {
// row['sparePartsCode'] = val[0].itemNumber
row['locationCode'] = val[0].code
row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty
}
} else {
if (formField == 'locationCode') {
setV['locationCode'] = val[0].code
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
}
}
formRef.setValues(setV)
})
})

93
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -112,40 +112,7 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '备注',
@ -187,6 +154,8 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
export const SparePartsInLocationDetailRules = reactive({
number: [required],
masterId: [required],
locationCode: [required],
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
concurrencyStamp: [required],
@ -228,21 +197,18 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm:false
},
{
label: '备件编号',
field: 'sparePartsCode',
label: '库位编号',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -257,8 +223,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -268,6 +234,36 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
]
}
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '库存数量',
field: 'currentQty',
@ -321,7 +317,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150,
fixed: 'right'
},
isTableForm:false
isTableForm:false,
isTable:false
}
]))

2
src/views/login/forgetPassword.vue

@ -50,7 +50,7 @@
try {
const data = loginData as unknown as UserApi.UserVO
await UserApi.forgetPassword(data)
message.success(t('common.updateSuccess'))
message.success(t('common.emailSentSuccess'))
//
router.go(-1)
} finally {

Loading…
Cancel
Save