优化入库
This commit is contained in:
parent
f9ae277ca8
commit
5e283bb804
|
|
@ -90,14 +90,14 @@
|
||||||
<el-table-column label="进价">
|
<el-table-column label="进价">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||||
@change="e => { scope.row.costPrice = e }"></el-input-number>
|
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||||
@change="e => scope.row.totalAmount = e * scope.row.guidePrice"></el-input-number>
|
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||||
<div class="tips">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
<div class="tips">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -202,7 +202,13 @@ export default {
|
||||||
this.tbShopPurveyorGet()
|
this.tbShopPurveyorGet()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
modifyPrice() {
|
||||||
|
let zong = 0
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.costPrice * ele.number
|
||||||
|
})
|
||||||
|
this.queryForm.totalAmount = zong
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitHandle() {
|
submitHandle() {
|
||||||
this.$refs.queryForm.validate(async valid => {
|
this.$refs.queryForm.validate(async valid => {
|
||||||
|
|
@ -210,7 +216,6 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.queryFormLoading = true
|
this.queryFormLoading = true
|
||||||
this.queryForm.list = this.tableData.list
|
this.queryForm.list = this.tableData.list
|
||||||
console.log(this.queryForm,'调试costPrice')
|
|
||||||
await tbProductStockOperateOutAndOn(this.queryForm)
|
await tbProductStockOperateOutAndOn(this.queryForm)
|
||||||
this.queryFormLoading = false
|
this.queryFormLoading = false
|
||||||
this.showResult = true
|
this.showResult = true
|
||||||
|
|
|
||||||
|
|
@ -89,15 +89,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进价">
|
<el-table-column label="进价">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<!-- <el-input-number v-model="scope.row.guidePrice" :min="0" controls-position="right"
|
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||||
@change="e => scope.row.totalAmount = e * scope.row.number"></el-input-number> -->
|
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||||
@change="e => scope.row.totalAmount = e * scope.row.guidePrice"></el-input-number>
|
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||||
<div class="tips">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
<div class="tips">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -202,6 +202,13 @@ export default {
|
||||||
this.tbShopPurveyorGet()
|
this.tbShopPurveyorGet()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
modifyPrice() {
|
||||||
|
let zong = 0
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.costPrice * ele.number
|
||||||
|
})
|
||||||
|
this.queryForm.totalAmount = zong
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitHandle() {
|
submitHandle() {
|
||||||
this.$refs.queryForm.validate(async valid => {
|
this.$refs.queryForm.validate(async valid => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue