Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b5740f64
authored
Jan 03, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
寄售库存
parent
5e949a9f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
41 deletions
src/views/consignmentManagement/consignmentInventory.vue
src/views/consignmentManagement/consignmentInventory.vue
View file @
b5740f64
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
<div
class=
"data-box"
>
<div
class=
"data-box"
>
<el-table
:data=
"tableData"
border
max-height=
"600"
@
selection-change=
"handleSelectionChange"
>
<el-table
:data=
"tableData"
border
max-height=
"600"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
fixed
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
fixed
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
sku_id"
label=
"SKUID"
width=
"15
0"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"
goods_id"
label=
"SKUID"
width=
"16
0"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"型号"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"型号"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"brand_standard_name"
label=
"猎芯标准品牌"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
>
<el-table-column
prop=
"brand_standard_name"
label=
"猎芯标准品牌"
width=
"150"
align=
"center"
:show-overflow-tooltip=
"true"
>
...
@@ -174,9 +174,9 @@
...
@@ -174,9 +174,9 @@
<el-table-column
prop=
"moq"
label=
"起订量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"moq"
label=
"起订量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"mpq"
label=
"标准包装量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"mpq"
label=
"标准包装量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"stock"
label=
"库存数量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"stock"
label=
"库存数量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
""
label=
"可用库存数量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"
stock
"
label=
"可用库存数量"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
""
label=
"在途库存"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"
in_transit_stock
"
label=
"在途库存"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
""
label=
"安全库存"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"
consignment_safe_stock
"
label=
"安全库存"
width=
"100"
align=
"center"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"cn_ladder_price"
label=
"含税销售价(¥)"
width=
"120"
align=
"center"
:show-overflow-tooltip=
"true"
>
<el-table-column
prop=
"cn_ladder_price"
label=
"含税销售价(¥)"
width=
"120"
align=
"center"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.cn_ladder_price && scope.row.cn_ladder_price.length>0"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.cn_ladder_price && scope.row.cn_ladder_price.length>0"
>
<el-popover
effect=
"light"
trigger=
"hover"
placement=
"bottom"
>
<el-popover
effect=
"light"
trigger=
"hover"
placement=
"bottom"
>
...
@@ -259,20 +259,17 @@
...
@@ -259,20 +259,17 @@
</el-table>
</el-table>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
></el-pagination>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
></el-pagination>
</div>
</div>
<!--修改库存弹窗-->
</div>
<!--修改安全库存-->
<el-dialog
title=
"修改安全库存"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisible"
width=
"900px"
>
<el-dialog
title=
"修改安全库存"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisible"
width=
"900px"
>
<div
class=
"kc-mask"
>
<div
class=
"kc-mask"
>
<el-table
:data=
"kucundata"
border
max-height=
"600"
>
<el-table
:data=
"kucundata"
border
max-height=
"600"
>
<el-table-column
prop=
"goods_name"
label=
"型号"
min-width=
"25%"
>
<el-table-column
prop=
"goods_name"
label=
"型号"
min-width=
"25%"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"25%"
></el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"25%"
>
<el-table-column
prop=
"consignment_safe_stock"
label=
"安全库存"
min-width=
"25%"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"stock"
label=
"库存数量"
min-width=
"25%"
>
</el-table-column>
<el-table-column
label=
"修改库存"
min-width=
"25%"
>
<el-table-column
label=
"修改库存"
min-width=
"25%"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.updateStock"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
<el-input
v-model=
"scope.row.updateStock"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -435,17 +432,14 @@
...
@@ -435,17 +432,14 @@
<!--寄售召回-->
<!--寄售召回-->
<el-dialog
title=
"寄售召回"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisibleConsignmentRecall"
width=
"900px"
>
<el-dialog
title=
"寄售召回"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisibleConsignmentRecall"
width=
"900px"
>
<div
class=
"kc-mask"
>
<div
class=
"kc-mask"
>
<el-table
:data=
"kucundata"
border
max-height=
"600"
>
<el-table
:data=
"consignmentRecallData"
border
max-height=
"600"
>
<el-table-column
prop=
"goods_name"
label=
"型号"
min-width=
"25%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
align=
"center"
fixed
></el-table-column>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"型号"
min-width=
"25%"
></el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"25%"
>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"25%"
></el-table-column>
</el-table-column>
<el-table-column
prop=
"stock"
label=
"可用库存数量"
min-width=
"25%"
></el-table-column>
<el-table-column
prop=
"stock"
label=
"可用库存数量"
min-width=
"25%"
>
</el-table-column>
<el-table-column
label=
"申请召回数量"
min-width=
"25%"
>
<el-table-column
label=
"申请召回数量"
min-width=
"25%"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.updateStock"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
<el-input
v-model=
"scope.row.updateStock"
placeholder=
"申请召回数量"
@
input=
"validateInput(scope.row)"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -455,7 +449,6 @@
...
@@ -455,7 +449,6 @@
<el-button
type=
"primary"
>
确 定
</el-button>
<el-button
type=
"primary"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
<Menu/>
<Menu/>
</div>
</div>
</template>
</template>
...
@@ -463,7 +456,7 @@
...
@@ -463,7 +456,7 @@
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
Menu
from
"@/components/menu.vue"
;
import
{
Autocomplete
,
Button
,
DatePicker
,
Dialog
,
Dropdown
,
DropdownItem
,
DropdownMenu
,
Form
,
FormItem
,
Input
,
Link
,
Message
,
Option
,
Pagination
,
Popover
,
Select
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
import
{
Autocomplete
,
Button
,
DatePicker
,
Dialog
,
Dropdown
,
DropdownItem
,
DropdownMenu
,
Form
,
FormItem
,
Input
,
Link
,
Message
,
Option
,
Pagination
,
Popover
,
Select
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
import
Util
from
"
../..
/tool"
;
import
Util
from
"
@
/tool"
;
Vue
.
prototype
.
$message
=
Message
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
).
use
(
Autocomplete
).
use
(
Tag
).
use
(
Link
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
).
use
(
Autocomplete
).
use
(
Tag
).
use
(
Link
)
...
@@ -483,6 +476,7 @@ export default {
...
@@ -483,6 +476,7 @@ export default {
dialogVisibleLogDetail
:
false
,
//日志详情
dialogVisibleLogDetail
:
false
,
//日志详情
dialogVisibleBatchModify
:
false
,
//批量修改
dialogVisibleBatchModify
:
false
,
//批量修改
dialogVisibleConsignmentRecall
:
false
,
//寄售召回
dialogVisibleConsignmentRecall
:
false
,
//寄售召回
consignmentRecallData
:
[],
//寄售召回数据
logs
:
[],
logs
:
[],
downHref
:
""
,
downHref
:
""
,
cp_time_val
:
''
,
cp_time_val
:
''
,
...
@@ -520,10 +514,6 @@ export default {
...
@@ -520,10 +514,6 @@ export default {
this
.
getSkuRankList
();
this
.
getSkuRankList
();
},
},
methods
:
{
methods
:
{
closeBothDialogs
()
{
this
.
dialogVisibleLog
=
false
;
this
.
dialogVisibleLogDetail
=
false
;
},
/**
/**
* 查看日志
* 查看日志
* @param row
* @param row
...
@@ -565,6 +555,13 @@ export default {
...
@@ -565,6 +555,13 @@ export default {
});
});
},
},
/**
/**
* 关闭弹窗
*/
closeBothDialogs
()
{
this
.
dialogVisibleLog
=
false
;
this
.
dialogVisibleLogDetail
=
false
;
},
/**
* 修改价格删除
* 修改价格删除
* @param index
* @param index
* @param row
* @param row
...
@@ -990,28 +987,28 @@ export default {
...
@@ -990,28 +987,28 @@ export default {
* 修改库存提交
* 修改库存提交
*/
*/
submitKc
()
{
submitKc
()
{
var
arr_
=
{}
// 使用reduce将库存数据转换为对象
var
self
=
this
;
const
stockUpdates
=
this
.
kucundata
.
reduce
((
acc
,
item
)
=>
({
for
(
var
i
=
0
;
i
<
self
.
kucundata
.
length
;
i
++
)
{
...
acc
,
arr_
[
self
.
kucundata
[
i
][
'goods_id'
]]
=
{
[
item
.
goods_id
]:
{
stock
:
item
.
updateStock
}
stock
:
self
.
kucundata
[
i
][
'updateStock'
]
}),
{});
}
}
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
stockUpdates
)
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'修改成功'
,
message
:
'修改成功'
,
type
:
'success'
type
:
'success'
});
});
this
.
getData
()
this
.
getData
();
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
;
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
msg
,
message
:
res
.
msg
,
type
:
'error'
type
:
'error'
});
});
}
}
})
});
},
},
/**
/**
* 上下架
* 上下架
...
@@ -1085,11 +1082,11 @@ export default {
...
@@ -1085,11 +1082,11 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
dangerouslyUseHTMLString
:
true
dangerouslyUseHTMLString
:
true
}).
then
(()
=>
{
}).
then
(()
=>
{
let
sku_ids
=
this
.
multipleSelection
.
map
(
item
=>
item
.
sku
_id
).
join
(
','
);
let
sku_ids
=
this
.
multipleSelection
.
map
(
item
=>
item
.
goods
_id
).
join
(
','
);
this
.
$http
(
'POST'
,
"/api/consignmentReplenishment/addConsignmentReplenishment"
,
{
sku_ids
:
sku_ids
}).
then
(
res
=>
{
this
.
$http
(
'POST'
,
"/api/consignmentReplenishment/addConsignmentReplenishment"
,
{
sku_ids
:
sku_ids
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'操作成功'
,
message
:
res
.
msg
,
type
:
'success'
,
type
:
'success'
,
onClose
:
()
=>
{
onClose
:
()
=>
{
this
.
getData
();
this
.
getData
();
...
@@ -1104,6 +1101,19 @@ export default {
...
@@ -1104,6 +1101,19 @@ export default {
});
});
break
;
break
;
case
3
:
case
3
:
if
(
!
this
.
multipleSelection
.
length
)
{
this
.
$message
.
warning
(
'请选择数据'
);
return
;
}
this
.
consignmentRecallData
=
this
.
multipleSelection
.
map
(
item
=>
{
return
{
sku_id
:
item
.
goods_id
,
goods_name
:
item
.
goods_name
,
brand_name
:
item
.
brand_name
,
stock
:
item
.
stock
,
updateStock
:
item
.
stock
}
});
this
.
dialogVisibleConsignmentRecall
=
true
;
this
.
dialogVisibleConsignmentRecall
=
true
;
break
;
break
;
}
}
...
@@ -1135,6 +1145,24 @@ export default {
...
@@ -1135,6 +1145,24 @@ export default {
*/
*/
handleUploadError
(
err
,
file
,
fileList
)
{
handleUploadError
(
err
,
file
,
fileList
)
{
this
.
$message
.
error
(
'上传失败,请重试'
);
this
.
$message
.
error
(
'上传失败,请重试'
);
},
/**
* 输入验证
* @param row
*/
validateInput
(
row
)
{
// 转换为数字进行比较
let
inputValue
=
Number
(
row
.
updateStock
)
||
0
;
let
stockValue
=
Number
(
row
.
stock
)
||
0
;
// 如果输入值大于库存,则设置为库存值
if
(
inputValue
>
stockValue
)
{
row
.
updateStock
=
stockValue
;
this
.
$message
({
message
:
'申请召回数量不能大于可用库存数量'
,
type
:
'warning'
});
}
}
}
},
},
components
:
{
components
:
{
...
...
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