yuan
7 天以前 4a811fb2cd4ee4e1cbfe284bfd1fe3a7d16204ce
src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -1,16 +1,45 @@
<template>
  <div class="app-container">
    <div class="search_form">
      <div>
        <span class="search_title ml10">产品大类:</span>
        <el-input v-model="searchForm.productName"
                  style="width: 240px"
                  placeholder="请输入"
                  clearable/>
        <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button>
    <div class="search_form search_form--wrap">
      <div class="search-field">
        <span class="search_title">产品名称:</span>
        <el-input
          v-model="searchForm.productName"
          class="search-input"
          placeholder="请输入"
          clearable
        />
      </div>
      <div>
         <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button>
      <div class="search-field">
        <span class="search_title">规格型号:</span>
        <el-input
          v-model="searchForm.model"
          class="search-input"
          placeholder="请输入"
          clearable
        />
      </div>
      <div class="search-field">
        <span class="search_title">UID码:</span>
        <el-input
          v-model="searchForm.uidNo"
          class="search-input"
          placeholder="请输入"
          clearable
        />
      </div>
      <div class="search-field">
        <span class="search_title">批次号:</span>
        <el-input
          v-model="searchForm.batchNo"
          class="search-input"
          placeholder="请输入"
          clearable
        />
      </div>
      <div class="search-field search-field--actions">
        <el-button type="primary" @click="handleQuery">搜索</el-button>
        <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button>
        <el-button @click="handleOut">导出</el-button>
      </div>
    </div>
@@ -22,12 +51,15 @@
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column label="产品大类" prop="productName" show-overflow-tooltip />
        <el-table-column label="规格型号" prop="model" show-overflow-tooltip />
        <el-table-column label="UID码" prop="uidNo" show-overflow-tooltip />
        <el-table-column label="批号" prop="batchNo" show-overflow-tooltip />
        <el-table-column label="供应商" prop="customer" show-overflow-tooltip />
        <el-table-column label="单位" prop="unit" show-overflow-tooltip />
        <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip />
        <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip />
        <el-table-column label="备注" prop="remark"  show-overflow-tooltip />
        <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip />
        <el-table-column fixed="right" label="操作" min-width="60" align="center">
        <el-table-column fixed="right" label="操作" min-width="120" align="center">
          <template #default="scope">
            <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button>
            <el-button link type="primary" size="small" v-if="scope.row.unLockedQuantity > 0" @click="showFrozenModal(scope.row)">冻结</el-button>
@@ -60,7 +92,7 @@
<script setup>
import pagination from '@/components/PIMTable/Pagination.vue'
import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue'
import { ref, reactive, toRefs, onMounted, getCurrentInstance, defineAsyncComponent } from 'vue'
import { ElMessageBox } from "element-plus";
import { getStockUninventoryListPage } from "@/api/inventoryManagement/stockUninventory.js";
const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue"));
@@ -88,6 +120,9 @@
const data = reactive({
  searchForm: {
    productName: '',
    model: '',
    uidNo: '',
    batchNo: '',
  }
})
const { searchForm } = toRefs(data)
@@ -145,13 +180,8 @@
const expandedRowKeys = ref([])
// 表格行类名
const tableRowClassName = ({ row }) => {
  // const stock = Number(row?.unLockedQuantity ?? 0);
  // const warn = Number(row?.warnNum ?? 0);
  // if (!Number.isFinite(stock) || !Number.isFinite(warn)) {
  //   return '';
  // }
  // return stock < warn ? 'row-low-stock' : '';
const tableRowClassName = () => {
  return '';
};
// 导出
@@ -164,7 +194,7 @@
    type: 'warning',
  }
  ).then(() => {
    proxy.download("/stockUninventory/exportStockUninventory", {}, '不合格库存信息.xlsx')
    proxy.download("/stockUninventory/exportStockUninventory", { ...searchForm.value }, '不合格库存信息.xlsx')
  }).catch(() => {
    proxy.$modal.msg("已取消")
  })
@@ -176,6 +206,37 @@
</script>
<style scoped lang="scss">
.search_form--wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.search-field {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
  .search_title {
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
    min-width: 4.5em;
  }
  .search-input {
    width: 200px;
  }
}
.search-field--actions {
  flex-wrap: wrap;
  gap: 8px;
}
:deep(.row-low-stock td) {
  background-color: #fde2e2;
  color: #c45656;