Browse Source

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

master_hella_20240701
wangyufei 5 months ago
parent
commit
4377ab2862
  1. 5
      src/api/eam/sparePartsOutLocationMain/index.ts
  2. 1
      src/components/BasicForm/src/BasicForm.vue
  3. 1
      src/utils/dict.ts
  4. 5
      src/views/eam/sparePartsApplyMain/index.vue
  5. 152
      src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts
  6. 28
      src/views/eam/sparepartsoutlocation/index.vue
  7. 35
      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 }) 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 // 导出备件入库记录主 Excel
export const exportSparePartsOutLocationMain = async (params) => { export const exportSparePartsOutLocationMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {

1
src/components/BasicForm/src/BasicForm.vue

@ -58,6 +58,7 @@
<el-select <el-select
v-model="formSchema.value" v-model="formSchema.value"
placeholder="选择盘点范围值" placeholder="选择盘点范围值"
multiple
v-if="isDetail&& formTypeDetail =='Select'" v-if="isDetail&& formTypeDetail =='Select'"
> >
<el-option <el-option

1
src/utils/dict.ts

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

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

@ -85,7 +85,7 @@
<BasicForm <BasicForm
ref="formRefApproved" ref="formRefApproved"
:rules="SparePartsApplyMainRules" :rules="SparePartsApplyMainRules"
:formAllSchemas="SparePartsApplyMain.allSchemas" :formAllSchemas="SparePartsApplyExamine.allSchemas"
@submitForm="approveSparePartsApplyMain" @submitForm="approveSparePartsApplyMain"
:isCol="false" :isCol="false"
/> />
@ -105,7 +105,8 @@ import {
SparePartsApplyMain, SparePartsApplyMain,
SparePartsApplyMainRules, SparePartsApplyMainRules,
SparePartsApplyDetail, SparePartsApplyDetail,
SparePartsApplyDetailRules SparePartsApplyDetailRules,
SparePartsApplyExamine
} from './SparePartsApply.data' } from './SparePartsApply.data'
import * as SparePartsApplyMainApi from '@/api/eam/sparePartsApplyMain' import * as SparePartsApplyMainApi from '@/api/eam/sparePartsApplyMain'
import * as SparePartsApplyDetailApi from '@/api/eam/sparePartsApplyDetail' 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 isForm: false
}, },
{ {
label: '描述', label: '出库类型',
field: 'description', field: 'outType',
dictType: DICT_TYPE.EAM_OUT_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
isSearch: true isSearch: false,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
}, },
{ {
label: '申领备件总价', label: '关联工单',
field: 'sumVal', field: 'workNumber',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
isTable: false, width: 150
isForm: false },
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: '流程状态', label: '流程状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM, isSearch: false,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isForm: false,
isSearch: true,
form: { dictType: DICT_TYPE.EAM_OUT_STATUS,
component: 'Select' dictClass: 'string'
}
}, },
{ {
label: '申请人', 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: '库存数量', label: '库存数量',
@ -281,6 +273,16 @@ export const SparePartsOutLocationDetail = useCrudSchemas(
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false
}, },
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: false,
isForm: false,
dictType: DICT_TYPE.EAM_OUT_STATUS,
dictClass: 'string'
},
{ {
label: '备注', label: '备注',
field: 'remark', 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) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainAdjust(null),// // 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) // handleClose(row.id)
// } // }
else if (val == 'delete') { else if (val == 'mainTurnDown') {
//
handleOut(row.id)
} else if (val == 'delete') {
// //
handleDelete(row.id) 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 formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {

35
src/views/login/forgetPassword.vue

@ -1,6 +1,13 @@
<template> <template>
<div v-loading="loading" class="box"> <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> <div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle"> <el-row type="flex" justify="center" align="middle">
<el-col> <el-col>
@ -16,12 +23,17 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="dialog-footer"> <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>
</div> </div>
</template> </template>
<script lang="ts" setup name="forgetPassword"> <script lang="ts" setup name="forgetPassword">
import type { RouteLocationNormalizedLoaded } from 'vue-router' import router from '@/router'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
import { setTenantId, setToken } from '@/utils/auth' import { setTenantId, setToken } from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
@ -37,22 +49,29 @@
const iconCellphone = useIcon({ icon: 'ep:cellphone' }) const iconCellphone = useIcon({ icon: 'ep:cellphone' })
const iconCircleCheck = useIcon({ icon: 'ep:circle-check' }) const iconCircleCheck = useIcon({ icon: 'ep:circle-check' })
const rules = { const rules = {
username: [required], username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
email: [required] email: [{ required: true, message: '请输入邮箱', trigger: 'blur' }]
} }
const loginData = reactive({ const loginData = reactive({
username: '', username: '',
email: '', email: ''
}) })
const loading = ref(false); const loading = ref(false)
const submitForm = async () => { const submitForm = async () => {
try { try {
if (!formSmsLogin.value) return
await formSmsLogin.value.validate(async (valid, fields) => {
if (valid) {
const data = loginData as unknown as UserApi.UserVO const data = loginData as unknown as UserApi.UserVO
await UserApi.forgetPassword(data) await UserApi.forgetPassword(data)
message.success(t('common.emailSentSuccess')) message.success(t('common.emailSentSuccess'))
// //
router.go(-1) router.go(-1)
} else {
console.log('error submit!', fields)
}
})
} finally { } finally {
// formLoading.value = false // formLoading.value = false
} }

Loading…
Cancel
Save