|
|
@@ -29,8 +29,8 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="name" label="名称" align="center"></el-table-column>
|
|
|
- <el-table-column prop="userPrice" label="单价" width="110" align="center"></el-table-column>
|
|
|
<el-table-column prop="bigCount" label="数量" width="110" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="userPrice" label="单价" width="110" align="center"></el-table-column>
|
|
|
<el-table-column prop="sumPrice" label="金额" width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
¥{{ parseFloat(Number(scope.row.userPrice)*Number(scope.row.bigCount).toFixed(2)) }}
|
|
|
@@ -109,7 +109,7 @@
|
|
|
<el-input style="width: 130px;margin-left: 15px" placeholder="价格" @keyup.enter.native="confirmNumPrice()" type="number" v-model="customData.userPrice"></el-input>
|
|
|
<span>元</span>
|
|
|
</div>
|
|
|
- <div style="text-align:center;margin:20px 0 5px 0;font-weight:bold;font-size:18px;">剩 {{ currentItem.stock ? parseFloat(currentItem.stock) : 0 }} {{ currentItem.bigUnit}}</div>
|
|
|
+ <div style="margin:15px 0 5px 100px;font-weight:bold;font-size:18px;">剩 {{ currentItem.stock ? parseFloat(currentItem.stock) : 0 }} {{ currentItem.bigUnit}}</div>
|
|
|
<div class="remark">Enter 确定,Esc 取消</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -700,10 +700,15 @@ export default {
|
|
|
},
|
|
|
confirmNumPrice(){
|
|
|
let currentItem = this.currentItem;
|
|
|
+
|
|
|
if(Number(this.customData.bigCount)<=0){
|
|
|
this.$message({message: '请填写数量',type: 'warning'});
|
|
|
return;
|
|
|
}
|
|
|
+ if(Number(this.customData.bigCount)>Number(currentItem.stock)){
|
|
|
+ this.$message({message: '库存不足',type: 'warning'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
currentItem = {...currentItem,bigCount:this.customData.bigCount,userPrice:this.customData.userPrice,smallCount:this.customData.smallCount}
|
|
|
this.replaceItemFn(currentItem,1,'add')
|
|
|
this.backToSearchItem();
|