huminmin
昨天 e94be34b586911ab4d58dc825d93400c966cc351
仓储物流:入库出库列表增加来源
已添加1个文件
已修改7个文件
116 ■■■■ 文件已修改
src/api/basicData/enum.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inventoryManagement/stockInventory.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inventoryManagement/stockUninventory.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/dispatchLog/Record.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Qualified.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Unqualified.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/enum.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
import request from "@/utils/request.js";
export function findAllStockRecordTypeOptions() {
    return request({
        url: '/basic/enum/stockRecordType',
        method: 'get'
    })
}
src/api/inventoryManagement/stockInventory.js
@@ -13,7 +13,7 @@
    return request({
        url: "/stockInventory/addstockInventory",
        method: "post",
        params,
        data: params,
    });
};
@@ -22,6 +22,6 @@
    return request({
        url: "/stockInventory/subtractStockInventory",
        method: "post",
        params,
        data: params,
    });
};
src/api/inventoryManagement/stockUninventory.js
@@ -13,7 +13,7 @@
    return request({
        url: "/stockUninventory/addstockUninventory",
        method: "post",
        params,
        data: params,
    });
};
@@ -22,6 +22,6 @@
    return request({
        url: "/stockUninventory/subtractstockUninventory",
        method: "post",
        params,
        data: params,
    });
};
src/views/inventoryManagement/dispatchLog/Record.vue
@@ -12,6 +12,16 @@
                    clearable
                    @change="handleQuery"
                />
        <span class="search_title ml10">来源:</span>
        <el-select v-model="searchForm.recordType"
                   style="width: 240px"
                   placeholder="请选择"
                   clearable>
          <el-option v-for="item in stockRecordTypeOptions"
                     :key="item.value"
                     :label="item.value"
                     :value="item.key"/>
        </el-select>
                <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
                >搜索</el-button
                >
@@ -71,6 +81,13 @@
                    prop="createBy"
                    show-overflow-tooltip
                />
        <el-table-column label="来源"
                         prop="recordType"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
            </el-table>
            <pagination
                v-show="total > 0"
@@ -94,12 +111,15 @@
    getStockOutPage,
    delStockOut,
} from "@/api/inventoryManagement/stockOut.js";
import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
// æ¥æºç±»åž‹é€‰é¡¹
const stockRecordTypeOptions = ref([]);
const page = reactive({
    current: 1,
    size: 100,
@@ -123,26 +143,8 @@
    searchForm: {
        supplierName: "",
        timeStr: "",
    },
    form: {
        supplierId: null,
        supplierName: '',
        productId: null,
        productName: '',
        userId: userStore.userId,
        nickName: '',
        model: '',
        productModelId: null,
        unit: '',
        productrecordId: null,
        taxInclusiveUnitPrice: '',
        taxInclusiveTotalPrice: '',
        taxRate: '',
        taxExclusiveTotalPrice: '',
        inboundTime: '',
        inboundBatch: '',
        inboundQuantity: ''
    },
    recordType: "",
    }
});
const { searchForm } = toRefs(data);
@@ -172,6 +174,18 @@
            tableLoading.value = false;
        });
};
const getRecordType = (recordType) => {
  return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
}
// èŽ·å–æ¥æºç±»åž‹é€‰é¡¹
const fetchStockRecordTypeOptions = () => {
  findAllStockRecordTypeOptions()
      .then(res => {
        stockRecordTypeOptions.value = res.data;
      })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
const handleSelectionChange = (selection) => {
@@ -512,6 +526,7 @@
};
onMounted(() => {
    getList();
  fetchStockRecordTypeOptions();
});
</script>
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -15,6 +15,16 @@
                  style="width: 240px"
                  placeholder="请输入"
                  clearable/>
        <span class="search_title ml10">来源:</span>
        <el-select v-model="searchForm.recordType"
                  style="width: 240px"
                  placeholder="请选择"
                  clearable>
          <el-option v-for="item in stockRecordTypeOptions"
                     :key="item.value"
                     :label="item.value"
                     :value="item.key"/>
        </el-select>
        <el-button type="primary"
                   @click="handleQuery"
                   style="margin-left: 10px">搜索
@@ -66,6 +76,13 @@
        <el-table-column label="入库人"
                         prop="createBy"
                         show-overflow-tooltip/>
        <el-table-column label="来源"
                         prop="recordType"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
      </el-table>
      <pagination v-show="total > 0"
                  :total="total"
@@ -85,13 +102,13 @@
  toRefs,
  onMounted,
  getCurrentInstance,
  nextTick,
} from "vue";
import {ElMessageBox} from "element-plus";
import {
  getStockInRecordListPage,
  batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -106,8 +123,8 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
const activeTab = ref("production"); // å½“前激活的 tab
// æ¥æºç±»åž‹é€‰é¡¹
const stockRecordTypeOptions = ref([]);
const page = reactive({
  current: 1,
  size: 100,
@@ -118,6 +135,7 @@
  searchForm: {
    productName: "",
    timeStr: "",
    recordType: "",
  },
});
const {searchForm} = toRefs(data);
@@ -127,6 +145,10 @@
  page.current = 1;
  getList();
};
const getRecordType = (recordType) => {
  return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
}
const pageProductChange = obj => {
  page.current = obj.page;
@@ -147,6 +169,14 @@
  })
};
// èŽ·å–æ¥æºç±»åž‹é€‰é¡¹
const fetchStockRecordTypeOptions = () => {
  findAllStockRecordTypeOptions()
      .then(res => {
        stockRecordTypeOptions.value = res.data;
      })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
const handleSelectionChange = selection => {
  selectedRows.value = selection.filter(item => item.id);
@@ -164,9 +194,6 @@
      .then(() => {
        // æ ¹æ®ä¸åŒçš„ tab ç±»åž‹è°ƒç”¨ä¸åŒçš„导出接口
        let exportUrl = "/stockin/export";
        if (activeTab.value === "production") {
          exportUrl = "/stockin/exportOne";
        }
        proxy.download(exportUrl, {}, "入库台账.xlsx");
      })
      .catch(() => {
@@ -204,6 +231,7 @@
onMounted(() => {
  getList();
  fetchStockRecordTypeOptions();
});
</script>
src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -20,12 +20,12 @@
        :row-class-name="tableRowClassName" height="calc(100vh - 18.5em)">
        <el-table-column align="center" type="selection" width="55" />
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column label="入库日期" prop="createTime" show-overflow-tooltip />
        <el-table-column label="产品大类" prop="productName" show-overflow-tooltip />
        <el-table-column label="规格型号" prop="model" 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="warnNum"  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">
          <template #default="scope">
src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -20,12 +20,12 @@
        :row-class-name="tableRowClassName" height="calc(100vh - 18.5em)">
        <el-table-column align="center" type="selection" width="55" />
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column label="入库日期" prop="createTime" show-overflow-tooltip />
        <el-table-column label="产品大类" prop="productName" show-overflow-tooltip />
        <el-table-column label="规格型号" prop="model" 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="warnNum"  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">
          <template #default="scope">
src/views/inventoryManagement/stockManagement/index.vue
@@ -16,7 +16,6 @@
import UnqualifiedRecord from "@/views/inventoryManagement/stockManagement/Unqualified.vue";
const activeTab = ref('qualified')
const type = ref(0)
const tabs = ref([
  {
    label: '合格库存',