This commit is contained in:
xd 2024-03-24 13:39:24 +08:00
parent 69be61090d
commit e90bde476a
1 changed files with 1 additions and 119 deletions

View File

@ -174,51 +174,6 @@
</el-card>
</el-col>
</el-row>
<!-- 添加或修改材料管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="库位" prop="materialBh">
<el-input v-model="form.materialBh" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指令号" prop="materialZlh">
<el-input v-model="form.materialZlh"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="型号" prop="materialXingh">
<el-input v-model="form.materialXingh" placeholder="请输入型号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规格" prop="materialGuig">
<el-input v-model="form.materialGuig" placeholder="请输入规格"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="电压等级" prop="materialDiany">
<el-input v-model="form.materialDiany" placeholder="请输入电压等级" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="米数" prop="materialMs">
<el-input v-model="form.materialMs" placeholder="请输入米数" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</el-tab-pane>
<el-tab-pane label="已选库位" name="locationSelected">
<el-row :gutter="10" style="letter-spacing: 5px;">
@ -473,10 +428,6 @@
materialMs: null
},
//
title: "",
//
open: false,
//
materialDetailA:[],
materialDetailB:[],
@ -494,25 +445,7 @@
materialBhProp: "",
//
form: {},
//
rules: {
materialZlh: [
{ required: true, message: "指令号不能为空", trigger: "blur" }
],
materialXingh: [
{ required: true, message: "型号不能为空", trigger: "blur" }
],
materialGuig: [
{ required: true, message: "规格不能为空", trigger: "blur" }
],
materialDiany: [
{ required: true, message: "电压等级不能为空", trigger: "blur" }
],
materialMs: [
{ required: true, message: "米数不能为空", trigger: "blur" }
],
}
form: {}
}
},
created() {
@ -567,57 +500,6 @@
});
},
/** 打开录入弹窗 */
openDialog(item) {
//
this.form.materialBh = item.materialBh;
checkStorageLocation(this.form).then(response => {
this.reset();
this.open = true;
this.title = "录入信息";
this.form.materialBh = item.materialBh;
}).catch((error) => {
console.error(error);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
addStorageLocation(this.form).then(response => {
this.$modal.msgSuccess("录入成功");
this.open = false;
this.getStorageLocation();
});
}
});
},
//
cancel() {
cancelStorageLocation(this.form).then(response => {
this.open = false;
this.reset();
}).catch((error) => {
console.error(error);
});
},
//
reset() {
this.form = {
materialBh: null,
materialZlh: null,
materialXingh: null,
materialGuig: null,
materialDiany: null,
materialMs: null
};
this.resetForm("form");
},
/*===============================================领用操作==========================================*/
// Tag
handleClick(tab, event) {