feat: 🚀 新增仓位找货优先级

This commit is contained in:
2025-10-23 15:16:29 +08:00
parent f3bc8e6410
commit d0d6853806
10 changed files with 92 additions and 26 deletions

3
src/components.d.ts vendored
View File

@@ -16,6 +16,7 @@ declare module "vue" {
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"]; ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"]; ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
ElButton: typeof import("element-plus/es")["ElButton"]; ElButton: typeof import("element-plus/es")["ElButton"];
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
ElContainer: typeof import("element-plus/es")["ElContainer"]; ElContainer: typeof import("element-plus/es")["ElContainer"];
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"]; ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
ElDialog: typeof import("element-plus/es")["ElDialog"]; ElDialog: typeof import("element-plus/es")["ElDialog"];
@@ -28,6 +29,7 @@ declare module "vue" {
ElHeader: typeof import("element-plus/es")["ElHeader"]; ElHeader: typeof import("element-plus/es")["ElHeader"];
ElIcon: typeof import("element-plus/es")["ElIcon"]; ElIcon: typeof import("element-plus/es")["ElIcon"];
ElInput: typeof import("element-plus/es")["ElInput"]; ElInput: typeof import("element-plus/es")["ElInput"];
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
ElMain: typeof import("element-plus/es")["ElMain"]; ElMain: typeof import("element-plus/es")["ElMain"];
ElMenu: typeof import("element-plus/es")["ElMenu"]; ElMenu: typeof import("element-plus/es")["ElMenu"];
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"]; ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
@@ -42,6 +44,7 @@ declare module "vue" {
ElTabPane: typeof import("element-plus/es")["ElTabPane"]; ElTabPane: typeof import("element-plus/es")["ElTabPane"];
ElTabs: typeof import("element-plus/es")["ElTabs"]; ElTabs: typeof import("element-plus/es")["ElTabs"];
ElTag: typeof import("element-plus/es")["ElTag"]; ElTag: typeof import("element-plus/es")["ElTag"];
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"]; Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
Form: typeof import("./components/Form/index.vue")["default"]; Form: typeof import("./components/Form/index.vue")["default"];
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"]; FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];

View File

@@ -37,6 +37,7 @@
:placeholder="item.placeholder" :placeholder="item.placeholder"
:disabled="item.disabled" :disabled="item.disabled"
type="textarea" type="textarea"
:maxlength="item.maxLength ? item.maxLength : 255"
> >
</el-input> </el-input>
</template> </template>

View File

@@ -0,0 +1,40 @@
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
<PermissionButton
:buttons="dataStore.buttons"
@handleButtonClickCallback="handleButtonClickCallback"
></PermissionButton>
</div>
<div class="card table-main">
<DetailsSearch
:formData="dataStore.formData"
:ruleForm="dataStore.ruleForm"
:labelWidth="dataStore.labelWidth"
:inline="true"
ref="detailsRef"
/>
</div>
</div>
</template>
<script setup lang="ts" name="foundationSetGoodsAdd">
import { BUTTON } from "./constant/list/addButton";
import { cloneDeep } from "lodash-es";
import { DETAILS_FORM_DATA, DETAILS_RULE_FORM } from "./constant/list/add";
import DetailsSearch from "@/components/DetailsSearch/index.vue";
import PermissionButton from "@/components/PermissionButton/index.vue";
// 数据源
const dataStore = reactive<any>({
buttons: cloneDeep(BUTTON),
labelWidth: "120px",
formData: cloneDeep(DETAILS_FORM_DATA),
ruleForm: cloneDeep(DETAILS_RULE_FORM)
});
const detailsRef = ref(null);
console.log(dataStore.buttons, "======================");
const handleButtonClickCallback = () => {};
</script>
<style scoped></style>

View File

@@ -0,0 +1,21 @@
export const DETAILS_FORM_DATA: any[] = [
{
prop: "org_number",
placeholder: "请选择",
type: "select",
label: "仓库:",
disabled: false,
required: true,
class: "form-item1"
},
{
prop: "org_number",
placeholder: "请输入",
type: "textarea",
label: "仓位:",
disabled: false,
class: "form-item1",
maxLength: 5000
}
];
export const DETAILS_RULE_FORM: any = {};

View File

@@ -1,7 +1,7 @@
export const BUTTON = [ export const BUTTON = [
{ {
text: "保存", text: "保存",
permission: "foundationSetGoodsBtnSave", permission: "foundationSetGoodsAddBtnSave",
type: "save", type: "save",
props: { props: {
type: "primary" type: "primary"
@@ -9,7 +9,7 @@ export const BUTTON = [
}, },
{ {
text: "预览(请先保存)", text: "预览(请先保存)",
permission: "foundationSetGoodsBtnPreview", permission: "foundationSetGoodsAddBtnPreview",
type: "preview" type: "preview"
} }
]; ];

View File

@@ -27,7 +27,7 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="foundationSetWarehouse"> <script setup lang="ts" name="foundationSetGoods">
import ProTable from "@/components/ProTable/index.vue"; import ProTable from "@/components/ProTable/index.vue";
import SearchForm from "@/components/SearchForm/index.vue"; import SearchForm from "@/components/SearchForm/index.vue";
import PermissionButton from "@/components/PermissionButton/index.vue"; import PermissionButton from "@/components/PermissionButton/index.vue";
@@ -42,7 +42,7 @@ import { ProTableInstance } from "@/components/ProTable/interface";
import { cloneDeep } from "lodash-es"; import { cloneDeep } from "lodash-es";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数) // 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<ProTableInstance>(); const proTableRef = ref<ProTableInstance>();
const $router = useRouter();
// 数据源 // 数据源
const dataStore = reactive<any>({ const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项 columns: COLUMNS, //列表配置项
@@ -62,6 +62,7 @@ const selectionChange = (selection: any) => {
//顶部按钮点击事件 //顶部按钮点击事件
const handleButtonClickCallback = (item: any) => { const handleButtonClickCallback = (item: any) => {
console.log(item); console.log(item);
$router.push({ path: "/foundation/set/goods/add" });
}; };
//搜索 //搜索

View File

@@ -90,7 +90,7 @@ const handleDel = () => {
}) })
.then(async () => { .then(async () => {
let ids: any = []; let ids: any = [];
selectionList.forEach((item: any) => { dataStore.selectionList?.forEach((item: any) => {
ids.push(item.id); ids.push(item.id);
}); });
console.log(ids, "=========="); console.log(ids, "==========");
@@ -105,10 +105,10 @@ const handleDel = () => {
}; };
//导出 //导出
const handleExport = async () => { const handleExport = async () => {
const result = await getSubscribeResetListExportApi(dataStore.initParam); // const result = await getSubscribeResetListExportApi(dataStore.initParam);
if (result?.code === 0) { // if (result?.code === 0) {
useMsg("success", "导出成功请前往导出列表中进行下载 "); // useMsg("success", "导出成功请前往导出列表中进行下载 ");
} // }
}; };
//顶部按钮点击事件 //顶部按钮点击事件
const handleButtonClickCallback = (item: any) => { const handleButtonClickCallback = (item: any) => {

View File

@@ -1,2 +0,0 @@
import { btnClick } from "./btnClick";
export { btnClick };

View File

@@ -90,10 +90,10 @@ const handleDel = () => {
}) })
.then(async () => { .then(async () => {
let ids: any = []; let ids: any = [];
selectionList.forEach((item: any) => { dataStore.selectionList.forEach((item: any) => {
ids.push(item.id); ids.push(item.id);
}); });
console.log(ids, "=========="); // console.log(ids, "==========");
// const result = await getSubscribeDelApi(ids.join(",")); // const result = await getSubscribeDelApi(ids.join(","));
// if (result?.code === 0) { // if (result?.code === 0) {
// proTable?.value!.getTableList(); // proTable?.value!.getTableList();

View File

@@ -11,13 +11,15 @@ export const COLUMNS = [
align: "left", align: "left",
label: "来源单号", label: "来源单号",
prop: "src_bill_no", prop: "src_bill_no",
width: 140 width: 140,
fixed: true
}, },
{ {
align: "left", align: "left",
label: "订单单号", label: "订单单号",
prop: "order_no", prop: "order_no",
width: 140 width: 140,
fixed: true
}, },
{ {
align: "left", align: "left",
@@ -25,18 +27,18 @@ export const COLUMNS = [
prop: "customer_name", prop: "customer_name",
width: 140 width: 140
}, },
{ {
align: "left", align: "left",
label: "入库组织", label: "入库时间",
prop: "warehousing_org_name", prop: "storage_time",
width: 200 width: 160
}, },
{ {
align: "left", align: "left",
label: "单据类型", label: "单据类型",
prop: "bill_type_name", prop: "bill_type_name",
width: 140 width: 80
}, },
{ {
align: "left", align: "left",
@@ -60,7 +62,7 @@ export const COLUMNS = [
align: "left", align: "left",
label: "出厂价", label: "出厂价",
prop: "factory_price", prop: "factory_price",
width: 140 width: 66
}, },
{ {
align: "left", align: "left",
@@ -78,7 +80,7 @@ export const COLUMNS = [
align: "left", align: "left",
label: "入库数量", label: "入库数量",
prop: "real_qty", prop: "real_qty",
width: 140 width: 76
}, },
{ {
align: "left", align: "left",
@@ -90,13 +92,13 @@ export const COLUMNS = [
align: "left", align: "left",
label: "单位", label: "单位",
prop: "unit_name", prop: "unit_name",
width: 120 width: 50
}, },
{ {
align: "left", align: "left",
label: "入库时间", label: "入库组织",
prop: "storage_time", prop: "warehousing_org_name",
width: 160 width: 200
}, },
{ {
align: "left", align: "left",