Browse Source

周转率列表增加周转率计算公示提示

lxf 1 năm trước cách đây
mục cha
commit
22df875203

+ 3 - 0
src/components/byTable/index.vue

@@ -130,6 +130,9 @@
           :selectable="(rowData, rowIndex) => isSelectable(rowData, rowIndex, item)"
           :sortable="item.sortable || false"
           :prop="item.attrs.prop">
+          <template #header v-if="item.header">
+            <slot :name="item.attrs.slotHeader" v-if="item.attrs.slotHeader"> 插槽占位符 </slot>
+          </template>
           <template #default="scope" v-if="!item.type">
             <slot :name="item.attrs.slot" :item="scope.row" v-if="item.attrs.slot"> 插槽占位符 </slot>
             <div v-else-if="isFunction(getValue(scope, item))">

+ 37 - 3
src/views/group/data-board/turnover-rate/index.vue

@@ -26,6 +26,7 @@
           action: () => deriveExcel(),
         },
       ]"
+      :tableHeight="'calc(100vh - 297px)'"
       @get-list="getList"
       @clickReset="clickReset">
       <template #bomSpecName="{ item }">
@@ -40,6 +41,33 @@
           </el-tooltip>
         </div>
       </template>
+      <template #turnoverRateThirtyDays>
+        <span>30天周转率</span>
+        <el-tooltip class="box-item" effect="dark" placement="bottom">
+          <template #content>
+            <div>库存周转率=时间段天数/(时间段天数X (1/2) X (期初库存数量+期末库存数量)/时间段销售量)</div>
+          </template>
+          <el-icon style="cursor: pointer; margin-left: 4px; transform: translateY(2px)"><QuestionFilled /></el-icon>
+        </el-tooltip>
+      </template>
+      <template #turnoverRateSixtyDays>
+        <span>60天周转率</span>
+        <el-tooltip class="box-item" effect="dark" placement="bottom">
+          <template #content>
+            <div>库存周转率=时间段天数/(时间段天数X (1/2) X (期初库存数量+期末库存数量)/时间段销售量)</div>
+          </template>
+          <el-icon style="cursor: pointer; margin-left: 4px; transform: translateY(2px)"><QuestionFilled /></el-icon>
+        </el-tooltip>
+      </template>
+      <template #turnoverRateNinetyDays>
+        <span>90天周转率</span>
+        <el-tooltip class="box-item" effect="dark" placement="bottom">
+          <template #content>
+            <div>库存周转率=时间段天数/(时间段天数X (1/2) X (期初库存数量+期末库存数量)/时间段销售量)</div>
+          </template>
+          <el-icon style="cursor: pointer; margin-left: 4px; transform: translateY(2px)"><QuestionFilled /></el-icon>
+        </el-tooltip>
+      </template>
     </byTable>
   </el-card>
 </template>
@@ -123,9 +151,11 @@ const config = computed(() => {
       attrs: {
         label: "30天周转率",
         prop: "turnoverRateThirtyDays",
-        width: 130,
+        width: 140,
+        slotHeader: "turnoverRateThirtyDays",
       },
       sortable: true,
+      header: true,
     },
     {
       attrs: {
@@ -138,9 +168,11 @@ const config = computed(() => {
       attrs: {
         label: "60天周转率",
         prop: "turnoverRateSixtyDays",
-        width: 130,
+        width: 140,
+        slotHeader: "turnoverRateSixtyDays",
       },
       sortable: true,
+      header: true,
     },
     {
       attrs: {
@@ -153,9 +185,11 @@ const config = computed(() => {
       attrs: {
         label: "90天周转率",
         prop: "turnoverRateNinetyDays",
-        width: 130,
+        width: 140,
+        slotHeader: "turnoverRateNinetyDays",
       },
       sortable: true,
+      header: true,
     },
     {
       attrs: {