diff --git a/package.json b/package.json index 2143d7d..aee93eb 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "codemirror": "^5.65.18", "codemirror-editor-vue3": "^2.8.0", "dayjs": "^1.11.13", + "decimal.js": "^10.5.0", "default-passive-events": "^2.0.0", "echarts": "^5.6.0", "element-plus": "^2.9.3", diff --git a/src/views/finance/supplierBill/billingRecord.vue b/src/views/finance/supplierBill/billingRecord.vue index 08e346e..06e3860 100644 --- a/src/views/finance/supplierBill/billingRecord.vue +++ b/src/views/finance/supplierBill/billingRecord.vue @@ -113,6 +113,7 @@ const refPayment = ref(); function handlePayment(item) { if (item != 'all') { state.flowIdList = [item.id] + state.allAmount = item.unPaidAmount } else { if( state.flowIdList.length <= 0 ){ ElMessage({ type: "error", message: "请选择付款耗材" }); diff --git a/src/views/finance/supplierBill/components/payment.vue b/src/views/finance/supplierBill/components/payment.vue index 741f925..28c769a 100644 --- a/src/views/finance/supplierBill/components/payment.vue +++ b/src/views/finance/supplierBill/components/payment.vue @@ -6,7 +6,7 @@ - @@ -46,13 +46,13 @@ const form = reactive({ ...basicForm, }); const supplierName = ref(''); +const maxAmount = ref(0); const show = ref(false); function open(item) { form.flowIdList = item.flowIdList supplierName.value = item.supplierName - if (item.flowIdList.length > 1 && item.allAmount) { - form.amount = item.allAmount - } + form.amount = item.allAmount + maxAmount.value = item.allAmount // Object.assign(form, item); show.value = true; } diff --git a/src/views/finance/supplierBill/index.vue b/src/views/finance/supplierBill/index.vue index d4c0edd..582cfc2 100644 --- a/src/views/finance/supplierBill/index.vue +++ b/src/views/finance/supplierBill/index.vue @@ -21,16 +21,16 @@
账单总金额(全部/本月)
-
{{ state.summaryData.amountPayable }} / {{ state.summaryData.mouthAmountPayable }}
+
{{ state.summaryData.amountPayable || 0 }} / {{ state.summaryData.mouthAmountPayable || 0 }}
已付款总金额(全部/本月)
-
{{ state.summaryData.actualPaymentAmount }} / {{ state.summaryData.mouthActualPaymentAmount }}
+
{{ state.summaryData.actualPaymentAmount || 0 }} / {{ state.summaryData.mouthActualPaymentAmount || 0 }}
未付款总金额(全部/本月)
-
{{ state.summaryData.unPaidAmount }} / {{ state.summaryData.mouthUnPaidAmount }}
+
{{ state.summaryData.unPaidAmount || 0 }} / {{ state.summaryData.mouthUnPaidAmount || 0 }}
diff --git a/src/views/inventory/consumables/components/add-haocai.vue b/src/views/inventory/consumables/components/add-haocai.vue index 224e90c..31988ad 100644 --- a/src/views/inventory/consumables/components/add-haocai.vue +++ b/src/views/inventory/consumables/components/add-haocai.vue @@ -40,7 +40,7 @@
- + @@ -100,6 +100,8 @@ const basicForm = { conUnit: "", price: undefined, conWarning: undefined, + id: "", + isStock: 1, }; const forms = ref([{ ...basicForm }]); const form = reactive({ @@ -175,7 +177,7 @@ async function submitForms() { } } function reset() { - console.log("reset"); + refform.value.resetFields(); Object.assign(form, basicForm); console.log(form); } diff --git a/src/views/inventory/operation_in/index.vue b/src/views/inventory/operation_in/index.vue index 853a557..59e0717 100644 --- a/src/views/inventory/operation_in/index.vue +++ b/src/views/inventory/operation_in/index.vue @@ -157,7 +157,7 @@