feat: 🚀 订阅功能
This commit is contained in:
3
src/views/export/list/constant/list/index.ts
Normal file
3
src/views/export/list/constant/list/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS };
|
||||
52
src/views/export/list/constant/list/search.ts
Normal file
52
src/views/export/list/constant/list/search.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
//搜索表单配置项
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "export_type",
|
||||
placeholder: "请选择任务类型",
|
||||
type: "select",
|
||||
label: "任务类型:",
|
||||
options: []
|
||||
},
|
||||
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
label: "操作时间:",
|
||||
startPlaceholder: "操作开始日期",
|
||||
endPlaceholder: "操作结束日期",
|
||||
startDate: "operate_time"
|
||||
// endDate: "endDate"
|
||||
},
|
||||
{
|
||||
prop: "status",
|
||||
placeholder: "请选择状态",
|
||||
type: "select",
|
||||
options: [
|
||||
{
|
||||
value: -1,
|
||||
label: "导出失败"
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: "正在导出"
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "导出成功"
|
||||
}
|
||||
],
|
||||
label: "状态:"
|
||||
},
|
||||
{
|
||||
prop: "creator",
|
||||
placeholder: "请输入操作人",
|
||||
type: "input",
|
||||
label: "操作人:"
|
||||
}
|
||||
];
|
||||
//搜索表单值
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50
|
||||
};
|
||||
28
src/views/export/list/constant/list/table.ts
Normal file
28
src/views/export/list/constant/list/table.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// 销售订单 表格配置项
|
||||
export const COLUMNS = [
|
||||
{
|
||||
align: "left",
|
||||
label: "任务类型",
|
||||
prop: "bill_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "操作日期",
|
||||
prop: "created_at"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "状态",
|
||||
prop: "status_text"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "附件",
|
||||
prop: "download_url"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "操作人",
|
||||
prop: "creator"
|
||||
}
|
||||
];
|
||||
89
src/views/export/list/index.vue
Normal file
89
src/views/export/list/index.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<!-- 导出列表 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
:formData="dataStore.formData"
|
||||
:columns="dataStore.columns"
|
||||
:request-api="getListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
:orgCode="dataStore.ruleForm.orgCode"
|
||||
>
|
||||
<!-- 导出状态 -->
|
||||
<template #status_text="scope">
|
||||
<span v-if="scope.row.status_text === '导出成功'" style="color: #3ad6ac">
|
||||
{{ scope.row.status_text }}
|
||||
<i class="iconfont icon-chenggong"></i>
|
||||
</span>
|
||||
<span v-if="scope.row.status_text === '导出失败'" style="color: #ff5363">
|
||||
{{ scope.row.status_text }}
|
||||
<i class="iconfont icon-shijing"></i>
|
||||
</span>
|
||||
<span v-if="scope.row.status_text === '正在导出'" style="color: #fdc027">{{
|
||||
scope.row.status_text + "..."
|
||||
}}</span>
|
||||
</template>
|
||||
<!-- 下载(7天内) -->
|
||||
<template #download_url="scope">
|
||||
<a
|
||||
style="color: #4178d5"
|
||||
:href="scope.row.download_url"
|
||||
v-if="
|
||||
scope.row.status == 1 &&
|
||||
Math.abs((new Date(scope.row.date).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
|
||||
"
|
||||
>下载</a
|
||||
>
|
||||
<a v-else style="color: #666666; cursor: no-drop">下载</a>
|
||||
</template>
|
||||
</ProTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="exportList">
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { ref, reactive } from "vue";
|
||||
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 dataStore: any = reactive({
|
||||
columns: COLUMNS, //列表配置项
|
||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
||||
formData: FORM_DATA //搜索配置项,
|
||||
});
|
||||
|
||||
//获取导出类型
|
||||
const getExportTypes = async () => {
|
||||
const result: Record<string, any> = await getExportTypesApi();
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
let options: any[] = [];
|
||||
//将数据格式化为label,value的形式
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
value: item.export_type,
|
||||
label: item.bill_name
|
||||
});
|
||||
});
|
||||
//赋值任务类型
|
||||
dataStore.formData[0].options = cloneDeep(options);
|
||||
}
|
||||
};
|
||||
getExportTypes();
|
||||
</script>
|
||||
<style scope lang="scss">
|
||||
.main-container {
|
||||
width: -moz-available;
|
||||
width: -webkit-fill-available;
|
||||
width: stretch;
|
||||
height: -moz-available;
|
||||
height: -webkit-fill-available;
|
||||
height: stretch;
|
||||
height: 100% !important;
|
||||
margin: 0 16px;
|
||||
}
|
||||
</style>
|
||||
7
src/views/foundation/set/data/constant/list/button.ts
Normal file
7
src/views/foundation/set/data/constant/list/button.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "reportManagementInstantBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
4
src/views/foundation/set/data/constant/list/index.ts
Normal file
4
src/views/foundation/set/data/constant/list/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/foundation/set/data/constant/list/search.ts
Normal file
80
src/views/foundation/set/data/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/foundation/set/data/constant/list/table.ts
Normal file
107
src/views/foundation/set/data/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/foundation/set/data/index.vue
Normal file
102
src/views/foundation/set/data/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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="foundationSetData">
|
||||
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>
|
||||
13
src/views/foundation/set/data/init/btnClick.ts
Normal file
13
src/views/foundation/set/data/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/foundation/set/data/init/index.ts
Normal file
2
src/views/foundation/set/data/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
15
src/views/foundation/set/material/constant/list/button.ts
Normal file
15
src/views/foundation/set/material/constant/list/button.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "foundationSetMaterialBtnExport",
|
||||
type: "add",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "刷新",
|
||||
permission: "foundationSetMaterialBtnRefresh",
|
||||
type: "del"
|
||||
}
|
||||
];
|
||||
4
src/views/foundation/set/material/constant/list/index.ts
Normal file
4
src/views/foundation/set/material/constant/list/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
44
src/views/foundation/set/material/constant/list/search.ts
Normal file
44
src/views/foundation/set/material/constant/list/search.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
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: "selectMultipleD",
|
||||
label: "组织: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "material",
|
||||
placeholder: "请输入物料名称/编码/规格型号",
|
||||
type: "input",
|
||||
label: "物料: "
|
||||
},
|
||||
{
|
||||
prop: "product_line",
|
||||
placeholder: "请输入品线",
|
||||
type: "input",
|
||||
label: "品线: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50,
|
||||
org_number: "101"
|
||||
};
|
||||
61
src/views/foundation/set/material/constant/list/table.ts
Normal file
61
src/views/foundation/set/material/constant/list/table.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "物料编码",
|
||||
prop: "material_number"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "规格型号(SKU)",
|
||||
prop: "sku"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料名称",
|
||||
prop: "material_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "组织",
|
||||
prop: "org_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "品线",
|
||||
prop: "product_line"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "69码",
|
||||
prop: "bar_code"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "FNSKU",
|
||||
prop: "fnsku"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "1级分类",
|
||||
prop: "category_lv1"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "2级分类",
|
||||
prop: "category_lv2"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "3级分类",
|
||||
prop: "category_lv3"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "SPU",
|
||||
prop: "spu"
|
||||
}
|
||||
];
|
||||
96
src/views/foundation/set/material/index.vue
Normal file
96
src/views/foundation/set/material/index.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<!-- 质检单 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
<PermissionButton
|
||||
:buttons="dataStore.buttons"
|
||||
@handleButtonClickCallback="handleButtonClickCallback"
|
||||
></PermissionButton>
|
||||
</div>
|
||||
|
||||
<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="foundationSetMaterial">
|
||||
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 { 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 proTableRef = 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
|
||||
});
|
||||
//设置组织数组
|
||||
dataStore.formData[0].options = userStore.orgIdArr;
|
||||
// 表格选择事件
|
||||
const selectionChange = (selection: any) => {
|
||||
dataStore.selectionList = selection;
|
||||
};
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
btnClick[type](item, dataStore.selectionList, proTableRef);
|
||||
};
|
||||
|
||||
//搜索
|
||||
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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
44
src/views/foundation/set/material/init/btnClick.ts
Normal file
44
src/views/foundation/set/material/init/btnClick.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
|
||||
console.log("导出操作", item);
|
||||
console.log(selectionList, "=selectionList=");
|
||||
let length = selectionList.length;
|
||||
if (!length) {
|
||||
useMsg("warning", "请选择需要删除的数据!");
|
||||
return;
|
||||
}
|
||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
proTable.value!.getTableList();
|
||||
// const result = await commitListApi();
|
||||
// if (result.status === 200) {
|
||||
// useMsg("success", "删除成功 !");
|
||||
// } else {
|
||||
// useMsg("error", result.message);
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
// proTable: any
|
||||
export const handleAdd = (item: any, selectionList: any[]) => {
|
||||
console.log("刷新操作", item);
|
||||
let length = selectionList.length;
|
||||
let ids: any = [];
|
||||
if (length && length > 100) {
|
||||
useMsg("warning", "选中刷新数据最大100条!");
|
||||
return;
|
||||
}
|
||||
selectionList.forEach((item: any) => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
del: handleDel,
|
||||
add: handleAdd
|
||||
};
|
||||
2
src/views/foundation/set/material/init/index.ts
Normal file
2
src/views/foundation/set/material/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "reportManagementBoxInventoryBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
4
src/views/foundation/set/priority/constant/list/index.ts
Normal file
4
src/views/foundation/set/priority/constant/list/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/foundation/set/priority/constant/list/search.ts
Normal file
80
src/views/foundation/set/priority/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/foundation/set/priority/constant/list/table.ts
Normal file
107
src/views/foundation/set/priority/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/foundation/set/priority/index.vue
Normal file
102
src/views/foundation/set/priority/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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>
|
||||
13
src/views/foundation/set/priority/init/btnClick.ts
Normal file
13
src/views/foundation/set/priority/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/foundation/set/priority/init/index.ts
Normal file
2
src/views/foundation/set/priority/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "reportManagementMaterialBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/foundation/set/relationship/constant/list/table.ts
Normal file
107
src/views/foundation/set/relationship/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/foundation/set/relationship/index.vue
Normal file
102
src/views/foundation/set/relationship/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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>
|
||||
13
src/views/foundation/set/relationship/init/btnClick.ts
Normal file
13
src/views/foundation/set/relationship/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/foundation/set/relationship/init/index.ts
Normal file
2
src/views/foundation/set/relationship/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
149
src/views/foundation/subscribe/list/add.vue
Normal file
149
src/views/foundation/subscribe/list/add.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<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"
|
||||
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
|
||||
:inline="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="foundationSubscribeListAdd">
|
||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||
import DetailsSearch from "@/components/DetailsSearch/index.vue";
|
||||
import { FORM_DATA, RULE_FORM } from "./constant/add";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import { getSubscribeDetailsApi, getSubscribeAddApi, getSubscribeUpdateApi } from "@/api/modules/subscribe";
|
||||
import { setDetailsData } from "./init/setDetailsData";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { BUTTON } from "./constant/add/button";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
const dataStore = reactive({
|
||||
formData: cloneDeep(FORM_DATA),
|
||||
ruleForm: cloneDeep(RULE_FORM),
|
||||
labelWidth: "120px",
|
||||
buttons: cloneDeep(BUTTON),
|
||||
selectOptions: [],
|
||||
isAdd: false, //用于判断用户是否点击了新增按钮
|
||||
selectedValues: [] // 绑定选中值:数组类型(因 multiple 为 true)
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
const $route = useRoute();
|
||||
dataStore.formData[0].options = userStore.orgIdArr;
|
||||
//新增
|
||||
const handleAdd = () => {
|
||||
if (
|
||||
dataStore.ruleForm?.customer_number.length ||
|
||||
dataStore.ruleForm?.org_number ||
|
||||
dataStore.ruleForm?.product_lines ||
|
||||
dataStore.ruleForm?.subscriber_dduid
|
||||
) {
|
||||
ElMessageBox.confirm("当前数据未提交, 确认放弃新增数据?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
dataStore.ruleForm = cloneDeep(RULE_FORM);
|
||||
dataStore.isAdd = true;
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
//添加
|
||||
const getSubscribeAdd = async (params: any) => {
|
||||
const result = await getSubscribeAddApi(params);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "新增成功 !");
|
||||
}
|
||||
};
|
||||
//更新
|
||||
const getSubscribeUpdate = async (params: any) => {
|
||||
const result = await getSubscribeUpdateApi($route.query.id, params);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", "更新成功 !");
|
||||
}
|
||||
};
|
||||
|
||||
const handleCommit = () => {
|
||||
if (!dataStore?.ruleForm?.org_number?.length) {
|
||||
return useMsg("warning", "组织不能为空 ! ");
|
||||
}
|
||||
if (!dataStore?.ruleForm?.customer_number?.length) {
|
||||
return useMsg("warning", "客户名称不能为空 ! ");
|
||||
}
|
||||
if (!dataStore?.ruleForm?.product_lines?.length) {
|
||||
return useMsg("warning", "品线不能为空 ! ");
|
||||
}
|
||||
if (!dataStore?.ruleForm?.subscriber_dduid) {
|
||||
return useMsg("warning", "订阅账号不能为空 ! ");
|
||||
}
|
||||
//参数
|
||||
let params = {
|
||||
org_number: dataStore.ruleForm?.org_number.join(","),
|
||||
product_lines: dataStore.ruleForm?.product_lines.join(","),
|
||||
customer_number: dataStore.ruleForm?.customer_number.join(","),
|
||||
subscriber_dduid: dataStore.ruleForm?.subscriber_dduid
|
||||
};
|
||||
|
||||
if (dataStore.isAdd || $route.query.title === "新增订阅") {
|
||||
getSubscribeAdd(params);
|
||||
}
|
||||
if (!dataStore.isAdd && $route.query.title === "编辑订阅") {
|
||||
getSubscribeUpdate(params);
|
||||
}
|
||||
};
|
||||
//详情
|
||||
const getSubscribeDetails = async () => {
|
||||
console.log($route.query.id);
|
||||
let id = $route.query.id;
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
const result = await getSubscribeDetailsApi(id);
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
//设置详情数据
|
||||
setDetailsData(dataStore, data);
|
||||
}
|
||||
};
|
||||
//本地多选远程搜索Tag删除回调(组织)
|
||||
const handleSelectMultipleRemoveTag = async (params: any) => {
|
||||
const { org_number } = params;
|
||||
let customers: any = [];
|
||||
// 筛选出 org_number 在 ids 中的数据
|
||||
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => org_number.includes(item.org_number));
|
||||
|
||||
dataStore.formData[1].options.length &&
|
||||
dataStore.formData[1].options.forEach((item: any) => {
|
||||
customers.push(item.value);
|
||||
});
|
||||
|
||||
dataStore.ruleForm.customer_number = customers;
|
||||
};
|
||||
getSubscribeDetails();
|
||||
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
console.log(item);
|
||||
if (item?.type === "add") {
|
||||
handleAdd();
|
||||
}
|
||||
if (item?.type === "commit") {
|
||||
handleCommit();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
15
src/views/foundation/subscribe/list/constant/add/button.ts
Normal file
15
src/views/foundation/subscribe/list/constant/add/button.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "新增",
|
||||
permission: "foundationSubscribeListAddBtnAdd",
|
||||
type: "add",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "提交",
|
||||
permission: "foundationSubscribeListAddBtnCommit",
|
||||
type: "commit"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,3 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./serach";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, BUTTON };
|
||||
57
src/views/foundation/subscribe/list/constant/add/serach.ts
Normal file
57
src/views/foundation/subscribe/list/constant/add/serach.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "org_number",
|
||||
placeholder: "",
|
||||
type: "selectMultiple",
|
||||
label: "组织:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
class: "form-item1",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "customer_number",
|
||||
placeholder: "",
|
||||
type: "selectMultipleRemoteCustomersNames",
|
||||
label: "客户名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "customer_number",
|
||||
placeholder: "",
|
||||
type: "input",
|
||||
label: "客户编码:",
|
||||
disabled: true,
|
||||
required: true,
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "product_lines",
|
||||
placeholder: "",
|
||||
type: "selectProductLinesRemote",
|
||||
label: "品线:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
},
|
||||
{
|
||||
prop: "subscriber_dduid",
|
||||
placeholder: "",
|
||||
type: "selectRemoteUser",
|
||||
label: "订阅账号:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [],
|
||||
class: "form-item1"
|
||||
}
|
||||
];
|
||||
export const RULE_FORM: any = {
|
||||
org_number: [],
|
||||
customers: [],
|
||||
product_lines: [],
|
||||
subscriber_dduid: ""
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "新增",
|
||||
permission: "foundationSubscribeDetailsBtnAdd",
|
||||
type: "add",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "提交",
|
||||
permission: "foundationSubscribeDetailsBtnCommit",
|
||||
type: "commit"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,3 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./serach";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, BUTTON };
|
||||
@@ -0,0 +1,47 @@
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "org",
|
||||
placeholder: "",
|
||||
type: "selectMultiple",
|
||||
label: "组织:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "name",
|
||||
placeholder: "",
|
||||
type: "selectMultiple",
|
||||
label: "客户名称:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "bm",
|
||||
placeholder: "",
|
||||
type: "input",
|
||||
label: "客户编码:",
|
||||
disabled: true,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
prop: "px",
|
||||
placeholder: "",
|
||||
type: "selectMultiple",
|
||||
label: "品线:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "dy",
|
||||
placeholder: "",
|
||||
type: "select",
|
||||
label: "订阅账号:",
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
];
|
||||
export const RULE_FORM: any = {};
|
||||
15
src/views/foundation/subscribe/list/constant/list/button.ts
Normal file
15
src/views/foundation/subscribe/list/constant/list/button.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "新增",
|
||||
permission: "foundationSubscribeListBtnAdd",
|
||||
type: "add",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "删除",
|
||||
permission: "foundationSubscribeListBtnDel",
|
||||
type: "del"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
75
src/views/foundation/subscribe/list/constant/list/search.ts
Normal file
75
src/views/foundation/subscribe/list/constant/list/search.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
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: "selectMultiple",
|
||||
label: "组织: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "customer_number",
|
||||
placeholder: "请输入客户名称",
|
||||
type: "selectMultipleRemote",
|
||||
label: "客户名称: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "customer_number1",
|
||||
placeholder: "请输入客户编码",
|
||||
type: "input",
|
||||
label: "客户编码: "
|
||||
},
|
||||
{
|
||||
prop: "product_line_name",
|
||||
placeholder: "请输入品线",
|
||||
type: "selectProductLinesRemote",
|
||||
label: "品线: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "subscriber_name",
|
||||
placeholder: "请输入订阅账号",
|
||||
type: "input",
|
||||
label: "订阅账号: "
|
||||
},
|
||||
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
startPlaceholder: "更新开始日期",
|
||||
endPlaceholder: "更新结束日期",
|
||||
startDate: "updated_at",
|
||||
// endDate: "createEndDate",
|
||||
label: "更新时间: "
|
||||
},
|
||||
{
|
||||
prop: "creator_name",
|
||||
placeholder: "请输入创建人",
|
||||
type: "input",
|
||||
label: "创建人: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 1,
|
||||
org_number: ["101"]
|
||||
};
|
||||
41
src/views/foundation/subscribe/list/constant/list/table.ts
Normal file
41
src/views/foundation/subscribe/list/constant/list/table.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
label: "订阅账号",
|
||||
prop: "subscriber_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "客户名称",
|
||||
prop: "customer_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "组织",
|
||||
prop: "org_name"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "客户编码",
|
||||
prop: "customer_number"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "品线",
|
||||
prop: "product_line_name"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "创建人",
|
||||
prop: "creator_name"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "更新时间",
|
||||
prop: "updated_at"
|
||||
}
|
||||
];
|
||||
120
src/views/foundation/subscribe/list/index.vue
Normal file
120
src/views/foundation/subscribe/list/index.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<!-- 质检单 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
<PermissionButton
|
||||
:buttons="dataStore.buttons"
|
||||
@handleButtonClickCallback="handleButtonClickCallback"
|
||||
></PermissionButton>
|
||||
</div>
|
||||
|
||||
<ProTable
|
||||
ref="proTableRef"
|
||||
:columns="dataStore.columns"
|
||||
:request-api="getSubscribeListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
@selectionChange="selectionChange"
|
||||
>
|
||||
<template v-slot:search>
|
||||
<SearchForm
|
||||
@search="handleSearch"
|
||||
@reset="handleReset"
|
||||
:searchParams="dataStore.initParam"
|
||||
:formData="dataStore.formData"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #subscriber_name="scope">
|
||||
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||
{{ scope.row.subscriber_name }}
|
||||
</a>
|
||||
</template>
|
||||
</ProTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="foundationSubscribeList">
|
||||
import SearchForm from "@/components/SearchForm/index.vue";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||
import { getSubscribeListApi } from "@/api/modules/subscribe";
|
||||
import { nextTick } from "vue";
|
||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||
//表格TS
|
||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||
import { btnClick } from "./init";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
|
||||
//深拷贝方法
|
||||
import { cloneDeep } from "lodash-es";
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTableRef = ref<ProTableInstance>();
|
||||
const router = useRouter();
|
||||
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 init = () => {
|
||||
if (userStore.orgIdArr.length) {
|
||||
dataStore.formData[0].options = userStore?.orgIdArr;
|
||||
}
|
||||
};
|
||||
init();
|
||||
// 表格选择事件
|
||||
const selectionChange = (selection: any) => {
|
||||
dataStore.selectionList = selection;
|
||||
};
|
||||
//顶部按钮事件
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
btnClick[type]({
|
||||
item,
|
||||
selectionList: dataStore.selectionList,
|
||||
proTable: proTableRef,
|
||||
router
|
||||
});
|
||||
};
|
||||
//搜索
|
||||
const handleSearch = async (params: any) => {
|
||||
dataStore.initParam = cloneDeep(params);
|
||||
//这里需要等到表格刷新以后才去请求
|
||||
nextTick(() => {
|
||||
proTableRef.value!.getTableList();
|
||||
});
|
||||
};
|
||||
//重置
|
||||
const handleReset = () => {
|
||||
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||
//这里需要等到表格刷新以后才去请求
|
||||
nextTick(() => {
|
||||
proTableRef.value!.getTableList();
|
||||
});
|
||||
};
|
||||
|
||||
//跳转详情
|
||||
const handleOpen = (row: any) => {
|
||||
router.push({
|
||||
path: "/foundation/subscribe/list/add",
|
||||
query: { id: row.id, title: "编辑订阅" }
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope lang="scss">
|
||||
.down-dialog-box {
|
||||
.el-dialog__body {
|
||||
padding: 0 16px 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
42
src/views/foundation/subscribe/list/init/btnClick.ts
Normal file
42
src/views/foundation/subscribe/list/init/btnClick.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { getSubscribeDelApi } from "@/api/modules/subscribe";
|
||||
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleDel = (params: any) => {
|
||||
const { selectionList, proTable } = params;
|
||||
let length = selectionList.length;
|
||||
if (!length) {
|
||||
useMsg("warning", "请选择需要删除的数据!");
|
||||
return;
|
||||
}
|
||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
let ids: any = [];
|
||||
selectionList.forEach((item: any) => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
const result = await getSubscribeDelApi(ids.join(","));
|
||||
if (result?.code === 0) {
|
||||
proTable.value!.getTableList();
|
||||
useMsg("success", "删除成功 !");
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
export const handleAdd = (params: any) => {
|
||||
const { router } = params;
|
||||
router.push({
|
||||
path: "/foundation/subscribe/list/add",
|
||||
query: { title: "新增订阅" }
|
||||
});
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
del: handleDel,
|
||||
add: handleAdd
|
||||
};
|
||||
2
src/views/foundation/subscribe/list/init/index.ts
Normal file
2
src/views/foundation/subscribe/list/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
51
src/views/foundation/subscribe/list/init/setDetailsData.ts
Normal file
51
src/views/foundation/subscribe/list/init/setDetailsData.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export const setDetailsData = (dataStore: any, data: any) => {
|
||||
//组织
|
||||
if (data?.orgs?.length) {
|
||||
data?.orgs?.forEach((item: any) => {
|
||||
dataStore.ruleForm.org_number.push(item.org_number);
|
||||
});
|
||||
}
|
||||
//客户
|
||||
let customers_names: any = [];
|
||||
if (data?.customers?.length) {
|
||||
data?.customers?.forEach((item: any) => {
|
||||
//客户编码
|
||||
dataStore.ruleForm.customers.push(item.customer_number);
|
||||
//客户名称下拉框数据初始化
|
||||
customers_names.push({
|
||||
value: item.customer_number,
|
||||
label: item.customer_name,
|
||||
org_number: "100"
|
||||
});
|
||||
});
|
||||
//客户名称值回填
|
||||
dataStore.ruleForm.customer_number = dataStore.ruleForm.customers;
|
||||
//客户名称下拉框数据
|
||||
dataStore.formData[1].options = customers_names;
|
||||
}
|
||||
let productLines: any[] = [];
|
||||
//品线
|
||||
if (data?.product_lines?.length) {
|
||||
data?.product_lines?.forEach((item: any) => {
|
||||
productLines.push({
|
||||
value: item,
|
||||
label: item
|
||||
});
|
||||
});
|
||||
//客户名称值回填
|
||||
dataStore.ruleForm.product_lines = data?.product_lines;
|
||||
//客户名称下拉框数据
|
||||
dataStore.formData[3].options = productLines;
|
||||
}
|
||||
//订阅账号
|
||||
if (data?.subscriber_dduid && data?.subscriber_name) {
|
||||
//订阅账号下拉框数据
|
||||
dataStore.formData[4].options = [
|
||||
{
|
||||
value: data?.subscriber_dduid,
|
||||
label: data?.subscriber_name
|
||||
}
|
||||
];
|
||||
dataStore.ruleForm.subscriber_dduid = data?.subscriber_dduid;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "foundationSubscribeWarehousingBtnExport",
|
||||
type: "add",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "刷新",
|
||||
permission: "foundationSubscribeWarehousingBtnRefresh",
|
||||
type: "del"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
@@ -0,0 +1,94 @@
|
||||
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",
|
||||
label: "单据编号: "
|
||||
},
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请输入来源单号",
|
||||
type: "input",
|
||||
label: "来源单号: "
|
||||
},
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请输入订单单号",
|
||||
type: "input",
|
||||
label: "订单单号: "
|
||||
},
|
||||
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请选择推送结果",
|
||||
type: "select",
|
||||
label: "推送结果: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请输入物料名称/编码/规格型号",
|
||||
type: "input",
|
||||
label: "物料编码: "
|
||||
},
|
||||
{
|
||||
prop: "org_number",
|
||||
placeholder: "请选择组织",
|
||||
type: "selectMultiple",
|
||||
label: "组织: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请选择仓库",
|
||||
type: "select",
|
||||
label: "仓库: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "securityNumbers",
|
||||
placeholder: "请输入子仓库",
|
||||
type: "input",
|
||||
label: "子仓库: "
|
||||
},
|
||||
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
startPlaceholder: "入库开始日期",
|
||||
endPlaceholder: "入库结束日期",
|
||||
startDate: "createBeginDate",
|
||||
endDate: "createEndDate",
|
||||
label: "入库日期: "
|
||||
},
|
||||
{
|
||||
prop: "lotNumbers",
|
||||
placeholder: "请输入订阅人",
|
||||
type: "input",
|
||||
label: "订阅人: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50,
|
||||
org_number: ["101"]
|
||||
};
|
||||
@@ -0,0 +1,95 @@
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "单据编码",
|
||||
prop: "securityNumber"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "来源单号",
|
||||
prop: "id"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单单号",
|
||||
prop: "specifications"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "客户名称",
|
||||
prop: "createTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库组织",
|
||||
prop: "downLoadNumber"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "单据类型",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "规格型号",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料编码",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料名称",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "出厂价",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库仓库",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库子仓库",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库数量",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单明细备注",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "单位",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "入库时间",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "创建时间",
|
||||
prop: "downLoadTime"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "推送结果",
|
||||
prop: "downLoadTime"
|
||||
}
|
||||
];
|
||||
80
src/views/foundation/subscribe/warehousing/index.vue
Normal file
80
src/views/foundation/subscribe/warehousing/index.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<!-- 质检单 -->
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
<PermissionButton
|
||||
:buttons="dataStore.buttons"
|
||||
@handleButtonClickCallback="handleButtonClickCallback"
|
||||
></PermissionButton>
|
||||
</div>
|
||||
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
: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="foundationSubscribeWarehousing">
|
||||
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 SearchForm from "@/components/SearchForm/index.vue";
|
||||
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
|
||||
});
|
||||
//设置组织数组
|
||||
dataStore.formData[5].options = userStore.orgIdArr;
|
||||
// 表格选择事件
|
||||
const selectionChange = (selection: any) => {
|
||||
dataStore.selectionList = selection;
|
||||
};
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
btnClick[type](item, dataStore.selectionList, proTable);
|
||||
};
|
||||
const handleSearch = () => {};
|
||||
const handleReset = () => {};
|
||||
</script>
|
||||
|
||||
<style scope lang="scss">
|
||||
.down-dialog-box {
|
||||
.el-dialog__body {
|
||||
padding: 0 16px 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
40
src/views/foundation/subscribe/warehousing/init/btnClick.ts
Normal file
40
src/views/foundation/subscribe/warehousing/init/btnClick.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
|
||||
console.log("导出操作", item);
|
||||
console.log(selectionList, "=selectionList=");
|
||||
let length = selectionList.length;
|
||||
if (!length) {
|
||||
useMsg("warning", "请选择需要删除的数据!");
|
||||
return;
|
||||
}
|
||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
proTable.value!.getTableList();
|
||||
// const result = await commitListApi();
|
||||
// if (result.status === 200) {
|
||||
// useMsg("success", "删除成功 !");
|
||||
// } else {
|
||||
// useMsg("error", result.message);
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
// proTable: any
|
||||
export const handleAdd = (item: any, selectionList: any[]) => {
|
||||
console.log("刷新操作", item);
|
||||
let length = selectionList.length;
|
||||
if (length && length > 100) {
|
||||
useMsg("warning", "选中刷新数据最大100条!");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
del: handleDel,
|
||||
add: handleAdd
|
||||
};
|
||||
2
src/views/foundation/subscribe/warehousing/init/index.ts
Normal file
2
src/views/foundation/subscribe/warehousing/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
12
src/views/home/index.scss
Normal file
12
src/views/home/index.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.box-bg {
|
||||
width: 70%;
|
||||
max-width: 1200px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
47
src/views/home/index.vue
Normal file
47
src/views/home/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="box card">
|
||||
<img class="box-bg" src="@/assets/images/welcome.png" alt="welcome" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="home">
|
||||
//登录请求接口
|
||||
import { getOrgsApi } from "@/api/modules/global";
|
||||
//用户信息存储
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
//setOrgIdArr
|
||||
const userStore = useUserStore();
|
||||
//获取组织
|
||||
const getOrgs = async () => {
|
||||
const result = await getOrgsApi();
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
if (data?.length) {
|
||||
let options: any = [];
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
id: item.id,
|
||||
value: item.org_number,
|
||||
label: item.org_name
|
||||
});
|
||||
});
|
||||
userStore.setOrgIdArr(options);
|
||||
}
|
||||
}
|
||||
};
|
||||
getOrgs();
|
||||
|
||||
// //获取供应商
|
||||
// const getSupplier = async () => {
|
||||
// const result = await getSupplierApi();
|
||||
// if (result?.code === 0) {
|
||||
// const { data } = result;
|
||||
// console.log(data, "=============>");
|
||||
// }
|
||||
// };
|
||||
// getSupplier();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
@@ -0,0 +1,15 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "inspectionManagementReportBtnExport",
|
||||
type: "export",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "刷新",
|
||||
permission: "inspectionManagementReportBtnRefresh",
|
||||
type: "refresh"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
@@ -0,0 +1,78 @@
|
||||
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: "src_bill_no",
|
||||
placeholder: "请输入来源单号",
|
||||
type: "input",
|
||||
label: "来源单号: "
|
||||
},
|
||||
{
|
||||
prop: "supplier_number",
|
||||
placeholder: "请选择供应商",
|
||||
type: "selectRemote",
|
||||
label: "供应商: ",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
prop: "inspector",
|
||||
placeholder: "请输入质检人",
|
||||
type: "input",
|
||||
label: "质检人: "
|
||||
},
|
||||
{
|
||||
prop: "Time",
|
||||
type: "daterange",
|
||||
options: [],
|
||||
startPlaceholder: "质检开始日期",
|
||||
endPlaceholder: "质检结束日期",
|
||||
startDate: "inspection_time",
|
||||
label: "质检时间: "
|
||||
},
|
||||
{
|
||||
prop: "org_number",
|
||||
placeholder: "请选择组织",
|
||||
type: "selectRemote",
|
||||
options: [],
|
||||
label: "组织: "
|
||||
},
|
||||
|
||||
{
|
||||
prop: "material_number",
|
||||
placeholder: "请输入物料编码",
|
||||
type: "input",
|
||||
label: "物料编码: "
|
||||
},
|
||||
{
|
||||
prop: "status",
|
||||
placeholder: "请选择质检状态",
|
||||
type: "select",
|
||||
options: [
|
||||
{ label: "已作废", value: -1 },
|
||||
{ label: "待质检", value: 0 },
|
||||
{ label: "部分质检", value: 1 },
|
||||
{ label: "已质检", value: 2 }
|
||||
],
|
||||
label: "质检状态: "
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM = {
|
||||
page: 1,
|
||||
size: 50
|
||||
};
|
||||
101
src/views/inspection/management/report/constant/list/table.ts
Normal file
101
src/views/inspection/management/report/constant/list/table.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "质检单",
|
||||
prop: "bill_no",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "质检状态",
|
||||
prop: "status",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "销售订单号",
|
||||
prop: "sales_bill_no",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "来源单号",
|
||||
prop: "src_bill_no",
|
||||
width: 200
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "质检类型",
|
||||
prop: "inspection_type",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "供应商",
|
||||
prop: "supplier_name",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "组织",
|
||||
prop: "org_name",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "规格型号",
|
||||
prop: "spec",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料编码",
|
||||
prop: "material_number",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料名称",
|
||||
prop: "material_name",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "应质检数量",
|
||||
prop: "qty_to_be_inspected",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "良品数",
|
||||
prop: "qty_good_product",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "次品数",
|
||||
prop: "qty_bad_product",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "质检人",
|
||||
prop: "inspector",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "质检时间",
|
||||
prop: "inspection_time",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "创建时间",
|
||||
prop: "created_at",
|
||||
width: 200
|
||||
}
|
||||
];
|
||||
105
src/views/inspection/management/report/index.vue
Normal file
105
src/views/inspection/management/report/index.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<!-- 质检单 -->
|
||||
<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="getQualityInspectListApi"
|
||||
:init-param="dataStore.initParam"
|
||||
@selectionChange="selectionChange"
|
||||
:orgCode="dataStore.ruleForm.orgCode"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="antiCode">
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
|
||||
// import { useMsg } from "@/hooks/useMsg";
|
||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||
import { getQualityInspectListApi } from "@/api/modules/inspection";
|
||||
// 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 { btnClick } from "./init";
|
||||
// import $Bus from "@/utils/mittBus";
|
||||
//深拷贝方法
|
||||
import { cloneDeep } from "lodash-es";
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref<ProTableInstance>();
|
||||
|
||||
// 数据源
|
||||
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,
|
||||
proTable
|
||||
},
|
||||
dataStore
|
||||
);
|
||||
};
|
||||
// // 规格型号
|
||||
// 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;
|
||||
// };
|
||||
|
||||
onMounted(() => {
|
||||
// $Bus.on("searchDownLoad", () => {
|
||||
// dataStore.ruleForm = cloneDeep(proTable.value!.searchParam);
|
||||
// });
|
||||
// $Bus.on("searchClear", () => {
|
||||
// dataStore.ruleForm = cloneDeep(RULE_FORM);
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scope lang="scss">
|
||||
.down-dialog-box {
|
||||
.el-dialog__body {
|
||||
padding: 0 16px 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
44
src/views/inspection/management/report/init/btnClick.ts
Normal file
44
src/views/inspection/management/report/init/btnClick.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { getQualityInspectReloadApi, getQualityInspectExportApi } from "@/api/modules/inspection";
|
||||
|
||||
//导出
|
||||
const getQualityInspectExport = async (proTable: any, dataStore: any) => {
|
||||
const result = await getQualityInspectExportApi(dataStore.ruleForm);
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", result?.msg);
|
||||
//请求成功后刷新列表
|
||||
proTable!.value?.getTableList();
|
||||
}
|
||||
};
|
||||
//刷新接口
|
||||
const getQualityInspectReload = async (selectionList: any, proTable: any) => {
|
||||
const result = await getQualityInspectReloadApi({ id: selectionList });
|
||||
if (result?.code === 0) {
|
||||
useMsg("success", result?.msg);
|
||||
//请求成功后刷新列表
|
||||
proTable!.value?.getTableList();
|
||||
}
|
||||
};
|
||||
// 导出
|
||||
export const handleExport = (params: any, dataStore: any) => {
|
||||
const { proTable } = params;
|
||||
getQualityInspectExport(proTable, dataStore);
|
||||
};
|
||||
// 刷新
|
||||
export const handleRefresh = (params: any, dataStore: any) => {
|
||||
const { proTable } = params;
|
||||
if (!dataStore.selectionList.length) {
|
||||
useMsg("warning", "请勾选数据刷新 !");
|
||||
return;
|
||||
}
|
||||
if (dataStore.selectionList.length && dataStore.selectionList.length > 50) {
|
||||
useMsg("warning", "最多刷新50条 !");
|
||||
return;
|
||||
}
|
||||
getQualityInspectReload(dataStore.selectionList, proTable);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/inspection/management/report/init/index.ts
Normal file
2
src/views/inspection/management/report/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "shipmentManagementListBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/inventory/management/list/constant/list/search.ts
Normal file
80
src/views/inventory/management/list/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/inventory/management/list/constant/list/table.ts
Normal file
107
src/views/inventory/management/list/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/inventory/management/list/index.vue
Normal file
102
src/views/inventory/management/list/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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="otherOperationTransferChangeBox">
|
||||
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>
|
||||
13
src/views/inventory/management/list/init/btnClick.ts
Normal file
13
src/views/inventory/management/list/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/inventory/management/list/init/index.ts
Normal file
2
src/views/inventory/management/list/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
83
src/views/login/index.scss
Normal file
83
src/views/login/index.scss
Normal file
@@ -0,0 +1,83 @@
|
||||
.login-container {
|
||||
height: 100%;
|
||||
min-height: 550px;
|
||||
background-color: #eeeeee;
|
||||
background-image: url("@/assets/images/login_bg.svg");
|
||||
background-size: 100% 100%;
|
||||
background-size: cover;
|
||||
.login-box {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 96.5%;
|
||||
height: 94%;
|
||||
padding: 0 50px;
|
||||
background-color: rgb(255 255 255 / 80%);
|
||||
border-radius: 10px;
|
||||
.dark {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 18px;
|
||||
}
|
||||
.login-left {
|
||||
width: 800px;
|
||||
margin-right: 10px;
|
||||
.login-left-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.login-form {
|
||||
width: 420px;
|
||||
padding: 50px 40px 45px;
|
||||
background-color: var(--el-bg-color);
|
||||
border-radius: 10px;
|
||||
box-shadow: rgb(0 0 0 / 10%) 0 2px 10px 2px;
|
||||
.login-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 45px;
|
||||
.login-icon {
|
||||
width: 60px;
|
||||
height: 52px;
|
||||
}
|
||||
.logo-text {
|
||||
padding: 0 0 0 25px;
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #34495e;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.login-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
white-space: nowrap;
|
||||
.el-button {
|
||||
width: 185px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (width <= 1250px) {
|
||||
.login-left {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (width <= 600px) {
|
||||
.login-form {
|
||||
width: 97% !important;
|
||||
}
|
||||
}
|
||||
61
src/views/login/index.vue
Normal file
61
src/views/login/index.vue
Normal file
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<el-main></el-main>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
//useRouter
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
// import { useMsg } from "@/hooks/useMsg";
|
||||
//登录请求接口
|
||||
import { loginApi } from "@/api/modules/login";
|
||||
|
||||
//用户信息存储
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
//重定向
|
||||
import { usePathUrl } from "@/hooks/usePathUrl";
|
||||
|
||||
const userStore = useUserStore();
|
||||
// 路由
|
||||
const $route = useRoute();
|
||||
const $router = useRouter();
|
||||
|
||||
// 设置用户数据
|
||||
const setUserData = (data: any) => {
|
||||
// 设置token
|
||||
userStore.setToken(data.access_token);
|
||||
// 设置用户信息
|
||||
userStore.setUserInfo(data.user_data);
|
||||
|
||||
//设置好了token和用户信息跳转到首页
|
||||
setTimeout(() => {
|
||||
$router.push({ path: "/" });
|
||||
}, 500);
|
||||
};
|
||||
|
||||
// 登录
|
||||
const loginHttp = async (code: any) => {
|
||||
const result: Record<string, any> = await loginApi(code);
|
||||
if (result.code === 0) {
|
||||
setUserData(result.data);
|
||||
} else {
|
||||
location.href = usePathUrl();
|
||||
}
|
||||
};
|
||||
|
||||
// 登录前的判断
|
||||
const login = () => {
|
||||
const { code } = $route.query;
|
||||
// 没有code直接跳转到登录页
|
||||
if (!code) {
|
||||
location.href = usePathUrl();
|
||||
return;
|
||||
}
|
||||
// 有code就登录请求
|
||||
loginHttp(code);
|
||||
};
|
||||
login();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-main {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "otherOperationTransferChangeBoxBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/other/operation/changeBox/constant/list/search.ts
Normal file
80
src/views/other/operation/changeBox/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/other/operation/changeBox/constant/list/table.ts
Normal file
107
src/views/other/operation/changeBox/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/other/operation/changeBox/index.vue
Normal file
102
src/views/other/operation/changeBox/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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="otherOperationTransferChangeBox">
|
||||
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>
|
||||
13
src/views/other/operation/changeBox/init/btnClick.ts
Normal file
13
src/views/other/operation/changeBox/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/other/operation/changeBox/init/index.ts
Normal file
2
src/views/other/operation/changeBox/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
105
src/views/other/operation/picking/constant/details/search.ts
Normal file
105
src/views/other/operation/picking/constant/details/search.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入拣货回退单",
|
||||
type: "input",
|
||||
label: "拣货回退单:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入发货单",
|
||||
type: "input",
|
||||
label: "发货单号:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入来源单号",
|
||||
type: "input",
|
||||
label: "来源单号:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入组织",
|
||||
type: "input",
|
||||
options: [],
|
||||
label: "组织:",
|
||||
disabled: true,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入仓库",
|
||||
type: "input",
|
||||
label: "仓库",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择来源类型:",
|
||||
type: "select",
|
||||
options: [],
|
||||
label: "来源类型:",
|
||||
disabled: false,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入起始库区",
|
||||
type: "input",
|
||||
label: "起始库区",
|
||||
disabled: false,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入目标库区",
|
||||
type: "input",
|
||||
label: "目标库区",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入回退方式",
|
||||
type: "input",
|
||||
label: "回退方式",
|
||||
disabled: false,
|
||||
required: true
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM: any = {
|
||||
productQty: "",
|
||||
materialNumber: "",
|
||||
orderBillNo: ""
|
||||
};
|
||||
export const FORM_DATA1: any[] = [
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入回退人",
|
||||
type: "input",
|
||||
label: "回退人:",
|
||||
disabled: true,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入回退时间",
|
||||
type: "input",
|
||||
label: "回退时间:",
|
||||
disabled: true,
|
||||
required: false
|
||||
}
|
||||
];
|
||||
export const RULE_FORM1: any = {
|
||||
productQty: "",
|
||||
materialNumber: "",
|
||||
orderBillNo: ""
|
||||
};
|
||||
143
src/views/other/operation/picking/constant/details/table.ts
Normal file
143
src/views/other/operation/picking/constant/details/table.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
export const COLUMNS = [
|
||||
{ type: "selection", fixed: "left", width: 40 },
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "收货单号",
|
||||
prop: "lotNumber",
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货状态",
|
||||
prop: "specifications",
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "销售订单号",
|
||||
prop: "materialName",
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "来源单号",
|
||||
prop: "materialNumber",
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货类型",
|
||||
prop: "generateComplete",
|
||||
width: 160
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "供应商",
|
||||
prop: "downLoadNumber",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "组织",
|
||||
prop: "createTime",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "规格型号",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料编码",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "物料名称",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货仓库",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "子仓库",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "应收货数量",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "实收货数量",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "实入库数量",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货人",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货时间",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单明细备注",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "收货时间",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "订单明细备注",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "是否作废",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "创建时间",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "期望交期",
|
||||
prop: "creator",
|
||||
width: 160
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "otherOperationTransferChangeBoxBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
4
src/views/other/operation/picking/constant/list/index.ts
Normal file
4
src/views/other/operation/picking/constant/list/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/other/operation/picking/constant/list/search.ts
Normal file
80
src/views/other/operation/picking/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/other/operation/picking/constant/list/table.ts
Normal file
107
src/views/other/operation/picking/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
83
src/views/other/operation/picking/details.vue
Normal file
83
src/views/other/operation/picking/details.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div class="card table-main">
|
||||
<div style="padding-bottom: 10px; border-bottom: 1px solid #eeeeee">
|
||||
<h3 style="margin: 10px">基础信息</h3>
|
||||
<DetailsSearch :formData="dataStore.formData" :ruleForm="dataStore.ruleForm" :labelWidth="dataStore.labelWidth" />
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 16px; padding-bottom: 16px">
|
||||
<h3 style="margin: 10px">物料信息</h3>
|
||||
<el-table :data="tableData" border height="300" style="width: 100%; margin-top: 20px">
|
||||
<el-table-column prop="id" label="ID" width="180" />
|
||||
<el-table-column prop="name" label="Name" />
|
||||
<el-table-column prop="amount1" label="Cost 1 ($)" />
|
||||
<el-table-column prop="amount2" label="Cost 2 ($)" />
|
||||
<el-table-column prop="amount3" label="Cost 3 ($)" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 16px; border-bottom: 1px solid #eeeeee">
|
||||
<h3 style="margin: 10px">操作信息</h3>
|
||||
<DetailsSearch
|
||||
:formData="dataStore.formData1"
|
||||
:ruleForm="dataStore.ruleForm1"
|
||||
:labelWidth="dataStore.labelWidth"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="receiptWarehousingReceiptOrderAdd">
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import DetailsSearch from "@/components/DetailsSearch/index.vue";
|
||||
import { FORM_DATA, RULE_FORM, RULE_FORM1, FORM_DATA1 } from "./constant/details/search";
|
||||
const dataStore = reactive<any>({
|
||||
labelWidth: "125px",
|
||||
ruleForm: cloneDeep(RULE_FORM), // 表单值
|
||||
formData: cloneDeep(FORM_DATA), //表单配置项
|
||||
ruleForm1: cloneDeep(RULE_FORM1), // 表单值
|
||||
formData1: cloneDeep(FORM_DATA1) //表单配置项
|
||||
});
|
||||
|
||||
const tableData: any[] = [
|
||||
{
|
||||
id: "12987122",
|
||||
name: "Tom",
|
||||
amount1: "234",
|
||||
amount2: "3.2",
|
||||
amount3: 10
|
||||
},
|
||||
{
|
||||
id: "12987123",
|
||||
name: "Tom",
|
||||
amount1: "165",
|
||||
amount2: "4.43",
|
||||
amount3: 12
|
||||
},
|
||||
{
|
||||
id: "12987124",
|
||||
name: "Tom",
|
||||
amount1: "324",
|
||||
amount2: "1.9",
|
||||
amount3: 9
|
||||
},
|
||||
{
|
||||
id: "12987125",
|
||||
name: "Tom",
|
||||
amount1: "621",
|
||||
amount2: "2.2",
|
||||
amount3: 17
|
||||
},
|
||||
{
|
||||
id: "12987126",
|
||||
name: "Tom",
|
||||
amount1: "539",
|
||||
amount2: "4.1",
|
||||
amount3: 15
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
102
src/views/other/operation/picking/index.vue
Normal file
102
src/views/other/operation/picking/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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="otherOperationTransferPicking">
|
||||
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>
|
||||
13
src/views/other/operation/picking/init/btnClick.ts
Normal file
13
src/views/other/operation/picking/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/other/operation/picking/init/index.ts
Normal file
2
src/views/other/operation/picking/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
@@ -0,0 +1,7 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "导出",
|
||||
permission: "otherOperationTransferBtnExport",
|
||||
type: "export"
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
import { FORM_DATA, RULE_FORM } from "./search";
|
||||
import { COLUMNS } from "./table";
|
||||
import { BUTTON } from "./button";
|
||||
export { FORM_DATA, RULE_FORM, COLUMNS, BUTTON };
|
||||
80
src/views/other/operation/transfer/constant/list/search.ts
Normal file
80
src/views/other/operation/transfer/constant/list/search.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
};
|
||||
107
src/views/other/operation/transfer/constant/list/table.ts
Normal file
107
src/views/other/operation/transfer/constant/list/table.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
}
|
||||
];
|
||||
102
src/views/other/operation/transfer/index.vue
Normal file
102
src/views/other/operation/transfer/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- 质检单 -->
|
||||
<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="otherOperationTransfer">
|
||||
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>
|
||||
13
src/views/other/operation/transfer/init/btnClick.ts
Normal file
13
src/views/other/operation/transfer/init/btnClick.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 直接导出函数,无需额外包装对象
|
||||
export const handleExport = (item: any) => {
|
||||
console.log("导出操作", item);
|
||||
};
|
||||
|
||||
export const handleRefresh = (item: any) => {
|
||||
console.log("刷新操作", item);
|
||||
};
|
||||
|
||||
export const btnClick: any = {
|
||||
export: handleExport,
|
||||
refresh: handleRefresh
|
||||
};
|
||||
2
src/views/other/operation/transfer/init/index.ts
Normal file
2
src/views/other/operation/transfer/init/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { btnClick } from "./btnClick";
|
||||
export { btnClick };
|
||||
90
src/views/receipt/warehousing/receiptOrder/add.vue
Normal file
90
src/views/receipt/warehousing/receiptOrder/add.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div style="padding-bottom: 16px">
|
||||
<PermissionButton
|
||||
:buttons="dataStore.buttons"
|
||||
@handleButtonClickCallback="handleButtonClickCallback"
|
||||
></PermissionButton>
|
||||
</div>
|
||||
|
||||
<div class="card table-main">
|
||||
<div style="padding-bottom: 10px; border-bottom: 1px solid #eeeeee">
|
||||
<h3 style="margin: 10px">基础信息</h3>
|
||||
<DetailsSearch
|
||||
:formData="dataStore.formData"
|
||||
:ruleForm="dataStore.ruleForm"
|
||||
:labelWidth="dataStore.labelWidth"
|
||||
@getSearchValue="getSearchValue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 16px">
|
||||
<h3 style="margin: 10px">明细</h3>
|
||||
|
||||
<FormTable
|
||||
:columns="dataStore.formTableColumns"
|
||||
:tableData="dataStore.formTableData"
|
||||
@handleKeyupEnterInputValue="handleKeyupEnterInputValue"
|
||||
ref="formTableRef"
|
||||
>
|
||||
<template #operation="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleMxAdd()"
|
||||
v-if="scope.$index === dataStore.formTableData.length - 1"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button size="small" @click="handleDelete(scope)">删除</el-button>
|
||||
</template>
|
||||
</FormTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="receiptWarehousingReceiptOrderAdd">
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import DetailsSearch from "@/components/DetailsSearch/index.vue";
|
||||
import FormTable from "@/components/FormTable/index.vue";
|
||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||
import { FORM_DATA, RULE_FORM, FORM_TABLE_COLUMNS, FORM_TABLE_DATA, FORM_TABLE_DATA_INIT } from "./constant/add";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { BUTTON } from "./constant/add/button";
|
||||
const dataStore = reactive<any>({
|
||||
labelWidth: "125px",
|
||||
buttons: BUTTON,
|
||||
ruleForm: cloneDeep(RULE_FORM), // 表单值
|
||||
formData: cloneDeep(FORM_DATA), //表单配置项
|
||||
formTableColumns: cloneDeep(FORM_TABLE_COLUMNS), //可编辑表格配置项
|
||||
formTableData: cloneDeep(FORM_TABLE_DATA) //可编辑表格配置项
|
||||
});
|
||||
// 获取单据头数据
|
||||
const getSearchValue = (params: any) => {
|
||||
if (!params) {
|
||||
return false;
|
||||
}
|
||||
const { val } = params;
|
||||
console.log(val, "========val========");
|
||||
};
|
||||
const handleKeyupEnterInputValue = () => {};
|
||||
//明细新增
|
||||
const handleMxAdd = () => {
|
||||
dataStore.formTableData.push(FORM_TABLE_DATA_INIT);
|
||||
};
|
||||
//明细删除
|
||||
const handleDelete = (scope: any) => {
|
||||
if (dataStore.formTableData.length === 1) {
|
||||
useMsg("warning", "最少保留一行数据 ! ");
|
||||
return;
|
||||
}
|
||||
dataStore.formTableData.splice(scope.$index, 1);
|
||||
};
|
||||
//顶部按钮回调
|
||||
const handleButtonClickCallback = (item: any) => {
|
||||
const { type } = item;
|
||||
console.log(type, "==========>");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,10 @@
|
||||
export const BUTTON = [
|
||||
{
|
||||
text: "提交",
|
||||
permission: "receiptWarehousingReceiptOrderAddBtnCommit",
|
||||
type: "commit",
|
||||
props: {
|
||||
type: "primary"
|
||||
}
|
||||
}
|
||||
];
|
||||
186
src/views/receipt/warehousing/receiptOrder/constant/add/index.ts
Normal file
186
src/views/receipt/warehousing/receiptOrder/constant/add/index.ts
Normal file
@@ -0,0 +1,186 @@
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入收货单号",
|
||||
type: "input",
|
||||
label: "收货单号:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入销售订单号",
|
||||
type: "input",
|
||||
label: "销售订单号:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入来源单号",
|
||||
type: "input",
|
||||
label: "来源单号:",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货状态",
|
||||
type: "select",
|
||||
options: [],
|
||||
label: "收货状态:",
|
||||
disabled: true,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入供应商",
|
||||
type: "input",
|
||||
label: "供应商",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货类型",
|
||||
type: "select",
|
||||
options: [],
|
||||
label: "收货类型:",
|
||||
disabled: false,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货",
|
||||
type: "input",
|
||||
label: "收货仓库",
|
||||
disabled: false,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货",
|
||||
type: "input",
|
||||
label: "子仓库",
|
||||
disabled: false,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入组织",
|
||||
type: "input",
|
||||
label: "组织",
|
||||
disabled: false,
|
||||
required: true
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM: any = {
|
||||
productQty: "",
|
||||
materialNumber: "",
|
||||
orderBillNo: ""
|
||||
};
|
||||
export const FORM_TABLE_DATA = [
|
||||
{
|
||||
serialNumber: "",
|
||||
specifications: "",
|
||||
barCode: "",
|
||||
materialName: "",
|
||||
materialNumber: "",
|
||||
isOldData: false
|
||||
}
|
||||
];
|
||||
//用于增加的时候默认数据
|
||||
export const FORM_TABLE_DATA_INIT = {
|
||||
serialNumber: "",
|
||||
specifications: "",
|
||||
barCode: "",
|
||||
materialName: "",
|
||||
materialNumber: "",
|
||||
isOldData: false
|
||||
};
|
||||
export const FORM_TABLE_COLUMNS = [
|
||||
{
|
||||
label: "操作",
|
||||
prop: "operation",
|
||||
disabled: false,
|
||||
isHeaderIcon: false,
|
||||
fixed: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
label: "规格型号",
|
||||
prop: "serialNumber",
|
||||
disabled: false,
|
||||
isHeaderIcon: true,
|
||||
formType: "input",
|
||||
fixed: true,
|
||||
required: true,
|
||||
options: []
|
||||
},
|
||||
|
||||
{
|
||||
label: "物料编码",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "物料名称",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "应收货数量",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
|
||||
{
|
||||
label: "单价",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "金额",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
|
||||
{
|
||||
label: "含税单价",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "价税合计",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "订单明细备注",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,169 @@
|
||||
export const FORM_DATA: any[] = [
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入收货单号",
|
||||
type: "input",
|
||||
label: "收货单号:",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入销售订单号",
|
||||
type: "input",
|
||||
label: "销售订单号:",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入来源单号",
|
||||
type: "input",
|
||||
label: "来源单号:",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货状态",
|
||||
type: "select",
|
||||
options: [],
|
||||
label: "收货状态:",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入供应商",
|
||||
type: "input",
|
||||
label: "供应商",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货类型",
|
||||
type: "select",
|
||||
options: [],
|
||||
label: "收货类型:",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货",
|
||||
type: "input",
|
||||
label: "收货仓库",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请选择收货",
|
||||
type: "input",
|
||||
label: "子仓库",
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: "orderBillNo",
|
||||
placeholder: "请输入组织",
|
||||
type: "input",
|
||||
label: "组织",
|
||||
disabled: true
|
||||
}
|
||||
];
|
||||
|
||||
export const RULE_FORM: any = {
|
||||
productQty: "",
|
||||
materialNumber: "",
|
||||
orderBillNo: ""
|
||||
};
|
||||
export const FORM_TABLE_DATA = [
|
||||
{
|
||||
serialNumber: "",
|
||||
specifications: "",
|
||||
barCode: "",
|
||||
materialName: "",
|
||||
materialNumber: "",
|
||||
isOldData: false
|
||||
}
|
||||
];
|
||||
//用于增加的时候默认数据
|
||||
export const FORM_TABLE_DATA_INIT = {
|
||||
serialNumber: "",
|
||||
specifications: "",
|
||||
barCode: "",
|
||||
materialName: "",
|
||||
materialNumber: "",
|
||||
isOldData: false
|
||||
};
|
||||
export const FORM_TABLE_COLUMNS = [
|
||||
{
|
||||
label: "规格型号",
|
||||
prop: "serialNumber",
|
||||
disabled: false,
|
||||
isHeaderIcon: true,
|
||||
formType: "input",
|
||||
fixed: true,
|
||||
required: true,
|
||||
options: []
|
||||
},
|
||||
|
||||
{
|
||||
label: "物料编码",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "物料名称",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "应收货数量",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
isHeaderIcon: true,
|
||||
required: true,
|
||||
fixed: true,
|
||||
disabled: false
|
||||
},
|
||||
|
||||
{
|
||||
label: "单价",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "金额",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
|
||||
{
|
||||
label: "含税单价",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "价税合计",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "订单明细备注",
|
||||
prop: "numberCode",
|
||||
formType: "input",
|
||||
required: false,
|
||||
disabled: false
|
||||
}
|
||||
];
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user