From ef6e3fcdf6367dcb2bfd9c4413ec9b0b1e41c736 Mon Sep 17 00:00:00 2001 From: Mr.Shi <1878285526@qq.com> Date: 星期二, 19 九月 2023 18:53:04 +0800 Subject: [PATCH] 企业端 --- company_admin/src/components/business/selectProductItem.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/company_admin/src/components/business/selectProductItem.vue b/company_admin/src/components/business/selectProductItem.vue index 94f612e..88d80be 100644 --- a/company_admin/src/components/business/selectProductItem.vue +++ b/company_admin/src/components/business/selectProductItem.vue @@ -48,7 +48,7 @@ <el-table-column prop="price" label="閲囪喘浠凤紙鍏冿級" show-overflow-tooltip min-width="100px"></el-table-column> <el-table-column label="鍏ユ墜浠凤紙鍏冿級" show-overflow-tooltip min-width="100px"> <template slot-scope="{row}"> - <el-input v-model="row.purchasePrice" placeholder="璇疯緭鍏�"></el-input> + <el-input v-model="row.purchasePrice" @input="changeVal(row)" placeholder="璇疯緭鍏�"></el-input> </template> </el-table-column> </el-table> @@ -101,6 +101,13 @@ }) }, methods: { + changeVal(row) { + var zz2 = new RegExp("^[0-9]*[1-9][0-9]*$"); + if (!zz2.test(row.purchasePrice)) { + row.purchasePrice = '' + this.$message.warning({ message: '鍙兘杈撳叆鏁存暟' }) + } + }, getList() { pageT({ capacity: this.pageSize, @@ -111,7 +118,7 @@ page: this.page }).then(res => { res.records.forEach(item => { - item.purchasePrice = item.price * this.form.rate + item.purchasePrice = Math.ceil(item.price * this.form.rate) }) this.tableData = res.records this.total = res.total @@ -134,6 +141,10 @@ console.log(arr) }, confirm() { + if (this.form.goodsParamList.length === 0) { + this.$message.warning({ message: '璇峰厛鍕鹃�夊晢鍝�' }) + return + } // 璋冪敤鏂板缓鎺ュ彛 this.isWorking = true createPlat({ -- Gitblit v1.9.3