提交
This commit is contained in:
1 parent
e6b4b9a8d7
commit
6272d107dc
29 files changed
+5840
-4504
No files matched your search
@@ -1773,6 +1773,7 @@ export function fetchInsuranceCompanyList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
}) {
|
||||
return request.get({ url: '/web/admin/insurance-companies', params })
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ export type MaterialStockLog = {
|
||||
purpose: string
|
||||
remark: string
|
||||
createBy: string
|
||||
createByName?: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
@@ -82,7 +83,10 @@ export function fetchDeleteMaterial(id: string) {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchStockInMaterial(id: string, data: { qty: number; remark?: string }) {
|
||||
export function fetchStockInMaterial(
|
||||
id: string,
|
||||
data: { qty: number; remark?: string; stockInTime?: string }
|
||||
) {
|
||||
return request.post<Material>({
|
||||
url: `/web/admin/materials/${id}/stock-in`,
|
||||
data
|
||||
@@ -91,7 +95,7 @@ export function fetchStockInMaterial(id: string, data: { qty: number; remark?: s
|
||||
|
||||
export function fetchStockOutMaterial(
|
||||
id: string,
|
||||
data: { qty: number; receiver?: string; purpose?: string; remark?: string }
|
||||
data: { qty: number; receiver?: string; purpose?: string; remark?: string; stockOutTime?: string }
|
||||
) {
|
||||
return request.post<Material>({
|
||||
url: `/web/admin/materials/${id}/stock-out`,
|
||||
@@ -99,6 +103,30 @@ export function fetchStockOutMaterial(
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchBatchStockInMaterial(data: {
|
||||
items: { materialId: string; qty: number; remark?: string }[]
|
||||
remark?: string
|
||||
stockInTime?: string
|
||||
}) {
|
||||
return request.post<{ count: number }>({
|
||||
url: '/web/admin/materials/batch-stock-in',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchBatchStockOutMaterial(data: {
|
||||
items: { materialId: string; qty: number; remark?: string }[]
|
||||
receiver?: string
|
||||
purpose?: string
|
||||
remark?: string
|
||||
stockOutTime?: string
|
||||
}) {
|
||||
return request.post<{ count: number }>({
|
||||
url: '/web/admin/materials/batch-stock-out',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchMaterialStockLogList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_collection_protocol_no_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L1"}, {"id": "collection_protocol_no_index_handleview", "label": "handleView()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L457"}, {"id": "collection_protocol_no_index_resolveissuedusername", "label": "resolveIssuedUserName()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L504"}, {"id": "collection_protocol_no_index_handleselectionchange", "label": "handleSelectionChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L539"}, {"id": "collection_protocol_no_index_loaddata", "label": "loadData()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L543"}, {"id": "collection_protocol_no_index_handlesearch", "label": "handleSearch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L559"}, {"id": "collection_protocol_no_index_handlereset", "label": "handleReset()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L564"}, {"id": "collection_protocol_no_index_resetform", "label": "resetForm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L571"}, {"id": "collection_protocol_no_index_handleadd", "label": "handleAdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L582"}, {"id": "collection_protocol_no_index_handleedit", "label": "handleEdit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L591"}, {"id": "collection_protocol_no_index_handlesubmit", "label": "handleSubmit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L607"}, {"id": "collection_protocol_no_index_handledelete", "label": "handleDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L642"}, {"id": "collection_protocol_no_index_handlebatchdelete", "label": "handleBatchDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L649"}, {"id": "collection_protocol_no_index_handlebatchrevoke", "label": "handleBatchRevoke()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L663"}, {"id": "collection_protocol_no_index_openbatchgenerate", "label": "openBatchGenerate()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L679"}, {"id": "collection_protocol_no_index_handlebatchgenerate", "label": "handleBatchGenerate()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L688"}, {"id": "collection_protocol_no_index_openbatchissue", "label": "openBatchIssue()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L711"}, {"id": "collection_protocol_no_index_handlebatchissue", "label": "handleBatchIssue()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L718"}, {"id": "collection_protocol_no_index_loaduseroptions", "label": "loadUserOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-protocol-no/index.vue", "source_location": "L737"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_collection_protocol_no_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-aLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L1"}, {"id": "customer_index_handleview", "label": "handleView()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L276"}, {"id": "customer_index_handleselectionchange", "label": "handleSelectionChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L296"}, {"id": "customer_index_loaddata", "label": "loadData()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L300"}, {"id": "customer_index_handlesearch", "label": "handleSearch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L315"}, {"id": "customer_index_handlereset", "label": "handleReset()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L320"}, {"id": "customer_index_resetform", "label": "resetForm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L326"}, {"id": "customer_index_handleadd", "label": "handleAdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L338"}, {"id": "customer_index_handleedit", "label": "handleEdit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L346"}, {"id": "customer_index_handlesubmit", "label": "handleSubmit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L362"}, {"id": "customer_index_handledelete", "label": "handleDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L391"}, {"id": "customer_index_handlebatchdelete", "label": "handleBatchDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L398"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L228", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L229", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_fullscreen_loading", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L230", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_admin", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L231", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L237", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_status_tag_registry", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/customer/index.vue", "source_location": "L238", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_customer_index_vue", "target": "customer_index_handleview", "relation": "contains", "confidence": "EXTRACTED", "Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_admin_ts", "label": "admin.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L1"}, {"id": "api_admin_fetchgetmenulist", "label": "fetchGetMenuList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L10"}, {"id": "api_admin_fetchgetrolelist", "label": "fetchGetRoleList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L19"}, {"id": "api_admin_fetchuseroptions", "label": "fetchUserOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L26"}, {"id": "api_admin_fetchroleoptions", "label": "fetchRoleOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L33"}, {"id": "api_admin_fetchtenantlist", "label": "fetchTenantList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L43"}, {"id": "api_admin_fetchcreatetenant", "label": "fetchCreateTenant()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L56"}, {"id": "api_admin_fetchupdatetenant", "label": "fetchUpdateTenant()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L71"}, {"id": "api_admin_fetchdeletetenant", "label": "fetchDeleteTenant()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L89"}, {"id": "api_admin_fetchuserlist", "label": "fetchUserList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L100"}, {"id": "api_admin_fetchuserdetail", "label": "fetchUserDetail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L119"}, {"id": "api_admin_fetchcreateuser", "label": "fetchCreateUser()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L125"}, {"id": "api_admin_fetchupdateuser", "label": "fetchUpdateUser()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L147"}, {"id": "api_admin_fetchdeleteuser", "label": "fetchDeleteUser()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L170"}, {"id": "api_admin_fetchresetpassword", "label": "fetchResetPassword()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L177"}, {"id": "api_admin_fetchuploaduseravatar", "label": "fetchUploadUserAvatar()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L185"}, {"id": "api_admin_fetchregionlist", "label": "fetchRegionList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L196"}, {"id": "api_admin_fetchactiveregions", "label": "fetchActiveRegions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L214"}, {"id": "api_admin_fetchnotdeletedregions", "label": "fetchNotDeletedRegions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L231"}, {"id": "api_admin_fetchcategorylist", "label": "fetchCategoryList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L259"}, {"id": "api_admin_fetchcreatecategory", "label": "fetchCreateCategory()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L277"}, {"id": "api_admin_fetchupdatecategory", "label": "fetchUpdateCategory()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L290"}, {"id": "api_admin_fetchdeletecategory", "label": "fetchDeleteCategory()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L307"}, {"id": "api_admin_fetchuploadcategoryimage", "label": "fetchUploadCategoryImage()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L313"}, {"id": "api_admin_fetchunitlist", "label": "fetchUnitList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts", "source_location": "L324"}, {"id": "api_admin_fetchcreateunit", "label": "fetchCrLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_sample_code_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L1"}, {"id": "sample_code_index_handleview", "label": "handleView()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L496"}, {"id": "sample_code_index_handleselectionchange", "label": "handleSelectionChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L573"}, {"id": "sample_code_index_loaddata", "label": "loadData()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L577"}, {"id": "sample_code_index_handlesearch", "label": "handleSearch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L594"}, {"id": "sample_code_index_handlereset", "label": "handleReset()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L599"}, {"id": "sample_code_index_resetform", "label": "resetForm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L607"}, {"id": "sample_code_index_loaduseroptions", "label": "loadUserOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L619"}, {"id": "sample_code_index_handleadd", "label": "handleAdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L628"}, {"id": "sample_code_index_handleedit", "label": "handleEdit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L637"}, {"id": "sample_code_index_handlesubmit", "label": "handleSubmit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L654"}, {"id": "sample_code_index_handledelete", "label": "handleDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L690"}, {"id": "sample_code_index_handlebatchdelete", "label": "handleBatchDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L697"}, {"id": "sample_code_index_handlebatchrevoke", "label": "handleBatchRevoke()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L711"}, {"id": "sample_code_index_openbatchgenerate", "label": "openBatchGenerate()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L727"}, {"id": "sample_code_index_handlebatchgenerate", "label": "handleBatchGenerate()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L736"}, {"id": "sample_code_index_openbatchissue", "label": "openBatchIssue()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L759"}, {"id": "sample_code_index_handlebatchissue", "label": "handleBatchIssue()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L766"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_sample_code_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L430", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_sample_code_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/sample-code/index.vue", "source_location": "L431", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_sample_code_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_system_view_dialog_index_vue", "relation": "imports_from", "confidence": "ELine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_collection_region_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L1"}, {"id": "collection_region_index_handleview", "label": "handleView()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L433"}, {"id": "collection_region_index_onhospitalselectionchange", "label": "onHospitalSelectionChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L442"}, {"id": "collection_region_index_handleselectionchange", "label": "handleSelectionChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L446"}, {"id": "collection_region_index_loaddata", "label": "loadData()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L450"}, {"id": "collection_region_index_handlesearch", "label": "handleSearch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L465"}, {"id": "collection_region_index_handlereset", "label": "handleReset()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L470"}, {"id": "collection_region_index_handleadd", "label": "handleAdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L476"}, {"id": "collection_region_index_handleedit", "label": "handleEdit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L487"}, {"id": "collection_region_index_submitregion", "label": "submitRegion()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L498"}, {"id": "collection_region_index_handledelete", "label": "handleDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L522"}, {"id": "collection_region_index_handlebatchdelete", "label": "handleBatchDelete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L531"}, {"id": "collection_region_index_openhospitaldialog", "label": "openHospitalDialog()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L551"}, {"id": "collection_region_index_loadhospitals", "label": "loadHospitals()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L561"}, {"id": "collection_region_index_onhospitaldialogclosed", "label": "onHospitalDialogClosed()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L576"}, {"id": "collection_region_index_handleaddhospital", "label": "handleAddHospital()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L583"}, {"id": "collection_region_index_handleedithospital", "label": "handleEditHospital()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L594"}, {"id": "collection_region_index_submithospital", "label": "submitHospital()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L605"}, {"id": "collection_region_index_handledeletehospital", "label": "handleDeleteHospital()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L630"}, {"id": "collection_region_index_handlebatchdeletehospital", "label": "handleBatchDeleteHospital()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/basic-info/collection-region/index.vue", "source_location": "L637"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_basic_info_collection_region_index_vue", "target": "element_plus", "relatiLine truncated
|
||||
@@ -389,6 +389,7 @@
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
status: searchForm.tag || undefined
|
||||
})
|
||||
tableData.value = (res as any)?.list || []
|
||||
pagination.total = (res as any)?.total ?? 0
|
||||
|
||||
@@ -113,13 +113,16 @@
|
||||
{{ row.changeType === 'ck' ? (row.purpose || '-') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createBy"
|
||||
label="操作人"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="操作人" min-width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.createByName || row.createBy || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="140" align="center" header-align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.remark || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="操作时间"
|
||||
@@ -197,9 +200,9 @@
|
||||
{ label: '变动后库存', value: String(row.stockAfter ?? 0) },
|
||||
{ label: '领用人', value: row.changeType === 'ck' ? (row.receiver || '-') : '-' },
|
||||
{ label: '用途', value: row.changeType === 'ck' ? (row.purpose || '-') : '-' },
|
||||
{ label: '操作人', value: row.createBy },
|
||||
{ label: '操作时间', value: row.createTime },
|
||||
{ label: '备注', value: row.remark || '—', span: true }
|
||||
{ label: '操作人', value: row.createByName || row.createBy || '-' },
|
||||
{ label: '备注', value: row.remark || '—', span: true },
|
||||
{ label: '操作时间', value: row.createTime }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -54,11 +54,20 @@
|
||||
<el-icon><Plus /></el-icon>
|
||||
新增物料
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" @click="handleBatchStockIn">
|
||||
<el-icon><Upload /></el-icon>
|
||||
批量入库
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" @click="handleBatchStockOut">
|
||||
<el-icon><Download /></el-icon>
|
||||
批量出库
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
class="list-table"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
@@ -125,6 +134,14 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
label="备注"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="操作" min-width="400" fixed="right" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item" @click="handleStockIn(row)"><el-icon><Upload /></el-icon>入库</el-button>
|
||||
@@ -190,7 +207,23 @@
|
||||
<el-input v-model="formData.specModel" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="请输入单位" />
|
||||
<el-select
|
||||
v-model="formData.unit"
|
||||
placeholder="请选择单位"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
:loading="unitOptionsLoading"
|
||||
:remote-method="searchUnitOptions"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
@@ -248,6 +281,15 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="stockInTime">
|
||||
<el-date-picker
|
||||
v-model="stockInForm.stockInTime"
|
||||
type="datetime"
|
||||
placeholder="选择入库时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="stockInForm.remark"
|
||||
@@ -302,8 +344,34 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库时间" prop="stockOutTime">
|
||||
<el-date-picker
|
||||
v-model="stockOutForm.stockOutTime"
|
||||
type="datetime"
|
||||
placeholder="选择出库时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用人" prop="receiver">
|
||||
<el-input v-model="stockOutForm.receiver" placeholder="请输入领用人" />
|
||||
<el-select
|
||||
v-model="stockOutForm.receiver"
|
||||
placeholder="请选择领用人"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
:loading="receiverUserLoading"
|
||||
:remote-method="searchReceiverUsers"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="u in receiverUserOptions"
|
||||
:key="u.id"
|
||||
:label="formatReceiverUserLabel(u)"
|
||||
:value="(u.nickName || '').trim()"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途">
|
||||
<el-input
|
||||
@@ -339,6 +407,307 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量入库弹窗 -->
|
||||
<el-dialog
|
||||
v-model="batchStockInVisible"
|
||||
title="批量入库"
|
||||
width="920px"
|
||||
class="dialog-form-layout material-batch-stock-dialog"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="batchStockInFormRef"
|
||||
:model="batchStockInForm"
|
||||
:rules="batchStockInRules"
|
||||
label-position="top"
|
||||
scroll-to-error
|
||||
:scroll-into-view-options="{ behavior: 'smooth', block: 'center' }"
|
||||
>
|
||||
<div class="form-grid-2 batch-stock-move-head">
|
||||
<el-form-item label="入库时间" prop="stockInTime">
|
||||
<el-date-picker
|
||||
v-model="batchStockInForm.stockInTime"
|
||||
type="datetime"
|
||||
placeholder="选择入库时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="batchStockInForm.remark"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="可选,未填写行备注时将作为默认备注"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="batch-stock-move-lines">
|
||||
<div class="batch-stock-move-lines-head">
|
||||
<div class="batch-stock-move-lines-head-left">
|
||||
<span class="batch-stock-move-lines-title">入库明细</span>
|
||||
<span class="batch-stock-move-lines-hint">
|
||||
共 {{ batchStockInLines.length }} 项,请搜索添加物料并填写入库数量
|
||||
</span>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="batchInMaterialPickId"
|
||||
class="batch-stock-move-material-select"
|
||||
placeholder="搜索物料编码/名称并添加"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:loading="batchInMaterialPickLoading"
|
||||
:remote-method="searchBatchInMaterials"
|
||||
@change="onBatchInMaterialPick"
|
||||
>
|
||||
<el-option
|
||||
v-for="m in batchInMaterialOptions"
|
||||
:key="m.id"
|
||||
:label="formatBatchMaterialOptionLabel(m)"
|
||||
:value="m.id"
|
||||
:disabled="isBatchInMaterialOptionDisabled(m)"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-table
|
||||
v-if="batchStockInLines.length"
|
||||
:data="batchStockInLines"
|
||||
stripe
|
||||
class="list-table inner-table"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="56"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="(index) => index + 1"
|
||||
/>
|
||||
<el-table-column prop="materialCode" label="物料编码" min-width="120" align="center" header-align="center" />
|
||||
<el-table-column prop="materialName" label="物料名称" min-width="140" align="center" header-align="center" />
|
||||
<el-table-column prop="unit" label="单位" width="80" align="center" header-align="center" />
|
||||
<el-table-column label="当前库存" width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">{{ row.stockQty }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" min-width="130" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-model="row.qty"
|
||||
:min="0.01"
|
||||
:precision="2"
|
||||
:step="1"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="160" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" placeholder="可选" clearable class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center" header-align="center">
|
||||
<template #default="{ $index }">
|
||||
<el-button link type="danger" size="small" @click="batchStockInLines.splice($index, 1)">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty
|
||||
v-else
|
||||
description="请通过上方搜索框添加要入库的物料"
|
||||
:image-size="56"
|
||||
/>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="batchStockInVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:loading="batchStockInLoading"
|
||||
@click="handleBatchStockInSubmit"
|
||||
>
|
||||
<el-icon><Check /></el-icon>
|
||||
确认入库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量出库弹窗 -->
|
||||
<el-dialog
|
||||
v-model="batchStockOutVisible"
|
||||
title="批量出库"
|
||||
width="920px"
|
||||
class="dialog-form-layout material-batch-stock-dialog"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="batchStockOutFormRef"
|
||||
:model="batchStockOutForm"
|
||||
:rules="batchStockOutRules"
|
||||
label-position="top"
|
||||
scroll-to-error
|
||||
:scroll-into-view-options="{ behavior: 'smooth', block: 'center' }"
|
||||
>
|
||||
<div class="form-grid-2 batch-stock-move-head">
|
||||
<el-form-item label="出库时间" prop="stockOutTime">
|
||||
<el-date-picker
|
||||
v-model="batchStockOutForm.stockOutTime"
|
||||
type="datetime"
|
||||
placeholder="选择出库时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用人" prop="receiver">
|
||||
<el-select
|
||||
v-model="batchStockOutForm.receiver"
|
||||
placeholder="请选择领用人"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
:loading="receiverUserLoading"
|
||||
:remote-method="searchReceiverUsers"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="u in receiverUserOptions"
|
||||
:key="u.id"
|
||||
:label="formatReceiverUserLabel(u)"
|
||||
:value="(u.nickName || '').trim()"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途">
|
||||
<el-input
|
||||
v-model="batchStockOutForm.purpose"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="可选"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="batchStockOutForm.remark"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="可选"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="batch-stock-move-lines">
|
||||
<div class="batch-stock-move-lines-head">
|
||||
<div class="batch-stock-move-lines-head-left">
|
||||
<span class="batch-stock-move-lines-title">出库明细</span>
|
||||
<span class="batch-stock-move-lines-hint">
|
||||
共 {{ batchStockOutLines.length }} 项,请搜索添加物料并填写出库数量
|
||||
</span>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="batchOutMaterialPickId"
|
||||
class="batch-stock-move-material-select"
|
||||
placeholder="搜索物料编码/名称并添加"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:loading="batchOutMaterialPickLoading"
|
||||
:remote-method="searchBatchOutMaterials"
|
||||
@change="onBatchOutMaterialPick"
|
||||
>
|
||||
<el-option
|
||||
v-for="m in batchMaterialOptions"
|
||||
:key="m.id"
|
||||
:label="formatBatchMaterialOptionLabel(m)"
|
||||
:value="m.id"
|
||||
:disabled="isBatchOutMaterialOptionDisabled(m)"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-table
|
||||
v-if="batchStockOutLines.length"
|
||||
:data="batchStockOutLines"
|
||||
stripe
|
||||
class="list-table inner-table"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="56"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="(index) => index + 1"
|
||||
/>
|
||||
<el-table-column prop="materialCode" label="物料编码" min-width="120" align="center" header-align="center" />
|
||||
<el-table-column prop="materialName" label="物料名称" min-width="140" align="center" header-align="center" />
|
||||
<el-table-column prop="unit" label="单位" width="80" align="center" header-align="center" />
|
||||
<el-table-column label="当前库存" width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">{{ row.stockQty }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库数量" min-width="130" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-model="row.qty"
|
||||
:min="0.01"
|
||||
:max="row.stockQty"
|
||||
:precision="2"
|
||||
:step="1"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="160" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" placeholder="可选" clearable class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center" header-align="center">
|
||||
<template #default="{ $index }">
|
||||
<el-button link type="danger" size="small" @click="batchStockOutLines.splice($index, 1)">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty
|
||||
v-else
|
||||
description="请通过上方搜索框添加要出库的物料"
|
||||
:image-size="56"
|
||||
/>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="batchStockOutVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:loading="batchStockOutLoading"
|
||||
@click="handleBatchStockOutSubmit"
|
||||
>
|
||||
<el-icon><Check /></el-icon>
|
||||
确认出库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看弹窗 -->
|
||||
<SystemViewDialog
|
||||
v-model:visible="viewVisible"
|
||||
@@ -356,20 +725,23 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Plus, Close, Check, View, Box, RefreshLeft, Search, Upload, Download, Edit, Delete } from '@element-plus/icons-vue'
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import { fetchDictDataOptions } from '@/api/admin'
|
||||
import { fetchDictDataOptions, fetchItemUnitList, fetchUserList } from '@/api/admin'
|
||||
import {
|
||||
fetchMaterialList,
|
||||
fetchCreateMaterial,
|
||||
fetchUpdateMaterial,
|
||||
fetchDeleteMaterial,
|
||||
fetchStockInMaterial,
|
||||
fetchStockOutMaterial
|
||||
fetchStockOutMaterial,
|
||||
fetchBatchStockInMaterial,
|
||||
fetchBatchStockOutMaterial
|
||||
} from '@/api/material'
|
||||
import type { Material } from '@/api/material'
|
||||
|
||||
defineOptions({ name: 'CellStorageMaterial' })
|
||||
|
||||
const searchForm = reactive({ keyword: '', category: '', status: '' })
|
||||
const tableRef = ref()
|
||||
const tableData = ref<Material[]>([])
|
||||
const selectedRows = ref<Material[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -378,6 +750,43 @@
|
||||
// 字典选项
|
||||
const categoryOptions = ref<{ label: string; value: string }[]>([])
|
||||
|
||||
// 物品单位(来自物品单位管理)
|
||||
const unitOptions = ref<{ label: string; value: string }[]>([])
|
||||
const unitOptionsLoading = ref(false)
|
||||
|
||||
function mapUnitOption(u: { unitName?: string; unitCode?: string }) {
|
||||
const name = (u.unitName || '').trim()
|
||||
const code = (u.unitCode || '').trim()
|
||||
return {
|
||||
label: code ? `${name}(${code})` : name,
|
||||
value: name
|
||||
}
|
||||
}
|
||||
|
||||
function ensureUnitOption(unitName: string) {
|
||||
const v = unitName?.trim()
|
||||
if (!v) return
|
||||
if (!unitOptions.value.some((o) => o.value === v)) {
|
||||
unitOptions.value = [{ label: v, value: v }, ...unitOptions.value]
|
||||
}
|
||||
}
|
||||
|
||||
async function searchUnitOptions(query: string) {
|
||||
unitOptionsLoading.value = true
|
||||
try {
|
||||
const res = await fetchItemUnitList({
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: query?.trim() || undefined
|
||||
})
|
||||
unitOptions.value = (res.list || []).map(mapUnitOption).filter((o) => o.value)
|
||||
} catch {
|
||||
unitOptions.value = []
|
||||
} finally {
|
||||
unitOptionsLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 新增/编辑
|
||||
const dialogVisible = ref(false)
|
||||
const dialogTitle = ref('新增物料')
|
||||
@@ -406,10 +815,11 @@
|
||||
const stockInLoading = ref(false)
|
||||
const stockInFormRef = ref()
|
||||
const stockInMaterialId = ref<string | null>(null)
|
||||
const stockInForm = reactive({ qty: 1, remark: '' })
|
||||
const stockInForm = reactive({ qty: 1, stockInTime: '', remark: '' })
|
||||
|
||||
const stockInRules = {
|
||||
qty: [{ required: true, message: '请输入入库数量', trigger: 'blur' }]
|
||||
qty: [{ required: true, message: '请输入入库数量', trigger: 'blur' }],
|
||||
stockInTime: [{ required: true, message: '请选择入库时间', trigger: 'change' }]
|
||||
}
|
||||
|
||||
// 出库
|
||||
@@ -418,11 +828,104 @@
|
||||
const stockOutFormRef = ref()
|
||||
const stockOutMaterialId = ref<string | null>(null)
|
||||
const stockOutStockQty = ref(0)
|
||||
const stockOutForm = reactive({ qty: 1, receiver: '', purpose: '', remark: '' })
|
||||
const stockOutForm = reactive({ qty: 1, stockOutTime: '', receiver: '', purpose: '', remark: '' })
|
||||
const receiverUserOptions = ref<Api.User.UserItem[]>([])
|
||||
const receiverUserLoading = ref(false)
|
||||
|
||||
function formatReceiverUserLabel(u: Api.User.UserItem) {
|
||||
const name = (u.nickName || '').trim() || '-'
|
||||
const no = (u.userNo || '').trim()
|
||||
const phone = (u.phoneNo || '').trim()
|
||||
const parts = [name]
|
||||
if (no) parts.push(no)
|
||||
if (phone) parts.push(phone)
|
||||
return parts.join(' · ')
|
||||
}
|
||||
|
||||
async function searchReceiverUsers(query: string) {
|
||||
receiverUserLoading.value = true
|
||||
try {
|
||||
const res = await fetchUserList({
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
keyword: query?.trim() || undefined,
|
||||
status: '1'
|
||||
})
|
||||
receiverUserOptions.value = res.list || []
|
||||
} catch {
|
||||
receiverUserOptions.value = []
|
||||
} finally {
|
||||
receiverUserLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const stockOutRules = {
|
||||
qty: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
receiver: [{ required: true, message: '请输入领用人', trigger: 'blur' }]
|
||||
stockOutTime: [{ required: true, message: '请选择出库时间', trigger: 'change' }],
|
||||
receiver: [{ required: true, message: '请选择领用人', trigger: 'change' }]
|
||||
}
|
||||
|
||||
// 批量入库
|
||||
type BatchStockInLine = {
|
||||
materialId: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
unit: string
|
||||
stockQty: number
|
||||
qty: number
|
||||
remark: string
|
||||
}
|
||||
|
||||
const batchStockInVisible = ref(false)
|
||||
const batchStockInLoading = ref(false)
|
||||
const batchStockInFormRef = ref()
|
||||
const batchStockInLines = ref<BatchStockInLine[]>([])
|
||||
const batchInMaterialPickId = ref('')
|
||||
const batchInMaterialOptions = ref<Material[]>([])
|
||||
const batchInMaterialPickLoading = ref(false)
|
||||
const batchStockInForm = reactive({
|
||||
stockInTime: '',
|
||||
remark: ''
|
||||
})
|
||||
|
||||
const batchStockInRules = {
|
||||
stockInTime: [{ required: true, message: '请选择入库时间', trigger: 'change' }]
|
||||
}
|
||||
|
||||
// 批量出库
|
||||
type BatchStockOutLine = {
|
||||
materialId: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
unit: string
|
||||
stockQty: number
|
||||
qty: number
|
||||
remark: string
|
||||
}
|
||||
|
||||
const batchStockOutVisible = ref(false)
|
||||
const batchStockOutLoading = ref(false)
|
||||
const batchStockOutFormRef = ref()
|
||||
const batchStockOutLines = ref<BatchStockOutLine[]>([])
|
||||
const batchOutMaterialPickId = ref('')
|
||||
const batchOutMaterialOptions = ref<Material[]>([])
|
||||
const batchOutMaterialPickLoading = ref(false)
|
||||
const batchStockOutForm = reactive({
|
||||
stockOutTime: '',
|
||||
receiver: '',
|
||||
purpose: '',
|
||||
remark: ''
|
||||
})
|
||||
|
||||
const batchStockOutRules = {
|
||||
stockOutTime: [{ required: true, message: '请选择出库时间', trigger: 'change' }],
|
||||
receiver: [{ required: true, message: '请选择领用人', trigger: 'change' }]
|
||||
}
|
||||
|
||||
function formatNowDatetime() {
|
||||
const now = new Date()
|
||||
const pad = (n: number) => String(n).padStart(2, '0')
|
||||
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`
|
||||
}
|
||||
|
||||
// 查看
|
||||
@@ -535,6 +1038,7 @@
|
||||
dialogTitle.value = '新增物料'
|
||||
resetForm()
|
||||
dialogVisible.value = true
|
||||
void searchUnitOptions('')
|
||||
formRef.value?.clearValidate?.()
|
||||
}
|
||||
|
||||
@@ -549,7 +1053,9 @@
|
||||
formData.unit = row.unit || ''
|
||||
formData.status = row.status || '1'
|
||||
formData.remark = row.remark || ''
|
||||
ensureUnitOption(row.unit || '')
|
||||
dialogVisible.value = true
|
||||
void searchUnitOptions('')
|
||||
formRef.value?.clearValidate?.()
|
||||
}
|
||||
|
||||
@@ -596,6 +1102,7 @@
|
||||
function handleStockIn(row: Material) {
|
||||
stockInMaterialId.value = row.id
|
||||
stockInForm.qty = 1
|
||||
stockInForm.stockInTime = formatNowDatetime()
|
||||
stockInForm.remark = ''
|
||||
stockInVisible.value = true
|
||||
stockInFormRef.value?.clearValidate?.()
|
||||
@@ -607,6 +1114,7 @@
|
||||
try {
|
||||
await fetchStockInMaterial(stockInMaterialId.value!, {
|
||||
qty: stockInForm.qty,
|
||||
stockInTime: stockInForm.stockInTime || undefined,
|
||||
remark: stockInForm.remark?.trim() || undefined
|
||||
})
|
||||
ElMessage.success('入库成功')
|
||||
@@ -623,10 +1131,12 @@
|
||||
stockOutMaterialId.value = row.id
|
||||
stockOutStockQty.value = row.stockQty ?? 0
|
||||
stockOutForm.qty = 1
|
||||
stockOutForm.stockOutTime = formatNowDatetime()
|
||||
stockOutForm.receiver = ''
|
||||
stockOutForm.purpose = ''
|
||||
stockOutForm.remark = ''
|
||||
stockOutVisible.value = true
|
||||
void searchReceiverUsers('')
|
||||
stockOutFormRef.value?.clearValidate?.()
|
||||
}
|
||||
|
||||
@@ -640,6 +1150,7 @@
|
||||
try {
|
||||
await fetchStockOutMaterial(stockOutMaterialId.value!, {
|
||||
qty: stockOutForm.qty,
|
||||
stockOutTime: stockOutForm.stockOutTime || undefined,
|
||||
receiver: stockOutForm.receiver?.trim() || undefined,
|
||||
purpose: stockOutForm.purpose?.trim() || undefined,
|
||||
remark: stockOutForm.remark?.trim() || undefined
|
||||
@@ -654,6 +1165,227 @@
|
||||
}
|
||||
}
|
||||
|
||||
function formatBatchMaterialOptionLabel(m: Material) {
|
||||
const name = m.materialName || '-'
|
||||
const code = m.materialCode || ''
|
||||
const stock = m.stockQty ?? 0
|
||||
return code ? `${name}(${code})· 库存 ${stock}` : `${name} · 库存 ${stock}`
|
||||
}
|
||||
|
||||
function isBatchOutMaterialOptionDisabled(m: Material) {
|
||||
if (m.status !== '1') return true
|
||||
if ((m.stockQty ?? 0) <= 0) return true
|
||||
return batchStockOutLines.value.some((l) => l.materialId === m.id)
|
||||
}
|
||||
|
||||
function isBatchInMaterialOptionDisabled(m: Material) {
|
||||
if (m.status !== '1') return true
|
||||
return batchStockInLines.value.some((l) => l.materialId === m.id)
|
||||
}
|
||||
|
||||
async function searchBatchOutMaterials(query: string) {
|
||||
batchOutMaterialPickLoading.value = true
|
||||
try {
|
||||
const res = await fetchMaterialList({
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
keyword: query?.trim() || undefined,
|
||||
status: '1'
|
||||
})
|
||||
batchOutMaterialOptions.value = res.list || []
|
||||
} catch {
|
||||
batchOutMaterialOptions.value = []
|
||||
} finally {
|
||||
batchOutMaterialPickLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function searchBatchInMaterials(query: string) {
|
||||
batchInMaterialPickLoading.value = true
|
||||
try {
|
||||
const res = await fetchMaterialList({
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
keyword: query?.trim() || undefined,
|
||||
status: '1'
|
||||
})
|
||||
batchInMaterialOptions.value = res.list || []
|
||||
} catch {
|
||||
batchInMaterialOptions.value = []
|
||||
} finally {
|
||||
batchInMaterialPickLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function appendBatchStockOutLine(m: Material) {
|
||||
if (batchStockOutLines.value.some((l) => l.materialId === m.id)) {
|
||||
ElMessage.warning('该物料已在明细中')
|
||||
return false
|
||||
}
|
||||
if (m.status !== '1') {
|
||||
ElMessage.warning('该物料已停用,无法出库')
|
||||
return false
|
||||
}
|
||||
if ((m.stockQty ?? 0) <= 0) {
|
||||
ElMessage.warning('该物料库存为 0,无法出库')
|
||||
return false
|
||||
}
|
||||
batchStockOutLines.value.push({
|
||||
materialId: m.id,
|
||||
materialCode: m.materialCode || '',
|
||||
materialName: m.materialName || '',
|
||||
unit: m.unit || '',
|
||||
stockQty: m.stockQty ?? 0,
|
||||
qty: 1,
|
||||
remark: ''
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
function onBatchOutMaterialPick(materialId: string | null | undefined) {
|
||||
if (!materialId) return
|
||||
const m = batchOutMaterialOptions.value.find((x) => x.id === materialId)
|
||||
batchOutMaterialPickId.value = ''
|
||||
if (!m) return
|
||||
appendBatchStockOutLine(m)
|
||||
}
|
||||
|
||||
function appendBatchStockInLine(m: Material) {
|
||||
if (batchStockInLines.value.some((l) => l.materialId === m.id)) {
|
||||
ElMessage.warning('该物料已在明细中')
|
||||
return false
|
||||
}
|
||||
if (m.status !== '1') {
|
||||
ElMessage.warning('该物料已停用,无法入库')
|
||||
return false
|
||||
}
|
||||
batchStockInLines.value.push({
|
||||
materialId: m.id,
|
||||
materialCode: m.materialCode || '',
|
||||
materialName: m.materialName || '',
|
||||
unit: m.unit || '',
|
||||
stockQty: m.stockQty ?? 0,
|
||||
qty: 1,
|
||||
remark: ''
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
function onBatchInMaterialPick(materialId: string | null | undefined) {
|
||||
if (!materialId) return
|
||||
const m = batchInMaterialOptions.value.find((x) => x.id === materialId)
|
||||
batchInMaterialPickId.value = ''
|
||||
if (!m) return
|
||||
appendBatchStockInLine(m)
|
||||
}
|
||||
|
||||
function handleBatchStockIn() {
|
||||
batchStockInLines.value = []
|
||||
batchInMaterialPickId.value = ''
|
||||
batchInMaterialOptions.value = []
|
||||
batchStockInForm.stockInTime = formatNowDatetime()
|
||||
batchStockInForm.remark = ''
|
||||
batchStockInVisible.value = true
|
||||
void searchBatchInMaterials('')
|
||||
batchStockInFormRef.value?.clearValidate?.()
|
||||
}
|
||||
|
||||
async function handleBatchStockInSubmit() {
|
||||
await batchStockInFormRef.value?.validate?.()
|
||||
if (!batchStockInLines.value.length) {
|
||||
ElMessage.warning('请至少添加一条入库物料')
|
||||
return
|
||||
}
|
||||
for (const line of batchStockInLines.value) {
|
||||
if (!line.qty || line.qty <= 0) {
|
||||
ElMessage.warning(`「${line.materialName}」入库数量必须大于 0`)
|
||||
return
|
||||
}
|
||||
}
|
||||
await ElMessageBox.confirm(
|
||||
`确定批量入库 ${batchStockInLines.value.length} 项物料吗?`,
|
||||
'批量入库确认',
|
||||
{ type: 'warning' }
|
||||
)
|
||||
batchStockInLoading.value = true
|
||||
try {
|
||||
const res = await fetchBatchStockInMaterial({
|
||||
items: batchStockInLines.value.map((l) => ({
|
||||
materialId: l.materialId,
|
||||
qty: l.qty,
|
||||
remark: l.remark?.trim() || undefined
|
||||
})),
|
||||
stockInTime: batchStockInForm.stockInTime || undefined,
|
||||
remark: batchStockInForm.remark?.trim() || undefined
|
||||
})
|
||||
ElMessage.success(`批量入库成功,共 ${res.count ?? batchStockInLines.value.length} 项`)
|
||||
batchStockInVisible.value = false
|
||||
await loadData()
|
||||
} catch {
|
||||
/* 校验或接口错误已由全局处理 */
|
||||
} finally {
|
||||
batchStockInLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleBatchStockOut() {
|
||||
batchStockOutLines.value = []
|
||||
batchOutMaterialPickId.value = ''
|
||||
batchOutMaterialOptions.value = []
|
||||
batchStockOutForm.stockOutTime = formatNowDatetime()
|
||||
batchStockOutForm.receiver = ''
|
||||
batchStockOutForm.purpose = ''
|
||||
batchStockOutForm.remark = ''
|
||||
batchStockOutVisible.value = true
|
||||
void searchReceiverUsers('')
|
||||
void searchBatchOutMaterials('')
|
||||
batchStockOutFormRef.value?.clearValidate?.()
|
||||
}
|
||||
|
||||
async function handleBatchStockOutSubmit() {
|
||||
await batchStockOutFormRef.value?.validate?.()
|
||||
if (!batchStockOutLines.value.length) {
|
||||
ElMessage.warning('请至少添加一条出库物料')
|
||||
return
|
||||
}
|
||||
for (const line of batchStockOutLines.value) {
|
||||
if (!line.qty || line.qty <= 0) {
|
||||
ElMessage.warning(`「${line.materialName}」出库数量必须大于 0`)
|
||||
return
|
||||
}
|
||||
if (line.qty > line.stockQty) {
|
||||
ElMessage.warning(`「${line.materialName}」出库数量不能超过当前库存 ${line.stockQty}`)
|
||||
return
|
||||
}
|
||||
}
|
||||
await ElMessageBox.confirm(
|
||||
`确定为领用人「${batchStockOutForm.receiver}」批量出库 ${batchStockOutLines.value.length} 项物料吗?`,
|
||||
'批量出库确认',
|
||||
{ type: 'warning' }
|
||||
)
|
||||
batchStockOutLoading.value = true
|
||||
try {
|
||||
const res = await fetchBatchStockOutMaterial({
|
||||
items: batchStockOutLines.value.map((l) => ({
|
||||
materialId: l.materialId,
|
||||
qty: l.qty,
|
||||
remark: l.remark?.trim() || undefined
|
||||
})),
|
||||
stockOutTime: batchStockOutForm.stockOutTime || undefined,
|
||||
receiver: batchStockOutForm.receiver?.trim() || undefined,
|
||||
purpose: batchStockOutForm.purpose?.trim() || undefined,
|
||||
remark: batchStockOutForm.remark?.trim() || undefined
|
||||
})
|
||||
ElMessage.success(`批量出库成功,共 ${res.count ?? batchStockOutLines.value.length} 项`)
|
||||
batchStockOutVisible.value = false
|
||||
await loadData()
|
||||
} catch {
|
||||
/* 校验或接口错误已由全局处理 */
|
||||
} finally {
|
||||
batchStockOutLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadDictOptions()
|
||||
loadData()
|
||||
@@ -666,4 +1398,49 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.material-batch-stock-dialog {
|
||||
.batch-stock-move-head {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.batch-stock-move-lines-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.batch-stock-move-lines-head-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.batch-stock-move-material-select {
|
||||
flex-shrink: 0;
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.batch-stock-move-lines-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text, #0f172a);
|
||||
}
|
||||
|
||||
.batch-stock-move-lines-hint {
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.inner-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inner-cell-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user