Browse Source

BUG修改

master_hella_20240701
parent
commit
115c9eb147
  1. 5
      src/api/eam/sparePartsOutLocationMain/index.ts
  2. 1
      src/utils/dict.ts
  3. 5
      src/views/eam/sparePartsApplyMain/index.vue
  4. 152
      src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts
  5. 28
      src/views/eam/sparepartsoutlocation/index.vue
  6. 89
      src/views/login/forgetPassword.vue

5
src/api/eam/sparePartsOutLocationMain/index.ts

@ -54,6 +54,11 @@ export const deleteSparePartsOutLocationMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-out-location-main/delete?id=` + id })
}
// 出库
export const outSparePartsOutLocationMain = async (data) => {
return await request.post({ url: `/eam/spare-parts-out-location-main/out`, data })
}
// 导出备件入库记录主 Excel
export const exportSparePartsOutLocationMain = async (params) => {
if (params.isSearch) {

1
src/utils/dict.ts

@ -372,6 +372,7 @@ export enum DICT_TYPE {
EAM_COMPLETE_RESULT = 'eam_complete_result', // 维修状态
OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum', // 流程状态
EAM_OUT_STATUS = 'eam_out_status', // 出库状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type' // 入库类型
}

5
src/views/eam/sparePartsApplyMain/index.vue

@ -85,7 +85,7 @@
<BasicForm
ref="formRefApproved"
:rules="SparePartsApplyMainRules"
:formAllSchemas="SparePartsApplyMain.allSchemas"
:formAllSchemas="SparePartsApplyExamine.allSchemas"
@submitForm="approveSparePartsApplyMain"
:isCol="false"
/>
@ -105,7 +105,8 @@ import {
SparePartsApplyMain,
SparePartsApplyMainRules,
SparePartsApplyDetail,
SparePartsApplyDetailRules
SparePartsApplyDetailRules,
SparePartsApplyExamine
} from './SparePartsApply.data'
import * as SparePartsApplyMainApi from '@/api/eam/sparePartsApplyMain'
import * as SparePartsApplyDetailApi from '@/api/eam/sparePartsApplyDetail'

152
src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts

@ -25,29 +25,82 @@ export const SparePartsOutLocationMain = useCrudSchemas(
isForm: false
},
{
label: '描述',
field: 'description',
label: '出库类型',
field: 'outType',
dictType: DICT_TYPE.EAM_OUT_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
isSearch: true
isSearch: false,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '申领备件总价',
field: 'sumVal',
label: '关联工单',
field: 'workNumber',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
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
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}
]
}
},
{
label: '出库主题',
field: 'theme',
sort: 'custom',
isSearch: true
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
isSearch: false,
isForm: false,
dictType: DICT_TYPE.EAM_OUT_STATUS,
dictClass: 'string'
},
{
label: '申请人',
@ -204,67 +257,6 @@ export const SparePartsOutLocationDetail = useCrudSchemas(
]
}
},
{
label: '设备类别',
field: 'type',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '设备工装编号',
field: 'equipmentCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
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
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}
]
}
},
{
label: '库存数量',
@ -281,6 +273,16 @@ export const SparePartsOutLocationDetail = useCrudSchemas(
sort: 'custom',
isSearch: false
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: false,
isForm: false,
dictType: DICT_TYPE.EAM_OUT_STATUS,
dictClass: 'string'
},
{
label: '备注',
field: 'remark',

28
src/views/eam/sparepartsoutlocation/index.vue

@ -208,10 +208,22 @@ const isShowMainButton = (row, val) => {
}
}
const isShowStatusButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
// defaultButtons.mainAdjust(null),//
defaultButtons.mainListApproveBtn({
hide: isShowStatusButton(row, ['未出库']),
hasPermi: 'request:spare-parts-out-location-main:out'
}) //
]
}
@ -225,12 +237,26 @@ const buttonTableClick = async (val, row) => {
// //
// handleClose(row.id)
// }
else if (val == 'delete') {
else if (val == 'mainTurnDown') {
//
handleOut(row.id)
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
//
const handleOut = async (id: number) => {
await message.delConfirm(t('ts.是否出库所选中数据?'))
try {
await SparePartsOutLocationMainApi.outSparePartsInLocation(id)
message.success(t('ts.出库成功!'))
//
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {

89
src/views/login/forgetPassword.vue

@ -1,6 +1,13 @@
<template>
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<el-form
ref="formSmsLogin"
:model="loginData"
:rules="rules"
label-width="130px"
label-position="top"
size="large"
>
<div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle">
<el-col>
@ -16,70 +23,82 @@
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;">{{t('ts.确 定')}}</el-button>
<el-button
type="primary"
@click="submitForm"
style="width: 100%; height: 40px; line-height: 40px"
>{{ t('ts.确 定') }}</el-button
>
</div>
</div>
</template>
<script lang="ts" setup name="forgetPassword">
import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { useIcon } from '@/hooks/web/useIcon'
import { setTenantId, setToken } from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission'
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import * as UserApi from '@/api/system/user'
import router from '@/router'
import { useIcon } from '@/hooks/web/useIcon'
import { setTenantId, setToken } from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission'
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import * as UserApi from '@/api/system/user'
const { t } = useI18n()
const message = useMessage()
const permissionStore = usePermissionStore()
const formSmsLogin = ref()
const loginLoading = ref(false)
const iconHouse = useIcon({ icon: 'ep:house' })
const iconCellphone = useIcon({ icon: 'ep:cellphone' })
const iconCircleCheck = useIcon({ icon: 'ep:circle-check' })
const rules = {
username: [required],
email: [required]
}
const loginData = reactive({
username: '',
email: '',
const { t } = useI18n()
const message = useMessage()
const permissionStore = usePermissionStore()
const formSmsLogin = ref()
const loginLoading = ref(false)
const iconHouse = useIcon({ icon: 'ep:house' })
const iconCellphone = useIcon({ icon: 'ep:cellphone' })
const iconCircleCheck = useIcon({ icon: 'ep:circle-check' })
const rules = {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
email: [{ required: true, message: '请输入邮箱', trigger: 'blur' }]
}
})
const loading = ref(false);
const submitForm = async () => {
const loginData = reactive({
username: '',
email: ''
})
const loading = ref(false)
const submitForm = async () => {
try {
if (!formSmsLogin.value) return
await formSmsLogin.value.validate(async (valid, fields) => {
if (valid) {
const data = loginData as unknown as UserApi.UserVO
await UserApi.forgetPassword(data)
message.success(t('common.emailSentSuccess'))
//
router.go(-1)
} else {
console.log('error submit!', fields)
}
})
} finally {
// formLoading.value = false
}
}
}
</script>
<style lang="scss" scoped>
:deep(.anticon) {
:deep(.anticon) {
&:hover {
color: var(--el-color-primary) !important;
}
}
}
.smsbtn {
.smsbtn {
margin-top: 33px;
}
.box{
}
.box {
border: 1px solid #dedede;
width: 500px;
margin: 100px auto 0px;
padding: 20px;
box-shadow: 0px 0px 20px rgba($color: #000000, $alpha: 0.1);
}
.title{
}
.title {
text-align: center;
font-size: 20px;
font-weight: bold;
padding-bottom: 20px;
}
}
</style>

Loading…
Cancel
Save