From f37cd3b1ddf07af8b5feb31c0f964dafc0066489 Mon Sep 17 00:00:00 2001
From: duan <1004387497@qq.com>
Date: Sat, 6 Jul 2024 15:43:48 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=95=86=E5=93=81=E5=8F=96?=
=?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E5=90=8E=E4=B8=A4=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../invoicing/consumable/specifications.vue | 23 ++++++++++++++-----
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/views/invoicing/consumable/specifications.vue b/src/views/invoicing/consumable/specifications.vue
index 61e5bb9..0d1f7a7 100644
--- a/src/views/invoicing/consumable/specifications.vue
+++ b/src/views/invoicing/consumable/specifications.vue
@@ -103,7 +103,7 @@
去选择耗材信息
-
+
@@ -123,7 +123,7 @@
去选择耗材信息
-
+
@@ -183,7 +183,8 @@
-
+
取 消
@@ -297,8 +298,18 @@ export default {
})
},
methods: {
+ limitInput(value, name) {
+ this.surplusStocks.surplusStock = ('' + value) // 第一步:转成字符串
+ // .replace(/[^\d^\.]+/g, '') // 第二步:把不是数字,不是小数点的过滤掉
+
+ .replace(/^0+(\d)/, '$1') // 第三步:第一位0开头,0后面为数字,则过滤掉,取后面的数字
+
+ .replace(/^\./, '0.') // 第四步:如果输入的第一位为小数点,则替换成 0. 实现自动补全
+
+ .match(/^\d*(\.?\d{0,2})/g)[0] || ''
+ },
selectShop(res) {
- console.log(res, '调试1')
+ // console.log(res, '调试1')
this.addSelect = res
res[0]['specSnap'] = res[0].name
this.clickdialogframe('add')
@@ -413,8 +424,8 @@ export default {
ele.conName = item.conName
if (this.ALLisDistribute != null) {
// this.addSelect.forEach((ele, i) => {
- ele.skuList[this.ALLisDistribute].conInfoId = item.id
- ele.skuList[this.ALLisDistribute].conName = item.conName
+ ele.skuList[this.ALLisDistribute].conInfoId = item.id
+ ele.skuList[this.ALLisDistribute].conName = item.conName
// })
console.log(ele.skuList[this.ALLisDistribute], "打印");
}