|
@@ -597,22 +597,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async save() {
|
|
|
- if(this.sonPageStu == 'add') {
|
|
|
- await this.handleData()
|
|
|
- await addDemand(this.basicForm).then(res => {
|
|
|
- console.log(333)
|
|
|
- if (res.code === 200) {
|
|
|
- this.$modal.msgSuccess("保存成功");
|
|
|
- this.back()
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.sonPageStu == 'edit') {
|
|
|
- editDemand(this.basicForm).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$modal.msgSuccess("编辑成功");
|
|
|
- this.back()
|
|
|
- }
|
|
|
- })
|
|
|
+ if(this.basicForm.puDemandItemList.length !== 0) {
|
|
|
+ if(this.sonPageStu == 'add') {
|
|
|
+ await this.handleData()
|
|
|
+ await addDemand(this.basicForm).then(res => {
|
|
|
+ console.log(333)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
+ this.back()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.sonPageStu == 'edit') {
|
|
|
+ editDemand(this.basicForm).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$modal.msgSuccess("编辑成功");
|
|
|
+ this.back()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$modal.msgWarning("明细信息不能为空!");
|
|
|
}
|
|
|
},
|
|
|
submit() {
|
|
@@ -725,7 +729,7 @@ export default {
|
|
|
updateBy: null,
|
|
|
updateByName: null,
|
|
|
updateTime: null,
|
|
|
- delFlag: null,
|
|
|
+ delFlag: 0,
|
|
|
// 新增字段
|
|
|
model: null,
|
|
|
storageCondition: null,
|