Bläddra i källkod

配件销售单里的价格

caojunjie 2 år sedan
förälder
incheckning
42e2d4b1fc
1 ändrade filer med 10 tillägg och 8 borttagningar
  1. 10 8
      src/views/salesOrder/detailsPage.vue

+ 10 - 8
src/views/salesOrder/detailsPage.vue

@@ -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 => {