Commit c3e65853 authored by W_Y's avatar W_Y

盘点

parent b304d1ad
...@@ -124,11 +124,11 @@ export default { ...@@ -124,11 +124,11 @@ export default {
return { return {
// 状态下拉框 // 状态下拉框
options: [{ options: [{
value: 0,
label: '未盘点'
}, {
value: 1, value: 1,
label: '已盘点' label: '已盘点'
},{
value: 0,
label: '未盘点'
}, },
], ],
// TODO: 表单里的单项详情参数 // TODO: 表单里的单项详情参数
...@@ -192,22 +192,31 @@ export default { ...@@ -192,22 +192,31 @@ export default {
methods: { methods: {
// TODO: 获取所选行详情信息操作 // TODO: 获取所选行详情信息操作
handleDetail(row) { handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row this.singleDetails = row
this.title = '详情信息' this.title = '详情信息'
this.openDetails = !this.openDetails this.openDetails = !this.openDetails
}, },
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true // 去除字段默认为0导致0对应的未盘点无法使用问题
listdevice(this.queryParams).then( let flag = 0;
response => { this.loading = true;
console.log('list',response) if (this.queryParams.status === undefined || this.queryParams.status === '') {
this.equipmentList = response.rows flag = 1;
this.total = response.total }
this.loading = false if (flag === 1) {
} this.queryParams.status = -1
) }
listdevice(this.queryParams).then(response => {
console.log('list',response)
this.equipmentList = response.rows
this.total = response.total
this.loading = false
})
if (flag == 1) {
this.queryParams.status = undefined
flag = 0;
}
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
......
...@@ -192,22 +192,31 @@ export default { ...@@ -192,22 +192,31 @@ export default {
methods: { methods: {
// TODO: 获取所选行详情信息操作 // TODO: 获取所选行详情信息操作
handleDetail(row) { handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row this.singleDetails = row
this.title = '详情信息' this.title = '详情信息'
this.openDetails = !this.openDetails this.openDetails = !this.openDetails
}, },
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true // 去除字段默认为0导致0对应的未盘点无法使用问题
listdevice(this.queryParams).then( let flag = 0;
response => { this.loading = true;
if (this.queryParams.status === undefined || this.queryParams.status === '') {
flag = 1;
}
if (flag === 1) {
this.queryParams.status = -1
}
listdevice(this.queryParams).then(response => {
console.log('list',response) console.log('list',response)
this.equipmentList = response.rows this.equipmentList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
} })
) if (flag == 1) {
this.queryParams.status = undefined
flag = 0;
}
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
......
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