|
@@ -1,14 +1,14 @@
|
|
|
<script setup lang="ts">
|
|
|
import {
|
|
|
- exportFile,
|
|
|
- readvaildation,
|
|
|
- Storehouse_ProductClass_List,
|
|
|
- updatevaildation,
|
|
|
- uploadFile,
|
|
|
- validation_add,
|
|
|
- validation_del,
|
|
|
- validation_List,
|
|
|
- validation_update
|
|
|
+ exportFile,
|
|
|
+ readValidation,
|
|
|
+ validationTool_class_list,
|
|
|
+ updateValidation,
|
|
|
+ uploadFile,
|
|
|
+ validation_add,
|
|
|
+ validation_del,
|
|
|
+ validation_List,
|
|
|
+ validation_update
|
|
|
} from '@/api/storehouse'
|
|
|
import TableBase from '@/components/TableBase/index.vue'
|
|
|
import { computed, onMounted, reactive, ref } from 'vue'
|
|
@@ -77,8 +77,8 @@ const deleteFun = (row: any) => {
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
|
.catch(() => {})
|
|
|
}
|
|
|
-//导出文件execl
|
|
|
-const exportExecl = async () => {
|
|
|
+//导出文件excel
|
|
|
+const exportExcel = async () => {
|
|
|
try {
|
|
|
const response: any = await exportFile({
|
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
@@ -115,7 +115,7 @@ const inStorageForm = reactive({
|
|
|
T_sn: '',
|
|
|
Validationnumber: '',
|
|
|
T_remark: '',
|
|
|
- T_class: ''
|
|
|
+ T_class: null
|
|
|
})
|
|
|
|
|
|
interface InStorageItem {
|
|
@@ -124,15 +124,15 @@ interface InStorageItem {
|
|
|
T_remark: string
|
|
|
}
|
|
|
|
|
|
-// 获取产品分类
|
|
|
+// 获取设备类型
|
|
|
const Pruductoptions = ref<any[]>([
|
|
|
{
|
|
|
Id: '',
|
|
|
T_name: ''
|
|
|
}
|
|
|
])
|
|
|
-const getProductClassList = async () => {
|
|
|
- const res: any = await Storehouse_ProductClass_List({ page: 1, page_z: 999 })
|
|
|
+const getValidationToolClassList = async () => {
|
|
|
+ const res: any = await validationTool_class_list({ page: 1, page_z: 999 })
|
|
|
Pruductoptions.value = res.Data.Data
|
|
|
}
|
|
|
|
|
@@ -148,7 +148,7 @@ const paginatedPendingItems = computed(() => {
|
|
|
const rules = reactive({
|
|
|
T_sn: [{ required: true, message: '请输入SN', trigger: 'blur' }],
|
|
|
Validationnumber: [{ required: true, message: '请输入设备编号', trigger: 'blur' }],
|
|
|
- T_class: [{ required: true, message: '请选择产品分类', trigger: 'blur' }]
|
|
|
+ T_class: [{ required: true, message: '请选择设备类型', trigger: 'blur' }]
|
|
|
})
|
|
|
const rulesrepaid = reactive({
|
|
|
T_sn: [{ required: true, message: '请输入SN', trigger: 'blur' }]
|
|
@@ -169,7 +169,7 @@ const submitInStorageForm = () => {
|
|
|
ElMessage.warning('已存在相同的SN,不能添加')
|
|
|
return
|
|
|
}
|
|
|
- const result: any = await readvaildation({ sn: extractedSN })
|
|
|
+ const result: any = await readValidation({ sn: extractedSN })
|
|
|
if ((result.Code==200)&&(result.Data.T_state == 2)) {
|
|
|
//1-已出库 2-待使用 3-待维修
|
|
|
ElMessage.warning('当前SN已入库不能重复入库')
|
|
@@ -198,7 +198,7 @@ const submitRepaidForm = () => {
|
|
|
ElMessage.warning('已存在相同的SN,不能添加')
|
|
|
return
|
|
|
}
|
|
|
- const result: any = await readvaildation({ sn: extractedSN })
|
|
|
+ const result: any = await readValidation({ sn: extractedSN })
|
|
|
if (result.Code !== 200) {
|
|
|
ElMessage.warning('当前SN未入库不能归还')
|
|
|
return
|
|
@@ -298,7 +298,7 @@ const submitLendForm = () => {
|
|
|
ElMessage.warning('已存在相同的SN,不能添加')
|
|
|
return
|
|
|
}
|
|
|
- const result: any = await readvaildation({ sn: extractedSN })
|
|
|
+ const result: any = await readValidation({ sn: extractedSN })
|
|
|
if (result.Code !== 200) {
|
|
|
ElMessage.warning('当前SN未入库不能借出')
|
|
|
return
|
|
@@ -374,7 +374,7 @@ const Repaid = () => {
|
|
|
|
|
|
const previewEdit = async (row: any) => {
|
|
|
showEditForm.value = true
|
|
|
- const result: any = await readvaildation({ sn: row.T_sn })
|
|
|
+ const result: any = await readValidation({ sn: row.T_sn })
|
|
|
if (result.Code === 200) {
|
|
|
Object.assign(editForm, result.Data)
|
|
|
} else {
|
|
@@ -385,7 +385,7 @@ const previewEdit = async (row: any) => {
|
|
|
const submitEditForm = () => {
|
|
|
editFormRef.value?.validate(async (valid: boolean): Promise<void> => {
|
|
|
if (valid) {
|
|
|
- const result: any = await updatevaildation(editForm)
|
|
|
+ const result: any = await updateValidation(editForm)
|
|
|
if (result.Code === 200) {
|
|
|
ElMessage.success('编辑成功')
|
|
|
showEditForm.value = false
|
|
@@ -438,7 +438,7 @@ const submitUpload = async () => {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- getProductClassList()
|
|
|
+ getValidationToolClassList()
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
@@ -482,8 +482,8 @@ onMounted(() => {
|
|
|
/>
|
|
|
</el-col>
|
|
|
<el-col :xl="3" :lg="3" :md="3">
|
|
|
- <span class="inline-flex items-center">产品分类:</span>
|
|
|
- <el-select v-model="initParam.T_class" class="w-50 m-2" clearable placeholder="请选择分类~">
|
|
|
+ <span class="inline-flex items-center">设备类型:</span>
|
|
|
+ <el-select v-model="initParam.T_class" class="w-50 m-2" clearable placeholder="请选择设备类型~">
|
|
|
<el-option v-for="item in Pruductoptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
|
|
|
</el-select>
|
|
|
</el-col>
|
|
@@ -537,7 +537,7 @@ onMounted(() => {
|
|
|
<el-button type="primary" @click="showLendForm = true">借出</el-button>
|
|
|
<el-button type="primary" @click="showrRepaidForm = true">归还</el-button>
|
|
|
<el-button type="success" @click="ImportEdit = true">模板导入</el-button>
|
|
|
- <el-button type="success" @click="exportExecl">导出</el-button>
|
|
|
+ <el-button type="success" @click="exportExcel">导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -565,8 +565,8 @@ onMounted(() => {
|
|
|
<el-form-item label="设备编号" prop="Validationnumber">
|
|
|
<el-input v-model="inStorageForm.Validationnumber" placeholder="请输入设备编号"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="产品分类" prop="T_class">
|
|
|
- <el-select v-model="inStorageForm.T_class" class="w-50 m-2" clearable placeholder="请选择分类~">
|
|
|
+ <el-form-item label="设备类型" prop="T_class">
|
|
|
+ <el-select v-model="inStorageForm.T_class" class="w-50 m-2" clearable placeholder="请选择设备类型~">
|
|
|
<el-option v-for="item in Pruductoptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -583,7 +583,7 @@ onMounted(() => {
|
|
|
<!-- 添加序号列 -->
|
|
|
<el-table-column prop="T_sn" label="SN" width="300"></el-table-column>
|
|
|
<el-table-column prop="Validationnumber" label="设备编号"></el-table-column>
|
|
|
- <el-table-column prop="T_class" label="产品分类"></el-table-column>
|
|
|
+ <el-table-column prop="T_class" label="设备类型"></el-table-column>
|
|
|
<el-table-column prop="T_remark" label="备注"></el-table-column>
|
|
|
<el-table-column label="操作" width="180">
|
|
|
<template #default="scope">
|
|
@@ -603,7 +603,7 @@ onMounted(() => {
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="showInStorageForm = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="submitInStorageForm">添加到暂存11</el-button>
|
|
|
+ <el-button type="primary" @click="submitInStorageForm">添加到暂存</el-button>
|
|
|
<!-- 新增提交按钮 -->
|
|
|
<el-button type="primary" @click="submitInStoragePendingItems">提交</el-button>
|
|
|
</span>
|
|
@@ -675,7 +675,7 @@ onMounted(() => {
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="设备类型">
|
|
|
- <el-select v-model="editForm.T_class" class="w-50 m-2" clearable placeholder="请选择分类~">
|
|
|
+ <el-select v-model="editForm.T_class" class="w-50 m-2" clearable placeholder="请选择设备类型~">
|
|
|
<el-option v-for="item in Pruductoptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|