代码更新

This commit is contained in:
2022-12-03 14:30:13 +08:00
parent 2329278856
commit 54ece59f39
2 changed files with 13 additions and 3 deletions

View File

@@ -274,7 +274,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<AddDtl :dialog-show.sync="dtlShow" @tableChanged="tableChanged"/> <AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged"/>
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/> <StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/>
</el-dialog> </el-dialog>
</template> </template>
@@ -323,6 +323,7 @@ export default {
nowindex: '', nowindex: '',
storlist: [], storlist: [],
invtypelist: [], invtypelist: [],
storId: null,
rules: { rules: {
stor_id: [ stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' } { required: true, message: '仓库不能为空', trigger: 'blur' }
@@ -345,7 +346,6 @@ export default {
}, },
methods: { methods: {
open() { open() {
debugger
crudUserStor.getUserStor().then(res => { crudUserStor.getUserStor().then(res => {
this.storlist = res this.storlist = res
}) })
@@ -455,6 +455,10 @@ export default {
} }
}, },
async queryDtl() { async queryDtl() {
if (!this.form.stor_id) {
return this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
}
this.storId = this.form.stor_id
this.dtlShow = true this.dtlShow = true
}, },
async queryStruct(index, row) { async queryStruct(index, row) {

View File

@@ -125,6 +125,9 @@ export default {
}, },
openParam: { openParam: {
type: String type: String
},
storId: {
type: String
} }
}, },
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_usable'], dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_usable'],
@@ -149,8 +152,11 @@ export default {
} }
}, },
methods: { methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.stor_id = this.storId
},
open() { open() {
crudUserStor.getSect({ 'stor_id': '' }).then(res => { crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content this.sects = res.content
}) })
this.crud.toQuery() this.crud.toQuery()