diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/checkdetail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/checkdetail.vue
new file mode 100644
index 00000000..130951bb
--- /dev/null
+++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/checkdetail.vue
@@ -0,0 +1,825 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 基础信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 物料信息
+
+
+
+
+
+ 新增
+
+
+
+
+
+ 物料名称
+
+
+ handleMatCode(scope, val)" class="!w-180px">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 出库库区
+
+
+
+
+
+
+
+
+
+ 出库库位
+
+
+
+
+
+
+
+
+
+
+ 出库数量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+ 附件信息
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+ 下载
+
+
+
+
+
+
+
+
+
+
+
+ 系统信息
+
+
+
+
+
+ {{ userList.find((user) => user.id == formData.creator)?.nickname }}
+
+
+
+
+ {{ formatDate(formData.createTime, 'YYYY-MM-DD HH:mm') }}
+
+
+
+
+
+
+ {{ userList.find((user) => user.id == formData.outbound)?.nickname }}
+
+
+
+
+ {{ formatDate(formData.outboundTime, 'YYYY-MM-DD HH:mm') }}
+
+
+
+
+
+
+ {{ userList.find((user) => user.id == formData.cancel)?.nickname }}
+
+
+
+
+ {{ formatDate(formData.cancelTime, 'YYYY-MM-DD HH:mm') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/index.vue
index 7e9feee5..4b3d4786 100644
--- a/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/index.vue
+++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/storagecheck/index.vue
@@ -53,7 +53,7 @@
{{ whList.find((tag) => tag.id === scope.row.whId)?.wh_name }}
-
+
{{ formatDate(scope.row.checkTime, 'YYYY-MM-DD') }}
@@ -70,12 +70,11 @@
-
+
编辑
-
- 删除
+
+ 查看
@@ -99,6 +98,7 @@ import * as WarehouseApi from '@/api/heli/warehouse'
defineOptions({ name: 'StorageCheck' })
+const router = useRouter() // 路由
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -163,6 +163,11 @@ const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
+/** 详情操作 新增/查看 */
+const openDetail = (active: string, id?: number) => {
+ router.push({ path: '/inventory/check', query: { type: active, id: id } })
+}
+
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
diff --git a/sql/v1.2.0/1.structure.sql b/sql/v1.2.0/1.structure.sql
index ecc5bec2..92672206 100644
--- a/sql/v1.2.0/1.structure.sql
+++ b/sql/v1.2.0/1.structure.sql
@@ -109,7 +109,7 @@ CREATE TABLE `wms_storage_check_mat` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='盘点物料表';
-CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `v_storage_material_log` AS
+CREATE OR REPLACE VIEW v_storage_material_log AS
select 0 AS `deleted`,`lg`.`id` AS `id`,`lg`.`creator` AS `creator`,`lg`.`create_time` AS `create_time`,`lg`.`updater` AS `updater`,`lg`.`update_time` AS `update_time`,
`lg`.`tenant_id` AS `tenant_id`,`lg`.`status` AS `status`,`mat`.`code` AS `mat_code`,`mat`.`name` AS `mat_name`,
(select `system_dict_data`.`label` from `system_dict_data` where ((`system_dict_data`.`dict_type` = 'heli_material_type') and (`system_dict_data`.`value` = `mat`.`material_type`))) AS `mat_type`,
@@ -129,7 +129,7 @@ from (((((`wms_storage_log` `lg`
left join `wms_pn` `pn` on((`lg`.`pn_id` = `pn`.`id`)))
where ((`st`.`deleted` = 0) and (`mat`.`deleted` = 0) and (`wh`.`deleted` = 0) and (`rg`.`deleted` = 0) and (`pn`.`deleted` = 0));
-CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `v_storage_material_now` AS
+CREATE OR REPLACE VIEW v_storage_material_now AS
select `t`.`deleted` AS `deleted`,`t`.`id` AS `id`,`t`.`creator` AS `creator`,`t`.`create_time` AS `create_time`,`t`.`updater` AS `updater`,`t`.`update_time` AS `update_time`,`t`.`tenant_id` AS `tenant_id`,
`t`.`mat_code` AS `mat_code`,`t`.`mat_name` AS `mat_name`,`t`.`mat_type` AS `mat_type`,`t`.`mat_spec` AS `mat_spec`,`t`.`mat_unit` AS `mat_unit`,`t`.`mat_brand` AS `mat_brand`,
`t`.`wh_id` AS `wh_id`,`t`.`wh_name` AS `wh_name`,`t`.`rg_id` AS `rg_id`,`t`.`rg_name` AS `rg_name`,`t`.`pn_id` AS `pn_id`,`t`.`pn_name` AS `pn_name`,`t`.`lot_no` AS `lot_no`,`t`.`short_name` AS `short_name`,
@@ -144,4 +144,17 @@ from (
`wh`.`id` AS `wh_id`,`wh`.`wh_name` AS `wh_name`,`rg`.`id` AS `rg_id`,`rg`.`rg_name` AS `rg_name`,`pn`.`id` AS `pn_id`,`pn`.`pn_name` AS `pn_name`,
(case when (isnull(`lg`.`lot_no`) = 1) then '' else `lg`.`lot_no` end) AS `lot_no`,(case when ((`st`.`stock_type` = 1) and (`lg`.`status` = 2)) then `lg`.`storage_ok_qty` when ((`st`.`stock_type` = 1) and (`lg`.`status` = 3)) then (-(1) * `lg`.`storage_ok_qty`) when ((`st`.`stock_type` = 2) and (`lg`.`status` = 2)) then (-(1) * `lg`.`storage_ok_qty`) when ((`st`.`stock_type` = 2) and (`lg`.`status` = 3)) then `lg`.`storage_ok_qty` else `lg`.`storage_ok_qty` end) AS `storage_ok_qty`
from (((((`mes-heli`.`wms_storage_log` `lg` left join `mes-heli`.`wms_storage` `st` on((`lg`.`stock_id` = `st`.`id`))) left join `mes-heli`.`base_material` `mat` on((`lg`.`mat_id` = `mat`.`id`))) left join `mes-heli`.`wms_wh` `wh` on((`lg`.`wh_id` = `wh`.`id`))) left join `mes-heli`.`wms_rg` `rg` on((`lg`.`rg_id` = `rg`.`id`))) left join `mes-heli`.`wms_pn` `pn` on((`lg`.`pn_id` = `pn`.`id`))) where ((`st`.`deleted` = 0) and (`mat`.`deleted` = 0) and (`wh`.`deleted` = 0) and (`rg`.`deleted` = 0) and (`pn`.`deleted` = 0))) `t`
-group by `t`.`deleted`,`t`.`id`,`t`.`creator`,`t`.`create_time`,`t`.`updater`,`t`.`update_time`,`t`.`tenant_id`,`t`.`mat_code`,`t`.`mat_name`,`t`.`mat_type`,`t`.`mat_spec`,`t`.`mat_unit`,`t`.`mat_brand`,`t`.`wh_id`,`t`.`wh_name`,`t`.`rg_id`,`t`.`rg_name`,`t`.`pn_id`,`t`.`pn_name`,`t`.`lot_no`,`t`.`short_name`;
\ No newline at end of file
+group by `t`.`deleted`,`t`.`id`,`t`.`creator`,`t`.`create_time`,`t`.`updater`,`t`.`update_time`,`t`.`tenant_id`,`t`.`mat_code`,`t`.`mat_name`,`t`.`mat_type`,`t`.`mat_spec`,`t`.`mat_unit`,`t`.`mat_brand`,`t`.`wh_id`,`t`.`wh_name`,`t`.`rg_id`,`t`.`rg_name`,`t`.`pn_id`,`t`.`pn_name`,`t`.`lot_no`,`t`.`short_name`;
+
+
+CREATE OR REPLACE VIEW v_storage_material_amount AS
+select `t`.`tenant_id` AS `tenant_id`,`t`.`mat_id` AS `mat_id`,`t`.`mat_name` AS `mat_name`,`t`.`mat_code` AS `mat_code`,`t`.`wh_id` AS `wh_id`,`t`.`rg_id` AS `rg_id`,`t`.`pn_id` AS `pn_id`,
+ `t`.`spec` AS `spec`,`t`.`unit` AS `unit`,`t`.`material_type` AS `material_type`,`t`.`lot_no` AS `lot_no`,'' AS `storage_ok_qty`,sum(`t`.`storage_ok_qty`) AS `mat_rest`
+from (
+ select `st`.`stock_type` AS `stock_type`,`mat`.`tenant_id` AS `tenant_id`,`mat`.`mat_id` AS `mat_id`,`bm`.`code` AS `mat_code`,`bm`.`name` AS `mat_name`,`mat`.`wh_id` AS `wh_id`,`mat`.`rg_id` AS `rg_id`,`mat`.`pn_id` AS `pn_id`,`mat`.`lot_no` AS `lot_no`,`bm`.`spec` AS `spec`,`bm`.`unit` AS `unit`,`bm`.`material_type` AS `material_type`,
+ (case when ((`st`.`status` = 2) and (`st`.`stock_type` = 1)) then `mat`.`storage_ok_qty` when ((`st`.`status` = 3) and (`st`.`stock_type` = 1)) then (-(1) * `mat`.`storage_ok_qty`) when ((`st`.`status` = 2) and (`st`.`stock_type` = 2)) then (-(1) * `mat`.`storage_ok_qty`) when ((`st`.`status` = 3) and (`st`.`stock_type` = 2)) then `mat`.`storage_ok_qty` else 0 end) AS `storage_ok_qty`
+ from ((`mes-heli`.`wms_storage_mat` `mat`
+ left join `mes-heli`.`wms_storage` `st` on((`mat`.`stock_id` = `st`.`id`)))
+ left join `mes-heli`.`base_material` `bm` on((`mat`.`mat_id` = `bm`.`id`)))
+ where ((`mat`.`deleted` = 0) and (`st`.`status` <> 1) and (`st`.`deleted` = 0) and (`bm`.`deleted` = 0) and (`bm`.`status` = 1))
+ ) `t` group by `t`.`mat_id`;
\ No newline at end of file