fix:立库界面优化
This commit is contained in:
@@ -9,18 +9,24 @@
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="库区">
|
||||
<el-cascader
|
||||
v-model="query.sect"
|
||||
v-model="defaultList"
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
</el-form-item>
|
||||
<el-form-item label="货位">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
@@ -29,12 +35,11 @@
|
||||
placeholder="输入货位编码、名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/> </el-col>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="6">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -94,7 +99,11 @@ export default {
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
default: String
|
||||
},
|
||||
layerNum: {
|
||||
type: String,
|
||||
default: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -106,7 +115,8 @@ export default {
|
||||
checkrow: {},
|
||||
rows: [],
|
||||
dialogDis: true,
|
||||
lock: ''
|
||||
lock: '',
|
||||
defaultList: ['1582991156504039424', '1645705331612979200']
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -117,7 +127,6 @@ export default {
|
||||
},
|
||||
sectProp: {
|
||||
handler(newValue, oldValue) {
|
||||
debugger
|
||||
this.sect = newValue
|
||||
}
|
||||
}
|
||||
@@ -132,33 +141,21 @@ export default {
|
||||
this.lock = '1'
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.stor_id = this.storId
|
||||
this.crud.query.layer_num = this.layerNum
|
||||
this.query.lock_type = this.lock
|
||||
if (this.storId === this.defaultList[0]) {
|
||||
this.crud.query.sect_id = this.defaultList[1]
|
||||
}
|
||||
return true
|
||||
},
|
||||
open() {
|
||||
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
if (this.sect) {
|
||||
this.query.sect = this.sect
|
||||
if (this.sect.length === 1) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.stor_id = this.storId
|
||||
}
|
||||
if (this.sect.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (this.sect.length === 2) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.sect_id = this.sect[1]
|
||||
}
|
||||
}
|
||||
this.query.is_lock = '1'
|
||||
this.query.lock_type = this.lock
|
||||
this.query.is_used = '1'
|
||||
debugger
|
||||
this.query.stor_id = this.storId
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
@@ -182,6 +179,7 @@ export default {
|
||||
this.crud.query.stor_id = val[0]
|
||||
this.crud.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
|
||||
Reference in New Issue
Block a user