Browse Source

Merge branch '对账单分类' into 测试

lxf 1 year ago
parent
commit
94b97433af

+ 48 - 11
src/views/group/finance/check-bill/index.vue

@@ -122,18 +122,23 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
-      <el-tabs v-model="activeName" class="demo-tabs">
-        <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
-        </el-tab-pane>
-        <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
-        </el-tab-pane>
-        <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>
-        </el-tab-pane>
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%" class="print">
+      <el-tabs v-model="tabsCard" type="card">
+        <el-tab-pane v-for="(item, index) in cardList" :key="index" :label="item.dictValue" :name="item.dictKey"> </el-tab-pane>
       </el-tabs>
+      <div style="padding: 0 10px">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="SKU对账单" name="sku">
+            <PrintSKU :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintSKU>
+          </el-tab-pane>
+          <el-tab-pane label="BOM对账单" name="bom">
+            <PrintBOM :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintBOM>
+          </el-tab-pane>
+          <el-tab-pane label="订单对账单" name="order">
+            <PrintOrder :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="clickCancel"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
 
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
@@ -604,8 +609,32 @@ const submitProofFile = () => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
+const cardList = ref([
+  {
+    dictKey: 1,
+    dictValue: "万里牛订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "采购订单",
+  },
+  {
+    dictKey: 3,
+    dictValue: "委外订单",
+  },
+  {
+    dictKey: 4,
+    dictValue: "售后订单",
+  },
+  {
+    dictKey: 5,
+    dictValue: "无理由订单",
+  },
+]);
+const tabsCard = ref(1);
 const activeName = ref("sku");
 const clickPrint = (row) => {
+  tabsCard.value = 1;
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
@@ -639,4 +668,12 @@ const clickExcelFile = () => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>

+ 14 - 9
src/views/group/finance/check-bill/printBOM.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card v-loading="loading">
-    <div style="height: calc(100vh - 264px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px); overflow-y: auto; overflow-x: hidden">
       <el-table :data="tableData" border :row-style="{ height: '35px' }" header-row-class-name="tableHeader" show-summary :summary-method="getSummaries">
         <el-table-column align="center">
           <template #header>
@@ -30,9 +30,9 @@
         </el-table-column>
       </el-table>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -43,17 +43,19 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "bom" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "bom" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.id) {
         loading.value = true;
-        proxy.post("/statementOfAccount/getDocumentByBom", { id: props.rowData.id }).then(
+        proxy.post("/statementOfAccount/getDocumentByBom", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             tableData.value = Object.freeze(res);
             loading.value = false;
@@ -187,7 +189,7 @@ const clickCancel = () => {
 const deriveExcel = () => {
   ElMessage("导出文件中,请稍后");
   loading.value = true;
-  proxy.getFile("/statementOfAccount/exportDocumentByBom", { id: props.rowData.id }).then(
+  proxy.getFile("/statementOfAccount/exportDocumentByBom", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
     (res) => {
       proxy.downloadFile(res, "BOM对账单.xlsx");
       loading.value = false;
@@ -216,4 +218,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 14 - 9
src/views/group/finance/check-bill/printOrder.vue

@@ -2,7 +2,7 @@
   <el-card v-loading="loading">
     <div style="text-align: center; font-size: 30px; padding: 8px; font-weight: 700">{{ props.rowData.departmentName }}-胜德体育对账单</div>
     <div style="text-align: center; font-size: 18px; padding-bottom: 8px; font-weight: 700">( 对账时间: {{ rowData.timePeriod }} )</div>
-    <div style="height: calc(100vh - 264px - 88px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px - 88px); overflow-y: auto; overflow-x: hidden">
       <el-auto-resizer>
         <template #default="{ height, width }">
           <el-table-v2 :columns="columns" :data="tableData" :width="width" :height="height" fixed :cache="20" :header-height="35" :row-height="35">
@@ -13,9 +13,9 @@
         </template>
       </el-auto-resizer>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -26,7 +26,7 @@ import { cloneVNode } from "vue";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -41,13 +41,15 @@ const getAggregate = (data) => {
   }
   return total;
 };
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "order" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "order" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.id) {
         loading.value = true;
-        proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id }).then(
+        proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             let total = getAggregate(proxy.deepClone(res));
             let list = [];
@@ -127,7 +129,7 @@ const clickCancel = () => {
 };
 const deriveExcel = () => {
   loading.value = true;
-  proxy.getFile("/statementOfAccount/exportDocumentByOrder", { id: props.rowData.id }).then(
+  proxy.getFile("/statementOfAccount/exportDocumentByOrder", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
     () => {
       emit("clickCancel", true);
       // proxy.downloadFile(res, "订单对账单.xlsx");
@@ -301,4 +303,7 @@ const Row = ({ rowData, cells }) => {
 ::v-deep(.el-table-v2__header-cell) {
   background-color: #eeeeee !important;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 14 - 9
src/views/group/finance/check-bill/printSKU.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card v-loading="loading">
-    <div style="height: calc(100vh - 264px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px); overflow-y: auto; overflow-x: hidden">
       <el-table :data="tableData" border :row-style="{ height: '35px' }" header-row-class-name="tableHeader" show-summary :summary-method="getSummaries">
         <el-table-column align="center">
           <template #header>
@@ -24,9 +24,9 @@
         </el-table-column>
       </el-table>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -37,17 +37,19 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "sku" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "sku" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.id) {
         loading.value = true;
-        proxy.post("/statementOfAccount/getDocumentBySku", { id: props.rowData.id }).then(
+        proxy.post("/statementOfAccount/getDocumentBySku", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             tableData.value = Object.freeze(res);
             loading.value = false;
@@ -174,7 +176,7 @@ const clickCancel = () => {
 const deriveExcel = () => {
   ElMessage("导出文件中,请稍后");
   loading.value = true;
-  proxy.getFile("/statementOfAccount/exportDocumentBySku", { id: props.rowData.id }).then(
+  proxy.getFile("/statementOfAccount/exportDocumentBySku", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
     (res) => {
       proxy.downloadFile(res, "SKU对账单.xlsx");
       loading.value = false;
@@ -203,4 +205,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 48 - 11
src/views/group/finance/summary/index.vue

@@ -20,18 +20,23 @@
       </byTable>
     </el-card>
 
-    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
-      <el-tabs v-model="activeName" class="demo-tabs">
-        <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
-        </el-tab-pane>
-        <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
-        </el-tab-pane>
-        <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>
-        </el-tab-pane>
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%" class="print">
+      <el-tabs v-model="tabsCard" type="card">
+        <el-tab-pane v-for="(item, index) in cardList" :key="index" :label="item.dictValue" :name="item.dictKey"> </el-tab-pane>
       </el-tabs>
+      <div style="padding: 0 10px">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="SKU对账单" name="sku">
+            <PrintSKU :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintSKU>
+          </el-tab-pane>
+          <el-tab-pane label="BOM对账单" name="bom">
+            <PrintBOM :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintBOM>
+          </el-tab-pane>
+          <el-tab-pane label="订单对账单" name="order">
+            <PrintOrder :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="clickCancel"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
     
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
@@ -225,8 +230,32 @@ const changeRadioGroup = () => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
+const cardList = ref([
+  {
+    dictKey: 1,
+    dictValue: "万里牛订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "采购订单",
+  },
+  {
+    dictKey: 3,
+    dictValue: "委外订单",
+  },
+  {
+    dictKey: 4,
+    dictValue: "售后订单",
+  },
+  {
+    dictKey: 5,
+    dictValue: "无理由订单",
+  },
+]);
+const tabsCard = ref(1);
 const activeName = ref("sku");
 const clickPrint = (row) => {
+  tabsCard.value = 1;
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
@@ -262,4 +291,12 @@ const clickExcelFile = () => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>

+ 14 - 8
src/views/group/finance/summary/printBOM.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card v-loading="loading">
-    <div style="height: calc(100vh - 264px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px); overflow-y: auto; overflow-x: hidden">
       <el-table :data="tableData" border :row-style="{ height: '35px' }" header-row-class-name="tableHeader" show-summary :summary-method="getSummaries">
         <el-table-column align="center">
           <template #header>
@@ -30,9 +30,9 @@
         </el-table-column>
       </el-table>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -43,17 +43,19 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "bom" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "bom" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.idGroupConcat) {
         loading.value = true;
-        proxy.post("/statementOfAccountMerge/getDocumentByBom", { idGroupConcat: props.rowData.idGroupConcat }).then(
+        proxy.post("/statementOfAccountMerge/getDocumentByBom", { idGroupConcat: props.rowData.idGroupConcat, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             tableData.value = Object.freeze(res);
             loading.value = false;
@@ -192,6 +194,7 @@ const deriveExcel = () => {
       idGroupConcat: props.rowData.idGroupConcat,
       departmentName: props.rowData.departmentName,
       beginDate: props.rowData.dimensionality,
+      orderClassify: props.tabValues.tabsCard,
     })
     .then(
       (res) => {
@@ -222,4 +225,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 14 - 8
src/views/group/finance/summary/printOrder.vue

@@ -2,7 +2,7 @@
   <el-card v-loading="loading">
     <div style="text-align: center; font-size: 30px; padding: 8px; font-weight: 700">{{ props.rowData.departmentName }}-胜德体育对账单</div>
     <div style="text-align: center; font-size: 18px; padding-bottom: 8px; font-weight: 700">( 对账时间: {{ props.rowData.dimensionality }} )</div>
-    <div style="height: calc(100vh - 264px - 88px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px - 88px); overflow-y: auto; overflow-x: hidden">
       <el-auto-resizer>
         <template #default="{ height, width }">
           <el-table-v2 :columns="columns" :data="tableData" :width="width" :height="height" fixed :cache="20" :header-height="35" :row-height="35">
@@ -13,9 +13,9 @@
         </template>
       </el-auto-resizer>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -25,7 +25,7 @@ import { cloneVNode } from "vue";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -40,13 +40,15 @@ const getAggregate = (data) => {
   }
   return total;
 };
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "order" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "order" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.idGroupConcat) {
         loading.value = true;
-        proxy.post("/statementOfAccountMerge/getDocumentByOrder", { idGroupConcat: props.rowData.idGroupConcat }).then(
+        proxy.post("/statementOfAccountMerge/getDocumentByOrder", { idGroupConcat: props.rowData.idGroupConcat, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             let total = getAggregate(proxy.deepClone(res));
             let list = [];
@@ -131,6 +133,7 @@ const deriveExcel = () => {
       idGroupConcat: props.rowData.idGroupConcat,
       departmentName: props.rowData.departmentName,
       beginDate: props.rowData.dimensionality,
+      orderClassify: props.tabValues.tabsCard,
     })
     .then(
       () => {
@@ -306,4 +309,7 @@ const Row = ({ rowData, cells }) => {
 ::v-deep(.el-table-v2__header-cell) {
   background-color: #eeeeee !important;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 14 - 8
src/views/group/finance/summary/printSKU.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card v-loading="loading">
-    <div style="height: calc(100vh - 264px); overflow-y: auto; overflow-x: hidden">
+    <div style="height: calc(100vh - 235px); overflow-y: auto; overflow-x: hidden">
       <el-table :data="tableData" border :row-style="{ height: '35px' }" header-row-class-name="tableHeader" show-summary :summary-method="getSummaries">
         <el-table-column align="center">
           <template #header>
@@ -24,9 +24,9 @@
         </el-table-column>
       </el-table>
     </div>
-    <div style="padding: 8px; text-align: center">
-      <el-button @click="clickCancel" size="large">关 闭</el-button>
-      <el-button type="primary" @click="deriveExcel()" size="large" v-preReClick>导 出</el-button>
+    <div style="padding: 4px; text-align: center">
+      <el-button @click="clickCancel">关 闭</el-button>
+      <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
   </el-card>
 </template>
@@ -37,17 +37,19 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
-  activeName: String,
+  tabValues: Object,
 });
 const loading = ref(false);
 const tableData = ref([]);
+const tabsCard = ref();
 watch(
-  () => props.activeName,
+  () => props.tabValues,
   (val) => {
-    if (val === "sku" && !(tableData.value && tableData.value.length > 0)) {
+    if (val.activeName === "sku" && val.tabsCard != tabsCard.value) {
+      tabsCard.value = val.tabsCard;
       if (props.rowData && props.rowData.idGroupConcat) {
         loading.value = true;
-        proxy.post("/statementOfAccountMerge/getDocumentBySku", { idGroupConcat: props.rowData.idGroupConcat }).then(
+        proxy.post("/statementOfAccountMerge/getDocumentBySku", { idGroupConcat: props.rowData.idGroupConcat, orderClassify: props.tabValues.tabsCard }).then(
           (res) => {
             tableData.value = Object.freeze(res);
             loading.value = false;
@@ -179,6 +181,7 @@ const deriveExcel = () => {
       idGroupConcat: props.rowData.idGroupConcat,
       departmentName: props.rowData.departmentName,
       beginDate: props.rowData.dimensionality,
+      orderClassify: props.tabValues.tabsCard,
     })
     .then(
       (res) => {
@@ -209,4 +212,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 48 - 11
src/views/subsidiary/finance/check-bill/index.vue

@@ -49,18 +49,23 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
-      <el-tabs v-model="activeName" class="demo-tabs">
-        <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
-        </el-tab-pane>
-        <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
-        </el-tab-pane>
-        <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>
-        </el-tab-pane>
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%" class="print">
+      <el-tabs v-model="tabsCard" type="card">
+        <el-tab-pane v-for="(item, index) in cardList" :key="index" :label="item.dictValue" :name="item.dictKey"> </el-tab-pane>
       </el-tabs>
+      <div style="padding: 0 10px">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="SKU对账单" name="sku">
+            <PrintSKU :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintSKU>
+          </el-tab-pane>
+          <el-tab-pane label="BOM对账单" name="bom">
+            <PrintBOM :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintBOM>
+          </el-tab-pane>
+          <el-tab-pane label="订单对账单" name="order">
+            <PrintOrder :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="clickCancel"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
     
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
@@ -232,8 +237,32 @@ const openFile = (path) => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
+const cardList = ref([
+  {
+    dictKey: 1,
+    dictValue: "万里牛订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "采购订单",
+  },
+  {
+    dictKey: 3,
+    dictValue: "委外订单",
+  },
+  {
+    dictKey: 4,
+    dictValue: "售后订单",
+  },
+  {
+    dictKey: 5,
+    dictValue: "无理由订单",
+  },
+]);
+const tabsCard = ref(1);
 const activeName = ref("sku");
 const clickPrint = (row) => {
+  tabsCard.value = 1;
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
@@ -255,4 +284,12 @@ const clickExcelFile = () => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>

+ 48 - 11
src/views/subsidiary/finance/summary/index.vue

@@ -20,18 +20,23 @@
       </byTable>
     </el-card>
 
-    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
-      <el-tabs v-model="activeName" class="demo-tabs">
-        <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
-        </el-tab-pane>
-        <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
-        </el-tab-pane>
-        <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="clickCancel"></PrintOrder>
-        </el-tab-pane>
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%" class="print">
+      <el-tabs v-model="tabsCard" type="card">
+        <el-tab-pane v-for="(item, index) in cardList" :key="index" :label="item.dictValue" :name="item.dictKey"> </el-tab-pane>
       </el-tabs>
+      <div style="padding: 0 10px">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="SKU对账单" name="sku">
+            <PrintSKU :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintSKU>
+          </el-tab-pane>
+          <el-tab-pane label="BOM对账单" name="bom">
+            <PrintBOM :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="openPrint = false"></PrintBOM>
+          </el-tab-pane>
+          <el-tab-pane label="订单对账单" name="order">
+            <PrintOrder :rowData="rowData" :tabValues="{ activeName: activeName, tabsCard: tabsCard }" @clickCancel="clickCancel"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
     
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
@@ -192,8 +197,32 @@ const changeRadioGroup = () => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
+const cardList = ref([
+  {
+    dictKey: 1,
+    dictValue: "万里牛订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "采购订单",
+  },
+  {
+    dictKey: 3,
+    dictValue: "委外订单",
+  },
+  {
+    dictKey: 4,
+    dictValue: "售后订单",
+  },
+  {
+    dictKey: 5,
+    dictValue: "无理由订单",
+  },
+]);
+const tabsCard = ref(1);
 const activeName = ref("sku");
 const clickPrint = (row) => {
+  tabsCard.value = 1;
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
@@ -215,4 +244,12 @@ const clickExcelFile = () => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>