|
@@ -967,15 +967,19 @@ export default {
|
|
|
approval(){
|
|
|
this.$refs['detailform'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let formData = new window.FormData();
|
|
|
- formData.append('tProject', JSON.stringify(this.detailform))
|
|
|
- formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
|
|
|
- addproject(formData).then(res => {
|
|
|
- this.$message.success("操作成功")
|
|
|
- this.doNot = true
|
|
|
- this.getList()
|
|
|
- this.mainTabel = false
|
|
|
- })
|
|
|
+ if(this.detailList.length != 0){
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append('tProject', JSON.stringify(this.detailform))
|
|
|
+ formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
|
|
|
+ addproject(formData).then(res => {
|
|
|
+ this.$message.success("操作成功")
|
|
|
+ this.doNot = true
|
|
|
+ this.getList()
|
|
|
+ this.mainTabel = false
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$message.error("请维护明细")
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|