From f69afc7461e1c2d92a935c0228b77388637de2e4 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 22 十二月 2023 11:25:31 +0800 Subject: [PATCH] 明细单添加编辑接口+编辑产品列表赋值逻辑修改+查看时限制操作的方法逻辑修改+毛利毛利率计算给列表赋值 --- src/views/sales/quotation/AddQuotationDialog.vue | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue index a0ac6ae..268f5f1 100644 --- a/src/views/sales/quotation/AddQuotationDialog.vue +++ b/src/views/sales/quotation/AddQuotationDialog.vue @@ -477,8 +477,16 @@ if (this.isNoProduct) { this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") } else { + for (let i = 0; i < this.tableData.length; i++) { + if (this.tableData[i].cost||Number(this.tableData[i].cost)==0) { + let reg = /^\+?[1-9]\d*$/; + if(!reg.test(this.tableData[i].cost)){ + this.$message.error("鎴愭湰鍗曚环闇�瑕佸~鍐欏ぇ浜�0鐨�2浣嶅皬鏁帮紒") + return true; + } + } + } const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddQuotation(params).then((res) => { console.log(res) @@ -636,9 +644,9 @@ { label: "浜у搧缂栧彿", prop: "number" }, { label: "鍗曚綅", prop: "unit" }, { label: "閿�鍞崟浠�", prop: "price", inputFloat: true, isRequird: true }, - { label: "鎴愭湰鍗曚环", prop: "cost",inputFloat: true }, + { label: "鎴愭湰鍗曚环", prop: "cost",input: true }, { label: "姣涘埄", prop: "profit" }, - { label: "姣涘埄鐜�", prop: "margin",min:90}, + { label: "姣涘埄鐜�(%)", prop: "margin",min:90}, { label: "鏁伴噺", prop: "amount", inputNumber: true, isRequird: true }, { label: "浠风◣鍚堣", prop: "total", inputFloat: true } ] -- Gitblit v1.8.0