'修改bug'
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 19:00:08
|
||||
* @LastEditTime: 2022-03-10 19:38:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -47,7 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { shelfList, shelfDetail, shelfUpdate, shelfAdd, shelfCode } from '@/api/basicData/Cache/shelf'
|
||||
import { shelfDetail, shelfUpdate, shelfAdd, shelfCode } from '@/api/basicData/Cache/shelf'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -86,36 +86,60 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id, isPage) {
|
||||
this.isPage = isPage || false
|
||||
// init(id, isPage) {
|
||||
// this.isPage = isPage || false
|
||||
// this.dataForm.id = id || ''
|
||||
// if (!this.isPage) {
|
||||
// this.dataForm.areaId = this.areaId
|
||||
// }
|
||||
// this.areaArr.splice(0, this.areaArr.length)
|
||||
// const params = {
|
||||
// current: 1,
|
||||
// size: 500
|
||||
// }
|
||||
// shelfList(params).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.areaArr = response.data.records
|
||||
// }
|
||||
// })
|
||||
// this.visible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs['dataForm'].resetFields()
|
||||
// if (this.dataForm.id) {
|
||||
// shelfDetail(this.dataForm.id).then(res => {
|
||||
// this.dataForm = res.data
|
||||
// })
|
||||
// } else {
|
||||
// shelfCode().then(res => {
|
||||
// this.dataForm.code = res.data
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
if (!this.isPage) {
|
||||
this.dataForm.areaId = this.areaId
|
||||
}
|
||||
this.areaArr.splice(0, this.areaArr.length)
|
||||
const params = {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
shelfList(params).then(response => {
|
||||
if (response.data.records) {
|
||||
this.areaArr = response.data.records
|
||||
}
|
||||
})
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
// console.log(this.dataForm)
|
||||
shelfDetail(this.dataForm.id).then(res => {
|
||||
// console.log(res)
|
||||
this.dataForm = res.data
|
||||
})
|
||||
} else {
|
||||
this.dataForm.shelfName = ''
|
||||
shelfCode().then(res => {
|
||||
this.dataForm.code = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
// console.log(this.dataForm)
|
||||
},
|
||||
// getClose() {
|
||||
// this.dataForm.shelfName = ''
|
||||
// console.log(this.dataForm)
|
||||
// },
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
@@ -136,7 +160,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
shelfAdd(data).then(res => {
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
|
||||
Reference in New Issue
Block a user