Compare commits
4 Commits
dev
...
d0d6853806
| Author | SHA1 | Date | |
|---|---|---|---|
| d0d6853806 | |||
| f3bc8e6410 | |||
| 173131d11c | |||
| a90dab331c |
1
src/components.d.ts
vendored
1
src/components.d.ts
vendored
@@ -19,6 +19,7 @@ declare module "vue" {
|
|||||||
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
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"];
|
||||||
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||||
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||||
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="search-box1" ref="searchRef">
|
<div :class="isSearch ? 'search-box' : 'search-box1'" ref="searchRef">
|
||||||
<el-form
|
<el-form
|
||||||
ref="ruleFormRef"
|
ref="ruleFormRef"
|
||||||
:model="_searchResult"
|
:model="_searchResult"
|
||||||
@@ -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>
|
||||||
@@ -178,6 +179,7 @@ const props = defineProps<{
|
|||||||
labelWidth?: string;
|
labelWidth?: string;
|
||||||
ruleForm: Record<string, any>;
|
ruleForm: Record<string, any>;
|
||||||
style?: string;
|
style?: string;
|
||||||
|
isSearch?: Boolean;
|
||||||
inline?: Boolean;
|
inline?: Boolean;
|
||||||
getSearchValue?: () => void;
|
getSearchValue?: () => void;
|
||||||
selectMultipleRemoveTag?: () => void;
|
selectMultipleRemoveTag?: () => void;
|
||||||
@@ -388,6 +390,60 @@ defineExpose({
|
|||||||
margin-bottom: 8px !important;
|
margin-bottom: 8px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.search-box {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
min-width: 600px;
|
||||||
|
padding: 16px;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
// 单据头用的样式
|
||||||
|
.form-box {
|
||||||
|
// width: 85%;
|
||||||
|
.form-item {
|
||||||
|
width: 392px !important;
|
||||||
|
|
||||||
|
// height: 32px;
|
||||||
|
// 原代码有 height: 32px !important; 这会导致子元素高度超出后被遮盖
|
||||||
|
height: auto !important; // 改为自动高度
|
||||||
|
min-height: 32px; // 保留最小高度,未选择时对齐
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
.el-form-item__label {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
.el-select {
|
||||||
|
width: 392px;
|
||||||
|
}
|
||||||
|
.el-form-item--default {
|
||||||
|
width: 392px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.form-item1 {
|
||||||
|
width: 594px !important;
|
||||||
|
|
||||||
|
// height: 32px;
|
||||||
|
// 原代码有 height: 32px !important; 这会导致子元素高度超出后被遮盖
|
||||||
|
height: auto !important; // 改为自动高度
|
||||||
|
min-height: 32px; // 保留最小高度,未选择时对齐
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
.el-form-item__label {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
.el-select {
|
||||||
|
width: 594px;
|
||||||
|
}
|
||||||
|
.el-form-item--default {
|
||||||
|
width: 594px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.form-item2 {
|
||||||
|
width: 494px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.el-form-item--default .el-form-item__label {
|
.el-form-item--default .el-form-item__label {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
export const BUTTON = [
|
|
||||||
{
|
|
||||||
text: "导出",
|
|
||||||
permission: "reportManagementInstantBtnExport",
|
|
||||||
type: "export"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
interface FormItem {
|
|
||||||
prop: string;
|
|
||||||
label?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
type: string;
|
|
||||||
isCopy?: boolean;
|
|
||||||
optionProps?: any;
|
|
||||||
startPlaceholder?: string;
|
|
||||||
endPlaceholder?: string;
|
|
||||||
options?: any;
|
|
||||||
isArray?: boolean;
|
|
||||||
startDate?: string; //开始时间(传入后台需要的参数)
|
|
||||||
endDate?: string; //结束时间(传入后台需要的参数)
|
|
||||||
startProp?: string;
|
|
||||||
endProp?: string;
|
|
||||||
isInteger?: boolean;
|
|
||||||
}
|
|
||||||
export const FORM_DATA: FormItem[] = [
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入来源单号",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "来源单号: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择供应商",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "供应商: ",
|
|
||||||
options: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入质检人",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检人: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "Time",
|
|
||||||
type: "daterange",
|
|
||||||
options: [],
|
|
||||||
startPlaceholder: "质检开始日期",
|
|
||||||
endPlaceholder: "质检结束日期",
|
|
||||||
startDate: "createBeginDate",
|
|
||||||
endDate: "createEndDate",
|
|
||||||
label: "质检时间: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择组织",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "组织: "
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
prop: "materialNumber",
|
|
||||||
placeholder: "请输入規格型号",
|
|
||||||
type: "selectRemote1",
|
|
||||||
isArray: true,
|
|
||||||
options: [],
|
|
||||||
label: "物料编码: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择质检状态",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检状态: "
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export const RULE_FORM = {
|
|
||||||
page: 1,
|
|
||||||
size: 50,
|
|
||||||
orgCode: 0
|
|
||||||
};
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
export const COLUMNS = [
|
|
||||||
{ type: "selection", fixed: "left", width: 40 },
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
fixed: true,
|
|
||||||
label: "质检单",
|
|
||||||
prop: "securityNumber",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检状态",
|
|
||||||
prop: "id",
|
|
||||||
width: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "销售订单号",
|
|
||||||
prop: "specifications",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "来源单号",
|
|
||||||
prop: "createTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "下载次数",
|
|
||||||
prop: "downLoadNumber",
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检类型",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "供应商",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "组织",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "规格型号",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料编码",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料名称",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "应质检数量",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "良品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "次品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检人",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "创建时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// 直接导出函数,无需额外包装对象
|
|
||||||
export const handleExport = (item: any) => {
|
|
||||||
console.log("导出操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const handleRefresh = (item: any) => {
|
|
||||||
console.log("刷新操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const btnClick: any = {
|
|
||||||
export: handleExport,
|
|
||||||
refresh: handleRefresh
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
import { btnClick } from "./btnClick";
|
|
||||||
export { btnClick };
|
|
||||||
40
src/views/foundation/set/goods/add.vue
Normal file
40
src/views/foundation/set/goods/add.vue
Normal 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>
|
||||||
21
src/views/foundation/set/goods/constant/list/add.ts
Normal file
21
src/views/foundation/set/goods/constant/list/add.ts
Normal 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 = {};
|
||||||
15
src/views/foundation/set/goods/constant/list/addButton.ts
Normal file
15
src/views/foundation/set/goods/constant/list/addButton.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "保存",
|
||||||
|
permission: "foundationSetGoodsAddBtnSave",
|
||||||
|
type: "save",
|
||||||
|
props: {
|
||||||
|
type: "primary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "预览(请先保存)",
|
||||||
|
permission: "foundationSetGoodsAddBtnPreview",
|
||||||
|
type: "preview"
|
||||||
|
}
|
||||||
|
];
|
||||||
10
src/views/foundation/set/goods/constant/list/button.ts
Normal file
10
src/views/foundation/set/goods/constant/list/button.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "新增",
|
||||||
|
permission: "foundationSetGoodsBtnAdd",
|
||||||
|
type: "add",
|
||||||
|
props: {
|
||||||
|
type: "primary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
30
src/views/foundation/set/goods/constant/list/search.ts
Normal file
30
src/views/foundation/set/goods/constant/list/search.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
interface FormItem {
|
||||||
|
prop: string;
|
||||||
|
label?: string;
|
||||||
|
placeholder?: string;
|
||||||
|
type: string;
|
||||||
|
isCopy?: boolean;
|
||||||
|
optionProps?: any;
|
||||||
|
startPlaceholder?: string;
|
||||||
|
endPlaceholder?: string;
|
||||||
|
options?: any;
|
||||||
|
isArray?: boolean;
|
||||||
|
startDate?: string; //开始时间(传入后台需要的参数)
|
||||||
|
endDate?: string; //结束时间(传入后台需要的参数)
|
||||||
|
startProp?: string;
|
||||||
|
endProp?: string;
|
||||||
|
isInteger?: boolean;
|
||||||
|
}
|
||||||
|
export const FORM_DATA: FormItem[] = [
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入仓库",
|
||||||
|
type: "input",
|
||||||
|
label: "仓库: "
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RULE_FORM = {
|
||||||
|
page: 1,
|
||||||
|
size: 50
|
||||||
|
};
|
||||||
41
src/views/foundation/set/goods/constant/list/table.ts
Normal file
41
src/views/foundation/set/goods/constant/list/table.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// import { RenderScope } from "@/components/ProTable/interface";
|
||||||
|
export const COLUMNS = [
|
||||||
|
{ type: "selection", fixed: "left", width: 40 },
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
fixed: true,
|
||||||
|
label: "金蝶仓库",
|
||||||
|
prop: "material_number",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "金蝶子仓库",
|
||||||
|
prop: "sku",
|
||||||
|
fixed: true,
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "对应聚水潭仓库",
|
||||||
|
prop: "material_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "对应领星仓库",
|
||||||
|
prop: "org_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新人",
|
||||||
|
prop: "product_line"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新时间",
|
||||||
|
prop: "bar_code"
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 质检单 -->
|
<!-- 仓位找货优先级 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
@@ -9,88 +9,78 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTableRef"
|
||||||
:formData="dataStore.formData"
|
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:request-api="getMaterialListApi"
|
:request-api="getMaterialListApi"
|
||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
@selectionChange="selectionChange"
|
@selectionChange="selectionChange"
|
||||||
:orgCode="dataStore.ruleForm.orgCode"
|
>
|
||||||
|
<template v-slot:search>
|
||||||
|
<SearchForm
|
||||||
|
@search="handleSearch"
|
||||||
|
@reset="handleReset"
|
||||||
|
:searchParams="dataStore.initParam"
|
||||||
|
:formData="dataStore.formData"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
|
</ProTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="foundationSetData">
|
<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 { useMsg } from "@/hooks/useMsg";
|
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
// import { useAuthStore } from "@/stores/modules/auth";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
|
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
|
||||||
//表格TS
|
//表格TS
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
|
||||||
import { btnClick } from "./init";
|
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref<ProTableInstance>();
|
const proTableRef = ref<ProTableInstance>();
|
||||||
|
const $router = useRouter();
|
||||||
// 获取用户信息(组织id)
|
|
||||||
const userStore = useUserStore();
|
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
|
||||||
formData: FORM_DATA, //搜索配置项
|
formData: FORM_DATA, //搜索配置项
|
||||||
buttons: cloneDeep(BUTTON),
|
buttons: cloneDeep(BUTTON),
|
||||||
options: [], //规格型号
|
labelWidth: "120px",
|
||||||
selectionList: [], //选中表格的行
|
dialogVisible: false, //弹窗
|
||||||
loading: false
|
selectionList: [] //选中表格的行
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表格选择事件
|
// 表格选择事件
|
||||||
const selectionChange = (selection: any) => {
|
const selectionChange = (selection: any) => {
|
||||||
dataStore.selectionList = selection;
|
dataStore.selectionList = selection;
|
||||||
};
|
};
|
||||||
const handleButtonClickCallback = (item: any) => {
|
|
||||||
const { type } = item;
|
|
||||||
btnClick[type](item);
|
|
||||||
};
|
|
||||||
// // 规格型号
|
|
||||||
// const remoteMethod1 = async (query: any) => {
|
|
||||||
// datas.loading = true;
|
|
||||||
// if (!query) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// let valClone = query.replace(/^\s*|\s*$/g, "");
|
|
||||||
// if (!valClone.length) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const result = await getMaterialListApi(valClone);
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// const { data } = result;
|
|
||||||
// datas.options = data;
|
|
||||||
// }
|
|
||||||
// datas.loading = false;
|
|
||||||
// };
|
|
||||||
|
|
||||||
watch(
|
//顶部按钮点击事件
|
||||||
() => userStore.orgCode,
|
const handleButtonClickCallback = (item: any) => {
|
||||||
newVal => {
|
console.log(item);
|
||||||
dataStore.ruleForm.orgCode = newVal;
|
$router.push({ path: "/foundation/set/goods/add" });
|
||||||
dataStore.initParam.orgCode = newVal;
|
};
|
||||||
},
|
|
||||||
{
|
//搜索
|
||||||
immediate: true,
|
const handleSearch = async (params: any) => {
|
||||||
deep: true
|
dataStore.initParam = cloneDeep(params);
|
||||||
}
|
//这里需要等到表格刷新以后才去请求
|
||||||
);
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//重置
|
||||||
|
const handleReset = () => {
|
||||||
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
@@ -99,4 +89,8 @@ watch(
|
|||||||
padding: 0 16px 40px;
|
padding: 0 16px 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-dialog .el-dialog__header {
|
||||||
|
padding: 8px 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 质检单 -->
|
<!-- 物料列表 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
export const BUTTON = [
|
|
||||||
{
|
|
||||||
text: "导出",
|
|
||||||
permission: "reportManagementBoxInventoryBtnExport",
|
|
||||||
type: "export"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
interface FormItem {
|
|
||||||
prop: string;
|
|
||||||
label?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
type: string;
|
|
||||||
isCopy?: boolean;
|
|
||||||
optionProps?: any;
|
|
||||||
startPlaceholder?: string;
|
|
||||||
endPlaceholder?: string;
|
|
||||||
options?: any;
|
|
||||||
isArray?: boolean;
|
|
||||||
startDate?: string; //开始时间(传入后台需要的参数)
|
|
||||||
endDate?: string; //结束时间(传入后台需要的参数)
|
|
||||||
startProp?: string;
|
|
||||||
endProp?: string;
|
|
||||||
isInteger?: boolean;
|
|
||||||
}
|
|
||||||
export const FORM_DATA: FormItem[] = [
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入来源单号",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "来源单号: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择供应商",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "供应商: ",
|
|
||||||
options: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入质检人",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检人: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "Time",
|
|
||||||
type: "daterange",
|
|
||||||
options: [],
|
|
||||||
startPlaceholder: "质检开始日期",
|
|
||||||
endPlaceholder: "质检结束日期",
|
|
||||||
startDate: "createBeginDate",
|
|
||||||
endDate: "createEndDate",
|
|
||||||
label: "质检时间: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择组织",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "组织: "
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
prop: "materialNumber",
|
|
||||||
placeholder: "请输入規格型号",
|
|
||||||
type: "selectRemote1",
|
|
||||||
isArray: true,
|
|
||||||
options: [],
|
|
||||||
label: "物料编码: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择质检状态",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检状态: "
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export const RULE_FORM = {
|
|
||||||
page: 1,
|
|
||||||
size: 50,
|
|
||||||
orgCode: 0
|
|
||||||
};
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
export const COLUMNS = [
|
|
||||||
{ type: "selection", fixed: "left", width: 40 },
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
fixed: true,
|
|
||||||
label: "质检单",
|
|
||||||
prop: "securityNumber",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检状态",
|
|
||||||
prop: "id",
|
|
||||||
width: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "销售订单号",
|
|
||||||
prop: "specifications",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "来源单号",
|
|
||||||
prop: "createTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "下载次数",
|
|
||||||
prop: "downLoadNumber",
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检类型",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "供应商",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "组织",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "规格型号",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料编码",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料名称",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "应质检数量",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "良品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "次品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检人",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "创建时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<!-- 质检单 -->
|
|
||||||
<template>
|
|
||||||
<div class="table-box">
|
|
||||||
<div style="padding-bottom: 16px">
|
|
||||||
<PermissionButton
|
|
||||||
:buttons="dataStore.buttons"
|
|
||||||
@handleButtonClickCallback="handleButtonClickCallback"
|
|
||||||
></PermissionButton>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ProTable
|
|
||||||
ref="proTable"
|
|
||||||
:formData="dataStore.formData"
|
|
||||||
:columns="dataStore.columns"
|
|
||||||
:request-api="getMaterialListApi"
|
|
||||||
:init-param="dataStore.initParam"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
:orgCode="dataStore.ruleForm.orgCode"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts" name="foundationSetPriority">
|
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
|
||||||
|
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
|
||||||
// import { useAuthStore } from "@/stores/modules/auth";
|
|
||||||
|
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
|
||||||
//表格TS
|
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
|
||||||
import { btnClick } from "./init";
|
|
||||||
//深拷贝方法
|
|
||||||
import { cloneDeep } from "lodash-es";
|
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
|
||||||
const proTable = ref<ProTableInstance>();
|
|
||||||
|
|
||||||
// 获取用户信息(组织id)
|
|
||||||
const userStore = useUserStore();
|
|
||||||
// 数据源
|
|
||||||
const dataStore = reactive<any>({
|
|
||||||
columns: COLUMNS, //列表配置项
|
|
||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
|
||||||
formData: FORM_DATA, //搜索配置项
|
|
||||||
buttons: cloneDeep(BUTTON),
|
|
||||||
options: [], //规格型号
|
|
||||||
selectionList: [], //选中表格的行
|
|
||||||
loading: false
|
|
||||||
});
|
|
||||||
|
|
||||||
// 表格选择事件
|
|
||||||
const selectionChange = (selection: any) => {
|
|
||||||
dataStore.selectionList = selection;
|
|
||||||
};
|
|
||||||
const handleButtonClickCallback = (item: any) => {
|
|
||||||
const { type } = item;
|
|
||||||
btnClick[type](item);
|
|
||||||
};
|
|
||||||
// // 规格型号
|
|
||||||
// const remoteMethod1 = async (query: any) => {
|
|
||||||
// datas.loading = true;
|
|
||||||
// if (!query) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// let valClone = query.replace(/^\s*|\s*$/g, "");
|
|
||||||
// if (!valClone.length) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const result = await getMaterialListApi(valClone);
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// const { data } = result;
|
|
||||||
// datas.options = data;
|
|
||||||
// }
|
|
||||||
// datas.loading = false;
|
|
||||||
// };
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => userStore.orgCode,
|
|
||||||
newVal => {
|
|
||||||
dataStore.ruleForm.orgCode = newVal;
|
|
||||||
dataStore.initParam.orgCode = newVal;
|
|
||||||
},
|
|
||||||
{
|
|
||||||
immediate: true,
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scope lang="scss">
|
|
||||||
.down-dialog-box {
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 16px 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// 直接导出函数,无需额外包装对象
|
|
||||||
export const handleExport = (item: any) => {
|
|
||||||
console.log("导出操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const handleRefresh = (item: any) => {
|
|
||||||
console.log("刷新操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const btnClick: any = {
|
|
||||||
export: handleExport,
|
|
||||||
refresh: handleRefresh
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
import { btnClick } from "./btnClick";
|
|
||||||
export { btnClick };
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
export const BUTTON = [
|
|
||||||
{
|
|
||||||
text: "导出",
|
|
||||||
permission: "reportManagementMaterialBtnExport",
|
|
||||||
type: "export"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
interface FormItem {
|
|
||||||
prop: string;
|
|
||||||
label?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
type: string;
|
|
||||||
isCopy?: boolean;
|
|
||||||
optionProps?: any;
|
|
||||||
startPlaceholder?: string;
|
|
||||||
endPlaceholder?: string;
|
|
||||||
options?: any;
|
|
||||||
isArray?: boolean;
|
|
||||||
startDate?: string; //开始时间(传入后台需要的参数)
|
|
||||||
endDate?: string; //结束时间(传入后台需要的参数)
|
|
||||||
startProp?: string;
|
|
||||||
endProp?: string;
|
|
||||||
isInteger?: boolean;
|
|
||||||
}
|
|
||||||
export const FORM_DATA: FormItem[] = [
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入来源单号",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "来源单号: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择供应商",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "供应商: ",
|
|
||||||
options: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "securityNumbers",
|
|
||||||
placeholder: "请输入质检人",
|
|
||||||
type: "input",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检人: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "Time",
|
|
||||||
type: "daterange",
|
|
||||||
options: [],
|
|
||||||
startPlaceholder: "质检开始日期",
|
|
||||||
endPlaceholder: "质检结束日期",
|
|
||||||
startDate: "createBeginDate",
|
|
||||||
endDate: "createEndDate",
|
|
||||||
label: "质检时间: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择组织",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "组织: "
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
prop: "materialNumber",
|
|
||||||
placeholder: "请输入規格型号",
|
|
||||||
type: "selectRemote1",
|
|
||||||
isArray: true,
|
|
||||||
options: [],
|
|
||||||
label: "物料编码: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择质检状态",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "质检状态: "
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export const RULE_FORM = {
|
|
||||||
page: 1,
|
|
||||||
size: 50,
|
|
||||||
orgCode: 0
|
|
||||||
};
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
export const COLUMNS = [
|
|
||||||
{ type: "selection", fixed: "left", width: 40 },
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
fixed: true,
|
|
||||||
label: "质检单",
|
|
||||||
prop: "securityNumber",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检状态",
|
|
||||||
prop: "id",
|
|
||||||
width: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "销售订单号",
|
|
||||||
prop: "specifications",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "来源单号",
|
|
||||||
prop: "createTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "下载次数",
|
|
||||||
prop: "downLoadNumber",
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检类型",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "供应商",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "组织",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "规格型号",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料编码",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "物料名称",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "应质检数量",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "良品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "次品数",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检人",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "质检时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "创建时间",
|
|
||||||
prop: "downLoadTime",
|
|
||||||
width: 200
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<!-- 质检单 -->
|
|
||||||
<template>
|
|
||||||
<div class="table-box">
|
|
||||||
<div style="padding-bottom: 16px">
|
|
||||||
<PermissionButton
|
|
||||||
:buttons="dataStore.buttons"
|
|
||||||
@handleButtonClickCallback="handleButtonClickCallback"
|
|
||||||
></PermissionButton>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ProTable
|
|
||||||
ref="proTable"
|
|
||||||
:formData="dataStore.formData"
|
|
||||||
:columns="dataStore.columns"
|
|
||||||
:request-api="getMaterialListApi"
|
|
||||||
:init-param="dataStore.initParam"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
:orgCode="dataStore.ruleForm.orgCode"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts" name="foundationSetRelationship">
|
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
|
||||||
|
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
|
||||||
// import { useAuthStore } from "@/stores/modules/auth";
|
|
||||||
|
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
|
||||||
//表格TS
|
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
|
||||||
import { btnClick } from "./init";
|
|
||||||
//深拷贝方法
|
|
||||||
import { cloneDeep } from "lodash-es";
|
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
|
||||||
const proTable = ref<ProTableInstance>();
|
|
||||||
|
|
||||||
// 获取用户信息(组织id)
|
|
||||||
const userStore = useUserStore();
|
|
||||||
// 数据源
|
|
||||||
const dataStore = reactive<any>({
|
|
||||||
columns: COLUMNS, //列表配置项
|
|
||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
|
||||||
formData: FORM_DATA, //搜索配置项
|
|
||||||
buttons: cloneDeep(BUTTON),
|
|
||||||
options: [], //规格型号
|
|
||||||
selectionList: [], //选中表格的行
|
|
||||||
loading: false
|
|
||||||
});
|
|
||||||
|
|
||||||
// 表格选择事件
|
|
||||||
const selectionChange = (selection: any) => {
|
|
||||||
dataStore.selectionList = selection;
|
|
||||||
};
|
|
||||||
const handleButtonClickCallback = (item: any) => {
|
|
||||||
const { type } = item;
|
|
||||||
btnClick[type](item);
|
|
||||||
};
|
|
||||||
// // 规格型号
|
|
||||||
// const remoteMethod1 = async (query: any) => {
|
|
||||||
// datas.loading = true;
|
|
||||||
// if (!query) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// let valClone = query.replace(/^\s*|\s*$/g, "");
|
|
||||||
// if (!valClone.length) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const result = await getMaterialListApi(valClone);
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// const { data } = result;
|
|
||||||
// datas.options = data;
|
|
||||||
// }
|
|
||||||
// datas.loading = false;
|
|
||||||
// };
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => userStore.orgCode,
|
|
||||||
newVal => {
|
|
||||||
dataStore.ruleForm.orgCode = newVal;
|
|
||||||
dataStore.initParam.orgCode = newVal;
|
|
||||||
},
|
|
||||||
{
|
|
||||||
immediate: true,
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scope lang="scss">
|
|
||||||
.down-dialog-box {
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 16px 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// 直接导出函数,无需额外包装对象
|
|
||||||
export const handleExport = (item: any) => {
|
|
||||||
console.log("导出操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const handleRefresh = (item: any) => {
|
|
||||||
console.log("刷新操作", item);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const btnClick: any = {
|
|
||||||
export: handleExport,
|
|
||||||
refresh: handleRefresh
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
import { btnClick } from "./btnClick";
|
|
||||||
export { btnClick };
|
|
||||||
23
src/views/foundation/set/shop/constant/list/button.ts
Normal file
23
src/views/foundation/set/shop/constant/list/button.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "新增",
|
||||||
|
permission: "foundationSetShopBtnAdd",
|
||||||
|
type: "add",
|
||||||
|
props: {
|
||||||
|
type: "primary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "导出",
|
||||||
|
permission: "foundationSetShopBtnExport",
|
||||||
|
type: "export"
|
||||||
|
// props: {
|
||||||
|
// type: "primary"
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "删除",
|
||||||
|
permission: "foundationSetShopBtnDel",
|
||||||
|
type: "del"
|
||||||
|
}
|
||||||
|
];
|
||||||
48
src/views/foundation/set/shop/constant/list/details.ts
Normal file
48
src/views/foundation/set/shop/constant/list/details.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
export const DETAILS_FORM_DATA: any[] = [
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "input",
|
||||||
|
label: "平台:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "input",
|
||||||
|
label: "平台店铺名称:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "select",
|
||||||
|
label: "订单接入系统:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "input",
|
||||||
|
label: "金蝶店铺名称:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "input",
|
||||||
|
label: "金蝶店铺编码:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const DETAILS_RULE_FORM: any = {};
|
||||||
70
src/views/foundation/set/shop/constant/list/search.ts
Normal file
70
src/views/foundation/set/shop/constant/list/search.ts
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
interface FormItem {
|
||||||
|
prop: string;
|
||||||
|
label?: string;
|
||||||
|
placeholder?: string;
|
||||||
|
type: string;
|
||||||
|
isCopy?: boolean;
|
||||||
|
optionProps?: any;
|
||||||
|
startPlaceholder?: string;
|
||||||
|
endPlaceholder?: string;
|
||||||
|
options?: any;
|
||||||
|
isArray?: boolean;
|
||||||
|
startDate?: string; //开始时间(传入后台需要的参数)
|
||||||
|
endDate?: string; //结束时间(传入后台需要的参数)
|
||||||
|
startProp?: string;
|
||||||
|
endProp?: string;
|
||||||
|
isInteger?: boolean;
|
||||||
|
}
|
||||||
|
export const FORM_DATA: FormItem[] = [
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入平台",
|
||||||
|
type: "input",
|
||||||
|
label: "平台: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入平台店铺名称",
|
||||||
|
type: "input",
|
||||||
|
label: "平台店铺名称: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入金蝶店铺名称",
|
||||||
|
type: "input",
|
||||||
|
label: "金蝶店铺名称: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入聚水潭店铺名称",
|
||||||
|
type: "input",
|
||||||
|
label: "聚水潭店铺名称: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入领星店铺名称",
|
||||||
|
type: "input",
|
||||||
|
label: "领星店铺名称: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入更新人",
|
||||||
|
type: "input",
|
||||||
|
label: "更新人: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "Time",
|
||||||
|
type: "daterange",
|
||||||
|
options: [],
|
||||||
|
startPlaceholder: "更新开始日期",
|
||||||
|
endPlaceholder: "更新结束日期",
|
||||||
|
startDate: "updated_at",
|
||||||
|
// endDate: "createEndDate",
|
||||||
|
label: "更新时间: "
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RULE_FORM = {
|
||||||
|
page: 1,
|
||||||
|
size: 50
|
||||||
|
};
|
||||||
57
src/views/foundation/set/shop/constant/list/table.ts
Normal file
57
src/views/foundation/set/shop/constant/list/table.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
// import { RenderScope } from "@/components/ProTable/interface";
|
||||||
|
export const COLUMNS = [
|
||||||
|
{ type: "selection", fixed: "left", width: 40 },
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
fixed: true,
|
||||||
|
label: "平台店铺名称",
|
||||||
|
prop: "material_number",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "平台",
|
||||||
|
prop: "sku",
|
||||||
|
fixed: true,
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "订单接入系统",
|
||||||
|
prop: "material_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "领星店铺名称",
|
||||||
|
prop: "org_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "领星店铺SellerID",
|
||||||
|
prop: "product_line"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "金蝶店铺名称",
|
||||||
|
prop: "bar_code"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "金蝶店铺编码",
|
||||||
|
prop: "fnsku"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新人",
|
||||||
|
prop: "category_lv1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新时间",
|
||||||
|
prop: "category_lv2"
|
||||||
|
}
|
||||||
|
];
|
||||||
164
src/views/foundation/set/shop/index.vue
Normal file
164
src/views/foundation/set/shop/index.vue
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
<!-- 店铺资料 -->
|
||||||
|
<template>
|
||||||
|
<div class="table-box">
|
||||||
|
<div style="padding-bottom: 16px">
|
||||||
|
<PermissionButton
|
||||||
|
:buttons="dataStore.buttons"
|
||||||
|
@handleButtonClickCallback="handleButtonClickCallback"
|
||||||
|
></PermissionButton>
|
||||||
|
</div>
|
||||||
|
<el-dialog v-model="dataStore.dialogVisible" width="660" :before-close="handleClose" title="新增店铺">
|
||||||
|
<DetailsSearch
|
||||||
|
:formData="dataStore.detailsFormData"
|
||||||
|
:ruleForm="dataStore.detailsRuleForm"
|
||||||
|
:labelWidth="dataStore.labelWidth"
|
||||||
|
:inline="true"
|
||||||
|
:isSearch="true"
|
||||||
|
ref="detailsRef"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleCommit"> 确认 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<ProTable
|
||||||
|
ref="proTableRef"
|
||||||
|
:columns="dataStore.columns"
|
||||||
|
:request-api="getMaterialListApi"
|
||||||
|
:init-param="dataStore.initParam"
|
||||||
|
@selectionChange="selectionChange"
|
||||||
|
>
|
||||||
|
<template v-slot:search>
|
||||||
|
<SearchForm
|
||||||
|
@search="handleSearch"
|
||||||
|
@reset="handleReset"
|
||||||
|
:searchParams="dataStore.initParam"
|
||||||
|
:formData="dataStore.formData"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</ProTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="foundationSetShop">
|
||||||
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
|
import SearchForm from "@/components/SearchForm/index.vue";
|
||||||
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
||||||
|
//表格TS
|
||||||
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
|
|
||||||
|
//深拷贝方法
|
||||||
|
import { cloneDeep } from "lodash-es";
|
||||||
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
|
const proTableRef = ref<ProTableInstance>();
|
||||||
|
const detailsRef = ref<any>(null);
|
||||||
|
// 数据源
|
||||||
|
const dataStore = reactive<any>({
|
||||||
|
columns: COLUMNS, //列表配置项
|
||||||
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
|
formData: FORM_DATA, //搜索配置项
|
||||||
|
buttons: cloneDeep(BUTTON),
|
||||||
|
options: [], //规格型号
|
||||||
|
labelWidth: "120px",
|
||||||
|
detailsFormData: cloneDeep(DETAILS_FORM_DATA),
|
||||||
|
detailsRuleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||||
|
dialogVisible: false, //弹窗
|
||||||
|
selectionList: [] //选中表格的行
|
||||||
|
});
|
||||||
|
|
||||||
|
// 表格选择事件
|
||||||
|
const selectionChange = (selection: any) => {
|
||||||
|
dataStore.selectionList = selection;
|
||||||
|
};
|
||||||
|
//删除
|
||||||
|
const handleDel = () => {
|
||||||
|
console.log();
|
||||||
|
if (!dataStore.selectionList.length) {
|
||||||
|
useMsg("warning", "请选择数据 !");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
let ids: any = [];
|
||||||
|
dataStore.selectionList?.forEach((item: any) => {
|
||||||
|
ids.push(item.id);
|
||||||
|
});
|
||||||
|
console.log(ids, "==========");
|
||||||
|
// const result = await getSubscribeDelApi(ids.join(","));
|
||||||
|
// if (result?.code === 0) {
|
||||||
|
// proTable?.value!.getTableList();
|
||||||
|
// useMsg("success", "删除成功 !");
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//导出
|
||||||
|
const handleExport = async () => {
|
||||||
|
// const result = await getSubscribeResetListExportApi(dataStore.initParam);
|
||||||
|
// if (result?.code === 0) {
|
||||||
|
// useMsg("success", "导出成功请前往导出列表中进行下载 !");
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
//顶部按钮点击事件
|
||||||
|
const handleButtonClickCallback = (item: any) => {
|
||||||
|
const { type } = item;
|
||||||
|
if (type === "del") {
|
||||||
|
return handleDel();
|
||||||
|
}
|
||||||
|
if (type === "export") {
|
||||||
|
return handleExport();
|
||||||
|
}
|
||||||
|
if (type === "add") {
|
||||||
|
dataStore.dialogVisible = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//弹窗取消
|
||||||
|
const handleClose = () => {
|
||||||
|
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
dataStore.dialogVisible = false;
|
||||||
|
};
|
||||||
|
//弹窗确认
|
||||||
|
const handleCommit = () => {
|
||||||
|
dataStore.dialogVisible = false;
|
||||||
|
};
|
||||||
|
//搜索
|
||||||
|
const handleSearch = async (params: any) => {
|
||||||
|
dataStore.initParam = cloneDeep(params);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//重置
|
||||||
|
const handleReset = () => {
|
||||||
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scope lang="scss">
|
||||||
|
.down-dialog-box {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0 16px 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-dialog .el-dialog__header {
|
||||||
|
padding: 8px 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
0
src/views/foundation/set/shop/init/index.ts
Normal file
0
src/views/foundation/set/shop/init/index.ts
Normal file
16
src/views/foundation/set/warehouse/constant/list/button.ts
Normal file
16
src/views/foundation/set/warehouse/constant/list/button.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "新增",
|
||||||
|
permission: "foundationSetWarehouseBtnAdd",
|
||||||
|
type: "add",
|
||||||
|
props: {
|
||||||
|
type: "primary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
text: "删除",
|
||||||
|
permission: "foundationSetWarehouseBtnDel",
|
||||||
|
type: "del"
|
||||||
|
}
|
||||||
|
];
|
||||||
38
src/views/foundation/set/warehouse/constant/list/details.ts
Normal file
38
src/views/foundation/set/warehouse/constant/list/details.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
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: "select",
|
||||||
|
label: "金蝶子仓库:",
|
||||||
|
disabled: false,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "select",
|
||||||
|
label: "对应聚水潭仓库:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入",
|
||||||
|
type: "select",
|
||||||
|
label: "对应领星仓库:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const DETAILS_RULE_FORM: any = {};
|
||||||
53
src/views/foundation/set/warehouse/constant/list/search.ts
Normal file
53
src/views/foundation/set/warehouse/constant/list/search.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
interface FormItem {
|
||||||
|
prop: string;
|
||||||
|
label?: string;
|
||||||
|
placeholder?: string;
|
||||||
|
type: string;
|
||||||
|
isCopy?: boolean;
|
||||||
|
optionProps?: any;
|
||||||
|
startPlaceholder?: string;
|
||||||
|
endPlaceholder?: string;
|
||||||
|
options?: any;
|
||||||
|
isArray?: boolean;
|
||||||
|
startDate?: string; //开始时间(传入后台需要的参数)
|
||||||
|
endDate?: string; //结束时间(传入后台需要的参数)
|
||||||
|
startProp?: string;
|
||||||
|
endProp?: string;
|
||||||
|
isInteger?: boolean;
|
||||||
|
}
|
||||||
|
export const FORM_DATA: FormItem[] = [
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入金蝶仓库",
|
||||||
|
type: "input",
|
||||||
|
label: "金蝶仓库: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入金蝶子仓库",
|
||||||
|
type: "input",
|
||||||
|
label: "金蝶子仓库: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "org_number",
|
||||||
|
placeholder: "请输入更新人",
|
||||||
|
type: "input",
|
||||||
|
label: "更新人: "
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
prop: "Time",
|
||||||
|
type: "daterange",
|
||||||
|
options: [],
|
||||||
|
startPlaceholder: "更新开始日期",
|
||||||
|
endPlaceholder: "更新结束日期",
|
||||||
|
startDate: "updated_at",
|
||||||
|
// endDate: "createEndDate",
|
||||||
|
label: "更新时间: "
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RULE_FORM = {
|
||||||
|
page: 1,
|
||||||
|
size: 50
|
||||||
|
};
|
||||||
41
src/views/foundation/set/warehouse/constant/list/table.ts
Normal file
41
src/views/foundation/set/warehouse/constant/list/table.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// import { RenderScope } from "@/components/ProTable/interface";
|
||||||
|
export const COLUMNS = [
|
||||||
|
{ type: "selection", fixed: "left", width: 40 },
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
fixed: true,
|
||||||
|
label: "金蝶仓库",
|
||||||
|
prop: "material_number",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "金蝶子仓库",
|
||||||
|
prop: "sku",
|
||||||
|
fixed: true,
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "对应聚水潭仓库",
|
||||||
|
prop: "material_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "对应领星仓库",
|
||||||
|
prop: "org_name",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新人",
|
||||||
|
prop: "product_line"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "更新时间",
|
||||||
|
prop: "bar_code"
|
||||||
|
}
|
||||||
|
];
|
||||||
154
src/views/foundation/set/warehouse/index.vue
Normal file
154
src/views/foundation/set/warehouse/index.vue
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
<!-- 仓库关系 -->
|
||||||
|
<template>
|
||||||
|
<div class="table-box">
|
||||||
|
<div style="padding-bottom: 16px">
|
||||||
|
<PermissionButton
|
||||||
|
:buttons="dataStore.buttons"
|
||||||
|
@handleButtonClickCallback="handleButtonClickCallback"
|
||||||
|
></PermissionButton>
|
||||||
|
</div>
|
||||||
|
<el-dialog v-model="dataStore.dialogVisible" width="660" :before-close="handleClose" title="新增店铺">
|
||||||
|
<DetailsSearch
|
||||||
|
:formData="dataStore.detailsFormData"
|
||||||
|
:ruleForm="dataStore.detailsRuleForm"
|
||||||
|
:labelWidth="dataStore.labelWidth"
|
||||||
|
:inline="true"
|
||||||
|
:isSearch="true"
|
||||||
|
ref="detailsRef"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleCommit"> 确认 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<ProTable
|
||||||
|
ref="proTableRef"
|
||||||
|
:columns="dataStore.columns"
|
||||||
|
:request-api="getMaterialListApi"
|
||||||
|
:init-param="dataStore.initParam"
|
||||||
|
@selectionChange="selectionChange"
|
||||||
|
>
|
||||||
|
<template v-slot:search>
|
||||||
|
<SearchForm
|
||||||
|
@search="handleSearch"
|
||||||
|
@reset="handleReset"
|
||||||
|
:searchParams="dataStore.initParam"
|
||||||
|
:formData="dataStore.formData"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</ProTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="foundationSetWarehouse">
|
||||||
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
|
import SearchForm from "@/components/SearchForm/index.vue";
|
||||||
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
||||||
|
//表格TS
|
||||||
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
|
|
||||||
|
//深拷贝方法
|
||||||
|
import { cloneDeep } from "lodash-es";
|
||||||
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
|
const proTableRef = ref<ProTableInstance>();
|
||||||
|
const detailsRef = ref<any>(null);
|
||||||
|
// 数据源
|
||||||
|
const dataStore = reactive<any>({
|
||||||
|
columns: COLUMNS, //列表配置项
|
||||||
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
|
formData: FORM_DATA, //搜索配置项
|
||||||
|
buttons: cloneDeep(BUTTON),
|
||||||
|
options: [], //规格型号
|
||||||
|
labelWidth: "120px",
|
||||||
|
detailsFormData: cloneDeep(DETAILS_FORM_DATA),
|
||||||
|
detailsRuleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||||
|
dialogVisible: false, //弹窗
|
||||||
|
selectionList: [] //选中表格的行
|
||||||
|
});
|
||||||
|
|
||||||
|
// 表格选择事件
|
||||||
|
const selectionChange = (selection: any) => {
|
||||||
|
dataStore.selectionList = selection;
|
||||||
|
};
|
||||||
|
//删除
|
||||||
|
const handleDel = () => {
|
||||||
|
console.log();
|
||||||
|
if (!dataStore.selectionList.length) {
|
||||||
|
useMsg("warning", "请选择数据 !");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
let ids: any = [];
|
||||||
|
dataStore.selectionList.forEach((item: any) => {
|
||||||
|
ids.push(item.id);
|
||||||
|
});
|
||||||
|
// console.log(ids, "==========");
|
||||||
|
// const result = await getSubscribeDelApi(ids.join(","));
|
||||||
|
// if (result?.code === 0) {
|
||||||
|
// proTable?.value!.getTableList();
|
||||||
|
// useMsg("success", "删除成功 !");
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//顶部按钮点击事件
|
||||||
|
const handleButtonClickCallback = (item: any) => {
|
||||||
|
const { type } = item;
|
||||||
|
if (type === "del") {
|
||||||
|
return handleDel();
|
||||||
|
}
|
||||||
|
if (type === "add") {
|
||||||
|
dataStore.dialogVisible = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//弹窗取消
|
||||||
|
const handleClose = () => {
|
||||||
|
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
dataStore.dialogVisible = false;
|
||||||
|
};
|
||||||
|
//弹窗确认
|
||||||
|
const handleCommit = () => {
|
||||||
|
dataStore.dialogVisible = false;
|
||||||
|
};
|
||||||
|
//搜索
|
||||||
|
const handleSearch = async (params: any) => {
|
||||||
|
dataStore.initParam = cloneDeep(params);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//重置
|
||||||
|
const handleReset = () => {
|
||||||
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scope lang="scss">
|
||||||
|
.down-dialog-box {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0 16px 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-dialog .el-dialog__header {
|
||||||
|
padding: 8px 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 质检单 -->
|
<!-- 订阅人列表 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 入库单 -->
|
<!-- 入库单列表 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
|
|||||||
367
vite.config.ts.timestamp-1761094820807-dbd99bea932ef.mjs
Normal file
367
vite.config.ts.timestamp-1761094820807-dbd99bea932ef.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user