gaoluyang
3 天以前 6784281753fefac72e044cb52b0e3b22615841e4
1.采购管理-来票登记的登记弹框表格加合计,小数点两位
已修改3个文件
39 ■■■■ 文件已修改
src/store/modules/user.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/invoiceEntry/components/Modal.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceRegistration/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js
@@ -52,7 +52,7 @@
            this.avatar = avatar
            this.currentFactoryName = user.currentFactoryName
            this.nickName = user.nickName
            this.currentDeptId = user.currentDeptId
            this.currentDeptId = user.tenantId
            resolve(res)
          }).catch(error => {
            reject(error)
src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -113,12 +113,14 @@
        rowKey="id"
        :column="columns"
        :tableData="form.productData"
                :summaryMethod="summarizeChildrenTable"
                :isShowSummary="true"
        height="auto"
      >
        <template #ticketsNumRef="{ row }">
          <el-input-number
            v-model="row.ticketsNum"
            placeholder="请选择"
            placeholder="请输入"
            :min="0"
            :step="0.1"
            clearable
@@ -129,7 +131,7 @@
        <template #ticketsAmountRef="{ row }">
          <el-input-number
            v-model="row.ticketsAmount"
            placeholder="请选择"
            placeholder="请输入"
            :min="0"
            :step="0.1"
            clearable
@@ -283,10 +285,12 @@
  {
    label: "未来票数",
    prop: "futureTickets",
        width: 100,
  },
  {
    label: "未来票金额(元)",
    prop: "futureTicketsAmount",
        width: 200,
  },
];
@@ -316,7 +320,19 @@
    form.productData = data.productData;
  }
};
// 子表合计方法
const summarizeChildrenTable = (param) => {
    return proxy.summarizeTable(param, [
        "taxInclusiveUnitPrice",
        "taxInclusiveTotalPrice",
        "taxExclusiveTotalPrice",
        "ticketsNum",
        "ticketsAmount",
        "ticketsAmountRef",
        "futureTickets",
        "futureTicketsAmount",
    ]);
};
//本次来票数失焦操作
const invoiceNumBlur = (row) => {
  if (!row.ticketsNum || row.ticketsNum === "") {
@@ -328,11 +344,11 @@
    return;
  }
  // 计算本次来票金额
  row.ticketsAmount = row.ticketsNum * row.taxInclusiveUnitPrice;
  row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2)
  // 计算未来票数
  row.futureTickets = row.tempFutureTickets - row.ticketsNum;
  row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
  // 计算未来票金额
  row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount;
  row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
  calculateinvoiceAmount();
};
@@ -351,9 +367,9 @@
    (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2)
  );
  // 计算未来票数
  row.futureTickets = row.tempFutureTickets - row.ticketsNum;
  row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
  // 计算未来票金额
  row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount;
  row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
  calculateinvoiceAmount();
};
src/views/salesManagement/invoiceRegistration/index.vue
@@ -320,7 +320,7 @@
            <template #default="scope">
              <el-input-number :step="0.1" :min="0" style="width: 100%"
                v-model="scope.row.currentInvoiceNum"
                @blur="invoiceNumBlur(scope.row)"
                @change="invoiceNumBlur(scope.row)"
              ></el-input-number>
            </template>
          </el-table-column>
@@ -332,7 +332,7 @@
            <template #default="scope">
              <el-input-number :step="0.01" :min="0" style="width: 100%"
                v-model="scope.row.currentInvoiceAmount"
                @blur="invoiceAmountBlur(scope.row)"
                @change="invoiceAmountBlur(scope.row)"
              ></el-input-number>
            </template>
          </el-table-column>
@@ -539,6 +539,7 @@
    "currentInvoiceAmount",
    "noInvoiceNum",
    "noInvoiceAmount",
    "currentInvoiceNum",
  ]);
};
// 打开弹框