物料变更规格型号

This commit is contained in:
chenjianan
2019-04-18 12:03:17 +08:00
parent 47a2ea0071
commit 8dd0013928
2 changed files with 27 additions and 9 deletions

View File

@@ -600,9 +600,17 @@
</el-dialog>
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
<el-row style="margin-bottom: 10px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec0" placeholder="物料规格" size="small" clearable/>
</el-row>
<el-row style="margin-bottom: 10px">
<span>物料型号:</span>
<el-input v-model="materialModel0" placeholder="物料型号" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
</el-row>
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
<el-table-column align="center" label="物料名称" min-width="150">
<template slot-scope="scope">
@@ -758,6 +766,8 @@ export default {
allNum: [], // 总数量
dialogVisible3: false,
materialName0: '',
materialSpec0: '',
materialModel0: '',
tableData02: [],
total02: 0,
pageCurrent02: 1,
@@ -1319,10 +1329,18 @@ export default {
console.log(row)
},
searchMaterial() {
searchAllMaterial(this.materialName0, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.result
this.total02 = parseInt(response.data.output[0].ItemCount)
})
if (this.materialName0 || this.materialSpec0 || this.materialModel0) {
let check1, check2, check3
this.materialName0 ? check1 = 1 : check1 = 0
this.materialSpec0 ? check2 = 1 : check2 = 0
this.materialModel0 ? check3 = 1 : check3 = 0
searchAllMaterial(check1, this.materialName0, check2, this.materialSpec0, check3, this.materialModel0, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.result
this.total02 = parseInt(response.data.output[0].ItemCount)
})
} else {
this.$message.warning('请至少输入一种搜索条件')
}
},
handleSizeChange02(val) {
this.pageSize02 = val