'123'
This commit is contained in:
parent
69be61090d
commit
e90bde476a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue