Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
fb737ac7
Commit
fb737ac7
authored
May 26, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基本页面搭建
parent
4a56b804
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
31 deletions
+95
-31
components.d.ts
+2
-0
src/api/warehouse.ts
+42
-5
src/views/warehouse/issueDoc.vue
+0
-0
src/views/warehouse/receiptDoc.vue
+51
-26
No files found.
components.d.ts
View file @
fb737ac7
...
...
@@ -33,6 +33,7 @@ declare module 'vue' {
ElMenuItem
:
typeof
import
(
'element-plus/es'
)[
'ElMenuItem'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElRadio
:
typeof
import
(
'element-plus/es'
)[
'ElRadio'
]
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
...
...
@@ -57,6 +58,7 @@ declare module 'vue' {
SplitDiv
:
typeof
import
(
'./src/components/splitDiv/splitDiv.vue'
)[
'default'
]
TableRightMenu
:
typeof
import
(
'./src/components/TableRightMenu.vue'
)[
'default'
]
TableView
:
typeof
import
(
'./src/components/TableView.vue'
)[
'default'
]
UploadExcel
:
typeof
import
(
'./src/components/UploadExcel.vue'
)[
'default'
]
UploadImage
:
typeof
import
(
'./src/components/UploadImage.vue'
)[
'default'
]
WangEditor
:
typeof
import
(
'./src/components/WangEditor.vue'
)[
'default'
]
}
...
...
src/api/warehouse.ts
View file @
fb737ac7
...
...
@@ -97,7 +97,7 @@ export function deleteWarehouseInventory(ids: string) {
}
// 入库单
export
function
warehouseInRecordListPage
(
export
function
warehouseInRecordListPage
Api
(
data
:
warehouseSearchForm
,
currentPage
:
number
,
pageSize
:
number
,
...
...
@@ -121,7 +121,7 @@ export function updateInRecordApi(form: InRecordEditForm) {
...
form
,
})
}
export
function
getWarehouseInRecordDetail
(
id
:
number
)
{
export
function
getWarehouseInRecordDetail
Api
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/get'
,
{
...
...
@@ -131,7 +131,7 @@ export function getWarehouseInRecordDetail(id: number) {
},
)
}
export
function
getBySku
(
warehouseId
:
number
,
sku
:
string
|
null
)
{
export
function
getBySku
Api
(
warehouseId
:
number
,
sku
:
string
|
null
)
{
return
axios
.
get
<
never
,
BaseRespData
<
InterskuList
[]
>>
(
'customProductItem/getBySku'
,
{
...
...
@@ -142,7 +142,7 @@ export function getBySku(warehouseId: number, sku: string | null) {
},
)
}
export
function
getByWareHouseIdAndCode
(
wareHouseId
:
number
,
code
:
string
|
null
)
{
export
function
getByWareHouseIdAndCode
Api
(
wareHouseId
:
number
,
code
:
string
|
null
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ILocation
[]
>>
(
'factoryWarehouseLocation/getByWareHouseIdAndCode'
,
{
...
...
@@ -153,7 +153,7 @@ export function getByWareHouseIdAndCode(wareHouseId: number, code: string | null
},
)
}
export
function
get
Warehouse
StatusTree
()
{
export
function
get
InRecord
StatusTree
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseTree
[]
>>
(
'factory/warehouseInRecord/status_tree'
,
)
...
...
@@ -163,3 +163,39 @@ export function getWarehouseListApi() {
'factoryWarehouseInfo/getAll'
,
)
}
export
function
deleteWarehouseInRecordApi
(
ids
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/delete'
,
{
params
:
{
ids
},
},
)
}
// 出库单
export
function
getOutRecordStatusTree
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseTree
[]
>>
(
'factory/warehouseOutRecord/status_tree'
,
)
}
export
function
warehouseOutRecordListPage
(
data
:
warehouseSearchForm
,
currentPage
:
number
,
pageSize
:
number
,
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
InterWarehousePage
>>
(
'factory/warehouseOutRecord/list_page'
,
{
...
data
,
currentPage
,
pageSize
,
},
)
}
export
function
deleteWarehouseOutRecordApi
(
ids
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseOutRecord/delete'
,
{
params
:
{
ids
},
},
)
}
\ No newline at end of file
src/views/warehouse/issueDoc.vue
View file @
fb737ac7
This diff is collapsed.
Click to expand it.
src/views/warehouse/receiptDoc.vue
View file @
fb737ac7
...
...
@@ -99,7 +99,9 @@
<
div
class
=
"btn-list"
>
<
el
-
button
type
=
"primary"
@
click
=
"addDialog(1)"
>
新增
<
/el-button
>
<
el
-
button
type
=
"danger"
@
click
=
"rejectOrder"
>
驳回
<
/el-button
>
<
el
-
button
type
=
"danger"
@
click
=
"rejectOrder"
>
删除
<
/el-button
>
<
el
-
button
type
=
"danger"
@
click
=
"handleBatchDelete"
>
删除
<
/el-button
>
<
el
-
button
type
=
"warning"
@
click
=
"importExcel"
>
导入
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"exportExcel"
>
导出
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"exportExcel"
>
...
...
@@ -498,11 +500,11 @@
<
template
#
default
=
"{ row
}
"
>
<
el
-
input
v
-
model
.
number
=
"row.buyStored"
@
input
=
"setCostPrice(row)"
placeholder
=
"入库数量"
style
=
"width: 120px"
clearable
size
=
"small"
@
input
=
"setCostPrice(row)"
><
/el-input
>
<
/template
>
<
/ElTableColumn
>
...
...
@@ -631,7 +633,7 @@
label
=
"操作"
>
<
template
#
default
=
"{ row
}
"
>
<
el
-
icon
:
size
=
"32"
color
=
"#67C23A"
<
el
-
icon
:
size
=
"32"
color
=
"#67C23A"
class
=
"cursor-pointer"
><
CirclePlusFilled
@
click
=
"skudblclick(row)"
/><
/el-icon
>
<
/template
>
...
...
@@ -705,14 +707,15 @@ import {
exportExcelApi
,
}
from
'@/api/order'
import
{
get
Warehouse
StatusTree
,
warehouseInRecordListPage
,
getWarehouseInRecordDetail
,
getBySku
,
get
InRecord
StatusTree
,
warehouseInRecordListPage
Api
,
getWarehouseInRecordDetail
Api
,
getBySku
Api
,
getWarehouseListApi
,
getByWareHouseIdAndCode
,
getByWareHouseIdAndCode
Api
,
addInRecordApi
,
updateInRecordApi
,
deleteWarehouseInRecordApi
,
}
from
'@/api/warehouse'
import
BigNumber
from
'bignumber.js'
import
{
ref
,
onMounted
,
watch
,
nextTick
}
from
'vue'
...
...
@@ -851,12 +854,6 @@ function getStartTime() {
const
day
=
date
.
getDate
()
return
`${year
}
-${month
}
-${day
}
00:00:00`
}
interface
Tree
{
remark
?:
string
count
?:
number
code
?:
string
children
?:
Tree
[]
}
const
selectSku
=
ref
(
''
)
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
...
...
@@ -884,7 +881,7 @@ const {
onPageSizeChange
:
handleSizeChange
,
}
=
usePageList
({
query
:
(
page
,
pageSize
)
=>
warehouseInRecordListPage
(
warehouseInRecordListPage
Api
(
{
...
searchForm
.
value
,
// status: nodeId.value === -1 ? null : nodeId.value,
...
...
@@ -907,7 +904,7 @@ const setCostPrice = (item: InterProductList) => {
}
const
getTreeNum
=
async
()
=>
{
try
{
const
res
=
await
get
Warehouse
StatusTree
()
const
res
=
await
get
InRecord
StatusTree
()
res
.
data
=
[{
code
:
-
1
,
name
:
'全部'
,
children
:
res
.
data
}
]
treeData
.
value
=
res
.
data
await
nextTick
(()
=>
{
...
...
@@ -939,7 +936,7 @@ const skuData = ref<InterskuList[]>([])
const
selectbySku
=
async
()
=>
{
if
(
!
editForm
.
value
.
warehouseId
)
return
ElMessage
.
error
(
'请选择仓库'
)
try
{
const
res
=
await
getBySku
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
)
const
res
=
await
getBySku
Api
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
)
skuData
.
value
=
res
.
data
||
[]
fetchLocationList
(
''
)
//获取该仓库下的所有库位
}
catch
(
e
)
{
...
...
@@ -1039,7 +1036,6 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
// get(url).then((res) => {
// if (res.code == 200) {
// otherPurchaseData.value = res.data;
// productData.value = res.data;
//
}
else {
// this.$alert(res.message, this.$t('错误提示'), {
// dangerouslyUseHTMLString: true,
...
...
@@ -1050,9 +1046,9 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
const handleSelectionChange = (v: InterWarehousePage[]) => {
selections.value = v
}
const
product
Selection = ref<InterProductList[]>([])
const
otherWarehouse
Selection = ref<InterProductList[]>([])
const productSelectionChange = (v: InterProductList[]) => {
product
Selection.value = v
otherWarehouse
Selection.value = v
}
const auditOrder = (key: string) => {
let url = ''
...
...
@@ -1224,12 +1220,35 @@ const upSection = async () => {
console.error(e)
}
}
const addPurchase = async () => {
}
const deleteOtherWarehousing = async () => {
}
const addPurchase = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const deleteOtherWarehousing = () => {
const arr = otherWarehouseSelection.value
if (arr.length === 0) return
const idList = arr.map((v: InterProductList) => v.warehouseSku)
otherPurchaseData.value = otherPurchaseData.value.filter(
(item: InterProductList) => !idList.includes(item.warehouseSku),
)
}
const importData = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const nodeClick = (data: Tree) => {
const handleBatchDelete = async () => {
if (!selections.value.length) {
return ElMessage.warning('请选择要删除的数据')
}
await ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
const str = selections.value.map((el: InterWarehousePage) => el.id).join(',')
await deleteWarehouseInRecordApi(str)
ElMessage.success('删除成功')
await search()
}
const nodeClick = (data: InterWarehouseTree) => {
nodeId.value = data.code ?? ''
search()
}
...
...
@@ -1240,7 +1259,7 @@ const detailPager = ref({
}
)
const searchDetail = async () => {
try {
const res = await getWarehouseInRecordDetail(currentRow.value?.id)
const res = await getWarehouseInRecordDetail
Api
(currentRow.value?.id)
detailList.value = res.data.records || []
detailPager.value.total = res.data.total
}
catch (e) {
...
...
@@ -1255,7 +1274,7 @@ const getLogList = async () => {
console.error(e)
}
}
const logisticsData = ref([])
//
const logisticsData = ref([])
const getLogisticsData = async () => {
// try {
// const res = await getLogisticsDataApi(currentRow.value?.id)
...
...
@@ -1298,7 +1317,10 @@ const fetchLocationList = async (query: string) => {
//
}
locationLoading.value = true
try {
const res = await getByWareHouseIdAndCode(editForm.value.warehouseId, query)
const res = await getByWareHouseIdAndCodeApi(
editForm.value.warehouseId,
query,
)
const result = res.data || []
locationList.value = result.map((item: ILocation) => {
return {
...
...
@@ -1332,6 +1354,9 @@ onMounted(() => {
width: 500px;
text-align: center;
}
.cursor-pointer {
cursor: pointer;
}
.header-filter-form {
:deep(.el-form-item) {
margin-right: 14px;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment