This commit is contained in:
liushuai
2020-03-15 16:01:54 +08:00
parent 7e162bd0ab
commit 27b9331a9f
3 changed files with 29 additions and 13 deletions

View File

@@ -150,7 +150,7 @@
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
<span>递交审核</span>
<el-tooltip :open-delay="1000" effect="dark" content="生成合同并提交审核" placement="top">
<el-button type="primary" plain size="small" @click="generateContract()">递交</el-button>
<el-button :disabled="openDeal" type="primary" plain size="small" @click="generateContract()">递交</el-button>
</el-tooltip>
<hr>
<!--html代码-->
@@ -180,6 +180,7 @@ export default {
return {
isShowN: false,
loading: false,
openDeal: true,
supplierValue11: '', // 供应商查询条件
supplier11: [],
quickChangePrice: true,
@@ -517,6 +518,7 @@ export default {
},
contractChange() { // 选择合同select
this.loading = true
this.openDeal = true
searchContractHeader(this.contractNumValue).then(response => {
this.deliveryDate = response.data[0].交货日期
this.invoiceInfo = response.data[0].开票信息
@@ -734,6 +736,7 @@ export default {
`
},
async editContract() { // 选择一个询价单,整成合同明细
this.openDeal = false
const date = new Date()
this.year = date.getFullYear()
this.month = date.getMonth() + 1
@@ -832,6 +835,7 @@ export default {
// this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
// this.$refs.tinymce.initTinymce()
setTimeout(() => {
this.submitTotal()
// this.$refs.tinymce.setContent(this.contentNew)
}, 1000)
} else {
@@ -880,6 +884,7 @@ export default {
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100, inquiryDetailNum_old, this.备注组).then(response => {
if (response.data[0].result === '1') {
this.$message.success('合同生成成功')
this.openDeal = true
this.reload()
} else {
this.$message.error('生成合同失败')