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

@@ -184,7 +184,7 @@
</el-table-column>
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope">
{{ scope.row.库存 }}
{{ scope.row.货位存量 - scope.row.占用数量 }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" width="145" prop="使用库存数">
@@ -254,8 +254,10 @@
<div style="display: inline-block; float: left">
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button
type="distribution"
type="primary"
size="small"
plain
icon="el-icon-bottom"
style="margin: 0px 20px; display: inline-block;"
@click="addInquirySheet">选入物料</el-button>
</el-tooltip>
@@ -1380,7 +1382,7 @@ export default {
changeNumber(row) {
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('使用成功')
// this.$message.success('使用成功')
this.searchTable11()
} else {
this.$message.success('使用失败')
@@ -2253,6 +2255,7 @@ export default {
}
},
addInquirySheet() { // 追加物料
this.numbers = []
const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号
const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号
if (this.inquirySheetFlowNum === '' || this.inquirySheetFlowNum === null) {
@@ -2441,11 +2444,15 @@ export default {
},
tableRowClassName({ row, rowIndex }) {
let color = ''
this.numbers.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
}
})
if (this.numbers.length > 0) {
this.numbers.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
}
})
} else {
color = ''
}
return color
},
tableRowClassName2({ row, rowIndex }) {

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('生成合同失败')