From ba34a26515911534ca3a195c379f479e115bf931 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期三, 04 六月 2025 11:16:20 +0800
Subject: [PATCH] 销售台账/开票登记功能开发
---
src/views/procurementManagement/procurementLedger/index.vue | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index f04b8f2..31e8753 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -213,19 +213,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="鏁伴噺锛�" prop="quantity">
- <el-input v-model="productForm.quantity" placeholder="璇疯緭鍏�" clearable/>
+ <el-input v-model="productForm.quantity" placeholder="璇疯緭鍏�" clearable @change="mathNum"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
- <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="2" :step="0.1" clearable style="width: 100%"/>
+ <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="2" :step="0.1" clearable style="width: 100%" @change="mathNum"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="绋庣巼(%)锛�" prop="taxRate">
- <el-select v-model="productForm.taxRate" placeholder="璇烽�夋嫨" clearable>
+ <el-select v-model="productForm.taxRate" placeholder="璇烽�夋嫨" clearable @change="mathNum">
<el-option label="1" value="1"/>
<el-option label="6" value="6"/>
<el-option label="13" value="13"/>
@@ -236,7 +236,7 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="鍚◣鎬讳环(鍏�)锛�" prop="taxInclusiveTotalPrice">
- <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="2" :step="0.1" clearable style="width: 100%" @change="mathNum"/>
+ <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="2" :step="0.1" clearable style="width: 100%" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -378,6 +378,13 @@
page.current = 1
getList()
}
+// 瀛愯〃鍚堣鏂规硶
+const summarizeChildrenTable = (param) => {
+ return proxy.summarizeTable(param, ['taxInclusiveUnitPrice', 'taxInclusiveTotalPrice', 'taxExclusiveTotalPrice', 'ticketsNum', 'ticketsAmount', 'futureTickets', 'futureTicketsAmount'], {
+ ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+ futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+ });
+};
const paginationChange = ({ current, limit }) => {
page.current = current;
page.size = limit;
@@ -584,7 +591,7 @@
if (children && children.length > 0) {
newItem.children = convertIdToValue(children);
}
-
+
return newItem;
});
}
@@ -653,7 +660,7 @@
}).catch(() => {
proxy.$modal.msg("宸插彇娑�")
})
-
+
}
}
// 鍏抽棴浜у搧寮规
@@ -709,12 +716,24 @@
const day = String(today.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
-const mathNum = (val) => {
- productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(val, productForm.value.taxRate)
+const mathNum = () => {
+ console.log('productForm.value',productForm.value)
+ if(!productForm.value.taxInclusiveUnitPrice){
+ return
+ }
+ if(!productForm.value.quantity){
+ return
+ }
+ // 鍚◣鎬讳环璁$畻
+ productForm.value.taxInclusiveTotalPrice = proxy.calculateTaxIncludeTotalPrice(productForm.value.taxInclusiveUnitPrice, productForm.value.quantity)
+ if(productForm.value.taxRate){
+ // 涓嶅惈绋庢�讳环璁$畻
+ productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate)
+ }
}
getList()
</script>
<style scoped lang="scss">
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3