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
e0b8b1b1
Commit
e0b8b1b1
authored
May 26, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wq' into zzq_bill_order
parents
90c52e7c
fb737ac7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
35 deletions
+93
-35
src/api/warehouse.ts
+42
-9
src/views/warehouse/issueDoc.vue
+0
-0
src/views/warehouse/receiptDoc.vue
+51
-26
No files found.
src/api/warehouse.ts
View file @
e0b8b1b1
...
@@ -233,7 +233,7 @@ export function deleteWarehouseInventory(ids: string) {
...
@@ -233,7 +233,7 @@ export function deleteWarehouseInventory(ids: string) {
// 入库单
// 入库单
export
function
warehouseInRecordListPage
(
export
function
warehouseInRecordListPage
Api
(
data
:
warehouseSearchForm
,
data
:
warehouseSearchForm
,
currentPage
:
number
,
currentPage
:
number
,
pageSize
:
number
,
pageSize
:
number
,
...
@@ -259,8 +259,7 @@ export function updateInRecordApi(form: InRecordEditForm) {
...
@@ -259,8 +259,7 @@ export function updateInRecordApi(form: InRecordEditForm) {
...
form
,
...
form
,
})
})
}
}
export
function
getWarehouseInRecordDetailApi
(
id
:
number
)
{
export
function
getWarehouseInRecordDetail
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/get'
,
'factory/warehouseInRecord/get'
,
{
{
...
@@ -270,8 +269,7 @@ export function getWarehouseInRecordDetail(id: number) {
...
@@ -270,8 +269,7 @@ export function getWarehouseInRecordDetail(id: number) {
},
},
)
)
}
}
export
function
getBySkuApi
(
warehouseId
:
number
,
sku
:
string
|
null
)
{
export
function
getBySku
(
warehouseId
:
number
,
sku
:
string
|
null
)
{
return
axios
.
get
<
never
,
BaseRespData
<
InterskuList
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
InterskuList
[]
>>
(
'customProductItem/getBySku'
,
'customProductItem/getBySku'
,
{
{
...
@@ -282,8 +280,7 @@ export function getBySku(warehouseId: number, sku: string | null) {
...
@@ -282,8 +280,7 @@ export function getBySku(warehouseId: number, sku: string | null) {
},
},
)
)
}
}
export
function
getByWareHouseIdAndCodeApi
(
wareHouseId
:
number
,
code
:
string
|
null
)
{
export
function
getByWareHouseIdAndCode
(
wareHouseId
:
number
,
code
:
string
|
null
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ILocation
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
ILocation
[]
>>
(
'factoryWarehouseLocation/getByWareHouseIdAndCode'
,
'factoryWarehouseLocation/getByWareHouseIdAndCode'
,
{
{
...
@@ -294,8 +291,7 @@ export function getByWareHouseIdAndCode(wareHouseId: number, code: string | null
...
@@ -294,8 +291,7 @@ export function getByWareHouseIdAndCode(wareHouseId: number, code: string | null
},
},
)
)
}
}
export
function
getInRecordStatusTree
()
{
export
function
getWarehouseStatusTree
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseTree
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseTree
[]
>>
(
'factory/warehouseInRecord/status_tree'
,
'factory/warehouseInRecord/status_tree'
,
)
)
...
@@ -306,3 +302,39 @@ export function getWarehouseListApi() {
...
@@ -306,3 +302,39 @@ export function getWarehouseListApi() {
'factoryWarehouseInfo/getAll'
,
'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 @
e0b8b1b1
This diff is collapsed.
Click to expand it.
src/views/warehouse/receiptDoc.vue
View file @
e0b8b1b1
...
@@ -99,7 +99,9 @@
...
@@ -99,7 +99,9 @@
<
div
class
=
"btn-list"
>
<
div
class
=
"btn-list"
>
<
el
-
button
type
=
"primary"
@
click
=
"addDialog(1)"
>
新增
<
/el-button
>
<
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
=
"rejectOrder"
>
删除
<
/el-button
>
<
el
-
button
type
=
"danger"
@
click
=
"handleBatchDelete"
>
删除
<
/el-button
>
<
el
-
button
type
=
"warning"
@
click
=
"importExcel"
>
导入
<
/el-button
>
<
el
-
button
type
=
"warning"
@
click
=
"importExcel"
>
导入
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"exportExcel"
>
导出
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"exportExcel"
>
导出
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"exportExcel"
>
<
el
-
button
type
=
"primary"
@
click
=
"exportExcel"
>
...
@@ -498,11 +500,11 @@
...
@@ -498,11 +500,11 @@
<
template
#
default
=
"{ row
}
"
>
<
template
#
default
=
"{ row
}
"
>
<
el
-
input
<
el
-
input
v
-
model
.
number
=
"row.buyStored"
v
-
model
.
number
=
"row.buyStored"
@
input
=
"setCostPrice(row)"
placeholder
=
"入库数量"
placeholder
=
"入库数量"
style
=
"width: 120px"
style
=
"width: 120px"
clearable
clearable
size
=
"small"
size
=
"small"
@
input
=
"setCostPrice(row)"
><
/el-input
>
><
/el-input
>
<
/template
>
<
/template
>
<
/ElTableColumn
>
<
/ElTableColumn
>
...
@@ -631,7 +633,7 @@
...
@@ -631,7 +633,7 @@
label
=
"操作"
label
=
"操作"
>
>
<
template
#
default
=
"{ row
}
"
>
<
template
#
default
=
"{ row
}
"
>
<
el
-
icon
:
size
=
"32"
color
=
"#67C23A"
<
el
-
icon
:
size
=
"32"
color
=
"#67C23A"
class
=
"cursor-pointer"
><
CirclePlusFilled
@
click
=
"skudblclick(row)"
><
CirclePlusFilled
@
click
=
"skudblclick(row)"
/><
/el-icon
>
/><
/el-icon
>
<
/template
>
<
/template
>
...
@@ -705,14 +707,15 @@ import {
...
@@ -705,14 +707,15 @@ import {
exportExcelApi
,
exportExcelApi
,
}
from
'@/api/order'
}
from
'@/api/order'
import
{
import
{
get
Warehouse
StatusTree
,
get
InRecord
StatusTree
,
warehouseInRecordListPage
,
warehouseInRecordListPage
Api
,
getWarehouseInRecordDetail
,
getWarehouseInRecordDetail
Api
,
getBySku
,
getBySku
Api
,
getWarehouseListApi
,
getWarehouseListApi
,
getByWareHouseIdAndCode
,
getByWareHouseIdAndCode
Api
,
addInRecordApi
,
addInRecordApi
,
updateInRecordApi
,
updateInRecordApi
,
deleteWarehouseInRecordApi
,
}
from
'@/api/warehouse'
}
from
'@/api/warehouse'
import
BigNumber
from
'bignumber.js'
import
BigNumber
from
'bignumber.js'
import
{
ref
,
onMounted
,
watch
,
nextTick
}
from
'vue'
import
{
ref
,
onMounted
,
watch
,
nextTick
}
from
'vue'
...
@@ -851,12 +854,6 @@ function getStartTime() {
...
@@ -851,12 +854,6 @@ function getStartTime() {
const
day
=
date
.
getDate
()
const
day
=
date
.
getDate
()
return
`${year
}
-${month
}
-${day
}
00:00:00`
return
`${year
}
-${month
}
-${day
}
00:00:00`
}
}
interface
Tree
{
remark
?:
string
count
?:
number
code
?:
string
children
?:
Tree
[]
}
const
selectSku
=
ref
(
''
)
const
selectSku
=
ref
(
''
)
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
...
@@ -884,7 +881,7 @@ const {
...
@@ -884,7 +881,7 @@ const {
onPageSizeChange
:
handleSizeChange
,
onPageSizeChange
:
handleSizeChange
,
}
=
usePageList
({
}
=
usePageList
({
query
:
(
page
,
pageSize
)
=>
query
:
(
page
,
pageSize
)
=>
warehouseInRecordListPage
(
warehouseInRecordListPage
Api
(
{
{
...
searchForm
.
value
,
...
searchForm
.
value
,
// status: nodeId.value === -1 ? null : nodeId.value,
// status: nodeId.value === -1 ? null : nodeId.value,
...
@@ -907,7 +904,7 @@ const setCostPrice = (item: InterProductList) => {
...
@@ -907,7 +904,7 @@ const setCostPrice = (item: InterProductList) => {
}
}
const
getTreeNum
=
async
()
=>
{
const
getTreeNum
=
async
()
=>
{
try
{
try
{
const
res
=
await
get
Warehouse
StatusTree
()
const
res
=
await
get
InRecord
StatusTree
()
res
.
data
=
[{
code
:
-
1
,
name
:
'全部'
,
children
:
res
.
data
}
]
res
.
data
=
[{
code
:
-
1
,
name
:
'全部'
,
children
:
res
.
data
}
]
treeData
.
value
=
res
.
data
treeData
.
value
=
res
.
data
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
...
@@ -939,7 +936,7 @@ const skuData = ref<InterskuList[]>([])
...
@@ -939,7 +936,7 @@ const skuData = ref<InterskuList[]>([])
const
selectbySku
=
async
()
=>
{
const
selectbySku
=
async
()
=>
{
if
(
!
editForm
.
value
.
warehouseId
)
return
ElMessage
.
error
(
'请选择仓库'
)
if
(
!
editForm
.
value
.
warehouseId
)
return
ElMessage
.
error
(
'请选择仓库'
)
try
{
try
{
const
res
=
await
getBySku
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
)
const
res
=
await
getBySku
Api
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
)
skuData
.
value
=
res
.
data
||
[]
skuData
.
value
=
res
.
data
||
[]
fetchLocationList
(
''
)
//获取该仓库下的所有库位
fetchLocationList
(
''
)
//获取该仓库下的所有库位
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -1039,7 +1036,6 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
...
@@ -1039,7 +1036,6 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
// get(url).then((res) => {
// get(url).then((res) => {
// if (res.code == 200) {
// if (res.code == 200) {
// otherPurchaseData.value = res.data;
// otherPurchaseData.value = res.data;
// productData.value = res.data;
//
}
else {
//
}
else {
// this.$alert(res.message, this.$t('错误提示'), {
// this.$alert(res.message, this.$t('错误提示'), {
// dangerouslyUseHTMLString: true,
// dangerouslyUseHTMLString: true,
...
@@ -1050,9 +1046,9 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
...
@@ -1050,9 +1046,9 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
const handleSelectionChange = (v: InterWarehousePage[]) => {
const handleSelectionChange = (v: InterWarehousePage[]) => {
selections.value = v
selections.value = v
}
}
const
product
Selection = ref<InterProductList[]>([])
const
otherWarehouse
Selection = ref<InterProductList[]>([])
const productSelectionChange = (v: InterProductList[]) => {
const productSelectionChange = (v: InterProductList[]) => {
product
Selection.value = v
otherWarehouse
Selection.value = v
}
}
const auditOrder = (key: string) => {
const auditOrder = (key: string) => {
let url = ''
let url = ''
...
@@ -1224,12 +1220,35 @@ const upSection = async () => {
...
@@ -1224,12 +1220,35 @@ const upSection = async () => {
console.error(e)
console.error(e)
}
}
}
}
const addPurchase = async () => {
}
const addPurchase = async () => {
const deleteOtherWarehousing = 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 () => {
const importData = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
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 ?? ''
nodeId.value = data.code ?? ''
search()
search()
}
}
...
@@ -1240,7 +1259,7 @@ const detailPager = ref({
...
@@ -1240,7 +1259,7 @@ const detailPager = ref({
}
)
}
)
const searchDetail = async () => {
const searchDetail = async () => {
try {
try {
const res = await getWarehouseInRecordDetail(currentRow.value?.id)
const res = await getWarehouseInRecordDetail
Api
(currentRow.value?.id)
detailList.value = res.data.records || []
detailList.value = res.data.records || []
detailPager.value.total = res.data.total
detailPager.value.total = res.data.total
}
catch (e) {
}
catch (e) {
...
@@ -1255,7 +1274,7 @@ const getLogList = async () => {
...
@@ -1255,7 +1274,7 @@ const getLogList = async () => {
console.error(e)
console.error(e)
}
}
}
}
const logisticsData = ref([])
//
const logisticsData = ref([])
const getLogisticsData = async () => {
const getLogisticsData = async () => {
// try {
// try {
// const res = await getLogisticsDataApi(currentRow.value?.id)
// const res = await getLogisticsDataApi(currentRow.value?.id)
...
@@ -1298,7 +1317,10 @@ const fetchLocationList = async (query: string) => {
...
@@ -1298,7 +1317,10 @@ const fetchLocationList = async (query: string) => {
//
}
//
}
locationLoading.value = true
locationLoading.value = true
try {
try {
const res = await getByWareHouseIdAndCode(editForm.value.warehouseId, query)
const res = await getByWareHouseIdAndCodeApi(
editForm.value.warehouseId,
query,
)
const result = res.data || []
const result = res.data || []
locationList.value = result.map((item: ILocation) => {
locationList.value = result.map((item: ILocation) => {
return {
return {
...
@@ -1332,6 +1354,9 @@ onMounted(() => {
...
@@ -1332,6 +1354,9 @@ onMounted(() => {
width: 500px;
width: 500px;
text-align: center;
text-align: center;
}
}
.cursor-pointer {
cursor: pointer;
}
.header-filter-form {
.header-filter-form {
:deep(.el-form-item) {
:deep(.el-form-item) {
margin-right: 14px;
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