更新
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-cjn-09" style="margin-left:10px" @click="Preservation">保存</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -64,12 +63,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.核算单价" size="mini" width="80px" align="center" @change="update(scope.row)"/>
|
||||
<el-input v-model="scope.row.单价" size="mini" width="80px" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总额" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.核算总额" size="mini" width="80px" align="center" readonly/>
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -145,20 +144,14 @@ export default {
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
row.核算总额 = row.核算单价 * parseFloat(row.重量或面积)
|
||||
},
|
||||
Preservation() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
console.log(this.tableData[i].请购单明细流水号, this.tableData[i].核算总额)
|
||||
this.Requisition.push(this.tableData[i].请购单明细流水号)
|
||||
this.UnitPrice.push(this.tableData[i].核算单价)
|
||||
this.Total.push(this.tableData[i].核算总额)
|
||||
}
|
||||
Preservation(this.Requisition, this.Total, this.UnitPrice).then(response => {
|
||||
console.log(row)
|
||||
Preservation(row.采购合同明细流水号, row.单价).then(response => {
|
||||
console.log(response, 1111)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.$message.success('编辑成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('保存失败')
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user