zhangwencui
7 天以前 082858032259e87517d7c89b35a3635f7e535874
打印成品对账单功能敲定
已修改1个文件
48 ■■■■ 文件已修改
src/views/salesManagement/salesLedger/index.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue
@@ -66,12 +66,12 @@
          <el-button type="danger"
                     plain
                     @click="handleDelete">删除</el-button>
          <el-button type="primary"
          <!-- <el-button type="primary"
                     plain
                     @click="handlePrint">打印</el-button>
                     @click="handlePrint">打印</el-button> -->
          <el-button type="success"
                     plain
                     @click="handlePrintLedger">成品对账单</el-button>
                     @click="handlePrintLedger">打印成品对账单</el-button>
        </div>
      </div>
      <el-table :data="tableData"
@@ -2496,6 +2496,7 @@
                                              <thead>
                                                <tr>
                                                  <th>序号</th>
                                                                  <th>单号</th>
                                                  <th>产品名称</th>
                                                  <th>规格型号</th>
                                                  <th>单位</th>
@@ -2505,7 +2506,7 @@
                                                  <th>发货日期</th>
                                                  <th>发货车牌号</th>
                                                  <th>客户名称</th>
                                                  <th>单号</th>
                                                </tr>
                                              </thead>
                                              <tbody>
@@ -2516,26 +2517,43 @@
      printContent += `
                                          <tr>
                                            <td>${index + 1}</td>
                                            <td>${product.productName || ""}</td>
                                            <td>${
                                              product.specificationModel || ""
                                                                product.salesContractNo ||
                                                                ""
                                            }</td>
                                            <td>${product.unit || ""}</td>
                                                            <td>${
                                                              product.productName ||
                                                              ""
                                                            }</td>
                                                            <td>${
                                                              product.specificationModel ||
                                                              ""
                                                            }</td>
                                                            <td>${
                                                              product.unit || ""
                                                            }</td>
                                            <td>${formatNumber(
                                              product.unitPrice
                                            )}</td>
                                            <td>${product.quantity || 0}</td>
                                                            <td>${
                                                              product.quantity ||
                                                              0
                                                            }</td>
                                            <td>${formatNumber(
                                              product.totalPrice
                                            )}</td>
                                            <td>${formatDate(
                                              product.deliveryDate
                                            )}</td>
                                            <td>${product.licensePlate || ""}</td>
                                            <td>${product.customerName || ""}</td>
                                            <td>${
                                              product.salesContractNo || ""
                                                              product.licensePlate ||
                                                              ""
                                            }</td>
                                                            <td>${
                                                              product.customerName ||
                                                              ""
                                                            }</td>
                                          </tr>
                                        `;
    });
@@ -2552,17 +2570,19 @@
    printContent += `
                                                <tr class="total-row">
                                                  <td colspan="5">合计</td>
                                                                  <td colspan="6">合计</td>
                                                  <td>${totalQuantity}</td>
                                                  <td>${formatNumber(
                                                    totalAmount
                                                  )}</td>
                                                  <td colspan="4"></td>
                                                                  <td colspan="3"></td>
                                                </tr>
                                              </tbody>
                                            </table>
                                            <div class="footer">
                                              共 ${products.length} 条记录
                                                              共 ${
                                                                products.length
                                                              } 条记录
                                            </div>
                                          </div>
                                        </body>