|
|
|
@ -10,8 +10,8 @@ |
|
|
|
<template #materialGoods="{ row }">{{ row.materialGoods.goodsCode }}</template> |
|
|
|
<template #materialGoods="{ row }">{{ row.materialGoods.goodsCode }}</template> |
|
|
|
<template #menu-left> |
|
|
|
<template #menu-left> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<el-input v-model="goodsCode"></el-input> |
|
|
|
<el-input v-model="goodsCode" placeholder="请输入物料编码"></el-input> |
|
|
|
<el-button type="primary" style="margin-left: 10px;">新增</el-button> |
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="handleAdd">新增</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
@ -491,6 +491,18 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
handleAdd(){ |
|
|
|
|
|
|
|
if(this.goodsCode == ''){ |
|
|
|
|
|
|
|
this.$message.error('请填写物料编码') |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
addGoods(this.goodsCode).then(res =>{ |
|
|
|
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
|
|
|
this.$message.success('添加成功') |
|
|
|
|
|
|
|
this.onLoad() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
searchChange(params, done){ |
|
|
|
searchChange(params, done){ |
|
|
|
this.query = params; |
|
|
|
this.query = params; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.page.currentPage = 1; |
|
|
|
@ -502,7 +514,6 @@ export default { |
|
|
|
this.onLoad() |
|
|
|
this.onLoad() |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeOpen(done, type){ |
|
|
|
beforeOpen(done, type){ |
|
|
|
console.log('form-----------------',this.form) |
|
|
|
|
|
|
|
if(type == 'edit'){ |
|
|
|
if(type == 'edit'){ |
|
|
|
this.form.minWarning = this.form.minWarning != '' ? this.form.minWarning : false |
|
|
|
this.form.minWarning = this.form.minWarning != '' ? this.form.minWarning : false |
|
|
|
this.form.reissueType = (this.form.reissueType && this.form.reissueType != -1) ? this.form.reissueType : 0 |
|
|
|
this.form.reissueType = (this.form.reissueType && this.form.reissueType != -1) ? this.form.reissueType : 0 |
|
|
|
|