|
@@ -14,7 +14,7 @@
|
|
|
</el-button>
|
|
|
<!--<el-button type="primary" size="small" v-if="form.confirmStatus == 1" @click="newAddfun">新建销售单-->
|
|
|
<!--</el-button>-->
|
|
|
- <el-button type="warning" size="small" v-if="form.confirmStatus == 1" @click.stop="clickPayment">付款
|
|
|
+ <el-button type="warning" size="small" v-if="form.confirmStatus == 1" @click.stop="clickPayment">收款
|
|
|
</el-button>
|
|
|
<el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
|
|
|
</el-button>
|
|
@@ -621,10 +621,10 @@ export default {
|
|
|
this.form.currentAmount = sum - this.form.memberBalance
|
|
|
})
|
|
|
},
|
|
|
- // 付款点击事件
|
|
|
+ // 收款点击事件
|
|
|
clickPayment(){
|
|
|
- // 和删除一样的接口 显示要付款的现金
|
|
|
- this.$confirm(`本次付款需要支付金额为${this.form.currentAmount}`, '提示', {
|
|
|
+ // 和删除一样的接口 显示要收款的现金
|
|
|
+ this.$confirm(`本次收款需要支付金额为${this.form.currentAmount}`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
@@ -686,12 +686,15 @@ export default {
|
|
|
row.storageAmount = e.purchasePrice
|
|
|
}
|
|
|
})
|
|
|
- // 根据产品ID和客户id获取产品单价
|
|
|
+ // // 根据产品ID和客户id获取产品单价
|
|
|
obtainPrice({
|
|
|
corpId:this.form.corpId,
|
|
|
goodsId:row.itemId
|
|
|
}).then(res=>{
|
|
|
row.price = res.data.data.salesPrice
|
|
|
+ // purchaseAmount
|
|
|
+ row.amount = row.price
|
|
|
+ this.countChange(row)
|
|
|
})
|
|
|
|
|
|
} else {
|
|
@@ -702,8 +705,9 @@ export default {
|
|
|
row.amount = null
|
|
|
row.purchasePrice = null
|
|
|
row.storageAmount = null
|
|
|
+ this.countChange(row)
|
|
|
}
|
|
|
- this.countChange(row)
|
|
|
+
|
|
|
},
|
|
|
// 之前的优惠金额的监听
|
|
|
amountChange() {
|
|
@@ -715,9 +719,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
countChange(row) {
|
|
|
- console.log(row,718)
|
|
|
row.amount = multiply(row.price, row.storageInQuantity)
|
|
|
- console.log(multiply(row.price, row.storageInQuantity))
|
|
|
row.storageAmount = multiply(row.purchaseAmount, row.storageInQuantity)
|
|
|
let val = 0
|
|
|
this.data.forEach(e => {
|