fixed bug
This commit is contained in:
@@ -165,10 +165,10 @@
|
||||
<!--<el-radio-button label="自定义" disabled/>-->
|
||||
</el-radio-group>
|
||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
|
||||
<span>②确认合同总额:</span>
|
||||
<el-input v-model="actualTotal" size="small" style="width: 100px"/>
|
||||
<el-button type="primary" size="small" @click="submitTotal()">确认</el-button>
|
||||
<span>③递交审批:</span>
|
||||
<!--<span>②确认合同总额:</span>-->
|
||||
<!--<el-input v-model="actualTotal" size="small" style="width: 100px"/>-->
|
||||
<!--<el-button type="primary" size="small" @click="submitTotal()">确认</el-button>-->
|
||||
<span>②递交审批:</span>
|
||||
<el-button type="success" size="small" @click="generateContract()">递交</el-button>
|
||||
<hr>
|
||||
<!--html代码-->
|
||||
@@ -350,6 +350,7 @@ export default {
|
||||
},
|
||||
submitTotal() { // 确定合同总额
|
||||
// this.$refs.tinymce.destroyTinymce()
|
||||
this.$refs.tinymce.initTinymce()
|
||||
document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal
|
||||
document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal
|
||||
document.getElementById('actualTotal_zh').innerHTML = convertCurrency(this.actualTotal)
|
||||
@@ -693,6 +694,9 @@ export default {
|
||||
document.getElementsByClassName('actualTotal')[0] ? document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal : ''
|
||||
document.getElementsByClassName('actualTotal')[1] ? document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal : ''
|
||||
document.getElementById('actualTotal_zh') ? document.getElementById('actualTotal_zh').innerHTML = this.actualTotal_zh : ''
|
||||
document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal
|
||||
document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal
|
||||
document.getElementById('actualTotal_zh').innerHTML = convertCurrency(this.actualTotal)
|
||||
this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
|
||||
this.$refs.tinymce.initTinymce()
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -1294,47 +1294,55 @@ export default {
|
||||
})
|
||||
},
|
||||
doneOfflineContact() { // 生成离线合同
|
||||
this.$confirm('确定生成合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
this.tableData3.map(v => {
|
||||
this.$set(v, '未税总额', 0)
|
||||
this.$set(v, '含税总额', 0)
|
||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||
})
|
||||
this.disable = true // 是否为编辑模式
|
||||
})
|
||||
} else { this.$message.error('离线合同生成失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
let judge = true
|
||||
this.tableData3.map(v => {
|
||||
judge = judge && v.数量
|
||||
})
|
||||
if (judge) {
|
||||
this.$confirm('确定生成合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
this.tableData3.map(v => {
|
||||
this.$set(v, '未税总额', 0)
|
||||
this.$set(v, '含税总额', 0)
|
||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||
})
|
||||
this.disable = true // 是否为编辑模式
|
||||
})
|
||||
} else { this.$message.error('离线合同生成失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('数量不正确')
|
||||
}
|
||||
},
|
||||
exportExcel(row) {
|
||||
this.$confirm('确定导出该合同?', '提示', {
|
||||
|
||||
Reference in New Issue
Block a user