This commit is contained in:
liushuai
2020-03-19 17:53:05 +08:00
parent 97bb2dcd3d
commit 3c9e0cb1b5
11 changed files with 474 additions and 374 deletions

View File

@@ -61,7 +61,7 @@
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" placeholder="其他说明" type="textarea" rows="1" @blur="contractHeaderChange"/>
</el-row>
<el-table v-loading="loading" :data="tableData1" :summary-method="getSummaries" border style="margin: 10px 0;max-height: 480px;width: 1365px" height="480px" size="mini" show-summary tooltip-effect="dark">
<el-table v-loading="loading" :data="tableData1" :summary-method="getSummaries" border style="margin: 10px 0;max-height: 480px;width: 1365px" height="400px" size="mini" show-summary tooltip-effect="dark">
<el-table-column label="序号" align="center" width="50" type="index"/>
<el-table-column label="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
@@ -395,35 +395,37 @@ export default {
},
// 价格实时保存
priceChange(price, num1, num2, row, num3, num4, num5) {
this.tableData1.map(v => {
v.物料流水号 = v.物料流水号 || ''
v.零件名称 = v.零件名称 || ''
v.零件图号 = v.零件图号 || ''
v.规格 = v.规格 || ''
row.物料流水号 = row.物料流水号 || ''
row.零件名称 = row.零件名称 || ''
row.零件图号 = row.零件图号 || ''
row.规格 = row.规格 || ''
if (Number(v.物料流水号) === Number(row.物料流水号) && Number(v.询价单流水号) === Number(row.询价单流水号) && v.零件名称 === row.零件名称 && v.零件图号 === row.零件图号 && v.规格 === row.规格) {
v.含税单价 = row.含税单价
v.税单价 = row.税单价
}
})
const group = this.tableData1
this.tableData1 = []
this.tableData1 = group
price = price || 0
num1 = num1 || ''
num3 = num3 || ''
num4 = num4 || ''
num5 = num5 || ''
savePrice(price, num1, num2, num3, num4, num5).then(res => {
if (res.data[0].result === '1') {
console.log('单价实时保存成功')
} else {
console.log('单价实时保存失败')
}
})
if (!this.quickChangePrice) {
this.tableData1.map(v => {
v.物料流水号 = v.物料流水号 || ''
v.零件名称 = v.零件名称 || ''
v.零件图号 = v.零件图号 || ''
v.规格 = v.规格 || ''
row.物料流水号 = row.物料流水号 || ''
row.零件名称 = row.零件名称 || ''
row.零件图号 = row.零件图号 || ''
row.规格 = row.规格 || ''
if (Number(v.物料流水号) === Number(row.物料流水号) && Number(v.询价单流水号) === Number(row.询价单流水号) && v.零件名称 === row.零件名称 && v.零件图号 === row.零件图号 && v.规格 === row.规格) {
v.税单价 = row.税单价
v.未税单价 = row.未税单价
}
})
const group = this.tableData1
this.tableData1 = []
this.tableData1 = group
price = price || 0
num1 = num1 || ''
num3 = num3 || ''
num4 = num4 || ''
num5 = num5 || ''
savePrice(price, num1, num2, num3, num4, num5).then(res => {
if (res.data[0].result === '1') {
console.log('单价实时保存成功')
} else {
console.log('单价实时保存失败')
}
})
}
},
deleteAllDate() {
this.tableData1.map(v => {