From facb7c8b5d3fe64bb97d0fdbc921985c7fb88732 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 10 七月 2025 14:42:23 +0800
Subject: [PATCH] 输入框为数字时限制不为负数60%
---
src/views/salesManagement/invoiceRegistration/index.vue | 59 +++++++++++++++++++++++++++++++++++------------------------
1 files changed, 35 insertions(+), 24 deletions(-)
diff --git a/src/views/salesManagement/invoiceRegistration/index.vue b/src/views/salesManagement/invoiceRegistration/index.vue
index ccced0b..1853cd7 100644
--- a/src/views/salesManagement/invoiceRegistration/index.vue
+++ b/src/views/salesManagement/invoiceRegistration/index.vue
@@ -74,7 +74,11 @@
width="60"
/>
<el-table-column label="浜у搧澶х被" prop="productCategory" />
- <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" />
+ <el-table-column
+ label="瑙勬牸鍨嬪彿"
+ prop="specificationModel"
+ width="150"
+ />
<el-table-column label="鍗曚綅" prop="unit" width="70" />
<el-table-column label="鏁伴噺" prop="quantity" width="70" />
<el-table-column label="绋庣巼(%)" prop="taxRate" width="70" />
@@ -150,7 +154,11 @@
show-overflow-tooltip
:formatter="formattedNumber"
/>
- <el-table-column label="鏈紑绁ㄩ噾棰�(鍏�)" show-overflow-tooltip>
+ <el-table-column
+ label="鏈紑绁ㄩ噾棰�(鍏�)"
+ prop="noInvoiceAmountTotal"
+ show-overflow-tooltip
+ >
<template #default="{ row, column }">
<el-text type="danger">
{{ formattedNumber(row, column, row.noInvoiceAmountTotal) }}
@@ -274,7 +282,11 @@
width="60"
/>
<el-table-column label="浜у搧澶х被" prop="productCategory" />
- <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" />
+ <el-table-column
+ label="瑙勬牸鍨嬪彿"
+ prop="specificationModel"
+ width="150"
+ />
<el-table-column label="鍗曚綅" prop="unit" />
<el-table-column label="鏁伴噺" prop="quantity" width="70" />
<el-table-column label="绋庣巼(%)" prop="taxRate" width="70" />
@@ -294,15 +306,12 @@
:formatter="formattedNumber"
width="150"
/>
- <el-table-column label="鏈寮�绁ㄦ暟" prop="currentInvoiceNum">
+ <el-table-column label="鏈寮�绁ㄦ暟" prop="currentInvoiceNum" width="150">
<template #default="scope">
- <el-input
- type="number"
- :step="0.1"
- min="0"
+ <el-input-number :step="0.1" :min="0" style="width: 100%"
v-model="scope.row.currentInvoiceNum"
@blur="invoiceNumBlur(scope.row)"
- ></el-input>
+ ></el-input-number>
</template>
</el-table-column>
<el-table-column
@@ -311,16 +320,13 @@
width="150"
>
<template #default="scope">
- <el-input
- type="number"
- :step="0.01"
- min="0"
+ <el-input-number :step="0.01" :min="0" style="width: 100%"
v-model="scope.row.currentInvoiceAmount"
@blur="invoiceAmountBlur(scope.row)"
- ></el-input>
+ ></el-input-number>
</template>
</el-table-column>
- <el-table-column label="鏈紑绁ㄦ暟" prop="noInvoiceNum">
+ <el-table-column label="鏈紑绁ㄦ暟" prop="noInvoiceNum" width="100">
<template #default="scope">
<el-input
type="number"
@@ -347,13 +353,17 @@
></el-input>
</template>
</el-table-column>
- <el-table-column label="鐧昏浜�" prop="register">
- <template #default="{ row }">
- <el-input v-model="row.register" placeholder="璇疯緭鍏ョ櫥璁颁汉" />
- </template>
+ <el-table-column label="鐧昏浜�" prop="register" width="100">
+ <!-- <template #default="{ row }">
+ <el-input
+ v-model="row.register"
+ placeholder="璇疯緭鍏ョ櫥璁颁汉"
+ disabled
+ />
+ </template> -->
</el-table-column>
- <el-table-column label="鐧昏鏃ユ湡" prop="registerDate">
- <template #default="{ row }">
+ <el-table-column label="鐧昏鏃ユ湡" prop="registerDate" width="150">
+ <!-- <template #default="{ row }">
<el-date-picker
style="width: 100%"
v-model="row.registerDate"
@@ -362,8 +372,9 @@
type="date"
placeholder="璇烽�夋嫨"
clearable
+ disabled
/>
- </template>
+ </template> -->
</el-table-column>
</el-table>
</el-form>
@@ -488,7 +499,7 @@
productList({ salesLedgerId: row.id, type: 1 }).then((res) => {
const index = tableData.value.findIndex((item) => item.id === row.id);
if (index > -1) {
- tableData.value[index].children = res;
+ tableData.value[index].children = res.data;
}
expandedRowKeys.value.push(row.id);
});
@@ -503,8 +514,8 @@
const summarizeMainTable = (param) => {
return proxy.summarizeTable(param, [
"contractAmount",
- "noInvoiceAmountTotal",
"invoiceTotal",
+ "noInvoiceAmountTotal",
]);
};
// 瀛愯〃鍚堣鏂规硶
--
Gitblit v1.9.3