|
@@ -46,10 +46,16 @@ export default {
|
|
|
type: [String, Number],
|
|
|
default: ''
|
|
|
},
|
|
|
- shelfPlaceSn: {
|
|
|
- type: [String, Number],
|
|
|
- default: ''
|
|
|
+ nowData: {
|
|
|
+ type: Object,
|
|
|
+ default: function () {
|
|
|
+ return {}
|
|
|
+ }
|
|
|
}
|
|
|
+ // shelfPlaceSn: {
|
|
|
+ // type: [String, Number],
|
|
|
+ // default: ''
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
data () {
|
|
@@ -79,7 +85,7 @@ export default {
|
|
|
// 查询货位详情
|
|
|
getShelfHWDetail () {
|
|
|
this.spinning = true
|
|
|
- shelfHWDetail({ shelfPlaceSn: this.shelfPlaceSn }).then(res => {
|
|
|
+ shelfHWDetail({ shelfPlaceSn: this.nowData.shelfPlaceSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.form = Object.assign({}, res.data)
|
|
|
}
|
|
@@ -121,23 +127,32 @@ export default {
|
|
|
},
|
|
|
isshow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
+ console.log(!newValue, newValue)
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.form = {}
|
|
|
this.textTitle = '新增货位'
|
|
|
this.$emit('close')
|
|
|
- }
|
|
|
- },
|
|
|
- shelfPlaceSn: {
|
|
|
- handler (newValue, oldValue) {
|
|
|
- if (this.isshow && newValue) {
|
|
|
- if (this.shelfPlaceSn) { // 编辑
|
|
|
- this.textTitle = '编辑货位'
|
|
|
- this.getShelfHWDetail()
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ if (this.nowData && this.nowData.id) { // 编辑
|
|
|
+ console.log(this.shelfPlaceSn, 'this.shelfPlaceSn')
|
|
|
+ this.textTitle = '编辑货位'
|
|
|
+ this.getShelfHWDetail()
|
|
|
}
|
|
|
- },
|
|
|
- deep: true
|
|
|
+ }
|
|
|
}
|
|
|
+ // nowData: {
|
|
|
+ // handler (newValue, oldValue) {
|
|
|
+ // if (this.isshow && newValue) {
|
|
|
+ // console.log(this.isshow, newValue, 'newValue')
|
|
|
+ // if (this.nowData.id) { // 编辑
|
|
|
+ // console.log(this.shelfPlaceSn, 'this.shelfPlaceSn')
|
|
|
+ // this.textTitle = '编辑货位'
|
|
|
+ // // this.getShelfHWDetail()
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // deep: true
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|