lxf 1 жил өмнө
parent
commit
70b951f1af

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

@@ -117,18 +117,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="openPrint = false"></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="openPrint = false"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -591,8 +596,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;
@@ -616,4 +645,12 @@ const clickCopyWLNCode = (row) => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>

+ 8 - 4
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>
@@ -44,6 +44,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
   activeName: String,
+  tabsCard: Number,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -216,4 +217,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 8 - 4
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>
@@ -28,6 +28,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
   activeName: String,
+  tabsCard: Number,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -296,4 +297,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>

+ 13 - 8
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;
@@ -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

@@ -14,18 +14,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="openPrint = false"></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" :activeName="activeName" :tabsCard="tabsCard" @clickCancel="openPrint = false"></PrintSKU>
+          </el-tab-pane>
+          <el-tab-pane label="BOM对账单" name="bom">
+            <PrintBOM :rowData="rowData" :activeName="activeName" :tabsCard="tabsCard" @clickCancel="openPrint = false"></PrintBOM>
+          </el-tab-pane>
+          <el-tab-pane label="订单对账单" name="order">
+            <PrintOrder :rowData="rowData" :activeName="activeName" :tabsCard="tabsCard" @clickCancel="openPrint = false"></PrintOrder>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -211,8 +216,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;
@@ -238,4 +267,12 @@ const clickCopyWLNCode = (row) => {
   margin-top: 10px !important;
   margin-bottom: 10px !important;
 }
+:deep(.print) {
+  .el-dialog__body {
+    padding: 10px 20px !important;
+    .el-tabs__header {
+      margin: 0 !important;
+    }
+  }
+}
 </style>

+ 8 - 4
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>
@@ -44,6 +44,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
   activeName: String,
+  tabsCard: Number,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -222,4 +223,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>

+ 8 - 4
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>
@@ -28,6 +28,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
   activeName: String,
+  tabsCard: Number,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -302,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>

+ 8 - 4
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>
@@ -38,6 +38,7 @@ const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
   activeName: String,
+  tabsCard: Number,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -209,4 +210,7 @@ const deriveExcel = () => {
 ::v-deep(.el-table__footer .el-table__cell) {
   border-right: 0px;
 }
+::v-deep(.el-card__body) {
+  padding: 10px !important;
+}
 </style>