This commit is contained in:
liushuai
2020-04-07 19:13:53 +08:00
14 changed files with 148 additions and 60 deletions

View File

@@ -178,6 +178,7 @@ export default {
inject: ['reload'],
data() {
return {
generateContract_disabed: true,
isShowN: false,
loading: false,
openDeal: true,
@@ -856,6 +857,7 @@ export default {
// this.content = `自定义`
// },
generateContract() { // 生成采购合同
this.generateContract_disabed = true
for (let i = 0; i < this.tableData1.length; i++) {
if (this.tableData1[i].含税单价 === '') {
console.log(this.tableData1[i].含税单价, '含税单价')
@@ -863,6 +865,7 @@ export default {
}
}
if (this.count === this.tableData1.length) {
this.generateContract_disabed = false
this.$message.error('该合同未绑定物料信息')
} else {
this.content = this.contentNew.replace(/&nbsp;/g, '')
@@ -899,8 +902,10 @@ export default {
this.$message.success('合同生成成功')
this.openDeal = true
this.reload()
this.generateContract_disabed = false
} else {
this.$message.error('生成合同失败')
this.generateContract_disabed = false
}
})
}).catch(() => {
@@ -908,11 +913,14 @@ export default {
type: 'info',
message: '已取消操作'
})
this.generateContract_disabed = false
})
} else {
this.generateContract_disabed = false
this.$message.warning('请先选择模板进行预览')
}
} else {
this.generateContract_disabed = false
this.$message.warning('请先选择合同进行编辑')
}
}