|
@@ -197,6 +197,17 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ resetData(){
|
|
|
+ this.form.productSn = undefined
|
|
|
+ this.form.productCode = undefined
|
|
|
+ this.form.price = ''
|
|
|
+ this.form.cost = ''
|
|
|
+ this.form.maxQty = ''
|
|
|
+ if (this.$refs.productJqList) {
|
|
|
+ this.$refs.productJqList.resetForm()
|
|
|
+ }
|
|
|
+ this.$refs.ruleForm.resetFields(['productSn'])
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -208,10 +219,7 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
- if (this.$refs.productJqList) {
|
|
|
- this.$refs.productJqList.resetForm()
|
|
|
- }
|
|
|
+ this.resetData()
|
|
|
this.productName = ''
|
|
|
this.productInfo = null
|
|
|
} else {
|