Эх сурвалжийг харах

refactor(sale&purchase order): 1. 修复销售订单汇总计算字段,新增付款金额统计
2. 更新组件缓存key避免缓存冲突
3. 采购订单页面新增表格滚动同步与汇总功能
4. 打印模板新增收货人联系方式展示
5. 补充采购订单页面的汇总方法导入与实现

liujt 1 сар өмнө
parent
commit
ed84f2be6b

+ 1 - 1
src/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue

@@ -113,7 +113,7 @@
         },
         treeList: [],
         treeLoading: false,
-        cacheKeyUrl: 'eom-sales-selectStockLedgerDialog-2026-05-13',
+        cacheKeyUrl: 'eom-sales-selectStockLedgerDialog-202605131603',
         columnsVersion: 1
       };
     },

+ 186 - 175
src/views/purchasingManage/purchaseOrder/index.vue

@@ -22,186 +22,189 @@
         <div v-if="activeComp == 'saleorder'">
           <div class="ele-border-lighter form-content" v-loading="loading">
             <search-table @search="reload"></search-table>
-
-            <!-- 数据表格 -->
-            <ele-pro-table
-              ref="table"
-              :columns="columns"
-              :datasource="datasource"
-              height="calc(100vh - 365px)"
-              style="margin-bottom: 10px"
-              full-height="calc(100vh - 116px)"
-              tool-class="ele-toolbar-form"
-              :selection.sync="selection"
-              :page-size="20"
-              @columns-change="handleColumnChange"
-              :cache-key="cacheKeyUrl"
-            >
-              <!-- 表头工具栏 -->
-              <template v-slot:toolbar>
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-plus"
-                  class="ele-btn-icon"
-                  @click="openEditNew('add', {})"
-                >
-                  新建
-                </el-button>
-
-                <el-button
-                  size="small"
-                  type="danger"
-                  el-icon-delete
-                  class="ele-btn-icon"
-                  @click="allDelBtn"
-                  :disabled="selection?.length === 0"
-                >
-                  批量删除
-                </el-button>
-                <el-button
-                  type="primary"
-                  size="small"
-                  icon="el-icon-upload2"
-                  @click="uploadFile"
-                  >导入</el-button
-                >
-                <exportButton
-                  fileName="采购订单"
-                  apiUrl="/eom/purchaseorder/export"
-                  :params="params"
-                ></exportButton>
-                <el-dropdown
-                  trigger="click"
-                  :disabled="selection?.length === 0"
-                >
+            <div v-table-scroll-sync class="table-container">
+              <!-- 数据表格 -->
+              <ele-pro-table
+                ref="table"
+                :columns="columns"
+                :datasource="datasource"
+                height="calc(100vh - 365px)"
+                style="margin-bottom: 10px"
+                full-height="calc(100vh - 116px)"
+                tool-class="ele-toolbar-form"
+                :selection.sync="selection"
+                :page-size="20"
+                @columns-change="handleColumnChange"
+                :cache-key="cacheKeyUrl"
+                show-summary
+                :summary-method="getSummaries"
+              >
+                <!-- 表头工具栏 -->
+                <template v-slot:toolbar>
                   <el-button
+                    size="small"
                     type="primary"
-                    class="el-icon-printer"
+                    icon="el-icon-plus"
+                    class="ele-btn-icon"
+                    @click="openEditNew('add', {})"
+                  >
+                    新建
+                  </el-button>
+
+                  <el-button
                     size="small"
+                    type="danger"
+                    el-icon-delete
+                    class="ele-btn-icon"
+                    @click="allDelBtn"
+                    :disabled="selection?.length === 0"
                   >
-                    打印<i class="el-icon-arrow-down el-icon--right"></i>
+                    批量删除
                   </el-button>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item
-                      @click.native="handlePrint('printPurchaseOrderRef')"
-                      >采购订单</el-dropdown-item
-                    >
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </template>
-
-              <!-- 查看详情列 -->
-              <template v-slot:relationName="{ row }">
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  @click="opencontractDetail(row)"
-                >
-                  {{ row.relationName }}
-                </el-link>
-              </template>
-              <template v-slot:orderNo="{ row }">
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  @click="openorderDetail(row)"
-                >
-                  {{ row.orderNo }}
-                </el-link>
-              </template>
-              <!-- 操作列 -->
-              <template v-slot:action="{ row }">
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-edit"
-                  v-if="
-                    (isNeed_process_is_close &&
-                      [0, 3].includes(row.orderStatus)) ||
-                    !isNeed_process_is_close
-                  "
-                  @click="openEditNew('edit', row)"
-                >
-                  修改
-                </el-link>
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-plus"
-                  @click="saleOrderSubmit(row)"
-                  v-if="
-                    isNeed_process_is_close && [0, 3].includes(row.orderStatus)
-                  "
-                >
-                  提交
-                </el-link>
-                <el-popconfirm
-                  class="ele-action"
-                  title="确定要删除此信息吗?"
-                  v-if="
-                    (isNeed_process_is_close &&
-                      [0, 3].includes(row.orderStatus)) ||
-                    !isNeed_process_is_close
-                  "
-                  @confirm="remove([row.id])"
-                >
-                  <template v-slot:reference>
-                    <el-link
-                      type="danger"
-                      :underline="false"
-                      icon="el-icon-delete"
+                  <el-button
+                    type="primary"
+                    size="small"
+                    icon="el-icon-upload2"
+                    @click="uploadFile"
+                    >导入</el-button
+                  >
+                  <exportButton
+                    fileName="采购订单"
+                    apiUrl="/eom/purchaseorder/export"
+                    :params="params"
+                  ></exportButton>
+                  <el-dropdown
+                    trigger="click"
+                    :disabled="selection?.length === 0"
+                  >
+                    <el-button
+                      type="primary"
+                      class="el-icon-printer"
+                      size="small"
                     >
-                      删除
-                    </el-link>
-                  </template>
-                </el-popconfirm>
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-plus"
-                  @click="handleCommand('outsourceSend', row)"
-                  v-if="
-                    ['3', '4', '5', '6', '8', '9'].includes(row.sourceType) &&
-                    [2].includes(row.orderStatus) &&
-                    row.progress < 200
-                  "
-                >
-                  委外发货单
-                </el-link>
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-plus"
-                  @click="handleCommand('invoice', row)"
-                  v-if="
-                    !['3', '4', '5', '6', '8', '9'].includes(row.sourceType) &&
-                    [2].includes(row.orderStatus) &&
-                    row.progress < 200 && row.isShowReceiptButton == 1
-                  "
-                >
-                  收货单
-                </el-link>
-                <!-- <el-link
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-plus"
-                  @click="handleCommand('invoiceManage', row)"
-                  v-if="!row.hasInvoiceApply && [2].includes(row.orderStatus)"
-                >
-                  新增发票
-                </el-link> -->
-                <el-link
-                  v-if="$hasPermission('eom:purchaseorder:rowExport')"
-                  type="primary"
-                  :underline="false"
-                  icon="el-icon-download"
-                  @click="exportRowInfo(row)"
-                >
-                  导出
-                </el-link>
-              </template>
-            </ele-pro-table>
+                      打印<i class="el-icon-arrow-down el-icon--right"></i>
+                    </el-button>
+                    <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item
+                        @click.native="handlePrint('printPurchaseOrderRef')"
+                        >采购订单</el-dropdown-item
+                      >
+                    </el-dropdown-menu>
+                  </el-dropdown>
+                </template>
+
+                <!-- 查看详情列 -->
+                <template v-slot:relationName="{ row }">
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    @click="opencontractDetail(row)"
+                  >
+                    {{ row.relationName }}
+                  </el-link>
+                </template>
+                <template v-slot:orderNo="{ row }">
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    @click="openorderDetail(row)"
+                  >
+                    {{ row.orderNo }}
+                  </el-link>
+                </template>
+                <!-- 操作列 -->
+                <template v-slot:action="{ row }">
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-edit"
+                    v-if="
+                      (isNeed_process_is_close &&
+                        [0, 3].includes(row.orderStatus)) ||
+                      !isNeed_process_is_close
+                    "
+                    @click="openEditNew('edit', row)"
+                  >
+                    修改
+                  </el-link>
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-plus"
+                    @click="saleOrderSubmit(row)"
+                    v-if="
+                      isNeed_process_is_close && [0, 3].includes(row.orderStatus)
+                    "
+                  >
+                    提交
+                  </el-link>
+                  <el-popconfirm
+                    class="ele-action"
+                    title="确定要删除此信息吗?"
+                    v-if="
+                      (isNeed_process_is_close &&
+                        [0, 3].includes(row.orderStatus)) ||
+                      !isNeed_process_is_close
+                    "
+                    @confirm="remove([row.id])"
+                  >
+                    <template v-slot:reference>
+                      <el-link
+                        type="danger"
+                        :underline="false"
+                        icon="el-icon-delete"
+                      >
+                        删除
+                      </el-link>
+                    </template>
+                  </el-popconfirm>
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-plus"
+                    @click="handleCommand('outsourceSend', row)"
+                    v-if="
+                      ['3', '4', '5', '6', '8', '9'].includes(row.sourceType) &&
+                      [2].includes(row.orderStatus) &&
+                      row.progress < 200
+                    "
+                  >
+                    委外发货单
+                  </el-link>
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-plus"
+                    @click="handleCommand('invoice', row)"
+                    v-if="
+                      !['3', '4', '5', '6', '8', '9'].includes(row.sourceType) &&
+                      [2].includes(row.orderStatus) &&
+                      row.progress < 200 && row.isShowReceiptButton == 1
+                    "
+                  >
+                    收货单
+                  </el-link>
+                  <!-- <el-link
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-plus"
+                    @click="handleCommand('invoiceManage', row)"
+                    v-if="!row.hasInvoiceApply && [2].includes(row.orderStatus)"
+                  >
+                    新增发票
+                  </el-link> -->
+                  <el-link
+                    v-if="$hasPermission('eom:purchaseorder:rowExport')"
+                    type="primary"
+                    :underline="false"
+                    icon="el-icon-download"
+                    @click="exportRowInfo(row)"
+                  >
+                    导出
+                  </el-link>
+                </template>
+              </ele-pro-table>
+            </div>
           </div>
         </div>
         <div v-if="activeComp == 'outsourceSend'">
@@ -331,7 +334,8 @@ import exceptionList from '@/views/saleManage/saleOrder/exceptionManagement/exce
 import { getToDoReminder } from '@/api/common/index';
 import { exportTable } from '@/api/system/file/index.js';
 import printPurchaseOrder from '@/views/purchasingManage/purchaseOrder/invoice/components/print-PurchaseOrder.vue';
-  import { enterprisePage } from '@/api/contractManage/contractBook';
+import { enterprisePage } from '@/api/contractManage/contractBook';
+import { getSummaries } from '@/utils/util.js';
 
 export default {
   mixins: [dictMixins, tabMixins],
@@ -646,6 +650,13 @@ export default {
     clearInterval(this.timeR);
   },
   methods: {
+    getSummaries(param) {
+      return getSummaries(
+        param,
+        ['productCount', 'inboundCount', 'payAmount'],
+        ' '
+      );
+    },
     getToDoReminder() {
       getToDoReminder().then((res) => {
         this.toDoReminder = res;

+ 1 - 1
src/views/saleManage/saleOrder/index.vue

@@ -956,7 +956,7 @@ export default {
     getSummaries(param) {
         return getSummaries(
           param,
-          ['productCount', 'sendTotalCount', 'outboundTotalCount', ''],
+          ['productCount', 'sendTotalCount', 'outboundTotalCount', 'payAmount'],
           ' '
         );
       },

+ 1 - 1
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -531,7 +531,7 @@
         // warehouseName:'',
       };
       return {
-        cacheKeyUrl: 'eos-saleManage-invoice-inventoryTable',
+        cacheKeyUrl: 'eos-saleManage-invoice-inventoryTable-202605131602',
         current: {},
         childrenColumns: [
           {

+ 11 - 0
src/views/saleManage/saleOrder/invoice/components/print-template-ht-1.vue

@@ -40,6 +40,17 @@
         <span style="width: 30%">单据编码:{{ formData.docNo }}</span>
         <span style="width: 30%">单据日期:{{ formData.createTime ? formData.createTime.split(' ')[0] : '' }}</span>
       </div>
+      <div
+        style="
+          width: 100%;
+          font-size: 12px;
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 10px;
+        "
+      >
+        <span style="width: 80%">收货人联系方式:{{ formData.linkName }} {{ formData.linkPhone }}</span>
+      </div>
       <div
         style="
           width: 100%;