更改总数数量
This commit is contained in:
parent
b6b80c3d43
commit
14462f98ab
|
|
@ -95,7 +95,8 @@
|
||||||
<el-button type="primary" @click="$refs.shopList.show(tableData.list)" v-else>选择商品</el-button>
|
<el-button type="primary" @click="$refs.shopList.show(tableData.list)" v-else>选择商品</el-button>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-autocomplete v-model="autocompletename" :fetch-suggestions="querySearchAsync"
|
<el-autocomplete v-model="autocompletename" :fetch-suggestions="querySearchAsync"
|
||||||
:value-key="inTabValue == 'goods' ? 'name' : 'conName'" :placeholder="inTabValue == 'goods'?'商品搜索':'耗材搜索'" @select="handleSelect"
|
:value-key="inTabValue == 'goods' ? 'name' : 'conName'"
|
||||||
|
:placeholder="inTabValue == 'goods' ? '商品搜索' : '耗材搜索'" @select="handleSelect"
|
||||||
style="width: 500px;"></el-autocomplete>
|
style="width: 500px;"></el-autocomplete>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -145,7 +146,8 @@
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button type="text" @click="tableData.list.splice(scope.$index, 1),consCountTotal($event, scope.row, 'stockNumber')">删除</el-button>
|
<el-button type="text"
|
||||||
|
@click="tableData.list.splice(scope.$index, 1), spliceclick()">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -189,7 +191,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button type="text" @click="tableData.list.splice(scope.$index, 1),consCountTotal($event, scope.row, 'stockNumber')">删除</el-button>
|
<el-button type="text"
|
||||||
|
@click="tableData.list.splice(scope.$index, 1), spliceclick()">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -346,6 +349,20 @@ export default {
|
||||||
this.selectConsumable([item])
|
this.selectConsumable([item])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//删除计算
|
||||||
|
spliceclick() {
|
||||||
|
var zong = 0
|
||||||
|
if (this.inTabValue == 'goods') {
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.costPrice * ele.number
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.price * ele.stockNumber
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.queryForm.totalAmount = formatDecimal(zong)
|
||||||
|
},
|
||||||
// 选择商品
|
// 选择商品
|
||||||
selectShop(res) {
|
selectShop(res) {
|
||||||
let arr = []
|
let arr = []
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,8 @@
|
||||||
<el-button type="primary" @click="$refs.shopList.show(tableData.list)" v-else>选择商品</el-button>
|
<el-button type="primary" @click="$refs.shopList.show(tableData.list)" v-else>选择商品</el-button>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-autocomplete v-model="autocompletename" :fetch-suggestions="querySearchAsync"
|
<el-autocomplete v-model="autocompletename" :fetch-suggestions="querySearchAsync"
|
||||||
:value-key="inTabValue == 'goods' ? 'name' : 'conName'" :placeholder="inTabValue == 'goods'?'商品搜索':'耗材搜索'" @select="handleSelect"
|
:value-key="inTabValue == 'goods' ? 'name' : 'conName'"
|
||||||
|
:placeholder="inTabValue == 'goods' ? '商品搜索' : '耗材搜索'" @select="handleSelect"
|
||||||
style="width: 500px;"></el-autocomplete>
|
style="width: 500px;"></el-autocomplete>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -142,7 +143,8 @@
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button type="text" @click="tableData.list.splice(scope.$index, 1),consCountTotal($event, scope.row, 'stockNumber')">删除</el-button>
|
<el-button type="text"
|
||||||
|
@click="tableData.list.splice(scope.$index, 1), spliceclick()">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -184,7 +186,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button type="text" @click="tableData.list.splice(scope.$index, 1),consCountTotal($event, scope.row, 'stockNumber')">删除</el-button>
|
<el-button type="text"
|
||||||
|
@click=" tableData.list.splice(scope.$index, 1), spliceclick()">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -348,6 +351,20 @@ export default {
|
||||||
this.resetHandle()
|
this.resetHandle()
|
||||||
this.queryForm.type = type
|
this.queryForm.type = type
|
||||||
},
|
},
|
||||||
|
//删除计算
|
||||||
|
spliceclick() {
|
||||||
|
var zong = 0
|
||||||
|
if (this.inTabValue == 'goods') {
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.costPrice * ele.number
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.tableData.list.forEach(ele => {
|
||||||
|
zong += ele.price * ele.stockNumber
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.queryForm.totalAmount = formatDecimal(zong)
|
||||||
|
},
|
||||||
// 计算耗材总价
|
// 计算耗材总价
|
||||||
consCountTotal(cvalue, row, key1, key2 = undefined) {
|
consCountTotal(cvalue, row, key1, key2 = undefined) {
|
||||||
if (cvalue == undefined) {
|
if (cvalue == undefined) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue