|
@@ -31,10 +31,13 @@
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname == 'price'">
|
|
|
<el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.price" @change="priceChange($event,scope.column.data,scope.column.data.index)"></el-input>
|
|
|
- <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
+ <p v-else>{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</p>
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname == 'countPrice'">
|
|
|
- <p>{{Math.round((scope.column.data.price * scope.column.data.qty)*100)/100}}</p>
|
|
|
+ <p>{{tool.formatAmount((scope.column.data.price * scope.column.data.qty),2)}}</p>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname == 'marketprice'">
|
|
|
+ <p>{{tool.formatAmount((scope.column.data.marketprice),2)}}</p>
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname == 'brand'">
|
|
|
{{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
|
|
@@ -131,11 +134,12 @@ export default {
|
|
|
res.data[index].discountrate = Math.round((res.data[index].discountrate *100)*100)/100
|
|
|
this.totalPrice = this.totalPrice + res.data[index].amount
|
|
|
})
|
|
|
- this.totalPrice = Math.round(this.totalPrice *100)/100
|
|
|
+ this.totalPrice = this.tool.formatAmount(this.totalPrice,2)
|
|
|
this.list = res.data
|
|
|
this.total = res.total
|
|
|
this.$emit('priceChange')
|
|
|
},
|
|
|
+ /*修改数量*/
|
|
|
qtyChange (num,data,index) {
|
|
|
this.form.qty = Math.round(num *100)/100
|
|
|
data.qty = this.form.qty
|
|
@@ -146,15 +150,17 @@ export default {
|
|
|
console.log(num);
|
|
|
|
|
|
},
|
|
|
+ /*修改备注*/
|
|
|
remarksChange (val,data,index){
|
|
|
this.$set(this.list,index,data)
|
|
|
},
|
|
|
+ /*修改折扣*/
|
|
|
discountrateChange (num,data,index) {
|
|
|
console.log(num,data,index)
|
|
|
if (num>100){
|
|
|
this.form.discountrate = 100
|
|
|
}else if (num < 0){
|
|
|
- this.form.discountrate = 1
|
|
|
+ this.form.discountrate = 0
|
|
|
}else {
|
|
|
this.form.discountrate = Math.round(num *100)/100
|
|
|
}
|
|
@@ -162,6 +168,7 @@ export default {
|
|
|
data.price = this.form.price
|
|
|
this.$set(this.list,index,data)
|
|
|
},
|
|
|
+ /*修改价格*/
|
|
|
priceChange (num,data,index) {
|
|
|
if (num > data.marketprice){
|
|
|
this.form.price = data.marketprice
|