张诺
13 小时以前 41a639a4a4b6fbf35db7903b5ee3c068c8644430
src/views/salesManagement/salesLedger/index.vue
@@ -375,9 +375,10 @@
               <el-col :span="12">
                  <el-form-item label="税率(%):" prop="taxRate">
                     <el-select v-model="productForm.taxRate" placeholder="请选择" clearable @change="calculateFromTaxRate">
                        <el-option label="1" value="1" />
                        <el-option label="6" value="6" />
                        <el-option label="13" value="13" />
                        <el-option label="0" :value="0" />
                        <el-option label="1" :value="1" />
                        <el-option label="6" :value="6" />
                        <el-option label="13" :value="13" />
                     </el-select>
                  </el-form-item>
               </el-col>
@@ -751,7 +752,7 @@
      unit: "",
      quantity: "",
      taxInclusiveUnitPrice: "",
      taxRate: "",
      taxRate: 0,
      taxInclusiveTotalPrice: "",
      taxExclusiveTotalPrice: "",
      invoiceType: "",
@@ -1200,7 +1201,7 @@
   productData.value = products.map((p) => {
      const quantity = Number(p.quantity ?? 0) || 0;
      const unitPrice = Number(p.unitPrice ?? 0) || 0;
      const taxRate = "0"; // 默认 13%,便于直接提交(如需可在产品中自行修改)
      const taxRate = Number(p.taxRate ?? 0) || 0; // 默认 13%,便于直接提交(如需可在产品中自行修改)
      const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(3);
      const taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(taxInclusiveTotalPrice, taxRate, 3);
      return {
@@ -1300,7 +1301,10 @@
   }
   
   productOperationType.value = type;
   productForm.value = {};
   productForm.value = {
      taxRate: 0,
      invoiceType: "增普票"
   };
   proxy.resetForm("productFormRef");
   if (type === "edit") {
      productForm.value = { ...row };
@@ -1335,6 +1339,7 @@
const submitProduct = () => {
   proxy.$refs["productFormRef"].validate((valid) => {
      if (valid) {
         productForm.value.taxRate = productForm.value.taxRate?productForm.value.taxRate:0;
         if (operationType.value === "edit") {
            submitProductEdit();
         } else {