|
|
@@ -1424,7 +1424,6 @@ export default {
|
|
|
|
|
|
// 保存信息
|
|
|
saveEntity () {
|
|
|
- this.goodsloading = true
|
|
|
let valid1 = false
|
|
|
let valid2 = false
|
|
|
this.$refs['GoodsInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
@@ -1500,7 +1499,6 @@ export default {
|
|
|
api
|
|
|
.addEntity(this.formData, this.$axios)
|
|
|
.then(res => {
|
|
|
- this.goodsloading = false
|
|
|
if (res.data.code === 0) {
|
|
|
// 保存成功后,初始化数据,变成修改
|
|
|
this.formData.Id = res.data.item.split('_')[0]
|
|
|
@@ -1518,12 +1516,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- this.goodsloading = false
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
updateEntity () {
|
|
|
+ this.goodsloading = true
|
|
|
api
|
|
|
.updateEntity(this.formData.Id, this.formData, this.$axios)
|
|
|
.then(res => {
|
|
|
@@ -1537,6 +1535,7 @@ export default {
|
|
|
})
|
|
|
this.updatemanufacturers()
|
|
|
} else {
|
|
|
+ this.goodsloading = false
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|