From 9c6e3000d607e71999ecbbd7b27c1e68e2547ee3 Mon Sep 17 00:00:00 2001 From: "HUOJIN\\92525" Date: Fri, 26 Dec 2025 18:14:08 +0800 Subject: [PATCH] no message --- src/views/base/area/components/AreaSelect.vue | 9 +- src/views/base/point/Point.data.ts | 5 + src/views/base/point/components/PointForm.vue | 9 + .../base/point/components/PointSelect.vue | 2 +- src/views/count/CountPlan.api.ts | 74 ++++ src/views/count/CountPlan.data.ts | 81 +++++ src/views/count/CountPlanList.vue | 309 ++++++++++++++++ .../V20251223_1__menu_insert_CountPlan.sql | 40 +++ src/views/count/components/CountPlanForm.vue | 333 ++++++++++++++++++ src/views/count/components/CountPlanModal.vue | 73 ++++ src/views/receive/asn/components/AsnModal.vue | 46 +-- src/views/shipping/components/PickModal.vue | 2 +- 12 files changed, 957 insertions(+), 26 deletions(-) create mode 100644 src/views/count/CountPlan.api.ts create mode 100644 src/views/count/CountPlan.data.ts create mode 100644 src/views/count/CountPlanList.vue create mode 100644 src/views/count/V20251223_1__menu_insert_CountPlan.sql create mode 100644 src/views/count/components/CountPlanForm.vue create mode 100644 src/views/count/components/CountPlanModal.vue diff --git a/src/views/base/area/components/AreaSelect.vue b/src/views/base/area/components/AreaSelect.vue index acd3075..e63981b 100644 --- a/src/views/base/area/components/AreaSelect.vue +++ b/src/views/base/area/components/AreaSelect.vue @@ -78,7 +78,9 @@ export default defineComponent({ //默认启用 izActive: propTypes.number.def(1), //默认未删除 - delFlag:propTypes.number.def(0) + delFlag:propTypes.number.def(0), + //库区 + areaCode: propTypes.array }, emits: ['change', 'update:value', 'optionsLoaded'], setup(props, { emit }) { @@ -160,13 +162,14 @@ export default defineComponent({ loading.value = true; const res = await defHttp.get({ - url: '/base/Area/list', + url: '/base/area/list', params: { pageSize: props.pageSize, pageNo: page, keyword: keyword, izActive: props.izActive, - delFlag: props.delFlag + delFlag: props.delFlag, + areaCode: props.areaCode, }, }); diff --git a/src/views/base/point/Point.data.ts b/src/views/base/point/Point.data.ts index fc45629..71037ca 100644 --- a/src/views/base/point/Point.data.ts +++ b/src/views/base/point/Point.data.ts @@ -27,6 +27,11 @@ export const columns: BasicColumn[] = [ align: 'center', dataIndex: 'colNum', }, + { + title: '储位编码', + align: 'center', + dataIndex: 'nodeCode', + }, { title: '层', align: 'center', diff --git a/src/views/base/point/components/PointForm.vue b/src/views/base/point/components/PointForm.vue index 3689bc2..a3dde81 100644 --- a/src/views/base/point/components/PointForm.vue +++ b/src/views/base/point/components/PointForm.vue @@ -78,6 +78,11 @@ + + + + + defHttp.get({url: Api.countDetailList, params:{ id }}); + +export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }}); +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + const url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/src/views/count/CountPlan.data.ts b/src/views/count/CountPlan.data.ts new file mode 100644 index 0000000..ffa4ae9 --- /dev/null +++ b/src/views/count/CountPlan.data.ts @@ -0,0 +1,81 @@ +import { BasicColumn } from '/@/components/Table'; +import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '盘点单号', + align: 'center', + dataIndex: 'orderNo', + }, + { + title: '盘点类型', + align: 'center', + dataIndex: 'countType_dictText', + }, + { + title: '状态', + align: 'center', + dataIndex: 'status_dictText', + }, + { + title: '审核人', + align: 'center', + dataIndex: 'auditor', + }, + { + title: '创建时间', + align: 'center', + dataIndex: 'createTime', + }, +]; + +//子表表格配置 +export const countDetailColumns: JVxeColumn[] = [ + { + title: '盘点明细ID', + key: 'id', + type: JVxeTypes.hidden, + }, + { + title: '物料', + key: 'itemCode', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '库位', + key: 'pointCode', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '容器', + key: 'stockCode', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '库存数量', + key: 'invQty', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '盘点数量', + key: 'countQty', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '盘点人', + key: 'countBy', + type: JVxeTypes.normal, + width: '200px', + }, + { + title: '盘点日期', + key: 'planDate', + type: JVxeTypes.normal, + width: '200px', + }, +]; diff --git a/src/views/count/CountPlanList.vue b/src/views/count/CountPlanList.vue new file mode 100644 index 0000000..6460071 --- /dev/null +++ b/src/views/count/CountPlanList.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/count/V20251223_1__menu_insert_CountPlan.sql b/src/views/count/V20251223_1__menu_insert_CountPlan.sql new file mode 100644 index 0000000..a0d9b64 --- /dev/null +++ b/src/views/count/V20251223_1__menu_insert_CountPlan.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/count文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +-- 主菜单 +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('176647664878701', NULL, '盘点', '/count/countPlanList', 'count/CountPlanList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0); + +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878702', '176647664878701', '添加盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878703', '176647664878701', '编辑盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878704', '176647664878701', '删除盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878705', '176647664878701', '批量删除盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878706', '176647664878701', '导出excel_盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176647664878707', '176647664878701', '导入excel_盘点', NULL, NULL, 0, NULL, NULL, 2, 'count:data_count_plan:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-12-23 15:57:28', NULL, NULL, 0, 0, '1', 0); + +-- 角色授权(以 admin 角色为例,role_id 可替换) +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878708', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878701', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878709', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878702', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878810', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878703', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878811', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878704', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878812', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878705', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878813', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878706', NULL, '2025-12-23 15:57:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176647664878814', 'f6817f48af4fb3af11b9e8bf182f618b', '176647664878707', NULL, '2025-12-23 15:57:28', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/count/components/CountPlanForm.vue b/src/views/count/components/CountPlanForm.vue new file mode 100644 index 0000000..a7bec77 --- /dev/null +++ b/src/views/count/components/CountPlanForm.vue @@ -0,0 +1,333 @@ + + + + diff --git a/src/views/count/components/CountPlanModal.vue b/src/views/count/components/CountPlanModal.vue new file mode 100644 index 0000000..bf94e83 --- /dev/null +++ b/src/views/count/components/CountPlanModal.vue @@ -0,0 +1,73 @@ + + + + diff --git a/src/views/receive/asn/components/AsnModal.vue b/src/views/receive/asn/components/AsnModal.vue index 816ba6e..5e3df42 100644 --- a/src/views/receive/asn/components/AsnModal.vue +++ b/src/views/receive/asn/components/AsnModal.vue @@ -1,6 +1,6 @@ @@ -8,31 +8,34 @@ import { ref, unref } from 'vue'; import { BasicModal, useModalInner } from '/@/components/Modal'; import AsnForm from './AsnForm.vue'; - import { useMessage } from '/@/hooks/web/useMessage'; - const { createMessage } = useMessage(); + export default { - name: "TestCgMainVxeModal", - components:{ + name: 'AsnModal', + components: { BasicModal, - AsnForm + AsnForm, }, - emits:['register','success'], - setup(_p, {emit}){ - const formComponent = ref() + emits: ['register', 'success'], + setup(_p, { emit }) { + const formComponent = ref(); const isUpdate = ref(true); const formDisabled = ref(false); - const title = ref('') + const title = ref(''); //表单赋值 - const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { - setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter}); + const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { + setModalProps({ + confirmLoading: false, + showCancelBtn: data?.showFooter, + showOkBtn: data?.showFooter, + }); isUpdate.value = !!data?.isUpdate; formDisabled.value = !data?.showFooter; title.value = data?.isUpdate ? (unref(formDisabled) ? '入库单详情' : '编辑入库单') : '新增入库单'; if (unref(isUpdate)) { - formComponent.value.edit(data.record) - }else{ - formComponent.value.add() + formComponent.value.edit(data.record); + } else { + formComponent.value.add(); } }); @@ -40,10 +43,11 @@ formComponent.value.submitForm(); } - function submitSuccess(){ + function submitSuccess() { emit('success'); closeModal(); } + return { registerModal, title, @@ -51,12 +55,12 @@ formDisabled, handleSubmit, submitSuccess, - } - } - } + }; + }, + };