Kaynağa Gözat

辅材采购退货单 引用单号后,自动填写退货数量和金额
编辑数量后,退货数量和金额相应的变

linwenxin 1 yıl önce
ebeveyn
işleme
d115831e9a

+ 6 - 2
src/views/auxiliaryFittings/purchasingManagement/mixins/form_tpl.js

@@ -676,10 +676,14 @@ export default {
                         </div>
                       </el-descriptions-item>
                       <el-descriptions-item label="退货数量">
-                        {this.formData.retTotalQty}
+                        {this.formData.retTotalQty || this.setNumber([0, 0, 0, ...this.formData.items.map(row => {
+                          return Number(row.retQty)
+                        })].reduce((a, b) => a + b))}
                       </el-descriptions-item>
                       <el-descriptions-item label="退款金额">
-                        {this.formData.retTotalAmount}
+                        {this.formData.retTotalAmount || this.setNumber([0, 0, 0, ...this.formData.items.map(row => {
+                          return Number(row.cost) * Number(row.retQty)
+                        })].reduce((a, b) => a + b))}
                       </el-descriptions-item>
                     </el-descriptions> : null
                 }