|
|
|
@ -3,8 +3,13 @@
|
|
|
|
|
|
|
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
|
|
|
|
<el-form-item label="作物名" prop="cropId"> |
|
|
|
|
<!-- <el-form-item label="作物名" prop="cropId"> |
|
|
|
|
<el-input v-model="queryParams.cropId" placeholder="请输入物料id" clearable @keyup.enter.native="handleQuery"/> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item label="作物名" prop="cropId"> |
|
|
|
|
<el-select v-model="queryParams.cropId" placeholder="请选择" clearable size="small"> |
|
|
|
|
<el-option v-for="item in cropList" :label="item.name" :value="item.id" :key="item.id" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="操作类型" prop="type"> |
|
|
|
|
<el-select v-model="queryParams.type" placeholder="请选择出入库" clearable size="small"> |
|
|
|
@ -75,8 +80,8 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="操作类型" prop="type"> |
|
|
|
|
<el-radio-group v-model="form.type"> |
|
|
|
|
<el-radio label="false">出库</el-radio> |
|
|
|
|
<el-radio label="true">入库</el-radio> |
|
|
|
|
<el-radio :label="false">出库</el-radio> |
|
|
|
|
<el-radio :label="true">入库</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="操作数量" prop="stock"> |
|
|
|
@ -184,7 +189,7 @@ export default {
|
|
|
|
|
this.form = { |
|
|
|
|
id: undefined, |
|
|
|
|
cropId: undefined, |
|
|
|
|
type: undefined, |
|
|
|
|
type: false, |
|
|
|
|
stock: undefined, |
|
|
|
|
afterStock: undefined, |
|
|
|
|
}; |
|
|
|
@ -204,7 +209,6 @@ export default {
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
|
handleAdd() { |
|
|
|
|
this.reset(); |
|
|
|
|
this.form.type = "true"; |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "添加"; |
|
|
|
|
}, |
|
|
|
@ -214,8 +218,6 @@ export default {
|
|
|
|
|
const id = row.id; |
|
|
|
|
getCropRecord(id).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
|
console.log("111111111111", this.form.type); |
|
|
|
|
console.log("111111111111", response.data.type); |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "修改"; |
|
|
|
|
}); |
|
|
|
@ -226,9 +228,6 @@ export default {
|
|
|
|
|
if (!valid) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log("11111", this.form.type); |
|
|
|
|
|
|
|
|
|
// 修改的提交 |
|
|
|
|
if (this.form.id != null) { |
|
|
|
|
updateCropRecord(this.form).then(response => { |
|
|
|
|