<template>
|
<div>
|
<!-- 弹出框1 -->
|
<vol-box
|
:lazy="true"
|
:model.sync="model.box1"
|
title="修改货位状态"
|
:height="300"
|
:width="400"
|
:padding="15"
|
>
|
<el-form
|
:inline="true"
|
:model="contractdataForm"
|
:rules="rules"
|
ref="contractdataForm"
|
label-position="right"
|
label-width="140px"
|
>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="货位状态:" prop="location_state" size="small ">
|
<el-input
|
size="small "
|
placeholder="请输入货位状态"
|
v-model="contractdataForm.location_state"
|
clearable
|
label-width="150px"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer">
|
<Button type="info" @click="saveCase('contractdataForm')">提交</Button>
|
<Button type="info" @click="resetForm('contractdataForm')">重置</Button>
|
</div>
|
</vol-box>
|
</div>
|
</template>
|
|
<script>
|
import VolBox from "@/components/basic/VolBox.vue";
|
import { valid } from "semver";
|
export default {
|
components: { "vol-box": VolBox },
|
data() {
|
return {
|
model: {
|
box1: false,
|
},
|
contractdataForm: {
|
id: "",
|
location_state: "",
|
},
|
rules: {
|
location_state: [{ required: true, message: "请输入货位状态", trigger: "change" }],
|
},
|
};
|
},
|
methods: {
|
open3(id) {
|
this.model.box1 = true;
|
this.contractdataForm.id = id;
|
},
|
saveCase(contractdataForm) {
|
this.$refs[contractdataForm].validate((valid) => {
|
if (valid) {
|
this.http
|
.post("/api/WCS/UpdateStove", this.contractdataForm, "")
|
.then((x) => {
|
if (x.result == 1) {
|
this.model.box1 = false;
|
this.$refs[contractdataForm].resetFields();
|
this.$emit("parentCall", ($vue) => {
|
$vue.refresh();
|
});
|
return this.$success("修改货位状态成功!");
|
} else {
|
return this.$error(x.error_info);
|
}
|
});
|
} else {
|
console.log("error submit!!");
|
return false;
|
}
|
});
|
},
|
resetForm(contractdataForm) {
|
this.$refs[contractdataForm].resetFields();
|
},
|
},
|
};
|
</script>
|
|
<style >
|
</style>
|