Compare commits
7 Commits
dev
...
107bd1a933
| Author | SHA1 | Date | |
|---|---|---|---|
| 107bd1a933 | |||
| 1208835216 | |||
| da31b2d347 | |||
| d0d6853806 | |||
| f3bc8e6410 | |||
| 173131d11c | |||
| a90dab331c |
@@ -1,25 +0,0 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 防伪码模块
|
||||
*/
|
||||
//防伪码记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//生成防伪码
|
||||
export const getGenerateSecurityNumberApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Generate`, params);
|
||||
};
|
||||
//防伪码下载列表 getDownListApi
|
||||
export const getDownListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetList`, params);
|
||||
};
|
||||
//下载
|
||||
export const getDownAllApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
//选择下载
|
||||
export const getDownApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
@@ -1,110 +0,0 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 打印产品条码模块
|
||||
*/
|
||||
//产品条码生成记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// isSuccess: true,
|
||||
// message: "Success",
|
||||
// status: 200,
|
||||
// totalCount: 1,
|
||||
// data: [
|
||||
// {
|
||||
// id: 17372,
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// barCode: "6936761881968",
|
||||
// purchaseBillNo: "ceshi1224",
|
||||
// generateComplete: "已完成",
|
||||
// number: 300,
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 300,
|
||||
// useNumber: 2,
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:04",
|
||||
// generateCompleteTime: "2024-12-24 10:27:05",
|
||||
// supplierOrOrg: "深圳市元创时代科技有限公司",
|
||||
// isUpdateMaterial: false,
|
||||
// isTwo: 2
|
||||
// }
|
||||
// ]
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//产品条码列表
|
||||
export const getCodeListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// totalCount: 300,
|
||||
// data: [
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3R",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000417",
|
||||
// id: 202593401,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// },
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3Q",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000416",
|
||||
// id: 202593400,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// }
|
||||
// ],
|
||||
// isSuccess: true,
|
||||
// status: 200,
|
||||
// message: "Success"
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetList`, params);
|
||||
};
|
||||
//转换规格型号 SerialNumber/UpdateMaterial
|
||||
export const getUpdateMaterialApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/UpdateMaterial`, params);
|
||||
};
|
||||
//产品条码列表下载
|
||||
export const getSerialNumberDownLoadApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Export`, params);
|
||||
};
|
||||
//生成条码
|
||||
export const generateBarCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Generate`, params);
|
||||
};
|
||||
//打印
|
||||
export const getPrintListCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Print`, params);
|
||||
};
|
||||
@@ -1,48 +0,0 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
//箱信息列表
|
||||
export const getListApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/GetList`, params);
|
||||
};
|
||||
//生成箱碼
|
||||
export const getBoxGenerateApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Generate`, params);
|
||||
};
|
||||
//裝箱保存
|
||||
export const getSaveBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Save`, params, { noLoading: false });
|
||||
};
|
||||
//打印
|
||||
export const getPrintBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Print`, params);
|
||||
};
|
||||
//刪除 /
|
||||
export const getDeleteBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Delete`, params);
|
||||
};
|
||||
//清空
|
||||
export const getClearBoxApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/Clear`, params);
|
||||
};
|
||||
//根据箱号获取箱信息
|
||||
export const getBoxByNoApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/GetBoxByNo`, params, {
|
||||
noLoading: true
|
||||
});
|
||||
};
|
||||
//根据序列号获取序列号信息
|
||||
export const getSerialNumberApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`SerialNumber/Get`, params);
|
||||
};
|
||||
//根据箱号去获取序列号
|
||||
export const getSerialNumberByBoxIdApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetByBoxId`, params, { noLoading: true });
|
||||
};
|
||||
//重新装箱
|
||||
export const getBoxRestartApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Restart`, params);
|
||||
};
|
||||
//开始装箱时间接口 Box/BeginCarton
|
||||
export const getBeginCartonApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/BeginCarton`, params);
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
//箱唛
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
|
||||
//箱唛列表
|
||||
export const getBoxMarkListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`BoxMark/GetList`, params);
|
||||
};
|
||||
//生成箱唛
|
||||
export const getMaterialListApi = (params: any) => {
|
||||
console.log(params);
|
||||
// return http.get<any>(`SysConfig/GetMaterialList?speci=${encodeURIComponent(speci)}`);
|
||||
return [];
|
||||
};
|
||||
@@ -1,6 +1,10 @@
|
||||
import http from "@/api";
|
||||
// 导出列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
if (params?.status === "正在导出") {
|
||||
params.status = 0;
|
||||
}
|
||||
|
||||
return http.get<any>(`exports`, params);
|
||||
};
|
||||
//状态
|
||||
|
||||
27
src/api/modules/setWarehouse.ts
Normal file
27
src/api/modules/setWarehouse.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import http from "@/api";
|
||||
|
||||
//
|
||||
export const getSetWarehouseListApi = (params: any) => {
|
||||
return http.get<any>(`store`, params);
|
||||
};
|
||||
// getWarehouseUpApi,getWarehouseDetailsApi,getWarehouseUpApi
|
||||
//删除
|
||||
export const getWarehouseDelApi = (params: any) => {
|
||||
return http.delete<any>(`warehouse/relationship/${params}`);
|
||||
};
|
||||
//新增 /admapi/warehouse/relationship
|
||||
export const getWarehouseAddApi = (params: any) => {
|
||||
return http.post<any>(`warehouse/relationship`, params);
|
||||
};
|
||||
//更新
|
||||
export const getWarehouseUpApi = (id: any, params: any) => {
|
||||
return http.post<any>(`warehouse/relationship/${id}`, params);
|
||||
};
|
||||
//详情
|
||||
// export const getWarehouseDetailsApi = (id: any) => {
|
||||
// return http.get<any>(`store/${id}`);
|
||||
// };
|
||||
// //导出
|
||||
// export const getShopListExportApi = (params: any) => {
|
||||
// return http.get<any>(`store/export`, params);
|
||||
// };
|
||||
30
src/api/modules/shop.ts
Normal file
30
src/api/modules/shop.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import http from "@/api";
|
||||
|
||||
//店鋪資料列表
|
||||
export const getShopListApi = (params: any) => {
|
||||
return http.get<any>(`store`, params);
|
||||
};
|
||||
//獲取接入系統列表數據
|
||||
export const getShopAccessSystemApi = () => {
|
||||
return http.get<any>(`store/access_system`);
|
||||
};
|
||||
//删除
|
||||
export const getShopDelApi = (params: any) => {
|
||||
return http.delete<any>(`store/${params}`);
|
||||
};
|
||||
//新增
|
||||
export const getShopAddApi = (params: any) => {
|
||||
return http.post<any>(`store`, params);
|
||||
};
|
||||
//更新
|
||||
export const getShopUpApi = (id: any, params: any) => {
|
||||
return http.post<any>(`store/${id}`, params);
|
||||
};
|
||||
//详情
|
||||
export const getShopDetailsApi = (id: any) => {
|
||||
return http.get<any>(`store/${id}`);
|
||||
};
|
||||
//导出
|
||||
export const getShopListExportApi = (params: any) => {
|
||||
return http.get<any>(`store/export`, params);
|
||||
};
|
||||
4
src/components.d.ts
vendored
4
src/components.d.ts
vendored
@@ -16,9 +16,9 @@ declare module "vue" {
|
||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
|
||||
ElButton: typeof import("element-plus/es")["ElButton"];
|
||||
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
||||
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
||||
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
||||
ElDialog: typeof import("element-plus/es")["ElDialog"];
|
||||
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||
@@ -28,7 +28,6 @@ declare module "vue" {
|
||||
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
||||
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
||||
ElInput: typeof import("element-plus/es")["ElInput"];
|
||||
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
|
||||
ElMain: typeof import("element-plus/es")["ElMain"];
|
||||
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
||||
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
||||
@@ -43,7 +42,6 @@ declare module "vue" {
|
||||
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
||||
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
||||
Form: typeof import("./components/Form/index.vue")["default"];
|
||||
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="search-box1" ref="searchRef">
|
||||
<div :class="isSearch ? 'search-box' : 'search-box1'" ref="searchRef">
|
||||
<el-form
|
||||
ref="ruleFormRef"
|
||||
:model="_searchResult"
|
||||
@@ -37,6 +37,7 @@
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
type="textarea"
|
||||
:maxlength="item.maxLength ? item.maxLength : 255"
|
||||
>
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -68,14 +69,29 @@
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<el-option
|
||||
v-for="options in item.options"
|
||||
:label="options.label"
|
||||
:value="options.value"
|
||||
:key="options.label"
|
||||
v-for="option in item.options"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
:key="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-if="item.type === 'selectMultiples'">
|
||||
<el-select
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
clearable
|
||||
multiple
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
:key="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === 'date'">
|
||||
<el-date-picker
|
||||
:disabled="item.disabled"
|
||||
@@ -178,6 +194,7 @@ const props = defineProps<{
|
||||
labelWidth?: string;
|
||||
ruleForm: Record<string, any>;
|
||||
style?: string;
|
||||
isSearch?: Boolean;
|
||||
inline?: Boolean;
|
||||
getSearchValue?: () => void;
|
||||
selectMultipleRemoveTag?: () => void;
|
||||
@@ -388,6 +405,60 @@ defineExpose({
|
||||
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 {
|
||||
height: 32px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@@ -65,12 +65,6 @@ export const useTable = (
|
||||
}
|
||||
};
|
||||
|
||||
// //其他數據處理
|
||||
// const initData = () => {
|
||||
// if (state.totalParam?.warehouse_number) {
|
||||
// state.totalParam.warehouse_number = state.totalParam?.warehouse_number.split("_")[0];
|
||||
// }
|
||||
// };
|
||||
//删除临时参数和空值参数
|
||||
const deleteParams = () => {
|
||||
const KEY = ["Time", "customer_number1", "customer_numbers"];
|
||||
@@ -86,7 +80,6 @@ export const useTable = (
|
||||
*/
|
||||
const getTableList = async () => {
|
||||
if (!api) return;
|
||||
|
||||
try {
|
||||
await initSubscribeData();
|
||||
await deleteParams();
|
||||
@@ -95,9 +88,7 @@ export const useTable = (
|
||||
...state.totalParam,
|
||||
...pageParam.value
|
||||
};
|
||||
|
||||
const { data } = await api(params);
|
||||
|
||||
state.tableData = Array.isArray(data.data) && data.data.length ? data.data : [];
|
||||
clearSelection && clearSelection();
|
||||
if (isPageable && data.total_size !== undefined) {
|
||||
|
||||
@@ -268,3 +268,6 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.el-message {
|
||||
z-index: 888;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export const FORM_DATA: any[] = [
|
||||
label: "导出失败"
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
value: "正在导出",
|
||||
label: "正在导出"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,13 +2,20 @@
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
ref="proTableRef"
|
||||
:formData="dataStore.formData"
|
||||
:columns="dataStore.columns"
|
||||
:request-api="getListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
:orgCode="dataStore.ruleForm.orgCode"
|
||||
>
|
||||
<template v-slot:search>
|
||||
<SearchForm
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
:searchParams="dataStore.initParam"
|
||||
:formData="dataStore.formData"
|
||||
/>
|
||||
</template>
|
||||
<!-- 导出状态 -->
|
||||
<template #status_text="scope">
|
||||
<span v-if="scope.row.status_text === '导出成功'" style="color: #3ad6ac">
|
||||
@@ -47,7 +54,7 @@ import { getListApi, getExportTypesApi } from "@/api/modules/exportList";
|
||||
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/list/index";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
const proTable = ref<any>();
|
||||
const proTableRef = ref<any>();
|
||||
// 数据源
|
||||
const dataStore: any = reactive({
|
||||
columns: COLUMNS, //列表配置项
|
||||
@@ -74,6 +81,24 @@ const getExportTypes = async () => {
|
||||
}
|
||||
};
|
||||
getExportTypes();
|
||||
|
||||
// 搜索
|
||||
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">
|
||||
.main-container {
|
||||
|
||||
@@ -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 };
|
||||
42
src/views/foundation/set/goods/add.vue
Normal file
42
src/views/foundation/set/goods/add.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<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);
|
||||
// 按钮点击事件
|
||||
const handleButtonClickCallback = () => {};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
22
src/views/foundation/set/goods/constant/list/add.ts
Normal file
22
src/views/foundation/set/goods/constant/list/add.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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,
|
||||
required: true,
|
||||
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>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
@@ -9,88 +9,79 @@
|
||||
</div>
|
||||
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
:formData="dataStore.formData"
|
||||
ref="proTableRef"
|
||||
:columns="dataStore.columns"
|
||||
:request-api="getMaterialListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
@selectionChange="selectionChange"
|
||||
:orgCode="dataStore.ruleForm.orgCode"
|
||||
/>
|
||||
>
|
||||
<template v-slot:search>
|
||||
<SearchForm
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
:searchParams="dataStore.initParam"
|
||||
:formData="dataStore.formData"
|
||||
/>
|
||||
</template>
|
||||
</ProTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="foundationSetData">
|
||||
<script setup lang="ts" name="foundationSetGoods">
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
|
||||
// import { useMsg } from "@/hooks/useMsg";
|
||||
import SearchForm from "@/components/SearchForm/index.vue";
|
||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||
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";
|
||||
//表格TS
|
||||
|
||||
// 表格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 proTableRef = ref<ProTableInstance>();
|
||||
const $router = useRouter();
|
||||
// 数据源
|
||||
const dataStore = reactive<any>({
|
||||
columns: COLUMNS, //列表配置项
|
||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
||||
formData: FORM_DATA, //搜索配置项
|
||||
buttons: cloneDeep(BUTTON),
|
||||
options: [], //规格型号
|
||||
selectionList: [], //选中表格的行
|
||||
loading: false
|
||||
labelWidth: "120px",
|
||||
dialogVisible: false, //弹窗
|
||||
selectionList: [] //选中表格的行
|
||||
});
|
||||
|
||||
// 表格选择事件
|
||||
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
|
||||
}
|
||||
);
|
||||
// 顶部按钮点击事件
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
console.log(item);
|
||||
$router.push({ path: "/foundation/set/goods/add" });
|
||||
};
|
||||
|
||||
// 搜索
|
||||
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">
|
||||
@@ -99,4 +90,8 @@ watch(
|
||||
padding: 0 16px 40px;
|
||||
}
|
||||
}
|
||||
.el-dialog .el-dialog__header {
|
||||
padding: 8px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 质检单 -->
|
||||
<!-- 物料列表 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<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"
|
||||
}
|
||||
];
|
||||
173
src/views/foundation/set/shop/constant/list/details.ts
Normal file
173
src/views/foundation/set/shop/constant/list/details.ts
Normal file
@@ -0,0 +1,173 @@
|
||||
export const DETAILS_FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "platform_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "platform_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "access_system",
|
||||
placeholder: "请选择",
|
||||
type: "select",
|
||||
label: "订单接入系统:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_number",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺编码:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
}
|
||||
];
|
||||
|
||||
export const DETAILS_FORM_DATA1: any[] = [
|
||||
{
|
||||
prop: "platform_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "platform_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "access_system",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "订单接入系统:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_number",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺编码:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "jushuitan_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "聚水潭店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
}
|
||||
];
|
||||
export const DETAILS_FORM_DATA2: any[] = [
|
||||
{
|
||||
prop: "platform_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "platform_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "平台店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "access_system",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "订单接入系统:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_number",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "金蝶店铺编码:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "lingxing_store_name",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "领星店铺名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "lingxing_store_number",
|
||||
placeholder: "请输入",
|
||||
type: "input",
|
||||
label: "领星店铺SellerID:",
|
||||
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: "platform_name",
|
||||
placeholder: "请输入平台",
|
||||
type: "input",
|
||||
label: "平台: "
|
||||
},
|
||||
{
|
||||
prop: "platform_store_name",
|
||||
placeholder: "请输入平台店铺名称",
|
||||
type: "input",
|
||||
label: "平台店铺名称: "
|
||||
},
|
||||
{
|
||||
prop: "kingdee_store_name",
|
||||
placeholder: "请输入金蝶店铺名称",
|
||||
type: "input",
|
||||
label: "金蝶店铺名称: "
|
||||
},
|
||||
{
|
||||
prop: "jushuitan_store_name",
|
||||
placeholder: "请输入聚水潭店铺名称",
|
||||
type: "input",
|
||||
label: "聚水潭店铺名称: "
|
||||
},
|
||||
{
|
||||
prop: "lingxing_store_name",
|
||||
placeholder: "请输入领星店铺名称",
|
||||
type: "input",
|
||||
label: "领星店铺名称: "
|
||||
},
|
||||
{
|
||||
prop: "operator_name",
|
||||
placeholder: "请输入更新人",
|
||||
type: "input",
|
||||
label: "更新人: "
|
||||
},
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
startPlaceholder: "更新开始日期",
|
||||
endPlaceholder: "更新结束日期",
|
||||
startDate: "update_time",
|
||||
// endDate: "createEndDate",
|
||||
label: "更新时间: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50
|
||||
};
|
||||
59
src/views/foundation/set/shop/constant/list/table.ts
Normal file
59
src/views/foundation/set/shop/constant/list/table.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
// import { RenderScope } from "@/components/ProTable/interface";
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "平台店铺名称",
|
||||
prop: "platform_store_name",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "平台",
|
||||
prop: "platform_name",
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单接入系统",
|
||||
prop: "access_system_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "聚水潭店铺名称",
|
||||
prop: "jushuitan_store_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "领星店铺名称",
|
||||
prop: "lingxing_store_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "领星店铺SellerID",
|
||||
prop: "lingxing_store_number"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "金蝶店铺名称",
|
||||
prop: "kingdee_store_name"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "金蝶店铺编码",
|
||||
prop: "kingdee_store_number"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "更新人",
|
||||
prop: "operator"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "更新时间",
|
||||
prop: "updated_at"
|
||||
}
|
||||
];
|
||||
291
src/views/foundation/set/shop/index.vue
Normal file
291
src/views/foundation/set/shop/index.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<!-- 店铺资料 -->
|
||||
<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="dataStore.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="getShopListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
@selectionChange="selectionChange"
|
||||
>
|
||||
<template v-slot:search>
|
||||
<SearchForm
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
:searchParams="dataStore.initParam"
|
||||
:formData="dataStore.formData"
|
||||
/>
|
||||
</template>
|
||||
<template #platform_store_name="scope">
|
||||
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||
{{ scope.row.platform_store_name }}
|
||||
</a>
|
||||
</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 {
|
||||
getShopListApi,
|
||||
getShopDelApi,
|
||||
getShopAccessSystemApi,
|
||||
getShopAddApi,
|
||||
getShopUpApi,
|
||||
getShopDetailsApi,
|
||||
getShopListExportApi
|
||||
} from "@/api/modules/shop";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA, DETAILS_FORM_DATA1, DETAILS_FORM_DATA2 } 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),
|
||||
labelWidth: "120px",
|
||||
title: "新增店铺",
|
||||
detailsFormData: cloneDeep(DETAILS_FORM_DATA),
|
||||
detailsRuleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||
dialogVisible: false, // 弹窗
|
||||
accessSystemOptions: [], // 接入系統列表
|
||||
selectionList: [] // 列表选中数据
|
||||
});
|
||||
|
||||
// 表格选择事件
|
||||
const selectionChange = (selection: any) => {
|
||||
dataStore.selectionList = selection;
|
||||
};
|
||||
// 删除
|
||||
const handleDel = () => {
|
||||
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);
|
||||
});
|
||||
|
||||
const result = await getShopDelApi(ids.join(","));
|
||||
|
||||
if (result?.code === 0) {
|
||||
proTableRef?.value!.getTableList();
|
||||
useMsg("success", "删除成功 !");
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
// 新增
|
||||
const getShopAdd = async () => {
|
||||
const result = await getShopAddApi(dataStore.detailsRuleForm);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "新增成功 !");
|
||||
setTimeout(() => {
|
||||
dataStore.dialogVisible = false;
|
||||
proTableRef?.value!.getTableList();
|
||||
}, 600);
|
||||
}
|
||||
};
|
||||
// 更新
|
||||
const getShopUp = async () => {
|
||||
const result = await getShopUpApi(dataStore.rowId, dataStore.detailsRuleForm);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "更新成功 !");
|
||||
setTimeout(() => {
|
||||
dataStore.dialogVisible = false;
|
||||
proTableRef?.value!.getTableList();
|
||||
}, 600);
|
||||
}
|
||||
};
|
||||
// 详情
|
||||
const getShopDetails = async (id: any) => {
|
||||
const result = await getShopDetailsApi(id);
|
||||
if (result?.code === 0) {
|
||||
dataStore.dialogVisible = true;
|
||||
dataStore.title = "编辑店铺";
|
||||
setAccessSystem(result?.data?.access_system);
|
||||
dataStore.detailsRuleForm = result?.data;
|
||||
}
|
||||
};
|
||||
// 表格row点击事件
|
||||
const handleOpen = (row: any) => {
|
||||
dataStore.rowId = row.id;
|
||||
getShopDetails(row.id);
|
||||
};
|
||||
// 獲取接入系統列表數據
|
||||
const getShopAccessSystem = async () => {
|
||||
const result = await getShopAccessSystemApi();
|
||||
if (result?.code === 0) {
|
||||
let data = cloneDeep(result?.data);
|
||||
let options = [];
|
||||
|
||||
data?.length &&
|
||||
data.forEach((item: any) => {
|
||||
options.push({ value: item.id, label: item.name, is_default: item.is_default });
|
||||
});
|
||||
dataStore.accessSystemOptions = options;
|
||||
dataStore.detailsFormData[2].options = options;
|
||||
}
|
||||
};
|
||||
getShopAccessSystem();
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
const result = await getShopListExportApi(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.title = "新增店铺";
|
||||
dataStore.dialogVisible = true;
|
||||
}
|
||||
};
|
||||
// 弹窗取消
|
||||
const handleClose = () => {
|
||||
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||
detailsRef?.value?.formElement?.resetFields();
|
||||
dataStore.dialogVisible = false;
|
||||
};
|
||||
|
||||
// 弹窗确认
|
||||
const handleCommit = () => {
|
||||
if (!dataStore.detailsRuleForm.platform_name) {
|
||||
useMsg("warning", "平台不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.platform_store_name) {
|
||||
useMsg("warning", "平台店铺名称不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.access_system) {
|
||||
useMsg("warning", "订单接入系统不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.kingdee_store_name) {
|
||||
useMsg("warning", "金蝶店铺名称不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.kingdee_store_number) {
|
||||
useMsg("warning", "金蝶店铺编码不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (dataStore.detailsRuleForm.access_system === 2 && !dataStore.detailsRuleForm.jushuitan_store_name) {
|
||||
useMsg("warning", "聚水潭店铺名称不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (dataStore.detailsRuleForm.access_system === 3 && !dataStore.detailsRuleForm.lingxing_store_name) {
|
||||
useMsg("warning", "领星店铺名称不能为空 !");
|
||||
return false;
|
||||
}
|
||||
if (dataStore.detailsRuleForm.access_system === 3 && !dataStore.detailsRuleForm.lingxing_store_number) {
|
||||
useMsg("warning", "领星店铺SellerID不能为空 !");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dataStore.title === "新增店铺") {
|
||||
getShopAdd();
|
||||
} else {
|
||||
getShopUp();
|
||||
}
|
||||
};
|
||||
// 搜索
|
||||
const handleSearch = async (params: any) => {
|
||||
console.log(params, "==============>");
|
||||
dataStore.initParam = cloneDeep(params);
|
||||
//这里需要等到表格刷新以后才去请求
|
||||
nextTick(() => {
|
||||
proTableRef?.value!.getTableList();
|
||||
});
|
||||
};
|
||||
// 重置
|
||||
const handleReset = () => {
|
||||
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||
//这里需要等到表格刷新以后才去请求
|
||||
nextTick(() => {
|
||||
proTableRef?.value!.getTableList();
|
||||
});
|
||||
};
|
||||
// 接入系统切换
|
||||
const setAccessSystem = (val: any) => {
|
||||
if (val === 2) {
|
||||
dataStore.detailsFormData = cloneDeep(DETAILS_FORM_DATA1);
|
||||
dataStore.detailsFormData[2].options = cloneDeep(dataStore.accessSystemOptions);
|
||||
dataStore.detailsRuleForm.lingxing_store_name = "";
|
||||
dataStore.lingxing_store_number = "";
|
||||
}
|
||||
if (val === 3) {
|
||||
dataStore.detailsFormData = cloneDeep(DETAILS_FORM_DATA2);
|
||||
dataStore.detailsFormData[2].options = cloneDeep(dataStore.accessSystemOptions);
|
||||
dataStore.detailsRuleForm.jushuitan_store_name = "";
|
||||
}
|
||||
};
|
||||
watch(
|
||||
() => dataStore.detailsRuleForm.access_system,
|
||||
(newVal: any) => {
|
||||
setAccessSystem(newVal);
|
||||
}
|
||||
);
|
||||
</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"
|
||||
}
|
||||
];
|
||||
51
src/views/foundation/set/warehouse/constant/list/details.ts
Normal file
51
src/views/foundation/set/warehouse/constant/list/details.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export const DETAILS_FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "use_org_number",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "组织:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kd_warehouse_number ",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "金蝶仓库:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "kd_subwarehouse ",
|
||||
placeholder: "请选择",
|
||||
type: "selectMultiples",
|
||||
label: "金蝶子仓库:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "jst_warehouse_number",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "对应聚水潭仓库:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "lx_warehouse_number",
|
||||
placeholder: "请输入",
|
||||
type: "select",
|
||||
label: "对应领星仓库:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
}
|
||||
];
|
||||
export const DETAILS_RULE_FORM: any = {
|
||||
use_org_number: "101"
|
||||
};
|
||||
61
src/views/foundation/set/warehouse/constant/list/search.ts
Normal file
61
src/views/foundation/set/warehouse/constant/list/search.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
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: "use_org_number",
|
||||
placeholder: "请选择组织",
|
||||
type: "selectMultiple",
|
||||
label: "组织: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "kd_warehouse_number",
|
||||
placeholder: "请输入金蝶仓库",
|
||||
type: "input",
|
||||
label: "金蝶仓库: "
|
||||
},
|
||||
{
|
||||
prop: "kd_subwarehouse",
|
||||
placeholder: "请输入金蝶子仓库",
|
||||
type: "input",
|
||||
label: "金蝶子仓库: "
|
||||
},
|
||||
{
|
||||
prop: "operator_name",
|
||||
placeholder: "请输入更新人",
|
||||
type: "input",
|
||||
label: "更新人: "
|
||||
},
|
||||
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
startPlaceholder: "更新开始日期",
|
||||
endPlaceholder: "更新结束日期",
|
||||
startDate: "update_time",
|
||||
// endDate: "createEndDate",
|
||||
label: "更新时间: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50,
|
||||
use_org_number: ["101"]
|
||||
};
|
||||
48
src/views/foundation/set/warehouse/constant/list/table.ts
Normal file
48
src/views/foundation/set/warehouse/constant/list/table.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
// 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",
|
||||
fixed: true,
|
||||
label: "组织",
|
||||
prop: "use_org_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"
|
||||
}
|
||||
];
|
||||
236
src/views/foundation/set/warehouse/index.vue
Normal file
236
src/views/foundation/set/warehouse/index.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<!-- 店铺资料 -->
|
||||
<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="dataStore.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="getShopListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
@selectionChange="selectionChange"
|
||||
>
|
||||
<template v-slot:search>
|
||||
<SearchForm
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
:searchParams="dataStore.initParam"
|
||||
:formData="dataStore.formData"
|
||||
/>
|
||||
</template>
|
||||
<template #platform_store_name="scope">
|
||||
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||
{{ scope.row.platform_store_name }}
|
||||
</a>
|
||||
</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 { getShopListApi } from "@/api/modules/shop";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import { getWarehouseDelApi, getWarehouseAddApi, getWarehouseUpApi } from "@/api/modules/setWarehouse";
|
||||
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),
|
||||
labelWidth: "120px",
|
||||
title: "新增金蝶子仓与各系统仓库关系",
|
||||
detailsFormData: cloneDeep(DETAILS_FORM_DATA),
|
||||
detailsRuleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||
dialogVisible: false, // 弹窗
|
||||
selectionList: [] // 列表选中数据
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
//初始化组织数据
|
||||
const init = () => {
|
||||
if (userStore.orgIdArr.length) {
|
||||
dataStore.formData[0].options = userStore?.orgIdArr;
|
||||
dataStore.detailsFormData[0].options = userStore?.orgIdArr;
|
||||
}
|
||||
};
|
||||
init();
|
||||
// 表格选择事件
|
||||
const selectionChange = (selection: any) => {
|
||||
dataStore.selectionList = selection;
|
||||
};
|
||||
// 删除
|
||||
const handleDel = () => {
|
||||
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);
|
||||
});
|
||||
const result = await getWarehouseDelApi(ids.join(","));
|
||||
if (result?.code === 0) {
|
||||
proTableRef?.value!.getTableList();
|
||||
useMsg("success", "删除成功 !");
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
// 新增
|
||||
const getWarehouseAdd = async () => {
|
||||
const result = await getWarehouseAddApi(dataStore.detailsRuleForm);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "新增成功 !");
|
||||
setTimeout(() => {
|
||||
dataStore.dialogVisible = false;
|
||||
proTableRef?.value!.getTableList();
|
||||
}, 600);
|
||||
}
|
||||
};
|
||||
// 更新
|
||||
const getWarehouseUp = async () => {
|
||||
const result = await getWarehouseUpApi(dataStore.rowId, dataStore.detailsRuleForm);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "更新成功 !");
|
||||
setTimeout(() => {
|
||||
dataStore.dialogVisible = false;
|
||||
proTableRef?.value!.getTableList();
|
||||
}, 600);
|
||||
}
|
||||
};
|
||||
// 详情
|
||||
const getShopDetails = async (id: any) => {
|
||||
const result = await getShopDetailsApi(id);
|
||||
if (result?.code === 0) {
|
||||
dataStore.dialogVisible = true;
|
||||
dataStore.title = "编辑金蝶子仓与各系统仓库关系";
|
||||
setAccessSystem(result?.data?.access_system);
|
||||
dataStore.detailsRuleForm = result?.data;
|
||||
}
|
||||
};
|
||||
// 表格row点击事件
|
||||
const handleOpen = (row: any) => {
|
||||
dataStore.rowId = row.id;
|
||||
getShopDetails(row.id);
|
||||
};
|
||||
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
const result = await getShopListExportApi(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.title = "新增金蝶子仓与各系统仓库关系";
|
||||
dataStore.dialogVisible = true;
|
||||
}
|
||||
};
|
||||
// 弹窗取消
|
||||
const handleClose = () => {
|
||||
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||
detailsRef?.value?.formElement?.resetFields();
|
||||
dataStore.dialogVisible = false;
|
||||
};
|
||||
|
||||
// 弹窗确认
|
||||
const handleCommit = () => {
|
||||
if (!dataStore.detailsRuleForm.use_org_number) {
|
||||
return useMsg("warning", "组织不能为空 !");
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.kd_warehouse_number) {
|
||||
return useMsg("warning", "金蝶仓库不能为空 !");
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.kd_subwarehouse) {
|
||||
return useMsg("warning", "金蝶子仓库不能为空 !");
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.jst_warehouse_number) {
|
||||
return useMsg("warning", "对应聚水潭仓库不能为空 !");
|
||||
}
|
||||
if (!dataStore.detailsRuleForm.lx_warehouse_number) {
|
||||
return useMsg("warning", "对应对应领星仓库不能为空 !");
|
||||
}
|
||||
if (dataStore.title === "新增金蝶子仓与各系统仓库关系") {
|
||||
getWarehouseAdd();
|
||||
} else {
|
||||
getWarehouseUp();
|
||||
}
|
||||
};
|
||||
// 搜索
|
||||
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>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
@@ -53,6 +53,7 @@ import { cloneDeep } from "lodash-es";
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTableRef = ref<ProTableInstance>();
|
||||
const router = useRouter();
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 数据源
|
||||
|
||||
@@ -11,13 +11,15 @@ export const COLUMNS = [
|
||||
align: "left",
|
||||
label: "来源单号",
|
||||
prop: "src_bill_no",
|
||||
width: 140
|
||||
width: 140,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单单号",
|
||||
prop: "order_no",
|
||||
width: 140
|
||||
width: 140,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
@@ -25,18 +27,18 @@ export const COLUMNS = [
|
||||
prop: "customer_name",
|
||||
width: 140
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "入库组织",
|
||||
prop: "warehousing_org_name",
|
||||
width: 200
|
||||
label: "入库时间",
|
||||
prop: "storage_time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "单据类型",
|
||||
prop: "bill_type_name",
|
||||
width: 140
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
@@ -60,7 +62,7 @@ export const COLUMNS = [
|
||||
align: "left",
|
||||
label: "出厂价",
|
||||
prop: "factory_price",
|
||||
width: 140
|
||||
width: 66
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
@@ -78,7 +80,7 @@ export const COLUMNS = [
|
||||
align: "left",
|
||||
label: "入库数量",
|
||||
prop: "real_qty",
|
||||
width: 140
|
||||
width: 76
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
@@ -90,13 +92,13 @@ export const COLUMNS = [
|
||||
align: "left",
|
||||
label: "单位",
|
||||
prop: "unit_name",
|
||||
width: 120
|
||||
width: 50
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库时间",
|
||||
prop: "storage_time",
|
||||
width: 160
|
||||
label: "入库组织",
|
||||
prop: "warehousing_org_name",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 入库单 -->
|
||||
<!-- 入库单列表 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<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
367
vite.config.ts.timestamp-1761526887211-bf09e25f7bade.mjs
Normal file
367
vite.config.ts.timestamp-1761526887211-bf09e25f7bade.mjs
Normal file
File diff suppressed because one or more lines are too long
367
vite.config.ts.timestamp-1761526957978-11dadb76ad61e.mjs
Normal file
367
vite.config.ts.timestamp-1761526957978-11dadb76ad61e.mjs
Normal file
File diff suppressed because one or more lines are too long
367
vite.config.ts.timestamp-1762304755718-8c17e0d0abd23.mjs
Normal file
367
vite.config.ts.timestamp-1762304755718-8c17e0d0abd23.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user