Commit d64777a7 authored by kzy's avatar kzy

修改了“查看盘点”这个按钮的位置,取消了查看盘点的二次确认框

parent 0b4f8305
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> <el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
<el-form-item> <el-form-item>
<el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button> <el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button>
...@@ -48,6 +46,10 @@ ...@@ -48,6 +46,10 @@
<el-form-item> <el-form-item>
<el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button> <el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -430,23 +432,20 @@ export default { ...@@ -430,23 +432,20 @@ export default {
// }); // });
}, },
methods: { methods: {
checkInventory() { checkInventory() {
this.$confirm('确认查询盘点吗?') this.table = true;
.then(_ => { checkInventory(1)
this.table = true .then(response => {
checkInventory(1) // 处理返回的数据
.then(response => { this.tableList = response.data;
// 处理返回的数据 console.log(response);
this.tableList = response.data })
console.log(response); .catch(error => {
}) // 处理请求错误
.catch(error => { console.error(error);
// 处理请求错误 });
console.error(error); },
});
done();
}).catch(_ => {});
},
// TODO: 获取所选行详情信息操作 // TODO: 获取所选行详情信息操作
handleDetail(row) { handleDetail(row) {
this.singleDetails = this.formReset this.singleDetails = this.formReset
......
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> <el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
<el-form-item> <el-form-item>
<el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button> <el-button style="padding: 8px 7px;" :type="typePrimary" :size="smallSize" :icon="addIcon" @click="checkType">开始盘点 {{ check }} </el-button>
...@@ -49,6 +47,10 @@ ...@@ -49,6 +47,10 @@
<el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button> <el-button style="padding: 8px 7px;" type="danger" :size="smallSize" @click="deleteByType" icon="el-icon-minus">结束盘点 {{ check }}</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button style="padding: 8px 7px;" :type="'warning'" :size="smallSize" icon="el-icon-view" @click="checkInventory">查看盘点 </el-button>
</el-form-item>
</div> </div>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
...@@ -431,22 +433,18 @@ export default { ...@@ -431,22 +433,18 @@ export default {
}, },
methods: { methods: {
checkInventory() { checkInventory() {
this.$confirm('确认查询盘点吗?') this.table = true;
.then(_ => { checkInventory(2)
this.table = true .then(response => {
checkInventory(2) // 处理返回的数据
.then(response => { this.tableList = response.data;
// 处理返回的数据 console.log(response);
this.tableList = response.data })
console.log(response); .catch(error => {
}) // 处理请求错误
.catch(error => { console.error(error);
// 处理请求错误 });
console.error(error); },
});
done();
}).catch(_ => {});
},
// TODO: 获取所选行详情信息操作 // TODO: 获取所选行详情信息操作
handleDetail(row) { handleDetail(row) {
this.singleDetails = this.formReset this.singleDetails = this.formReset
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment