1.修复设备维保bug

prod
x_z 2 years ago
parent 1816cb6fd5
commit 3bcdda00b6

@ -136,7 +136,7 @@
</template>
</el-table-column>
<el-table-column label="批准文号" prop="zczbhhzbapzbh" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="生产厂家" prop="manfactory" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="计量单位" prop="measname" width="100"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="负责人" prop="managerName" show-overflow-tooltip width="200"></el-table-column>

@ -71,6 +71,7 @@
<el-table-column label="部门" prop="deptName"></el-table-column>
<el-table-column label="仓库" prop="invName"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="资产编码" prop="code"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="单据日期" prop="createTime"></el-table-column>

@ -71,6 +71,7 @@
<el-table-column label="部门" prop="deptName"></el-table-column>
<el-table-column label="仓库" prop="invName"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="资产编码" prop="code"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="单据日期" prop="createTime"></el-table-column>

@ -22,6 +22,7 @@
<el-select v-model="inspectPlan.deptCode"
placeholder="请选择部门"
clearable="true"
:disabled="inspectPlan.id !== null"
@change="deptChange"
style="width: 90%"
>
@ -39,6 +40,7 @@
<el-col :span="10">
<el-form-item class="query-form-item" label="仓库:">
<el-select v-model="inspectPlan.invCode"
:disabled="inspectPlan.id !== null"
placeholder="请选择仓库"
clearable="true"
style="width: 90%"

@ -72,6 +72,7 @@
<el-table-column label="部门" prop="deptName"></el-table-column>
<el-table-column label="仓库" prop="invName"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="资产编码" prop="code"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="单据日期" prop="createTime"></el-table-column>

@ -1,6 +1,6 @@
<template>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="formData" ref="dataForm" label-width="100px" style="margin-bottom: -15px">
<el-form :model="formData" ref="dataForm" :rules="rules" label-width="100px" style="margin-bottom: -15px">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
type="primary"
@ -11,7 +11,7 @@
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="部门:">
<el-form-item class="query-form-item" prop="deptCode" label="部门:">
<el-select v-model="formData.deptCode"
placeholder="请选择部门"
clearable="true"
@ -30,7 +30,7 @@
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="仓库:">
<el-form-item class="query-form-item" prop="invCode" label="仓库:">
<el-select v-model="formData.invCode"
placeholder="请选择仓库"
clearable="true"
@ -50,12 +50,12 @@
<el-row>
<el-col :span="10">
<el-form-item label="原始编码:">
<el-form-item class="query-form-item" prop="originCode" label="原始编码:">
<el-input v-model="formData.originCode" placeholder="请输入编码" style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="物资编码:">
<el-form-item class="query-form-item" prop="code" label="物资编码:">
<el-input v-model="formData.code" placeholder="请输入编码" style="width: 90%" clearable disabled></el-input>
</el-form-item>
</el-col>
@ -63,13 +63,13 @@
<el-row>
<el-col :span="10">
<el-form-item label="设备名称:">
<el-form-item class="query-form-item" prop="deviceName" label="设备名称:">
<el-input v-model="formData.deviceName" placeholder="请输入设备名称" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="规格型号:">
<el-form-item class="query-form-item" prop="ggxh" label="规格型号:">
<el-input v-model="formData.ggxh" placeholder="请输入规格型号" style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
@ -186,12 +186,27 @@ export default {
return {
deptList: [],
invList: [],
userList: []
userList: [],
rules: {
deptCode: [
{required: true, message: '请选择部门', trigger: 'change'}
],
invCode: [
{required: true, message: '请选择仓库', trigger: 'change'}
],
deviceName: [
{required: true, message: '请输入设备名称', trigger: 'blur'}
],
originCode: [
{required: true, message: '请输入原始编码', trigger: 'blur'}
]
}
};
},
methods: {
deptChange() {
this.formData.invCode = null;
this.formData.manager = null;
this.invList = [];
this.getInvList();
this.getDeptUserList();
@ -217,7 +232,7 @@ export default {
this.userList = [];
let params = {deptId: null};
this.deptList.forEach((item) => {
if (item.code === this.formData.fromDeptCode) {
if (item.code === this.formData.deptCode) {
params.deptId = item.id;
}
});
@ -226,17 +241,24 @@ export default {
})
},
submit() {
let formName = isBlank(this.formData.id) ? "add" : "edit";
saveDeptDevice(this.formData, formName).then((res) => {
if (res.code === 20000) {
this.$message.success("添加成功");
this.closeDialog();
this.$refs['dataForm'].validate((valid) => {
debugger
if (!valid) {
this.$message.error("请完善必填信息");
} else {
this.$message.error(res.message);
let formName = isBlank(this.formData.id) ? "add" : "edit";
saveDeptDevice(this.formData, formName).then((res) => {
if (res.code === 20000) {
this.$message.success("添加成功");
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
}
}).catch((error) => {
this.$message.error(error.message);
});
})
},
},
created() {

Loading…
Cancel
Save